summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BLAS/SRC/caxpy.f71
-rw-r--r--BLAS/SRC/ccopy.f68
-rw-r--r--BLAS/SRC/cdotc.f70
-rw-r--r--BLAS/SRC/cdotu.f68
-rw-r--r--BLAS/SRC/cgbmv.f313
-rw-r--r--BLAS/SRC/cgemm.f314
-rw-r--r--BLAS/SRC/cgemv.f256
-rw-r--r--BLAS/SRC/cgerc.f201
-rw-r--r--BLAS/SRC/cgeru.f201
-rw-r--r--BLAS/SRC/chbmv.f319
-rw-r--r--BLAS/SRC/chemm.f322
-rw-r--r--BLAS/SRC/chemv.f251
-rw-r--r--BLAS/SRC/cher.f217
-rw-r--r--BLAS/SRC/cher2.f241
-rw-r--r--BLAS/SRC/cher2k.f335
-rw-r--r--BLAS/SRC/cherk.f290
-rw-r--r--BLAS/SRC/chpmv.f243
-rw-r--r--BLAS/SRC/chpr.f211
-rw-r--r--BLAS/SRC/chpr2.f235
-rw-r--r--BLAS/SRC/crotg.f51
-rw-r--r--BLAS/SRC/cscal.f73
-rw-r--r--BLAS/SRC/csrot.f150
-rw-r--r--BLAS/SRC/csscal.f73
-rw-r--r--BLAS/SRC/cswap.f68
-rw-r--r--BLAS/SRC/csymm.f318
-rw-r--r--BLAS/SRC/csyr2k.f314
-rw-r--r--BLAS/SRC/csyrk.f278
-rw-r--r--BLAS/SRC/ctbmv.f327
-rw-r--r--BLAS/SRC/ctbsv.f331
-rw-r--r--BLAS/SRC/ctpmv.f233
-rw-r--r--BLAS/SRC/ctpsv.f237
-rw-r--r--BLAS/SRC/ctrmm.f299
-rw-r--r--BLAS/SRC/ctrmv.f241
-rw-r--r--BLAS/SRC/ctrsm.f304
-rw-r--r--BLAS/SRC/ctrsv.f245
-rw-r--r--BLAS/SRC/dasum.f70
-rw-r--r--BLAS/SRC/daxpy.f73
-rw-r--r--BLAS/SRC/dcabs1.f50
-rw-r--r--BLAS/SRC/dcopy.f70
-rw-r--r--BLAS/SRC/ddot.f70
-rw-r--r--BLAS/SRC/dgbmv.f310
-rw-r--r--BLAS/SRC/dgemm.f314
-rw-r--r--BLAS/SRC/dgemv.f254
-rw-r--r--BLAS/SRC/dger.f201
-rw-r--r--BLAS/SRC/dnrm2.f74
-rw-r--r--BLAS/SRC/drot.f71
-rw-r--r--BLAS/SRC/drotg.f57
-rw-r--r--BLAS/SRC/drotm.f136
-rw-r--r--BLAS/SRC/drotmg.f126
-rw-r--r--BLAS/SRC/dsbmv.f313
-rw-r--r--BLAS/SRC/dscal.f75
-rw-r--r--BLAS/SRC/dsdot.f168
-rw-r--r--BLAS/SRC/dspmv.f239
-rw-r--r--BLAS/SRC/dspr.f205
-rw-r--r--BLAS/SRC/dspr2.f231
-rw-r--r--BLAS/SRC/dswap.f70
-rw-r--r--BLAS/SRC/dsymm.f318
-rw-r--r--BLAS/SRC/dsymv.f247
-rw-r--r--BLAS/SRC/dsyr.f213
-rw-r--r--BLAS/SRC/dsyr2.f239
-rw-r--r--BLAS/SRC/dsyr2k.f325
-rw-r--r--BLAS/SRC/dsyrk.f283
-rw-r--r--BLAS/SRC/dtbmv.f327
-rw-r--r--BLAS/SRC/dtbsv.f331
-rw-r--r--BLAS/SRC/dtpmv.f233
-rw-r--r--BLAS/SRC/dtpsv.f237
-rw-r--r--BLAS/SRC/dtrmm.f297
-rw-r--r--BLAS/SRC/dtrmv.f241
-rw-r--r--BLAS/SRC/dtrsm.f306
-rw-r--r--BLAS/SRC/dtrsv.f243
-rw-r--r--BLAS/SRC/dzasum.f70
-rw-r--r--BLAS/SRC/dznrm2.f74
-rw-r--r--BLAS/SRC/icamax.f70
-rw-r--r--BLAS/SRC/idamax.f70
-rw-r--r--BLAS/SRC/isamax.f70
-rw-r--r--BLAS/SRC/izamax.f70
-rw-r--r--BLAS/SRC/lsame.f66
-rw-r--r--BLAS/SRC/sasum.f72
-rw-r--r--BLAS/SRC/saxpy.f73
-rw-r--r--BLAS/SRC/scabs1.f50
-rw-r--r--BLAS/SRC/scasum.f72
-rw-r--r--BLAS/SRC/scnrm2.f74
-rw-r--r--BLAS/SRC/scopy.f70
-rw-r--r--BLAS/SRC/sdot.f70
-rw-r--r--BLAS/SRC/sdsdot.f146
-rw-r--r--BLAS/SRC/sgbmv.f310
-rw-r--r--BLAS/SRC/sgemm.f314
-rw-r--r--BLAS/SRC/sgemv.f254
-rw-r--r--BLAS/SRC/sger.f199
-rw-r--r--BLAS/SRC/snrm2.f74
-rw-r--r--BLAS/SRC/srot.f71
-rw-r--r--BLAS/SRC/srotg.f57
-rw-r--r--BLAS/SRC/srotm.f138
-rw-r--r--BLAS/SRC/srotmg.f124
-rw-r--r--BLAS/SRC/ssbmv.f313
-rw-r--r--BLAS/SRC/sscal.f75
-rw-r--r--BLAS/SRC/sspmv.f239
-rw-r--r--BLAS/SRC/sspr.f205
-rw-r--r--BLAS/SRC/sspr2.f229
-rw-r--r--BLAS/SRC/sswap.f70
-rw-r--r--BLAS/SRC/ssymm.f318
-rw-r--r--BLAS/SRC/ssymv.f247
-rw-r--r--BLAS/SRC/ssyr.f213
-rw-r--r--BLAS/SRC/ssyr2.f237
-rw-r--r--BLAS/SRC/ssyr2k.f325
-rw-r--r--BLAS/SRC/ssyrk.f283
-rw-r--r--BLAS/SRC/stbmv.f327
-rw-r--r--BLAS/SRC/stbsv.f331
-rw-r--r--BLAS/SRC/stpmv.f233
-rw-r--r--BLAS/SRC/stpsv.f237
-rw-r--r--BLAS/SRC/strmm.f299
-rw-r--r--BLAS/SRC/strmv.f241
-rw-r--r--BLAS/SRC/strsm.f306
-rw-r--r--BLAS/SRC/strsv.f245
-rw-r--r--BLAS/SRC/xerbla.f81
-rw-r--r--BLAS/SRC/xerbla_array.f119
-rw-r--r--BLAS/SRC/zaxpy.f71
-rw-r--r--BLAS/SRC/zcopy.f68
-rw-r--r--BLAS/SRC/zdotc.f68
-rw-r--r--BLAS/SRC/zdotu.f68
-rw-r--r--BLAS/SRC/zdrot.f150
-rw-r--r--BLAS/SRC/zdscal.f73
-rw-r--r--BLAS/SRC/zgbmv.f313
-rw-r--r--BLAS/SRC/zgemm.f314
-rw-r--r--BLAS/SRC/zgemv.f256
-rw-r--r--BLAS/SRC/zgerc.f201
-rw-r--r--BLAS/SRC/zgeru.f201
-rw-r--r--BLAS/SRC/zhbmv.f319
-rw-r--r--BLAS/SRC/zhemm.f322
-rw-r--r--BLAS/SRC/zhemv.f251
-rw-r--r--BLAS/SRC/zher.f219
-rw-r--r--BLAS/SRC/zher2.f245
-rw-r--r--BLAS/SRC/zher2k.f336
-rw-r--r--BLAS/SRC/zherk.f290
-rw-r--r--BLAS/SRC/zhpmv.f243
-rw-r--r--BLAS/SRC/zhpr.f211
-rw-r--r--BLAS/SRC/zhpr2.f237
-rw-r--r--BLAS/SRC/zrotg.f51
-rw-r--r--BLAS/SRC/zscal.f73
-rw-r--r--BLAS/SRC/zswap.f68
-rw-r--r--BLAS/SRC/zsymm.f318
-rw-r--r--BLAS/SRC/zsyr2k.f316
-rw-r--r--BLAS/SRC/zsyrk.f278
-rw-r--r--BLAS/SRC/ztbmv.f327
-rw-r--r--BLAS/SRC/ztbsv.f331
-rw-r--r--BLAS/SRC/ztpmv.f233
-rw-r--r--BLAS/SRC/ztpsv.f237
-rw-r--r--BLAS/SRC/ztrmm.f299
-rw-r--r--BLAS/SRC/ztrmv.f241
-rw-r--r--BLAS/SRC/ztrsm.f304
-rw-r--r--BLAS/SRC/ztrsv.f245
-rw-r--r--BLAS/TESTING/cblat1.f49
-rw-r--r--BLAS/TESTING/cblat2.f175
-rw-r--r--BLAS/TESTING/cblat3.f139
-rw-r--r--BLAS/TESTING/dblat1.f49
-rw-r--r--BLAS/TESTING/dblat2.f173
-rw-r--r--BLAS/TESTING/dblat3.f133
-rw-r--r--BLAS/TESTING/sblat1.f49
-rw-r--r--BLAS/TESTING/sblat2.f173
-rw-r--r--BLAS/TESTING/sblat3.f133
-rw-r--r--BLAS/TESTING/zblat1.f49
-rw-r--r--BLAS/TESTING/zblat2.f175
-rw-r--r--BLAS/TESTING/zblat3.f140
-rw-r--r--DOCS/Doxyfile1753
-rw-r--r--DOCS/groups-usr.dox410
-rw-r--r--DOCS/lawn81.tex (renamed from INSTALL/lawn81.tex)0
-rw-r--r--DOCS/org2.ps (renamed from INSTALL/org2.ps)0
-rw-r--r--DOCS/psfig.tex (renamed from INSTALL/psfig.tex)0
-rw-r--r--INSTALL/LAPACK_version.f34
-rw-r--r--INSTALL/dlamch.f262
-rw-r--r--INSTALL/dlamchf77.f494
-rw-r--r--INSTALL/dlamchtst.f30
-rw-r--r--INSTALL/dsecnd_EXT_ETIME.f44
-rw-r--r--INSTALL/dsecnd_EXT_ETIME_.f41
-rw-r--r--INSTALL/dsecnd_INT_CPU_TIME.f43
-rw-r--r--INSTALL/dsecnd_INT_ETIME.f43
-rw-r--r--INSTALL/dsecnd_NONE.f47
-rw-r--r--INSTALL/dsecndtst.f32
-rw-r--r--INSTALL/ilaver.f61
-rw-r--r--INSTALL/lsame.f61
-rw-r--r--INSTALL/lsametst.f32
-rw-r--r--INSTALL/second_EXT_ETIME.f43
-rw-r--r--INSTALL/second_EXT_ETIME_.f42
-rw-r--r--INSTALL/second_INT_CPU_TIME.f43
-rw-r--r--INSTALL/second_INT_ETIME.f43
-rw-r--r--INSTALL/second_NONE.f47
-rw-r--r--INSTALL/secondtst.f28
-rw-r--r--INSTALL/slamch.f263
-rw-r--r--INSTALL/slamchf77.f502
-rw-r--r--INSTALL/slamchtst.f26
-rw-r--r--INSTALL/tstiee.f509
-rw-r--r--SRC/VARIANTS/cholesky/RL/cpotrf.f152
-rw-r--r--SRC/VARIANTS/cholesky/RL/dpotrf.f152
-rw-r--r--SRC/VARIANTS/cholesky/RL/spotrf.f152
-rw-r--r--SRC/VARIANTS/cholesky/RL/zpotrf.f152
-rw-r--r--SRC/VARIANTS/cholesky/TOP/cpotrf.f152
-rw-r--r--SRC/VARIANTS/cholesky/TOP/dpotrf.f152
-rw-r--r--SRC/VARIANTS/cholesky/TOP/spotrf.f152
-rw-r--r--SRC/VARIANTS/cholesky/TOP/zpotrf.f152
-rw-r--r--SRC/VARIANTS/lu/CR/cgetrf.f146
-rw-r--r--SRC/VARIANTS/lu/CR/dgetrf.f146
-rw-r--r--SRC/VARIANTS/lu/CR/sgetrf.f146
-rw-r--r--SRC/VARIANTS/lu/CR/zgetrf.f146
-rw-r--r--SRC/VARIANTS/lu/LL/cgetrf.f140
-rw-r--r--SRC/VARIANTS/lu/LL/dgetrf.f140
-rw-r--r--SRC/VARIANTS/lu/LL/sgetrf.f140
-rw-r--r--SRC/VARIANTS/lu/LL/zgetrf.f140
-rw-r--r--SRC/VARIANTS/lu/REC/cgetrf.f225
-rw-r--r--SRC/VARIANTS/lu/REC/dgetrf.f225
-rw-r--r--SRC/VARIANTS/lu/REC/sgetrf.f209
-rw-r--r--SRC/VARIANTS/lu/REC/zgetrf.f209
-rw-r--r--SRC/VARIANTS/qr/LL/cgeqrf.f214
-rw-r--r--SRC/VARIANTS/qr/LL/dgeqrf.f214
-rw-r--r--SRC/VARIANTS/qr/LL/sceil.f65
-rw-r--r--SRC/VARIANTS/qr/LL/sgeqrf.f214
-rw-r--r--SRC/VARIANTS/qr/LL/zgeqrf.f214
-rw-r--r--SRC/cbbcsd.f464
-rw-r--r--SRC/cbdsqr.f345
-rw-r--r--SRC/cgbbrd.f273
-rw-r--r--SRC/cgbcon.f203
-rw-r--r--SRC/cgbequ.f217
-rw-r--r--SRC/cgbequb.f238
-rw-r--r--SRC/cgbrfs.f295
-rw-r--r--SRC/cgbrfsx.f755
-rw-r--r--SRC/cgbsv.f240
-rw-r--r--SRC/cgbsvx.f606
-rw-r--r--SRC/cgbsvxx.f995
-rw-r--r--SRC/cgbtf2.f207
-rw-r--r--SRC/cgbtrf.f205
-rw-r--r--SRC/cgbtrs.f188
-rw-r--r--SRC/cgebak.f177
-rw-r--r--SRC/cgebal.f219
-rw-r--r--SRC/cgebd2.f247
-rw-r--r--SRC/cgebrd.f275
-rw-r--r--SRC/cgecon.f167
-rw-r--r--SRC/cgeequ.f195
-rw-r--r--SRC/cgeequb.f216
-rw-r--r--SRC/cgees.f290
-rw-r--r--SRC/cgeesx.f361
-rw-r--r--SRC/cgeev.f257
-rw-r--r--SRC/cgeevx.f446
-rw-r--r--SRC/cgegs.f341
-rw-r--r--SRC/cgegv.f456
-rw-r--r--SRC/cgehd2.f175
-rw-r--r--SRC/cgehrd.f207
-rw-r--r--SRC/cgelq2.f133
-rw-r--r--SRC/cgelqf.f155
-rw-r--r--SRC/cgels.f278
-rw-r--r--SRC/cgelsd.f357
-rw-r--r--SRC/cgelss.f260
-rw-r--r--SRC/cgelsx.f273
-rw-r--r--SRC/cgelsy.f330
-rw-r--r--SRC/cgemqrt.f241
-rw-r--r--SRC/cgeql2.f135
-rw-r--r--SRC/cgeqlf.f158
-rw-r--r--SRC/cgeqp3.f225
-rw-r--r--SRC/cgeqpf.f210
-rw-r--r--SRC/cgeqr2.f133
-rw-r--r--SRC/cgeqr2p.f133
-rw-r--r--SRC/cgeqrf.f182
-rw-r--r--SRC/cgeqrfp.f182
-rw-r--r--SRC/cgeqrt.f187
-rw-r--r--SRC/cgeqrt2.f164
-rw-r--r--SRC/cgeqrt3.f177
-rw-r--r--SRC/cgerfs.f264
-rw-r--r--SRC/cgerfsx.f712
-rw-r--r--SRC/cgerq2.f158
-rw-r--r--SRC/cgerqf.f158
-rw-r--r--SRC/cgesc2.f160
-rw-r--r--SRC/cgesdd.f351
-rw-r--r--SRC/cgesv.f167
-rw-r--r--SRC/cgesvd.f329
-rw-r--r--SRC/cgesvx.f571
-rw-r--r--SRC/cgesvxx.f960
-rw-r--r--SRC/cgetc2.f154
-rw-r--r--SRC/cgetf2.f147
-rw-r--r--SRC/cgetrf.f147
-rw-r--r--SRC/cgetri.f155
-rw-r--r--SRC/cgetrs.f163
-rw-r--r--SRC/cggbak.f205
-rw-r--r--SRC/cggbal.f262
-rw-r--r--SRC/cgges.f415
-rw-r--r--SRC/cggesx.f515
-rw-r--r--SRC/cggev.f328
-rw-r--r--SRC/cggevx.f595
-rw-r--r--SRC/cggglm.f274
-rw-r--r--SRC/cgghrd.f306
-rw-r--r--SRC/cgglse.f268
-rw-r--r--SRC/cggqrf.f310
-rw-r--r--SRC/cggrqf.f308
-rw-r--r--SRC/cggsvd.f537
-rw-r--r--SRC/cggsvp.f381
-rw-r--r--SRC/cgtcon.f195
-rw-r--r--SRC/cgtrfs.f299
-rw-r--r--SRC/cgtsv.f174
-rw-r--r--SRC/cgtsvx.f459
-rw-r--r--SRC/cgttrf.f177
-rw-r--r--SRC/cgttrs.f188
-rw-r--r--SRC/cgtts2.f173
-rw-r--r--SRC/chbev.f214
-rw-r--r--SRC/chbevd.f330
-rw-r--r--SRC/chbevx.f395
-rw-r--r--SRC/chbgst.f233
-rw-r--r--SRC/chbgv.f267
-rw-r--r--SRC/chbgvd.f399
-rw-r--r--SRC/chbgvx.f446
-rw-r--r--SRC/chbtrd.f235
-rw-r--r--SRC/checon.f169
-rw-r--r--SRC/cheequb.f153
-rw-r--r--SRC/cheev.f196
-rw-r--r--SRC/cheevd.f317
-rw-r--r--SRC/cheevr.f580
-rw-r--r--SRC/cheevx.f387
-rw-r--r--SRC/chegs2.f178
-rw-r--r--SRC/chegst.f178
-rw-r--r--SRC/chegv.f271
-rw-r--r--SRC/chegvd.f392
-rw-r--r--SRC/chegvx.f468
-rw-r--r--SRC/cherfs.f276
-rw-r--r--SRC/cherfsx.f690
-rw-r--r--SRC/chesv.f257
-rw-r--r--SRC/chesvx.f446
-rw-r--r--SRC/chesvxx.f883
-rw-r--r--SRC/cheswapr.f127
-rw-r--r--SRC/chetd2.f232
-rw-r--r--SRC/chetf2.f284
-rw-r--r--SRC/chetrd.f254
-rw-r--r--SRC/chetrf.f278
-rw-r--r--SRC/chetri.f156
-rw-r--r--SRC/chetri2.f183
-rw-r--r--SRC/chetri2x.f159
-rw-r--r--SRC/chetrs.f161
-rw-r--r--SRC/chetrs2.f166
-rw-r--r--SRC/chfrk.f261
-rw-r--r--SRC/chgeqz.f449
-rw-r--r--SRC/chla_transtype.f71
-rw-r--r--SRC/chpcon.f161
-rw-r--r--SRC/chpev.f192
-rw-r--r--SRC/chpevd.f306
-rw-r--r--SRC/chpevx.f354
-rw-r--r--SRC/chpgst.f156
-rw-r--r--SRC/chpgv.f241
-rw-r--r--SRC/chpgvd.f370
-rw-r--r--SRC/chpgvx.f418
-rw-r--r--SRC/chprfs.f258
-rw-r--r--SRC/chpsv.f248
-rw-r--r--SRC/chpsvx.f440
-rw-r--r--SRC/chptrd.f192
-rw-r--r--SRC/chptrf.f247
-rw-r--r--SRC/chptri.f149
-rw-r--r--SRC/chptrs.f154
-rw-r--r--SRC/chsein.f369
-rw-r--r--SRC/chseqr.f365
-rw-r--r--SRC/cla_gbamv.f285
-rw-r--r--SRC/cla_gbrcond_c.f229
-rw-r--r--SRC/cla_gbrcond_x.f219
-rw-r--r--SRC/cla_gbrfsx_extended.f678
-rw-r--r--SRC/cla_gbrpvgrw.f160
-rw-r--r--SRC/cla_geamv.f270
-rw-r--r--SRC/cla_gercond_c.f194
-rw-r--r--SRC/cla_gercond_x.f182
-rw-r--r--SRC/cla_gerfsx_extended.f655
-rw-r--r--SRC/cla_gerpvgrw.f123
-rw-r--r--SRC/cla_heamv.f270
-rw-r--r--SRC/cla_hercond_c.f192
-rw-r--r--SRC/cla_hercond_x.f182
-rw-r--r--SRC/cla_herfsx_extended.f655
-rw-r--r--SRC/cla_herpvgrw.f171
-rw-r--r--SRC/cla_lin_berr.f142
-rw-r--r--SRC/cla_porcond_c.f180
-rw-r--r--SRC/cla_porcond_x.f168
-rw-r--r--SRC/cla_porfsx_extended.f643
-rw-r--r--SRC/cla_porpvgrw.f134
-rw-r--r--SRC/cla_syamv.f273
-rw-r--r--SRC/cla_syrcond_c.f192
-rw-r--r--SRC/cla_syrcond_x.f182
-rw-r--r--SRC/cla_syrfsx_extended.f655
-rw-r--r--SRC/cla_syrpvgrw.f171
-rw-r--r--SRC/cla_wwaddw.f103
-rw-r--r--SRC/clabrd.f279
-rw-r--r--SRC/clacgv.f87
-rw-r--r--SRC/clacn2.f179
-rw-r--r--SRC/clacon.f151
-rw-r--r--SRC/clacp2.f133
-rw-r--r--SRC/clacpy.f132
-rw-r--r--SRC/clacrm.f148
-rw-r--r--SRC/clacrt.f136
-rw-r--r--SRC/cladiv.f69
-rw-r--r--SRC/claed0.f202
-rw-r--r--SRC/claed7.f368
-rw-r--r--SRC/claed8.f332
-rw-r--r--SRC/claein.f200
-rw-r--r--SRC/claesy.f143
-rw-r--r--SRC/claev2.f152
-rw-r--r--SRC/clag2z.f133
-rw-r--r--SRC/clags2.f215
-rw-r--r--SRC/clagtm.f194
-rw-r--r--SRC/clahef.f233
-rw-r--r--SRC/clahqr.f302
-rw-r--r--SRC/clahr2.f238
-rw-r--r--SRC/clahrd.f220
-rw-r--r--SRC/claic1.f189
-rw-r--r--SRC/clals0.f414
-rw-r--r--SRC/clalsa.f400
-rw-r--r--SRC/clalsd.f280
-rw-r--r--SRC/clangb.f174
-rw-r--r--SRC/clange.f160
-rw-r--r--SRC/clangt.f146
-rw-r--r--SRC/clanhb.f188
-rw-r--r--SRC/clanhe.f178
-rw-r--r--SRC/clanhf.f422
-rw-r--r--SRC/clanhp.f167
-rw-r--r--SRC/clanhs.f151
-rw-r--r--SRC/clanht.f138
-rw-r--r--SRC/clansb.f184
-rw-r--r--SRC/clansp.f163
-rw-r--r--SRC/clansy.f176
-rw-r--r--SRC/clantb.f199
-rw-r--r--SRC/clantp.f178
-rw-r--r--SRC/clantr.f201
-rw-r--r--SRC/clapll.f129
-rw-r--r--SRC/clapmr.f141
-rw-r--r--SRC/clapmt.f136
-rw-r--r--SRC/claqgb.f226
-rw-r--r--SRC/claqge.f197
-rw-r--r--SRC/claqhb.f200
-rw-r--r--SRC/claqhe.f189
-rw-r--r--SRC/claqhp.f176
-rw-r--r--SRC/claqp2.f202
-rw-r--r--SRC/claqps.f246
-rw-r--r--SRC/claqr0.f374
-rw-r--r--SRC/claqr1.f139
-rw-r--r--SRC/claqr2.f415
-rw-r--r--SRC/claqr3.f409
-rw-r--r--SRC/claqr4.f389
-rw-r--r--SRC/claqr5.f377
-rw-r--r--SRC/claqsb.f200
-rw-r--r--SRC/claqsp.f176
-rw-r--r--SRC/claqsy.f189
-rw-r--r--SRC/clar1v.f340
-rw-r--r--SRC/clar2v.f145
-rw-r--r--SRC/clarcm.f148
-rw-r--r--SRC/clarf.f176
-rw-r--r--SRC/clarfb.f258
-rw-r--r--SRC/clarfg.f144
-rw-r--r--SRC/clarfgp.f140
-rw-r--r--SRC/clarft.f217
-rw-r--r--SRC/clarfx.f161
-rw-r--r--SRC/clargv.f155
-rw-r--r--SRC/clarnv.f130
-rw-r--r--SRC/clarrv.f429
-rw-r--r--SRC/clarscl2.f115
-rw-r--r--SRC/clartg.f126
-rw-r--r--SRC/clartv.f137
-rw-r--r--SRC/clarz.f203
-rw-r--r--SRC/clarzb.f256
-rw-r--r--SRC/clarzt.f255
-rw-r--r--SRC/clascl.f190
-rw-r--r--SRC/clascl2.f115
-rw-r--r--SRC/claset.f137
-rw-r--r--SRC/clasr.f319
-rw-r--r--SRC/classq.f144
-rw-r--r--SRC/claswp.f149
-rw-r--r--SRC/clasyf.f233
-rw-r--r--SRC/clatbs.f393
-rw-r--r--SRC/clatdf.f249
-rw-r--r--SRC/clatps.f375
-rw-r--r--SRC/clatrd.f275
-rw-r--r--SRC/clatrs.f388
-rw-r--r--SRC/clatrz.f188
-rw-r--r--SRC/clatzm.f224
-rw-r--r--SRC/clauu2.f136
-rw-r--r--SRC/clauum.f136
-rw-r--r--SRC/cpbcon.f182
-rw-r--r--SRC/cpbequ.f180
-rw-r--r--SRC/cpbrfs.f271
-rw-r--r--SRC/cpbstf.f221
-rw-r--r--SRC/cpbsv.f242
-rw-r--r--SRC/cpbsvx.f557
-rw-r--r--SRC/cpbtf2.f211
-rw-r--r--SRC/cpbtrf.f203
-rw-r--r--SRC/cpbtrs.f162
-rw-r--r--SRC/cpftrf.f377
-rw-r--r--SRC/cpftri.f348
-rw-r--r--SRC/cpftrs.f359
-rw-r--r--SRC/cpocon.f161
-rw-r--r--SRC/cpoequ.f153
-rw-r--r--SRC/cpoequb.f158
-rw-r--r--SRC/cporfs.f262
-rw-r--r--SRC/cporfsx.f677
-rw-r--r--SRC/cposv.f186
-rw-r--r--SRC/cposvx.f489
-rw-r--r--SRC/cposvxx.f874
-rw-r--r--SRC/cpotf2.f153
-rw-r--r--SRC/cpotrf.f149
-rw-r--r--SRC/cpotri.f124
-rw-r--r--SRC/cpotrs.f143
-rw-r--r--SRC/cppcon.f161
-rw-r--r--SRC/cppequ.f160
-rw-r--r--SRC/cpprfs.f244
-rw-r--r--SRC/cppsv.f208
-rw-r--r--SRC/cppsvx.f507
-rw-r--r--SRC/cpptrf.f167
-rw-r--r--SRC/cpptri.f124
-rw-r--r--SRC/cpptrs.f142
-rw-r--r--SRC/cpstf2.f205
-rw-r--r--SRC/cpstrf.f205
-rw-r--r--SRC/cptcon.f160
-rw-r--r--SRC/cpteqr.f214
-rw-r--r--SRC/cptrfs.f259
-rw-r--r--SRC/cptsv.f158
-rw-r--r--SRC/cptsvx.f353
-rw-r--r--SRC/cpttrf.f121
-rw-r--r--SRC/cpttrs.f166
-rw-r--r--SRC/cptts2.f154
-rw-r--r--SRC/crot.f129
-rw-r--r--SRC/cspcon.f161
-rw-r--r--SRC/cspmv.f224
-rw-r--r--SRC/cspr.f195
-rw-r--r--SRC/csprfs.f258
-rw-r--r--SRC/cspsv.f248
-rw-r--r--SRC/cspsvx.f440
-rw-r--r--SRC/csptrf.f249
-rw-r--r--SRC/csptri.f149
-rw-r--r--SRC/csptrs.f154
-rw-r--r--SRC/csrscl.f103
-rw-r--r--SRC/cstedc.f339
-rw-r--r--SRC/cstegr.f392
-rw-r--r--SRC/cstein.f268
-rw-r--r--SRC/cstemr.f535
-rw-r--r--SRC/csteqr.f188
-rw-r--r--SRC/csycon.f169
-rw-r--r--SRC/csyconv.f172
-rw-r--r--SRC/csyequb.f194
-rw-r--r--SRC/csymv.f233
-rw-r--r--SRC/csyr.f198
-rw-r--r--SRC/csyrfs.f276
-rw-r--r--SRC/csyrfsx.f691
-rw-r--r--SRC/csysv.f257
-rw-r--r--SRC/csysvx.f446
-rw-r--r--SRC/csysvxx.f896
-rw-r--r--SRC/csyswapr.f127
-rw-r--r--SRC/csytf2.f282
-rw-r--r--SRC/csytrf.f289
-rw-r--r--SRC/csytri.f156
-rw-r--r--SRC/csytri2.f182
-rw-r--r--SRC/csytri2x.f159
-rw-r--r--SRC/csytrs.f161
-rw-r--r--SRC/csytrs2.f166
-rw-r--r--SRC/ctbcon.f199
-rw-r--r--SRC/ctbrfs.f271
-rw-r--r--SRC/ctbtrs.f205
-rw-r--r--SRC/ctfsm.f513
-rw-r--r--SRC/ctftri.f372
-rw-r--r--SRC/ctfttp.f342
-rw-r--r--SRC/ctfttr.f354
-rw-r--r--SRC/ctgevc.f329
-rw-r--r--SRC/ctgex2.f280
-rw-r--r--SRC/ctgexc.f303
-rw-r--r--SRC/ctgsen.f723
-rw-r--r--SRC/ctgsja.f543
-rw-r--r--SRC/ctgsna.f490
-rw-r--r--SRC/ctgsy2.f404
-rw-r--r--SRC/ctgsyl.f464
-rw-r--r--SRC/ctpcon.f179
-rw-r--r--SRC/ctpmqrt.f278
-rw-r--r--SRC/ctpqrt.f243
-rw-r--r--SRC/ctpqrt2.f224
-rw-r--r--SRC/ctprfb.f354
-rw-r--r--SRC/ctprfs.f250
-rw-r--r--SRC/ctptri.f167
-rw-r--r--SRC/ctptrs.f182
-rw-r--r--SRC/ctpttf.f331
-rw-r--r--SRC/ctpttr.f140
-rw-r--r--SRC/ctrcon.f190
-rw-r--r--SRC/ctrevc.f333
-rw-r--r--SRC/ctrexc.f164
-rw-r--r--SRC/ctrrfs.f262
-rw-r--r--SRC/ctrsen.f429
-rw-r--r--SRC/ctrsna.f385
-rw-r--r--SRC/ctrsyl.f220
-rw-r--r--SRC/ctrti2.f152
-rw-r--r--SRC/ctrtri.f149
-rw-r--r--SRC/ctrtrs.f196
-rw-r--r--SRC/ctrttf.f354
-rw-r--r--SRC/ctrttp.f142
-rw-r--r--SRC/ctzrqf.f191
-rw-r--r--SRC/ctzrzf.f227
-rw-r--r--SRC/cunbdb.f453
-rw-r--r--SRC/cuncsd.f429
-rw-r--r--SRC/cung2l.f144
-rw-r--r--SRC/cung2r.f144
-rw-r--r--SRC/cungbr.f234
-rw-r--r--SRC/cunghr.f162
-rw-r--r--SRC/cungl2.f142
-rw-r--r--SRC/cunglq.f168
-rw-r--r--SRC/cungql.f170
-rw-r--r--SRC/cungqr.f170
-rw-r--r--SRC/cungr2.f144
-rw-r--r--SRC/cungrq.f170
-rw-r--r--SRC/cungtr.f170
-rw-r--r--SRC/cunm2l.f228
-rw-r--r--SRC/cunm2r.f228
-rw-r--r--SRC/cunmbr.f298
-rw-r--r--SRC/cunmhr.f258
-rw-r--r--SRC/cunml2.f228
-rw-r--r--SRC/cunmlq.f249
-rw-r--r--SRC/cunmql.f249
-rw-r--r--SRC/cunmqr.f249
-rw-r--r--SRC/cunmr2.f228
-rw-r--r--SRC/cunmr3.f254
-rw-r--r--SRC/cunmrq.f249
-rw-r--r--SRC/cunmrz.f278
-rw-r--r--SRC/cunmtr.f251
-rw-r--r--SRC/cupgtr.f151
-rw-r--r--SRC/cupmtr.f213
-rw-r--r--SRC/dbbcsd.f464
-rw-r--r--SRC/dbdsdc.f319
-rw-r--r--SRC/dbdsqr.f359
-rw-r--r--SRC/ddisna.f165
-rw-r--r--SRC/dgbbrd.f265
-rw-r--r--SRC/dgbcon.f202
-rw-r--r--SRC/dgbequ.f216
-rw-r--r--SRC/dgbequb.f235
-rw-r--r--SRC/dgbrfs.f294
-rw-r--r--SRC/dgbrfsx.f755
-rw-r--r--SRC/dgbsv.f240
-rw-r--r--SRC/dgbsvx.f605
-rw-r--r--SRC/dgbsvxx.f987
-rw-r--r--SRC/dgbtf2.f207
-rw-r--r--SRC/dgbtrf.f205
-rw-r--r--SRC/dgbtrs.f188
-rw-r--r--SRC/dgebak.f176
-rw-r--r--SRC/dgebal.f216
-rw-r--r--SRC/dgebd2.f247
-rw-r--r--SRC/dgebrd.f272
-rw-r--r--SRC/dgecon.f167
-rw-r--r--SRC/dgeequ.f194
-rw-r--r--SRC/dgeequb.f213
-rw-r--r--SRC/dgees.f328
-rw-r--r--SRC/dgeesx.f439
-rw-r--r--SRC/dgeev.f282
-rw-r--r--SRC/dgeevx.f479
-rw-r--r--SRC/dgegs.f345
-rw-r--r--SRC/dgegv.f507
-rw-r--r--SRC/dgehd2.f175
-rw-r--r--SRC/dgehrd.f207
-rw-r--r--SRC/dgejsv.f833
-rw-r--r--SRC/dgelq2.f133
-rw-r--r--SRC/dgelqf.f155
-rw-r--r--SRC/dgels.f280
-rw-r--r--SRC/dgelsd.f329
-rw-r--r--SRC/dgelss.f252
-rw-r--r--SRC/dgelsx.f265
-rw-r--r--SRC/dgelsy.f322
-rw-r--r--SRC/dgemqrt.f241
-rw-r--r--SRC/dgeql2.f135
-rw-r--r--SRC/dgeqlf.f158
-rw-r--r--SRC/dgeqp3.f212
-rw-r--r--SRC/dgeqpf.f200
-rw-r--r--SRC/dgeqr2.f133
-rw-r--r--SRC/dgeqr2p.f133
-rw-r--r--SRC/dgeqrf.f182
-rw-r--r--SRC/dgeqrfp.f182
-rw-r--r--SRC/dgeqrt.f187
-rw-r--r--SRC/dgeqrt2.f164
-rw-r--r--SRC/dgeqrt3.f177
-rw-r--r--SRC/dgerfs.f263
-rw-r--r--SRC/dgerfsx.f712
-rw-r--r--SRC/dgerq2.f158
-rw-r--r--SRC/dgerqf.f158
-rw-r--r--SRC/dgesc2.f158
-rw-r--r--SRC/dgesdd.f343
-rw-r--r--SRC/dgesv.f167
-rw-r--r--SRC/dgesvd.f327
-rw-r--r--SRC/dgesvj.f556
-rw-r--r--SRC/dgesvx.f570
-rw-r--r--SRC/dgesvxx.f952
-rw-r--r--SRC/dgetc2.f154
-rw-r--r--SRC/dgetf2.f141
-rw-r--r--SRC/dgetrf.f147
-rw-r--r--SRC/dgetri.f155
-rw-r--r--SRC/dgetrs.f163
-rw-r--r--SRC/dggbak.f202
-rw-r--r--SRC/dggbal.f262
-rw-r--r--SRC/dgges.f444
-rw-r--r--SRC/dggesx.f584
-rw-r--r--SRC/dggev.f347
-rw-r--r--SRC/dggevx.f630
-rw-r--r--SRC/dggglm.f274
-rw-r--r--SRC/dgghrd.f312
-rw-r--r--SRC/dgglse.f268
-rw-r--r--SRC/dggqrf.f310
-rw-r--r--SRC/dggrqf.f308
-rw-r--r--SRC/dggsvd.f532
-rw-r--r--SRC/dggsvp.f374
-rw-r--r--SRC/dgsvj0.f334
-rw-r--r--SRC/dgsvj1.f371
-rw-r--r--SRC/dgtcon.f202
-rw-r--r--SRC/dgtrfs.f298
-rw-r--r--SRC/dgtsv.f173
-rw-r--r--SRC/dgtsvx.f458
-rw-r--r--SRC/dgttrf.f177
-rw-r--r--SRC/dgttrs.f188
-rw-r--r--SRC/dgtts2.f173
-rw-r--r--SRC/dhgeqz.f489
-rw-r--r--SRC/dhsein.f402
-rw-r--r--SRC/dhseqr.f391
-rw-r--r--SRC/disnan.f64
-rw-r--r--SRC/dla_gbamv.f282
-rw-r--r--SRC/dla_gbrcond.f248
-rw-r--r--SRC/dla_gbrfsx_extended.f680
-rw-r--r--SRC/dla_gbrpvgrw.f160
-rw-r--r--SRC/dla_geamv.f265
-rw-r--r--SRC/dla_gercond.f216
-rw-r--r--SRC/dla_gerfsx_extended.f660
-rw-r--r--SRC/dla_gerpvgrw.f126
-rw-r--r--SRC/dla_lin_berr.f142
-rw-r--r--SRC/dla_porcond.f199
-rw-r--r--SRC/dla_porfsx_extended.f643
-rw-r--r--SRC/dla_porpvgrw.f134
-rw-r--r--SRC/dla_syamv.f267
-rw-r--r--SRC/dla_syrcond.f207
-rw-r--r--SRC/dla_syrfsx_extended.f655
-rw-r--r--SRC/dla_syrpvgrw.f168
-rw-r--r--SRC/dla_wwaddw.f103
-rw-r--r--SRC/dlabad.f89
-rw-r--r--SRC/dlabrd.f274
-rw-r--r--SRC/dlacn2.f178
-rw-r--r--SRC/dlacon.f157
-rw-r--r--SRC/dlacpy.f132
-rw-r--r--SRC/dladiv.f101
-rw-r--r--SRC/dlae2.f119
-rw-r--r--SRC/dlaebz.f516
-rw-r--r--SRC/dlaed0.f260
-rw-r--r--SRC/dlaed1.f246
-rw-r--r--SRC/dlaed2.f323
-rw-r--r--SRC/dlaed3.f288
-rw-r--r--SRC/dlaed4.f217
-rw-r--r--SRC/dlaed5.f148
-rw-r--r--SRC/dlaed6.f193
-rw-r--r--SRC/dlaed7.f397
-rw-r--r--SRC/dlaed8.f366
-rw-r--r--SRC/dlaed9.f223
-rw-r--r--SRC/dlaeda.f240
-rw-r--r--SRC/dlaein.f238
-rw-r--r--SRC/dlaev2.f149
-rw-r--r--SRC/dlaexc.f187
-rw-r--r--SRC/dlag2.f226
-rw-r--r--SRC/dlag2s.f143
-rw-r--r--SRC/dlags2.f203
-rw-r--r--SRC/dlagtf.f238
-rw-r--r--SRC/dlagtm.f194
-rw-r--r--SRC/dlagts.f239
-rw-r--r--SRC/dlagv2.f231
-rw-r--r--SRC/dlahqr.f323
-rw-r--r--SRC/dlahr2.f238
-rw-r--r--SRC/dlahrd.f220
-rw-r--r--SRC/dlaic1.f188
-rw-r--r--SRC/dlaisnan.f89
-rw-r--r--SRC/dlaln2.f325
-rw-r--r--SRC/dlals0.f411
-rw-r--r--SRC/dlalsa.f402
-rw-r--r--SRC/dlalsd.f270
-rw-r--r--SRC/dlamrg.f129
-rw-r--r--SRC/dlaneg.f169
-rw-r--r--SRC/dlangb.f173
-rw-r--r--SRC/dlange.f159
-rw-r--r--SRC/dlangt.f146
-rw-r--r--SRC/dlanhs.f150
-rw-r--r--SRC/dlansb.f183
-rw-r--r--SRC/dlansf.f351
-rw-r--r--SRC/dlansp.f162
-rw-r--r--SRC/dlanst.f137
-rw-r--r--SRC/dlansy.f175
-rw-r--r--SRC/dlantb.f196
-rw-r--r--SRC/dlantp.f175
-rw-r--r--SRC/dlantr.f198
-rw-r--r--SRC/dlanv2.f156
-rw-r--r--SRC/dlapll.f133
-rw-r--r--SRC/dlapmr.f141
-rw-r--r--SRC/dlapmt.f136
-rw-r--r--SRC/dlapy2.f67
-rw-r--r--SRC/dlapy3.f72
-rw-r--r--SRC/dlaqgb.f225
-rw-r--r--SRC/dlaqge.f196
-rw-r--r--SRC/dlaqp2.f202
-rw-r--r--SRC/dlaqps.f246
-rw-r--r--SRC/dlaqr0.f421
-rw-r--r--SRC/dlaqr1.f167
-rw-r--r--SRC/dlaqr2.f429
-rw-r--r--SRC/dlaqr3.f423
-rw-r--r--SRC/dlaqr4.f438
-rw-r--r--SRC/dlaqr5.f386
-rw-r--r--SRC/dlaqsb.f199
-rw-r--r--SRC/dlaqsp.f175
-rw-r--r--SRC/dlaqsy.f188
-rw-r--r--SRC/dlaqtr.f240
-rw-r--r--SRC/dlar1v.f340
-rw-r--r--SRC/dlar2v.f136
-rw-r--r--SRC/dlarf.f168
-rw-r--r--SRC/dlarfb.f258
-rw-r--r--SRC/dlarfg.f144
-rw-r--r--SRC/dlarfgp.f140
-rw-r--r--SRC/dlarft.f218
-rw-r--r--SRC/dlarfx.f163
-rw-r--r--SRC/dlargv.f127
-rw-r--r--SRC/dlarnv.f126
-rw-r--r--SRC/dlarra.f196
-rw-r--r--SRC/dlarrb.f287
-rw-r--r--SRC/dlarrc.f189
-rw-r--r--SRC/dlarrd.f499
-rw-r--r--SRC/dlarre.f450
-rw-r--r--SRC/dlarrf.f278
-rw-r--r--SRC/dlarrj.f240
-rw-r--r--SRC/dlarrk.f201
-rw-r--r--SRC/dlarrr.f128
-rw-r--r--SRC/dlarrv.f431
-rw-r--r--SRC/dlarscl2.f112
-rw-r--r--SRC/dlartg.f119
-rw-r--r--SRC/dlartgp.f117
-rw-r--r--SRC/dlartgs.f108
-rw-r--r--SRC/dlartv.f132
-rw-r--r--SRC/dlaruv.f119
-rw-r--r--SRC/dlarz.f199
-rw-r--r--SRC/dlarzb.f256
-rw-r--r--SRC/dlarzt.f255
-rw-r--r--SRC/dlas2.f129
-rw-r--r--SRC/dlascl.f192
-rw-r--r--SRC/dlascl2.f112
-rw-r--r--SRC/dlasd0.f218
-rw-r--r--SRC/dlasd1.f317
-rw-r--r--SRC/dlasd2.f415
-rw-r--r--SRC/dlasd3.f337
-rw-r--r--SRC/dlasd4.f230
-rw-r--r--SRC/dlasd5.f161
-rw-r--r--SRC/dlasd6.f493
-rw-r--r--SRC/dlasd7.f420
-rw-r--r--SRC/dlasd8.f247
-rw-r--r--SRC/dlasda.f420
-rw-r--r--SRC/dlasdq.f325
-rw-r--r--SRC/dlasdt.f132
-rw-r--r--SRC/dlaset.f147
-rw-r--r--SRC/dlasq1.f154
-rw-r--r--SRC/dlasq2.f161
-rw-r--r--SRC/dlasq3.f251
-rw-r--r--SRC/dlasq4.f206
-rw-r--r--SRC/dlasq5.f178
-rw-r--r--SRC/dlasq6.f159
-rw-r--r--SRC/dlasr.f310
-rw-r--r--SRC/dlasrt.f113
-rw-r--r--SRC/dlassq.f138
-rw-r--r--SRC/dlasv2.f179
-rw-r--r--SRC/dlaswp.f149
-rw-r--r--SRC/dlasy2.f242
-rw-r--r--SRC/dlasyf.f231
-rw-r--r--SRC/dlat2s.f149
-rw-r--r--SRC/dlatbs.f392
-rw-r--r--SRC/dlatdf.f245
-rw-r--r--SRC/dlatps.f372
-rw-r--r--SRC/dlatrd.f272
-rw-r--r--SRC/dlatrs.f387
-rw-r--r--SRC/dlatrz.f188
-rw-r--r--SRC/dlatzm.f222
-rw-r--r--SRC/dlauu2.f136
-rw-r--r--SRC/dlauum.f136
-rw-r--r--SRC/dopgtr.f151
-rw-r--r--SRC/dopmtr.f213
-rw-r--r--SRC/dorbdb.f453
-rw-r--r--SRC/dorcsd.f398
-rw-r--r--SRC/dorg2l.f144
-rw-r--r--SRC/dorg2r.f144
-rw-r--r--SRC/dorgbr.f234
-rw-r--r--SRC/dorghr.f162
-rw-r--r--SRC/dorgl2.f142
-rw-r--r--SRC/dorglq.f168
-rw-r--r--SRC/dorgql.f170
-rw-r--r--SRC/dorgqr.f170
-rw-r--r--SRC/dorgr2.f144
-rw-r--r--SRC/dorgrq.f170
-rw-r--r--SRC/dorgtr.f170
-rw-r--r--SRC/dorm2l.f228
-rw-r--r--SRC/dorm2r.f228
-rw-r--r--SRC/dormbr.f295
-rw-r--r--SRC/dormhr.f257
-rw-r--r--SRC/dorml2.f228
-rw-r--r--SRC/dormlq.f248
-rw-r--r--SRC/dormql.f248
-rw-r--r--SRC/dormqr.f248
-rw-r--r--SRC/dormr2.f228
-rw-r--r--SRC/dormr3.f254
-rw-r--r--SRC/dormrq.f248
-rw-r--r--SRC/dormrz.f278
-rw-r--r--SRC/dormtr.f250
-rw-r--r--SRC/dpbcon.f180
-rw-r--r--SRC/dpbequ.f179
-rw-r--r--SRC/dpbrfs.f271
-rw-r--r--SRC/dpbstf.f219
-rw-r--r--SRC/dpbsv.f242
-rw-r--r--SRC/dpbsvx.f558
-rw-r--r--SRC/dpbtf2.f211
-rw-r--r--SRC/dpbtrf.f203
-rw-r--r--SRC/dpbtrs.f162
-rw-r--r--SRC/dpftrf.f321
-rw-r--r--SRC/dpftri.f306
-rw-r--r--SRC/dpftrs.f317
-rw-r--r--SRC/dpocon.f161
-rw-r--r--SRC/dpoequ.f150
-rw-r--r--SRC/dpoequb.f155
-rw-r--r--SRC/dporfs.f262
-rw-r--r--SRC/dporfsx.f678
-rw-r--r--SRC/dposv.f186
-rw-r--r--SRC/dposvx.f490
-rw-r--r--SRC/dposvxx.f869
-rw-r--r--SRC/dpotf2.f153
-rw-r--r--SRC/dpotrf.f149
-rw-r--r--SRC/dpotri.f124
-rw-r--r--SRC/dpotrs.f143
-rw-r--r--SRC/dppcon.f161
-rw-r--r--SRC/dppequ.f159
-rw-r--r--SRC/dpprfs.f244
-rw-r--r--SRC/dppsv.f208
-rw-r--r--SRC/dppsvx.f509
-rw-r--r--SRC/dpptrf.f171
-rw-r--r--SRC/dpptri.f124
-rw-r--r--SRC/dpptrs.f142
-rw-r--r--SRC/dpstf2.f204
-rw-r--r--SRC/dpstrf.f204
-rw-r--r--SRC/dptcon.f157
-rw-r--r--SRC/dpteqr.f215
-rw-r--r--SRC/dptrfs.f227
-rw-r--r--SRC/dptsv.f157
-rw-r--r--SRC/dptsvx.f345
-rw-r--r--SRC/dpttrf.f120
-rw-r--r--SRC/dpttrs.f137
-rw-r--r--SRC/dptts2.f128
-rw-r--r--SRC/drscl.f103
-rw-r--r--SRC/dsbev.f206
-rw-r--r--SRC/dsbevd.f292
-rw-r--r--SRC/dsbevx.f395
-rw-r--r--SRC/dsbgst.f225
-rw-r--r--SRC/dsbgv.f259
-rw-r--r--SRC/dsbgvd.f358
-rw-r--r--SRC/dsbgvx.f438
-rw-r--r--SRC/dsbtrd.f235
-rw-r--r--SRC/dsfrk.f256
-rw-r--r--SRC/dsgesv.f296
-rw-r--r--SRC/dspcon.f169
-rw-r--r--SRC/dspev.f183
-rw-r--r--SRC/dspevd.f270
-rw-r--r--SRC/dspevx.f346
-rw-r--r--SRC/dspgst.f156
-rw-r--r--SRC/dspgv.f236
-rw-r--r--SRC/dspgvd.f333
-rw-r--r--SRC/dspgvx.f411
-rw-r--r--SRC/dsposv.f308
-rw-r--r--SRC/dsprfs.f257
-rw-r--r--SRC/dspsv.f248
-rw-r--r--SRC/dspsvx.f441
-rw-r--r--SRC/dsptrd.f189
-rw-r--r--SRC/dsptrf.f247
-rw-r--r--SRC/dsptri.f149
-rw-r--r--SRC/dsptrs.f154
-rw-r--r--SRC/dstebz.f407
-rw-r--r--SRC/dstedc.f299
-rw-r--r--SRC/dstegr.f392
-rw-r--r--SRC/dstein.f253
-rw-r--r--SRC/dstemr.f501
-rw-r--r--SRC/dsteqr.f187
-rw-r--r--SRC/dsterf.f106
-rw-r--r--SRC/dstev.f157
-rw-r--r--SRC/dstevd.f240
-rw-r--r--SRC/dstevr.f488
-rw-r--r--SRC/dstevx.f334
-rw-r--r--SRC/dsycon.f176
-rw-r--r--SRC/dsyconv.f172
-rw-r--r--SRC/dsyequb.f191
-rw-r--r--SRC/dsyev.f187
-rw-r--r--SRC/dsyevd.f287
-rw-r--r--SRC/dsyevr.f541
-rw-r--r--SRC/dsyevx.f378
-rw-r--r--SRC/dsygs2.f178
-rw-r--r--SRC/dsygst.f178
-rw-r--r--SRC/dsygv.f263
-rw-r--r--SRC/dsygvd.f354
-rw-r--r--SRC/dsygvx.f465
-rw-r--r--SRC/dsyrfs.f275
-rw-r--r--SRC/dsyrfsx.f691
-rw-r--r--SRC/dsysv.f257
-rw-r--r--SRC/dsysvx.f445
-rw-r--r--SRC/dsysvxx.f888
-rw-r--r--SRC/dsyswapr.f127
-rw-r--r--SRC/dsytd2.f227
-rw-r--r--SRC/dsytf2.f288
-rw-r--r--SRC/dsytrd.f254
-rw-r--r--SRC/dsytrf.f289
-rw-r--r--SRC/dsytri.f156
-rw-r--r--SRC/dsytri2.f182
-rw-r--r--SRC/dsytri2x.f159
-rw-r--r--SRC/dsytrs.f161
-rw-r--r--SRC/dsytrs2.f165
-rw-r--r--SRC/dtbcon.f199
-rw-r--r--SRC/dtbrfs.f271
-rw-r--r--SRC/dtbtrs.f205
-rw-r--r--SRC/dtfsm.f475
-rw-r--r--SRC/dtftri.f332
-rw-r--r--SRC/dtfttp.f300
-rw-r--r--SRC/dtfttr.f320
-rw-r--r--SRC/dtgevc.f480
-rw-r--r--SRC/dtgex2.f323
-rw-r--r--SRC/dtgexc.f333
-rw-r--r--SRC/dtgsen.f749
-rw-r--r--SRC/dtgsja.f541
-rw-r--r--SRC/dtgsna.f633
-rw-r--r--SRC/dtgsy2.f426
-rw-r--r--SRC/dtgsyl.f466
-rw-r--r--SRC/dtpcon.f179
-rw-r--r--SRC/dtpmqrt.f278
-rw-r--r--SRC/dtpqrt.f243
-rw-r--r--SRC/dtpqrt2.f224
-rw-r--r--SRC/dtprfb.f354
-rw-r--r--SRC/dtprfs.f251
-rw-r--r--SRC/dtptri.f167
-rw-r--r--SRC/dtptrs.f182
-rw-r--r--SRC/dtpttf.f289
-rw-r--r--SRC/dtpttr.f140
-rw-r--r--SRC/dtrcon.f190
-rw-r--r--SRC/dtrevc.f345
-rw-r--r--SRC/dtrexc.f204
-rw-r--r--SRC/dtrrfs.f262
-rw-r--r--SRC/dtrsen.f513
-rw-r--r--SRC/dtrsna.f417
-rw-r--r--SRC/dtrsyl.f234
-rw-r--r--SRC/dtrti2.f152
-rw-r--r--SRC/dtrtri.f149
-rw-r--r--SRC/dtrtrs.f196
-rw-r--r--SRC/dtrttf.f316
-rw-r--r--SRC/dtrttp.f142
-rw-r--r--SRC/dtzrqf.f191
-rw-r--r--SRC/dtzrzf.f227
-rw-r--r--SRC/dzsum1.f95
-rw-r--r--SRC/icmax1.f95
-rw-r--r--SRC/ieeeck.f106
-rw-r--r--SRC/ilaclc.f91
-rw-r--r--SRC/ilaclr.f91
-rw-r--r--SRC/iladiag.f68
-rw-r--r--SRC/iladlc.f91
-rw-r--r--SRC/iladlr.f91
-rw-r--r--SRC/ilaenv.f242
-rw-r--r--SRC/ilaprec.f71
-rw-r--r--SRC/ilaslc.f91
-rw-r--r--SRC/ilaslr.f91
-rw-r--r--SRC/ilatrans.f70
-rw-r--r--SRC/ilauplo.f68
-rw-r--r--SRC/ilaver.f64
-rw-r--r--SRC/ilazlc.f91
-rw-r--r--SRC/ilazlr.f92
-rw-r--r--SRC/iparmq.f348
-rw-r--r--SRC/izmax1.f95
-rw-r--r--SRC/lsamen.f85
-rw-r--r--SRC/sbbcsd.f464
-rw-r--r--SRC/sbdsdc.f317
-rw-r--r--SRC/sbdsqr.f359
-rw-r--r--SRC/scsum1.f95
-rw-r--r--SRC/sdisna.f165
-rw-r--r--SRC/sgbbrd.f265
-rw-r--r--SRC/sgbcon.f202
-rw-r--r--SRC/sgbequ.f216
-rw-r--r--SRC/sgbequb.f235
-rw-r--r--SRC/sgbrfs.f294
-rw-r--r--SRC/sgbrfsx.f755
-rw-r--r--SRC/sgbsv.f240
-rw-r--r--SRC/sgbsvx.f604
-rw-r--r--SRC/sgbsvxx.f995
-rw-r--r--SRC/sgbtf2.f207
-rw-r--r--SRC/sgbtrf.f205
-rw-r--r--SRC/sgbtrs.f188
-rw-r--r--SRC/sgebak.f176
-rw-r--r--SRC/sgebal.f216
-rw-r--r--SRC/sgebd2.f247
-rw-r--r--SRC/sgebrd.f272
-rw-r--r--SRC/sgecon.f167
-rw-r--r--SRC/sgeequ.f194
-rw-r--r--SRC/sgeequb.f213
-rw-r--r--SRC/sgees.f328
-rw-r--r--SRC/sgeesx.f439
-rw-r--r--SRC/sgeev.f282
-rw-r--r--SRC/sgeevx.f479
-rw-r--r--SRC/sgegs.f345
-rw-r--r--SRC/sgegv.f507
-rw-r--r--SRC/sgehd2.f175
-rw-r--r--SRC/sgehrd.f207
-rw-r--r--SRC/sgejsv.f833
-rw-r--r--SRC/sgelq2.f133
-rw-r--r--SRC/sgelqf.f155
-rw-r--r--SRC/sgels.f280
-rw-r--r--SRC/sgelsd.f331
-rw-r--r--SRC/sgelss.f252
-rw-r--r--SRC/sgelsx.f265
-rw-r--r--SRC/sgelsy.f322
-rw-r--r--SRC/sgemqrt.f241
-rw-r--r--SRC/sgeql2.f135
-rw-r--r--SRC/sgeqlf.f158
-rw-r--r--SRC/sgeqp3.f212
-rw-r--r--SRC/sgeqpf.f200
-rw-r--r--SRC/sgeqr2.f133
-rw-r--r--SRC/sgeqr2p.f133
-rw-r--r--SRC/sgeqrf.f182
-rw-r--r--SRC/sgeqrfp.f182
-rw-r--r--SRC/sgeqrt.f187
-rw-r--r--SRC/sgeqrt2.f164
-rw-r--r--SRC/sgeqrt3.f177
-rw-r--r--SRC/sgerfs.f263
-rw-r--r--SRC/sgerfsx.f712
-rw-r--r--SRC/sgerq2.f158
-rw-r--r--SRC/sgerqf.f158
-rw-r--r--SRC/sgesc2.f158
-rw-r--r--SRC/sgesdd.f343
-rw-r--r--SRC/sgesv.f167
-rw-r--r--SRC/sgesvd.f327
-rw-r--r--SRC/sgesvj.f549
-rw-r--r--SRC/sgesvx.f570
-rw-r--r--SRC/sgesvxx.f960
-rw-r--r--SRC/sgetc2.f154
-rw-r--r--SRC/sgetf2.f141
-rw-r--r--SRC/sgetrf.f147
-rw-r--r--SRC/sgetri.f155
-rw-r--r--SRC/sgetrs.f163
-rw-r--r--SRC/sggbak.f202
-rw-r--r--SRC/sggbal.f262
-rw-r--r--SRC/sgges.f444
-rw-r--r--SRC/sggesx.f584
-rw-r--r--SRC/sggev.f347
-rw-r--r--SRC/sggevx.f630
-rw-r--r--SRC/sggglm.f274
-rw-r--r--SRC/sgghrd.f312
-rw-r--r--SRC/sgglse.f268
-rw-r--r--SRC/sggqrf.f310
-rw-r--r--SRC/sggrqf.f308
-rw-r--r--SRC/sggsvd.f532
-rw-r--r--SRC/sggsvp.f374
-rw-r--r--SRC/sgsvj0.f334
-rw-r--r--SRC/sgsvj1.f371
-rw-r--r--SRC/sgtcon.f202
-rw-r--r--SRC/sgtrfs.f298
-rw-r--r--SRC/sgtsv.f173
-rw-r--r--SRC/sgtsvx.f458
-rw-r--r--SRC/sgttrf.f177
-rw-r--r--SRC/sgttrs.f188
-rw-r--r--SRC/sgtts2.f173
-rw-r--r--SRC/shgeqz.f489
-rw-r--r--SRC/shsein.f402
-rw-r--r--SRC/shseqr.f391
-rw-r--r--SRC/sisnan.f64
-rw-r--r--SRC/sla_gbamv.f282
-rw-r--r--SRC/sla_gbrcond.f243
-rw-r--r--SRC/sla_gbrfsx_extended.f678
-rw-r--r--SRC/sla_gbrpvgrw.f160
-rw-r--r--SRC/sla_geamv.f265
-rw-r--r--SRC/sla_gercond.f213
-rw-r--r--SRC/sla_gerfsx_extended.f656
-rw-r--r--SRC/sla_gerpvgrw.f121
-rw-r--r--SRC/sla_lin_berr.f142
-rw-r--r--SRC/sla_porcond.f196
-rw-r--r--SRC/sla_porfsx_extended.f637
-rw-r--r--SRC/sla_porpvgrw.f131
-rw-r--r--SRC/sla_syamv.f267
-rw-r--r--SRC/sla_syrcond.f204
-rw-r--r--SRC/sla_syrfsx_extended.f649
-rw-r--r--SRC/sla_syrpvgrw.f168
-rw-r--r--SRC/sla_wwaddw.f103
-rw-r--r--SRC/slabad.f89
-rw-r--r--SRC/slabrd.f274
-rw-r--r--SRC/slacn2.f178
-rw-r--r--SRC/slacon.f157
-rw-r--r--SRC/slacpy.f132
-rw-r--r--SRC/sladiv.f101
-rw-r--r--SRC/slae2.f119
-rw-r--r--SRC/slaebz.f516
-rw-r--r--SRC/slaed0.f260
-rw-r--r--SRC/slaed1.f246
-rw-r--r--SRC/slaed2.f323
-rw-r--r--SRC/slaed3.f288
-rw-r--r--SRC/slaed4.f217
-rw-r--r--SRC/slaed5.f148
-rw-r--r--SRC/slaed6.f193
-rw-r--r--SRC/slaed7.f397
-rw-r--r--SRC/slaed8.f366
-rw-r--r--SRC/slaed9.f223
-rw-r--r--SRC/slaeda.f240
-rw-r--r--SRC/slaein.f238
-rw-r--r--SRC/slaev2.f149
-rw-r--r--SRC/slaexc.f187
-rw-r--r--SRC/slag2.f226
-rw-r--r--SRC/slag2d.f135
-rw-r--r--SRC/slags2.f203
-rw-r--r--SRC/slagtf.f238
-rw-r--r--SRC/slagtm.f194
-rw-r--r--SRC/slagts.f239
-rw-r--r--SRC/slagv2.f231
-rw-r--r--SRC/slahqr.f323
-rw-r--r--SRC/slahr2.f238
-rw-r--r--SRC/slahrd.f220
-rw-r--r--SRC/slaic1.f188
-rw-r--r--SRC/slaisnan.f89
-rw-r--r--SRC/slaln2.f325
-rw-r--r--SRC/slals0.f411
-rw-r--r--SRC/slalsa.f402
-rw-r--r--SRC/slalsd.f270
-rw-r--r--SRC/slamrg.f129
-rw-r--r--SRC/slaneg.f169
-rw-r--r--SRC/slangb.f173
-rw-r--r--SRC/slange.f159
-rw-r--r--SRC/slangt.f146
-rw-r--r--SRC/slanhs.f150
-rw-r--r--SRC/slansb.f183
-rw-r--r--SRC/slansf.f351
-rw-r--r--SRC/slansp.f162
-rw-r--r--SRC/slanst.f137
-rw-r--r--SRC/slansy.f175
-rw-r--r--SRC/slantb.f196
-rw-r--r--SRC/slantp.f175
-rw-r--r--SRC/slantr.f198
-rw-r--r--SRC/slanv2.f156
-rw-r--r--SRC/slapll.f133
-rw-r--r--SRC/slapmr.f141
-rw-r--r--SRC/slapmt.f136
-rw-r--r--SRC/slapy2.f67
-rw-r--r--SRC/slapy3.f72
-rw-r--r--SRC/slaqgb.f225
-rw-r--r--SRC/slaqge.f196
-rw-r--r--SRC/slaqp2.f202
-rw-r--r--SRC/slaqps.f246
-rw-r--r--SRC/slaqr0.f424
-rw-r--r--SRC/slaqr1.f167
-rw-r--r--SRC/slaqr2.f429
-rw-r--r--SRC/slaqr3.f423
-rw-r--r--SRC/slaqr4.f438
-rw-r--r--SRC/slaqr5.f386
-rw-r--r--SRC/slaqsb.f199
-rw-r--r--SRC/slaqsp.f175
-rw-r--r--SRC/slaqsy.f188
-rw-r--r--SRC/slaqtr.f240
-rw-r--r--SRC/slar1v.f340
-rw-r--r--SRC/slar2v.f136
-rw-r--r--SRC/slarf.f168
-rw-r--r--SRC/slarfb.f258
-rw-r--r--SRC/slarfg.f144
-rw-r--r--SRC/slarfgp.f140
-rw-r--r--SRC/slarft.f218
-rw-r--r--SRC/slarfx.f162
-rw-r--r--SRC/slargv.f127
-rw-r--r--SRC/slarnv.f126
-rw-r--r--SRC/slarra.f197
-rw-r--r--SRC/slarrb.f287
-rw-r--r--SRC/slarrc.f189
-rw-r--r--SRC/slarrd.f499
-rw-r--r--SRC/slarre.f450
-rw-r--r--SRC/slarrf.f269
-rw-r--r--SRC/slarrj.f240
-rw-r--r--SRC/slarrk.f201
-rw-r--r--SRC/slarrr.f128
-rw-r--r--SRC/slarrv.f431
-rw-r--r--SRC/slarscl2.f112
-rw-r--r--SRC/slartg.f119
-rw-r--r--SRC/slartgp.f117
-rw-r--r--SRC/slartgs.f108
-rw-r--r--SRC/slartv.f132
-rw-r--r--SRC/slaruv.f119
-rw-r--r--SRC/slarz.f199
-rw-r--r--SRC/slarzb.f256
-rw-r--r--SRC/slarzt.f255
-rw-r--r--SRC/slas2.f129
-rw-r--r--SRC/slascl.f192
-rw-r--r--SRC/slascl2.f112
-rw-r--r--SRC/slasd0.f214
-rw-r--r--SRC/slasd1.f317
-rw-r--r--SRC/slasd2.f415
-rw-r--r--SRC/slasd3.f337
-rw-r--r--SRC/slasd4.f230
-rw-r--r--SRC/slasd5.f161
-rw-r--r--SRC/slasd6.f493
-rw-r--r--SRC/slasd7.f420
-rw-r--r--SRC/slasd8.f247
-rw-r--r--SRC/slasda.f418
-rw-r--r--SRC/slasdq.f325
-rw-r--r--SRC/slasdt.f132
-rw-r--r--SRC/slaset.f147
-rw-r--r--SRC/slasq1.f154
-rw-r--r--SRC/slasq2.f159
-rw-r--r--SRC/slasq3.f251
-rw-r--r--SRC/slasq4.f204
-rw-r--r--SRC/slasq5.f178
-rw-r--r--SRC/slasq6.f159
-rw-r--r--SRC/slasr.f310
-rw-r--r--SRC/slasrt.f113
-rw-r--r--SRC/slassq.f138
-rw-r--r--SRC/slasv2.f179
-rw-r--r--SRC/slaswp.f149
-rw-r--r--SRC/slasy2.f242
-rw-r--r--SRC/slasyf.f231
-rw-r--r--SRC/slatbs.f394
-rw-r--r--SRC/slatdf.f245
-rw-r--r--SRC/slatps.f374
-rw-r--r--SRC/slatrd.f272
-rw-r--r--SRC/slatrs.f389
-rw-r--r--SRC/slatrz.f188
-rw-r--r--SRC/slatzm.f222
-rw-r--r--SRC/slauu2.f136
-rw-r--r--SRC/slauum.f136
-rw-r--r--SRC/sopgtr.f151
-rw-r--r--SRC/sopmtr.f213
-rw-r--r--SRC/sorbdb.f453
-rw-r--r--SRC/sorcsd.f398
-rw-r--r--SRC/sorg2l.f144
-rw-r--r--SRC/sorg2r.f144
-rw-r--r--SRC/sorgbr.f234
-rw-r--r--SRC/sorghr.f162
-rw-r--r--SRC/sorgl2.f142
-rw-r--r--SRC/sorglq.f168
-rw-r--r--SRC/sorgql.f170
-rw-r--r--SRC/sorgqr.f170
-rw-r--r--SRC/sorgr2.f144
-rw-r--r--SRC/sorgrq.f170
-rw-r--r--SRC/sorgtr.f170
-rw-r--r--SRC/sorm2l.f228
-rw-r--r--SRC/sorm2r.f228
-rw-r--r--SRC/sormbr.f296
-rw-r--r--SRC/sormhr.f258
-rw-r--r--SRC/sorml2.f228
-rw-r--r--SRC/sormlq.f249
-rw-r--r--SRC/sormql.f249
-rw-r--r--SRC/sormqr.f249
-rw-r--r--SRC/sormr2.f228
-rw-r--r--SRC/sormr3.f254
-rw-r--r--SRC/sormrq.f249
-rw-r--r--SRC/sormrz.f278
-rw-r--r--SRC/sormtr.f251
-rw-r--r--SRC/spbcon.f180
-rw-r--r--SRC/spbequ.f179
-rw-r--r--SRC/spbrfs.f271
-rw-r--r--SRC/spbstf.f219
-rw-r--r--SRC/spbsv.f242
-rw-r--r--SRC/spbsvx.f558
-rw-r--r--SRC/spbtf2.f211
-rw-r--r--SRC/spbtrf.f203
-rw-r--r--SRC/spbtrs.f162
-rw-r--r--SRC/spftrf.f321
-rw-r--r--SRC/spftri.f306
-rw-r--r--SRC/spftrs.f317
-rw-r--r--SRC/spocon.f161
-rw-r--r--SRC/spoequ.f150
-rw-r--r--SRC/spoequb.f155
-rw-r--r--SRC/sporfs.f262
-rw-r--r--SRC/sporfsx.f674
-rw-r--r--SRC/sposv.f186
-rw-r--r--SRC/sposvx.f490
-rw-r--r--SRC/sposvxx.f875
-rw-r--r--SRC/spotf2.f153
-rw-r--r--SRC/spotrf.f149
-rw-r--r--SRC/spotri.f124
-rw-r--r--SRC/spotrs.f143
-rw-r--r--SRC/sppcon.f161
-rw-r--r--SRC/sppequ.f159
-rw-r--r--SRC/spprfs.f244
-rw-r--r--SRC/sppsv.f208
-rw-r--r--SRC/sppsvx.f509
-rw-r--r--SRC/spptrf.f171
-rw-r--r--SRC/spptri.f124
-rw-r--r--SRC/spptrs.f142
-rw-r--r--SRC/spstf2.f204
-rw-r--r--SRC/spstrf.f204
-rw-r--r--SRC/sptcon.f157
-rw-r--r--SRC/spteqr.f215
-rw-r--r--SRC/sptrfs.f227
-rw-r--r--SRC/sptsv.f157
-rw-r--r--SRC/sptsvx.f345
-rw-r--r--SRC/spttrf.f120
-rw-r--r--SRC/spttrs.f137
-rw-r--r--SRC/sptts2.f128
-rw-r--r--SRC/srscl.f103
-rw-r--r--SRC/ssbev.f206
-rw-r--r--SRC/ssbevd.f292
-rw-r--r--SRC/ssbevx.f395
-rw-r--r--SRC/ssbgst.f225
-rw-r--r--SRC/ssbgv.f259
-rw-r--r--SRC/ssbgvd.f358
-rw-r--r--SRC/ssbgvx.f438
-rw-r--r--SRC/ssbtrd.f235
-rw-r--r--SRC/ssfrk.f256
-rw-r--r--SRC/sspcon.f169
-rw-r--r--SRC/sspev.f183
-rw-r--r--SRC/sspevd.f268
-rw-r--r--SRC/sspevx.f346
-rw-r--r--SRC/sspgst.f156
-rw-r--r--SRC/sspgv.f236
-rw-r--r--SRC/sspgvd.f333
-rw-r--r--SRC/sspgvx.f411
-rw-r--r--SRC/ssprfs.f257
-rw-r--r--SRC/sspsv.f248
-rw-r--r--SRC/sspsvx.f441
-rw-r--r--SRC/ssptrd.f189
-rw-r--r--SRC/ssptrf.f247
-rw-r--r--SRC/ssptri.f149
-rw-r--r--SRC/ssptrs.f154
-rw-r--r--SRC/sstebz.f407
-rw-r--r--SRC/sstedc.f297
-rw-r--r--SRC/sstegr.f392
-rw-r--r--SRC/sstein.f253
-rw-r--r--SRC/sstemr.f501
-rw-r--r--SRC/ssteqr.f187
-rw-r--r--SRC/ssterf.f106
-rw-r--r--SRC/sstev.f157
-rw-r--r--SRC/sstevd.f240
-rw-r--r--SRC/sstevr.f492
-rw-r--r--SRC/sstevx.f334
-rw-r--r--SRC/ssycon.f176
-rw-r--r--SRC/ssyconv.f172
-rw-r--r--SRC/ssyequb.f191
-rw-r--r--SRC/ssyev.f187
-rw-r--r--SRC/ssyevd.f287
-rw-r--r--SRC/ssyevr.f545
-rw-r--r--SRC/ssyevx.f378
-rw-r--r--SRC/ssygs2.f178
-rw-r--r--SRC/ssygst.f178
-rw-r--r--SRC/ssygv.f263
-rw-r--r--SRC/ssygvd.f354
-rw-r--r--SRC/ssygvx.f465
-rw-r--r--SRC/ssyrfs.f275
-rw-r--r--SRC/ssyrfsx.f691
-rw-r--r--SRC/ssysv.f257
-rw-r--r--SRC/ssysvx.f445
-rw-r--r--SRC/ssysvxx.f894
-rw-r--r--SRC/ssyswapr.f127
-rw-r--r--SRC/ssytd2.f227
-rw-r--r--SRC/ssytf2.f288
-rw-r--r--SRC/ssytrd.f254
-rw-r--r--SRC/ssytrf.f289
-rw-r--r--SRC/ssytri.f156
-rw-r--r--SRC/ssytri2.f182
-rw-r--r--SRC/ssytri2x.f159
-rw-r--r--SRC/ssytrs.f161
-rw-r--r--SRC/ssytrs2.f165
-rw-r--r--SRC/stbcon.f199
-rw-r--r--SRC/stbrfs.f271
-rw-r--r--SRC/stbtrs.f205
-rw-r--r--SRC/stfsm.f475
-rw-r--r--SRC/stftri.f332
-rw-r--r--SRC/stfttp.f300
-rw-r--r--SRC/stfttr.f320
-rw-r--r--SRC/stgevc.f480
-rw-r--r--SRC/stgex2.f323
-rw-r--r--SRC/stgexc.f333
-rw-r--r--SRC/stgsen.f747
-rw-r--r--SRC/stgsja.f541
-rw-r--r--SRC/stgsna.f633
-rw-r--r--SRC/stgsy2.f426
-rw-r--r--SRC/stgsyl.f466
-rw-r--r--SRC/stpcon.f179
-rw-r--r--SRC/stpmqrt.f278
-rw-r--r--SRC/stpqrt.f243
-rw-r--r--SRC/stpqrt2.f224
-rw-r--r--SRC/stprfb.f354
-rw-r--r--SRC/stprfs.f251
-rw-r--r--SRC/stptri.f167
-rw-r--r--SRC/stptrs.f182
-rw-r--r--SRC/stpttf.f289
-rw-r--r--SRC/stpttr.f140
-rw-r--r--SRC/strcon.f190
-rw-r--r--SRC/strevc.f345
-rw-r--r--SRC/strexc.f204
-rw-r--r--SRC/strrfs.f262
-rw-r--r--SRC/strsen.f515
-rw-r--r--SRC/strsna.f417
-rw-r--r--SRC/strsyl.f234
-rw-r--r--SRC/strti2.f152
-rw-r--r--SRC/strtri.f149
-rw-r--r--SRC/strtrs.f196
-rw-r--r--SRC/strttf.f316
-rw-r--r--SRC/strttp.f142
-rw-r--r--SRC/stzrqf.f191
-rw-r--r--SRC/stzrzf.f227
-rw-r--r--SRC/xerbla.f82
-rw-r--r--SRC/xerbla_array.f120
-rw-r--r--SRC/zbbcsd.f464
-rw-r--r--SRC/zbdsqr.f345
-rw-r--r--SRC/zcgesv.f304
-rw-r--r--SRC/zcposv.f325
-rw-r--r--SRC/zdrscl.f103
-rw-r--r--SRC/zgbbrd.f273
-rw-r--r--SRC/zgbcon.f203
-rw-r--r--SRC/zgbequ.f217
-rw-r--r--SRC/zgbequb.f238
-rw-r--r--SRC/zgbrfs.f295
-rw-r--r--SRC/zgbrfsx.f755
-rw-r--r--SRC/zgbsv.f240
-rw-r--r--SRC/zgbsvx.f606
-rw-r--r--SRC/zgbsvxx.f987
-rw-r--r--SRC/zgbtf2.f207
-rw-r--r--SRC/zgbtrf.f205
-rw-r--r--SRC/zgbtrs.f188
-rw-r--r--SRC/zgebak.f177
-rw-r--r--SRC/zgebal.f219
-rw-r--r--SRC/zgebd2.f247
-rw-r--r--SRC/zgebrd.f272
-rw-r--r--SRC/zgecon.f167
-rw-r--r--SRC/zgeequ.f195
-rw-r--r--SRC/zgeequb.f216
-rw-r--r--SRC/zgees.f290
-rw-r--r--SRC/zgeesx.f361
-rw-r--r--SRC/zgeev.f257
-rw-r--r--SRC/zgeevx.f446
-rw-r--r--SRC/zgegs.f342
-rw-r--r--SRC/zgegv.f456
-rw-r--r--SRC/zgehd2.f175
-rw-r--r--SRC/zgehrd.f207
-rw-r--r--SRC/zgelq2.f133
-rw-r--r--SRC/zgelqf.f155
-rw-r--r--SRC/zgels.f278
-rw-r--r--SRC/zgelsd.f357
-rw-r--r--SRC/zgelss.f260
-rw-r--r--SRC/zgelsx.f273
-rw-r--r--SRC/zgelsy.f330
-rw-r--r--SRC/zgemqrt.f241
-rw-r--r--SRC/zgeql2.f135
-rw-r--r--SRC/zgeqlf.f158
-rw-r--r--SRC/zgeqp3.f225
-rw-r--r--SRC/zgeqpf.f210
-rw-r--r--SRC/zgeqr2.f133
-rw-r--r--SRC/zgeqr2p.f133
-rw-r--r--SRC/zgeqrf.f182
-rw-r--r--SRC/zgeqrfp.f182
-rw-r--r--SRC/zgeqrt.f187
-rw-r--r--SRC/zgeqrt2.f164
-rw-r--r--SRC/zgeqrt3.f177
-rw-r--r--SRC/zgerfs.f264
-rw-r--r--SRC/zgerfsx.f712
-rw-r--r--SRC/zgerq2.f158
-rw-r--r--SRC/zgerqf.f158
-rw-r--r--SRC/zgesc2.f160
-rw-r--r--SRC/zgesdd.f351
-rw-r--r--SRC/zgesv.f167
-rw-r--r--SRC/zgesvd.f329
-rw-r--r--SRC/zgesvx.f571
-rw-r--r--SRC/zgesvxx.f954
-rw-r--r--SRC/zgetc2.f154
-rw-r--r--SRC/zgetf2.f147
-rw-r--r--SRC/zgetrf.f147
-rw-r--r--SRC/zgetri.f155
-rw-r--r--SRC/zgetrs.f163
-rw-r--r--SRC/zggbak.f205
-rw-r--r--SRC/zggbal.f262
-rw-r--r--SRC/zgges.f415
-rw-r--r--SRC/zggesx.f515
-rw-r--r--SRC/zggev.f328
-rw-r--r--SRC/zggevx.f595
-rw-r--r--SRC/zggglm.f274
-rw-r--r--SRC/zgghrd.f306
-rw-r--r--SRC/zgglse.f268
-rw-r--r--SRC/zggqrf.f310
-rw-r--r--SRC/zggrqf.f308
-rw-r--r--SRC/zggsvd.f535
-rw-r--r--SRC/zggsvp.f381
-rw-r--r--SRC/zgtcon.f195
-rw-r--r--SRC/zgtrfs.f299
-rw-r--r--SRC/zgtsv.f174
-rw-r--r--SRC/zgtsvx.f459
-rw-r--r--SRC/zgttrf.f177
-rw-r--r--SRC/zgttrs.f188
-rw-r--r--SRC/zgtts2.f173
-rw-r--r--SRC/zhbev.f214
-rw-r--r--SRC/zhbevd.f330
-rw-r--r--SRC/zhbevx.f395
-rw-r--r--SRC/zhbgst.f233
-rw-r--r--SRC/zhbgv.f267
-rw-r--r--SRC/zhbgvd.f399
-rw-r--r--SRC/zhbgvx.f446
-rw-r--r--SRC/zhbtrd.f235
-rw-r--r--SRC/zhecon.f169
-rw-r--r--SRC/zheequb.f153
-rw-r--r--SRC/zheev.f196
-rw-r--r--SRC/zheevd.f317
-rw-r--r--SRC/zheevr.f580
-rw-r--r--SRC/zheevx.f387
-rw-r--r--SRC/zhegs2.f178
-rw-r--r--SRC/zhegst.f178
-rw-r--r--SRC/zhegv.f271
-rw-r--r--SRC/zhegvd.f392
-rw-r--r--SRC/zhegvx.f468
-rw-r--r--SRC/zherfs.f276
-rw-r--r--SRC/zherfsx.f690
-rw-r--r--SRC/zhesv.f257
-rw-r--r--SRC/zhesvx.f446
-rw-r--r--SRC/zhesvxx.f879
-rw-r--r--SRC/zheswapr.f127
-rw-r--r--SRC/zhetd2.f232
-rw-r--r--SRC/zhetf2.f284
-rw-r--r--SRC/zhetrd.f254
-rw-r--r--SRC/zhetrf.f278
-rw-r--r--SRC/zhetri.f156
-rw-r--r--SRC/zhetri2.f183
-rw-r--r--SRC/zhetri2x.f159
-rw-r--r--SRC/zhetrs.f161
-rw-r--r--SRC/zhetrs2.f166
-rw-r--r--SRC/zhfrk.f261
-rw-r--r--SRC/zhgeqz.f449
-rw-r--r--SRC/zhpcon.f161
-rw-r--r--SRC/zhpev.f192
-rw-r--r--SRC/zhpevd.f308
-rw-r--r--SRC/zhpevx.f354
-rw-r--r--SRC/zhpgst.f156
-rw-r--r--SRC/zhpgv.f241
-rw-r--r--SRC/zhpgvd.f370
-rw-r--r--SRC/zhpgvx.f418
-rw-r--r--SRC/zhprfs.f258
-rw-r--r--SRC/zhpsv.f248
-rw-r--r--SRC/zhpsvx.f440
-rw-r--r--SRC/zhptrd.f192
-rw-r--r--SRC/zhptrf.f247
-rw-r--r--SRC/zhptri.f149
-rw-r--r--SRC/zhptrs.f154
-rw-r--r--SRC/zhsein.f369
-rw-r--r--SRC/zhseqr.f365
-rw-r--r--SRC/zla_gbamv.f285
-rw-r--r--SRC/zla_gbrcond_c.f230
-rw-r--r--SRC/zla_gbrcond_x.f220
-rw-r--r--SRC/zla_gbrfsx_extended.f678
-rw-r--r--SRC/zla_gbrpvgrw.f160
-rw-r--r--SRC/zla_geamv.f270
-rw-r--r--SRC/zla_gercond_c.f199
-rw-r--r--SRC/zla_gercond_x.f189
-rw-r--r--SRC/zla_gerfsx_extended.f659
-rw-r--r--SRC/zla_gerpvgrw.f126
-rw-r--r--SRC/zla_heamv.f270
-rw-r--r--SRC/zla_hercond_c.f193
-rw-r--r--SRC/zla_hercond_x.f183
-rw-r--r--SRC/zla_herfsx_extended.f655
-rw-r--r--SRC/zla_herpvgrw.f171
-rw-r--r--SRC/zla_lin_berr.f142
-rw-r--r--SRC/zla_porcond_c.f181
-rw-r--r--SRC/zla_porcond_x.f171
-rw-r--r--SRC/zla_porfsx_extended.f643
-rw-r--r--SRC/zla_porpvgrw.f137
-rw-r--r--SRC/zla_syamv.f273
-rw-r--r--SRC/zla_syrcond_c.f193
-rw-r--r--SRC/zla_syrcond_x.f183
-rw-r--r--SRC/zla_syrfsx_extended.f655
-rw-r--r--SRC/zla_syrpvgrw.f171
-rw-r--r--SRC/zla_wwaddw.f103
-rw-r--r--SRC/zlabrd.f279
-rw-r--r--SRC/zlacgv.f87
-rw-r--r--SRC/zlacn2.f175
-rw-r--r--SRC/zlacon.f147
-rw-r--r--SRC/zlacp2.f133
-rw-r--r--SRC/zlacpy.f132
-rw-r--r--SRC/zlacrm.f148
-rw-r--r--SRC/zlacrt.f136
-rw-r--r--SRC/zladiv.f69
-rw-r--r--SRC/zlaed0.f202
-rw-r--r--SRC/zlaed7.f368
-rw-r--r--SRC/zlaed8.f332
-rw-r--r--SRC/zlaein.f200
-rw-r--r--SRC/zlaesy.f143
-rw-r--r--SRC/zlaev2.f152
-rw-r--r--SRC/zlag2c.f141
-rw-r--r--SRC/zlags2.f215
-rw-r--r--SRC/zlagtm.f194
-rw-r--r--SRC/zlahef.f233
-rw-r--r--SRC/zlahqr.f300
-rw-r--r--SRC/zlahr2.f238
-rw-r--r--SRC/zlahrd.f220
-rw-r--r--SRC/zlaic1.f189
-rw-r--r--SRC/zlals0.f414
-rw-r--r--SRC/zlalsa.f400
-rw-r--r--SRC/zlalsd.f284
-rw-r--r--SRC/zlangb.f174
-rw-r--r--SRC/zlange.f160
-rw-r--r--SRC/zlangt.f146
-rw-r--r--SRC/zlanhb.f188
-rw-r--r--SRC/zlanhe.f178
-rw-r--r--SRC/zlanhf.f422
-rw-r--r--SRC/zlanhp.f167
-rw-r--r--SRC/zlanhs.f151
-rw-r--r--SRC/zlanht.f138
-rw-r--r--SRC/zlansb.f184
-rw-r--r--SRC/zlansp.f163
-rw-r--r--SRC/zlansy.f176
-rw-r--r--SRC/zlantb.f199
-rw-r--r--SRC/zlantp.f178
-rw-r--r--SRC/zlantr.f201
-rw-r--r--SRC/zlapll.f129
-rw-r--r--SRC/zlapmr.f141
-rw-r--r--SRC/zlapmt.f136
-rw-r--r--SRC/zlaqgb.f226
-rw-r--r--SRC/zlaqge.f197
-rw-r--r--SRC/zlaqhb.f200
-rw-r--r--SRC/zlaqhe.f189
-rw-r--r--SRC/zlaqhp.f176
-rw-r--r--SRC/zlaqp2.f202
-rw-r--r--SRC/zlaqps.f246
-rw-r--r--SRC/zlaqr0.f372
-rw-r--r--SRC/zlaqr1.f136
-rw-r--r--SRC/zlaqr2.f415
-rw-r--r--SRC/zlaqr3.f411
-rw-r--r--SRC/zlaqr4.f388
-rw-r--r--SRC/zlaqr5.f344
-rw-r--r--SRC/zlaqsb.f200
-rw-r--r--SRC/zlaqsp.f176
-rw-r--r--SRC/zlaqsy.f189
-rw-r--r--SRC/zlar1v.f340
-rw-r--r--SRC/zlar2v.f145
-rw-r--r--SRC/zlarcm.f148
-rw-r--r--SRC/zlarf.f176
-rw-r--r--SRC/zlarfb.f258
-rw-r--r--SRC/zlarfg.f144
-rw-r--r--SRC/zlarfgp.f140
-rw-r--r--SRC/zlarft.f217
-rw-r--r--SRC/zlarfx.f161
-rw-r--r--SRC/zlargv.f155
-rw-r--r--SRC/zlarnv.f130
-rw-r--r--SRC/zlarrv.f429
-rw-r--r--SRC/zlarscl2.f115
-rw-r--r--SRC/zlartg.f126
-rw-r--r--SRC/zlartv.f137
-rw-r--r--SRC/zlarz.f203
-rw-r--r--SRC/zlarzb.f256
-rw-r--r--SRC/zlarzt.f255
-rw-r--r--SRC/zlascl.f192
-rw-r--r--SRC/zlascl2.f115
-rw-r--r--SRC/zlaset.f137
-rw-r--r--SRC/zlasr.f319
-rw-r--r--SRC/zlassq.f144
-rw-r--r--SRC/zlaswp.f149
-rw-r--r--SRC/zlasyf.f233
-rw-r--r--SRC/zlat2c.f149
-rw-r--r--SRC/zlatbs.f393
-rw-r--r--SRC/zlatdf.f249
-rw-r--r--SRC/zlatps.f375
-rw-r--r--SRC/zlatrd.f275
-rw-r--r--SRC/zlatrs.f388
-rw-r--r--SRC/zlatrz.f188
-rw-r--r--SRC/zlatzm.f224
-rw-r--r--SRC/zlauu2.f136
-rw-r--r--SRC/zlauum.f136
-rw-r--r--SRC/zpbcon.f182
-rw-r--r--SRC/zpbequ.f180
-rw-r--r--SRC/zpbrfs.f271
-rw-r--r--SRC/zpbstf.f223
-rw-r--r--SRC/zpbsv.f242
-rw-r--r--SRC/zpbsvx.f557
-rw-r--r--SRC/zpbtf2.f211
-rw-r--r--SRC/zpbtrf.f203
-rw-r--r--SRC/zpbtrs.f162
-rw-r--r--SRC/zpftrf.f386
-rw-r--r--SRC/zpftri.f348
-rw-r--r--SRC/zpftrs.f359
-rw-r--r--SRC/zpocon.f161
-rw-r--r--SRC/zpoequ.f153
-rw-r--r--SRC/zpoequb.f158
-rw-r--r--SRC/zporfs.f262
-rw-r--r--SRC/zporfsx.f677
-rw-r--r--SRC/zposv.f186
-rw-r--r--SRC/zposvx.f489
-rw-r--r--SRC/zposvxx.f868
-rw-r--r--SRC/zpotf2.f153
-rw-r--r--SRC/zpotrf.f149
-rw-r--r--SRC/zpotri.f124
-rw-r--r--SRC/zpotrs.f143
-rw-r--r--SRC/zppcon.f161
-rw-r--r--SRC/zppequ.f160
-rw-r--r--SRC/zpprfs.f244
-rw-r--r--SRC/zppsv.f208
-rw-r--r--SRC/zppsvx.f507
-rw-r--r--SRC/zpptrf.f167
-rw-r--r--SRC/zpptri.f124
-rw-r--r--SRC/zpptrs.f142
-rw-r--r--SRC/zpstf2.f205
-rw-r--r--SRC/zpstrf.f206
-rw-r--r--SRC/zptcon.f160
-rw-r--r--SRC/zpteqr.f214
-rw-r--r--SRC/zptrfs.f259
-rw-r--r--SRC/zptsv.f158
-rw-r--r--SRC/zptsvx.f353
-rw-r--r--SRC/zpttrf.f121
-rw-r--r--SRC/zpttrs.f166
-rw-r--r--SRC/zptts2.f154
-rw-r--r--SRC/zrot.f129
-rw-r--r--SRC/zspcon.f161
-rw-r--r--SRC/zspmv.f224
-rw-r--r--SRC/zspr.f195
-rw-r--r--SRC/zsprfs.f258
-rw-r--r--SRC/zspsv.f248
-rw-r--r--SRC/zspsvx.f440
-rw-r--r--SRC/zsptrf.f249
-rw-r--r--SRC/zsptri.f149
-rw-r--r--SRC/zsptrs.f154
-rw-r--r--SRC/zstedc.f341
-rw-r--r--SRC/zstegr.f392
-rw-r--r--SRC/zstein.f268
-rw-r--r--SRC/zstemr.f537
-rw-r--r--SRC/zsteqr.f188
-rw-r--r--SRC/zsycon.f169
-rw-r--r--SRC/zsyconv.f172
-rw-r--r--SRC/zsyequb.f194
-rw-r--r--SRC/zsymv.f233
-rw-r--r--SRC/zsyr.f198
-rw-r--r--SRC/zsyrfs.f276
-rw-r--r--SRC/zsyrfsx.f691
-rw-r--r--SRC/zsysv.f257
-rw-r--r--SRC/zsysvx.f446
-rw-r--r--SRC/zsysvxx.f890
-rw-r--r--SRC/zsyswapr.f127
-rw-r--r--SRC/zsytf2.f282
-rw-r--r--SRC/zsytrf.f289
-rw-r--r--SRC/zsytri.f156
-rw-r--r--SRC/zsytri2.f182
-rw-r--r--SRC/zsytri2x.f159
-rw-r--r--SRC/zsytrs.f161
-rw-r--r--SRC/zsytrs2.f166
-rw-r--r--SRC/ztbcon.f199
-rw-r--r--SRC/ztbrfs.f271
-rw-r--r--SRC/ztbtrs.f205
-rw-r--r--SRC/ztfsm.f513
-rw-r--r--SRC/ztftri.f372
-rw-r--r--SRC/ztfttp.f341
-rw-r--r--SRC/ztfttr.f354
-rw-r--r--SRC/ztgevc.f329
-rw-r--r--SRC/ztgex2.f280
-rw-r--r--SRC/ztgexc.f303
-rw-r--r--SRC/ztgsen.f723
-rw-r--r--SRC/ztgsja.f543
-rw-r--r--SRC/ztgsna.f490
-rw-r--r--SRC/ztgsy2.f404
-rw-r--r--SRC/ztgsyl.f464
-rw-r--r--SRC/ztpcon.f179
-rw-r--r--SRC/ztpmqrt.f278
-rw-r--r--SRC/ztpqrt.f243
-rw-r--r--SRC/ztpqrt2.f224
-rw-r--r--SRC/ztprfb.f354
-rw-r--r--SRC/ztprfs.f250
-rw-r--r--SRC/ztptri.f167
-rw-r--r--SRC/ztptrs.f182
-rw-r--r--SRC/ztpttf.f331
-rw-r--r--SRC/ztpttr.f140
-rw-r--r--SRC/ztrcon.f190
-rw-r--r--SRC/ztrevc.f333
-rw-r--r--SRC/ztrexc.f164
-rw-r--r--SRC/ztrrfs.f262
-rw-r--r--SRC/ztrsen.f429
-rw-r--r--SRC/ztrsna.f385
-rw-r--r--SRC/ztrsyl.f220
-rw-r--r--SRC/ztrti2.f152
-rw-r--r--SRC/ztrtri.f149
-rw-r--r--SRC/ztrtrs.f196
-rw-r--r--SRC/ztrttf.f354
-rw-r--r--SRC/ztrttp.f141
-rw-r--r--SRC/ztzrqf.f191
-rw-r--r--SRC/ztzrzf.f227
-rw-r--r--SRC/zunbdb.f453
-rw-r--r--SRC/zuncsd.f429
-rw-r--r--SRC/zung2l.f144
-rw-r--r--SRC/zung2r.f144
-rw-r--r--SRC/zungbr.f234
-rw-r--r--SRC/zunghr.f162
-rw-r--r--SRC/zungl2.f142
-rw-r--r--SRC/zunglq.f168
-rw-r--r--SRC/zungql.f170
-rw-r--r--SRC/zungqr.f170
-rw-r--r--SRC/zungr2.f144
-rw-r--r--SRC/zungrq.f170
-rw-r--r--SRC/zungtr.f170
-rw-r--r--SRC/zunm2l.f228
-rw-r--r--SRC/zunm2r.f228
-rw-r--r--SRC/zunmbr.f297
-rw-r--r--SRC/zunmhr.f257
-rw-r--r--SRC/zunml2.f228
-rw-r--r--SRC/zunmlq.f248
-rw-r--r--SRC/zunmql.f248
-rw-r--r--SRC/zunmqr.f248
-rw-r--r--SRC/zunmr2.f228
-rw-r--r--SRC/zunmr3.f254
-rw-r--r--SRC/zunmrq.f248
-rw-r--r--SRC/zunmrz.f278
-rw-r--r--SRC/zunmtr.f250
-rw-r--r--SRC/zupgtr.f151
-rw-r--r--SRC/zupmtr.f213
-rw-r--r--TESTING/EIG/alahdg.f87
-rw-r--r--TESTING/EIG/alareq.f130
-rw-r--r--TESTING/EIG/alarqg.f130
-rw-r--r--TESTING/EIG/alasmg.f92
-rw-r--r--TESTING/EIG/alasum.f92
-rw-r--r--TESTING/EIG/alasvm.f92
-rw-r--r--TESTING/EIG/cbdt01.f215
-rw-r--r--TESTING/EIG/cbdt02.f170
-rw-r--r--TESTING/EIG/cbdt03.f199
-rw-r--r--TESTING/EIG/cchkbb.f595
-rw-r--r--TESTING/EIG/cchkbd.f703
-rw-r--r--TESTING/EIG/cchkbk.f70
-rw-r--r--TESTING/EIG/cchkbl.f68
-rw-r--r--TESTING/EIG/cchkec.f102
-rw-r--r--TESTING/EIG/cchkee.f2025
-rw-r--r--TESTING/EIG/cchkgg.f847
-rw-r--r--TESTING/EIG/cchkgk.f68
-rw-r--r--TESTING/EIG/cchkgl.f66
-rw-r--r--TESTING/EIG/cchkhb.f492
-rw-r--r--TESTING/EIG/cchkhs.f807
-rw-r--r--TESTING/EIG/cchkst.f944
-rw-r--r--TESTING/EIG/cckcsd.f270
-rw-r--r--TESTING/EIG/cckglm.f243
-rw-r--r--TESTING/EIG/cckgqr.f304
-rw-r--r--TESTING/EIG/cckgsv.f284
-rw-r--r--TESTING/EIG/ccklse.f243
-rw-r--r--TESTING/EIG/ccsdts.f314
-rw-r--r--TESTING/EIG/cdrges.f651
-rw-r--r--TESTING/EIG/cdrgev.f672
-rw-r--r--TESTING/EIG/cdrgsx.f582
-rw-r--r--TESTING/EIG/cdrgvx.f461
-rw-r--r--TESTING/EIG/cdrvbd.f555
-rw-r--r--TESTING/EIG/cdrves.f646
-rw-r--r--TESTING/EIG/cdrvev.f670
-rw-r--r--TESTING/EIG/cdrvgg.f718
-rw-r--r--TESTING/EIG/cdrvsg.f730
-rw-r--r--TESTING/EIG/cdrvst.f659
-rw-r--r--TESTING/EIG/cdrvsx.f756
-rw-r--r--TESTING/EIG/cdrvvx.f762
-rw-r--r--TESTING/EIG/cerrbd.f69
-rw-r--r--TESTING/EIG/cerrec.f73
-rw-r--r--TESTING/EIG/cerred.f91
-rw-r--r--TESTING/EIG/cerrgg.f73
-rw-r--r--TESTING/EIG/cerrhs.f71
-rw-r--r--TESTING/EIG/cerrst.f75
-rw-r--r--TESTING/EIG/cget02.f195
-rw-r--r--TESTING/EIG/cget10.f138
-rw-r--r--TESTING/EIG/cget22.f207
-rw-r--r--TESTING/EIG/cget23.f588
-rw-r--r--TESTING/EIG/cget24.f543
-rw-r--r--TESTING/EIG/cget35.f116
-rw-r--r--TESTING/EIG/cget36.f118
-rw-r--r--TESTING/EIG/cget37.f135
-rw-r--r--TESTING/EIG/cget38.f137
-rw-r--r--TESTING/EIG/cget51.f235
-rw-r--r--TESTING/EIG/cget52.f248
-rw-r--r--TESTING/EIG/cget54.f232
-rw-r--r--TESTING/EIG/cglmts.f214
-rw-r--r--TESTING/EIG/cgqrts.f256
-rw-r--r--TESTING/EIG/cgrqts.f256
-rw-r--r--TESTING/EIG/cgsvts.f306
-rw-r--r--TESTING/EIG/chbt21.f229
-rw-r--r--TESTING/EIG/chet21.f344
-rw-r--r--TESTING/EIG/chet22.f299
-rw-r--r--TESTING/EIG/chkxer.f68
-rw-r--r--TESTING/EIG/chpt21.f376
-rw-r--r--TESTING/EIG/chst01.f206
-rw-r--r--TESTING/EIG/clarfy.f159
-rw-r--r--TESTING/EIG/clarhs.f334
-rw-r--r--TESTING/EIG/clatm4.f275
-rw-r--r--TESTING/EIG/clctes.f76
-rw-r--r--TESTING/EIG/clctsx.f72
-rw-r--r--TESTING/EIG/clsets.f222
-rw-r--r--TESTING/EIG/csbmv.f287
-rw-r--r--TESTING/EIG/csgt01.f230
-rw-r--r--TESTING/EIG/cslect.f77
-rw-r--r--TESTING/EIG/cstt21.f198
-rw-r--r--TESTING/EIG/cstt22.f217
-rw-r--r--TESTING/EIG/cunt01.f190
-rw-r--r--TESTING/EIG/cunt03.f247
-rw-r--r--TESTING/EIG/dbdt01.f207
-rw-r--r--TESTING/EIG/dbdt02.f159
-rw-r--r--TESTING/EIG/dbdt03.f199
-rw-r--r--TESTING/EIG/dchkbb.f587
-rw-r--r--TESTING/EIG/dchkbd.f745
-rw-r--r--TESTING/EIG/dchkbk.f70
-rw-r--r--TESTING/EIG/dchkbl.f68
-rw-r--r--TESTING/EIG/dchkec.f104
-rw-r--r--TESTING/EIG/dchkee.f2037
-rw-r--r--TESTING/EIG/dchkgg.f859
-rw-r--r--TESTING/EIG/dchkgk.f68
-rw-r--r--TESTING/EIG/dchkgl.f66
-rw-r--r--TESTING/EIG/dchkhs.f792
-rw-r--r--TESTING/EIG/dchksb.f492
-rw-r--r--TESTING/EIG/dchkst.f934
-rw-r--r--TESTING/EIG/dckcsd.f270
-rw-r--r--TESTING/EIG/dckglm.f242
-rw-r--r--TESTING/EIG/dckgqr.f303
-rw-r--r--TESTING/EIG/dckgsv.f284
-rw-r--r--TESTING/EIG/dcklse.f242
-rw-r--r--TESTING/EIG/dcsdts.f314
-rw-r--r--TESTING/EIG/ddrges.f691
-rw-r--r--TESTING/EIG/ddrgev.f685
-rw-r--r--TESTING/EIG/ddrgsx.f602
-rw-r--r--TESTING/EIG/ddrgvx.f465
-rw-r--r--TESTING/EIG/ddrvbd.f525
-rw-r--r--TESTING/EIG/ddrves.f663
-rw-r--r--TESTING/EIG/ddrvev.f696
-rw-r--r--TESTING/EIG/ddrvgg.f766
-rw-r--r--TESTING/EIG/ddrvsg.f702
-rw-r--r--TESTING/EIG/ddrvst.f894
-rw-r--r--TESTING/EIG/ddrvsx.f775
-rw-r--r--TESTING/EIG/ddrvvx.f875
-rw-r--r--TESTING/EIG/derrbd.f71
-rw-r--r--TESTING/EIG/derrec.f73
-rw-r--r--TESTING/EIG/derred.f91
-rw-r--r--TESTING/EIG/derrgg.f73
-rw-r--r--TESTING/EIG/derrhs.f71
-rw-r--r--TESTING/EIG/derrst.f75
-rw-r--r--TESTING/EIG/dget02.f195
-rw-r--r--TESTING/EIG/dget10.f128
-rw-r--r--TESTING/EIG/dget22.f263
-rw-r--r--TESTING/EIG/dget23.f604
-rw-r--r--TESTING/EIG/dget24.f551
-rw-r--r--TESTING/EIG/dget31.f132
-rw-r--r--TESTING/EIG/dget32.f111
-rw-r--r--TESTING/EIG/dget33.f103
-rw-r--r--TESTING/EIG/dget34.f116
-rw-r--r--TESTING/EIG/dget35.f103
-rw-r--r--TESTING/EIG/dget36.f127
-rw-r--r--TESTING/EIG/dget37.f135
-rw-r--r--TESTING/EIG/dget38.f137
-rw-r--r--TESTING/EIG/dget39.f157
-rw-r--r--TESTING/EIG/dget51.f228
-rw-r--r--TESTING/EIG/dget52.f324
-rw-r--r--TESTING/EIG/dget53.f191
-rw-r--r--TESTING/EIG/dget54.f232
-rw-r--r--TESTING/EIG/dglmts.f198
-rw-r--r--TESTING/EIG/dgqrts.f256
-rw-r--r--TESTING/EIG/dgrqts.f256
-rw-r--r--TESTING/EIG/dgsvts.f307
-rw-r--r--TESTING/EIG/dhst01.f196
-rw-r--r--TESTING/EIG/dlafts.f171
-rw-r--r--TESTING/EIG/dlahd2.f89
-rw-r--r--TESTING/EIG/dlarfy.f159
-rw-r--r--TESTING/EIG/dlarhs.f324
-rw-r--r--TESTING/EIG/dlasum.f56
-rw-r--r--TESTING/EIG/dlatb9.f174
-rw-r--r--TESTING/EIG/dlatm4.f284
-rw-r--r--TESTING/EIG/dlctes.f91
-rw-r--r--TESTING/EIG/dlctsx.f85
-rw-r--r--TESTING/EIG/dlsets.f204
-rw-r--r--TESTING/EIG/dort01.f175
-rw-r--r--TESTING/EIG/dort03.f237
-rw-r--r--TESTING/EIG/dsbt21.f223
-rw-r--r--TESTING/EIG/dsgt01.f222
-rw-r--r--TESTING/EIG/dslect.f84
-rw-r--r--TESTING/EIG/dspt21.f369
-rw-r--r--TESTING/EIG/dstech.f147
-rw-r--r--TESTING/EIG/dstect.f119
-rw-r--r--TESTING/EIG/dstt21.f189
-rw-r--r--TESTING/EIG/dstt22.f207
-rw-r--r--TESTING/EIG/dsvdch.f140
-rw-r--r--TESTING/EIG/dsvdct.f129
-rw-r--r--TESTING/EIG/dsxt1.f153
-rw-r--r--TESTING/EIG/dsyt21.f335
-rw-r--r--TESTING/EIG/dsyt22.f291
-rw-r--r--TESTING/EIG/ilaenv.f239
-rw-r--r--TESTING/EIG/sbdt01.f207
-rw-r--r--TESTING/EIG/sbdt02.f159
-rw-r--r--TESTING/EIG/sbdt03.f199
-rw-r--r--TESTING/EIG/schkbb.f587
-rw-r--r--TESTING/EIG/schkbd.f745
-rw-r--r--TESTING/EIG/schkbk.f70
-rw-r--r--TESTING/EIG/schkbl.f68
-rw-r--r--TESTING/EIG/schkec.f104
-rw-r--r--TESTING/EIG/schkee.f2037
-rw-r--r--TESTING/EIG/schkgg.f859
-rw-r--r--TESTING/EIG/schkgk.f68
-rw-r--r--TESTING/EIG/schkgl.f66
-rw-r--r--TESTING/EIG/schkhs.f792
-rw-r--r--TESTING/EIG/schksb.f492
-rw-r--r--TESTING/EIG/schkst.f934
-rw-r--r--TESTING/EIG/sckcsd.f270
-rw-r--r--TESTING/EIG/sckglm.f242
-rw-r--r--TESTING/EIG/sckgqr.f303
-rw-r--r--TESTING/EIG/sckgsv.f284
-rw-r--r--TESTING/EIG/scklse.f242
-rw-r--r--TESTING/EIG/scsdts.f314
-rw-r--r--TESTING/EIG/sdrges.f691
-rw-r--r--TESTING/EIG/sdrgev.f684
-rw-r--r--TESTING/EIG/sdrgsx.f601
-rw-r--r--TESTING/EIG/sdrgvx.f466
-rw-r--r--TESTING/EIG/sdrvbd.f525
-rw-r--r--TESTING/EIG/sdrves.f663
-rw-r--r--TESTING/EIG/sdrvev.f696
-rw-r--r--TESTING/EIG/sdrvgg.f766
-rw-r--r--TESTING/EIG/sdrvsg.f702
-rw-r--r--TESTING/EIG/sdrvst.f894
-rw-r--r--TESTING/EIG/sdrvsx.f775
-rw-r--r--TESTING/EIG/sdrvvx.f873
-rw-r--r--TESTING/EIG/serrbd.f71
-rw-r--r--TESTING/EIG/serrec.f73
-rw-r--r--TESTING/EIG/serred.f91
-rw-r--r--TESTING/EIG/serrgg.f73
-rw-r--r--TESTING/EIG/serrhs.f71
-rw-r--r--TESTING/EIG/serrst.f75
-rw-r--r--TESTING/EIG/sget02.f195
-rw-r--r--TESTING/EIG/sget10.f128
-rw-r--r--TESTING/EIG/sget22.f263
-rw-r--r--TESTING/EIG/sget23.f604
-rw-r--r--TESTING/EIG/sget24.f551
-rw-r--r--TESTING/EIG/sget31.f132
-rw-r--r--TESTING/EIG/sget32.f111
-rw-r--r--TESTING/EIG/sget33.f103
-rw-r--r--TESTING/EIG/sget34.f116
-rw-r--r--TESTING/EIG/sget35.f103
-rw-r--r--TESTING/EIG/sget36.f127
-rw-r--r--TESTING/EIG/sget37.f135
-rw-r--r--TESTING/EIG/sget38.f137
-rw-r--r--TESTING/EIG/sget39.f157
-rw-r--r--TESTING/EIG/sget51.f228
-rw-r--r--TESTING/EIG/sget52.f324
-rw-r--r--TESTING/EIG/sget53.f191
-rw-r--r--TESTING/EIG/sget54.f232
-rw-r--r--TESTING/EIG/sglmts.f213
-rw-r--r--TESTING/EIG/sgqrts.f256
-rw-r--r--TESTING/EIG/sgrqts.f257
-rw-r--r--TESTING/EIG/sgsvts.f307
-rw-r--r--TESTING/EIG/shst01.f196
-rw-r--r--TESTING/EIG/slafts.f171
-rw-r--r--TESTING/EIG/slahd2.f89
-rw-r--r--TESTING/EIG/slarfy.f159
-rw-r--r--TESTING/EIG/slarhs.f324
-rw-r--r--TESTING/EIG/slasum.f57
-rw-r--r--TESTING/EIG/slatb9.f174
-rw-r--r--TESTING/EIG/slatm4.f284
-rw-r--r--TESTING/EIG/slctes.f91
-rw-r--r--TESTING/EIG/slctsx.f85
-rw-r--r--TESTING/EIG/slsets.f222
-rw-r--r--TESTING/EIG/sort01.f175
-rw-r--r--TESTING/EIG/sort03.f237
-rw-r--r--TESTING/EIG/ssbt21.f223
-rw-r--r--TESTING/EIG/ssgt01.f222
-rw-r--r--TESTING/EIG/sslect.f84
-rw-r--r--TESTING/EIG/sspt21.f369
-rw-r--r--TESTING/EIG/sstech.f147
-rw-r--r--TESTING/EIG/sstect.f119
-rw-r--r--TESTING/EIG/sstt21.f189
-rw-r--r--TESTING/EIG/sstt22.f207
-rw-r--r--TESTING/EIG/ssvdch.f140
-rw-r--r--TESTING/EIG/ssvdct.f129
-rw-r--r--TESTING/EIG/ssxt1.f153
-rw-r--r--TESTING/EIG/ssyt21.f335
-rw-r--r--TESTING/EIG/ssyt22.f291
-rw-r--r--TESTING/EIG/xerbla.f103
-rw-r--r--TESTING/EIG/xlaenv.f124
-rw-r--r--TESTING/EIG/zbdt01.f215
-rw-r--r--TESTING/EIG/zbdt02.f170
-rw-r--r--TESTING/EIG/zbdt03.f199
-rw-r--r--TESTING/EIG/zchkbb.f595
-rw-r--r--TESTING/EIG/zchkbd.f703
-rw-r--r--TESTING/EIG/zchkbk.f70
-rw-r--r--TESTING/EIG/zchkbl.f68
-rw-r--r--TESTING/EIG/zchkec.f102
-rw-r--r--TESTING/EIG/zchkee.f2025
-rw-r--r--TESTING/EIG/zchkgg.f847
-rw-r--r--TESTING/EIG/zchkgk.f68
-rw-r--r--TESTING/EIG/zchkgl.f66
-rw-r--r--TESTING/EIG/zchkhb.f492
-rw-r--r--TESTING/EIG/zchkhs.f807
-rw-r--r--TESTING/EIG/zchkst.f944
-rw-r--r--TESTING/EIG/zckcsd.f270
-rw-r--r--TESTING/EIG/zckglm.f243
-rw-r--r--TESTING/EIG/zckgqr.f304
-rw-r--r--TESTING/EIG/zckgsv.f284
-rw-r--r--TESTING/EIG/zcklse.f243
-rw-r--r--TESTING/EIG/zcsdts.f314
-rw-r--r--TESTING/EIG/zdrges.f651
-rw-r--r--TESTING/EIG/zdrgev.f672
-rw-r--r--TESTING/EIG/zdrgsx.f582
-rw-r--r--TESTING/EIG/zdrgvx.f460
-rw-r--r--TESTING/EIG/zdrvbd.f555
-rw-r--r--TESTING/EIG/zdrves.f646
-rw-r--r--TESTING/EIG/zdrvev.f670
-rw-r--r--TESTING/EIG/zdrvgg.f718
-rw-r--r--TESTING/EIG/zdrvsg.f730
-rw-r--r--TESTING/EIG/zdrvst.f659
-rw-r--r--TESTING/EIG/zdrvsx.f756
-rw-r--r--TESTING/EIG/zdrvvx.f762
-rw-r--r--TESTING/EIG/zerrbd.f69
-rw-r--r--TESTING/EIG/zerrec.f73
-rw-r--r--TESTING/EIG/zerred.f91
-rw-r--r--TESTING/EIG/zerrgg.f73
-rw-r--r--TESTING/EIG/zerrhs.f71
-rw-r--r--TESTING/EIG/zerrst.f75
-rw-r--r--TESTING/EIG/zget02.f195
-rw-r--r--TESTING/EIG/zget10.f138
-rw-r--r--TESTING/EIG/zget22.f207
-rw-r--r--TESTING/EIG/zget23.f588
-rw-r--r--TESTING/EIG/zget24.f543
-rw-r--r--TESTING/EIG/zget35.f116
-rw-r--r--TESTING/EIG/zget36.f118
-rw-r--r--TESTING/EIG/zget37.f135
-rw-r--r--TESTING/EIG/zget38.f137
-rw-r--r--TESTING/EIG/zget51.f235
-rw-r--r--TESTING/EIG/zget52.f250
-rw-r--r--TESTING/EIG/zget54.f232
-rw-r--r--TESTING/EIG/zglmts.f198
-rw-r--r--TESTING/EIG/zgqrts.f256
-rw-r--r--TESTING/EIG/zgrqts.f256
-rw-r--r--TESTING/EIG/zgsvts.f306
-rw-r--r--TESTING/EIG/zhbt21.f229
-rw-r--r--TESTING/EIG/zhet21.f344
-rw-r--r--TESTING/EIG/zhet22.f299
-rw-r--r--TESTING/EIG/zhpt21.f376
-rw-r--r--TESTING/EIG/zhst01.f206
-rw-r--r--TESTING/EIG/zlarfy.f159
-rw-r--r--TESTING/EIG/zlarhs.f334
-rw-r--r--TESTING/EIG/zlatm4.f275
-rw-r--r--TESTING/EIG/zlctes.f76
-rw-r--r--TESTING/EIG/zlctsx.f72
-rw-r--r--TESTING/EIG/zlsets.f204
-rw-r--r--TESTING/EIG/zsbmv.f287
-rw-r--r--TESTING/EIG/zsgt01.f230
-rw-r--r--TESTING/EIG/zslect.f77
-rw-r--r--TESTING/EIG/zstt21.f198
-rw-r--r--TESTING/EIG/zstt22.f217
-rw-r--r--TESTING/EIG/zunt01.f190
-rw-r--r--TESTING/EIG/zunt03.f247
-rw-r--r--TESTING/LIN/aladhd.f105
-rw-r--r--TESTING/LIN/alaerh.f217
-rw-r--r--TESTING/LIN/alaesm.f83
-rw-r--r--TESTING/LIN/alahd.f129
-rw-r--r--TESTING/LIN/alareq.f130
-rw-r--r--TESTING/LIN/alasum.f92
-rw-r--r--TESTING/LIN/alasvm.f92
-rw-r--r--TESTING/LIN/cchkaa.f180
-rw-r--r--TESTING/LIN/cchkeq.f69
-rw-r--r--TESTING/LIN/cchkgb.f274
-rw-r--r--TESTING/LIN/cchkge.f275
-rw-r--r--TESTING/LIN/cchkgt.f208
-rw-r--r--TESTING/LIN/cchkhe.f245
-rw-r--r--TESTING/LIN/cchkhp.f233
-rw-r--r--TESTING/LIN/cchklq.f278
-rw-r--r--TESTING/LIN/cchkpb.f238
-rw-r--r--TESTING/LIN/cchkpo.f238
-rw-r--r--TESTING/LIN/cchkpp.f226
-rw-r--r--TESTING/LIN/cchkps.f217
-rw-r--r--TESTING/LIN/cchkpt.f208
-rw-r--r--TESTING/LIN/cchkq3.f225
-rw-r--r--TESTING/LIN/cchkql.f278
-rw-r--r--TESTING/LIN/cchkqp.f203
-rw-r--r--TESTING/LIN/cchkqr.f285
-rw-r--r--TESTING/LIN/cchkrfp.f86
-rw-r--r--TESTING/LIN/cchkrq.f285
-rw-r--r--TESTING/LIN/cchksp.f233
-rw-r--r--TESTING/LIN/cchksy.f245
-rw-r--r--TESTING/LIN/cchktb.f212
-rw-r--r--TESTING/LIN/cchktp.f213
-rw-r--r--TESTING/LIN/cchktr.f231
-rw-r--r--TESTING/LIN/cchktz.f195
-rw-r--r--TESTING/LIN/cdrvgb.f243
-rw-r--r--TESTING/LIN/cdrvgbx.f249
-rw-r--r--TESTING/LIN/cdrvge.f230
-rw-r--r--TESTING/LIN/cdrvgex.f236
-rw-r--r--TESTING/LIN/cdrvgt.f186
-rw-r--r--TESTING/LIN/cdrvhe.f216
-rw-r--r--TESTING/LIN/cdrvhex.f222
-rw-r--r--TESTING/LIN/cdrvhp.f222
-rw-r--r--TESTING/LIN/cdrvls.f308
-rw-r--r--TESTING/LIN/cdrvpb.f223
-rw-r--r--TESTING/LIN/cdrvpo.f223
-rw-r--r--TESTING/LIN/cdrvpox.f229
-rw-r--r--TESTING/LIN/cdrvpp.f223
-rw-r--r--TESTING/LIN/cdrvpt.f197
-rw-r--r--TESTING/LIN/cdrvrf1.f134
-rw-r--r--TESTING/LIN/cdrvrf2.f120
-rw-r--r--TESTING/LIN/cdrvrf3.f165
-rw-r--r--TESTING/LIN/cdrvrf4.f159
-rw-r--r--TESTING/LIN/cdrvrfp.f347
-rw-r--r--TESTING/LIN/cdrvsp.f222
-rw-r--r--TESTING/LIN/cdrvsy.f216
-rw-r--r--TESTING/LIN/cdrvsyx.f222
-rw-r--r--TESTING/LIN/cebchvxx.f215
-rw-r--r--TESTING/LIN/cerrge.f71
-rw-r--r--TESTING/LIN/cerrgex.f77
-rw-r--r--TESTING/LIN/cerrgt.f71
-rw-r--r--TESTING/LIN/cerrhe.f71
-rw-r--r--TESTING/LIN/cerrhex.f77
-rw-r--r--TESTING/LIN/cerrlq.f71
-rw-r--r--TESTING/LIN/cerrls.f71
-rw-r--r--TESTING/LIN/cerrpo.f71
-rw-r--r--TESTING/LIN/cerrpox.f77
-rw-r--r--TESTING/LIN/cerrps.f71
-rw-r--r--TESTING/LIN/cerrql.f71
-rw-r--r--TESTING/LIN/cerrqp.f69
-rw-r--r--TESTING/LIN/cerrqr.f71
-rw-r--r--TESTING/LIN/cerrrfp.f69
-rw-r--r--TESTING/LIN/cerrrq.f71
-rw-r--r--TESTING/LIN/cerrsy.f71
-rw-r--r--TESTING/LIN/cerrsyx.f77
-rw-r--r--TESTING/LIN/cerrtr.f69
-rw-r--r--TESTING/LIN/cerrtz.f69
-rw-r--r--TESTING/LIN/cerrvx.f71
-rw-r--r--TESTING/LIN/cerrvxx.f72
-rw-r--r--TESTING/LIN/cgbt01.f185
-rw-r--r--TESTING/LIN/cgbt02.f205
-rw-r--r--TESTING/LIN/cgbt05.f269
-rw-r--r--TESTING/LIN/cgelqs.f174
-rw-r--r--TESTING/LIN/cgennd.f90
-rw-r--r--TESTING/LIN/cgeqls.f176
-rw-r--r--TESTING/LIN/cgeqrs.f174
-rw-r--r--TESTING/LIN/cgerqs.f176
-rw-r--r--TESTING/LIN/cget01.f154
-rw-r--r--TESTING/LIN/cget02.f195
-rw-r--r--TESTING/LIN/cget03.f155
-rw-r--r--TESTING/LIN/cget04.f146
-rw-r--r--TESTING/LIN/cget07.f251
-rw-r--r--TESTING/LIN/cgtt01.f193
-rw-r--r--TESTING/LIN/cgtt02.f180
-rw-r--r--TESTING/LIN/cgtt05.f250
-rw-r--r--TESTING/LIN/chet01.f181
-rw-r--r--TESTING/LIN/chkxer.f66
-rw-r--r--TESTING/LIN/chpt01.f164
-rw-r--r--TESTING/LIN/clahilb.f119
-rw-r--r--TESTING/LIN/claipd.f125
-rw-r--r--TESTING/LIN/claptm.f192
-rw-r--r--TESTING/LIN/clarhs.f334
-rw-r--r--TESTING/LIN/clatb4.f171
-rw-r--r--TESTING/LIN/clatb5.f162
-rw-r--r--TESTING/LIN/clatsp.f123
-rw-r--r--TESTING/LIN/clatsy.f128
-rw-r--r--TESTING/LIN/clattb.f208
-rw-r--r--TESTING/LIN/clattp.f194
-rw-r--r--TESTING/LIN/clattr.f205
-rw-r--r--TESTING/LIN/clavhe.f252
-rw-r--r--TESTING/LIN/clavhp.f237
-rw-r--r--TESTING/LIN/clavsp.f237
-rw-r--r--TESTING/LIN/clavsy.f252
-rw-r--r--TESTING/LIN/clqt01.f182
-rw-r--r--TESTING/LIN/clqt02.f197
-rw-r--r--TESTING/LIN/clqt03.f199
-rw-r--r--TESTING/LIN/cpbt01.f178
-rw-r--r--TESTING/LIN/cpbt02.f192
-rw-r--r--TESTING/LIN/cpbt05.f262
-rw-r--r--TESTING/LIN/cpot01.f154
-rw-r--r--TESTING/LIN/cpot02.f186
-rw-r--r--TESTING/LIN/cpot03.f183
-rw-r--r--TESTING/LIN/cpot05.f253
-rw-r--r--TESTING/LIN/cppt01.f138
-rw-r--r--TESTING/LIN/cppt02.f181
-rw-r--r--TESTING/LIN/cppt03.f158
-rw-r--r--TESTING/LIN/cppt05.f240
-rw-r--r--TESTING/LIN/cpst01.f190
-rw-r--r--TESTING/LIN/cptt01.f130
-rw-r--r--TESTING/LIN/cptt02.f168
-rw-r--r--TESTING/LIN/cptt05.f227
-rw-r--r--TESTING/LIN/cqlt01.f182
-rw-r--r--TESTING/LIN/cqlt02.f199
-rw-r--r--TESTING/LIN/cqlt03.f199
-rw-r--r--TESTING/LIN/cqpt01.f176
-rw-r--r--TESTING/LIN/cqrt01.f182
-rw-r--r--TESTING/LIN/cqrt01p.f182
-rw-r--r--TESTING/LIN/cqrt02.f197
-rw-r--r--TESTING/LIN/cqrt03.f199
-rw-r--r--TESTING/LIN/cqrt04.f97
-rw-r--r--TESTING/LIN/cqrt05.f108
-rw-r--r--TESTING/LIN/cqrt11.f134
-rw-r--r--TESTING/LIN/cqrt12.f135
-rw-r--r--TESTING/LIN/cqrt13.f128
-rw-r--r--TESTING/LIN/cqrt14.f167
-rw-r--r--TESTING/LIN/cqrt15.f215
-rw-r--r--TESTING/LIN/cqrt16.f195
-rw-r--r--TESTING/LIN/cqrt17.f224
-rw-r--r--TESTING/LIN/crqt01.f182
-rw-r--r--TESTING/LIN/crqt02.f199
-rw-r--r--TESTING/LIN/crqt03.f199
-rw-r--r--TESTING/LIN/crzt01.f137
-rw-r--r--TESTING/LIN/crzt02.f125
-rw-r--r--TESTING/LIN/csbmv.f287
-rw-r--r--TESTING/LIN/cspt01.f162
-rw-r--r--TESTING/LIN/cspt02.f181
-rw-r--r--TESTING/LIN/cspt03.f158
-rw-r--r--TESTING/LIN/csyt01.f179
-rw-r--r--TESTING/LIN/csyt02.f186
-rw-r--r--TESTING/LIN/csyt03.f183
-rw-r--r--TESTING/LIN/ctbt02.f241
-rw-r--r--TESTING/LIN/ctbt03.f264
-rw-r--r--TESTING/LIN/ctbt05.f292
-rw-r--r--TESTING/LIN/ctbt06.f187
-rw-r--r--TESTING/LIN/ctpt01.f160
-rw-r--r--TESTING/LIN/ctpt02.f224
-rw-r--r--TESTING/LIN/ctpt03.f238
-rw-r--r--TESTING/LIN/ctpt05.f270
-rw-r--r--TESTING/LIN/ctpt06.f168
-rw-r--r--TESTING/LIN/ctrt01.f185
-rw-r--r--TESTING/LIN/ctrt02.f236
-rw-r--r--TESTING/LIN/ctrt03.f258
-rw-r--r--TESTING/LIN/ctrt05.f281
-rw-r--r--TESTING/LIN/ctrt06.f182
-rw-r--r--TESTING/LIN/ctzt01.f137
-rw-r--r--TESTING/LIN/ctzt02.f125
-rw-r--r--TESTING/LIN/dchkaa.f176
-rw-r--r--TESTING/LIN/dchkab.f122
-rw-r--r--TESTING/LIN/dchkeq.f69
-rw-r--r--TESTING/LIN/dchkgb.f275
-rw-r--r--TESTING/LIN/dchkge.f262
-rw-r--r--TESTING/LIN/dchkgt.f207
-rw-r--r--TESTING/LIN/dchklq.f278
-rw-r--r--TESTING/LIN/dchkpb.f244
-rw-r--r--TESTING/LIN/dchkpo.f244
-rw-r--r--TESTING/LIN/dchkpp.f232
-rw-r--r--TESTING/LIN/dchkps.f217
-rw-r--r--TESTING/LIN/dchkpt.f207
-rw-r--r--TESTING/LIN/dchkq3.f218
-rw-r--r--TESTING/LIN/dchkql.f285
-rw-r--r--TESTING/LIN/dchkqp.f195
-rw-r--r--TESTING/LIN/dchkqr.f285
-rw-r--r--TESTING/LIN/dchkrfp.f86
-rw-r--r--TESTING/LIN/dchkrq.f285
-rw-r--r--TESTING/LIN/dchksp.f232
-rw-r--r--TESTING/LIN/dchksy.f244
-rw-r--r--TESTING/LIN/dchktb.f219
-rw-r--r--TESTING/LIN/dchktp.f223
-rw-r--r--TESTING/LIN/dchktr.f237
-rw-r--r--TESTING/LIN/dchktz.f188
-rw-r--r--TESTING/LIN/ddrvab.f215
-rw-r--r--TESTING/LIN/ddrvac.f203
-rw-r--r--TESTING/LIN/ddrvgb.f243
-rw-r--r--TESTING/LIN/ddrvgbx.f249
-rw-r--r--TESTING/LIN/ddrvge.f230
-rw-r--r--TESTING/LIN/ddrvgex.f236
-rw-r--r--TESTING/LIN/ddrvgt.f187
-rw-r--r--TESTING/LIN/ddrvls.f299
-rw-r--r--TESTING/LIN/ddrvpb.f230
-rw-r--r--TESTING/LIN/ddrvpo.f230
-rw-r--r--TESTING/LIN/ddrvpox.f236
-rw-r--r--TESTING/LIN/ddrvpp.f236
-rw-r--r--TESTING/LIN/ddrvpt.f198
-rw-r--r--TESTING/LIN/ddrvrf1.f131
-rw-r--r--TESTING/LIN/ddrvrf2.f120
-rw-r--r--TESTING/LIN/ddrvrf3.f164
-rw-r--r--TESTING/LIN/ddrvrf4.f168
-rw-r--r--TESTING/LIN/ddrvrfp.f346
-rw-r--r--TESTING/LIN/ddrvsp.f221
-rw-r--r--TESTING/LIN/ddrvsy.f215
-rw-r--r--TESTING/LIN/ddrvsyx.f221
-rw-r--r--TESTING/LIN/debchvxx.f209
-rw-r--r--TESTING/LIN/derrab.f60
-rw-r--r--TESTING/LIN/derrac.f60
-rw-r--r--TESTING/LIN/derrge.f71
-rw-r--r--TESTING/LIN/derrgex.f77
-rw-r--r--TESTING/LIN/derrgt.f71
-rw-r--r--TESTING/LIN/derrlq.f71
-rw-r--r--TESTING/LIN/derrls.f71
-rw-r--r--TESTING/LIN/derrpo.f71
-rw-r--r--TESTING/LIN/derrpox.f77
-rw-r--r--TESTING/LIN/derrps.f71
-rw-r--r--TESTING/LIN/derrql.f71
-rw-r--r--TESTING/LIN/derrqp.f69
-rw-r--r--TESTING/LIN/derrqr.f71
-rw-r--r--TESTING/LIN/derrrfp.f69
-rw-r--r--TESTING/LIN/derrrq.f71
-rw-r--r--TESTING/LIN/derrsy.f71
-rw-r--r--TESTING/LIN/derrsyx.f77
-rw-r--r--TESTING/LIN/derrtr.f71
-rw-r--r--TESTING/LIN/derrtz.f69
-rw-r--r--TESTING/LIN/derrvx.f71
-rw-r--r--TESTING/LIN/derrvxx.f72
-rw-r--r--TESTING/LIN/dgbt01.f185
-rw-r--r--TESTING/LIN/dgbt02.f205
-rw-r--r--TESTING/LIN/dgbt05.f269
-rw-r--r--TESTING/LIN/dgelqs.f174
-rw-r--r--TESTING/LIN/dgennd.f90
-rw-r--r--TESTING/LIN/dgeqls.f176
-rw-r--r--TESTING/LIN/dgeqrs.f174
-rw-r--r--TESTING/LIN/dgerqs.f176
-rw-r--r--TESTING/LIN/dget01.f151
-rw-r--r--TESTING/LIN/dget02.f195
-rw-r--r--TESTING/LIN/dget03.f152
-rw-r--r--TESTING/LIN/dget04.f146
-rw-r--r--TESTING/LIN/dget06.f72
-rw-r--r--TESTING/LIN/dget07.f250
-rw-r--r--TESTING/LIN/dget08.f195
-rw-r--r--TESTING/LIN/dgtt01.f193
-rw-r--r--TESTING/LIN/dgtt02.f180
-rw-r--r--TESTING/LIN/dgtt05.f250
-rw-r--r--TESTING/LIN/dlahilb.f110
-rw-r--r--TESTING/LIN/dlaord.f106
-rw-r--r--TESTING/LIN/dlaptm.f168
-rw-r--r--TESTING/LIN/dlarhs.f324
-rw-r--r--TESTING/LIN/dlatb4.f171
-rw-r--r--TESTING/LIN/dlatb5.f162
-rw-r--r--TESTING/LIN/dlattb.f200
-rw-r--r--TESTING/LIN/dlattp.f186
-rw-r--r--TESTING/LIN/dlattr.f199
-rw-r--r--TESTING/LIN/dlavsp.f198
-rw-r--r--TESTING/LIN/dlavsy.f203
-rw-r--r--TESTING/LIN/dlqt01.f182
-rw-r--r--TESTING/LIN/dlqt02.f197
-rw-r--r--TESTING/LIN/dlqt03.f199
-rw-r--r--TESTING/LIN/dpbt01.f177
-rw-r--r--TESTING/LIN/dpbt02.f192
-rw-r--r--TESTING/LIN/dpbt05.f262
-rw-r--r--TESTING/LIN/dpot01.f149
-rw-r--r--TESTING/LIN/dpot02.f186
-rw-r--r--TESTING/LIN/dpot03.f182
-rw-r--r--TESTING/LIN/dpot05.f252
-rw-r--r--TESTING/LIN/dpot06.f186
-rw-r--r--TESTING/LIN/dppt01.f133
-rw-r--r--TESTING/LIN/dppt02.f180
-rw-r--r--TESTING/LIN/dppt03.f158
-rw-r--r--TESTING/LIN/dppt05.f239
-rw-r--r--TESTING/LIN/dpst01.f187
-rw-r--r--TESTING/LIN/dptt01.f127
-rw-r--r--TESTING/LIN/dptt02.f147
-rw-r--r--TESTING/LIN/dptt05.f227
-rw-r--r--TESTING/LIN/dqlt01.f182
-rw-r--r--TESTING/LIN/dqlt02.f199
-rw-r--r--TESTING/LIN/dqlt03.f199
-rw-r--r--TESTING/LIN/dqpt01.f176
-rw-r--r--TESTING/LIN/dqrt01.f182
-rw-r--r--TESTING/LIN/dqrt01p.f182
-rw-r--r--TESTING/LIN/dqrt02.f197
-rw-r--r--TESTING/LIN/dqrt03.f199
-rw-r--r--TESTING/LIN/dqrt04.f97
-rw-r--r--TESTING/LIN/dqrt05.f108
-rw-r--r--TESTING/LIN/dqrt11.f134
-rw-r--r--TESTING/LIN/dqrt12.f116
-rw-r--r--TESTING/LIN/dqrt13.f128
-rw-r--r--TESTING/LIN/dqrt14.f167
-rw-r--r--TESTING/LIN/dqrt15.f214
-rw-r--r--TESTING/LIN/dqrt16.f195
-rw-r--r--TESTING/LIN/dqrt17.f224
-rw-r--r--TESTING/LIN/drqt01.f182
-rw-r--r--TESTING/LIN/drqt02.f199
-rw-r--r--TESTING/LIN/drqt03.f199
-rw-r--r--TESTING/LIN/drzt01.f137
-rw-r--r--TESTING/LIN/drzt02.f125
-rw-r--r--TESTING/LIN/dspt01.f157
-rw-r--r--TESTING/LIN/dsyt01.f177
-rw-r--r--TESTING/LIN/dtbt02.f231
-rw-r--r--TESTING/LIN/dtbt03.f261
-rw-r--r--TESTING/LIN/dtbt05.f292
-rw-r--r--TESTING/LIN/dtbt06.f186
-rw-r--r--TESTING/LIN/dtpt01.f157
-rw-r--r--TESTING/LIN/dtpt02.f212
-rw-r--r--TESTING/LIN/dtpt03.f236
-rw-r--r--TESTING/LIN/dtpt05.f269
-rw-r--r--TESTING/LIN/dtpt06.f167
-rw-r--r--TESTING/LIN/dtrt01.f182
-rw-r--r--TESTING/LIN/dtrt02.f226
-rw-r--r--TESTING/LIN/dtrt03.f255
-rw-r--r--TESTING/LIN/dtrt05.f280
-rw-r--r--TESTING/LIN/dtrt06.f181
-rw-r--r--TESTING/LIN/dtzt01.f137
-rw-r--r--TESTING/LIN/dtzt02.f125
-rw-r--r--TESTING/LIN/icopy.f98
-rw-r--r--TESTING/LIN/ilaenv.f233
-rw-r--r--TESTING/LIN/schkaa.f176
-rw-r--r--TESTING/LIN/schkeq.f69
-rw-r--r--TESTING/LIN/schkgb.f275
-rw-r--r--TESTING/LIN/schkge.f263
-rw-r--r--TESTING/LIN/schkgt.f207
-rw-r--r--TESTING/LIN/schklq.f278
-rw-r--r--TESTING/LIN/schkpb.f244
-rw-r--r--TESTING/LIN/schkpo.f244
-rw-r--r--TESTING/LIN/schkpp.f232
-rw-r--r--TESTING/LIN/schkps.f217
-rw-r--r--TESTING/LIN/schkpt.f207
-rw-r--r--TESTING/LIN/schkq3.f218
-rw-r--r--TESTING/LIN/schkql.f278
-rw-r--r--TESTING/LIN/schkqp.f195
-rw-r--r--TESTING/LIN/schkqr.f285
-rw-r--r--TESTING/LIN/schkrfp.f85
-rw-r--r--TESTING/LIN/schkrq.f285
-rw-r--r--TESTING/LIN/schksp.f232
-rw-r--r--TESTING/LIN/schksy.f244
-rw-r--r--TESTING/LIN/schktb.f219
-rw-r--r--TESTING/LIN/schktp.f223
-rw-r--r--TESTING/LIN/schktr.f237
-rw-r--r--TESTING/LIN/schktz.f188
-rw-r--r--TESTING/LIN/sdrvgb.f243
-rw-r--r--TESTING/LIN/sdrvgbx.f249
-rw-r--r--TESTING/LIN/sdrvge.f230
-rw-r--r--TESTING/LIN/sdrvgex.f236
-rw-r--r--TESTING/LIN/sdrvgt.f187
-rw-r--r--TESTING/LIN/sdrvls.f299
-rw-r--r--TESTING/LIN/sdrvpb.f230
-rw-r--r--TESTING/LIN/sdrvpo.f230
-rw-r--r--TESTING/LIN/sdrvpox.f236
-rw-r--r--TESTING/LIN/sdrvpp.f236
-rw-r--r--TESTING/LIN/sdrvpt.f198
-rw-r--r--TESTING/LIN/sdrvrf1.f131
-rw-r--r--TESTING/LIN/sdrvrf2.f120
-rw-r--r--TESTING/LIN/sdrvrf3.f164
-rw-r--r--TESTING/LIN/sdrvrf4.f168
-rw-r--r--TESTING/LIN/sdrvrfp.f346
-rw-r--r--TESTING/LIN/sdrvsp.f221
-rw-r--r--TESTING/LIN/sdrvsy.f215
-rw-r--r--TESTING/LIN/sdrvsyx.f221
-rw-r--r--TESTING/LIN/sebchvxx.f209
-rw-r--r--TESTING/LIN/serrge.f71
-rw-r--r--TESTING/LIN/serrgex.f77
-rw-r--r--TESTING/LIN/serrgt.f71
-rw-r--r--TESTING/LIN/serrlq.f71
-rw-r--r--TESTING/LIN/serrls.f71
-rw-r--r--TESTING/LIN/serrpo.f71
-rw-r--r--TESTING/LIN/serrpox.f77
-rw-r--r--TESTING/LIN/serrps.f71
-rw-r--r--TESTING/LIN/serrql.f71
-rw-r--r--TESTING/LIN/serrqp.f69
-rw-r--r--TESTING/LIN/serrqr.f71
-rw-r--r--TESTING/LIN/serrrfp.f69
-rw-r--r--TESTING/LIN/serrrq.f71
-rw-r--r--TESTING/LIN/serrsy.f71
-rw-r--r--TESTING/LIN/serrsyx.f77
-rw-r--r--TESTING/LIN/serrtr.f71
-rw-r--r--TESTING/LIN/serrtz.f69
-rw-r--r--TESTING/LIN/serrvx.f71
-rw-r--r--TESTING/LIN/serrvxx.f72
-rw-r--r--TESTING/LIN/sgbt01.f185
-rw-r--r--TESTING/LIN/sgbt02.f205
-rw-r--r--TESTING/LIN/sgbt05.f269
-rw-r--r--TESTING/LIN/sgelqs.f174
-rw-r--r--TESTING/LIN/sgennd.f90
-rw-r--r--TESTING/LIN/sgeqls.f176
-rw-r--r--TESTING/LIN/sgeqrs.f174
-rw-r--r--TESTING/LIN/sgerqs.f176
-rw-r--r--TESTING/LIN/sget01.f151
-rw-r--r--TESTING/LIN/sget02.f195
-rw-r--r--TESTING/LIN/sget03.f152
-rw-r--r--TESTING/LIN/sget04.f146
-rw-r--r--TESTING/LIN/sget06.f72
-rw-r--r--TESTING/LIN/sget07.f250
-rw-r--r--TESTING/LIN/sgtt01.f193
-rw-r--r--TESTING/LIN/sgtt02.f180
-rw-r--r--TESTING/LIN/sgtt05.f250
-rw-r--r--TESTING/LIN/slahilb.f110
-rw-r--r--TESTING/LIN/slaord.f106
-rw-r--r--TESTING/LIN/slaptm.f168
-rw-r--r--TESTING/LIN/slarhs.f324
-rw-r--r--TESTING/LIN/slatb4.f171
-rw-r--r--TESTING/LIN/slatb5.f162
-rw-r--r--TESTING/LIN/slattb.f200
-rw-r--r--TESTING/LIN/slattp.f186
-rw-r--r--TESTING/LIN/slattr.f199
-rw-r--r--TESTING/LIN/slavsp.f198
-rw-r--r--TESTING/LIN/slavsy.f203
-rw-r--r--TESTING/LIN/slqt01.f182
-rw-r--r--TESTING/LIN/slqt02.f197
-rw-r--r--TESTING/LIN/slqt03.f199
-rw-r--r--TESTING/LIN/spbt01.f177
-rw-r--r--TESTING/LIN/spbt02.f192
-rw-r--r--TESTING/LIN/spbt05.f262
-rw-r--r--TESTING/LIN/spot01.f149
-rw-r--r--TESTING/LIN/spot02.f186
-rw-r--r--TESTING/LIN/spot03.f182
-rw-r--r--TESTING/LIN/spot05.f252
-rw-r--r--TESTING/LIN/sppt01.f133
-rw-r--r--TESTING/LIN/sppt02.f180
-rw-r--r--TESTING/LIN/sppt03.f158
-rw-r--r--TESTING/LIN/sppt05.f239
-rw-r--r--TESTING/LIN/spst01.f187
-rw-r--r--TESTING/LIN/sptt01.f127
-rw-r--r--TESTING/LIN/sptt02.f147
-rw-r--r--TESTING/LIN/sptt05.f227
-rw-r--r--TESTING/LIN/sqlt01.f182
-rw-r--r--TESTING/LIN/sqlt02.f199
-rw-r--r--TESTING/LIN/sqlt03.f199
-rw-r--r--TESTING/LIN/sqpt01.f176
-rw-r--r--TESTING/LIN/sqrt01.f182
-rw-r--r--TESTING/LIN/sqrt01p.f182
-rw-r--r--TESTING/LIN/sqrt02.f197
-rw-r--r--TESTING/LIN/sqrt03.f199
-rw-r--r--TESTING/LIN/sqrt04.f97
-rw-r--r--TESTING/LIN/sqrt05.f108
-rw-r--r--TESTING/LIN/sqrt11.f134
-rw-r--r--TESTING/LIN/sqrt12.f116
-rw-r--r--TESTING/LIN/sqrt13.f128
-rw-r--r--TESTING/LIN/sqrt14.f167
-rw-r--r--TESTING/LIN/sqrt15.f214
-rw-r--r--TESTING/LIN/sqrt16.f195
-rw-r--r--TESTING/LIN/sqrt17.f224
-rw-r--r--TESTING/LIN/srqt01.f182
-rw-r--r--TESTING/LIN/srqt02.f199
-rw-r--r--TESTING/LIN/srqt03.f199
-rw-r--r--TESTING/LIN/srzt01.f137
-rw-r--r--TESTING/LIN/srzt02.f125
-rw-r--r--TESTING/LIN/sspt01.f157
-rw-r--r--TESTING/LIN/ssyt01.f177
-rw-r--r--TESTING/LIN/stbt02.f231
-rw-r--r--TESTING/LIN/stbt03.f261
-rw-r--r--TESTING/LIN/stbt05.f292
-rw-r--r--TESTING/LIN/stbt06.f186
-rw-r--r--TESTING/LIN/stpt01.f157
-rw-r--r--TESTING/LIN/stpt02.f212
-rw-r--r--TESTING/LIN/stpt03.f236
-rw-r--r--TESTING/LIN/stpt05.f269
-rw-r--r--TESTING/LIN/stpt06.f167
-rw-r--r--TESTING/LIN/strt01.f182
-rw-r--r--TESTING/LIN/strt02.f226
-rw-r--r--TESTING/LIN/strt03.f255
-rw-r--r--TESTING/LIN/strt05.f280
-rw-r--r--TESTING/LIN/strt06.f181
-rw-r--r--TESTING/LIN/stzt01.f137
-rw-r--r--TESTING/LIN/stzt02.f125
-rw-r--r--TESTING/LIN/xerbla.f103
-rw-r--r--TESTING/LIN/xlaenv.f118
-rw-r--r--TESTING/LIN/zchkaa.f180
-rw-r--r--TESTING/LIN/zchkab.f122
-rw-r--r--TESTING/LIN/zchkeq.f69
-rw-r--r--TESTING/LIN/zchkgb.f274
-rw-r--r--TESTING/LIN/zchkge.f275
-rw-r--r--TESTING/LIN/zchkgt.f208
-rw-r--r--TESTING/LIN/zchkhe.f245
-rw-r--r--TESTING/LIN/zchkhp.f233
-rw-r--r--TESTING/LIN/zchklq.f278
-rw-r--r--TESTING/LIN/zchkpb.f238
-rw-r--r--TESTING/LIN/zchkpo.f238
-rw-r--r--TESTING/LIN/zchkpp.f226
-rw-r--r--TESTING/LIN/zchkps.f217
-rw-r--r--TESTING/LIN/zchkpt.f208
-rw-r--r--TESTING/LIN/zchkq3.f225
-rw-r--r--TESTING/LIN/zchkql.f278
-rw-r--r--TESTING/LIN/zchkqp.f203
-rw-r--r--TESTING/LIN/zchkqr.f285
-rw-r--r--TESTING/LIN/zchkrfp.f86
-rw-r--r--TESTING/LIN/zchkrq.f285
-rw-r--r--TESTING/LIN/zchksp.f233
-rw-r--r--TESTING/LIN/zchksy.f245
-rw-r--r--TESTING/LIN/zchktb.f212
-rw-r--r--TESTING/LIN/zchktp.f213
-rw-r--r--TESTING/LIN/zchktr.f231
-rw-r--r--TESTING/LIN/zchktz.f195
-rw-r--r--TESTING/LIN/zdrvab.f216
-rw-r--r--TESTING/LIN/zdrvac.f204
-rw-r--r--TESTING/LIN/zdrvgb.f243
-rw-r--r--TESTING/LIN/zdrvgbx.f249
-rw-r--r--TESTING/LIN/zdrvge.f230
-rw-r--r--TESTING/LIN/zdrvgex.f236
-rw-r--r--TESTING/LIN/zdrvgt.f186
-rw-r--r--TESTING/LIN/zdrvhe.f216
-rw-r--r--TESTING/LIN/zdrvhex.f222
-rw-r--r--TESTING/LIN/zdrvhp.f222
-rw-r--r--TESTING/LIN/zdrvls.f307
-rw-r--r--TESTING/LIN/zdrvpb.f223
-rw-r--r--TESTING/LIN/zdrvpo.f223
-rw-r--r--TESTING/LIN/zdrvpox.f229
-rw-r--r--TESTING/LIN/zdrvpp.f223
-rw-r--r--TESTING/LIN/zdrvpt.f197
-rw-r--r--TESTING/LIN/zdrvrf1.f136
-rw-r--r--TESTING/LIN/zdrvrf2.f122
-rw-r--r--TESTING/LIN/zdrvrf3.f165
-rw-r--r--TESTING/LIN/zdrvrf4.f159
-rw-r--r--TESTING/LIN/zdrvrfp.f349
-rw-r--r--TESTING/LIN/zdrvsp.f222
-rw-r--r--TESTING/LIN/zdrvsy.f216
-rw-r--r--TESTING/LIN/zdrvsyx.f222
-rw-r--r--TESTING/LIN/zebchvxx.f213
-rw-r--r--TESTING/LIN/zerrab.f59
-rw-r--r--TESTING/LIN/zerrac.f60
-rw-r--r--TESTING/LIN/zerrge.f71
-rw-r--r--TESTING/LIN/zerrgex.f77
-rw-r--r--TESTING/LIN/zerrgt.f71
-rw-r--r--TESTING/LIN/zerrhe.f71
-rw-r--r--TESTING/LIN/zerrhex.f77
-rw-r--r--TESTING/LIN/zerrlq.f71
-rw-r--r--TESTING/LIN/zerrls.f71
-rw-r--r--TESTING/LIN/zerrpo.f71
-rw-r--r--TESTING/LIN/zerrpox.f77
-rw-r--r--TESTING/LIN/zerrps.f71
-rw-r--r--TESTING/LIN/zerrql.f71
-rw-r--r--TESTING/LIN/zerrqp.f69
-rw-r--r--TESTING/LIN/zerrqr.f71
-rw-r--r--TESTING/LIN/zerrrfp.f70
-rw-r--r--TESTING/LIN/zerrrq.f71
-rw-r--r--TESTING/LIN/zerrsy.f71
-rw-r--r--TESTING/LIN/zerrsyx.f77
-rw-r--r--TESTING/LIN/zerrtr.f69
-rw-r--r--TESTING/LIN/zerrtz.f69
-rw-r--r--TESTING/LIN/zerrvx.f71
-rw-r--r--TESTING/LIN/zerrvxx.f72
-rw-r--r--TESTING/LIN/zgbt01.f185
-rw-r--r--TESTING/LIN/zgbt02.f205
-rw-r--r--TESTING/LIN/zgbt05.f269
-rw-r--r--TESTING/LIN/zgelqs.f174
-rw-r--r--TESTING/LIN/zgennd.f90
-rw-r--r--TESTING/LIN/zgeqls.f176
-rw-r--r--TESTING/LIN/zgeqrs.f174
-rw-r--r--TESTING/LIN/zgerqs.f176
-rw-r--r--TESTING/LIN/zget01.f154
-rw-r--r--TESTING/LIN/zget02.f195
-rw-r--r--TESTING/LIN/zget03.f155
-rw-r--r--TESTING/LIN/zget04.f146
-rw-r--r--TESTING/LIN/zget07.f251
-rw-r--r--TESTING/LIN/zget08.f195
-rw-r--r--TESTING/LIN/zgtt01.f193
-rw-r--r--TESTING/LIN/zgtt02.f180
-rw-r--r--TESTING/LIN/zgtt05.f250
-rw-r--r--TESTING/LIN/zhet01.f181
-rw-r--r--TESTING/LIN/zhpt01.f164
-rw-r--r--TESTING/LIN/zlahilb.f119
-rw-r--r--TESTING/LIN/zlaipd.f125
-rw-r--r--TESTING/LIN/zlaptm.f192
-rw-r--r--TESTING/LIN/zlarhs.f334
-rw-r--r--TESTING/LIN/zlatb4.f171
-rw-r--r--TESTING/LIN/zlatb5.f162
-rw-r--r--TESTING/LIN/zlatsp.f123
-rw-r--r--TESTING/LIN/zlatsy.f128
-rw-r--r--TESTING/LIN/zlattb.f208
-rw-r--r--TESTING/LIN/zlattp.f194
-rw-r--r--TESTING/LIN/zlattr.f205
-rw-r--r--TESTING/LIN/zlavhe.f252
-rw-r--r--TESTING/LIN/zlavhp.f237
-rw-r--r--TESTING/LIN/zlavsp.f237
-rw-r--r--TESTING/LIN/zlavsy.f252
-rw-r--r--TESTING/LIN/zlqt01.f182
-rw-r--r--TESTING/LIN/zlqt02.f197
-rw-r--r--TESTING/LIN/zlqt03.f199
-rw-r--r--TESTING/LIN/zpbt01.f178
-rw-r--r--TESTING/LIN/zpbt02.f192
-rw-r--r--TESTING/LIN/zpbt05.f262
-rw-r--r--TESTING/LIN/zpot01.f154
-rw-r--r--TESTING/LIN/zpot02.f186
-rw-r--r--TESTING/LIN/zpot03.f183
-rw-r--r--TESTING/LIN/zpot05.f253
-rw-r--r--TESTING/LIN/zpot06.f186
-rw-r--r--TESTING/LIN/zppt01.f138
-rw-r--r--TESTING/LIN/zppt02.f181
-rw-r--r--TESTING/LIN/zppt03.f158
-rw-r--r--TESTING/LIN/zppt05.f240
-rw-r--r--TESTING/LIN/zpst01.f190
-rw-r--r--TESTING/LIN/zptt01.f130
-rw-r--r--TESTING/LIN/zptt02.f168
-rw-r--r--TESTING/LIN/zptt05.f227
-rw-r--r--TESTING/LIN/zqlt01.f182
-rw-r--r--TESTING/LIN/zqlt02.f199
-rw-r--r--TESTING/LIN/zqlt03.f199
-rw-r--r--TESTING/LIN/zqpt01.f176
-rw-r--r--TESTING/LIN/zqrt01.f182
-rw-r--r--TESTING/LIN/zqrt01p.f182
-rw-r--r--TESTING/LIN/zqrt02.f197
-rw-r--r--TESTING/LIN/zqrt03.f199
-rw-r--r--TESTING/LIN/zqrt04.f97
-rw-r--r--TESTING/LIN/zqrt05.f108
-rw-r--r--TESTING/LIN/zqrt11.f134
-rw-r--r--TESTING/LIN/zqrt12.f135
-rw-r--r--TESTING/LIN/zqrt13.f128
-rw-r--r--TESTING/LIN/zqrt14.f167
-rw-r--r--TESTING/LIN/zqrt15.f215
-rw-r--r--TESTING/LIN/zqrt16.f195
-rw-r--r--TESTING/LIN/zqrt17.f224
-rw-r--r--TESTING/LIN/zrqt01.f182
-rw-r--r--TESTING/LIN/zrqt02.f199
-rw-r--r--TESTING/LIN/zrqt03.f199
-rw-r--r--TESTING/LIN/zrzt01.f137
-rw-r--r--TESTING/LIN/zrzt02.f125
-rw-r--r--TESTING/LIN/zsbmv.f287
-rw-r--r--TESTING/LIN/zspt01.f162
-rw-r--r--TESTING/LIN/zspt02.f181
-rw-r--r--TESTING/LIN/zspt03.f158
-rw-r--r--TESTING/LIN/zsyt01.f179
-rw-r--r--TESTING/LIN/zsyt02.f186
-rw-r--r--TESTING/LIN/zsyt03.f183
-rw-r--r--TESTING/LIN/ztbt02.f241
-rw-r--r--TESTING/LIN/ztbt03.f264
-rw-r--r--TESTING/LIN/ztbt05.f292
-rw-r--r--TESTING/LIN/ztbt06.f187
-rw-r--r--TESTING/LIN/ztpt01.f160
-rw-r--r--TESTING/LIN/ztpt02.f224
-rw-r--r--TESTING/LIN/ztpt03.f238
-rw-r--r--TESTING/LIN/ztpt05.f270
-rw-r--r--TESTING/LIN/ztpt06.f168
-rw-r--r--TESTING/LIN/ztrt01.f185
-rw-r--r--TESTING/LIN/ztrt02.f236
-rw-r--r--TESTING/LIN/ztrt03.f258
-rw-r--r--TESTING/LIN/ztrt05.f281
-rw-r--r--TESTING/LIN/ztrt06.f182
-rw-r--r--TESTING/LIN/ztzt01.f137
-rw-r--r--TESTING/LIN/ztzt02.f125
-rw-r--r--TESTING/MATGEN/clagge.f165
-rw-r--r--TESTING/MATGEN/claghe.f147
-rw-r--r--TESTING/MATGEN/clagsy.f147
-rw-r--r--TESTING/MATGEN/clahilb.f271
-rw-r--r--TESTING/MATGEN/clakf2.f147
-rw-r--r--TESTING/MATGEN/clarge.f124
-rw-r--r--TESTING/MATGEN/clarnd.f104
-rw-r--r--TESTING/MATGEN/claror.f265
-rw-r--r--TESTING/MATGEN/clarot.f432
-rw-r--r--TESTING/MATGEN/clatm1.f221
-rw-r--r--TESTING/MATGEN/clatm2.f344
-rw-r--r--TESTING/MATGEN/clatm3.f368
-rw-r--r--TESTING/MATGEN/clatm5.f431
-rw-r--r--TESTING/MATGEN/clatm6.f270
-rw-r--r--TESTING/MATGEN/clatme.f498
-rw-r--r--TESTING/MATGEN/clatmr.f859
-rw-r--r--TESTING/MATGEN/clatms.f584
-rw-r--r--TESTING/MATGEN/clatmt.f597
-rw-r--r--TESTING/MATGEN/dlagge.f162
-rw-r--r--TESTING/MATGEN/dlagsy.f144
-rw-r--r--TESTING/MATGEN/dlahilb.f256
-rw-r--r--TESTING/MATGEN/dlakf2.f147
-rw-r--r--TESTING/MATGEN/dlaran.f88
-rw-r--r--TESTING/MATGEN/dlarge.f124
-rw-r--r--TESTING/MATGEN/dlarnd.f100
-rw-r--r--TESTING/MATGEN/dlaror.f240
-rw-r--r--TESTING/MATGEN/dlarot.f424
-rw-r--r--TESTING/MATGEN/dlatm1.f217
-rw-r--r--TESTING/MATGEN/dlatm2.f336
-rw-r--r--TESTING/MATGEN/dlatm3.f362
-rw-r--r--TESTING/MATGEN/dlatm5.f431
-rw-r--r--TESTING/MATGEN/dlatm6.f272
-rw-r--r--TESTING/MATGEN/dlatm7.f220
-rw-r--r--TESTING/MATGEN/dlatme.f558
-rw-r--r--TESTING/MATGEN/dlatmr.f822
-rw-r--r--TESTING/MATGEN/dlatms.f563
-rw-r--r--TESTING/MATGEN/dlatmt.f582
-rw-r--r--TESTING/MATGEN/slagge.f162
-rw-r--r--TESTING/MATGEN/slagsy.f144
-rw-r--r--TESTING/MATGEN/slahilb.f256
-rw-r--r--TESTING/MATGEN/slakf2.f147
-rw-r--r--TESTING/MATGEN/slaran.f88
-rw-r--r--TESTING/MATGEN/slarge.f124
-rw-r--r--TESTING/MATGEN/slarnd.f100
-rw-r--r--TESTING/MATGEN/slaror.f240
-rw-r--r--TESTING/MATGEN/slarot.f424
-rw-r--r--TESTING/MATGEN/slatm1.f217
-rw-r--r--TESTING/MATGEN/slatm2.f336
-rw-r--r--TESTING/MATGEN/slatm3.f362
-rw-r--r--TESTING/MATGEN/slatm5.f431
-rw-r--r--TESTING/MATGEN/slatm6.f272
-rw-r--r--TESTING/MATGEN/slatm7.f220
-rw-r--r--TESTING/MATGEN/slatme.f558
-rw-r--r--TESTING/MATGEN/slatmr.f822
-rw-r--r--TESTING/MATGEN/slatms.f563
-rw-r--r--TESTING/MATGEN/slatmt.f582
-rw-r--r--TESTING/MATGEN/zlagge.f165
-rw-r--r--TESTING/MATGEN/zlaghe.f147
-rw-r--r--TESTING/MATGEN/zlagsy.f147
-rw-r--r--TESTING/MATGEN/zlahilb.f271
-rw-r--r--TESTING/MATGEN/zlakf2.f147
-rw-r--r--TESTING/MATGEN/zlarge.f124
-rw-r--r--TESTING/MATGEN/zlarnd.f104
-rw-r--r--TESTING/MATGEN/zlaror.f263
-rw-r--r--TESTING/MATGEN/zlarot.f432
-rw-r--r--TESTING/MATGEN/zlatm1.f221
-rw-r--r--TESTING/MATGEN/zlatm2.f342
-rw-r--r--TESTING/MATGEN/zlatm3.f368
-rw-r--r--TESTING/MATGEN/zlatm5.f431
-rw-r--r--TESTING/MATGEN/zlatm6.f268
-rw-r--r--TESTING/MATGEN/zlatme.f498
-rw-r--r--TESTING/MATGEN/zlatmr.f859
-rw-r--r--TESTING/MATGEN/zlatms.f584
-rw-r--r--TESTING/MATGEN/zlatmt.f597
2942 files changed, 474766 insertions, 250370 deletions
diff --git a/BLAS/SRC/caxpy.f b/BLAS/SRC/caxpy.f
index c0bb7661..3e274e5b 100644
--- a/BLAS/SRC/caxpy.f
+++ b/BLAS/SRC/caxpy.f
@@ -1,22 +1,71 @@
- SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
-* .. Scalar Arguments ..
- COMPLEX CA
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*),CY(*)
-* ..
+*> \brief \b CAXPY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX CA
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*),CY(*)
+* ..
+*
* Purpose
* =======
*
-* CAXPY constant times a vector plus a vector.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CAXPY constant times a vector plus a vector.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CAXPY(N,CA,CX,INCX,CY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ COMPLEX CA
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*),CY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ccopy.f b/BLAS/SRC/ccopy.f
index 87446f7b..039a8be8 100644
--- a/BLAS/SRC/ccopy.f
+++ b/BLAS/SRC/ccopy.f
@@ -1,21 +1,69 @@
- SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*),CY(*)
-* ..
+*> \brief \b CCOPY
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*),CY(*)
+* ..
+*
* Purpose
* =======
*
-* CCOPY copies a vector x to a vector y.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCOPY copies a vector x to a vector y.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CCOPY(N,CX,INCX,CY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*),CY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cdotc.f b/BLAS/SRC/cdotc.f
index 025d1636..6903726d 100644
--- a/BLAS/SRC/cdotc.f
+++ b/BLAS/SRC/cdotc.f
@@ -1,22 +1,70 @@
- COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*),CY(*)
-* ..
+*> \brief \b CDOTC
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*),CY(*)
+* ..
+*
* Purpose
* =======
*
-* forms the dot product of two vectors, conjugating the first
-* vector.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> forms the dot product of two vectors, conjugating the first
+*> vector.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ COMPLEX FUNCTION CDOTC(N,CX,INCX,CY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*),CY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cdotu.f b/BLAS/SRC/cdotu.f
index d31c16f0..00bc019b 100644
--- a/BLAS/SRC/cdotu.f
+++ b/BLAS/SRC/cdotu.f
@@ -1,21 +1,69 @@
- COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*),CY(*)
-* ..
+*> \brief \b CDOTU
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*),CY(*)
+* ..
+*
* Purpose
* =======
*
-* CDOTU forms the dot product of two vectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDOTU forms the dot product of two vectors.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ COMPLEX FUNCTION CDOTU(N,CX,INCX,CY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*),CY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cgbmv.f b/BLAS/SRC/cgbmv.f
index 6392e1d8..aa8d9d8c 100644
--- a/BLAS/SRC/cgbmv.f
+++ b/BLAS/SRC/cgbmv.f
@@ -1,134 +1,213 @@
- SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER INCX,INCY,KL,KU,LDA,M,N
- CHARACTER TRANS
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b CGBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER INCX,INCY,KL,KU,LDA,M,N
+* CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CGBMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBMV performs one of the matrix-vector operations
+*>
+*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
+*>
+*> y := alpha*A**H*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n band matrix, with kl sub-diagonals and ku super-diagonals.
+*>
+*>\endverbatim
*
-* y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> On entry, KL specifies the number of sub-diagonals of the
+*> matrix A. KL must satisfy 0 .le. KL.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> On entry, KU specifies the number of super-diagonals of the
+*> matrix A. KU must satisfy 0 .le. KU.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry, the leading ( kl + ku + 1 ) by n part of the
+*> array A must contain the matrix of coefficients, supplied
+*> column by column, with the leading diagonal of the matrix in
+*> row ( ku + 1 ) of the array, the first super-diagonal
+*> starting at position 2 in row ku, the first sub-diagonal
+*> starting at position 1 in row ( ku + 2 ), and so on.
+*> Elements in the array A that do not correspond to elements
+*> in the band matrix (such as the top left ku by ku triangle)
+*> are not referenced.
+*> The following program segment will transfer a band matrix
+*> from conventional full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> K = KU + 1 - J
+*> DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
+*> A( K + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( kl + ku + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A**H*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n band matrix, with kl sub-diagonals and ku super-diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
-*
-* TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
-*
-* TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* KL - INTEGER.
-* On entry, KL specifies the number of sub-diagonals of the
-* matrix A. KL must satisfy 0 .le. KL.
-* Unchanged on exit.
-*
-* KU - INTEGER.
-* On entry, KU specifies the number of super-diagonals of the
-* matrix A. KU must satisfy 0 .le. KU.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry, the leading ( kl + ku + 1 ) by n part of the
-* array A must contain the matrix of coefficients, supplied
-* column by column, with the leading diagonal of the matrix in
-* row ( ku + 1 ) of the array, the first super-diagonal
-* starting at position 2 in row ku, the first sub-diagonal
-* starting at position 1 in row ( ku + 2 ), and so on.
-* Elements in the array A that do not correspond to elements
-* in the band matrix (such as the top left ku by ku triangle)
-* are not referenced.
-* The following program segment will transfer a band matrix
-* from conventional full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* K = KU + 1 - J
-* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
-* A( K + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( kl + ku + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER INCX,INCY,KL,KU,LDA,M,N
+ CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cgemm.f b/BLAS/SRC/cgemm.f
index 24548db1..daf642d0 100644
--- a/BLAS/SRC/cgemm.f
+++ b/BLAS/SRC/cgemm.f
@@ -1,133 +1,215 @@
- SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER K,LDA,LDB,LDC,M,N
- CHARACTER TRANSA,TRANSB
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b CGEMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER K,LDA,LDB,LDC,M,N
+* CHARACTER TRANSA,TRANSB
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* CGEMM performs one of the matrix-matrix operations
-*
-* C := alpha*op( A )*op( B ) + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*op( A )*op( B ) + beta*C,
+*>
+*> where op( X ) is one of
+*>
+*> op( X ) = X or op( X ) = X**T or op( X ) = X**H,
+*>
+*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
+*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+*>
+*>\endverbatim
*
-* where op( X ) is one of
+* Arguments
+* =========
+*
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n', op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't', op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c', op( A ) = A**H.
+*> \endverbatim
+*>
+*> \param[in] TRANSB
+*> \verbatim
+*> TRANSB is CHARACTER*1
+*> On entry, TRANSB specifies the form of op( B ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'N' or 'n', op( B ) = B.
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'T' or 't', op( B ) = B**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'C' or 'c', op( B ) = B**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix
+*> op( A ) and of the matrix C. M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix
+*> op( B ) and the number of columns of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry, K specifies the number of columns of the matrix
+*> op( A ) and the number of rows of the matrix op( B ). K must
+*> be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANSA = 'N' or 'n', and is m otherwise.
+*> Before entry with TRANSA = 'N' or 'n', the leading m by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by m part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANSA = 'N' or 'n' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is
+*> n when TRANSB = 'N' or 'n', and is k otherwise.
+*> Before entry with TRANSB = 'N' or 'n', the leading k by n
+*> part of the array B must contain the matrix B, otherwise
+*> the leading n by k part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANSB = 'N' or 'n' then
+*> LDB must be at least max( 1, k ), otherwise LDB must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n matrix
+*> ( alpha*op( A )*op( B ) + beta*C ).
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* op( X ) = X or op( X ) = X**T or op( X ) = X**H,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* alpha and beta are scalars, and A, B and C are matrices, with op( A )
-* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level3
*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n', op( A ) = A.
-*
-* TRANSA = 'T' or 't', op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c', op( A ) = A**H.
-*
-* Unchanged on exit.
-*
-* TRANSB - CHARACTER*1.
-* On entry, TRANSB specifies the form of op( B ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSB = 'N' or 'n', op( B ) = B.
-*
-* TRANSB = 'T' or 't', op( B ) = B**T.
-*
-* TRANSB = 'C' or 'c', op( B ) = B**H.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix
-* op( A ) and of the matrix C. M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix
-* op( B ) and the number of columns of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry, K specifies the number of columns of the matrix
-* op( A ) and the number of rows of the matrix op( B ). K must
-* be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANSA = 'N' or 'n', and is m otherwise.
-* Before entry with TRANSA = 'N' or 'n', the leading m by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by m part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANSA = 'N' or 'n' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, k ).
-* Unchanged on exit.
-*
-* B - COMPLEX array of DIMENSION ( LDB, kb ), where kb is
-* n when TRANSB = 'N' or 'n', and is k otherwise.
-* Before entry with TRANSB = 'N' or 'n', the leading k by n
-* part of the array B must contain the matrix B, otherwise
-* the leading n by k part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANSB = 'N' or 'n' then
-* LDB must be at least max( 1, k ), otherwise LDB must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - COMPLEX array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n matrix
-* ( alpha*op( A )*op( B ) + beta*C ).
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER K,LDA,LDB,LDC,M,N
+ CHARACTER TRANSA,TRANSB
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cgemv.f b/BLAS/SRC/cgemv.f
index d9e55f9a..a341b454 100644
--- a/BLAS/SRC/cgemv.f
+++ b/BLAS/SRC/cgemv.f
@@ -1,107 +1,183 @@
- SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER INCX,INCY,LDA,M,N
- CHARACTER TRANS
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b CGEMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER INCX,INCY,LDA,M,N
+* CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CGEMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEMV performs one of the matrix-vector operations
+*>
+*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
+*>
+*> y := alpha*A**H*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*>\endverbatim
*
-* y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A**H*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
-*
-* TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
-*
-* TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X - COMPLEX array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER INCX,INCY,LDA,M,N
+ CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cgerc.f b/BLAS/SRC/cgerc.f
index ffc578a1..d6539b01 100644
--- a/BLAS/SRC/cgerc.f
+++ b/BLAS/SRC/cgerc.f
@@ -1,82 +1,151 @@
- SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- COMPLEX ALPHA
- INTEGER INCX,INCY,LDA,M,N
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b CGERC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA
+* INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CGERC performs the rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGERC performs the rank 1 operation
+*>
+*> A := alpha*x*y**H + A,
+*>
+*> where alpha is a scalar, x is an m element vector, y is an n element
+*> vector and A is an m by n matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the m
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients. On exit, A is
+*> overwritten by the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x is an m element vector, y is an n element
-* vector and A is an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( m - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the m
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients. On exit, A is
-* overwritten by the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA
+ INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cgeru.f b/BLAS/SRC/cgeru.f
index 712aba2a..0db12d7b 100644
--- a/BLAS/SRC/cgeru.f
+++ b/BLAS/SRC/cgeru.f
@@ -1,82 +1,151 @@
- SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- COMPLEX ALPHA
- INTEGER INCX,INCY,LDA,M,N
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b CGERU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA
+* INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CGERU performs the rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGERU performs the rank 1 operation
+*>
+*> A := alpha*x*y**T + A,
+*>
+*> where alpha is a scalar, x is an m element vector, y is an n element
+*> vector and A is an m by n matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the m
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients. On exit, A is
+*> overwritten by the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x is an m element vector, y is an n element
-* vector and A is an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( m - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the m
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients. On exit, A is
-* overwritten by the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA
+ INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/chbmv.f b/BLAS/SRC/chbmv.f
index e7bacae5..bd3b69c5 100644
--- a/BLAS/SRC/chbmv.f
+++ b/BLAS/SRC/chbmv.f
@@ -1,136 +1,215 @@
- SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER INCX,INCY,K,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b CHBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER INCX,INCY,K,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CHBMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n hermitian band matrix, with k super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the band matrix A is being supplied as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> being supplied.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry, K specifies the number of super-diagonals of the
+*> matrix A. K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the hermitian matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer the upper
+*> triangular part of a hermitian band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the hermitian matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer the lower
+*> triangular part of a hermitian band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n hermitian band matrix, with k super-diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the band matrix A is being supplied as
-* follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* being supplied.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* being supplied.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry, K specifies the number of super-diagonals of the
-* matrix A. K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the hermitian matrix, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer the upper
-* triangular part of a hermitian band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the hermitian matrix, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer the lower
-* triangular part of a hermitian band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER INCX,INCY,K,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/chemm.f b/BLAS/SRC/chemm.f
index f5cb17a5..9947cb28 100644
--- a/BLAS/SRC/chemm.f
+++ b/BLAS/SRC/chemm.f
@@ -1,139 +1,217 @@
- SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER LDA,LDB,LDC,M,N
- CHARACTER SIDE,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b CHEMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER LDA,LDB,LDC,M,N
+* CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* CHEMM performs one of the matrix-matrix operations
-*
-* C := alpha*A*B + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*A*B + beta*C,
+*>
+*> or
+*>
+*> C := alpha*B*A + beta*C,
+*>
+*> where alpha and beta are scalars, A is an hermitian matrix and B and
+*> C are m by n matrices.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether the hermitian matrix A
+*> appears on the left or right in the operation as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the hermitian matrix A is to be
+*> referenced as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of the
+*> hermitian matrix is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of the
+*> hermitian matrix is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix C.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix C.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*> m when SIDE = 'L' or 'l' and is n otherwise.
+*> Before entry with SIDE = 'L' or 'l', the m by m part of
+*> the array A must contain the hermitian matrix, such that
+*> when UPLO = 'U' or 'u', the leading m by m upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the hermitian matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading m by m lower triangular part of the array A
+*> must contain the lower triangular part of the hermitian
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> Before entry with SIDE = 'R' or 'r', the n by n part of
+*> the array A must contain the hermitian matrix, such that
+*> when UPLO = 'U' or 'u', the leading n by n upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the hermitian matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading n by n lower triangular part of the array A
+*> must contain the lower triangular part of the hermitian
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*B*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, A is an hermitian matrix and B and
-* C are m by n matrices.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level3
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether the hermitian matrix A
-* appears on the left or right in the operation as follows:
-*
-* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
-*
-* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the hermitian matrix A is to be
-* referenced as follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of the
-* hermitian matrix is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of the
-* hermitian matrix is to be referenced.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix C.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix C.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
-* m when SIDE = 'L' or 'l' and is n otherwise.
-* Before entry with SIDE = 'L' or 'l', the m by m part of
-* the array A must contain the hermitian matrix, such that
-* when UPLO = 'U' or 'u', the leading m by m upper triangular
-* part of the array A must contain the upper triangular part
-* of the hermitian matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading m by m lower triangular part of the array A
-* must contain the lower triangular part of the hermitian
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Before entry with SIDE = 'R' or 'r', the n by n part of
-* the array A must contain the hermitian matrix, such that
-* when UPLO = 'U' or 'u', the leading n by n upper triangular
-* part of the array A must contain the upper triangular part
-* of the hermitian matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading n by n lower triangular part of the array A
-* must contain the lower triangular part of the hermitian
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* B - COMPLEX array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - COMPLEX array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n updated
-* matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER LDA,LDB,LDC,M,N
+ CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/chemv.f b/BLAS/SRC/chemv.f
index 3ddca361..85de0631 100644
--- a/BLAS/SRC/chemv.f
+++ b/BLAS/SRC/chemv.f
@@ -1,105 +1,178 @@
- SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER INCX,INCY,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b CHEMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER INCX,INCY,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CHEMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n hermitian matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of A is not referenced.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n hermitian matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of A is not referenced.
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER INCX,INCY,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cher.f b/BLAS/SRC/cher.f
index b8d5ac01..b7ccc0b6 100644
--- a/BLAS/SRC/cher.f
+++ b/BLAS/SRC/cher.f
@@ -1,92 +1,157 @@
- SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER INCX,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*)
-* ..
+*> \brief \b CHER
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER INCX,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* CHER performs the hermitian rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHER performs the hermitian rank 1 operation
+*>
+*> A := alpha*x*x**H + A,
+*>
+*> where alpha is a real scalar, x is an n element vector and A is an
+*> n by n hermitian matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*> \verbatim
+*> X COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*x**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a real scalar, x is an n element vector and A is an
-* n by n hermitian matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHER(UPLO,N,ALPHA,X,INCX,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER INCX,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cher2.f b/BLAS/SRC/cher2.f
index 3cc1a7d0..ee6e3a44 100644
--- a/BLAS/SRC/cher2.f
+++ b/BLAS/SRC/cher2.f
@@ -1,103 +1,170 @@
- SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- COMPLEX ALPHA
- INTEGER INCX,INCY,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b CHER2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA
+* INTEGER INCX,INCY,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CHER2 performs the hermitian rank 2 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHER2 performs the hermitian rank 2 operation
+*>
+*> A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
+*>
+*> where alpha is a scalar, x and y are n element vectors and A is an n
+*> by n hermitian matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*> \verbatim
+*> X COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*> \verbatim
+*> Y COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x and y are n element vectors and A is an n
-* by n hermitian matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA
+ INTEGER INCX,INCY,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cher2k.f b/BLAS/SRC/cher2k.f
index 368c1878..3a386fc8 100644
--- a/BLAS/SRC/cher2k.f
+++ b/BLAS/SRC/cher2k.f
@@ -1,145 +1,224 @@
- SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX ALPHA
- REAL BETA
- INTEGER K,LDA,LDB,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b CHER2K
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA
+* REAL BETA
+* INTEGER K,LDA,LDB,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* CHER2K performs one of the hermitian rank 2k operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHER2K performs one of the hermitian rank 2k operations
+*>
+*> C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C,
+*>
+*> where alpha and beta are scalars with beta real, C is an n by n
+*> hermitian matrix and A and B are n by k matrices in the first case
+*> and k by n matrices in the second case.
+*>
+*>\endverbatim
*
-* C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C,
-*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*B**H +
+*> conjg( alpha )*B*A**H +
+*> beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**H*B +
+*> conjg( alpha )*B**H*A +
+*> beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrices A and B, and on entry with
+*> TRANS = 'C' or 'c', K specifies the number of rows of the
+*> matrices A and B. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array B must contain the matrix B, otherwise
+*> the leading k by n part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDB must be at least max( 1, n ), otherwise LDB must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars with beta real, C is an n by n
-* hermitian matrix and A and B are n by k matrices in the first case
-* and k by n matrices in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*B**H +
-* conjg( alpha )*B*A**H +
-* beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**H*B +
-* conjg( alpha )*B**H*A +
-* beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrices A and B, and on entry with
-* TRANS = 'C' or 'c', K specifies the number of rows of the
-* matrices A and B. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* B - COMPLEX array of DIMENSION ( LDB, kb ), where kb is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array B must contain the matrix B, otherwise
-* the leading k by n part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDB must be at least max( 1, n ), otherwise LDB must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - COMPLEX array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
+*> Ed Anderson, Cray Research Inc.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
-*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
-* Ed Anderson, Cray Research Inc.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA
+ REAL BETA
+ INTEGER K,LDA,LDB,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cherk.f b/BLAS/SRC/cherk.f
index b2c1d556..66913b6e 100644
--- a/BLAS/SRC/cherk.f
+++ b/BLAS/SRC/cherk.f
@@ -1,125 +1,199 @@
- SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER K,LDA,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),C(LDC,*)
-* ..
+*> \brief \b CHERK
+*
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER K,LDA,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* CHERK performs one of the hermitian rank k operations
-*
-* C := alpha*A*A**H + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHERK performs one of the hermitian rank k operations
+*>
+*> C := alpha*A*A**H + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**H*A + beta*C,
+*>
+*> where alpha and beta are real scalars, C is an n by n hermitian
+*> matrix and A is an n by k matrix in the first case and a k by n
+*> matrix in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with
+*> TRANS = 'C' or 'c', K specifies the number of rows of the
+*> matrix A. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**H*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are real scalars, C is an n by n hermitian
-* matrix and A is an n by k matrix in the first case and a k by n
-* matrix in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with
-* TRANS = 'C' or 'c', K specifies the number of rows of the
-* matrix A. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - COMPLEX array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
+*> Ed Anderson, Cray Research Inc.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
-* Level 3 Blas routine.
-*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Modified 8-Nov-93 to set C(J,J) to REAL( C(J,J) ) when BETA = 1.
-* Ed Anderson, Cray Research Inc.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER K,LDA,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/chpmv.f b/BLAS/SRC/chpmv.f
index 264bdb24..857293aa 100644
--- a/BLAS/SRC/chpmv.f
+++ b/BLAS/SRC/chpmv.f
@@ -1,102 +1,173 @@
- SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER INCX,INCY,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX AP(*),X(*),Y(*)
-* ..
+*> \brief \b CHPMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER INCX,INCY,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX AP(*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CHPMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n hermitian matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n hermitian matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AP - COMPLEX array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on.
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER INCX,INCY,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX AP(*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/chpr.f b/BLAS/SRC/chpr.f
index 747b74af..1cdcf62f 100644
--- a/BLAS/SRC/chpr.f
+++ b/BLAS/SRC/chpr.f
@@ -1,89 +1,154 @@
- SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER INCX,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX AP(*),X(*)
-* ..
+*> \brief \b CHPR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER INCX,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX AP(*),X(*)
+* ..
+*
* Purpose
* =======
*
-* CHPR performs the hermitian rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPR performs the hermitian rank 1 operation
+*>
+*> A := alpha*x*x**H + A,
+*>
+*> where alpha is a real scalar, x is an n element vector and A is an
+*> n by n hermitian matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*x**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a real scalar, x is an n element vector and A is an
-* n by n hermitian matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* AP - COMPLEX array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHPR(UPLO,N,ALPHA,X,INCX,AP)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER INCX,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/chpr2.f b/BLAS/SRC/chpr2.f
index 71734cee..2a44bb95 100644
--- a/BLAS/SRC/chpr2.f
+++ b/BLAS/SRC/chpr2.f
@@ -1,100 +1,167 @@
- SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
-* .. Scalar Arguments ..
- COMPLEX ALPHA
- INTEGER INCX,INCY,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX AP(*),X(*),Y(*)
-* ..
+*> \brief \b CHPR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA
+* INTEGER INCX,INCY,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX AP(*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* CHPR2 performs the hermitian rank 2 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPR2 performs the hermitian rank 2 operation
+*>
+*> A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
+*>
+*> where alpha is a scalar, x and y are n element vectors and A is an
+*> n by n hermitian matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*> \verbatim
+*> Y COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x and y are n element vectors and A is an
-* n by n hermitian matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* AP - COMPLEX array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA
+ INTEGER INCX,INCY,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX AP(*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/crotg.f b/BLAS/SRC/crotg.f
index 360028cc..f4800229 100644
--- a/BLAS/SRC/crotg.f
+++ b/BLAS/SRC/crotg.f
@@ -1,14 +1,55 @@
+*> \brief \b CROTG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CROTG(CA,CB,C,S)
+*
+* .. Scalar Arguments ..
+* COMPLEX CA,CB,S
+* REAL C
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CROTG determines a complex Givens rotation.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
+* =====================================================================
SUBROUTINE CROTG(CA,CB,C,S)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
* .. Scalar Arguments ..
COMPLEX CA,CB,S
REAL C
* ..
*
-* Purpose
-* =======
-*
-* CROTG determines a complex Givens rotation.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/BLAS/SRC/cscal.f b/BLAS/SRC/cscal.f
index ce1ae155..0e2dc6a1 100644
--- a/BLAS/SRC/cscal.f
+++ b/BLAS/SRC/cscal.f
@@ -1,23 +1,72 @@
- SUBROUTINE CSCAL(N,CA,CX,INCX)
-* .. Scalar Arguments ..
- COMPLEX CA
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*)
-* ..
+*> \brief \b CSCAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CSCAL(N,CA,CX,INCX)
+*
+* .. Scalar Arguments ..
+* COMPLEX CA
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*)
+* ..
+*
* Purpose
* =======
*
-* CSCAL scales a vector by a constant.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSCAL scales a vector by a constant.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CSCAL(N,CA,CX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ COMPLEX CA
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/csrot.f b/BLAS/SRC/csrot.f
index 4178079a..02a7a38c 100644
--- a/BLAS/SRC/csrot.f
+++ b/BLAS/SRC/csrot.f
@@ -1,5 +1,110 @@
+*> \brief \b CSROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSROT( N, CX, INCX, CY, INCY, C, S )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* REAL C, S
+* ..
+* .. Array Arguments ..
+* COMPLEX CX( * ), CY( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSROT applies a plane rotation, where the cos and sin (c and s) are real
+*> and the vectors cx and cy are complex.
+*> jack dongarra, linpack, 3/11/78.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the vectors cx and cy.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*> CX is COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array CX must contain the n
+*> element vector cx. On exit, CX is overwritten by the updated
+*> vector cx.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> CX. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*> CY is COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array CY must contain the n
+*> element vector cy. On exit, CY is overwritten by the updated
+*> vector cy.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> CY. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL
+*> On entry, C specifies the cosine, cos.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL
+*> On entry, S specifies the sine, sin.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
+* =====================================================================
SUBROUTINE CSROT( N, CX, INCX, CY, INCY, C, S )
*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
REAL C, S
@@ -8,51 +113,6 @@
COMPLEX CX( * ), CY( * )
* ..
*
-* Purpose
-* =======
-*
-* CSROT applies a plane rotation, where the cos and sin (c and s) are real
-* and the vectors cx and cy are complex.
-* jack dongarra, linpack, 3/11/78.
-*
-* Arguments
-* ==========
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the vectors cx and cy.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* CX (input) COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array CX must contain the n
-* element vector cx. On exit, CX is overwritten by the updated
-* vector cx.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* CX. INCX must not be zero.
-* Unchanged on exit.
-*
-* CY (input) COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array CY must contain the n
-* element vector cy. On exit, CY is overwritten by the updated
-* vector cy.
-*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* CY. INCY must not be zero.
-* Unchanged on exit.
-*
-* C (input) REAL
-* On entry, C specifies the cosine, cos.
-* Unchanged on exit.
-*
-* S (input) REAL
-* On entry, S specifies the sine, sin.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/BLAS/SRC/csscal.f b/BLAS/SRC/csscal.f
index 8ec2eade..2af05c22 100644
--- a/BLAS/SRC/csscal.f
+++ b/BLAS/SRC/csscal.f
@@ -1,23 +1,72 @@
- SUBROUTINE CSSCAL(N,SA,CX,INCX)
-* .. Scalar Arguments ..
- REAL SA
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*)
-* ..
+*> \brief \b CSSCAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CSSCAL(N,SA,CX,INCX)
+*
+* .. Scalar Arguments ..
+* REAL SA
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*)
+* ..
+*
* Purpose
* =======
*
-* CSSCAL scales a complex vector by a real constant.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSSCAL scales a complex vector by a real constant.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CSSCAL(N,SA,CX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ REAL SA
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/cswap.f b/BLAS/SRC/cswap.f
index 1e267179..12a6f193 100644
--- a/BLAS/SRC/cswap.f
+++ b/BLAS/SRC/cswap.f
@@ -1,21 +1,69 @@
- SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*),CY(*)
-* ..
+*> \brief \b CSWAP
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*),CY(*)
+* ..
+*
* Purpose
* =======
*
-* CSWAP interchanges two vectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSWAP interchanges two vectors.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CSWAP(N,CX,INCX,CY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*),CY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/csymm.f b/BLAS/SRC/csymm.f
index c925a778..326dcf0d 100644
--- a/BLAS/SRC/csymm.f
+++ b/BLAS/SRC/csymm.f
@@ -1,137 +1,215 @@
- SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER LDA,LDB,LDC,M,N
- CHARACTER SIDE,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b CSYMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER LDA,LDB,LDC,M,N
+* CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* CSYMM performs one of the matrix-matrix operations
-*
-* C := alpha*A*B + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*A*B + beta*C,
+*>
+*> or
+*>
+*> C := alpha*B*A + beta*C,
+*>
+*> where alpha and beta are scalars, A is a symmetric matrix and B and
+*> C are m by n matrices.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether the symmetric matrix A
+*> appears on the left or right in the operation as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the symmetric matrix A is to be
+*> referenced as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of the
+*> symmetric matrix is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of the
+*> symmetric matrix is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix C.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix C.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*> m when SIDE = 'L' or 'l' and is n otherwise.
+*> Before entry with SIDE = 'L' or 'l', the m by m part of
+*> the array A must contain the symmetric matrix, such that
+*> when UPLO = 'U' or 'u', the leading m by m upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the symmetric matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading m by m lower triangular part of the array A
+*> must contain the lower triangular part of the symmetric
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> Before entry with SIDE = 'R' or 'r', the n by n part of
+*> the array A must contain the symmetric matrix, such that
+*> when UPLO = 'U' or 'u', the leading n by n upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the symmetric matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading n by n lower triangular part of the array A
+*> must contain the lower triangular part of the symmetric
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*B*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, A is a symmetric matrix and B and
-* C are m by n matrices.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level3
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether the symmetric matrix A
-* appears on the left or right in the operation as follows:
-*
-* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
-*
-* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the symmetric matrix A is to be
-* referenced as follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of the
-* symmetric matrix is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of the
-* symmetric matrix is to be referenced.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix C.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix C.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
-* m when SIDE = 'L' or 'l' and is n otherwise.
-* Before entry with SIDE = 'L' or 'l', the m by m part of
-* the array A must contain the symmetric matrix, such that
-* when UPLO = 'U' or 'u', the leading m by m upper triangular
-* part of the array A must contain the upper triangular part
-* of the symmetric matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading m by m lower triangular part of the array A
-* must contain the lower triangular part of the symmetric
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Before entry with SIDE = 'R' or 'r', the n by n part of
-* the array A must contain the symmetric matrix, such that
-* when UPLO = 'U' or 'u', the leading n by n upper triangular
-* part of the array A must contain the upper triangular part
-* of the symmetric matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading n by n lower triangular part of the array A
-* must contain the lower triangular part of the symmetric
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* B - COMPLEX array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - COMPLEX array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n updated
-* matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER LDA,LDB,LDC,M,N
+ CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/csyr2k.f b/BLAS/SRC/csyr2k.f
index ed1a56cd..0b424b45 100644
--- a/BLAS/SRC/csyr2k.f
+++ b/BLAS/SRC/csyr2k.f
@@ -1,136 +1,212 @@
- SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER K,LDA,LDB,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b CSYR2K
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER K,LDA,LDB,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* CSYR2K performs one of the symmetric rank 2k operations
-*
-* C := alpha*A*B**T + alpha*B*A**T + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYR2K performs one of the symmetric rank 2k operations
+*>
+*> C := alpha*A*B**T + alpha*B*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*B + alpha*B**T*A + beta*C,
+*>
+*> where alpha and beta are scalars, C is an n by n symmetric matrix
+*> and A and B are n by k matrices in the first case and k by n
+*> matrices in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
+*> beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
+*> beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrices A and B, and on entry with
+*> TRANS = 'T' or 't', K specifies the number of rows of the
+*> matrices A and B. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*> \verbatim
+*> A COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array of DIMENSION ( LDB, kb ), where kb is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array B must contain the matrix B, otherwise
+*> the leading k by n part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDB must be at least max( 1, n ), otherwise LDB must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**T*B + alpha*B**T*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, C is an n by n symmetric matrix
-* and A and B are n by k matrices in the first case and k by n
-* matrices in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
-* beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
-* beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrices A and B, and on entry with
-* TRANS = 'T' or 't', K specifies the number of rows of the
-* matrices A and B. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* B - COMPLEX array of DIMENSION ( LDB, kb ), where kb is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array B must contain the matrix B, otherwise
-* the leading k by n part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDB must be at least max( 1, n ), otherwise LDB must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - COMPLEX array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER K,LDA,LDB,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/csyrk.f b/BLAS/SRC/csyrk.f
index 7b346ff0..be0a0b93 100644
--- a/BLAS/SRC/csyrk.f
+++ b/BLAS/SRC/csyrk.f
@@ -1,119 +1,193 @@
- SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX ALPHA,BETA
- INTEGER K,LDA,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),C(LDC,*)
-* ..
+*> \brief \b CSYRK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA,BETA
+* INTEGER K,LDA,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* CSYRK performs one of the symmetric rank k operations
-*
-* C := alpha*A*A**T + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYRK performs one of the symmetric rank k operations
+*>
+*> C := alpha*A*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*A + beta*C,
+*>
+*> where alpha and beta are scalars, C is an n by n symmetric matrix
+*> and A is an n by k matrix in the first case and a k by n matrix
+*> in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with
+*> TRANS = 'T' or 't', K specifies the number of rows of the
+*> matrix A. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**T*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, C is an n by n symmetric matrix
-* and A is an n by k matrix in the first case and a k by n matrix
-* in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with
-* TRANS = 'T' or 't', K specifies the number of rows of the
-* matrix A. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - COMPLEX array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA,BETA
+ INTEGER K,LDA,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ctbmv.f b/BLAS/SRC/ctbmv.f
index 37e0e7f8..1a7820e2 100644
--- a/BLAS/SRC/ctbmv.f
+++ b/BLAS/SRC/ctbmv.f
@@ -1,141 +1,218 @@
- SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,K,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*)
-* ..
+*> \brief \b CTBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,K,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* CTBMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x, or x := A**H*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular band matrix, with ( k + 1 ) diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**H*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with UPLO = 'U' or 'u', K specifies the number of
+*> super-diagonals of the matrix A.
+*> On entry with UPLO = 'L' or 'l', K specifies the number of
+*> sub-diagonals of the matrix A.
+*> K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer an upper
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer a lower
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that when DIAG = 'U' or 'u' the elements of the array A
+*> corresponding to the diagonal elements of the matrix are not
+*> referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* x := A*x, or x := A**T*x, or x := A**H*x,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular band matrix, with ( k + 1 ) diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**H*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with UPLO = 'U' or 'u', K specifies the number of
-* super-diagonals of the matrix A.
-* On entry with UPLO = 'L' or 'l', K specifies the number of
-* sub-diagonals of the matrix A.
-* K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer an upper
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer a lower
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that when DIAG = 'U' or 'u' the elements of the array A
-* corresponding to the diagonal elements of the matrix are not
-* referenced, but are assumed to be unity.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,K,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ctbsv.f b/BLAS/SRC/ctbsv.f
index bdbd9a3f..f7eb02c5 100644
--- a/BLAS/SRC/ctbsv.f
+++ b/BLAS/SRC/ctbsv.f
@@ -1,144 +1,221 @@
- SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,K,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*)
-* ..
+*> \brief \b CTBSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,K,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* CTBSV solves one of the systems of equations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b, or A**H*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular band matrix, with ( k + 1 )
+*> diagonals.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* A*x = b, or A**T*x = b, or A**H*x = b,
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**H*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with UPLO = 'U' or 'u', K specifies the number of
+*> super-diagonals of the matrix A.
+*> On entry with UPLO = 'L' or 'l', K specifies the number of
+*> sub-diagonals of the matrix A.
+*> K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer an upper
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer a lower
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that when DIAG = 'U' or 'u' the elements of the array A
+*> corresponding to the diagonal elements of the matrix are not
+*> referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular band matrix, with ( k + 1 )
-* diagonals.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**H*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with UPLO = 'U' or 'u', K specifies the number of
-* super-diagonals of the matrix A.
-* On entry with UPLO = 'L' or 'l', K specifies the number of
-* sub-diagonals of the matrix A.
-* K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer an upper
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer a lower
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that when DIAG = 'U' or 'u' the elements of the array A
-* corresponding to the diagonal elements of the matrix are not
-* referenced, but are assumed to be unity.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,K,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ctpmv.f b/BLAS/SRC/ctpmv.f
index 53b1b165..d20c624f 100644
--- a/BLAS/SRC/ctpmv.f
+++ b/BLAS/SRC/ctpmv.f
@@ -1,101 +1,170 @@
- SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX AP(*),X(*)
-* ..
-*
-* Purpose
-* =======
-*
-* CTPMV performs one of the matrix-vector operations
+*> \brief \b CTPMV
*
-* x := A*x, or x := A**T*x, or x := A**H*x,
+* =========== DOCUMENTATION ===========
*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular matrix, supplied in packed form.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**H*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
+* SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX AP(*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x, or x := A**H*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular matrix, supplied in packed form.
+*>
+*>\endverbatim
*
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**H*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
+*> respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
+*> respectively, and so on.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP - COMPLEX array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
-* respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
-* respectively, and so on.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced, but are assumed to be unity.
-* Unchanged on exit.
+*> \date November 2011
*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
+*> \ingroup complex_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ctpsv.f b/BLAS/SRC/ctpsv.f
index 3a7da00c..5fba7a90 100644
--- a/BLAS/SRC/ctpsv.f
+++ b/BLAS/SRC/ctpsv.f
@@ -1,103 +1,172 @@
- SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX AP(*),X(*)
-* ..
+*> \brief \b CTPSV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* CTPSV solves one of the systems of equations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* A*x = b, or A**T*x = b, or A**H*x = b,
-*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular matrix, supplied in packed form.
-*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**H*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
+* SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX AP(*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b, or A**H*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular matrix, supplied in packed form.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**H*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
+*> respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
+*> respectively, and so on.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP - COMPLEX array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
-* respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
-* respectively, and so on.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced, but are assumed to be unity.
-* Unchanged on exit.
+*> \date November 2011
*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
+*> \ingroup complex_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ctrmm.f b/BLAS/SRC/ctrmm.f
index e05a623e..8d95a5e7 100644
--- a/BLAS/SRC/ctrmm.f
+++ b/BLAS/SRC/ctrmm.f
@@ -1,129 +1,208 @@
- SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-* .. Scalar Arguments ..
- COMPLEX ALPHA
- INTEGER LDA,LDB,M,N
- CHARACTER DIAG,SIDE,TRANSA,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),B(LDB,*)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b CTRMM
*
-* CTRMM performs one of the matrix-matrix operations
+* =========== DOCUMENTATION ===========
*
-* B := alpha*op( A )*B, or B := alpha*B*op( A )
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* where alpha is a scalar, B is an m by n matrix, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T or op( A ) = A**H.
-*
-* Arguments
+* Definition
* ==========
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether op( A ) multiplies B from
-* the left or right as follows:
-*
-* SIDE = 'L' or 'l' B := alpha*op( A )*B.
-*
-* SIDE = 'R' or 'r' B := alpha*B*op( A ).
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix A is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n' op( A ) = A.
-*
-* TRANSA = 'T' or 't' op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c' op( A ) = A**H.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit triangular
-* as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA
+* INTEGER LDA,LDB,M,N
+* CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),B(LDB,*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRMM performs one of the matrix-matrix operations
+*>
+*> B := alpha*op( A )*B, or B := alpha*B*op( A )
+*>
+*> where alpha is a scalar, B is an m by n matrix, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T or op( A ) = A**H.
+*>
+*>\endverbatim
*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) multiplies B from
+*> the left or right as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' B := alpha*op( A )*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' B := alpha*B*op( A ).
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix A is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't' op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c' op( A ) = A**H.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit triangular
+*> as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, k ), where k is m
+*> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
+*> Before entry with UPLO = 'U' or 'u', the leading k by k
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading k by k
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
+*> then LDA must be at least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B, and on exit is overwritten by the
+*> transformed matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - COMPLEX array of DIMENSION ( LDA, k ), where k is m
-* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
-* Before entry with UPLO = 'U' or 'u', the leading k by k
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading k by k
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
-* then LDA must be at least max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* B - COMPLEX array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B, and on exit is overwritten by the
-* transformed matrix.
+*> \ingroup complex_blas_level3
*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA
+ INTEGER LDA,LDB,M,N
+ CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),B(LDB,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ctrmv.f b/BLAS/SRC/ctrmv.f
index ac0afb73..f432c96f 100644
--- a/BLAS/SRC/ctrmv.f
+++ b/BLAS/SRC/ctrmv.f
@@ -1,104 +1,175 @@
- SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*)
-* ..
+*> \brief \b CTRMV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* CTRMV performs one of the matrix-vector operations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* x := A*x, or x := A**T*x, or x := A**H*x,
-*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular matrix.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**H*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+* SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x, or x := A**H*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular matrix.
+*>
+*>\endverbatim
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**H*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
+*> \ingroup complex_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ctrsm.f b/BLAS/SRC/ctrsm.f
index 2aeb8727..3fd4635e 100644
--- a/BLAS/SRC/ctrsm.f
+++ b/BLAS/SRC/ctrsm.f
@@ -1,131 +1,211 @@
- SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-* .. Scalar Arguments ..
- COMPLEX ALPHA
- INTEGER LDA,LDB,M,N
- CHARACTER DIAG,SIDE,TRANSA,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),B(LDB,*)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b CTRSM
*
-* CTRSM solves one of the matrix equations
+* =========== DOCUMENTATION ===========
*
-* op( A )*X = alpha*B, or X*op( A ) = alpha*B,
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T or op( A ) = A**H.
-*
-* The matrix X is overwritten on B.
-*
-* Arguments
+* Definition
* ==========
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether op( A ) appears on the left
-* or right of X as follows:
-*
-* SIDE = 'L' or 'l' op( A )*X = alpha*B.
-*
-* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix A is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n' op( A ) = A.
-*
-* TRANSA = 'T' or 't' op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c' op( A ) = A**H.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit triangular
-* as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA
+* INTEGER LDA,LDB,M,N
+* CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),B(LDB,*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRSM solves one of the matrix equations
+*>
+*> op( A )*X = alpha*B, or X*op( A ) = alpha*B,
+*>
+*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T or op( A ) = A**H.
+*>
+*> The matrix X is overwritten on B.
+*>
+*>\endverbatim
*
-* ALPHA - COMPLEX .
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) appears on the left
+*> or right of X as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix A is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't' op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c' op( A ) = A**H.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit triangular
+*> as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, k ),
+*> where k is m when SIDE = 'L' or 'l'
+*> and k is n when SIDE = 'R' or 'r'.
+*> Before entry with UPLO = 'U' or 'u', the leading k by k
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading k by k
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
+*> then LDA must be at least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the right-hand side matrix B, and on exit is
+*> overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - COMPLEX array of DIMENSION ( LDA, k ), where k is m
-* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
-* Before entry with UPLO = 'U' or 'u', the leading k by k
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading k by k
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
-* then LDA must be at least max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* B - COMPLEX array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the right-hand side matrix B, and on exit is
-* overwritten by the solution matrix X.
+*> \ingroup complex_blas_level3
*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX ALPHA
+ INTEGER LDA,LDB,M,N
+ CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),B(LDB,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ctrsv.f b/BLAS/SRC/ctrsv.f
index 93e7e44f..52fdb37b 100644
--- a/BLAS/SRC/ctrsv.f
+++ b/BLAS/SRC/ctrsv.f
@@ -1,106 +1,177 @@
- SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A(LDA,*),X(*)
-* ..
+*> \brief \b CTRSV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* CTRSV solves one of the systems of equations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* A*x = b, or A**T*x = b, or A**H*x = b,
-*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular matrix.
-*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**H*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+* SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A(LDA,*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b, or A**H*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular matrix.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**H*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* X - COMPLEX array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
+*> \ingroup complex_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dasum.f b/BLAS/SRC/dasum.f
index e673554c..b6609ded 100644
--- a/BLAS/SRC/dasum.f
+++ b/BLAS/SRC/dasum.f
@@ -1,22 +1,70 @@
- DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DX(*)
-* ..
+*> \brief \b DASUM
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DX(*)
+* ..
+*
* Purpose
* =======
*
-* DASUM takes the sum of the absolute values.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DASUM takes the sum of the absolute values.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/daxpy.f b/BLAS/SRC/daxpy.f
index ddc7449a..b21a9654 100644
--- a/BLAS/SRC/daxpy.f
+++ b/BLAS/SRC/daxpy.f
@@ -1,23 +1,72 @@
- SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
-* .. Scalar Arguments ..
- DOUBLE PRECISION DA
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DX(*),DY(*)
-* ..
+*> \brief \b DAXPY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION DA
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DX(*),DY(*)
+* ..
+*
* Purpose
* =======
*
-* DAXPY constant times a vector plus a vector.
-* uses unrolled loops for increments equal to one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DAXPY constant times a vector plus a vector.
+*> uses unrolled loops for increments equal to one.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ DOUBLE PRECISION DA
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DX(*),DY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dcabs1.f b/BLAS/SRC/dcabs1.f
index 73a51fbe..f290b05c 100644
--- a/BLAS/SRC/dcabs1.f
+++ b/BLAS/SRC/dcabs1.f
@@ -1,13 +1,53 @@
+*> \brief \b DCABS1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DCABS1(Z)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 Z
+* ..
+* ..
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCABS1 computes absolute value of a double complex number
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DCABS1(Z)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
* .. Scalar Arguments ..
COMPLEX*16 Z
* ..
* ..
-* Purpose
-* =======
-*
-* DCABS1 computes absolute value of a double complex number
-*
* =====================================================================
*
* .. Intrinsic Functions ..
diff --git a/BLAS/SRC/dcopy.f b/BLAS/SRC/dcopy.f
index a4414509..35d0f4de 100644
--- a/BLAS/SRC/dcopy.f
+++ b/BLAS/SRC/dcopy.f
@@ -1,22 +1,70 @@
- SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DX(*),DY(*)
-* ..
+*> \brief \b DCOPY
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DX(*),DY(*)
+* ..
+*
* Purpose
* =======
*
-* DCOPY copies a vector, x, to a vector, y.
-* uses unrolled loops for increments equal to one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCOPY copies a vector, x, to a vector, y.
+*> uses unrolled loops for increments equal to one.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DX(*),DY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ddot.f b/BLAS/SRC/ddot.f
index 33719eed..13acc405 100644
--- a/BLAS/SRC/ddot.f
+++ b/BLAS/SRC/ddot.f
@@ -1,22 +1,70 @@
- DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DX(*),DY(*)
-* ..
+*> \brief \b DDOT
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DX(*),DY(*)
+* ..
+*
* Purpose
* =======
*
-* DDOT forms the dot product of two vectors.
-* uses unrolled loops for increments equal to one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDOT forms the dot product of two vectors.
+*> uses unrolled loops for increments equal to one.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DX(*),DY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dgbmv.f b/BLAS/SRC/dgbmv.f
index 1fd5a589..92dacb42 100644
--- a/BLAS/SRC/dgbmv.f
+++ b/BLAS/SRC/dgbmv.f
@@ -1,131 +1,211 @@
- SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER INCX,INCY,KL,KU,LDA,M,N
- CHARACTER TRANS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b DGBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER INCX,INCY,KL,KU,LDA,M,N
+* CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* DGBMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBMV performs one of the matrix-vector operations
+*>
+*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n band matrix, with kl sub-diagonals and ku super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> On entry, KL specifies the number of sub-diagonals of the
+*> matrix A. KL must satisfy 0 .le. KL.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> On entry, KU specifies the number of super-diagonals of the
+*> matrix A. KU must satisfy 0 .le. KU.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry, the leading ( kl + ku + 1 ) by n part of the
+*> array A must contain the matrix of coefficients, supplied
+*> column by column, with the leading diagonal of the matrix in
+*> row ( ku + 1 ) of the array, the first super-diagonal
+*> starting at position 2 in row ku, the first sub-diagonal
+*> starting at position 1 in row ( ku + 2 ), and so on.
+*> Elements in the array A that do not correspond to elements
+*> in the band matrix (such as the top left ku by ku triangle)
+*> are not referenced.
+*> The following program segment will transfer a band matrix
+*> from conventional full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> K = KU + 1 - J
+*> DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
+*> A( K + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( kl + ku + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n band matrix, with kl sub-diagonals and ku super-diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
-*
-* TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
-*
-* TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* KL - INTEGER.
-* On entry, KL specifies the number of sub-diagonals of the
-* matrix A. KL must satisfy 0 .le. KL.
-* Unchanged on exit.
-*
-* KU - INTEGER.
-* On entry, KU specifies the number of super-diagonals of the
-* matrix A. KU must satisfy 0 .le. KU.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry, the leading ( kl + ku + 1 ) by n part of the
-* array A must contain the matrix of coefficients, supplied
-* column by column, with the leading diagonal of the matrix in
-* row ( ku + 1 ) of the array, the first super-diagonal
-* starting at position 2 in row ku, the first sub-diagonal
-* starting at position 1 in row ( ku + 2 ), and so on.
-* Elements in the array A that do not correspond to elements
-* in the band matrix (such as the top left ku by ku triangle)
-* are not referenced.
-* The following program segment will transfer a band matrix
-* from conventional full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* K = KU + 1 - J
-* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
-* A( K + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( kl + ku + 1 ).
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - DOUBLE PRECISION array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER INCX,INCY,KL,KU,LDA,M,N
+ CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dgemm.f b/BLAS/SRC/dgemm.f
index 7ac8c46b..64737822 100644
--- a/BLAS/SRC/dgemm.f
+++ b/BLAS/SRC/dgemm.f
@@ -1,133 +1,215 @@
- SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER K,LDA,LDB,LDC,M,N
- CHARACTER TRANSA,TRANSB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b DGEMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER K,LDA,LDB,LDC,M,N
+* CHARACTER TRANSA,TRANSB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* DGEMM performs one of the matrix-matrix operations
-*
-* C := alpha*op( A )*op( B ) + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*op( A )*op( B ) + beta*C,
+*>
+*> where op( X ) is one of
+*>
+*> op( X ) = X or op( X ) = X**T,
+*>
+*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
+*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+*>
+*>\endverbatim
*
-* where op( X ) is one of
+* Arguments
+* =========
+*
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n', op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't', op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c', op( A ) = A**T.
+*> \endverbatim
+*>
+*> \param[in] TRANSB
+*> \verbatim
+*> TRANSB is CHARACTER*1
+*> On entry, TRANSB specifies the form of op( B ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'N' or 'n', op( B ) = B.
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'T' or 't', op( B ) = B**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'C' or 'c', op( B ) = B**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix
+*> op( A ) and of the matrix C. M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix
+*> op( B ) and the number of columns of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry, K specifies the number of columns of the matrix
+*> op( A ) and the number of rows of the matrix op( B ). K must
+*> be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANSA = 'N' or 'n', and is m otherwise.
+*> Before entry with TRANSA = 'N' or 'n', the leading m by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by m part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANSA = 'N' or 'n' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
+*> n when TRANSB = 'N' or 'n', and is k otherwise.
+*> Before entry with TRANSB = 'N' or 'n', the leading k by n
+*> part of the array B must contain the matrix B, otherwise
+*> the leading n by k part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANSB = 'N' or 'n' then
+*> LDB must be at least max( 1, k ), otherwise LDB must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n matrix
+*> ( alpha*op( A )*op( B ) + beta*C ).
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* op( X ) = X or op( X ) = X**T,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* alpha and beta are scalars, and A, B and C are matrices, with op( A )
-* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level3
*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n', op( A ) = A.
-*
-* TRANSA = 'T' or 't', op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c', op( A ) = A**T.
-*
-* Unchanged on exit.
-*
-* TRANSB - CHARACTER*1.
-* On entry, TRANSB specifies the form of op( B ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSB = 'N' or 'n', op( B ) = B.
-*
-* TRANSB = 'T' or 't', op( B ) = B**T.
-*
-* TRANSB = 'C' or 'c', op( B ) = B**T.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix
-* op( A ) and of the matrix C. M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix
-* op( B ) and the number of columns of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry, K specifies the number of columns of the matrix
-* op( A ) and the number of rows of the matrix op( B ). K must
-* be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANSA = 'N' or 'n', and is m otherwise.
-* Before entry with TRANSA = 'N' or 'n', the leading m by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by m part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANSA = 'N' or 'n' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, k ).
-* Unchanged on exit.
-*
-* B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
-* n when TRANSB = 'N' or 'n', and is k otherwise.
-* Before entry with TRANSB = 'N' or 'n', the leading k by n
-* part of the array B must contain the matrix B, otherwise
-* the leading n by k part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANSB = 'N' or 'n' then
-* LDB must be at least max( 1, k ), otherwise LDB must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n matrix
-* ( alpha*op( A )*op( B ) + beta*C ).
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER K,LDA,LDB,LDC,M,N
+ CHARACTER TRANSA,TRANSB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dgemv.f b/BLAS/SRC/dgemv.f
index a4125941..c428737a 100644
--- a/BLAS/SRC/dgemv.f
+++ b/BLAS/SRC/dgemv.f
@@ -1,105 +1,181 @@
- SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER INCX,INCY,LDA,M,N
- CHARACTER TRANS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b DGEMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER INCX,INCY,LDA,M,N
+* CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* DGEMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEMV performs one of the matrix-vector operations
+*>
+*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
-*
-* TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
-*
-* TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - DOUBLE PRECISION array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER INCX,INCY,LDA,M,N
+ CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dger.f b/BLAS/SRC/dger.f
index 1d95257e..c0e6059c 100644
--- a/BLAS/SRC/dger.f
+++ b/BLAS/SRC/dger.f
@@ -1,82 +1,151 @@
- SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER INCX,INCY,LDA,M,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b DGER
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* DGER performs the rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGER performs the rank 1 operation
+*>
+*> A := alpha*x*y**T + A,
+*>
+*> where alpha is a scalar, x is an m element vector, y is an n element
+*> vector and A is an m by n matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the m
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients. On exit, A is
+*> overwritten by the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x is an m element vector, y is an n element
-* vector and A is an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( m - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the m
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients. On exit, A is
-* overwritten by the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dnrm2.f b/BLAS/SRC/dnrm2.f
index 480c912a..7d4a005d 100644
--- a/BLAS/SRC/dnrm2.f
+++ b/BLAS/SRC/dnrm2.f
@@ -1,25 +1,73 @@
- DOUBLE PRECISION FUNCTION DNRM2(N,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION X(*)
-* ..
+*> \brief \b DNRM2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DNRM2(N,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION X(*)
+* ..
+*
* Purpose
* =======
*
-* DNRM2 returns the euclidean norm of a vector via the function
-* name, so that
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DNRM2 returns the euclidean norm of a vector via the function
+*> name, so that
+*>
+*> DNRM2 := sqrt( x'*x )
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
*
-* DNRM2 := sqrt( x'*x )
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> -- This version written on 25-October-1982.
+*> Modified on 14-October-1993 to inline the call to DLASSQ.
+*> Sven Hammarling, Nag Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DNRM2(N,X,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- This version written on 25-October-1982.
-* Modified on 14-October-1993 to inline the call to DLASSQ.
-* Sven Hammarling, Nag Ltd.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/drot.f b/BLAS/SRC/drot.f
index a02bda37..355e17f8 100644
--- a/BLAS/SRC/drot.f
+++ b/BLAS/SRC/drot.f
@@ -1,22 +1,71 @@
- SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
-* .. Scalar Arguments ..
- DOUBLE PRECISION C,S
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DX(*),DY(*)
-* ..
+*> \brief \b DROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION C,S
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DX(*),DY(*)
+* ..
+*
* Purpose
* =======
*
-* DROT applies a plane rotation.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DROT applies a plane rotation.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DROT(N,DX,INCX,DY,INCY,C,S)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ DOUBLE PRECISION C,S
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DX(*),DY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/drotg.f b/BLAS/SRC/drotg.f
index 3819f473..dcf3e135 100644
--- a/BLAS/SRC/drotg.f
+++ b/BLAS/SRC/drotg.f
@@ -1,17 +1,62 @@
- SUBROUTINE DROTG(DA,DB,C,S)
-* .. Scalar Arguments ..
- DOUBLE PRECISION C,DA,DB,S
-* ..
+*> \brief \b DROTG
+*
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DROTG(DA,DB,C,S)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION C,DA,DB,S
+* ..
+*
* Purpose
* =======
*
-* DROTG construct givens plane rotation.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DROTG construct givens plane rotation.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DROTG(DA,DB,C,S)
*
-* jack dongarra, linpack, 3/11/78.
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION C,DA,DB,S
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/drotm.f b/BLAS/SRC/drotm.f
index a245116d..4d523113 100644
--- a/BLAS/SRC/drotm.f
+++ b/BLAS/SRC/drotm.f
@@ -1,54 +1,116 @@
- SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DPARAM(5),DX(*),DY(*)
-* ..
+*> \brief \b DROTM
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* (DX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF DX ARE IN
-* (DY**T)
+* Definition
+* ==========
*
-* DX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
-* LX = (-INCX)*N, AND SIMILARLY FOR SY USING LY AND INCY.
-* WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
-*
-* DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
+* SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DPARAM(5),DX(*),DY(*)
+* ..
+*
+* Purpose
+* =======
*
-* (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
-* H=( ) ( ) ( ) ( )
-* (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
-* SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
+*>
+*> (DX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF DX ARE IN
+*> (DY**T)
+*>
+*> DX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
+*> LX = (-INCX)*N, AND SIMILARLY FOR SY USING LY AND INCY.
+*> WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
+*>
+*> DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
+*>
+*> (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
+*> H=( ) ( ) ( ) ( )
+*> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
+*> SEE DROTMG FOR A DESCRIPTION OF DATA STORAGE IN DPARAM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* number of elements in input vector(s)
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] DX
+*> \verbatim
+*> DX is DOUBLE PRECISION array, dimension N
+*> double precision vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> storage spacing between elements of DX
+*> \endverbatim
+*>
+*> \param[in,out] DY
+*> \verbatim
+*> DY is DOUBLE PRECISION array, dimension N
+*> double precision vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> storage spacing between elements of DY
+*> \endverbatim
+*>
+*> \param[in,out] DPARAM
+*> \verbatim
+*> DPARAM is DOUBLE PRECISION array, dimension 5
+*> DPARAM(1)=DFLAG
+*> DPARAM(2)=DH11
+*> DPARAM(3)=DH21
+*> DPARAM(4)=DH12
+*> DPARAM(5)=DH22
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DX (input/output) DOUBLE PRECISION array, dimension N
-* double precision vector with N elements
+*> \date November 2011
*
-* INCX (input) INTEGER
-* storage spacing between elements of DX
+*> \ingroup double_blas_level1
*
-* DY (input/output) DOUBLE PRECISION array, dimension N
-* double precision vector with N elements
+* =====================================================================
+ SUBROUTINE DROTM(N,DX,INCX,DY,INCY,DPARAM)
*
-* INCY (input) INTEGER
-* storage spacing between elements of DY
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DPARAM (input/output) DOUBLE PRECISION array, dimension 5
-* DPARAM(1)=DFLAG
-* DPARAM(2)=DH11
-* DPARAM(3)=DH21
-* DPARAM(4)=DH12
-* DPARAM(5)=DH22
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DPARAM(5),DX(*),DY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/drotmg.f b/BLAS/SRC/drotmg.f
index 108c7949..694d37aa 100644
--- a/BLAS/SRC/drotmg.f
+++ b/BLAS/SRC/drotmg.f
@@ -1,50 +1,108 @@
- SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
-* .. Scalar Arguments ..
- DOUBLE PRECISION DD1,DD2,DX1,DY1
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DPARAM(5)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b DROTMG
*
-* CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
-* THE SECOND COMPONENT OF THE 2-VECTOR (DSQRT(DD1)*DX1,DSQRT(DD2)*
-* DY2)**T.
-* WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
+* =========== DOCUMENTATION ===========
*
-* DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
-* H=( ) ( ) ( ) ( )
-* (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
-* LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22
-* RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE
-* VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
+* Definition
+* ==========
*
-* THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
-* INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
-* OF DD1 AND DD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
+* SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION DD1,DD2,DX1,DY1
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DPARAM(5)
+* ..
+*
+* Purpose
+* =======
*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
+*> THE SECOND COMPONENT OF THE 2-VECTOR (DSQRT(DD1)*DX1,DSQRT(DD2)*> DY2)**T.
+*> WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..
+*>
+*> DFLAG=-1.D0 DFLAG=0.D0 DFLAG=1.D0 DFLAG=-2.D0
+*>
+*> (DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0)
+*> H=( ) ( ) ( ) ( )
+*> (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0).
+*> LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22
+*> RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE
+*> VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)
+*>
+*> THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
+*> INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
+*> OF DD1 AND DD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DD1 (input/output) DOUBLE PRECISION
+*> \param[in,out] DD1
+*> \verbatim
+*> DD1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] DD2
+*> \verbatim
+*> DD2 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] DX1
+*> \verbatim
+*> DX1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] DY1
+*> \verbatim
+*> DY1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] DPARAM
+*> \verbatim
+*> DPARAM is DOUBLE PRECISION array, dimension 5
+*> DPARAM(1)=DFLAG
+*> DPARAM(2)=DH11
+*> DPARAM(3)=DH21
+*> DPARAM(4)=DH12
+*> DPARAM(5)=DH22
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* DD2 (input/output) DOUBLE PRECISION
+*> \ingroup double_blas_level1
*
-* DX1 (input/output) DOUBLE PRECISION
+* =====================================================================
+ SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
*
-* DY1 (input) DOUBLE PRECISION
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DPARAM (input/output) DOUBLE PRECISION array, dimension 5
-* DPARAM(1)=DFLAG
-* DPARAM(2)=DH11
-* DPARAM(3)=DH21
-* DPARAM(4)=DH12
-* DPARAM(5)=DH22
+* .. Scalar Arguments ..
+ DOUBLE PRECISION DD1,DD2,DX1,DY1
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DPARAM(5)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dsbmv.f b/BLAS/SRC/dsbmv.f
index e7973517..09c53e1f 100644
--- a/BLAS/SRC/dsbmv.f
+++ b/BLAS/SRC/dsbmv.f
@@ -1,134 +1,211 @@
- SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER INCX,INCY,K,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b DSBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER INCX,INCY,K,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* DSBMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric band matrix, with k super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the band matrix A is being supplied as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> being supplied.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry, K specifies the number of super-diagonals of the
+*> matrix A. K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer the upper
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer the lower
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric band matrix, with k super-diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the band matrix A is being supplied as
-* follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* being supplied.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* being supplied.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry, K specifies the number of super-diagonals of the
-* matrix A. K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer the upper
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer the lower
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* Y - DOUBLE PRECISION array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER INCX,INCY,K,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dscal.f b/BLAS/SRC/dscal.f
index 986c24eb..50dd2eb5 100644
--- a/BLAS/SRC/dscal.f
+++ b/BLAS/SRC/dscal.f
@@ -1,24 +1,73 @@
- SUBROUTINE DSCAL(N,DA,DX,INCX)
-* .. Scalar Arguments ..
- DOUBLE PRECISION DA
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DX(*)
-* ..
+*> \brief \b DSCAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DSCAL(N,DA,DX,INCX)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION DA
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DX(*)
+* ..
+*
* Purpose
* =======
*
-* DSCAL scales a vector by a constant.
-* uses unrolled loops for increment equal to one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSCAL scales a vector by a constant.
+*> uses unrolled loops for increment equal to one.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSCAL(N,DA,DX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ DOUBLE PRECISION DA
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dsdot.f b/BLAS/SRC/dsdot.f
index 8f8ebfdb..cb8de30c 100644
--- a/BLAS/SRC/dsdot.f
+++ b/BLAS/SRC/dsdot.f
@@ -1,66 +1,138 @@
- DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- REAL SX(*),SY(*)
-* ..
-*
-* AUTHORS
-* =======
-* Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
-* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
-*
+*> \brief \b DSDOT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*),SY(*)
+* ..
+*
+* AUTHORS
+* =======
+* Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
+* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
+*
* Purpose
* =======
-* Compute the inner product of two vectors with extended
-* precision accumulation and result.
*
-* Returns D.P. dot product accumulated in D.P., for S.P. SX and SY
-* DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY),
-* where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
-* defined in a similar way using INCY.
+*>\details \b Purpose:
+*>\verbatim
+*> Compute the inner product of two vectors with extended
+*> precision accumulation and result.
+*>
+*> Returns D.P. dot product accumulated in D.P., for S.P. SX and SY
+*> DSDOT = sum for I = 0 to N-1 of SX(LX+I*INCX) * SY(LY+I*INCY),
+*> where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
+*> defined in a similar way using INCY.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* number of elements in input vector(s)
-*
-* SX (input) REAL array, dimension(N)
-* single precision vector with N elements
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in] SX
+*> \verbatim
+*> SX is REAL array, dimension(N)
+*> single precision vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> storage spacing between elements of SX
+*> \endverbatim
+*>
+*> \param[in] SY
+*> \verbatim
+*> SY is REAL array, dimension(N)
+*> single precision vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> storage spacing between elements of SY
+*> \endverbatim
+*>
+*> \param[out] DSDOT
+*> \verbatim
+*> DSDOT is DOUBLE PRECISION
+*> DSDOT double precision dot product (zero if N.LE.0)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* storage spacing between elements of SX
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SY (input) REAL array, dimension(N)
-* single precision vector with N elements
+*> \date November 2011
*
-* INCY (input) INTEGER
-* storage spacing between elements of SY
+*> \ingroup double_blas_level1
*
-* DSDOT (output) DOUBLE PRECISION
-* DSDOT double precision dot product (zero if N.LE.0)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> REFERENCES
+*>
+*> C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
+*> Krogh, Basic linear algebra subprograms for Fortran
+*> usage, Algorithm No. 539, Transactions on Mathematical
+*> Software 5, 3 (September 1979), pp. 308-323.
+*>
+*> REVISION HISTORY (YYMMDD)
+*>
+*> 791001 DATE WRITTEN
+*> 890831 Modified array declarations. (WRB)
+*> 890831 REVISION DATE from Version 3.2
+*> 891214 Prologue converted to Version 4.0 format. (BAB)
+*> 920310 Corrected definition of LX in DESCRIPTION. (WRB)
+*> 920501 Reformatted the REFERENCES section. (WRB)
+*> 070118 Reformat to LAPACK style (JL)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DSDOT(N,SX,INCX,SY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*),SY(*)
+* ..
*
-* REFERENCES
-*
-* C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
-* Krogh, Basic linear algebra subprograms for Fortran
-* usage, Algorithm No. 539, Transactions on Mathematical
-* Software 5, 3 (September 1979), pp. 308-323.
-*
-* REVISION HISTORY (YYMMDD)
-*
-* 791001 DATE WRITTEN
-* 890831 Modified array declarations. (WRB)
-* 890831 REVISION DATE from Version 3.2
-* 891214 Prologue converted to Version 4.0 format. (BAB)
-* 920310 Corrected definition of LX in DESCRIPTION. (WRB)
-* 920501 Reformatted the REFERENCES section. (WRB)
-* 070118 Reformat to LAPACK style (JL)
+* AUTHORS
+* =======
+* Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
+* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
*
* =====================================================================
*
diff --git a/BLAS/SRC/dspmv.f b/BLAS/SRC/dspmv.f
index 4067b0e3..b0c0ceda 100644
--- a/BLAS/SRC/dspmv.f
+++ b/BLAS/SRC/dspmv.f
@@ -1,100 +1,171 @@
- SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER INCX,INCY,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP(*),X(*),Y(*)
-* ..
+*> \brief \b DSPMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER INCX,INCY,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP(*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* DSPMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AP - DOUBLE PRECISION array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on.
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER INCX,INCY,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP(*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dspr.f b/BLAS/SRC/dspr.f
index 64567fc7..87fd3bc8 100644
--- a/BLAS/SRC/dspr.f
+++ b/BLAS/SRC/dspr.f
@@ -1,86 +1,151 @@
- SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER INCX,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP(*),X(*)
-* ..
+*> \brief \b DSPR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER INCX,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP(*),X(*)
+* ..
+*
* Purpose
* =======
*
-* DSPR performs the symmetric rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPR performs the symmetric rank 1 operation
+*>
+*> A := alpha*x*x**T + A,
+*>
+*> where alpha is a real scalar, x is an n element vector and A is an
+*> n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*x**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a real scalar, x is an n element vector and A is an
-* n by n symmetric matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* AP - DOUBLE PRECISION array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSPR(UPLO,N,ALPHA,X,INCX,AP)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER INCX,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dspr2.f b/BLAS/SRC/dspr2.f
index 22900ad0..54553ec1 100644
--- a/BLAS/SRC/dspr2.f
+++ b/BLAS/SRC/dspr2.f
@@ -1,97 +1,166 @@
- SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER INCX,INCY,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP(*),X(*),Y(*)
-* ..
+*> \brief \b DSPR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER INCX,INCY,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP(*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* DSPR2 performs the symmetric rank 2 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPR2 performs the symmetric rank 2 operation
+*>
+*> A := alpha*x*y**T + alpha*y*x**T + A,
+*>
+*> where alpha is a scalar, x and y are n element vectors and A is an
+*> n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**T + alpha*y*x**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x and y are n element vectors and A is an
-* n by n symmetric matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* AP - DOUBLE PRECISION array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER INCX,INCY,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP(*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dswap.f b/BLAS/SRC/dswap.f
index 93db05cb..27760582 100644
--- a/BLAS/SRC/dswap.f
+++ b/BLAS/SRC/dswap.f
@@ -1,22 +1,70 @@
- SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DX(*),DY(*)
-* ..
+*> \brief \b DSWAP
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DX(*),DY(*)
+* ..
+*
* Purpose
* =======
*
-* interchanges two vectors.
-* uses unrolled loops for increments equal one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> interchanges two vectors.
+*> uses unrolled loops for increments equal one.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSWAP(N,DX,INCX,DY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DX(*),DY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dsymm.f b/BLAS/SRC/dsymm.f
index d9d3c96a..f3537fa9 100644
--- a/BLAS/SRC/dsymm.f
+++ b/BLAS/SRC/dsymm.f
@@ -1,137 +1,215 @@
- SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER LDA,LDB,LDC,M,N
- CHARACTER SIDE,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b DSYMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER LDA,LDB,LDC,M,N
+* CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* DSYMM performs one of the matrix-matrix operations
-*
-* C := alpha*A*B + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*A*B + beta*C,
+*>
+*> or
+*>
+*> C := alpha*B*A + beta*C,
+*>
+*> where alpha and beta are scalars, A is a symmetric matrix and B and
+*> C are m by n matrices.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether the symmetric matrix A
+*> appears on the left or right in the operation as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the symmetric matrix A is to be
+*> referenced as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of the
+*> symmetric matrix is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of the
+*> symmetric matrix is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix C.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix C.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
+*> m when SIDE = 'L' or 'l' and is n otherwise.
+*> Before entry with SIDE = 'L' or 'l', the m by m part of
+*> the array A must contain the symmetric matrix, such that
+*> when UPLO = 'U' or 'u', the leading m by m upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the symmetric matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading m by m lower triangular part of the array A
+*> must contain the lower triangular part of the symmetric
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> Before entry with SIDE = 'R' or 'r', the n by n part of
+*> the array A must contain the symmetric matrix, such that
+*> when UPLO = 'U' or 'u', the leading n by n upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the symmetric matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading n by n lower triangular part of the array A
+*> must contain the lower triangular part of the symmetric
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*B*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, A is a symmetric matrix and B and
-* C are m by n matrices.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level3
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether the symmetric matrix A
-* appears on the left or right in the operation as follows:
-*
-* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
-*
-* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the symmetric matrix A is to be
-* referenced as follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of the
-* symmetric matrix is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of the
-* symmetric matrix is to be referenced.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix C.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix C.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
-* m when SIDE = 'L' or 'l' and is n otherwise.
-* Before entry with SIDE = 'L' or 'l', the m by m part of
-* the array A must contain the symmetric matrix, such that
-* when UPLO = 'U' or 'u', the leading m by m upper triangular
-* part of the array A must contain the upper triangular part
-* of the symmetric matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading m by m lower triangular part of the array A
-* must contain the lower triangular part of the symmetric
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Before entry with SIDE = 'R' or 'r', the n by n part of
-* the array A must contain the symmetric matrix, such that
-* when UPLO = 'U' or 'u', the leading n by n upper triangular
-* part of the array A must contain the upper triangular part
-* of the symmetric matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading n by n lower triangular part of the array A
-* must contain the lower triangular part of the symmetric
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n updated
-* matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER LDA,LDB,LDC,M,N
+ CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dsymv.f b/BLAS/SRC/dsymv.f
index 5fa4341a..5dfc7ea9 100644
--- a/BLAS/SRC/dsymv.f
+++ b/BLAS/SRC/dsymv.f
@@ -1,103 +1,176 @@
- SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER INCX,INCY,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b DSYMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER INCX,INCY,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* DSYMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER INCX,INCY,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dsyr.f b/BLAS/SRC/dsyr.f
index 5cc4bcb5..81a01078 100644
--- a/BLAS/SRC/dsyr.f
+++ b/BLAS/SRC/dsyr.f
@@ -1,89 +1,156 @@
- SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER INCX,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*)
-* ..
+*> \brief \b DSYR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER INCX,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* DSYR performs the symmetric rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYR performs the symmetric rank 1 operation
+*>
+*> A := alpha*x*x**T + A,
+*>
+*> where alpha is a real scalar, x is an n element vector and A is an
+*> n by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*x**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a real scalar, x is an n element vector and A is an
-* n by n symmetric matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER INCX,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dsyr2.f b/BLAS/SRC/dsyr2.f
index b2b2f3d7..7b72a342 100644
--- a/BLAS/SRC/dsyr2.f
+++ b/BLAS/SRC/dsyr2.f
@@ -1,100 +1,171 @@
- SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER INCX,INCY,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b DSYR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER INCX,INCY,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* DSYR2 performs the symmetric rank 2 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYR2 performs the symmetric rank 2 operation
+*>
+*> A := alpha*x*y**T + alpha*y*x**T + A,
+*>
+*> where alpha is a scalar, x and y are n element vectors and A is an n
+*> by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**T + alpha*y*x**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x and y are n element vectors and A is an n
-* by n symmetric matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER INCX,INCY,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dsyr2k.f b/BLAS/SRC/dsyr2k.f
index 7289b055..3c2de59a 100644
--- a/BLAS/SRC/dsyr2k.f
+++ b/BLAS/SRC/dsyr2k.f
@@ -1,140 +1,219 @@
- SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER K,LDA,LDB,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b DSYR2K
+*
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER K,LDA,LDB,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* DSYR2K performs one of the symmetric rank 2k operations
-*
-* C := alpha*A*B**T + alpha*B*A**T + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYR2K performs one of the symmetric rank 2k operations
+*>
+*> C := alpha*A*B**T + alpha*B*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*B + alpha*B**T*A + beta*C,
+*>
+*> where alpha and beta are scalars, C is an n by n symmetric matrix
+*> and A and B are n by k matrices in the first case and k by n
+*> matrices in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
+*> beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
+*> beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**T*B + alpha*B**T*A +
+*> beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrices A and B, and on entry with
+*> TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
+*> of rows of the matrices A and B. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array B must contain the matrix B, otherwise
+*> the leading k by n part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDB must be at least max( 1, n ), otherwise LDB must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**T*B + alpha*B**T*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, C is an n by n symmetric matrix
-* and A and B are n by k matrices in the first case and k by n
-* matrices in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
-* beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
-* beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**T*B + alpha*B**T*A +
-* beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrices A and B, and on entry with
-* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
-* of rows of the matrices A and B. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array B must contain the matrix B, otherwise
-* the leading k by n part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDB must be at least max( 1, n ), otherwise LDB must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
-*
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER K,LDA,LDB,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dsyrk.f b/BLAS/SRC/dsyrk.f
index 00fb33ae..df232ff4 100644
--- a/BLAS/SRC/dsyrk.f
+++ b/BLAS/SRC/dsyrk.f
@@ -1,121 +1,196 @@
- SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER K,LDA,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),C(LDC,*)
-* ..
+*> \brief \b DSYRK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER K,LDA,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* DSYRK performs one of the symmetric rank k operations
-*
-* C := alpha*A*A**T + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYRK performs one of the symmetric rank k operations
+*>
+*> C := alpha*A*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*A + beta*C,
+*>
+*> where alpha and beta are scalars, C is an n by n symmetric matrix
+*> and A is an n by k matrix in the first case and a k by n matrix
+*> in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**T*A + beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with
+*> TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
+*> of rows of the matrix A. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**T*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, C is an n by n symmetric matrix
-* and A is an n by k matrix in the first case and a k by n matrix
-* in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**T*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with
-* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
-* of rows of the matrix A. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER K,LDA,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dtbmv.f b/BLAS/SRC/dtbmv.f
index 4f8778ad..ad062ca9 100644
--- a/BLAS/SRC/dtbmv.f
+++ b/BLAS/SRC/dtbmv.f
@@ -1,141 +1,218 @@
- SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,K,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*)
-* ..
+*> \brief \b DTBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,K,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* DTBMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular band matrix, with ( k + 1 ) diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**T*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with UPLO = 'U' or 'u', K specifies the number of
+*> super-diagonals of the matrix A.
+*> On entry with UPLO = 'L' or 'l', K specifies the number of
+*> sub-diagonals of the matrix A.
+*> K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer an upper
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer a lower
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that when DIAG = 'U' or 'u' the elements of the array A
+*> corresponding to the diagonal elements of the matrix are not
+*> referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* x := A*x, or x := A**T*x,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular band matrix, with ( k + 1 ) diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**T*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with UPLO = 'U' or 'u', K specifies the number of
-* super-diagonals of the matrix A.
-* On entry with UPLO = 'L' or 'l', K specifies the number of
-* sub-diagonals of the matrix A.
-* K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer an upper
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer a lower
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that when DIAG = 'U' or 'u' the elements of the array A
-* corresponding to the diagonal elements of the matrix are not
-* referenced, but are assumed to be unity.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,K,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dtbsv.f b/BLAS/SRC/dtbsv.f
index 621c1ec7..9a2b8429 100644
--- a/BLAS/SRC/dtbsv.f
+++ b/BLAS/SRC/dtbsv.f
@@ -1,144 +1,221 @@
- SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,K,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*)
-* ..
+*> \brief \b DTBSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,K,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* DTBSV solves one of the systems of equations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular band matrix, with ( k + 1 )
+*> diagonals.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* A*x = b, or A**T*x = b,
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**T*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with UPLO = 'U' or 'u', K specifies the number of
+*> super-diagonals of the matrix A.
+*> On entry with UPLO = 'L' or 'l', K specifies the number of
+*> sub-diagonals of the matrix A.
+*> K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer an upper
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer a lower
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that when DIAG = 'U' or 'u' the elements of the array A
+*> corresponding to the diagonal elements of the matrix are not
+*> referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular band matrix, with ( k + 1 )
-* diagonals.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup double_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**T*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with UPLO = 'U' or 'u', K specifies the number of
-* super-diagonals of the matrix A.
-* On entry with UPLO = 'L' or 'l', K specifies the number of
-* sub-diagonals of the matrix A.
-* K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer an upper
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer a lower
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that when DIAG = 'U' or 'u' the elements of the array A
-* corresponding to the diagonal elements of the matrix are not
-* referenced, but are assumed to be unity.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,K,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dtpmv.f b/BLAS/SRC/dtpmv.f
index 1def763e..b11f4dbe 100644
--- a/BLAS/SRC/dtpmv.f
+++ b/BLAS/SRC/dtpmv.f
@@ -1,101 +1,170 @@
- SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP(*),X(*)
-* ..
-*
-* Purpose
-* =======
-*
-* DTPMV performs one of the matrix-vector operations
+*> \brief \b DTPMV
*
-* x := A*x, or x := A**T*x,
+* =========== DOCUMENTATION ===========
*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular matrix, supplied in packed form.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**T*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
+* SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP(*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular matrix, supplied in packed form.
+*>
+*>\endverbatim
*
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**T*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
+*> respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
+*> respectively, and so on.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP - DOUBLE PRECISION array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
-* respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
-* respectively, and so on.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced, but are assumed to be unity.
-* Unchanged on exit.
+*> \date November 2011
*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
+*> \ingroup double_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dtpsv.f b/BLAS/SRC/dtpsv.f
index 49b65237..bd7c5ec3 100644
--- a/BLAS/SRC/dtpsv.f
+++ b/BLAS/SRC/dtpsv.f
@@ -1,103 +1,172 @@
- SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP(*),X(*)
-* ..
+*> \brief \b DTPSV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* DTPSV solves one of the systems of equations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* A*x = b, or A**T*x = b,
-*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular matrix, supplied in packed form.
-*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**T*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
+* SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP(*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular matrix, supplied in packed form.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**T*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
+*> respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
+*> respectively, and so on.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP - DOUBLE PRECISION array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
-* respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
-* respectively, and so on.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced, but are assumed to be unity.
-* Unchanged on exit.
+*> \date November 2011
*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
+*> \ingroup double_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dtrmm.f b/BLAS/SRC/dtrmm.f
index fc03769f..9e4cc226 100644
--- a/BLAS/SRC/dtrmm.f
+++ b/BLAS/SRC/dtrmm.f
@@ -1,129 +1,206 @@
- SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER LDA,LDB,M,N
- CHARACTER DIAG,SIDE,TRANSA,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),B(LDB,*)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b DTRMM
*
-* DTRMM performs one of the matrix-matrix operations
+* =========== DOCUMENTATION ===========
*
-* B := alpha*op( A )*B, or B := alpha*B*op( A ),
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* where alpha is a scalar, B is an m by n matrix, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T.
-*
-* Arguments
+* Definition
* ==========
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether op( A ) multiplies B from
-* the left or right as follows:
-*
-* SIDE = 'L' or 'l' B := alpha*op( A )*B.
-*
-* SIDE = 'R' or 'r' B := alpha*B*op( A ).
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix A is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n' op( A ) = A.
-*
-* TRANSA = 'T' or 't' op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c' op( A ) = A**T.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit triangular
-* as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER LDA,LDB,M,N
+* CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),B(LDB,*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRMM performs one of the matrix-matrix operations
+*>
+*> B := alpha*op( A )*B, or B := alpha*B*op( A ),
+*>
+*> where alpha is a scalar, B is an m by n matrix, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T.
+*>
+*>\endverbatim
*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) multiplies B from
+*> the left or right as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' B := alpha*op( A )*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' B := alpha*B*op( A ).
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix A is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't' op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c' op( A ) = A**T.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit triangular
+*> as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> \endverbatim
+*> \verbatim
+*> A DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m
+*> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
+*> Before entry with UPLO = 'U' or 'u', the leading k by k
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading k by k
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
+*> then LDA must be at least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B, and on exit is overwritten by the
+*> transformed matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m
-* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
-* Before entry with UPLO = 'U' or 'u', the leading k by k
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading k by k
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
-* then LDA must be at least max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B, and on exit is overwritten by the
-* transformed matrix.
+*> \ingroup double_blas_level3
*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER LDA,LDB,M,N
+ CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),B(LDB,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dtrmv.f b/BLAS/SRC/dtrmv.f
index 5356cbbc..c4864bf5 100644
--- a/BLAS/SRC/dtrmv.f
+++ b/BLAS/SRC/dtrmv.f
@@ -1,104 +1,175 @@
- SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*)
-* ..
+*> \brief \b DTRMV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* DTRMV performs one of the matrix-vector operations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* x := A*x, or x := A**T*x,
-*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular matrix.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**T*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+* SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular matrix.
+*>
+*>\endverbatim
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**T*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
+*> \ingroup double_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dtrsm.f b/BLAS/SRC/dtrsm.f
index dec5c8d0..3a91fd43 100644
--- a/BLAS/SRC/dtrsm.f
+++ b/BLAS/SRC/dtrsm.f
@@ -1,132 +1,212 @@
- SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER LDA,LDB,M,N
- CHARACTER DIAG,SIDE,TRANSA,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),B(LDB,*)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b DTRSM
*
-* DTRSM solves one of the matrix equations
+* =========== DOCUMENTATION ===========
*
-* op( A )*X = alpha*B, or X*op( A ) = alpha*B,
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T.
-*
-* The matrix X is overwritten on B.
-*
-* Arguments
+* Definition
* ==========
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether op( A ) appears on the left
-* or right of X as follows:
-*
-* SIDE = 'L' or 'l' op( A )*X = alpha*B.
-*
-* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix A is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n' op( A ) = A.
-*
-* TRANSA = 'T' or 't' op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c' op( A ) = A**T.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit triangular
-* as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER LDA,LDB,M,N
+* CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),B(LDB,*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRSM solves one of the matrix equations
+*>
+*> op( A )*X = alpha*B, or X*op( A ) = alpha*B,
+*>
+*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T.
+*>
+*> The matrix X is overwritten on B.
+*>
+*>\endverbatim
*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) appears on the left
+*> or right of X as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix A is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't' op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c' op( A ) = A**T.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit triangular
+*> as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, k ),
+*> where k is m when SIDE = 'L' or 'l'
+*> and k is n when SIDE = 'R' or 'r'.
+*> Before entry with UPLO = 'U' or 'u', the leading k by k
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading k by k
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
+*> then LDA must be at least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the right-hand side matrix B, and on exit is
+*> overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m
-* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
-* Before entry with UPLO = 'U' or 'u', the leading k by k
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading k by k
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
-* then LDA must be at least max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the right-hand side matrix B, and on exit is
-* overwritten by the solution matrix X.
+*> \ingroup double_blas_level3
*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
-* Level 3 Blas routine.
-*
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER LDA,LDB,M,N
+ CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),B(LDB,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dtrsv.f b/BLAS/SRC/dtrsv.f
index f901e699..4a0845b7 100644
--- a/BLAS/SRC/dtrsv.f
+++ b/BLAS/SRC/dtrsv.f
@@ -1,104 +1,171 @@
- SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A(LDA,*),X(*)
-* ..
-*
-* Purpose
-* =======
-*
-* DTRSV solves one of the systems of equations
-*
-* A*x = b, or A**T*x = b,
+*> \brief \b DTRSV
*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular matrix.
+* =========== DOCUMENTATION ===========
*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**T*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
+* SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA,*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular matrix.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**T*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*> \verbatim
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X - DOUBLE PRECISION array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
+*> \date November 2011
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \ingroup double_blas_level1
*
+* =====================================================================
+ SUBROUTINE DTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dzasum.f b/BLAS/SRC/dzasum.f
index 992b3a5c..ea61e0bb 100644
--- a/BLAS/SRC/dzasum.f
+++ b/BLAS/SRC/dzasum.f
@@ -1,22 +1,70 @@
- DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*)
-* ..
+*> \brief \b DZASUM
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*)
+* ..
+*
* Purpose
* =======
*
-* DZASUM takes the sum of the absolute values.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DZASUM takes the sum of the absolute values.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DZASUM(N,ZX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/dznrm2.f b/BLAS/SRC/dznrm2.f
index a5e3da08..4a6b7573 100644
--- a/BLAS/SRC/dznrm2.f
+++ b/BLAS/SRC/dznrm2.f
@@ -1,25 +1,73 @@
- DOUBLE PRECISION FUNCTION DZNRM2(N,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 X(*)
-* ..
+*> \brief \b DZNRM2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DZNRM2(N,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X(*)
+* ..
+*
* Purpose
* =======
*
-* DZNRM2 returns the euclidean norm of a vector via the function
-* name, so that
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DZNRM2 returns the euclidean norm of a vector via the function
+*> name, so that
+*>
+*> DZNRM2 := sqrt( x**H*x )
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_level1
*
-* DZNRM2 := sqrt( x**H*x )
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> -- This version written on 25-October-1982.
+*> Modified on 14-October-1993 to inline the call to ZLASSQ.
+*> Sven Hammarling, Nag Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DZNRM2(N,X,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- This version written on 25-October-1982.
-* Modified on 14-October-1993 to inline the call to ZLASSQ.
-* Sven Hammarling, Nag Ltd.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/icamax.f b/BLAS/SRC/icamax.f
index 2c941f97..5e060ec0 100644
--- a/BLAS/SRC/icamax.f
+++ b/BLAS/SRC/icamax.f
@@ -1,22 +1,70 @@
- INTEGER FUNCTION ICAMAX(N,CX,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*)
-* ..
+*> \brief \b ICAMAX
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION ICAMAX(N,CX,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*)
+* ..
+*
* Purpose
* =======
*
-* ICAMAX finds the index of element having max. absolute value.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ICAMAX finds the index of element having max. absolute value.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_blas
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION ICAMAX(N,CX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/idamax.f b/BLAS/SRC/idamax.f
index 2cc0f9a5..e10fa057 100644
--- a/BLAS/SRC/idamax.f
+++ b/BLAS/SRC/idamax.f
@@ -1,22 +1,70 @@
- INTEGER FUNCTION IDAMAX(N,DX,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DX(*)
-* ..
+*> \brief \b IDAMAX
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION IDAMAX(N,DX,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DX(*)
+* ..
+*
* Purpose
* =======
*
-* IDAMAX finds the index of element having max. absolute value.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> IDAMAX finds the index of element having max. absolute value.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_blas
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION IDAMAX(N,DX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/isamax.f b/BLAS/SRC/isamax.f
index 26a98dd5..4e03d89a 100644
--- a/BLAS/SRC/isamax.f
+++ b/BLAS/SRC/isamax.f
@@ -1,22 +1,70 @@
- INTEGER FUNCTION ISAMAX(N,SX,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- REAL SX(*)
-* ..
+*> \brief \b ISAMAX
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION ISAMAX(N,SX,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*)
+* ..
+*
* Purpose
* =======
*
-* ISAMAX finds the index of element having max. absolute value.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ISAMAX finds the index of element having max. absolute value.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_blas
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION ISAMAX(N,SX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/izamax.f b/BLAS/SRC/izamax.f
index 9ab4b45d..592c3363 100644
--- a/BLAS/SRC/izamax.f
+++ b/BLAS/SRC/izamax.f
@@ -1,22 +1,70 @@
- INTEGER FUNCTION IZAMAX(N,ZX,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*)
-* ..
+*> \brief \b IZAMAX
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION IZAMAX(N,ZX,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*)
+* ..
+*
* Purpose
* =======
*
-* IZAMAX finds the index of element having max. absolute value.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> IZAMAX finds the index of element having max. absolute value.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_blas
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, 1/15/85.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION IZAMAX(N,ZX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, 1/15/85.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/lsame.f b/BLAS/SRC/lsame.f
index f5369026..7c0c8a07 100644
--- a/BLAS/SRC/lsame.f
+++ b/BLAS/SRC/lsame.f
@@ -1,26 +1,68 @@
- LOGICAL FUNCTION LSAME(CA,CB)
+*> \brief \b LSAME
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER CA,CB
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION LSAME(CA,CB)
+*
+* .. Scalar Arguments ..
+* CHARACTER CA,CB
+* ..
+*
* Purpose
* =======
*
-* LSAME returns .TRUE. if CA is the same letter as CB regardless of
-* case.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> LSAME returns .TRUE. if CA is the same letter as CB regardless of
+*> case.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* CA (input) CHARACTER*1
+*> \param[in] CA
+*> \verbatim
+*> CA is CHARACTER*1
+*> \endverbatim
+*>
+*> \param[in] CB
+*> \verbatim
+*> CB is CHARACTER*1
+*> CA and CB specify the single characters to be compared.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* CB (input) CHARACTER*1
-* CA and CB specify the single characters to be compared.
+*> \ingroup aux_blas
+*
+* =====================================================================
+ LOGICAL FUNCTION LSAME(CA,CB)
+*
+* -- Reference BLAS level1 routine (version 3.1) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER CA,CB
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sasum.f b/BLAS/SRC/sasum.f
index 1e3f7db8..400eab05 100644
--- a/BLAS/SRC/sasum.f
+++ b/BLAS/SRC/sasum.f
@@ -1,23 +1,71 @@
- REAL FUNCTION SASUM(N,SX,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- REAL SX(*)
-* ..
+*> \brief \b SASUM
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SASUM(N,SX,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*)
+* ..
+*
* Purpose
* =======
*
-* SASUM takes the sum of the absolute values.
-* uses unrolled loops for increment equal to one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SASUM takes the sum of the absolute values.
+*> uses unrolled loops for increment equal to one.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION SASUM(N,SX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/saxpy.f b/BLAS/SRC/saxpy.f
index c0d8b3a0..648be35f 100644
--- a/BLAS/SRC/saxpy.f
+++ b/BLAS/SRC/saxpy.f
@@ -1,23 +1,72 @@
- SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
-* .. Scalar Arguments ..
- REAL SA
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- REAL SX(*),SY(*)
-* ..
+*> \brief \b SAXPY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
+*
+* .. Scalar Arguments ..
+* REAL SA
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*),SY(*)
+* ..
+*
* Purpose
* =======
*
-* SAXPY constant times a vector plus a vector.
-* uses unrolled loops for increments equal to one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SAXPY constant times a vector plus a vector.
+*> uses unrolled loops for increments equal to one.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SAXPY(N,SA,SX,INCX,SY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ REAL SA
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*),SY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/scabs1.f b/BLAS/SRC/scabs1.f
index eccb9f61..f17280fe 100644
--- a/BLAS/SRC/scabs1.f
+++ b/BLAS/SRC/scabs1.f
@@ -1,12 +1,52 @@
- REAL FUNCTION SCABS1(Z)
-* .. Scalar Arguments ..
- COMPLEX Z
-* ..
+*> \brief \b SCABS1
+*
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SCABS1(Z)
+*
+* .. Scalar Arguments ..
+* COMPLEX Z
+* ..
+*
* Purpose
* =======
*
-* SCABS1 computes absolute value of a complex number
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCABS1 computes absolute value of a complex number
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
+* =====================================================================
+ REAL FUNCTION SCABS1(Z)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX Z
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/scasum.f b/BLAS/SRC/scasum.f
index d090110c..dde1badb 100644
--- a/BLAS/SRC/scasum.f
+++ b/BLAS/SRC/scasum.f
@@ -1,23 +1,71 @@
- REAL FUNCTION SCASUM(N,CX,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX CX(*)
-* ..
+*> \brief \b SCASUM
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SCASUM(N,CX,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX(*)
+* ..
+*
* Purpose
* =======
*
-* SCASUM takes the sum of the absolute values of a complex vector and
-* returns a single precision result.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCASUM takes the sum of the absolute values of a complex vector and
+*> returns a single precision result.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION SCASUM(N,CX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/scnrm2.f b/BLAS/SRC/scnrm2.f
index 1738c315..8b3f8e06 100644
--- a/BLAS/SRC/scnrm2.f
+++ b/BLAS/SRC/scnrm2.f
@@ -1,25 +1,73 @@
- REAL FUNCTION SCNRM2(N,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX X(*)
-* ..
+*> \brief \b SCNRM2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION SCNRM2(N,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX X(*)
+* ..
+*
* Purpose
* =======
*
-* SCNRM2 returns the euclidean norm of a vector via the function
-* name, so that
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCNRM2 returns the euclidean norm of a vector via the function
+*> name, so that
+*>
+*> SCNRM2 := sqrt( x**H*x )
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
*
-* SCNRM2 := sqrt( x**H*x )
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> -- This version written on 25-October-1982.
+*> Modified on 14-October-1993 to inline the call to CLASSQ.
+*> Sven Hammarling, Nag Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION SCNRM2(N,X,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- This version written on 25-October-1982.
-* Modified on 14-October-1993 to inline the call to CLASSQ.
-* Sven Hammarling, Nag Ltd.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/scopy.f b/BLAS/SRC/scopy.f
index 905a64cb..f8b5d676 100644
--- a/BLAS/SRC/scopy.f
+++ b/BLAS/SRC/scopy.f
@@ -1,22 +1,70 @@
- SUBROUTINE SCOPY(N,SX,INCX,SY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- REAL SX(*),SY(*)
-* ..
+*> \brief \b SCOPY
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCOPY(N,SX,INCX,SY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*),SY(*)
+* ..
+*
* Purpose
* =======
*
-* SCOPY copies a vector, x, to a vector, y.
-* uses unrolled loops for increments equal to 1.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCOPY copies a vector, x, to a vector, y.
+*> uses unrolled loops for increments equal to 1.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SCOPY(N,SX,INCX,SY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*),SY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sdot.f b/BLAS/SRC/sdot.f
index 4629bbba..d3429a24 100644
--- a/BLAS/SRC/sdot.f
+++ b/BLAS/SRC/sdot.f
@@ -1,22 +1,70 @@
- REAL FUNCTION SDOT(N,SX,INCX,SY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- REAL SX(*),SY(*)
-* ..
+*> \brief \b SDOT
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SDOT(N,SX,INCX,SY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*),SY(*)
+* ..
+*
* Purpose
* =======
*
-* SDOT forms the dot product of two vectors.
-* uses unrolled loops for increments equal to one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDOT forms the dot product of two vectors.
+*> uses unrolled loops for increments equal to one.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION SDOT(N,SX,INCX,SY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*),SY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sdsdot.f b/BLAS/SRC/sdsdot.f
index b84a6c51..7be8af19 100644
--- a/BLAS/SRC/sdsdot.f
+++ b/BLAS/SRC/sdsdot.f
@@ -1,4 +1,150 @@
+*> \brief \b SDSDOT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
+*
+* .. Scalar Arguments ..
+* REAL SB
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*),SY(*)
+* ..
+*
+* PURPOSE
+* =======
+*
+* Compute the inner product of two vectors with extended
+* precision accumulation.
+*
+* Returns S.P. result with dot product accumulated in D.P.
+* SDSDOT = SB + sum for I = 0 to N-1 of SX(LX+I*INCX)*SY(LY+I*INCY),
+* where LX = 1 if INCX .GE. 0, else LX = 1+(1-N)*INCX, and LY is
+* defined in a similar way using INCY.
+*
+* AUTHOR
+* ======
+* Lawson, C. L., (JPL), Hanson, R. J., (SNLA),
+* Kincaid, D. R., (U. of Texas), Krogh, F. T., (JPL)
+*
+* ARGUMENTS
+* =========
+*
+* N (input) INTEGER
+* number of elements in input vector(s)
+*
+* SB (input) REAL
+* single precision scalar to be added to inner product
+*
+* SX (input) REAL array, dimension (N)
+* single precision vector with N elements
+*
+* INCX (input) INTEGER
+* storage spacing between elements of SX
+*
+* SY (input) REAL array, dimension (N)
+* single precision vector with N elements
+*
+* INCY (input) INTEGER
+* storage spacing between elements of SY
+*
+* SDSDOT (output) REAL
+* single precision dot product (SB if N .LE. 0)
+*
+* Further Details
+* ===============
+*
+* REFERENCES
+*
+* C. L. Lawson, R. J. Hanson, D. R. Kincaid and F. T.
+* Krogh, Basic linear algebra subprograms for Fortran
+* usage, Algorithm No. 539, Transactions on Mathematical
+* Software 5, 3 (September 1979), pp. 308-323.
+*
+* REVISION HISTORY (YYMMDD)
+*
+* 791001 DATE WRITTEN
+* 890531 Changed all specific intrinsics to generic. (WRB)
+* 890831 Modified array declarations. (WRB)
+* 890831 REVISION DATE from Version 3.2
+* 891214 Prologue converted to Version 4.0 format. (BAB)
+* 920310 Corrected definition of LX in DESCRIPTION. (WRB)
+* 920501 Reformatted the REFERENCES section. (WRB)
+* 070118 Reformat to LAPACK coding style
+*
+* =====================================================================
+*
+* .. Local Scalars ..
+* DOUBLE PRECISION DSDOT
+* INTEGER I,KX,KY,NS
+* ..
+* .. Intrinsic Functions ..
+* INTRINSIC DBLE
+* ..
+* DSDOT = SB
+* IF (N.LE.0) THEN
+* SDSDOT = DSDOT
+* RETURN
+* END IF
+* IF (INCX.EQ.INCY .AND. INCX.GT.0) THEN
+*
+* Code for equal and positive increments.
+*
+* NS = N*INCX
+* DO I = 1,NS,INCX
+* DSDOT = DSDOT + DBLE(SX(I))*DBLE(SY(I))
+* END DO
+* ELSE
+*
+* Code for unequal or nonpositive increments.
+*
+* KX = 1
+* KY = 1
+* IF (INCX.LT.0) KX = 1 + (1-N)*INCX
+* IF (INCY.LT.0) KY = 1 + (1-N)*INCY
+* DO I = 1,N
+* DSDOT = DSDOT + DBLE(SX(KX))*DBLE(SY(KY))
+* KX = KX + INCX
+* KY = KY + INCY
+* END DO
+* END IF
+* SDSDOT = DSDOT
+* RETURN
+* END
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
+* =====================================================================
REAL FUNCTION SDSDOT(N,SB,SX,INCX,SY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
* .. Scalar Arguments ..
REAL SB
INTEGER INCX,INCY,N
diff --git a/BLAS/SRC/sgbmv.f b/BLAS/SRC/sgbmv.f
index 9c81731a..774dcda0 100644
--- a/BLAS/SRC/sgbmv.f
+++ b/BLAS/SRC/sgbmv.f
@@ -1,131 +1,211 @@
- SUBROUTINE SGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER INCX,INCY,KL,KU,LDA,M,N
- CHARACTER TRANS
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b SGBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER INCX,INCY,KL,KU,LDA,M,N
+* CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* SGBMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBMV performs one of the matrix-vector operations
+*>
+*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n band matrix, with kl sub-diagonals and ku super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> On entry, KL specifies the number of sub-diagonals of the
+*> matrix A. KL must satisfy 0 .le. KL.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> On entry, KU specifies the number of super-diagonals of the
+*> matrix A. KU must satisfy 0 .le. KU.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry, the leading ( kl + ku + 1 ) by n part of the
+*> array A must contain the matrix of coefficients, supplied
+*> column by column, with the leading diagonal of the matrix in
+*> row ( ku + 1 ) of the array, the first super-diagonal
+*> starting at position 2 in row ku, the first sub-diagonal
+*> starting at position 1 in row ( ku + 2 ), and so on.
+*> Elements in the array A that do not correspond to elements
+*> in the band matrix (such as the top left ku by ku triangle)
+*> are not referenced.
+*> The following program segment will transfer a band matrix
+*> from conventional full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> K = KU + 1 - J
+*> DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
+*> A( K + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( kl + ku + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n band matrix, with kl sub-diagonals and ku super-diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
-*
-* TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
-*
-* TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* KL - INTEGER.
-* On entry, KL specifies the number of sub-diagonals of the
-* matrix A. KL must satisfy 0 .le. KL.
-* Unchanged on exit.
-*
-* KU - INTEGER.
-* On entry, KU specifies the number of super-diagonals of the
-* matrix A. KU must satisfy 0 .le. KU.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry, the leading ( kl + ku + 1 ) by n part of the
-* array A must contain the matrix of coefficients, supplied
-* column by column, with the leading diagonal of the matrix in
-* row ( ku + 1 ) of the array, the first super-diagonal
-* starting at position 2 in row ku, the first sub-diagonal
-* starting at position 1 in row ( ku + 2 ), and so on.
-* Elements in the array A that do not correspond to elements
-* in the band matrix (such as the top left ku by ku triangle)
-* are not referenced.
-* The following program segment will transfer a band matrix
-* from conventional full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* K = KU + 1 - J
-* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
-* A( K + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( kl + ku + 1 ).
-* Unchanged on exit.
-*
-* X - REAL array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - REAL array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER INCX,INCY,KL,KU,LDA,M,N
+ CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sgemm.f b/BLAS/SRC/sgemm.f
index 36c00d03..8ef99eac 100644
--- a/BLAS/SRC/sgemm.f
+++ b/BLAS/SRC/sgemm.f
@@ -1,133 +1,215 @@
- SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER K,LDA,LDB,LDC,M,N
- CHARACTER TRANSA,TRANSB
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b SGEMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER K,LDA,LDB,LDC,M,N
+* CHARACTER TRANSA,TRANSB
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* SGEMM performs one of the matrix-matrix operations
-*
-* C := alpha*op( A )*op( B ) + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*op( A )*op( B ) + beta*C,
+*>
+*> where op( X ) is one of
+*>
+*> op( X ) = X or op( X ) = X**T,
+*>
+*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
+*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+*>
+*>\endverbatim
*
-* where op( X ) is one of
+* Arguments
+* =========
+*
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n', op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't', op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c', op( A ) = A**T.
+*> \endverbatim
+*>
+*> \param[in] TRANSB
+*> \verbatim
+*> TRANSB is CHARACTER*1
+*> On entry, TRANSB specifies the form of op( B ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'N' or 'n', op( B ) = B.
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'T' or 't', op( B ) = B**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'C' or 'c', op( B ) = B**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix
+*> op( A ) and of the matrix C. M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix
+*> op( B ) and the number of columns of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry, K specifies the number of columns of the matrix
+*> op( A ) and the number of rows of the matrix op( B ). K must
+*> be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANSA = 'N' or 'n', and is m otherwise.
+*> Before entry with TRANSA = 'N' or 'n', the leading m by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by m part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANSA = 'N' or 'n' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array of DIMENSION ( LDB, kb ), where kb is
+*> n when TRANSB = 'N' or 'n', and is k otherwise.
+*> Before entry with TRANSB = 'N' or 'n', the leading k by n
+*> part of the array B must contain the matrix B, otherwise
+*> the leading n by k part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANSB = 'N' or 'n' then
+*> LDB must be at least max( 1, k ), otherwise LDB must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n matrix
+*> ( alpha*op( A )*op( B ) + beta*C ).
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* op( X ) = X or op( X ) = X**T,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* alpha and beta are scalars, and A, B and C are matrices, with op( A )
-* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level3
*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n', op( A ) = A.
-*
-* TRANSA = 'T' or 't', op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c', op( A ) = A**T.
-*
-* Unchanged on exit.
-*
-* TRANSB - CHARACTER*1.
-* On entry, TRANSB specifies the form of op( B ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSB = 'N' or 'n', op( B ) = B.
-*
-* TRANSB = 'T' or 't', op( B ) = B**T.
-*
-* TRANSB = 'C' or 'c', op( B ) = B**T.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix
-* op( A ) and of the matrix C. M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix
-* op( B ) and the number of columns of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry, K specifies the number of columns of the matrix
-* op( A ) and the number of rows of the matrix op( B ). K must
-* be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANSA = 'N' or 'n', and is m otherwise.
-* Before entry with TRANSA = 'N' or 'n', the leading m by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by m part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANSA = 'N' or 'n' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, k ).
-* Unchanged on exit.
-*
-* B - REAL array of DIMENSION ( LDB, kb ), where kb is
-* n when TRANSB = 'N' or 'n', and is k otherwise.
-* Before entry with TRANSB = 'N' or 'n', the leading k by n
-* part of the array B must contain the matrix B, otherwise
-* the leading n by k part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANSB = 'N' or 'n' then
-* LDB must be at least max( 1, k ), otherwise LDB must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - REAL array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n matrix
-* ( alpha*op( A )*op( B ) + beta*C ).
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER K,LDA,LDB,LDC,M,N
+ CHARACTER TRANSA,TRANSB
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sgemv.f b/BLAS/SRC/sgemv.f
index afae2698..315a6822 100644
--- a/BLAS/SRC/sgemv.f
+++ b/BLAS/SRC/sgemv.f
@@ -1,105 +1,181 @@
- SUBROUTINE SGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER INCX,INCY,LDA,M,N
- CHARACTER TRANS
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b SGEMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER INCX,INCY,LDA,M,N
+* CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* SGEMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEMV performs one of the matrix-vector operations
+*>
+*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
-*
-* TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
-*
-* TRANS = 'C' or 'c' y := alpha*A**T*x + beta*y.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X - REAL array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - REAL array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER INCX,INCY,LDA,M,N
+ CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sger.f b/BLAS/SRC/sger.f
index 828b7454..46ff76fb 100644
--- a/BLAS/SRC/sger.f
+++ b/BLAS/SRC/sger.f
@@ -1,82 +1,149 @@
- SUBROUTINE SGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER INCX,INCY,LDA,M,N
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b SGER
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* SGER performs the rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGER performs the rank 1 operation
+*>
+*> A := alpha*x*y**T + A,
+*>
+*> where alpha is a scalar, x is an m element vector, y is an n element
+*> vector and A is an m by n matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*> \verbatim
+*> X REAL array of dimension at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the m
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients. On exit, A is
+*> overwritten by the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x is an m element vector, y is an n element
-* vector and A is an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( m - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the m
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients. On exit, A is
-* overwritten by the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGER(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/snrm2.f b/BLAS/SRC/snrm2.f
index 1c336dac..6e122ccc 100644
--- a/BLAS/SRC/snrm2.f
+++ b/BLAS/SRC/snrm2.f
@@ -1,25 +1,73 @@
- REAL FUNCTION SNRM2(N,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- REAL X(*)
-* ..
+*> \brief \b SNRM2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION SNRM2(N,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* REAL X(*)
+* ..
+*
* Purpose
* =======
*
-* SNRM2 returns the euclidean norm of a vector via the function
-* name, so that
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SNRM2 returns the euclidean norm of a vector via the function
+*> name, so that
+*>
+*> SNRM2 := sqrt( x'*x ).
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
*
-* SNRM2 := sqrt( x'*x ).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> -- This version written on 25-October-1982.
+*> Modified on 14-October-1993 to inline the call to SLASSQ.
+*> Sven Hammarling, Nag Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION SNRM2(N,X,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- This version written on 25-October-1982.
-* Modified on 14-October-1993 to inline the call to SLASSQ.
-* Sven Hammarling, Nag Ltd.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ REAL X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/srot.f b/BLAS/SRC/srot.f
index b53b0fdb..50e20ed8 100644
--- a/BLAS/SRC/srot.f
+++ b/BLAS/SRC/srot.f
@@ -1,22 +1,71 @@
- SUBROUTINE SROT(N,SX,INCX,SY,INCY,C,S)
-* .. Scalar Arguments ..
- REAL C,S
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- REAL SX(*),SY(*)
-* ..
+*> \brief \b SROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SROT(N,SX,INCX,SY,INCY,C,S)
+*
+* .. Scalar Arguments ..
+* REAL C,S
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*),SY(*)
+* ..
+*
* Purpose
* =======
*
-* applies a plane rotation.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> applies a plane rotation.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SROT(N,SX,INCX,SY,INCY,C,S)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ REAL C,S
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*),SY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/srotg.f b/BLAS/SRC/srotg.f
index 4f4258be..666d5501 100644
--- a/BLAS/SRC/srotg.f
+++ b/BLAS/SRC/srotg.f
@@ -1,17 +1,62 @@
- SUBROUTINE SROTG(SA,SB,C,S)
-* .. Scalar Arguments ..
- REAL C,S,SA,SB
-* ..
+*> \brief \b SROTG
+*
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SROTG(SA,SB,C,S)
+*
+* .. Scalar Arguments ..
+* REAL C,S,SA,SB
+* ..
+*
* Purpose
* =======
*
-* SROTG construct givens plane rotation.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SROTG construct givens plane rotation.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SROTG(SA,SB,C,S)
*
-* jack dongarra, linpack, 3/11/78.
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL C,S,SA,SB
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/srotm.f b/BLAS/SRC/srotm.f
index 4eeaa4f0..be84807f 100644
--- a/BLAS/SRC/srotm.f
+++ b/BLAS/SRC/srotm.f
@@ -1,55 +1,117 @@
- SUBROUTINE SROTM(N,SX,INCX,SY,INCY,SPARAM)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- REAL SPARAM(5),SX(*),SY(*)
-* ..
-*
-* Purpose
-* =======
-*
-* APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
+*> \brief \b SROTM
*
-* (SX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF SX ARE IN
-* (SX**T)
+* =========== DOCUMENTATION ===========
*
-* SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
-* LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY.
-* WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
+* Definition
+* ==========
*
-* (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
-* H=( ) ( ) ( ) ( )
-* (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
-* SEE SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM.
+* SUBROUTINE SROTM(N,SX,INCX,SY,INCY,SPARAM)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* REAL SPARAM(5),SX(*),SY(*)
+* ..
+*
+* Purpose
+* =======
*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> APPLY THE MODIFIED GIVENS TRANSFORMATION, H, TO THE 2 BY N MATRIX
+*>
+*> (SX**T) , WHERE **T INDICATES TRANSPOSE. THE ELEMENTS OF SX ARE IN
+*> (SX**T)
+*>
+*> SX(LX+I*INCX), I = 0 TO N-1, WHERE LX = 1 IF INCX .GE. 0, ELSE
+*> LX = (-INCX)*N, AND SIMILARLY FOR SY USING USING LY AND INCY.
+*> WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
+*>
+*> SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
+*>
+*> (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
+*> H=( ) ( ) ( ) ( )
+*> (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
+*> SEE SROTMG FOR A DESCRIPTION OF DATA STORAGE IN SPARAM.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* number of elements in input vector(s)
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> number of elements in input vector(s)
+*> \endverbatim
+*>
+*> \param[in,out] SX
+*> \verbatim
+*> SX is REAL array, dimension N
+*> double precision vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> storage spacing between elements of SX
+*> \endverbatim
+*>
+*> \param[in,out] SY
+*> \verbatim
+*> SY is REAL array, dimension N
+*> double precision vector with N elements
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> storage spacing between elements of SY
+*> \endverbatim
+*>
+*> \param[in,out] SPARAM
+*> \verbatim
+*> SPARAM is REAL array, dimension 5
+*> SPARAM(1)=SFLAG
+*> SPARAM(2)=SH11
+*> SPARAM(3)=SH21
+*> SPARAM(4)=SH12
+*> SPARAM(5)=SH22
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SX (input/output) REAL array, dimension N
-* double precision vector with N elements
+*> \date November 2011
*
-* INCX (input) INTEGER
-* storage spacing between elements of SX
+*> \ingroup single_blas_level1
*
-* SY (input/output) REAL array, dimension N
-* double precision vector with N elements
+* =====================================================================
+ SUBROUTINE SROTM(N,SX,INCX,SY,INCY,SPARAM)
*
-* INCY (input) INTEGER
-* storage spacing between elements of SY
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SPARAM (input/output) REAL array, dimension 5
-* SPARAM(1)=SFLAG
-* SPARAM(2)=SH11
-* SPARAM(3)=SH21
-* SPARAM(4)=SH12
-* SPARAM(5)=SH22
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ REAL SPARAM(5),SX(*),SY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/srotmg.f b/BLAS/SRC/srotmg.f
index aae4f284..62a76e42 100644
--- a/BLAS/SRC/srotmg.f
+++ b/BLAS/SRC/srotmg.f
@@ -1,52 +1,108 @@
- SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
-* .. Scalar Arguments ..
- REAL SD1,SD2,SX1,SY1
-* ..
-* .. Array Arguments ..
- REAL SPARAM(5)
-* ..
+*> \brief \b SROTMG
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
-* THE SECOND COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)*
-* SY2)**T.
-* WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
+* Definition
+* ==========
*
-* (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
-* H=( ) ( ) ( ) ( )
-* (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
-* LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22
-* RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE
-* VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.)
-*
-* THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
-* INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
-* OF SD1 AND SD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
+* SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
+*
+* .. Scalar Arguments ..
+* REAL SD1,SD2,SX1,SY1
+* ..
+* .. Array Arguments ..
+* REAL SPARAM(5)
+* ..
+*
+* Purpose
+* =======
*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS
+*> THE SECOND COMPONENT OF THE 2-VECTOR (SQRT(SD1)*SX1,SQRT(SD2)*> SY2)**T.
+*> WITH SPARAM(1)=SFLAG, H HAS ONE OF THE FOLLOWING FORMS..
+*>
+*> SFLAG=-1.E0 SFLAG=0.E0 SFLAG=1.E0 SFLAG=-2.E0
+*>
+*> (SH11 SH12) (1.E0 SH12) (SH11 1.E0) (1.E0 0.E0)
+*> H=( ) ( ) ( ) ( )
+*> (SH21 SH22), (SH21 1.E0), (-1.E0 SH22), (0.E0 1.E0).
+*> LOCATIONS 2-4 OF SPARAM CONTAIN SH11,SH21,SH12, AND SH22
+*> RESPECTIVELY. (VALUES OF 1.E0, -1.E0, OR 0.E0 IMPLIED BY THE
+*> VALUE OF SPARAM(1) ARE NOT STORED IN SPARAM.)
+*>
+*> THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE
+*> INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE
+*> OF SD1 AND SD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
+*> \param[in,out] SD1
+*> \verbatim
+*> SD1 is REAL
+*> \endverbatim
+*>
+*> \param[in,out] SD2
+*> \verbatim
+*> SD2 is REAL
+*> \endverbatim
+*>
+*> \param[in,out] SX1
+*> \verbatim
+*> SX1 is REAL
+*> \endverbatim
+*>
+*> \param[in] SY1
+*> \verbatim
+*> SY1 is REAL
+*> \endverbatim
+*>
+*> \param[in,out] SPARAM
+*> \verbatim
+*> SPARAM is REAL array, dimension 5
+*> SPARAM(1)=SFLAG
+*> SPARAM(2)=SH11
+*> SPARAM(3)=SH21
+*> SPARAM(4)=SH12
+*> SPARAM(5)=SH22
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SD1 (input/output) REAL
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SD2 (input/output) REAL
+*> \date November 2011
*
-* SX1 (input/output) REAL
+*> \ingroup single_blas_level1
*
-* SY1 (input) REAL
+* =====================================================================
+ SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SPARAM (input/output) REAL array, dimension 5
-* SPARAM(1)=SFLAG
-* SPARAM(2)=SH11
-* SPARAM(3)=SH21
-* SPARAM(4)=SH12
-* SPARAM(5)=SH22
+* .. Scalar Arguments ..
+ REAL SD1,SD2,SX1,SY1
+* ..
+* .. Array Arguments ..
+ REAL SPARAM(5)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ssbmv.f b/BLAS/SRC/ssbmv.f
index 88b4adc1..82f76ceb 100644
--- a/BLAS/SRC/ssbmv.f
+++ b/BLAS/SRC/ssbmv.f
@@ -1,134 +1,211 @@
- SUBROUTINE SSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER INCX,INCY,K,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b SSBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER INCX,INCY,K,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* SSBMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric band matrix, with k super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the band matrix A is being supplied as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> being supplied.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry, K specifies the number of super-diagonals of the
+*> matrix A. K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer the upper
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer the lower
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric band matrix, with k super-diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the band matrix A is being supplied as
-* follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* being supplied.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* being supplied.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry, K specifies the number of super-diagonals of the
-* matrix A. K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer the upper
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer the lower
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - REAL array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* Y - REAL array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER INCX,INCY,K,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sscal.f b/BLAS/SRC/sscal.f
index dd0a68d9..d3d7130a 100644
--- a/BLAS/SRC/sscal.f
+++ b/BLAS/SRC/sscal.f
@@ -1,24 +1,73 @@
- SUBROUTINE SSCAL(N,SA,SX,INCX)
-* .. Scalar Arguments ..
- REAL SA
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- REAL SX(*)
-* ..
+*> \brief \b SSCAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SSCAL(N,SA,SX,INCX)
+*
+* .. Scalar Arguments ..
+* REAL SA
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*)
+* ..
+*
* Purpose
* =======
*
-* scales a vector by a constant.
-* uses unrolled loops for increment equal to 1.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> scales a vector by a constant.
+*> uses unrolled loops for increment equal to 1.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSCAL(N,SA,SX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ REAL SA
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sspmv.f b/BLAS/SRC/sspmv.f
index c9518517..e2485a27 100644
--- a/BLAS/SRC/sspmv.f
+++ b/BLAS/SRC/sspmv.f
@@ -1,100 +1,171 @@
- SUBROUTINE SSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER INCX,INCY,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- REAL AP(*),X(*),Y(*)
-* ..
+*> \brief \b SSPMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER INCX,INCY,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL AP(*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* SSPMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AP - REAL array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on.
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER INCX,INCY,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ REAL AP(*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sspr.f b/BLAS/SRC/sspr.f
index 6c2a21c6..55b120e8 100644
--- a/BLAS/SRC/sspr.f
+++ b/BLAS/SRC/sspr.f
@@ -1,86 +1,151 @@
- SUBROUTINE SSPR(UPLO,N,ALPHA,X,INCX,AP)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER INCX,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- REAL AP(*),X(*)
-* ..
+*> \brief \b SSPR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPR(UPLO,N,ALPHA,X,INCX,AP)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER INCX,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL AP(*),X(*)
+* ..
+*
* Purpose
* =======
*
-* SSPR performs the symmetric rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPR performs the symmetric rank 1 operation
+*>
+*> A := alpha*x*x**T + A,
+*>
+*> where alpha is a real scalar, x is an n element vector and A is an
+*> n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*x**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a real scalar, x is an n element vector and A is an
-* n by n symmetric matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* AP - REAL array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSPR(UPLO,N,ALPHA,X,INCX,AP)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER INCX,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ REAL AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sspr2.f b/BLAS/SRC/sspr2.f
index 51831071..6450dbcc 100644
--- a/BLAS/SRC/sspr2.f
+++ b/BLAS/SRC/sspr2.f
@@ -1,97 +1,164 @@
- SUBROUTINE SSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER INCX,INCY,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- REAL AP(*),X(*),Y(*)
-* ..
+*> \brief \b SSPR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER INCX,INCY,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL AP(*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* SSPR2 performs the symmetric rank 2 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPR2 performs the symmetric rank 2 operation
+*>
+*> A := alpha*x*y**T + alpha*y*x**T + A,
+*>
+*> where alpha is a scalar, x and y are n element vectors and A is an
+*> n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*> \verbatim
+*> X REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**T + alpha*y*x**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x and y are n element vectors and A is an
-* n by n symmetric matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* AP - REAL array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER INCX,INCY,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ REAL AP(*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/sswap.f b/BLAS/SRC/sswap.f
index e1a75f49..d0dcddfa 100644
--- a/BLAS/SRC/sswap.f
+++ b/BLAS/SRC/sswap.f
@@ -1,22 +1,70 @@
- SUBROUTINE SSWAP(N,SX,INCX,SY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- REAL SX(*),SY(*)
-* ..
+*> \brief \b SSWAP
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSWAP(N,SX,INCX,SY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* REAL SX(*),SY(*)
+* ..
+*
* Purpose
* =======
*
-* interchanges two vectors.
-* uses unrolled loops for increments equal to 1.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> interchanges two vectors.
+*> uses unrolled loops for increments equal to 1.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSWAP(N,SX,INCX,SY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ REAL SX(*),SY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ssymm.f b/BLAS/SRC/ssymm.f
index 5182672e..2253c537 100644
--- a/BLAS/SRC/ssymm.f
+++ b/BLAS/SRC/ssymm.f
@@ -1,137 +1,215 @@
- SUBROUTINE SSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER LDA,LDB,LDC,M,N
- CHARACTER SIDE,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b SSYMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER LDA,LDB,LDC,M,N
+* CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* SSYMM performs one of the matrix-matrix operations
-*
-* C := alpha*A*B + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*A*B + beta*C,
+*>
+*> or
+*>
+*> C := alpha*B*A + beta*C,
+*>
+*> where alpha and beta are scalars, A is a symmetric matrix and B and
+*> C are m by n matrices.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether the symmetric matrix A
+*> appears on the left or right in the operation as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the symmetric matrix A is to be
+*> referenced as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of the
+*> symmetric matrix is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of the
+*> symmetric matrix is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix C.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix C.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, ka ), where ka is
+*> m when SIDE = 'L' or 'l' and is n otherwise.
+*> Before entry with SIDE = 'L' or 'l', the m by m part of
+*> the array A must contain the symmetric matrix, such that
+*> when UPLO = 'U' or 'u', the leading m by m upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the symmetric matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading m by m lower triangular part of the array A
+*> must contain the lower triangular part of the symmetric
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> Before entry with SIDE = 'R' or 'r', the n by n part of
+*> the array A must contain the symmetric matrix, such that
+*> when UPLO = 'U' or 'u', the leading n by n upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the symmetric matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading n by n lower triangular part of the array A
+*> must contain the lower triangular part of the symmetric
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*B*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, A is a symmetric matrix and B and
-* C are m by n matrices.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level3
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether the symmetric matrix A
-* appears on the left or right in the operation as follows:
-*
-* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
-*
-* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the symmetric matrix A is to be
-* referenced as follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of the
-* symmetric matrix is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of the
-* symmetric matrix is to be referenced.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix C.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix C.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, ka ), where ka is
-* m when SIDE = 'L' or 'l' and is n otherwise.
-* Before entry with SIDE = 'L' or 'l', the m by m part of
-* the array A must contain the symmetric matrix, such that
-* when UPLO = 'U' or 'u', the leading m by m upper triangular
-* part of the array A must contain the upper triangular part
-* of the symmetric matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading m by m lower triangular part of the array A
-* must contain the lower triangular part of the symmetric
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Before entry with SIDE = 'R' or 'r', the n by n part of
-* the array A must contain the symmetric matrix, such that
-* when UPLO = 'U' or 'u', the leading n by n upper triangular
-* part of the array A must contain the upper triangular part
-* of the symmetric matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading n by n lower triangular part of the array A
-* must contain the lower triangular part of the symmetric
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* B - REAL array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - REAL array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n updated
-* matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER LDA,LDB,LDC,M,N
+ CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ssymv.f b/BLAS/SRC/ssymv.f
index a43bd9b0..6660a329 100644
--- a/BLAS/SRC/ssymv.f
+++ b/BLAS/SRC/ssymv.f
@@ -1,103 +1,176 @@
- SUBROUTINE SSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER INCX,INCY,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b SSYMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER INCX,INCY,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* SSYMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER INCX,INCY,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ssyr.f b/BLAS/SRC/ssyr.f
index 1a546009..05c49151 100644
--- a/BLAS/SRC/ssyr.f
+++ b/BLAS/SRC/ssyr.f
@@ -1,89 +1,156 @@
- SUBROUTINE SSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER INCX,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*)
-* ..
+*> \brief \b SSYR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER INCX,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* SSYR performs the symmetric rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYR performs the symmetric rank 1 operation
+*>
+*> A := alpha*x*x**T + A,
+*>
+*> where alpha is a real scalar, x is an n element vector and A is an
+*> n by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*x**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a real scalar, x is an n element vector and A is an
-* n by n symmetric matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYR(UPLO,N,ALPHA,X,INCX,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER INCX,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ssyr2.f b/BLAS/SRC/ssyr2.f
index 545cfe55..b96e2184 100644
--- a/BLAS/SRC/ssyr2.f
+++ b/BLAS/SRC/ssyr2.f
@@ -1,100 +1,169 @@
- SUBROUTINE SSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER INCX,INCY,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b SSYR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER INCX,INCY,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* SSYR2 performs the symmetric rank 2 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYR2 performs the symmetric rank 2 operation
+*>
+*> A := alpha*x*y**T + alpha*y*x**T + A,
+*>
+*> where alpha is a scalar, x and y are n element vectors and A is an n
+*> by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*> \verbatim
+*> X REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**T + alpha*y*x**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x and y are n element vectors and A is an n
-* by n symmetric matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYR2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER INCX,INCY,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ssyr2k.f b/BLAS/SRC/ssyr2k.f
index c9f44aa8..a0bfee72 100644
--- a/BLAS/SRC/ssyr2k.f
+++ b/BLAS/SRC/ssyr2k.f
@@ -1,140 +1,219 @@
- SUBROUTINE SSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER K,LDA,LDB,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b SSYR2K
+*
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER K,LDA,LDB,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* SSYR2K performs one of the symmetric rank 2k operations
-*
-* C := alpha*A*B**T + alpha*B*A**T + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYR2K performs one of the symmetric rank 2k operations
+*>
+*> C := alpha*A*B**T + alpha*B*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*B + alpha*B**T*A + beta*C,
+*>
+*> where alpha and beta are scalars, C is an n by n symmetric matrix
+*> and A and B are n by k matrices in the first case and k by n
+*> matrices in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
+*> beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
+*> beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**T*B + alpha*B**T*A +
+*> beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrices A and B, and on entry with
+*> TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
+*> of rows of the matrices A and B. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array of DIMENSION ( LDB, kb ), where kb is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array B must contain the matrix B, otherwise
+*> the leading k by n part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDB must be at least max( 1, n ), otherwise LDB must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**T*B + alpha*B**T*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, C is an n by n symmetric matrix
-* and A and B are n by k matrices in the first case and k by n
-* matrices in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
-* beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
-* beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**T*B + alpha*B**T*A +
-* beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrices A and B, and on entry with
-* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
-* of rows of the matrices A and B. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* B - REAL array of DIMENSION ( LDB, kb ), where kb is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array B must contain the matrix B, otherwise
-* the leading k by n part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDB must be at least max( 1, n ), otherwise LDB must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - REAL array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
-*
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER K,LDA,LDB,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ssyrk.f b/BLAS/SRC/ssyrk.f
index 33b7296f..9d294f13 100644
--- a/BLAS/SRC/ssyrk.f
+++ b/BLAS/SRC/ssyrk.f
@@ -1,121 +1,196 @@
- SUBROUTINE SSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
-* .. Scalar Arguments ..
- REAL ALPHA,BETA
- INTEGER K,LDA,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),C(LDC,*)
-* ..
+*> \brief \b SSYRK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA,BETA
+* INTEGER K,LDA,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* SSYRK performs one of the symmetric rank k operations
-*
-* C := alpha*A*A**T + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYRK performs one of the symmetric rank k operations
+*>
+*> C := alpha*A*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*A + beta*C,
+*>
+*> where alpha and beta are scalars, C is an n by n symmetric matrix
+*> and A is an n by k matrix in the first case and a k by n matrix
+*> in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**T*A + beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with
+*> TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
+*> of rows of the matrix A. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**T*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, C is an n by n symmetric matrix
-* and A is an n by k matrix in the first case and a k by n matrix
-* in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**T*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with
-* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number
-* of rows of the matrix A. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - REAL .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - REAL array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ REAL ALPHA,BETA
+ INTEGER K,LDA,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/stbmv.f b/BLAS/SRC/stbmv.f
index 7446b4e6..5c1190a8 100644
--- a/BLAS/SRC/stbmv.f
+++ b/BLAS/SRC/stbmv.f
@@ -1,141 +1,218 @@
- SUBROUTINE STBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,K,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*)
-* ..
+*> \brief \b STBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE STBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,K,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* STBMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular band matrix, with ( k + 1 ) diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**T*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with UPLO = 'U' or 'u', K specifies the number of
+*> super-diagonals of the matrix A.
+*> On entry with UPLO = 'L' or 'l', K specifies the number of
+*> sub-diagonals of the matrix A.
+*> K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer an upper
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer a lower
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that when DIAG = 'U' or 'u' the elements of the array A
+*> corresponding to the diagonal elements of the matrix are not
+*> referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* x := A*x, or x := A**T*x,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular band matrix, with ( k + 1 ) diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**T*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with UPLO = 'U' or 'u', K specifies the number of
-* super-diagonals of the matrix A.
-* On entry with UPLO = 'L' or 'l', K specifies the number of
-* sub-diagonals of the matrix A.
-* K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer an upper
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer a lower
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that when DIAG = 'U' or 'u' the elements of the array A
-* corresponding to the diagonal elements of the matrix are not
-* referenced, but are assumed to be unity.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,K,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/stbsv.f b/BLAS/SRC/stbsv.f
index d6d247e2..2bdb4824 100644
--- a/BLAS/SRC/stbsv.f
+++ b/BLAS/SRC/stbsv.f
@@ -1,144 +1,221 @@
- SUBROUTINE STBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,K,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*)
-* ..
+*> \brief \b STBSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE STBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,K,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* STBSV solves one of the systems of equations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular band matrix, with ( k + 1 )
+*> diagonals.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* A*x = b, or A**T*x = b,
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**T*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with UPLO = 'U' or 'u', K specifies the number of
+*> super-diagonals of the matrix A.
+*> On entry with UPLO = 'L' or 'l', K specifies the number of
+*> sub-diagonals of the matrix A.
+*> K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer an upper
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer a lower
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that when DIAG = 'U' or 'u' the elements of the array A
+*> corresponding to the diagonal elements of the matrix are not
+*> referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular band matrix, with ( k + 1 )
-* diagonals.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup single_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**T*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with UPLO = 'U' or 'u', K specifies the number of
-* super-diagonals of the matrix A.
-* On entry with UPLO = 'L' or 'l', K specifies the number of
-* sub-diagonals of the matrix A.
-* K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer an upper
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer a lower
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that when DIAG = 'U' or 'u' the elements of the array A
-* corresponding to the diagonal elements of the matrix are not
-* referenced, but are assumed to be unity.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,K,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/stpmv.f b/BLAS/SRC/stpmv.f
index 573288e6..a32cf73f 100644
--- a/BLAS/SRC/stpmv.f
+++ b/BLAS/SRC/stpmv.f
@@ -1,101 +1,170 @@
- SUBROUTINE STPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- REAL AP(*),X(*)
-* ..
-*
-* Purpose
-* =======
-*
-* STPMV performs one of the matrix-vector operations
+*> \brief \b STPMV
*
-* x := A*x, or x := A**T*x,
+* =========== DOCUMENTATION ===========
*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular matrix, supplied in packed form.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**T*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
+* SUBROUTINE STPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* REAL AP(*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular matrix, supplied in packed form.
+*>
+*>\endverbatim
*
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**T*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
+*> respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
+*> respectively, and so on.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP - REAL array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
-* respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
-* respectively, and so on.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced, but are assumed to be unity.
-* Unchanged on exit.
+*> \date November 2011
*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
+*> \ingroup single_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ REAL AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/stpsv.f b/BLAS/SRC/stpsv.f
index aca8a7fc..d54a5da4 100644
--- a/BLAS/SRC/stpsv.f
+++ b/BLAS/SRC/stpsv.f
@@ -1,103 +1,172 @@
- SUBROUTINE STPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- REAL AP(*),X(*)
-* ..
+*> \brief \b STPSV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* STPSV solves one of the systems of equations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* A*x = b, or A**T*x = b,
-*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular matrix, supplied in packed form.
-*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**T*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
+* SUBROUTINE STPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* REAL AP(*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular matrix, supplied in packed form.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**T*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
+*> respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
+*> respectively, and so on.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP - REAL array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
-* respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
-* respectively, and so on.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced, but are assumed to be unity.
-* Unchanged on exit.
+*> \date November 2011
*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
+*> \ingroup single_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ REAL AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/strmm.f b/BLAS/SRC/strmm.f
index 9d76a16d..c366891e 100644
--- a/BLAS/SRC/strmm.f
+++ b/BLAS/SRC/strmm.f
@@ -1,129 +1,208 @@
- SUBROUTINE STRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER LDA,LDB,M,N
- CHARACTER DIAG,SIDE,TRANSA,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),B(LDB,*)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b STRMM
*
-* STRMM performs one of the matrix-matrix operations
+* =========== DOCUMENTATION ===========
*
-* B := alpha*op( A )*B, or B := alpha*B*op( A ),
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* where alpha is a scalar, B is an m by n matrix, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T.
-*
-* Arguments
+* Definition
* ==========
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether op( A ) multiplies B from
-* the left or right as follows:
-*
-* SIDE = 'L' or 'l' B := alpha*op( A )*B.
-*
-* SIDE = 'R' or 'r' B := alpha*B*op( A ).
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix A is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n' op( A ) = A.
-*
-* TRANSA = 'T' or 't' op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c' op( A ) = A**T.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit triangular
-* as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* SUBROUTINE STRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER LDA,LDB,M,N
+* CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),B(LDB,*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRMM performs one of the matrix-matrix operations
+*>
+*> B := alpha*op( A )*B, or B := alpha*B*op( A ),
+*>
+*> where alpha is a scalar, B is an m by n matrix, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T.
+*>
+*>\endverbatim
*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) multiplies B from
+*> the left or right as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' B := alpha*op( A )*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' B := alpha*B*op( A ).
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix A is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't' op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c' op( A ) = A**T.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit triangular
+*> as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, k ), where k is m
+*> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
+*> Before entry with UPLO = 'U' or 'u', the leading k by k
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading k by k
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
+*> then LDA must be at least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B, and on exit is overwritten by the
+*> transformed matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - REAL array of DIMENSION ( LDA, k ), where k is m
-* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
-* Before entry with UPLO = 'U' or 'u', the leading k by k
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading k by k
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
-* then LDA must be at least max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* B - REAL array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B, and on exit is overwritten by the
-* transformed matrix.
+*> \ingroup single_blas_level3
*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER LDA,LDB,M,N
+ CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),B(LDB,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/strmv.f b/BLAS/SRC/strmv.f
index f20cfa2d..dcfa15d1 100644
--- a/BLAS/SRC/strmv.f
+++ b/BLAS/SRC/strmv.f
@@ -1,104 +1,175 @@
- SUBROUTINE STRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*)
-* ..
+*> \brief \b STRMV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* STRMV performs one of the matrix-vector operations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* x := A*x, or x := A**T*x,
-*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular matrix.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**T*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+* SUBROUTINE STRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular matrix.
+*>
+*>\endverbatim
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**T*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
+*> \ingroup single_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/strsm.f b/BLAS/SRC/strsm.f
index 88880696..0568d971 100644
--- a/BLAS/SRC/strsm.f
+++ b/BLAS/SRC/strsm.f
@@ -1,132 +1,212 @@
- SUBROUTINE STRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-* .. Scalar Arguments ..
- REAL ALPHA
- INTEGER LDA,LDB,M,N
- CHARACTER DIAG,SIDE,TRANSA,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),B(LDB,*)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b STRSM
*
-* STRSM solves one of the matrix equations
+* =========== DOCUMENTATION ===========
*
-* op( A )*X = alpha*B, or X*op( A ) = alpha*B,
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T.
-*
-* The matrix X is overwritten on B.
-*
-* Arguments
+* Definition
* ==========
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether op( A ) appears on the left
-* or right of X as follows:
-*
-* SIDE = 'L' or 'l' op( A )*X = alpha*B.
-*
-* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix A is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n' op( A ) = A.
-*
-* TRANSA = 'T' or 't' op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c' op( A ) = A**T.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit triangular
-* as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* SUBROUTINE STRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+*
+* .. Scalar Arguments ..
+* REAL ALPHA
+* INTEGER LDA,LDB,M,N
+* CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),B(LDB,*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRSM solves one of the matrix equations
+*>
+*> op( A )*X = alpha*B, or X*op( A ) = alpha*B,
+*>
+*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T.
+*>
+*> The matrix X is overwritten on B.
+*>
+*>\endverbatim
*
-* ALPHA - REAL .
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) appears on the left
+*> or right of X as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix A is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't' op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c' op( A ) = A**T.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit triangular
+*> as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, k ),
+*> where k is m when SIDE = 'L' or 'l'
+*> and k is n when SIDE = 'R' or 'r'.
+*> Before entry with UPLO = 'U' or 'u', the leading k by k
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading k by k
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
+*> then LDA must be at least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the right-hand side matrix B, and on exit is
+*> overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - REAL array of DIMENSION ( LDA, k ), where k is m
-* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
-* Before entry with UPLO = 'U' or 'u', the leading k by k
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading k by k
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
-* then LDA must be at least max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* B - REAL array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the right-hand side matrix B, and on exit is
-* overwritten by the solution matrix X.
+*> \ingroup single_blas_level3
*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
-* Level 3 Blas routine.
-*
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ REAL ALPHA
+ INTEGER LDA,LDB,M,N
+ CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),B(LDB,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/strsv.f b/BLAS/SRC/strsv.f
index 02420fbf..c4b3f546 100644
--- a/BLAS/SRC/strsv.f
+++ b/BLAS/SRC/strsv.f
@@ -1,106 +1,177 @@
- SUBROUTINE STRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- REAL A(LDA,*),X(*)
-* ..
+*> \brief \b STRSV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* STRSV solves one of the systems of equations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* A*x = b, or A**T*x = b,
-*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular matrix.
-*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**T*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+* SUBROUTINE STRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* REAL A(LDA,*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular matrix.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**T*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - REAL array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* X - REAL array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
+*> \ingroup single_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ REAL A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/xerbla.f b/BLAS/SRC/xerbla.f
index 3a84150e..5d287b91 100644
--- a/BLAS/SRC/xerbla.f
+++ b/BLAS/SRC/xerbla.f
@@ -1,33 +1,76 @@
- SUBROUTINE XERBLA( SRNAME, INFO )
+*> \brief \b XERBLA
*
-* -- LAPACK auxiliary routine (preliminary version) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*(*) SRNAME
- INTEGER INFO
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE XERBLA( SRNAME, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER*(*) SRNAME
+* INTEGER INFO
+* ..
+*
* Purpose
* =======
*
-* XERBLA is an error handler for the LAPACK routines.
-* It is called by an LAPACK routine if an input parameter has an
-* invalid value. A message is printed and execution stops.
-*
-* Installers may consider modifying the STOP statement in order to
-* call system-specific exception-handling facilities.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> XERBLA is an error handler for the LAPACK routines.
+*> It is called by an LAPACK routine if an input parameter has an
+*> invalid value. A message is printed and execution stops.
+*>
+*> Installers may consider modifying the STOP statement in order to
+*> call system-specific exception-handling facilities.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SRNAME (input) CHARACTER*(*)
-* The name of the routine which called XERBLA.
+*> \param[in] SRNAME
+*> \verbatim
+*> SRNAME is CHARACTER*(*)
+*> The name of the routine which called XERBLA.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The position of the invalid parameter in the parameter list
+*> of the calling routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INFO (input) INTEGER
-* The position of the invalid parameter in the parameter list
-* of the calling routine.
+*> \date November 2011
+*
+*> \ingroup aux_blas
+*
+* =====================================================================
+ SUBROUTINE XERBLA( SRNAME, INFO )
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*(*) SRNAME
+ INTEGER INFO
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/xerbla_array.f b/BLAS/SRC/xerbla_array.f
index 350b59bc..c6173eee 100644
--- a/BLAS/SRC/xerbla_array.f
+++ b/BLAS/SRC/xerbla_array.f
@@ -1,51 +1,98 @@
- SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO)
+*> \brief \b XERBLA_ARRAY
*
-* -- LAPACK auxiliary routine (version 3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-* September 19, 2006
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER SRNAME_LEN, INFO
-* ..
-* .. Array Arguments ..
- CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER SRNAME_LEN, INFO
+* ..
+* .. Array Arguments ..
+* CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
+* ..
+*
* Purpose
* =======
*
-* XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK
-* and BLAS error handler. Rather than taking a Fortran string argument
-* as the function's name, XERBLA_ARRAY takes an array of single
-* characters along with the array's length. XERBLA_ARRAY then copies
-* up to 32 characters of that array into a Fortran string and passes
-* that to XERBLA. If called with a non-positive SRNAME_LEN,
-* XERBLA_ARRAY will call XERBLA with a string of all blank characters.
-*
-* Say some macro or other device makes XERBLA_ARRAY available to C99
-* by a name lapack_xerbla and with a common Fortran calling convention.
-* Then a C99 program could invoke XERBLA via:
-* {
-* int flen = strlen(__func__);
-* lapack_xerbla(__func__, &flen, &info);
-* }
-*
-* Providing XERBLA_ARRAY is not necessary for intercepting LAPACK
-* errors. XERBLA_ARRAY calls XERBLA.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK
+*> and BLAS error handler. Rather than taking a Fortran string argument
+*> as the function's name, XERBLA_ARRAY takes an array of single
+*> characters along with the array's length. XERBLA_ARRAY then copies
+*> up to 32 characters of that array into a Fortran string and passes
+*> that to XERBLA. If called with a non-positive SRNAME_LEN,
+*> XERBLA_ARRAY will call XERBLA with a string of all blank characters.
+*>
+*> Say some macro or other device makes XERBLA_ARRAY available to C99
+*> by a name lapack_xerbla and with a common Fortran calling convention.
+*> Then a C99 program could invoke XERBLA via:
+*> {
+*> int flen = strlen(__func__);
+*> lapack_xerbla(__func__, &flen, &info);
+*> }
+*>
+*> Providing XERBLA_ARRAY is not necessary for intercepting LAPACK
+*> errors. XERBLA_ARRAY calls XERBLA.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SRNAME_ARRAY (input) CHARACTER(1) array, dimension (SRNAME_LEN)
-* The name of the routine which called XERBLA_ARRAY.
+*> \param[in] SRNAME_ARRAY
+*> \verbatim
+*> SRNAME_ARRAY is CHARACTER(1) array, dimension (SRNAME_LEN)
+*> The name of the routine which called XERBLA_ARRAY.
+*> \endverbatim
+*>
+*> \param[in] SRNAME_LEN
+*> \verbatim
+*> SRNAME_LEN is INTEGER
+*> The length of the name in SRNAME_ARRAY.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The position of the invalid parameter in the parameter list
+*> of the calling routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SRNAME_LEN (input) INTEGER
-* The length of the name in SRNAME_ARRAY.
+*> \date November 2011
*
-* INFO (input) INTEGER
-* The position of the invalid parameter in the parameter list
-* of the calling routine.
+*> \ingroup aux_blas
+*
+* =====================================================================
+ SUBROUTINE XERBLA_ARRAY(SRNAME_ARRAY, SRNAME_LEN, INFO)
+*
+* -- Reference BLAS level1 routine (version 3.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER SRNAME_LEN, INFO
+* ..
+* .. Array Arguments ..
+ CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zaxpy.f b/BLAS/SRC/zaxpy.f
index 07afb5f3..0daa8870 100644
--- a/BLAS/SRC/zaxpy.f
+++ b/BLAS/SRC/zaxpy.f
@@ -1,22 +1,71 @@
- SUBROUTINE ZAXPY(N,ZA,ZX,INCX,ZY,INCY)
-* .. Scalar Arguments ..
- COMPLEX*16 ZA
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*),ZY(*)
-* ..
+*> \brief \b ZAXPY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZAXPY(N,ZA,ZX,INCX,ZY,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ZA
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*),ZY(*)
+* ..
+*
* Purpose
* =======
*
-* ZAXPY constant times a vector plus a vector.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZAXPY constant times a vector plus a vector.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZAXPY(N,ZA,ZX,INCX,ZY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ COMPLEX*16 ZA
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*),ZY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zcopy.f b/BLAS/SRC/zcopy.f
index 1038cb96..93ee92d0 100644
--- a/BLAS/SRC/zcopy.f
+++ b/BLAS/SRC/zcopy.f
@@ -1,21 +1,69 @@
- SUBROUTINE ZCOPY(N,ZX,INCX,ZY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*),ZY(*)
-* ..
+*> \brief \b ZCOPY
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCOPY(N,ZX,INCX,ZY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*),ZY(*)
+* ..
+*
* Purpose
* =======
*
-* ZCOPY copies a vector, x, to a vector, y.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCOPY copies a vector, x, to a vector, y.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, linpack, 4/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZCOPY(N,ZX,INCX,ZY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, linpack, 4/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*),ZY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zdotc.f b/BLAS/SRC/zdotc.f
index 2f6b6532..4ed407d0 100644
--- a/BLAS/SRC/zdotc.f
+++ b/BLAS/SRC/zdotc.f
@@ -1,21 +1,69 @@
- COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*),ZY(*)
-* ..
+*> \brief \b ZDOTC
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*),ZY(*)
+* ..
+*
* Purpose
* =======
*
-* ZDOTC forms the dot product of a vector.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDOTC forms the dot product of a vector.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ COMPLEX*16 FUNCTION ZDOTC(N,ZX,INCX,ZY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*),ZY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zdotu.f b/BLAS/SRC/zdotu.f
index 1722c8af..9d481a97 100644
--- a/BLAS/SRC/zdotu.f
+++ b/BLAS/SRC/zdotu.f
@@ -1,21 +1,69 @@
- COMPLEX*16 FUNCTION ZDOTU(N,ZX,INCX,ZY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*),ZY(*)
-* ..
+*> \brief \b ZDOTU
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* COMPLEX*16 FUNCTION ZDOTU(N,ZX,INCX,ZY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*),ZY(*)
+* ..
+*
* Purpose
* =======
*
-* ZDOTU forms the dot product of two vectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDOTU forms the dot product of two vectors.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ COMPLEX*16 FUNCTION ZDOTU(N,ZX,INCX,ZY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*),ZY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zdrot.f b/BLAS/SRC/zdrot.f
index 20d04361..3caaaca6 100644
--- a/BLAS/SRC/zdrot.f
+++ b/BLAS/SRC/zdrot.f
@@ -1,5 +1,110 @@
+*> \brief \b ZDROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDROT( N, CX, INCX, CY, INCY, C, S )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* DOUBLE PRECISION C, S
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 CX( * ), CY( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Applies a plane rotation, where the cos and sin (c and s) are real
+*> and the vectors cx and cy are complex.
+*> jack dongarra, linpack, 3/11/78.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the vectors cx and cy.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*> CX is COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array CX must contain the n
+*> element vector cx. On exit, CX is overwritten by the updated
+*> vector cx.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> CX. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*> CY is COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array CY must contain the n
+*> element vector cy. On exit, CY is overwritten by the updated
+*> vector cy.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> CY. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> On entry, C specifies the cosine, cos.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION
+*> On entry, S specifies the sine, sin.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
+* =====================================================================
SUBROUTINE ZDROT( N, CX, INCX, CY, INCY, C, S )
*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
DOUBLE PRECISION C, S
@@ -8,51 +113,6 @@
COMPLEX*16 CX( * ), CY( * )
* ..
*
-* Purpose
-* =======
-*
-* Applies a plane rotation, where the cos and sin (c and s) are real
-* and the vectors cx and cy are complex.
-* jack dongarra, linpack, 3/11/78.
-*
-* Arguments
-* ==========
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the vectors cx and cy.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* CX (input) COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array CX must contain the n
-* element vector cx. On exit, CX is overwritten by the updated
-* vector cx.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* CX. INCX must not be zero.
-* Unchanged on exit.
-*
-* CY (input) COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array CY must contain the n
-* element vector cy. On exit, CY is overwritten by the updated
-* vector cy.
-*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* CY. INCY must not be zero.
-* Unchanged on exit.
-*
-* C (input) DOUBLE PRECISION
-* On entry, C specifies the cosine, cos.
-* Unchanged on exit.
-*
-* S (input) DOUBLE PRECISION
-* On entry, S specifies the sine, sin.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/BLAS/SRC/zdscal.f b/BLAS/SRC/zdscal.f
index d4d96c75..327309cf 100644
--- a/BLAS/SRC/zdscal.f
+++ b/BLAS/SRC/zdscal.f
@@ -1,23 +1,72 @@
- SUBROUTINE ZDSCAL(N,DA,ZX,INCX)
-* .. Scalar Arguments ..
- DOUBLE PRECISION DA
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*)
-* ..
+*> \brief \b ZDSCAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZDSCAL(N,DA,ZX,INCX)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION DA
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*)
+* ..
+*
* Purpose
* =======
*
-* ZDSCAL scales a vector by a constant.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDSCAL scales a vector by a constant.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZDSCAL(N,DA,ZX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ DOUBLE PRECISION DA
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zgbmv.f b/BLAS/SRC/zgbmv.f
index 3000be42..216cb5b8 100644
--- a/BLAS/SRC/zgbmv.f
+++ b/BLAS/SRC/zgbmv.f
@@ -1,134 +1,213 @@
- SUBROUTINE ZGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER INCX,INCY,KL,KU,LDA,M,N
- CHARACTER TRANS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b ZGBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER INCX,INCY,KL,KU,LDA,M,N
+* CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZGBMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBMV performs one of the matrix-vector operations
+*>
+*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
+*>
+*> y := alpha*A**H*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n band matrix, with kl sub-diagonals and ku super-diagonals.
+*>
+*>\endverbatim
*
-* y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> On entry, KL specifies the number of sub-diagonals of the
+*> matrix A. KL must satisfy 0 .le. KL.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> On entry, KU specifies the number of super-diagonals of the
+*> matrix A. KU must satisfy 0 .le. KU.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry, the leading ( kl + ku + 1 ) by n part of the
+*> array A must contain the matrix of coefficients, supplied
+*> column by column, with the leading diagonal of the matrix in
+*> row ( ku + 1 ) of the array, the first super-diagonal
+*> starting at position 2 in row ku, the first sub-diagonal
+*> starting at position 1 in row ( ku + 2 ), and so on.
+*> Elements in the array A that do not correspond to elements
+*> in the band matrix (such as the top left ku by ku triangle)
+*> are not referenced.
+*> The following program segment will transfer a band matrix
+*> from conventional full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> K = KU + 1 - J
+*> DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
+*> A( K + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( kl + ku + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A**H*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n band matrix, with kl sub-diagonals and ku super-diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
-*
-* TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
-*
-* TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* KL - INTEGER.
-* On entry, KL specifies the number of sub-diagonals of the
-* matrix A. KL must satisfy 0 .le. KL.
-* Unchanged on exit.
-*
-* KU - INTEGER.
-* On entry, KU specifies the number of super-diagonals of the
-* matrix A. KU must satisfy 0 .le. KU.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry, the leading ( kl + ku + 1 ) by n part of the
-* array A must contain the matrix of coefficients, supplied
-* column by column, with the leading diagonal of the matrix in
-* row ( ku + 1 ) of the array, the first super-diagonal
-* starting at position 2 in row ku, the first sub-diagonal
-* starting at position 1 in row ( ku + 2 ), and so on.
-* Elements in the array A that do not correspond to elements
-* in the band matrix (such as the top left ku by ku triangle)
-* are not referenced.
-* The following program segment will transfer a band matrix
-* from conventional full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* K = KU + 1 - J
-* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
-* A( K + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( kl + ku + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGBMV(TRANS,M,N,KL,KU,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER INCX,INCY,KL,KU,LDA,M,N
+ CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zgemm.f b/BLAS/SRC/zgemm.f
index 8954cbfb..6aaf515e 100644
--- a/BLAS/SRC/zgemm.f
+++ b/BLAS/SRC/zgemm.f
@@ -1,133 +1,215 @@
- SUBROUTINE ZGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER K,LDA,LDB,LDC,M,N
- CHARACTER TRANSA,TRANSB
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b ZGEMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER K,LDA,LDB,LDC,M,N
+* CHARACTER TRANSA,TRANSB
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* ZGEMM performs one of the matrix-matrix operations
-*
-* C := alpha*op( A )*op( B ) + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*op( A )*op( B ) + beta*C,
+*>
+*> where op( X ) is one of
+*>
+*> op( X ) = X or op( X ) = X**T or op( X ) = X**H,
+*>
+*> alpha and beta are scalars, and A, B and C are matrices, with op( A )
+*> an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+*>
+*>\endverbatim
*
-* where op( X ) is one of
+* Arguments
+* =========
+*
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n', op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't', op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c', op( A ) = A**H.
+*> \endverbatim
+*>
+*> \param[in] TRANSB
+*> \verbatim
+*> TRANSB is CHARACTER*1
+*> On entry, TRANSB specifies the form of op( B ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'N' or 'n', op( B ) = B.
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'T' or 't', op( B ) = B**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSB = 'C' or 'c', op( B ) = B**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix
+*> op( A ) and of the matrix C. M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix
+*> op( B ) and the number of columns of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry, K specifies the number of columns of the matrix
+*> op( A ) and the number of rows of the matrix op( B ). K must
+*> be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANSA = 'N' or 'n', and is m otherwise.
+*> Before entry with TRANSA = 'N' or 'n', the leading m by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by m part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANSA = 'N' or 'n' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
+*> n when TRANSB = 'N' or 'n', and is k otherwise.
+*> Before entry with TRANSB = 'N' or 'n', the leading k by n
+*> part of the array B must contain the matrix B, otherwise
+*> the leading n by k part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANSB = 'N' or 'n' then
+*> LDB must be at least max( 1, k ), otherwise LDB must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n matrix
+*> ( alpha*op( A )*op( B ) + beta*C ).
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* op( X ) = X or op( X ) = X**T or op( X ) = X**H,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* alpha and beta are scalars, and A, B and C are matrices, with op( A )
-* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level3
*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n', op( A ) = A.
-*
-* TRANSA = 'T' or 't', op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c', op( A ) = A**H.
-*
-* Unchanged on exit.
-*
-* TRANSB - CHARACTER*1.
-* On entry, TRANSB specifies the form of op( B ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSB = 'N' or 'n', op( B ) = B.
-*
-* TRANSB = 'T' or 't', op( B ) = B**T.
-*
-* TRANSB = 'C' or 'c', op( B ) = B**H.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix
-* op( A ) and of the matrix C. M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix
-* op( B ) and the number of columns of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry, K specifies the number of columns of the matrix
-* op( A ) and the number of rows of the matrix op( B ). K must
-* be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANSA = 'N' or 'n', and is m otherwise.
-* Before entry with TRANSA = 'N' or 'n', the leading m by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by m part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANSA = 'N' or 'n' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, k ).
-* Unchanged on exit.
-*
-* B - COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
-* n when TRANSB = 'N' or 'n', and is k otherwise.
-* Before entry with TRANSB = 'N' or 'n', the leading k by n
-* part of the array B must contain the matrix B, otherwise
-* the leading n by k part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANSB = 'N' or 'n' then
-* LDB must be at least max( 1, k ), otherwise LDB must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - COMPLEX*16 array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n matrix
-* ( alpha*op( A )*op( B ) + beta*C ).
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEMM(TRANSA,TRANSB,M,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER K,LDA,LDB,LDC,M,N
+ CHARACTER TRANSA,TRANSB
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zgemv.f b/BLAS/SRC/zgemv.f
index 9415940e..9eaf4450 100644
--- a/BLAS/SRC/zgemv.f
+++ b/BLAS/SRC/zgemv.f
@@ -1,107 +1,183 @@
- SUBROUTINE ZGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER INCX,INCY,LDA,M,N
- CHARACTER TRANS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b ZGEMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER INCX,INCY,LDA,M,N
+* CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZGEMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEMV performs one of the matrix-vector operations
+*>
+*> y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
+*>
+*> y := alpha*A**H*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*>\endverbatim
*
-* y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, or
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A**H*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' y := alpha*A*x + beta*y.
-*
-* TRANS = 'T' or 't' y := alpha*A**T*x + beta*y.
-*
-* TRANS = 'C' or 'c' y := alpha*A**H*x + beta*y.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEMV(TRANS,M,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER INCX,INCY,LDA,M,N
+ CHARACTER TRANS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zgerc.f b/BLAS/SRC/zgerc.f
index a8872b49..9457319f 100644
--- a/BLAS/SRC/zgerc.f
+++ b/BLAS/SRC/zgerc.f
@@ -1,82 +1,151 @@
- SUBROUTINE ZGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA
- INTEGER INCX,INCY,LDA,M,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b ZGERC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA
+* INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZGERC performs the rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGERC performs the rank 1 operation
+*>
+*> A := alpha*x*y**H + A,
+*>
+*> where alpha is a scalar, x is an m element vector, y is an n element
+*> vector and A is an m by n matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the m
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients. On exit, A is
+*> overwritten by the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x is an m element vector, y is an n element
-* vector and A is an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( m - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the m
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients. On exit, A is
-* overwritten by the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGERC(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA
+ INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zgeru.f b/BLAS/SRC/zgeru.f
index 3ece8018..26acb99f 100644
--- a/BLAS/SRC/zgeru.f
+++ b/BLAS/SRC/zgeru.f
@@ -1,82 +1,151 @@
- SUBROUTINE ZGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA
- INTEGER INCX,INCY,LDA,M,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b ZGERU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA
+* INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZGERU performs the rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGERU performs the rank 1 operation
+*>
+*> A := alpha*x*y**T + A,
+*>
+*> where alpha is a scalar, x is an m element vector, y is an n element
+*> vector and A is an m by n matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the m
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients. On exit, A is
+*> overwritten by the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**T + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x is an m element vector, y is an n element
-* vector and A is an m by n matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( m - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the m
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients. On exit, A is
-* overwritten by the updated matrix.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGERU(M,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA
+ INTEGER INCX,INCY,LDA,M,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zhbmv.f b/BLAS/SRC/zhbmv.f
index 90988684..0adaec41 100644
--- a/BLAS/SRC/zhbmv.f
+++ b/BLAS/SRC/zhbmv.f
@@ -1,136 +1,215 @@
- SUBROUTINE ZHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER INCX,INCY,K,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b ZHBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER INCX,INCY,K,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZHBMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n hermitian band matrix, with k super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the band matrix A is being supplied as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> being supplied.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry, K specifies the number of super-diagonals of the
+*> matrix A. K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the hermitian matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer the upper
+*> triangular part of a hermitian band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the hermitian matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer the lower
+*> triangular part of a hermitian band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n hermitian band matrix, with k super-diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the band matrix A is being supplied as
-* follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* being supplied.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* being supplied.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry, K specifies the number of super-diagonals of the
-* matrix A. K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the hermitian matrix, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer the upper
-* triangular part of a hermitian band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the hermitian matrix, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer the lower
-* triangular part of a hermitian band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHBMV(UPLO,N,K,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER INCX,INCY,K,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zhemm.f b/BLAS/SRC/zhemm.f
index 0537e919..8d7218c3 100644
--- a/BLAS/SRC/zhemm.f
+++ b/BLAS/SRC/zhemm.f
@@ -1,139 +1,217 @@
- SUBROUTINE ZHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER LDA,LDB,LDC,M,N
- CHARACTER SIDE,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b ZHEMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER LDA,LDB,LDC,M,N
+* CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* ZHEMM performs one of the matrix-matrix operations
-*
-* C := alpha*A*B + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*A*B + beta*C,
+*>
+*> or
+*>
+*> C := alpha*B*A + beta*C,
+*>
+*> where alpha and beta are scalars, A is an hermitian matrix and B and
+*> C are m by n matrices.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether the hermitian matrix A
+*> appears on the left or right in the operation as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the hermitian matrix A is to be
+*> referenced as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of the
+*> hermitian matrix is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of the
+*> hermitian matrix is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix C.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix C.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*> m when SIDE = 'L' or 'l' and is n otherwise.
+*> Before entry with SIDE = 'L' or 'l', the m by m part of
+*> the array A must contain the hermitian matrix, such that
+*> when UPLO = 'U' or 'u', the leading m by m upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the hermitian matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading m by m lower triangular part of the array A
+*> must contain the lower triangular part of the hermitian
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> Before entry with SIDE = 'R' or 'r', the n by n part of
+*> the array A must contain the hermitian matrix, such that
+*> when UPLO = 'U' or 'u', the leading n by n upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the hermitian matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading n by n lower triangular part of the array A
+*> must contain the lower triangular part of the hermitian
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*B*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, A is an hermitian matrix and B and
-* C are m by n matrices.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level3
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether the hermitian matrix A
-* appears on the left or right in the operation as follows:
-*
-* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
-*
-* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the hermitian matrix A is to be
-* referenced as follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of the
-* hermitian matrix is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of the
-* hermitian matrix is to be referenced.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix C.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix C.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
-* m when SIDE = 'L' or 'l' and is n otherwise.
-* Before entry with SIDE = 'L' or 'l', the m by m part of
-* the array A must contain the hermitian matrix, such that
-* when UPLO = 'U' or 'u', the leading m by m upper triangular
-* part of the array A must contain the upper triangular part
-* of the hermitian matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading m by m lower triangular part of the array A
-* must contain the lower triangular part of the hermitian
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Before entry with SIDE = 'R' or 'r', the n by n part of
-* the array A must contain the hermitian matrix, such that
-* when UPLO = 'U' or 'u', the leading n by n upper triangular
-* part of the array A must contain the upper triangular part
-* of the hermitian matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading n by n lower triangular part of the array A
-* must contain the lower triangular part of the hermitian
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* B - COMPLEX*16 array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - COMPLEX*16 array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n updated
-* matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHEMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER LDA,LDB,LDC,M,N
+ CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zhemv.f b/BLAS/SRC/zhemv.f
index 8e61e93b..c566a1fe 100644
--- a/BLAS/SRC/zhemv.f
+++ b/BLAS/SRC/zhemv.f
@@ -1,105 +1,178 @@
- SUBROUTINE ZHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER INCX,INCY,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b ZHEMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER INCX,INCY,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZHEMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n hermitian matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of A is not referenced.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n hermitian matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of A is not referenced.
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHEMV(UPLO,N,ALPHA,A,LDA,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER INCX,INCY,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zher.f b/BLAS/SRC/zher.f
index 898a1e03..b2af0227 100644
--- a/BLAS/SRC/zher.f
+++ b/BLAS/SRC/zher.f
@@ -1,92 +1,159 @@
- SUBROUTINE ZHER(UPLO,N,ALPHA,X,INCX,A,LDA)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER INCX,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*)
-* ..
+*> \brief \b ZHER
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHER(UPLO,N,ALPHA,X,INCX,A,LDA)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER INCX,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* ZHER performs the hermitian rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHER performs the hermitian rank 1 operation
+*>
+*> A := alpha*x*x**H + A,
+*>
+*> where alpha is a real scalar, x is an n element vector and A is an
+*> n by n hermitian matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*x**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a real scalar, x is an n element vector and A is an
-* n by n hermitian matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHER(UPLO,N,ALPHA,X,INCX,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER INCX,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zher2.f b/BLAS/SRC/zher2.f
index bb414e9e..0c4f94d9 100644
--- a/BLAS/SRC/zher2.f
+++ b/BLAS/SRC/zher2.f
@@ -1,103 +1,174 @@
- SUBROUTINE ZHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA
- INTEGER INCX,INCY,LDA,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*),Y(*)
-* ..
+*> \brief \b ZHER2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA
+* INTEGER INCX,INCY,LDA,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZHER2 performs the hermitian rank 2 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHER2 performs the hermitian rank 2 operation
+*>
+*> A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
+*>
+*> where alpha is a scalar, x and y are n element vectors and A is an n
+*> by n hermitian matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x and y are n element vectors and A is an n
-* by n hermitian matrix.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHER2(UPLO,N,ALPHA,X,INCX,Y,INCY,A,LDA)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA
+ INTEGER INCX,INCY,LDA,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zher2k.f b/BLAS/SRC/zher2k.f
index e5f7be83..bfcf27fd 100644
--- a/BLAS/SRC/zher2k.f
+++ b/BLAS/SRC/zher2k.f
@@ -1,145 +1,225 @@
- SUBROUTINE ZHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA
- DOUBLE PRECISION BETA
- INTEGER K,LDA,LDB,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b ZHER2K
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA
+* DOUBLE PRECISION BETA
+* INTEGER K,LDA,LDB,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* ZHER2K performs one of the hermitian rank 2k operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHER2K performs one of the hermitian rank 2k operations
+*>
+*> C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C,
+*>
+*> where alpha and beta are scalars with beta real, C is an n by n
+*> hermitian matrix and A and B are n by k matrices in the first case
+*> and k by n matrices in the second case.
+*>
+*>\endverbatim
*
-* C := alpha*A*B**H + conjg( alpha )*B*A**H + beta*C,
-*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*B**H +
+*> conjg( alpha )*B*A**H +
+*> beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**H*B +
+*> conjg( alpha )*B**H*A +
+*> beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrices A and B, and on entry with
+*> TRANS = 'C' or 'c', K specifies the number of rows of the
+*> matrices A and B. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 .
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array B must contain the matrix B, otherwise
+*> the leading k by n part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDB must be at least max( 1, n ), otherwise LDB must
+*> be at least max( 1, k ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION .
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**H*B + conjg( alpha )*B**H*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars with beta real, C is an n by n
-* hermitian matrix and A and B are n by k matrices in the first case
-* and k by n matrices in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*B**H +
-* conjg( alpha )*B*A**H +
-* beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**H*B +
-* conjg( alpha )*B**H*A +
-* beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrices A and B, and on entry with
-* TRANS = 'C' or 'c', K specifies the number of rows of the
-* matrices A and B. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* B - COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array B must contain the matrix B, otherwise
-* the leading k by n part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDB must be at least max( 1, n ), otherwise LDB must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - COMPLEX*16 array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> -- Modified 8-Nov-93 to set C(J,J) to DBLE( C(J,J) ) when BETA = 1.
+*> Ed Anderson, Cray Research Inc.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
-*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Modified 8-Nov-93 to set C(J,J) to DBLE( C(J,J) ) when BETA = 1.
-* Ed Anderson, Cray Research Inc.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA
+ DOUBLE PRECISION BETA
+ INTEGER K,LDA,LDB,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zherk.f b/BLAS/SRC/zherk.f
index af04413a..f1795c40 100644
--- a/BLAS/SRC/zherk.f
+++ b/BLAS/SRC/zherk.f
@@ -1,125 +1,199 @@
- SUBROUTINE ZHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA,BETA
- INTEGER K,LDA,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),C(LDC,*)
-* ..
+*> \brief \b ZHERK
+*
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA,BETA
+* INTEGER K,LDA,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* ZHERK performs one of the hermitian rank k operations
-*
-* C := alpha*A*A**H + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHERK performs one of the hermitian rank k operations
+*>
+*> C := alpha*A*A**H + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**H*A + beta*C,
+*>
+*> where alpha and beta are real scalars, C is an n by n hermitian
+*> matrix and A is an n by k matrix in the first case and a k by n
+*> matrix in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with
+*> TRANS = 'C' or 'c', K specifies the number of rows of the
+*> matrix A. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION .
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION.
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the hermitian matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the hermitian matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**H*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are real scalars, C is an n by n hermitian
-* matrix and A is an n by k matrix in the first case and a k by n
-* matrix in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with
-* TRANS = 'C' or 'c', K specifies the number of rows of the
-* matrix A. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - DOUBLE PRECISION.
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - COMPLEX*16 array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the hermitian matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the hermitian matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> -- Modified 8-Nov-93 to set C(J,J) to DBLE( C(J,J) ) when BETA = 1.
+*> Ed Anderson, Cray Research Inc.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHERK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
-* Level 3 Blas routine.
-*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Modified 8-Nov-93 to set C(J,J) to DBLE( C(J,J) ) when BETA = 1.
-* Ed Anderson, Cray Research Inc.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA,BETA
+ INTEGER K,LDA,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zhpmv.f b/BLAS/SRC/zhpmv.f
index 514cd20a..2304ed87 100644
--- a/BLAS/SRC/zhpmv.f
+++ b/BLAS/SRC/zhpmv.f
@@ -1,102 +1,173 @@
- SUBROUTINE ZHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER INCX,INCY,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP(*),X(*),Y(*)
-* ..
+*> \brief \b ZHPMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER INCX,INCY,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP(*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZHPMV performs the matrix-vector operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n hermitian matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* y := alpha*A*x + beta*y,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n hermitian matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AP - COMPLEX*16 array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on.
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHPMV(UPLO,N,ALPHA,AP,X,INCX,BETA,Y,INCY)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER INCX,INCY,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP(*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zhpr.f b/BLAS/SRC/zhpr.f
index 859805d2..d80e359f 100644
--- a/BLAS/SRC/zhpr.f
+++ b/BLAS/SRC/zhpr.f
@@ -1,89 +1,154 @@
- SUBROUTINE ZHPR(UPLO,N,ALPHA,X,INCX,AP)
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA
- INTEGER INCX,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP(*),X(*)
-* ..
+*> \brief \b ZHPR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPR(UPLO,N,ALPHA,X,INCX,AP)
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA
+* INTEGER INCX,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP(*),X(*)
+* ..
+*
* Purpose
* =======
*
-* ZHPR performs the hermitian rank 1 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPR performs the hermitian rank 1 operation
+*>
+*> A := alpha*x*x**H + A,
+*>
+*> where alpha is a real scalar, x is an n element vector and A is an
+*> n by n hermitian matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION.
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*x**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a real scalar, x is an n element vector and A is an
-* n by n hermitian matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - DOUBLE PRECISION.
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* AP - COMPLEX*16 array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHPR(UPLO,N,ALPHA,X,INCX,AP)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA
+ INTEGER INCX,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zhpr2.f b/BLAS/SRC/zhpr2.f
index 48b3591f..0d0c4ea5 100644
--- a/BLAS/SRC/zhpr2.f
+++ b/BLAS/SRC/zhpr2.f
@@ -1,100 +1,169 @@
- SUBROUTINE ZHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA
- INTEGER INCX,INCY,N
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP(*),X(*),Y(*)
-* ..
+*> \brief \b ZHPR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA
+* INTEGER INCX,INCY,N
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP(*),X(*),Y(*)
+* ..
+*
* Purpose
* =======
*
-* ZHPR2 performs the hermitian rank 2 operation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPR2 performs the hermitian rank 2 operation
+*>
+*> A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
+*>
+*> where alpha is a scalar, x and y are n element vectors and A is an
+*> n by n hermitian matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the hermitian matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A := alpha*x*y**H + conjg( alpha )*y*x**H + A,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha is a scalar, x and y are n element vectors and A is an
-* n by n hermitian matrix, supplied in packed form.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y.
-* Unchanged on exit.
-*
-* INCY - INTEGER.
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
-* AP - COMPLEX*16 array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the hermitian matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHPR2(UPLO,N,ALPHA,X,INCX,Y,INCY,AP)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA
+ INTEGER INCX,INCY,N
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP(*),X(*),Y(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zrotg.f b/BLAS/SRC/zrotg.f
index c25fa654..daa0f667 100644
--- a/BLAS/SRC/zrotg.f
+++ b/BLAS/SRC/zrotg.f
@@ -1,14 +1,55 @@
+*> \brief \b ZROTG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZROTG(CA,CB,C,S)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 CA,CB,S
+* DOUBLE PRECISION C
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZROTG determines a double complex Givens rotation.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
+* =====================================================================
SUBROUTINE ZROTG(CA,CB,C,S)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
* .. Scalar Arguments ..
COMPLEX*16 CA,CB,S
DOUBLE PRECISION C
* ..
*
-* Purpose
-* =======
-*
-* ZROTG determines a double complex Givens rotation.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/BLAS/SRC/zscal.f b/BLAS/SRC/zscal.f
index d5acf683..67148062 100644
--- a/BLAS/SRC/zscal.f
+++ b/BLAS/SRC/zscal.f
@@ -1,23 +1,72 @@
- SUBROUTINE ZSCAL(N,ZA,ZX,INCX)
-* .. Scalar Arguments ..
- COMPLEX*16 ZA
- INTEGER INCX,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*)
-* ..
+*> \brief \b ZSCAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZSCAL(N,ZA,ZX,INCX)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ZA
+* INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*)
+* ..
+*
* Purpose
* =======
*
-* ZSCAL scales a vector by a constant.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSCAL scales a vector by a constant.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, 3/11/78.
+*> modified 3/93 to return if incx .le. 0.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZSCAL(N,ZA,ZX,INCX)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, 3/11/78.
-* modified 3/93 to return if incx .le. 0.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ COMPLEX*16 ZA
+ INTEGER INCX,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zswap.f b/BLAS/SRC/zswap.f
index d3bb047e..8000bfc2 100644
--- a/BLAS/SRC/zswap.f
+++ b/BLAS/SRC/zswap.f
@@ -1,21 +1,69 @@
- SUBROUTINE ZSWAP(N,ZX,INCX,ZY,INCY)
-* .. Scalar Arguments ..
- INTEGER INCX,INCY,N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 ZX(*),ZY(*)
-* ..
+*> \brief \b ZSWAP
*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSWAP(N,ZX,INCX,ZY,INCY)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 ZX(*),ZY(*)
+* ..
+*
* Purpose
* =======
*
-* ZSWAP interchanges two vectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSWAP interchanges two vectors.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_level1
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> jack dongarra, 3/11/78.
+*> modified 12/3/93, array(1) declarations changed to array(*)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZSWAP(N,ZX,INCX,ZY,INCY)
+*
+* -- Reference BLAS level1 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* jack dongarra, 3/11/78.
-* modified 12/3/93, array(1) declarations changed to array(*)
+* .. Scalar Arguments ..
+ INTEGER INCX,INCY,N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 ZX(*),ZY(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zsymm.f b/BLAS/SRC/zsymm.f
index e0192e9f..6ceda01d 100644
--- a/BLAS/SRC/zsymm.f
+++ b/BLAS/SRC/zsymm.f
@@ -1,137 +1,215 @@
- SUBROUTINE ZSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER LDA,LDB,LDC,M,N
- CHARACTER SIDE,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b ZSYMM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER LDA,LDB,LDC,M,N
+* CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* ZSYMM performs one of the matrix-matrix operations
-*
-* C := alpha*A*B + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYMM performs one of the matrix-matrix operations
+*>
+*> C := alpha*A*B + beta*C,
+*>
+*> or
+*>
+*> C := alpha*B*A + beta*C,
+*>
+*> where alpha and beta are scalars, A is a symmetric matrix and B and
+*> C are m by n matrices.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether the symmetric matrix A
+*> appears on the left or right in the operation as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the symmetric matrix A is to be
+*> referenced as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of the
+*> symmetric matrix is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of the
+*> symmetric matrix is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix C.
+*> M must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix C.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*> m when SIDE = 'L' or 'l' and is n otherwise.
+*> Before entry with SIDE = 'L' or 'l', the m by m part of
+*> the array A must contain the symmetric matrix, such that
+*> when UPLO = 'U' or 'u', the leading m by m upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the symmetric matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading m by m lower triangular part of the array A
+*> must contain the lower triangular part of the symmetric
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> Before entry with SIDE = 'R' or 'r', the n by n part of
+*> the array A must contain the symmetric matrix, such that
+*> when UPLO = 'U' or 'u', the leading n by n upper triangular
+*> part of the array A must contain the upper triangular part
+*> of the symmetric matrix and the strictly lower triangular
+*> part of A is not referenced, and when UPLO = 'L' or 'l',
+*> the leading n by n lower triangular part of the array A
+*> must contain the lower triangular part of the symmetric
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), otherwise LDA must be at
+*> least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then C need not be set on input.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*> Before entry, the leading m by n part of the array C must
+*> contain the matrix C, except when beta is zero, in which
+*> case C need not be set on entry.
+*> On exit, the array C is overwritten by the m by n updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*B*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, A is a symmetric matrix and B and
-* C are m by n matrices.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level3
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether the symmetric matrix A
-* appears on the left or right in the operation as follows:
-*
-* SIDE = 'L' or 'l' C := alpha*A*B + beta*C,
-*
-* SIDE = 'R' or 'r' C := alpha*B*A + beta*C,
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the symmetric matrix A is to be
-* referenced as follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of the
-* symmetric matrix is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of the
-* symmetric matrix is to be referenced.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of the matrix C.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the number of columns of the matrix C.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
-* m when SIDE = 'L' or 'l' and is n otherwise.
-* Before entry with SIDE = 'L' or 'l', the m by m part of
-* the array A must contain the symmetric matrix, such that
-* when UPLO = 'U' or 'u', the leading m by m upper triangular
-* part of the array A must contain the upper triangular part
-* of the symmetric matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading m by m lower triangular part of the array A
-* must contain the lower triangular part of the symmetric
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Before entry with SIDE = 'R' or 'r', the n by n part of
-* the array A must contain the symmetric matrix, such that
-* when UPLO = 'U' or 'u', the leading n by n upper triangular
-* part of the array A must contain the upper triangular part
-* of the symmetric matrix and the strictly lower triangular
-* part of A is not referenced, and when UPLO = 'L' or 'l',
-* the leading n by n lower triangular part of the array A
-* must contain the lower triangular part of the symmetric
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), otherwise LDA must be at
-* least max( 1, n ).
-* Unchanged on exit.
-*
-* B - COMPLEX*16 array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then C need not be set on input.
-* Unchanged on exit.
-*
-* C - COMPLEX*16 array of DIMENSION ( LDC, n ).
-* Before entry, the leading m by n part of the array C must
-* contain the matrix C, except when beta is zero, in which
-* case C need not be set on entry.
-* On exit, the array C is overwritten by the m by n updated
-* matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZSYMM(SIDE,UPLO,M,N,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER LDA,LDB,LDC,M,N
+ CHARACTER SIDE,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zsyr2k.f b/BLAS/SRC/zsyr2k.f
index a9bd0f4d..898febce 100644
--- a/BLAS/SRC/zsyr2k.f
+++ b/BLAS/SRC/zsyr2k.f
@@ -1,136 +1,214 @@
- SUBROUTINE ZSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER K,LDA,LDB,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
-* ..
+*> \brief \b ZSYR2K
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER K,LDA,LDB,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* ZSYR2K performs one of the symmetric rank 2k operations
-*
-* C := alpha*A*B**T + alpha*B*A**T + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYR2K performs one of the symmetric rank 2k operations
+*>
+*> C := alpha*A*B**T + alpha*B*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*B + alpha*B**T*A + beta*C,
+*>
+*> where alpha and beta are scalars, C is an n by n symmetric matrix
+*> and A and B are n by k matrices in the first case and k by n
+*> matrices in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
+*> beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
+*> beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrices A and B, and on entry with
+*> TRANS = 'T' or 't', K specifies the number of rows of the
+*> matrices A and B. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array B must contain the matrix B, otherwise
+*> the leading k by n part of the array B must contain the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDB must be at least max( 1, n ), otherwise LDB must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**T*B + alpha*B**T*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, C is an n by n symmetric matrix
-* and A and B are n by k matrices in the first case and k by n
-* matrices in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*B**T + alpha*B*A**T +
-* beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*B + alpha*B**T*A +
-* beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrices A and B, and on entry with
-* TRANS = 'T' or 't', K specifies the number of rows of the
-* matrices A and B. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* B - COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array B must contain the matrix B, otherwise
-* the leading k by n part of the array B must contain the
-* matrix B.
-* Unchanged on exit.
-*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDB must be at least max( 1, n ), otherwise LDB must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - COMPLEX*16 array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER K,LDA,LDB,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),B(LDB,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/zsyrk.f b/BLAS/SRC/zsyrk.f
index b2acf31e..db6d567a 100644
--- a/BLAS/SRC/zsyrk.f
+++ b/BLAS/SRC/zsyrk.f
@@ -1,119 +1,193 @@
- SUBROUTINE ZSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA,BETA
- INTEGER K,LDA,LDC,N
- CHARACTER TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),C(LDC,*)
-* ..
+*> \brief \b ZSYRK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA,BETA
+* INTEGER K,LDA,LDC,N
+* CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),C(LDC,*)
+* ..
+*
* Purpose
* =======
*
-* ZSYRK performs one of the symmetric rank k operations
-*
-* C := alpha*A*A**T + beta*C,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYRK performs one of the symmetric rank k operations
+*>
+*> C := alpha*A*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*A + beta*C,
+*>
+*> where alpha and beta are scalars, C is an n by n symmetric matrix
+*> and A is an n by k matrix in the first case and a k by n matrix
+*> in the second case.
+*>
+*>\endverbatim
*
-* or
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with
+*> TRANS = 'T' or 't', K specifies the number of rows of the
+*> matrix A. K must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
+*> k when TRANS = 'N' or 'n', and is n otherwise.
+*> Before entry with TRANS = 'N' or 'n', the leading n by k
+*> part of the array A must contain the matrix A, otherwise
+*> the leading k by n part of the array A must contain the
+*> matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array of DIMENSION ( LDC, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array C must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of C is not referenced. On exit, the
+*> upper triangular part of the array C is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array C must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of C is not referenced. On exit, the
+*> lower triangular part of the array C is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the first dimension of C as declared
+*> in the calling (sub) program. LDC must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A**T*A + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where alpha and beta are scalars, C is an n by n symmetric matrix
-* and A is an n by k matrix in the first case and a k by n matrix
-* in the second case.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level3
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with
-* TRANS = 'T' or 't', K specifies the number of rows of the
-* matrix A. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is
-* k when TRANS = 'N' or 'n', and is n otherwise.
-* Before entry with TRANS = 'N' or 'n', the leading n by k
-* part of the array A must contain the matrix A, otherwise
-* the leading k by n part of the array A must contain the
-* matrix A.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16 .
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C - COMPLEX*16 array of DIMENSION ( LDC, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array C must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of C is not referenced. On exit, the
-* upper triangular part of the array C is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array C must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of C is not referenced. On exit, the
-* lower triangular part of the array C is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDC - INTEGER.
-* On entry, LDC specifies the first dimension of C as declared
-* in the calling (sub) program. LDC must be at least
-* max( 1, n ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZSYRK(UPLO,TRANS,N,K,ALPHA,A,LDA,BETA,C,LDC)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA,BETA
+ INTEGER K,LDA,LDC,N
+ CHARACTER TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),C(LDC,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ztbmv.f b/BLAS/SRC/ztbmv.f
index 2d2fbe17..781ac531 100644
--- a/BLAS/SRC/ztbmv.f
+++ b/BLAS/SRC/ztbmv.f
@@ -1,141 +1,218 @@
- SUBROUTINE ZTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,K,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*)
-* ..
+*> \brief \b ZTBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,K,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* ZTBMV performs one of the matrix-vector operations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x, or x := A**H*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular band matrix, with ( k + 1 ) diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**H*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with UPLO = 'U' or 'u', K specifies the number of
+*> super-diagonals of the matrix A.
+*> On entry with UPLO = 'L' or 'l', K specifies the number of
+*> sub-diagonals of the matrix A.
+*> K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer an upper
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer a lower
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that when DIAG = 'U' or 'u' the elements of the array A
+*> corresponding to the diagonal elements of the matrix are not
+*> referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is (input/output) COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* x := A*x, or x := A**T*x, or x := A**H*x,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular band matrix, with ( k + 1 ) diagonals.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**H*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with UPLO = 'U' or 'u', K specifies the number of
-* super-diagonals of the matrix A.
-* On entry with UPLO = 'L' or 'l', K specifies the number of
-* sub-diagonals of the matrix A.
-* K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer an upper
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer a lower
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that when DIAG = 'U' or 'u' the elements of the array A
-* corresponding to the diagonal elements of the matrix are not
-* referenced, but are assumed to be unity.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTBMV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,K,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ztbsv.f b/BLAS/SRC/ztbsv.f
index 80ebb740..b4828146 100644
--- a/BLAS/SRC/ztbsv.f
+++ b/BLAS/SRC/ztbsv.f
@@ -1,144 +1,221 @@
- SUBROUTINE ZTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,K,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*)
-* ..
+*> \brief \b ZTBSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,K,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*)
+* ..
+*
* Purpose
* =======
*
-* ZTBSV solves one of the systems of equations
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b, or A**H*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular band matrix, with ( k + 1 )
+*> diagonals.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* A*x = b, or A**T*x = b, or A**H*x = b,
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**H*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with UPLO = 'U' or 'u', K specifies the number of
+*> super-diagonals of the matrix A.
+*> On entry with UPLO = 'L' or 'l', K specifies the number of
+*> sub-diagonals of the matrix A.
+*> K must satisfy 0 .le. K.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer an upper
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the matrix of coefficients, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer a lower
+*> triangular band matrix from conventional full matrix storage
+*> to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Note that when DIAG = 'U' or 'u' the elements of the array A
+*> corresponding to the diagonal elements of the matrix are not
+*> referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular band matrix, with ( k + 1 )
-* diagonals.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
+*> \date November 2011
*
-* Arguments
-* ==========
+*> \ingroup complex16_blas_level2
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**H*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER.
-* On entry with UPLO = 'U' or 'u', K specifies the number of
-* super-diagonals of the matrix A.
-* On entry with UPLO = 'L' or 'l', K specifies the number of
-* sub-diagonals of the matrix A.
-* K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer an upper
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the matrix of coefficients, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer a lower
-* triangular band matrix from conventional full matrix storage
-* to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Note that when DIAG = 'U' or 'u' the elements of the array A
-* corresponding to the diagonal elements of the matrix are not
-* referenced, but are assumed to be unity.
-* Unchanged on exit.
-*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
-*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTBSV(UPLO,TRANS,DIAG,N,K,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,K,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ztpmv.f b/BLAS/SRC/ztpmv.f
index 33f4b52f..d4f71a47 100644
--- a/BLAS/SRC/ztpmv.f
+++ b/BLAS/SRC/ztpmv.f
@@ -1,101 +1,170 @@
- SUBROUTINE ZTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP(*),X(*)
-* ..
-*
-* Purpose
-* =======
-*
-* ZTPMV performs one of the matrix-vector operations
+*> \brief \b ZTPMV
*
-* x := A*x, or x := A**T*x, or x := A**H*x,
+* =========== DOCUMENTATION ===========
*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular matrix, supplied in packed form.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**H*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
+* SUBROUTINE ZTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP(*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x, or x := A**H*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular matrix, supplied in packed form.
+*>
+*>\endverbatim
*
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**H*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
+*> respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
+*> respectively, and so on.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is (input/output) COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP - COMPLEX*16 array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
-* respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
-* respectively, and so on.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced, but are assumed to be unity.
-* Unchanged on exit.
+*> \date November 2011
*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
+*> \ingroup complex16_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTPMV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ztpsv.f b/BLAS/SRC/ztpsv.f
index 55eaf9e1..e12c1e9c 100644
--- a/BLAS/SRC/ztpsv.f
+++ b/BLAS/SRC/ztpsv.f
@@ -1,103 +1,172 @@
- SUBROUTINE ZTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP(*),X(*)
-* ..
+*> \brief \b ZTPSV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* ZTPSV solves one of the systems of equations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* A*x = b, or A**T*x = b, or A**H*x = b,
-*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular matrix, supplied in packed form.
-*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**H*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
+* SUBROUTINE ZTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP(*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b, or A**H*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular matrix, supplied in packed form.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**H*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array of DIMENSION at least
+*> ( ( n*( n + 1 ) )/2 ).
+*> Before entry with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
+*> respectively, and so on.
+*> Before entry with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular matrix packed sequentially,
+*> column by column, so that AP( 1 ) contains a( 1, 1 ),
+*> AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
+*> respectively, and so on.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP - COMPLEX*16 array of DIMENSION at least
-* ( ( n*( n + 1 ) )/2 ).
-* Before entry with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 )
-* respectively, and so on.
-* Before entry with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular matrix packed sequentially,
-* column by column, so that AP( 1 ) contains a( 1, 1 ),
-* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 )
-* respectively, and so on.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced, but are assumed to be unity.
-* Unchanged on exit.
+*> \date November 2011
*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
+*> \ingroup complex16_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTPSV(UPLO,TRANS,DIAG,N,AP,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP(*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ztrmm.f b/BLAS/SRC/ztrmm.f
index e02efd43..a54a53c1 100644
--- a/BLAS/SRC/ztrmm.f
+++ b/BLAS/SRC/ztrmm.f
@@ -1,129 +1,208 @@
- SUBROUTINE ZTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA
- INTEGER LDA,LDB,M,N
- CHARACTER DIAG,SIDE,TRANSA,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),B(LDB,*)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b ZTRMM
*
-* ZTRMM performs one of the matrix-matrix operations
+* =========== DOCUMENTATION ===========
*
-* B := alpha*op( A )*B, or B := alpha*B*op( A )
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* where alpha is a scalar, B is an m by n matrix, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T or op( A ) = A**H.
-*
-* Arguments
+* Definition
* ==========
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether op( A ) multiplies B from
-* the left or right as follows:
-*
-* SIDE = 'L' or 'l' B := alpha*op( A )*B.
-*
-* SIDE = 'R' or 'r' B := alpha*B*op( A ).
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix A is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n' op( A ) = A.
-*
-* TRANSA = 'T' or 't' op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c' op( A ) = A**H.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit triangular
-* as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* SUBROUTINE ZTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA
+* INTEGER LDA,LDB,M,N
+* CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),B(LDB,*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRMM performs one of the matrix-matrix operations
+*>
+*> B := alpha*op( A )*B, or B := alpha*B*op( A )
+*>
+*> where alpha is a scalar, B is an m by n matrix, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T or op( A ) = A**H.
+*>
+*>\endverbatim
*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) multiplies B from
+*> the left or right as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' B := alpha*op( A )*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' B := alpha*B*op( A ).
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix A is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't' op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c' op( A ) = A**H.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit triangular
+*> as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, k ), where k is m
+*> when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
+*> Before entry with UPLO = 'U' or 'u', the leading k by k
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading k by k
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
+*> then LDA must be at least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is (input/output) COMPLEX*16 array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the matrix B, and on exit is overwritten by the
+*> transformed matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - COMPLEX*16 array of DIMENSION ( LDA, k ), where k is m
-* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
-* Before entry with UPLO = 'U' or 'u', the leading k by k
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading k by k
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
-* then LDA must be at least max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* B - COMPLEX*16 array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the matrix B, and on exit is overwritten by the
-* transformed matrix.
+*> \ingroup complex16_blas_level3
*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTRMM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA
+ INTEGER LDA,LDB,M,N
+ CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),B(LDB,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ztrmv.f b/BLAS/SRC/ztrmv.f
index 345c8cd9..2c491498 100644
--- a/BLAS/SRC/ztrmv.f
+++ b/BLAS/SRC/ztrmv.f
@@ -1,104 +1,175 @@
- SUBROUTINE ZTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*)
-* ..
+*> \brief \b ZTRMV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* ZTRMV performs one of the matrix-vector operations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* x := A*x, or x := A**T*x, or x := A**H*x,
-*
-* where x is an n element vector and A is an n by n unit, or non-unit,
-* upper or lower triangular matrix.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' x := A*x.
-*
-* TRANS = 'T' or 't' x := A**T*x.
-*
-* TRANS = 'C' or 'c' x := A**H*x.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+* SUBROUTINE ZTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRMV performs one of the matrix-vector operations
+*>
+*> x := A*x, or x := A**T*x, or x := A**H*x,
+*>
+*> where x is an n element vector and A is an n by n unit, or non-unit,
+*> upper or lower triangular matrix.
+*>
+*>\endverbatim
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' x := A*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' x := A**T*x.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' x := A**H*x.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is (input/output) COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element vector x. On exit, X is overwritten with the
+*> tranformed vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element vector x. On exit, X is overwritten with the
-* tranformed vector x.
+*> \ingroup complex16_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*> The vector and matrix arguments are not referenced when N = 0, or M = 0
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTRMV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
-* The vector and matrix arguments are not referenced when N = 0, or M = 0
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ztrsm.f b/BLAS/SRC/ztrsm.f
index 4cfe33b8..fae9928a 100644
--- a/BLAS/SRC/ztrsm.f
+++ b/BLAS/SRC/ztrsm.f
@@ -1,131 +1,211 @@
- SUBROUTINE ZTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA
- INTEGER LDA,LDB,M,N
- CHARACTER DIAG,SIDE,TRANSA,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),B(LDB,*)
-* ..
-*
-* Purpose
-* =======
+*> \brief \b ZTRSM
*
-* ZTRSM solves one of the matrix equations
+* =========== DOCUMENTATION ===========
*
-* op( A )*X = alpha*B, or X*op( A ) = alpha*B,
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T or op( A ) = A**H.
-*
-* The matrix X is overwritten on B.
-*
-* Arguments
+* Definition
* ==========
*
-* SIDE - CHARACTER*1.
-* On entry, SIDE specifies whether op( A ) appears on the left
-* or right of X as follows:
-*
-* SIDE = 'L' or 'l' op( A )*X = alpha*B.
-*
-* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
-*
-* Unchanged on exit.
-*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix A is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANSA - CHARACTER*1.
-* On entry, TRANSA specifies the form of op( A ) to be used in
-* the matrix multiplication as follows:
-*
-* TRANSA = 'N' or 'n' op( A ) = A.
-*
-* TRANSA = 'T' or 't' op( A ) = A**T.
-*
-* TRANSA = 'C' or 'c' op( A ) = A**H.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit triangular
-* as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M - INTEGER.
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* SUBROUTINE ZTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA
+* INTEGER LDA,LDB,M,N
+* CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),B(LDB,*)
+* ..
+*
+* Purpose
+* =======
*
-* N - INTEGER.
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRSM solves one of the matrix equations
+*>
+*> op( A )*X = alpha*B, or X*op( A ) = alpha*B,
+*>
+*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T or op( A ) = A**H.
+*>
+*> The matrix X is overwritten on B.
+*>
+*>\endverbatim
*
-* ALPHA - COMPLEX*16 .
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) appears on the left
+*> or right of X as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix A is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> On entry, TRANSA specifies the form of op( A ) to be used in
+*> the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'T' or 't' op( A ) = A**T.
+*> \endverbatim
+*> \verbatim
+*> TRANSA = 'C' or 'c' op( A ) = A**H.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit triangular
+*> as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, k ),
+*> where k is m when SIDE = 'L' or 'l'
+*> and k is n when SIDE = 'R' or 'r'.
+*> Before entry with UPLO = 'U' or 'u', the leading k by k
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading k by k
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When SIDE = 'L' or 'l' then
+*> LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
+*> then LDA must be at least max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array of DIMENSION ( LDB, n ).
+*> Before entry, the leading m by n part of the array B must
+*> contain the right-hand side matrix B, and on exit is
+*> overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - COMPLEX*16 array of DIMENSION ( LDA, k ), where k is m
-* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'.
-* Before entry with UPLO = 'U' or 'u', the leading k by k
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading k by k
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When SIDE = 'L' or 'l' then
-* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r'
-* then LDA must be at least max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* B - COMPLEX*16 array of DIMENSION ( LDB, n ).
-* Before entry, the leading m by n part of the array B must
-* contain the right-hand side matrix B, and on exit is
-* overwritten by the solution matrix X.
+*> \ingroup complex16_blas_level3
*
-* LDB - INTEGER.
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 3 Blas routine.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTRSM(SIDE,UPLO,TRANSA,DIAG,M,N,ALPHA,A,LDA,B,LDB)
*
-* Level 3 Blas routine.
+* -- Reference BLAS level3 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA
+ INTEGER LDA,LDB,M,N
+ CHARACTER DIAG,SIDE,TRANSA,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),B(LDB,*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/SRC/ztrsv.f b/BLAS/SRC/ztrsv.f
index 2527445f..3696075b 100644
--- a/BLAS/SRC/ztrsv.f
+++ b/BLAS/SRC/ztrsv.f
@@ -1,106 +1,177 @@
- SUBROUTINE ZTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
-* .. Scalar Arguments ..
- INTEGER INCX,LDA,N
- CHARACTER DIAG,TRANS,UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A(LDA,*),X(*)
-* ..
+*> \brief \b ZTRSV
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* ZTRSV solves one of the systems of equations
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* A*x = b, or A**T*x = b, or A**H*x = b,
-*
-* where b and x are n element vectors and A is an n by n unit, or
-* non-unit, upper or lower triangular matrix.
-*
-* No test for singularity or near-singularity is included in this
-* routine. Such tests must be performed before calling this routine.
-*
-* Arguments
+* Definition
* ==========
*
-* UPLO - CHARACTER*1.
-* On entry, UPLO specifies whether the matrix is an upper or
-* lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' A is an upper triangular matrix.
-*
-* UPLO = 'L' or 'l' A is a lower triangular matrix.
-*
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1.
-* On entry, TRANS specifies the equations to be solved as
-* follows:
-*
-* TRANS = 'N' or 'n' A*x = b.
-*
-* TRANS = 'T' or 't' A**T*x = b.
-*
-* TRANS = 'C' or 'c' A**H*x = b.
-*
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1.
-* On entry, DIAG specifies whether or not A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
+* SUBROUTINE ZTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
+*
+* .. Scalar Arguments ..
+* INTEGER INCX,LDA,N
+* CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A(LDA,*),X(*)
+* ..
+*
+* Purpose
+* =======
*
-* Unchanged on exit.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRSV solves one of the systems of equations
+*>
+*> A*x = b, or A**T*x = b, or A**H*x = b,
+*>
+*> where b and x are n element vectors and A is an n by n unit, or
+*> non-unit, upper or lower triangular matrix.
+*>
+*> No test for singularity or near-singularity is included in this
+*> routine. Such tests must be performed before calling this routine.
+*>
+*>\endverbatim
*
-* N - INTEGER.
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the matrix is an upper or
+*> lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' A is an upper triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' A is a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the equations to be solved as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' A*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' A**T*x = b.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' A**H*x = b.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n ).
+*> Before entry with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular matrix and the strictly lower triangular part of
+*> A is not referenced.
+*> Before entry with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular matrix and the strictly upper triangular part of
+*> A is not referenced.
+*> Note that when DIAG = 'U' or 'u', the diagonal elements of
+*> A are not referenced either, but are assumed to be unity.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array of dimension at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the n
+*> element right-hand side vector b. On exit, X is overwritten
+*> with the solution vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A - COMPLEX*16 array of DIMENSION ( LDA, n ).
-* Before entry with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular matrix and the strictly lower triangular part of
-* A is not referenced.
-* Before entry with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular matrix and the strictly upper triangular part of
-* A is not referenced.
-* Note that when DIAG = 'U' or 'u', the diagonal elements of
-* A are not referenced either, but are assumed to be unity.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA - INTEGER.
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
+*> \date November 2011
*
-* X - COMPLEX*16 array of dimension at least
-* ( 1 + ( n - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the n
-* element right-hand side vector b. On exit, X is overwritten
-* with the solution vector x.
+*> \ingroup complex16_blas_level2
*
-* INCX - INTEGER.
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTRSV(UPLO,TRANS,DIAG,N,A,LDA,X,INCX)
*
-* Level 2 Blas routine.
+* -- Reference BLAS level2 routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
+* .. Scalar Arguments ..
+ INTEGER INCX,LDA,N
+ CHARACTER DIAG,TRANS,UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A(LDA,*),X(*)
+* ..
*
* =====================================================================
*
diff --git a/BLAS/TESTING/cblat1.f b/BLAS/TESTING/cblat1.f
index d45b0d3b..c8be436f 100644
--- a/BLAS/TESTING/cblat1.f
+++ b/BLAS/TESTING/cblat1.f
@@ -1,7 +1,50 @@
+*> \brief \b CBLAT1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM CBLAT1
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the COMPLEX Level 1 BLAS.
+*> Based upon the original BLAS test routine together with:
+*>
+*> F06GAF Example Program Text
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_testing
+*
+* =====================================================================
PROGRAM CBLAT1
-* Test program for the COMPLEX Level 1 BLAS.
-* Based upon the original BLAS test routine together with:
-* F06GAF Example Program Text
+*
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* =====================================================================
+*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
diff --git a/BLAS/TESTING/cblat2.f b/BLAS/TESTING/cblat2.f
index e9484017..35f76afa 100644
--- a/BLAS/TESTING/cblat2.f
+++ b/BLAS/TESTING/cblat2.f
@@ -1,72 +1,115 @@
+*> \brief \b CBLAT2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM CBLAT2
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the COMPLEX Level 2 Blas.
+*>
+*> The program must be driven by a short data file. The first 18 records
+*> of the file are read using list-directed input, the last 17 records
+*> are read using the format ( A6, L2 ). An annotated example of a data
+*> file can be obtained by deleting the first 3 characters from the
+*> following 35 lines:
+*> 'cblat2.out' NAME OF SUMMARY OUTPUT FILE
+*> 6 UNIT NUMBER OF SUMMARY FILE
+*> 'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE
+*> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
+*> F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
+*> F LOGICAL FLAG, T TO STOP ON FAILURES.
+*> T LOGICAL FLAG, T TO TEST ERROR EXITS.
+*> 16.0 THRESHOLD VALUE OF TEST RATIO
+*> 6 NUMBER OF VALUES OF N
+*> 0 1 2 3 5 9 VALUES OF N
+*> 4 NUMBER OF VALUES OF K
+*> 0 1 2 4 VALUES OF K
+*> 4 NUMBER OF VALUES OF INCX AND INCY
+*> 1 2 -1 -2 VALUES OF INCX AND INCY
+*> 3 NUMBER OF VALUES OF ALPHA
+*> (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
+*> 3 NUMBER OF VALUES OF BETA
+*> (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
+*> CGEMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CGBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHEMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHPMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CTRMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CTBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CTPMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CTRSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CTBSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CTPSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> CGERC T PUT F FOR NO TEST. SAME COLUMNS.
+*> CGERU T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHER T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHPR T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHER2 T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHPR2 T PUT F FOR NO TEST. SAME COLUMNS.
+*>
+*> Further Details
+*> ===============
+*>
+*> See:
+*>
+*> Dongarra J. J., Du Croz J. J., Hammarling S. and Hanson R. J..
+*> An extended set of Fortran Basic Linear Algebra Subprograms.
+*>
+*> Technical Memoranda Nos. 41 (revision 3) and 81, Mathematics
+*> and Computer Science Division, Argonne National Laboratory,
+*> 9700 South Cass Avenue, Argonne, Illinois 60439, US.
+*>
+*> Or
+*>
+*> NAG Technical Reports TR3/87 and TR4/87, Numerical Algorithms
+*> Group Ltd., NAG Central Office, 256 Banbury Road, Oxford
+*> OX2 7DE, UK, and Numerical Algorithms Group Inc., 1101 31st
+*> Street, Suite 100, Downers Grove, Illinois 60515-1263, USA.
+*>
+*>
+*> -- Written on 10-August-1987.
+*> Richard Hanson, Sandia National Labs.
+*> Jeremy Du Croz, NAG Central Office.
+*>
+*> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
+*> can be run multiple times without deleting generated
+*> output files (susan)
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_testing
+*
+* =====================================================================
PROGRAM CBLAT2
*
-* Test program for the COMPLEX Level 2 Blas.
-*
-* The program must be driven by a short data file. The first 18 records
-* of the file are read using list-directed input, the last 17 records
-* are read using the format ( A6, L2 ). An annotated example of a data
-* file can be obtained by deleting the first 3 characters from the
-* following 35 lines:
-* 'cblat2.out' NAME OF SUMMARY OUTPUT FILE
-* 6 UNIT NUMBER OF SUMMARY FILE
-* 'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE
-* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
-* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
-* F LOGICAL FLAG, T TO STOP ON FAILURES.
-* T LOGICAL FLAG, T TO TEST ERROR EXITS.
-* 16.0 THRESHOLD VALUE OF TEST RATIO
-* 6 NUMBER OF VALUES OF N
-* 0 1 2 3 5 9 VALUES OF N
-* 4 NUMBER OF VALUES OF K
-* 0 1 2 4 VALUES OF K
-* 4 NUMBER OF VALUES OF INCX AND INCY
-* 1 2 -1 -2 VALUES OF INCX AND INCY
-* 3 NUMBER OF VALUES OF ALPHA
-* (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
-* 3 NUMBER OF VALUES OF BETA
-* (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
-* CGEMV T PUT F FOR NO TEST. SAME COLUMNS.
-* CGBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* CHEMV T PUT F FOR NO TEST. SAME COLUMNS.
-* CHBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* CHPMV T PUT F FOR NO TEST. SAME COLUMNS.
-* CTRMV T PUT F FOR NO TEST. SAME COLUMNS.
-* CTBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* CTPMV T PUT F FOR NO TEST. SAME COLUMNS.
-* CTRSV T PUT F FOR NO TEST. SAME COLUMNS.
-* CTBSV T PUT F FOR NO TEST. SAME COLUMNS.
-* CTPSV T PUT F FOR NO TEST. SAME COLUMNS.
-* CGERC T PUT F FOR NO TEST. SAME COLUMNS.
-* CGERU T PUT F FOR NO TEST. SAME COLUMNS.
-* CHER T PUT F FOR NO TEST. SAME COLUMNS.
-* CHPR T PUT F FOR NO TEST. SAME COLUMNS.
-* CHER2 T PUT F FOR NO TEST. SAME COLUMNS.
-* CHPR2 T PUT F FOR NO TEST. SAME COLUMNS.
-*
-* See:
-*
-* Dongarra J. J., Du Croz J. J., Hammarling S. and Hanson R. J..
-* An extended set of Fortran Basic Linear Algebra Subprograms.
-*
-* Technical Memoranda Nos. 41 (revision 3) and 81, Mathematics
-* and Computer Science Division, Argonne National Laboratory,
-* 9700 South Cass Avenue, Argonne, Illinois 60439, US.
-*
-* Or
-*
-* NAG Technical Reports TR3/87 and TR4/87, Numerical Algorithms
-* Group Ltd., NAG Central Office, 256 Banbury Road, Oxford
-* OX2 7DE, UK, and Numerical Algorithms Group Inc., 1101 31st
-* Street, Suite 100, Downers Grove, Illinois 60515-1263, USA.
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-*
-* -- Written on 10-August-1987.
-* Richard Hanson, Sandia National Labs.
-* Jeremy Du Croz, NAG Central Office.
-*
-* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
-* can be run multiple times without deleting generated
-* output files (susan)
+* =====================================================================
*
* .. Parameters ..
INTEGER NIN
diff --git a/BLAS/TESTING/cblat3.f b/BLAS/TESTING/cblat3.f
index 5cc4af5e..a84229ee 100644
--- a/BLAS/TESTING/cblat3.f
+++ b/BLAS/TESTING/cblat3.f
@@ -1,54 +1,97 @@
+*> \brief \b CBLAT3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM CBLAT3
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the COMPLEX Level 3 Blas.
+*>
+*> The program must be driven by a short data file. The first 14 records
+*> of the file are read using list-directed input, the last 9 records
+*> are read using the format ( A6, L2 ). An annotated example of a data
+*> file can be obtained by deleting the first 3 characters from the
+*> following 23 lines:
+*> 'cblat3.out' NAME OF SUMMARY OUTPUT FILE
+*> 6 UNIT NUMBER OF SUMMARY FILE
+*> 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
+*> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
+*> F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
+*> F LOGICAL FLAG, T TO STOP ON FAILURES.
+*> T LOGICAL FLAG, T TO TEST ERROR EXITS.
+*> 16.0 THRESHOLD VALUE OF TEST RATIO
+*> 6 NUMBER OF VALUES OF N
+*> 0 1 2 3 5 9 VALUES OF N
+*> 3 NUMBER OF VALUES OF ALPHA
+*> (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
+*> 3 NUMBER OF VALUES OF BETA
+*> (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
+*> CGEMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHEMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> CSYMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> CTRMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> CTRSM T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHERK T PUT F FOR NO TEST. SAME COLUMNS.
+*> CSYRK T PUT F FOR NO TEST. SAME COLUMNS.
+*> CHER2K T PUT F FOR NO TEST. SAME COLUMNS.
+*> CSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
+*>
+*> Further Details
+*> ===============
+*>
+*> See:
+*>
+*> Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
+*> A Set of Level 3 Basic Linear Algebra Subprograms.
+*>
+*> Technical Memorandum No.88 (Revision 1), Mathematics and
+*> Computer Science Division, Argonne National Laboratory, 9700
+*> South Cass Avenue, Argonne, Illinois 60439, US.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
+*> can be run multiple times without deleting generated
+*> output files (susan)
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_blas_testing
+*
+* =====================================================================
PROGRAM CBLAT3
*
-* Test program for the COMPLEX Level 3 Blas.
-*
-* The program must be driven by a short data file. The first 14 records
-* of the file are read using list-directed input, the last 9 records
-* are read using the format ( A6, L2 ). An annotated example of a data
-* file can be obtained by deleting the first 3 characters from the
-* following 23 lines:
-* 'cblat3.out' NAME OF SUMMARY OUTPUT FILE
-* 6 UNIT NUMBER OF SUMMARY FILE
-* 'CBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
-* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
-* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
-* F LOGICAL FLAG, T TO STOP ON FAILURES.
-* T LOGICAL FLAG, T TO TEST ERROR EXITS.
-* 16.0 THRESHOLD VALUE OF TEST RATIO
-* 6 NUMBER OF VALUES OF N
-* 0 1 2 3 5 9 VALUES OF N
-* 3 NUMBER OF VALUES OF ALPHA
-* (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
-* 3 NUMBER OF VALUES OF BETA
-* (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
-* CGEMM T PUT F FOR NO TEST. SAME COLUMNS.
-* CHEMM T PUT F FOR NO TEST. SAME COLUMNS.
-* CSYMM T PUT F FOR NO TEST. SAME COLUMNS.
-* CTRMM T PUT F FOR NO TEST. SAME COLUMNS.
-* CTRSM T PUT F FOR NO TEST. SAME COLUMNS.
-* CHERK T PUT F FOR NO TEST. SAME COLUMNS.
-* CSYRK T PUT F FOR NO TEST. SAME COLUMNS.
-* CHER2K T PUT F FOR NO TEST. SAME COLUMNS.
-* CSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
-*
-* See:
-*
-* Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
-* A Set of Level 3 Basic Linear Algebra Subprograms.
-*
-* Technical Memorandum No.88 (Revision 1), Mathematics and
-* Computer Science Division, Argonne National Laboratory, 9700
-* South Cass Avenue, Argonne, Illinois 60439, US.
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
-*
-* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
-* can be run multiple times without deleting generated
-* output files (susan)
+* =====================================================================
*
* .. Parameters ..
INTEGER NIN
diff --git a/BLAS/TESTING/dblat1.f b/BLAS/TESTING/dblat1.f
index 249b6abf..568160a3 100644
--- a/BLAS/TESTING/dblat1.f
+++ b/BLAS/TESTING/dblat1.f
@@ -1,7 +1,50 @@
+*> \brief \b DBLAT1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM DBLAT1
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the DOUBLE PRECISION Level 1 BLAS.
+*>
+*> Based upon the original BLAS test routine together with:
+*> F06EAF Example Program Text
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_testing
+*
+* =====================================================================
PROGRAM DBLAT1
-* Test program for the DOUBLE PRECISION Level 1 BLAS.
-* Based upon the original BLAS test routine together with:
-* F06EAF Example Program Text
+*
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* =====================================================================
+*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
diff --git a/BLAS/TESTING/dblat2.f b/BLAS/TESTING/dblat2.f
index 297bce68..5e07e2ab 100644
--- a/BLAS/TESTING/dblat2.f
+++ b/BLAS/TESTING/dblat2.f
@@ -1,71 +1,114 @@
+*> \brief \b DBLAT2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM DBLAT2
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the DOUBLE PRECISION Level 2 Blas.
+*>
+*> The program must be driven by a short data file. The first 18 records
+*> of the file are read using list-directed input, the last 16 records
+*> are read using the format ( A6, L2 ). An annotated example of a data
+*> file can be obtained by deleting the first 3 characters from the
+*> following 34 lines:
+*> 'dblat2.out' NAME OF SUMMARY OUTPUT FILE
+*> 6 UNIT NUMBER OF SUMMARY FILE
+*> 'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
+*> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
+*> F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
+*> F LOGICAL FLAG, T TO STOP ON FAILURES.
+*> T LOGICAL FLAG, T TO TEST ERROR EXITS.
+*> 16.0 THRESHOLD VALUE OF TEST RATIO
+*> 6 NUMBER OF VALUES OF N
+*> 0 1 2 3 5 9 VALUES OF N
+*> 4 NUMBER OF VALUES OF K
+*> 0 1 2 4 VALUES OF K
+*> 4 NUMBER OF VALUES OF INCX AND INCY
+*> 1 2 -1 -2 VALUES OF INCX AND INCY
+*> 3 NUMBER OF VALUES OF ALPHA
+*> 0.0 1.0 0.7 VALUES OF ALPHA
+*> 3 NUMBER OF VALUES OF BETA
+*> 0.0 1.0 0.9 VALUES OF BETAC
+*> DGEMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DGBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSYMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSPMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DTRMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DTBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DTPMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DTRSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DTBSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DTPSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> DGER T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSYR T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSPR T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSYR2 T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSPR2 T PUT F FOR NO TEST. SAME COLUMNS.
+*>
+*> Further Details
+*> ===============
+*>
+*> See:
+*>
+*> Dongarra J. J., Du Croz J. J., Hammarling S. and Hanson R. J..
+*> An extended set of Fortran Basic Linear Algebra Subprograms.
+*>
+*> Technical Memoranda Nos. 41 (revision 3) and 81, Mathematics
+*> and Computer Science Division, Argonne National Laboratory,
+*> 9700 South Cass Avenue, Argonne, Illinois 60439, US.
+*>
+*> Or
+*>
+*> NAG Technical Reports TR3/87 and TR4/87, Numerical Algorithms
+*> Group Ltd., NAG Central Office, 256 Banbury Road, Oxford
+*> OX2 7DE, UK, and Numerical Algorithms Group Inc., 1101 31st
+*> Street, Suite 100, Downers Grove, Illinois 60515-1263, USA.
+*>
+*>
+*> -- Written on 10-August-1987.
+*> Richard Hanson, Sandia National Labs.
+*> Jeremy Du Croz, NAG Central Office.
+*>
+*> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
+*> can be run multiple times without deleting generated
+*> output files (susan)
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_testing
+*
+* =====================================================================
PROGRAM DBLAT2
*
-* Test program for the DOUBLE PRECISION Level 2 Blas.
-*
-* The program must be driven by a short data file. The first 18 records
-* of the file are read using list-directed input, the last 16 records
-* are read using the format ( A6, L2 ). An annotated example of a data
-* file can be obtained by deleting the first 3 characters from the
-* following 34 lines:
-* 'dblat2.out' NAME OF SUMMARY OUTPUT FILE
-* 6 UNIT NUMBER OF SUMMARY FILE
-* 'DBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
-* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
-* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
-* F LOGICAL FLAG, T TO STOP ON FAILURES.
-* T LOGICAL FLAG, T TO TEST ERROR EXITS.
-* 16.0 THRESHOLD VALUE OF TEST RATIO
-* 6 NUMBER OF VALUES OF N
-* 0 1 2 3 5 9 VALUES OF N
-* 4 NUMBER OF VALUES OF K
-* 0 1 2 4 VALUES OF K
-* 4 NUMBER OF VALUES OF INCX AND INCY
-* 1 2 -1 -2 VALUES OF INCX AND INCY
-* 3 NUMBER OF VALUES OF ALPHA
-* 0.0 1.0 0.7 VALUES OF ALPHA
-* 3 NUMBER OF VALUES OF BETA
-* 0.0 1.0 0.9 VALUES OF BETAC
-* DGEMV T PUT F FOR NO TEST. SAME COLUMNS.
-* DGBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* DSYMV T PUT F FOR NO TEST. SAME COLUMNS.
-* DSBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* DSPMV T PUT F FOR NO TEST. SAME COLUMNS.
-* DTRMV T PUT F FOR NO TEST. SAME COLUMNS.
-* DTBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* DTPMV T PUT F FOR NO TEST. SAME COLUMNS.
-* DTRSV T PUT F FOR NO TEST. SAME COLUMNS.
-* DTBSV T PUT F FOR NO TEST. SAME COLUMNS.
-* DTPSV T PUT F FOR NO TEST. SAME COLUMNS.
-* DGER T PUT F FOR NO TEST. SAME COLUMNS.
-* DSYR T PUT F FOR NO TEST. SAME COLUMNS.
-* DSPR T PUT F FOR NO TEST. SAME COLUMNS.
-* DSYR2 T PUT F FOR NO TEST. SAME COLUMNS.
-* DSPR2 T PUT F FOR NO TEST. SAME COLUMNS.
-*
-* See:
-*
-* Dongarra J. J., Du Croz J. J., Hammarling S. and Hanson R. J..
-* An extended set of Fortran Basic Linear Algebra Subprograms.
-*
-* Technical Memoranda Nos. 41 (revision 3) and 81, Mathematics
-* and Computer Science Division, Argonne National Laboratory,
-* 9700 South Cass Avenue, Argonne, Illinois 60439, US.
-*
-* Or
-*
-* NAG Technical Reports TR3/87 and TR4/87, Numerical Algorithms
-* Group Ltd., NAG Central Office, 256 Banbury Road, Oxford
-* OX2 7DE, UK, and Numerical Algorithms Group Inc., 1101 31st
-* Street, Suite 100, Downers Grove, Illinois 60515-1263, USA.
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-*
-* -- Written on 10-August-1987.
-* Richard Hanson, Sandia National Labs.
-* Jeremy Du Croz, NAG Central Office.
-*
-* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
-* can be run multiple times without deleting generated
-* output files (susan)
+* =====================================================================
*
* .. Parameters ..
INTEGER NIN
diff --git a/BLAS/TESTING/dblat3.f b/BLAS/TESTING/dblat3.f
index dab3ce5e..87a3e09d 100644
--- a/BLAS/TESTING/dblat3.f
+++ b/BLAS/TESTING/dblat3.f
@@ -1,51 +1,94 @@
+*> \brief \b DBLAT3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM DBLAT3
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the DOUBLE PRECISION Level 3 Blas.
+*>
+*> The program must be driven by a short data file. The first 14 records
+*> of the file are read using list-directed input, the last 6 records
+*> are read using the format ( A6, L2 ). An annotated example of a data
+*> file can be obtained by deleting the first 3 characters from the
+*> following 20 lines:
+*> 'dblat3.out' NAME OF SUMMARY OUTPUT FILE
+*> 6 UNIT NUMBER OF SUMMARY FILE
+*> 'DBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
+*> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
+*> F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
+*> F LOGICAL FLAG, T TO STOP ON FAILURES.
+*> T LOGICAL FLAG, T TO TEST ERROR EXITS.
+*> 16.0 THRESHOLD VALUE OF TEST RATIO
+*> 6 NUMBER OF VALUES OF N
+*> 0 1 2 3 5 9 VALUES OF N
+*> 3 NUMBER OF VALUES OF ALPHA
+*> 0.0 1.0 0.7 VALUES OF ALPHA
+*> 3 NUMBER OF VALUES OF BETA
+*> 0.0 1.0 1.3 VALUES OF BETA
+*> DGEMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSYMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> DTRMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> DTRSM T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSYRK T PUT F FOR NO TEST. SAME COLUMNS.
+*> DSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
+*>
+*> Further Details
+*> ===============
+*>
+*> See:
+*>
+*> Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
+*> A Set of Level 3 Basic Linear Algebra Subprograms.
+*>
+*> Technical Memorandum No.88 (Revision 1), Mathematics and
+*> Computer Science Division, Argonne National Laboratory, 9700
+*> South Cass Avenue, Argonne, Illinois 60439, US.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
+*> can be run multiple times without deleting generated
+*> output files (susan)
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_blas_testing
+*
+* =====================================================================
PROGRAM DBLAT3
*
-* Test program for the DOUBLE PRECISION Level 3 Blas.
-*
-* The program must be driven by a short data file. The first 14 records
-* of the file are read using list-directed input, the last 6 records
-* are read using the format ( A6, L2 ). An annotated example of a data
-* file can be obtained by deleting the first 3 characters from the
-* following 20 lines:
-* 'dblat3.out' NAME OF SUMMARY OUTPUT FILE
-* 6 UNIT NUMBER OF SUMMARY FILE
-* 'DBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
-* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
-* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
-* F LOGICAL FLAG, T TO STOP ON FAILURES.
-* T LOGICAL FLAG, T TO TEST ERROR EXITS.
-* 16.0 THRESHOLD VALUE OF TEST RATIO
-* 6 NUMBER OF VALUES OF N
-* 0 1 2 3 5 9 VALUES OF N
-* 3 NUMBER OF VALUES OF ALPHA
-* 0.0 1.0 0.7 VALUES OF ALPHA
-* 3 NUMBER OF VALUES OF BETA
-* 0.0 1.0 1.3 VALUES OF BETA
-* DGEMM T PUT F FOR NO TEST. SAME COLUMNS.
-* DSYMM T PUT F FOR NO TEST. SAME COLUMNS.
-* DTRMM T PUT F FOR NO TEST. SAME COLUMNS.
-* DTRSM T PUT F FOR NO TEST. SAME COLUMNS.
-* DSYRK T PUT F FOR NO TEST. SAME COLUMNS.
-* DSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
-*
-* See:
-*
-* Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
-* A Set of Level 3 Basic Linear Algebra Subprograms.
-*
-* Technical Memorandum No.88 (Revision 1), Mathematics and
-* Computer Science Division, Argonne National Laboratory, 9700
-* South Cass Avenue, Argonne, Illinois 60439, US.
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
-*
-* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
-* can be run multiple times without deleting generated
-* output files (susan)
+* =====================================================================
*
* .. Parameters ..
INTEGER NIN
diff --git a/BLAS/TESTING/sblat1.f b/BLAS/TESTING/sblat1.f
index 07d32c3d..c465f630 100644
--- a/BLAS/TESTING/sblat1.f
+++ b/BLAS/TESTING/sblat1.f
@@ -1,7 +1,50 @@
+*> \brief \b SBLAT1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM SBLAT1
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the REAL Level 1 BLAS.
+*>
+*> Based upon the original BLAS test routine together with:
+*> F06EAF Example Program Text
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_testing
+*
+* =====================================================================
PROGRAM SBLAT1
-* Test program for the REAL Level 1 BLAS.
-* Based upon the original BLAS test routine together with:
-* F06EAF Example Program Text
+*
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* =====================================================================
+*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
diff --git a/BLAS/TESTING/sblat2.f b/BLAS/TESTING/sblat2.f
index aa11fcc3..10a0adcb 100644
--- a/BLAS/TESTING/sblat2.f
+++ b/BLAS/TESTING/sblat2.f
@@ -1,71 +1,114 @@
+*> \brief \b SBLAT2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM SBLAT2
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the REAL Level 2 Blas.
+*>
+*> The program must be driven by a short data file. The first 18 records
+*> of the file are read using list-directed input, the last 16 records
+*> are read using the format ( A6, L2 ). An annotated example of a data
+*> file can be obtained by deleting the first 3 characters from the
+*> following 34 lines:
+*> 'sblat2.out' NAME OF SUMMARY OUTPUT FILE
+*> 6 UNIT NUMBER OF SUMMARY FILE
+*> 'SBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
+*> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
+*> F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
+*> F LOGICAL FLAG, T TO STOP ON FAILURES.
+*> T LOGICAL FLAG, T TO TEST ERROR EXITS.
+*> 16.0 THRESHOLD VALUE OF TEST RATIO
+*> 6 NUMBER OF VALUES OF N
+*> 0 1 2 3 5 9 VALUES OF N
+*> 4 NUMBER OF VALUES OF K
+*> 0 1 2 4 VALUES OF K
+*> 4 NUMBER OF VALUES OF INCX AND INCY
+*> 1 2 -1 -2 VALUES OF INCX AND INCY
+*> 3 NUMBER OF VALUES OF ALPHA
+*> 0.0 1.0 0.7 VALUES OF ALPHA
+*> 3 NUMBER OF VALUES OF BETA
+*> 0.0 1.0 0.9 VALUES OF BETA
+*> SGEMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> SGBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSYMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSPMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> STRMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> STBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> STPMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> STRSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> STBSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> STPSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> SGER T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSYR T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSPR T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSYR2 T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSPR2 T PUT F FOR NO TEST. SAME COLUMNS.
+*>
+*> Further Details
+*> ===============
+*>
+*> See:
+*>
+*> Dongarra J. J., Du Croz J. J., Hammarling S. and Hanson R. J..
+*> An extended set of Fortran Basic Linear Algebra Subprograms.
+*>
+*> Technical Memoranda Nos. 41 (revision 3) and 81, Mathematics
+*> and Computer Science Division, Argonne National Laboratory,
+*> 9700 South Cass Avenue, Argonne, Illinois 60439, US.
+*>
+*> Or
+*>
+*> NAG Technical Reports TR3/87 and TR4/87, Numerical Algorithms
+*> Group Ltd., NAG Central Office, 256 Banbury Road, Oxford
+*> OX2 7DE, UK, and Numerical Algorithms Group Inc., 1101 31st
+*> Street, Suite 100, Downers Grove, Illinois 60515-1263, USA.
+*>
+*>
+*> -- Written on 10-August-1987.
+*> Richard Hanson, Sandia National Labs.
+*> Jeremy Du Croz, NAG Central Office.
+*>
+*> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
+*> can be run multiple times without deleting generated
+*> output files (susan)
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_testing
+*
+* =====================================================================
PROGRAM SBLAT2
*
-* Test program for the REAL Level 2 Blas.
-*
-* The program must be driven by a short data file. The first 18 records
-* of the file are read using list-directed input, the last 16 records
-* are read using the format ( A6, L2 ). An annotated example of a data
-* file can be obtained by deleting the first 3 characters from the
-* following 34 lines:
-* 'sblat2.out' NAME OF SUMMARY OUTPUT FILE
-* 6 UNIT NUMBER OF SUMMARY FILE
-* 'SBLAT2.SNAP' NAME OF SNAPSHOT OUTPUT FILE
-* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
-* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
-* F LOGICAL FLAG, T TO STOP ON FAILURES.
-* T LOGICAL FLAG, T TO TEST ERROR EXITS.
-* 16.0 THRESHOLD VALUE OF TEST RATIO
-* 6 NUMBER OF VALUES OF N
-* 0 1 2 3 5 9 VALUES OF N
-* 4 NUMBER OF VALUES OF K
-* 0 1 2 4 VALUES OF K
-* 4 NUMBER OF VALUES OF INCX AND INCY
-* 1 2 -1 -2 VALUES OF INCX AND INCY
-* 3 NUMBER OF VALUES OF ALPHA
-* 0.0 1.0 0.7 VALUES OF ALPHA
-* 3 NUMBER OF VALUES OF BETA
-* 0.0 1.0 0.9 VALUES OF BETA
-* SGEMV T PUT F FOR NO TEST. SAME COLUMNS.
-* SGBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* SSYMV T PUT F FOR NO TEST. SAME COLUMNS.
-* SSBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* SSPMV T PUT F FOR NO TEST. SAME COLUMNS.
-* STRMV T PUT F FOR NO TEST. SAME COLUMNS.
-* STBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* STPMV T PUT F FOR NO TEST. SAME COLUMNS.
-* STRSV T PUT F FOR NO TEST. SAME COLUMNS.
-* STBSV T PUT F FOR NO TEST. SAME COLUMNS.
-* STPSV T PUT F FOR NO TEST. SAME COLUMNS.
-* SGER T PUT F FOR NO TEST. SAME COLUMNS.
-* SSYR T PUT F FOR NO TEST. SAME COLUMNS.
-* SSPR T PUT F FOR NO TEST. SAME COLUMNS.
-* SSYR2 T PUT F FOR NO TEST. SAME COLUMNS.
-* SSPR2 T PUT F FOR NO TEST. SAME COLUMNS.
-*
-* See:
-*
-* Dongarra J. J., Du Croz J. J., Hammarling S. and Hanson R. J..
-* An extended set of Fortran Basic Linear Algebra Subprograms.
-*
-* Technical Memoranda Nos. 41 (revision 3) and 81, Mathematics
-* and Computer Science Division, Argonne National Laboratory,
-* 9700 South Cass Avenue, Argonne, Illinois 60439, US.
-*
-* Or
-*
-* NAG Technical Reports TR3/87 and TR4/87, Numerical Algorithms
-* Group Ltd., NAG Central Office, 256 Banbury Road, Oxford
-* OX2 7DE, UK, and Numerical Algorithms Group Inc., 1101 31st
-* Street, Suite 100, Downers Grove, Illinois 60515-1263, USA.
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-*
-* -- Written on 10-August-1987.
-* Richard Hanson, Sandia National Labs.
-* Jeremy Du Croz, NAG Central Office.
-*
-* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
-* can be run multiple times without deleting generated
-* output files (susan)
+* =====================================================================
*
* .. Parameters ..
INTEGER NIN
diff --git a/BLAS/TESTING/sblat3.f b/BLAS/TESTING/sblat3.f
index e9ac0eef..535e2e26 100644
--- a/BLAS/TESTING/sblat3.f
+++ b/BLAS/TESTING/sblat3.f
@@ -1,51 +1,94 @@
+*> \brief \b SBLAT3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM SBLAT3
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the REAL Level 3 Blas.
+*>
+*> The program must be driven by a short data file. The first 14 records
+*> of the file are read using list-directed input, the last 6 records
+*> are read using the format ( A6, L2 ). An annotated example of a data
+*> file can be obtained by deleting the first 3 characters from the
+*> following 20 lines:
+*> 'sblat3.out' NAME OF SUMMARY OUTPUT FILE
+*> 6 UNIT NUMBER OF SUMMARY FILE
+*> 'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
+*> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
+*> F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
+*> F LOGICAL FLAG, T TO STOP ON FAILURES.
+*> T LOGICAL FLAG, T TO TEST ERROR EXITS.
+*> 16.0 THRESHOLD VALUE OF TEST RATIO
+*> 6 NUMBER OF VALUES OF N
+*> 0 1 2 3 5 9 VALUES OF N
+*> 3 NUMBER OF VALUES OF ALPHA
+*> 0.0 1.0 0.7 VALUES OF ALPHA
+*> 3 NUMBER OF VALUES OF BETA
+*> 0.0 1.0 1.3 VALUES OF BETA
+*> SGEMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSYMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> STRMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> STRSM T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSYRK T PUT F FOR NO TEST. SAME COLUMNS.
+*> SSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
+*>
+*> Further Details
+*> ===============
+*>
+*> See:
+*>
+*> Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
+*> A Set of Level 3 Basic Linear Algebra Subprograms.
+*>
+*> Technical Memorandum No.88 (Revision 1), Mathematics and
+*> Computer Science Division, Argonne National Laboratory, 9700
+*> South Cass Avenue, Argonne, Illinois 60439, US.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
+*> can be run multiple times without deleting generated
+*> output files (susan)
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_blas_testing
+*
+* =====================================================================
PROGRAM SBLAT3
*
-* Test program for the REAL Level 3 Blas.
-*
-* The program must be driven by a short data file. The first 14 records
-* of the file are read using list-directed input, the last 6 records
-* are read using the format ( A6, L2 ). An annotated example of a data
-* file can be obtained by deleting the first 3 characters from the
-* following 20 lines:
-* 'sblat3.out' NAME OF SUMMARY OUTPUT FILE
-* 6 UNIT NUMBER OF SUMMARY FILE
-* 'SBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
-* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
-* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
-* F LOGICAL FLAG, T TO STOP ON FAILURES.
-* T LOGICAL FLAG, T TO TEST ERROR EXITS.
-* 16.0 THRESHOLD VALUE OF TEST RATIO
-* 6 NUMBER OF VALUES OF N
-* 0 1 2 3 5 9 VALUES OF N
-* 3 NUMBER OF VALUES OF ALPHA
-* 0.0 1.0 0.7 VALUES OF ALPHA
-* 3 NUMBER OF VALUES OF BETA
-* 0.0 1.0 1.3 VALUES OF BETA
-* SGEMM T PUT F FOR NO TEST. SAME COLUMNS.
-* SSYMM T PUT F FOR NO TEST. SAME COLUMNS.
-* STRMM T PUT F FOR NO TEST. SAME COLUMNS.
-* STRSM T PUT F FOR NO TEST. SAME COLUMNS.
-* SSYRK T PUT F FOR NO TEST. SAME COLUMNS.
-* SSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
-*
-* See:
-*
-* Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
-* A Set of Level 3 Basic Linear Algebra Subprograms.
-*
-* Technical Memorandum No.88 (Revision 1), Mathematics and
-* Computer Science Division, Argonne National Laboratory, 9700
-* South Cass Avenue, Argonne, Illinois 60439, US.
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
-*
-* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
-* can be run multiple times without deleting generated
-* output files (susan)
+* =====================================================================
*
* .. Parameters ..
INTEGER NIN
diff --git a/BLAS/TESTING/zblat1.f b/BLAS/TESTING/zblat1.f
index 405c9f38..a8ad681b 100644
--- a/BLAS/TESTING/zblat1.f
+++ b/BLAS/TESTING/zblat1.f
@@ -1,7 +1,50 @@
+*> \brief \b ZBLAT1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM ZBLAT1
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the COMPLEX*16 Level 1 BLAS.
+*>
+*> Based upon the original BLAS test routine together with:
+*> F06GAF Example Program Text
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_testing
+*
+* =====================================================================
PROGRAM ZBLAT1
-* Test program for the COMPLEX*16 Level 1 BLAS.
-* Based upon the original BLAS test routine together with:
-* F06GAF Example Program Text
+*
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* =====================================================================
+*
* .. Parameters ..
INTEGER NOUT
PARAMETER (NOUT=6)
diff --git a/BLAS/TESTING/zblat2.f b/BLAS/TESTING/zblat2.f
index e7829fdf..014ed665 100644
--- a/BLAS/TESTING/zblat2.f
+++ b/BLAS/TESTING/zblat2.f
@@ -1,72 +1,115 @@
+*> \brief \b ZBLAT2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM ZBLAT2
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the COMPLEX*16 Level 2 Blas.
+*>
+*> The program must be driven by a short data file. The first 18 records
+*> of the file are read using list-directed input, the last 17 records
+*> are read using the format ( A6, L2 ). An annotated example of a data
+*> file can be obtained by deleting the first 3 characters from the
+*> following 35 lines:
+*> 'zblat2.out' NAME OF SUMMARY OUTPUT FILE
+*> 6 UNIT NUMBER OF SUMMARY FILE
+*> 'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE
+*> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
+*> F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
+*> F LOGICAL FLAG, T TO STOP ON FAILURES.
+*> T LOGICAL FLAG, T TO TEST ERROR EXITS.
+*> 16.0 THRESHOLD VALUE OF TEST RATIO
+*> 6 NUMBER OF VALUES OF N
+*> 0 1 2 3 5 9 VALUES OF N
+*> 4 NUMBER OF VALUES OF K
+*> 0 1 2 4 VALUES OF K
+*> 4 NUMBER OF VALUES OF INCX AND INCY
+*> 1 2 -1 -2 VALUES OF INCX AND INCY
+*> 3 NUMBER OF VALUES OF ALPHA
+*> (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
+*> 3 NUMBER OF VALUES OF BETA
+*> (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
+*> ZGEMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZGBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHEMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHPMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZTRMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZTBMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZTPMV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZTRSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZTBSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZTPSV T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZGERC T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZGERU T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHER T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHPR T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHER2 T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHPR2 T PUT F FOR NO TEST. SAME COLUMNS.
+*>
+*> Further Details
+*> ===============
+*>
+*> See:
+*>
+*> Dongarra J. J., Du Croz J. J., Hammarling S. and Hanson R. J..
+*> An extended set of Fortran Basic Linear Algebra Subprograms.
+*>
+*> Technical Memoranda Nos. 41 (revision 3) and 81, Mathematics
+*> and Computer Science Division, Argonne National Laboratory,
+*> 9700 South Cass Avenue, Argonne, Illinois 60439, US.
+*>
+*> Or
+*>
+*> NAG Technical Reports TR3/87 and TR4/87, Numerical Algorithms
+*> Group Ltd., NAG Central Office, 256 Banbury Road, Oxford
+*> OX2 7DE, UK, and Numerical Algorithms Group Inc., 1101 31st
+*> Street, Suite 100, Downers Grove, Illinois 60515-1263, USA.
+*>
+*>
+*> -- Written on 10-August-1987.
+*> Richard Hanson, Sandia National Labs.
+*> Jeremy Du Croz, NAG Central Office.
+*>
+*> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
+*> can be run multiple times without deleting generated
+*> output files (susan)
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_testing
+*
+* =====================================================================
PROGRAM ZBLAT2
*
-* Test program for the COMPLEX*16 Level 2 Blas.
-*
-* The program must be driven by a short data file. The first 18 records
-* of the file are read using list-directed input, the last 17 records
-* are read using the format ( A6, L2 ). An annotated example of a data
-* file can be obtained by deleting the first 3 characters from the
-* following 35 lines:
-* 'zblat2.out' NAME OF SUMMARY OUTPUT FILE
-* 6 UNIT NUMBER OF SUMMARY FILE
-* 'CBLA2T.SNAP' NAME OF SNAPSHOT OUTPUT FILE
-* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
-* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
-* F LOGICAL FLAG, T TO STOP ON FAILURES.
-* T LOGICAL FLAG, T TO TEST ERROR EXITS.
-* 16.0 THRESHOLD VALUE OF TEST RATIO
-* 6 NUMBER OF VALUES OF N
-* 0 1 2 3 5 9 VALUES OF N
-* 4 NUMBER OF VALUES OF K
-* 0 1 2 4 VALUES OF K
-* 4 NUMBER OF VALUES OF INCX AND INCY
-* 1 2 -1 -2 VALUES OF INCX AND INCY
-* 3 NUMBER OF VALUES OF ALPHA
-* (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
-* 3 NUMBER OF VALUES OF BETA
-* (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
-* ZGEMV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZGBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHEMV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHPMV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZTRMV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZTBMV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZTPMV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZTRSV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZTBSV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZTPSV T PUT F FOR NO TEST. SAME COLUMNS.
-* ZGERC T PUT F FOR NO TEST. SAME COLUMNS.
-* ZGERU T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHER T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHPR T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHER2 T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHPR2 T PUT F FOR NO TEST. SAME COLUMNS.
-*
-* See:
-*
-* Dongarra J. J., Du Croz J. J., Hammarling S. and Hanson R. J..
-* An extended set of Fortran Basic Linear Algebra Subprograms.
-*
-* Technical Memoranda Nos. 41 (revision 3) and 81, Mathematics
-* and Computer Science Division, Argonne National Laboratory,
-* 9700 South Cass Avenue, Argonne, Illinois 60439, US.
-*
-* Or
-*
-* NAG Technical Reports TR3/87 and TR4/87, Numerical Algorithms
-* Group Ltd., NAG Central Office, 256 Banbury Road, Oxford
-* OX2 7DE, UK, and Numerical Algorithms Group Inc., 1101 31st
-* Street, Suite 100, Downers Grove, Illinois 60515-1263, USA.
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-*
-* -- Written on 10-August-1987.
-* Richard Hanson, Sandia National Labs.
-* Jeremy Du Croz, NAG Central Office.
-*
-* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
-* can be run multiple times without deleting generated
-* output files (susan)
+* =====================================================================
*
* .. Parameters ..
INTEGER NIN
diff --git a/BLAS/TESTING/zblat3.f b/BLAS/TESTING/zblat3.f
index 379d65b8..b189e284 100644
--- a/BLAS/TESTING/zblat3.f
+++ b/BLAS/TESTING/zblat3.f
@@ -1,54 +1,98 @@
+*> \brief \b ZBLAT3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM ZBLAT3
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Test program for the COMPLEX*16 Level 3 Blas.
+*>
+*> The program must be driven by a short data file. The first 14 records
+*> of the file are read using list-directed input, the last 9 records
+*> are read using the format ( A6, L2 ). An annotated example of a data
+*> file can be obtained by deleting the first 3 characters from the
+*> following 23 lines:
+*> 'zblat3.out' NAME OF SUMMARY OUTPUT FILE
+*> 6 UNIT NUMBER OF SUMMARY FILE
+*> 'ZBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
+*> -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
+*> F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
+*> F LOGICAL FLAG, T TO STOP ON FAILURES.
+*> T LOGICAL FLAG, T TO TEST ERROR EXITS.
+*> 16.0 THRESHOLD VALUE OF TEST RATIO
+*> 6 NUMBER OF VALUES OF N
+*> 0 1 2 3 5 9 VALUES OF N
+*> 3 NUMBER OF VALUES OF ALPHA
+*> (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
+*> 3 NUMBER OF VALUES OF BETA
+*> (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
+*> ZGEMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHEMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZSYMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZTRMM T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZTRSM T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHERK T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZSYRK T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZHER2K T PUT F FOR NO TEST. SAME COLUMNS.
+*> ZSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
+*>
+*>
+*> Further Details
+*> ===============
+*>
+*> See:
+*>
+*> Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
+*> A Set of Level 3 Basic Linear Algebra Subprograms.
+*>
+*> Technical Memorandum No.88 (Revision 1), Mathematics and
+*> Computer Science Division, Argonne National Laboratory, 9700
+*> South Cass Avenue, Argonne, Illinois 60439, US.
+*>
+*> -- Written on 8-February-1989.
+*> Jack Dongarra, Argonne National Laboratory.
+*> Iain Duff, AERE Harwell.
+*> Jeremy Du Croz, Numerical Algorithms Group Ltd.
+*> Sven Hammarling, Numerical Algorithms Group Ltd.
+*>
+*> 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
+*> can be run multiple times without deleting generated
+*> output files (susan)
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_blas_testing
+*
+* =====================================================================
PROGRAM ZBLAT3
*
-* Test program for the COMPLEX*16 Level 3 Blas.
-*
-* The program must be driven by a short data file. The first 14 records
-* of the file are read using list-directed input, the last 9 records
-* are read using the format ( A6, L2 ). An annotated example of a data
-* file can be obtained by deleting the first 3 characters from the
-* following 23 lines:
-* 'zblat3.out' NAME OF SUMMARY OUTPUT FILE
-* 6 UNIT NUMBER OF SUMMARY FILE
-* 'ZBLAT3.SNAP' NAME OF SNAPSHOT OUTPUT FILE
-* -1 UNIT NUMBER OF SNAPSHOT FILE (NOT USED IF .LT. 0)
-* F LOGICAL FLAG, T TO REWIND SNAPSHOT FILE AFTER EACH RECORD.
-* F LOGICAL FLAG, T TO STOP ON FAILURES.
-* T LOGICAL FLAG, T TO TEST ERROR EXITS.
-* 16.0 THRESHOLD VALUE OF TEST RATIO
-* 6 NUMBER OF VALUES OF N
-* 0 1 2 3 5 9 VALUES OF N
-* 3 NUMBER OF VALUES OF ALPHA
-* (0.0,0.0) (1.0,0.0) (0.7,-0.9) VALUES OF ALPHA
-* 3 NUMBER OF VALUES OF BETA
-* (0.0,0.0) (1.0,0.0) (1.3,-1.1) VALUES OF BETA
-* ZGEMM T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHEMM T PUT F FOR NO TEST. SAME COLUMNS.
-* ZSYMM T PUT F FOR NO TEST. SAME COLUMNS.
-* ZTRMM T PUT F FOR NO TEST. SAME COLUMNS.
-* ZTRSM T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHERK T PUT F FOR NO TEST. SAME COLUMNS.
-* ZSYRK T PUT F FOR NO TEST. SAME COLUMNS.
-* ZHER2K T PUT F FOR NO TEST. SAME COLUMNS.
-* ZSYR2K T PUT F FOR NO TEST. SAME COLUMNS.
-*
-* See:
-*
-* Dongarra J. J., Du Croz J. J., Duff I. S. and Hammarling S.
-* A Set of Level 3 Basic Linear Algebra Subprograms.
-*
-* Technical Memorandum No.88 (Revision 1), Mathematics and
-* Computer Science Division, Argonne National Laboratory, 9700
-* South Cass Avenue, Argonne, Illinois 60439, US.
+* -- Reference BLAS test routine (version 3.4.0) --
+* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 8-February-1989.
-* Jack Dongarra, Argonne National Laboratory.
-* Iain Duff, AERE Harwell.
-* Jeremy Du Croz, Numerical Algorithms Group Ltd.
-* Sven Hammarling, Numerical Algorithms Group Ltd.
-*
-* 10-9-00: Change STATUS='NEW' to 'UNKNOWN' so that the testers
-* can be run multiple times without deleting generated
-* output files (susan)
+* =====================================================================
*
* .. Parameters ..
INTEGER NIN
diff --git a/DOCS/Doxyfile b/DOCS/Doxyfile
new file mode 100644
index 00000000..9eef1d8a
--- /dev/null
+++ b/DOCS/Doxyfile
@@ -0,0 +1,1753 @@
+# Doxyfile 1.7.5.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or sequence of words) that should
+# identify the project. Note that if you do not use Doxywizard you need
+# to put quotes around the project name if it contains spaces.
+
+PROJECT_NAME = LAPACK
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = 3.4.0
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF = "LAPACK: Linear Algebra PACKage"
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = explore-html
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful if your file system
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = YES
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also makes the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = YES
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
+# unions are shown inside the group in which they are included (e.g. using
+# @ingroup) instead of on a separate page (for HTML and Man pages) or
+# section (for LaTeX and RTF).
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
+# unions with only public data fields will be shown inline in the documentation
+# of the scope in which they are defined (i.e. file, namespace, or group
+# documentation), provided this scope is documented. If set to NO (the default),
+# structs, classes, and unions are shown on a separate page (for HTML and Man
+# pages) or section (for LaTeX and RTF).
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penalty.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will roughly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
+# do proper type resolution of all parameters of a function it will reject a
+# match between the prototype and the implementation of a member function even
+# if there is only one candidate or it is obvious which candidate to choose
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or macro consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and macros in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page. This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files
+# containing the references data. This must be a list of .bib files. The
+# .bib extension is automatically appended if omitted. Using this command
+# requires the bibtex tool to be installed. See also
+# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
+# of the bibliography can be controlled using LATEX_BIB_STYLE.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = DOCS/groups-usr.dox .
+
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+# *.f90 *.f *.for *.vhd *.vhdl
+
+FILE_PATTERNS = *.f
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+# Note that relative paths are relative to directory from which doxygen is run.
+
+EXCLUDE = CMAKE
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS = *.py \
+ *.txt \
+ *.in \
+ *.inc \
+ Makefile
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty or if
+# non of the patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
+# and it is also possible to disable source filtering for a specific pattern
+# using *.ext= (so without naming a filter). This option only has effect when
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS =
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = YES
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header. Note that when using a custom header you are responsible
+# for the proper inclusion of any scripts and style sheets that doxygen
+# needs, which is dependent on the configuration options used.
+# It is adviced to generate a default header using "doxygen -w html
+# header.html footer.html stylesheet.css YourConfigFile" and then modify
+# that header. Note that the header is subject to change so you typically
+# have to redo this when upgrading to a newer version of doxygen or when
+# changing the value of configuration settings such as GENERATE_TREEVIEW!
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that
+# the files will be copied as-is; there are no commands or markers available.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML
+# documentation. Note that a value of 0 will completely suppress the enum
+# values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = YES
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+# (see http://www.mathjax.org) which uses client side Javascript for the
+# rendering instead of using prerendered bitmaps. Use this if you do not
+# have LaTeX installed or if you want to formulas look prettier in the HTML
+# output. When enabled you also need to install MathJax separately and
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you need to specify the location relative to the
+# HTML output directory using the MATHJAX_RELPATH option. The destination
+# directory should contain the MathJax.js script. For instance, if the mathjax
+# directory is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the
+# mathjax.org site, so you can quickly see the result without installing
+# MathJax, but it is strongly recommended to install a local copy of MathJax
+# before deployment.
+
+MATHJAX_RELPATH = http://www.mathjax.org/mathjax
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
+# names that should be enabled during MathJax rendering.
+
+MATHJAX_EXTENSIONS =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvantages are that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
+# the generated latex document. The footer should contain everything after
+# the last chapter. If it is left blank doxygen will generate a
+# standard footer. Notice: only use this tag if you know what you are doing!
+
+LATEX_FOOTER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
+# http://en.wikipedia.org/wiki/BibTeX for more info.
+
+LATEX_BIB_STYLE = plain
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = YES
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = YES
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# pointed to by INCLUDE_PATH will be searched when a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition that
+# overrules the definition found in the source code.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all references to function-like macros
+# that are alone on a line, have an all uppercase name, and do not end with a
+# semicolon, because these will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /sw/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option also works with HAVE_DOT disabled, but it is recommended to
+# install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS = 0
+
+# By default doxygen will use the Helvetica font for all dot files that
+# doxygen generates. When you want a differently looking font you can specify
+# the font name using DOT_FONTNAME. You need to make sure dot is able to find
+# the font, which can be done by putting it in a standard location or by setting
+# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
+# directory containing the font.
+
+DOT_FONTNAME = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the Helvetica font.
+# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
+# set the path where dot can find it.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will generate a graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are svg, png, jpg, or gif.
+# If left blank png will be used. If you choose svg you need to set
+# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
+# visible in IE 9+ (other browsers do not have this requirement).
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+# Note that this requires a modern browser other than Internet Explorer.
+# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
+# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
+# visible. Older versions of IE do not have SVG support.
+
+INTERACTIVE_SVG = NO
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the
+# \mscfile command).
+
+MSCFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
diff --git a/DOCS/groups-usr.dox b/DOCS/groups-usr.dox
new file mode 100644
index 00000000..91b20f94
--- /dev/null
+++ b/DOCS/groups-usr.dox
@@ -0,0 +1,410 @@
+/**
+ *
+ ****
+ *
+ * @defgroup lapack LAPACK
+ * This is the group of LAPACK routines.
+ *
+ * @defgroup GE General Matrices
+ * @ingroup lapack
+ * This is the group of General Matrices routines
+ * @defgroup GB General Band Matrix
+ * @ingroup lapack
+ * This is the group of General Band routines
+ * @defgroup SY Symmetric Matrix
+ * @ingroup lapack
+ * This is the group of Symmetric Matrix routines
+ * @defgroup PO Positive Definite Matrix
+ * @ingroup lapack
+ * This is the group of Positive Definite routines
+ * @defgroup auxOTHERauxiliary Other Auxiliary Routines
+ * @ingroup lapack
+ * This is the group of Other Auxiliary routines
+ *
+ ****
+ *
+ * @defgroup solveGE Linear Solve
+ * @ingroup GE
+ * This is the group of Linear Solve Driver routines
+ * @defgroup solveGB Linear Solve
+ * @ingroup GB
+ * This is the group of Linear Solve Driver routines
+ * @defgroup solveSY Linear Solve
+ * @ingroup SY
+ * This is the group of Linear Solve Driver routines
+ * @defgroup solvePO Linear Solve
+ * @ingroup PO
+ * This is the group of Linear Solve Driver routines
+ * @defgroup eigenGE Eigenvalue
+ * @ingroup GE
+ * This is the group of Eigenvalue Driver routines
+ * @defgroup eigenSY Eigenvalue
+ * @ingroup SY
+ * This is the group of Eigenvalue Driver routines
+ * @defgroup singGE Singular Value
+ * @ingroup GE
+ * This is the group of Singular Value Driver routines
+ * @defgroup computationalGE Computational routines
+ * @ingroup GE
+ * This is the group of Computational routines
+ * @defgroup computationalGB Computational routines
+ * @ingroup GB
+ * This is the group of Computational routines
+ * @defgroup computationalSY Computational routines
+ * @ingroup SY
+ * This is the group of Computational routines
+ * @defgroup computationalPO Computational routines
+ * @ingroup PO
+ * This is the group of Computational routines
+ * @defgroup auxiliaryGE Auxiliary routines
+ * @ingroup GE
+ * This is the group of Auxiliary routines
+ * @defgroup auxiliaryGB Auxiliary routines
+ * @ingroup GB
+ * This is the group of Auxiliary routines
+ * @defgroup auxiliarySY Auxiliary routines
+ * @ingroup SY
+ * This is the group of Auxiliary routines
+ * @defgroup auxiliaryPO Auxiliary routines
+ * @ingroup PO
+ * This is the group of Auxiliary routines
+ *
+ ****
+ *
+ * @defgroup doubleGEsolve double
+ * @ingroup solveGE
+ * This is the group of double solve driver functions for GE matrices
+ * @defgroup doublePOsolve double
+ * @ingroup solvePO
+ * This is the group of double solve driver functions for PO matrices
+ * @defgroup doubleSYsolve double
+ * @ingroup solveSY
+ * This is the group of double solve driver functions for SY matrices
+ * @defgroup doubleGBsolve double
+ * @ingroup solveGB
+ * This is the group of double solve driver functions for GB matrices
+ * @defgroup doubleGEeigen double
+ * @ingroup eigenGE
+ * This is the group of double eigenvalue driver functions for GE matrices
+ * @defgroup doubleSYeigen double
+ * @ingroup eigenSY
+ * This is the group of double eigenvalue driver functions for SY matrices
+ * @defgroup doubleGEsing double
+ * @ingroup singGE
+ * This is the group of double singular value driver functions for GE matrices
+ * @defgroup doubleGEcomputational double
+ * @ingroup computationalGE
+ * This is the group of double computational functions for GE matrices
+ * @defgroup doublePOcomputational double
+ * @ingroup computationalPO
+ * This is the group of double computational functions for PO matrices
+ * @defgroup doubleSYcomputational double
+ * @ingroup computationalSY
+ * This is the group of double computational functions for SY matrices
+ * @defgroup doubleGBcomputational double
+ * @ingroup computationalGB
+ * This is the group of double computational functions for GB matrices
+ * @defgroup doubleGEauxiliary double
+ * @ingroup auxiliaryGE
+ * This is the group of double auxiliary functions for GE matrices
+ * @defgroup doublePOauxiliary double
+ * @ingroup auxiliaryPO
+ * This is the group of double auxiliary functions for PO matrices
+ * @defgroup doubleSYauxiliary double
+ * @ingroup auxiliarySY
+ * This is the group of double auxiliary functions for SY matrices
+ * @defgroup doubleGBauxiliary double
+ * @ingroup auxiliaryGB
+ * This is the group of double auxiliary functions for GB matrices
+ *
+ ****
+ *
+ * @defgroup realGEsolve real
+ * @ingroup solveGE
+ * This is the group of real solve driver functions for GE matrices
+ * @defgroup realPOsolve real
+ * @ingroup solvePO
+ * This is the group of real solve driver functions for PO matrices
+ * @defgroup realSYsolve real
+ * @ingroup solveSY
+ * This is the group of real solve driver functions for SY matrices
+ * @defgroup realGBsolve real
+ * @ingroup solveGB
+ * This is the group of real solve driver functions for GB matrices
+ * @defgroup realGEeigen real
+ * @ingroup eigenGE
+ * This is the group of real eigenvalue driver functions for GE matrices
+ * @defgroup realSYeigen real
+ * @ingroup eigenSY
+ * This is the group of real eigenvalue driver functions for SY matrices
+ * @defgroup realGEsing real
+ * @ingroup singGE
+ * This is the group of real singular value driver functions for GE matrices
+ * @defgroup realGEcomputational real
+ * @ingroup computationalGE
+ * This is the group of real computational functions for GE matrices
+ * @defgroup realPOcomputational real
+ * @ingroup computationalPO
+ * This is the group of real computational functions for PO matrices
+ * @defgroup realSYcomputational real
+ * @ingroup computationalSY
+ * This is the group of real computational functions for SY matrices
+ * @defgroup realGBcomputational real
+ * @ingroup computationalGB
+ * This is the group of real computational functions for GB matrices
+ * @defgroup realGEauxiliary real
+ * @ingroup auxiliaryGE
+ * This is the group of real auxiliary functions for GE matrices
+ * @defgroup realPOauxiliary real
+ * @ingroup auxiliaryPO
+ * This is the group of real auxiliary functions for PO matrices
+ * @defgroup realSYauxiliary real
+ * @ingroup auxiliarySY
+ * This is the group of real auxiliary functions for SY matrices
+ * @defgroup realGBauxiliary real
+ * @ingroup auxiliaryGB
+ * This is the group of real auxiliary functions for GB matrices
+ *
+ ****
+ *
+ * @defgroup complexGEsolve complex
+ * @ingroup solveGE
+ * This is the group of complex solve driver functions for GE matrices
+ * @defgroup complexPOsolve complex
+ * @ingroup solvePO
+ * This is the group of complex solve driver functions for PO matrices
+ * @defgroup complexSYsolve complex
+ * @ingroup solveSY
+ * This is the group of complex solve driver functions for SY matrices
+ * @defgroup complexGBsolve complex
+ * @ingroup solveGB
+ * This is the group of complex solve driver functions for GB matrices
+ * @defgroup complexGEeigen complex
+ * @ingroup eigenGE
+ * This is the group of complex eigenvalue driver functions for GE matrices
+ * @defgroup complexSYeigen complex
+ * @ingroup eigenSY
+ * This is the group of complex eigenvalue driver functions for SY matrices
+ * @defgroup complexGEsing complex
+ * @ingroup singGE
+ * This is the group of complex singular value driver functions for GE matrices
+ * @defgroup complexGEcomputational complex
+ * @ingroup computationalGE
+ * This is the group of complex computational functions for GE matrices
+ * @defgroup complexPOcomputational complex
+ * @ingroup computationalPO
+ * This is the group of complex computational functions for PO matrices
+ * @defgroup complexSYcomputational complex
+ * @ingroup computationalSY
+ * This is the group of complex computational functions for SY matrices
+ * @defgroup complexGBcomputational complex
+ * @ingroup computationalGB
+ * This is the group of complex computational functions for GB matrices
+ * @defgroup complexGEauxiliary complex
+ * @ingroup auxiliaryGE
+ * This is the group of complex auxiliary functions for GE matrices
+ * @defgroup complexPOauxiliary complex
+ * @ingroup auxiliaryPO
+ * This is the group of complex auxiliary functions for PO matrices
+ * @defgroup complexSYauxiliary complex
+ * @ingroup auxiliarySY
+ * This is the group of complex auxiliary functions for SY matrices
+ * @defgroup complexGBauxiliary complex
+ * @ingroup auxiliaryGB
+ * This is the group of complex auxiliary functions for GB matrices
+ *
+ ****
+ *
+ * @defgroup complex16GEsolve complex16
+ * @ingroup solveGE
+ * This is the group of complex16 solve driver functions for GE matrices
+ * @defgroup complex16POsolve complex16
+ * @ingroup solvePO
+ * This is the group of complex16 solve driver functions for PO matrices
+ * @defgroup complex16SYsolve complex16
+ * @ingroup solveSY
+ * This is the group of complex16 solve driver functions for SY matrices
+ * @defgroup complex16GBsolve complex16
+ * @ingroup solveGB
+ * This is the group of complex16 solve driver functions for GB matrices
+ * @defgroup complex16GEeigen complex16
+ * @ingroup eigenGE
+ * This is the group of complex16 eigenvalue driver functions for GE matrices
+ * @defgroup complex16SYeigen complex16
+ * @ingroup eigenSY
+ * This is the group of complex16 eigenvalue driver functions for SY matrices
+ * @defgroup complex16GEsing complex16
+ * @ingroup singGE
+ * This is the group of complex16 singular value driver functions for GE matrices
+ * @defgroup complex16GEcomputational complex16
+ * @ingroup computationalGE
+ * This is the group of complex16 computational functions for GE matrices
+ * @defgroup complex16POcomputational complex16
+ * @ingroup computationalPO
+ * This is the group of complex16 computational functions for PO matrices
+ * @defgroup complex16SYcomputational complex16
+ * @ingroup computationalSY
+ * This is the group of complex16 computational functions for SY matrices
+ * @defgroup complex16GBcomputational complex16
+ * @ingroup computationalGB
+ * This is the group of complex16 computational functions for GB matrices
+ * @defgroup complex16GEauxiliary complex16
+ * @ingroup auxiliaryGE
+ * This is the group of complex16 auxiliary functions for GE matrices
+ * @defgroup complex16POauxiliary complex16
+ * @ingroup auxiliaryPO
+ * This is the group of complex16 auxiliary functions for PO matrices
+ * @defgroup complex16SYauxiliary complex16
+ * @ingroup auxiliarySY
+ * This is the group of complex16 auxiliary functions for SY matrices
+ * @defgroup complex16GBauxiliary complex16
+ * @ingroup auxiliaryGB
+ * This is the group of complex16 auxiliary functions for GB matrices
+ *
+ ****
+ *
+ * @defgroup testing LAPACK Testing
+ * This is the group of LAPACK TESTING routines.
+ *
+ * @defgroup matgen Matrix Generation
+ * @ingroup testing
+ * This is the group of LAPACK TESTING MATGEN routines.
+ *
+ * @defgroup lin Linear Solve
+ * @ingroup testing
+ * This is the group of LAPACK TESTING LIN routines.
+ *
+ * @defgroup eig Eigenvalue and Singular value
+ * @ingroup testing
+ * This is the group of LAPACK TESTING EIG routines.
+ *
+ * @defgroup real_matgen real
+ * @ingroup matgen
+ * This is the group of real LAPACK TESTING MATGEN routines.
+ *
+ * @defgroup double_matgen double
+ * @ingroup matgen
+ * This is the group of double LAPACK TESTING MATGEN routines.
+ *
+ * @defgroup complex_matgen complex
+ * @ingroup matgen
+ * This is the group of complex LAPACK TESTING MATGEN routines.
+ *
+ * @defgroup complex16_matgen complex16
+ * @ingroup matgen
+ * This is the group of complex16 LAPACK TESTING MATGEN routines.
+ *
+ * @defgroup aux_matgen aux
+ * @ingroup matgen
+ * This is the group of auxiliary LAPACK TESTING MATGEN routines.
+ *
+ * @defgroup single_lin real
+ * @ingroup lin
+ * This is the group of real LAPACK TESTING LIN routines.
+ *
+ * @defgroup double_lin double
+ * @ingroup lin
+ * This is the group of double LAPACK TESTING LIN routines.
+ *
+ * @defgroup complex_lin complex
+ * @ingroup lin
+ * This is the group of complex LAPACK TESTING LIN routines.
+ *
+ * @defgroup complex16_lin complex16
+ * @ingroup lin
+ * This is the group of complex16 LAPACK TESTING LIN routines.
+ *
+ * @defgroup aux_lin aux
+ * @ingroup lin
+ * This is the group of auxiliary LAPACK TESTING LIN routines.
+ *
+ * @defgroup single_eig real
+ * @ingroup eig
+ * This is the group of real LAPACK TESTING EIG routines.
+ *
+ * @defgroup double_eig double
+ * @ingroup eig
+ * This is the group of double LAPACK TESTING EIG routines.
+ *
+ * @defgroup complex_eig complex
+ * @ingroup eig
+ * This is the group of complex LAPACK TESTING EIG routines.
+ *
+ * @defgroup complex16_eig complex16
+ * @ingroup eig
+ * This is the group of complex16 LAPACK TESTING EIG routines.
+ *
+ * @defgroup aux_eig aux
+ * @ingroup eig
+ * This is the group of auxiliary LAPACK TESTING EIG routines.
+ *
+ ****
+ * @defgroup blas Reference BLAS
+ * This is the group of BLAS routines.
+ *
+ * @defgroup level1 Level1
+ * @ingroup blas
+ * This is the group of LEVEL 1 BLAS routines.
+ * @defgroup level2 Level2
+ * @ingroup blas
+ * This is the group of LEVEL 2 BLAS routines.
+ * @defgroup level3 Level3
+ * @ingroup blas
+ * This is the group of LEVEL 3 BLAS routines.
+ * @defgroup blastesting Testing
+ * @ingroup blas
+ * This is the group of BLAS TESTING routines.
+ *
+ * @defgroup single_blas_level1 real
+ * @ingroup level1
+ * This is the group of real LEVEL 1 BLAS routines.
+ * @defgroup double_blas_level1 double
+ * @ingroup level1
+ * This is the group of double LEVEL 1 BLAS routines.
+ * @defgroup complex_blas_level1 complex
+ * @ingroup level1
+ * This is the group of complex LEVEL 1 BLAS routines.
+ * @defgroup complex16_blas_level1 complex16
+ * @ingroup level1
+ * This is the group of complex16 LEVEL 1 BLAS routines.
+ *
+ * @defgroup single_blas_level2 real
+ * @ingroup level2
+ * This is the group of real LEVEL 2 BLAS routines.
+ * @defgroup double_blas_level1 double
+ * @ingroup level2
+ * This is the group of double LEVEL 2 BLAS routines.
+ * @defgroup complex_blas_level2 complex
+ * @ingroup level2
+ * This is the group of complex LEVEL 2 BLAS routines.
+ * @defgroup complex16_blas_level2 complex16
+ * @ingroup level2
+ * This is the group of complex16 LEVEL 2 BLAS routines.
+ *
+ * @defgroup single_blas_level3 real
+ * @ingroup level3
+ * This is the group of real LEVEL 3 BLAS routines.
+ * @defgroup double_blas_level3 double
+ * @ingroup level3
+ * This is the group of double LEVEL 3 BLAS routines.
+ * @defgroup complex_blas_level3 complex
+ * @ingroup level3
+ * This is the group of complex LEVEL 3 BLAS routines.
+ * @defgroup complex16_blas_level3 complex16
+ * @ingroup level3
+ * This is the group of complex16 LEVEL 3 BLAS routines.
+ *
+ * @defgroup single_blas_testing real
+ * @ingroup blastesting
+ * This is the group of real BLAS TESTING routines.
+ * @defgroup double_blas_testing double
+ * @ingroup blastesting
+ * This is the group of double BLAS TESTING routines.
+ * @defgroup complex_blas_testing complex
+ * @ingroup blastesting
+ * This is the group of complex BLAS TESTING routines.
+ * @defgroup complex16_blas_testing complex16
+ * @ingroup blastesting
+ * This is the group of complex16 BLAS TESTING routines.
+ *
+**/
diff --git a/INSTALL/lawn81.tex b/DOCS/lawn81.tex
index 16efef76..16efef76 100644
--- a/INSTALL/lawn81.tex
+++ b/DOCS/lawn81.tex
diff --git a/INSTALL/org2.ps b/DOCS/org2.ps
index 48159d69..48159d69 100644
--- a/INSTALL/org2.ps
+++ b/DOCS/org2.ps
diff --git a/INSTALL/psfig.tex b/DOCS/psfig.tex
index e1e65a92..e1e65a92 100644
--- a/INSTALL/psfig.tex
+++ b/DOCS/psfig.tex
diff --git a/INSTALL/LAPACK_version.f b/INSTALL/LAPACK_version.f
index c70ead5f..d39cfd2e 100644
--- a/INSTALL/LAPACK_version.f
+++ b/INSTALL/LAPACK_version.f
@@ -1,12 +1,38 @@
-
- PROGRAM LAPACK_VERSION
+*> \brief \b LAPACK_VERSION
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM LAPACK_VERSION
*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ PROGRAM LAPACK_VERSION
*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
INTEGER MAJOR, MINOR, PATCH
*
CALL ILAVER ( MAJOR,MINOR, PATCH )
-
- WRITE(*,*) "LAPACK ",MAJOR,".",MINOR,".",PATCH
+ WRITE(*,*) "LAPACK ",MAJOR,".",MINOR,".",PATCH
*
END
diff --git a/INSTALL/dlamch.f b/INSTALL/dlamch.f
index 1c8b3687..6b001c2a 100644
--- a/INSTALL/dlamch.f
+++ b/INSTALL/dlamch.f
@@ -1,96 +1,122 @@
-C> \brief \b DLAMCH
-C>\details
-C> \b Purpose:
-C>\verbatim
-C>
-C> DLAMCH determines double precision machine parameters.
-C>
-C>\endverbatim
-C> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-C> \date November 2011
-C> \ingroup auxOTHERauxiliary
-C>
-C> \param[in] CMACH
-C> \verbatim
-C> Specifies the value to be returned by DLAMCH:
-C> = 'E' or 'e', DLAMCH := eps
-C> = 'S' or 's , DLAMCH := sfmin
-C> = 'B' or 'b', DLAMCH := base
-C> = 'P' or 'p', DLAMCH := eps*base
-C> = 'N' or 'n', DLAMCH := t
-C> = 'R' or 'r', DLAMCH := rnd
-C> = 'M' or 'm', DLAMCH := emin
-C> = 'U' or 'u', DLAMCH := rmin
-C> = 'L' or 'l', DLAMCH := emax
-C> = 'O' or 'o', DLAMCH := rmax
-C> where
-C> eps = relative machine precision
-C> sfmin = safe minimum, such that 1/sfmin does not overflow
-C> base = base of the machine
-C> prec = eps*base
-C> t = number of (base) digits in the mantissa
-C> rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
-C> emin = minimum exponent before (gradual) underflow
-C> rmin = underflow threshold - base**(emin-1)
-C> emax = largest exponent before overflow
-C> rmax = overflow threshold - (base**emax)*(1-eps)
-C> \endverbatim
-C>
+*> \brief \b DLAMCH
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLAMCH( CMACH )
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAMCH determines double precision machine parameters.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] CMACH
+*> \verbatim
+*> Specifies the value to be returned by DLAMCH:
+*> = 'E' or 'e', DLAMCH := eps
+*> = 'S' or 's , DLAMCH := sfmin
+*> = 'B' or 'b', DLAMCH := base
+*> = 'P' or 'p', DLAMCH := eps*base
+*> = 'N' or 'n', DLAMCH := t
+*> = 'R' or 'r', DLAMCH := rnd
+*> = 'M' or 'm', DLAMCH := emin
+*> = 'U' or 'u', DLAMCH := rmin
+*> = 'L' or 'l', DLAMCH := emax
+*> = 'O' or 'o', DLAMCH := rmax
+*> where
+*> eps = relative machine precision
+*> sfmin = safe minimum, such that 1/sfmin does not overflow
+*> base = base of the machine
+*> prec = eps*base
+*> t = number of (base) digits in the mantissa
+*> rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+*> emin = minimum exponent before (gradual) underflow
+*> rmin = underflow threshold - base**(emin-1)
+*> emax = largest exponent before overflow
+*> rmax = overflow threshold - (base**emax)*(1-eps)
+*> \endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLAMCH( CMACH )
-C
-C -- LAPACK auxiliary routine (version 3.3.0) --
-C -- LAPACK is a software package provided by Univ. of Tennessee, --
-C -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-C November 2011
-C
-C .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
CHARACTER CMACH
-C ..
-C
-C .. Scalar Arguments ..
+* ..
+*
+* .. Scalar Arguments ..
DOUBLE PRECISION A, B
-C ..
-C
-C =====================================================================
-C
-C .. Parameters ..
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
DOUBLE PRECISION ONE, ZERO
PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
-C ..
-C .. Local Scalars ..
+* ..
+* .. Local Scalars ..
DOUBLE PRECISION RND, EPS, SFMIN, SMALL, RMACH
-C ..
-C .. External Functions ..
+* ..
+* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
-C ..
-C .. Intrinsic Functions ..
+* ..
+* .. Intrinsic Functions ..
INTRINSIC DIGITS, EPSILON, HUGE, MAXEXPONENT,
$ MINEXPONENT, RADIX, TINY
-C ..
-C .. Executable Statements ..
-C
-C
-C Assume rounding, not chopping. Always.
-C
+* ..
+* .. Executable Statements ..
+*
+*
+* Assume rounding, not chopping. Always.
+*
RND = ONE
-C
+*
IF( ONE.EQ.RND ) THEN
EPS = EPSILON(ZERO) * 0.5
ELSE
EPS = EPSILON(ZERO)
END IF
-C
+*
IF( LSAME( CMACH, 'E' ) ) THEN
RMACH = EPS
ELSE IF( LSAME( CMACH, 'S' ) ) THEN
SFMIN = TINY(ZERO)
SMALL = ONE / HUGE(ZERO)
IF( SMALL.GE.SFMIN ) THEN
-C
-C Use SMALL plus a bit, to avoid the possibility of rounding
-C causing overflow when computing 1/sfmin.
-C
+*
+* Use SMALL plus a bit, to avoid the possibility of rounding
+* causing overflow when computing 1/sfmin.
+*
SFMIN = SMALL*( ONE+EPS )
END IF
RMACH = SFMIN
@@ -113,58 +139,58 @@ C
ELSE
RMACH = ZERO
END IF
-C
+*
DLAMCH = RMACH
RETURN
-C
-C End of DLAMCH
-C
+*
+* End of DLAMCH
+*
END
-C***********************************************************************
-C> \brief \b DLAMC3
-C>\details
-C> \b Purpose:
-C>\verbatim
-C>
-C> DLAMC3 is intended to force A and B to be stored prior to doing
-C> the addition of A and B , for use in situations where optimizers
-C> might hold one of these in a register.
-C>
-C>\endverbatim
-C> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-C> \date November 2011
-C> \ingroup auxOTHERauxiliary
-C>
-C> \param[in] A
-C> \verbatim
-C> A is a DOUBLE PRECISION
-C> \endverbatim
-C>
-C> \param[in] B
-C> \verbatim
-C> B is a DOUBLE PRECISION
-C> The values A and B.
-C> \endverbatim
-C>
+************************************************************************
+*> \brief \b DLAMC3
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> DLAMC3 is intended to force A and B to be stored prior to doing
+*> the addition of A and B , for use in situations where optimizers
+*> might hold one of these in a register.
+*>
+*>\endverbatim
+*> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
+*> \date November 2011
+*> \ingroup auxOTHERauxiliary
+*>
+*> \param[in] A
+*> \verbatim
+*> A is a DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is a DOUBLE PRECISION
+*> The values A and B.
+*> \endverbatim
+*>
DOUBLE PRECISION FUNCTION DLAMC3( A, B )
-C
-C -- LAPACK auxiliary routine (version 3.3.0) --
-C Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-C November 2010
-C
-C .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.3.0) --
+* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
+* November 2010
+*
+* .. Scalar Arguments ..
DOUBLE PRECISION A, B
-C ..
-C =====================================================================
-C
-C .. Executable Statements ..
-C
+* ..
+* =====================================================================
+*
+* .. Executable Statements ..
+*
DLAMC3 = A + B
-C
+*
RETURN
-C
-C End of DLAMC3
-C
+*
+* End of DLAMC3
+*
END
-C
-C***********************************************************************
+*
+************************************************************************
diff --git a/INSTALL/dlamchf77.f b/INSTALL/dlamchf77.f
index 16c6775d..885ef1ec 100644
--- a/INSTALL/dlamchf77.f
+++ b/INSTALL/dlamchf77.f
@@ -1,46 +1,103 @@
+*> \brief \b DLAMCHF77 deprecated
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLAMCH( CMACH )
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAMCHF77 determines double precision machine parameters.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] CMACH
+*> \verbatim
+*> Specifies the value to be returned by DLAMCH:
+*> = 'E' or 'e', DLAMCH := eps
+*> = 'S' or 's , DLAMCH := sfmin
+*> = 'B' or 'b', DLAMCH := base
+*> = 'P' or 'p', DLAMCH := eps*base
+*> = 'N' or 'n', DLAMCH := t
+*> = 'R' or 'r', DLAMCH := rnd
+*> = 'M' or 'm', DLAMCH := emin
+*> = 'U' or 'u', DLAMCH := rmin
+*> = 'L' or 'l', DLAMCH := emax
+*> = 'O' or 'o', DLAMCH := rmax
+*> where
+*> eps = relative machine precision
+*> sfmin = safe minimum, such that 1/sfmin does not overflow
+*> base = base of the machine
+*> prec = eps*base
+*> t = number of (base) digits in the mantissa
+*> rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+*> emin = minimum exponent before (gradual) underflow
+*> rmin = underflow threshold - base**(emin-1)
+*> emax = largest exponent before overflow
+*> rmax = overflow threshold - (base**emax)*(1-eps)
+*> \endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLAMCH( CMACH )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER CMACH
* ..
*
-* Purpose
-* =======
+* .. Scalar Arguments ..
+ LOGICAL IEEE1, RND
+ INTEGER BETA, T
+* ..
*
-* DLAMCH determines double precision machine parameters.
+* .. Scalar Arguments ..
+ LOGICAL RND
+ INTEGER BETA, EMAX, EMIN, T
+ DOUBLE PRECISION EPS, RMAX, RMIN
+* ..
*
-* Arguments
-* =========
+* .. Scalar Arguments ..
+ DOUBLE PRECISION A, B
+* ..
+*
+* .. Scalar Arguments ..
+ INTEGER BASE, EMIN
+ DOUBLE PRECISION START
+* ..
*
-* CMACH (input) CHARACTER*1
-* Specifies the value to be returned by DLAMCH:
-* = 'E' or 'e', DLAMCH := eps
-* = 'S' or 's , DLAMCH := sfmin
-* = 'B' or 'b', DLAMCH := base
-* = 'P' or 'p', DLAMCH := eps*base
-* = 'N' or 'n', DLAMCH := t
-* = 'R' or 'r', DLAMCH := rnd
-* = 'M' or 'm', DLAMCH := emin
-* = 'U' or 'u', DLAMCH := rmin
-* = 'L' or 'l', DLAMCH := emax
-* = 'O' or 'o', DLAMCH := rmax
-*
-* where
-*
-* eps = relative machine precision
-* sfmin = safe minimum, such that 1/sfmin does not overflow
-* base = base of the machine
-* prec = eps*base
-* t = number of (base) digits in the mantissa
-* rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
-* emin = minimum exponent before (gradual) underflow
-* rmin = underflow threshold - base**(emin-1)
-* emax = largest exponent before overflow
-* rmax = overflow threshold - (base**emax)*(1-eps)
+* .. Scalar Arguments ..
+ LOGICAL IEEE
+ INTEGER BETA, EMAX, EMIN, P
+ DOUBLE PRECISION RMAX
+* ..
*
* =====================================================================
*
@@ -127,6 +184,58 @@
*
************************************************************************
*
+*> \brief \b DLAMC1
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> DLAMC1 determines the machine parameters given by BETA, T, RND, and
+*> IEEE1.
+*>
+*>\verbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> The base of the machine.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> The number of ( BETA ) digits in the mantissa.
+*> \endverbatim
+*>
+*> \param[out] RND
+*> \verbatim
+*> Specifies whether proper rounding ( RND = .TRUE. ) or
+*> chopping ( RND = .FALSE. ) occurs in addition. This may not
+*> be a reliable guide to the way in which the machine performs
+*> its arithmetic.
+*> \endverbatim
+*>
+*> \param[out] IEEE1
+*> \verbatim
+*> Specifies whether rounding appears to be done in the IEEE
+*> 'round to nearest' style.
+*>
+*>\endverbatim
+*> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
+*> \date November 2011
+*> \ingroup auxOTHERauxiliary
+*>
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The routine is based on the routine ENVRON by Malcolm and
+*> incorporates suggestions by Gentleman and Marovich. See
+*>
+*> Malcolm M. A. (1972) Algorithms to reveal properties of
+*> floating-point arithmetic. Comms. of the ACM, 15, 949-951.
+*>
+*> Gentleman W. M. and Marovich S. B. (1974) More on algorithms
+*> that reveal properties of floating point arithmetic units.
+*> Comms. of the ACM, 17, 276-277.
+*> \endverbatim
+*>
SUBROUTINE DLAMC1( BETA, T, RND, IEEE1 )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -137,45 +246,6 @@
LOGICAL IEEE1, RND
INTEGER BETA, T
* ..
-*
-* Purpose
-* =======
-*
-* DLAMC1 determines the machine parameters given by BETA, T, RND, and
-* IEEE1.
-*
-* Arguments
-* =========
-*
-* BETA (output) INTEGER
-* The base of the machine.
-*
-* T (output) INTEGER
-* The number of ( BETA ) digits in the mantissa.
-*
-* RND (output) LOGICAL
-* Specifies whether proper rounding ( RND = .TRUE. ) or
-* chopping ( RND = .FALSE. ) occurs in addition. This may not
-* be a reliable guide to the way in which the machine performs
-* its arithmetic.
-*
-* IEEE1 (output) LOGICAL
-* Specifies whether rounding appears to be done in the IEEE
-* 'round to nearest' style.
-*
-* Further Details
-* ===============
-*
-* The routine is based on the routine ENVRON by Malcolm and
-* incorporates suggestions by Gentleman and Marovich. See
-*
-* Malcolm M. A. (1972) Algorithms to reveal properties of
-* floating-point arithmetic. Comms. of the ACM, 15, 949-951.
-*
-* Gentleman W. M. and Marovich S. B. (1974) More on algorithms
-* that reveal properties of floating point arithmetic units.
-* Comms. of the ACM, 17, 276-277.
-*
* =====================================================================
*
* .. Local Scalars ..
@@ -313,6 +383,79 @@
*
************************************************************************
*
+*> \brief \b DLAMC2
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> DLAMC2 determines the machine parameters specified in its argument
+*> list.
+*>
+*>\endverbatim
+*> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
+*> \date November 2011
+*> \ingroup auxOTHERauxiliary
+*>
+*> \param[out] BETA
+*> \verbatim
+*> The base of the machine.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> The number of ( BETA ) digits in the mantissa.
+*> \endverbatim
+*>
+*> \param[out] RND
+*> \verbatim
+*> Specifies whether proper rounding ( RND = .TRUE. ) or
+*> chopping ( RND = .FALSE. ) occurs in addition. This may not
+*> be a reliable guide to the way in which the machine performs
+*> its arithmetic.
+*> \endverbatim
+*>
+*> \param[out] EPS
+*> \verbatim
+*> The smallest positive number such that
+*> \endverbatim
+*> \verbatim
+*> fl( 1.0 - EPS ) .LT. 1.0,
+*> \endverbatim
+*> \verbatim
+*> where fl denotes the computed value.
+*> \endverbatim
+*>
+*> \param[out] EMIN
+*> \verbatim
+*> The minimum exponent before (gradual) underflow occurs.
+*> \endverbatim
+*>
+*> \param[out] RMIN
+*> \verbatim
+*> The smallest normalized number for the machine, given by
+*> BASE**( EMIN - 1 ), where BASE is the floating point value
+*> of BETA.
+*> \endverbatim
+*>
+*> \param[out] EMAX
+*> \verbatim
+*> The maximum exponent before overflow occurs.
+*> \endverbatim
+*>
+*> \param[out] RMAX
+*> \verbatim
+*> The largest positive number for the machine, given by
+*> BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
+*> value of BETA.
+*> \endverbatim
+*>
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The computation of EPS is based on a routine PARANOIA by
+*> W. Kahan of the University of California at Berkeley.
+*>
+*> \endverbatim
SUBROUTINE DLAMC2( BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -324,57 +467,6 @@
INTEGER BETA, EMAX, EMIN, T
DOUBLE PRECISION EPS, RMAX, RMIN
* ..
-*
-* Purpose
-* =======
-*
-* DLAMC2 determines the machine parameters specified in its argument
-* list.
-*
-* Arguments
-* =========
-*
-* BETA (output) INTEGER
-* The base of the machine.
-*
-* T (output) INTEGER
-* The number of ( BETA ) digits in the mantissa.
-*
-* RND (output) LOGICAL
-* Specifies whether proper rounding ( RND = .TRUE. ) or
-* chopping ( RND = .FALSE. ) occurs in addition. This may not
-* be a reliable guide to the way in which the machine performs
-* its arithmetic.
-*
-* EPS (output) DOUBLE PRECISION
-* The smallest positive number such that
-*
-* fl( 1.0 - EPS ) .LT. 1.0,
-*
-* where fl denotes the computed value.
-*
-* EMIN (output) INTEGER
-* The minimum exponent before (gradual) underflow occurs.
-*
-* RMIN (output) DOUBLE PRECISION
-* The smallest normalized number for the machine, given by
-* BASE**( EMIN - 1 ), where BASE is the floating point value
-* of BETA.
-*
-* EMAX (output) INTEGER
-* The maximum exponent before overflow occurs.
-*
-* RMAX (output) DOUBLE PRECISION
-* The largest positive number for the machine, given by
-* BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
-* value of BETA.
-*
-* Further Details
-* ===============
-*
-* The computation of EPS is based on a routine PARANOIA by
-* W. Kahan of the University of California at Berkeley.
-*
* =====================================================================
*
* .. Local Scalars ..
@@ -571,6 +663,23 @@
*
************************************************************************
*
+*> \brief \b DLAMC3
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> DLAMC3 is intended to force A and B to be stored prior to doing
+*> the addition of A and B , for use in situations where optimizers
+*> might hold one of these in a register.
+*>\endverbatim
+*>
+*> \param[in] A
+*>
+*> \param[in] B
+*> \verbatim
+*> The values A and B.
+*> \endverbatim
+
DOUBLE PRECISION FUNCTION DLAMC3( A, B )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -580,21 +689,6 @@
* .. Scalar Arguments ..
DOUBLE PRECISION A, B
* ..
-*
-* Purpose
-* =======
-*
-* DLAMC3 is intended to force A and B to be stored prior to doing
-* the addition of A and B , for use in situations where optimizers
-* might hold one of these in a register.
-*
-* Arguments
-* =========
-*
-* A (input) DOUBLE PRECISION
-* B (input) DOUBLE PRECISION
-* The values A and B.
-*
* =====================================================================
*
* .. Executable Statements ..
@@ -609,6 +703,32 @@
*
************************************************************************
*
+*> \brief \b DLAMC4
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> DLAMC4 is a service routine for DLAMC2.
+*>
+*>\endverbatim
+*>
+*> \param[out] EMIN
+*> \verbatim
+*> The minimum exponent before (gradual) underflow, computed by
+*> setting A = START and dividing by BASE until the previous A
+*> can not be recovered.
+*> \endverbatim
+*>
+*> \param[in] START
+*> \verbatim
+*> The starting point for determining EMIN.
+*> \endverbatim
+*>
+*> \param[in] BASE
+*> \verbatim
+*> The base of the machine.
+*> \endverbatim
+*>
SUBROUTINE DLAMC4( EMIN, START, BASE )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -619,26 +739,6 @@
INTEGER BASE, EMIN
DOUBLE PRECISION START
* ..
-*
-* Purpose
-* =======
-*
-* DLAMC4 is a service routine for DLAMC2.
-*
-* Arguments
-* =========
-*
-* EMIN (output) INTEGER
-* The minimum exponent before (gradual) underflow, computed by
-* setting A = START and dividing by BASE until the previous A
-* can not be recovered.
-*
-* START (input) DOUBLE PRECISION
-* The starting point for determining EMIN.
-*
-* BASE (input) INTEGER
-* The base of the machine.
-*
* =====================================================================
*
* .. Local Scalars ..
@@ -692,6 +792,52 @@
*
************************************************************************
*
+*> \brief \b DLAMC5
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> DLAMC5 attempts to compute RMAX, the largest machine floating-point
+*> number, without overflow. It assumes that EMAX + abs(EMIN) sum
+*> approximately to a power of 2. It will fail on machines where this
+*> assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
+*> EMAX = 28718). It will also fail if the value supplied for EMIN is
+*> too large (i.e. too close to zero), probably with overflow.
+*>
+*>\endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> The base of floating-point arithmetic.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> The number of base BETA digits in the mantissa of a
+*> floating-point value.
+*> \endverbatim
+*>
+*> \param[in] EMIN
+*> \verbatim
+*> The minimum exponent before (gradual) underflow.
+*> \endverbatim
+*>
+*> \param[in] IEEE
+*> \verbatim
+*> A logical flag specifying whether or not the arithmetic
+*> system is thought to comply with the IEEE standard.
+*> \endverbatim
+*>
+*> \param[out] EMAX
+*> \verbatim
+*> The largest exponent before overflow
+*> \endverbatim
+*>
+*> \param[out] RMAX
+*> \verbatim
+*> The largest machine floating-point number.
+*> \endverbatim
+*>
SUBROUTINE DLAMC5( BETA, P, EMIN, IEEE, EMAX, RMAX )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -703,40 +849,6 @@
INTEGER BETA, EMAX, EMIN, P
DOUBLE PRECISION RMAX
* ..
-*
-* Purpose
-* =======
-*
-* DLAMC5 attempts to compute RMAX, the largest machine floating-point
-* number, without overflow. It assumes that EMAX + abs(EMIN) sum
-* approximately to a power of 2. It will fail on machines where this
-* assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
-* EMAX = 28718). It will also fail if the value supplied for EMIN is
-* too large (i.e. too close to zero), probably with overflow.
-*
-* Arguments
-* =========
-*
-* BETA (input) INTEGER
-* The base of floating-point arithmetic.
-*
-* P (input) INTEGER
-* The number of base BETA digits in the mantissa of a
-* floating-point value.
-*
-* EMIN (input) INTEGER
-* The minimum exponent before (gradual) underflow.
-*
-* IEEE (input) LOGICAL
-* A logical flag specifying whether or not the arithmetic
-* system is thought to comply with the IEEE standard.
-*
-* EMAX (output) INTEGER
-* The largest exponent before overflow
-*
-* RMAX (output) DOUBLE PRECISION
-* The largest machine floating-point number.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/INSTALL/dlamchtst.f b/INSTALL/dlamchtst.f
index cca831f2..d2cf15b9 100644
--- a/INSTALL/dlamchtst.f
+++ b/INSTALL/dlamchtst.f
@@ -1,8 +1,34 @@
+*> \brief \b DLAMCHTST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM DLAMCHTST
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
PROGRAM DLAMCHTST
*
* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/dsecnd_EXT_ETIME.f b/INSTALL/dsecnd_EXT_ETIME.f
index d7a21423..1118042e 100644
--- a/INSTALL/dsecnd_EXT_ETIME.f
+++ b/INSTALL/dsecnd_EXT_ETIME.f
@@ -1,14 +1,46 @@
- DOUBLE PRECISION FUNCTION DSECND( )
+*> \brief \b DSECND Using ETIME
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DSECND( )
+*
* Purpose
* =======
*
-* DSECND returns the user time for a process in seconds.
-* This version gets the time from the EXTERNAL system function ETIME.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSECND returns the user time for a process in seconds.
+*> This version gets the time from the EXTERNAL system function ETIME.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DSECND( )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
*
* =====================================================================
*
diff --git a/INSTALL/dsecnd_EXT_ETIME_.f b/INSTALL/dsecnd_EXT_ETIME_.f
index 13924b98..4b5161b2 100644
--- a/INSTALL/dsecnd_EXT_ETIME_.f
+++ b/INSTALL/dsecnd_EXT_ETIME_.f
@@ -1,15 +1,44 @@
- DOUBLE PRECISION FUNCTION DSECND( )
+*> \brief \b DSECND Using ETIME_
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DSECND( )
+*
* Purpose
* =======
*
-* DSECND returns the user time for a process in seconds.
-* This version gets the time from the system function ETIME_.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSECND returns the user time for a process in seconds.
+*> This version gets the time from the system function ETIME_.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DSECND( )
*
+* -- LAPACK auxiliary routine (version 3.2) --
+* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
+* February 2007
* =====================================================================
*
* .. Local Scalars ..
diff --git a/INSTALL/dsecnd_INT_CPU_TIME.f b/INSTALL/dsecnd_INT_CPU_TIME.f
index 425d2a1e..1a0ecd9a 100644
--- a/INSTALL/dsecnd_INT_CPU_TIME.f
+++ b/INSTALL/dsecnd_INT_CPU_TIME.f
@@ -1,14 +1,45 @@
- DOUBLE PRECISION FUNCTION DSECND( )
+*> \brief \b DSECND Using INTERNAL function CPU_TIME.
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DSECND( )
+*
* Purpose
* =======
*
-* DSECND returns the user time for a process in seconds.
-* This version gets the time from the INTERNAL function CPU_TIME.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSECND returns the user time for a process in seconds.
+*> This version gets the time from the INTERNAL function CPU_TIME.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DSECND( )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/dsecnd_INT_ETIME.f b/INSTALL/dsecnd_INT_ETIME.f
index ee271bcc..a8d8156b 100644
--- a/INSTALL/dsecnd_INT_ETIME.f
+++ b/INSTALL/dsecnd_INT_ETIME.f
@@ -1,14 +1,45 @@
- DOUBLE PRECISION FUNCTION DSECND( )
+*> \brief \b DSECND Using the INTERNAL function ETIME.
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DSECND( )
+*
* Purpose
* =======
*
-* DSECND returns the user time for a process in seconds.
-* This version gets the time from the INTERNAL function ETIME.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSECND returns the user time for a process in seconds.
+*> This version gets the time from the INTERNAL function ETIME.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DSECND( )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/dsecnd_NONE.f b/INSTALL/dsecnd_NONE.f
index 9baabe9f..b65279ad 100644
--- a/INSTALL/dsecnd_NONE.f
+++ b/INSTALL/dsecnd_NONE.f
@@ -1,16 +1,47 @@
- DOUBLE PRECISION FUNCTION DSECND( )
+*> \brief \b DSECND returns nothing
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DSECND( )
+*
* Purpose
* =======
*
-* DSECND returns nothing instead of returning the user time for a process in seconds.
-* If you are using that routine, it means that neither EXTERNAL ETIME,
-* EXTERNAL ETIME_, INTERNAL ETIME, INTERNAL CPU_TIME is available on
-* your machine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSECND returns nothing instead of returning the user time for a process in seconds.
+*> If you are using that routine, it means that neither EXTERNAL ETIME,
+*> EXTERNAL ETIME_, INTERNAL ETIME, INTERNAL CPU_TIME is available on
+*> your machine.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DSECND( )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/dsecndtst.f b/INSTALL/dsecndtst.f
index b6aff1af..603d53ee 100644
--- a/INSTALL/dsecndtst.f
+++ b/INSTALL/dsecndtst.f
@@ -1,8 +1,36 @@
+*> \brief \b DSECNDTST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM DSECNDTST
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
PROGRAM DSECNDTST
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/ilaver.f b/INSTALL/ilaver.f
index fddec72d..4d4714be 100644
--- a/INSTALL/ilaver.f
+++ b/INSTALL/ilaver.f
@@ -1,26 +1,59 @@
- SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b ILAVER returns the LAPACK version.
+**
+* =========== DOCUMENTATION ===========
*
-* April 2011
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
+*
+* INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
+*
* Purpose
* =======
*
-* This subroutine return the Lapack version.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine returns the LAPACK version.
+*>
+*>\endverbatim
*
* Arguments
* =========
-* VERS_MAJOR (output) INTEGER
-* return the lapack major version
-* VERS_MINOR (output) INTEGER
-* return the lapack minor version from the major version
-* VERS_PATCH (output) INTEGER
-* return the lapack patch version from the minor version
+*
+*> \param[out] VERS_MAJOR
+*> return the lapack major version
+*>
+*> \param[out] VERS_MINOR
+*> return the lapack minor version from the major version
+*>
+*> \param[out] VERS_PATCH
+*> return the lapack patch version from the minor version
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
* =====================================================================
*
INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
diff --git a/INSTALL/lsame.f b/INSTALL/lsame.f
index c717d0b7..b284aa4c 100644
--- a/INSTALL/lsame.f
+++ b/INSTALL/lsame.f
@@ -1,26 +1,65 @@
- LOGICAL FUNCTION LSAME( CA, CB )
+*> \brief \b LSAME
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION LSAME( CA, CB )
*
* .. Scalar Arguments ..
- CHARACTER CA, CB
+* CHARACTER CA, CB
* ..
-*
+*
* Purpose
* =======
*
-* LSAME returns .TRUE. if CA is the same letter as CB regardless of
-* case.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> LSAME returns .TRUE. if CA is the same letter as CB regardless of
+*> case.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* CA (input) CHARACTER*1
+*> \param[in] CA
+*> \verbatim
+*> \endverbatim
+*>
+*> \param[in] CB
+*> \verbatim
+*> CA and CB specify the single characters to be compared.
+*> \endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CB (input) CHARACTER*1
-* CA and CB specify the single characters to be compared.
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ LOGICAL FUNCTION LSAME( CA, CB )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER CA, CB
+* ..
*
* =====================================================================
*
diff --git a/INSTALL/lsametst.f b/INSTALL/lsametst.f
index b221c78e..75dba05a 100644
--- a/INSTALL/lsametst.f
+++ b/INSTALL/lsametst.f
@@ -1,8 +1,36 @@
+*> \brief \b LSAMETST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* PROGRAM LSAMETST
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
PROGRAM LSAMETST
*
* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
* .. Local Scalars ..
diff --git a/INSTALL/second_EXT_ETIME.f b/INSTALL/second_EXT_ETIME.f
index 3dec48cd..3b010a84 100644
--- a/INSTALL/second_EXT_ETIME.f
+++ b/INSTALL/second_EXT_ETIME.f
@@ -1,14 +1,45 @@
- REAL FUNCTION SECOND( )
+*> \brief \b SECOND Using ETIME
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SECOND( )
+*
* Purpose
* =======
*
-* SECOND returns the user time for a process in seconds.
-* This version gets the time from the EXTERNAL system function ETIME.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SECOND returns the user time for a process in seconds.
+*> This version gets the time from the EXTERNAL system function ETIME.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SECOND( )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/second_EXT_ETIME_.f b/INSTALL/second_EXT_ETIME_.f
index 4a9d26e0..ecdf34b9 100644
--- a/INSTALL/second_EXT_ETIME_.f
+++ b/INSTALL/second_EXT_ETIME_.f
@@ -1,15 +1,44 @@
- REAL FUNCTION SECOND( )
+*> \brief \b SECOND Using ETIME_
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SECOND( )
+*
* Purpose
* =======
*
-* SECOND returns the user time for a process in seconds.
-* This version gets the time from the system function ETIME_.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SECOND returns the user time for a process in seconds.
+*> This version gets the time from the system function ETIME_.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SECOND( )
*
+* -- LAPACK auxiliary routine (version 3.2) --
+* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
+* February 2007
* =====================================================================
*
* .. Local Scalars ..
@@ -30,4 +59,3 @@
*
* End of SECOND
*
- END
diff --git a/INSTALL/second_INT_CPU_TIME.f b/INSTALL/second_INT_CPU_TIME.f
index 1f606189..ada39a9f 100644
--- a/INSTALL/second_INT_CPU_TIME.f
+++ b/INSTALL/second_INT_CPU_TIME.f
@@ -1,14 +1,45 @@
- REAL FUNCTION SECOND( )
+*> \brief \b SECOND Using INTERNAL function CPU_TIME.
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SECOND( )
+*
* Purpose
* =======
*
-* SECOND returns the user time for a process in seconds.
-* This version gets the time from the INTERNAL function CPU_TIME.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SECOND returns the user time for a process in seconds.
+*> This version gets the time from the INTERNAL function CPU_TIME.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SECOND( )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/second_INT_ETIME.f b/INSTALL/second_INT_ETIME.f
index fc98f0d2..9b6a61bb 100644
--- a/INSTALL/second_INT_ETIME.f
+++ b/INSTALL/second_INT_ETIME.f
@@ -1,14 +1,45 @@
- REAL FUNCTION SECOND( )
+*> \brief \b SECOND Using the INTERNAL function ETIME.
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SECOND( )
+*
* Purpose
* =======
*
-* SECOND returns the user time for a process in seconds.
-* This version gets the time from the INTERNAL function ETIME.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SECOND returns the user time for a process in seconds.
+*> This version gets the time from the INTERNAL function ETIME.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SECOND( )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/second_NONE.f b/INSTALL/second_NONE.f
index a82ce028..67d1b677 100644
--- a/INSTALL/second_NONE.f
+++ b/INSTALL/second_NONE.f
@@ -1,16 +1,47 @@
- REAL FUNCTION SECOND( )
+*> \brief \b SECOND returns nothing
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SECOND( )
+*
* Purpose
* =======
*
-* SECOND returns nothing instead of returning the user time for a process in seconds.
-* If you are using that routine, it means that neither EXTERNAL ETIME,
-* EXTERNAL ETIME_, INTERNAL ETIME, INTERNAL CPU_TIME is available on
-* your machine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SECOND returns nothing instead of returning the user time for a process in seconds.
+*> If you are using that routine, it means that neither EXTERNAL ETIME,
+*> EXTERNAL ETIME_, INTERNAL ETIME, INTERNAL CPU_TIME is available on
+*> your machine.
+*>
+*>\endverbatim
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SECOND( )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/secondtst.f b/INSTALL/secondtst.f
index a5c7b925..858a430c 100644
--- a/INSTALL/secondtst.f
+++ b/INSTALL/secondtst.f
@@ -1,8 +1,32 @@
+*> \brief \b SECONDTST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
PROGRAM SECONDTST
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/slamch.f b/INSTALL/slamch.f
index 518ff680..e96ed21d 100644
--- a/INSTALL/slamch.f
+++ b/INSTALL/slamch.f
@@ -1,96 +1,123 @@
-C> \brief \b SLAMCH
-C>\details
-C> \b Purpose:
-C>\verbatim
-C>
-C> SLAMCH determines single precision machine parameters.
-C>
-C>\endverbatim
-C> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-C> \date November 2011
-C> \ingroup auxOTHERauxiliary
-C>
-C> \param[in] CMACH
-C> \verbatim
-C> Specifies the value to be returned by SLAMCH:
-C> = 'E' or 'e', SLAMCH := eps
-C> = 'S' or 's , SLAMCH := sfmin
-C> = 'B' or 'b', SLAMCH := base
-C> = 'P' or 'p', SLAMCH := eps*base
-C> = 'N' or 'n', SLAMCH := t
-C> = 'R' or 'r', SLAMCH := rnd
-C> = 'M' or 'm', SLAMCH := emin
-C> = 'U' or 'u', SLAMCH := rmin
-C> = 'L' or 'l', SLAMCH := emax
-C> = 'O' or 'o', SLAMCH := rmax
-C> where
-C> eps = relative machine precision
-C> sfmin = safe minimum, such that 1/sfmin does not overflow
-C> base = base of the machine
-C> prec = eps*base
-C> t = number of (base) digits in the mantissa
-C> rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
-C> emin = minimum exponent before (gradual) underflow
-C> rmin = underflow threshold - base**(emin-1)
-C> emax = largest exponent before overflow
-C> rmax = overflow threshold - (base**emax)*(1-eps)
-C> \endverbatim
-C>
+*> \brief \b SLAMCH
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLAMCH( CMACH )
+*
+* .. Scalar Arguments ..
+* CHARACTER CMACH
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAMCH determines single precision machine parameters.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] CMACH
+*> \verbatim
+*> Specifies the value to be returned by SLAMCH:
+*> = 'E' or 'e', SLAMCH := eps
+*> = 'S' or 's , SLAMCH := sfmin
+*> = 'B' or 'b', SLAMCH := base
+*> = 'P' or 'p', SLAMCH := eps*base
+*> = 'N' or 'n', SLAMCH := t
+*> = 'R' or 'r', SLAMCH := rnd
+*> = 'M' or 'm', SLAMCH := emin
+*> = 'U' or 'u', SLAMCH := rmin
+*> = 'L' or 'l', SLAMCH := emax
+*> = 'O' or 'o', SLAMCH := rmax
+*> where
+*> eps = relative machine precision
+*> sfmin = safe minimum, such that 1/sfmin does not overflow
+*> base = base of the machine
+*> prec = eps*base
+*> t = number of (base) digits in the mantissa
+*> rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+*> emin = minimum exponent before (gradual) underflow
+*> rmin = underflow threshold - base**(emin-1)
+*> emax = largest exponent before overflow
+*> rmax = overflow threshold - (base**emax)*(1-eps)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION SLAMCH( CMACH )
-C
-C -- LAPACK auxiliary routine (version 3.3.0) --
-C -- LAPACK is a software package provided by Univ. of Tennessee, --
-C -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-C November 2011
-C
-C .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
CHARACTER CMACH
-C ..
-C
-C .. Scalar Arguments ..
- REAL A, B
-C ..
-C
-C =====================================================================
-C
-C .. Parameters ..
+* ..
+*
+* =====================================================================
+*
+* .. Parameters ..
REAL ONE, ZERO
PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
-C ..
-C .. Local Scalars ..
+* ..
+* .. Local Scalars ..
REAL RND, EPS, SFMIN, SMALL, RMACH
-C ..
-C .. External Functions ..
+* ..
+* .. External Functions ..
LOGICAL LSAME
EXTERNAL LSAME
-C ..
-C .. Intrinsic Functions ..
+* ..
+* .. Intrinsic Functions ..
INTRINSIC DIGITS, EPSILON, HUGE, MAXEXPONENT,
$ MINEXPONENT, RADIX, TINY
-C ..
-C .. Executable Statements ..
-C
-C
-C Assume rounding, not chopping. Always.
-C
+* ..
+* .. Executable Statements ..
+*
+*
+* Assume rounding, not chopping. Always.
+*
RND = ONE
-C
+*
IF( ONE.EQ.RND ) THEN
EPS = EPSILON(ZERO) * 0.5
ELSE
EPS = EPSILON(ZERO)
END IF
-C
+*
IF( LSAME( CMACH, 'E' ) ) THEN
RMACH = EPS
ELSE IF( LSAME( CMACH, 'S' ) ) THEN
SFMIN = TINY(ZERO)
SMALL = ONE / HUGE(ZERO)
IF( SMALL.GE.SFMIN ) THEN
-C
-C Use SMALL plus a bit, to avoid the possibility of rounding
-C causing overflow when computing 1/sfmin.
-C
+*
+* Use SMALL plus a bit, to avoid the possibility of rounding
+* causing overflow when computing 1/sfmin.
+*
SFMIN = SMALL*( ONE+EPS )
END IF
RMACH = SFMIN
@@ -113,57 +140,57 @@ C
ELSE
RMACH = ZERO
END IF
-C
+*
SLAMCH = RMACH
RETURN
-C
-C End of SLAMCH
-C
+*
+* End of SLAMCH
+*
END
-C***********************************************************************
-C> \brief \b SLAMC3
-C>\details
-C> \b Purpose:
-C>\verbatim
-C>
-C> SLAMC3 is intended to force A and B to be stored prior to doing
-C> the addition of A and B , for use in situations where optimizers
-C> might hold one of these in a register.
-C>
-C>\endverbatim
-C> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-C> \date November 2011
-C> \ingroup auxOTHERauxiliary
-C>
-C> \param[in] A
-C> \verbatim
-C> \endverbatim
-C>
-C> \param[in] B
-C> \verbatim
-C> The values A and B.
-C> \endverbatim
-C>
-C
+************************************************************************
+*> \brief \b SLAMC3
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> SLAMC3 is intended to force A and B to be stored prior to doing
+*> the addition of A and B , for use in situations where optimizers
+*> might hold one of these in a register.
+*>
+*>\endverbatim
+*> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
+*> \date November 2011
+*> \ingroup auxOTHERauxiliary
+*>
+*> \param[in] A
+*> \verbatim
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> The values A and B.
+*> \endverbatim
+*>
+*
REAL FUNCTION SLAMC3( A, B )
-C
-C -- LAPACK auxiliary routine (version 3.3.0) --
-C Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-C November 2010
-C
-C .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.3.0) --
+* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
+* November 2010
+*
+* .. Scalar Arguments ..
REAL A, B
-C ..
-C =====================================================================
-C
-C .. Executable Statements ..
-C
+* ..
+* =====================================================================
+*
+* .. Executable Statements ..
+*
SLAMC3 = A + B
-C
+*
RETURN
-C
-C End of SLAMC3
-C
+*
+* End of SLAMC3
+*
END
-C
-C***********************************************************************
+*
+************************************************************************
diff --git a/INSTALL/slamchf77.f b/INSTALL/slamchf77.f
index c973e6e4..7d3c01b2 100644
--- a/INSTALL/slamchf77.f
+++ b/INSTALL/slamchf77.f
@@ -1,46 +1,109 @@
- REAL FUNCTION SLAMCH( CMACH )
+*> \brief \b SLAMCHF77 deprecated
*
-* -- LAPACK auxiliary routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLAMCH( CMACH )
*
* .. Scalar Arguments ..
- CHARACTER CMACH
+* CHARACTER CMACH
* ..
-*
+*
* Purpose
* =======
*
-* SLAMCH determines single precision machine parameters.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAMCH determines single precision machine parameters.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* CMACH (input) CHARACTER*1
-* Specifies the value to be returned by SLAMCH:
-* = 'E' or 'e', SLAMCH := eps
-* = 'S' or 's , SLAMCH := sfmin
-* = 'B' or 'b', SLAMCH := base
-* = 'P' or 'p', SLAMCH := eps*base
-* = 'N' or 'n', SLAMCH := t
-* = 'R' or 'r', SLAMCH := rnd
-* = 'M' or 'm', SLAMCH := emin
-* = 'U' or 'u', SLAMCH := rmin
-* = 'L' or 'l', SLAMCH := emax
-* = 'O' or 'o', SLAMCH := rmax
-*
-* where
-*
-* eps = relative machine precision
-* sfmin = safe minimum, such that 1/sfmin does not overflow
-* base = base of the machine
-* prec = eps*base
-* t = number of (base) digits in the mantissa
-* rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
-* emin = minimum exponent before (gradual) underflow
-* rmin = underflow threshold - base**(emin-1)
-* emax = largest exponent before overflow
-* rmax = overflow threshold - (base**emax)*(1-eps)
+*> \param[in] CMACH
+*> \verbatim
+*> Specifies the value to be returned by SLAMCH:
+*> = 'E' or 'e', SLAMCH := eps
+*> = 'S' or 's , SLAMCH := sfmin
+*> = 'B' or 'b', SLAMCH := base
+*> = 'P' or 'p', SLAMCH := eps*base
+*> = 'N' or 'n', SLAMCH := t
+*> = 'R' or 'r', SLAMCH := rnd
+*> = 'M' or 'm', SLAMCH := emin
+*> = 'U' or 'u', SLAMCH := rmin
+*> = 'L' or 'l', SLAMCH := emax
+*> = 'O' or 'o', SLAMCH := rmax
+*> where
+*> eps = relative machine precision
+*> sfmin = safe minimum, such that 1/sfmin does not overflow
+*> base = base of the machine
+*> prec = eps*base
+*> t = number of (base) digits in the mantissa
+*> rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
+*> emin = minimum exponent before (gradual) underflow
+*> rmin = underflow threshold - base**(emin-1)
+*> emax = largest exponent before overflow
+*> rmax = overflow threshold - (base**emax)*(1-eps)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SLAMCH( CMACH )
+*
+* -- LAPACK auxiliary routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER CMACH
+* ..
+*
+* .. Scalar Arguments ..
+ LOGICAL IEEE1, RND
+ INTEGER BETA, T
+* ..
+*
+* .. Scalar Arguments ..
+ LOGICAL RND
+ INTEGER BETA, EMAX, EMIN, T
+ REAL EPS, RMAX, RMIN
+* ..
+*
+* .. Scalar Arguments ..
+ REAL A, B
+* ..
+*
+* .. Scalar Arguments ..
+ INTEGER BASE
+ INTEGER EMIN
+ REAL START
+* ..
+*
+* .. Scalar Arguments ..
+ LOGICAL IEEE
+ INTEGER BETA, EMAX, EMIN, P
+ REAL RMAX
+* ..
*
* =====================================================================
*
@@ -127,6 +190,58 @@
*
************************************************************************
*
+*> \brief \b SLAMC1
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> SLAMC1 determines the machine parameters given by BETA, T, RND, and
+*> IEEE1.
+*>
+*>\verbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> The base of the machine.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> The number of ( BETA ) digits in the mantissa.
+*> \endverbatim
+*>
+*> \param[out] RND
+*> \verbatim
+*> Specifies whether proper rounding ( RND = .TRUE. ) or
+*> chopping ( RND = .FALSE. ) occurs in addition. This may not
+*> be a reliable guide to the way in which the machine performs
+*> its arithmetic.
+*> \endverbatim
+*>
+*> \param[out] IEEE1
+*> \verbatim
+*> Specifies whether rounding appears to be done in the IEEE
+*> 'round to nearest' style.
+*>
+*>\endverbatim
+*> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
+*> \date November 2011
+*> \ingroup auxOTHERauxiliary
+*>
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The routine is based on the routine ENVRON by Malcolm and
+*> incorporates suggestions by Gentleman and Marovich. See
+*>
+*> Malcolm M. A. (1972) Algorithms to reveal properties of
+*> floating-point arithmetic. Comms. of the ACM, 15, 949-951.
+*>
+*> Gentleman W. M. and Marovich S. B. (1974) More on algorithms
+*> that reveal properties of floating point arithmetic units.
+*> Comms. of the ACM, 17, 276-277.
+*> \endverbatim
+*>
SUBROUTINE SLAMC1( BETA, T, RND, IEEE1 )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -137,45 +252,6 @@
LOGICAL IEEE1, RND
INTEGER BETA, T
* ..
-*
-* Purpose
-* =======
-*
-* SLAMC1 determines the machine parameters given by BETA, T, RND, and
-* IEEE1.
-*
-* Arguments
-* =========
-*
-* BETA (output) INTEGER
-* The base of the machine.
-*
-* T (output) INTEGER
-* The number of ( BETA ) digits in the mantissa.
-*
-* RND (output) LOGICAL
-* Specifies whether proper rounding ( RND = .TRUE. ) or
-* chopping ( RND = .FALSE. ) occurs in addition. This may not
-* be a reliable guide to the way in which the machine performs
-* its arithmetic.
-*
-* IEEE1 (output) LOGICAL
-* Specifies whether rounding appears to be done in the IEEE
-* 'round to nearest' style.
-*
-* Further Details
-* ===============
-*
-* The routine is based on the routine ENVRON by Malcolm and
-* incorporates suggestions by Gentleman and Marovich. See
-*
-* Malcolm M. A. (1972) Algorithms to reveal properties of
-* floating-point arithmetic. Comms. of the ACM, 15, 949-951.
-*
-* Gentleman W. M. and Marovich S. B. (1974) More on algorithms
-* that reveal properties of floating point arithmetic units.
-* Comms. of the ACM, 17, 276-277.
-*
* =====================================================================
*
* .. Local Scalars ..
@@ -313,6 +389,79 @@
*
************************************************************************
*
+*> \brief \b SLAMC2
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> SLAMC2 determines the machine parameters specified in its argument
+*> list.
+*>
+*>\endverbatim
+*> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
+*> \date November 2011
+*> \ingroup auxOTHERauxiliary
+*>
+*> \param[out] BETA
+*> \verbatim
+*> The base of the machine.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> The number of ( BETA ) digits in the mantissa.
+*> \endverbatim
+*>
+*> \param[out] RND
+*> \verbatim
+*> Specifies whether proper rounding ( RND = .TRUE. ) or
+*> chopping ( RND = .FALSE. ) occurs in addition. This may not
+*> be a reliable guide to the way in which the machine performs
+*> its arithmetic.
+*> \endverbatim
+*>
+*> \param[out] EPS
+*> \verbatim
+*> The smallest positive number such that
+*> \endverbatim
+*> \verbatim
+*> fl( 1.0 - EPS ) .LT. 1.0,
+*> \endverbatim
+*> \verbatim
+*> where fl denotes the computed value.
+*> \endverbatim
+*>
+*> \param[out] EMIN
+*> \verbatim
+*> The minimum exponent before (gradual) underflow occurs.
+*> \endverbatim
+*>
+*> \param[out] RMIN
+*> \verbatim
+*> The smallest normalized number for the machine, given by
+*> BASE**( EMIN - 1 ), where BASE is the floating point value
+*> of BETA.
+*> \endverbatim
+*>
+*> \param[out] EMAX
+*> \verbatim
+*> The maximum exponent before overflow occurs.
+*> \endverbatim
+*>
+*> \param[out] RMAX
+*> \verbatim
+*> The largest positive number for the machine, given by
+*> BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
+*> value of BETA.
+*> \endverbatim
+*>
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The computation of EPS is based on a routine PARANOIA by
+*> W. Kahan of the University of California at Berkeley.
+*>
+*> \endverbatim
SUBROUTINE SLAMC2( BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -324,57 +473,6 @@
INTEGER BETA, EMAX, EMIN, T
REAL EPS, RMAX, RMIN
* ..
-*
-* Purpose
-* =======
-*
-* SLAMC2 determines the machine parameters specified in its argument
-* list.
-*
-* Arguments
-* =========
-*
-* BETA (output) INTEGER
-* The base of the machine.
-*
-* T (output) INTEGER
-* The number of ( BETA ) digits in the mantissa.
-*
-* RND (output) LOGICAL
-* Specifies whether proper rounding ( RND = .TRUE. ) or
-* chopping ( RND = .FALSE. ) occurs in addition. This may not
-* be a reliable guide to the way in which the machine performs
-* its arithmetic.
-*
-* EPS (output) REAL
-* The smallest positive number such that
-*
-* fl( 1.0 - EPS ) .LT. 1.0,
-*
-* where fl denotes the computed value.
-*
-* EMIN (output) INTEGER
-* The minimum exponent before (gradual) underflow occurs.
-*
-* RMIN (output) REAL
-* The smallest normalized number for the machine, given by
-* BASE**( EMIN - 1 ), where BASE is the floating point value
-* of BETA.
-*
-* EMAX (output) INTEGER
-* The maximum exponent before overflow occurs.
-*
-* RMAX (output) REAL
-* The largest positive number for the machine, given by
-* BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
-* value of BETA.
-*
-* Further Details
-* ===============
-*
-* The computation of EPS is based on a routine PARANOIA by
-* W. Kahan of the University of California at Berkeley.
-*
* =====================================================================
*
* .. Local Scalars ..
@@ -571,7 +669,24 @@
*
************************************************************************
*
- REAL FUNCTION SLAMC3( A, B )
+*> \brief \b SLAMC3
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> SLAMC3 is intended to force A and B to be stored prior to doing
+*> the addition of A and B , for use in situations where optimizers
+*> might hold one of these in a register.
+*>\endverbatim
+*>
+*> \param[in] A
+*>
+*> \param[in] B
+*> \verbatim
+*> The values A and B.
+*> \endverbatim
+
+ REAL FUNCTION SLAMC3( A, B )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
@@ -580,21 +695,6 @@
* .. Scalar Arguments ..
REAL A, B
* ..
-*
-* Purpose
-* =======
-*
-* SLAMC3 is intended to force A and B to be stored prior to doing
-* the addition of A and B , for use in situations where optimizers
-* might hold one of these in a register.
-*
-* Arguments
-* =========
-*
-* A (input) REAL
-* B (input) REAL
-* The values A and B.
-*
* =====================================================================
*
* .. Executable Statements ..
@@ -609,6 +709,32 @@
*
************************************************************************
*
+*> \brief \b SLAMC4
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> SLAMC4 is a service routine for SLAMC2.
+*>
+*>\endverbatim
+*>
+*> \param[out] EMIN
+*> \verbatim
+*> The minimum exponent before (gradual) underflow, computed by
+*> setting A = START and dividing by BASE until the previous A
+*> can not be recovered.
+*> \endverbatim
+*>
+*> \param[in] START
+*> \verbatim
+*> The starting point for determining EMIN.
+*> \endverbatim
+*>
+*> \param[in] BASE
+*> \verbatim
+*> The base of the machine.
+*> \endverbatim
+*>
SUBROUTINE SLAMC4( EMIN, START, BASE )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -620,26 +746,6 @@
INTEGER EMIN
REAL START
* ..
-*
-* Purpose
-* =======
-*
-* SLAMC4 is a service routine for SLAMC2.
-*
-* Arguments
-* =========
-*
-* EMIN (output) INTEGER
-* The minimum exponent before (gradual) underflow, computed by
-* setting A = START and dividing by BASE until the previous A
-* can not be recovered.
-*
-* START (input) REAL
-* The starting point for determining EMIN.
-*
-* BASE (input) INTEGER
-* The base of the machine.
-*
* =====================================================================
*
* .. Local Scalars ..
@@ -693,6 +799,52 @@
*
************************************************************************
*
+*> \brief \b SLAMC5
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> SLAMC5 attempts to compute RMAX, the largest machine floating-point
+*> number, without overflow. It assumes that EMAX + abs(EMIN) sum
+*> approximately to a power of 2. It will fail on machines where this
+*> assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
+*> EMAX = 28718). It will also fail if the value supplied for EMIN is
+*> too large (i.e. too close to zero), probably with overflow.
+*>
+*>\endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> The base of floating-point arithmetic.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> The number of base BETA digits in the mantissa of a
+*> floating-point value.
+*> \endverbatim
+*>
+*> \param[in] EMIN
+*> \verbatim
+*> The minimum exponent before (gradual) underflow.
+*> \endverbatim
+*>
+*> \param[in] IEEE
+*> \verbatim
+*> A logical flag specifying whether or not the arithmetic
+*> system is thought to comply with the IEEE standard.
+*> \endverbatim
+*>
+*> \param[out] EMAX
+*> \verbatim
+*> The largest exponent before overflow
+*> \endverbatim
+*>
+*> \param[out] RMAX
+*> \verbatim
+*> The largest machine floating-point number.
+*> \endverbatim
+*>
SUBROUTINE SLAMC5( BETA, P, EMIN, IEEE, EMAX, RMAX )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
@@ -704,40 +856,6 @@
INTEGER BETA, EMAX, EMIN, P
REAL RMAX
* ..
-*
-* Purpose
-* =======
-*
-* SLAMC5 attempts to compute RMAX, the largest machine floating-point
-* number, without overflow. It assumes that EMAX + abs(EMIN) sum
-* approximately to a power of 2. It will fail on machines where this
-* assumption does not hold, for example, the Cyber 205 (EMIN = -28625,
-* EMAX = 28718). It will also fail if the value supplied for EMIN is
-* too large (i.e. too close to zero), probably with overflow.
-*
-* Arguments
-* =========
-*
-* BETA (input) INTEGER
-* The base of floating-point arithmetic.
-*
-* P (input) INTEGER
-* The number of base BETA digits in the mantissa of a
-* floating-point value.
-*
-* EMIN (input) INTEGER
-* The minimum exponent before (gradual) underflow.
-*
-* IEEE (input) LOGICAL
-* A logical flag specifying whether or not the arithmetic
-* system is thought to comply with the IEEE standard.
-*
-* EMAX (output) INTEGER
-* The largest exponent before overflow
-*
-* RMAX (output) REAL
-* The largest machine floating-point number.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/INSTALL/slamchtst.f b/INSTALL/slamchtst.f
index 61612edf..98122750 100644
--- a/INSTALL/slamchtst.f
+++ b/INSTALL/slamchtst.f
@@ -1,8 +1,30 @@
+*> \brief \b SLAMCHTST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
PROGRAM SLAMCHTST
*
* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/INSTALL/tstiee.f b/INSTALL/tstiee.f
index 1b4c3a09..1064f14b 100644
--- a/INSTALL/tstiee.f
+++ b/INSTALL/tstiee.f
@@ -1,39 +1,48 @@
-C> \brief \b TSTIEE
-C>\details
-C> \b Purpose:
-C>\verbatim
-C>
-C> TEST IEEE
-C>
-C>\endverbatim
-C> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-C> \date November 2011
-C> \ingroup auxOTHERauxiliary
+*> \brief \b TSTIEE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
PROGRAM TSTIEE
-C
-C -- LAPACK test routine (version 3.2) --
-C Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-C November 2006
-C
-C .. External Functions ..
+*
+* -- LAPACK test routine (version 3.2) --
+* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
+* November 2006
+*
+* .. External Functions ..
INTEGER ILAENV
EXTERNAL ILAENV
-C ..
-C .. Local Scalars ..
+* ..
+* .. Local Scalars ..
INTEGER IEEEOK
-C ..
-C .. Executable Statements ..
-C
+* ..
+* .. Executable Statements ..
+*
WRITE( 6, FMT = * )
$ 'We are about to check whether infinity arithmetic'
WRITE( 6, FMT = * )'can be trusted. If this test hangs, set'
WRITE( 6, FMT = * )
$ 'ILAENV = 0 for ISPEC = 10 in LAPACK/SRC/ilaenv.f'
-C
+*
IEEEOK = ILAENV( 10, 'ILAENV', 'N', 1, 2, 3, 4 )
WRITE( 6, FMT = * )
-C
+*
IF( IEEEOK.EQ.0 ) THEN
WRITE( 6, FMT = * )
$ 'Infinity arithmetic did not perform per the ieee spec'
@@ -46,7 +55,7 @@ C
$ 'guarantee that infinity arithmetic meets the',
$ ' ieee spec.'
END IF
-C
+*
WRITE( 6, FMT = * )
WRITE( 6, FMT = * )
$ 'We are about to check whether NaN arithmetic'
@@ -54,7 +63,7 @@ C
WRITE( 6, FMT = * )
$ 'ILAENV = 0 for ISPEC = 11 in LAPACK/SRC/ilaenv.f'
IEEEOK = ILAENV( 11, 'ILAENV', 'N', 1, 2, 3, 4 )
-C
+*
WRITE( 6, FMT = * )
IF( IEEEOK.EQ.0 ) THEN
WRITE( 6, FMT = * )
@@ -68,147 +77,147 @@ C
$ ' ieee spec.'
END IF
WRITE( 6, FMT = * )
-C
+*
END
INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
$ N4 )
-C
-C -- LAPACK auxiliary routine (version 3.2) --
-C Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-C November 2006
-C
-C .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
+* November 2006
+*
+* .. Scalar Arguments ..
CHARACTER*( * ) NAME, OPTS
INTEGER ISPEC, N1, N2, N3, N4
-C ..
-C
-C Purpose
-C =======
-C
-C ILAENV is called from the LAPACK routines to choose problem-dependent
-C parameters for the local environment. See ISPEC for a description of
-C the parameters.
-C
-C This version provides a set of parameters which should give good,
-C but not optimal, performance on many of the currently available
-C computers. Users are encouraged to modify this subroutine to set
-C the tuning parameters for their particular machine using the option
-C and problem size information in the arguments.
-C
-C This routine will not function correctly if it is converted to all
-C lower case. Converting it to all upper case is allowed.
-C
-C Arguments
-C =========
-C
-C ISPEC (input) INTEGER
-C Specifies the parameter to be returned as the value of
-C ILAENV.
-C = 1: the optimal blocksize; if this value is 1, an unblocked
-C algorithm will give the best performance.
-C = 2: the minimum block size for which the block routine
-C should be used; if the usable block size is less than
-C this value, an unblocked routine should be used.
-C = 3: the crossover point (in a block routine, for N less
-C than this value, an unblocked routine should be used)
-C = 4: the number of shifts, used in the nonsymmetric
-C eigenvalue routines
-C = 5: the minimum column dimension for blocking to be used;
-C rectangular blocks must have dimension at least k by m,
-C where k is given by ILAENV(2,...) and m by ILAENV(5,...)
-C = 6: the crossover point for the SVD (when reducing an m by n
-C matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
-C this value, a QR factorization is used first to reduce
-C the matrix to a triangular form.)
-C = 7: the number of processors
-C = 8: the crossover point for the multishift QR and QZ methods
-C for nonsymmetric eigenvalue problems.
-C = 9: maximum size of the subproblems at the bottom of the
-C computation tree in the divide-and-conquer algorithm
-C (used by xGELSD and xGESDD)
-C =10: ieee NaN arithmetic can be trusted not to trap
-C =11: infinity arithmetic can be trusted not to trap
-C
-C NAME (input) CHARACTER*(*)
-C The name of the calling subroutine, in either upper case or
-C lower case.
-C
-C OPTS (input) CHARACTER*(*)
-C The character options to the subroutine NAME, concatenated
-C into a single character string. For example, UPLO = 'U',
-C TRANS = 'T', and DIAG = 'N' for a triangular routine would
-C be specified as OPTS = 'UTN'.
-C
-C N1 (input) INTEGER
-C N2 (input) INTEGER
-C N3 (input) INTEGER
-C N4 (input) INTEGER
-C Problem dimensions for the subroutine NAME; these may not all
-C be required.
-C
-C (ILAENV) (output) INTEGER
-C >= 0: the value of the parameter specified by ISPEC
-C < 0: if ILAENV = -k, the k-th argument had an illegal value.
-C
-C Further Details
-C ===============
-C
-C The following conventions have been used when calling ILAENV from the
-C LAPACK routines:
-C 1) OPTS is a concatenation of all of the character options to
-C subroutine NAME, in the same order that they appear in the
-C argument list for NAME, even if they are not used in determining
-C the value of the parameter specified by ISPEC.
-C 2) The problem dimensions N1, N2, N3, N4 are specified in the order
-C that they appear in the argument list for NAME. N1 is used
-C first, N2 second, and so on, and unused problem dimensions are
-C passed a value of -1.
-C 3) The parameter value returned by ILAENV is checked for validity in
-C the calling subroutine. For example, ILAENV is used to retrieve
-C the optimal blocksize for STRTRI as follows:
-C
-C NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
-C IF( NB.LE.1 ) NB = MAX( 1, N )
-C
-C =====================================================================
-C
-C .. Local Scalars ..
+* ..
+*
+* Purpose
+* =======
+*
+* ILAENV is called from the LAPACK routines to choose problem-dependent
+* parameters for the local environment. See ISPEC for a description of
+* the parameters.
+*
+* This version provides a set of parameters which should give good,
+* but not optimal, performance on many of the currently available
+* computers. Users are encouraged to modify this subroutine to set
+* the tuning parameters for their particular machine using the option
+* and problem size information in the arguments.
+*
+* This routine will not function correctly if it is converted to all
+* lower case. Converting it to all upper case is allowed.
+*
+* Arguments
+* =========
+*
+* ISPEC (input) INTEGER
+* Specifies the parameter to be returned as the value of
+* ILAENV.
+* = 1: the optimal blocksize; if this value is 1, an unblocked
+* algorithm will give the best performance.
+* = 2: the minimum block size for which the block routine
+* should be used; if the usable block size is less than
+* this value, an unblocked routine should be used.
+* = 3: the crossover point (in a block routine, for N less
+* than this value, an unblocked routine should be used)
+* = 4: the number of shifts, used in the nonsymmetric
+* eigenvalue routines
+* = 5: the minimum column dimension for blocking to be used;
+* rectangular blocks must have dimension at least k by m,
+* where k is given by ILAENV(2,...) and m by ILAENV(5,...)
+* = 6: the crossover point for the SVD (when reducing an m by n
+* matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
+* this value, a QR factorization is used first to reduce
+* the matrix to a triangular form.)
+* = 7: the number of processors
+* = 8: the crossover point for the multishift QR and QZ methods
+* for nonsymmetric eigenvalue problems.
+* = 9: maximum size of the subproblems at the bottom of the
+* computation tree in the divide-and-conquer algorithm
+* (used by xGELSD and xGESDD)
+* =10: ieee NaN arithmetic can be trusted not to trap
+* =11: infinity arithmetic can be trusted not to trap
+*
+* NAME (input) CHARACTER*(*)
+* The name of the calling subroutine, in either upper case or
+* lower case.
+*
+* OPTS (input) CHARACTER*(*)
+* The character options to the subroutine NAME, concatenated
+* into a single character string. For example, UPLO = 'U',
+* TRANS = 'T', and DIAG = 'N' for a triangular routine would
+* be specified as OPTS = 'UTN'.
+*
+* N1 (input) INTEGER
+* N2 (input) INTEGER
+* N3 (input) INTEGER
+* N4 (input) INTEGER
+* Problem dimensions for the subroutine NAME; these may not all
+* be required.
+*
+* (ILAENV) (output) INTEGER
+* >= 0: the value of the parameter specified by ISPEC
+* < 0: if ILAENV = -k, the k-th argument had an illegal value.
+*
+* Further Details
+* ===============
+*
+* The following conventions have been used when calling ILAENV from the
+* LAPACK routines:
+* 1) OPTS is a concatenation of all of the character options to
+* subroutine NAME, in the same order that they appear in the
+* argument list for NAME, even if they are not used in determining
+* the value of the parameter specified by ISPEC.
+* 2) The problem dimensions N1, N2, N3, N4 are specified in the order
+* that they appear in the argument list for NAME. N1 is used
+* first, N2 second, and so on, and unused problem dimensions are
+* passed a value of -1.
+* 3) The parameter value returned by ILAENV is checked for validity in
+* the calling subroutine. For example, ILAENV is used to retrieve
+* the optimal blocksize for STRTRI as follows:
+*
+* NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
+* IF( NB.LE.1 ) NB = MAX( 1, N )
+*
+* =====================================================================
+*
+* .. Local Scalars ..
LOGICAL CNAME, SNAME
CHARACTER*1 C1
CHARACTER*2 C2, C4
CHARACTER*3 C3
CHARACTER*6 SUBNAM
INTEGER I, IC, IZ, NB, NBMIN, NX
-C ..
-C .. Intrinsic Functions ..
+* ..
+* .. Intrinsic Functions ..
INTRINSIC CHAR, ICHAR, INT, MIN, REAL
-C ..
-C .. External Functions ..
+* ..
+* .. External Functions ..
INTEGER IEEECK
EXTERNAL IEEECK
-C ..
-C .. Executable Statements ..
-C
+* ..
+* .. Executable Statements ..
+*
GO TO ( 100, 100, 100, 400, 500, 600, 700, 800, 900, 1000,
$ 1100 ) ISPEC
-C
-C Invalid value for ISPEC
-C
+*
+* Invalid value for ISPEC
+*
ILAENV = -1
RETURN
-C
+*
100 CONTINUE
-C
-C Convert NAME to upper case if the first character is lower case.
-C
+*
+* Convert NAME to upper case if the first character is lower case.
+*
ILAENV = 1
SUBNAM = NAME
IC = ICHAR( SUBNAM( 1:1 ) )
IZ = ICHAR( 'Z' )
IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN
-C
-C ASCII character set
-C
+*
+* ASCII character set
+*
IF( IC.GE.97 .AND. IC.LE.122 ) THEN
SUBNAM( 1:1 ) = CHAR( IC-32 )
DO 10 I = 2, 6
@@ -217,11 +226,11 @@ C
$ SUBNAM( I:I ) = CHAR( IC-32 )
10 CONTINUE
END IF
-C
+*
ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN
-C
-C EBCDIC character set
-C
+*
+* EBCDIC character set
+*
IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
$ ( IC.GE.145 .AND. IC.LE.153 ) .OR.
$ ( IC.GE.162 .AND. IC.LE.169 ) ) THEN
@@ -234,11 +243,11 @@ C
$ SUBNAM( I:I ) = CHAR( IC+64 )
20 CONTINUE
END IF
-C
+*
ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN
-C
-C Prime machines: ASCII+128
-C
+*
+* Prime machines: ASCII+128
+*
IF( IC.GE.225 .AND. IC.LE.250 ) THEN
SUBNAM( 1:1 ) = CHAR( IC-32 )
DO 30 I = 2, 6
@@ -248,7 +257,7 @@ C
30 CONTINUE
END IF
END IF
-C
+*
C1 = SUBNAM( 1:1 )
SNAME = C1.EQ.'S' .OR. C1.EQ.'D'
CNAME = C1.EQ.'C' .OR. C1.EQ.'Z'
@@ -257,19 +266,19 @@ C
C2 = SUBNAM( 2:3 )
C3 = SUBNAM( 4:6 )
C4 = C3( 2:3 )
-C
+*
GO TO ( 110, 200, 300 ) ISPEC
-C
+*
110 CONTINUE
-C
-C ISPEC = 1: block size
-C
-C In these examples, separate code is provided for setting NB for
-C real and complex. We assume that NB will take the same value in
-C single or double precision.
-C
+*
+* ISPEC = 1: block size
+*
+* In these examples, separate code is provided for setting NB for
+* real and complex. We assume that NB will take the same value in
+* single or double precision.
+*
NB = 1
-C
+*
IF( C2.EQ.'GE' ) THEN
IF( C3.EQ.'TRF' ) THEN
IF( SNAME ) THEN
@@ -414,11 +423,11 @@ C
END IF
ILAENV = NB
RETURN
-C
+*
200 CONTINUE
-C
-C ISPEC = 2: minimum block size
-C
+*
+* ISPEC = 2: minimum block size
+*
NBMIN = 2
IF( C2.EQ.'GE' ) THEN
IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR.
@@ -492,11 +501,11 @@ C
END IF
ILAENV = NBMIN
RETURN
-C
+*
300 CONTINUE
-C
-C ISPEC = 3: crossover point
-C
+*
+* ISPEC = 3: crossover point
+*
NX = 0
IF( C2.EQ.'GE' ) THEN
IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR.
@@ -546,119 +555,119 @@ C
END IF
ILAENV = NX
RETURN
-C
+*
400 CONTINUE
-C
-C ISPEC = 4: number of shifts (used by xHSEQR)
-C
+*
+* ISPEC = 4: number of shifts (used by xHSEQR)
+*
ILAENV = 6
RETURN
-C
+*
500 CONTINUE
-C
-C ISPEC = 5: minimum column dimension (not used)
-C
+*
+* ISPEC = 5: minimum column dimension (not used)
+*
ILAENV = 2
RETURN
-C
+*
600 CONTINUE
-C
-C ISPEC = 6: crossover point for SVD (used by xGELSS and xGESVD)
-C
+*
+* ISPEC = 6: crossover point for SVD (used by xGELSS and xGESVD)
+*
ILAENV = INT( REAL( MIN( N1, N2 ) )*1.6E0 )
RETURN
-C
+*
700 CONTINUE
-C
-C ISPEC = 7: number of processors (not used)
-C
+*
+* ISPEC = 7: number of processors (not used)
+*
ILAENV = 1
RETURN
-C
+*
800 CONTINUE
-C
-C ISPEC = 8: crossover point for multishift (used by xHSEQR)
-C
+*
+* ISPEC = 8: crossover point for multishift (used by xHSEQR)
+*
ILAENV = 50
RETURN
-C
+*
900 CONTINUE
-C
-C ISPEC = 9: maximum size of the subproblems at the bottom of the
-C computation tree in the divide-and-conquer algorithm
-C (used by xGELSD and xGESDD)
-C
+*
+* ISPEC = 9: maximum size of the subproblems at the bottom of the
+* computation tree in the divide-and-conquer algorithm
+* (used by xGELSD and xGESDD)
+*
ILAENV = 25
RETURN
-C
+*
1000 CONTINUE
-C
-C ISPEC = 10: ieee NaN arithmetic can be trusted not to trap
-C
+*
+* ISPEC = 10: ieee NaN arithmetic can be trusted not to trap
+*
ILAENV = 1
IF (ILAENV .EQ. 1) THEN
ILAENV = IEEECK( 0, 0.0, 1.0 )
ENDIF
RETURN
-C
+*
1100 CONTINUE
-C
-C ISPEC = 11: infinity arithmetic can be trusted not to trap
-C
+*
+* ISPEC = 11: infinity arithmetic can be trusted not to trap
+*
ILAENV = 1
IF (ILAENV .EQ. 1) THEN
ILAENV = IEEECK( 1, 0.0, 1.0 )
ENDIF
RETURN
-C
-C End of ILAENV
-C
+*
+* End of ILAENV
+*
END
INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE )
-C
-C -- LAPACK auxiliary routine (version 3.2) --
-C Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-C November 2006
-C
-C .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
+* November 2006
+*
+* .. Scalar Arguments ..
INTEGER ISPEC
REAL ZERO, ONE
-C ..
-C
-C Purpose
-C =======
-C
-C IEEECK is called from the ILAENV to verify that Inifinity and
-C possibly NaN arithmetic is safe (i.e. will not trap).
-C
-C Arguments
-C =========
-C
-C ISPEC (input) INTEGER
-C Specifies whether to test just for inifinity arithmetic
-C or whether to test for infinity and NaN arithmetic.
-C = 0: Verify infinity arithmetic only.
-C = 1: Verify infinity and NaN arithmetic.
-C
-C ZERO (input) REAL
-C Must contain the value 0.0
-C This is passed to prevent the compiler from optimizing
-C away this code.
-C
-C ONE (input) REAL
-C Must contain the value 1.0
-C This is passed to prevent the compiler from optimizing
-C away this code.
-C
-C RETURN VALUE: INTEGER
-C = 0: Arithmetic failed to produce the correct answers
-C = 1: Arithmetic produced the correct answers
-C
-C .. Local Scalars ..
+* ..
+*
+* Purpose
+* =======
+*
+* IEEECK is called from the ILAENV to verify that Inifinity and
+* possibly NaN arithmetic is safe (i.e. will not trap).
+*
+* Arguments
+* =========
+*
+* ISPEC (input) INTEGER
+* Specifies whether to test just for inifinity arithmetic
+* or whether to test for infinity and NaN arithmetic.
+* = 0: Verify infinity arithmetic only.
+* = 1: Verify infinity and NaN arithmetic.
+*
+* ZERO (input) REAL
+* Must contain the value 0.0
+* This is passed to prevent the compiler from optimizing
+* away this code.
+*
+* ONE (input) REAL
+* Must contain the value 1.0
+* This is passed to prevent the compiler from optimizing
+* away this code.
+*
+* RETURN VALUE: INTEGER
+* = 0: Arithmetic failed to produce the correct answers
+* = 1: Arithmetic produced the correct answers
+*
+* .. Local Scalars ..
REAL POSINF, NEGINF, NAN1, NAN2, NAN3, NAN4, NAN5, NAN6, NEGZRO,
$ NEWZRO
-C ..
-C .. Executable Statements ..
+* ..
+* .. Executable Statements ..
IEEECK = 1
POSINF = ONE /ZERO
@@ -711,9 +720,9 @@ C .. Executable Statements ..
-C
-C Return if we were only asked to check infinity arithmetic
-C
+*
+* Return if we were only asked to check infinity arithmetic
+*
IF (ISPEC .EQ. 0 ) RETURN
NAN1 = POSINF + NEGINF
diff --git a/SRC/VARIANTS/cholesky/RL/cpotrf.f b/SRC/VARIANTS/cholesky/RL/cpotrf.f
index a6d194cb..cdc182ea 100644
--- a/SRC/VARIANTS/cholesky/RL/cpotrf.f
+++ b/SRC/VARIANTS/cholesky/RL/cpotrf.f
@@ -1,8 +1,109 @@
+C> \brief \b CPOTRF VARIANT: right looking block version of the algorithm, calling Level 3 BLAS.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOTRF ( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> CPOTRF computes the Cholesky factorization of a real Hermitian
+C> positive definite matrix A.
+C>
+C> The factorization has the form
+C> A = U**H * U, if UPLO = 'U', or
+C> A = L * L**H, if UPLO = 'L',
+C> where U is an upper triangular matrix and L is lower triangular.
+C>
+C> This is the right looking block version of the algorithm, calling Level 3 BLAS.
+C>
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+C> \param[in] UPLO
+C> \verbatim
+C> UPLO is CHARACTER*1
+C> = 'U': Upper triangle of A is stored;
+C> = 'L': Lower triangle of A is stored.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The order of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX array, dimension (LDA,N)
+C> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+C> N-by-N upper triangular part of A contains the upper
+C> triangular part of the matrix A, and the strictly lower
+C> triangular part of A is not referenced. If UPLO = 'L', the
+C> leading N-by-N lower triangular part of A contains the lower
+C> triangular part of the matrix A, and the strictly upper
+C> triangular part of A is not referenced.
+C> \endverbatim
+C> \verbatim
+C> On exit, if INFO = 0, the factor U or L from the Cholesky
+C> factorization A = U**H*U or A = L*L**H.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,N).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, the leading minor of order i is not
+C> positive definite, and the factorization could not be
+C> completed.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsPOcomputational
+*
+* =====================================================================
SUBROUTINE CPOTRF ( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -12,51 +113,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOTRF computes the Cholesky factorization of a real Hermitian
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the right looking block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/VARIANTS/cholesky/RL/dpotrf.f b/SRC/VARIANTS/cholesky/RL/dpotrf.f
index 72603304..f0614393 100644
--- a/SRC/VARIANTS/cholesky/RL/dpotrf.f
+++ b/SRC/VARIANTS/cholesky/RL/dpotrf.f
@@ -1,8 +1,109 @@
+C> \brief \b DPOTRF VARIANT: right looking block version of the algorithm, calling Level 3 BLAS.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOTRF ( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> DPOTRF computes the Cholesky factorization of a real symmetric
+C> positive definite matrix A.
+C>
+C> The factorization has the form
+C> A = U**T * U, if UPLO = 'U', or
+C> A = L * L**T, if UPLO = 'L',
+C> where U is an upper triangular matrix and L is lower triangular.
+C>
+C> This is the right looking block version of the algorithm, calling Level 3 BLAS.
+C>
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+C> \param[in] UPLO
+C> \verbatim
+C> UPLO is CHARACTER*1
+C> = 'U': Upper triangle of A is stored;
+C> = 'L': Lower triangle of A is stored.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The order of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is DOUBLE PRECISION array, dimension (LDA,N)
+C> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+C> N-by-N upper triangular part of A contains the upper
+C> triangular part of the matrix A, and the strictly lower
+C> triangular part of A is not referenced. If UPLO = 'L', the
+C> leading N-by-N lower triangular part of A contains the lower
+C> triangular part of the matrix A, and the strictly upper
+C> triangular part of A is not referenced.
+C> \endverbatim
+C> \verbatim
+C> On exit, if INFO = 0, the factor U or L from the Cholesky
+C> factorization A = U**T*U or A = L*L**T.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,N).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, the leading minor of order i is not
+C> positive definite, and the factorization could not be
+C> completed.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsPOcomputational
+*
+* =====================================================================
SUBROUTINE DPOTRF ( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -12,51 +113,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the right looking block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/VARIANTS/cholesky/RL/spotrf.f b/SRC/VARIANTS/cholesky/RL/spotrf.f
index 3375902a..f388a361 100644
--- a/SRC/VARIANTS/cholesky/RL/spotrf.f
+++ b/SRC/VARIANTS/cholesky/RL/spotrf.f
@@ -1,8 +1,109 @@
+C> \brief \b SPOTRF VARIANT: right looking block version of the algorithm, calling Level 3 BLAS.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOTRF ( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> SPOTRF computes the Cholesky factorization of a real symmetric
+C> positive definite matrix A.
+C>
+C> The factorization has the form
+C> A = U**T * U, if UPLO = 'U', or
+C> A = L * L**T, if UPLO = 'L',
+C> where U is an upper triangular matrix and L is lower triangular.
+C>
+C> This is the right looking block version of the algorithm, calling Level 3 BLAS.
+C>
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+C> \param[in] UPLO
+C> \verbatim
+C> UPLO is CHARACTER*1
+C> = 'U': Upper triangle of A is stored;
+C> = 'L': Lower triangle of A is stored.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The order of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is REAL array, dimension (LDA,N)
+C> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+C> N-by-N upper triangular part of A contains the upper
+C> triangular part of the matrix A, and the strictly lower
+C> triangular part of A is not referenced. If UPLO = 'L', the
+C> leading N-by-N lower triangular part of A contains the lower
+C> triangular part of the matrix A, and the strictly upper
+C> triangular part of A is not referenced.
+C> \endverbatim
+C> \verbatim
+C> On exit, if INFO = 0, the factor U or L from the Cholesky
+C> factorization A = U**T*U or A = L*L**T.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,N).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, the leading minor of order i is not
+C> positive definite, and the factorization could not be
+C> completed.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsPOcomputational
+*
+* =====================================================================
SUBROUTINE SPOTRF ( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -12,51 +113,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the right looking block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/VARIANTS/cholesky/RL/zpotrf.f b/SRC/VARIANTS/cholesky/RL/zpotrf.f
index b2bce7f6..db1fff78 100644
--- a/SRC/VARIANTS/cholesky/RL/zpotrf.f
+++ b/SRC/VARIANTS/cholesky/RL/zpotrf.f
@@ -1,8 +1,109 @@
+C> \brief \b ZPOTRF VARIANT: right looking block version of the algorithm, calling Level 3 BLAS.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOTRF ( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> ZPOTRF computes the Cholesky factorization of a real Hermitian
+C> positive definite matrix A.
+C>
+C> The factorization has the form
+C> A = U**H * U, if UPLO = 'U', or
+C> A = L * L**H, if UPLO = 'L',
+C> where U is an upper triangular matrix and L is lower triangular.
+C>
+C> This is the right looking block version of the algorithm, calling Level 3 BLAS.
+C>
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+C> \param[in] UPLO
+C> \verbatim
+C> UPLO is CHARACTER*1
+C> = 'U': Upper triangle of A is stored;
+C> = 'L': Lower triangle of A is stored.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The order of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX*16 array, dimension (LDA,N)
+C> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+C> N-by-N upper triangular part of A contains the upper
+C> triangular part of the matrix A, and the strictly lower
+C> triangular part of A is not referenced. If UPLO = 'L', the
+C> leading N-by-N lower triangular part of A contains the lower
+C> triangular part of the matrix A, and the strictly upper
+C> triangular part of A is not referenced.
+C> \endverbatim
+C> \verbatim
+C> On exit, if INFO = 0, the factor U or L from the Cholesky
+C> factorization A = U**H*U or A = L*L**H.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,N).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, the leading minor of order i is not
+C> positive definite, and the factorization could not be
+C> completed.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsPOcomputational
+*
+* =====================================================================
SUBROUTINE ZPOTRF ( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -12,51 +113,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOTRF computes the Cholesky factorization of a real Hermitian
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the right looking block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/VARIANTS/cholesky/TOP/cpotrf.f b/SRC/VARIANTS/cholesky/TOP/cpotrf.f
index 54ae1bb9..365eb162 100644
--- a/SRC/VARIANTS/cholesky/TOP/cpotrf.f
+++ b/SRC/VARIANTS/cholesky/TOP/cpotrf.f
@@ -1,8 +1,109 @@
+C> \brief \b CPOTRF VARIANT: top-looking block version of the algorithm, calling Level 3 BLAS.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOTRF ( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> CPOTRF computes the Cholesky factorization of a real symmetric
+C> positive definite matrix A.
+C>
+C> The factorization has the form
+C> A = U**H * U, if UPLO = 'U', or
+C> A = L * L**H, if UPLO = 'L',
+C> where U is an upper triangular matrix and L is lower triangular.
+C>
+C> This is the top-looking block version of the algorithm, calling Level 3 BLAS.
+C>
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+C> \param[in] UPLO
+C> \verbatim
+C> UPLO is CHARACTER*1
+C> = 'U': Upper triangle of A is stored;
+C> = 'L': Lower triangle of A is stored.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The order of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX array, dimension (LDA,N)
+C> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+C> N-by-N upper triangular part of A contains the upper
+C> triangular part of the matrix A, and the strictly lower
+C> triangular part of A is not referenced. If UPLO = 'L', the
+C> leading N-by-N lower triangular part of A contains the lower
+C> triangular part of the matrix A, and the strictly upper
+C> triangular part of A is not referenced.
+C> \endverbatim
+C> \verbatim
+C> On exit, if INFO = 0, the factor U or L from the Cholesky
+C> factorization A = U**H*U or A = L*L**H.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,N).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, the leading minor of order i is not
+C> positive definite, and the factorization could not be
+C> completed.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsPOcomputational
+*
+* =====================================================================
SUBROUTINE CPOTRF ( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -12,51 +113,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the top-looking block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/VARIANTS/cholesky/TOP/dpotrf.f b/SRC/VARIANTS/cholesky/TOP/dpotrf.f
index 8dd2c45b..eccf4f8f 100644
--- a/SRC/VARIANTS/cholesky/TOP/dpotrf.f
+++ b/SRC/VARIANTS/cholesky/TOP/dpotrf.f
@@ -1,8 +1,109 @@
+C> \brief \b DPOTRF VARIANT: top-looking block version of the algorithm, calling Level 3 BLAS.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOTRF ( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> DPOTRF computes the Cholesky factorization of a real symmetric
+C> positive definite matrix A.
+C>
+C> The factorization has the form
+C> A = U**T * U, if UPLO = 'U', or
+C> A = L * L**T, if UPLO = 'L',
+C> where U is an upper triangular matrix and L is lower triangular.
+C>
+C> This is the top-looking block version of the algorithm, calling Level 3 BLAS.
+C>
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+C> \param[in] UPLO
+C> \verbatim
+C> UPLO is CHARACTER*1
+C> = 'U': Upper triangle of A is stored;
+C> = 'L': Lower triangle of A is stored.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The order of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is DOUBLE PRECISION array, dimension (LDA,N)
+C> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+C> N-by-N upper triangular part of A contains the upper
+C> triangular part of the matrix A, and the strictly lower
+C> triangular part of A is not referenced. If UPLO = 'L', the
+C> leading N-by-N lower triangular part of A contains the lower
+C> triangular part of the matrix A, and the strictly upper
+C> triangular part of A is not referenced.
+C> \endverbatim
+C> \verbatim
+C> On exit, if INFO = 0, the factor U or L from the Cholesky
+C> factorization A = U**T*U or A = L*L**T.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,N).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, the leading minor of order i is not
+C> positive definite, and the factorization could not be
+C> completed.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsPOcomputational
+*
+* =====================================================================
SUBROUTINE DPOTRF ( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -12,51 +113,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the top-looking block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/VARIANTS/cholesky/TOP/spotrf.f b/SRC/VARIANTS/cholesky/TOP/spotrf.f
index 08b41b48..65b6a8eb 100644
--- a/SRC/VARIANTS/cholesky/TOP/spotrf.f
+++ b/SRC/VARIANTS/cholesky/TOP/spotrf.f
@@ -1,8 +1,109 @@
+C> \brief \b SPOTRF VARIANT: top-looking block version of the algorithm, calling Level 3 BLAS.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOTRF ( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> SPOTRF computes the Cholesky factorization of a real symmetric
+C> positive definite matrix A.
+C>
+C> The factorization has the form
+C> A = U**T * U, if UPLO = 'U', or
+C> A = L * L**T, if UPLO = 'L',
+C> where U is an upper triangular matrix and L is lower triangular.
+C>
+C> This is the top-looking block version of the algorithm, calling Level 3 BLAS.
+C>
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+C> \param[in] UPLO
+C> \verbatim
+C> UPLO is CHARACTER*1
+C> = 'U': Upper triangle of A is stored;
+C> = 'L': Lower triangle of A is stored.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The order of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is REAL array, dimension (LDA,N)
+C> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+C> N-by-N upper triangular part of A contains the upper
+C> triangular part of the matrix A, and the strictly lower
+C> triangular part of A is not referenced. If UPLO = 'L', the
+C> leading N-by-N lower triangular part of A contains the lower
+C> triangular part of the matrix A, and the strictly upper
+C> triangular part of A is not referenced.
+C> \endverbatim
+C> \verbatim
+C> On exit, if INFO = 0, the factor U or L from the Cholesky
+C> factorization A = U**T*U or A = L*L**T.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,N).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, the leading minor of order i is not
+C> positive definite, and the factorization could not be
+C> completed.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsPOcomputational
+*
+* =====================================================================
SUBROUTINE SPOTRF ( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -12,51 +113,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the top-looking block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/VARIANTS/cholesky/TOP/zpotrf.f b/SRC/VARIANTS/cholesky/TOP/zpotrf.f
index 4eae3d1b..7614246e 100644
--- a/SRC/VARIANTS/cholesky/TOP/zpotrf.f
+++ b/SRC/VARIANTS/cholesky/TOP/zpotrf.f
@@ -1,8 +1,109 @@
+C> \brief \b ZPOTRF VARIANT: top-looking block version of the algorithm, calling Level 3 BLAS.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOTRF ( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> ZPOTRF computes the Cholesky factorization of a real symmetric
+C> positive definite matrix A.
+C>
+C> The factorization has the form
+C> A = U**H * U, if UPLO = 'U', or
+C> A = L * L**H, if UPLO = 'L',
+C> where U is an upper triangular matrix and L is lower triangular.
+C>
+C> This is the top-looking block version of the algorithm, calling Level 3 BLAS.
+C>
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+C> \param[in] UPLO
+C> \verbatim
+C> UPLO is CHARACTER*1
+C> = 'U': Upper triangle of A is stored;
+C> = 'L': Lower triangle of A is stored.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The order of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX*16 array, dimension (LDA,N)
+C> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+C> N-by-N upper triangular part of A contains the upper
+C> triangular part of the matrix A, and the strictly lower
+C> triangular part of A is not referenced. If UPLO = 'L', the
+C> leading N-by-N lower triangular part of A contains the lower
+C> triangular part of the matrix A, and the strictly upper
+C> triangular part of A is not referenced.
+C> \endverbatim
+C> \verbatim
+C> On exit, if INFO = 0, the factor U or L from the Cholesky
+C> factorization A = U**H*U or A = L*L**H.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,N).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, the leading minor of order i is not
+C> positive definite, and the factorization could not be
+C> completed.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsPOcomputational
+*
+* =====================================================================
SUBROUTINE ZPOTRF ( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -12,51 +113,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the top-looking block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/VARIANTS/lu/CR/cgetrf.f b/SRC/VARIANTS/lu/CR/cgetrf.f
index 8e6270b3..1446a8db 100644
--- a/SRC/VARIANTS/lu/CR/cgetrf.f
+++ b/SRC/VARIANTS/lu/CR/cgetrf.f
@@ -1,59 +1,117 @@
- SUBROUTINE CGETRF ( M, N, A, LDA, IPIV, INFO)
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * )
-* ..
-*
+C> \brief \b CGETRF VARIANT: Crout Level 3 BLAS version of the algorithm.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGETRF ( M, N, A, LDA, IPIV, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the Crout Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> CGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This is the Crout Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+C> \date November 2011
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \ingroup variantsGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE CGETRF ( M, N, A, LDA, IPIV, INFO)
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/CR/dgetrf.f b/SRC/VARIANTS/lu/CR/dgetrf.f
index 359e00e7..1de7c106 100644
--- a/SRC/VARIANTS/lu/CR/dgetrf.f
+++ b/SRC/VARIANTS/lu/CR/dgetrf.f
@@ -1,59 +1,117 @@
- SUBROUTINE DGETRF ( M, N, A, LDA, IPIV, INFO)
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * )
-* ..
-*
+C> \brief \b DGETRF VARIANT: Crout Level 3 BLAS version of the algorithm.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGETRF ( M, N, A, LDA, IPIV, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the Crout Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> DGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This is the Crout Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is DOUBLE PRECISION array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+C> \date November 2011
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \ingroup variantsGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE DGETRF ( M, N, A, LDA, IPIV, INFO)
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/CR/sgetrf.f b/SRC/VARIANTS/lu/CR/sgetrf.f
index c8b89009..c70871b1 100644
--- a/SRC/VARIANTS/lu/CR/sgetrf.f
+++ b/SRC/VARIANTS/lu/CR/sgetrf.f
@@ -1,59 +1,117 @@
- SUBROUTINE SGETRF ( M, N, A, LDA, IPIV, INFO)
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * )
-* ..
-*
+C> \brief \b SGETRF VARIANT: Crout Level 3 BLAS version of the algorithm.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGETRF ( M, N, A, LDA, IPIV, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the Crout Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> SGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This is the Crout Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is REAL array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+C> \date November 2011
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \ingroup variantsGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE SGETRF ( M, N, A, LDA, IPIV, INFO)
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/CR/zgetrf.f b/SRC/VARIANTS/lu/CR/zgetrf.f
index fede7e22..0a36b212 100644
--- a/SRC/VARIANTS/lu/CR/zgetrf.f
+++ b/SRC/VARIANTS/lu/CR/zgetrf.f
@@ -1,59 +1,117 @@
- SUBROUTINE ZGETRF ( M, N, A, LDA, IPIV, INFO)
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+C> \brief \b ZGETRF VARIANT: Crout Level 3 BLAS version of the algorithm.
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGETRF ( M, N, A, LDA, IPIV, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the Crout Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> ZGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This is the Crout Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX*16 array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+C> \date November 2011
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \ingroup variantsGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZGETRF ( M, N, A, LDA, IPIV, INFO)
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/LL/cgetrf.f b/SRC/VARIANTS/lu/LL/cgetrf.f
index 189362b0..2765dfd1 100644
--- a/SRC/VARIANTS/lu/LL/cgetrf.f
+++ b/SRC/VARIANTS/lu/LL/cgetrf.f
@@ -1,59 +1,117 @@
- SUBROUTINE CGETRF ( M, N, A, LDA, IPIV, INFO)
+C> \brief \b CGETRF VARIANT: left-looking Level 3 BLAS version of the algorithm.
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGETRF ( M, N, A, LDA, IPIV, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the left-looking Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> CGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This is the left-looking Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+C> \date November 2011
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \ingroup variantsGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE CGETRF ( M, N, A, LDA, IPIV, INFO)
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/LL/dgetrf.f b/SRC/VARIANTS/lu/LL/dgetrf.f
index 8231805c..a4628142 100644
--- a/SRC/VARIANTS/lu/LL/dgetrf.f
+++ b/SRC/VARIANTS/lu/LL/dgetrf.f
@@ -1,59 +1,117 @@
- SUBROUTINE DGETRF ( M, N, A, LDA, IPIV, INFO)
+C> \brief \b DGETRF VARIANT: left-looking Level 3 BLAS version of the algorithm.
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGETRF ( M, N, A, LDA, IPIV, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the left-looking Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> DGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This is the left-looking Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is DOUBLE PRECISION array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+C> \date November 2011
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \ingroup variantsGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE DGETRF ( M, N, A, LDA, IPIV, INFO)
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/LL/sgetrf.f b/SRC/VARIANTS/lu/LL/sgetrf.f
index 856c1a7e..0e97e015 100644
--- a/SRC/VARIANTS/lu/LL/sgetrf.f
+++ b/SRC/VARIANTS/lu/LL/sgetrf.f
@@ -1,59 +1,117 @@
- SUBROUTINE SGETRF ( M, N, A, LDA, IPIV, INFO)
+C> \brief \b SGETRF VARIANT: left-looking Level 3 BLAS version of the algorithm.
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGETRF ( M, N, A, LDA, IPIV, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the left-looking Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> SGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This is the left-looking Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is REAL array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+C> \date November 2011
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \ingroup variantsGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE SGETRF ( M, N, A, LDA, IPIV, INFO)
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/LL/zgetrf.f b/SRC/VARIANTS/lu/LL/zgetrf.f
index a6f9c0ff..b4b7d915 100644
--- a/SRC/VARIANTS/lu/LL/zgetrf.f
+++ b/SRC/VARIANTS/lu/LL/zgetrf.f
@@ -1,59 +1,117 @@
- SUBROUTINE ZGETRF ( M, N, A, LDA, IPIV, INFO)
+C> \brief \b ZGETRF VARIANT: left-looking Level 3 BLAS version of the algorithm.
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGETRF ( M, N, A, LDA, IPIV, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the left-looking Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> ZGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This is the left-looking Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX*16 array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+C> \date November 2011
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \ingroup variantsGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZGETRF ( M, N, A, LDA, IPIV, INFO)
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/REC/cgetrf.f b/SRC/VARIANTS/lu/REC/cgetrf.f
index d8a8a90b..8b457095 100644
--- a/SRC/VARIANTS/lu/REC/cgetrf.f
+++ b/SRC/VARIANTS/lu/REC/cgetrf.f
@@ -1,94 +1,151 @@
- SUBROUTINE CGETRF( M, N, A, LDA, IPIV, INFO )
- IMPLICIT NONE
+C> \brief \b CGETRF VARIANT: iterative version of Sivan Toledo's recursive LU algorithm
*
-* -- LAPACK routine (version 3.X) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* May 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This code implements an iterative version of Sivan Toledo's recursive
-* LU algorithm[1]. For square matrices, this iterative versions should
-* be within a factor of two of the optimum number of memory transfers.
-*
-* The pattern is as follows, with the large blocks of U being updated
-* in one call to DTRSM, and the dotted lines denoting sections that
-* have had all pending permutations applied:
-*
-* 1 2 3 4 5 6 7 8
-* +-+-+---+-------+------
-* | |1| | |
-* |.+-+ 2 | |
-* | | | | |
-* |.|.+-+-+ 4 |
-* | | | |1| |
-* | | |.+-+ |
-* | | | | | |
-* |.|.|.|.+-+-+---+ 8
-* | | | | | |1| |
-* | | | | |.+-+ 2 |
-* | | | | | | | |
-* | | | | |.|.+-+-+
-* | | | | | | | |1|
-* | | | | | | |.+-+
-* | | | | | | | | |
-* |.|.|.|.|.|.|.|.+-----
-* | | | | | | | | |
-*
-* The 1-2-1-4-1-2-1-8-... pattern is the position of the last 1 bit in
-* the binary expansion of the current column. Each Schur update is
-* applied as soon as the necessary portion of U is available.
-*
-* [1] Toledo, S. 1997. Locality of Reference in LU Decomposition with
-* Partial Pivoting. SIAM J. Matrix Anal. Appl. 18, 4 (Oct. 1997),
-* 1065-1081. http://dx.doi.org/10.1137/S0895479896297744
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> CGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This code implements an iterative version of Sivan Toledo's recursive
+C> LU algorithm[1]. For square matrices, this iterative versions should
+C> be within a factor of two of the optimum number of memory transfers.
+C>
+C> The pattern is as follows, with the large blocks of U being updated
+C> in one call to DTRSM, and the dotted lines denoting sections that
+C> have had all pending permutations applied:
+C>
+C> 1 2 3 4 5 6 7 8
+C> +-+-+---+-------+------
+C> | |1| | |
+C> |.+-+ 2 | |
+C> | | | | |
+C> |.|.+-+-+ 4 |
+C> | | | |1| |
+C> | | |.+-+ |
+C> | | | | | |
+C> |.|.|.|.+-+-+---+ 8
+C> | | | | | |1| |
+C> | | | | |.+-+ 2 |
+C> | | | | | | | |
+C> | | | | |.|.+-+-+
+C> | | | | | | | |1|
+C> | | | | | | |.+-+
+C> | | | | | | | | |
+C> |.|.|.|.|.|.|.|.+-----
+C> | | | | | | | | |
+C>
+C> The 1-2-1-4-1-2-1-8-... pattern is the position of the last 1 bit in
+C> the binary expansion of the current column. Each Schur update is
+C> applied as soon as the necessary portion of U is available.
+C>
+C> [1] Toledo, S. 1997. Locality of Reference in LU Decomposition with
+C> Partial Pivoting. SIAM J. Matrix Anal. Appl. 18, 4 (Oct. 1997),
+C> 1065-1081. http://dx.doi.org/10.1137/S0895479896297744
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+C> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+C> \ingroup variantsGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* =====================================================================
+ SUBROUTINE CGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.X) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
@@ -154,14 +211,14 @@
JP = J - 1 + ICAMAX( M-J+1, A( J, J ), 1 )
IPIV( J ) = JP
-! Permute just this column.
+* Permute just this column.
IF (JP .NE. J) THEN
TMP = A( J, J )
A( J, J ) = A( JP, J )
A( JP, J ) = TMP
END IF
-! Apply pending permutations to L
+* Apply pending permutations to L
NTOPIV = 1
IPIVSTART = J
JPIVSTART = J - NTOPIV
@@ -173,10 +230,10 @@
JPIVSTART = JPIVSTART - NTOPIV;
END DO
-! Permute U block to match L
+* Permute U block to match L
CALL CLASWP( KCOLS, A( 1,J+1 ), LDA, KSTART, J, IPIV, 1 )
-! Factor the current column
+* Factor the current column
PIVMAG = ABS( A( J, J ) )
IF( PIVMAG.NE.ZERO .AND. .NOT.SISNAN( PIVMAG ) ) THEN
IF( PIVMAG .GE. SFMIN ) THEN
@@ -190,17 +247,17 @@
INFO = J
END IF
-! Solve for U block.
+* Solve for U block.
CALL CTRSM( 'Left', 'Lower', 'No transpose', 'Unit', KAHEAD,
$ KCOLS, ONE, A( KSTART, KSTART ), LDA,
$ A( KSTART, J+1 ), LDA )
-! Schur complement.
+* Schur complement.
CALL CGEMM( 'No transpose', 'No transpose', M-J,
$ KCOLS, KAHEAD, NEGONE, A( J+1, KSTART ), LDA,
$ A( KSTART, J+1 ), LDA, ONE, A( J+1, J+1 ), LDA )
END DO
-! Handle pivot permutations on the way out of the recursion
+* Handle pivot permutations on the way out of the recursion
NPIVED = IAND( NSTEP, -NSTEP )
J = NSTEP - NPIVED
DO WHILE ( J .GT. 0 )
@@ -210,7 +267,7 @@
J = J - NTOPIV
END DO
-! If short and wide, handle the rest of the columns.
+* If short and wide, handle the rest of the columns.
IF ( M .LT. N ) THEN
CALL CLASWP( N-M, A( 1, M+KCOLS+1 ), LDA, 1, M, IPIV, 1 )
CALL CTRSM( 'Left', 'Lower', 'No transpose', 'Unit', M,
diff --git a/SRC/VARIANTS/lu/REC/dgetrf.f b/SRC/VARIANTS/lu/REC/dgetrf.f
index f8c2caf1..7263a5bb 100644
--- a/SRC/VARIANTS/lu/REC/dgetrf.f
+++ b/SRC/VARIANTS/lu/REC/dgetrf.f
@@ -1,94 +1,151 @@
- SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
- IMPLICIT NONE
+C> \brief \b DGETRF VARIANT: iterative version of Sivan Toledo's recursive LU algorithm
*
-* -- LAPACK routine (version 3.X) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* May 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This code implements an iterative version of Sivan Toledo's recursive
-* LU algorithm[1]. For square matrices, this iterative versions should
-* be within a factor of two of the optimum number of memory transfers.
-*
-* The pattern is as follows, with the large blocks of U being updated
-* in one call to DTRSM, and the dotted lines denoting sections that
-* have had all pending permutations applied:
-*
-* 1 2 3 4 5 6 7 8
-* +-+-+---+-------+------
-* | |1| | |
-* |.+-+ 2 | |
-* | | | | |
-* |.|.+-+-+ 4 |
-* | | | |1| |
-* | | |.+-+ |
-* | | | | | |
-* |.|.|.|.+-+-+---+ 8
-* | | | | | |1| |
-* | | | | |.+-+ 2 |
-* | | | | | | | |
-* | | | | |.|.+-+-+
-* | | | | | | | |1|
-* | | | | | | |.+-+
-* | | | | | | | | |
-* |.|.|.|.|.|.|.|.+-----
-* | | | | | | | | |
-*
-* The 1-2-1-4-1-2-1-8-... pattern is the position of the last 1 bit in
-* the binary expansion of the current column. Each Schur update is
-* applied as soon as the necessary portion of U is available.
-*
-* [1] Toledo, S. 1997. Locality of Reference in LU Decomposition with
-* Partial Pivoting. SIAM J. Matrix Anal. Appl. 18, 4 (Oct. 1997),
-* 1065-1081. http://dx.doi.org/10.1137/S0895479896297744
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> DGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This code implements an iterative version of Sivan Toledo's recursive
+C> LU algorithm[1]. For square matrices, this iterative versions should
+C> be within a factor of two of the optimum number of memory transfers.
+C>
+C> The pattern is as follows, with the large blocks of U being updated
+C> in one call to DTRSM, and the dotted lines denoting sections that
+C> have had all pending permutations applied:
+C>
+C> 1 2 3 4 5 6 7 8
+C> +-+-+---+-------+------
+C> | |1| | |
+C> |.+-+ 2 | |
+C> | | | | |
+C> |.|.+-+-+ 4 |
+C> | | | |1| |
+C> | | |.+-+ |
+C> | | | | | |
+C> |.|.|.|.+-+-+---+ 8
+C> | | | | | |1| |
+C> | | | | |.+-+ 2 |
+C> | | | | | | | |
+C> | | | | |.|.+-+-+
+C> | | | | | | | |1|
+C> | | | | | | |.+-+
+C> | | | | | | | | |
+C> |.|.|.|.|.|.|.|.+-----
+C> | | | | | | | | |
+C>
+C> The 1-2-1-4-1-2-1-8-... pattern is the position of the last 1 bit in
+C> the binary expansion of the current column. Each Schur update is
+C> applied as soon as the necessary portion of U is available.
+C>
+C> [1] Toledo, S. 1997. Locality of Reference in LU Decomposition with
+C> Partial Pivoting. SIAM J. Matrix Anal. Appl. 18, 4 (Oct. 1997),
+C> 1065-1081. http://dx.doi.org/10.1137/S0895479896297744
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is DOUBLE PRECISION array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+C> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+C> \ingroup variantsGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* =====================================================================
+ SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.X) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
@@ -151,14 +208,14 @@
JP = J - 1 + IDAMAX( M-J+1, A( J, J ), 1 )
IPIV( J ) = JP
-! Permute just this column.
+* Permute just this column.
IF (JP .NE. J) THEN
TMP = A( J, J )
A( J, J ) = A( JP, J )
A( JP, J ) = TMP
END IF
-! Apply pending permutations to L
+* Apply pending permutations to L
NTOPIV = 1
IPIVSTART = J
JPIVSTART = J - NTOPIV
@@ -170,10 +227,10 @@
JPIVSTART = JPIVSTART - NTOPIV;
END DO
-! Permute U block to match L
+* Permute U block to match L
CALL DLASWP( KCOLS, A( 1,J+1 ), LDA, KSTART, J, IPIV, 1 )
-! Factor the current column
+* Factor the current column
IF( A( J, J ).NE.ZERO .AND. .NOT.DISNAN( A( J, J ) ) ) THEN
IF( ABS(A( J, J )) .GE. SFMIN ) THEN
CALL DSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 )
@@ -186,17 +243,17 @@
INFO = J
END IF
-! Solve for U block.
+* Solve for U block.
CALL DTRSM( 'Left', 'Lower', 'No transpose', 'Unit', KAHEAD,
$ KCOLS, ONE, A( KSTART, KSTART ), LDA,
$ A( KSTART, J+1 ), LDA )
-! Schur complement.
+* Schur complement.
CALL DGEMM( 'No transpose', 'No transpose', M-J,
$ KCOLS, KAHEAD, NEGONE, A( J+1, KSTART ), LDA,
$ A( KSTART, J+1 ), LDA, ONE, A( J+1, J+1 ), LDA )
END DO
-! Handle pivot permutations on the way out of the recursion
+* Handle pivot permutations on the way out of the recursion
NPIVED = IAND( NSTEP, -NSTEP )
J = NSTEP - NPIVED
DO WHILE ( J .GT. 0 )
@@ -206,7 +263,7 @@
J = J - NTOPIV
END DO
-! If short and wide, handle the rest of the columns.
+* If short and wide, handle the rest of the columns.
IF ( M .LT. N ) THEN
CALL DLASWP( N-M, A( 1, M+KCOLS+1 ), LDA, 1, M, IPIV, 1 )
CALL DTRSM( 'Left', 'Lower', 'No transpose', 'Unit', M,
diff --git a/SRC/VARIANTS/lu/REC/sgetrf.f b/SRC/VARIANTS/lu/REC/sgetrf.f
index 1890f987..11eb7811 100644
--- a/SRC/VARIANTS/lu/REC/sgetrf.f
+++ b/SRC/VARIANTS/lu/REC/sgetrf.f
@@ -1,94 +1,151 @@
- SUBROUTINE SGETRF( M, N, A, LDA, IPIV, INFO )
- IMPLICIT NONE
+C> \brief \b SGETRF VARIANT: iterative version of Sivan Toledo's recursive LU algorithm
*
-* -- LAPACK routine (version 3.X) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* May 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This code implements an iterative version of Sivan Toledo's recursive
-* LU algorithm[1]. For square matrices, this iterative versions should
-* be within a factor of two of the optimum number of memory transfers.
-*
-* The pattern is as follows, with the large blocks of U being updated
-* in one call to STRSM, and the dotted lines denoting sections that
-* have had all pending permutations applied:
-*
-* 1 2 3 4 5 6 7 8
-* +-+-+---+-------+------
-* | |1| | |
-* |.+-+ 2 | |
-* | | | | |
-* |.|.+-+-+ 4 |
-* | | | |1| |
-* | | |.+-+ |
-* | | | | | |
-* |.|.|.|.+-+-+---+ 8
-* | | | | | |1| |
-* | | | | |.+-+ 2 |
-* | | | | | | | |
-* | | | | |.|.+-+-+
-* | | | | | | | |1|
-* | | | | | | |.+-+
-* | | | | | | | | |
-* |.|.|.|.|.|.|.|.+-----
-* | | | | | | | | |
-*
-* The 1-2-1-4-1-2-1-8-... pattern is the position of the last 1 bit in
-* the binary expansion of the current column. Each Schur update is
-* applied as soon as the necessary portion of U is available.
-*
-* [1] Toledo, S. 1997. Locality of Reference in LU Decomposition with
-* Partial Pivoting. SIAM J. Matrix Anal. Appl. 18, 4 (Oct. 1997),
-* 1065-1081. http://dx.doi.org/10.1137/S0895479896297744
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> SGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This code implements an iterative version of Sivan Toledo's recursive
+C> LU algorithm[1]. For square matrices, this iterative versions should
+C> be within a factor of two of the optimum number of memory transfers.
+C>
+C> The pattern is as follows, with the large blocks of U being updated
+C> in one call to STRSM, and the dotted lines denoting sections that
+C> have had all pending permutations applied:
+C>
+C> 1 2 3 4 5 6 7 8
+C> +-+-+---+-------+------
+C> | |1| | |
+C> |.+-+ 2 | |
+C> | | | | |
+C> |.|.+-+-+ 4 |
+C> | | | |1| |
+C> | | |.+-+ |
+C> | | | | | |
+C> |.|.|.|.+-+-+---+ 8
+C> | | | | | |1| |
+C> | | | | |.+-+ 2 |
+C> | | | | | | | |
+C> | | | | |.|.+-+-+
+C> | | | | | | | |1|
+C> | | | | | | |.+-+
+C> | | | | | | | | |
+C> |.|.|.|.|.|.|.|.+-----
+C> | | | | | | | | |
+C>
+C> The 1-2-1-4-1-2-1-8-... pattern is the position of the last 1 bit in
+C> the binary expansion of the current column. Each Schur update is
+C> applied as soon as the necessary portion of U is available.
+C>
+C> [1] Toledo, S. 1997. Locality of Reference in LU Decomposition with
+C> Partial Pivoting. SIAM J. Matrix Anal. Appl. 18, 4 (Oct. 1997),
+C> 1065-1081. http://dx.doi.org/10.1137/S0895479896297744
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is REAL array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+C> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+C> \ingroup variantsGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* =====================================================================
+ SUBROUTINE SGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.X) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/lu/REC/zgetrf.f b/SRC/VARIANTS/lu/REC/zgetrf.f
index e7b75b00..19137fb9 100644
--- a/SRC/VARIANTS/lu/REC/zgetrf.f
+++ b/SRC/VARIANTS/lu/REC/zgetrf.f
@@ -1,94 +1,151 @@
- SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
- IMPLICIT NONE
+C> \brief \b ZGETRF VARIANT: iterative version of Sivan Toledo's recursive LU algorithm
*
-* -- LAPACK routine (version 3.X) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* May 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This code implements an iterative version of Sivan Toledo's recursive
-* LU algorithm[1]. For square matrices, this iterative versions should
-* be within a factor of two of the optimum number of memory transfers.
-*
-* The pattern is as follows, with the large blocks of U being updated
-* in one call to DTRSM, and the dotted lines denoting sections that
-* have had all pending permutations applied:
-*
-* 1 2 3 4 5 6 7 8
-* +-+-+---+-------+------
-* | |1| | |
-* |.+-+ 2 | |
-* | | | | |
-* |.|.+-+-+ 4 |
-* | | | |1| |
-* | | |.+-+ |
-* | | | | | |
-* |.|.|.|.+-+-+---+ 8
-* | | | | | |1| |
-* | | | | |.+-+ 2 |
-* | | | | | | | |
-* | | | | |.|.+-+-+
-* | | | | | | | |1|
-* | | | | | | |.+-+
-* | | | | | | | | |
-* |.|.|.|.|.|.|.|.+-----
-* | | | | | | | | |
-*
-* The 1-2-1-4-1-2-1-8-... pattern is the position of the last 1 bit in
-* the binary expansion of the current column. Each Schur update is
-* applied as soon as the necessary portion of U is available.
-*
-* [1] Toledo, S. 1997. Locality of Reference in LU Decomposition with
-* Partial Pivoting. SIAM J. Matrix Anal. Appl. 18, 4 (Oct. 1997),
-* 1065-1081. http://dx.doi.org/10.1137/S0895479896297744
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> ZGETRF computes an LU factorization of a general M-by-N matrix A
+C> using partial pivoting with row interchanges.
+C>
+C> The factorization has the form
+C> A = P * L * U
+C> where P is a permutation matrix, L is lower triangular with unit
+C> diagonal elements (lower trapezoidal if m > n), and U is upper
+C> triangular (upper trapezoidal if m < n).
+C>
+C> This code implements an iterative version of Sivan Toledo's recursive
+C> LU algorithm[1]. For square matrices, this iterative versions should
+C> be within a factor of two of the optimum number of memory transfers.
+C>
+C> The pattern is as follows, with the large blocks of U being updated
+C> in one call to DTRSM, and the dotted lines denoting sections that
+C> have had all pending permutations applied:
+C>
+C> 1 2 3 4 5 6 7 8
+C> +-+-+---+-------+------
+C> | |1| | |
+C> |.+-+ 2 | |
+C> | | | | |
+C> |.|.+-+-+ 4 |
+C> | | | |1| |
+C> | | |.+-+ |
+C> | | | | | |
+C> |.|.|.|.+-+-+---+ 8
+C> | | | | | |1| |
+C> | | | | |.+-+ 2 |
+C> | | | | | | | |
+C> | | | | |.|.+-+-+
+C> | | | | | | | |1|
+C> | | | | | | |.+-+
+C> | | | | | | | | |
+C> |.|.|.|.|.|.|.|.+-----
+C> | | | | | | | | |
+C>
+C> The 1-2-1-4-1-2-1-8-... pattern is the position of the last 1 bit in
+C> the binary expansion of the current column. Each Schur update is
+C> applied as soon as the necessary portion of U is available.
+C>
+C> [1] Toledo, S. 1997. Locality of Reference in LU Decomposition with
+C> Partial Pivoting. SIAM J. Matrix Anal. Appl. 18, 4 (Oct. 1997),
+C> 1065-1081. http://dx.doi.org/10.1137/S0895479896297744
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX*16 array, dimension (LDA,N)
+C> On entry, the M-by-N matrix to be factored.
+C> On exit, the factors L and U from the factorization
+C> A = P*L*U; the unit diagonal elements of L are not stored.
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] IPIV
+C> \verbatim
+C> IPIV is INTEGER array, dimension (min(M,N))
+C> The pivot indices; for 1 <= i <= min(M,N), row i of the
+C> matrix was interchanged with row IPIV(i).
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+C> has been completed, but the factor U is exactly
+C> singular, and division by zero will occur if it is used
+C> to solve a system of equations.
+C> \endverbatim
+C>
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+C> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+C> \ingroup variantsGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* =====================================================================
+ SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.X) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/qr/LL/cgeqrf.f b/SRC/VARIANTS/qr/LL/cgeqrf.f
index 413bc90c..08af07f5 100644
--- a/SRC/VARIANTS/qr/LL/cgeqrf.f
+++ b/SRC/VARIANTS/qr/LL/cgeqrf.f
@@ -1,92 +1,166 @@
- SUBROUTINE CGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+C> \brief \b CGEQRF VARIANT: left-looking Level 3 BLAS version of the algorithm.
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQRF computes a QR factorization of a real M-by-N matrix A:
-* A = Q * R.
-*
-* This is the left-looking Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> CGEQRF computes a QR factorization of a real M-by-N matrix A:
+C> A = Q * R.
+C>
+C> This is the left-looking Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-*
-* The dimension of the array WORK. The dimension can be divided into three parts.
-*
-* 1) The part for the triangular factor T. If the very last T is not bigger
-* than any of the rest, then this part is NB x ceiling(K/NB), otherwise,
-* NB x (K-NT), where K = min(M,N) and NT is the dimension of the very last T
-*
-* 2) The part for the very last T when T is bigger than any of the rest T.
-* The size of this part is NT x NT, where NT = K - ceiling ((K-NX)/NB) x NB,
-* where K = min(M,N), NX is calculated by
-* NX = MAX( 0, ILAENV( 3, 'CGEQRF', ' ', M, N, -1, -1 ) )
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX array, dimension (LDA,N)
+C> On entry, the M-by-N matrix A.
+C> On exit, the elements on and above the diagonal of the array
+C> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+C> upper triangular if m >= n); the elements below the diagonal,
+C> with the array TAU, represent the orthogonal matrix Q as a
+C> product of min(m,n) elementary reflectors (see Further
+C> Details).
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] TAU
+C> \verbatim
+C> TAU is COMPLEX array, dimension (min(M,N))
+C> The scalar factors of the elementary reflectors (see Further
+C> Details).
+C> \endverbatim
+C>
+C> \param[out] WORK
+C> \verbatim
+C> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+C> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+C> \endverbatim
+C>
+C> \param[in] LWORK
+C> \verbatim
+C> LWORK is INTEGER
+C> \endverbatim
+C> \verbatim
+C> The dimension of the array WORK. The dimension can be divided into three parts.
+C> \endverbatim
+C> \verbatim
+C> 1) The part for the triangular factor T. If the very last T is not bigger
+C> than any of the rest, then this part is NB x ceiling(K/NB), otherwise,
+C> NB x (K-NT), where K = min(M,N) and NT is the dimension of the very last T
+C> \endverbatim
+C> \verbatim
+C> 2) The part for the very last T when T is bigger than any of the rest T.
+C> The size of this part is NT x NT, where NT = K - ceiling ((K-NX)/NB) x NB,
+C> where K = min(M,N), NX is calculated by
+C> NX = MAX( 0, ILAENV( 3, 'CGEQRF', ' ', M, N, -1, -1 ) )
+C> \endverbatim
+C> \verbatim
+C> 3) The part for dlarfb is of size max((N-M)*K, (N-M)*NB, K*NB, NB*NB)
+C> \endverbatim
+C> \verbatim
+C> So LWORK = part1 + part2 + part3
+C> \endverbatim
+C> \verbatim
+C> If LWORK = -1, then a workspace query is assumed; the routine
+C> only calculates the optimal size of the WORK array, returns
+C> this value as the first entry of the WORK array, and no error
+C> message related to LWORK is issued by XERBLA.
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> \endverbatim
+C>
+*
+* Authors
+* =======
*
-* 3) The part for dlarfb is of size max((N-M)*K, (N-M)*NB, K*NB, NB*NB)
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* So LWORK = part1 + part2 + part3
+C> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+C> \ingroup variantsGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+C>\details \b Further \b Details
+C> \verbatim
+C>
+C> The matrix Q is represented as a product of elementary reflectors
+C>
+C> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+C>
+C> Each H(i) has the form
+C>
+C> H(i) = I - tau * v * v'
+C>
+C> where tau is a real scalar, and v is a real vector with
+C> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+C> and tau in TAU(i).
+C>
+C> \endverbatim
+C>
+* =====================================================================
+ SUBROUTINE CGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v'
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/qr/LL/dgeqrf.f b/SRC/VARIANTS/qr/LL/dgeqrf.f
index 728ea1b8..2249720c 100644
--- a/SRC/VARIANTS/qr/LL/dgeqrf.f
+++ b/SRC/VARIANTS/qr/LL/dgeqrf.f
@@ -1,92 +1,166 @@
- SUBROUTINE DGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+C> \brief \b DGEQRF VARIANT: left-looking Level 3 BLAS version of the algorithm.
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQRF computes a QR factorization of a real M-by-N matrix A:
-* A = Q * R.
-*
-* This is the left-looking Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> DGEQRF computes a QR factorization of a real M-by-N matrix A:
+C> A = Q * R.
+C>
+C> This is the left-looking Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-*
-* The dimension of the array WORK. The dimension can be divided into three parts.
-*
-* 1) The part for the triangular factor T. If the very last T is not bigger
-* than any of the rest, then this part is NB x ceiling(K/NB), otherwise,
-* NB x (K-NT), where K = min(M,N) and NT is the dimension of the very last T
-*
-* 2) The part for the very last T when T is bigger than any of the rest T.
-* The size of this part is NT x NT, where NT = K - ceiling ((K-NX)/NB) x NB,
-* where K = min(M,N), NX is calculated by
-* NX = MAX( 0, ILAENV( 3, 'DGEQRF', ' ', M, N, -1, -1 ) )
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is DOUBLE PRECISION array, dimension (LDA,N)
+C> On entry, the M-by-N matrix A.
+C> On exit, the elements on and above the diagonal of the array
+C> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+C> upper triangular if m >= n); the elements below the diagonal,
+C> with the array TAU, represent the orthogonal matrix Q as a
+C> product of min(m,n) elementary reflectors (see Further
+C> Details).
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] TAU
+C> \verbatim
+C> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+C> The scalar factors of the elementary reflectors (see Further
+C> Details).
+C> \endverbatim
+C>
+C> \param[out] WORK
+C> \verbatim
+C> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+C> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+C> \endverbatim
+C>
+C> \param[in] LWORK
+C> \verbatim
+C> LWORK is INTEGER
+C> \endverbatim
+C> \verbatim
+C> The dimension of the array WORK. The dimension can be divided into three parts.
+C> \endverbatim
+C> \verbatim
+C> 1) The part for the triangular factor T. If the very last T is not bigger
+C> than any of the rest, then this part is NB x ceiling(K/NB), otherwise,
+C> NB x (K-NT), where K = min(M,N) and NT is the dimension of the very last T
+C> \endverbatim
+C> \verbatim
+C> 2) The part for the very last T when T is bigger than any of the rest T.
+C> The size of this part is NT x NT, where NT = K - ceiling ((K-NX)/NB) x NB,
+C> where K = min(M,N), NX is calculated by
+C> NX = MAX( 0, ILAENV( 3, 'DGEQRF', ' ', M, N, -1, -1 ) )
+C> \endverbatim
+C> \verbatim
+C> 3) The part for dlarfb is of size max((N-M)*K, (N-M)*NB, K*NB, NB*NB)
+C> \endverbatim
+C> \verbatim
+C> So LWORK = part1 + part2 + part3
+C> \endverbatim
+C> \verbatim
+C> If LWORK = -1, then a workspace query is assumed; the routine
+C> only calculates the optimal size of the WORK array, returns
+C> this value as the first entry of the WORK array, and no error
+C> message related to LWORK is issued by XERBLA.
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> \endverbatim
+C>
+*
+* Authors
+* =======
*
-* 3) The part for dlarfb is of size max((N-M)*K, (N-M)*NB, K*NB, NB*NB)
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* So LWORK = part1 + part2 + part3
+C> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+C> \ingroup variantsGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+C>\details \b Further \b Details
+C> \verbatim
+C>
+C> The matrix Q is represented as a product of elementary reflectors
+C>
+C> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+C>
+C> Each H(i) has the form
+C>
+C> H(i) = I - tau * v * v'
+C>
+C> where tau is a real scalar, and v is a real vector with
+C> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+C> and tau in TAU(i).
+C>
+C> \endverbatim
+C>
+* =====================================================================
+ SUBROUTINE DGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v'
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/qr/LL/sceil.f b/SRC/VARIANTS/qr/LL/sceil.f
index 70c5c5cf..f988e6be 100644
--- a/SRC/VARIANTS/qr/LL/sceil.f
+++ b/SRC/VARIANTS/qr/LL/sceil.f
@@ -1,8 +1,67 @@
+C> \brief \b SCEIL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SCEIL( A )
+*
+* .. Scalar Arguments ..
+* REAL A
+* ..
+*
+* =====================================================================
+*
+* .. Intrinsic Functions ..
+* INTRINSIC INT
+* ..
+* .. Executable Statements ..*
+*
+* IF (A-INT(A).EQ.0) THEN
+* SCEIL = A
+* ELSE IF (A.GT.0) THEN
+* SCEIL = INT(A)+1;
+* ELSE
+* SCEIL = INT(A)
+* END IF
+*
+* RETURN
+*
+* END
+* Purpose
+* =======
+*
+C>\details \b Purpose:
+C>\verbatim
+C>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
+*
+C> \date November 2011
+*
+C> \ingroup variantsOTHERcomputational
+*
+* =====================================================================
REAL FUNCTION SCEIL( A )
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..*
REAL A
diff --git a/SRC/VARIANTS/qr/LL/sgeqrf.f b/SRC/VARIANTS/qr/LL/sgeqrf.f
index fef6379b..a74272bd 100644
--- a/SRC/VARIANTS/qr/LL/sgeqrf.f
+++ b/SRC/VARIANTS/qr/LL/sgeqrf.f
@@ -1,92 +1,166 @@
- SUBROUTINE SGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+C> \brief \b SGEQRF VARIANT: left-looking Level 3 BLAS version of the algorithm.
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQRF computes a QR factorization of a real M-by-N matrix A:
-* A = Q * R.
-*
-* This is the left-looking Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> SGEQRF computes a QR factorization of a real M-by-N matrix A:
+C> A = Q * R.
+C>
+C> This is the left-looking Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-*
-* The dimension of the array WORK. The dimension can be divided into three parts.
-*
-* 1) The part for the triangular factor T. If the very last T is not bigger
-* than any of the rest, then this part is NB x ceiling(K/NB), otherwise,
-* NB x (K-NT), where K = min(M,N) and NT is the dimension of the very last T
-*
-* 2) The part for the very last T when T is bigger than any of the rest T.
-* The size of this part is NT x NT, where NT = K - ceiling ((K-NX)/NB) x NB,
-* where K = min(M,N), NX is calculated by
-* NX = MAX( 0, ILAENV( 3, 'SGEQRF', ' ', M, N, -1, -1 ) )
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is REAL array, dimension (LDA,N)
+C> On entry, the M-by-N matrix A.
+C> On exit, the elements on and above the diagonal of the array
+C> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+C> upper triangular if m >= n); the elements below the diagonal,
+C> with the array TAU, represent the orthogonal matrix Q as a
+C> product of min(m,n) elementary reflectors (see Further
+C> Details).
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] TAU
+C> \verbatim
+C> TAU is REAL array, dimension (min(M,N))
+C> The scalar factors of the elementary reflectors (see Further
+C> Details).
+C> \endverbatim
+C>
+C> \param[out] WORK
+C> \verbatim
+C> WORK is REAL array, dimension (MAX(1,LWORK))
+C> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+C> \endverbatim
+C>
+C> \param[in] LWORK
+C> \verbatim
+C> LWORK is INTEGER
+C> \endverbatim
+C> \verbatim
+C> The dimension of the array WORK. The dimension can be divided into three parts.
+C> \endverbatim
+C> \verbatim
+C> 1) The part for the triangular factor T. If the very last T is not bigger
+C> than any of the rest, then this part is NB x ceiling(K/NB), otherwise,
+C> NB x (K-NT), where K = min(M,N) and NT is the dimension of the very last T
+C> \endverbatim
+C> \verbatim
+C> 2) The part for the very last T when T is bigger than any of the rest T.
+C> The size of this part is NT x NT, where NT = K - ceiling ((K-NX)/NB) x NB,
+C> where K = min(M,N), NX is calculated by
+C> NX = MAX( 0, ILAENV( 3, 'SGEQRF', ' ', M, N, -1, -1 ) )
+C> \endverbatim
+C> \verbatim
+C> 3) The part for dlarfb is of size max((N-M)*K, (N-M)*NB, K*NB, NB*NB)
+C> \endverbatim
+C> \verbatim
+C> So LWORK = part1 + part2 + part3
+C> \endverbatim
+C> \verbatim
+C> If LWORK = -1, then a workspace query is assumed; the routine
+C> only calculates the optimal size of the WORK array, returns
+C> this value as the first entry of the WORK array, and no error
+C> message related to LWORK is issued by XERBLA.
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> \endverbatim
+C>
+*
+* Authors
+* =======
*
-* 3) The part for dlarfb is of size max((N-M)*K, (N-M)*NB, K*NB, NB*NB)
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* So LWORK = part1 + part2 + part3
+C> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+C> \ingroup variantsGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+C>\details \b Further \b Details
+C> \verbatim
+C>
+C> The matrix Q is represented as a product of elementary reflectors
+C>
+C> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+C>
+C> Each H(i) has the form
+C>
+C> H(i) = I - tau * v * v'
+C>
+C> where tau is a real scalar, and v is a real vector with
+C> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+C> and tau in TAU(i).
+C>
+C> \endverbatim
+C>
+* =====================================================================
+ SUBROUTINE SGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v'
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/VARIANTS/qr/LL/zgeqrf.f b/SRC/VARIANTS/qr/LL/zgeqrf.f
index cf5e093e..2f6b7097 100644
--- a/SRC/VARIANTS/qr/LL/zgeqrf.f
+++ b/SRC/VARIANTS/qr/LL/zgeqrf.f
@@ -1,92 +1,166 @@
- SUBROUTINE ZGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+C> \brief \b ZGEQRF VARIANT: left-looking Level 3 BLAS of the algorithm.
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* March 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQRF computes a QR factorization of a real M-by-N matrix A:
-* A = Q * R.
-*
-* This is the left-looking Level 3 BLAS version of the algorithm.
+C>\details \b Purpose:
+C>\verbatim
+C>
+C> ZGEQRF computes a QR factorization of a real M-by-N matrix A:
+C> A = Q * R.
+C>
+C> This is the left-looking Level 3 BLAS version of the algorithm.
+C>
+C>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-*
-* The dimension of the array WORK. The dimension can be divided into three parts.
-*
-* 1) The part for the triangular factor T. If the very last T is not bigger
-* than any of the rest, then this part is NB x ceiling(K/NB), otherwise,
-* NB x (K-NT), where K = min(M,N) and NT is the dimension of the very last T
-*
-* 2) The part for the very last T when T is bigger than any of the rest T.
-* The size of this part is NT x NT, where NT = K - ceiling ((K-NX)/NB) x NB,
-* where K = min(M,N), NX is calculated by
-* NX = MAX( 0, ILAENV( 3, 'ZGEQRF', ' ', M, N, -1, -1 ) )
+C> \param[in] M
+C> \verbatim
+C> M is INTEGER
+C> The number of rows of the matrix A. M >= 0.
+C> \endverbatim
+C>
+C> \param[in] N
+C> \verbatim
+C> N is INTEGER
+C> The number of columns of the matrix A. N >= 0.
+C> \endverbatim
+C>
+C> \param[in,out] A
+C> \verbatim
+C> A is COMPLEX*16 array, dimension (LDA,N)
+C> On entry, the M-by-N matrix A.
+C> On exit, the elements on and above the diagonal of the array
+C> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+C> upper triangular if m >= n); the elements below the diagonal,
+C> with the array TAU, represent the orthogonal matrix Q as a
+C> product of min(m,n) elementary reflectors (see Further
+C> Details).
+C> \endverbatim
+C>
+C> \param[in] LDA
+C> \verbatim
+C> LDA is INTEGER
+C> The leading dimension of the array A. LDA >= max(1,M).
+C> \endverbatim
+C>
+C> \param[out] TAU
+C> \verbatim
+C> TAU is COMPLEX*16 array, dimension (min(M,N))
+C> The scalar factors of the elementary reflectors (see Further
+C> Details).
+C> \endverbatim
+C>
+C> \param[out] WORK
+C> \verbatim
+C> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+C> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+C> \endverbatim
+C>
+C> \param[in] LWORK
+C> \verbatim
+C> LWORK is INTEGER
+C> \endverbatim
+C> \verbatim
+C> The dimension of the array WORK. The dimension can be divided into three parts.
+C> \endverbatim
+C> \verbatim
+C> 1) The part for the triangular factor T. If the very last T is not bigger
+C> than any of the rest, then this part is NB x ceiling(K/NB), otherwise,
+C> NB x (K-NT), where K = min(M,N) and NT is the dimension of the very last T
+C> \endverbatim
+C> \verbatim
+C> 2) The part for the very last T when T is bigger than any of the rest T.
+C> The size of this part is NT x NT, where NT = K - ceiling ((K-NX)/NB) x NB,
+C> where K = min(M,N), NX is calculated by
+C> NX = MAX( 0, ILAENV( 3, 'ZGEQRF', ' ', M, N, -1, -1 ) )
+C> \endverbatim
+C> \verbatim
+C> 3) The part for dlarfb is of size max((N-M)*K, (N-M)*NB, K*NB, NB*NB)
+C> \endverbatim
+C> \verbatim
+C> So LWORK = part1 + part2 + part3
+C> \endverbatim
+C> \verbatim
+C> If LWORK = -1, then a workspace query is assumed; the routine
+C> only calculates the optimal size of the WORK array, returns
+C> this value as the first entry of the WORK array, and no error
+C> message related to LWORK is issued by XERBLA.
+C> \endverbatim
+C>
+C> \param[out] INFO
+C> \verbatim
+C> INFO is INTEGER
+C> = 0: successful exit
+C> < 0: if INFO = -i, the i-th argument had an illegal value
+C> \endverbatim
+C>
+*
+* Authors
+* =======
*
-* 3) The part for dlarfb is of size max((N-M)*K, (N-M)*NB, K*NB, NB*NB)
+C> \author Univ. of Tennessee
+C> \author Univ. of California Berkeley
+C> \author Univ. of Colorado Denver
+C> \author NAG Ltd.
*
-* So LWORK = part1 + part2 + part3
+C> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+C> \ingroup variantsGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+C>\details \b Further \b Details
+C> \verbatim
+C>
+C> The matrix Q is represented as a product of elementary reflectors
+C>
+C> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+C>
+C> Each H(i) has the form
+C>
+C> H(i) = I - tau * v * v'
+C>
+C> where tau is a real scalar, and v is a real vector with
+C> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+C> and tau in TAU(i).
+C>
+C> \endverbatim
+C>
+* =====================================================================
+ SUBROUTINE ZGEQRF ( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v'
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cbbcsd.f b/SRC/cbbcsd.f
index d5d22101..53881a16 100644
--- a/SRC/cbbcsd.f
+++ b/SRC/cbbcsd.f
@@ -1,16 +1,302 @@
+*> \brief \b CBBCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
+* THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
+* V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
+* B22D, B22E, RWORK, LRWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
+* INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LRWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* REAL B11D( * ), B11E( * ), B12D( * ), B12E( * ),
+* $ B21D( * ), B21E( * ), B22D( * ), B22E( * ),
+* $ PHI( * ), THETA( * ), RWORK( * )
+* COMPLEX U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CBBCSD computes the CS decomposition of a unitary matrix in
+*> bidiagonal-block form,
+*>
+*>
+*> [ B11 | B12 0 0 ]
+*> [ 0 | 0 -I 0 ]
+*> X = [----------------]
+*> [ B21 | B22 0 0 ]
+*> [ 0 | 0 0 I ]
+*>
+*> [ C | -S 0 0 ]
+*> [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**H
+*> = [---------] [---------------] [---------] .
+*> [ | U2 ] [ S | C 0 0 ] [ | V2 ]
+*> [ 0 | 0 0 I ]
+*>
+*> X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
+*> than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
+*> transposed and/or permuted. This can be done in constant time using
+*> the TRANS and SIGNS options. See CUNCSD for details.)
+*>
+*> The bidiagonal matrices B11, B12, B21, and B22 are represented
+*> implicitly by angles THETA(1:Q) and PHI(1:Q-1).
+*>
+*> The unitary matrices U1, U2, V1T, and V2T are input/output.
+*> The input matrices are pre- or post-multiplied by the appropriate
+*> singular vector matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU1
+*> \verbatim
+*> JOBU1 is CHARACTER
+*> = 'Y': U1 is updated;
+*> otherwise: U1 is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBU2
+*> \verbatim
+*> JOBU2 is CHARACTER
+*> = 'Y': U2 is updated;
+*> otherwise: U2 is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBV1T
+*> \verbatim
+*> JOBV1T is CHARACTER
+*> = 'Y': V1T is updated;
+*> otherwise: V1T is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBV2T
+*> \verbatim
+*> JOBV2T is CHARACTER
+*> = 'Y': V2T is updated;
+*> otherwise: V2T is not updated.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X, the unitary matrix in
+*> bidiagonal-block form.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in the top-left block of X. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in the top-left block of X.
+*> 0 <= Q <= MIN(P,M-P,M-Q).
+*> \endverbatim
+*>
+*> \param[in,out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension (Q)
+*> On entry, the angles THETA(1),...,THETA(Q) that, along with
+*> PHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block
+*> form. On exit, the angles whose cosines and sines define the
+*> diagonal blocks in the CS decomposition.
+*> \endverbatim
+*>
+*> \param[in,out] PHI
+*> \verbatim
+*> PHI is REAL array, dimension (Q-1)
+*> The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),...,
+*> THETA(Q), define the matrix in bidiagonal-block form.
+*> \endverbatim
+*>
+*> \param[in,out] U1
+*> \verbatim
+*> U1 is COMPLEX array, dimension (LDU1,P)
+*> On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
+*> by the left singular vector matrix common to [ B11 ; 0 ] and
+*> [ B12 0 0 ; 0 -I 0 0 ].
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of the array U1.
+*> \endverbatim
+*>
+*> \param[in,out] U2
+*> \verbatim
+*> U2 is COMPLEX array, dimension (LDU2,M-P)
+*> On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
+*> postmultiplied by the left singular vector matrix common to
+*> [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2.
+*> \endverbatim
+*>
+*> \param[in,out] V1T
+*> \verbatim
+*> V1T is COMPLEX array, dimension (LDV1T,Q)
+*> On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
+*> by the conjugate transpose of the right singular vector
+*> matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of the array V1T.
+*> \endverbatim
+*>
+*> \param[in,out] V2T
+*> \verbatim
+*> V2T is COMPLEX array, dimenison (LDV2T,M-Q)
+*> On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
+*> premultiplied by the conjugate transpose of the right
+*> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
+*> [ B22 0 0 ; 0 0 I ].
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of the array V2T.
+*> \endverbatim
+*>
+*> \param[out] B11D
+*> \verbatim
+*> B11D is REAL array, dimension (Q)
+*> When CBBCSD converges, B11D contains the cosines of THETA(1),
+*> ..., THETA(Q). If CBBCSD fails to converge, then B11D
+*> contains the diagonal of the partially reduced top-left
+*> block.
+*> \endverbatim
+*>
+*> \param[out] B11E
+*> \verbatim
+*> B11E is REAL array, dimension (Q-1)
+*> When CBBCSD converges, B11E contains zeros. If CBBCSD fails
+*> to converge, then B11E contains the superdiagonal of the
+*> partially reduced top-left block.
+*> \endverbatim
+*>
+*> \param[out] B12D
+*> \verbatim
+*> B12D is REAL array, dimension (Q)
+*> When CBBCSD converges, B12D contains the negative sines of
+*> THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then
+*> B12D contains the diagonal of the partially reduced top-right
+*> block.
+*> \endverbatim
+*>
+*> \param[out] B12E
+*> \verbatim
+*> B12E is REAL array, dimension (Q-1)
+*> When CBBCSD converges, B12E contains zeros. If CBBCSD fails
+*> to converge, then B12E contains the subdiagonal of the
+*> partially reduced top-right block.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK. LRWORK >= MAX(1,8*Q).
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the RWORK array,
+*> returns this value as the first entry of the work array, and
+*> no error message related to LRWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if CBBCSD did not converge, INFO specifies the number
+*> of nonzero entries in PHI, and B11D, B11E, etc.,
+*> contain the partially reduced matrix.
+*> \endverbatim
+*> \verbatim
+*> Reference
+*> =========
+*> \endverbatim
+*> \verbatim
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLMUL REAL, default = MAX(10,MIN(100,EPS**(-1/8)))
+*> TOLMUL controls the convergence criterion of the QR loop.
+*> Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
+*> are within TOLMUL*EPS of either bound.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
$ THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
$ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
$ B22D, B22E, RWORK, LRWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.0) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
@@ -24,170 +310,6 @@
$ V2T( LDV2T, * )
* ..
*
-* Purpose
-* =======
-*
-* CBBCSD computes the CS decomposition of a unitary matrix in
-* bidiagonal-block form,
-*
-*
-* [ B11 | B12 0 0 ]
-* [ 0 | 0 -I 0 ]
-* X = [----------------]
-* [ B21 | B22 0 0 ]
-* [ 0 | 0 0 I ]
-*
-* [ C | -S 0 0 ]
-* [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**H
-* = [---------] [---------------] [---------] .
-* [ | U2 ] [ S | C 0 0 ] [ | V2 ]
-* [ 0 | 0 0 I ]
-*
-* X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
-* than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
-* transposed and/or permuted. This can be done in constant time using
-* the TRANS and SIGNS options. See CUNCSD for details.)
-*
-* The bidiagonal matrices B11, B12, B21, and B22 are represented
-* implicitly by angles THETA(1:Q) and PHI(1:Q-1).
-*
-* The unitary matrices U1, U2, V1T, and V2T are input/output.
-* The input matrices are pre- or post-multiplied by the appropriate
-* singular vector matrices.
-*
-* Arguments
-* =========
-*
-* JOBU1 (input) CHARACTER
-* = 'Y': U1 is updated;
-* otherwise: U1 is not updated.
-*
-* JOBU2 (input) CHARACTER
-* = 'Y': U2 is updated;
-* otherwise: U2 is not updated.
-*
-* JOBV1T (input) CHARACTER
-* = 'Y': V1T is updated;
-* otherwise: V1T is not updated.
-*
-* JOBV2T (input) CHARACTER
-* = 'Y': V2T is updated;
-* otherwise: V2T is not updated.
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* M (input) INTEGER
-* The number of rows and columns in X, the unitary matrix in
-* bidiagonal-block form.
-*
-* P (input) INTEGER
-* The number of rows in the top-left block of X. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in the top-left block of X.
-* 0 <= Q <= MIN(P,M-P,M-Q).
-*
-* THETA (input/output) REAL array, dimension (Q)
-* On entry, the angles THETA(1),...,THETA(Q) that, along with
-* PHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block
-* form. On exit, the angles whose cosines and sines define the
-* diagonal blocks in the CS decomposition.
-*
-* PHI (input/workspace) REAL array, dimension (Q-1)
-* The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),...,
-* THETA(Q), define the matrix in bidiagonal-block form.
-*
-* U1 (input/output) COMPLEX array, dimension (LDU1,P)
-* On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
-* by the left singular vector matrix common to [ B11 ; 0 ] and
-* [ B12 0 0 ; 0 -I 0 0 ].
-*
-* LDU1 (input) INTEGER
-* The leading dimension of the array U1.
-*
-* U2 (input/output) COMPLEX array, dimension (LDU2,M-P)
-* On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
-* postmultiplied by the left singular vector matrix common to
-* [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2.
-*
-* V1T (input/output) COMPLEX array, dimension (LDV1T,Q)
-* On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
-* by the conjugate transpose of the right singular vector
-* matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
-*
-* LDV1T (input) INTEGER
-* The leading dimension of the array V1T.
-*
-* V2T (input/output) COMPLEX array, dimenison (LDV2T,M-Q)
-* On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
-* premultiplied by the conjugate transpose of the right
-* singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
-* [ B22 0 0 ; 0 0 I ].
-*
-* LDV2T (input) INTEGER
-* The leading dimension of the array V2T.
-*
-* B11D (output) REAL array, dimension (Q)
-* When CBBCSD converges, B11D contains the cosines of THETA(1),
-* ..., THETA(Q). If CBBCSD fails to converge, then B11D
-* contains the diagonal of the partially reduced top-left
-* block.
-*
-* B11E (output) REAL array, dimension (Q-1)
-* When CBBCSD converges, B11E contains zeros. If CBBCSD fails
-* to converge, then B11E contains the superdiagonal of the
-* partially reduced top-left block.
-*
-* B12D (output) REAL array, dimension (Q)
-* When CBBCSD converges, B12D contains the negative sines of
-* THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then
-* B12D contains the diagonal of the partially reduced top-right
-* block.
-*
-* B12E (output) REAL array, dimension (Q-1)
-* When CBBCSD converges, B12E contains zeros. If CBBCSD fails
-* to converge, then B12E contains the subdiagonal of the
-* partially reduced top-right block.
-*
-* RWORK (workspace) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK. LRWORK >= MAX(1,8*Q).
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the RWORK array,
-* returns this value as the first entry of the work array, and
-* no error message related to LRWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if CBBCSD did not converge, INFO specifies the number
-* of nonzero entries in PHI, and B11D, B11E, etc.,
-* contain the partially reduced matrix.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
-* Internal Parameters
-* ===================
-*
-* TOLMUL REAL, default = MAX(10,MIN(100,EPS**(-1/8)))
-* TOLMUL controls the convergence criterion of the QR loop.
-* Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
-* are within TOLMUL*EPS of either bound.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/cbdsqr.f b/SRC/cbdsqr.f
index 12cbb748..72ee31d4 100644
--- a/SRC/cbdsqr.f
+++ b/SRC/cbdsqr.f
@@ -1,10 +1,225 @@
+*> \brief \b CBDSQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
+* LDU, C, LDC, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), RWORK( * )
+* COMPLEX C( LDC, * ), U( LDU, * ), VT( LDVT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CBDSQR computes the singular values and, optionally, the right and/or
+*> left singular vectors from the singular value decomposition (SVD) of
+*> a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
+*> zero-shift QR algorithm. The SVD of B has the form
+*>
+*> B = Q * S * P**H
+*>
+*> where S is the diagonal matrix of singular values, Q is an orthogonal
+*> matrix of left singular vectors, and P is an orthogonal matrix of
+*> right singular vectors. If left singular vectors are requested, this
+*> subroutine actually returns U*Q instead of Q, and, if right singular
+*> vectors are requested, this subroutine returns P**H*VT instead of
+*> P**H, for given complex input matrices U and VT. When U and VT are
+*> the unitary matrices that reduce a general matrix A to bidiagonal
+*> form: A = U*B*VT, as computed by CGEBRD, then
+*>
+*> A = (U*Q) * S * (P**H*VT)
+*>
+*> is the SVD of A. Optionally, the subroutine may also compute Q**H*C
+*> for a given complex input matrix C.
+*>
+*> See "Computing Small Singular Values of Bidiagonal Matrices With
+*> Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
+*> LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
+*> no. 5, pp. 873-912, Sept 1990) and
+*> "Accurate singular values and differential qd algorithms," by
+*> B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
+*> Department, University of California at Berkeley, July 1992
+*> for a detailed description of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': B is upper bidiagonal;
+*> = 'L': B is lower bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCVT
+*> \verbatim
+*> NCVT is INTEGER
+*> The number of columns of the matrix VT. NCVT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRU
+*> \verbatim
+*> NRU is INTEGER
+*> The number of rows of the matrix U. NRU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> The number of columns of the matrix C. NCC >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the bidiagonal matrix B.
+*> On exit, if INFO=0, the singular values of B in decreasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the N-1 offdiagonal elements of the bidiagonal
+*> matrix B.
+*> On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
+*> will contain the diagonal and superdiagonal elements of a
+*> bidiagonal matrix orthogonally equivalent to the one given
+*> as input.
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is COMPLEX array, dimension (LDVT, NCVT)
+*> On entry, an N-by-NCVT matrix VT.
+*> On exit, VT is overwritten by P**H * VT.
+*> Not referenced if NCVT = 0.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT.
+*> LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU, N)
+*> On entry, an NRU-by-N matrix U.
+*> On exit, U is overwritten by U * Q.
+*> Not referenced if NRU = 0.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,NRU).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, NCC)
+*> On entry, an N-by-NCC matrix C.
+*> On exit, C is overwritten by Q**H * C.
+*> Not referenced if NCC = 0.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C.
+*> LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm did not converge; D and E contain the
+*> elements of a bidiagonal matrix which is orthogonally
+*> similar to the input matrix B; if INFO = i, i
+*> elements of E have not converged to zero.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLMUL REAL, default = max(10,min(100,EPS**(-1/8)))
+*> TOLMUL controls the convergence criterion of the QR loop.
+*> If it is positive, TOLMUL*EPS is the desired relative
+*> precision in the computed singular values.
+*> If it is negative, abs(TOLMUL*EPS*sigma_max) is the
+*> desired absolute accuracy in the computed singular
+*> values (corresponds to relative accuracy
+*> abs(TOLMUL*EPS) in the largest singular value.
+*> abs(TOLMUL) should be between 1 and 1/EPS, and preferably
+*> between 10 (for fast convergence) and .1/EPS
+*> (for there to be some accuracy in the results).
+*> Default is to lose at either one eighth or 2 of the
+*> available decimal digits in each computed singular value
+*> (whichever is smaller).
+*> \endverbatim
+*> \verbatim
+*> MAXITR INTEGER, default = 6
+*> MAXITR controls the maximum number of passes of the
+*> algorithm through its inner loop. The algorithms stops
+*> (and so fails to converge) if the number of passes
+*> through the inner loop exceeds MAXITR*N**2.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
$ LDU, C, LDC, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,132 +230,6 @@
COMPLEX C( LDC, * ), U( LDU, * ), VT( LDVT, * )
* ..
*
-* Purpose
-* =======
-*
-* CBDSQR computes the singular values and, optionally, the right and/or
-* left singular vectors from the singular value decomposition (SVD) of
-* a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
-* zero-shift QR algorithm. The SVD of B has the form
-*
-* B = Q * S * P**H
-*
-* where S is the diagonal matrix of singular values, Q is an orthogonal
-* matrix of left singular vectors, and P is an orthogonal matrix of
-* right singular vectors. If left singular vectors are requested, this
-* subroutine actually returns U*Q instead of Q, and, if right singular
-* vectors are requested, this subroutine returns P**H*VT instead of
-* P**H, for given complex input matrices U and VT. When U and VT are
-* the unitary matrices that reduce a general matrix A to bidiagonal
-* form: A = U*B*VT, as computed by CGEBRD, then
-*
-* A = (U*Q) * S * (P**H*VT)
-*
-* is the SVD of A. Optionally, the subroutine may also compute Q**H*C
-* for a given complex input matrix C.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices With
-* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
-* LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
-* no. 5, pp. 873-912, Sept 1990) and
-* "Accurate singular values and differential qd algorithms," by
-* B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
-* Department, University of California at Berkeley, July 1992
-* for a detailed description of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': B is upper bidiagonal;
-* = 'L': B is lower bidiagonal.
-*
-* N (input) INTEGER
-* The order of the matrix B. N >= 0.
-*
-* NCVT (input) INTEGER
-* The number of columns of the matrix VT. NCVT >= 0.
-*
-* NRU (input) INTEGER
-* The number of rows of the matrix U. NRU >= 0.
-*
-* NCC (input) INTEGER
-* The number of columns of the matrix C. NCC >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the bidiagonal matrix B.
-* On exit, if INFO=0, the singular values of B in decreasing
-* order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the N-1 offdiagonal elements of the bidiagonal
-* matrix B.
-* On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
-* will contain the diagonal and superdiagonal elements of a
-* bidiagonal matrix orthogonally equivalent to the one given
-* as input.
-*
-* VT (input/output) COMPLEX array, dimension (LDVT, NCVT)
-* On entry, an N-by-NCVT matrix VT.
-* On exit, VT is overwritten by P**H * VT.
-* Not referenced if NCVT = 0.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT.
-* LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
-*
-* U (input/output) COMPLEX array, dimension (LDU, N)
-* On entry, an NRU-by-N matrix U.
-* On exit, U is overwritten by U * Q.
-* Not referenced if NRU = 0.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,NRU).
-*
-* C (input/output) COMPLEX array, dimension (LDC, NCC)
-* On entry, an N-by-NCC matrix C.
-* On exit, C is overwritten by Q**H * C.
-* Not referenced if NCC = 0.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C.
-* LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-* if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm did not converge; D and E contain the
-* elements of a bidiagonal matrix which is orthogonally
-* similar to the input matrix B; if INFO = i, i
-* elements of E have not converged to zero.
-*
-* Internal Parameters
-* ===================
-*
-* TOLMUL REAL, default = max(10,min(100,EPS**(-1/8)))
-* TOLMUL controls the convergence criterion of the QR loop.
-* If it is positive, TOLMUL*EPS is the desired relative
-* precision in the computed singular values.
-* If it is negative, abs(TOLMUL*EPS*sigma_max) is the
-* desired absolute accuracy in the computed singular
-* values (corresponds to relative accuracy
-* abs(TOLMUL*EPS) in the largest singular value.
-* abs(TOLMUL) should be between 1 and 1/EPS, and preferably
-* between 10 (for fast convergence) and .1/EPS
-* (for there to be some accuracy in the results).
-* Default is to lose at either one eighth or 2 of the
-* available decimal digits in each computed singular value
-* (whichever is smaller).
-*
-* MAXITR INTEGER, default = 6
-* MAXITR controls the maximum number of passes of the
-* algorithm through its inner loop. The algorithms stops
-* (and so fails to converge) if the number of passes
-* through the inner loop exceeds MAXITR*N**2.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgbbrd.f b/SRC/cgbbrd.f
index 8af41634..040732ca 100644
--- a/SRC/cgbbrd.f
+++ b/SRC/cgbbrd.f
@@ -1,10 +1,194 @@
+*> \brief \b CGBBRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
+* LDQ, PT, LDPT, C, LDC, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER VECT
+* INTEGER INFO, KL, KU, LDAB, LDC, LDPT, LDQ, M, N, NCC
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), RWORK( * )
+* COMPLEX AB( LDAB, * ), C( LDC, * ), PT( LDPT, * ),
+* $ Q( LDQ, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBBRD reduces a complex general m-by-n band matrix A to real upper
+*> bidiagonal form B by a unitary transformation: Q**H * A * P = B.
+*>
+*> The routine computes B, and optionally forms Q or P**H, or computes
+*> Q**H*C for a given matrix C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> Specifies whether or not the matrices Q and P**H are to be
+*> formed.
+*> = 'N': do not form Q or P**H;
+*> = 'Q': form Q only;
+*> = 'P': form P**H only;
+*> = 'B': form both.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> The number of columns of the matrix C. NCC >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals of the matrix A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals of the matrix A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the m-by-n band matrix A, stored in rows 1 to
+*> KL+KU+1. The j-th column of A is stored in the j-th column of
+*> the array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
+*> On exit, A is overwritten by values generated during the
+*> reduction.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension (min(M,N)-1)
+*> The superdiagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,M)
+*> If VECT = 'Q' or 'B', the m-by-m unitary matrix Q.
+*> If VECT = 'N' or 'P', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] PT
+*> \verbatim
+*> PT is COMPLEX array, dimension (LDPT,N)
+*> If VECT = 'P' or 'B', the n-by-n unitary matrix P'.
+*> If VECT = 'N' or 'Q', the array PT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the array PT.
+*> LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,NCC)
+*> On entry, an m-by-ncc matrix C.
+*> On exit, C is overwritten by Q**H*C.
+*> C is not referenced if NCC = 0.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C.
+*> LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
SUBROUTINE CGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
$ LDQ, PT, LDPT, C, LDC, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER VECT
@@ -16,91 +200,6 @@
$ Q( LDQ, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGBBRD reduces a complex general m-by-n band matrix A to real upper
-* bidiagonal form B by a unitary transformation: Q**H * A * P = B.
-*
-* The routine computes B, and optionally forms Q or P**H, or computes
-* Q**H*C for a given matrix C.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* Specifies whether or not the matrices Q and P**H are to be
-* formed.
-* = 'N': do not form Q or P**H;
-* = 'Q': form Q only;
-* = 'P': form P**H only;
-* = 'B': form both.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NCC (input) INTEGER
-* The number of columns of the matrix C. NCC >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals of the matrix A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals of the matrix A. KU >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the m-by-n band matrix A, stored in rows 1 to
-* KL+KU+1. The j-th column of A is stored in the j-th column of
-* the array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
-* On exit, A is overwritten by values generated during the
-* reduction.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KL+KU+1.
-*
-* D (output) REAL array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B.
-*
-* E (output) REAL array, dimension (min(M,N)-1)
-* The superdiagonal elements of the bidiagonal matrix B.
-*
-* Q (output) COMPLEX array, dimension (LDQ,M)
-* If VECT = 'Q' or 'B', the m-by-m unitary matrix Q.
-* If VECT = 'N' or 'P', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
-*
-* PT (output) COMPLEX array, dimension (LDPT,N)
-* If VECT = 'P' or 'B', the n-by-n unitary matrix P'.
-* If VECT = 'N' or 'Q', the array PT is not referenced.
-*
-* LDPT (input) INTEGER
-* The leading dimension of the array PT.
-* LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
-*
-* C (input/output) COMPLEX array, dimension (LDC,NCC)
-* On entry, an m-by-ncc matrix C.
-* On exit, C is overwritten by Q**H*C.
-* C is not referenced if NCC = 0.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C.
-* LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
-*
-* WORK (workspace) COMPLEX array, dimension (max(M,N))
-*
-* RWORK (workspace) REAL array, dimension (max(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgbcon.f b/SRC/cgbcon.f
index 913ed0cd..cac128c9 100644
--- a/SRC/cgbcon.f
+++ b/SRC/cgbcon.f
@@ -1,12 +1,148 @@
+*> \brief \b CGBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, KL, KU, LDAB, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL RWORK( * )
+* COMPLEX AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBCON estimates the reciprocal of the condition number of a complex
+*> general band matrix A, in either the 1-norm or the infinity-norm,
+*> using the LU factorization computed by CGBTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by CGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= N, row i of the matrix was
+*> interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
SUBROUTINE CGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -19,65 +155,6 @@
COMPLEX AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGBCON estimates the reciprocal of the condition number of a complex
-* general band matrix A, in either the 1-norm or the infinity-norm,
-* using the LU factorization computed by CGBTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by CGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= N, row i of the matrix was
-* interchanged with row IPIV(i).
-*
-* ANORM (input) REAL
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgbequ.f b/SRC/cgbequ.f
index 6d9e37f3..3b68c740 100644
--- a/SRC/cgbequ.f
+++ b/SRC/cgbequ.f
@@ -1,10 +1,155 @@
+*> \brief \b CGBEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL C( * ), R( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBEQU computes row and column scalings intended to equilibrate an
+*> M-by-N band matrix A and reduce its condition number. R returns the
+*> row scale factors and C the column scale factors, chosen to try to
+*> make the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number. Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
+*> column of A is stored in the j-th column of the array AB as
+*> follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> If INFO = 0, or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
SUBROUTINE CGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
$ AMAX, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, KL, KU, LDAB, M, N
@@ -15,74 +160,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CGBEQU computes row and column scalings intended to equilibrate an
-* M-by-N band matrix A and reduce its condition number. R returns the
-* row scale factors and C the column scale factors, chosen to try to
-* make the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
-*
-* R(i) and C(j) are restricted to be between SMLNUM = smallest safe
-* number and BIGNUM = largest safe number. Use of these scaling
-* factors is not guaranteed to reduce the condition number of A but
-* works well in practice.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The band matrix A, stored in rows 1 to KL+KU+1. The j-th
-* column of A is stored in the j-th column of the array AB as
-* follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* R (output) REAL array, dimension (M)
-* If INFO = 0, or INFO > M, R contains the row scale factors
-* for A.
-*
-* C (output) REAL array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
-*
-* ROWCND (output) REAL
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
-*
-* COLCND (output) REAL
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
-*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgbequb.f b/SRC/cgbequb.f
index e447ce42..9a03c533 100644
--- a/SRC/cgbequb.f
+++ b/SRC/cgbequb.f
@@ -1,99 +1,171 @@
- SUBROUTINE CGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
- REAL AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- REAL C( * ), R( * )
- COMPLEX AB( LDAB, * )
-* ..
-*
+*> \brief \b CGBEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL C( * ), R( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* CGBEQUB computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
-* the radix.
-*
-* R(i) and C(j) are restricted to be a power of the radix between
-* SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
-* of these scaling factors is not guaranteed to reduce the condition
-* number of A but works well in practice.
-*
-* This routine differs from CGEEQU by restricting the scaling factors
-* to a power of the radix. Baring over- and underflow, scaling by
-* these factors introduces no additional rounding errors. However, the
-* scaled entries' magnitured are no longer approximately 1 but lie
-* between sqrt(radix) and 1/sqrt(radix).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBEQUB computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
+*> the radix.
+*>
+*> R(i) and C(j) are restricted to be a power of the radix between
+*> SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
+*> of these scaling factors is not guaranteed to reduce the condition
+*> number of A but works well in practice.
+*>
+*> This routine differs from CGEEQU by restricting the scaling factors
+*> to a power of the radix. Baring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors. However, the
+*> scaled entries' magnitured are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) REAL array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) REAL array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) REAL
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup complexGBcomputational
*
-* COLCND (output) REAL
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE CGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+ $ AMAX, INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+ REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ REAL C( * ), R( * )
+ COMPLEX AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgbrfs.f b/SRC/cgbrfs.f
index c52cfb2f..30a82d97 100644
--- a/SRC/cgbrfs.f
+++ b/SRC/cgbrfs.f
@@ -1,13 +1,207 @@
+*> \brief \b CGBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
+* IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is banded, and provides
+*> error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by CGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CGBTRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CGBTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
SUBROUTINE CGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
$ IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -20,99 +214,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGBRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is banded, and provides
-* error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) COMPLEX array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by CGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CGBTRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CGBTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgbrfsx.f b/SRC/cgbrfsx.f
index 537bb620..2e53987c 100644
--- a/SRC/cgbrfsx.f
+++ b/SRC/cgbrfsx.f
@@ -1,19 +1,461 @@
+*> \brief \b CGBRFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBRFSX( TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND,
+* BERR, N_ERR_BNDS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, EQUED
+* INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, KL, KU, NRHS,
+* $ NPARAMS, N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CGBRFSX improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED, R
+*> and C below. In this case, the solution and error bounds returned
+*> are for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
SUBROUTINE CGBRFSX( TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND,
$ BERR, N_ERR_BNDS, ERR_BNDS_NORM,
$ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS, EQUED
INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, KL, KU, NRHS,
@@ -29,301 +471,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGBRFSX improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED, R
-* and C below. In this case, the solution and error bounds returned
-* are for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/cgbsv.f b/SRC/cgbsv.f
index 882491f5..dbd5f770 100644
--- a/SRC/cgbsv.f
+++ b/SRC/cgbsv.f
@@ -1,99 +1,173 @@
- SUBROUTINE CGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
+*> \brief <b> CGBSV computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK driver routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBSV computes the solution to a complex system of linear equations
+*> A * X = B, where A is a band matrix of order N with KL subdiagonals
+*> and KU superdiagonals, and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as A = L * U, where L is a product of permutation
+*> and unit lower triangular matrices with KL subdiagonals, and U is
+*> upper triangular with KL+KU superdiagonals. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX AB( LDAB, * ), B( LDB, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KL+KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+KL)
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* CGBSV computes the solution to a complex system of linear equations
-* A * X = B, where A is a band matrix of order N with KL subdiagonals
-* and KU superdiagonals, and X and B are N-by-NRHS matrices.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* The LU decomposition with partial pivoting and row interchanges is
-* used to factor A as A = L * U, where L is a product of permutation
-* and unit lower triangular matrices with KL subdiagonals, and U is
-* upper triangular with KL+KU superdiagonals. The factored form of A
-* is then used to solve the system of equations A * X = B.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup complexGBsolve
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KL+KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+KL)
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U because of fill-in resulting from the row interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U because of fill-in resulting from the row interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgbsvx.f b/SRC/cgbsvx.f
index 1a5d107a..e700d086 100644
--- a/SRC/cgbsvx.f
+++ b/SRC/cgbsvx.f
@@ -1,11 +1,374 @@
+*> \brief <b> CGBSVX computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
+* RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), C( * ), FERR( * ), R( * ),
+* $ RWORK( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBSVX uses the LU factorization to compute the solution to a complex
+*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
+*> where A is a band matrix of order N with KL subdiagonals and KU
+*> superdiagonals, and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed by this subroutine:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*> matrix A (after equilibration if FACT = 'E') as
+*> A = L * U,
+*> where L is a product of permutation and unit lower triangular
+*> matrices with KL subdiagonals, and U is upper triangular with
+*> KL+KU superdiagonals.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFB and IPIV contain the factored form of
+*> A. If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> AB, AFB, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AFB and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFB and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'F' and EQUED is not 'N', then A must have been
+*> equilibrated by the scaling factors in R and/or C. AB is not
+*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
+*> EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) COMPLEX array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains details of the LU factorization of the band matrix
+*> A, as computed by CGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
+*> the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFB is an output argument and on exit
+*> returns details of the LU factorization of A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFB is an output argument and on exit
+*> returns details of the LU factorization of the equilibrated
+*> matrix A (see the description of AB for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = L*U
+*> as computed by CGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*> to the original system of equations. Note that A and B are
+*> modified on exit if EQUED .ne. 'N', and the solution to the
+*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*> and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> On exit, RWORK(1) contains the reciprocal pivot growth
+*> factor norm(A)/norm(U). The "max absolute element" norm is
+*> used. If RWORK(1) is much less than 1, then the stability
+*> of the LU factorization of the (equilibrated) matrix A
+*> could be poor. This also means that the solution X, condition
+*> estimator RCOND, and forward error bound FERR could be
+*> unreliable. If factorization fails with 0<INFO<=N, then
+*> RWORK(1) contains the reciprocal pivot growth factor for the
+*> leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, so the solution and error bounds
+*> could not be computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBsolve
+*
+* =====================================================================
SUBROUTINE CGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
$ RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
@@ -20,245 +383,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGBSVX uses the LU factorization to compute the solution to a complex
-* system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-* where A is a band matrix of order N with KL subdiagonals and KU
-* superdiagonals, and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed by this subroutine:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-* matrix A (after equilibration if FACT = 'E') as
-* A = L * U,
-* where L is a product of permutation and unit lower triangular
-* matrices with KL subdiagonals, and U is upper triangular with
-* KL+KU superdiagonals.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFB and IPIV contain the factored form of
-* A. If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* AB, AFB, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AFB and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFB and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* If FACT = 'F' and EQUED is not 'N', then A must have been
-* equilibrated by the scaling factors in R and/or C. AB is not
-* modified if FACT = 'F' or 'N', or if FACT = 'E' and
-* EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input or output) COMPLEX array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains details of the LU factorization of the band matrix
-* A, as computed by CGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-* the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFB is an output argument and on exit
-* returns details of the LU factorization of A.
-*
-* If FACT = 'E', then AFB is an output argument and on exit
-* returns details of the LU factorization of the equilibrated
-* matrix A (see the description of AB for the form of the
-* equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = L*U
-* as computed by CGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-* to the original system of equations. Note that A and B are
-* modified on exit if EQUED .ne. 'N', and the solution to the
-* equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-* and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace/output) REAL array, dimension (N)
-* On exit, RWORK(1) contains the reciprocal pivot growth
-* factor norm(A)/norm(U). The "max absolute element" norm is
-* used. If RWORK(1) is much less than 1, then the stability
-* of the LU factorization of the (equilibrated) matrix A
-* could be poor. This also means that the solution X, condition
-* estimator RCOND, and forward error bound FERR could be
-* unreliable. If factorization fails with 0<INFO<=N, then
-* RWORK(1) contains the reciprocal pivot growth factor for the
-* leading INFO columns of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, so the solution and error bounds
-* could not be computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
* Moved setting of INFO = N+1 so INFO does not subsequently get
* overwritten. Sven, 17 Mar 05.
diff --git a/SRC/cgbsvxx.f b/SRC/cgbsvxx.f
index 87549320..740ebcec 100644
--- a/SRC/cgbsvxx.f
+++ b/SRC/cgbsvxx.f
@@ -1,19 +1,587 @@
+*> \brief <b> CGBSVXX computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBSVXX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
+* RCOND, RPVGRW, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CGBSVXX uses the LU factorization to compute the solution to a
+*> complex system of linear equations A * X = B, where A is an
+*> N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. CGBSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> CGBSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> CGBSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what CGBSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = P * L * U,
+*>
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is less
+*> than machine precision, the routine still goes on to solve for X
+*> and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'F' and EQUED is not 'N', then AB must have been
+*> equilibrated by the scaling factors in R and/or C. AB is not
+*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
+*> EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) REAL array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains details of the LU factorization of the band matrix
+*> A, as computed by CGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
+*> the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by SGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit
+*> if EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
+*> inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A. In SGESVX, this quantity is
+*> returned in WORK(1).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBsolve
+*
+* =====================================================================
SUBROUTINE CGBSVXX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
$ RCOND, RPVGRW, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
@@ -29,415 +597,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGBSVXX uses the LU factorization to compute the solution to a
-* complex system of linear equations A * X = B, where A is an
-* N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. CGBSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* CGBSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* CGBSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what CGBSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = P * L * U,
-*
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is less
-* than machine precision, the routine still goes on to solve for X
-* and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* If FACT = 'F' and EQUED is not 'N', then AB must have been
-* equilibrated by the scaling factors in R and/or C. AB is not
-* modified if FACT = 'F' or 'N', or if FACT = 'E' and
-* EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input or output) REAL array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains details of the LU factorization of the band matrix
-* A, as computed by CGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-* the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by SGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit
-* if EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
-* inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A. In SGESVX, this quantity is
-* returned in WORK(1).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/cgbtf2.f b/SRC/cgbtf2.f
index 951755d6..ed392456 100644
--- a/SRC/cgbtf2.f
+++ b/SRC/cgbtf2.f
@@ -1,88 +1,157 @@
- SUBROUTINE CGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX AB( LDAB, * )
-* ..
-*
+*> \brief \b CGBTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* CGBTF2 computes an LU factorization of a complex m-by-n band matrix
-* A using partial pivoting with row interchanges.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBTF2 computes an LU factorization of a complex m-by-n band matrix
+*> A using partial pivoting with row interchanges.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup complexGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U, because of fill-in resulting from the row
+*> interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U, because of fill-in resulting from the row
-* interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgbtrf.f b/SRC/cgbtrf.f
index 636d8be7..c6769f95 100644
--- a/SRC/cgbtrf.f
+++ b/SRC/cgbtrf.f
@@ -1,87 +1,156 @@
- SUBROUTINE CGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX AB( LDAB, * )
-* ..
-*
+*> \brief \b CGBTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* CGBTRF computes an LU factorization of a complex m-by-n band matrix A
-* using partial pivoting with row interchanges.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBTRF computes an LU factorization of a complex m-by-n band matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup complexGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U because of fill-in resulting from the row interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U because of fill-in resulting from the row interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgbtrs.f b/SRC/cgbtrs.f
index 040f16ba..157dd311 100644
--- a/SRC/cgbtrs.f
+++ b/SRC/cgbtrs.f
@@ -1,10 +1,139 @@
+*> \brief \b CGBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBTRS solves a system of linear equations
+*> A * X = B, A**T * X = B, or A**H * X = B
+*> with a general band matrix A using the LU factorization computed
+*> by CGBTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by CGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= N, row i of the matrix was
+*> interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
SUBROUTINE CGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,61 +144,6 @@
COMPLEX AB( LDAB, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CGBTRS solves a system of linear equations
-* A * X = B, A**T * X = B, or A**H * X = B
-* with a general band matrix A using the LU factorization computed
-* by CGBTRF.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by CGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= N, row i of the matrix was
-* interchanged with row IPIV(i).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgebak.f b/SRC/cgebak.f
index 429e4941..8821d856 100644
--- a/SRC/cgebak.f
+++ b/SRC/cgebak.f
@@ -1,10 +1,132 @@
+*> \brief \b CGEBAK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB, SIDE
+* INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+* REAL SCALE( * )
+* COMPLEX V( LDV, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEBAK forms the right or left eigenvectors of a complex general
+*> matrix by backward transformation on the computed eigenvectors of the
+*> balanced matrix output by CGEBAL.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the type of backward transformation required:
+*> = 'N', do nothing, return immediately;
+*> = 'P', do backward transformation for permutation only;
+*> = 'S', do backward transformation for scaling only;
+*> = 'B', do backward transformations for both permutation and
+*> scaling.
+*> JOB must be the same as the argument JOB supplied to CGEBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': V contains right eigenvectors;
+*> = 'L': V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrix V. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> The integers ILO and IHI determined by CGEBAL.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL array, dimension (N)
+*> Details of the permutation and scaling factors, as returned
+*> by CGEBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix V. M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,M)
+*> On entry, the matrix of right or left eigenvectors to be
+*> transformed, as returned by CHSEIN or CTREVC.
+*> On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEcomputational
+*
+* =====================================================================
SUBROUTINE CGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOB, SIDE
@@ -15,57 +137,6 @@
COMPLEX V( LDV, * )
* ..
*
-* Purpose
-* =======
-*
-* CGEBAK forms the right or left eigenvectors of a complex general
-* matrix by backward transformation on the computed eigenvectors of the
-* balanced matrix output by CGEBAL.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies the type of backward transformation required:
-* = 'N', do nothing, return immediately;
-* = 'P', do backward transformation for permutation only;
-* = 'S', do backward transformation for scaling only;
-* = 'B', do backward transformations for both permutation and
-* scaling.
-* JOB must be the same as the argument JOB supplied to CGEBAL.
-*
-* SIDE (input) CHARACTER*1
-* = 'R': V contains right eigenvectors;
-* = 'L': V contains left eigenvectors.
-*
-* N (input) INTEGER
-* The number of rows of the matrix V. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* The integers ILO and IHI determined by CGEBAL.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* SCALE (input) REAL array, dimension (N)
-* Details of the permutation and scaling factors, as returned
-* by CGEBAL.
-*
-* M (input) INTEGER
-* The number of columns of the matrix V. M >= 0.
-*
-* V (input/output) COMPLEX array, dimension (LDV,M)
-* On entry, the matrix of right or left eigenvectors to be
-* transformed, as returned by CHSEIN or CTREVC.
-* On exit, V is overwritten by the transformed eigenvectors.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgebal.f b/SRC/cgebal.f
index 762f887d..644b87eb 100644
--- a/SRC/cgebal.f
+++ b/SRC/cgebal.f
@@ -1,105 +1,152 @@
- SUBROUTINE CGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- CHARACTER JOB
- INTEGER IHI, ILO, INFO, LDA, N
-* ..
-* .. Array Arguments ..
- REAL SCALE( * )
- COMPLEX A( LDA, * )
-* ..
-*
+*> \brief \b CGEBAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL SCALE( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGEBAL balances a general complex matrix A. This involves, first,
-* permuting A by a similarity transformation to isolate eigenvalues
-* in the first 1 to ILO-1 and last IHI+1 to N elements on the
-* diagonal; and second, applying a diagonal similarity transformation
-* to rows and columns ILO to IHI to make the rows and columns as
-* close in norm as possible. Both steps are optional.
-*
-* Balancing may reduce the 1-norm of the matrix, and improve the
-* accuracy of the computed eigenvalues and/or eigenvectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEBAL balances a general complex matrix A. This involves, first,
+*> permuting A by a similarity transformation to isolate eigenvalues
+*> in the first 1 to ILO-1 and last IHI+1 to N elements on the
+*> diagonal; and second, applying a diagonal similarity transformation
+*> to rows and columns ILO to IHI to make the rows and columns as
+*> close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrix, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the operations to be performed on A:
-* = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0
-* for i = 1,...,N;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the input matrix A.
-* On exit, A is overwritten by the balanced matrix.
-* If JOB = 'N', A is not referenced.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the operations to be performed on A:
+*> = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0
+*> for i = 1,...,N;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ILO (output) INTEGER
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IHI (output) INTEGER
-* ILO and IHI are set to integers such that on exit
-* A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
-* If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \date November 2011
*
-* SCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied to
-* A. If P(j) is the index of the row and column interchanged
-* with row and column j and D(j) is the scaling factor
-* applied to row and column j, then
-* SCALE(j) = P(j) for j = 1,...,ILO-1
-* = D(j) for j = ILO,...,IHI
-* = P(j) for j = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> ILO (output) INTEGER
+*>
+*> IHI (output) INTEGER
+*> ILO and IHI are set to integers such that on exit
+*> A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
+*> If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*>
+*> SCALE (output) REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied to
+*> A. If P(j) is the index of the row and column interchanged
+*> with row and column j and D(j) is the scaling factor
+*> applied to row and column j, then
+*> SCALE(j) = P(j) for j = 1,...,ILO-1
+*> = D(j) for j = ILO,...,IHI
+*> = P(j) for j = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The permutations consist of row and column interchanges which put
+*> the matrix in the form
+*>
+*> ( T1 X Y )
+*> P A P = ( 0 B Z )
+*> ( 0 0 T2 )
+*>
+*> where T1 and T2 are upper triangular matrices whose eigenvalues lie
+*> along the diagonal. The column indices ILO and IHI mark the starting
+*> and ending columns of the submatrix B. Balancing consists of applying
+*> a diagonal similarity transformation inv(D) * B * D to make the
+*> 1-norms of each row of B and its corresponding column nearly equal.
+*> The output matrix is
+*>
+*> ( T1 X*D Y )
+*> ( 0 inv(D)*B*D inv(D)*Z ).
+*> ( 0 0 T2 )
+*>
+*> Information about the permutations P and the diagonal matrix D is
+*> returned in the vector SCALE.
+*>
+*> This subroutine is based on the EISPACK routine CBAL.
+*>
+*> Modified by Tzu-Yi Chen, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
*
-* The permutations consist of row and column interchanges which put
-* the matrix in the form
-*
-* ( T1 X Y )
-* P A P = ( 0 B Z )
-* ( 0 0 T2 )
-*
-* where T1 and T2 are upper triangular matrices whose eigenvalues lie
-* along the diagonal. The column indices ILO and IHI mark the starting
-* and ending columns of the submatrix B. Balancing consists of applying
-* a diagonal similarity transformation inv(D) * B * D to make the
-* 1-norms of each row of B and its corresponding column nearly equal.
-* The output matrix is
-*
-* ( T1 X*D Y )
-* ( 0 inv(D)*B*D inv(D)*Z ).
-* ( 0 0 T2 )
-*
-* Information about the permutations P and the diagonal matrix D is
-* returned in the vector SCALE.
-*
-* This subroutine is based on the EISPACK routine CBAL.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by Tzu-Yi Chen, Computer Science Division, University of
-* California at Berkeley, USA
+* .. Scalar Arguments ..
+ CHARACTER JOB
+ INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ REAL SCALE( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgebd2.f b/SRC/cgebd2.f
index 5778aba6..910ccfbd 100644
--- a/SRC/cgebd2.f
+++ b/SRC/cgebd2.f
@@ -1,126 +1,159 @@
- SUBROUTINE CGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
- COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
-* ..
-*
+*> \brief \b CGEBD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEBD2 reduces a complex general m by n matrix A to upper or lower
-* real bidiagonal form B by a unitary transformation: Q**H * A * P = B.
-*
-* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEBD2 reduces a complex general m by n matrix A to upper or lower
+*> real bidiagonal form B by a unitary transformation: Q**H * A * P = B.
+*>
+*> If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n general matrix to be reduced.
-* On exit,
-* if m >= n, the diagonal and the first superdiagonal are
-* overwritten with the upper bidiagonal matrix B; the
-* elements below the diagonal, with the array TAUQ, represent
-* the unitary matrix Q as a product of elementary
-* reflectors, and the elements above the first superdiagonal,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors;
-* if m < n, the diagonal and the first subdiagonal are
-* overwritten with the lower bidiagonal matrix B; the
-* elements below the first subdiagonal, with the array TAUQ,
-* represent the unitary matrix Q as a product of
-* elementary reflectors, and the elements above the diagonal,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) REAL array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B:
-* D(i) = A(i,i).
-*
-* E (output) REAL array, dimension (min(M,N)-1)
-* The off-diagonal elements of the bidiagonal matrix B:
-* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
-* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAUQ (output) COMPLEX array dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q. See Further Details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAUP (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix P. See Further Details.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (max(M,N))
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) REAL array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (min(M,N)-1)
+*> The off-diagonal elements of the bidiagonal matrix B:
+*> if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
+*> if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*>
+*> TAUQ (output) COMPLEX array dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Q. See Further Details.
+*>
+*> TAUP (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix P. See Further Details.
+*>
+*> WORK (workspace) COMPLEX array, dimension (max(M,N))
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> If m >= n,
+*>
+*> Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, and v and u are complex
+*> vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in
+*> A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in
+*> A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n,
+*>
+*> Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, v and u are complex vectors;
+*> v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
+*> u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The contents of A on exit are illustrated by the following examples:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
+*> ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
+*> ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
+*> ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
+*> ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
+*> ( v1 v2 v3 v4 v5 )
+*>
+*> where d and e denote diagonal and off-diagonal elements of B, vi
+*> denotes an element of the vector defining H(i), and ui an element of
+*> the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* If m >= n,
-*
-* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, and v and u are complex
-* vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in
-* A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in
-* A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n,
-*
-* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, v and u are complex vectors;
-* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
-* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The contents of A on exit are illustrated by the following examples:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
-* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
-* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
-* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
-* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
-* ( v1 v2 v3 v4 v5 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of B, vi
-* denotes an element of the vector defining H(i), and ui an element of
-* the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+ COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgebrd.f b/SRC/cgebrd.f
index 0e0533da..a638c85b 100644
--- a/SRC/cgebrd.f
+++ b/SRC/cgebrd.f
@@ -1,139 +1,174 @@
- SUBROUTINE CGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
- COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b CGEBRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEBRD reduces a general complex M-by-N matrix A to upper or lower
-* bidiagonal form B by a unitary transformation: Q**H * A * P = B.
-*
-* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEBRD reduces a general complex M-by-N matrix A to upper or lower
+*> bidiagonal form B by a unitary transformation: Q**H * A * P = B.
+*>
+*> If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N general matrix to be reduced.
-* On exit,
-* if m >= n, the diagonal and the first superdiagonal are
-* overwritten with the upper bidiagonal matrix B; the
-* elements below the diagonal, with the array TAUQ, represent
-* the unitary matrix Q as a product of elementary
-* reflectors, and the elements above the first superdiagonal,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors;
-* if m < n, the diagonal and the first subdiagonal are
-* overwritten with the lower bidiagonal matrix B; the
-* elements below the first subdiagonal, with the array TAUQ,
-* represent the unitary matrix Q as a product of
-* elementary reflectors, and the elements above the diagonal,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) REAL array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B:
-* D(i) = A(i,i).
-*
-* E (output) REAL array, dimension (min(M,N)-1)
-* The off-diagonal elements of the bidiagonal matrix B:
-* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
-* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
-*
-* TAUQ (output) COMPLEX array dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q. See Further Details.
-*
-* TAUP (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix P. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,M,N).
-* For optimum performance LWORK >= (M+N)*NB, where NB
-* is the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) REAL array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (min(M,N)-1)
+*> The off-diagonal elements of the bidiagonal matrix B:
+*> if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
+*> if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*>
+*> TAUQ (output) COMPLEX array dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Q. See Further Details.
+*>
+*> TAUP (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix P. See Further Details.
+*>
+*> WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The length of the array WORK. LWORK >= max(1,M,N).
+*> For optimum performance LWORK >= (M+N)*NB, where NB
+*> is the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> If m >= n,
+*>
+*> Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, and v and u are complex
+*> vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in
+*> A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in
+*> A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n,
+*>
+*> Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, and v and u are complex
+*> vectors; v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in
+*> A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The contents of A on exit are illustrated by the following examples:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
+*> ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
+*> ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
+*> ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
+*> ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
+*> ( v1 v2 v3 v4 v5 )
+*>
+*> where d and e denote diagonal and off-diagonal elements of B, vi
+*> denotes an element of the vector defining H(i), and ui an element of
+*> the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
+ $ INFO )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* If m >= n,
-*
-* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, and v and u are complex
-* vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in
-* A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in
-* A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n,
-*
-* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, and v and u are complex
-* vectors; v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in
-* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The contents of A on exit are illustrated by the following examples:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
-* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
-* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
-* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
-* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
-* ( v1 v2 v3 v4 v5 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of B, vi
-* denotes an element of the vector defining H(i), and ui an element of
-* the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+ COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgecon.f b/SRC/cgecon.f
index 5918cd9d..4e2f7aa5 100644
--- a/SRC/cgecon.f
+++ b/SRC/cgecon.f
@@ -1,12 +1,125 @@
+*> \brief \b CGECON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, LDA, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGECON estimates the reciprocal of the condition number of a general
+*> complex matrix A, in either the 1-norm or the infinity-norm, using
+*> the LU factorization computed by CGETRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by CGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEcomputational
+*
+* =====================================================================
SUBROUTINE CGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,52 +131,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGECON estimates the reciprocal of the condition number of a general
-* complex matrix A, in either the 1-norm or the infinity-norm, using
-* the LU factorization computed by CGETRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by CGETRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* ANORM (input) REAL
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgeequ.f b/SRC/cgeequ.f
index 7b3b2932..746ba370 100644
--- a/SRC/cgeequ.f
+++ b/SRC/cgeequ.f
@@ -1,10 +1,141 @@
+*> \brief \b CGEEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL C( * ), R( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEEQU computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number. Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix whose equilibration factors are
+*> to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEcomputational
+*
+* =====================================================================
SUBROUTINE CGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, M, N
@@ -15,66 +146,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CGEEQU computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
-*
-* R(i) and C(j) are restricted to be between SMLNUM = smallest safe
-* number and BIGNUM = largest safe number. Use of these scaling
-* factors is not guaranteed to reduce the condition number of A but
-* works well in practice.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix whose equilibration factors are
-* to be computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* R (output) REAL array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
-*
-* C (output) REAL array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
-*
-* ROWCND (output) REAL
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
-*
-* COLCND (output) REAL
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
-*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgeequb.f b/SRC/cgeequb.f
index b8dd2dd5..ef0c3cc9 100644
--- a/SRC/cgeequb.f
+++ b/SRC/cgeequb.f
@@ -1,91 +1,157 @@
- SUBROUTINE CGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
- REAL AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- REAL C( * ), R( * )
- COMPLEX A( LDA, * )
-* ..
-*
+*> \brief \b CGEEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL C( * ), R( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGEEQUB computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
-* the radix.
-*
-* R(i) and C(j) are restricted to be a power of the radix between
-* SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
-* of these scaling factors is not guaranteed to reduce the condition
-* number of A but works well in practice.
-*
-* This routine differs from CGEEQU by restricting the scaling factors
-* to a power of the radix. Baring over- and underflow, scaling by
-* these factors introduces no additional rounding errors. However, the
-* scaled entries' magnitured are no longer approximately 1 but lie
-* between sqrt(radix) and 1/sqrt(radix).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEEQUB computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
+*> the radix.
+*>
+*> R(i) and C(j) are restricted to be a power of the radix between
+*> SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
+*> of these scaling factors is not guaranteed to reduce the condition
+*> number of A but works well in practice.
+*>
+*> This routine differs from CGEEQU by restricting the scaling factors
+*> to a power of the radix. Baring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors. However, the
+*> scaled entries' magnitured are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix whose equilibration factors are
-* to be computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix whose equilibration factors are
+*> to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) REAL array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) REAL array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) REAL
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup complexGEcomputational
*
-* COLCND (output) REAL
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE CGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+ $ INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+ REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ REAL C( * ), R( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgees.f b/SRC/cgees.f
index 47480b35..4d1b2426 100644
--- a/SRC/cgees.f
+++ b/SRC/cgees.f
@@ -1,10 +1,199 @@
+*> \brief <b> CGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS,
+* LDVS, WORK, LWORK, RWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVS, SORT
+* INTEGER INFO, LDA, LDVS, LWORK, N, SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), VS( LDVS, * ), W( * ), WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELECT
+* EXTERNAL SELECT
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEES computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues, the Schur form T, and, optionally, the matrix of Schur
+*> vectors Z. This gives the Schur factorization A = Z*T*(Z**H).
+*>
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> Schur form so that selected eigenvalues are at the top left.
+*> The leading columns of Z then form an orthonormal basis for the
+*> invariant subspace corresponding to the selected eigenvalues.
+
+*> A complex matrix is in Schur form if it is upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVS
+*> \verbatim
+*> JOBVS is CHARACTER*1
+*> = 'N': Schur vectors are not computed;
+*> = 'V': Schur vectors are computed.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the Schur form.
+*> = 'N': Eigenvalues are not ordered:
+*> = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is procedure) LOGICAL FUNCTION of one COMPLEX argument
+*> SELECT must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'S', SELECT is used to select eigenvalues to order
+*> to the top left of the Schur form.
+*> IF SORT = 'N', SELECT is not referenced.
+*> The eigenvalue W(j) is selected if SELECT(W(j)) is true.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten by its Schur form T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues for which
+*> SELECT is true.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> W contains the computed eigenvalues, in the same order that
+*> they appear on the diagonal of the output Schur form T.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX array, dimension (LDVS,N)
+*> If JOBVS = 'V', VS contains the unitary matrix Z of Schur
+*> vectors.
+*> If JOBVS = 'N', VS is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> The leading dimension of the array VS. LDVS >= 1; if
+*> JOBVS = 'V', LDVS >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is
+*> <= N: the QR algorithm failed to compute all the
+*> eigenvalues; elements 1:ILO-1 and i+1:N of W
+*> contain those eigenvalues which have converged;
+*> if JOBVS = 'V', VS contains the matrix which
+*> reduces A to its partially converged Schur form.
+*> = N+1: the eigenvalues could not be reordered because
+*> some eigenvalues were too close to separate (the
+*> problem is very ill-conditioned);
+*> = N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Schur form no longer satisfy
+*> SELECT = .TRUE.. This could also be caused by
+*> underflow due to scaling.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+* =====================================================================
SUBROUTINE CGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS,
$ LDVS, WORK, LWORK, RWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVS, SORT
@@ -20,103 +209,6 @@
EXTERNAL SELECT
* ..
*
-* Purpose
-* =======
-*
-* CGEES computes for an N-by-N complex nonsymmetric matrix A, the
-* eigenvalues, the Schur form T, and, optionally, the matrix of Schur
-* vectors Z. This gives the Schur factorization A = Z*T*(Z**H).
-*
-* Optionally, it also orders the eigenvalues on the diagonal of the
-* Schur form so that selected eigenvalues are at the top left.
-* The leading columns of Z then form an orthonormal basis for the
-* invariant subspace corresponding to the selected eigenvalues.
-
-* A complex matrix is in Schur form if it is upper triangular.
-*
-* Arguments
-* =========
-*
-* JOBVS (input) CHARACTER*1
-* = 'N': Schur vectors are not computed;
-* = 'V': Schur vectors are computed.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the Schur form.
-* = 'N': Eigenvalues are not ordered:
-* = 'S': Eigenvalues are ordered (see SELECT).
-*
-* SELECT (external procedure) LOGICAL FUNCTION of one COMPLEX argument
-* SELECT must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'S', SELECT is used to select eigenvalues to order
-* to the top left of the Schur form.
-* IF SORT = 'N', SELECT is not referenced.
-* The eigenvalue W(j) is selected if SELECT(W(j)) is true.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten by its Schur form T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues for which
-* SELECT is true.
-*
-* W (output) COMPLEX array, dimension (N)
-* W contains the computed eigenvalues, in the same order that
-* they appear on the diagonal of the output Schur form T.
-*
-* VS (output) COMPLEX array, dimension (LDVS,N)
-* If JOBVS = 'V', VS contains the unitary matrix Z of Schur
-* vectors.
-* If JOBVS = 'N', VS is not referenced.
-*
-* LDVS (input) INTEGER
-* The leading dimension of the array VS. LDVS >= 1; if
-* JOBVS = 'V', LDVS >= N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is
-* <= N: the QR algorithm failed to compute all the
-* eigenvalues; elements 1:ILO-1 and i+1:N of W
-* contain those eigenvalues which have converged;
-* if JOBVS = 'V', VS contains the matrix which
-* reduces A to its partially converged Schur form.
-* = N+1: the eigenvalues could not be reordered because
-* some eigenvalues were too close to separate (the
-* problem is very ill-conditioned);
-* = N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Schur form no longer satisfy
-* SELECT = .TRUE.. This could also be caused by
-* underflow due to scaling.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgeesx.f b/SRC/cgeesx.f
index e49e5251..a6983984 100644
--- a/SRC/cgeesx.f
+++ b/SRC/cgeesx.f
@@ -1,11 +1,241 @@
+*> \brief <b> CGEESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM, W,
+* VS, LDVS, RCONDE, RCONDV, WORK, LWORK, RWORK,
+* BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVS, SENSE, SORT
+* INTEGER INFO, LDA, LDVS, LWORK, N, SDIM
+* REAL RCONDE, RCONDV
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), VS( LDVS, * ), W( * ), WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELECT
+* EXTERNAL SELECT
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEESX computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues, the Schur form T, and, optionally, the matrix of Schur
+*> vectors Z. This gives the Schur factorization A = Z*T*(Z**H).
+*>
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> Schur form so that selected eigenvalues are at the top left;
+*> computes a reciprocal condition number for the average of the
+*> selected eigenvalues (RCONDE); and computes a reciprocal condition
+*> number for the right invariant subspace corresponding to the
+*> selected eigenvalues (RCONDV). The leading columns of Z form an
+*> orthonormal basis for this invariant subspace.
+*>
+*> For further explanation of the reciprocal condition numbers RCONDE
+*> and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
+*> these quantities are called s and sep respectively).
+*>
+*> A complex matrix is in Schur form if it is upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVS
+*> \verbatim
+*> JOBVS is CHARACTER*1
+*> = 'N': Schur vectors are not computed;
+*> = 'V': Schur vectors are computed.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is procedure) LOGICAL FUNCTION of one COMPLEX argument
+*> SELECT must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'S', SELECT is used to select eigenvalues to order
+*> to the top left of the Schur form.
+*> If SORT = 'N', SELECT is not referenced.
+*> An eigenvalue W(j) is selected if SELECT(W(j)) is true.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': None are computed;
+*> = 'E': Computed for average of selected eigenvalues only;
+*> = 'V': Computed for selected right invariant subspace only;
+*> = 'B': Computed for both.
+*> If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A is overwritten by its Schur form T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues for which
+*> SELECT is true.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> W contains the computed eigenvalues, in the same order
+*> that they appear on the diagonal of the output Schur form T.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX array, dimension (LDVS,N)
+*> If JOBVS = 'V', VS contains the unitary matrix Z of Schur
+*> vectors.
+*> If JOBVS = 'N', VS is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> The leading dimension of the array VS. LDVS >= 1, and if
+*> JOBVS = 'V', LDVS >= N.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL
+*> If SENSE = 'E' or 'B', RCONDE contains the reciprocal
+*> condition number for the average of the selected eigenvalues.
+*> Not referenced if SENSE = 'N' or 'V'.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL
+*> If SENSE = 'V' or 'B', RCONDV contains the reciprocal
+*> condition number for the selected right invariant subspace.
+*> Not referenced if SENSE = 'N' or 'E'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> Also, if SENSE = 'E' or 'V' or 'B', LWORK >= 2*SDIM*(N-SDIM),
+*> where SDIM is the number of selected eigenvalues computed by
+*> this routine. Note that 2*SDIM*(N-SDIM) <= N*N/2. Note also
+*> that an error is only returned if LWORK < max(1,2*N), but if
+*> SENSE = 'E' or 'V' or 'B' this may not be large enough.
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates upper bound on the optimal size of the
+*> array WORK, returns this value as the first entry of the WORK
+*> array, and no error message related to LWORK is issued by
+*> XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is
+*> <= N: the QR algorithm failed to compute all the
+*> eigenvalues; elements 1:ILO-1 and i+1:N of W
+*> contain those eigenvalues which have converged; if
+*> JOBVS = 'V', VS contains the transformation which
+*> reduces A to its partially converged Schur form.
+*> = N+1: the eigenvalues could not be reordered because some
+*> eigenvalues were too close to separate (the problem
+*> is very ill-conditioned);
+*> = N+2: after reordering, roundoff changed values of some
+*> complex eigenvalues so that leading eigenvalues in
+*> the Schur form no longer satisfy SELECT=.TRUE. This
+*> could also be caused by underflow due to scaling.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+* =====================================================================
SUBROUTINE CGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM, W,
$ VS, LDVS, RCONDE, RCONDV, WORK, LWORK, RWORK,
$ BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK eigen routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVS, SENSE, SORT
@@ -22,133 +252,6 @@
EXTERNAL SELECT
* ..
*
-* Purpose
-* =======
-*
-* CGEESX computes for an N-by-N complex nonsymmetric matrix A, the
-* eigenvalues, the Schur form T, and, optionally, the matrix of Schur
-* vectors Z. This gives the Schur factorization A = Z*T*(Z**H).
-*
-* Optionally, it also orders the eigenvalues on the diagonal of the
-* Schur form so that selected eigenvalues are at the top left;
-* computes a reciprocal condition number for the average of the
-* selected eigenvalues (RCONDE); and computes a reciprocal condition
-* number for the right invariant subspace corresponding to the
-* selected eigenvalues (RCONDV). The leading columns of Z form an
-* orthonormal basis for this invariant subspace.
-*
-* For further explanation of the reciprocal condition numbers RCONDE
-* and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
-* these quantities are called s and sep respectively).
-*
-* A complex matrix is in Schur form if it is upper triangular.
-*
-* Arguments
-* =========
-*
-* JOBVS (input) CHARACTER*1
-* = 'N': Schur vectors are not computed;
-* = 'V': Schur vectors are computed.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELECT).
-*
-* SELECT (external procedure) LOGICAL FUNCTION of one COMPLEX argument
-* SELECT must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'S', SELECT is used to select eigenvalues to order
-* to the top left of the Schur form.
-* If SORT = 'N', SELECT is not referenced.
-* An eigenvalue W(j) is selected if SELECT(W(j)) is true.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': None are computed;
-* = 'E': Computed for average of selected eigenvalues only;
-* = 'V': Computed for selected right invariant subspace only;
-* = 'B': Computed for both.
-* If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the N-by-N matrix A.
-* On exit, A is overwritten by its Schur form T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues for which
-* SELECT is true.
-*
-* W (output) COMPLEX array, dimension (N)
-* W contains the computed eigenvalues, in the same order
-* that they appear on the diagonal of the output Schur form T.
-*
-* VS (output) COMPLEX array, dimension (LDVS,N)
-* If JOBVS = 'V', VS contains the unitary matrix Z of Schur
-* vectors.
-* If JOBVS = 'N', VS is not referenced.
-*
-* LDVS (input) INTEGER
-* The leading dimension of the array VS. LDVS >= 1, and if
-* JOBVS = 'V', LDVS >= N.
-*
-* RCONDE (output) REAL
-* If SENSE = 'E' or 'B', RCONDE contains the reciprocal
-* condition number for the average of the selected eigenvalues.
-* Not referenced if SENSE = 'N' or 'V'.
-*
-* RCONDV (output) REAL
-* If SENSE = 'V' or 'B', RCONDV contains the reciprocal
-* condition number for the selected right invariant subspace.
-* Not referenced if SENSE = 'N' or 'E'.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* Also, if SENSE = 'E' or 'V' or 'B', LWORK >= 2*SDIM*(N-SDIM),
-* where SDIM is the number of selected eigenvalues computed by
-* this routine. Note that 2*SDIM*(N-SDIM) <= N*N/2. Note also
-* that an error is only returned if LWORK < max(1,2*N), but if
-* SENSE = 'E' or 'V' or 'B' this may not be large enough.
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates upper bound on the optimal size of the
-* array WORK, returns this value as the first entry of the WORK
-* array, and no error message related to LWORK is issued by
-* XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is
-* <= N: the QR algorithm failed to compute all the
-* eigenvalues; elements 1:ILO-1 and i+1:N of W
-* contain those eigenvalues which have converged; if
-* JOBVS = 'V', VS contains the transformation which
-* reduces A to its partially converged Schur form.
-* = N+1: the eigenvalues could not be reordered because some
-* eigenvalues were too close to separate (the problem
-* is very ill-conditioned);
-* = N+2: after reordering, roundoff changed values of some
-* complex eigenvalues so that leading eigenvalues in
-* the Schur form no longer satisfy SELECT=.TRUE. This
-* could also be caused by underflow due to scaling.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgeev.f b/SRC/cgeev.f
index 3652a6ac..c1c27639 100644
--- a/SRC/cgeev.f
+++ b/SRC/cgeev.f
@@ -1,10 +1,179 @@
+*> \brief <b> CGEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEEV computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> The right eigenvector v(j) of A satisfies
+*> A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*> u(j)**H * A = lambda(j) * u(j)**H
+*> where u(j)**H denotes the conjugate transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': left eigenvectors of A are not computed;
+*> = 'V': left eigenvectors of are computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': right eigenvectors of A are not computed;
+*> = 'V': right eigenvectors of A are computed.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> W contains the computed eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order
+*> as their eigenvalues.
+*> If JOBVL = 'N', VL is not referenced.
+*> u(j) = VL(:,j), the j-th column of VL.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; if
+*> JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order
+*> as their eigenvalues.
+*> If JOBVR = 'N', VR is not referenced.
+*> v(j) = VR(:,j), the j-th column of VR.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1; if
+*> JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the QR algorithm failed to compute all the
+*> eigenvalues, and no eigenvectors have been computed;
+*> elements and i+1:N of W contain eigenvalues which have
+*> converged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+* =====================================================================
SUBROUTINE CGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,
$ WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -16,90 +185,6 @@
$ W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGEEV computes for an N-by-N complex nonsymmetric matrix A, the
-* eigenvalues and, optionally, the left and/or right eigenvectors.
-*
-* The right eigenvector v(j) of A satisfies
-* A * v(j) = lambda(j) * v(j)
-* where lambda(j) is its eigenvalue.
-* The left eigenvector u(j) of A satisfies
-* u(j)**H * A = lambda(j) * u(j)**H
-* where u(j)**H denotes the conjugate transpose of u(j).
-*
-* The computed eigenvectors are normalized to have Euclidean norm
-* equal to 1 and largest component real.
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': left eigenvectors of A are not computed;
-* = 'V': left eigenvectors of are computed.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': right eigenvectors of A are not computed;
-* = 'V': right eigenvectors of A are computed.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) COMPLEX array, dimension (N)
-* W contains the computed eigenvalues.
-*
-* VL (output) COMPLEX array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order
-* as their eigenvalues.
-* If JOBVL = 'N', VL is not referenced.
-* u(j) = VL(:,j), the j-th column of VL.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; if
-* JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order
-* as their eigenvalues.
-* If JOBVR = 'N', VR is not referenced.
-* v(j) = VR(:,j), the j-th column of VR.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1; if
-* JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the QR algorithm failed to compute all the
-* eigenvalues, and no eigenvectors have been computed;
-* elements and i+1:N of W contain eigenvalues which have
-* converged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgeevx.f b/SRC/cgeevx.f
index d7ee57d3..d7e1a782 100644
--- a/SRC/cgeevx.f
+++ b/SRC/cgeevx.f
@@ -1,11 +1,289 @@
+*> \brief <b> CGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, W, VL,
+* LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM, RCONDE,
+* RCONDV, WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER BALANC, JOBVL, JOBVR, SENSE
+* INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
+* REAL ABNRM
+* ..
+* .. Array Arguments ..
+* REAL RCONDE( * ), RCONDV( * ), RWORK( * ),
+* $ SCALE( * )
+* COMPLEX A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEEVX computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> Optionally also, it computes a balancing transformation to improve
+*> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
+*> SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
+*> (RCONDE), and reciprocal condition numbers for the right
+*> eigenvectors (RCONDV).
+*>
+*> The right eigenvector v(j) of A satisfies
+*> A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*> u(j)**H * A = lambda(j) * u(j)**H
+*> where u(j)**H denotes the conjugate transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*>
+*> Balancing a matrix means permuting the rows and columns to make it
+*> more nearly upper triangular, and applying a diagonal similarity
+*> transformation D * A * D**(-1), where D is a diagonal matrix, to
+*> make its rows and columns closer in norm and the condition numbers
+*> of its eigenvalues and eigenvectors smaller. The computed
+*> reciprocal condition numbers correspond to the balanced matrix.
+*> Permuting rows and columns will not change the condition numbers
+*> (in exact arithmetic) but diagonal scaling will. For further
+*> explanation of balancing, see section 4.10.2 of the LAPACK
+*> Users' Guide.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER*1
+*> Indicates how the input matrix should be diagonally scaled
+*> and/or permuted to improve the conditioning of its
+*> eigenvalues.
+*> = 'N': Do not diagonally scale or permute;
+*> = 'P': Perform permutations to make the matrix more nearly
+*> upper triangular. Do not diagonally scale;
+*> = 'S': Diagonally scale the matrix, ie. replace A by
+*> D*A*D**(-1), where D is a diagonal matrix chosen
+*> to make the rows and columns of A more equal in
+*> norm. Do not permute;
+*> = 'B': Both diagonally scale and permute A.
+*> \endverbatim
+*> \verbatim
+*> Computed reciprocal condition numbers will be for the matrix
+*> after balancing and/or permuting. Permuting does not change
+*> condition numbers (in exact arithmetic), but balancing does.
+*> \endverbatim
+*>
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': left eigenvectors of A are not computed;
+*> = 'V': left eigenvectors of A are computed.
+*> If SENSE = 'E' or 'B', JOBVL must = 'V'.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': right eigenvectors of A are not computed;
+*> = 'V': right eigenvectors of A are computed.
+*> If SENSE = 'E' or 'B', JOBVR must = 'V'.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': None are computed;
+*> = 'E': Computed for eigenvalues only;
+*> = 'V': Computed for right eigenvectors only;
+*> = 'B': Computed for eigenvalues and right eigenvectors.
+*> \endverbatim
+*> \verbatim
+*> If SENSE = 'E' or 'B', both left and right eigenvectors
+*> must also be computed (JOBVL = 'V' and JOBVR = 'V').
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten. If JOBVL = 'V' or
+*> JOBVR = 'V', A contains the Schur form of the balanced
+*> version of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> W contains the computed eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order
+*> as their eigenvalues.
+*> If JOBVL = 'N', VL is not referenced.
+*> u(j) = VL(:,j), the j-th column of VL.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; if
+*> JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order
+*> as their eigenvalues.
+*> If JOBVR = 'N', VR is not referenced.
+*> v(j) = VR(:,j), the j-th column of VR.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1; if
+*> JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are integer values determined when A was
+*> balanced. The balanced A(i,j) = 0 if I > J and
+*> J = 1,...,ILO-1 or I = IHI+1,...,N.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> when balancing A. If P(j) is the index of the row and column
+*> interchanged with row and column j, and D(j) is the scaling
+*> factor applied to row and column j, then
+*> SCALE(J) = P(J), for J = 1,...,ILO-1
+*> = D(J), for J = ILO,...,IHI
+*> = P(J) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] ABNRM
+*> \verbatim
+*> ABNRM is REAL
+*> The one-norm of the balanced matrix (the maximum
+*> of the sum of absolute values of elements of any column).
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension (N)
+*> RCONDE(j) is the reciprocal condition number of the j-th
+*> eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension (N)
+*> RCONDV(j) is the reciprocal condition number of the j-th
+*> right eigenvector.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. If SENSE = 'N' or 'E',
+*> LWORK >= max(1,2*N), and if SENSE = 'V' or 'B',
+*> LWORK >= N*N+2*N.
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the QR algorithm failed to compute all the
+*> eigenvalues, and no eigenvectors or condition numbers
+*> have been computed; elements 1:ILO-1 and i+1:N of W
+*> contain eigenvalues which have converged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+* =====================================================================
SUBROUTINE CGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, W, VL,
$ LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM, RCONDE,
$ RCONDV, WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER BALANC, JOBVL, JOBVR, SENSE
@@ -19,170 +297,6 @@
$ W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGEEVX computes for an N-by-N complex nonsymmetric matrix A, the
-* eigenvalues and, optionally, the left and/or right eigenvectors.
-*
-* Optionally also, it computes a balancing transformation to improve
-* the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
-* SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
-* (RCONDE), and reciprocal condition numbers for the right
-* eigenvectors (RCONDV).
-*
-* The right eigenvector v(j) of A satisfies
-* A * v(j) = lambda(j) * v(j)
-* where lambda(j) is its eigenvalue.
-* The left eigenvector u(j) of A satisfies
-* u(j)**H * A = lambda(j) * u(j)**H
-* where u(j)**H denotes the conjugate transpose of u(j).
-*
-* The computed eigenvectors are normalized to have Euclidean norm
-* equal to 1 and largest component real.
-*
-* Balancing a matrix means permuting the rows and columns to make it
-* more nearly upper triangular, and applying a diagonal similarity
-* transformation D * A * D**(-1), where D is a diagonal matrix, to
-* make its rows and columns closer in norm and the condition numbers
-* of its eigenvalues and eigenvectors smaller. The computed
-* reciprocal condition numbers correspond to the balanced matrix.
-* Permuting rows and columns will not change the condition numbers
-* (in exact arithmetic) but diagonal scaling will. For further
-* explanation of balancing, see section 4.10.2 of the LAPACK
-* Users' Guide.
-*
-* Arguments
-* =========
-*
-* BALANC (input) CHARACTER*1
-* Indicates how the input matrix should be diagonally scaled
-* and/or permuted to improve the conditioning of its
-* eigenvalues.
-* = 'N': Do not diagonally scale or permute;
-* = 'P': Perform permutations to make the matrix more nearly
-* upper triangular. Do not diagonally scale;
-* = 'S': Diagonally scale the matrix, ie. replace A by
-* D*A*D**(-1), where D is a diagonal matrix chosen
-* to make the rows and columns of A more equal in
-* norm. Do not permute;
-* = 'B': Both diagonally scale and permute A.
-*
-* Computed reciprocal condition numbers will be for the matrix
-* after balancing and/or permuting. Permuting does not change
-* condition numbers (in exact arithmetic), but balancing does.
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': left eigenvectors of A are not computed;
-* = 'V': left eigenvectors of A are computed.
-* If SENSE = 'E' or 'B', JOBVL must = 'V'.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': right eigenvectors of A are not computed;
-* = 'V': right eigenvectors of A are computed.
-* If SENSE = 'E' or 'B', JOBVR must = 'V'.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': None are computed;
-* = 'E': Computed for eigenvalues only;
-* = 'V': Computed for right eigenvectors only;
-* = 'B': Computed for eigenvalues and right eigenvectors.
-*
-* If SENSE = 'E' or 'B', both left and right eigenvectors
-* must also be computed (JOBVL = 'V' and JOBVR = 'V').
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten. If JOBVL = 'V' or
-* JOBVR = 'V', A contains the Schur form of the balanced
-* version of the matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) COMPLEX array, dimension (N)
-* W contains the computed eigenvalues.
-*
-* VL (output) COMPLEX array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order
-* as their eigenvalues.
-* If JOBVL = 'N', VL is not referenced.
-* u(j) = VL(:,j), the j-th column of VL.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; if
-* JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order
-* as their eigenvalues.
-* If JOBVR = 'N', VR is not referenced.
-* v(j) = VR(:,j), the j-th column of VR.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1; if
-* JOBVR = 'V', LDVR >= N.
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are integer values determined when A was
-* balanced. The balanced A(i,j) = 0 if I > J and
-* J = 1,...,ILO-1 or I = IHI+1,...,N.
-*
-* SCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* when balancing A. If P(j) is the index of the row and column
-* interchanged with row and column j, and D(j) is the scaling
-* factor applied to row and column j, then
-* SCALE(J) = P(J), for J = 1,...,ILO-1
-* = D(J), for J = ILO,...,IHI
-* = P(J) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* ABNRM (output) REAL
-* The one-norm of the balanced matrix (the maximum
-* of the sum of absolute values of elements of any column).
-*
-* RCONDE (output) REAL array, dimension (N)
-* RCONDE(j) is the reciprocal condition number of the j-th
-* eigenvalue.
-*
-* RCONDV (output) REAL array, dimension (N)
-* RCONDV(j) is the reciprocal condition number of the j-th
-* right eigenvector.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. If SENSE = 'N' or 'E',
-* LWORK >= max(1,2*N), and if SENSE = 'V' or 'B',
-* LWORK >= N*N+2*N.
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the QR algorithm failed to compute all the
-* eigenvalues, and no eigenvectors or condition numbers
-* have been computed; elements 1:ILO-1 and i+1:N of W
-* contain eigenvalues which have converged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgegs.f b/SRC/cgegs.f
index fc504296..ff5105ad 100644
--- a/SRC/cgegs.f
+++ b/SRC/cgegs.f
@@ -1,11 +1,228 @@
+*> \brief <b> CGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHA, BETA,
+* VSL, LDVSL, VSR, LDVSR, WORK, LWORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine CGGES.
+*>
+*> CGEGS computes the eigenvalues, Schur form, and, optionally, the
+*> left and or/right Schur vectors of a complex matrix pair (A,B).
+*> Given two square matrices A and B, the generalized Schur
+*> factorization has the form
+*>
+*> A = Q*S*Z**H, B = Q*T*Z**H
+*>
+*> where Q and Z are unitary matrices and S and T are upper triangular.
+*> The columns of Q are the left Schur vectors
+*> and the columns of Z are the right Schur vectors.
+*>
+*> If only the eigenvalues of (A,B) are needed, the driver routine
+*> CGEGV should be used instead. See CGEGV for a description of the
+*> eigenvalues of the generalized nonsymmetric eigenvalue problem
+*> (GNEP).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors (returned in VSL).
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors (returned in VSR).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the matrix A.
+*> On exit, the upper triangular matrix S from the generalized
+*> Schur factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the matrix B.
+*> On exit, the upper triangular matrix T from the generalized
+*> Schur factorization.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> The complex scalars alpha that define the eigenvalues of
+*> GNEP. ALPHA(j) = S(j,j), the diagonal element of the Schur
+*> form of A.
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> The non-negative real scalars beta that define the
+*> eigenvalues of GNEP. BETA(j) = T(j,j), the diagonal element
+*> of the triangular factor T.
+*> \endverbatim
+*> \verbatim
+*> Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
+*> represent the j-th eigenvalue of the matrix pair (A,B), in
+*> one of the forms lambda = alpha/beta or mu = beta/alpha.
+*> Since either lambda or mu may overflow, they should not,
+*> in general, be computed.
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is COMPLEX array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', the matrix of left Schur vectors Q.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >= 1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is COMPLEX array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', the matrix of right Schur vectors Z.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> To compute the optimal value of LWORK, call ILAENV to get
+*> blocksizes (for CGEQRF, CUNMQR, and CUNGQR.) Then compute:
+*> NB -- MAX of the blocksizes for CGEQRF, CUNMQR, and CUNGQR;
+*> the optimal LWORK is N*(NB+1).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> =1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHA(j) and BETA(j) should be correct for
+*> j=INFO+1,...,N.
+*> > N: errors that usually indicate LAPACK problems:
+*> =N+1: error return from CGGBAL
+*> =N+2: error return from CGEQRF
+*> =N+3: error return from CUNMQR
+*> =N+4: error return from CUNGQR
+*> =N+5: error return from CGGHRD
+*> =N+6: error return from CHGEQZ (other than failed
+*> iteration)
+*> =N+7: error return from CGGBAK (computing VSL)
+*> =N+8: error return from CGGBAK (computing VSR)
+*> =N+9: error return from CLASCL (various places)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+* =====================================================================
SUBROUTINE CGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHA, BETA,
$ VSL, LDVSL, VSR, LDVSR, WORK, LWORK, RWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR
@@ -18,126 +235,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine CGGES.
-*
-* CGEGS computes the eigenvalues, Schur form, and, optionally, the
-* left and or/right Schur vectors of a complex matrix pair (A,B).
-* Given two square matrices A and B, the generalized Schur
-* factorization has the form
-*
-* A = Q*S*Z**H, B = Q*T*Z**H
-*
-* where Q and Z are unitary matrices and S and T are upper triangular.
-* The columns of Q are the left Schur vectors
-* and the columns of Z are the right Schur vectors.
-*
-* If only the eigenvalues of (A,B) are needed, the driver routine
-* CGEGV should be used instead. See CGEGV for a description of the
-* eigenvalues of the generalized nonsymmetric eigenvalue problem
-* (GNEP).
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors (returned in VSL).
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors (returned in VSR).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the matrix A.
-* On exit, the upper triangular matrix S from the generalized
-* Schur factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the matrix B.
-* On exit, the upper triangular matrix T from the generalized
-* Schur factorization.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX array, dimension (N)
-* The complex scalars alpha that define the eigenvalues of
-* GNEP. ALPHA(j) = S(j,j), the diagonal element of the Schur
-* form of A.
-*
-* BETA (output) COMPLEX array, dimension (N)
-* The non-negative real scalars beta that define the
-* eigenvalues of GNEP. BETA(j) = T(j,j), the diagonal element
-* of the triangular factor T.
-*
-* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
-* represent the j-th eigenvalue of the matrix pair (A,B), in
-* one of the forms lambda = alpha/beta or mu = beta/alpha.
-* Since either lambda or mu may overflow, they should not,
-* in general, be computed.
-*
-* VSL (output) COMPLEX array, dimension (LDVSL,N)
-* If JOBVSL = 'V', the matrix of left Schur vectors Q.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >= 1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) COMPLEX array, dimension (LDVSR,N)
-* If JOBVSR = 'V', the matrix of right Schur vectors Z.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-* To compute the optimal value of LWORK, call ILAENV to get
-* blocksizes (for CGEQRF, CUNMQR, and CUNGQR.) Then compute:
-* NB -- MAX of the blocksizes for CGEQRF, CUNMQR, and CUNGQR;
-* the optimal LWORK is N*(NB+1).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* =1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHA(j) and BETA(j) should be correct for
-* j=INFO+1,...,N.
-* > N: errors that usually indicate LAPACK problems:
-* =N+1: error return from CGGBAL
-* =N+2: error return from CGEQRF
-* =N+3: error return from CUNMQR
-* =N+4: error return from CUNGQR
-* =N+5: error return from CGGHRD
-* =N+6: error return from CHGEQZ (other than failed
-* iteration)
-* =N+7: error return from CGGBAK (computing VSL)
-* =N+8: error return from CGGBAK (computing VSR)
-* =N+9: error return from CLASCL (various places)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgegv.f b/SRC/cgegv.f
index f0cfb5e7..8fc8a889 100644
--- a/SRC/cgegv.f
+++ b/SRC/cgegv.f
@@ -1,10 +1,286 @@
+*> \brief <b> CGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
+* VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine CGGEV.
+*>
+*> CGEGV computes the eigenvalues and, optionally, the left and/or right
+*> eigenvectors of a complex matrix pair (A,B).
+*> Given two square matrices A and B,
+*> the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
+*> eigenvalues lambda and corresponding (non-zero) eigenvectors x such
+*> that
+*> A*x = lambda*B*x.
+*>
+*> An alternate form is to find the eigenvalues mu and corresponding
+*> eigenvectors y such that
+*> mu*A*y = B*y.
+*>
+*> These two forms are equivalent with mu = 1/lambda and x = y if
+*> neither lambda nor mu is zero. In order to deal with the case that
+*> lambda or mu is zero or small, two values alpha and beta are returned
+*> for each eigenvalue, such that lambda = alpha/beta and
+*> mu = beta/alpha.
+*>
+*> The vectors x and y in the above equations are right eigenvectors of
+*> the matrix pair (A,B). Vectors u and v satisfying
+*> u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
+*> are left eigenvectors of (A,B).
+*>
+*> Note: this routine performs "full balancing" on A and B
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors (returned
+*> in VL).
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors (returned
+*> in VR).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the matrix A.
+*> If JOBVL = 'V' or JOBVR = 'V', then on exit A
+*> contains the Schur form of A from the generalized Schur
+*> factorization of the pair (A,B) after balancing. If no
+*> eigenvectors were computed, then only the diagonal elements
+*> of the Schur form will be correct. See CGGHRD and CHGEQZ
+*> for details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the matrix B.
+*> If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
+*> upper triangular matrix obtained from B in the generalized
+*> Schur factorization of the pair (A,B) after balancing.
+*> If no eigenvectors were computed, then only the diagonal
+*> elements of B will be correct. See CGGHRD and CHGEQZ for
+*> details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> The complex scalars alpha that define the eigenvalues of
+*> GNEP.
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> The complex scalars beta that define the eigenvalues of GNEP.
+*>
+*> Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
+*> represent the j-th eigenvalue of the matrix pair (A,B), in
+*> one of the forms lambda = alpha/beta or mu = beta/alpha.
+*> Since either lambda or mu may overflow, they should not,
+*> in general, be computed.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored
+*> in the columns of VL, in the same order as their eigenvalues.
+*> Each eigenvector is scaled so that its largest component has
+*> abs(real part) + abs(imag. part) = 1, except for eigenvectors
+*> corresponding to an eigenvalue with alpha = beta = 0, which
+*> are set to zero.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors x(j) are stored
+*> in the columns of VR, in the same order as their eigenvalues.
+*> Each eigenvector is scaled so that its largest component has
+*> abs(real part) + abs(imag. part) = 1, except for eigenvectors
+*> corresponding to an eigenvalue with alpha = beta = 0, which
+*> are set to zero.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> To compute the optimal value of LWORK, call ILAENV to get
+*> blocksizes (for CGEQRF, CUNMQR, and CUNGQR.) Then compute:
+*> NB -- MAX of the blocksizes for CGEQRF, CUNMQR, and CUNGQR;
+*> The optimal LWORK is MAX( 2*N, N*(NB+1) ).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> =1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHA(j) and BETA(j) should be
+*> correct for j=INFO+1,...,N.
+*> > N: errors that usually indicate LAPACK problems:
+*> =N+1: error return from CGGBAL
+*> =N+2: error return from CGEQRF
+*> =N+3: error return from CUNMQR
+*> =N+4: error return from CUNGQR
+*> =N+5: error return from CGGHRD
+*> =N+6: error return from CHGEQZ (other than failed
+*> iteration)
+*> =N+7: error return from CTGEVC
+*> =N+8: error return from CGGBAK (computing VL)
+*> =N+9: error return from CGGBAK (computing VR)
+*> =N+10: error return from CLASCL (various calls)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Balancing
+*> ---------
+*>
+*> This driver calls CGGBAL to both permute and scale rows and columns
+*> of A and B. The permutations PL and PR are chosen so that PL*A*PR
+*> and PL*B*R will be upper triangular except for the diagonal blocks
+*> A(i:j,i:j) and B(i:j,i:j), with i and j as close together as
+*> possible. The diagonal scaling matrices DL and DR are chosen so
+*> that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to
+*> one (except for the elements that start out zero.)
+*>
+*> After the eigenvalues and eigenvectors of the balanced matrices
+*> have been computed, CGGBAK transforms the eigenvectors back to what
+*> they would have been (in perfect arithmetic) if they had not been
+*> balanced.
+*>
+*> Contents of A and B on Exit
+*> -------- -- - --- - -- ----
+*>
+*> If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
+*> both), then on exit the arrays A and B will contain the complex Schur
+*> form[*] of the "balanced" versions of A and B. If no eigenvectors
+*> are computed, then only the diagonal blocks will be correct.
+*>
+*> [*] In other words, upper triangular form.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
$ VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -17,182 +293,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine CGGEV.
-*
-* CGEGV computes the eigenvalues and, optionally, the left and/or right
-* eigenvectors of a complex matrix pair (A,B).
-* Given two square matrices A and B,
-* the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
-* eigenvalues lambda and corresponding (non-zero) eigenvectors x such
-* that
-* A*x = lambda*B*x.
-*
-* An alternate form is to find the eigenvalues mu and corresponding
-* eigenvectors y such that
-* mu*A*y = B*y.
-*
-* These two forms are equivalent with mu = 1/lambda and x = y if
-* neither lambda nor mu is zero. In order to deal with the case that
-* lambda or mu is zero or small, two values alpha and beta are returned
-* for each eigenvalue, such that lambda = alpha/beta and
-* mu = beta/alpha.
-*
-* The vectors x and y in the above equations are right eigenvectors of
-* the matrix pair (A,B). Vectors u and v satisfying
-* u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
-* are left eigenvectors of (A,B).
-*
-* Note: this routine performs "full balancing" on A and B
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors (returned
-* in VL).
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors (returned
-* in VR).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the matrix A.
-* If JOBVL = 'V' or JOBVR = 'V', then on exit A
-* contains the Schur form of A from the generalized Schur
-* factorization of the pair (A,B) after balancing. If no
-* eigenvectors were computed, then only the diagonal elements
-* of the Schur form will be correct. See CGGHRD and CHGEQZ
-* for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the matrix B.
-* If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
-* upper triangular matrix obtained from B in the generalized
-* Schur factorization of the pair (A,B) after balancing.
-* If no eigenvectors were computed, then only the diagonal
-* elements of B will be correct. See CGGHRD and CHGEQZ for
-* details.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX array, dimension (N)
-* The complex scalars alpha that define the eigenvalues of
-* GNEP.
-*
-* BETA (output) COMPLEX array, dimension (N)
-* The complex scalars beta that define the eigenvalues of GNEP.
-*
-* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
-* represent the j-th eigenvalue of the matrix pair (A,B), in
-* one of the forms lambda = alpha/beta or mu = beta/alpha.
-* Since either lambda or mu may overflow, they should not,
-* in general, be computed.
-*
-* VL (output) COMPLEX array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored
-* in the columns of VL, in the same order as their eigenvalues.
-* Each eigenvector is scaled so that its largest component has
-* abs(real part) + abs(imag. part) = 1, except for eigenvectors
-* corresponding to an eigenvalue with alpha = beta = 0, which
-* are set to zero.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors x(j) are stored
-* in the columns of VR, in the same order as their eigenvalues.
-* Each eigenvector is scaled so that its largest component has
-* abs(real part) + abs(imag. part) = 1, except for eigenvectors
-* corresponding to an eigenvalue with alpha = beta = 0, which
-* are set to zero.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-* To compute the optimal value of LWORK, call ILAENV to get
-* blocksizes (for CGEQRF, CUNMQR, and CUNGQR.) Then compute:
-* NB -- MAX of the blocksizes for CGEQRF, CUNMQR, and CUNGQR;
-* The optimal LWORK is MAX( 2*N, N*(NB+1) ).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array, dimension (8*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* =1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHA(j) and BETA(j) should be
-* correct for j=INFO+1,...,N.
-* > N: errors that usually indicate LAPACK problems:
-* =N+1: error return from CGGBAL
-* =N+2: error return from CGEQRF
-* =N+3: error return from CUNMQR
-* =N+4: error return from CUNGQR
-* =N+5: error return from CGGHRD
-* =N+6: error return from CHGEQZ (other than failed
-* iteration)
-* =N+7: error return from CTGEVC
-* =N+8: error return from CGGBAK (computing VL)
-* =N+9: error return from CGGBAK (computing VR)
-* =N+10: error return from CLASCL (various calls)
-*
-* Further Details
-* ===============
-*
-* Balancing
-* ---------
-*
-* This driver calls CGGBAL to both permute and scale rows and columns
-* of A and B. The permutations PL and PR are chosen so that PL*A*PR
-* and PL*B*R will be upper triangular except for the diagonal blocks
-* A(i:j,i:j) and B(i:j,i:j), with i and j as close together as
-* possible. The diagonal scaling matrices DL and DR are chosen so
-* that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to
-* one (except for the elements that start out zero.)
-*
-* After the eigenvalues and eigenvectors of the balanced matrices
-* have been computed, CGGBAK transforms the eigenvectors back to what
-* they would have been (in perfect arithmetic) if they had not been
-* balanced.
-*
-* Contents of A and B on Exit
-* -------- -- - --- - -- ----
-*
-* If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
-* both), then on exit the arrays A and B will contain the complex Schur
-* form[*] of the "balanced" versions of A and B. If no eigenvectors
-* are computed, then only the diagonal blocks will be correct.
-*
-* [*] In other words, upper triangular form.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgehd2.f b/SRC/cgehd2.f
index 0c4b1670..d359a364 100644
--- a/SRC/cgehd2.f
+++ b/SRC/cgehd2.f
@@ -1,90 +1,131 @@
- SUBROUTINE CGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
+*> \brief \b CGEHD2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEHD2 reduces a complex general matrix A to upper Hessenberg form H
-* by a unitary similarity transformation: Q**H * A * Q = H .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEHD2 reduces a complex general matrix A to upper Hessenberg form H
+*> by a unitary similarity transformation: Q**H * A * Q = H .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that A is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to CGEBAL; otherwise they should be
-* set to 1 and N respectively. See Further Details.
-* 1 <= ILO <= IHI <= max(1,N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the n by n general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* elements below the first subdiagonal, with the array TAU,
-* represent the unitary matrix Q as a product of elementary
-* reflectors. See Further Details.
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (N)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* set to 1 and N respectively. See Further Details.
+*> 1 <= ILO <= IHI <= max(1,N).
+*>
+*> A (input/output) COMPLEX array, dimension (LDA,N)
+*> On entry, the n by n general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> elements below the first subdiagonal, with the array TAU,
+*> represent the unitary matrix Q as a product of elementary
+*> reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) COMPLEX array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of (ihi-ilo) elementary
+*> reflectors
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
+*> exit in A(i+2:ihi,i), and tau in TAU(i).
+*>
+*> The contents of A are illustrated by the following example, with
+*> n = 7, ilo = 2 and ihi = 6:
+*>
+*> on entry, on exit,
+*>
+*> ( a a a a a a a ) ( a a h h h h a )
+*> ( a a a a a a ) ( a h h h h a )
+*> ( a a a a a a ) ( h h h h h h )
+*> ( a a a a a a ) ( v2 h h h h h )
+*> ( a a a a a a ) ( v2 v3 h h h h )
+*> ( a a a a a a ) ( v2 v3 v4 h h h )
+*> ( a ) ( a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of (ihi-ilo) elementary
-* reflectors
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
-* exit in A(i+2:ihi,i), and tau in TAU(i).
-*
-* The contents of A are illustrated by the following example, with
-* n = 7, ilo = 2 and ihi = 6:
-*
-* on entry, on exit,
-*
-* ( a a a a a a a ) ( a a h h h h a )
-* ( a a a a a a ) ( a h h h h a )
-* ( a a a a a a ) ( h h h h h h )
-* ( a a a a a a ) ( v2 h h h h h )
-* ( a a a a a a ) ( v2 v3 h h h h )
-* ( a a a a a a ) ( v2 v3 v4 h h h )
-* ( a ) ( a )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgehrd.f b/SRC/cgehrd.f
index b925ec96..0a220090 100644
--- a/SRC/cgehrd.f
+++ b/SRC/cgehrd.f
@@ -1,106 +1,147 @@
- SUBROUTINE CGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CGEHRD
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEHRD reduces a complex general matrix A to upper Hessenberg form H by
-* an unitary similarity transformation: Q**H * A * Q = H .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEHRD reduces a complex general matrix A to upper Hessenberg form H by
+*> an unitary similarity transformation: Q**H * A * Q = H .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that A is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to CGEBAL; otherwise they should be
-* set to 1 and N respectively. See Further Details.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* elements below the first subdiagonal, with the array TAU,
-* represent the unitary matrix Q as a product of elementary
-* reflectors. See Further Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) COMPLEX array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to
-* zero.
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* set to 1 and N respectively. See Further Details.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*>
+*> A (input/output) COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> elements below the first subdiagonal, with the array TAU,
+*> represent the unitary matrix Q as a product of elementary
+*> reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) COMPLEX array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to
+*> zero.
+*>
+*> WORK (workspace/output) COMPLEX array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The length of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of (ihi-ilo) elementary
+*> reflectors
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
+*> exit in A(i+2:ihi,i), and tau in TAU(i).
+*>
+*> The contents of A are illustrated by the following example, with
+*> n = 7, ilo = 2 and ihi = 6:
+*>
+*> on entry, on exit,
+*>
+*> ( a a a a a a a ) ( a a h h h h a )
+*> ( a a a a a a ) ( a h h h h a )
+*> ( a a a a a a ) ( h h h h h h )
+*> ( a a a a a a ) ( v2 h h h h h )
+*> ( a a a a a a ) ( v2 v3 h h h h )
+*> ( a a a a a a ) ( v2 v3 v4 h h h )
+*> ( a ) ( a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> This file is a slight modification of LAPACK-3.0's DGEHRD
+*> subroutine incorporating improvements proposed by Quintana-Orti and
+*> Van de Geijn (2006). (See DLAHR2.)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of (ihi-ilo) elementary
-* reflectors
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
-* exit in A(i+2:ihi,i), and tau in TAU(i).
-*
-* The contents of A are illustrated by the following example, with
-* n = 7, ilo = 2 and ihi = 6:
-*
-* on entry, on exit,
-*
-* ( a a a a a a a ) ( a a h h h h a )
-* ( a a a a a a ) ( a h h h h a )
-* ( a a a a a a ) ( h h h h h h )
-* ( a a a a a a ) ( v2 h h h h h )
-* ( a a a a a a ) ( v2 v3 h h h h )
-* ( a a a a a a ) ( v2 v3 v4 h h h )
-* ( a ) ( a )
-*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This file is a slight modification of LAPACK-3.0's DGEHRD
-* subroutine incorporating improvements proposed by Quintana-Orti and
-* Van de Geijn (2006). (See DLAHR2.)
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgelq2.f b/SRC/cgelq2.f
index a1b96ac8..6d6e62de 100644
--- a/SRC/cgelq2.f
+++ b/SRC/cgelq2.f
@@ -1,67 +1,110 @@
- SUBROUTINE CGELQ2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b CGELQ2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGELQ2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGELQ2 computes an LQ factorization of a complex m by n matrix A:
-* A = L * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGELQ2 computes an LQ factorization of a complex m by n matrix A:
+*> A = L * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and below the diagonal of the array
-* contain the m by min(m,n) lower trapezoidal matrix L (L is
-* lower triangular if m <= n); the elements above the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (M)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX array, dimension (M)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
+*> A(i,i+1:n), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGELQ2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
-* A(i,i+1:n), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgelqf.f b/SRC/cgelqf.f
index 1c544831..c1217033 100644
--- a/SRC/cgelqf.f
+++ b/SRC/cgelqf.f
@@ -1,78 +1,121 @@
- SUBROUTINE CGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CGELQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGELQF computes an LQ factorization of a complex M-by-N matrix A:
-* A = L * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGELQF computes an LQ factorization of a complex M-by-N matrix A:
+*> A = L * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and below the diagonal of the array
-* contain the m-by-min(m,n) lower trapezoidal matrix L (L is
-* lower triangular if m <= n); the elements above the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
+*> A(i,i+1:n), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
-* A(i,i+1:n), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgels.f b/SRC/cgels.f
index 6cffb9a6..9bf6b2f6 100644
--- a/SRC/cgels.f
+++ b/SRC/cgels.f
@@ -1,10 +1,184 @@
+*> \brief <b> CGELS solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGELS solves overdetermined or underdetermined complex linear systems
+*> involving an M-by-N matrix A, or its conjugate-transpose, using a QR
+*> or LQ factorization of A. It is assumed that A has full rank.
+*>
+*> The following options are provided:
+*>
+*> 1. If TRANS = 'N' and m >= n: find the least squares solution of
+*> an overdetermined system, i.e., solve the least squares problem
+*> minimize || B - A*X ||.
+*>
+*> 2. If TRANS = 'N' and m < n: find the minimum norm solution of
+*> an underdetermined system A * X = B.
+*>
+*> 3. If TRANS = 'C' and m >= n: find the minimum norm solution of
+*> an undetermined system A**H * X = B.
+*>
+*> 4. If TRANS = 'C' and m < n: find the least squares solution of
+*> an overdetermined system, i.e., solve the least squares problem
+*> minimize || B - A**H * X ||.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': the linear system involves A;
+*> = 'C': the linear system involves A**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> if M >= N, A is overwritten by details of its QR
+*> factorization as returned by CGEQRF;
+*> if M < N, A is overwritten by details of its LQ
+*> factorization as returned by CGELQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the matrix B of right hand side vectors, stored
+*> columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
+*> if TRANS = 'C'.
+*> On exit, if INFO = 0, B is overwritten by the solution
+*> vectors, stored columnwise:
+*> if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
+*> squares solution vectors; the residual sum of squares for the
+*> solution in each column is given by the sum of squares of the
+*> modulus of elements N+1 to M in that column;
+*> if TRANS = 'N' and m < n, rows 1 to N of B contain the
+*> minimum norm solution vectors;
+*> if TRANS = 'C' and m >= n, rows 1 to M of B contain the
+*> minimum norm solution vectors;
+*> if TRANS = 'C' and m < n, rows 1 to M of B contain the
+*> least squares solution vectors; the residual sum of squares
+*> for the solution in each column is given by the sum of
+*> squares of the modulus of elements M+1 to N in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= MAX(1,M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= max( 1, MN + max( MN, NRHS ) ).
+*> For optimal performance,
+*> LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
+*> where MN = min(M,N) and NB is the optimum block size.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of the
+*> triangular factor of A is zero, so that A does not have
+*> full rank; the least squares solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsolve
+*
+* =====================================================================
SUBROUTINE CGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -14,106 +188,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGELS solves overdetermined or underdetermined complex linear systems
-* involving an M-by-N matrix A, or its conjugate-transpose, using a QR
-* or LQ factorization of A. It is assumed that A has full rank.
-*
-* The following options are provided:
-*
-* 1. If TRANS = 'N' and m >= n: find the least squares solution of
-* an overdetermined system, i.e., solve the least squares problem
-* minimize || B - A*X ||.
-*
-* 2. If TRANS = 'N' and m < n: find the minimum norm solution of
-* an underdetermined system A * X = B.
-*
-* 3. If TRANS = 'C' and m >= n: find the minimum norm solution of
-* an undetermined system A**H * X = B.
-*
-* 4. If TRANS = 'C' and m < n: find the least squares solution of
-* an overdetermined system, i.e., solve the least squares problem
-* minimize || B - A**H * X ||.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N': the linear system involves A;
-* = 'C': the linear system involves A**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* if M >= N, A is overwritten by details of its QR
-* factorization as returned by CGEQRF;
-* if M < N, A is overwritten by details of its LQ
-* factorization as returned by CGELQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the matrix B of right hand side vectors, stored
-* columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
-* if TRANS = 'C'.
-* On exit, if INFO = 0, B is overwritten by the solution
-* vectors, stored columnwise:
-* if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
-* squares solution vectors; the residual sum of squares for the
-* solution in each column is given by the sum of squares of the
-* modulus of elements N+1 to M in that column;
-* if TRANS = 'N' and m < n, rows 1 to N of B contain the
-* minimum norm solution vectors;
-* if TRANS = 'C' and m >= n, rows 1 to M of B contain the
-* minimum norm solution vectors;
-* if TRANS = 'C' and m < n, rows 1 to M of B contain the
-* least squares solution vectors; the residual sum of squares
-* for the solution in each column is given by the sum of
-* squares of the modulus of elements M+1 to N in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= MAX(1,M,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= max( 1, MN + max( MN, NRHS ) ).
-* For optimal performance,
-* LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
-* where MN = min(M,N) and NB is the optimum block size.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of the
-* triangular factor of A is zero, so that A does not have
-* full rank; the least squares solution could not be
-* computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgelsd.f b/SRC/cgelsd.f
index 2b17e7af..d47c9daf 100644
--- a/SRC/cgelsd.f
+++ b/SRC/cgelsd.f
@@ -1,10 +1,233 @@
+*> \brief <b> CGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+* WORK, LWORK, RWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGELSD computes the minimum-norm solution to a real linear least
+*> squares problem:
+*> minimize 2-norm(| b - A*x |)
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The problem is solved in three steps:
+*> (1) Reduce the coefficient matrix A to bidiagonal form with
+*> Householder tranformations, reducing the original problem
+*> into a "bidiagonal least squares problem" (BLS)
+*> (2) Solve the BLS using a divide and conquer approach.
+*> (3) Apply back all the Householder tranformations to solve
+*> the original least squares problem.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, B is overwritten by the N-by-NRHS solution matrix X.
+*> If m >= n and RANK = n, the residual sum-of-squares for
+*> the solution in the i-th column is given by the sum of
+*> squares of the modulus of elements n+1:m in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of A in decreasing order.
+*> The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> RCOND is used to determine the effective rank of A.
+*> Singular values S(i) <= RCOND*S(1) are treated as zero.
+*> If RCOND < 0, machine precision is used instead.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the number of singular values
+*> which are greater than RCOND*S(1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK must be at least 1.
+*> The exact minimum amount of workspace needed depends on M,
+*> N and NRHS. As long as LWORK is at least
+*> 2 * N + N * NRHS
+*> if M is greater than or equal to N or
+*> 2 * M + M * NRHS
+*> if M is less than N, the code will execute correctly.
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the array WORK and the
+*> minimum sizes of the arrays RWORK and IWORK, and returns
+*> these values as the first entries of the WORK, RWORK and
+*> IWORK arrays, and no error message related to LWORK is issued
+*> by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LRWORK))
+*> LRWORK >=
+*> 10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
+*> MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
+*> if M is greater than or equal to N or
+*> 10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
+*> MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
+*> if M is less than N, the code will execute correctly.
+*> SMLSIZ is returned by ILAENV and is equal to the maximum
+*> size of the subproblems at the bottom of the computation
+*> tree (usually about 25), and
+*> NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
+*> On exit, if INFO = 0, RWORK(1) returns the minimum LRWORK.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),
+*> where MINMN = MIN( M,N ).
+*> On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the algorithm for computing the SVD failed to converge;
+*> if INFO = i, i off-diagonal elements of an intermediate
+*> bidiagonal form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ WORK, LWORK, RWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -16,136 +239,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGELSD computes the minimum-norm solution to a real linear least
-* squares problem:
-* minimize 2-norm(| b - A*x |)
-* using the singular value decomposition (SVD) of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The problem is solved in three steps:
-* (1) Reduce the coefficient matrix A to bidiagonal form with
-* Householder tranformations, reducing the original problem
-* into a "bidiagonal least squares problem" (BLS)
-* (2) Solve the BLS using a divide and conquer approach.
-* (3) Apply back all the Householder tranformations to solve
-* the original least squares problem.
-*
-* The effective rank of A is determined by treating as zero those
-* singular values which are less than RCOND times the largest singular
-* value.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, B is overwritten by the N-by-NRHS solution matrix X.
-* If m >= n and RANK = n, the residual sum-of-squares for
-* the solution in the i-th column is given by the sum of
-* squares of the modulus of elements n+1:m in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* S (output) REAL array, dimension (min(M,N))
-* The singular values of A in decreasing order.
-* The condition number of A in the 2-norm = S(1)/S(min(m,n)).
-*
-* RCOND (input) REAL
-* RCOND is used to determine the effective rank of A.
-* Singular values S(i) <= RCOND*S(1) are treated as zero.
-* If RCOND < 0, machine precision is used instead.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the number of singular values
-* which are greater than RCOND*S(1).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK must be at least 1.
-* The exact minimum amount of workspace needed depends on M,
-* N and NRHS. As long as LWORK is at least
-* 2 * N + N * NRHS
-* if M is greater than or equal to N or
-* 2 * M + M * NRHS
-* if M is less than N, the code will execute correctly.
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the array WORK and the
-* minimum sizes of the arrays RWORK and IWORK, and returns
-* these values as the first entries of the WORK, RWORK and
-* IWORK arrays, and no error message related to LWORK is issued
-* by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (MAX(1,LRWORK))
-* LRWORK >=
-* 10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
-* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
-* if M is greater than or equal to N or
-* 10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
-* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
-* if M is less than N, the code will execute correctly.
-* SMLSIZ is returned by ILAENV and is equal to the maximum
-* size of the subproblems at the bottom of the computation
-* tree (usually about 25), and
-* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
-* On exit, if INFO = 0, RWORK(1) returns the minimum LRWORK.
-*
-* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
-* LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),
-* where MINMN = MIN( M,N ).
-* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the algorithm for computing the SVD failed to converge;
-* if INFO = i, i off-diagonal elements of an intermediate
-* bidiagonal form did not converge to zero.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgelss.f b/SRC/cgelss.f
index da5e1cc3..9be119b4 100644
--- a/SRC/cgelss.f
+++ b/SRC/cgelss.f
@@ -1,10 +1,180 @@
+*> \brief <b> CGELSS solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), S( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGELSS computes the minimum norm solution to a complex linear
+*> least squares problem:
+*>
+*> Minimize 2-norm(| b - A*x |).
+*>
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix
+*> X.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the first min(m,n) rows of A are overwritten with
+*> its right singular vectors, stored rowwise.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, B is overwritten by the N-by-NRHS solution matrix X.
+*> If m >= n and RANK = n, the residual sum-of-squares for
+*> the solution in the i-th column is given by the sum of
+*> squares of the modulus of elements n+1:m in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of A in decreasing order.
+*> The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> RCOND is used to determine the effective rank of A.
+*> Singular values S(i) <= RCOND*S(1) are treated as zero.
+*> If RCOND < 0, machine precision is used instead.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the number of singular values
+*> which are greater than RCOND*S(1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1, and also:
+*> LWORK >= 2*min(M,N) + max(M,N,NRHS)
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (5*min(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the algorithm for computing the SVD failed to converge;
+*> if INFO = i, i off-diagonal elements of an intermediate
+*> bidiagonal form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsolve
+*
+* =====================================================================
SUBROUTINE CGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -15,92 +185,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGELSS computes the minimum norm solution to a complex linear
-* least squares problem:
-*
-* Minimize 2-norm(| b - A*x |).
-*
-* using the singular value decomposition (SVD) of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix
-* X.
-*
-* The effective rank of A is determined by treating as zero those
-* singular values which are less than RCOND times the largest singular
-* value.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the first min(m,n) rows of A are overwritten with
-* its right singular vectors, stored rowwise.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, B is overwritten by the N-by-NRHS solution matrix X.
-* If m >= n and RANK = n, the residual sum-of-squares for
-* the solution in the i-th column is given by the sum of
-* squares of the modulus of elements n+1:m in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* S (output) REAL array, dimension (min(M,N))
-* The singular values of A in decreasing order.
-* The condition number of A in the 2-norm = S(1)/S(min(m,n)).
-*
-* RCOND (input) REAL
-* RCOND is used to determine the effective rank of A.
-* Singular values S(i) <= RCOND*S(1) are treated as zero.
-* If RCOND < 0, machine precision is used instead.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the number of singular values
-* which are greater than RCOND*S(1).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1, and also:
-* LWORK >= 2*min(M,N) + max(M,N,NRHS)
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (5*min(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the algorithm for computing the SVD failed to converge;
-* if INFO = i, i off-diagonal elements of an intermediate
-* bidiagonal form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgelsx.f b/SRC/cgelsx.f
index 63990afd..9235974a 100644
--- a/SRC/cgelsx.f
+++ b/SRC/cgelsx.f
@@ -1,10 +1,185 @@
+*> \brief <b> CGELSX solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine CGELSY.
+*>
+*> CGELSX computes the minimum-norm solution to a complex linear least
+*> squares problem:
+*> minimize || A * X - B ||
+*> using a complete orthogonal factorization of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The routine first computes a QR factorization with column pivoting:
+*> A * P = Q * [ R11 R12 ]
+*> [ 0 R22 ]
+*> with R11 defined as the largest leading submatrix whose estimated
+*> condition number is less than 1/RCOND. The order of R11, RANK,
+*> is the effective rank of A.
+*>
+*> Then, R22 is considered to be negligible, and R12 is annihilated
+*> by unitary transformations from the right, arriving at the
+*> complete orthogonal factorization:
+*> A * P = Q * [ T11 0 ] * Z
+*> [ 0 0 ]
+*> The minimum-norm solution is then
+*> X = P * Z**H [ inv(T11)*Q1**H*B ]
+*> [ 0 ]
+*> where Q1 consists of the first RANK columns of Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been overwritten by details of its
+*> complete orthogonal factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, the N-by-NRHS solution matrix X.
+*> If m >= n and RANK = n, the residual sum-of-squares for
+*> the solution in the i-th column is given by the sum of
+*> squares of elements N+1:M in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is an
+*> initial column, otherwise it is a free column. Before
+*> the QR factorization of A, all initial columns are
+*> permuted to the leading positions; only the remaining
+*> free columns are moved as a result of column pivoting
+*> during the factorization.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> RCOND is used to determine the effective rank of A, which
+*> is defined as the order of the largest leading triangular
+*> submatrix R11 in the QR factorization with pivoting of A,
+*> whose estimated condition number < 1/RCOND.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the order of the submatrix
+*> R11. This is the same as the order of the submatrix T11
+*> in the complete orthogonal factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (min(M,N) + max( N, 2*min(M,N)+NRHS )),
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsolve
+*
+* =====================================================================
SUBROUTINE CGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
@@ -16,100 +191,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine CGELSY.
-*
-* CGELSX computes the minimum-norm solution to a complex linear least
-* squares problem:
-* minimize || A * X - B ||
-* using a complete orthogonal factorization of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The routine first computes a QR factorization with column pivoting:
-* A * P = Q * [ R11 R12 ]
-* [ 0 R22 ]
-* with R11 defined as the largest leading submatrix whose estimated
-* condition number is less than 1/RCOND. The order of R11, RANK,
-* is the effective rank of A.
-*
-* Then, R22 is considered to be negligible, and R12 is annihilated
-* by unitary transformations from the right, arriving at the
-* complete orthogonal factorization:
-* A * P = Q * [ T11 0 ] * Z
-* [ 0 0 ]
-* The minimum-norm solution is then
-* X = P * Z**H [ inv(T11)*Q1**H*B ]
-* [ 0 ]
-* where Q1 consists of the first RANK columns of Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been overwritten by details of its
-* complete orthogonal factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, the N-by-NRHS solution matrix X.
-* If m >= n and RANK = n, the residual sum-of-squares for
-* the solution in the i-th column is given by the sum of
-* squares of elements N+1:M in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is an
-* initial column, otherwise it is a free column. Before
-* the QR factorization of A, all initial columns are
-* permuted to the leading positions; only the remaining
-* free columns are moved as a result of column pivoting
-* during the factorization.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
-*
-* RCOND (input) REAL
-* RCOND is used to determine the effective rank of A, which
-* is defined as the order of the largest leading triangular
-* submatrix R11 in the QR factorization with pivoting of A,
-* whose estimated condition number < 1/RCOND.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the order of the submatrix
-* R11. This is the same as the order of the submatrix T11
-* in the complete orthogonal factorization of A.
-*
-* WORK (workspace) COMPLEX array, dimension
-* (min(M,N) + max( N, 2*min(M,N)+NRHS )),
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgelsy.f b/SRC/cgelsy.f
index e6a72a30..85ba7d37 100644
--- a/SRC/cgelsy.f
+++ b/SRC/cgelsy.f
@@ -1,10 +1,218 @@
+*> \brief <b> CGELSY solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGELSY computes the minimum-norm solution to a complex linear least
+*> squares problem:
+*> minimize || A * X - B ||
+*> using a complete orthogonal factorization of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The routine first computes a QR factorization with column pivoting:
+*> A * P = Q * [ R11 R12 ]
+*> [ 0 R22 ]
+*> with R11 defined as the largest leading submatrix whose estimated
+*> condition number is less than 1/RCOND. The order of R11, RANK,
+*> is the effective rank of A.
+*>
+*> Then, R22 is considered to be negligible, and R12 is annihilated
+*> by unitary transformations from the right, arriving at the
+*> complete orthogonal factorization:
+*> A * P = Q * [ T11 0 ] * Z
+*> [ 0 0 ]
+*> The minimum-norm solution is then
+*> X = P * Z**H [ inv(T11)*Q1**H*B ]
+*> [ 0 ]
+*> where Q1 consists of the first RANK columns of Q.
+*>
+*> This routine is basically identical to the original xGELSX except
+*> three differences:
+*> o The permutation of matrix B (the right hand side) is faster and
+*> more simple.
+*> o The call to the subroutine xGEQPF has been substituted by the
+*> the call to the subroutine xGEQP3. This subroutine is a Blas-3
+*> version of the QR factorization with column pivoting.
+*> o Matrix B (the right hand side) is updated with Blas-3.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been overwritten by details of its
+*> complete orthogonal factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of AP, otherwise column i is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> RCOND is used to determine the effective rank of A, which
+*> is defined as the order of the largest leading triangular
+*> submatrix R11 in the QR factorization with pivoting of A,
+*> whose estimated condition number < 1/RCOND.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the order of the submatrix
+*> R11. This is the same as the order of the submatrix T11
+*> in the complete orthogonal factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> The unblocked strategy requires that:
+*> LWORK >= MN + MAX( 2*MN, N+1, MN+NRHS )
+*> where MN = min(M,N).
+*> The block algorithm requires that:
+*> LWORK >= MN + MAX( 2*MN, NB*(N+1), MN+MN*NB, MN+NB*NRHS )
+*> where NB is an upper bound on the blocksize returned
+*> by ILAENV for the routines CGEQP3, CTZRZF, CTZRQF, CUNMQR,
+*> and CUNMRZ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*> E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -16,124 +224,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGELSY computes the minimum-norm solution to a complex linear least
-* squares problem:
-* minimize || A * X - B ||
-* using a complete orthogonal factorization of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The routine first computes a QR factorization with column pivoting:
-* A * P = Q * [ R11 R12 ]
-* [ 0 R22 ]
-* with R11 defined as the largest leading submatrix whose estimated
-* condition number is less than 1/RCOND. The order of R11, RANK,
-* is the effective rank of A.
-*
-* Then, R22 is considered to be negligible, and R12 is annihilated
-* by unitary transformations from the right, arriving at the
-* complete orthogonal factorization:
-* A * P = Q * [ T11 0 ] * Z
-* [ 0 0 ]
-* The minimum-norm solution is then
-* X = P * Z**H [ inv(T11)*Q1**H*B ]
-* [ 0 ]
-* where Q1 consists of the first RANK columns of Q.
-*
-* This routine is basically identical to the original xGELSX except
-* three differences:
-* o The permutation of matrix B (the right hand side) is faster and
-* more simple.
-* o The call to the subroutine xGEQPF has been substituted by the
-* the call to the subroutine xGEQP3. This subroutine is a Blas-3
-* version of the QR factorization with column pivoting.
-* o Matrix B (the right hand side) is updated with Blas-3.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been overwritten by details of its
-* complete orthogonal factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of AP, otherwise column i is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
-*
-* RCOND (input) REAL
-* RCOND is used to determine the effective rank of A, which
-* is defined as the order of the largest leading triangular
-* submatrix R11 in the QR factorization with pivoting of A,
-* whose estimated condition number < 1/RCOND.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the order of the submatrix
-* R11. This is the same as the order of the submatrix T11
-* in the complete orthogonal factorization of A.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* The unblocked strategy requires that:
-* LWORK >= MN + MAX( 2*MN, N+1, MN+NRHS )
-* where MN = min(M,N).
-* The block algorithm requires that:
-* LWORK >= MN + MAX( 2*MN, NB*(N+1), MN+MN*NB, MN+NB*NRHS )
-* where NB is an upper bound on the blocksize returned
-* by ILAENV for the routines CGEQP3, CTZRZF, CTZRQF, CUNMQR,
-* and CUNMRZ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-* E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgemqrt.f b/SRC/cgemqrt.f
index 2307da83..3a969397 100644
--- a/SRC/cgemqrt.f
+++ b/SRC/cgemqrt.f
@@ -1,96 +1,177 @@
- SUBROUTINE CGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
- $ C, LDC, WORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
-* ..
-* .. Array Arguments ..
- COMPLEX V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
-* ..
-*
+*> \brief \b CGEMQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
+* C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
+* ..
+* .. Array Arguments ..
+* COMPLEX V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEMQRT overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q C C Q
-* TRANS = 'C': Q**H C C Q**H
-*
-* where Q is a complex orthogonal matrix defined as the product of K
-* elementary reflectors:
-*
-* Q = H(1) H(2) . . . H(K) = I - V T V**H
-*
-* generated using the compact WY representation as returned by CGEQRT.
-*
-* Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEMQRT overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q C C Q
+*> TRANS = 'C': Q**H C C Q**H
+*>
+*> where Q is a complex orthogonal matrix defined as the product of K
+*> elementary reflectors:
+*>
+*> Q = H(1) H(2) . . . H(K) = I - V T V**H
+*>
+*> generated using the compact WY representation as returned by CGEQRT.
+*>
+*> Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* NB (input) INTEGER
-* The block size used for the storage of T. K >= NB >= 1.
-* This must be the same value of NB used to generate T
-* in CGEQRT.
-*
-* V (input) COMPLEX array, dimension (LDV,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGEQRT in the first K columns of its array argument A.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The block size used for the storage of T. K >= NB >= 1.
+*> This must be the same value of NB used to generate T
+*> in CGEQRT.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGEQRT in the first K columns of its array argument A.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,K)
+*> The upper triangular factors of the block reflectors
+*> as returned by CGEQRT, stored as a NB-by-N matrix.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array. The dimension of WORK is
+*> N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (input) COMPLEX array, dimension (LDT,K)
-* The upper triangular factors of the block reflectors
-* as returned by CGEQRT, stored as a NB-by-N matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q.
+*> \ingroup complexGEcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE CGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
+ $ C, LDC, WORK, INFO )
*
-* WORK (workspace/output) COMPLEX array. The dimension of WORK is
-* N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
+* ..
+* .. Array Arguments ..
+ COMPLEX V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeql2.f b/SRC/cgeql2.f
index e6eb20b4..e7ebba7e 100644
--- a/SRC/cgeql2.f
+++ b/SRC/cgeql2.f
@@ -1,69 +1,110 @@
- SUBROUTINE CGEQL2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b CGEQL2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQL2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQL2 computes a QL factorization of a complex m by n matrix A:
-* A = Q * L.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQL2 computes a QL factorization of a complex m by n matrix A:
+*> A = Q * L.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, if m >= n, the lower triangle of the subarray
-* A(m-n+1:m,1:n) contains the n by n lower triangular matrix L;
-* if m <= n, the elements on and below the (n-m)-th
-* superdiagonal contain the m by n lower trapezoidal matrix L;
-* the remaining elements, with the array TAU, represent the
-* unitary matrix Q as a product of elementary reflectors
-* (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (N)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
+*> A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQL2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
-* A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqlf.f b/SRC/cgeqlf.f
index 607be700..aec7a55d 100644
--- a/SRC/cgeqlf.f
+++ b/SRC/cgeqlf.f
@@ -1,81 +1,121 @@
- SUBROUTINE CGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CGEQLF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQLF computes a QL factorization of a complex M-by-N matrix A:
-* A = Q * L.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQLF computes a QL factorization of a complex M-by-N matrix A:
+*> A = Q * L.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if m >= n, the lower triangle of the subarray
-* A(m-n+1:m,1:n) contains the N-by-N lower triangular matrix L;
-* if m <= n, the elements on and below the (n-m)-th
-* superdiagonal contain the M-by-N lower trapezoidal matrix L;
-* the remaining elements, with the array TAU, represent the
-* unitary matrix Q as a product of elementary reflectors
-* (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
+*> A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
-* A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqp3.f b/SRC/cgeqp3.f
index 5ffec77f..456846d3 100644
--- a/SRC/cgeqp3.f
+++ b/SRC/cgeqp3.f
@@ -1,93 +1,170 @@
- SUBROUTINE CGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL RWORK( * )
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CGEQP3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQP3 computes a QR factorization with column pivoting of a
-* matrix A: A*P = Q*R using Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQP3 computes a QR factorization with column pivoting of a
+*> matrix A: A*P = Q*R using Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of the array contains the
-* min(M,N)-by-N upper trapezoidal matrix R; the elements below
-* the diagonal, together with the array TAU, represent the
-* unitary matrix Q as a product of min(M,N) elementary
-* reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(J).ne.0, the J-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(J)=0,
-* the J-th column of A is a free column.
-* On exit, if JPVT(J)=K, then the J-th column of A*P was the
-* the K-th column of A.
-*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of the array contains the
+*> min(M,N)-by-N upper trapezoidal matrix R; the elements below
+*> the diagonal, together with the array TAU, represent the
+*> unitary matrix Q as a product of min(M,N) elementary
+*> reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(J).ne.0, the J-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(J)=0,
+*> the J-th column of A is a free column.
+*> On exit, if JPVT(J)=K, then the J-th column of A*P was the
+*> the K-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= N+1.
+*> For optimal performance LWORK >= ( N+1 )*NB, where NB
+*> is the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= N+1.
-* For optimal performance LWORK >= ( N+1 )*NB, where NB
-* is the optimal blocksize.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \date November 2011
*
-* RWORK (workspace) REAL array, dimension (2*N)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a real/complex scalar, and v is a real/complex vector
+*> with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
+*> A(i+1:m,i), and tau in TAU(i).
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
+ $ INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a real/complex scalar, and v is a real/complex vector
-* with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
-* A(i+1:m,i), and tau in TAU(i).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL RWORK( * )
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqpf.f b/SRC/cgeqpf.f
index c82e38a6..ecebb4d6 100644
--- a/SRC/cgeqpf.f
+++ b/SRC/cgeqpf.f
@@ -1,88 +1,160 @@
- SUBROUTINE CGEQPF( M, N, A, LDA, JPVT, TAU, WORK, RWORK, INFO )
-*
-* -- LAPACK deprecated computational routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL RWORK( * )
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CGEQPF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQPF( M, N, A, LDA, JPVT, TAU, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine CGEQP3.
-*
-* CGEQPF computes a QR factorization with column pivoting of a
-* complex M-by-N matrix A: A*P = Q*R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine CGEQP3.
+*>
+*> CGEQPF computes a QR factorization with column pivoting of a
+*> complex M-by-N matrix A: A*P = Q*R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of the array contains the
-* min(M,N)-by-N upper triangular matrix R; the elements
-* below the diagonal, together with the array TAU,
-* represent the unitary matrix Q as a product of
-* min(m,n) elementary reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(i) = 0,
-* the i-th column of A is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of the array contains the
+*> min(M,N)-by-N upper triangular matrix R; the elements
+*> below the diagonal, together with the array TAU,
+*> represent the unitary matrix Q as a product of
+*> min(m,n) elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(i) = 0,
+*> the i-th column of A is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX array, dimension (N)
+*> \date November 2011
*
-* RWORK (workspace) REAL array, dimension (2*N)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(n)
+*>
+*> Each H(i) has the form
+*>
+*> H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
+*>
+*> The matrix P is represented in jpvt as follows: If
+*> jpvt(j) = i
+*> then the jth column of P is the ith canonical unit vector.
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQPF( M, N, A, LDA, JPVT, TAU, WORK, RWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(n)
-*
-* Each H(i) has the form
-*
-* H = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
-*
-* The matrix P is represented in jpvt as follows: If
-* jpvt(j) = i
-* then the jth column of P is the ith canonical unit vector.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL RWORK( * )
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqr2.f b/SRC/cgeqr2.f
index 03ab4e8c..b34d5162 100644
--- a/SRC/cgeqr2.f
+++ b/SRC/cgeqr2.f
@@ -1,67 +1,110 @@
- SUBROUTINE CGEQR2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b CGEQR2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQR2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQR2 computes a QR factorization of a complex m by n matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQR2 computes a QR factorization of a complex m by n matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(m,n) by n upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (N)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQR2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqr2p.f b/SRC/cgeqr2p.f
index 162d3115..ead62cb6 100644
--- a/SRC/cgeqr2p.f
+++ b/SRC/cgeqr2p.f
@@ -1,67 +1,110 @@
- SUBROUTINE CGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b CGEQR2P
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQR2P computes a QR factorization of a complex m by n matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQR2P computes a QR factorization of a complex m by n matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(m,n) by n upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (N)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqrf.f b/SRC/cgeqrf.f
index 3a4e4269..4372f6a3 100644
--- a/SRC/cgeqrf.f
+++ b/SRC/cgeqrf.f
@@ -1,79 +1,147 @@
- SUBROUTINE CGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CGEQRF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQRF computes a QR factorization of a complex M-by-N matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQRF computes a QR factorization of a complex M-by-N matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if m >= n); the elements below the diagonal,
+*> with the array TAU, represent the unitary matrix Q as a
+*> product of min(m,n) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqrfp.f b/SRC/cgeqrfp.f
index 54c8540b..14ae9ec7 100644
--- a/SRC/cgeqrfp.f
+++ b/SRC/cgeqrfp.f
@@ -1,79 +1,147 @@
- SUBROUTINE CGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CGEQRFP
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQRFP computes a QR factorization of a complex M-by-N matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQRFP computes a QR factorization of a complex M-by-N matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if m >= n); the elements below the diagonal,
+*> with the array TAU, represent the unitary matrix Q as a
+*> product of min(m,n) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqrt.f b/SRC/cgeqrt.f
index 75b7ec7a..f1bd77ce 100644
--- a/SRC/cgeqrt.f
+++ b/SRC/cgeqrt.f
@@ -1,82 +1,151 @@
- SUBROUTINE CGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
- IMPLICIT NONE
+*> \brief \b CGEQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDT, M, N, NB
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDT, M, N, NB
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGEQRT computes a blocked QR factorization of a complex M-by-N matrix A
-* using the compact WY representation of Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQRT computes a blocked QR factorization of a complex M-by-N matrix A
+*> using the compact WY representation of Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The block size to be used in the blocked QR. MIN(M,N) >= NB >= 1.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if M >= N); the elements below the diagonal
-* are the columns of V.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The block size to be used in the blocked QR. MIN(M,N) >= NB >= 1.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if M >= N); the elements below the diagonal
+*> are the columns of V.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,MIN(M,N))
+*> The upper triangular block reflectors stored in compact form
+*> as a sequence of upper triangular blocks. See below
+*> for further details.
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NB*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX array, dimension (LDT,MIN(M,N))
-* The upper triangular block reflectors stored in compact form
-* as a sequence of upper triangular blocks. See below
-* for further details.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (NB*N)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A.
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A.
+*>
+*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each
+*> block is of order NB except for the last block, which is of order
+*> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block
+*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
+*> for the last block) T's are stored in the NB-by-N matrix T as
+*>
+*> T = (T1 T2 ... TB).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
*
-* Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each
-* block is of order NB except for the last block, which is of order
-* IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block
-* reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
-* for the last block) T's are stored in the NB-by-N matrix T as
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* T = (T1 T2 ... TB).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDT, M, N, NB
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqrt2.f b/SRC/cgeqrt2.f
index fa8b25ea..9965bae9 100644
--- a/SRC/cgeqrt2.f
+++ b/SRC/cgeqrt2.f
@@ -1,73 +1,135 @@
- SUBROUTINE CGEQRT2( M, N, A, LDA, T, LDT, INFO )
+*> \brief \b CGEQRT2
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDT, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), T( LDT, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGEQRT2( M, N, A, LDA, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDT, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* CGEQRT2 computes a QR factorization of a complex M-by-N matrix A,
-* using the compact WY representation of Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQRT2 computes a QR factorization of a complex M-by-N matrix A,
+*> using the compact WY representation of Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= N.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the complex M-by-N matrix A. On exit, the elements on and
-* above the diagonal contain the N-by-N upper triangular matrix R; the
-* elements below the diagonal are the columns of V. See below for
-* further details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the complex M-by-N matrix A. On exit, the elements on and
+*> above the diagonal contain the N-by-N upper triangular matrix R; the
+*> elements below the diagonal are the columns of V. See below for
+*> further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,N)
+*> The N-by-N upper triangular factor of the block reflector.
+*> The elements on and above the diagonal contain the block
+*> reflector T; the elements below the diagonal are not used.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> LDT (intput) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX array, dimension (LDT,N)
-* The N-by-N upper triangular factor of the block reflector.
-* The elements on and above the diagonal contain the block
-* reflector T; the elements below the diagonal are not used.
-* See below for further details.
+*> \date November 2011
*
-* LDT (intput) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A. The
+*> block reflector H is then given by
+*>
+*> H = I - V * T * V**H
+*>
+*> where V**H is the conjugate transpose of V.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGEQRT2( M, N, A, LDA, T, LDT, INFO )
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A. The
-* block reflector H is then given by
-*
-* H = I - V * T * V**H
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where V**H is the conjugate transpose of V.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDT, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgeqrt3.f b/SRC/cgeqrt3.f
index 6ea905b4..a73b8ca5 100644
--- a/SRC/cgeqrt3.f
+++ b/SRC/cgeqrt3.f
@@ -1,79 +1,140 @@
- RECURSIVE SUBROUTINE CGEQRT3( M, N, A, LDA, T, LDT, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
+*> \brief \b CGEQRT3
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N, LDT
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), T( LDT, * )
-* ..
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* RECURSIVE SUBROUTINE CGEQRT3( M, N, A, LDA, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N, LDT
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* CGEQRT3 recursively computes a QR factorization of a complex M-by-N matrix A,
-* using the compact WY representation of Q.
-*
-* Based on the algorithm of Elmroth and Gustavson,
-* IBM J. Res. Develop. Vol 44 No. 4 July 2000.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGEQRT3 recursively computes a QR factorization of a complex M-by-N matrix A,
+*> using the compact WY representation of Q.
+*>
+*> Based on the algorithm of Elmroth and Gustavson,
+*> IBM J. Res. Develop. Vol 44 No. 4 July 2000.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= N.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the complex M-by-N matrix A. On exit, the elements on and
-* above the diagonal contain the N-by-N upper triangular matrix R; the
-* elements below the diagonal are the columns of V. See below for
-* further details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the complex M-by-N matrix A. On exit, the elements on and
+*> above the diagonal contain the N-by-N upper triangular matrix R; the
+*> elements below the diagonal are the columns of V. See below for
+*> further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,N)
+*> The N-by-N upper triangular factor of the block reflector.
+*> The elements on and above the diagonal contain the block
+*> reflector T; the elements below the diagonal are not used.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> LDT (intput) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX array, dimension (LDT,N)
-* The N-by-N upper triangular factor of the block reflector.
-* The elements on and above the diagonal contain the block
-* reflector T; the elements below the diagonal are not used.
-* See below for further details.
+*> \date November 2011
*
-* LDT (intput) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A. The
+*> block reflector H is then given by
+*>
+*> H = I - V * T * V**H
+*>
+*> where V**H is the conjugate transpose of V.
+*>
+*> For details of the algorithm, see Elmroth and Gustavson (cited above).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ RECURSIVE SUBROUTINE CGEQRT3( M, N, A, LDA, T, LDT, INFO )
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A. The
-* block reflector H is then given by
-*
-* H = I - V * T * V**H
-*
-* where V**H is the conjugate transpose of V.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* For details of the algorithm, see Elmroth and Gustavson (cited above).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N, LDT
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgerfs.f b/SRC/cgerfs.f
index 09312dcf..b95737b2 100644
--- a/SRC/cgerfs.f
+++ b/SRC/cgerfs.f
@@ -1,12 +1,187 @@
+*> \brief \b CGERFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGERFS improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates for
+*> the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by CGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEcomputational
+*
+* =====================================================================
SUBROUTINE CGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -19,87 +194,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGERFS improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates for
-* the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by CGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgerfsx.f b/SRC/cgerfsx.f
index a4195497..833f331b 100644
--- a/SRC/cgerfsx.f
+++ b/SRC/cgerfsx.f
@@ -1,18 +1,435 @@
+*> \brief \b CGERFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGERFSX( TRANS, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX , * ), WORK( * )
+* REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CGERFSX improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED, R
+*> and C below. In this case, the solution and error bounds returned
+*> are for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by CGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed.
+*> If R is accessed, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed.
+*> If C is accessed, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEcomputational
+*
+* =====================================================================
SUBROUTINE CGERFSX( TRANS, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,283 +445,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGERFSX improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED, R
-* and C below. In this case, the solution and error bounds returned
-* are for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by CGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* R (input) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed.
-* If R is accessed, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed.
-* If C is accessed, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/cgerq2.f b/SRC/cgerq2.f
index c5bf3756..491b6d6f 100644
--- a/SRC/cgerq2.f
+++ b/SRC/cgerq2.f
@@ -1,69 +1,133 @@
- SUBROUTINE CGERQ2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b CGERQ2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGERQ2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGERQ2 computes an RQ factorization of a complex m by n matrix A:
-* A = R * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGERQ2 computes an RQ factorization of a complex m by n matrix A:
+*> A = R * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, if m <= n, the upper triangle of the subarray
-* A(1:m,n-m+1:n) contains the m by m upper triangular matrix R;
-* if m >= n, the elements on and above the (m-n)-th subdiagonal
-* contain the m by n upper trapezoidal matrix R; the remaining
-* elements, with the array TAU, represent the unitary matrix
-* Q as a product of elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the m by n matrix A.
+*> On exit, if m <= n, the upper triangle of the subarray
+*> A(1:m,n-m+1:n) contains the m by m upper triangular matrix R;
+*> if m >= n, the elements on and above the (m-n)-th subdiagonal
+*> contain the m by n upper trapezoidal matrix R; the remaining
+*> elements, with the array TAU, represent the unitary matrix
+*> Q as a product of elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (M)
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H, where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; conjg(v(1:n-k+i-1)) is stored on
+*> exit in A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGERQ2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H, where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; conjg(v(1:n-k+i-1)) is stored on
-* exit in A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgerqf.f b/SRC/cgerqf.f
index 9d5f6ad4..b0542179 100644
--- a/SRC/cgerqf.f
+++ b/SRC/cgerqf.f
@@ -1,81 +1,121 @@
- SUBROUTINE CGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CGERQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGERQF computes an RQ factorization of a complex M-by-N matrix A:
-* A = R * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGERQF computes an RQ factorization of a complex M-by-N matrix A:
+*> A = R * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if m <= n, the upper triangle of the subarray
-* A(1:m,n-m+1:n) contains the M-by-M upper triangular matrix R;
-* if m >= n, the elements on and above the (m-n)-th subdiagonal
-* contain the M-by-N upper trapezoidal matrix R;
-* the remaining elements, with the array TAU, represent the
-* unitary matrix Q as a product of min(m,n) elementary
-* reflectors (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H, where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; conjg(v(1:n-k+i-1)) is stored on
+*> exit in A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H, where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; conjg(v(1:n-k+i-1)) is stored on
-* exit in A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgesc2.f b/SRC/cgesc2.f
index 0335547b..30a5b670 100644
--- a/SRC/cgesc2.f
+++ b/SRC/cgesc2.f
@@ -1,65 +1,131 @@
- SUBROUTINE CGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, N
- REAL SCALE
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), JPIV( * )
- COMPLEX A( LDA, * ), RHS( * )
-* ..
-*
+*> \brief \b CGESC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* COMPLEX A( LDA, * ), RHS( * )
+* ..
+*
* Purpose
* =======
*
-* CGESC2 solves a system of linear equations
-*
-* A * X = scale* RHS
-*
-* with a general N-by-N matrix A using the LU factorization with
-* complete pivoting computed by CGETC2.
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGESC2 solves a system of linear equations
+*>
+*> A * X = scale* RHS
+*>
+*> with a general N-by-N matrix A using the LU factorization with
+*> complete pivoting computed by CGETC2.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* On entry, the LU part of the factorization of the n-by-n
-* matrix A computed by CGETC2: A = P * L * U * Q
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the LU part of the factorization of the n-by-n
+*> matrix A computed by CGETC2: A = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*> RHS is COMPLEX array, dimension N.
+*> On entry, the right hand side vector b.
+*> On exit, the solution vector X.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On exit, SCALE contains the scale factor. SCALE is chosen
+*> 0 <= SCALE <= 1 to prevent owerflow in the solution.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RHS (input/output) COMPLEX array, dimension N.
-* On entry, the right hand side vector b.
-* On exit, the solution vector X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
+*> \date November 2011
*
-* JPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
+*> \ingroup complexGEauxiliary
*
-* SCALE (output) REAL
-* On exit, SCALE contains the scale factor. SCALE is chosen
-* 0 <= SCALE <= 1 to prevent owerflow in the solution.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* .. Scalar Arguments ..
+ INTEGER LDA, N
+ REAL SCALE
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), JPIV( * )
+ COMPLEX A( LDA, * ), RHS( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgesdd.f b/SRC/cgesdd.f
index ee16770b..a176c41e 100644
--- a/SRC/cgesdd.f
+++ b/SRC/cgesdd.f
@@ -1,11 +1,230 @@
+*> \brief \b CGESC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT,
+* WORK, LWORK, RWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGESDD computes the singular value decomposition (SVD) of a complex
+*> M-by-N matrix A, optionally computing the left and/or right singular
+*> vectors, by using divide-and-conquer method. The SVD is written
+*>
+*> A = U * SIGMA * conjugate-transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
+*> V is an N-by-N unitary matrix. The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order. The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns VT = V**H, not V.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> Specifies options for computing all or part of the matrix U:
+*> = 'A': all M columns of U and all N rows of V**H are
+*> returned in the arrays U and VT;
+*> = 'S': the first min(M,N) columns of U and the first
+*> min(M,N) rows of V**H are returned in the arrays U
+*> and VT;
+*> = 'O': If M >= N, the first N columns of U are overwritten
+*> in the array A and all rows of V**H are returned in
+*> the array VT;
+*> otherwise, all columns of U are returned in the
+*> array U and the first M rows of V**H are overwritten
+*> in the array A;
+*> = 'N': no columns of U or rows of V**H are computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if JOBZ = 'O', A is overwritten with the first N columns
+*> of U (the left singular vectors, stored
+*> columnwise) if M >= N;
+*> A is overwritten with the first M rows
+*> of V**H (the right singular vectors, stored
+*> rowwise) otherwise.
+*> if JOBZ .ne. 'O', the contents of A are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,UCOL)
+*> UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
+*> UCOL = min(M,N) if JOBZ = 'S'.
+*> If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
+*> unitary matrix U;
+*> if JOBZ = 'S', U contains the first min(M,N) columns of U
+*> (the left singular vectors, stored columnwise);
+*> if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1; if
+*> JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is COMPLEX array, dimension (LDVT,N)
+*> If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
+*> N-by-N unitary matrix V**H;
+*> if JOBZ = 'S', VT contains the first min(M,N) rows of
+*> V**H (the right singular vectors, stored rowwise);
+*> if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1; if
+*> JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
+*> if JOBZ = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1.
+*> if JOBZ = 'N', LWORK >= 2*min(M,N)+max(M,N).
+*> if JOBZ = 'O',
+*> LWORK >= 2*min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
+*> if JOBZ = 'S' or 'A',
+*> LWORK >= min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, a workspace query is assumed. The optimal
+*> size for the WORK array is calculated and stored in WORK(1),
+*> and no other work except argument checking is performed.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LRWORK))
+*> If JOBZ = 'N', LRWORK >= 5*min(M,N).
+*> Otherwise,
+*> LRWORK >= min(M,N)*max(5*min(M,N)+7,2*max(M,N)+2*min(M,N)+1)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (8*min(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The updating process of SBDSDC did not converge.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsing
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT,
$ WORK, LWORK, RWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK sing routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-* 8-15-00: Improve consistency of WS calculations (eca)
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ
@@ -18,132 +237,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGESDD computes the singular value decomposition (SVD) of a complex
-* M-by-N matrix A, optionally computing the left and/or right singular
-* vectors, by using divide-and-conquer method. The SVD is written
-*
-* A = U * SIGMA * conjugate-transpose(V)
-*
-* where SIGMA is an M-by-N matrix which is zero except for its
-* min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
-* V is an N-by-N unitary matrix. The diagonal elements of SIGMA
-* are the singular values of A; they are real and non-negative, and
-* are returned in descending order. The first min(m,n) columns of
-* U and V are the left and right singular vectors of A.
-*
-* Note that the routine returns VT = V**H, not V.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix U:
-* = 'A': all M columns of U and all N rows of V**H are
-* returned in the arrays U and VT;
-* = 'S': the first min(M,N) columns of U and the first
-* min(M,N) rows of V**H are returned in the arrays U
-* and VT;
-* = 'O': If M >= N, the first N columns of U are overwritten
-* in the array A and all rows of V**H are returned in
-* the array VT;
-* otherwise, all columns of U are returned in the
-* array U and the first M rows of V**H are overwritten
-* in the array A;
-* = 'N': no columns of U or rows of V**H are computed.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if JOBZ = 'O', A is overwritten with the first N columns
-* of U (the left singular vectors, stored
-* columnwise) if M >= N;
-* A is overwritten with the first M rows
-* of V**H (the right singular vectors, stored
-* rowwise) otherwise.
-* if JOBZ .ne. 'O', the contents of A are destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* S (output) REAL array, dimension (min(M,N))
-* The singular values of A, sorted so that S(i) >= S(i+1).
-*
-* U (output) COMPLEX array, dimension (LDU,UCOL)
-* UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
-* UCOL = min(M,N) if JOBZ = 'S'.
-* If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
-* unitary matrix U;
-* if JOBZ = 'S', U contains the first min(M,N) columns of U
-* (the left singular vectors, stored columnwise);
-* if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1; if
-* JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
-*
-* VT (output) COMPLEX array, dimension (LDVT,N)
-* If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
-* N-by-N unitary matrix V**H;
-* if JOBZ = 'S', VT contains the first min(M,N) rows of
-* V**H (the right singular vectors, stored rowwise);
-* if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1; if
-* JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
-* if JOBZ = 'S', LDVT >= min(M,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1.
-* if JOBZ = 'N', LWORK >= 2*min(M,N)+max(M,N).
-* if JOBZ = 'O',
-* LWORK >= 2*min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
-* if JOBZ = 'S' or 'A',
-* LWORK >= min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, a workspace query is assumed. The optimal
-* size for the WORK array is calculated and stored in WORK(1),
-* and no other work except argument checking is performed.
-*
-* RWORK (workspace) REAL array, dimension (MAX(1,LRWORK))
-* If JOBZ = 'N', LRWORK >= 5*min(M,N).
-* Otherwise,
-* LRWORK >= min(M,N)*max(5*min(M,N)+7,2*max(M,N)+2*min(M,N)+1)
-*
-* IWORK (workspace) INTEGER array, dimension (8*min(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The updating process of SBDSDC did not converge.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgesv.f b/SRC/cgesv.f
index 2fc6fd49..d719d0d3 100644
--- a/SRC/cgesv.f
+++ b/SRC/cgesv.f
@@ -1,68 +1,131 @@
- SUBROUTINE CGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief <b> CGESV computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CGESV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* The LU decomposition with partial pivoting and row interchanges is
-* used to factor A as
-* A = P * L * U,
-* where P is a permutation matrix, L is unit lower triangular, and U is
-* upper triangular. The factored form of A is then used to solve the
-* system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGESV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as
+*> A = P * L * U,
+*> where P is a permutation matrix, L is unit lower triangular, and U is
+*> upper triangular. The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N coefficient matrix A.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS matrix of right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N coefficient matrix A.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
+*> \ingroup complexGEsolve
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS matrix of right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+* =====================================================================
+ SUBROUTINE CGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, so the solution could not be computed.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgesvd.f b/SRC/cgesvd.f
index 48e595f2..18f0019a 100644
--- a/SRC/cgesvd.f
+++ b/SRC/cgesvd.f
@@ -1,10 +1,217 @@
+*> \brief <b> CGESVD computes the singular value decomposition (SVD) for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU, JOBVT
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), S( * )
+* COMPLEX A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGESVD computes the singular value decomposition (SVD) of a complex
+*> M-by-N matrix A, optionally computing the left and/or right singular
+*> vectors. The SVD is written
+*>
+*> A = U * SIGMA * conjugate-transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
+*> V is an N-by-N unitary matrix. The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order. The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns V**H, not V.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> Specifies options for computing all or part of the matrix U:
+*> = 'A': all M columns of U are returned in array U:
+*> = 'S': the first min(m,n) columns of U (the left singular
+*> vectors) are returned in the array U;
+*> = 'O': the first min(m,n) columns of U (the left singular
+*> vectors) are overwritten on the array A;
+*> = 'N': no columns of U (no left singular vectors) are
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVT
+*> \verbatim
+*> JOBVT is CHARACTER*1
+*> Specifies options for computing all or part of the matrix
+*> V**H:
+*> = 'A': all N rows of V**H are returned in the array VT;
+*> = 'S': the first min(m,n) rows of V**H (the right singular
+*> vectors) are returned in the array VT;
+*> = 'O': the first min(m,n) rows of V**H (the right singular
+*> vectors) are overwritten on the array A;
+*> = 'N': no rows of V**H (no right singular vectors) are
+*> computed.
+*> \endverbatim
+*> \verbatim
+*> JOBVT and JOBU cannot both be 'O'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if JOBU = 'O', A is overwritten with the first min(m,n)
+*> columns of U (the left singular vectors,
+*> stored columnwise);
+*> if JOBVT = 'O', A is overwritten with the first min(m,n)
+*> rows of V**H (the right singular vectors,
+*> stored rowwise);
+*> if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
+*> are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,UCOL)
+*> (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
+*> If JOBU = 'A', U contains the M-by-M unitary matrix U;
+*> if JOBU = 'S', U contains the first min(m,n) columns of U
+*> (the left singular vectors, stored columnwise);
+*> if JOBU = 'N' or 'O', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1; if
+*> JOBU = 'S' or 'A', LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is COMPLEX array, dimension (LDVT,N)
+*> If JOBVT = 'A', VT contains the N-by-N unitary matrix
+*> V**H;
+*> if JOBVT = 'S', VT contains the first min(m,n) rows of
+*> V**H (the right singular vectors, stored rowwise);
+*> if JOBVT = 'N' or 'O', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1; if
+*> JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX(1,2*MIN(M,N)+MAX(M,N)).
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (5*min(M,N))
+*> On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the
+*> unconverged superdiagonal elements of an upper bidiagonal
+*> matrix B whose diagonal is in S (not necessarily sorted).
+*> B satisfies A = U * B * VT, so it has the same singular
+*> values as A, and singular vectors related by U and VT.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if CBDSQR did not converge, INFO specifies how many
+*> superdiagonals of an intermediate bidiagonal form B
+*> did not converge to zero. See the description of RWORK
+*> above for details.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsing
+*
+* =====================================================================
SUBROUTINE CGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
$ WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK sing routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU, JOBVT
@@ -16,124 +223,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGESVD computes the singular value decomposition (SVD) of a complex
-* M-by-N matrix A, optionally computing the left and/or right singular
-* vectors. The SVD is written
-*
-* A = U * SIGMA * conjugate-transpose(V)
-*
-* where SIGMA is an M-by-N matrix which is zero except for its
-* min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
-* V is an N-by-N unitary matrix. The diagonal elements of SIGMA
-* are the singular values of A; they are real and non-negative, and
-* are returned in descending order. The first min(m,n) columns of
-* U and V are the left and right singular vectors of A.
-*
-* Note that the routine returns V**H, not V.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix U:
-* = 'A': all M columns of U are returned in array U:
-* = 'S': the first min(m,n) columns of U (the left singular
-* vectors) are returned in the array U;
-* = 'O': the first min(m,n) columns of U (the left singular
-* vectors) are overwritten on the array A;
-* = 'N': no columns of U (no left singular vectors) are
-* computed.
-*
-* JOBVT (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix
-* V**H:
-* = 'A': all N rows of V**H are returned in the array VT;
-* = 'S': the first min(m,n) rows of V**H (the right singular
-* vectors) are returned in the array VT;
-* = 'O': the first min(m,n) rows of V**H (the right singular
-* vectors) are overwritten on the array A;
-* = 'N': no rows of V**H (no right singular vectors) are
-* computed.
-*
-* JOBVT and JOBU cannot both be 'O'.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if JOBU = 'O', A is overwritten with the first min(m,n)
-* columns of U (the left singular vectors,
-* stored columnwise);
-* if JOBVT = 'O', A is overwritten with the first min(m,n)
-* rows of V**H (the right singular vectors,
-* stored rowwise);
-* if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
-* are destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* S (output) REAL array, dimension (min(M,N))
-* The singular values of A, sorted so that S(i) >= S(i+1).
-*
-* U (output) COMPLEX array, dimension (LDU,UCOL)
-* (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
-* If JOBU = 'A', U contains the M-by-M unitary matrix U;
-* if JOBU = 'S', U contains the first min(m,n) columns of U
-* (the left singular vectors, stored columnwise);
-* if JOBU = 'N' or 'O', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1; if
-* JOBU = 'S' or 'A', LDU >= M.
-*
-* VT (output) COMPLEX array, dimension (LDVT,N)
-* If JOBVT = 'A', VT contains the N-by-N unitary matrix
-* V**H;
-* if JOBVT = 'S', VT contains the first min(m,n) rows of
-* V**H (the right singular vectors, stored rowwise);
-* if JOBVT = 'N' or 'O', VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1; if
-* JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX(1,2*MIN(M,N)+MAX(M,N)).
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (5*min(M,N))
-* On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the
-* unconverged superdiagonal elements of an upper bidiagonal
-* matrix B whose diagonal is in S (not necessarily sorted).
-* B satisfies A = U * B * VT, so it has the same singular
-* values as A, and singular vectors related by U and VT.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if CBDSQR did not converge, INFO specifies how many
-* superdiagonals of an intermediate bidiagonal form B
-* did not converge to zero. See the description of RWORK
-* above for details.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgesvx.f b/SRC/cgesvx.f
index d675baab..49c317f3 100644
--- a/SRC/cgesvx.f
+++ b/SRC/cgesvx.f
@@ -1,11 +1,353 @@
+*> \brief <b> CGESVX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), C( * ), FERR( * ), R( * ),
+* $ RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGESVX uses the LU factorization to compute the solution to a complex
+*> system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*> matrix A (after equilibration if FACT = 'E') as
+*> A = P * L * U,
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
+*> not 'N', then A must have been equilibrated by the scaling
+*> factors in R and/or C. A is not modified if FACT = 'F' or
+*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the factors L and U from the factorization
+*> A = P*L*U as computed by CGETRF. If EQUED .ne. 'N', then
+*> AF is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by CGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*> to the original system of equations. Note that A and B are
+*> modified on exit if EQUED .ne. 'N', and the solution to the
+*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*> and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> On exit, RWORK(1) contains the reciprocal pivot growth
+*> factor norm(A)/norm(U). The "max absolute element" norm is
+*> used. If RWORK(1) is much less than 1, then the stability
+*> of the LU factorization of the (equilibrated) matrix A
+*> could be poor. This also means that the solution X, condition
+*> estimator RCOND, and forward error bound FERR could be
+*> unreliable. If factorization fails with 0<INFO<=N, then
+*> RWORK(1) contains the reciprocal pivot growth factor for the
+*> leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization has
+*> been completed, but the factor U is exactly
+*> singular, so the solution and error bounds
+*> could not be computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsolve
+*
+* =====================================================================
SUBROUTINE CGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
@@ -20,231 +362,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGESVX uses the LU factorization to compute the solution to a complex
-* system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-* matrix A (after equilibration if FACT = 'E') as
-* A = P * L * U,
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-* not 'N', then A must have been equilibrated by the scaling
-* factors in R and/or C. A is not modified if FACT = 'F' or
-* 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the factors L and U from the factorization
-* A = P*L*U as computed by CGETRF. If EQUED .ne. 'N', then
-* AF is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by CGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-* to the original system of equations. Note that A and B are
-* modified on exit if EQUED .ne. 'N', and the solution to the
-* equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-* and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace/output) REAL array, dimension (2*N)
-* On exit, RWORK(1) contains the reciprocal pivot growth
-* factor norm(A)/norm(U). The "max absolute element" norm is
-* used. If RWORK(1) is much less than 1, then the stability
-* of the LU factorization of the (equilibrated) matrix A
-* could be poor. This also means that the solution X, condition
-* estimator RCOND, and forward error bound FERR could be
-* unreliable. If factorization fails with 0<INFO<=N, then
-* RWORK(1) contains the reciprocal pivot growth factor for the
-* leading INFO columns of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization has
-* been completed, but the factor U is exactly
-* singular, so the solution and error bounds
-* could not be computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgesvxx.f b/SRC/cgesvxx.f
index 36e7ac43..6241424e 100644
--- a/SRC/cgesvxx.f
+++ b/SRC/cgesvxx.f
@@ -1,19 +1,566 @@
+*> \brief <b> CGESVXX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGESVXX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW,
+* BERR, N_ERR_BNDS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CGESVXX uses the LU factorization to compute the solution to a
+*> complex system of linear equations A * X = B, where A is an
+*> N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. CGESVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> CGESVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> CGESVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what CGESVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = P * L * U,
+*>
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is less
+*> than machine precision, the routine still goes on to solve for X
+*> and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
+*> not 'N', then A must have been equilibrated by the scaling
+*> factors in R and/or C. A is not modified if FACT = 'F' or
+*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the factors L and U from the factorization
+*> A = P*L*U as computed by CGETRF. If EQUED .ne. 'N', then
+*> AF is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by CGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit
+*> if EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
+*> inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A. In CGESVX, this quantity is
+*> returned in WORK(1).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEsolve
+*
+* =====================================================================
SUBROUTINE CGESVXX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW,
$ BERR, N_ERR_BNDS, ERR_BNDS_NORM,
$ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -29,401 +576,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGESVXX uses the LU factorization to compute the solution to a
-* complex system of linear equations A * X = B, where A is an
-* N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. CGESVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* CGESVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* CGESVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what CGESVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = P * L * U,
-*
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is less
-* than machine precision, the routine still goes on to solve for X
-* and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-* not 'N', then A must have been equilibrated by the scaling
-* factors in R and/or C. A is not modified if FACT = 'F' or
-* 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the factors L and U from the factorization
-* A = P*L*U as computed by CGETRF. If EQUED .ne. 'N', then
-* AF is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by CGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit
-* if EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
-* inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A. In CGESVX, this quantity is
-* returned in WORK(1).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/cgetc2.f b/SRC/cgetc2.f
index 0782a686..7c7a0940 100644
--- a/SRC/cgetc2.f
+++ b/SRC/cgetc2.f
@@ -1,64 +1,126 @@
- SUBROUTINE CGETC2( N, A, LDA, IPIV, JPIV, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), JPIV( * )
- COMPLEX A( LDA, * )
-* ..
-*
+*> \brief \b CGETC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGETC2 computes an LU factorization, using complete pivoting, of the
-* n-by-n matrix A. The factorization has the form A = P * L * U * Q,
-* where P and Q are permutation matrices, L is lower triangular with
-* unit diagonal elements and U is upper triangular.
-*
-* This is a level 1 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGETC2 computes an LU factorization, using complete pivoting, of the
+*> n-by-n matrix A. The factorization has the form A = P * L * U * Q,
+*> where P and Q are permutation matrices, L is lower triangular with
+*> unit diagonal elements and U is upper triangular.
+*>
+*> This is a level 1 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the n-by-n matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U*Q; the unit diagonal elements of L are not stored.
-* If U(k, k) appears to be less than SMIN, U(k, k) is given the
-* value of SMIN, giving a nonsingular perturbed system.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the n-by-n matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U*Q; the unit diagonal elements of L are not stored.
+*> If U(k, k) appears to be less than SMIN, U(k, k) is given the
+*> value of SMIN, giving a nonsingular perturbed system.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, U(k, k) is likely to produce overflow if
+*> one tries to solve for x in Ax = b. So U is perturbed
+*> to avoid the overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (output) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
+*> \date November 2011
*
-* JPIV (output) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
+*> \ingroup complexGEauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, U(k, k) is likely to produce overflow if
-* one tries to solve for x in Ax = b. So U is perturbed
-* to avoid the overflow.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), JPIV( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgetf2.f b/SRC/cgetf2.f
index f038e961..bfa3f43a 100644
--- a/SRC/cgetf2.f
+++ b/SRC/cgetf2.f
@@ -1,60 +1,117 @@
- SUBROUTINE CGETF2( M, N, A, LDA, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * )
-* ..
-*
+*> \brief \b CGETF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGETF2( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGETF2 computes an LU factorization of a general m-by-n matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the right-looking Level 2 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGETF2 computes an LU factorization of a general m-by-n matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*> A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 2 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the m by n matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup complexGEcomputational
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* =====================================================================
+ SUBROUTINE CGETF2( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgetrf.f b/SRC/cgetrf.f
index 076fac8f..4241103a 100644
--- a/SRC/cgetrf.f
+++ b/SRC/cgetrf.f
@@ -1,60 +1,117 @@
- SUBROUTINE CGETRF( M, N, A, LDA, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * )
-* ..
-*
+*> \brief \b CGETRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the right-looking Level 3 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGETRF computes an LU factorization of a general M-by-N matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*> A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup complexGEcomputational
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* =====================================================================
+ SUBROUTINE CGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgetri.f b/SRC/cgetri.f
index 9c7288d8..595d5f8e 100644
--- a/SRC/cgetri.f
+++ b/SRC/cgetri.f
@@ -1,63 +1,124 @@
- SUBROUTINE CGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b CGETRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGETRI computes the inverse of a matrix using the LU factorization
-* computed by CGETRF.
-*
-* This method inverts U and then computes inv(A) by solving the system
-* inv(A)*L = inv(U) for inv(A).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGETRI computes the inverse of a matrix using the LU factorization
+*> computed by CGETRF.
+*>
+*> This method inverts U and then computes inv(A) by solving the system
+*> inv(A)*L = inv(U) for inv(A).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the factors L and U from the factorization
-* A = P*L*U as computed by CGETRF.
-* On exit, if INFO = 0, the inverse of the original matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the factors L and U from the factorization
+*> A = P*L*U as computed by CGETRF.
+*> On exit, if INFO = 0, the inverse of the original matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimal performance LWORK >= N*NB, where NB is
+*> the optimal blocksize returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero; the matrix is
+*> singular and its inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \ingroup complexGEcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimal performance LWORK >= N*NB, where NB is
-* the optimal blocksize returned by ILAENV.
+* =====================================================================
+ SUBROUTINE CGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is
-* singular and its inverse could not be computed.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgetrs.f b/SRC/cgetrs.f
index dfac3bd4..07aaaf54 100644
--- a/SRC/cgetrs.f
+++ b/SRC/cgetrs.f
@@ -1,64 +1,131 @@
- SUBROUTINE CGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b CGETRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CGETRS solves a system of linear equations
-* A * X = B, A**T * X = B, or A**H * X = B
-* with a general N-by-N matrix A using the LU factorization computed
-* by CGETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGETRS solves a system of linear equations
+*> A * X = B, A**T * X = B, or A**H * X = B
+*> with a general N-by-N matrix A using the LU factorization computed
+*> by CGETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by CGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by CGETRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup complexGEcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE CGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cggbak.f b/SRC/cggbak.f
index 86818b1b..c9ce3d8a 100644
--- a/SRC/cggbak.f
+++ b/SRC/cggbak.f
@@ -1,81 +1,160 @@
- SUBROUTINE CGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
- $ LDV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOB, SIDE
- INTEGER IHI, ILO, INFO, LDV, M, N
-* ..
-* .. Array Arguments ..
- REAL LSCALE( * ), RSCALE( * )
- COMPLEX V( LDV, * )
-* ..
-*
+*> \brief \b CGGBAK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+* LDV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB, SIDE
+* INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+* REAL LSCALE( * ), RSCALE( * )
+* COMPLEX V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* CGGBAK forms the right or left eigenvectors of a complex generalized
-* eigenvalue problem A*x = lambda*B*x, by backward transformation on
-* the computed eigenvectors of the balanced pair of matrices output by
-* CGGBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGBAK forms the right or left eigenvectors of a complex generalized
+*> eigenvalue problem A*x = lambda*B*x, by backward transformation on
+*> the computed eigenvectors of the balanced pair of matrices output by
+*> CGGBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the type of backward transformation required:
-* = 'N': do nothing, return immediately;
-* = 'P': do backward transformation for permutation only;
-* = 'S': do backward transformation for scaling only;
-* = 'B': do backward transformations for both permutation and
-* scaling.
-* JOB must be the same as the argument JOB supplied to CGGBAL.
-*
-* SIDE (input) CHARACTER*1
-* = 'R': V contains right eigenvectors;
-* = 'L': V contains left eigenvectors.
-*
-* N (input) INTEGER
-* The number of rows of the matrix V. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* The integers ILO and IHI determined by CGGBAL.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* LSCALE (input) REAL array, dimension (N)
-* Details of the permutations and/or scaling factors applied
-* to the left side of A and B, as returned by CGGBAL.
-*
-* RSCALE (input) REAL array, dimension (N)
-* Details of the permutations and/or scaling factors applied
-* to the right side of A and B, as returned by CGGBAL.
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the type of backward transformation required:
+*> = 'N': do nothing, return immediately;
+*> = 'P': do backward transformation for permutation only;
+*> = 'S': do backward transformation for scaling only;
+*> = 'B': do backward transformations for both permutation and
+*> scaling.
+*> JOB must be the same as the argument JOB supplied to CGGBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': V contains right eigenvectors;
+*> = 'L': V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrix V. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> The integers ILO and IHI determined by CGGBAL.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] LSCALE
+*> \verbatim
+*> LSCALE is REAL array, dimension (N)
+*> Details of the permutations and/or scaling factors applied
+*> to the left side of A and B, as returned by CGGBAL.
+*> \endverbatim
+*>
+*> \param[in] RSCALE
+*> \verbatim
+*> RSCALE is REAL array, dimension (N)
+*> Details of the permutations and/or scaling factors applied
+*> to the right side of A and B, as returned by CGGBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix V. M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,M)
+*> On entry, the matrix of right or left eigenvectors to be
+*> transformed, as returned by CTGEVC.
+*> On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the matrix V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of columns of the matrix V. M >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* V (input/output) COMPLEX array, dimension (LDV,M)
-* On entry, the matrix of right or left eigenvectors to be
-* transformed, as returned by CTGEVC.
-* On exit, V is overwritten by the transformed eigenvectors.
+*> \date November 2011
*
-* LDV (input) INTEGER
-* The leading dimension of the matrix V. LDV >= max(1,N).
+*> \ingroup complexGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> See R.C. Ward, Balancing the generalized eigenvalue problem,
+*> SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+ $ LDV, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* See R.C. Ward, Balancing the generalized eigenvalue problem,
-* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+* .. Scalar Arguments ..
+ CHARACTER JOB, SIDE
+ INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+ REAL LSCALE( * ), RSCALE( * )
+ COMPLEX V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cggbal.f b/SRC/cggbal.f
index 96df275d..6c7d951a 100644
--- a/SRC/cggbal.f
+++ b/SRC/cggbal.f
@@ -1,10 +1,180 @@
+*> \brief \b CGGBAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
+* RSCALE, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER IHI, ILO, INFO, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* REAL LSCALE( * ), RSCALE( * ), WORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGBAL balances a pair of general complex matrices (A,B). This
+*> involves, first, permuting A and B by similarity transformations to
+*> isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
+*> elements on the diagonal; and second, applying a diagonal similarity
+*> transformation to rows and columns ILO to IHI to make the rows
+*> and columns as close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrices, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors in the
+*> generalized eigenvalue problem A*x = lambda*B*x.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the operations to be performed on A and B:
+*> = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
+*> and RSCALE(I) = 1.0 for i=1,...,N;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the input matrix A.
+*> On exit, A is overwritten by the balanced matrix.
+*> If JOB = 'N', A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> On entry, the input matrix B.
+*> On exit, B is overwritten by the balanced matrix.
+*> If JOB = 'N', B is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are set to integers such that on exit
+*> A(i,j) = 0 and B(i,j) = 0 if i > j and
+*> j = 1,...,ILO-1 or i = IHI+1,...,N.
+*> If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the left side of A and B. If P(j) is the index of the
+*> row interchanged with row j, and D(j) is the scaling factor
+*> applied to row j, then
+*> LSCALE(j) = P(j) for J = 1,...,ILO-1
+*> = D(j) for J = ILO,...,IHI
+*> = P(j) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the right side of A and B. If P(j) is the index of the
+*> column interchanged with column j, and D(j) is the scaling
+*> factor applied to column j, then
+*> RSCALE(j) = P(j) for J = 1,...,ILO-1
+*> = D(j) for J = ILO,...,IHI
+*> = P(j) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (lwork)
+*> lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
+*> at least 1 when JOB = 'N' or 'P'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> See R.C. WARD, Balancing the generalized eigenvalue problem,
+*> SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
$ RSCALE, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOB
@@ -15,94 +185,6 @@
COMPLEX A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CGGBAL balances a pair of general complex matrices (A,B). This
-* involves, first, permuting A and B by similarity transformations to
-* isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
-* elements on the diagonal; and second, applying a diagonal similarity
-* transformation to rows and columns ILO to IHI to make the rows
-* and columns as close in norm as possible. Both steps are optional.
-*
-* Balancing may reduce the 1-norm of the matrices, and improve the
-* accuracy of the computed eigenvalues and/or eigenvectors in the
-* generalized eigenvalue problem A*x = lambda*B*x.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies the operations to be performed on A and B:
-* = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
-* and RSCALE(I) = 1.0 for i=1,...,N;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the input matrix A.
-* On exit, A is overwritten by the balanced matrix.
-* If JOB = 'N', A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the input matrix B.
-* On exit, B is overwritten by the balanced matrix.
-* If JOB = 'N', B is not referenced.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are set to integers such that on exit
-* A(i,j) = 0 and B(i,j) = 0 if i > j and
-* j = 1,...,ILO-1 or i = IHI+1,...,N.
-* If JOB = 'N' or 'S', ILO = 1 and IHI = N.
-*
-* LSCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the left side of A and B. If P(j) is the index of the
-* row interchanged with row j, and D(j) is the scaling factor
-* applied to row j, then
-* LSCALE(j) = P(j) for J = 1,...,ILO-1
-* = D(j) for J = ILO,...,IHI
-* = P(j) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* RSCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the right side of A and B. If P(j) is the index of the
-* column interchanged with column j, and D(j) is the scaling
-* factor applied to column j, then
-* RSCALE(j) = P(j) for J = 1,...,ILO-1
-* = D(j) for J = ILO,...,IHI
-* = P(j) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* WORK (workspace) REAL array, dimension (lwork)
-* lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
-* at least 1 when JOB = 'N' or 'P'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* See R.C. WARD, Balancing the generalized eigenvalue problem,
-* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgges.f b/SRC/cgges.f
index 570f095f..b7e81822 100644
--- a/SRC/cgges.f
+++ b/SRC/cgges.f
@@ -1,11 +1,274 @@
+*> \brief <b> CGGES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
+* SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
+* LWORK, RWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR, SORT
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+* $ WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELCTG
+* EXTERNAL SELCTG
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGES computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, the generalized complex Schur
+*> form (S, T), and optionally left and/or right Schur vectors (VSL
+*> and VSR). This gives the generalized Schur factorization
+*>
+*> (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )
+*>
+*> where (VSR)**H is the conjugate-transpose of VSR.
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> triangular matrix S and the upper triangular matrix T. The leading
+*> columns of VSL and VSR then form an unitary basis for the
+*> corresponding left and right eigenspaces (deflating subspaces).
+*>
+*> (If only the generalized eigenvalues are needed, use the driver
+*> CGGEV instead, which is faster.)
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0, and even for both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized complex Schur form if S
+*> and T are upper triangular and, in addition, the diagonal elements
+*> of T are non-negative real numbers.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the generalized Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELCTG).
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*> SELCTG is procedure) LOGICAL FUNCTION of two COMPLEX arguments
+*> SELCTG must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'N', SELCTG is not referenced.
+*> If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> An eigenvalue ALPHA(j)/BETA(j) is selected if
+*> SELCTG(ALPHA(j),BETA(j)) is true.
+*> \endverbatim
+*> \verbatim
+*> Note that a selected complex eigenvalue may no longer satisfy
+*> SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
+*> ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned), in this
+*> case INFO is set to N+2 (See INFO below).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the first of the pair of matrices.
+*> On exit, A has been overwritten by its generalized Schur
+*> form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the second of the pair of matrices.
+*> On exit, B has been overwritten by its generalized Schur
+*> form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELCTG is true.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
+*> generalized eigenvalues. ALPHA(j), j=1,...,N and BETA(j),
+*> j=1,...,N are the diagonals of the complex Schur form (A,B)
+*> output by CGGES. The BETA(j) will be non-negative real.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHA(j)/BETA(j) may easily over- or
+*> underflow, and BETA(j) may even be zero. Thus, the user
+*> should avoid naively computing the ratio alpha/beta.
+*> However, ALPHA will be always less than and usually
+*> comparable with norm(A) in magnitude, and BETA always less
+*> than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is COMPLEX array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >= 1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is COMPLEX array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> =1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHA(j) and BETA(j) should be correct for
+*> j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in CHGEQZ
+*> =N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Generalized Schur form no
+*> longer satisfy SELCTG=.TRUE. This could also
+*> be caused due to scaling.
+*> =N+3: reordering falied in CTGSEN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+* =====================================================================
SUBROUTINE CGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
$ SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
$ LWORK, RWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR, SORT
@@ -23,154 +286,6 @@
EXTERNAL SELCTG
* ..
*
-* Purpose
-* =======
-*
-* CGGES computes for a pair of N-by-N complex nonsymmetric matrices
-* (A,B), the generalized eigenvalues, the generalized complex Schur
-* form (S, T), and optionally left and/or right Schur vectors (VSL
-* and VSR). This gives the generalized Schur factorization
-*
-* (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )
-*
-* where (VSR)**H is the conjugate-transpose of VSR.
-*
-* Optionally, it also orders the eigenvalues so that a selected cluster
-* of eigenvalues appears in the leading diagonal blocks of the upper
-* triangular matrix S and the upper triangular matrix T. The leading
-* columns of VSL and VSR then form an unitary basis for the
-* corresponding left and right eigenspaces (deflating subspaces).
-*
-* (If only the generalized eigenvalues are needed, use the driver
-* CGGEV instead, which is faster.)
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is a
-* reasonable interpretation for beta=0, and even for both being zero.
-*
-* A pair of matrices (S,T) is in generalized complex Schur form if S
-* and T are upper triangular and, in addition, the diagonal elements
-* of T are non-negative real numbers.
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors.
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the generalized Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELCTG).
-*
-* SELCTG (external procedure) LOGICAL FUNCTION of two COMPLEX arguments
-* SELCTG must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'N', SELCTG is not referenced.
-* If SORT = 'S', SELCTG is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* An eigenvalue ALPHA(j)/BETA(j) is selected if
-* SELCTG(ALPHA(j),BETA(j)) is true.
-*
-* Note that a selected complex eigenvalue may no longer satisfy
-* SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
-* ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned), in this
-* case INFO is set to N+2 (See INFO below).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the first of the pair of matrices.
-* On exit, A has been overwritten by its generalized Schur
-* form S.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the second of the pair of matrices.
-* On exit, B has been overwritten by its generalized Schur
-* form T.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELCTG is true.
-*
-* ALPHA (output) COMPLEX array, dimension (N)
-*
-* BETA (output) COMPLEX array, dimension (N)
-* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
-* generalized eigenvalues. ALPHA(j), j=1,...,N and BETA(j),
-* j=1,...,N are the diagonals of the complex Schur form (A,B)
-* output by CGGES. The BETA(j) will be non-negative real.
-*
-* Note: the quotients ALPHA(j)/BETA(j) may easily over- or
-* underflow, and BETA(j) may even be zero. Thus, the user
-* should avoid naively computing the ratio alpha/beta.
-* However, ALPHA will be always less than and usually
-* comparable with norm(A) in magnitude, and BETA always less
-* than and usually comparable with norm(B).
-*
-* VSL (output) COMPLEX array, dimension (LDVSL,N)
-* If JOBVSL = 'V', VSL will contain the left Schur vectors.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >= 1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) COMPLEX array, dimension (LDVSR,N)
-* If JOBVSR = 'V', VSR will contain the right Schur vectors.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (8*N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* =1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHA(j) and BETA(j) should be correct for
-* j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in CHGEQZ
-* =N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Generalized Schur form no
-* longer satisfy SELCTG=.TRUE. This could also
-* be caused due to scaling.
-* =N+3: reordering falied in CTGSEN.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cggesx.f b/SRC/cggesx.f
index 9ac26cb8..833d8628 100644
--- a/SRC/cggesx.f
+++ b/SRC/cggesx.f
@@ -1,12 +1,334 @@
+*> \brief <b> CGGESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA,
+* B, LDB, SDIM, ALPHA, BETA, VSL, LDVSL, VSR,
+* LDVSR, RCONDE, RCONDV, WORK, LWORK, RWORK,
+* IWORK, LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR, SENSE, SORT
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LIWORK, LWORK, N,
+* $ SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL RCONDE( 2 ), RCONDV( 2 ), RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+* $ WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELCTG
+* EXTERNAL SELCTG
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGESX computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, the complex Schur form (S,T),
+*> and, optionally, the left and/or right matrices of Schur vectors (VSL
+*> and VSR). This gives the generalized Schur factorization
+*>
+*> (A,B) = ( (VSL) S (VSR)**H, (VSL) T (VSR)**H )
+*>
+*> where (VSR)**H is the conjugate-transpose of VSR.
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> triangular matrix S and the upper triangular matrix T; computes
+*> a reciprocal condition number for the average of the selected
+*> eigenvalues (RCONDE); and computes a reciprocal condition number for
+*> the right and left deflating subspaces corresponding to the selected
+*> eigenvalues (RCONDV). The leading columns of VSL and VSR then form
+*> an orthonormal basis for the corresponding left and right eigenspaces
+*> (deflating subspaces).
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0 or for both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized complex Schur form if T is
+*> upper triangular with non-negative diagonal and S is upper
+*> triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the generalized Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELCTG).
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*> SELCTG is procedure) LOGICAL FUNCTION of two COMPLEX arguments
+*> SELCTG must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'N', SELCTG is not referenced.
+*> If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> Note that a selected complex eigenvalue may no longer satisfy
+*> SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
+*> ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned), in this
+*> case INFO is set to N+3 see INFO below).
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N' : None are computed;
+*> = 'E' : Computed for average of selected eigenvalues only;
+*> = 'V' : Computed for selected deflating subspaces only;
+*> = 'B' : Computed for both.
+*> If SENSE = 'E', 'V', or 'B', SORT must equal 'S'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the first of the pair of matrices.
+*> On exit, A has been overwritten by its generalized Schur
+*> form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the second of the pair of matrices.
+*> On exit, B has been overwritten by its generalized Schur
+*> form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELCTG is true.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
+*> generalized eigenvalues. ALPHA(j) and BETA(j),j=1,...,N are
+*> the diagonals of the complex Schur form (S,T). BETA(j) will
+*> be non-negative real.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHA(j)/BETA(j) may easily over- or
+*> underflow, and BETA(j) may even be zero. Thus, the user
+*> should avoid naively computing the ratio alpha/beta.
+*> However, ALPHA will be always less than and usually
+*> comparable with norm(A) in magnitude, and BETA always less
+*> than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is COMPLEX array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >=1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is COMPLEX array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension ( 2 )
+*> If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
+*> reciprocal condition numbers for the average of the selected
+*> eigenvalues.
+*> Not referenced if SENSE = 'N' or 'V'.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension ( 2 )
+*> If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
+*> reciprocal condition number for the selected deflating
+*> subspaces.
+*> Not referenced if SENSE = 'N' or 'E'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N = 0, LWORK >= 1, else if SENSE = 'E', 'V', or 'B',
+*> LWORK >= MAX(1,2*N,2*SDIM*(N-SDIM)), else
+*> LWORK >= MAX(1,2*N). Note that 2*SDIM*(N-SDIM) <= N*N/2.
+*> Note also that an error is only returned if
+*> LWORK < MAX(1,2*N), but if SENSE = 'E' or 'V' or 'B' this may
+*> not be large enough.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the bound on the optimal size of the WORK
+*> array and the minimum size of the IWORK array, returns these
+*> values as the first entries of the WORK and IWORK arrays, and
+*> no error message related to LWORK or LIWORK is issued by
+*> XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension ( 8*N )
+*> Real workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SENSE = 'N' or N = 0, LIWORK >= 1, otherwise
+*> LIWORK >= N+2.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the bound on the optimal size of the
+*> WORK array and the minimum size of the IWORK array, returns
+*> these values as the first entries of the WORK and IWORK
+*> arrays, and no error message related to LWORK or LIWORK is
+*> issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHA(j) and BETA(j) should be correct for
+*> j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in CHGEQZ
+*> =N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Generalized Schur form no
+*> longer satisfy SELCTG=.TRUE. This could also
+*> be caused due to scaling.
+*> =N+3: reordering failed in CTGSEN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+* =====================================================================
SUBROUTINE CGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA,
$ B, LDB, SDIM, ALPHA, BETA, VSL, LDVSL, VSR,
$ LDVSR, RCONDE, RCONDV, WORK, LWORK, RWORK,
$ IWORK, LIWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR, SENSE, SORT
@@ -26,195 +348,6 @@
EXTERNAL SELCTG
* ..
*
-* Purpose
-* =======
-*
-* CGGESX computes for a pair of N-by-N complex nonsymmetric matrices
-* (A,B), the generalized eigenvalues, the complex Schur form (S,T),
-* and, optionally, the left and/or right matrices of Schur vectors (VSL
-* and VSR). This gives the generalized Schur factorization
-*
-* (A,B) = ( (VSL) S (VSR)**H, (VSL) T (VSR)**H )
-*
-* where (VSR)**H is the conjugate-transpose of VSR.
-*
-* Optionally, it also orders the eigenvalues so that a selected cluster
-* of eigenvalues appears in the leading diagonal blocks of the upper
-* triangular matrix S and the upper triangular matrix T; computes
-* a reciprocal condition number for the average of the selected
-* eigenvalues (RCONDE); and computes a reciprocal condition number for
-* the right and left deflating subspaces corresponding to the selected
-* eigenvalues (RCONDV). The leading columns of VSL and VSR then form
-* an orthonormal basis for the corresponding left and right eigenspaces
-* (deflating subspaces).
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is a
-* reasonable interpretation for beta=0 or for both being zero.
-*
-* A pair of matrices (S,T) is in generalized complex Schur form if T is
-* upper triangular with non-negative diagonal and S is upper
-* triangular.
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors.
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the generalized Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELCTG).
-*
-* SELCTG (external procedure) LOGICAL FUNCTION of two COMPLEX arguments
-* SELCTG must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'N', SELCTG is not referenced.
-* If SORT = 'S', SELCTG is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* Note that a selected complex eigenvalue may no longer satisfy
-* SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
-* ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned), in this
-* case INFO is set to N+3 see INFO below).
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N' : None are computed;
-* = 'E' : Computed for average of selected eigenvalues only;
-* = 'V' : Computed for selected deflating subspaces only;
-* = 'B' : Computed for both.
-* If SENSE = 'E', 'V', or 'B', SORT must equal 'S'.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the first of the pair of matrices.
-* On exit, A has been overwritten by its generalized Schur
-* form S.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the second of the pair of matrices.
-* On exit, B has been overwritten by its generalized Schur
-* form T.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELCTG is true.
-*
-* ALPHA (output) COMPLEX array, dimension (N)
-*
-* BETA (output) COMPLEX array, dimension (N)
-* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
-* generalized eigenvalues. ALPHA(j) and BETA(j),j=1,...,N are
-* the diagonals of the complex Schur form (S,T). BETA(j) will
-* be non-negative real.
-*
-* Note: the quotients ALPHA(j)/BETA(j) may easily over- or
-* underflow, and BETA(j) may even be zero. Thus, the user
-* should avoid naively computing the ratio alpha/beta.
-* However, ALPHA will be always less than and usually
-* comparable with norm(A) in magnitude, and BETA always less
-* than and usually comparable with norm(B).
-*
-* VSL (output) COMPLEX array, dimension (LDVSL,N)
-* If JOBVSL = 'V', VSL will contain the left Schur vectors.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >=1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) COMPLEX array, dimension (LDVSR,N)
-* If JOBVSR = 'V', VSR will contain the right Schur vectors.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* RCONDE (output) REAL array, dimension ( 2 )
-* If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
-* reciprocal condition numbers for the average of the selected
-* eigenvalues.
-* Not referenced if SENSE = 'N' or 'V'.
-*
-* RCONDV (output) REAL array, dimension ( 2 )
-* If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
-* reciprocal condition number for the selected deflating
-* subspaces.
-* Not referenced if SENSE = 'N' or 'E'.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N = 0, LWORK >= 1, else if SENSE = 'E', 'V', or 'B',
-* LWORK >= MAX(1,2*N,2*SDIM*(N-SDIM)), else
-* LWORK >= MAX(1,2*N). Note that 2*SDIM*(N-SDIM) <= N*N/2.
-* Note also that an error is only returned if
-* LWORK < MAX(1,2*N), but if SENSE = 'E' or 'V' or 'B' this may
-* not be large enough.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the bound on the optimal size of the WORK
-* array and the minimum size of the IWORK array, returns these
-* values as the first entries of the WORK and IWORK arrays, and
-* no error message related to LWORK or LIWORK is issued by
-* XERBLA.
-*
-* RWORK (workspace) REAL array, dimension ( 8*N )
-* Real workspace.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SENSE = 'N' or N = 0, LIWORK >= 1, otherwise
-* LIWORK >= N+2.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the bound on the optimal size of the
-* WORK array and the minimum size of the IWORK array, returns
-* these values as the first entries of the WORK and IWORK
-* arrays, and no error message related to LWORK or LIWORK is
-* issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHA(j) and BETA(j) should be correct for
-* j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in CHGEQZ
-* =N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Generalized Schur form no
-* longer satisfy SELCTG=.TRUE. This could also
-* be caused due to scaling.
-* =N+3: reordering failed in CTGSEN.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cggev.f b/SRC/cggev.f
index 3ce1d101..1a03d54c 100644
--- a/SRC/cggev.f
+++ b/SRC/cggev.f
@@ -1,10 +1,220 @@
+*> \brief <b> CGGEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
+* VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGEV computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, and optionally, the left and/or
+*> right generalized eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right generalized eigenvector v(j) corresponding to the
+*> generalized eigenvalue lambda(j) of (A,B) satisfies
+*>
+*> A * v(j) = lambda(j) * B * v(j).
+*>
+*> The left generalized eigenvector u(j) corresponding to the
+*> generalized eigenvalues lambda(j) of (A,B) satisfies
+*>
+*> u(j)**H * A = lambda(j) * u(j)**H * B
+*>
+*> where u(j)**H is the conjugate-transpose of u(j).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the matrix A in the pair (A,B).
+*> On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the matrix B in the pair (A,B).
+*> On exit, B has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
+*> generalized eigenvalues.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHA(j)/BETA(j) may easily over- or
+*> underflow, and BETA(j) may even be zero. Thus, the user
+*> should avoid naively computing the ratio alpha/beta.
+*> However, ALPHA will be always less than and usually
+*> comparable with norm(A) in magnitude, and BETA always less
+*> than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left generalized eigenvectors u(j) are
+*> stored one after another in the columns of VL, in the same
+*> order as their eigenvalues.
+*> Each eigenvector is scaled so the largest component has
+*> abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right generalized eigenvectors v(j) are
+*> stored one after another in the columns of VR, in the same
+*> order as their eigenvalues.
+*> Each eigenvector is scaled so the largest component has
+*> abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> =1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHA(j) and BETA(j) should be
+*> correct for j=INFO+1,...,N.
+*> > N: =N+1: other then QZ iteration failed in SHGEQZ,
+*> =N+2: error return from STGEVC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+* =====================================================================
SUBROUTINE CGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
$ VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -17,120 +227,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGGEV computes for a pair of N-by-N complex nonsymmetric matrices
-* (A,B), the generalized eigenvalues, and optionally, the left and/or
-* right generalized eigenvectors.
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar
-* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
-* singular. It is usually represented as the pair (alpha,beta), as
-* there is a reasonable interpretation for beta=0, and even for both
-* being zero.
-*
-* The right generalized eigenvector v(j) corresponding to the
-* generalized eigenvalue lambda(j) of (A,B) satisfies
-*
-* A * v(j) = lambda(j) * B * v(j).
-*
-* The left generalized eigenvector u(j) corresponding to the
-* generalized eigenvalues lambda(j) of (A,B) satisfies
-*
-* u(j)**H * A = lambda(j) * u(j)**H * B
-*
-* where u(j)**H is the conjugate-transpose of u(j).
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the matrix A in the pair (A,B).
-* On exit, A has been overwritten.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the matrix B in the pair (A,B).
-* On exit, B has been overwritten.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX array, dimension (N)
-*
-* BETA (output) COMPLEX array, dimension (N)
-* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
-* generalized eigenvalues.
-*
-* Note: the quotients ALPHA(j)/BETA(j) may easily over- or
-* underflow, and BETA(j) may even be zero. Thus, the user
-* should avoid naively computing the ratio alpha/beta.
-* However, ALPHA will be always less than and usually
-* comparable with norm(A) in magnitude, and BETA always less
-* than and usually comparable with norm(B).
-*
-* VL (output) COMPLEX array, dimension (LDVL,N)
-* If JOBVL = 'V', the left generalized eigenvectors u(j) are
-* stored one after another in the columns of VL, in the same
-* order as their eigenvalues.
-* Each eigenvector is scaled so the largest component has
-* abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX array, dimension (LDVR,N)
-* If JOBVR = 'V', the right generalized eigenvectors v(j) are
-* stored one after another in the columns of VR, in the same
-* order as their eigenvalues.
-* Each eigenvector is scaled so the largest component has
-* abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array, dimension (8*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* =1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHA(j) and BETA(j) should be
-* correct for j=INFO+1,...,N.
-* > N: =N+1: other then QZ iteration failed in SHGEQZ,
-* =N+2: error return from STGEVC.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cggevx.f b/SRC/cggevx.f
index 245fbcfd..46d7cd35 100644
--- a/SRC/cggevx.f
+++ b/SRC/cggevx.f
@@ -1,12 +1,379 @@
+*> \brief <b> CGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
+* ALPHA, BETA, VL, LDVL, VR, LDVR, ILO, IHI,
+* LSCALE, RSCALE, ABNRM, BBNRM, RCONDE, RCONDV,
+* WORK, LWORK, RWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER BALANC, JOBVL, JOBVR, SENSE
+* INTEGER IHI, ILO, INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* REAL ABNRM, BBNRM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL LSCALE( * ), RCONDE( * ), RCONDV( * ),
+* $ RSCALE( * ), RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGEVX computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B) the generalized eigenvalues, and optionally, the left and/or
+*> right generalized eigenvectors.
+*>
+*> Optionally, it also computes a balancing transformation to improve
+*> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
+*> LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
+*> the eigenvalues (RCONDE), and reciprocal condition numbers for the
+*> right eigenvectors (RCONDV).
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*> A * v(j) = lambda(j) * B * v(j) .
+*> The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*> u(j)**H * A = lambda(j) * u(j)**H * B.
+*> where u(j)**H is the conjugate-transpose of u(j).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER*1
+*> Specifies the balance option to be performed:
+*> = 'N': do not diagonally scale or permute;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> Computed reciprocal condition numbers will be for the
+*> matrices after permuting and/or balancing. Permuting does
+*> not change condition numbers (in exact arithmetic), but
+*> balancing does.
+*> \endverbatim
+*>
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': none are computed;
+*> = 'E': computed for eigenvalues only;
+*> = 'V': computed for eigenvectors only;
+*> = 'B': computed for eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the matrix A in the pair (A,B).
+*> On exit, A has been overwritten. If JOBVL='V' or JOBVR='V'
+*> or both, then A contains the first part of the complex Schur
+*> form of the "balanced" versions of the input A and B.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the matrix B in the pair (A,B).
+*> On exit, B has been overwritten. If JOBVL='V' or JOBVR='V'
+*> or both, then B contains the second part of the complex
+*> Schur form of the "balanced" versions of the input A and B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the generalized
+*> eigenvalues.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotient ALPHA(j)/BETA(j) ) may easily over- or
+*> underflow, and BETA(j) may even be zero. Thus, the user
+*> should avoid naively computing the ratio ALPHA/BETA.
+*> However, ALPHA will be always less than and usually
+*> comparable with norm(A) in magnitude, and BETA always less
+*> than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left generalized eigenvectors u(j) are
+*> stored one after another in the columns of VL, in the same
+*> order as their eigenvalues.
+*> Each eigenvector will be scaled so the largest component
+*> will have abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right generalized eigenvectors v(j) are
+*> stored one after another in the columns of VR, in the same
+*> order as their eigenvalues.
+*> Each eigenvector will be scaled so the largest component
+*> will have abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are integer values such that on exit
+*> A(i,j) = 0 and B(i,j) = 0 if i > j and
+*> j = 1,...,ILO-1 or i = IHI+1,...,N.
+*> If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the left side of A and B. If PL(j) is the index of the
+*> row interchanged with row j, and DL(j) is the scaling
+*> factor applied to row j, then
+*> LSCALE(j) = PL(j) for j = 1,...,ILO-1
+*> = DL(j) for j = ILO,...,IHI
+*> = PL(j) for j = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the right side of A and B. If PR(j) is the index of the
+*> column interchanged with column j, and DR(j) is the scaling
+*> factor applied to column j, then
+*> RSCALE(j) = PR(j) for j = 1,...,ILO-1
+*> = DR(j) for j = ILO,...,IHI
+*> = PR(j) for j = IHI+1,...,N
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] ABNRM
+*> \verbatim
+*> ABNRM is REAL
+*> The one-norm of the balanced matrix A.
+*> \endverbatim
+*>
+*> \param[out] BBNRM
+*> \verbatim
+*> BBNRM is REAL
+*> The one-norm of the balanced matrix B.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension (N)
+*> If SENSE = 'E' or 'B', the reciprocal condition numbers of
+*> the eigenvalues, stored in consecutive elements of the array.
+*> If SENSE = 'N' or 'V', RCONDE is not referenced.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension (N)
+*> If SENSE = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the eigenvectors, stored in consecutive elements
+*> of the array. If the eigenvalues cannot be reordered to
+*> compute RCONDV(j), RCONDV(j) is set to 0; this can only occur
+*> when the true value would be very small anyway.
+*> If SENSE = 'N' or 'E', RCONDV is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> If SENSE = 'E', LWORK >= max(1,4*N).
+*> If SENSE = 'V' or 'B', LWORK >= max(1,2*N*N+2*N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (lrwork)
+*> lrwork must be at least max(1,6*N) if BALANC = 'S' or 'B',
+*> and at least max(1,2*N) otherwise.
+*> Real workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N+2)
+*> If SENSE = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> If SENSE = 'N', BWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHA(j) and BETA(j) should be correct
+*> for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in CHGEQZ.
+*> =N+2: error return from CTGEVC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Balancing a matrix pair (A,B) includes, first, permuting rows and
+*> columns to isolate eigenvalues, second, applying diagonal similarity
+*> transformation to the rows and columns to make the rows and columns
+*> as close in norm as possible. The computed reciprocal condition
+*> numbers correspond to the balanced matrix. Permuting rows and columns
+*> will not change the condition numbers (in exact arithmetic) but
+*> diagonal scaling will. For further explanation of balancing, see
+*> section 4.11.1.2 of LAPACK Users' Guide.
+*>
+*> An approximate error bound on the chordal distance between the i-th
+*> computed generalized eigenvalue w and the corresponding exact
+*> eigenvalue lambda is
+*>
+*> chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
+*>
+*> An approximate error bound for the angle between the i-th computed
+*> eigenvector VL(i) or VR(i) is given by
+*>
+*> EPS * norm(ABNRM, BBNRM) / DIF(i).
+*>
+*> For further explanation of the reciprocal condition numbers RCONDE
+*> and RCONDV, see section 4.11 of LAPACK User's Guide.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
$ ALPHA, BETA, VL, LDVL, VR, LDVR, ILO, IHI,
$ LSCALE, RSCALE, ABNRM, BBNRM, RCONDE, RCONDV,
$ WORK, LWORK, RWORK, IWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER BALANC, JOBVL, JOBVR, SENSE
@@ -23,230 +390,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGGEVX computes for a pair of N-by-N complex nonsymmetric matrices
-* (A,B) the generalized eigenvalues, and optionally, the left and/or
-* right generalized eigenvectors.
-*
-* Optionally, it also computes a balancing transformation to improve
-* the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
-* LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
-* the eigenvalues (RCONDE), and reciprocal condition numbers for the
-* right eigenvectors (RCONDV).
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar
-* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
-* singular. It is usually represented as the pair (alpha,beta), as
-* there is a reasonable interpretation for beta=0, and even for both
-* being zero.
-*
-* The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-* A * v(j) = lambda(j) * B * v(j) .
-* The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-* u(j)**H * A = lambda(j) * u(j)**H * B.
-* where u(j)**H is the conjugate-transpose of u(j).
-*
-*
-* Arguments
-* =========
-*
-* BALANC (input) CHARACTER*1
-* Specifies the balance option to be performed:
-* = 'N': do not diagonally scale or permute;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-* Computed reciprocal condition numbers will be for the
-* matrices after permuting and/or balancing. Permuting does
-* not change condition numbers (in exact arithmetic), but
-* balancing does.
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': none are computed;
-* = 'E': computed for eigenvalues only;
-* = 'V': computed for eigenvectors only;
-* = 'B': computed for eigenvalues and eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the matrix A in the pair (A,B).
-* On exit, A has been overwritten. If JOBVL='V' or JOBVR='V'
-* or both, then A contains the first part of the complex Schur
-* form of the "balanced" versions of the input A and B.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the matrix B in the pair (A,B).
-* On exit, B has been overwritten. If JOBVL='V' or JOBVR='V'
-* or both, then B contains the second part of the complex
-* Schur form of the "balanced" versions of the input A and B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX array, dimension (N)
-*
-* BETA (output) COMPLEX array, dimension (N)
-* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the generalized
-* eigenvalues.
-*
-* Note: the quotient ALPHA(j)/BETA(j) ) may easily over- or
-* underflow, and BETA(j) may even be zero. Thus, the user
-* should avoid naively computing the ratio ALPHA/BETA.
-* However, ALPHA will be always less than and usually
-* comparable with norm(A) in magnitude, and BETA always less
-* than and usually comparable with norm(B).
-*
-* VL (output) COMPLEX array, dimension (LDVL,N)
-* If JOBVL = 'V', the left generalized eigenvectors u(j) are
-* stored one after another in the columns of VL, in the same
-* order as their eigenvalues.
-* Each eigenvector will be scaled so the largest component
-* will have abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX array, dimension (LDVR,N)
-* If JOBVR = 'V', the right generalized eigenvectors v(j) are
-* stored one after another in the columns of VR, in the same
-* order as their eigenvalues.
-* Each eigenvector will be scaled so the largest component
-* will have abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are integer values such that on exit
-* A(i,j) = 0 and B(i,j) = 0 if i > j and
-* j = 1,...,ILO-1 or i = IHI+1,...,N.
-* If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
-*
-* LSCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the left side of A and B. If PL(j) is the index of the
-* row interchanged with row j, and DL(j) is the scaling
-* factor applied to row j, then
-* LSCALE(j) = PL(j) for j = 1,...,ILO-1
-* = DL(j) for j = ILO,...,IHI
-* = PL(j) for j = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* RSCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the right side of A and B. If PR(j) is the index of the
-* column interchanged with column j, and DR(j) is the scaling
-* factor applied to column j, then
-* RSCALE(j) = PR(j) for j = 1,...,ILO-1
-* = DR(j) for j = ILO,...,IHI
-* = PR(j) for j = IHI+1,...,N
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* ABNRM (output) REAL
-* The one-norm of the balanced matrix A.
-*
-* BBNRM (output) REAL
-* The one-norm of the balanced matrix B.
-*
-* RCONDE (output) REAL array, dimension (N)
-* If SENSE = 'E' or 'B', the reciprocal condition numbers of
-* the eigenvalues, stored in consecutive elements of the array.
-* If SENSE = 'N' or 'V', RCONDE is not referenced.
-*
-* RCONDV (output) REAL array, dimension (N)
-* If SENSE = 'V' or 'B', the estimated reciprocal condition
-* numbers of the eigenvectors, stored in consecutive elements
-* of the array. If the eigenvalues cannot be reordered to
-* compute RCONDV(j), RCONDV(j) is set to 0; this can only occur
-* when the true value would be very small anyway.
-* If SENSE = 'N' or 'E', RCONDV is not referenced.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* If SENSE = 'E', LWORK >= max(1,4*N).
-* If SENSE = 'V' or 'B', LWORK >= max(1,2*N*N+2*N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (lrwork)
-* lrwork must be at least max(1,6*N) if BALANC = 'S' or 'B',
-* and at least max(1,2*N) otherwise.
-* Real workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (N+2)
-* If SENSE = 'E', IWORK is not referenced.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* If SENSE = 'N', BWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHA(j) and BETA(j) should be correct
-* for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in CHGEQZ.
-* =N+2: error return from CTGEVC.
-*
-* Further Details
-* ===============
-*
-* Balancing a matrix pair (A,B) includes, first, permuting rows and
-* columns to isolate eigenvalues, second, applying diagonal similarity
-* transformation to the rows and columns to make the rows and columns
-* as close in norm as possible. The computed reciprocal condition
-* numbers correspond to the balanced matrix. Permuting rows and columns
-* will not change the condition numbers (in exact arithmetic) but
-* diagonal scaling will. For further explanation of balancing, see
-* section 4.11.1.2 of LAPACK Users' Guide.
-*
-* An approximate error bound on the chordal distance between the i-th
-* computed generalized eigenvalue w and the corresponding exact
-* eigenvalue lambda is
-*
-* chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
-*
-* An approximate error bound for the angle between the i-th computed
-* eigenvector VL(i) or VR(i) is given by
-*
-* EPS * norm(ABNRM, BBNRM) / DIF(i).
-*
-* For further explanation of the reciprocal condition numbers RCONDE
-* and RCONDV, see section 4.11 of LAPACK User's Guide.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cggglm.f b/SRC/cggglm.f
index dd65d1b9..ec4ff5c5 100644
--- a/SRC/cggglm.f
+++ b/SRC/cggglm.f
@@ -1,10 +1,185 @@
+*> \brief <b> CGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), D( * ), WORK( * ),
+* $ X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGGLM solves a general Gauss-Markov linear model (GLM) problem:
+*>
+*> minimize || y ||_2 subject to d = A*x + B*y
+*> x
+*>
+*> where A is an N-by-M matrix, B is an N-by-P matrix, and d is a
+*> given N-vector. It is assumed that M <= N <= M+P, and
+*>
+*> rank(A) = M and rank( A B ) = N.
+*>
+*> Under these assumptions, the constrained equation is always
+*> consistent, and there is a unique solution x and a minimal 2-norm
+*> solution y, which is obtained using a generalized QR factorization
+*> of the matrices (A, B) given by
+*>
+*> A = Q*(R), B = Q*T*Z.
+*> (0)
+*>
+*> In particular, if matrix B is square nonsingular, then the problem
+*> GLM is equivalent to the following weighted linear least squares
+*> problem
+*>
+*> minimize || inv(B)*(d-A*x) ||_2
+*> x
+*>
+*> where inv(B) denotes the inverse of B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= N-M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,M)
+*> On entry, the N-by-M matrix A.
+*> On exit, the upper triangular part of the array A contains
+*> the M-by-M upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,P)
+*> On entry, the N-by-P matrix B.
+*> On exit, if N <= P, the upper triangle of the subarray
+*> B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
+*> if N > P, the elements on and above the (N-P)th subdiagonal
+*> contain the N-by-P upper trapezoidal matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> On entry, D is the left hand side of the GLM equation.
+*> On exit, D is destroyed.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (M)
+*> \param[out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (P)
+*> On exit, X and Y are the solutions of the GLM problem.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N+M+P).
+*> For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB,
+*> where NB is an upper bound for the optimal blocksizes for
+*> CGEQRF, CGERQF, CUNMQR and CUNMRQ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the upper triangular factor R associated with A in the
+*> generalized QR factorization of the pair (A, B) is
+*> singular, so that rank(A) < M; the least squares
+*> solution could not be computed.
+*> = 2: the bottom (N-M) by (N-M) part of the upper trapezoidal
+*> factor T associated with B in the generalized QR
+*> factorization of the pair (A, B) is singular, so that
+*> rank( A B ) < N; the least squares solution could not
+*> be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, P
@@ -14,101 +189,6 @@
$ X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* CGGGLM solves a general Gauss-Markov linear model (GLM) problem:
-*
-* minimize || y ||_2 subject to d = A*x + B*y
-* x
-*
-* where A is an N-by-M matrix, B is an N-by-P matrix, and d is a
-* given N-vector. It is assumed that M <= N <= M+P, and
-*
-* rank(A) = M and rank( A B ) = N.
-*
-* Under these assumptions, the constrained equation is always
-* consistent, and there is a unique solution x and a minimal 2-norm
-* solution y, which is obtained using a generalized QR factorization
-* of the matrices (A, B) given by
-*
-* A = Q*(R), B = Q*T*Z.
-* (0)
-*
-* In particular, if matrix B is square nonsingular, then the problem
-* GLM is equivalent to the following weighted linear least squares
-* problem
-*
-* minimize || inv(B)*(d-A*x) ||_2
-* x
-*
-* where inv(B) denotes the inverse of B.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. 0 <= M <= N.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= N-M.
-*
-* A (input/output) COMPLEX array, dimension (LDA,M)
-* On entry, the N-by-M matrix A.
-* On exit, the upper triangular part of the array A contains
-* the M-by-M upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,P)
-* On entry, the N-by-P matrix B.
-* On exit, if N <= P, the upper triangle of the subarray
-* B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
-* if N > P, the elements on and above the (N-P)th subdiagonal
-* contain the N-by-P upper trapezoidal matrix T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* D (input/output) COMPLEX array, dimension (N)
-* On entry, D is the left hand side of the GLM equation.
-* On exit, D is destroyed.
-*
-* X (output) COMPLEX array, dimension (M)
-* Y (output) COMPLEX array, dimension (P)
-* On exit, X and Y are the solutions of the GLM problem.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N+M+P).
-* For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB,
-* where NB is an upper bound for the optimal blocksizes for
-* CGEQRF, CGERQF, CUNMQR and CUNMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the upper triangular factor R associated with A in the
-* generalized QR factorization of the pair (A, B) is
-* singular, so that rank(A) < M; the least squares
-* solution could not be computed.
-* = 2: the bottom (N-M) by (N-M) part of the upper trapezoidal
-* factor T associated with B in the generalized QR
-* factorization of the pair (A, B) is singular, so that
-* rank( A B ) < N; the least squares solution could not
-* be computed.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/cgghrd.f b/SRC/cgghrd.f
index e46068a3..c7b372d4 100644
--- a/SRC/cgghrd.f
+++ b/SRC/cgghrd.f
@@ -1,10 +1,205 @@
+*> \brief \b CGGHRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
+* LDQ, Z, LDZ, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, COMPZ
+* INTEGER IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGHRD reduces a pair of complex matrices (A,B) to generalized upper
+*> Hessenberg form using unitary transformations, where A is a
+*> general matrix and B is upper triangular. The form of the generalized
+*> eigenvalue problem is
+*> A*x = lambda*B*x,
+*> and B is typically made upper triangular by computing its QR
+*> factorization and moving the unitary matrix Q to the left side
+*> of the equation.
+*>
+*> This subroutine simultaneously reduces A to a Hessenberg matrix H:
+*> Q**H*A*Z = H
+*> and transforms B to another upper triangular matrix T:
+*> Q**H*B*Z = T
+*> in order to reduce the problem to its standard form
+*> H*y = lambda*T*y
+*> where y = Z**H*x.
+*>
+*> The unitary matrices Q and Z are determined as products of Givens
+*> rotations. They may either be formed explicitly, or they may be
+*> postmultiplied into input matrices Q1 and Z1, so that
+*> Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H
+*> Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H
+*> If Q1 is the unitary matrix from the QR factorization of B in the
+*> original equation A*x = lambda*B*x, then CGGHRD reduces the original
+*> problem to generalized Hessenberg form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'N': do not compute Q;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> unitary matrix Q is returned;
+*> = 'V': Q must contain a unitary matrix Q1 on entry,
+*> and the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': do not compute Q;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> unitary matrix Q is returned;
+*> = 'V': Q must contain a unitary matrix Q1 on entry,
+*> and the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI mark the rows and columns of A which are to be
+*> reduced. It is assumed that A is already upper triangular
+*> in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
+*> normally set by a previous call to CGGBAL; otherwise they
+*> should be set to 1 and N respectively.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the N-by-N general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> rest is set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the N-by-N upper triangular matrix B.
+*> On exit, the upper triangular matrix T = Q**H B Z. The
+*> elements below the diagonal are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ, N)
+*> On entry, if COMPQ = 'V', the unitary matrix Q1, typically
+*> from the QR factorization of B.
+*> On exit, if COMPQ='I', the unitary matrix Q, and if
+*> COMPQ = 'V', the product Q1*Q.
+*> Not referenced if COMPQ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the unitary matrix Z1.
+*> On exit, if COMPZ='I', the unitary matrix Z, and if
+*> COMPZ = 'V', the product Z1*Z.
+*> Not referenced if COMPZ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z.
+*> LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine reduces A to Hessenberg and B to triangular form by
+*> an unblocked reduction, as described in _Matrix_Computations_,
+*> by Golub and van Loan (Johns Hopkins Press).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
$ LDQ, Z, LDZ, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, COMPZ
@@ -15,113 +210,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CGGHRD reduces a pair of complex matrices (A,B) to generalized upper
-* Hessenberg form using unitary transformations, where A is a
-* general matrix and B is upper triangular. The form of the generalized
-* eigenvalue problem is
-* A*x = lambda*B*x,
-* and B is typically made upper triangular by computing its QR
-* factorization and moving the unitary matrix Q to the left side
-* of the equation.
-*
-* This subroutine simultaneously reduces A to a Hessenberg matrix H:
-* Q**H*A*Z = H
-* and transforms B to another upper triangular matrix T:
-* Q**H*B*Z = T
-* in order to reduce the problem to its standard form
-* H*y = lambda*T*y
-* where y = Z**H*x.
-*
-* The unitary matrices Q and Z are determined as products of Givens
-* rotations. They may either be formed explicitly, or they may be
-* postmultiplied into input matrices Q1 and Z1, so that
-* Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H
-* Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H
-* If Q1 is the unitary matrix from the QR factorization of B in the
-* original equation A*x = lambda*B*x, then CGGHRD reduces the original
-* problem to generalized Hessenberg form.
-*
-* Arguments
-* =========
-*
-* COMPQ (input) CHARACTER*1
-* = 'N': do not compute Q;
-* = 'I': Q is initialized to the unit matrix, and the
-* unitary matrix Q is returned;
-* = 'V': Q must contain a unitary matrix Q1 on entry,
-* and the product Q1*Q is returned.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': do not compute Q;
-* = 'I': Q is initialized to the unit matrix, and the
-* unitary matrix Q is returned;
-* = 'V': Q must contain a unitary matrix Q1 on entry,
-* and the product Q1*Q is returned.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI mark the rows and columns of A which are to be
-* reduced. It is assumed that A is already upper triangular
-* in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
-* normally set by a previous call to CGGBAL; otherwise they
-* should be set to 1 and N respectively.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the N-by-N general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* rest is set to zero.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the N-by-N upper triangular matrix B.
-* On exit, the upper triangular matrix T = Q**H B Z. The
-* elements below the diagonal are set to zero.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) COMPLEX array, dimension (LDQ, N)
-* On entry, if COMPQ = 'V', the unitary matrix Q1, typically
-* from the QR factorization of B.
-* On exit, if COMPQ='I', the unitary matrix Q, and if
-* COMPQ = 'V', the product Q1*Q.
-* Not referenced if COMPQ='N'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the unitary matrix Z1.
-* On exit, if COMPZ='I', the unitary matrix Z, and if
-* COMPZ = 'V', the product Z1*Z.
-* Not referenced if COMPZ='N'.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z.
-* LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* This routine reduces A to Hessenberg and B to triangular form by
-* an unblocked reduction, as described in _Matrix_Computations_,
-* by Golub and van Loan (Johns Hopkins Press).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgglse.f b/SRC/cgglse.f
index e68d1b52..f51649cb 100644
--- a/SRC/cgglse.f
+++ b/SRC/cgglse.f
@@ -1,10 +1,182 @@
+*> \brief <b> CGGLSE solves overdetermined or underdetermined systems for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), C( * ), D( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGLSE solves the linear equality-constrained least squares (LSE)
+*> problem:
+*>
+*> minimize || c - A*x ||_2 subject to B*x = d
+*>
+*> where A is an M-by-N matrix, B is a P-by-N matrix, c is a given
+*> M-vector, and d is a given P-vector. It is assumed that
+*> P <= N <= M+P, and
+*>
+*> rank(B) = P and rank( (A) ) = N.
+*> ( (B) )
+*>
+*> These conditions ensure that the LSE problem has a unique solution,
+*> which is obtained using a generalized RQ factorization of the
+*> matrices (B, A) given by
+*>
+*> B = (0 R)*Q, A = Z*T*Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. 0 <= P <= N <= M+P.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, the upper triangle of the subarray B(1:P,N-P+1:N)
+*> contains the P-by-P upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (M)
+*> On entry, C contains the right hand side vector for the
+*> least squares part of the LSE problem.
+*> On exit, the residual sum of squares for the solution
+*> is given by the sum of squares of elements N-P+1 to M of
+*> vector C.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX array, dimension (P)
+*> On entry, D contains the right hand side vector for the
+*> constrained equation.
+*> On exit, D is destroyed.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> On exit, X is the solution of the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M+N+P).
+*> For optimum performance LWORK >= P+min(M,N)+max(M,N)*NB,
+*> where NB is an upper bound for the optimal blocksizes for
+*> CGEQRF, CGERQF, CUNMQR and CUNMRQ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the upper triangular factor R associated with B in the
+*> generalized RQ factorization of the pair (B, A) is
+*> singular, so that rank(B) < P; the least squares
+*> solution could not be computed.
+*> = 2: the (N-P) by (N-P) part of the upper trapezoidal factor
+*> T associated with A in the generalized RQ factorization
+*> of the pair (B, A) is singular, so that
+*> rank( (A) ) < N; the least squares solution could not
+*> ( (B) )
+*> be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERsolve
+*
+* =====================================================================
SUBROUTINE CGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, P
@@ -14,98 +186,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* CGGLSE solves the linear equality-constrained least squares (LSE)
-* problem:
-*
-* minimize || c - A*x ||_2 subject to B*x = d
-*
-* where A is an M-by-N matrix, B is a P-by-N matrix, c is a given
-* M-vector, and d is a given P-vector. It is assumed that
-* P <= N <= M+P, and
-*
-* rank(B) = P and rank( (A) ) = N.
-* ( (B) )
-*
-* These conditions ensure that the LSE problem has a unique solution,
-* which is obtained using a generalized RQ factorization of the
-* matrices (B, A) given by
-*
-* B = (0 R)*Q, A = Z*T*Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. 0 <= P <= N <= M+P.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, the upper triangle of the subarray B(1:P,N-P+1:N)
-* contains the P-by-P upper triangular matrix R.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* C (input/output) COMPLEX array, dimension (M)
-* On entry, C contains the right hand side vector for the
-* least squares part of the LSE problem.
-* On exit, the residual sum of squares for the solution
-* is given by the sum of squares of elements N-P+1 to M of
-* vector C.
-*
-* D (input/output) COMPLEX array, dimension (P)
-* On entry, D contains the right hand side vector for the
-* constrained equation.
-* On exit, D is destroyed.
-*
-* X (output) COMPLEX array, dimension (N)
-* On exit, X is the solution of the LSE problem.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M+N+P).
-* For optimum performance LWORK >= P+min(M,N)+max(M,N)*NB,
-* where NB is an upper bound for the optimal blocksizes for
-* CGEQRF, CGERQF, CUNMQR and CUNMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the upper triangular factor R associated with B in the
-* generalized RQ factorization of the pair (B, A) is
-* singular, so that rank(B) < P; the least squares
-* solution could not be computed.
-* = 2: the (N-P) by (N-P) part of the upper trapezoidal factor
-* T associated with A in the generalized RQ factorization
-* of the pair (B, A) is singular, so that
-* rank( (A) ) < N; the least squares solution could not
-* ( (B) )
-* be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cggqrf.f b/SRC/cggqrf.f
index 2c13ed58..14e4ad7b 100644
--- a/SRC/cggqrf.f
+++ b/SRC/cggqrf.f
@@ -1,145 +1,203 @@
- SUBROUTINE CGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
- $ LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b CGGQRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGGQRF computes a generalized QR factorization of an N-by-M matrix A
-* and an N-by-P matrix B:
-*
-* A = Q*R, B = Q*T*Z,
-*
-* where Q is an N-by-N unitary matrix, Z is a P-by-P unitary matrix,
-* and R and T assume one of the forms:
-*
-* if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N,
-* ( 0 ) N-M N M-N
-* M
-*
-* where R11 is upper triangular, and
-*
-* if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P,
-* P-N N ( T21 ) P
-* P
-*
-* where T12 or T21 is upper triangular.
-*
-* In particular, if B is square and nonsingular, the GQR factorization
-* of A and B implicitly gives the QR factorization of inv(B)*A:
-*
-* inv(B)*A = Z**H * (inv(T)*R)
-*
-* where inv(B) denotes the inverse of the matrix B, and Z' denotes the
-* conjugate transpose of matrix Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGQRF computes a generalized QR factorization of an N-by-M matrix A
+*> and an N-by-P matrix B:
+*>
+*> A = Q*R, B = Q*T*Z,
+*>
+*> where Q is an N-by-N unitary matrix, Z is a P-by-P unitary matrix,
+*> and R and T assume one of the forms:
+*>
+*> if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N,
+*> ( 0 ) N-M N M-N
+*> M
+*>
+*> where R11 is upper triangular, and
+*>
+*> if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P,
+*> P-N N ( T21 ) P
+*> P
+*>
+*> where T12 or T21 is upper triangular.
+*>
+*> In particular, if B is square and nonsingular, the GQR factorization
+*> of A and B implicitly gives the QR factorization of inv(B)*A:
+*>
+*> inv(B)*A = Z**H * (inv(T)*R)
+*>
+*> where inv(B) denotes the inverse of the matrix B, and Z' denotes the
+*> conjugate transpose of matrix Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,M)
+*> On entry, the N-by-M matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(N,M)-by-M upper trapezoidal matrix R (R is
+*> upper triangular if N >= M); the elements below the diagonal,
+*> with the array TAUA, represent the unitary matrix Q as a
+*> product of min(N,M) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,M)
-* On entry, the N-by-M matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(N,M)-by-M upper trapezoidal matrix R (R is
-* upper triangular if N >= M); the elements below the diagonal,
-* with the array TAUA, represent the unitary matrix Q as a
-* product of min(N,M) elementary reflectors (see Further
-* Details).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* TAUA (output) COMPLEX array, dimension (min(N,M))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q (see Further Details).
+*> \ingroup complexOTHERcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,P)
-* On entry, the N-by-P matrix B.
-* On exit, if N <= P, the upper triangle of the subarray
-* B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
-* if N > P, the elements on and above the (N-P)-th subdiagonal
-* contain the N-by-P upper trapezoidal matrix T; the remaining
-* elements, with the array TAUB, represent the unitary
-* matrix Z as a product of elementary reflectors (see Further
-* Details).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* TAUB (output) COMPLEX array, dimension (min(N,P))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Z (see Further Details).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N,M,P).
-* For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
-* where NB1 is the optimal blocksize for the QR factorization
-* of an N-by-M matrix, NB2 is the optimal blocksize for the
-* RQ factorization of an N-by-P matrix, and NB3 is the optimal
-* blocksize for a call of CUNMQR.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* represent the unitary matrix Q (see Further Details).
+*>
+*> B (input/output) COMPLEX array, dimension (LDB,P)
+*> On entry, the N-by-P matrix B.
+*> On exit, if N <= P, the upper triangle of the subarray
+*> B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
+*> if N > P, the elements on and above the (N-P)-th subdiagonal
+*> contain the N-by-P upper trapezoidal matrix T; the remaining
+*> elements, with the array TAUB, represent the unitary
+*> matrix Z as a product of elementary reflectors (see Further
+*> Details).
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*>
+*> TAUB (output) COMPLEX array, dimension (min(N,P))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Z (see Further Details).
+*>
+*> WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N,M,P).
+*> For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
+*> where NB1 is the optimal blocksize for the QR factorization
+*> of an N-by-M matrix, NB2 is the optimal blocksize for the
+*> RQ factorization of an N-by-P matrix, and NB3 is the optimal
+*> blocksize for a call of CUNMQR.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(n,m).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taua * v * v**H
+*>
+*> where taua is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*> and taua in TAUA(i).
+*> To form Q explicitly, use LAPACK subroutine CUNGQR.
+*> To use Q to update another matrix, use LAPACK subroutine CUNMQR.
+*>
+*> The matrix Z is represented as a product of elementary reflectors
+*>
+*> Z = H(1) H(2) . . . H(k), where k = min(n,p).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taub * v * v**H
+*>
+*> where taub is a complex scalar, and v is a complex vector with
+*> v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
+*> B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
+*> To form Z explicitly, use LAPACK subroutine CUNGRQ.
+*> To use Z to update another matrix, use LAPACK subroutine CUNMRQ.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
+ $ LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(n,m).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taua * v * v**H
-*
-* where taua is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-* and taua in TAUA(i).
-* To form Q explicitly, use LAPACK subroutine CUNGQR.
-* To use Q to update another matrix, use LAPACK subroutine CUNMQR.
-*
-* The matrix Z is represented as a product of elementary reflectors
-*
-* Z = H(1) H(2) . . . H(k), where k = min(n,p).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taub * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where taub is a complex scalar, and v is a complex vector with
-* v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
-* B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
-* To form Z explicitly, use LAPACK subroutine CUNGRQ.
-* To use Z to update another matrix, use LAPACK subroutine CUNMRQ.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cggrqf.f b/SRC/cggrqf.f
index 5251a8a1..b7287c4e 100644
--- a/SRC/cggrqf.f
+++ b/SRC/cggrqf.f
@@ -1,144 +1,202 @@
- SUBROUTINE CGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
- $ LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b CGGRQF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGGRQF computes a generalized RQ factorization of an M-by-N matrix A
-* and a P-by-N matrix B:
-*
-* A = R*Q, B = Z*T*Q,
-*
-* where Q is an N-by-N unitary matrix, Z is a P-by-P unitary
-* matrix, and R and T assume one of the forms:
-*
-* if M <= N, R = ( 0 R12 ) M, or if M > N, R = ( R11 ) M-N,
-* N-M M ( R21 ) N
-* N
-*
-* where R12 or R21 is upper triangular, and
-*
-* if P >= N, T = ( T11 ) N , or if P < N, T = ( T11 T12 ) P,
-* ( 0 ) P-N P N-P
-* N
-*
-* where T11 is upper triangular.
-*
-* In particular, if B is square and nonsingular, the GRQ factorization
-* of A and B implicitly gives the RQ factorization of A*inv(B):
-*
-* A*inv(B) = (R*inv(T))*Z**H
-*
-* where inv(B) denotes the inverse of the matrix B, and Z**H denotes the
-* conjugate transpose of the matrix Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGRQF computes a generalized RQ factorization of an M-by-N matrix A
+*> and a P-by-N matrix B:
+*>
+*> A = R*Q, B = Z*T*Q,
+*>
+*> where Q is an N-by-N unitary matrix, Z is a P-by-P unitary
+*> matrix, and R and T assume one of the forms:
+*>
+*> if M <= N, R = ( 0 R12 ) M, or if M > N, R = ( R11 ) M-N,
+*> N-M M ( R21 ) N
+*> N
+*>
+*> where R12 or R21 is upper triangular, and
+*>
+*> if P >= N, T = ( T11 ) N , or if P < N, T = ( T11 T12 ) P,
+*> ( 0 ) P-N P N-P
+*> N
+*>
+*> where T11 is upper triangular.
+*>
+*> In particular, if B is square and nonsingular, the GRQ factorization
+*> of A and B implicitly gives the RQ factorization of A*inv(B):
+*>
+*> A*inv(B) = (R*inv(T))*Z**H
+*>
+*> where inv(B) denotes the inverse of the matrix B, and Z**H denotes the
+*> conjugate transpose of the matrix Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, if M <= N, the upper triangle of the subarray
+*> A(1:M,N-M+1:N) contains the M-by-M upper triangular matrix R;
+*> if M > N, the elements on and above the (M-N)-th subdiagonal
+*> contain the M-by-N upper trapezoidal matrix R; the remaining
+*> elements, with the array TAUA, represent the unitary
+*> matrix Q as a product of elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, if M <= N, the upper triangle of the subarray
-* A(1:M,N-M+1:N) contains the M-by-M upper triangular matrix R;
-* if M > N, the elements on and above the (M-N)-th subdiagonal
-* contain the M-by-N upper trapezoidal matrix R; the remaining
-* elements, with the array TAUA, represent the unitary
-* matrix Q as a product of elementary reflectors (see Further
-* Details).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAUA (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q (see Further Details).
+*> \ingroup complexOTHERcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(P,N)-by-N upper trapezoidal matrix T (T is
-* upper triangular if P >= N); the elements below the diagonal,
-* with the array TAUB, represent the unitary matrix Z as a
-* product of elementary reflectors (see Further Details).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TAUB (output) COMPLEX array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Z (see Further Details).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N,M,P).
-* For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
-* where NB1 is the optimal blocksize for the RQ factorization
-* of an M-by-N matrix, NB2 is the optimal blocksize for the
-* QR factorization of a P-by-N matrix, and NB3 is the optimal
-* blocksize for a call of CUNMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO=-i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* represent the unitary matrix Q (see Further Details).
+*>
+*> B (input/output) COMPLEX array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(P,N)-by-N upper trapezoidal matrix T (T is
+*> upper triangular if P >= N); the elements below the diagonal,
+*> with the array TAUB, represent the unitary matrix Z as a
+*> product of elementary reflectors (see Further Details).
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*>
+*> TAUB (output) COMPLEX array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Z (see Further Details).
+*>
+*> WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N,M,P).
+*> For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
+*> where NB1 is the optimal blocksize for the RQ factorization
+*> of an M-by-N matrix, NB2 is the optimal blocksize for the
+*> QR factorization of a P-by-N matrix, and NB3 is the optimal
+*> blocksize for a call of CUNMRQ.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO=-i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taua * v * v**H
+*>
+*> where taua is a complex scalar, and v is a complex vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
+*> A(m-k+i,1:n-k+i-1), and taua in TAUA(i).
+*> To form Q explicitly, use LAPACK subroutine CUNGRQ.
+*> To use Q to update another matrix, use LAPACK subroutine CUNMRQ.
+*>
+*> The matrix Z is represented as a product of elementary reflectors
+*>
+*> Z = H(1) H(2) . . . H(k), where k = min(p,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taub * v * v**H
+*>
+*> where taub is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:p) is stored on exit in B(i+1:p,i),
+*> and taub in TAUB(i).
+*> To form Z explicitly, use LAPACK subroutine CUNGQR.
+*> To use Z to update another matrix, use LAPACK subroutine CUNMQR.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
+ $ LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taua * v * v**H
-*
-* where taua is a complex scalar, and v is a complex vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
-* A(m-k+i,1:n-k+i-1), and taua in TAUA(i).
-* To form Q explicitly, use LAPACK subroutine CUNGRQ.
-* To use Q to update another matrix, use LAPACK subroutine CUNMRQ.
-*
-* The matrix Z is represented as a product of elementary reflectors
-*
-* Z = H(1) H(2) . . . H(k), where k = min(p,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taub * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where taub is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:p) is stored on exit in B(i+1:p,i),
-* and taub in TAUB(i).
-* To form Z explicitly, use LAPACK subroutine CUNGQR.
-* To use Z to update another matrix, use LAPACK subroutine CUNMQR.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cggsvd.f b/SRC/cggsvd.f
index a83922ef..ae783ca2 100644
--- a/SRC/cggsvd.f
+++ b/SRC/cggsvd.f
@@ -1,11 +1,339 @@
+*> \brief <b> CGGSVD computes the singular value decomposition (SVD) for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
+* LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
+* RWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL ALPHA( * ), BETA( * ), RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGSVD computes the generalized singular value decomposition (GSVD)
+*> of an M-by-N complex matrix A and P-by-N complex matrix B:
+*>
+*> U**H*A*Q = D1*( 0 R ), V**H*B*Q = D2*( 0 R )
+*>
+*> where U, V and Q are unitary matrices.
+*> Let K+L = the effective numerical rank of the
+*> matrix (A**H,B**H)**H, then R is a (K+L)-by-(K+L) nonsingular upper
+*> triangular matrix, D1 and D2 are M-by-(K+L) and P-by-(K+L) "diagonal"
+*> matrices and of the following structures, respectively:
+*>
+*> If M-K-L >= 0,
+*>
+*> K L
+*> D1 = K ( I 0 )
+*> L ( 0 C )
+*> M-K-L ( 0 0 )
+*>
+*> K L
+*> D2 = L ( 0 S )
+*> P-L ( 0 0 )
+*>
+*> N-K-L K L
+*> ( 0 R ) = K ( 0 R11 R12 )
+*> L ( 0 0 R22 )
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
+*> S = diag( BETA(K+1), ... , BETA(K+L) ),
+*> C**2 + S**2 = I.
+*>
+*> R is stored in A(1:K+L,N-K-L+1:N) on exit.
+*>
+*> If M-K-L < 0,
+*>
+*> K M-K K+L-M
+*> D1 = K ( I 0 0 )
+*> M-K ( 0 C 0 )
+*>
+*> K M-K K+L-M
+*> D2 = M-K ( 0 S 0 )
+*> K+L-M ( 0 0 I )
+*> P-L ( 0 0 0 )
+*>
+*> N-K-L K M-K K+L-M
+*> ( 0 R ) = K ( 0 R11 R12 R13 )
+*> M-K ( 0 0 R22 R23 )
+*> K+L-M ( 0 0 0 R33 )
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(M) ),
+*> S = diag( BETA(K+1), ... , BETA(M) ),
+*> C**2 + S**2 = I.
+*>
+*> (R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N), and R33 is stored
+*> ( 0 R22 R23 )
+*> in B(M-K+1:L,N+M-K-L+1:N) on exit.
+*>
+*> The routine computes C, S, R, and optionally the unitary
+*> transformation matrices U, V and Q.
+*>
+*> In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
+*> A and B implicitly gives the SVD of A*inv(B):
+*> A*inv(B) = U*(D1*inv(D2))*V**H.
+*> If ( A**H,B**H)**H has orthnormal columns, then the GSVD of A and B is also
+*> equal to the CS decomposition of A and B. Furthermore, the GSVD can
+*> be used to derive the solution of the eigenvalue problem:
+*> A**H*A x = lambda* B**H*B x.
+*> In some literature, the GSVD of A and B is presented in the form
+*> U**H*A*X = ( 0 D1 ), V**H*B*X = ( 0 D2 )
+*> where U and V are orthogonal and X is nonsingular, and D1 and D2 are
+*> ``diagonal''. The former GSVD form can be converted to the latter
+*> form by taking the nonsingular matrix X as
+*>
+*> X = Q*( I 0 )
+*> ( 0 inv(R) )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': Unitary matrix U is computed;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': Unitary matrix V is computed;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Unitary matrix Q is computed;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> \param[out] L
+*> \verbatim
+*> L is INTEGER
+*> On exit, K and L specify the dimension of the subblocks
+*> described in Purpose.
+*> K + L = effective numerical rank of (A**H,B**H)**H.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A contains the triangular matrix R, or part of R.
+*> See Purpose for details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, B contains part of the triangular matrix R if
+*> M-K-L < 0. See Purpose for details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is REAL array, dimension (N)
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> On exit, ALPHA and BETA contain the generalized singular
+*> value pairs of A and B;
+*> ALPHA(1:K) = 1,
+*> BETA(1:K) = 0,
+*> and if M-K-L >= 0,
+*> ALPHA(K+1:K+L) = C,
+*> BETA(K+1:K+L) = S,
+*> or if M-K-L < 0,
+*> ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
+*> BETA(K+1:M) = S, BETA(M+1:K+L) = 1
+*> and
+*> ALPHA(K+L+1:N) = 0
+*> BETA(K+L+1:N) = 0
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,M)
+*> If JOBU = 'U', U contains the M-by-M unitary matrix U.
+*> If JOBU = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,P)
+*> If JOBV = 'V', V contains the P-by-P unitary matrix V.
+*> If JOBV = 'N', V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> If JOBQ = 'Q', Q contains the N-by-N unitary matrix Q.
+*> If JOBQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (max(3*N,M,P)+N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> On exit, IWORK stores the sorting information. More
+*> precisely, the following loop will sort ALPHA
+*> for I = K+1, min(M,K+L)
+*> swap ALPHA(I) and ALPHA(IWORK(I))
+*> endfor
+*> such that ALPHA(1) >= ALPHA(2) >= ... >= ALPHA(N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, the Jacobi-type procedure failed to
+*> converge. For further details, see subroutine CTGSJA.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLA REAL
+*> TOLB REAL
+*> TOLA and TOLB are the thresholds to determine the effective
+*> rank of (A**H,B**H)**H. Generally, they are set to
+*> TOLA = MAX(M,N)*norm(A)*MACHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MACHEPS.
+*> The size of TOLA and TOLB may affect the size of backward
+*> errors of the decomposition.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERsing
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 2-96 Based on modifications by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
$ LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
$ RWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK sing routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -18,211 +346,6 @@
$ U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGGSVD computes the generalized singular value decomposition (GSVD)
-* of an M-by-N complex matrix A and P-by-N complex matrix B:
-*
-* U**H*A*Q = D1*( 0 R ), V**H*B*Q = D2*( 0 R )
-*
-* where U, V and Q are unitary matrices.
-* Let K+L = the effective numerical rank of the
-* matrix (A**H,B**H)**H, then R is a (K+L)-by-(K+L) nonsingular upper
-* triangular matrix, D1 and D2 are M-by-(K+L) and P-by-(K+L) "diagonal"
-* matrices and of the following structures, respectively:
-*
-* If M-K-L >= 0,
-*
-* K L
-* D1 = K ( I 0 )
-* L ( 0 C )
-* M-K-L ( 0 0 )
-*
-* K L
-* D2 = L ( 0 S )
-* P-L ( 0 0 )
-*
-* N-K-L K L
-* ( 0 R ) = K ( 0 R11 R12 )
-* L ( 0 0 R22 )
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
-* S = diag( BETA(K+1), ... , BETA(K+L) ),
-* C**2 + S**2 = I.
-*
-* R is stored in A(1:K+L,N-K-L+1:N) on exit.
-*
-* If M-K-L < 0,
-*
-* K M-K K+L-M
-* D1 = K ( I 0 0 )
-* M-K ( 0 C 0 )
-*
-* K M-K K+L-M
-* D2 = M-K ( 0 S 0 )
-* K+L-M ( 0 0 I )
-* P-L ( 0 0 0 )
-*
-* N-K-L K M-K K+L-M
-* ( 0 R ) = K ( 0 R11 R12 R13 )
-* M-K ( 0 0 R22 R23 )
-* K+L-M ( 0 0 0 R33 )
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(M) ),
-* S = diag( BETA(K+1), ... , BETA(M) ),
-* C**2 + S**2 = I.
-*
-* (R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N), and R33 is stored
-* ( 0 R22 R23 )
-* in B(M-K+1:L,N+M-K-L+1:N) on exit.
-*
-* The routine computes C, S, R, and optionally the unitary
-* transformation matrices U, V and Q.
-*
-* In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
-* A and B implicitly gives the SVD of A*inv(B):
-* A*inv(B) = U*(D1*inv(D2))*V**H.
-* If ( A**H,B**H)**H has orthnormal columns, then the GSVD of A and B is also
-* equal to the CS decomposition of A and B. Furthermore, the GSVD can
-* be used to derive the solution of the eigenvalue problem:
-* A**H*A x = lambda* B**H*B x.
-* In some literature, the GSVD of A and B is presented in the form
-* U**H*A*X = ( 0 D1 ), V**H*B*X = ( 0 D2 )
-* where U and V are orthogonal and X is nonsingular, and D1 and D2 are
-* ``diagonal''. The former GSVD form can be converted to the latter
-* form by taking the nonsingular matrix X as
-*
-* X = Q*( I 0 )
-* ( 0 inv(R) )
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': Unitary matrix U is computed;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': Unitary matrix V is computed;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Unitary matrix Q is computed;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* K (output) INTEGER
-* L (output) INTEGER
-* On exit, K and L specify the dimension of the subblocks
-* described in Purpose.
-* K + L = effective numerical rank of (A**H,B**H)**H.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A contains the triangular matrix R, or part of R.
-* See Purpose for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, B contains part of the triangular matrix R if
-* M-K-L < 0. See Purpose for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* ALPHA (output) REAL array, dimension (N)
-* BETA (output) REAL array, dimension (N)
-* On exit, ALPHA and BETA contain the generalized singular
-* value pairs of A and B;
-* ALPHA(1:K) = 1,
-* BETA(1:K) = 0,
-* and if M-K-L >= 0,
-* ALPHA(K+1:K+L) = C,
-* BETA(K+1:K+L) = S,
-* or if M-K-L < 0,
-* ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
-* BETA(K+1:M) = S, BETA(M+1:K+L) = 1
-* and
-* ALPHA(K+L+1:N) = 0
-* BETA(K+L+1:N) = 0
-*
-* U (output) COMPLEX array, dimension (LDU,M)
-* If JOBU = 'U', U contains the M-by-M unitary matrix U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (output) COMPLEX array, dimension (LDV,P)
-* If JOBV = 'V', V contains the P-by-P unitary matrix V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (output) COMPLEX array, dimension (LDQ,N)
-* If JOBQ = 'Q', Q contains the N-by-N unitary matrix Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* WORK (workspace) COMPLEX array, dimension (max(3*N,M,P)+N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* IWORK (workspace/output) INTEGER array, dimension (N)
-* On exit, IWORK stores the sorting information. More
-* precisely, the following loop will sort ALPHA
-* for I = K+1, min(M,K+L)
-* swap ALPHA(I) and ALPHA(IWORK(I))
-* endfor
-* such that ALPHA(1) >= ALPHA(2) >= ... >= ALPHA(N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, the Jacobi-type procedure failed to
-* converge. For further details, see subroutine CTGSJA.
-*
-* Internal Parameters
-* ===================
-*
-* TOLA REAL
-* TOLB REAL
-* TOLA and TOLB are the thresholds to determine the effective
-* rank of (A**H,B**H)**H. Generally, they are set to
-* TOLA = MAX(M,N)*norm(A)*MACHEPS,
-* TOLB = MAX(P,N)*norm(B)*MACHEPS.
-* The size of TOLA and TOLB may affect the size of backward
-* errors of the decomposition.
-*
-* Further Details
-* ===============
-*
-* 2-96 Based on modifications by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cggsvp.f b/SRC/cggsvp.f
index c3d7e2bc..b655728c 100644
--- a/SRC/cggsvp.f
+++ b/SRC/cggsvp.f
@@ -1,11 +1,262 @@
+*> \brief \b CGGSVP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
+* TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
+* IWORK, RWORK, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
+* REAL TOLA, TOLB
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGGSVP computes unitary matrices U, V and Q such that
+*>
+*> N-K-L K L
+*> U**H*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;
+*> L ( 0 0 A23 )
+*> M-K-L ( 0 0 0 )
+*>
+*> N-K-L K L
+*> = K ( 0 A12 A13 ) if M-K-L < 0;
+*> M-K ( 0 0 A23 )
+*>
+*> N-K-L K L
+*> V**H*B*Q = L ( 0 0 B13 )
+*> P-L ( 0 0 0 )
+*>
+*> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
+*> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
+*> otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective
+*> numerical rank of the (M+P)-by-N matrix (A**H,B**H)**H.
+*>
+*> This decomposition is the preprocessing step for computing the
+*> Generalized Singular Value Decomposition (GSVD), see subroutine
+*> CGGSVD.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': Unitary matrix U is computed;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': Unitary matrix V is computed;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Unitary matrix Q is computed;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A contains the triangular (or trapezoidal) matrix
+*> described in the Purpose section.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, B contains the triangular matrix described in
+*> the Purpose section.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[in] TOLA
+*> \verbatim
+*> TOLA is REAL
+*> \param[in] TOLB
+*> \verbatim
+*> TOLB is REAL
+*> TOLA and TOLB are the thresholds to determine the effective
+*> numerical rank of matrix B and a subblock of A. Generally,
+*> they are set to
+*> TOLA = MAX(M,N)*norm(A)*MACHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MACHEPS.
+*> The size of TOLA and TOLB may affect the size of backward
+*> errors of the decomposition.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> \param[out] L
+*> \verbatim
+*> L is INTEGER
+*> On exit, K and L specify the dimension of the subblocks
+*> described in Purpose section.
+*> K + L = effective numerical rank of (A**H,B**H)**H.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,M)
+*> If JOBU = 'U', U contains the unitary matrix U.
+*> If JOBU = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,P)
+*> If JOBV = 'V', V contains the unitary matrix V.
+*> If JOBV = 'N', V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> If JOBQ = 'Q', Q contains the unitary matrix Q.
+*> If JOBQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (max(3*N,M,P))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The subroutine uses LAPACK subroutine CGEQPF for the QR factorization
+*> with column pivoting to detect the effective numerical rank of the
+*> a matrix. It may be replaced by a better rank determination strategy.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
$ TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
$ IWORK, RWORK, TAU, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -19,132 +270,6 @@
$ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGGSVP computes unitary matrices U, V and Q such that
-*
-* N-K-L K L
-* U**H*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;
-* L ( 0 0 A23 )
-* M-K-L ( 0 0 0 )
-*
-* N-K-L K L
-* = K ( 0 A12 A13 ) if M-K-L < 0;
-* M-K ( 0 0 A23 )
-*
-* N-K-L K L
-* V**H*B*Q = L ( 0 0 B13 )
-* P-L ( 0 0 0 )
-*
-* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
-* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
-* otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective
-* numerical rank of the (M+P)-by-N matrix (A**H,B**H)**H.
-*
-* This decomposition is the preprocessing step for computing the
-* Generalized Singular Value Decomposition (GSVD), see subroutine
-* CGGSVD.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': Unitary matrix U is computed;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': Unitary matrix V is computed;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Unitary matrix Q is computed;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A contains the triangular (or trapezoidal) matrix
-* described in the Purpose section.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, B contains the triangular matrix described in
-* the Purpose section.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TOLA (input) REAL
-* TOLB (input) REAL
-* TOLA and TOLB are the thresholds to determine the effective
-* numerical rank of matrix B and a subblock of A. Generally,
-* they are set to
-* TOLA = MAX(M,N)*norm(A)*MACHEPS,
-* TOLB = MAX(P,N)*norm(B)*MACHEPS.
-* The size of TOLA and TOLB may affect the size of backward
-* errors of the decomposition.
-*
-* K (output) INTEGER
-* L (output) INTEGER
-* On exit, K and L specify the dimension of the subblocks
-* described in Purpose section.
-* K + L = effective numerical rank of (A**H,B**H)**H.
-*
-* U (output) COMPLEX array, dimension (LDU,M)
-* If JOBU = 'U', U contains the unitary matrix U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (output) COMPLEX array, dimension (LDV,P)
-* If JOBV = 'V', V contains the unitary matrix V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (output) COMPLEX array, dimension (LDQ,N)
-* If JOBQ = 'Q', Q contains the unitary matrix Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* TAU (workspace) COMPLEX array, dimension (N)
-*
-* WORK (workspace) COMPLEX array, dimension (max(3*N,M,P))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* The subroutine uses LAPACK subroutine CGEQPF for the QR factorization
-* with column pivoting to detect the effective numerical rank of the
-* a matrix. It may be replaced by a better rank determination strategy.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgtcon.f b/SRC/cgtcon.f
index 886456fb..06b39a71 100644
--- a/SRC/cgtcon.f
+++ b/SRC/cgtcon.f
@@ -1,12 +1,142 @@
+*> \brief \b CGTCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTCON estimates the reciprocal of the condition number of a complex
+*> tridiagonal matrix A using the LU factorization as computed by
+*> CGTTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A as computed by CGTTRF.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX array, dimension (N-2)
+*> The (n-2) elements of the second superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
$ WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,63 +148,6 @@
COMPLEX D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGTCON estimates the reciprocal of the condition number of a complex
-* tridiagonal matrix A using the LU factorization as computed by
-* CGTTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A as computed by CGTTRF.
-*
-* D (input) COMPLEX array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input) COMPLEX array, dimension (N-2)
-* The (n-2) elements of the second superdiagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* ANORM (input) REAL
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgtrfs.f b/SRC/cgtrfs.f
index a4bb7edf..d1b7bef2 100644
--- a/SRC/cgtrfs.f
+++ b/SRC/cgtrfs.f
@@ -1,13 +1,211 @@
+*> \brief \b CGTRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
+* IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX B( LDB, * ), D( * ), DF( * ), DL( * ),
+* $ DLF( * ), DU( * ), DU2( * ), DUF( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is tridiagonal, and provides
+*> error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) subdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DLF
+*> \verbatim
+*> DLF is COMPLEX array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A as computed by CGTTRF.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is COMPLEX array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DUF
+*> \verbatim
+*> DUF is COMPLEX array, dimension (N-1)
+*> The (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX array, dimension (N-2)
+*> The (n-2) elements of the second superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CGTTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
$ IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -21,99 +219,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGTRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is tridiagonal, and provides
-* error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) subdiagonal elements of A.
-*
-* D (input) COMPLEX array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) superdiagonal elements of A.
-*
-* DLF (input) COMPLEX array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A as computed by CGTTRF.
-*
-* DF (input) COMPLEX array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DUF (input) COMPLEX array, dimension (N-1)
-* The (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input) COMPLEX array, dimension (N-2)
-* The (n-2) elements of the second superdiagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CGTTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgtsv.f b/SRC/cgtsv.f
index 30a12c21..4e3832ac 100644
--- a/SRC/cgtsv.f
+++ b/SRC/cgtsv.f
@@ -1,70 +1,132 @@
- SUBROUTINE CGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*> \brief \b CGTSV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * )
+* ..
+*
* Purpose
* =======
*
-* CGTSV solves the equation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTSV solves the equation
+*>
+*> A*X = B,
+*>
+*> where A is an N-by-N tridiagonal matrix, by Gaussian elimination with
+*> partial pivoting.
+*>
+*> Note that the equation A**T *X = B may be solved by interchanging the
+*> order of the arguments DU and DL.
+*>
+*>\endverbatim
*
-* A*X = B,
+* Arguments
+* =========
*
-* where A is an N-by-N tridiagonal matrix, by Gaussian elimination with
-* partial pivoting.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> On entry, DL must contain the (n-1) subdiagonal elements of
+*> A.
+*> On exit, DL is overwritten by the (n-2) elements of the
+*> second superdiagonal of the upper triangular matrix U from
+*> the LU factorization of A, in DL(1), ..., DL(n-2).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> On entry, D must contain the diagonal elements of A.
+*> On exit, D is overwritten by the n diagonal elements of U.
+*> \endverbatim
+*>
+*> \param[in,out] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> On entry, DU must contain the (n-1) superdiagonal elements
+*> of A.
+*> On exit, DU is overwritten by the (n-1) elements of the first
+*> superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero, and the solution
+*> has not been computed. The factorization has not been
+*> completed unless i = N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Note that the equation A**T *X = B may be solved by interchanging the
-* order of the arguments DU and DL.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* =========
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE CGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input/output) COMPLEX array, dimension (N-1)
-* On entry, DL must contain the (n-1) subdiagonal elements of
-* A.
-* On exit, DL is overwritten by the (n-2) elements of the
-* second superdiagonal of the upper triangular matrix U from
-* the LU factorization of A, in DL(1), ..., DL(n-2).
-*
-* D (input/output) COMPLEX array, dimension (N)
-* On entry, D must contain the diagonal elements of A.
-* On exit, D is overwritten by the n diagonal elements of U.
-*
-* DU (input/output) COMPLEX array, dimension (N-1)
-* On entry, DU must contain the (n-1) superdiagonal elements
-* of A.
-* On exit, DU is overwritten by the (n-1) elements of the first
-* superdiagonal of U.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero, and the solution
-* has not been computed. The factorization has not been
-* completed unless i = N.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgtsvx.f b/SRC/cgtsvx.f
index cce56794..5a3e7872 100644
--- a/SRC/cgtsvx.f
+++ b/SRC/cgtsvx.f
@@ -1,11 +1,297 @@
+*> \brief \b CGTSVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
+* DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, TRANS
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX B( LDB, * ), D( * ), DF( * ), DL( * ),
+* $ DLF( * ), DU( * ), DU2( * ), DUF( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTSVX uses the LU factorization to compute the solution to a complex
+*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
+*> where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
+*> as A = L * U, where L is a product of permutation and unit lower
+*> bidiagonal matrices and U is upper triangular with nonzeros in
+*> only the main diagonal and first two superdiagonals.
+*>
+*> 2. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': DLF, DF, DUF, DU2, and IPIV contain the factored form
+*> of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV will not
+*> be modified.
+*> = 'N': The matrix will be copied to DLF, DF, and DUF
+*> and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) subdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The n diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in,out] DLF
+*> \verbatim
+*> DLF is or output) COMPLEX array, dimension (N-1)
+*> If FACT = 'F', then DLF is an input argument and on entry
+*> contains the (n-1) multipliers that define the matrix L from
+*> the LU factorization of A as computed by CGTTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DLF is an output argument and on exit
+*> contains the (n-1) multipliers that define the matrix L from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DF
+*> \verbatim
+*> DF is or output) COMPLEX array, dimension (N)
+*> If FACT = 'F', then DF is an input argument and on entry
+*> contains the n diagonal elements of the upper triangular
+*> matrix U from the LU factorization of A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DF is an output argument and on exit
+*> contains the n diagonal elements of the upper triangular
+*> matrix U from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DUF
+*> \verbatim
+*> DUF is or output) COMPLEX array, dimension (N-1)
+*> If FACT = 'F', then DUF is an input argument and on entry
+*> contains the (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DUF is an output argument and on exit
+*> contains the (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in,out] DU2
+*> \verbatim
+*> DU2 is or output) COMPLEX array, dimension (N-2)
+*> If FACT = 'F', then DU2 is an input argument and on entry
+*> contains the (n-2) elements of the second superdiagonal of
+*> U.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DU2 is an output argument and on exit
+*> contains the (n-2) elements of the second superdiagonal of
+*> U.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the LU factorization of A as
+*> computed by CGTTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the LU factorization of A;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
+*> a row interchange was not required.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization
+*> has not been completed unless i = N, but the
+*> factor U is exactly singular, so the solution
+*> and error bounds could not be computed.
+*> RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
$ DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, TRANS
@@ -20,175 +306,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGTSVX uses the LU factorization to compute the solution to a complex
-* system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-* where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
-* as A = L * U, where L is a product of permutation and unit lower
-* bidiagonal matrices and U is upper triangular with nonzeros in
-* only the main diagonal and first two superdiagonals.
-*
-* 2. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': DLF, DF, DUF, DU2, and IPIV contain the factored form
-* of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV will not
-* be modified.
-* = 'N': The matrix will be copied to DLF, DF, and DUF
-* and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) subdiagonal elements of A.
-*
-* D (input) COMPLEX array, dimension (N)
-* The n diagonal elements of A.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) superdiagonal elements of A.
-*
-* DLF (input or output) COMPLEX array, dimension (N-1)
-* If FACT = 'F', then DLF is an input argument and on entry
-* contains the (n-1) multipliers that define the matrix L from
-* the LU factorization of A as computed by CGTTRF.
-*
-* If FACT = 'N', then DLF is an output argument and on exit
-* contains the (n-1) multipliers that define the matrix L from
-* the LU factorization of A.
-*
-* DF (input or output) COMPLEX array, dimension (N)
-* If FACT = 'F', then DF is an input argument and on entry
-* contains the n diagonal elements of the upper triangular
-* matrix U from the LU factorization of A.
-*
-* If FACT = 'N', then DF is an output argument and on exit
-* contains the n diagonal elements of the upper triangular
-* matrix U from the LU factorization of A.
-*
-* DUF (input or output) COMPLEX array, dimension (N-1)
-* If FACT = 'F', then DUF is an input argument and on entry
-* contains the (n-1) elements of the first superdiagonal of U.
-*
-* If FACT = 'N', then DUF is an output argument and on exit
-* contains the (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input or output) COMPLEX array, dimension (N-2)
-* If FACT = 'F', then DU2 is an input argument and on entry
-* contains the (n-2) elements of the second superdiagonal of
-* U.
-*
-* If FACT = 'N', then DU2 is an output argument and on exit
-* contains the (n-2) elements of the second superdiagonal of
-* U.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the LU factorization of A as
-* computed by CGTTRF.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the LU factorization of A;
-* row i of the matrix was interchanged with row IPIV(i).
-* IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
-* a row interchange was not required.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization
-* has not been completed unless i = N, but the
-* factor U is exactly singular, so the solution
-* and error bounds could not be computed.
-* RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cgttrf.f b/SRC/cgttrf.f
index d84b973c..40633fd8 100644
--- a/SRC/cgttrf.f
+++ b/SRC/cgttrf.f
@@ -1,73 +1,136 @@
- SUBROUTINE CGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX D( * ), DL( * ), DU( * ), DU2( * )
-* ..
-*
+*> \brief \b CGTTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
* Purpose
* =======
*
-* CGTTRF computes an LU factorization of a complex tridiagonal matrix A
-* using elimination with partial pivoting and row interchanges.
-*
-* The factorization has the form
-* A = L * U
-* where L is a product of permutation and unit lower bidiagonal
-* matrices and U is upper triangular with nonzeros in only the main
-* diagonal and first two superdiagonals.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTTRF computes an LU factorization of a complex tridiagonal matrix A
+*> using elimination with partial pivoting and row interchanges.
+*>
+*> The factorization has the form
+*> A = L * U
+*> where L is a product of permutation and unit lower bidiagonal
+*> matrices and U is upper triangular with nonzeros in only the main
+*> diagonal and first two superdiagonals.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* DL (input/output) COMPLEX array, dimension (N-1)
-* On entry, DL must contain the (n-1) sub-diagonal elements of
-* A.
-*
-* On exit, DL is overwritten by the (n-1) multipliers that
-* define the matrix L from the LU factorization of A.
-*
-* D (input/output) COMPLEX array, dimension (N)
-* On entry, D must contain the diagonal elements of A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> On entry, DL must contain the (n-1) sub-diagonal elements of
+*> A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DL is overwritten by the (n-1) multipliers that
+*> define the matrix L from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> On entry, D must contain the diagonal elements of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, D is overwritten by the n diagonal elements of the
+*> upper triangular matrix U from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> On entry, DU must contain the (n-1) super-diagonal elements
+*> of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DU is overwritten by the (n-1) elements of the first
+*> super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[out] DU2
+*> \verbatim
+*> DU2 is COMPLEX array, dimension (N-2)
+*> On exit, DU2 is overwritten by the (n-2) elements of the
+*> second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, D is overwritten by the n diagonal elements of the
-* upper triangular matrix U from the LU factorization of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input/output) COMPLEX array, dimension (N-1)
-* On entry, DU must contain the (n-1) super-diagonal elements
-* of A.
+*> \date November 2011
*
-* On exit, DU is overwritten by the (n-1) elements of the first
-* super-diagonal of U.
+*> \ingroup complexOTHERcomputational
*
-* DU2 (output) COMPLEX array, dimension (N-2)
-* On exit, DU2 is overwritten by the (n-2) elements of the
-* second super-diagonal of U.
+* =====================================================================
+ SUBROUTINE CGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX D( * ), DL( * ), DU( * ), DU2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cgttrs.f b/SRC/cgttrs.f
index 7d7e1075..31cceb02 100644
--- a/SRC/cgttrs.f
+++ b/SRC/cgttrs.f
@@ -1,10 +1,139 @@
+*> \brief \b CGTTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTTRS solves one of the systems of equations
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*> with a tridiagonal matrix A using the LU factorization computed
+*> by CGTTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the matrix of right hand side vectors B.
+*> On exit, B is overwritten by the solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,61 +144,6 @@
COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
* ..
*
-* Purpose
-* =======
-*
-* CGTTRS solves one of the systems of equations
-* A * X = B, A**T * X = B, or A**H * X = B,
-* with a tridiagonal matrix A using the LU factorization computed
-* by CGTTRF.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
-*
-* D (input) COMPLEX array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
-*
-* DU2 (input) COMPLEX array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the matrix of right hand side vectors B.
-* On exit, B is overwritten by the solution vectors X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cgtts2.f b/SRC/cgtts2.f
index 56c2ac9d..c0212e11 100644
--- a/SRC/cgtts2.f
+++ b/SRC/cgtts2.f
@@ -1,68 +1,137 @@
- SUBROUTINE CGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER ITRANS, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
-* ..
-*
+*> \brief \b CGTTS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER ITRANS, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
* Purpose
* =======
*
-* CGTTS2 solves one of the systems of equations
-* A * X = B, A**T * X = B, or A**H * X = B,
-* with a tridiagonal matrix A using the LU factorization computed
-* by CGTTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTTS2 solves one of the systems of equations
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*> with a tridiagonal matrix A using the LU factorization computed
+*> by CGTTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITRANS (input) INTEGER
-* Specifies the form of the system of equations.
-* = 0: A * X = B (No transpose)
-* = 1: A**T * X = B (Transpose)
-* = 2: A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
+*> \param[in] ITRANS
+*> \verbatim
+*> ITRANS is INTEGER
+*> Specifies the form of the system of equations.
+*> = 0: A * X = B (No transpose)
+*> = 1: A**T * X = B (Transpose)
+*> = 2: A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the matrix of right hand side vectors B.
+*> On exit, B is overwritten by the solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) COMPLEX array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
+*> \date November 2011
*
-* DU2 (input) COMPLEX array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
+*> \ingroup complexOTHERauxiliary
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
+* =====================================================================
+ SUBROUTINE CGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the matrix of right hand side vectors B.
-* On exit, B is overwritten by the solution vectors X.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER ITRANS, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chbev.f b/SRC/chbev.f
index 696bcd8b..d380d784 100644
--- a/SRC/chbev.f
+++ b/SRC/chbev.f
@@ -1,10 +1,154 @@
+*> \brief <b> CHBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KD, LDAB, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), W( * )
+* COMPLEX AB( LDAB, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBEV computes all the eigenvalues and, optionally, eigenvectors of
+*> a complex Hermitian band matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(1,3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CHBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,72 +159,6 @@
COMPLEX AB( LDAB, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHBEV computes all the eigenvalues and, optionally, eigenvectors of
-* a complex Hermitian band matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (max(1,3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chbevd.f b/SRC/chbevd.f
index a82b4bba..c0b7bed1 100644
--- a/SRC/chbevd.f
+++ b/SRC/chbevd.f
@@ -1,10 +1,220 @@
+*> \brief <b> CHBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
+* LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KD, LDAB, LDZ, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX AB( LDAB, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBEVD computes all the eigenvalues and, optionally, eigenvectors of
+*> a complex Hermitian band matrix A. If eigenvectors are desired, it
+*> uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (LRWORK)
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of array RWORK.
+*> If N <= 1, LRWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LRWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LRWORK must be at least
+*> 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N .
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CHBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
$ LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,122 +226,6 @@
COMPLEX AB( LDAB, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHBEVD computes all the eigenvalues and, optionally, eigenvectors of
-* a complex Hermitian band matrix A. If eigenvectors are desired, it
-* uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LWORK must be at least 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array,
-* dimension (LRWORK)
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of array RWORK.
-* If N <= 1, LRWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LRWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LRWORK must be at least
-* 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N .
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chbevx.f b/SRC/chbevx.f
index 2ab4f0ee..e9939ee2 100644
--- a/SRC/chbevx.f
+++ b/SRC/chbevx.f
@@ -1,11 +1,266 @@
+*> \brief <b> CHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
+* VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX AB( LDAB, * ), Q( LDQ, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex Hermitian band matrix A. Eigenvalues and eigenvectors
+*> can be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ, N)
+*> If JOBZ = 'V', the N-by-N unitary matrix used in the
+*> reduction to tridiagonal form.
+*> If JOBZ = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If JOBZ = 'V', then
+*> LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AB to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CHBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
$ VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,142 +274,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHBEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a complex Hermitian band matrix A. Eigenvalues and eigenvectors
-* can be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* Q (output) COMPLEX array, dimension (LDQ, N)
-* If JOBZ = 'V', the N-by-N unitary matrix used in the
-* reduction to tridiagonal form.
-* If JOBZ = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If JOBZ = 'V', then
-* LDQ >= max(1,N).
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AB to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chbgst.f b/SRC/chbgst.f
index 5ed329eb..ece20592 100644
--- a/SRC/chbgst.f
+++ b/SRC/chbgst.f
@@ -1,10 +1,167 @@
+*> \brief \b CHBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
+* LDX, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, VECT
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDX, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBGST reduces a complex Hermitian-definite banded generalized
+*> eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y,
+*> such that C has the same bandwidth as A.
+*>
+*> B must have been previously factorized as S**H*S by CPBSTF, using a
+*> split Cholesky factorization. A is overwritten by C = X**H*A*X, where
+*> X = S**(-1)*Q and Q is a unitary matrix chosen to preserve the
+*> bandwidth of A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'N': do not form the transformation matrix X;
+*> = 'V': form X.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the transformed matrix X**H*A*X, stored in the same
+*> format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in] BB
+*> \verbatim
+*> BB is COMPLEX array, dimension (LDBB,N)
+*> The banded factor S from the split Cholesky factorization of
+*> B, as returned by CPBSTF, stored in the first kb+1 rows of
+*> the array.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,N)
+*> If VECT = 'V', the n-by-n matrix X.
+*> If VECT = 'N', the array X is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> LDX >= max(1,N) if VECT = 'V'; LDX >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CHBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
$ LDX, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO, VECT
@@ -16,78 +173,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CHBGST reduces a complex Hermitian-definite banded generalized
-* eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y,
-* such that C has the same bandwidth as A.
-*
-* B must have been previously factorized as S**H*S by CPBSTF, using a
-* split Cholesky factorization. A is overwritten by C = X**H*A*X, where
-* X = S**(-1)*Q and Q is a unitary matrix chosen to preserve the
-* bandwidth of A.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'N': do not form the transformation matrix X;
-* = 'V': form X.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= KB >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the transformed matrix X**H*A*X, stored in the same
-* format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input) COMPLEX array, dimension (LDBB,N)
-* The banded factor S from the split Cholesky factorization of
-* B, as returned by CPBSTF, stored in the first kb+1 rows of
-* the array.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* X (output) COMPLEX array, dimension (LDX,N)
-* If VECT = 'V', the n-by-n matrix X.
-* If VECT = 'N', the array X is not referenced.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
-* LDX >= max(1,N) if VECT = 'V'; LDX >= 1 otherwise.
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chbgv.f b/SRC/chbgv.f
index 36e96f7f..e080047f 100644
--- a/SRC/chbgv.f
+++ b/SRC/chbgv.f
@@ -1,10 +1,186 @@
+*> \brief \b CHBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
+* LDZ, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), W( * )
+* COMPLEX AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBGV computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
+*> and banded, and B is also positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is COMPLEX array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**H*S, as returned by CPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so that Z**H*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: the algorithm failed to converge:
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then CPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CHBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
$ LDZ, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,93 +192,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHBGV computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
-* and banded, and B is also positive definite.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) COMPLEX array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**H*S, as returned by CPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so that Z**H*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= N.
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: the algorithm failed to converge:
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then CPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/chbgvd.f b/SRC/chbgvd.f
index e81ce3dc..4f969eb0 100644
--- a/SRC/chbgvd.f
+++ b/SRC/chbgvd.f
@@ -1,12 +1,264 @@
+*> \brief \b CHBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
+* Z, LDZ, WORK, LWORK, RWORK, LRWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LRWORK,
+* $ LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
+*> and banded, and B is also positive definite. If eigenvectors are
+*> desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is COMPLEX array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**H*S, as returned by CPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so that Z**H*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= N.
+*> If JOBZ = 'V' and N > 1, LWORK >= 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO=0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of array RWORK.
+*> If N <= 1, LRWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LRWORK >= N.
+*> If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO=0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: the algorithm failed to converge:
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then CPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
$ Z, LDZ, WORK, LWORK, RWORK, LRWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -20,147 +272,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHBGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
-* and banded, and B is also positive definite. If eigenvectors are
-* desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) COMPLEX array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**H*S, as returned by CPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so that Z**H*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= N.
-* If JOBZ = 'V' and N > 1, LWORK >= 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array, dimension (MAX(1,LRWORK))
-* On exit, if INFO=0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of array RWORK.
-* If N <= 1, LRWORK >= 1.
-* If JOBZ = 'N' and N > 1, LRWORK >= N.
-* If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO=0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: the algorithm failed to converge:
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then CPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chbgvx.f b/SRC/chbgvx.f
index 011eea99..e66bacd7 100644
--- a/SRC/chbgvx.f
+++ b/SRC/chbgvx.f
@@ -1,11 +1,299 @@
+*> \brief \b CHBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
+* LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
+* LDZ, WORK, RWORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, KA, KB, LDAB, LDBB, LDQ, LDZ, M,
+* $ N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX AB( LDAB, * ), BB( LDBB, * ), Q( LDQ, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBGVX computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
+*> and banded, and B is also positive definite. Eigenvalues and
+*> eigenvectors can be selected by specifying either all eigenvalues,
+*> a range of values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is COMPLEX array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**H*S, as returned by CPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ, N)
+*> If JOBZ = 'V', the n-by-n matrix used in the reduction of
+*> A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x,
+*> and consequently C to tridiagonal form.
+*> If JOBZ = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If JOBZ = 'N',
+*> LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AP to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so that Z**H*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: then i eigenvectors failed to converge. Their
+*> indices are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= N, then CPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
$ LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
$ LDZ, WORK, RWORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -20,160 +308,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHBGVX computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
-* and banded, and B is also positive definite. Eigenvalues and
-* eigenvectors can be selected by specifying either all eigenvalues,
-* a range of values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) COMPLEX array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**H*S, as returned by CPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* Q (output) COMPLEX array, dimension (LDQ, N)
-* If JOBZ = 'V', the n-by-n matrix used in the reduction of
-* A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x,
-* and consequently C to tridiagonal form.
-* If JOBZ = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If JOBZ = 'N',
-* LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AP to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so that Z**H*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= N.
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: then i eigenvectors failed to converge. Their
-* indices are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= N, then CPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chbtrd.f b/SRC/chbtrd.f
index 3796e1e6..d80ffd25 100644
--- a/SRC/chbtrd.f
+++ b/SRC/chbtrd.f
@@ -1,10 +1,167 @@
+*> \brief \b CHBTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, VECT
+* INTEGER INFO, KD, LDAB, LDQ, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* COMPLEX AB( LDAB, * ), Q( LDQ, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBTRD reduces a complex Hermitian band matrix A to real symmetric
+*> tridiagonal form T by a unitary similarity transformation:
+*> Q**H * A * Q = T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'N': do not form Q;
+*> = 'V': form Q;
+*> = 'U': update a matrix X, by forming X*Q.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> On exit, the diagonal elements of AB are overwritten by the
+*> diagonal elements of the tridiagonal matrix T; if KD > 0, the
+*> elements on the first superdiagonal (if UPLO = 'U') or the
+*> first subdiagonal (if UPLO = 'L') are overwritten by the
+*> off-diagonal elements of T; the rest of AB is overwritten by
+*> values generated during the reduction.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> On entry, if VECT = 'U', then Q must contain an N-by-N
+*> matrix X; if VECT = 'N' or 'V', then Q need not be set.
+*> \endverbatim
+*> \verbatim
+*> On exit:
+*> if VECT = 'V', Q contains the N-by-N unitary matrix Q;
+*> if VECT = 'U', Q contains the product X*Q;
+*> if VECT = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by Linda Kaufman, Bell Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
$ WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO, VECT
@@ -15,80 +172,6 @@
COMPLEX AB( LDAB, * ), Q( LDQ, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHBTRD reduces a complex Hermitian band matrix A to real symmetric
-* tridiagonal form T by a unitary similarity transformation:
-* Q**H * A * Q = T.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'N': do not form Q;
-* = 'V': form Q;
-* = 'U': update a matrix X, by forming X*Q.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* On exit, the diagonal elements of AB are overwritten by the
-* diagonal elements of the tridiagonal matrix T; if KD > 0, the
-* elements on the first superdiagonal (if UPLO = 'U') or the
-* first subdiagonal (if UPLO = 'L') are overwritten by the
-* off-diagonal elements of T; the rest of AB is overwritten by
-* values generated during the reduction.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* D (output) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T.
-*
-* E (output) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
-*
-* Q (input/output) COMPLEX array, dimension (LDQ,N)
-* On entry, if VECT = 'U', then Q must contain an N-by-N
-* matrix X; if VECT = 'N' or 'V', then Q need not be set.
-*
-* On exit:
-* if VECT = 'V', Q contains the N-by-N unitary matrix Q;
-* if VECT = 'U', Q contains the product X*Q;
-* if VECT = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* Modified by Linda Kaufman, Bell Labs.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/checon.f b/SRC/checon.f
index 4df062ec..1f78a875 100644
--- a/SRC/checon.f
+++ b/SRC/checon.f
@@ -1,12 +1,126 @@
+*> \brief \b CHECON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHECON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHECON estimates the reciprocal of the condition number of a complex
+*> Hermitian matrix A using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by CHETRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+* =====================================================================
SUBROUTINE CHECON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,53 +132,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHECON estimates the reciprocal of the condition number of a complex
-* Hermitian matrix A using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by CHETRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHETRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
-*
-* ANORM (input) REAL
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cheequb.f b/SRC/cheequb.f
index 6715918c..f86e621d 100644
--- a/SRC/cheequb.f
+++ b/SRC/cheequb.f
@@ -1,67 +1,124 @@
- SUBROUTINE CHEEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*> \brief \b CHEEQUB
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- REAL AMAX, SCOND
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), WORK( * )
- REAL S( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CHEEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* REAL AMAX, SCOND
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), WORK( * )
+* REAL S( * )
+* ..
+*
* Purpose
* =======
*
-* CSYEQUB computes row and column scalings intended to equilibrate a
-* symmetric matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYEQUB computes row and column scalings intended to equilibrate a
+*> symmetric matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The N-by-N symmetric matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*> \endverbatim
+*>
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The N-by-N symmetric matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \date November 2011
*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+*> \ingroup complexHEcomputational
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* =====================================================================
+ SUBROUTINE CHEEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ REAL AMAX, SCOND
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), WORK( * )
+ REAL S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cheev.f b/SRC/cheev.f
index a2a1e482..3ce25fd9 100644
--- a/SRC/cheev.f
+++ b/SRC/cheev.f
@@ -1,10 +1,142 @@
+*> \brief <b> CHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), W( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEEV computes all eigenvalues and, optionally, eigenvectors of a
+*> complex Hermitian matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> orthonormal eigenvectors of the matrix A.
+*> If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*> or the upper triangle (if UPLO='U') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,2*N-1).
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the blocksize for CHETRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEeigen
+*
+* =====================================================================
SUBROUTINE CHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,66 +147,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHEEV computes all eigenvalues and, optionally, eigenvectors of a
-* complex Hermitian matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* orthonormal eigenvectors of the matrix A.
-* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-* or the upper triangle (if UPLO='U') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,2*N-1).
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the blocksize for CHETRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (max(1, 3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cheevd.f b/SRC/cheevd.f
index 16e4fb97..dcbb7bc8 100644
--- a/SRC/cheevd.f
+++ b/SRC/cheevd.f
@@ -1,10 +1,211 @@
+*> \brief <b> CHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
+* LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDA, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEEVD computes all eigenvalues and, optionally, eigenvectors of a
+*> complex Hermitian matrix A. If eigenvectors are desired, it uses a
+*> divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> orthonormal eigenvectors of the matrix A.
+*> If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*> or the upper triangle (if UPLO='U') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least N + 1.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least 2*N + N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (LRWORK)
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK.
+*> If N <= 1, LRWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LRWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LRWORK must be at least
+*> 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i and JOBZ = 'N', then the algorithm failed
+*> to converge; i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> if INFO = i and JOBZ = 'V', then the algorithm failed
+*> to compute an eigenvalue while working on the submatrix
+*> lying in rows and columns INFO/(N+1) through
+*> mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> Modified description of INFO. Sven, 16 Feb 05.
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHEEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
$ LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,118 +217,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHEEVD computes all eigenvalues and, optionally, eigenvectors of a
-* complex Hermitian matrix A. If eigenvectors are desired, it uses a
-* divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* orthonormal eigenvectors of the matrix A.
-* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-* or the upper triangle (if UPLO='U') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least N + 1.
-* If JOBZ = 'V' and N > 1, LWORK must be at least 2*N + N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array,
-* dimension (LRWORK)
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK.
-* If N <= 1, LRWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LRWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LRWORK must be at least
-* 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i and JOBZ = 'N', then the algorithm failed
-* to converge; i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* if INFO = i and JOBZ = 'V', then the algorithm failed
-* to compute an eigenvalue while working on the submatrix
-* lying in rows and columns INFO/(N+1) through
-* mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
-* Modified description of INFO. Sven, 16 Feb 05.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cheevr.f b/SRC/cheevr.f
index 5dc17573..38b5b57b 100644
--- a/SRC/cheevr.f
+++ b/SRC/cheevr.f
@@ -1,11 +1,362 @@
+*> \brief <b> CHEEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
+* RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDA, LDZ, LIWORK, LRWORK, LWORK,
+* $ M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX A( LDA, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEEVR computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex Hermitian matrix A. Eigenvalues and eigenvectors can
+*> be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*> CHEEVR first reduces the matrix A to tridiagonal form T with a call
+*> to CHETRD. Then, whenever possible, CHEEVR calls CSTEMR to compute
+*> the eigenspectrum using Relatively Robust Representations. CSTEMR
+*> computes eigenvalues by the dqds algorithm, while orthogonal
+*> eigenvectors are computed from various "good" L D L^T representations
+*> (also known as Relatively Robust Representations). Gram-Schmidt
+*> orthogonalization is avoided as far as possible. More specifically,
+*> the various steps of the algorithm are as follows.
+*>
+*> For each unreduced block (submatrix) of T,
+*> (a) Compute T - sigma I = L D L^T, so that L and D
+*> define all the wanted eigenvalues to high relative accuracy.
+*> This means that small relative changes in the entries of D and L
+*> cause only small relative changes in the eigenvalues and
+*> eigenvectors. The standard (unfactored) representation of the
+*> tridiagonal matrix T does not have this property in general.
+*> (b) Compute the eigenvalues to suitable accuracy.
+*> If the eigenvectors are desired, the algorithm attains full
+*> accuracy of the computed eigenvalues only right before
+*> the corresponding vectors have to be computed, see steps c) and d).
+*> (c) For each cluster of close eigenvalues, select a new
+*> shift close to the cluster, find a new factorization, and refine
+*> the shifted eigenvalues to suitable accuracy.
+*> (d) For each eigenvalue with a large enough relative separation compute
+*> the corresponding eigenvector by forming a rank revealing twisted
+*> factorization. Go back to (c) for any clusters that remain.
+*>
+*> The desired accuracy of the output can be specified by the input
+*> parameter ABSTOL.
+*>
+*> For more details, see DSTEMR's documentation and:
+*> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
+*> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
+*> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
+*> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
+*> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
+*> 2004. Also LAPACK Working Note 154.
+*> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem",
+*> Computer Science Division Technical Report No. UCB/CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*>
+*> Note 1 : CHEEVR calls CSTEMR when the full spectrum is requested
+*> on machines which conform to the ieee-754 floating point standard.
+*> CHEEVR calls SSTEBZ and CSTEIN on non-ieee machines and
+*> when partial spectrum requests are made.
+*>
+*> Normal execution of CSTEMR may create NaNs and infinities and
+*> hence may abort due to a floating point exception in environments
+*> which do not handle NaNs and infinities in the ieee standard default
+*> manner.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> For RANGE = 'V' or 'I' and IU - IL < N - 1, SSTEBZ and
+*> CSTEIN are called
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*> \verbatim
+*> If high relative accuracy is important, set ABSTOL to
+*> SLAMCH( 'Safe minimum' ). Doing so will guarantee that
+*> eigenvalues are computed to high relative accuracy when
+*> possible in future releases. The current code does not
+*> make any guarantees about high relative accuracy, but
+*> furutre releases will. See J. Barlow and J. Demmel,
+*> "Computing Accurate Eigensystems of Scaled Diagonally
+*> Dominant Matrices", LAPACK Working Note #7, for a discussion
+*> of which matrices define their eigenvalues to high relative
+*> accuracy.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ).
+*> Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,2*N).
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the max of the blocksize for CHETRD and for
+*> CUNMTR as returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO = 0, RWORK(1) returns the optimal
+*> (and minimal) LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The length of the array RWORK. LRWORK >= max(1,24*N).
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal
+*> (and minimal) LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: Internal error
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Ken Stanley, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Jason Riedy, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHEEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
$ RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK eigen routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,231 +370,6 @@
COMPLEX A( LDA, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHEEVR computes selected eigenvalues and, optionally, eigenvectors
-* of a complex Hermitian matrix A. Eigenvalues and eigenvectors can
-* be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* CHEEVR first reduces the matrix A to tridiagonal form T with a call
-* to CHETRD. Then, whenever possible, CHEEVR calls CSTEMR to compute
-* the eigenspectrum using Relatively Robust Representations. CSTEMR
-* computes eigenvalues by the dqds algorithm, while orthogonal
-* eigenvectors are computed from various "good" L D L^T representations
-* (also known as Relatively Robust Representations). Gram-Schmidt
-* orthogonalization is avoided as far as possible. More specifically,
-* the various steps of the algorithm are as follows.
-*
-* For each unreduced block (submatrix) of T,
-* (a) Compute T - sigma I = L D L^T, so that L and D
-* define all the wanted eigenvalues to high relative accuracy.
-* This means that small relative changes in the entries of D and L
-* cause only small relative changes in the eigenvalues and
-* eigenvectors. The standard (unfactored) representation of the
-* tridiagonal matrix T does not have this property in general.
-* (b) Compute the eigenvalues to suitable accuracy.
-* If the eigenvectors are desired, the algorithm attains full
-* accuracy of the computed eigenvalues only right before
-* the corresponding vectors have to be computed, see steps c) and d).
-* (c) For each cluster of close eigenvalues, select a new
-* shift close to the cluster, find a new factorization, and refine
-* the shifted eigenvalues to suitable accuracy.
-* (d) For each eigenvalue with a large enough relative separation compute
-* the corresponding eigenvector by forming a rank revealing twisted
-* factorization. Go back to (c) for any clusters that remain.
-*
-* The desired accuracy of the output can be specified by the input
-* parameter ABSTOL.
-*
-* For more details, see DSTEMR's documentation and:
-* - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
-* to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
-* Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
-* - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
-* Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
-* 2004. Also LAPACK Working Note 154.
-* - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem",
-* Computer Science Division Technical Report No. UCB/CSD-97-971,
-* UC Berkeley, May 1997.
-*
-*
-* Note 1 : CHEEVR calls CSTEMR when the full spectrum is requested
-* on machines which conform to the ieee-754 floating point standard.
-* CHEEVR calls SSTEBZ and CSTEIN on non-ieee machines and
-* when partial spectrum requests are made.
-*
-* Normal execution of CSTEMR may create NaNs and infinities and
-* hence may abort due to a floating point exception in environments
-* which do not handle NaNs and infinities in the ieee standard default
-* manner.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-* For RANGE = 'V' or 'I' and IU - IL < N - 1, SSTEBZ and
-* CSTEIN are called
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* If high relative accuracy is important, set ABSTOL to
-* SLAMCH( 'Safe minimum' ). Doing so will guarantee that
-* eigenvalues are computed to high relative accuracy when
-* possible in future releases. The current code does not
-* make any guarantees about high relative accuracy, but
-* furutre releases will. See J. Barlow and J. Demmel,
-* "Computing Accurate Eigensystems of Scaled Diagonally
-* Dominant Matrices", LAPACK Working Note #7, for a discussion
-* of which matrices define their eigenvalues to high relative
-* accuracy.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ).
-* Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,2*N).
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the max of the blocksize for CHETRD and for
-* CUNMTR as returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array, dimension (MAX(1,LRWORK))
-* On exit, if INFO = 0, RWORK(1) returns the optimal
-* (and minimal) LRWORK.
-*
-* LRWORK (input) INTEGER
-* The length of the array RWORK. LRWORK >= max(1,24*N).
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal
-* (and minimal) LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: Internal error
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Ken Stanley, Computer Science Division, University of
-* California at Berkeley, USA
-* Jason Riedy, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cheevx.f b/SRC/cheevx.f
index d99c5026..0c27cb33 100644
--- a/SRC/cheevx.f
+++ b/SRC/cheevx.f
@@ -1,12 +1,258 @@
+*> \brief <b> CHEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDA, LDZ, LWORK, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX A( LDA, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex Hermitian matrix A. Eigenvalues and eigenvectors can
+*> be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= 1, when N <= 1;
+*> otherwise 2*N.
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the max of the blocksize for CHETRD and for
+*> CUNMTR as returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEeigen
+*
+* =====================================================================
SUBROUTINE CHEEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,141 +265,6 @@
COMPLEX A( LDA, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHEEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a complex Hermitian matrix A. Eigenvalues and eigenvectors can
-* be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= 1, when N <= 1;
-* otherwise 2*N.
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the max of the blocksize for CHETRD and for
-* CUNMTR as returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chegs2.f b/SRC/chegs2.f
index 767db76e..3925476c 100644
--- a/SRC/chegs2.f
+++ b/SRC/chegs2.f
@@ -1,73 +1,137 @@
- SUBROUTINE CHEGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, LDA, LDB, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b CHEGS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CHEGS2 reduces a complex Hermitian-definite generalized
-* eigenproblem to standard form.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H *A*L.
-*
-* B must have been previously factorized as U**H *U or L*L**H by ZPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEGS2 reduces a complex Hermitian-definite generalized
+*> eigenproblem to standard form.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H *A*L.
+*>
+*> B must have been previously factorized as U**H *U or L*L**H by ZPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
-* = 2 or 3: compute U*A*U**H or L**H *A*L.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored, and how B has been factorized.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
+*> = 2 or 3: compute U*A*U**H or L**H *A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored, and how B has been factorized.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> The triangular factor from the Cholesky factorization of B,
+*> as returned by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complexHEcomputational
*
-* B (input) COMPLEX array, dimension (LDB,N)
-* The triangular factor from the Cholesky factorization of B,
-* as returned by CPOTRF.
+* =====================================================================
+ SUBROUTINE CHEGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chegst.f b/SRC/chegst.f
index 6136f097..af0d9d73 100644
--- a/SRC/chegst.f
+++ b/SRC/chegst.f
@@ -1,73 +1,137 @@
- SUBROUTINE CHEGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, LDA, LDB, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b CHEGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CHEGST reduces a complex Hermitian-definite generalized
-* eigenproblem to standard form.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L.
-*
-* B must have been previously factorized as U**H*U or L*L**H by CPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEGST reduces a complex Hermitian-definite generalized
+*> eigenproblem to standard form.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L.
+*>
+*> B must have been previously factorized as U**H*U or L*L**H by CPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
-* = 2 or 3: compute U*A*U**H or L**H*A*L.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored and B is factored as
-* U**H*U;
-* = 'L': Lower triangle of A is stored and B is factored as
-* L*L**H.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
+*> = 2 or 3: compute U*A*U**H or L**H*A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored and B is factored as
+*> U**H*U;
+*> = 'L': Lower triangle of A is stored and B is factored as
+*> L*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> The triangular factor from the Cholesky factorization of B,
+*> as returned by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complexHEcomputational
*
-* B (input) COMPLEX array, dimension (LDB,N)
-* The triangular factor from the Cholesky factorization of B,
-* as returned by CPOTRF.
+* =====================================================================
+ SUBROUTINE CHEGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chegv.f b/SRC/chegv.f
index 3abd2aa8..b8f1b3af 100644
--- a/SRC/chegv.f
+++ b/SRC/chegv.f
@@ -1,10 +1,185 @@
+*> \brief \b CHEGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
+* LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), W( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEGV computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
+*> Here A and B are assumed to be Hermitian and B is also
+*> positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> matrix Z of eigenvectors. The eigenvectors are normalized
+*> as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+*> or the lower triangle (if UPLO='L') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the Hermitian positive definite matrix B.
+*> If UPLO = 'U', the leading N-by-N upper triangular part of B
+*> contains the upper triangular part of the matrix B.
+*> If UPLO = 'L', the leading N-by-N lower triangular part of B
+*> contains the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,2*N-1).
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the blocksize for CHETRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: CPOTRF or CHEEV returned an error code:
+*> <= N: if INFO = i, CHEEV failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEeigen
+*
+* =====================================================================
SUBROUTINE CHEGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
$ LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,98 +190,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHEGV computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
-* Here A and B are assumed to be Hermitian and B is also
-* positive definite.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* matrix Z of eigenvectors. The eigenvectors are normalized
-* as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-* If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
-* or the lower triangle (if UPLO='L') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the Hermitian positive definite matrix B.
-* If UPLO = 'U', the leading N-by-N upper triangular part of B
-* contains the upper triangular part of the matrix B.
-* If UPLO = 'L', the leading N-by-N lower triangular part of B
-* contains the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,2*N-1).
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the blocksize for CHETRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (max(1, 3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: CPOTRF or CHEEV returned an error code:
-* <= N: if INFO = i, CHEEV failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chegvd.f b/SRC/chegvd.f
index b2976aa5..0dde121f 100644
--- a/SRC/chegvd.f
+++ b/SRC/chegvd.f
@@ -1,10 +1,254 @@
+*> \brief \b CHEGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
+* LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be Hermitian and B is also positive definite.
+*> If eigenvectors are desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> matrix Z of eigenvectors. The eigenvectors are normalized
+*> as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+*> or the lower triangle (if UPLO='L') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the Hermitian matrix B. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of B contains the
+*> upper triangular part of the matrix B. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of B contains
+*> the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= N + 1.
+*> If JOBZ = 'V' and N > 1, LWORK >= 2*N + N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK.
+*> If N <= 1, LRWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LRWORK >= N.
+*> If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If N <= 1, LIWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: CPOTRF or CHEEVD returned an error code:
+*> <= N: if INFO = i and JOBZ = 'N', then the algorithm
+*> failed to converge; i off-diagonal elements of an
+*> intermediate tridiagonal form did not converge to
+*> zero;
+*> if INFO = i and JOBZ = 'V', then the algorithm
+*> failed to compute an eigenvalue while working on
+*> the submatrix lying in rows and columns INFO/(N+1)
+*> through mod(INFO,N+1);
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> Modified so that no backsubstitution is performed if CHEEVD fails to
+*> converge (NEIG in old code could be greater than N causing out of
+*> bounds reference to A - reported by Ralf Meyer). Also corrected the
+*> description of INFO and the test on ITYPE. Sven, 16 Feb 05.
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHEGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
$ LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,150 +260,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHEGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be Hermitian and B is also positive definite.
-* If eigenvectors are desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* matrix Z of eigenvectors. The eigenvectors are normalized
-* as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-* If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
-* or the lower triangle (if UPLO='L') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the Hermitian matrix B. If UPLO = 'U', the
-* leading N-by-N upper triangular part of B contains the
-* upper triangular part of the matrix B. If UPLO = 'L',
-* the leading N-by-N lower triangular part of B contains
-* the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= N + 1.
-* If JOBZ = 'V' and N > 1, LWORK >= 2*N + N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array, dimension (MAX(1,LRWORK))
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK.
-* If N <= 1, LRWORK >= 1.
-* If JOBZ = 'N' and N > 1, LRWORK >= N.
-* If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If N <= 1, LIWORK >= 1.
-* If JOBZ = 'N' and N > 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: CPOTRF or CHEEVD returned an error code:
-* <= N: if INFO = i and JOBZ = 'N', then the algorithm
-* failed to converge; i off-diagonal elements of an
-* intermediate tridiagonal form did not converge to
-* zero;
-* if INFO = i and JOBZ = 'V', then the algorithm
-* failed to compute an eigenvalue while working on
-* the submatrix lying in rows and columns INFO/(N+1)
-* through mod(INFO,N+1);
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
-* Modified so that no backsubstitution is performed if CHEEVD fails to
-* converge (NEIG in old code could be greater than N causing out of
-* bounds reference to A - reported by Ralf Meyer). Also corrected the
-* description of INFO and the test on ITYPE. Sven, 16 Feb 05.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chegvx.f b/SRC/chegvx.f
index 40f670e3..36e9635a 100644
--- a/SRC/chegvx.f
+++ b/SRC/chegvx.f
@@ -1,11 +1,307 @@
+*> \brief \b CHEGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHEGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
+* VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
+* LWORK, RWORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHEGVX computes selected eigenvalues, and optionally, eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be Hermitian and B is also positive definite.
+*> Eigenvalues and eigenvectors can be selected by specifying either a
+*> range of values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, the Hermitian matrix B. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of B contains the
+*> upper triangular part of the matrix B. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of B contains
+*> the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing C to tridiagonal form, where C is the symmetric
+*> matrix of the standard symmetric problem to which the
+*> generalized problem is transformed.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'N', then Z is not referenced.
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> \endverbatim
+*> \verbatim
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,2*N).
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the blocksize for CHETRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: CPOTRF or CHEEVX returned an error code:
+*> <= N: if INFO = i, CHEEVX failed to converge;
+*> i eigenvectors failed to converge. Their indices
+*> are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHEGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
$ VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
$ LWORK, RWORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,174 +315,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHEGVX computes selected eigenvalues, and optionally, eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be Hermitian and B is also positive definite.
-* Eigenvalues and eigenvectors can be selected by specifying either a
-* range of values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-**
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB, N)
-* On entry, the Hermitian matrix B. If UPLO = 'U', the
-* leading N-by-N upper triangular part of B contains the
-* upper triangular part of the matrix B. If UPLO = 'L',
-* the leading N-by-N lower triangular part of B contains
-* the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing C to tridiagonal form, where C is the symmetric
-* matrix of the standard symmetric problem to which the
-* generalized problem is transformed.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, max(1,M))
-* If JOBZ = 'N', then Z is not referenced.
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-*
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,2*N).
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the blocksize for CHETRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: CPOTRF or CHEEVX returned an error code:
-* <= N: if INFO = i, CHEEVX failed to converge;
-* i eigenvectors failed to converge. Their indices
-* are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cherfs.f b/SRC/cherfs.f
index dc1b8928..82bac339 100644
--- a/SRC/cherfs.f
+++ b/SRC/cherfs.f
@@ -1,12 +1,193 @@
+*> \brief \b CHERFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHERFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHERFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian indefinite, and
+*> provides error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**H or
+*> A = L*D*L**H as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CHETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+* =====================================================================
SUBROUTINE CHERFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -19,93 +200,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CHERFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian indefinite, and
-* provides error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**H or
-* A = L*D*L**H as computed by CHETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CHETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cherfsx.f b/SRC/cherfsx.f
index e74e0743..3beb7b06 100644
--- a/SRC/cherfsx.f
+++ b/SRC/cherfsx.f
@@ -1,18 +1,422 @@
+*> \brief \b CHERFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHERFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* REAL S( * ), PARAMS( * ), BERR( * ), RWORK( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CHERFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian indefinite, and
+*> provides error bounds and backward error estimates for the
+*> solution. In addition to normwise error bound, the code provides
+*> maximum componentwise error bound if possible. See comments for
+*> ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or A =
+*> L*D*L**T as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+* =====================================================================
SUBROUTINE CHERFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -27,274 +431,6 @@
$ ERR_BNDS_NORM( NRHS, * ),
$ ERR_BNDS_COMP( NRHS, * )
*
-* Purpose
-* =======
-*
-* CHERFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian indefinite, and
-* provides error bounds and backward error estimates for the
-* solution. In addition to normwise error bound, the code provides
-* maximum componentwise error bound if possible. See comments for
-* ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or A =
-* L*D*L**T as computed by SSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/chesv.f b/SRC/chesv.f
index 3ac7e051..e701c03c 100644
--- a/SRC/chesv.f
+++ b/SRC/chesv.f
@@ -1,11 +1,174 @@
+*> \brief <b> CHESV computes the solution to system of linear equations A * X = B for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHESV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, LWORK, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHESV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**H, if UPLO = 'U', or
+*> A = L * D * L**H, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
+*> used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the block diagonal matrix D and the
+*> multipliers used to obtain the factor U or L from the
+*> factorization A = U*D*U**H or A = L*D*L**H as computed by
+*> CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by CHETRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= 1, and for best performance
+*> LWORK >= max(1,N*NB), where NB is the optimal blocksize for
+*> CHETRF.
+*> for LWORK < N, TRS will be done with Level BLAS 2
+*> for LWORK >= N, TRS will be done with Level BLAS 3
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEsolve
+*
+* =====================================================================
SUBROUTINE CHESV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,94 +179,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHESV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
-* matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**H, if UPLO = 'U', or
-* A = L * D * L**H, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
-* used to solve the system of equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the block diagonal matrix D and the
-* multipliers used to obtain the factor U or L from the
-* factorization A = U*D*U**H or A = L*D*L**H as computed by
-* CHETRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by CHETRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= 1, and for best performance
-* LWORK >= max(1,N*NB), where NB is the optimal blocksize for
-* CHETRF.
-* for LWORK < N, TRS will be done with Level BLAS 2
-* for LWORK >= N, TRS will be done with Level BLAS 3
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/chesvx.f b/SRC/chesvx.f
index 47e0e7c7..3d201276 100644
--- a/SRC/chesvx.f
+++ b/SRC/chesvx.f
@@ -1,11 +1,286 @@
+*> \brief <b> CHESVX computes the solution to system of linear equations A * X = B for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHESVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
+* LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHESVX uses the diagonal pivoting factorization to compute the
+*> solution to a complex system of linear equations A * X = B,
+*> where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
+*> The form of the factorization is
+*> A = U * D * U**H, if UPLO = 'U', or
+*> A = L * D * L**H, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AF and IPIV contain the factored form
+*> of A. A, AF and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H as computed by CHETRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by CHETRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= max(1,2*N), and for best
+*> performance, when FACT = 'N', LWORK >= max(1,2*N,N*NB), where
+*> NB is the optimal blocksize for CHETRF.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEsolve
+*
+* =====================================================================
SUBROUTINE CHESVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
$ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -19,173 +294,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CHESVX uses the diagonal pivoting factorization to compute the
-* solution to a complex system of linear equations A * X = B,
-* where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
-* The form of the factorization is
-* A = U * D * U**H, if UPLO = 'U', or
-* A = L * D * L**H, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AF and IPIV contain the factored form
-* of A. A, AF and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H as computed by CHETRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by CHETRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by CHETRF.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= max(1,2*N), and for best
-* performance, when FACT = 'N', LWORK >= max(1,2*N,N*NB), where
-* NB is the optimal blocksize for CHETRF.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chesvxx.f b/SRC/chesvxx.f
index 043d033a..a8fa4ed6 100644
--- a/SRC/chesvxx.f
+++ b/SRC/chesvxx.f
@@ -1,18 +1,521 @@
+*> \brief <b> CHESVXX computes the solution to system of linear equations A * X = B for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHESVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* REAL S( * ), PARAMS( * ), BERR( * ), RWORK( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHESVXX uses the diagonal pivoting factorization to compute the
+*> solution to a complex system of linear equations A * X = B, where
+*> A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. CHESVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> CHESVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> CHESVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what CHESVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 3. If some D(i,i)=0, so that D is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is
+*> less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(R) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T as computed by SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block
+*> structure of D, as determined by CHETRF. If IPIV(k) > 0,
+*> then rows and columns k and IPIV(k) were interchanged and
+*> D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
+*> IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
+*> -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
+*> diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
+*> then rows and columns k+1 and -IPIV(k) were interchanged
+*> and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block
+*> structure of D, as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEsolve
+*
+* =====================================================================
SUBROUTINE CHESVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,368 +531,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CHESVXX uses the diagonal pivoting factorization to compute the
-* solution to a complex system of linear equations A * X = B, where
-* A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. CHESVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* CHESVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* CHESVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what CHESVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 3. If some D(i,i)=0, so that D is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is
-* less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(R) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T as computed by SSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block
-* structure of D, as determined by CHETRF. If IPIV(k) > 0,
-* then rows and columns k and IPIV(k) were interchanged and
-* D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
-* IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
-* -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
-* diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
-* then rows and columns k+1 and -IPIV(k) were interchanged
-* and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block
-* structure of D, as determined by CHETRF.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/cheswapr.f b/SRC/cheswapr.f
index fd06ad3c..0646f321 100644
--- a/SRC/cheswapr.f
+++ b/SRC/cheswapr.f
@@ -1,54 +1,111 @@
- SUBROUTINE CHESWAPR( UPLO, N, A, LDA, I1, I2)
+*> \brief \b CHESWAPR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER I1, I2, LDA, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, N )
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CHESWAPR( UPLO, N, A, LDA, I1, I2)
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, N )
+*
* Purpose
* =======
*
-* CHESWAPR applies an elementary permutation on the rows and the columns of
-* a hermitian matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHESWAPR applies an elementary permutation on the rows and the columns of
+*> a hermitian matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] I1
+*> \verbatim
+*> I1 is INTEGER
+*> Index of the first row to swap
+*> \endverbatim
+*>
+*> \param[in] I2
+*> \verbatim
+*> I2 is INTEGER
+*> Index of the second row to swap
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CSYTRF.
+*> \date November 2011
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \ingroup complexHEauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ SUBROUTINE CHESWAPR( UPLO, N, A, LDA, I1, I2)
*
-* I1 (input) INTEGER
-* Index of the first row to swap
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* I2 (input) INTEGER
-* Index of the second row to swap
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, N )
*
* =====================================================================
*
diff --git a/SRC/chetd2.f b/SRC/chetd2.f
index 7ec57305..c42de40f 100644
--- a/SRC/chetd2.f
+++ b/SRC/chetd2.f
@@ -1,118 +1,152 @@
- SUBROUTINE CHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
- COMPLEX A( LDA, * ), TAU( * )
-* ..
-*
+*> \brief \b CHETD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* COMPLEX A( LDA, * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* CHETD2 reduces a complex Hermitian matrix A to real symmetric
-* tridiagonal form T by a unitary similarity transformation:
-* Q**H * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETD2 reduces a complex Hermitian matrix A to real symmetric
+*> tridiagonal form T by a unitary similarity transformation:
+*> Q**H * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the unitary
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the unitary matrix Q as a product
-* of elementary reflectors. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (output) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (output) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \date November 2011
*
-* TAU (output) COMPLEX array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \ingroup complexHEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> D (output) REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) COMPLEX array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*> A(1:i-1,i+1), and tau in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*> and tau in TAU(i).
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( d e v2 v3 v4 ) ( d )
+*> ( d e v3 v4 ) ( e d )
+*> ( d e v4 ) ( v1 e d )
+*> ( d e ) ( v1 v2 e d )
+*> ( d ) ( v1 v2 v3 e d )
+*>
+*> where d and e denote diagonal and off-diagonal elements of T, and vi
+*> denotes an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-* A(1:i-1,i+1), and tau in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-* and tau in TAU(i).
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( d e v2 v3 v4 ) ( d )
-* ( d e v3 v4 ) ( e d )
-* ( d e v4 ) ( v1 e d )
-* ( d e ) ( v1 v2 e d )
-* ( d ) ( v1 v2 v3 e d )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of T, and vi
-* denotes an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+ COMPLEX A( LDA, * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chetf2.f b/SRC/chetf2.f
index d740a392..61eadb4f 100644
--- a/SRC/chetf2.f
+++ b/SRC/chetf2.f
@@ -1,9 +1,181 @@
+*> \brief \b CHETF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHETF2( UPLO, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETF2 computes the factorization of a complex Hermitian matrix A
+*> using the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**H or A = L*D*L**H
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U**H is the conjugate transpose of U, and D is
+*> Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 09-29-06 - patch from
+*> Bobby Cheng, MathWorks
+*>
+*> Replace l.210 and l.392
+*> IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*> by
+*> IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. SISNAN(ABSAKK) ) THEN
+*>
+*> 01-01-96 - Based on modifications by
+*> J. Lewis, Boeing Computer Services Company
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> If UPLO = 'U', then A = U*D*U**H, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**H, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHETF2( UPLO, N, A, LDA, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,114 +186,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CHETF2 computes the factorization of a complex Hermitian matrix A
-* using the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**H or A = L*D*L**H
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U**H is the conjugate transpose of U, and D is
-* Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 09-29-06 - patch from
-* Bobby Cheng, MathWorks
-*
-* Replace l.210 and l.392
-* IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
-* by
-* IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. SISNAN(ABSAKK) ) THEN
-*
-* 01-01-96 - Based on modifications by
-* J. Lewis, Boeing Computer Services Company
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* If UPLO = 'U', then A = U*D*U**H, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**H, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chetrd.f b/SRC/chetrd.f
index 0d7762b1..50670114 100644
--- a/SRC/chetrd.f
+++ b/SRC/chetrd.f
@@ -1,129 +1,163 @@
- SUBROUTINE CHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CHETRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CHETRD reduces a complex Hermitian matrix A to real symmetric
-* tridiagonal form T by a unitary similarity transformation:
-* Q**H * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETRD reduces a complex Hermitian matrix A to real symmetric
+*> tridiagonal form T by a unitary similarity transformation:
+*> Q**H * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the unitary
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the unitary matrix Q as a product
-* of elementary reflectors. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* D (output) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
-*
-* E (output) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
-*
-* TAU (output) COMPLEX array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1.
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexHEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> D (output) REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) COMPLEX array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= 1.
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*> A(1:i-1,i+1), and tau in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*> and tau in TAU(i).
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( d e v2 v3 v4 ) ( d )
+*> ( d e v3 v4 ) ( e d )
+*> ( d e v4 ) ( v1 e d )
+*> ( d e ) ( v1 v2 e d )
+*> ( d ) ( v1 v2 v3 e d )
+*>
+*> where d and e denote diagonal and off-diagonal elements of T, and vi
+*> denotes an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-* A(1:i-1,i+1), and tau in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-* and tau in TAU(i).
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( d e v2 v3 v4 ) ( d )
-* ( d e v3 v4 ) ( e d )
-* ( d e v4 ) ( v1 e d )
-* ( d e ) ( v1 v2 e d )
-* ( d ) ( v1 v2 v3 e d )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of T, and vi
-* denotes an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chetrf.f b/SRC/chetrf.f
index 616e2ed1..25d00ddc 100644
--- a/SRC/chetrf.f
+++ b/SRC/chetrf.f
@@ -1,9 +1,181 @@
+*> \brief \b CHETRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHETRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETRF computes the factorization of a complex Hermitian matrix A
+*> using the Bunch-Kaufman diagonal pivoting method. The form of the
+*> factorization is
+*>
+*> A = U*D*U**H or A = L*D*L**H
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1. For best performance
+*> LWORK >= N*NB, where NB is the block size returned by ILAENV.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> If UPLO = 'U', then A = U*D*U**H, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**H, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHETRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,108 +186,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHETRF computes the factorization of a complex Hermitian matrix A
-* using the Bunch-Kaufman diagonal pivoting method. The form of the
-* factorization is
-*
-* A = U*D*U**H or A = L*D*L**H
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1. For best performance
-* LWORK >= N*NB, where NB is the block size returned by ILAENV.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* If UPLO = 'U', then A = U*D*U**H, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**H, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/chetri.f b/SRC/chetri.f
index c1ed54d3..d008684e 100644
--- a/SRC/chetri.f
+++ b/SRC/chetri.f
@@ -1,63 +1,125 @@
- SUBROUTINE CHETRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b CHETRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHETRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CHETRI computes the inverse of a complex Hermitian indefinite matrix
-* A using the factorization A = U*D*U**H or A = L*D*L**H computed by
-* CHETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETRI computes the inverse of a complex Hermitian indefinite matrix
+*> A using the factorization A = U*D*U**H or A = L*D*L**H computed by
+*> CHETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (Hermitian) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CHETRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the (Hermitian) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complexHEcomputational
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
+* =====================================================================
+ SUBROUTINE CHETRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chetri2.f b/SRC/chetri2.f
index 59640061..be8d5563 100644
--- a/SRC/chetri2.f
+++ b/SRC/chetri2.f
@@ -1,13 +1,129 @@
+*> \brief \b CHETRI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHETRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETRI2 computes the inverse of a COMPLEX hermitian indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> CHETRF. CHETRI2 set the LEADING DIMENSION of the workspace
+*> before calling CHETRI2X that actually computes the inverse.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NB structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N+NB+1)*(NB+3)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> WORK is size >= (N+NB+1)*(NB+3)
+*> If LDWORK = -1, then a workspace query is assumed; the routine
+*> calculates:
+*> - the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array,
+*> - and no error message related to LDWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+* =====================================================================
SUBROUTINE CHETRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* -- Written by Julie Langou of the Univ. of TN --
-*
-* @generated c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,61 +134,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHETRI2 computes the inverse of a COMPLEX hermitian indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* CHETRF. CHETRI2 set the LEADING DIMENSION of the workspace
-* before calling CHETRI2X that actually computes the inverse.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CHETRF.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NB structure of D
-* as determined by CHETRF.
-*
-* WORK (workspace) COMPLEX array, dimension (N+NB+1)*(NB+3)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* WORK is size >= (N+NB+1)*(NB+3)
-* If LDWORK = -1, then a workspace query is assumed; the routine
-* calculates:
-* - the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array,
-* - and no error message related to LDWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/chetri2x.f b/SRC/chetri2x.f
index 809974f5..e3a3aac2 100644
--- a/SRC/chetri2x.f
+++ b/SRC/chetri2x.f
@@ -1,68 +1,131 @@
- SUBROUTINE CHETRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*> \brief \b CHETRI2X
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N, NB
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), WORK( N+NB+1,* )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CHETRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( N+NB+1,* )
+* ..
+*
* Purpose
* =======
*
-* CHETRI2X computes the inverse of a complex Hermitian indefinite matrix
-* A using the factorization A = U*D*U**H or A = L*D*L**H computed by
-* CHETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETRI2X computes the inverse of a complex Hermitian indefinite matrix
+*> A using the factorization A = U*D*U**H or A = L*D*L**H computed by
+*> CHETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the NNB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CHETRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the NNB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NNB structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N+NNB+1,NNB+3)
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NNB structure of D
-* as determined by CHETRF.
+*> \ingroup complexHEcomputational
*
-* WORK (workspace) COMPLEX array, dimension (N+NNB+1,NNB+3)
+* =====================================================================
+ SUBROUTINE CHETRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
*
-* NB (input) INTEGER
-* Block size
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), WORK( N+NB+1,* )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chetrs.f b/SRC/chetrs.f
index 799a006d..e25f36e4 100644
--- a/SRC/chetrs.f
+++ b/SRC/chetrs.f
@@ -1,63 +1,130 @@
- SUBROUTINE CHETRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b CHETRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHETRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CHETRS solves a system of linear equations A*X = B with a complex
-* Hermitian matrix A using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by CHETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETRS solves a system of linear equations A*X = B with a complex
+*> Hermitian matrix A using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by CHETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHETRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
+*> \ingroup complexHEcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE CHETRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chetrs2.f b/SRC/chetrs2.f
index 8634ece1..cdfe65b8 100644
--- a/SRC/chetrs2.f
+++ b/SRC/chetrs2.f
@@ -1,69 +1,137 @@
- SUBROUTINE CHETRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
- $ WORK, INFO )
+*> \brief \b CHETRS2
*
-* -- LAPACK PROTOTYPE routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CHETRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CHETRS2 solves a system of linear equations A*X = B with a complex
-* Hermitian matrix A using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by CHETRF and converted by CSYCONV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHETRS2 solves a system of linear equations A*X = B with a complex
+*> Hermitian matrix A using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by CHETRF and converted by CSYCONV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHETRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
+*> \date November 2011
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \ingroup complexHEcomputational
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE CHETRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chfrk.f b/SRC/chfrk.f
index d9cfcbf9..8cd6f9bd 100644
--- a/SRC/chfrk.f
+++ b/SRC/chfrk.f
@@ -1,111 +1,184 @@
- SUBROUTINE CHFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
- $ C )
+*> \brief \b CHFRK
*
-* -- LAPACK routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Julien Langou of the Univ. of Colorado Denver --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER K, LDA, N
- CHARACTER TRANS, TRANSR, UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), C( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CHFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
+* C )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER K, LDA, N
+* CHARACTER TRANS, TRANSR, UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( * )
+* ..
+*
* Purpose
* =======
*
-* Level 3 BLAS like routine for C in RFP Format.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Level 3 BLAS like routine for C in RFP Format.
+*>
+*> CHFRK performs one of the Hermitian rank--k operations
+*>
+*> C := alpha*A*A**H + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**H*A + beta*C,
+*>
+*> where alpha and beta are real scalars, C is an n--by--n Hermitian
+*> matrix and A is an n--by--k matrix in the first case and a k--by--n
+*> matrix in the second case.
+*>
+*>\endverbatim
*
-* CHFRK performs one of the Hermitian rank--k operations
+* Arguments
+* =========
+*
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal Form of RFP A is stored;
+*> = 'C': The Conjugate-transpose Form of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with
+*> TRANS = 'C' or 'c', K specifies the number of rows of the
+*> matrix A. K must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,ka)
+*> where KA
+*> is K when TRANS = 'N' or 'n', and is N otherwise. Before
+*> entry with TRANS = 'N' or 'n', the leading N--by--K part of
+*> the array A must contain the matrix A, otherwise the leading
+*> K--by--N part of the array A must contain the matrix A.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the matrix A in RFP Format. RFP Format is
+*> described by TRANSR, UPLO and N. Note that the imaginary
+*> parts of the diagonal elements need not be set, they are
+*> assumed to be zero, and on exit they are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A*A**H + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* or
+*> \date November 2011
*
-* C := alpha*A**H*A + beta*C,
+*> \ingroup complexOTHERcomputational
*
-* where alpha and beta are real scalars, C is an n--by--n Hermitian
-* matrix and A is an n--by--k matrix in the first case and a k--by--n
-* matrix in the second case.
+* =====================================================================
+ SUBROUTINE CHFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
+ $ C )
*
-* Arguments
-* ==========
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal Form of RFP A is stored;
-* = 'C': The Conjugate-transpose Form of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS (input) CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K (input) INTEGER
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with
-* TRANS = 'C' or 'c', K specifies the number of rows of the
-* matrix A. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) REAL
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX array, dimension (LDA,ka)
-* where KA
-* is K when TRANS = 'N' or 'n', and is N otherwise. Before
-* entry with TRANS = 'N' or 'n', the leading N--by--K part of
-* the array A must contain the matrix A, otherwise the leading
-* K--by--N part of the array A must contain the matrix A.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA (input) REAL
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the matrix A in RFP Format. RFP Format is
-* described by TRANSR, UPLO and N. Note that the imaginary
-* parts of the diagonal elements need not be set, they are
-* assumed to be zero, and on exit they are set to zero.
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER K, LDA, N
+ CHARACTER TRANS, TRANSR, UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chgeqz.f b/SRC/chgeqz.f
index 674dad02..67566c60 100644
--- a/SRC/chgeqz.f
+++ b/SRC/chgeqz.f
@@ -1,11 +1,289 @@
+*> \brief \b CHGEQZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
+* ALPHA, BETA, Q, LDQ, Z, LDZ, WORK, LWORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, COMPZ, JOB
+* INTEGER IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX ALPHA( * ), BETA( * ), H( LDH, * ),
+* $ Q( LDQ, * ), T( LDT, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHGEQZ computes the eigenvalues of a complex matrix pair (H,T),
+*> where H is an upper Hessenberg matrix and T is upper triangular,
+*> using the single-shift QZ method.
+*> Matrix pairs of this type are produced by the reduction to
+*> generalized upper Hessenberg form of a complex matrix pair (A,B):
+*>
+*> A = Q1*H*Z1**H, B = Q1*T*Z1**H,
+*>
+*> as computed by CGGHRD.
+*>
+*> If JOB='S', then the Hessenberg-triangular pair (H,T) is
+*> also reduced to generalized Schur form,
+*>
+*> H = Q*S*Z**H, T = Q*P*Z**H,
+*>
+*> where Q and Z are unitary matrices and S and P are upper triangular.
+*>
+*> Optionally, the unitary matrix Q from the generalized Schur
+*> factorization may be postmultiplied into an input matrix Q1, and the
+*> unitary matrix Z may be postmultiplied into an input matrix Z1.
+*> If Q1 and Z1 are the unitary matrices from CGGHRD that reduced
+*> the matrix pair (A,B) to generalized Hessenberg form, then the output
+*> matrices Q1*Q and Z1*Z are the unitary factors from the generalized
+*> Schur factorization of (A,B):
+*>
+*> A = (Q1*Q)*S*(Z1*Z)**H, B = (Q1*Q)*P*(Z1*Z)**H.
+*>
+*> To avoid overflow, eigenvalues of the matrix pair (H,T)
+*> (equivalently, of (A,B)) are computed as a pair of complex values
+*> (alpha,beta). If beta is nonzero, lambda = alpha / beta is an
+*> eigenvalue of the generalized nonsymmetric eigenvalue problem (GNEP)
+*> A*x = lambda*B*x
+*> and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
+*> alternate form of the GNEP
+*> mu*A*y = B*y.
+*> The values of alpha and beta for the i-th eigenvalue can be read
+*> directly from the generalized Schur form: alpha = S(i,i),
+*> beta = P(i,i).
+*>
+*> Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
+*> Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
+*> pp. 241--256.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> = 'E': Compute eigenvalues only;
+*> = 'S': Computer eigenvalues and the Schur form.
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'N': Left Schur vectors (Q) are not computed;
+*> = 'I': Q is initialized to the unit matrix and the matrix Q
+*> of left Schur vectors of (H,T) is returned;
+*> = 'V': Q must contain a unitary matrix Q1 on entry and
+*> the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Right Schur vectors (Z) are not computed;
+*> = 'I': Q is initialized to the unit matrix and the matrix Z
+*> of right Schur vectors of (H,T) is returned;
+*> = 'V': Z must contain a unitary matrix Z1 on entry and
+*> the product Z1*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices H, T, Q, and Z. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI mark the rows and columns of H which are in
+*> Hessenberg form. It is assumed that A is already upper
+*> triangular in rows and columns 1:ILO-1 and IHI+1:N.
+*> If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH, N)
+*> On entry, the N-by-N upper Hessenberg matrix H.
+*> On exit, if JOB = 'S', H contains the upper triangular
+*> matrix S from the generalized Schur factorization.
+*> If JOB = 'E', the diagonal of H matches that of S, but
+*> the rest of H is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT, N)
+*> On entry, the N-by-N upper triangular matrix T.
+*> On exit, if JOB = 'S', T contains the upper triangular
+*> matrix P from the generalized Schur factorization.
+*> If JOB = 'E', the diagonal of T matches that of P, but
+*> the rest of T is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> The complex scalars alpha that define the eigenvalues of
+*> GNEP. ALPHA(i) = S(i,i) in the generalized Schur
+*> factorization.
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> The real non-negative scalars beta that define the
+*> eigenvalues of GNEP. BETA(i) = P(i,i) in the generalized
+*> Schur factorization.
+*> \endverbatim
+*> \verbatim
+*> Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
+*> represent the j-th eigenvalue of the matrix pair (A,B), in
+*> one of the forms lambda = alpha/beta or mu = beta/alpha.
+*> Since either lambda or mu may overflow, they should not,
+*> in general, be computed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ, N)
+*> On entry, if COMPZ = 'V', the unitary matrix Q1 used in the
+*> reduction of (A,B) to generalized Hessenberg form.
+*> On exit, if COMPZ = 'I', the unitary matrix of left Schur
+*> vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
+*> left Schur vectors of (A,B).
+*> Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If COMPQ='V' or 'I', then LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the unitary matrix Z1 used in the
+*> reduction of (A,B) to generalized Hessenberg form.
+*> On exit, if COMPZ = 'I', the unitary matrix of right Schur
+*> vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
+*> right Schur vectors of (A,B).
+*> Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If COMPZ='V' or 'I', then LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1,...,N: the QZ iteration did not converge. (H,T) is not
+*> in Schur form, but ALPHA(i) and BETA(i),
+*> i=INFO+1,...,N should be correct.
+*> = N+1,...,2*N: the shift calculation failed. (H,T) is not
+*> in Schur form, but ALPHA(i) and BETA(i),
+*> i=INFO-N+1,...,N should be correct.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We assume that complex ABS works as long as its value is less than
+*> overflow.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
$ ALPHA, BETA, Q, LDQ, Z, LDZ, WORK, LWORK,
$ RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, COMPZ, JOB
@@ -18,173 +296,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHGEQZ computes the eigenvalues of a complex matrix pair (H,T),
-* where H is an upper Hessenberg matrix and T is upper triangular,
-* using the single-shift QZ method.
-* Matrix pairs of this type are produced by the reduction to
-* generalized upper Hessenberg form of a complex matrix pair (A,B):
-*
-* A = Q1*H*Z1**H, B = Q1*T*Z1**H,
-*
-* as computed by CGGHRD.
-*
-* If JOB='S', then the Hessenberg-triangular pair (H,T) is
-* also reduced to generalized Schur form,
-*
-* H = Q*S*Z**H, T = Q*P*Z**H,
-*
-* where Q and Z are unitary matrices and S and P are upper triangular.
-*
-* Optionally, the unitary matrix Q from the generalized Schur
-* factorization may be postmultiplied into an input matrix Q1, and the
-* unitary matrix Z may be postmultiplied into an input matrix Z1.
-* If Q1 and Z1 are the unitary matrices from CGGHRD that reduced
-* the matrix pair (A,B) to generalized Hessenberg form, then the output
-* matrices Q1*Q and Z1*Z are the unitary factors from the generalized
-* Schur factorization of (A,B):
-*
-* A = (Q1*Q)*S*(Z1*Z)**H, B = (Q1*Q)*P*(Z1*Z)**H.
-*
-* To avoid overflow, eigenvalues of the matrix pair (H,T)
-* (equivalently, of (A,B)) are computed as a pair of complex values
-* (alpha,beta). If beta is nonzero, lambda = alpha / beta is an
-* eigenvalue of the generalized nonsymmetric eigenvalue problem (GNEP)
-* A*x = lambda*B*x
-* and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
-* alternate form of the GNEP
-* mu*A*y = B*y.
-* The values of alpha and beta for the i-th eigenvalue can be read
-* directly from the generalized Schur form: alpha = S(i,i),
-* beta = P(i,i).
-*
-* Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
-* Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
-* pp. 241--256.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* = 'E': Compute eigenvalues only;
-* = 'S': Computer eigenvalues and the Schur form.
-*
-* COMPQ (input) CHARACTER*1
-* = 'N': Left Schur vectors (Q) are not computed;
-* = 'I': Q is initialized to the unit matrix and the matrix Q
-* of left Schur vectors of (H,T) is returned;
-* = 'V': Q must contain a unitary matrix Q1 on entry and
-* the product Q1*Q is returned.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Right Schur vectors (Z) are not computed;
-* = 'I': Q is initialized to the unit matrix and the matrix Z
-* of right Schur vectors of (H,T) is returned;
-* = 'V': Z must contain a unitary matrix Z1 on entry and
-* the product Z1*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrices H, T, Q, and Z. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* ILO and IHI mark the rows and columns of H which are in
-* Hessenberg form. It is assumed that A is already upper
-* triangular in rows and columns 1:ILO-1 and IHI+1:N.
-* If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
-*
-* H (input/output) COMPLEX array, dimension (LDH, N)
-* On entry, the N-by-N upper Hessenberg matrix H.
-* On exit, if JOB = 'S', H contains the upper triangular
-* matrix S from the generalized Schur factorization.
-* If JOB = 'E', the diagonal of H matches that of S, but
-* the rest of H is unspecified.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max( 1, N ).
-*
-* T (input/output) COMPLEX array, dimension (LDT, N)
-* On entry, the N-by-N upper triangular matrix T.
-* On exit, if JOB = 'S', T contains the upper triangular
-* matrix P from the generalized Schur factorization.
-* If JOB = 'E', the diagonal of T matches that of P, but
-* the rest of T is unspecified.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max( 1, N ).
-*
-* ALPHA (output) COMPLEX array, dimension (N)
-* The complex scalars alpha that define the eigenvalues of
-* GNEP. ALPHA(i) = S(i,i) in the generalized Schur
-* factorization.
-*
-* BETA (output) COMPLEX array, dimension (N)
-* The real non-negative scalars beta that define the
-* eigenvalues of GNEP. BETA(i) = P(i,i) in the generalized
-* Schur factorization.
-*
-* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
-* represent the j-th eigenvalue of the matrix pair (A,B), in
-* one of the forms lambda = alpha/beta or mu = beta/alpha.
-* Since either lambda or mu may overflow, they should not,
-* in general, be computed.
-*
-* Q (input/output) COMPLEX array, dimension (LDQ, N)
-* On entry, if COMPZ = 'V', the unitary matrix Q1 used in the
-* reduction of (A,B) to generalized Hessenberg form.
-* On exit, if COMPZ = 'I', the unitary matrix of left Schur
-* vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
-* left Schur vectors of (A,B).
-* Not referenced if COMPZ = 'N'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If COMPQ='V' or 'I', then LDQ >= N.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the unitary matrix Z1 used in the
-* reduction of (A,B) to generalized Hessenberg form.
-* On exit, if COMPZ = 'I', the unitary matrix of right Schur
-* vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
-* right Schur vectors of (A,B).
-* Not referenced if COMPZ = 'N'.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If COMPZ='V' or 'I', then LDZ >= N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1,...,N: the QZ iteration did not converge. (H,T) is not
-* in Schur form, but ALPHA(i) and BETA(i),
-* i=INFO+1,...,N should be correct.
-* = N+1,...,2*N: the shift calculation failed. (H,T) is not
-* in Schur form, but ALPHA(i) and BETA(i),
-* i=INFO-N+1,...,N should be correct.
-*
-* Further Details
-* ===============
-*
-* We assume that complex ABS works as long as its value is less than
-* overflow.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chla_transtype.f b/SRC/chla_transtype.f
index 3ebdb6a8..a0d10fa1 100644
--- a/SRC/chla_transtype.f
+++ b/SRC/chla_transtype.f
@@ -1,32 +1,63 @@
- CHARACTER*1 FUNCTION CHLA_TRANSTYPE( TRANS )
+*> \brief \b CHLA_TRANSTYPE
*
-* -- LAPACK routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* October 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER TRANS
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* CHARACTER*1 FUNCTION CHLA_TRANSTYPE( TRANS )
+*
+* .. Scalar Arguments ..
+* INTEGER TRANS
+* ..
+*
* Purpose
* =======
*
-* This subroutine translates from a BLAST-specified integer constant to
-* the character string specifying a transposition operation.
-*
-* CHLA_TRANSTYPE returns an CHARACTER*1. If CHLA_TRANSTYPE is 'X',
-* then input is not an integer indicating a transposition operator.
-* Otherwise CHLA_TRANSTYPE returns the constant value corresponding to
-* TRANS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine translates from a BLAST-specified integer constant to
+*> the character string specifying a transposition operation.
+*>
+*> CHLA_TRANSTYPE returns an CHARACTER*1. If CHLA_TRANSTYPE is 'X',
+*> then input is not an integer indicating a transposition operator.
+*> Otherwise CHLA_TRANSTYPE returns the constant value corresponding to
+*> TRANS.
+*>
+*>\endverbatim
*
* Arguments
* =========
-* TRANS (input) INTEGER
-* Specifies the form of the system of equations:
-* = BLAS_NO_TRANS = 111 : No Transpose
-* = BLAS_TRANS = 112 : Transpose
-* = BLAS_CONJ_TRANS = 113 : Conjugate Transpose
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ CHARACTER*1 FUNCTION CHLA_TRANSTYPE( TRANS )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER TRANS
+* ..
+*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chpcon.f b/SRC/chpcon.f
index da09e3de..cf94712e 100644
--- a/SRC/chpcon.f
+++ b/SRC/chpcon.f
@@ -1,11 +1,119 @@
+*> \brief \b CHPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPCON estimates the reciprocal of the condition number of a complex
+*> Hermitian packed matrix A using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by CHPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHPTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CHPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,51 +125,6 @@
COMPLEX AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHPCON estimates the reciprocal of the condition number of a complex
-* Hermitian packed matrix A using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by CHPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHPTRF, stored as a
-* packed triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHPTRF.
-*
-* ANORM (input) REAL
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chpev.f b/SRC/chpev.f
index ca140573..06ab8177 100644
--- a/SRC/chpev.f
+++ b/SRC/chpev.f
@@ -1,10 +1,140 @@
+*> \brief <b> CHPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), W( * )
+* COMPLEX AP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPEV computes all the eigenvalues and, optionally, eigenvectors of a
+*> complex Hermitian matrix in packed storage.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (max(1, 2*N-1))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CHPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, RWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,64 +145,6 @@
COMPLEX AP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHPEV computes all the eigenvalues and, optionally, eigenvectors of a
-* complex Hermitian matrix in packed storage.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (max(1, 2*N-1))
-*
-* RWORK (workspace) REAL array, dimension (max(1, 3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chpevd.f b/SRC/chpevd.f
index 782a3bb0..49deaccd 100644
--- a/SRC/chpevd.f
+++ b/SRC/chpevd.f
@@ -1,10 +1,205 @@
+*> \brief <b> CHPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
+* RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDZ, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX AP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPEVD computes all the eigenvalues and, optionally, eigenvectors of
+*> a complex Hermitian matrix A in packed storage. If eigenvectors are
+*> desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the required LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least 2*N.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the required sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of array RWORK.
+*> If N <= 1, LRWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LRWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LRWORK must be at least
+*> 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CHPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
$ RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,113 +211,6 @@
COMPLEX AP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHPEVD computes all the eigenvalues and, optionally, eigenvectors of
-* a complex Hermitian matrix A in packed storage. If eigenvectors are
-* desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the required LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LWORK must be at least 2*N.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the required sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array, dimension (MAX(1,LRWORK))
-* On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of array RWORK.
-* If N <= 1, LRWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LRWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LRWORK must be at least
-* 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chpevx.f b/SRC/chpevx.f
index 3d0fa42d..a234a4f0 100644
--- a/SRC/chpevx.f
+++ b/SRC/chpevx.f
@@ -1,11 +1,239 @@
+*> \brief <b> CHPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, WORK, RWORK, IWORK,
+* IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDZ, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX AP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex Hermitian matrix A in packed storage.
+*> Eigenvalues/vectors can be selected by specifying either a range of
+*> values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AP to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the selected eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and
+*> the index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CHPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, WORK, RWORK, IWORK,
$ IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,128 +246,6 @@
COMPLEX AP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHPEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a complex Hermitian matrix A in packed storage.
-* Eigenvalues/vectors can be selected by specifying either a range of
-* values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AP to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the selected eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and
-* the index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chpgst.f b/SRC/chpgst.f
index f343b365..dd324af3 100644
--- a/SRC/chpgst.f
+++ b/SRC/chpgst.f
@@ -1,65 +1,123 @@
- SUBROUTINE CHPGST( ITYPE, UPLO, N, AP, BP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, N
-* ..
-* .. Array Arguments ..
- COMPLEX AP( * ), BP( * )
-* ..
-*
+*> \brief \b CHPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPGST( ITYPE, UPLO, N, AP, BP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * ), BP( * )
+* ..
+*
* Purpose
* =======
*
-* CHPGST reduces a complex Hermitian-definite generalized
-* eigenproblem to standard form, using packed storage.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L.
-*
-* B must have been previously factorized as U**H*U or L*L**H by CPPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPGST reduces a complex Hermitian-definite generalized
+*> eigenproblem to standard form, using packed storage.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L.
+*>
+*> B must have been previously factorized as U**H*U or L*L**H by CPPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
-* = 2 or 3: compute U*A*U**H or L**H*A*L.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
+*> = 2 or 3: compute U*A*U**H or L**H*A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored and B is factored as
+*> U**H*U;
+*> = 'L': Lower triangle of A is stored and B is factored as
+*> L*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] BP
+*> \verbatim
+*> BP is COMPLEX array, dimension (N*(N+1)/2)
+*> The triangular factor from the Cholesky factorization of B,
+*> stored in the same format as A, as returned by CPPTRF.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored and B is factored as
-* U**H*U;
-* = 'L': Lower triangle of A is stored and B is factored as
-* L*L**H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \date November 2011
*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \ingroup complexOTHERcomputational
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+* =====================================================================
+ SUBROUTINE CHPGST( ITYPE, UPLO, N, AP, BP, INFO )
*
-* BP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The triangular factor from the Cholesky factorization of B,
-* stored in the same format as A, as returned by CPPTRF.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( * ), BP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chpgv.f b/SRC/chpgv.f
index d7ee75c2..857a513c 100644
--- a/SRC/chpgv.f
+++ b/SRC/chpgv.f
@@ -1,10 +1,168 @@
+*> \brief \b CHPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), W( * )
+* COMPLEX AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPGV computes all the eigenvalues and, optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
+*> Here A and B are assumed to be Hermitian, stored in packed format,
+*> and B is also positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors. The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (max(1, 2*N-1))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: CPPTRF or CHPEV returned an error code:
+*> <= N: if INFO = i, CHPEV failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not convergeto zero;
+*> > N: if INFO = N + i, for 1 <= i <= n, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+* =====================================================================
SUBROUTINE CHPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,85 +173,6 @@
COMPLEX AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHPGV computes all the eigenvalues and, optionally, the eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
-* Here A and B are assumed to be Hermitian, stored in packed format,
-* and B is also positive definite.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H, in the same storage
-* format as B.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors. The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (max(1, 2*N-1))
-*
-* RWORK (workspace) REAL array, dimension (max(1, 3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: CPPTRF or CHPEV returned an error code:
-* <= N: if INFO = i, CHPEV failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not convergeto zero;
-* > N: if INFO = N + i, for 1 <= i <= n, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/chpgvd.f b/SRC/chpgvd.f
index 2f27db60..05ed7371 100644
--- a/SRC/chpgvd.f
+++ b/SRC/chpgvd.f
@@ -1,10 +1,243 @@
+*> \brief \b CHPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
+* LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDZ, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPGVD computes all the eigenvalues and, optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be Hermitian, stored in packed format, and B is also
+*> positive definite.
+*> If eigenvectors are desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors. The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the required LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= N.
+*> If JOBZ = 'V' and N > 1, LWORK >= 2*N.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the required sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of array RWORK.
+*> If N <= 1, LRWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LRWORK >= N.
+*> If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: CPPTRF or CHPEVD returned an error code:
+*> <= N: if INFO = i, CHPEVD failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not convergeto zero;
+*> > N: if INFO = N + i, for 1 <= i <= n, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
$ LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,139 +249,6 @@
COMPLEX AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHPGVD computes all the eigenvalues and, optionally, the eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be Hermitian, stored in packed format, and B is also
-* positive definite.
-* If eigenvectors are desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H, in the same storage
-* format as B.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors. The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the required LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= N.
-* If JOBZ = 'V' and N > 1, LWORK >= 2*N.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the required sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (MAX(1,LRWORK))
-* On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of array RWORK.
-* If N <= 1, LRWORK >= 1.
-* If JOBZ = 'N' and N > 1, LRWORK >= N.
-* If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: CPPTRF or CHPEVD returned an error code:
-* <= N: if INFO = i, CHPEVD failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not convergeto zero;
-* > N: if INFO = N + i, for 1 <= i <= n, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/chpgvx.f b/SRC/chpgvx.f
index 0515ea85..8e0f9291 100644
--- a/SRC/chpgvx.f
+++ b/SRC/chpgvx.f
@@ -1,11 +1,277 @@
+*> \brief \b CHPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
+* IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, ITYPE, IU, LDZ, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL RWORK( * ), W( * )
+* COMPLEX AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPGVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be Hermitian, stored in packed format, and B is also
+*> positive definite. Eigenvalues and eigenvectors can be selected by
+*> specifying either a range of values or a range of indices for the
+*> desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AP to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> If JOBZ = 'N', then Z is not referenced.
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> \endverbatim
+*> \verbatim
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: CPPTRF or CHPEVX returned an error code:
+*> <= N: if INFO = i, CHPEVX failed to converge;
+*> i eigenvectors failed to converge. Their indices
+*> are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= n, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
$ IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,154 +284,6 @@
COMPLEX AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CHPGVX computes selected eigenvalues and, optionally, eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be Hermitian, stored in packed format, and B is also
-* positive definite. Eigenvalues and eigenvectors can be selected by
-* specifying either a range of values or a range of indices for the
-* desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H, in the same storage
-* format as B.
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AP to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, N)
-* If JOBZ = 'N', then Z is not referenced.
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-*
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: CPPTRF or CHPEVX returned an error code:
-* <= N: if INFO = i, CHPEVX failed to converge;
-* i eigenvectors failed to converge. Their indices
-* are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= n, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/chprfs.f b/SRC/chprfs.f
index a84b3a8e..8f590562 100644
--- a/SRC/chprfs.f
+++ b/SRC/chprfs.f
@@ -1,12 +1,181 @@
+*> \brief \b CHPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
+* FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian indefinite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is COMPLEX array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A. AFP contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**H or
+*> A = L*D*L**H as computed by CHPTRF, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CHPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CHPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
$ FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -19,87 +188,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CHPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian indefinite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The factored form of the matrix A. AFP contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**H or
-* A = L*D*L**H as computed by CHPTRF, stored as a packed
-* triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHPTRF.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CHPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chpsv.f b/SRC/chpsv.f
index f23a0b6a..dbf4d8dc 100644
--- a/SRC/chpsv.f
+++ b/SRC/chpsv.f
@@ -1,105 +1,175 @@
- SUBROUTINE CHPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> CHPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CHPSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian matrix stored in packed format and X
-* and B are N-by-NRHS matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**H, if UPLO = 'U', or
-* A = L * D * L**H, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, D is Hermitian and block diagonal with 1-by-1
-* and 2-by-2 diagonal blocks. The factored form of A is then used to
-* solve the system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian matrix stored in packed format and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**H, if UPLO = 'U', or
+*> A = L * D * L**H, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, D is Hermitian and block diagonal with 1-by-1
+*> and 2-by-2 diagonal blocks. The factored form of A is then used to
+*> solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H as computed by CHPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by CHPTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be
-* computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H as computed by CHPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by CHPTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Further Details
-* ===============
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
+*> \ingroup complexOTHERsolve
*
-* Two-dimensional storage of the Hermitian matrix A:
*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chpsvx.f b/SRC/chpsvx.f
index be443c50..a9b85a52 100644
--- a/SRC/chpsvx.f
+++ b/SRC/chpsvx.f
@@ -1,10 +1,279 @@
+*> \brief <b> CHPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
+* LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPSVX uses the diagonal pivoting factorization A = U*D*U**H or
+*> A = L*D*L**H to compute the solution to a complex system of linear
+*> equations A * X = B, where A is an N-by-N Hermitian matrix stored
+*> in packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
+*> A = U * D * U**H, if UPLO = 'U', or
+*> A = L * D * L**H, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AFP and IPIV contain the factored form of
+*> A. AFP and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) COMPLEX array, dimension (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H as computed by CHPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H as computed by CHPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by CHPTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by CHPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
$ LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -18,173 +287,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CHPSVX uses the diagonal pivoting factorization A = U*D*U**H or
-* A = L*D*L**H to compute the solution to a complex system of linear
-* equations A * X = B, where A is an N-by-N Hermitian matrix stored
-* in packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
-* A = U * D * U**H, if UPLO = 'U', or
-* A = L * D * L**H, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AFP and IPIV contain the factored form of
-* A. AFP and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* AFP (input or output) COMPLEX array, dimension (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H as computed by CHPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H as computed by CHPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by CHPTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by CHPTRF.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chptrd.f b/SRC/chptrd.f
index 477f920b..34c081cd 100644
--- a/SRC/chptrd.f
+++ b/SRC/chptrd.f
@@ -1,97 +1,133 @@
- SUBROUTINE CHPTRD( UPLO, N, AP, D, E, TAU, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
- COMPLEX AP( * ), TAU( * )
-* ..
-*
+*> \brief \b CHPTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPTRD( UPLO, N, AP, D, E, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* COMPLEX AP( * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* CHPTRD reduces a complex Hermitian matrix A stored in packed form to
-* real symmetric tridiagonal form T by a unitary similarity
-* transformation: Q**H * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPTRD reduces a complex Hermitian matrix A stored in packed form to
+*> real symmetric tridiagonal form T by a unitary similarity
+*> transformation: Q**H * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the unitary
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the unitary matrix Q as a product
-* of elementary reflectors. See Further Details.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (output) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (output) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \date November 2011
*
-* TAU (output) COMPLEX array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> D (output) REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) COMPLEX array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
+*> overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
+*> overwriting A(i+2:n,i), and tau is stored in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CHPTRD( UPLO, N, AP, D, E, TAU, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
-* overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
-* overwriting A(i+2:n,i), and tau is stored in TAU(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+ COMPLEX AP( * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chptrf.f b/SRC/chptrf.f
index 61fdec0a..5340444c 100644
--- a/SRC/chptrf.f
+++ b/SRC/chptrf.f
@@ -1,9 +1,161 @@
+*> \brief \b CHPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPTRF( UPLO, N, AP, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPTRF computes the factorization of a complex Hermitian packed
+*> matrix A using the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**H or A = L*D*L**H
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L, stored as a packed triangular
+*> matrix overwriting A (see below for further details).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**H, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**H, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHPTRF( UPLO, N, AP, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,97 +166,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CHPTRF computes the factorization of a complex Hermitian packed
-* matrix A using the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**H or A = L*D*L**H
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L, stored as a packed triangular
-* matrix overwriting A (see below for further details).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**H, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**H, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chptri.f b/SRC/chptri.f
index b4b5333f..3677b724 100644
--- a/SRC/chptri.f
+++ b/SRC/chptri.f
@@ -1,9 +1,111 @@
+*> \brief \b CHPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPTRI( UPLO, N, AP, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPTRI computes the inverse of a complex Hermitian indefinite matrix
+*> A in packed storage using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by CHPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CHPTRF,
+*> stored as a packed triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (Hermitian) inverse of the original
+*> matrix, stored as a packed triangular matrix. The j-th column
+*> of inv(A) is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHPTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CHPTRI( UPLO, N, AP, IPIV, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,49 +116,6 @@
COMPLEX AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHPTRI computes the inverse of a complex Hermitian indefinite matrix
-* A in packed storage using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by CHPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CHPTRF,
-* stored as a packed triangular matrix.
-*
-* On exit, if INFO = 0, the (Hermitian) inverse of the original
-* matrix, stored as a packed triangular matrix. The j-th column
-* of inv(A) is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHPTRF.
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chptrs.f b/SRC/chptrs.f
index 7222400e..71fff2ba 100644
--- a/SRC/chptrs.f
+++ b/SRC/chptrs.f
@@ -1,61 +1,125 @@
- SUBROUTINE CHPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b CHPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CHPTRS solves a system of linear equations A*X = B with a complex
-* Hermitian matrix A stored in packed format using the factorization
-* A = U*D*U**H or A = L*D*L**H computed by CHPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPTRS solves a system of linear equations A*X = B with a complex
+*> Hermitian matrix A stored in packed format using the factorization
+*> A = U*D*U**H or A = L*D*L**H computed by CHPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHPTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHPTRF, stored as a
-* packed triangular matrix.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHPTRF.
+*> \ingroup complexOTHERcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE CHPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/chsein.f b/SRC/chsein.f
index 57ff16df..8890c57d 100644
--- a/SRC/chsein.f
+++ b/SRC/chsein.f
@@ -1,11 +1,247 @@
+*> \brief \b CHSEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, W, VL,
+* LDVL, VR, LDVR, MM, M, WORK, RWORK, IFAILL,
+* IFAILR, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EIGSRC, INITV, SIDE
+* INTEGER INFO, LDH, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IFAILL( * ), IFAILR( * )
+* REAL RWORK( * )
+* COMPLEX H( LDH, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHSEIN uses inverse iteration to find specified right and/or left
+*> eigenvectors of a complex upper Hessenberg matrix H.
+*>
+*> The right eigenvector x and the left eigenvector y of the matrix H
+*> corresponding to an eigenvalue w are defined by:
+*>
+*> H * x = w * x, y**h * H = w * y**h
+*>
+*> where y**h denotes the conjugate transpose of the vector y.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] EIGSRC
+*> \verbatim
+*> EIGSRC is CHARACTER*1
+*> Specifies the source of eigenvalues supplied in W:
+*> = 'Q': the eigenvalues were found using CHSEQR; thus, if
+*> H has zero subdiagonal elements, and so is
+*> block-triangular, then the j-th eigenvalue can be
+*> assumed to be an eigenvalue of the block containing
+*> the j-th row/column. This property allows CHSEIN to
+*> perform inverse iteration on just one diagonal block.
+*> = 'N': no assumptions are made on the correspondence
+*> between eigenvalues and diagonal blocks. In this
+*> case, CHSEIN must always perform inverse iteration
+*> using the whole matrix H.
+*> \endverbatim
+*>
+*> \param[in] INITV
+*> \verbatim
+*> INITV is CHARACTER*1
+*> = 'N': no initial vectors are supplied;
+*> = 'U': user-supplied initial vectors are stored in the arrays
+*> VL and/or VR.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> Specifies the eigenvectors to be computed. To select the
+*> eigenvector corresponding to the eigenvalue W(j),
+*> SELECT(j) must be set to .TRUE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> The upper Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> On entry, the eigenvalues of H.
+*> On exit, the real parts of W may have been altered since
+*> close eigenvalues are perturbed slightly in searching for
+*> independent eigenvectors.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,MM)
+*> On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must
+*> contain starting vectors for the inverse iteration for the
+*> left eigenvectors; the starting vector for each eigenvector
+*> must be in the same column in which the eigenvector will be
+*> stored.
+*> On exit, if SIDE = 'L' or 'B', the left eigenvectors
+*> specified by SELECT will be stored consecutively in the
+*> columns of VL, in the same order as their eigenvalues.
+*> If SIDE = 'R', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL.
+*> LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,MM)
+*> On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must
+*> contain starting vectors for the inverse iteration for the
+*> right eigenvectors; the starting vector for each eigenvector
+*> must be in the same column in which the eigenvector will be
+*> stored.
+*> On exit, if SIDE = 'R' or 'B', the right eigenvectors
+*> specified by SELECT will be stored consecutively in the
+*> columns of VR, in the same order as their eigenvalues.
+*> If SIDE = 'L', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR.
+*> LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR required to
+*> store the eigenvectors (= the number of .TRUE. elements in
+*> SELECT).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] IFAILL
+*> \verbatim
+*> IFAILL is INTEGER array, dimension (MM)
+*> If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left
+*> eigenvector in the i-th column of VL (corresponding to the
+*> eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the
+*> eigenvector converged satisfactorily.
+*> If SIDE = 'R', IFAILL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] IFAILR
+*> \verbatim
+*> IFAILR is INTEGER array, dimension (MM)
+*> If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right
+*> eigenvector in the i-th column of VR (corresponding to the
+*> eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the
+*> eigenvector converged satisfactorily.
+*> If SIDE = 'L', IFAILR is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, i is the number of eigenvectors which
+*> failed to converge; see IFAILL and IFAILR for further
+*> details.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Each eigenvector is normalized so that the element of largest
+*> magnitude has magnitude 1; here the magnitude of a complex number
+*> (x,y) is taken to be |x|+|y|.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, W, VL,
$ LDVL, VR, LDVR, MM, M, WORK, RWORK, IFAILL,
$ IFAILR, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EIGSRC, INITV, SIDE
@@ -19,135 +255,6 @@
$ W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHSEIN uses inverse iteration to find specified right and/or left
-* eigenvectors of a complex upper Hessenberg matrix H.
-*
-* The right eigenvector x and the left eigenvector y of the matrix H
-* corresponding to an eigenvalue w are defined by:
-*
-* H * x = w * x, y**h * H = w * y**h
-*
-* where y**h denotes the conjugate transpose of the vector y.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* EIGSRC (input) CHARACTER*1
-* Specifies the source of eigenvalues supplied in W:
-* = 'Q': the eigenvalues were found using CHSEQR; thus, if
-* H has zero subdiagonal elements, and so is
-* block-triangular, then the j-th eigenvalue can be
-* assumed to be an eigenvalue of the block containing
-* the j-th row/column. This property allows CHSEIN to
-* perform inverse iteration on just one diagonal block.
-* = 'N': no assumptions are made on the correspondence
-* between eigenvalues and diagonal blocks. In this
-* case, CHSEIN must always perform inverse iteration
-* using the whole matrix H.
-*
-* INITV (input) CHARACTER*1
-* = 'N': no initial vectors are supplied;
-* = 'U': user-supplied initial vectors are stored in the arrays
-* VL and/or VR.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* Specifies the eigenvectors to be computed. To select the
-* eigenvector corresponding to the eigenvalue W(j),
-* SELECT(j) must be set to .TRUE..
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* H (input) COMPLEX array, dimension (LDH,N)
-* The upper Hessenberg matrix H.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* W (input/output) COMPLEX array, dimension (N)
-* On entry, the eigenvalues of H.
-* On exit, the real parts of W may have been altered since
-* close eigenvalues are perturbed slightly in searching for
-* independent eigenvectors.
-*
-* VL (input/output) COMPLEX array, dimension (LDVL,MM)
-* On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must
-* contain starting vectors for the inverse iteration for the
-* left eigenvectors; the starting vector for each eigenvector
-* must be in the same column in which the eigenvector will be
-* stored.
-* On exit, if SIDE = 'L' or 'B', the left eigenvectors
-* specified by SELECT will be stored consecutively in the
-* columns of VL, in the same order as their eigenvalues.
-* If SIDE = 'R', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL.
-* LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.
-*
-* VR (input/output) COMPLEX array, dimension (LDVR,MM)
-* On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must
-* contain starting vectors for the inverse iteration for the
-* right eigenvectors; the starting vector for each eigenvector
-* must be in the same column in which the eigenvector will be
-* stored.
-* On exit, if SIDE = 'R' or 'B', the right eigenvectors
-* specified by SELECT will be stored consecutively in the
-* columns of VR, in the same order as their eigenvalues.
-* If SIDE = 'L', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR.
-* LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR required to
-* store the eigenvectors (= the number of .TRUE. elements in
-* SELECT).
-*
-* WORK (workspace) COMPLEX array, dimension (N*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* IFAILL (output) INTEGER array, dimension (MM)
-* If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left
-* eigenvector in the i-th column of VL (corresponding to the
-* eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the
-* eigenvector converged satisfactorily.
-* If SIDE = 'R', IFAILL is not referenced.
-*
-* IFAILR (output) INTEGER array, dimension (MM)
-* If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right
-* eigenvector in the i-th column of VR (corresponding to the
-* eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the
-* eigenvector converged satisfactorily.
-* If SIDE = 'L', IFAILR is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, i is the number of eigenvectors which
-* failed to converge; see IFAILL and IFAILR for further
-* details.
-*
-* Further Details
-* ===============
-*
-* Each eigenvector is normalized so that the element of largest
-* magnitude has magnitude 1; here the magnitude of a complex number
-* (x,y) is taken to be |x|+|y|.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/chseqr.f b/SRC/chseqr.f
index da7d924d..086c2358 100644
--- a/SRC/chseqr.f
+++ b/SRC/chseqr.f
@@ -1,9 +1,235 @@
+*> \brief \b CHSEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
+* CHARACTER COMPZ, JOB
+* ..
+* .. Array Arguments ..
+* COMPLEX H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CHSEQR computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**H, where T is an upper triangular matrix (the
+*> Schur form), and Z is the unitary matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input unitary
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> = 'E': compute eigenvalues only;
+*> = 'S': compute eigenvalues and the Schur form T.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': no Schur vectors are computed;
+*> = 'I': Z is initialized to the unit matrix and the matrix Z
+*> of Schur vectors of H is returned;
+*> = 'V': Z must contain an unitary matrix Q on entry, and
+*> the product Q*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
+*> set by a previous call to CGEBAL, and then passed to CGEHRD
+*> when the matrix output by CGEBAL is reduced to Hessenberg
+*> form. Otherwise ILO and IHI should be set to 1 and N
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and JOB = 'S', H contains the upper
+*> triangular matrix T from the Schur decomposition (the
+*> Schur form). If INFO = 0 and JOB = 'E', the contents of
+*> H are unspecified on exit. (The output value of H when
+*> INFO.GT.0 is given under the description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> Unlike earlier versions of CHSEQR, this subroutine may
+*> explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
+*> or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> The computed eigenvalues. If JOB = 'S', the eigenvalues are
+*> stored in the same order as on the diagonal of the Schur
+*> form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,N)
+*> If COMPZ = 'N', Z is not referenced.
+*> If COMPZ = 'I', on entry Z need not be set and on exit,
+*> if INFO = 0, Z contains the unitary matrix Z of the Schur
+*> vectors of H. If COMPZ = 'V', on entry Z must contain an
+*> N-by-N matrix Q, which is assumed to be equal to the unit
+*> matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
+*> if INFO = 0, Z contains Q*Z.
+*> Normally Q is the unitary matrix generated by CUNGHR
+*> after the call to CGEHRD which formed the Hessenberg matrix
+*> H. (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if COMPZ = 'I' or
+*> COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient and delivers very good and sometimes
+*> optimal performance. However, LWORK as large as 11*N
+*> may be required for optimal performance. A workspace
+*> query is recommended to determine the optimal workspace
+*> size.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then CHSEQR does a workspace query.
+*> In this case, CHSEQR checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .LT. 0: if INFO = -i, the i-th argument had an illegal
+*> value
+*> .GT. 0: if INFO = i, CHSEQR failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and JOB = 'E', then on exit, the
+*> remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and JOB = 'S', then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is a unitary matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'V', then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z) = (initial value of Z)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the unitary matrix in (*) (regard-
+*> less of the value of JOB.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'I', then on exit
+*> (final value of Z) = U
+*> where U is the unitary matrix in (*) (regard-
+*> less of the value of JOB.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'N', then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,
$ WORK, LWORK, INFO )
*
* -- LAPACK computational routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
@@ -12,141 +238,6 @@
* .. Array Arguments ..
COMPLEX H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
-* Purpose
-* =======
-*
-* CHSEQR computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**H, where T is an upper triangular matrix (the
-* Schur form), and Z is the unitary matrix of Schur vectors.
-*
-* Optionally Z may be postmultiplied into an input unitary
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* = 'E': compute eigenvalues only;
-* = 'S': compute eigenvalues and the Schur form T.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': no Schur vectors are computed;
-* = 'I': Z is initialized to the unit matrix and the matrix Z
-* of Schur vectors of H is returned;
-* = 'V': Z must contain an unitary matrix Q on entry, and
-* the product Q*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to CGEBAL, and then passed to CGEHRD
-* when the matrix output by CGEBAL is reduced to Hessenberg
-* form. Otherwise ILO and IHI should be set to 1 and N
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) COMPLEX array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and JOB = 'S', H contains the upper
-* triangular matrix T from the Schur decomposition (the
-* Schur form). If INFO = 0 and JOB = 'E', the contents of
-* H are unspecified on exit. (The output value of H when
-* INFO.GT.0 is given under the description of INFO below.)
-*
-* Unlike earlier versions of CHSEQR, this subroutine may
-* explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
-* or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* W (output) COMPLEX array, dimension (N)
-* The computed eigenvalues. If JOB = 'S', the eigenvalues are
-* stored in the same order as on the diagonal of the Schur
-* form returned in H, with W(i) = H(i,i).
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,N)
-* If COMPZ = 'N', Z is not referenced.
-* If COMPZ = 'I', on entry Z need not be set and on exit,
-* if INFO = 0, Z contains the unitary matrix Z of the Schur
-* vectors of H. If COMPZ = 'V', on entry Z must contain an
-* N-by-N matrix Q, which is assumed to be equal to the unit
-* matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
-* if INFO = 0, Z contains Q*Z.
-* Normally Q is the unitary matrix generated by CUNGHR
-* after the call to CGEHRD which formed the Hessenberg matrix
-* H. (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if COMPZ = 'I' or
-* COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) COMPLEX array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient and delivers very good and sometimes
-* optimal performance. However, LWORK as large as 11*N
-* may be required for optimal performance. A workspace
-* query is recommended to determine the optimal workspace
-* size.
-*
-* If LWORK = -1, then CHSEQR does a workspace query.
-* In this case, CHSEQR checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .LT. 0: if INFO = -i, the i-th argument had an illegal
-* value
-* .GT. 0: if INFO = i, CHSEQR failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and JOB = 'E', then on exit, the
-* remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and JOB = 'S', then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is a unitary matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and COMPZ = 'V', then on exit
-*
-* (final value of Z) = (initial value of Z)*U
-*
-* where U is the unitary matrix in (*) (regard-
-* less of the value of JOB.)
-*
-* If INFO .GT. 0 and COMPZ = 'I', then on exit
-* (final value of Z) = U
-* where U is the unitary matrix in (*) (regard-
-* less of the value of JOB.)
-*
-* If INFO .GT. 0 and COMPZ = 'N', then Z is not
-* accessed.
-*
* ================================================================
* Default values supplied by
* ILAENV(ISPEC,'CHSEQR',JOB(:1)//COMPZ(:1),N,ILO,IHI,LWORK).
diff --git a/SRC/cla_gbamv.f b/SRC/cla_gbamv.f
index f7301e3e..2c28d89d 100644
--- a/SRC/cla_gbamv.f
+++ b/SRC/cla_gbamv.f
@@ -1,122 +1,199 @@
- SUBROUTINE CLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
- $ INCX, BETA, Y, INCY )
+*> \brief \b CLA_GBAMV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
-* ..
-* .. Array Arguments ..
- COMPLEX AB( LDAB, * ), X( * )
- REAL Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
+* INCX, BETA, Y, INCY )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
+* ..
+* .. Array Arguments ..
+* COMPLEX AB( LDAB, * ), X( * )
+* REAL Y( * )
+* ..
+*
* Purpose
* =======
*
-* CLA_GBAMV performs one of the matrix-vector operations
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-* or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GBAMV performs one of the matrix-vector operations
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) INTEGER
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
-* BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-* BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* ALPHA (input) REAL
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AB (input) REAL array, dimension (LDAB,n)
-* Before entry, the leading m by n part of the array AB must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDAB (input) INTEGER
-* On entry, LDAB specifies the first dimension of AB as declared
-* in the calling (sub) program. LDAB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X (input) REAL array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is INTEGER
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
+*> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,n)
+*> Before entry, the leading m by n part of the array AB must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> On entry, LDAB specifies the first dimension of AB as declared
+*> in the calling (sub) program. LDAB must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) REAL
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) REAL array, dimension
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup complexGBcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
+* =====================================================================
+ SUBROUTINE CLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
+ $ INCX, BETA, Y, INCY )
*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Level 2 Blas routine.
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
+* ..
+* .. Array Arguments ..
+ COMPLEX AB( LDAB, * ), X( * )
+ REAL Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_gbrcond_c.f b/SRC/cla_gbrcond_c.f
index 803a8544..9d14edeb 100644
--- a/SRC/cla_gbrcond_c.f
+++ b/SRC/cla_gbrcond_c.f
@@ -1,17 +1,163 @@
+*> \brief \b CLA_GBRCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_GBRCOND_C( TRANS, N, KL, KU, AB, LDAB, AFB,
+* LDAFB, IPIV, C, CAPPLY, INFO, WORK,
+* RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* LOGICAL CAPPLY
+* INTEGER N, KL, KU, KD, KE, LDAB, LDAFB, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), WORK( * )
+* REAL C( * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GBRCOND_C Computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a REAL vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by CGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by CGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
REAL FUNCTION CLA_GBRCOND_C( TRANS, N, KL, KU, AB, LDAB, AFB,
$ LDAFB, IPIV, C, CAPPLY, INFO, WORK,
$ RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS
LOGICAL CAPPLY
@@ -23,71 +169,6 @@
REAL C( * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_GBRCOND_C Computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a REAL vector.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) COMPLEX array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by CGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by CGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
-*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_gbrcond_x.f b/SRC/cla_gbrcond_x.f
index 54746ea4..3582f14e 100644
--- a/SRC/cla_gbrcond_x.f
+++ b/SRC/cla_gbrcond_x.f
@@ -1,16 +1,155 @@
+*> \brief \b CLA_GBRCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_GBRCOND_X( TRANS, N, KL, KU, AB, LDAB, AFB,
+* LDAFB, IPIV, X, INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER N, KL, KU, KD, KE, LDAB, LDAFB, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), WORK( * ),
+* $ X( * )
+* REAL RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GBRCOND_X Computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by CGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by CGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
REAL FUNCTION CLA_GBRCOND_X( TRANS, N, KL, KU, AB, LDAB, AFB,
$ LDAFB, IPIV, X, INFO, WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS
INTEGER N, KL, KU, KD, KE, LDAB, LDAFB, INFO
@@ -22,68 +161,6 @@
REAL RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_GBRCOND_X Computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX vector.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) COMPLEX array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by CGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by CGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* X (input) COMPLEX array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_gbrfsx_extended.f b/SRC/cla_gbrfsx_extended.f
index 49101d23..c9822d58 100644
--- a/SRC/cla_gbrfsx_extended.f
+++ b/SRC/cla_gbrfsx_extended.f
@@ -1,3 +1,415 @@
+*> \brief \b CLA_GBRFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLA_GBRFSX_EXTENDED ( PREC_TYPE, TRANS_TYPE, N, KL, KU,
+* NRHS, AB, LDAB, AFB, LDAFB, IPIV,
+* COLEQU, C, B, LDB, Y, LDY,
+* BERR_OUT, N_NORMS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, RES, AYB, DY,
+* Y_TAIL, RCOND, ITHRESH, RTHRESH,
+* DZ_UB, IGNORE_CWISE, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
+* $ PREC_TYPE, TRANS_TYPE, N_NORMS, ITHRESH
+* LOGICAL COLEQU, IGNORE_CWISE
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* REAL C( * ), AYB(*), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GBRFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by CGBRFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] TRANS_TYPE
+*> \verbatim
+*> TRANS_TYPE is INTEGER
+*> Specifies the transposition operation on A.
+*> The value is defined by ILATRANS(T) where T is a CHARACTER and
+*> T = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by CGBTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by CGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by CGBTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by CLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to CGBTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
SUBROUTINE CLA_GBRFSX_EXTENDED ( PREC_TYPE, TRANS_TYPE, N, KL, KU,
$ NRHS, AB, LDAB, AFB, LDAFB, IPIV,
$ COLEQU, C, B, LDB, Y, LDY,
@@ -6,16 +418,11 @@
$ Y_TAIL, RCOND, ITHRESH, RTHRESH,
$ DZ_UB, IGNORE_CWISE, INFO )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
$ PREC_TYPE, TRANS_TYPE, N_NORMS, ITHRESH
@@ -31,259 +438,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_GBRFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by CGBRFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* TRANS_TYPE (input) INTEGER
-* Specifies the transposition operation on A.
-* The value is defined by ILATRANS(T) where T is a CHARACTER and
-* T = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* AB (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AFB (input) COMPLEX array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by CGBTRF.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by CGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX array, dimension (LDY,NRHS)
-* On entry, the solution matrix X, as computed by CGBTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by CLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to CGBTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_gbrpvgrw.f b/SRC/cla_gbrpvgrw.f
index c0239d88..aa9247b3 100644
--- a/SRC/cla_gbrpvgrw.f
+++ b/SRC/cla_gbrpvgrw.f
@@ -1,67 +1,125 @@
- REAL FUNCTION CLA_GBRPVGRW( N, KL, KU, NCOLS, AB, LDAB, AFB,
- $ LDAFB )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
-* ..
-* .. Array Arguments ..
- COMPLEX AB( LDAB, * ), AFB( LDAFB, * )
-* ..
-*
+*> \brief \b CLA_GBRPVGRW
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_GBRPVGRW( N, KL, KU, NCOLS, AB, LDAB, AFB,
+* LDAFB )
+*
+* .. Scalar Arguments ..
+* INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
+* ..
+* .. Array Arguments ..
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * )
+* ..
+*
* Purpose
* =======
*
-* CLA_GBRPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GBRPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by CGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+*> \date November 2011
*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \ingroup complexGBcomputational
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
+* =====================================================================
+ REAL FUNCTION CLA_GBRPVGRW( N, KL, KU, NCOLS, AB, LDAB, AFB,
+ $ LDAFB )
*
-* AFB (input) COMPLEX array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by CGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+* .. Scalar Arguments ..
+ INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
+* ..
+* .. Array Arguments ..
+ COMPLEX AB( LDAB, * ), AFB( LDAFB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_geamv.f b/SRC/cla_geamv.f
index 00a169ae..8825599e 100644
--- a/SRC/cla_geamv.f
+++ b/SRC/cla_geamv.f
@@ -1,117 +1,189 @@
- SUBROUTINE CLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
- $ Y, INCY )
+*> \brief \b CLA_GEAMV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER INCX, INCY, LDA, M, N
- INTEGER TRANS
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), X( * )
- REAL Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
+* Y, INCY )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER INCX, INCY, LDA, M, N
+* INTEGER TRANS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), X( * )
+* REAL Y( * )
+* ..
+*
* Purpose
* =======
*
-* CLA_GEAMV performs one of the matrix-vector operations
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-* or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GEAMV performs one of the matrix-vector operations
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) INTEGER
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
-* BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-* BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) REAL
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX array, dimension (LDA,n)
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is INTEGER
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
+*> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,n)
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) REAL
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) REAL array, dimension
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup complexGEcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
+* =====================================================================
+ SUBROUTINE CLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
+ $ Y, INCY )
*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Level 2 Blas routine.
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER INCX, INCY, LDA, M, N
+ INTEGER TRANS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), X( * )
+ REAL Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_gercond_c.f b/SRC/cla_gercond_c.f
index 913172a3..c5278bef 100644
--- a/SRC/cla_gercond_c.f
+++ b/SRC/cla_gercond_c.f
@@ -1,79 +1,153 @@
- REAL FUNCTION CLA_GERCOND_C( TRANS, N, A, LDA, AF, LDAF, IPIV, C,
- $ CAPPLY, INFO, WORK, RWORK )
+*> \brief \b CLA_GERCOND_C
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Aguments ..
- CHARACTER TRANS
- LOGICAL CAPPLY
- INTEGER N, LDA, LDAF, INFO
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * )
- REAL C( * ), RWORK( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION CLA_GERCOND_C( TRANS, N, A, LDA, AF, LDAF, IPIV, C,
+* CAPPLY, INFO, WORK, RWORK )
+*
+* .. Scalar Aguments ..
+* CHARACTER TRANS
+* LOGICAL CAPPLY
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * )
+* REAL C( * ), RWORK( * )
+* ..
+*
* Purpose
* =======
-*
-* CLA_GERCOND_C computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a REAL vector.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GERCOND_C computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a REAL vector.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by CGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by CGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by CGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by CGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
+*> \date November 2011
*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION CLA_GERCOND_C( TRANS, N, A, LDA, AF, LDAF, IPIV, C,
+ $ CAPPLY, INFO, WORK, RWORK )
*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
+* .. Scalar Aguments ..
+ CHARACTER TRANS
+ LOGICAL CAPPLY
+ INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * )
+ REAL C( * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_gercond_x.f b/SRC/cla_gercond_x.f
index b50faa89..275a6e54 100644
--- a/SRC/cla_gercond_x.f
+++ b/SRC/cla_gercond_x.f
@@ -1,75 +1,145 @@
- REAL FUNCTION CLA_GERCOND_X( TRANS, N, A, LDA, AF, LDAF, IPIV, X,
- $ INFO, WORK, RWORK )
+*> \brief \b CLA_GERCOND_X
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER N, LDA, LDAF, INFO
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
- REAL RWORK( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION CLA_GERCOND_X( TRANS, N, A, LDA, AF, LDAF, IPIV, X,
+* INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+* REAL RWORK( * )
+* ..
+*
* Purpose
* =======
-*
-* CLA_GERCOND_X computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX vector.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GERCOND_X computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX vector.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by CGETRF.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by CGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by CGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by CGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
+*> \date November 2011
*
-* X (input) COMPLEX array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
+*> \ingroup complexGEcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION CLA_GERCOND_X( TRANS, N, A, LDA, AF, LDAF, IPIV, X,
+ $ INFO, WORK, RWORK )
*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+ REAL RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_gerfsx_extended.f b/SRC/cla_gerfsx_extended.f
index dba3c059..c1de3a6b 100644
--- a/SRC/cla_gerfsx_extended.f
+++ b/SRC/cla_gerfsx_extended.f
@@ -1,3 +1,400 @@
+*> \brief \b CLA_GERFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLA_GERFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, NRHS, A,
+* LDA, AF, LDAF, IPIV, COLEQU, C, B,
+* LDB, Y, LDY, BERR_OUT, N_NORMS,
+* ERRS_N, ERRS_C, RES, AYB, DY,
+* Y_TAIL, RCOND, ITHRESH, RTHRESH,
+* DZ_UB, IGNORE_CWISE, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ TRANS_TYPE, N_NORMS
+* LOGICAL COLEQU, IGNORE_CWISE
+* INTEGER ITHRESH
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* REAL C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERRS_N( NRHS, * ), ERRS_C( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GERFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by CGERFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] TRANS_TYPE
+*> \verbatim
+*> TRANS_TYPE is INTEGER
+*> Specifies the transposition operation on A.
+*> The value is defined by ILATRANS(T) where T is a CHARACTER and
+*> T = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by CGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by CGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by CGETRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by CLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to CGETRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEcomputational
+*
+* =====================================================================
SUBROUTINE CLA_GERFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, NRHS, A,
$ LDA, AF, LDAF, IPIV, COLEQU, C, B,
$ LDB, Y, LDY, BERR_OUT, N_NORMS,
@@ -5,16 +402,11 @@
$ Y_TAIL, RCOND, ITHRESH, RTHRESH,
$ DZ_UB, IGNORE_CWISE, INFO )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ TRANS_TYPE, N_NORMS
@@ -30,251 +422,6 @@
$ ERRS_N( NRHS, * ), ERRS_C( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_GERFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by CGERFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* TRANS_TYPE (input) INTEGER
-* Specifies the transposition operation on A.
-* The value is defined by ILATRANS(T) where T is a CHARACTER and
-* T = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by CGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by CGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX array, dimension (LDY,NRHS)
-* On entry, the solution matrix X, as computed by CGETRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by CLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to CGETRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_gerpvgrw.f b/SRC/cla_gerpvgrw.f
index 1e982146..a8959652 100644
--- a/SRC/cla_gerpvgrw.f
+++ b/SRC/cla_gerpvgrw.f
@@ -1,54 +1,105 @@
- REAL FUNCTION CLA_GERPVGRW( N, NCOLS, A, LDA, AF, LDAF )
+*> \brief \b CLA_GERPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N, NCOLS, LDA, LDAF
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), AF( LDAF, * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION CLA_GERPVGRW( N, NCOLS, A, LDA, AF, LDAF )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDAF, * )
+* ..
+*
* Purpose
* =======
-*
-* CLA_GERPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_GERPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by CGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \ingroup complexGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ REAL FUNCTION CLA_GERPVGRW( N, NCOLS, A, LDA, AF, LDAF )
*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by CGETRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER N, NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), AF( LDAF, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_heamv.f b/SRC/cla_heamv.f
index 69d3b61e..b8a03a50 100644
--- a/SRC/cla_heamv.f
+++ b/SRC/cla_heamv.f
@@ -1,119 +1,193 @@
- SUBROUTINE CLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
- $ INCY )
+*> \brief \b CLA_HEAMV
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER INCX, INCY, LDA, N, UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), X( * )
- REAL Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER INCX, INCY, LDA, N, UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), X( * )
+* REAL Y( * )
+* ..
+*
* Purpose
* =======
*
-* CLA_SYAMV performs the matrix-vector operation
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* n by n symmetric matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_SYAMV performs the matrix-vector operation
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> n by n symmetric matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) INTEGER
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = BLAS_UPPER Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = BLAS_LOWER Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) )
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is INTEGER
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_UPPER Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_LOWER Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL .
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) )
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL .
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension
+*> ( 1 + ( n - 1 )*abs( INCY ) )
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) REAL array, dimension
-* ( 1 + ( n - 1 )*abs( INCY ) )
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup complexHEcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*> -- Modified for the absolute-value product, April 2006
+*> Jason Riedy, UC Berkeley
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+ $ INCY )
*
-* Level 2 Blas routine.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
-* -- Modified for the absolute-value product, April 2006
-* Jason Riedy, UC Berkeley
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER INCX, INCY, LDA, N, UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), X( * )
+ REAL Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_hercond_c.f b/SRC/cla_hercond_c.f
index 3e5506b0..230b9f88 100644
--- a/SRC/cla_hercond_c.f
+++ b/SRC/cla_hercond_c.f
@@ -1,16 +1,140 @@
+*> \brief \b CLA_HERCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_HERCOND_C( UPLO, N, A, LDA, AF, LDAF, IPIV, C,
+* CAPPLY, INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* LOGICAL CAPPLY
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * )
+* REAL C ( * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_HERCOND_C computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a REAL vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+* =====================================================================
REAL FUNCTION CLA_HERCOND_C( UPLO, N, A, LDA, AF, LDAF, IPIV, C,
$ CAPPLY, INFO, WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO
LOGICAL CAPPLY
@@ -22,56 +146,6 @@
REAL C ( * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_HERCOND_C computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a REAL vector.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
-*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
-*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_hercond_x.f b/SRC/cla_hercond_x.f
index 85880d7d..4c953211 100644
--- a/SRC/cla_hercond_x.f
+++ b/SRC/cla_hercond_x.f
@@ -1,72 +1,142 @@
- REAL FUNCTION CLA_HERCOND_X( UPLO, N, A, LDA, AF, LDAF, IPIV, X,
- $ INFO, WORK, RWORK )
-*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N, LDA, LDAF, INFO
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
- REAL RWORK( * )
-* ..
-*
+*> \brief \b CLA_HERCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_HERCOND_X( UPLO, N, A, LDA, AF, LDAF, IPIV, X,
+* INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+* REAL RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLA_HERCOND_X computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX vector.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_HERCOND_X computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX vector.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHETRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
+*> \date November 2011
*
-* X (input) COMPLEX array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
+*> \ingroup complexHEcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION CLA_HERCOND_X( UPLO, N, A, LDA, AF, LDAF, IPIV, X,
+ $ INFO, WORK, RWORK )
*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+ REAL RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_herfsx_extended.f b/SRC/cla_herfsx_extended.f
index 3b38e45f..c8fdb553 100644
--- a/SRC/cla_herfsx_extended.f
+++ b/SRC/cla_herfsx_extended.f
@@ -1,3 +1,401 @@
+*> \brief \b CLA_HERFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLA_HERFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, IPIV, COLEQU, C, B, LDB,
+* Y, LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* REAL C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_HERFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by CHERFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by CHETRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by CLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to CHETRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+* =====================================================================
SUBROUTINE CLA_HERFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, IPIV, COLEQU, C, B, LDB,
$ Y, LDY, BERR_OUT, N_NORMS,
@@ -6,16 +404,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -32,250 +425,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_HERFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by CHERFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by CHETRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by CLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to CHETRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_herpvgrw.f b/SRC/cla_herpvgrw.f
index 90f573b7..d54d39c7 100644
--- a/SRC/cla_herpvgrw.f
+++ b/SRC/cla_herpvgrw.f
@@ -1,72 +1,139 @@
- REAL FUNCTION CLA_HERPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
- $ WORK )
+*> \brief \b CLA_HERPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER N, INFO, LDA, LDAF
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), AF( LDAF, * )
- REAL WORK( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION CLA_HERPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * )
+* REAL WORK( * )
+* ..
+*
* Purpose
* =======
-*
-* CLA_HERPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_HERPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The value of INFO returned from SSYTRF, .i.e., the pivot in
+*> column INFO is exactly 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* INFO (input) INTEGER
-* The value of INFO returned from SSYTRF, .i.e., the pivot in
-* column INFO is exactly 0.
-*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CHETRF.
+*> \ingroup complexHEcomputational
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =====================================================================
+ REAL FUNCTION CLA_HERPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
+ $ WORK )
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) COMPLEX array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), AF( LDAF, * )
+ REAL WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_lin_berr.f b/SRC/cla_lin_berr.f
index 427dbc51..17c944cd 100644
--- a/SRC/cla_lin_berr.f
+++ b/SRC/cla_lin_berr.f
@@ -1,15 +1,103 @@
- SUBROUTINE CLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*> \brief \b CLA_LIN_BERR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NZ, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AYB( N, NRHS ), BERR( NRHS )
+* COMPLEX RES( N, NRHS )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_LIN_BERR computes componentwise relative backward error from
+*> the formula
+*> max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z.
+*>
+*>\endverbatim
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NZ
+*> \verbatim
+*> NZ is INTEGER
+*> We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
+*> guard against spuriously zero residuals. Default value is N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices AYB, RES, and BERR. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is DOUBLE PRECISION array, dimension (N,NRHS)
+*> The residual matrix, i.e., the matrix R in the relative backward
+*> error formula above.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N, NRHS)
+*> The denominator in the relative backward error formula above, i.e.,
+*> the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
+*> are from iterative refinement (see cla_gerfsx_extended.f).
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is COMPLEX array, dimension (NRHS)
+*> The componentwise relative backward error from the formula above.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE CLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER N, NZ, NRHS
* ..
@@ -18,42 +106,6 @@
COMPLEX RES( N, NRHS )
* ..
*
-* Purpose
-* =======
-*
-* CLA_LIN_BERR computes componentwise relative backward error from
-* the formula
-* max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NZ (input) INTEGER
-* We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
-* guard against spuriously zero residuals. Default value is N.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices AYB, RES, and BERR. NRHS >= 0.
-*
-* RES (input) DOUBLE PRECISION array, dimension (N,NRHS)
-* The residual matrix, i.e., the matrix R in the relative backward
-* error formula above.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N, NRHS)
-* The denominator in the relative backward error formula above, i.e.,
-* the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
-* are from iterative refinement (see cla_gerfsx_extended.f).
-*
-* BERR (output) COMPLEX array, dimension (NRHS)
-* The componentwise relative backward error from the formula above.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_porcond_c.f b/SRC/cla_porcond_c.f
index 73c1cae7..a1a01f0b 100644
--- a/SRC/cla_porcond_c.f
+++ b/SRC/cla_porcond_c.f
@@ -1,71 +1,141 @@
- REAL FUNCTION CLA_PORCOND_C( UPLO, N, A, LDA, AF, LDAF, C, CAPPLY,
- $ INFO, WORK, RWORK )
-*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- LOGICAL CAPPLY
- INTEGER N, LDA, LDAF, INFO
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * )
- REAL C( * ), RWORK( * )
-* ..
-*
+*> \brief \b CLA_PORCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_PORCOND_C( UPLO, N, A, LDA, AF, LDAF, C, CAPPLY,
+* INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* LOGICAL CAPPLY
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * )
+* REAL C( * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLA_PORCOND_C Computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_PORCOND_C Computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by CPOTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
+*> \date November 2011
*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
+*> \ingroup complexPOcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION CLA_PORCOND_C( UPLO, N, A, LDA, AF, LDAF, C, CAPPLY,
+ $ INFO, WORK, RWORK )
*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ LOGICAL CAPPLY
+ INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * )
+ REAL C( * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_porcond_x.f b/SRC/cla_porcond_x.f
index 96e9dbbf..e91422ee 100644
--- a/SRC/cla_porcond_x.f
+++ b/SRC/cla_porcond_x.f
@@ -1,67 +1,133 @@
- REAL FUNCTION CLA_PORCOND_X( UPLO, N, A, LDA, AF, LDAF, X, INFO,
- $ WORK, RWORK )
-*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N, LDA, LDAF, INFO
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
- REAL RWORK( * )
-* ..
-*
+*> \brief \b CLA_PORCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_PORCOND_X( UPLO, N, A, LDA, AF, LDAF, X, INFO,
+* WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+* REAL RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLA_PORCOND_X Computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX vector.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_PORCOND_X Computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX vector.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by CPOTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \date November 2011
*
-* X (input) COMPLEX array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
+*> \ingroup complexPOcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION CLA_PORCOND_X( UPLO, N, A, LDA, AF, LDAF, X, INFO,
+ $ WORK, RWORK )
*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+ REAL RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_porfsx_extended.f b/SRC/cla_porfsx_extended.f
index c9605fe0..6c627c18 100644
--- a/SRC/cla_porfsx_extended.f
+++ b/SRC/cla_porfsx_extended.f
@@ -1,3 +1,393 @@
+*> \brief \b CLA_PORFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLA_PORFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, COLEQU, C, B, LDB, Y,
+* LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* REAL C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_PORFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by CPORFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by CPOTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by CLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to CPOTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOcomputational
+*
+* =====================================================================
SUBROUTINE CLA_PORFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, COLEQU, C, B, LDB, Y,
$ LDY, BERR_OUT, N_NORMS,
@@ -6,16 +396,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -31,246 +416,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_PORFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by CPORFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by CPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by CPOTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by CLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to CPOTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_porpvgrw.f b/SRC/cla_porpvgrw.f
index df60bddf..5f38c156 100644
--- a/SRC/cla_porpvgrw.f
+++ b/SRC/cla_porpvgrw.f
@@ -1,58 +1,114 @@
- REAL FUNCTION CLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF, LDAF, WORK )
+*> \brief \b CLA_PORPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER NCOLS, LDA, LDAF
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), AF( LDAF, * )
- REAL WORK( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION CLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF, LDAF, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDAF, * )
+* REAL WORK( * )
+* ..
+*
* Purpose
* =======
-*
-* CLA_PORPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_PORPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complexPOcomputational
*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by CPOTRF.
+* =====================================================================
+ REAL FUNCTION CLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF, LDAF, WORK )
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) COMPLEX array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), AF( LDAF, * )
+ REAL WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_syamv.f b/SRC/cla_syamv.f
index 85f630fe..13558066 100644
--- a/SRC/cla_syamv.f
+++ b/SRC/cla_syamv.f
@@ -1,120 +1,195 @@
- SUBROUTINE CLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
- $ INCY )
+*> \brief \b CLA_SYAMV
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER INCX, INCY, LDA, N
- INTEGER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), X( * )
- REAL Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER INCX, INCY, LDA, N
+* INTEGER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), X( * )
+* REAL Y( * )
+* ..
+*
* Purpose
* =======
*
-* CLA_SYAMV performs the matrix-vector operation
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* n by n symmetric matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_SYAMV performs the matrix-vector operation
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> n by n symmetric matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) INTEGER
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = BLAS_UPPER Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = BLAS_LOWER Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) )
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is INTEGER
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_UPPER Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_LOWER Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL .
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) )
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL .
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension
+*> ( 1 + ( n - 1 )*abs( INCY ) )
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) REAL array, dimension
-* ( 1 + ( n - 1 )*abs( INCY ) )
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup complexSYcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*> -- Modified for the absolute-value product, April 2006
+*> Jason Riedy, UC Berkeley
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+ $ INCY )
*
-* Level 2 Blas routine.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
-* -- Modified for the absolute-value product, April 2006
-* Jason Riedy, UC Berkeley
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER INCX, INCY, LDA, N
+ INTEGER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), X( * )
+ REAL Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_syrcond_c.f b/SRC/cla_syrcond_c.f
index 291ade08..bf33155f 100644
--- a/SRC/cla_syrcond_c.f
+++ b/SRC/cla_syrcond_c.f
@@ -1,16 +1,140 @@
+*> \brief \b CLA_SYRCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_SYRCOND_C( UPLO, N, A, LDA, AF, LDAF, IPIV, C,
+* CAPPLY, INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* LOGICAL CAPPLY
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * )
+* REAL C( * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_SYRCOND_C Computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a REAL vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+* =====================================================================
REAL FUNCTION CLA_SYRCOND_C( UPLO, N, A, LDA, AF, LDAF, IPIV, C,
$ CAPPLY, INFO, WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO
LOGICAL CAPPLY
@@ -22,56 +146,6 @@
REAL C( * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_SYRCOND_C Computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a REAL vector.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
-*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
-*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_syrcond_x.f b/SRC/cla_syrcond_x.f
index eee2ac1b..aff5f093 100644
--- a/SRC/cla_syrcond_x.f
+++ b/SRC/cla_syrcond_x.f
@@ -1,72 +1,142 @@
- REAL FUNCTION CLA_SYRCOND_X( UPLO, N, A, LDA, AF, LDAF, IPIV, X,
- $ INFO, WORK, RWORK )
-*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N, LDA, LDAF, INFO
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
- REAL RWORK( * )
-* ..
-*
+*> \brief \b CLA_SYRCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLA_SYRCOND_X( UPLO, N, A, LDA, AF, LDAF, IPIV, X,
+* INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+* REAL RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLA_SYRCOND_X Computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX vector.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_SYRCOND_X Computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX vector.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
+*> \date November 2011
*
-* X (input) COMPLEX array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
+*> \ingroup complexSYcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION CLA_SYRCOND_X( UPLO, N, A, LDA, AF, LDAF, IPIV, X,
+ $ INFO, WORK, RWORK )
*
-* WORK (input) COMPLEX array, dimension (2*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (input) REAL array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+ REAL RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_syrfsx_extended.f b/SRC/cla_syrfsx_extended.f
index 207bcf85..c11ef080 100644
--- a/SRC/cla_syrfsx_extended.f
+++ b/SRC/cla_syrfsx_extended.f
@@ -1,3 +1,401 @@
+*> \brief \b CLA_SYRFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLA_SYRFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, IPIV, COLEQU, C, B, LDB,
+* Y, LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* REAL C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_SYRFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by CSYRFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by CSYTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by CLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to CSYTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+* =====================================================================
SUBROUTINE CLA_SYRFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, IPIV, COLEQU, C, B, LDB,
$ Y, LDY, BERR_OUT, N_NORMS,
@@ -6,16 +404,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -32,250 +425,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CLA_SYRFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by CSYRFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by CSYTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by CLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to CSYTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cla_syrpvgrw.f b/SRC/cla_syrpvgrw.f
index e3c575a6..7c4b1e72 100644
--- a/SRC/cla_syrpvgrw.f
+++ b/SRC/cla_syrpvgrw.f
@@ -1,72 +1,139 @@
- REAL FUNCTION CLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
- $ WORK )
+*> \brief \b CLA_SYRPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER N, INFO, LDA, LDAF
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), AF( LDAF, * )
- REAL WORK( * )
- INTEGER IPIV( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION CLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDAF, * )
+* REAL WORK( * )
+* INTEGER IPIV( * )
+* ..
+*
* Purpose
* =======
-*
-* CLA_SYRPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLA_SYRPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The value of INFO returned from CSYTRF, .i.e., the pivot in
+*> column INFO is exactly 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* INFO (input) INTEGER
-* The value of INFO returned from CSYTRF, .i.e., the pivot in
-* column INFO is exactly 0.
-*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSYTRF.
+*> \ingroup complexSYcomputational
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =====================================================================
+ REAL FUNCTION CLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
+ $ WORK )
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) COMPLEX array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), AF( LDAF, * )
+ REAL WORK( * )
+ INTEGER IPIV( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cla_wwaddw.f b/SRC/cla_wwaddw.f
index b3dc461a..33a7676a 100644
--- a/SRC/cla_wwaddw.f
+++ b/SRC/cla_wwaddw.f
@@ -1,44 +1,91 @@
- SUBROUTINE CLA_WWADDW( N, X, Y, W )
+*> \brief \b CLA_WWADDW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N
-* ..
-* .. Array Arguments ..
- COMPLEX X( * ), Y( * ), W( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CLA_WWADDW( N, X, Y, W )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* COMPLEX X( * ), Y( * ), W( * )
+* ..
+*
* Purpose
-* =======
-*
-* CLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
+* =======
*
-* This works for all extant IBM's hex and binary floating point
-* arithmetics, but not for decimal.
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
+*>
+*> This works for all extant IBM's hex and binary floating point
+*> arithmetics, but not for decimal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of vectors X, Y, and W.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of vectors X, Y, and W.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> The first part of the doubled-single accumulation vector.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (N)
+*> The second part of the doubled-single accumulation vector.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> The vector to be added.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input/output) COMPLEX array, dimension (N)
-* The first part of the doubled-single accumulation vector.
+*> \date November 2011
*
-* Y (input/output) COMPLEX array, dimension (N)
-* The second part of the doubled-single accumulation vector.
+*> \ingroup complexOTHERcomputational
*
-* W (input) COMPLEX array, dimension (N)
-* The vector to be added.
+* =====================================================================
+ SUBROUTINE CLA_WWADDW( N, X, Y, W )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ COMPLEX X( * ), Y( * ), W( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clabrd.f b/SRC/clabrd.f
index 50105057..3baf4f26 100644
--- a/SRC/clabrd.f
+++ b/SRC/clabrd.f
@@ -1,139 +1,178 @@
- SUBROUTINE CLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
- $ LDY )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDX, LDY, M, N, NB
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
- COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
- $ Y( LDY, * )
-* ..
-*
+*> \brief \b CLABRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+* LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDX, LDY, M, N, NB
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
+* $ Y( LDY, * )
+* ..
+*
* Purpose
* =======
*
-* CLABRD reduces the first NB rows and columns of a complex general
-* m by n matrix A to upper or lower real bidiagonal form by a unitary
-* transformation Q**H * A * P, and returns the matrices X and Y which
-* are needed to apply the transformation to the unreduced part of A.
-*
-* If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
-* bidiagonal form.
-*
-* This is an auxiliary routine called by CGEBRD
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLABRD reduces the first NB rows and columns of a complex general
+*> m by n matrix A to upper or lower real bidiagonal form by a unitary
+*> transformation Q**H * A * P, and returns the matrices X and Y which
+*> are needed to apply the transformation to the unreduced part of A.
+*>
+*> If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
+*> bidiagonal form.
+*>
+*> This is an auxiliary routine called by CGEBRD
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A.
-*
-* NB (input) INTEGER
-* The number of leading rows and columns of A to be reduced.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n general matrix to be reduced.
-* On exit, the first NB rows and columns of the matrix are
-* overwritten; the rest of the array is unchanged.
-* If m >= n, elements on and below the diagonal in the first NB
-* columns, with the array TAUQ, represent the unitary
-* matrix Q as a product of elementary reflectors; and
-* elements above the diagonal in the first NB rows, with the
-* array TAUP, represent the unitary matrix P as a product
-* of elementary reflectors.
-* If m < n, elements below the diagonal in the first NB
-* columns, with the array TAUQ, represent the unitary
-* matrix Q as a product of elementary reflectors, and
-* elements on and above the diagonal in the first NB rows,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) REAL array, dimension (NB)
-* The diagonal elements of the first NB rows and columns of
-* the reduced matrix. D(i) = A(i,i).
-*
-* E (output) REAL array, dimension (NB)
-* The off-diagonal elements of the first NB rows and columns of
-* the reduced matrix.
-*
-* TAUQ (output) COMPLEX array dimension (NB)
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q. See Further Details.
-*
-* TAUP (output) COMPLEX array, dimension (NB)
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix P. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of leading rows and columns of A to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (output) COMPLEX array, dimension (LDX,NB)
-* The m-by-nb matrix X required to update the unreduced part
-* of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,M).
+*> \date November 2011
*
-* Y (output) COMPLEX array, dimension (LDY,NB)
-* The n-by-nb matrix Y required to update the unreduced part
-* of A.
+*> \ingroup complexOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) REAL array, dimension (NB)
+*> The diagonal elements of the first NB rows and columns of
+*> the reduced matrix. D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (NB)
+*> The off-diagonal elements of the first NB rows and columns of
+*> the reduced matrix.
+*>
+*> TAUQ (output) COMPLEX array dimension (NB)
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Q. See Further Details.
+*>
+*> TAUP (output) COMPLEX array, dimension (NB)
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix P. See Further Details.
+*>
+*> X (output) COMPLEX array, dimension (LDX,NB)
+*> The m-by-nb matrix X required to update the unreduced part
+*> of A.
+*>
+*> LDX (input) INTEGER
+*> The leading dimension of the array X. LDX >= max(1,M).
+*>
+*> Y (output) COMPLEX array, dimension (LDY,NB)
+*> The n-by-nb matrix Y required to update the unreduced part
+*> of A.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, and v and u are complex
+*> vectors.
+*>
+*> If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
+*> A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
+*> A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The elements of the vectors v and u together form the m-by-nb matrix
+*> V and the nb-by-n matrix U**H which are needed, with X and Y, to apply
+*> the transformation to the unreduced part of the matrix, using a block
+*> update of the form: A := A - V*Y**H - X*U**H.
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with nb = 2:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
+*> ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
+*> ( v1 v2 a a a ) ( v1 1 a a a a )
+*> ( v1 v2 a a a ) ( v1 v2 a a a a )
+*> ( v1 v2 a a a ) ( v1 v2 a a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix which is unchanged,
+*> vi denotes an element of the vector defining H(i), and ui an element
+*> of the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+ $ LDY )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, and v and u are complex
-* vectors.
-*
-* If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
-* A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
-* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The elements of the vectors v and u together form the m-by-nb matrix
-* V and the nb-by-n matrix U**H which are needed, with X and Y, to apply
-* the transformation to the unreduced part of the matrix, using a block
-* update of the form: A := A - V*Y**H - X*U**H.
-*
-* The contents of A on exit are illustrated by the following examples
-* with nb = 2:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
-* ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
-* ( v1 v2 a a a ) ( v1 1 a a a a )
-* ( v1 v2 a a a ) ( v1 v2 a a a a )
-* ( v1 v2 a a a ) ( v1 v2 a a a a )
-* ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix which is unchanged,
-* vi denotes an element of the vector defining H(i), and ui an element
-* of the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER LDA, LDX, LDY, M, N, NB
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+ COMPLEX A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
+ $ Y( LDY, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clacgv.f b/SRC/clacgv.f
index f995e6c1..76ae837a 100644
--- a/SRC/clacgv.f
+++ b/SRC/clacgv.f
@@ -1,35 +1,82 @@
- SUBROUTINE CLACGV( N, X, INCX )
+*> \brief \b CLACGV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCX, N
-* ..
-* .. Array Arguments ..
- COMPLEX X( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLACGV( N, X, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+* COMPLEX X( * )
+* ..
+*
* Purpose
* =======
*
-* CLACGV conjugates a complex vector of length N.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLACGV conjugates a complex vector of length N.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of the vector X. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vector X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension
+*> (1+(N-1)*abs(INCX))
+*> On entry, the vector of length N to be conjugated.
+*> On exit, X is overwritten with conjg(X).
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between successive elements of X.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input/output) COMPLEX array, dimension
-* (1+(N-1)*abs(INCX))
-* On entry, the vector of length N to be conjugated.
-* On exit, X is overwritten with conjg(X).
+*> \date November 2011
*
-* INCX (input) INTEGER
-* The spacing between successive elements of X.
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
+ SUBROUTINE CLACGV( N, X, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+ COMPLEX X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clacn2.f b/SRC/clacn2.f
index 5b76cde4..ed2ca131 100644
--- a/SRC/clacn2.f
+++ b/SRC/clacn2.f
@@ -1,75 +1,140 @@
- SUBROUTINE CLACN2( N, V, X, EST, KASE, ISAVE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KASE, N
- REAL EST
-* ..
-* .. Array Arguments ..
- INTEGER ISAVE( 3 )
- COMPLEX V( * ), X( * )
-* ..
-*
+*> \brief \b CLACN2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLACN2( N, V, X, EST, KASE, ISAVE )
+*
+* .. Scalar Arguments ..
+* INTEGER KASE, N
+* REAL EST
+* ..
+* .. Array Arguments ..
+* INTEGER ISAVE( 3 )
+* COMPLEX V( * ), X( * )
+* ..
+*
* Purpose
* =======
*
-* CLACN2 estimates the 1-norm of a square, complex matrix A.
-* Reverse communication is used for evaluating matrix-vector products.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLACN2 estimates the 1-norm of a square, complex matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 1.
-*
-* V (workspace) COMPLEX array, dimension (N)
-* On the final return, V = A*W, where EST = norm(V)/norm(W)
-* (W is not returned).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (N)
+*> On the final return, V = A*W, where EST = norm(V)/norm(W)
+*> (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> On an intermediate return, X should be overwritten by
+*> A * X, if KASE=1,
+*> A**H * X, if KASE=2,
+*> where A**H is the conjugate transpose of A, and CLACN2 must be
+*> re-called with all the other parameters unchanged.
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*> EST is REAL
+*> On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
+*> unchanged from the previous call to CLACN2.
+*> On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*> KASE is INTEGER
+*> On the initial call to CLACN2, KASE should be 0.
+*> On an intermediate return, KASE will be 1 or 2, indicating
+*> whether X should be overwritten by A * X or A**H * X.
+*> On the final return from CLACN2, KASE will again be 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISAVE
+*> \verbatim
+*> ISAVE is INTEGER array, dimension (3)
+*> ISAVE is used to save variables between calls to SLACN2
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input/output) COMPLEX array, dimension (N)
-* On an intermediate return, X should be overwritten by
-* A * X, if KASE=1,
-* A**H * X, if KASE=2,
-* where A**H is the conjugate transpose of A, and CLACN2 must be
-* re-called with all the other parameters unchanged.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* EST (input/output) REAL
-* On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
-* unchanged from the previous call to CLACN2.
-* On exit, EST is an estimate (a lower bound) for norm(A).
+*> \date November 2011
*
-* KASE (input/output) INTEGER
-* On the initial call to CLACN2, KASE should be 0.
-* On an intermediate return, KASE will be 1 or 2, indicating
-* whether X should be overwritten by A * X or A**H * X.
-* On the final return from CLACN2, KASE will again be 0.
+*> \ingroup complexOTHERauxiliary
*
-* ISAVE (input/output) INTEGER array, dimension (3)
-* ISAVE is used to save variables between calls to SLACN2
*
* Further Details
-* ======= =======
-*
-* Contributed by Nick Higham, University of Manchester.
-* Originally named CONEST, dated March 16, 1988.
-*
-* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
-* a real or complex matrix, with applications to condition estimation",
-* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
-*
-* Last modified: April, 1999
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> Contributed by Nick Higham, University of Manchester.
+*> Originally named CONEST, dated March 16, 1988.
+*>
+*> Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*> a real or complex matrix, with applications to condition estimation",
+*> ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*> Last modified: April, 1999
+*>
+*> This is a thread safe version of CLACON, which uses the array ISAVE
+*> in place of a SAVE statement, as follows:
+*>
+*> CLACON CLACN2
+*> JUMP ISAVE(1)
+*> J ISAVE(2)
+*> ITER ISAVE(3)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLACN2( N, V, X, EST, KASE, ISAVE )
*
-* This is a thread safe version of CLACON, which uses the array ISAVE
-* in place of a SAVE statement, as follows:
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* CLACON CLACN2
-* JUMP ISAVE(1)
-* J ISAVE(2)
-* ITER ISAVE(3)
+* .. Scalar Arguments ..
+ INTEGER KASE, N
+ REAL EST
+* ..
+* .. Array Arguments ..
+ INTEGER ISAVE( 3 )
+ COMPLEX V( * ), X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clacon.f b/SRC/clacon.f
index e0bb02f5..8c1b439a 100644
--- a/SRC/clacon.f
+++ b/SRC/clacon.f
@@ -1,63 +1,124 @@
- SUBROUTINE CLACON( N, V, X, EST, KASE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KASE, N
- REAL EST
-* ..
-* .. Array Arguments ..
- COMPLEX V( N ), X( N )
-* ..
-*
+*> \brief \b CLACON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLACON( N, V, X, EST, KASE )
+*
+* .. Scalar Arguments ..
+* INTEGER KASE, N
+* REAL EST
+* ..
+* .. Array Arguments ..
+* COMPLEX V( N ), X( N )
+* ..
+*
* Purpose
* =======
*
-* CLACON estimates the 1-norm of a square, complex matrix A.
-* Reverse communication is used for evaluating matrix-vector products.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLACON estimates the 1-norm of a square, complex matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 1.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (N)
+*> On the final return, V = A*W, where EST = norm(V)/norm(W)
+*> (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> On an intermediate return, X should be overwritten by
+*> A * X, if KASE=1,
+*> A**H * X, if KASE=2,
+*> where A**H is the conjugate transpose of A, and CLACON must be
+*> re-called with all the other parameters unchanged.
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*> EST is REAL
+*> On entry with KASE = 1 or 2 and JUMP = 3, EST should be
+*> unchanged from the previous call to CLACON.
+*> On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*> KASE is INTEGER
+*> On the initial call to CLACON, KASE should be 0.
+*> On an intermediate return, KASE will be 1 or 2, indicating
+*> whether X should be overwritten by A * X or A**H * X.
+*> On the final return from CLACON, KASE will again be 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* V (workspace) COMPLEX array, dimension (N)
-* On the final return, V = A*W, where EST = norm(V)/norm(W)
-* (W is not returned).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input/output) COMPLEX array, dimension (N)
-* On an intermediate return, X should be overwritten by
-* A * X, if KASE=1,
-* A**H * X, if KASE=2,
-* where A**H is the conjugate transpose of A, and CLACON must be
-* re-called with all the other parameters unchanged.
+*> \date November 2011
*
-* EST (input/output) REAL
-* On entry with KASE = 1 or 2 and JUMP = 3, EST should be
-* unchanged from the previous call to CLACON.
-* On exit, EST is an estimate (a lower bound) for norm(A).
+*> \ingroup complexOTHERauxiliary
*
-* KASE (input/output) INTEGER
-* On the initial call to CLACON, KASE should be 0.
-* On an intermediate return, KASE will be 1 or 2, indicating
-* whether X should be overwritten by A * X or A**H * X.
-* On the final return from CLACON, KASE will again be 0.
*
* Further Details
-* ======= =======
-*
-* Contributed by Nick Higham, University of Manchester.
-* Originally named CONEST, dated March 16, 1988.
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> Contributed by Nick Higham, University of Manchester.
+*> Originally named CONEST, dated March 16, 1988.
+*>
+*> Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*> a real or complex matrix, with applications to condition estimation",
+*> ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*> Last modified: April, 1999
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLACON( N, V, X, EST, KASE )
*
-* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
-* a real or complex matrix, with applications to condition estimation",
-* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Last modified: April, 1999
+* .. Scalar Arguments ..
+ INTEGER KASE, N
+ REAL EST
+* ..
+* .. Array Arguments ..
+ COMPLEX V( N ), X( N )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clacp2.f b/SRC/clacp2.f
index 189bcc3d..6cea57ef 100644
--- a/SRC/clacp2.f
+++ b/SRC/clacp2.f
@@ -1,9 +1,105 @@
+*> \brief \b CLACP2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLACP2( UPLO, M, N, A, LDA, B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* COMPLEX B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLACP2 copies all or part of a real two-dimensional matrix A to a
+*> complex matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be copied to B.
+*> = 'U': Upper triangular part
+*> = 'L': Lower triangular part
+*> Otherwise: All of the matrix A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m by n matrix A. If UPLO = 'U', only the upper trapezium
+*> is accessed; if UPLO = 'L', only the lower trapezium is
+*> accessed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> On exit, B = A in the locations specified by UPLO.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLACP2( UPLO, M, N, A, LDA, B, LDB )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,41 +110,6 @@
COMPLEX B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLACP2 copies all or part of a real two-dimensional matrix A to a
-* complex matrix B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be copied to B.
-* = 'U': Upper triangular part
-* = 'L': Lower triangular part
-* Otherwise: All of the matrix A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m by n matrix A. If UPLO = 'U', only the upper trapezium
-* is accessed; if UPLO = 'L', only the lower trapezium is
-* accessed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (output) COMPLEX array, dimension (LDB,N)
-* On exit, B = A in the locations specified by UPLO.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/clacpy.f b/SRC/clacpy.f
index 0155a620..e07d664f 100644
--- a/SRC/clacpy.f
+++ b/SRC/clacpy.f
@@ -1,52 +1,112 @@
- SUBROUTINE CLACPY( UPLO, M, N, A, LDA, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDB, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b CLACPY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLACPY( UPLO, M, N, A, LDA, B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CLACPY copies all or part of a two-dimensional matrix A to another
-* matrix B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLACPY copies all or part of a two-dimensional matrix A to another
+*> matrix B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be copied to B.
-* = 'U': Upper triangular part
-* = 'L': Lower triangular part
-* Otherwise: All of the matrix A
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be copied to B.
+*> = 'U': Upper triangular part
+*> = 'L': Lower triangular part
+*> Otherwise: All of the matrix A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m by n matrix A. If UPLO = 'U', only the upper trapezium
+*> is accessed; if UPLO = 'L', only the lower trapezium is
+*> accessed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> On exit, B = A in the locations specified by UPLO.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \date November 2011
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m by n matrix A. If UPLO = 'U', only the upper trapezium
-* is accessed; if UPLO = 'L', only the lower trapezium is
-* accessed.
+*> \ingroup complexOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE CLACPY( UPLO, M, N, A, LDA, B, LDB )
*
-* B (output) COMPLEX array, dimension (LDB,N)
-* On exit, B = A in the locations specified by UPLO.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clacrm.f b/SRC/clacrm.f
index 266ef8fd..5e647823 100644
--- a/SRC/clacrm.f
+++ b/SRC/clacrm.f
@@ -1,57 +1,123 @@
- SUBROUTINE CLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LDC, M, N
-* ..
-* .. Array Arguments ..
- REAL B( LDB, * ), RWORK( * )
- COMPLEX A( LDA, * ), C( LDC, * )
-* ..
-*
+*> \brief \b CLACRM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDC, M, N
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), RWORK( * )
+* COMPLEX A( LDA, * ), C( LDC, * )
+* ..
+*
* Purpose
* =======
*
-* CLACRM performs a very simple matrix-matrix multiplication:
-* C := A * B,
-* where A is M by N and complex; B is N by N and real;
-* C is M by N and complex.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLACRM performs a very simple matrix-matrix multiplication:
+*> C := A * B,
+*> where A is M by N and complex; B is N by N and real;
+*> C is M by N and complex.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A and of the matrix C.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns and rows of the matrix B and
-* the number of columns of the matrix C.
-* N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* A contains the M by N matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A and of the matrix C.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns and rows of the matrix B and
+*> the number of columns of the matrix C.
+*> N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> A contains the M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >=max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> B contains the N by N matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >=max(1,N).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, N)
+*> C contains the M by N matrix C.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >=max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*M*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >=max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) REAL array, dimension (LDB, N)
-* B contains the N by N matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >=max(1,N).
+*> \ingroup complexOTHERauxiliary
*
-* C (input) COMPLEX array, dimension (LDC, N)
-* C contains the M by N matrix C.
+* =====================================================================
+ SUBROUTINE CLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >=max(1,N).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (workspace) REAL array, dimension (2*M*N)
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LDC, M, N
+* ..
+* .. Array Arguments ..
+ REAL B( LDB, * ), RWORK( * )
+ COMPLEX A( LDA, * ), C( LDC, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clacrt.f b/SRC/clacrt.f
index 213071e6..f4d9bb5f 100644
--- a/SRC/clacrt.f
+++ b/SRC/clacrt.f
@@ -1,54 +1,114 @@
- SUBROUTINE CLACRT( N, CX, INCX, CY, INCY, C, S )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCX, INCY, N
- COMPLEX C, S
-* ..
-* .. Array Arguments ..
- COMPLEX CX( * ), CY( * )
-* ..
-*
+*> \brief \b CLACRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLACRT( N, CX, INCX, CY, INCY, C, S )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* COMPLEX C, S
+* ..
+* .. Array Arguments ..
+* COMPLEX CX( * ), CY( * )
+* ..
+*
* Purpose
* =======
*
-* CLACRT performs the operation
-*
-* ( c s )( x ) ==> ( x )
-* ( -s c )( y ) ( y )
-*
-* where c and s are complex and the vectors x and y are complex.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLACRT performs the operation
+*>
+*> ( c s )( x ) ==> ( x )
+*> ( -s c )( y ) ( y )
+*>
+*> where c and s are complex and the vectors x and y are complex.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of elements in the vectors CX and CY.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements in the vectors CX and CY.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*> CX is COMPLEX array, dimension (N)
+*> On input, the vector x.
+*> On output, CX is overwritten with c*x + s*y.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of CX. INCX <> 0.
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*> CY is COMPLEX array, dimension (N)
+*> On input, the vector y.
+*> On output, CY is overwritten with -s*x + c*y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between successive values of CY. INCY <> 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX
+*> C and S define the matrix
+*> [ C S ].
+*> [ -S C ]
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CX (input/output) COMPLEX array, dimension (N)
-* On input, the vector x.
-* On output, CX is overwritten with c*x + s*y.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCX (input) INTEGER
-* The increment between successive values of CX. INCX <> 0.
+*> \date November 2011
*
-* CY (input/output) COMPLEX array, dimension (N)
-* On input, the vector y.
-* On output, CY is overwritten with -s*x + c*y.
+*> \ingroup complexOTHERauxiliary
*
-* INCY (input) INTEGER
-* The increment between successive values of CY. INCY <> 0.
+* =====================================================================
+ SUBROUTINE CLACRT( N, CX, INCX, CY, INCY, C, S )
*
-* C (input) COMPLEX
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* S (input) COMPLEX
-* C and S define the matrix
-* [ C S ].
-* [ -S C ]
+* .. Scalar Arguments ..
+ INTEGER INCX, INCY, N
+ COMPLEX C, S
+* ..
+* .. Array Arguments ..
+ COMPLEX CX( * ), CY( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cladiv.f b/SRC/cladiv.f
index d77e5a4c..24d465c7 100644
--- a/SRC/cladiv.f
+++ b/SRC/cladiv.f
@@ -1,28 +1,69 @@
- COMPLEX FUNCTION CLADIV( X, Y )
+*> \brief \b CLADIV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX X, Y
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* COMPLEX FUNCTION CLADIV( X, Y )
+*
+* .. Scalar Arguments ..
+* COMPLEX X, Y
+* ..
+*
* Purpose
* =======
*
-* CLADIV := X / Y, where X and Y are complex. The computation of X / Y
-* will not overflow on an intermediary step unless the results
-* overflows.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLADIV := X / Y, where X and Y are complex. The computation of X / Y
+*> will not overflow on an intermediary step unless the results
+*> overflows.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* X (input) COMPLEX
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is COMPLEX
+*> The complex scalars X and Y.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* Y (input) COMPLEX
-* The complex scalars X and Y.
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
+ COMPLEX FUNCTION CLADIV( X, Y )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX X, Y
+* ..
*
* =====================================================================
*
diff --git a/SRC/claed0.f b/SRC/claed0.f
index 9e4cb2db..576852cb 100644
--- a/SRC/claed0.f
+++ b/SRC/claed0.f
@@ -1,10 +1,146 @@
+*> \brief \b CLAED0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAED0( QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS, RWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDQ, LDQS, N, QSIZ
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), E( * ), RWORK( * )
+* COMPLEX Q( LDQ, * ), QSTORE( LDQS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Using the divide and conquer method, CLAED0 computes all eigenvalues
+*> of a symmetric tridiagonal matrix which is one diagonal block of
+*> those from reducing a dense or band Hermitian matrix and
+*> corresponding eigenvectors of the dense or band matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the unitary matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the off-diagonal elements of the tridiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> On entry, Q must contain an QSIZ x N matrix whose columns
+*> unitarily orthonormal. It is a part of the unitary matrix
+*> that reduces the full dense Hermitian matrix to a
+*> (reducible) symmetric tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array,
+*> the dimension of IWORK must be at least
+*> 6 + 6*N + 5*N*lg N
+*> ( lg( N ) = smallest integer k
+*> such that 2^k >= N )
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (1 + 3*N + 2*N*lg N + 3*N**2)
+*> ( lg( N ) = smallest integer k
+*> such that 2^k >= N )
+*> \endverbatim
+*>
+*> \param[out] QSTORE
+*> \verbatim
+*> QSTORE is COMPLEX array, dimension (LDQS, N)
+*> Used to store parts of
+*> the eigenvector matrix when the updating matrix multiplies
+*> take place.
+*> \endverbatim
+*>
+*> \param[in] LDQS
+*> \verbatim
+*> LDQS is INTEGER
+*> The leading dimension of the array QSTORE.
+*> LDQS >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute an eigenvalue while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CLAED0( QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS, RWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDQ, LDQS, N, QSIZ
@@ -15,68 +151,6 @@
COMPLEX Q( LDQ, * ), QSTORE( LDQS, * )
* ..
*
-* Purpose
-* =======
-*
-* Using the divide and conquer method, CLAED0 computes all eigenvalues
-* of a symmetric tridiagonal matrix which is one diagonal block of
-* those from reducing a dense or band Hermitian matrix and
-* corresponding eigenvectors of the dense or band matrix.
-*
-* Arguments
-* =========
-*
-* QSIZ (input) INTEGER
-* The dimension of the unitary matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, the eigenvalues in ascending order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the off-diagonal elements of the tridiagonal matrix.
-* On exit, E has been destroyed.
-*
-* Q (input/output) COMPLEX array, dimension (LDQ,N)
-* On entry, Q must contain an QSIZ x N matrix whose columns
-* unitarily orthonormal. It is a part of the unitary matrix
-* that reduces the full dense Hermitian matrix to a
-* (reducible) symmetric tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* IWORK (workspace) INTEGER array,
-* the dimension of IWORK must be at least
-* 6 + 6*N + 5*N*lg N
-* ( lg( N ) = smallest integer k
-* such that 2^k >= N )
-*
-* RWORK (workspace) REAL array,
-* dimension (1 + 3*N + 2*N*lg N + 3*N**2)
-* ( lg( N ) = smallest integer k
-* such that 2^k >= N )
-*
-* QSTORE (workspace) COMPLEX array, dimension (LDQS, N)
-* Used to store parts of
-* the eigenvector matrix when the updating matrix multiplies
-* take place.
-*
-* LDQS (input) INTEGER
-* The leading dimension of the array QSTORE.
-* LDQS >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute an eigenvalue while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through mod(INFO,N+1).
-*
* =====================================================================
*
* Warning: N could be as big as QSIZ!
diff --git a/SRC/claed7.f b/SRC/claed7.f
index a924ae96..312f36ae 100644
--- a/SRC/claed7.f
+++ b/SRC/claed7.f
@@ -1,12 +1,250 @@
+*> \brief \b CLAED7
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAED7( N, CUTPNT, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
+* LDQ, RHO, INDXQ, QSTORE, QPTR, PRMPTR, PERM,
+* GIVPTR, GIVCOL, GIVNUM, WORK, RWORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CURLVL, CURPBM, CUTPNT, INFO, LDQ, N, QSIZ,
+* $ TLVLS
+* REAL RHO
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), GIVPTR( * ), INDXQ( * ),
+* $ IWORK( * ), PERM( * ), PRMPTR( * ), QPTR( * )
+* REAL D( * ), GIVNUM( 2, * ), QSTORE( * ), RWORK( * )
+* COMPLEX Q( LDQ, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAED7 computes the updated eigensystem of a diagonal
+*> matrix after modification by a rank-one symmetric matrix. This
+*> routine is used only for the eigenproblem which requires all
+*> eigenvalues and optionally eigenvectors of a dense or banded
+*> Hermitian matrix that has been reduced to tridiagonal form.
+*>
+*> T = Q(in) ( D(in) + RHO * Z*Z**H ) Q**H(in) = Q(out) * D(out) * Q**H(out)
+*>
+*> where Z = Q**Hu, u is a vector of length N with ones in the
+*> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
+*>
+*> The eigenvectors of the original matrix are stored in Q, and the
+*> eigenvalues are in D. The algorithm consists of three stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple eigenvalues or if there is a zero in
+*> the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine SLAED2.
+*>
+*> The second stage consists of calculating the updated
+*> eigenvalues. This is done by finding the roots of the secular
+*> equation via the routine SLAED4 (as called by SLAED3).
+*> This routine also calculates the eigenvectors of the current
+*> problem.
+*>
+*> The final stage consists of computing the updated eigenvectors
+*> directly using the updated eigenvalues. The eigenvectors for
+*> the current problem are multiplied with the eigenvectors from
+*> the overall problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> Contains the location of the last eigenvalue in the leading
+*> sub-matrix. min(1,N) <= CUTPNT <= N.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the unitary matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N.
+*> \endverbatim
+*>
+*> \param[in] TLVLS
+*> \verbatim
+*> TLVLS is INTEGER
+*> The total number of merging levels in the overall divide and
+*> conquer tree.
+*> \endverbatim
+*>
+*> \param[in] CURLVL
+*> \verbatim
+*> CURLVL is INTEGER
+*> The current level in the overall merge routine,
+*> 0 <= curlvl <= tlvls.
+*> \endverbatim
+*>
+*> \param[in] CURPBM
+*> \verbatim
+*> CURPBM is INTEGER
+*> The current problem in the current level in the overall
+*> merge routine (counting from upper left to lower right).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the eigenvalues of the rank-1-perturbed matrix.
+*> On exit, the eigenvalues of the repaired matrix.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> On entry, the eigenvectors of the rank-1-perturbed matrix.
+*> On exit, the eigenvectors of the repaired tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> Contains the subdiagonal element used to create the rank-1
+*> modification.
+*> \endverbatim
+*>
+*> \param[out] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> This contains the permutation which will reintegrate the
+*> subproblem just solved back into sorted order,
+*> ie. D( INDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (3*N+2*QSIZ*N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (QSIZ*N)
+*> \endverbatim
+*>
+*> \param[in,out] QSTORE
+*> \verbatim
+*> QSTORE is REAL array, dimension (N**2+1)
+*> Stores eigenvectors of submatrices encountered during
+*> divide and conquer, packed together. QPTR points to
+*> beginning of the submatrices.
+*> \endverbatim
+*>
+*> \param[in,out] QPTR
+*> \verbatim
+*> QPTR is INTEGER array, dimension (N+2)
+*> List of indices pointing to beginning of submatrices stored
+*> in QSTORE. The submatrices are numbered starting at the
+*> bottom left of the divide and conquer tree, from left to
+*> right and bottom to top.
+*> \endverbatim
+*>
+*> \param[in] PRMPTR
+*> \verbatim
+*> PRMPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in PERM a
+*> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
+*> indicates the size of the permutation and also the size of
+*> the full, non-deflated problem.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N lg N)
+*> Contains the permutations (from deflation and sorting) to be
+*> applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in GIVCOL a
+*> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
+*> indicates the number of Givens rotations.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N lg N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension (2, N lg N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CLAED7( N, CUTPNT, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
$ LDQ, RHO, INDXQ, QSTORE, QPTR, PRMPTR, PERM,
$ GIVPTR, GIVCOL, GIVNUM, WORK, RWORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER CURLVL, CURPBM, CUTPNT, INFO, LDQ, N, QSIZ,
@@ -20,132 +258,6 @@
COMPLEX Q( LDQ, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLAED7 computes the updated eigensystem of a diagonal
-* matrix after modification by a rank-one symmetric matrix. This
-* routine is used only for the eigenproblem which requires all
-* eigenvalues and optionally eigenvectors of a dense or banded
-* Hermitian matrix that has been reduced to tridiagonal form.
-*
-* T = Q(in) ( D(in) + RHO * Z*Z**H ) Q**H(in) = Q(out) * D(out) * Q**H(out)
-*
-* where Z = Q**Hu, u is a vector of length N with ones in the
-* CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
-*
-* The eigenvectors of the original matrix are stored in Q, and the
-* eigenvalues are in D. The algorithm consists of three stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple eigenvalues or if there is a zero in
-* the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine SLAED2.
-*
-* The second stage consists of calculating the updated
-* eigenvalues. This is done by finding the roots of the secular
-* equation via the routine SLAED4 (as called by SLAED3).
-* This routine also calculates the eigenvectors of the current
-* problem.
-*
-* The final stage consists of computing the updated eigenvectors
-* directly using the updated eigenvalues. The eigenvectors for
-* the current problem are multiplied with the eigenvectors from
-* the overall problem.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* CUTPNT (input) INTEGER
-* Contains the location of the last eigenvalue in the leading
-* sub-matrix. min(1,N) <= CUTPNT <= N.
-*
-* QSIZ (input) INTEGER
-* The dimension of the unitary matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N.
-*
-* TLVLS (input) INTEGER
-* The total number of merging levels in the overall divide and
-* conquer tree.
-*
-* CURLVL (input) INTEGER
-* The current level in the overall merge routine,
-* 0 <= curlvl <= tlvls.
-*
-* CURPBM (input) INTEGER
-* The current problem in the current level in the overall
-* merge routine (counting from upper left to lower right).
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the eigenvalues of the rank-1-perturbed matrix.
-* On exit, the eigenvalues of the repaired matrix.
-*
-* Q (input/output) COMPLEX array, dimension (LDQ,N)
-* On entry, the eigenvectors of the rank-1-perturbed matrix.
-* On exit, the eigenvectors of the repaired tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* RHO (input) REAL
-* Contains the subdiagonal element used to create the rank-1
-* modification.
-*
-* INDXQ (output) INTEGER array, dimension (N)
-* This contains the permutation which will reintegrate the
-* subproblem just solved back into sorted order,
-* ie. D( INDXQ( I = 1, N ) ) will be in ascending order.
-*
-* IWORK (workspace) INTEGER array, dimension (4*N)
-*
-* RWORK (workspace) REAL array,
-* dimension (3*N+2*QSIZ*N)
-*
-* WORK (workspace) COMPLEX array, dimension (QSIZ*N)
-*
-* QSTORE (input/output) REAL array, dimension (N**2+1)
-* Stores eigenvectors of submatrices encountered during
-* divide and conquer, packed together. QPTR points to
-* beginning of the submatrices.
-*
-* QPTR (input/output) INTEGER array, dimension (N+2)
-* List of indices pointing to beginning of submatrices stored
-* in QSTORE. The submatrices are numbered starting at the
-* bottom left of the divide and conquer tree, from left to
-* right and bottom to top.
-*
-* PRMPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in PERM a
-* level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
-* indicates the size of the permutation and also the size of
-* the full, non-deflated problem.
-*
-* PERM (input) INTEGER array, dimension (N lg N)
-* Contains the permutations (from deflation and sorting) to be
-* applied to each eigenblock.
-*
-* GIVPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in GIVCOL a
-* level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
-* indicates the number of Givens rotations.
-*
-* GIVCOL (input) INTEGER array, dimension (2, N lg N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (input) REAL array, dimension (2, N lg N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/claed8.f b/SRC/claed8.f
index ac4d3274..a86f5e34 100644
--- a/SRC/claed8.f
+++ b/SRC/claed8.f
@@ -1,11 +1,229 @@
+*> \brief \b CLAED8
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAED8( K, N, QSIZ, Q, LDQ, D, RHO, CUTPNT, Z, DLAMDA,
+* Q2, LDQ2, W, INDXP, INDX, INDXQ, PERM, GIVPTR,
+* GIVCOL, GIVNUM, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CUTPNT, GIVPTR, INFO, K, LDQ, LDQ2, N, QSIZ
+* REAL RHO
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), INDX( * ), INDXP( * ),
+* $ INDXQ( * ), PERM( * )
+* REAL D( * ), DLAMDA( * ), GIVNUM( 2, * ), W( * ),
+* $ Z( * )
+* COMPLEX Q( LDQ, * ), Q2( LDQ2, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAED8 merges the two sets of eigenvalues together into a single
+*> sorted set. Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur: when two or more
+*> eigenvalues are close together or if there is a tiny element in the
+*> Z vector. For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the number of non-deflated eigenvalues.
+*> This is the order of the related secular equation.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the unitary matrix used to reduce
+*> the dense or band matrix to tridiagonal form.
+*> QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> On entry, Q contains the eigenvectors of the partially solved
+*> system which has been previously updated in matrix
+*> multiplies with other partially solved eigensystems.
+*> On exit, Q contains the trailing (N-K) updated eigenvectors
+*> (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, D contains the eigenvalues of the two submatrices to
+*> be combined. On exit, D contains the trailing (N-K) updated
+*> eigenvalues (those which were deflated) sorted into increasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] RHO
+*> \verbatim
+*> RHO is REAL
+*> Contains the off diagonal element associated with the rank-1
+*> cut which originally split the two submatrices which are now
+*> being recombined. RHO is modified during the computation to
+*> the value required by SLAED3.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> Contains the location of the last eigenvalue in the leading
+*> sub-matrix. MIN(1,N) <= CUTPNT <= N.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (N)
+*> On input this vector contains the updating vector (the last
+*> row of the first sub-eigenvector matrix and the first row of
+*> the second sub-eigenvector matrix). The contents of Z are
+*> destroyed during the updating process.
+*> \endverbatim
+*>
+*> \param[out] DLAMDA
+*> \verbatim
+*> DLAMDA is REAL array, dimension (N)
+*> Contains a copy of the first K eigenvalues which will be used
+*> by SLAED3 to form the secular equation.
+*> \endverbatim
+*>
+*> \param[out] Q2
+*> \verbatim
+*> Q2 is COMPLEX array, dimension (LDQ2,N)
+*> If ICOMPQ = 0, Q2 is not referenced. Otherwise,
+*> Contains a copy of the first K eigenvectors which will be used
+*> by SLAED7 in a matrix multiply (SGEMM) to update the new
+*> eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQ2
+*> \verbatim
+*> LDQ2 is INTEGER
+*> The leading dimension of the array Q2. LDQ2 >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> This will hold the first k values of the final
+*> deflation-altered z-vector and will be passed to SLAED3.
+*> \endverbatim
+*>
+*> \param[out] INDXP
+*> \verbatim
+*> INDXP is INTEGER array, dimension (N)
+*> This will contain the permutation used to place deflated
+*> values of D at the end of the array. On output INDXP(1:K)
+*> points to the nondeflated D-values and INDXP(K+1:N)
+*> points to the deflated eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] INDX
+*> \verbatim
+*> INDX is INTEGER array, dimension (N)
+*> This will contain the permutation used to sort the contents of
+*> D into ascending order.
+*> \endverbatim
+*>
+*> \param[in] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> This contains the permutation which separately sorts the two
+*> sub-problems in D into ascending order. Note that elements in
+*> the second half of this permutation must first have CUTPNT
+*> added to their values in order to be accurate.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N)
+*> Contains the permutations (from deflation and sorting) to be
+*> applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> Contains the number of Givens rotations which took place in
+*> this subproblem.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension (2, N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CLAED8( K, N, QSIZ, Q, LDQ, D, RHO, CUTPNT, Z, DLAMDA,
$ Q2, LDQ2, W, INDXP, INDX, INDXQ, PERM, GIVPTR,
$ GIVCOL, GIVNUM, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER CUTPNT, GIVPTR, INFO, K, LDQ, LDQ2, N, QSIZ
@@ -19,116 +237,6 @@
COMPLEX Q( LDQ, * ), Q2( LDQ2, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAED8 merges the two sets of eigenvalues together into a single
-* sorted set. Then it tries to deflate the size of the problem.
-* There are two ways in which deflation can occur: when two or more
-* eigenvalues are close together or if there is a tiny element in the
-* Z vector. For each such occurrence the order of the related secular
-* equation problem is reduced by one.
-*
-* Arguments
-* =========
-*
-* K (output) INTEGER
-* Contains the number of non-deflated eigenvalues.
-* This is the order of the related secular equation.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* QSIZ (input) INTEGER
-* The dimension of the unitary matrix used to reduce
-* the dense or band matrix to tridiagonal form.
-* QSIZ >= N if ICOMPQ = 1.
-*
-* Q (input/output) COMPLEX array, dimension (LDQ,N)
-* On entry, Q contains the eigenvectors of the partially solved
-* system which has been previously updated in matrix
-* multiplies with other partially solved eigensystems.
-* On exit, Q contains the trailing (N-K) updated eigenvectors
-* (those which were deflated) in its last N-K columns.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max( 1, N ).
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, D contains the eigenvalues of the two submatrices to
-* be combined. On exit, D contains the trailing (N-K) updated
-* eigenvalues (those which were deflated) sorted into increasing
-* order.
-*
-* RHO (input/output) REAL
-* Contains the off diagonal element associated with the rank-1
-* cut which originally split the two submatrices which are now
-* being recombined. RHO is modified during the computation to
-* the value required by SLAED3.
-*
-* CUTPNT (input) INTEGER
-* Contains the location of the last eigenvalue in the leading
-* sub-matrix. MIN(1,N) <= CUTPNT <= N.
-*
-* Z (input) REAL array, dimension (N)
-* On input this vector contains the updating vector (the last
-* row of the first sub-eigenvector matrix and the first row of
-* the second sub-eigenvector matrix). The contents of Z are
-* destroyed during the updating process.
-*
-* DLAMDA (output) REAL array, dimension (N)
-* Contains a copy of the first K eigenvalues which will be used
-* by SLAED3 to form the secular equation.
-*
-* Q2 (output) COMPLEX array, dimension (LDQ2,N)
-* If ICOMPQ = 0, Q2 is not referenced. Otherwise,
-* Contains a copy of the first K eigenvectors which will be used
-* by SLAED7 in a matrix multiply (SGEMM) to update the new
-* eigenvectors.
-*
-* LDQ2 (input) INTEGER
-* The leading dimension of the array Q2. LDQ2 >= max( 1, N ).
-*
-* W (output) REAL array, dimension (N)
-* This will hold the first k values of the final
-* deflation-altered z-vector and will be passed to SLAED3.
-*
-* INDXP (workspace) INTEGER array, dimension (N)
-* This will contain the permutation used to place deflated
-* values of D at the end of the array. On output INDXP(1:K)
-* points to the nondeflated D-values and INDXP(K+1:N)
-* points to the deflated eigenvalues.
-*
-* INDX (workspace) INTEGER array, dimension (N)
-* This will contain the permutation used to sort the contents of
-* D into ascending order.
-*
-* INDXQ (input) INTEGER array, dimension (N)
-* This contains the permutation which separately sorts the two
-* sub-problems in D into ascending order. Note that elements in
-* the second half of this permutation must first have CUTPNT
-* added to their values in order to be accurate.
-*
-* PERM (output) INTEGER array, dimension (N)
-* Contains the permutations (from deflation and sorting) to be
-* applied to each eigenblock.
-*
-* GIVPTR (output) INTEGER
-* Contains the number of Givens rotations which took place in
-* this subproblem.
-*
-* GIVCOL (output) INTEGER array, dimension (2, N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (output) REAL array, dimension (2, N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claein.f b/SRC/claein.f
index 1bf9570f..01c1f39b 100644
--- a/SRC/claein.f
+++ b/SRC/claein.f
@@ -1,10 +1,150 @@
+*> \brief \b CLAEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAEIN( RIGHTV, NOINIT, N, H, LDH, W, V, B, LDB, RWORK,
+* EPS3, SMLNUM, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL NOINIT, RIGHTV
+* INTEGER INFO, LDB, LDH, N
+* REAL EPS3, SMLNUM
+* COMPLEX W
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX B( LDB, * ), H( LDH, * ), V( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAEIN uses inverse iteration to find a right or left eigenvector
+*> corresponding to the eigenvalue W of a complex upper Hessenberg
+*> matrix H.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RIGHTV
+*> \verbatim
+*> RIGHTV is LOGICAL
+*> = .TRUE. : compute right eigenvector;
+*> = .FALSE.: compute left eigenvector.
+*> \endverbatim
+*>
+*> \param[in] NOINIT
+*> \verbatim
+*> NOINIT is LOGICAL
+*> = .TRUE. : no initial vector supplied in V
+*> = .FALSE.: initial vector supplied in V.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> The upper Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is COMPLEX
+*> The eigenvalue of H whose corresponding right or left
+*> eigenvector is to be computed.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (N)
+*> On entry, if NOINIT = .FALSE., V must contain a starting
+*> vector for inverse iteration; otherwise V need not be set.
+*> On exit, V contains the computed eigenvector, normalized so
+*> that the component of largest magnitude has magnitude 1; here
+*> the magnitude of a complex number (x,y) is taken to be
+*> |x| + |y|.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] EPS3
+*> \verbatim
+*> EPS3 is REAL
+*> A small machine-dependent value which is used to perturb
+*> close eigenvalues, and to replace zero pivots.
+*> \endverbatim
+*>
+*> \param[in] SMLNUM
+*> \verbatim
+*> SMLNUM is REAL
+*> A machine-dependent value close to the underflow threshold.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: inverse iteration did not converge; V is set to the
+*> last iterate.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAEIN( RIGHTV, NOINIT, N, H, LDH, W, V, B, LDB, RWORK,
$ EPS3, SMLNUM, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL NOINIT, RIGHTV
@@ -17,64 +157,6 @@
COMPLEX B( LDB, * ), H( LDH, * ), V( * )
* ..
*
-* Purpose
-* =======
-*
-* CLAEIN uses inverse iteration to find a right or left eigenvector
-* corresponding to the eigenvalue W of a complex upper Hessenberg
-* matrix H.
-*
-* Arguments
-* =========
-*
-* RIGHTV (input) LOGICAL
-* = .TRUE. : compute right eigenvector;
-* = .FALSE.: compute left eigenvector.
-*
-* NOINIT (input) LOGICAL
-* = .TRUE. : no initial vector supplied in V
-* = .FALSE.: initial vector supplied in V.
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* H (input) COMPLEX array, dimension (LDH,N)
-* The upper Hessenberg matrix H.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* W (input) COMPLEX
-* The eigenvalue of H whose corresponding right or left
-* eigenvector is to be computed.
-*
-* V (input/output) COMPLEX array, dimension (N)
-* On entry, if NOINIT = .FALSE., V must contain a starting
-* vector for inverse iteration; otherwise V need not be set.
-* On exit, V contains the computed eigenvector, normalized so
-* that the component of largest magnitude has magnitude 1; here
-* the magnitude of a complex number (x,y) is taken to be
-* |x| + |y|.
-*
-* B (workspace) COMPLEX array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* EPS3 (input) REAL
-* A small machine-dependent value which is used to perturb
-* close eigenvalues, and to replace zero pivots.
-*
-* SMLNUM (input) REAL
-* A machine-dependent value close to the underflow threshold.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* = 1: inverse iteration did not converge; V is set to the
-* last iterate.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claesy.f b/SRC/claesy.f
index 3156aac7..ac0d82a6 100644
--- a/SRC/claesy.f
+++ b/SRC/claesy.f
@@ -1,61 +1,120 @@
- SUBROUTINE CLAESY( A, B, C, RT1, RT2, EVSCAL, CS1, SN1 )
+*> \brief \b CLAESY
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX A, B, C, CS1, EVSCAL, RT1, RT2, SN1
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLAESY( A, B, C, RT1, RT2, EVSCAL, CS1, SN1 )
+*
+* .. Scalar Arguments ..
+* COMPLEX A, B, C, CS1, EVSCAL, RT1, RT2, SN1
+* ..
+*
* Purpose
* =======
*
-* CLAESY computes the eigendecomposition of a 2-by-2 symmetric matrix
-* ( ( A, B );( B, C ) )
-* provided the norm of the matrix of eigenvectors is larger than
-* some threshold value.
-*
-* RT1 is the eigenvalue of larger absolute value, and RT2 of
-* smaller absolute value. If the eigenvectors are computed, then
-* on return ( CS1, SN1 ) is the unit eigenvector for RT1, hence
-*
-* [ CS1 SN1 ] . [ A B ] . [ CS1 -SN1 ] = [ RT1 0 ]
-* [ -SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ]
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAESY computes the eigendecomposition of a 2-by-2 symmetric matrix
+*> ( ( A, B );( B, C ) )
+*> provided the norm of the matrix of eigenvectors is larger than
+*> some threshold value.
+*>
+*> RT1 is the eigenvalue of larger absolute value, and RT2 of
+*> smaller absolute value. If the eigenvectors are computed, then
+*> on return ( CS1, SN1 ) is the unit eigenvector for RT1, hence
+*>
+*> [ CS1 SN1 ] . [ A B ] . [ CS1 -SN1 ] = [ RT1 0 ]
+*> [ -SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ]
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) COMPLEX
-* The ( 1, 1 ) element of input matrix.
-*
-* B (input) COMPLEX
-* The ( 1, 2 ) element of input matrix. The ( 2, 1 ) element
-* is also given by B, since the 2-by-2 matrix is symmetric.
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX
+*> The ( 1, 1 ) element of input matrix.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX
+*> The ( 1, 2 ) element of input matrix. The ( 2, 1 ) element
+*> is also given by B, since the 2-by-2 matrix is symmetric.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX
+*> The ( 2, 2 ) element of input matrix.
+*> \endverbatim
+*>
+*> \param[out] RT1
+*> \verbatim
+*> RT1 is COMPLEX
+*> The eigenvalue of larger modulus.
+*> \endverbatim
+*>
+*> \param[out] RT2
+*> \verbatim
+*> RT2 is COMPLEX
+*> The eigenvalue of smaller modulus.
+*> \endverbatim
+*>
+*> \param[out] EVSCAL
+*> \verbatim
+*> EVSCAL is COMPLEX
+*> The complex value by which the eigenvector matrix was scaled
+*> to make it orthonormal. If EVSCAL is zero, the eigenvectors
+*> were not computed. This means one of two things: the 2-by-2
+*> matrix could not be diagonalized, or the norm of the matrix
+*> of eigenvectors before scaling was larger than the threshold
+*> value THRESH (set below).
+*> \endverbatim
+*>
+*> \param[out] CS1
+*> \verbatim
+*> CS1 is COMPLEX
+*> \endverbatim
+*>
+*> \param[out] SN1
+*> \verbatim
+*> SN1 is COMPLEX
+*> If EVSCAL .NE. 0, ( CS1, SN1 ) is the unit right eigenvector
+*> for RT1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input) COMPLEX
-* The ( 2, 2 ) element of input matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RT1 (output) COMPLEX
-* The eigenvalue of larger modulus.
+*> \date November 2011
*
-* RT2 (output) COMPLEX
-* The eigenvalue of smaller modulus.
+*> \ingroup complexSYauxiliary
*
-* EVSCAL (output) COMPLEX
-* The complex value by which the eigenvector matrix was scaled
-* to make it orthonormal. If EVSCAL is zero, the eigenvectors
-* were not computed. This means one of two things: the 2-by-2
-* matrix could not be diagonalized, or the norm of the matrix
-* of eigenvectors before scaling was larger than the threshold
-* value THRESH (set below).
+* =====================================================================
+ SUBROUTINE CLAESY( A, B, C, RT1, RT2, EVSCAL, CS1, SN1 )
*
-* CS1 (output) COMPLEX
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SN1 (output) COMPLEX
-* If EVSCAL .NE. 0, ( CS1, SN1 ) is the unit right eigenvector
-* for RT1.
+* .. Scalar Arguments ..
+ COMPLEX A, B, C, CS1, EVSCAL, RT1, RT2, SN1
+* ..
*
* =====================================================================
*
diff --git a/SRC/claev2.f b/SRC/claev2.f
index 0749bcdf..6a2bb286 100644
--- a/SRC/claev2.f
+++ b/SRC/claev2.f
@@ -1,67 +1,129 @@
- SUBROUTINE CLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
+*> \brief \b CLAEV2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL CS1, RT1, RT2
- COMPLEX A, B, C, SN1
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
+*
+* .. Scalar Arguments ..
+* REAL CS1, RT1, RT2
+* COMPLEX A, B, C, SN1
+* ..
+*
* Purpose
* =======
*
-* CLAEV2 computes the eigendecomposition of a 2-by-2 Hermitian matrix
-* [ A B ]
-* [ CONJG(B) C ].
-* On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
-* eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
-* eigenvector for RT1, giving the decomposition
-*
-* [ CS1 CONJG(SN1) ] [ A B ] [ CS1 -CONJG(SN1) ] = [ RT1 0 ]
-* [-SN1 CS1 ] [ CONJG(B) C ] [ SN1 CS1 ] [ 0 RT2 ].
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAEV2 computes the eigendecomposition of a 2-by-2 Hermitian matrix
+*> [ A B ]
+*> [ CONJG(B) C ].
+*> On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
+*> eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
+*> eigenvector for RT1, giving the decomposition
+*>
+*> [ CS1 CONJG(SN1) ] [ A B ] [ CS1 -CONJG(SN1) ] = [ RT1 0 ]
+*> [-SN1 CS1 ] [ CONJG(B) C ] [ SN1 CS1 ] [ 0 RT2 ].
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) COMPLEX
-* The (1,1) element of the 2-by-2 matrix.
-*
-* B (input) COMPLEX
-* The (1,2) element and the conjugate of the (2,1) element of
-* the 2-by-2 matrix.
-*
-* C (input) COMPLEX
-* The (2,2) element of the 2-by-2 matrix.
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX
+*> The (1,2) element and the conjugate of the (2,1) element of
+*> the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] RT1
+*> \verbatim
+*> RT1 is REAL
+*> The eigenvalue of larger absolute value.
+*> \endverbatim
+*>
+*> \param[out] RT2
+*> \verbatim
+*> RT2 is REAL
+*> The eigenvalue of smaller absolute value.
+*> \endverbatim
+*>
+*> \param[out] CS1
+*> \verbatim
+*> CS1 is REAL
+*> \endverbatim
+*>
+*> \param[out] SN1
+*> \verbatim
+*> SN1 is COMPLEX
+*> The vector (CS1, SN1) is a unit right eigenvector for RT1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RT1 (output) REAL
-* The eigenvalue of larger absolute value.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RT2 (output) REAL
-* The eigenvalue of smaller absolute value.
+*> \date November 2011
*
-* CS1 (output) REAL
+*> \ingroup complexOTHERauxiliary
*
-* SN1 (output) COMPLEX
-* The vector (CS1, SN1) is a unit right eigenvector for RT1.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> RT1 is accurate to a few ulps barring over/underflow.
+*>
+*> RT2 may be inaccurate if there is massive cancellation in the
+*> determinant A*C-B*B; higher precision or correctly rounded or
+*> correctly truncated arithmetic would be needed to compute RT2
+*> accurately in all cases.
+*>
+*> CS1 and SN1 are accurate to a few ulps barring over/underflow.
+*>
+*> Overflow is possible only if RT1 is within a factor of 5 of overflow.
+*> Underflow is harmless if the input data is 0 or exceeds
+*> underflow_threshold / macheps.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
*
-* RT1 is accurate to a few ulps barring over/underflow.
-*
-* RT2 may be inaccurate if there is massive cancellation in the
-* determinant A*C-B*B; higher precision or correctly rounded or
-* correctly truncated arithmetic would be needed to compute RT2
-* accurately in all cases.
-*
-* CS1 and SN1 are accurate to a few ulps barring over/underflow.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Overflow is possible only if RT1 is within a factor of 5 of overflow.
-* Underflow is harmless if the input data is 0 or exceeds
-* underflow_threshold / macheps.
+* .. Scalar Arguments ..
+ REAL CS1, RT1, RT2
+ COMPLEX A, B, C, SN1
+* ..
*
* =====================================================================
*
diff --git a/SRC/clag2z.f b/SRC/clag2z.f
index e0b80651..cf32bd65 100644
--- a/SRC/clag2z.f
+++ b/SRC/clag2z.f
@@ -1,53 +1,112 @@
- SUBROUTINE CLAG2Z( M, N, SA, LDSA, A, LDA, INFO )
-*
-* -- LAPACK PROTOTYPE auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDSA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX SA( LDSA, * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b CLAG2Z
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAG2Z( M, N, SA, LDSA, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDSA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX SA( LDSA, * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CLAG2Z converts a COMPLEX matrix, SA, to a COMPLEX*16 matrix, A.
-*
-* Note that while it is possible to overflow while converting
-* from double to single, it is not possible to overflow when
-* converting from single to double.
-*
-* This is an auxiliary routine so there is no argument checking.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAG2Z converts a COMPLEX matrix, SA, to a COMPLEX*16 matrix, A.
+*>
+*> Note that while it is possible to overflow while converting
+*> from double to single, it is not possible to overflow when
+*> converting from single to double.
+*>
+*> This is an auxiliary routine so there is no argument checking.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of lines of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of lines of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*> SA is COMPLEX array, dimension (LDSA,N)
+*> On entry, the M-by-N coefficient matrix SA.
+*> \endverbatim
+*>
+*> \param[in] LDSA
+*> \verbatim
+*> LDSA is INTEGER
+*> The leading dimension of the array SA. LDSA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On exit, the M-by-N coefficient matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SA (input) COMPLEX array, dimension (LDSA,N)
-* On entry, the M-by-N coefficient matrix SA.
+*> \date November 2011
*
-* LDSA (input) INTEGER
-* The leading dimension of the array SA. LDSA >= max(1,M).
+*> \ingroup complex16OTHERauxiliary
*
-* A (output) COMPLEX*16 array, dimension (LDA,N)
-* On exit, the M-by-N coefficient matrix A.
+* =====================================================================
+ SUBROUTINE CLAG2Z( M, N, SA, LDSA, A, LDA, INFO )
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDSA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX SA( LDSA, * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clags2.f b/SRC/clags2.f
index 0fa4d958..b6dc1b04 100644
--- a/SRC/clags2.f
+++ b/SRC/clags2.f
@@ -1,88 +1,165 @@
- SUBROUTINE CLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
- $ SNV, CSQ, SNQ )
+*> \brief \b CLAGS2
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL UPPER
- REAL A1, A3, B1, B3, CSQ, CSU, CSV
- COMPLEX A2, B2, SNQ, SNU, SNV
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
+* SNV, CSQ, SNQ )
+*
+* .. Scalar Arguments ..
+* LOGICAL UPPER
+* REAL A1, A3, B1, B3, CSQ, CSU, CSV
+* COMPLEX A2, B2, SNQ, SNU, SNV
+* ..
+*
* Purpose
* =======
*
-* CLAGS2 computes 2-by-2 unitary matrices U, V and Q, such
-* that if ( UPPER ) then
-*
-* U**H *A*Q = U**H *( A1 A2 )*Q = ( x 0 )
-* ( 0 A3 ) ( x x )
-* and
-* V**H*B*Q = V**H *( B1 B2 )*Q = ( x 0 )
-* ( 0 B3 ) ( x x )
-*
-* or if ( .NOT.UPPER ) then
-*
-* U**H *A*Q = U**H *( A1 0 )*Q = ( x x )
-* ( A2 A3 ) ( 0 x )
-* and
-* V**H *B*Q = V**H *( B1 0 )*Q = ( x x )
-* ( B2 B3 ) ( 0 x )
-* where
-*
-* U = ( CSU SNU ), V = ( CSV SNV ),
-* ( -SNU**H CSU ) ( -SNV**H CSV )
-*
-* Q = ( CSQ SNQ )
-* ( -SNQ**H CSQ )
-*
-* The rows of the transformed A and B are parallel. Moreover, if the
-* input 2-by-2 matrix A is not zero, then the transformed (1,1) entry
-* of A is not zero. If the input matrices A and B are both not zero,
-* then the transformed (2,2) element of B is not zero, except when the
-* first rows of input A and B are parallel and the second rows are
-* zero.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAGS2 computes 2-by-2 unitary matrices U, V and Q, such
+*> that if ( UPPER ) then
+*>
+*> U**H *A*Q = U**H *( A1 A2 )*Q = ( x 0 )
+*> ( 0 A3 ) ( x x )
+*> and
+*> V**H*B*Q = V**H *( B1 B2 )*Q = ( x 0 )
+*> ( 0 B3 ) ( x x )
+*>
+*> or if ( .NOT.UPPER ) then
+*>
+*> U**H *A*Q = U**H *( A1 0 )*Q = ( x x )
+*> ( A2 A3 ) ( 0 x )
+*> and
+*> V**H *B*Q = V**H *( B1 0 )*Q = ( x x )
+*> ( B2 B3 ) ( 0 x )
+*> where
+*>
+*> U = ( CSU SNU ), V = ( CSV SNV ),
+*> ( -SNU**H CSU ) ( -SNV**H CSV )
+*>
+*> Q = ( CSQ SNQ )
+*> ( -SNQ**H CSQ )
+*>
+*> The rows of the transformed A and B are parallel. Moreover, if the
+*> input 2-by-2 matrix A is not zero, then the transformed (1,1) entry
+*> of A is not zero. If the input matrices A and B are both not zero,
+*> then the transformed (2,2) element of B is not zero, except when the
+*> first rows of input A and B are parallel and the second rows are
+*> zero.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPPER (input) LOGICAL
-* = .TRUE.: the input matrices A and B are upper triangular.
-* = .FALSE.: the input matrices A and B are lower triangular.
-*
-* A1 (input) REAL
-*
-* A2 (input) COMPLEX
-*
-* A3 (input) REAL
-* On entry, A1, A2 and A3 are elements of the input 2-by-2
-* upper (lower) triangular matrix A.
-*
-* B1 (input) REAL
-*
-* B2 (input) COMPLEX
-*
-* B3 (input) REAL
-* On entry, B1, B2 and B3 are elements of the input 2-by-2
-* upper (lower) triangular matrix B.
+*> \param[in] UPPER
+*> \verbatim
+*> UPPER is LOGICAL
+*> = .TRUE.: the input matrices A and B are upper triangular.
+*> = .FALSE.: the input matrices A and B are lower triangular.
+*> \endverbatim
+*>
+*> \param[in] A1
+*> \verbatim
+*> A1 is REAL
+*> \endverbatim
+*>
+*> \param[in] A2
+*> \verbatim
+*> A2 is COMPLEX
+*> \endverbatim
+*>
+*> \param[in] A3
+*> \verbatim
+*> A3 is REAL
+*> On entry, A1, A2 and A3 are elements of the input 2-by-2
+*> upper (lower) triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] B1
+*> \verbatim
+*> B1 is REAL
+*> \endverbatim
+*>
+*> \param[in] B2
+*> \verbatim
+*> B2 is COMPLEX
+*> \endverbatim
+*>
+*> \param[in] B3
+*> \verbatim
+*> B3 is REAL
+*> On entry, B1, B2 and B3 are elements of the input 2-by-2
+*> upper (lower) triangular matrix B.
+*> \endverbatim
+*>
+*> \param[out] CSU
+*> \verbatim
+*> CSU is REAL
+*> \endverbatim
+*>
+*> \param[out] SNU
+*> \verbatim
+*> SNU is COMPLEX
+*> The desired unitary matrix U.
+*> \endverbatim
+*>
+*> \param[out] CSV
+*> \verbatim
+*> CSV is REAL
+*> \endverbatim
+*>
+*> \param[out] SNV
+*> \verbatim
+*> SNV is COMPLEX
+*> The desired unitary matrix V.
+*> \endverbatim
+*>
+*> \param[out] CSQ
+*> \verbatim
+*> CSQ is REAL
+*> \endverbatim
+*>
+*> \param[out] SNQ
+*> \verbatim
+*> SNQ is COMPLEX
+*> The desired unitary matrix Q.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CSU (output) REAL
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SNU (output) COMPLEX
-* The desired unitary matrix U.
+*> \date November 2011
*
-* CSV (output) REAL
+*> \ingroup complexOTHERauxiliary
*
-* SNV (output) COMPLEX
-* The desired unitary matrix V.
+* =====================================================================
+ SUBROUTINE CLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
+ $ SNV, CSQ, SNQ )
*
-* CSQ (output) REAL
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SNQ (output) COMPLEX
-* The desired unitary matrix Q.
+* .. Scalar Arguments ..
+ LOGICAL UPPER
+ REAL A1, A3, B1, B3, CSQ, CSU, CSV
+ COMPLEX A2, B2, SNQ, SNU, SNV
+* ..
*
* =====================================================================
*
diff --git a/SRC/clagtm.f b/SRC/clagtm.f
index 3b861114..d1b06610 100644
--- a/SRC/clagtm.f
+++ b/SRC/clagtm.f
@@ -1,10 +1,145 @@
+*> \brief \b CLAGTM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
+* B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, N, NRHS
+* REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAGTM performs a matrix-vector product of the form
+*>
+*> B := alpha * A * X + beta * B
+*>
+*> where A is a tridiagonal matrix of order N, B and X are N by NRHS
+*> matrices, and alpha and beta are real scalars, each of which may be
+*> 0., 1., or -1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': No transpose, B := alpha * A * X + beta * B
+*> = 'T': Transpose, B := alpha * A**T * X + beta * B
+*> = 'C': Conjugate transpose, B := alpha * A**H * X + beta * B
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) super-diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The N by NRHS matrix X.
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(N,1).
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> The scalar beta. BETA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix B.
+*> On exit, B is overwritten by the matrix expression
+*> B := alpha * A * X + beta * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(N,1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
$ B, LDB )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -16,63 +151,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAGTM performs a matrix-vector product of the form
-*
-* B := alpha * A * X + beta * B
-*
-* where A is a tridiagonal matrix of order N, B and X are N by NRHS
-* matrices, and alpha and beta are real scalars, each of which may be
-* 0., 1., or -1.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': No transpose, B := alpha * A * X + beta * B
-* = 'T': Transpose, B := alpha * A**T * X + beta * B
-* = 'C': Conjugate transpose, B := alpha * A**H * X + beta * B
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B.
-*
-* ALPHA (input) REAL
-* The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) sub-diagonal elements of T.
-*
-* D (input) COMPLEX array, dimension (N)
-* The diagonal elements of T.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) super-diagonal elements of T.
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The N by NRHS matrix X.
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(N,1).
-*
-* BETA (input) REAL
-* The scalar beta. BETA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 1.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix B.
-* On exit, B is overwritten by the matrix expression
-* B := alpha * A * X + beta * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(N,1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clahef.f b/SRC/clahef.f
index 6ddc281e..8b8b1446 100644
--- a/SRC/clahef.f
+++ b/SRC/clahef.f
@@ -1,9 +1,159 @@
+*> \brief \b CLAHEF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAHEF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KB, LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), W( LDW, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAHEF computes a partial factorization of a complex Hermitian
+*> matrix A using the Bunch-Kaufman diagonal pivoting method. The
+*> partial factorization has the form:
+*>
+*> A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
+*> ( 0 U22 ) ( 0 D ) ( U12**H U22**H )
+*>
+*> A = ( L11 0 ) ( D 0 ) ( L11**H L21**H ) if UPLO = 'L'
+*> ( L21 I ) ( 0 A22 ) ( 0 I )
+*>
+*> where the order of D is at most NB. The actual order is returned in
+*> the argument KB, and is either NB or NB-1, or N if N <= NB.
+*> Note that U**H denotes the conjugate transpose of U.
+*>
+*> CLAHEF is an auxiliary routine called by CHETRF. It uses blocked code
+*> (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
+*> A22 (if UPLO = 'L').
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The maximum number of columns of the matrix A that should be
+*> factored. NB should be at least 2 to allow for 2-by-2 pivot
+*> blocks.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns of A that were actually factored.
+*> KB is either NB-1 or NB, or N if N <= NB.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> On exit, A contains details of the partial factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If UPLO = 'U', only the last KB elements of IPIV are set;
+*> if UPLO = 'L', only the first KB elements are set.
+*> \endverbatim
+*> \verbatim
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (LDW,NB)
+*> \endverbatim
+*>
+*> \param[in] LDW
+*> \verbatim
+*> LDW is INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEcomputational
+*
+* =====================================================================
SUBROUTINE CLAHEF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,85 +164,6 @@
COMPLEX A( LDA, * ), W( LDW, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAHEF computes a partial factorization of a complex Hermitian
-* matrix A using the Bunch-Kaufman diagonal pivoting method. The
-* partial factorization has the form:
-*
-* A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
-* ( 0 U22 ) ( 0 D ) ( U12**H U22**H )
-*
-* A = ( L11 0 ) ( D 0 ) ( L11**H L21**H ) if UPLO = 'L'
-* ( L21 I ) ( 0 A22 ) ( 0 I )
-*
-* where the order of D is at most NB. The actual order is returned in
-* the argument KB, and is either NB or NB-1, or N if N <= NB.
-* Note that U**H denotes the conjugate transpose of U.
-*
-* CLAHEF is an auxiliary routine called by CHETRF. It uses blocked code
-* (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
-* A22 (if UPLO = 'L').
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The maximum number of columns of the matrix A that should be
-* factored. NB should be at least 2 to allow for 2-by-2 pivot
-* blocks.
-*
-* KB (output) INTEGER
-* The number of columns of A that were actually factored.
-* KB is either NB-1 or NB, or N if N <= NB.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, A contains details of the partial factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If UPLO = 'U', only the last KB elements of IPIV are set;
-* if UPLO = 'L', only the first KB elements are set.
-*
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* W (workspace) COMPLEX array, dimension (LDW,NB)
-*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clahqr.f b/SRC/clahqr.f
index 52d2d405..b345000f 100644
--- a/SRC/clahqr.f
+++ b/SRC/clahqr.f
@@ -1,9 +1,203 @@
+*> \brief \b CLAHQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+* IHIZ, Z, LDZ, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX H( LDH, * ), W( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CLAHQR is an auxiliary routine called by CHSEQR to update the
+*> eigenvalues and Schur decomposition already computed by CHSEQR, by
+*> dealing with the Hessenberg submatrix in rows and columns ILO to
+*> IHI.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows and
+*> columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1).
+*> CLAHQR works primarily with the Hessenberg submatrix in rows
+*> and columns ILO to IHI, but applies transformations to all of
+*> H if WANTT is .TRUE..
+*> 1 <= ILO <= max(1,IHI); IHI <= N.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO is zero and if WANTT is .TRUE., then H
+*> is upper triangular in rows and columns ILO:IHI. If INFO
+*> is zero and if WANTT is .FALSE., then the contents of H
+*> are unspecified on exit. The output state of H in case
+*> INF is positive is below under the description of INFO.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> The computed eigenvalues ILO to IHI are stored in the
+*> corresponding elements of W. If WANTT is .TRUE., the
+*> eigenvalues are stored in the same order as on the diagonal
+*> of the Schur form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE..
+*> 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,N)
+*> If WANTZ is .TRUE., on entry Z must contain the current
+*> matrix Z of transformations accumulated by CHSEQR, and on
+*> exit Z has been updated; transformations are applied only to
+*> the submatrix Z(ILOZ:IHIZ,ILO:IHI).
+*> If WANTZ is .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, CLAHQR failed to compute all the
+*> eigenvalues ILO to IHI in a total of 30 iterations
+*> per eigenvalue; elements i+1:ihi of W contain
+*> those eigenvalues which have been successfully
+*> computed.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the
+*> eigenvalues of the upper Hessenberg matrix
+*> rows and columns ILO thorugh INFO of the final,
+*> output value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> (*) (initial value of H)*U = U*(final value of H)
+*> where U is an orthognal matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> (final value of Z) = (initial value of Z)*U
+*> where U is the orthogonal matrix in (*)
+*> (regardless of the value of WANTT.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 02-96 Based on modifications by
+*> David Day, Sandia National Laboratory, USA
+*>
+*> 12-04 Further modifications by
+*> Ralph Byers, University of Kansas, USA
+*> This is a modified version of CLAHQR from LAPACK version 3.0.
+*> It is (1) more robust against overflow and underflow and
+*> (2) adopts the more conservative Ahues & Tisseur stopping
+*> criterion (LAWN 122, 1997).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
$ IHIZ, Z, LDZ, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
@@ -13,110 +207,6 @@
COMPLEX H( LDH, * ), W( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAHQR is an auxiliary routine called by CHSEQR to update the
-* eigenvalues and Schur decomposition already computed by CHSEQR, by
-* dealing with the Hessenberg submatrix in rows and columns ILO to
-* IHI.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows and
-* columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1).
-* CLAHQR works primarily with the Hessenberg submatrix in rows
-* and columns ILO to IHI, but applies transformations to all of
-* H if WANTT is .TRUE..
-* 1 <= ILO <= max(1,IHI); IHI <= N.
-*
-* H (input/output) COMPLEX array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO is zero and if WANTT is .TRUE., then H
-* is upper triangular in rows and columns ILO:IHI. If INFO
-* is zero and if WANTT is .FALSE., then the contents of H
-* are unspecified on exit. The output state of H in case
-* INF is positive is below under the description of INFO.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* W (output) COMPLEX array, dimension (N)
-* The computed eigenvalues ILO to IHI are stored in the
-* corresponding elements of W. If WANTT is .TRUE., the
-* eigenvalues are stored in the same order as on the diagonal
-* of the Schur form returned in H, with W(i) = H(i,i).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE..
-* 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,N)
-* If WANTZ is .TRUE., on entry Z must contain the current
-* matrix Z of transformations accumulated by CHSEQR, and on
-* exit Z has been updated; transformations are applied only to
-* the submatrix Z(ILOZ:IHIZ,ILO:IHI).
-* If WANTZ is .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, CLAHQR failed to compute all the
-* eigenvalues ILO to IHI in a total of 30 iterations
-* per eigenvalue; elements i+1:ihi of W contain
-* those eigenvalues which have been successfully
-* computed.
-*
-* If INFO .GT. 0 and WANTT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the
-* eigenvalues of the upper Hessenberg matrix
-* rows and columns ILO thorugh INFO of the final,
-* output value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-* (*) (initial value of H)*U = U*(final value of H)
-* where U is an orthognal matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-* (final value of Z) = (initial value of Z)*U
-* where U is the orthogonal matrix in (*)
-* (regardless of the value of WANTT.)
-*
-* Further Details
-* ===============
-*
-* 02-96 Based on modifications by
-* David Day, Sandia National Laboratory, USA
-*
-* 12-04 Further modifications by
-* Ralph Byers, University of Kansas, USA
-* This is a modified version of CLAHQR from LAPACK version 3.0.
-* It is (1) more robust against overflow and underflow and
-* (2) adopts the more conservative Ahues & Tisseur stopping
-* criterion (LAWN 122, 1997).
-*
* =========================================================
*
* .. Parameters ..
diff --git a/SRC/clahr2.f b/SRC/clahr2.f
index ed588497..f7a439fc 100644
--- a/SRC/clahr2.f
+++ b/SRC/clahr2.f
@@ -1,118 +1,164 @@
- SUBROUTINE CLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*> \brief \b CLAHR2
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LDT, LDY, N, NB
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), T( LDT, NB ), TAU( NB ),
- $ Y( LDY, NB )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), T( LDT, NB ), TAU( NB ),
+* $ Y( LDY, NB )
+* ..
+*
* Purpose
* =======
*
-* CLAHR2 reduces the first NB columns of A complex general n-BY-(n-k+1)
-* matrix A so that elements below the k-th subdiagonal are zero. The
-* reduction is performed by an unitary similarity transformation
-* Q**H * A * Q. The routine returns the matrices V and T which determine
-* Q as a block reflector I - V*T*v**H, and also the matrix Y = A * V * T.
-*
-* This is an auxiliary routine called by CGEHRD.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAHR2 reduces the first NB columns of A complex general n-BY-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by an unitary similarity transformation
+*> Q**H * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*v**H, and also the matrix Y = A * V * T.
+*>
+*> This is an auxiliary routine called by CGEHRD.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* K (input) INTEGER
-* The offset for the reduction. Elements below the k-th
-* subdiagonal in the first NB columns are reduced to zero.
-* K < N.
-*
-* NB (input) INTEGER
-* The number of columns to be reduced.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N-K+1)
-* On entry, the n-by-(n-k+1) general matrix A.
-* On exit, the elements on and above the k-th subdiagonal in
-* the first NB columns are overwritten with the corresponding
-* elements of the reduced matrix; the elements below the k-th
-* subdiagonal, with the array TAU, represent the matrix Q as a
-* product of elementary reflectors. The other columns of A are
-* unchanged. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) COMPLEX array, dimension (NB)
-* The scalar factors of the elementary reflectors. See Further
-* Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The offset for the reduction. Elements below the k-th
+*> subdiagonal in the first NB columns are reduced to zero.
+*> K < N.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) COMPLEX array, dimension (LDT,NB)
-* The upper triangular matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* Y (output) COMPLEX array, dimension (LDY,NB)
-* The n-by-nb matrix Y.
+*> \ingroup complexOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= N.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* unchanged. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) COMPLEX array, dimension (NB)
+*> The scalar factors of the elementary reflectors. See Further
+*> Details.
+*>
+*> T (output) COMPLEX array, dimension (LDT,NB)
+*> The upper triangular matrix T.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> Y (output) COMPLEX array, dimension (LDY,NB)
+*> The n-by-nb matrix Y.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= N.
+*>
+*>
+*> The matrix Q is represented as a product of nb elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*> A(i+k+1:n,i), and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*> V which is needed, with T and Y, to apply the transformation to the
+*> unreduced part of the matrix, using an update of the form:
+*> A := (I - V*T*V**H) * (A - Y*V**H).
+*>
+*> The contents of A on exit are illustrated by the following example
+*> with n = 7, k = 3 and nb = 2:
+*>
+*> ( a a a a a )
+*> ( a a a a a )
+*> ( a a a a a )
+*> ( h h a a a )
+*> ( v1 h a a a )
+*> ( v1 v2 a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> This subroutine is a slight modification of LAPACK-3.0's DLAHRD
+*> incorporating improvements proposed by Quintana-Orti and Van de
+*> Gejin. Note that the entries of A(1:K,2:NB) differ from those
+*> returned by the original LAPACK-3.0's DLAHRD routine. (This
+*> subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
+*>
+*> References
+*> ==========
+*>
+*> Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
+*> performance of reduction to Hessenberg form," ACM Transactions on
+*> Mathematical Software, 32(2):180-194, June 2006.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
*
-* The matrix Q is represented as a product of nb elementary reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-* A(i+k+1:n,i), and tau in TAU(i).
-*
-* The elements of the vectors v together form the (n-k+1)-by-nb matrix
-* V which is needed, with T and Y, to apply the transformation to the
-* unreduced part of the matrix, using an update of the form:
-* A := (I - V*T*V**H) * (A - Y*V**H).
-*
-* The contents of A on exit are illustrated by the following example
-* with n = 7, k = 3 and nb = 2:
-*
-* ( a a a a a )
-* ( a a a a a )
-* ( a a a a a )
-* ( h h a a a )
-* ( v1 h a a a )
-* ( v1 v2 a a a )
-* ( v1 v2 a a a )
-*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
-*
-* This subroutine is a slight modification of LAPACK-3.0's DLAHRD
-* incorporating improvements proposed by Quintana-Orti and Van de
-* Gejin. Note that the entries of A(1:K,2:NB) differ from those
-* returned by the original LAPACK-3.0's DLAHRD routine. (This
-* subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
-*
-* References
-* ==========
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
-* performance of reduction to Hessenberg form," ACM Transactions on
-* Mathematical Software, 32(2):180-194, June 2006.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), T( LDT, NB ), TAU( NB ),
+ $ Y( LDY, NB )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clahrd.f b/SRC/clahrd.f
index 1c52faf8..e2aea2e4 100644
--- a/SRC/clahrd.f
+++ b/SRC/clahrd.f
@@ -1,106 +1,152 @@
- SUBROUTINE CLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LDT, LDY, N, NB
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), T( LDT, NB ), TAU( NB ),
- $ Y( LDY, NB )
-* ..
-*
+*> \brief \b CLAHRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), T( LDT, NB ), TAU( NB ),
+* $ Y( LDY, NB )
+* ..
+*
* Purpose
* =======
*
-* CLAHRD reduces the first NB columns of a complex general n-by-(n-k+1)
-* matrix A so that elements below the k-th subdiagonal are zero. The
-* reduction is performed by a unitary similarity transformation
-* Q**H * A * Q. The routine returns the matrices V and T which determine
-* Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
-*
-* This is an OBSOLETE auxiliary routine.
-* This routine will be 'deprecated' in a future release.
-* Please use the new routine CLAHR2 instead.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAHRD reduces the first NB columns of a complex general n-by-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by a unitary similarity transformation
+*> Q**H * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
+*>
+*> This is an OBSOLETE auxiliary routine.
+*> This routine will be 'deprecated' in a future release.
+*> Please use the new routine CLAHR2 instead.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* K (input) INTEGER
-* The offset for the reduction. Elements below the k-th
-* subdiagonal in the first NB columns are reduced to zero.
-*
-* NB (input) INTEGER
-* The number of columns to be reduced.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N-K+1)
-* On entry, the n-by-(n-k+1) general matrix A.
-* On exit, the elements on and above the k-th subdiagonal in
-* the first NB columns are overwritten with the corresponding
-* elements of the reduced matrix; the elements below the k-th
-* subdiagonal, with the array TAU, represent the matrix Q as a
-* product of elementary reflectors. The other columns of A are
-* unchanged. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) COMPLEX array, dimension (NB)
-* The scalar factors of the elementary reflectors. See Further
-* Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The offset for the reduction. Elements below the k-th
+*> subdiagonal in the first NB columns are reduced to zero.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) COMPLEX array, dimension (LDT,NB)
-* The upper triangular matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* Y (output) COMPLEX array, dimension (LDY,NB)
-* The n-by-nb matrix Y.
+*> \ingroup complexOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* unchanged. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) COMPLEX array, dimension (NB)
+*> The scalar factors of the elementary reflectors. See Further
+*> Details.
+*>
+*> T (output) COMPLEX array, dimension (LDT,NB)
+*> The upper triangular matrix T.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> Y (output) COMPLEX array, dimension (LDY,NB)
+*> The n-by-nb matrix Y.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*>
+*>
+*> The matrix Q is represented as a product of nb elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*> A(i+k+1:n,i), and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*> V which is needed, with T and Y, to apply the transformation to the
+*> unreduced part of the matrix, using an update of the form:
+*> A := (I - V*T*V**H) * (A - Y*V**H).
+*>
+*> The contents of A on exit are illustrated by the following example
+*> with n = 7, k = 3 and nb = 2:
+*>
+*> ( a h a a a )
+*> ( a h a a a )
+*> ( a h a a a )
+*> ( h h a a a )
+*> ( v1 h a a a )
+*> ( v1 v2 a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
*
-* The matrix Q is represented as a product of nb elementary reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-* A(i+k+1:n,i), and tau in TAU(i).
-*
-* The elements of the vectors v together form the (n-k+1)-by-nb matrix
-* V which is needed, with T and Y, to apply the transformation to the
-* unreduced part of the matrix, using an update of the form:
-* A := (I - V*T*V**H) * (A - Y*V**H).
-*
-* The contents of A on exit are illustrated by the following example
-* with n = 7, k = 3 and nb = 2:
-*
-* ( a h a a a )
-* ( a h a a a )
-* ( a h a a a )
-* ( h h a a a )
-* ( v1 h a a a )
-* ( v1 v2 a a a )
-* ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), T( LDT, NB ), TAU( NB ),
+ $ Y( LDY, NB )
+* ..
*
* =====================================================================
*
diff --git a/SRC/claic1.f b/SRC/claic1.f
index 4323a3cf..1986db96 100644
--- a/SRC/claic1.f
+++ b/SRC/claic1.f
@@ -1,9 +1,136 @@
+*> \brief \b CLAIC1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
+*
+* .. Scalar Arguments ..
+* INTEGER J, JOB
+* REAL SEST, SESTPR
+* COMPLEX C, GAMMA, S
+* ..
+* .. Array Arguments ..
+* COMPLEX W( J ), X( J )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAIC1 applies one step of incremental condition estimation in
+*> its simplest version:
+*>
+*> Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j
+*> lower triangular matrix L, such that
+*> twonorm(L*x) = sest
+*> Then CLAIC1 computes sestpr, s, c such that
+*> the vector
+*> [ s*x ]
+*> xhat = [ c ]
+*> is an approximate singular vector of
+*> [ L 0 ]
+*> Lhat = [ w**H gamma ]
+*> in the sense that
+*> twonorm(Lhat*xhat) = sestpr.
+*>
+*> Depending on JOB, an estimate for the largest or smallest singular
+*> value is computed.
+*>
+*> Note that [s c]**H and sestpr**2 is an eigenpair of the system
+*>
+*> diag(sest*sest, 0) + [alpha gamma] * [ conjg(alpha) ]
+*> [ conjg(gamma) ]
+*>
+*> where alpha = x**H*w.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is INTEGER
+*> = 1: an estimate for the largest singular value is computed.
+*> = 2: an estimate for the smallest singular value is computed.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Length of X and W
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (J)
+*> The j-vector x.
+*> \endverbatim
+*>
+*> \param[in] SEST
+*> \verbatim
+*> SEST is REAL
+*> Estimated singular value of j by j matrix L
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is COMPLEX array, dimension (J)
+*> The j-vector w.
+*> \endverbatim
+*>
+*> \param[in] GAMMA
+*> \verbatim
+*> GAMMA is COMPLEX
+*> The diagonal element gamma.
+*> \endverbatim
+*>
+*> \param[out] SESTPR
+*> \verbatim
+*> SESTPR is REAL
+*> Estimated singular value of (j+1) by (j+1) matrix Lhat.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is COMPLEX
+*> Sine needed in forming xhat.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX
+*> Cosine needed in forming xhat.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER J, JOB
@@ -14,66 +141,6 @@
COMPLEX W( J ), X( J )
* ..
*
-* Purpose
-* =======
-*
-* CLAIC1 applies one step of incremental condition estimation in
-* its simplest version:
-*
-* Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j
-* lower triangular matrix L, such that
-* twonorm(L*x) = sest
-* Then CLAIC1 computes sestpr, s, c such that
-* the vector
-* [ s*x ]
-* xhat = [ c ]
-* is an approximate singular vector of
-* [ L 0 ]
-* Lhat = [ w**H gamma ]
-* in the sense that
-* twonorm(Lhat*xhat) = sestpr.
-*
-* Depending on JOB, an estimate for the largest or smallest singular
-* value is computed.
-*
-* Note that [s c]**H and sestpr**2 is an eigenpair of the system
-*
-* diag(sest*sest, 0) + [alpha gamma] * [ conjg(alpha) ]
-* [ conjg(gamma) ]
-*
-* where alpha = x**H*w.
-*
-* Arguments
-* =========
-*
-* JOB (input) INTEGER
-* = 1: an estimate for the largest singular value is computed.
-* = 2: an estimate for the smallest singular value is computed.
-*
-* J (input) INTEGER
-* Length of X and W
-*
-* X (input) COMPLEX array, dimension (J)
-* The j-vector x.
-*
-* SEST (input) REAL
-* Estimated singular value of j by j matrix L
-*
-* W (input) COMPLEX array, dimension (J)
-* The j-vector w.
-*
-* GAMMA (input) COMPLEX
-* The diagonal element gamma.
-*
-* SESTPR (output) REAL
-* Estimated singular value of (j+1) by (j+1) matrix Lhat.
-*
-* S (output) COMPLEX
-* Sine needed in forming xhat.
-*
-* C (output) COMPLEX
-* Cosine needed in forming xhat.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clals0.f b/SRC/clals0.f
index d9eaa87b..bd0a9477 100644
--- a/SRC/clals0.f
+++ b/SRC/clals0.f
@@ -1,11 +1,278 @@
+*> \brief \b CLALS0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
+* PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
+* POLES, DIFL, DIFR, Z, K, C, S, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
+* $ LDGNUM, NL, NR, NRHS, SQRE
+* REAL C, S
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), PERM( * )
+* REAL DIFL( * ), DIFR( LDGNUM, * ),
+* $ GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
+* $ RWORK( * ), Z( * )
+* COMPLEX B( LDB, * ), BX( LDBX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLALS0 applies back the multiplying factors of either the left or the
+*> right singular vector matrix of a diagonal matrix appended by a row
+*> to the right hand side matrix B in solving the least squares problem
+*> using the divide-and-conquer SVD approach.
+*>
+*> For the left singular vector matrix, three types of orthogonal
+*> matrices are involved:
+*>
+*> (1L) Givens rotations: the number of such rotations is GIVPTR; the
+*> pairs of columns/rows they were applied to are stored in GIVCOL;
+*> and the C- and S-values of these rotations are stored in GIVNUM.
+*>
+*> (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
+*> row, and for J=2:N, PERM(J)-th row of B is to be moved to the
+*> J-th row.
+*>
+*> (3L) The left singular vector matrix of the remaining matrix.
+*>
+*> For the right singular vector matrix, four types of orthogonal
+*> matrices are involved:
+*>
+*> (1R) The right singular vector matrix of the remaining matrix.
+*>
+*> (2R) If SQRE = 1, one extra Givens rotation to generate the right
+*> null space.
+*>
+*> (3R) The inverse transformation of (2L).
+*>
+*> (4R) The inverse transformation of (1L).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed in
+*> factored form:
+*> = 0: Left singular vector matrix.
+*> = 1: Right singular vector matrix.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has row dimension N = NL + NR + 1,
+*> and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension ( LDB, NRHS )
+*> On input, B contains the right hand sides of the least
+*> squares problem in rows 1 through M. On output, B contains
+*> the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB must be at least
+*> max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*> BX is COMPLEX array, dimension ( LDBX, NRHS )
+*> \endverbatim
+*>
+*> \param[in] LDBX
+*> \verbatim
+*> LDBX is INTEGER
+*> The leading dimension of BX.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( N )
+*> The permutations (from deflation and sorting) applied
+*> to the two blocks.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*> Each pair of numbers indicates a pair of rows/columns
+*> involved in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER
+*> The leading dimension of GIVCOL, must be at least N.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension ( LDGNUM, 2 )
+*> Each number indicates the C or S value used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] LDGNUM
+*> \verbatim
+*> LDGNUM is INTEGER
+*> The leading dimension of arrays DIFR, POLES and
+*> GIVNUM, must be at least K.
+*> \endverbatim
+*>
+*> \param[in] POLES
+*> \verbatim
+*> POLES is REAL array, dimension ( LDGNUM, 2 )
+*> On entry, POLES(1:K, 1) contains the new singular
+*> values obtained from solving the secular equation, and
+*> POLES(1:K, 2) is an array containing the poles in the secular
+*> equation.
+*> \endverbatim
+*>
+*> \param[in] DIFL
+*> \verbatim
+*> DIFL is REAL array, dimension ( K ).
+*> On entry, DIFL(I) is the distance between I-th updated
+*> (undeflated) singular value and the I-th (undeflated) old
+*> singular value.
+*> \endverbatim
+*>
+*> \param[in] DIFR
+*> \verbatim
+*> DIFR is REAL array, dimension ( LDGNUM, 2 ).
+*> On entry, DIFR(I, 1) contains the distances between I-th
+*> updated (undeflated) singular value and the I+1-th
+*> (undeflated) old singular value. And DIFR(I, 2) is the
+*> normalizing factor for the I-th right singular vector.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension ( K )
+*> Contain the components of the deflation-adjusted updating row
+*> vector.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix,
+*> This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL
+*> C contains garbage if SQRE =0 and the C-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL
+*> S contains garbage if SQRE =0 and the S-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> ( K*(1+NRHS) + 2*NRHS )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
$ PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
$ POLES, DIFL, DIFR, Z, K, C, S, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
@@ -20,149 +287,6 @@
COMPLEX B( LDB, * ), BX( LDBX, * )
* ..
*
-* Purpose
-* =======
-*
-* CLALS0 applies back the multiplying factors of either the left or the
-* right singular vector matrix of a diagonal matrix appended by a row
-* to the right hand side matrix B in solving the least squares problem
-* using the divide-and-conquer SVD approach.
-*
-* For the left singular vector matrix, three types of orthogonal
-* matrices are involved:
-*
-* (1L) Givens rotations: the number of such rotations is GIVPTR; the
-* pairs of columns/rows they were applied to are stored in GIVCOL;
-* and the C- and S-values of these rotations are stored in GIVNUM.
-*
-* (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
-* row, and for J=2:N, PERM(J)-th row of B is to be moved to the
-* J-th row.
-*
-* (3L) The left singular vector matrix of the remaining matrix.
-*
-* For the right singular vector matrix, four types of orthogonal
-* matrices are involved:
-*
-* (1R) The right singular vector matrix of the remaining matrix.
-*
-* (2R) If SQRE = 1, one extra Givens rotation to generate the right
-* null space.
-*
-* (3R) The inverse transformation of (2L).
-*
-* (4R) The inverse transformation of (1L).
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed in
-* factored form:
-* = 0: Left singular vector matrix.
-* = 1: Right singular vector matrix.
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has row dimension N = NL + NR + 1,
-* and column dimension M = N + SQRE.
-*
-* NRHS (input) INTEGER
-* The number of columns of B and BX. NRHS must be at least 1.
-*
-* B (input/output) COMPLEX array, dimension ( LDB, NRHS )
-* On input, B contains the right hand sides of the least
-* squares problem in rows 1 through M. On output, B contains
-* the solution X in rows 1 through N.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB must be at least
-* max(1,MAX( M, N ) ).
-*
-* BX (workspace) COMPLEX array, dimension ( LDBX, NRHS )
-*
-* LDBX (input) INTEGER
-* The leading dimension of BX.
-*
-* PERM (input) INTEGER array, dimension ( N )
-* The permutations (from deflation and sorting) applied
-* to the two blocks.
-*
-* GIVPTR (input) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem.
-*
-* GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 )
-* Each pair of numbers indicates a pair of rows/columns
-* involved in a Givens rotation.
-*
-* LDGCOL (input) INTEGER
-* The leading dimension of GIVCOL, must be at least N.
-*
-* GIVNUM (input) REAL array, dimension ( LDGNUM, 2 )
-* Each number indicates the C or S value used in the
-* corresponding Givens rotation.
-*
-* LDGNUM (input) INTEGER
-* The leading dimension of arrays DIFR, POLES and
-* GIVNUM, must be at least K.
-*
-* POLES (input) REAL array, dimension ( LDGNUM, 2 )
-* On entry, POLES(1:K, 1) contains the new singular
-* values obtained from solving the secular equation, and
-* POLES(1:K, 2) is an array containing the poles in the secular
-* equation.
-*
-* DIFL (input) REAL array, dimension ( K ).
-* On entry, DIFL(I) is the distance between I-th updated
-* (undeflated) singular value and the I-th (undeflated) old
-* singular value.
-*
-* DIFR (input) REAL array, dimension ( LDGNUM, 2 ).
-* On entry, DIFR(I, 1) contains the distances between I-th
-* updated (undeflated) singular value and the I+1-th
-* (undeflated) old singular value. And DIFR(I, 2) is the
-* normalizing factor for the I-th right singular vector.
-*
-* Z (input) REAL array, dimension ( K )
-* Contain the components of the deflation-adjusted updating row
-* vector.
-*
-* K (input) INTEGER
-* Contains the dimension of the non-deflated matrix,
-* This is the order of the related secular equation. 1 <= K <=N.
-*
-* C (input) REAL
-* C contains garbage if SQRE =0 and the C-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* S (input) REAL
-* S contains garbage if SQRE =0 and the S-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* RWORK (workspace) REAL array, dimension
-* ( K*(1+NRHS) + 2*NRHS )
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clalsa.f b/SRC/clalsa.f
index cac8ff97..aa857520 100644
--- a/SRC/clalsa.f
+++ b/SRC/clalsa.f
@@ -1,12 +1,275 @@
+*> \brief \b CLALSA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
+* LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
+* GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
+* $ SMLSIZ
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
+* $ K( * ), PERM( LDGCOL, * )
+* REAL C( * ), DIFL( LDU, * ), DIFR( LDU, * ),
+* $ GIVNUM( LDU, * ), POLES( LDU, * ), RWORK( * ),
+* $ S( * ), U( LDU, * ), VT( LDU, * ), Z( LDU, * )
+* COMPLEX B( LDB, * ), BX( LDBX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLALSA is an itermediate step in solving the least squares problem
+*> by computing the SVD of the coefficient matrix in compact form (The
+*> singular vectors are computed as products of simple orthorgonal
+*> matrices.).
+*>
+*> If ICOMPQ = 0, CLALSA applies the inverse of the left singular vector
+*> matrix of an upper bidiagonal matrix to the right hand side; and if
+*> ICOMPQ = 1, CLALSA applies the right singular vector matrix to the
+*> right hand side. The singular vector matrices were generated in
+*> compact form by CLALSA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether the left or the right singular vector
+*> matrix is involved.
+*> = 0: Left singular vector matrix
+*> = 1: Right singular vector matrix
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The row and column dimensions of the upper bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension ( LDB, NRHS )
+*> On input, B contains the right hand sides of the least
+*> squares problem in rows 1 through M.
+*> On output, B contains the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B in the calling subprogram.
+*> LDB must be at least max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*> BX is COMPLEX array, dimension ( LDBX, NRHS )
+*> On exit, the result of applying the left or right singular
+*> vector matrix to B.
+*> \endverbatim
+*>
+*> \param[in] LDBX
+*> \verbatim
+*> LDBX is INTEGER
+*> The leading dimension of BX.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension ( LDU, SMLSIZ ).
+*> On entry, U contains the left singular vector matrices of all
+*> subproblems at the bottom level.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER, LDU = > N.
+*> The leading dimension of arrays U, VT, DIFL, DIFR,
+*> POLES, GIVNUM, and Z.
+*> \endverbatim
+*>
+*> \param[in] VT
+*> \verbatim
+*> VT is REAL array, dimension ( LDU, SMLSIZ+1 ).
+*> On entry, VT**H contains the right singular vector matrices of
+*> all subproblems at the bottom level.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER array, dimension ( N ).
+*> \endverbatim
+*>
+*> \param[in] DIFL
+*> \verbatim
+*> DIFL is REAL array, dimension ( LDU, NLVL ).
+*> where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
+*> \endverbatim
+*>
+*> \param[in] DIFR
+*> \verbatim
+*> DIFR is REAL array, dimension ( LDU, 2 * NLVL ).
+*> On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
+*> distances between singular values on the I-th level and
+*> singular values on the (I -1)-th level, and DIFR(*, 2 * I)
+*> record the normalizing factors of the right singular vectors
+*> matrices of subproblems on I-th level.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension ( LDU, NLVL ).
+*> On entry, Z(1, I) contains the components of the deflation-
+*> adjusted updating row vector for subproblems on the I-th
+*> level.
+*> \endverbatim
+*>
+*> \param[in] POLES
+*> \verbatim
+*> POLES is REAL array, dimension ( LDU, 2 * NLVL ).
+*> On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
+*> singular values involved in the secular equations on the I-th
+*> level.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension ( N ).
+*> On entry, GIVPTR( I ) records the number of Givens
+*> rotations performed on the I-th problem on the computation
+*> tree.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
+*> On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
+*> locations of Givens rotations performed on the I-th level on
+*> the computation tree.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER, LDGCOL = > N.
+*> The leading dimension of arrays GIVCOL and PERM.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( LDGCOL, NLVL ).
+*> On entry, PERM(*, I) records permutations done on the I-th
+*> level of the computation tree.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension ( LDU, 2 * NLVL ).
+*> On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
+*> values of Givens rotations performed on the I-th level on the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension ( N ).
+*> On entry, if the I-th subproblem is not square,
+*> C( I ) contains the C-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension ( N ).
+*> On entry, if the I-th subproblem is not square,
+*> S( I ) contains the S-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension at least
+*> MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array.
+*> The dimension must be at least 3 * N
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
$ LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
$ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
@@ -21,139 +284,6 @@
COMPLEX B( LDB, * ), BX( LDBX, * )
* ..
*
-* Purpose
-* =======
-*
-* CLALSA is an itermediate step in solving the least squares problem
-* by computing the SVD of the coefficient matrix in compact form (The
-* singular vectors are computed as products of simple orthorgonal
-* matrices.).
-*
-* If ICOMPQ = 0, CLALSA applies the inverse of the left singular vector
-* matrix of an upper bidiagonal matrix to the right hand side; and if
-* ICOMPQ = 1, CLALSA applies the right singular vector matrix to the
-* right hand side. The singular vector matrices were generated in
-* compact form by CLALSA.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether the left or the right singular vector
-* matrix is involved.
-* = 0: Left singular vector matrix
-* = 1: Right singular vector matrix
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The row and column dimensions of the upper bidiagonal matrix.
-*
-* NRHS (input) INTEGER
-* The number of columns of B and BX. NRHS must be at least 1.
-*
-* B (input/output) COMPLEX array, dimension ( LDB, NRHS )
-* On input, B contains the right hand sides of the least
-* squares problem in rows 1 through M.
-* On output, B contains the solution X in rows 1 through N.
-*
-* LDB (input) INTEGER
-* The leading dimension of B in the calling subprogram.
-* LDB must be at least max(1,MAX( M, N ) ).
-*
-* BX (output) COMPLEX array, dimension ( LDBX, NRHS )
-* On exit, the result of applying the left or right singular
-* vector matrix to B.
-*
-* LDBX (input) INTEGER
-* The leading dimension of BX.
-*
-* U (input) REAL array, dimension ( LDU, SMLSIZ ).
-* On entry, U contains the left singular vector matrices of all
-* subproblems at the bottom level.
-*
-* LDU (input) INTEGER, LDU = > N.
-* The leading dimension of arrays U, VT, DIFL, DIFR,
-* POLES, GIVNUM, and Z.
-*
-* VT (input) REAL array, dimension ( LDU, SMLSIZ+1 ).
-* On entry, VT**H contains the right singular vector matrices of
-* all subproblems at the bottom level.
-*
-* K (input) INTEGER array, dimension ( N ).
-*
-* DIFL (input) REAL array, dimension ( LDU, NLVL ).
-* where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
-*
-* DIFR (input) REAL array, dimension ( LDU, 2 * NLVL ).
-* On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
-* distances between singular values on the I-th level and
-* singular values on the (I -1)-th level, and DIFR(*, 2 * I)
-* record the normalizing factors of the right singular vectors
-* matrices of subproblems on I-th level.
-*
-* Z (input) REAL array, dimension ( LDU, NLVL ).
-* On entry, Z(1, I) contains the components of the deflation-
-* adjusted updating row vector for subproblems on the I-th
-* level.
-*
-* POLES (input) REAL array, dimension ( LDU, 2 * NLVL ).
-* On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
-* singular values involved in the secular equations on the I-th
-* level.
-*
-* GIVPTR (input) INTEGER array, dimension ( N ).
-* On entry, GIVPTR( I ) records the number of Givens
-* rotations performed on the I-th problem on the computation
-* tree.
-*
-* GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
-* On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
-* locations of Givens rotations performed on the I-th level on
-* the computation tree.
-*
-* LDGCOL (input) INTEGER, LDGCOL = > N.
-* The leading dimension of arrays GIVCOL and PERM.
-*
-* PERM (input) INTEGER array, dimension ( LDGCOL, NLVL ).
-* On entry, PERM(*, I) records permutations done on the I-th
-* level of the computation tree.
-*
-* GIVNUM (input) REAL array, dimension ( LDU, 2 * NLVL ).
-* On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
-* values of Givens rotations performed on the I-th level on the
-* computation tree.
-*
-* C (input) REAL array, dimension ( N ).
-* On entry, if the I-th subproblem is not square,
-* C( I ) contains the C-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* S (input) REAL array, dimension ( N ).
-* On entry, if the I-th subproblem is not square,
-* S( I ) contains the S-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* RWORK (workspace) REAL array, dimension at least
-* MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ).
-*
-* IWORK (workspace) INTEGER array.
-* The dimension must be at least 3 * N
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clalsd.f b/SRC/clalsd.f
index bfaa0f8a..64ad5478 100644
--- a/SRC/clalsd.f
+++ b/SRC/clalsd.f
@@ -1,10 +1,193 @@
+*> \brief \b CLALSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
+* RANK, WORK, RWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS, RANK, SMLSIZ
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), E( * ), RWORK( * )
+* COMPLEX B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLALSD uses the singular value decomposition of A to solve the least
+*> squares problem of finding X to minimize the Euclidean norm of each
+*> column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
+*> are N-by-NRHS. The solution X overwrites B.
+*>
+*> The singular values of A smaller than RCOND times the largest
+*> singular value are treated as zero in solving the least squares
+*> problem; in this case a minimum norm solution is returned.
+*> The actual singular values are returned in D in ascending order.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': D and E define an upper bidiagonal matrix.
+*> = 'L': D and E define a lower bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the bidiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry D contains the main diagonal of the bidiagonal
+*> matrix. On exit, if INFO = 0, D contains its singular values.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> Contains the super-diagonal entries of the bidiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On input, B contains the right hand sides of the least
+*> squares problem. On output, B contains the solution X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B in the calling subprogram.
+*> LDB must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The singular values of A less than or equal to RCOND times
+*> the largest singular value are treated as zero in solving
+*> the least squares problem. If RCOND is negative,
+*> machine precision is used instead.
+*> For example, if diag(S)*X=B were the least squares problem,
+*> where diag(S) is a diagonal matrix of singular values, the
+*> solution would be X(i) = B(i) / S(i) if S(i) is greater than
+*> RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
+*> RCOND*max(S).
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The number of singular values of A greater than RCOND times
+*> the largest singular value.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N * NRHS).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension at least
+*> (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
+*> MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS ),
+*> where
+*> NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (3*N*NLVL + 11*N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute a singular value while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through MOD(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
$ RANK, WORK, RWORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,99 +200,6 @@
COMPLEX B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLALSD uses the singular value decomposition of A to solve the least
-* squares problem of finding X to minimize the Euclidean norm of each
-* column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
-* are N-by-NRHS. The solution X overwrites B.
-*
-* The singular values of A smaller than RCOND times the largest
-* singular value are treated as zero in solving the least squares
-* problem; in this case a minimum norm solution is returned.
-* The actual singular values are returned in D in ascending order.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': D and E define an upper bidiagonal matrix.
-* = 'L': D and E define a lower bidiagonal matrix.
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The dimension of the bidiagonal matrix. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS must be at least 1.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry D contains the main diagonal of the bidiagonal
-* matrix. On exit, if INFO = 0, D contains its singular values.
-*
-* E (input/output) REAL array, dimension (N-1)
-* Contains the super-diagonal entries of the bidiagonal matrix.
-* On exit, E has been destroyed.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On input, B contains the right hand sides of the least
-* squares problem. On output, B contains the solution X.
-*
-* LDB (input) INTEGER
-* The leading dimension of B in the calling subprogram.
-* LDB must be at least max(1,N).
-*
-* RCOND (input) REAL
-* The singular values of A less than or equal to RCOND times
-* the largest singular value are treated as zero in solving
-* the least squares problem. If RCOND is negative,
-* machine precision is used instead.
-* For example, if diag(S)*X=B were the least squares problem,
-* where diag(S) is a diagonal matrix of singular values, the
-* solution would be X(i) = B(i) / S(i) if S(i) is greater than
-* RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
-* RCOND*max(S).
-*
-* RANK (output) INTEGER
-* The number of singular values of A greater than RCOND times
-* the largest singular value.
-*
-* WORK (workspace) COMPLEX array, dimension (N * NRHS).
-*
-* RWORK (workspace) REAL array, dimension at least
-* (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
-* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS ),
-* where
-* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
-*
-* IWORK (workspace) INTEGER array, dimension (3*N*NLVL + 11*N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute a singular value while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through MOD(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clangb.f b/SRC/clangb.f
index d298fc6f..a398d660 100644
--- a/SRC/clangb.f
+++ b/SRC/clangb.f
@@ -1,10 +1,127 @@
+*> \brief \b CLANGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANGB( NORM, N, KL, KU, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER KL, KU, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANGB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> CLANGB returns the value
+*>
+*> CLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANGB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANGB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of sub-diagonals of the matrix A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of super-diagonals of the matrix A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
+*> column of A is stored in the j-th column of the array AB as
+*> follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANGB( NORM, N, KL, KU, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -15,61 +132,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLANGB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
-*
-* Description
-* ===========
-*
-* CLANGB returns the value
-*
-* CLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANGB as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANGB is
-* set to zero.
-*
-* KL (input) INTEGER
-* The number of sub-diagonals of the matrix A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of super-diagonals of the matrix A. KU >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The band matrix A, stored in rows 1 to KL+KU+1. The j-th
-* column of A is stored in the j-th column of the array AB as
-* follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clange.f b/SRC/clange.f
index 66779867..b04ab6b9 100644
--- a/SRC/clange.f
+++ b/SRC/clange.f
@@ -1,9 +1,117 @@
+*> \brief \b CLANGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANGE( NORM, M, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANGE returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> CLANGE returns the value
+*>
+*> CLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANGE as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0. When M = 0,
+*> CLANGE is set to zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0. When N = 0,
+*> CLANGE is set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANGE( NORM, M, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -14,56 +122,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLANGE returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex matrix A.
-*
-* Description
-* ===========
-*
-* CLANGE returns the value
-*
-* CLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANGE as described
-* above.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0. When M = 0,
-* CLANGE is set to zero.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0. When N = 0,
-* CLANGE is set to zero.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clangt.f b/SRC/clangt.f
index 3ce47a32..a0d5a3af 100644
--- a/SRC/clangt.f
+++ b/SRC/clangt.f
@@ -1,9 +1,108 @@
+*> \brief \b CLANGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANGT( NORM, N, DL, D, DU )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* COMPLEX D( * ), DL( * ), DU( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANGT returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex tridiagonal matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> CLANGT returns the value
+*>
+*> CLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANGT as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANGT is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANGT( NORM, N, DL, D, DU )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,51 +112,6 @@
COMPLEX D( * ), DL( * ), DU( * )
* ..
*
-* Purpose
-* =======
-*
-* CLANGT returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex tridiagonal matrix A.
-*
-* Description
-* ===========
-*
-* CLANGT returns the value
-*
-* CLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANGT as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANGT is
-* set to zero.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) COMPLEX array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clanhb.f b/SRC/clanhb.f
index 391a5a4d..4856e413 100644
--- a/SRC/clanhb.f
+++ b/SRC/clanhb.f
@@ -1,10 +1,134 @@
+*> \brief \b CLANHB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANHB( NORM, UPLO, N, K, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANHB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n hermitian band matrix A, with k super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> CLANHB returns the value
+*>
+*> CLANHB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANHB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> band matrix A is supplied.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANHB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals or sub-diagonals of the
+*> band matrix A. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangle of the hermitian band matrix A,
+*> stored in the first K+1 rows of AB. The j-th column of A is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANHB( NORM, UPLO, N, K, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -15,68 +139,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLANHB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n hermitian band matrix A, with k super-diagonals.
-*
-* Description
-* ===========
-*
-* CLANHB returns the value
-*
-* CLANHB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANHB as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* band matrix A is supplied.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANHB is
-* set to zero.
-*
-* K (input) INTEGER
-* The number of super-diagonals or sub-diagonals of the
-* band matrix A. K >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangle of the hermitian band matrix A,
-* stored in the first K+1 rows of AB. The j-th column of A is
-* stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clanhe.f b/SRC/clanhe.f
index 221a9cd0..f7f3d4d9 100644
--- a/SRC/clanhe.f
+++ b/SRC/clanhe.f
@@ -1,9 +1,126 @@
+*> \brief \b CLANHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANHE( NORM, UPLO, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANHE returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex hermitian matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> CLANHE returns the value
+*>
+*> CLANHE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANHE as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> hermitian matrix A is to be referenced.
+*> = 'U': Upper triangular part of A is referenced
+*> = 'L': Lower triangular part of A is referenced
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANHE is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The hermitian matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced. Note that the imaginary parts of the diagonal
+*> elements need not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANHE( NORM, UPLO, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,65 +131,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLANHE returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex hermitian matrix A.
-*
-* Description
-* ===========
-*
-* CLANHE returns the value
-*
-* CLANHE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANHE as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* hermitian matrix A is to be referenced.
-* = 'U': Upper triangular part of A is referenced
-* = 'L': Lower triangular part of A is referenced
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANHE is
-* set to zero.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The hermitian matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced. Note that the imaginary parts of the diagonal
-* elements need not be set and are assumed to be zero.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clanhf.f b/SRC/clanhf.f
index 5b27c725..6032d057 100644
--- a/SRC/clanhf.f
+++ b/SRC/clanhf.f
@@ -1,199 +1,261 @@
- REAL FUNCTION CLANHF( NORM, TRANSR, UPLO, N, A, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER NORM, TRANSR, UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- REAL WORK( 0: * )
- COMPLEX A( 0: * )
-* ..
-*
+*> \brief \b CLANHF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANHF( NORM, TRANSR, UPLO, N, A, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, TRANSR, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL WORK( 0: * )
+* COMPLEX A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* CLANHF returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex Hermitian matrix A in RFP format.
-*
-* Description
-* ===========
-*
-* CLANHF returns the value
-*
-* CLANHF = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANHF returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex Hermitian matrix A in RFP format.
+*>
+*> Description
+*> ===========
+*>
+*> CLANHF returns the value
+*>
+*> CLANHF = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER
-* Specifies the value to be returned in CLANHF as described
-* above.
-*
-* TRANSR (input) CHARACTER
-* Specifies whether the RFP format of A is normal or
-* conjugate-transposed format.
-* = 'N': RFP format is Normal
-* = 'C': RFP format is Conjugate-transposed
-*
-* UPLO (input) CHARACTER
-* On entry, UPLO specifies whether the RFP matrix A came from
-* an upper or lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' RFP A came from an upper triangular
-* matrix
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER
+*> Specifies the value to be returned in CLANHF as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER
+*> Specifies whether the RFP format of A is normal or
+*> conjugate-transposed format.
+*> = 'N': RFP format is Normal
+*> = 'C': RFP format is Conjugate-transposed
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> On entry, UPLO specifies whether the RFP matrix A came from
+*> an upper or lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' RFP A came from an upper triangular
+*> matrix
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' RFP A came from a lower triangular
+*> matrix
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANHF is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( N*(N+1)/2 );
+*> On entry, the matrix A in RFP Format.
+*> RFP Format is described by TRANSR, UPLO and N as follows:
+*> If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
+*> K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
+*> TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A
+*> as defined when TRANSR = 'N'. The contents of RFP A are
+*> defined by UPLO as follows: If UPLO = 'U' the RFP A
+*> contains the ( N*(N+1)/2 ) elements of upper packed A
+*> either in normal or conjugate-transpose Format. If
+*> UPLO = 'L' the RFP A contains the ( N*(N+1) /2 ) elements
+*> of lower packed A either in normal or conjugate-transpose
+*> Format. The LDA of RFP A is (N+1)/2 when TRANSR = 'C'. When
+*> TRANSR is 'N' the LDA is N+1 when N is even and is N when
+*> is odd. See the Note below for more details.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO = 'L' or 'l' RFP A came from a lower triangular
-* matrix
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANHF is
-* set to zero.
+*> \date November 2011
*
-* A (input) COMPLEX*16 array, dimension ( N*(N+1)/2 );
-* On entry, the matrix A in RFP Format.
-* RFP Format is described by TRANSR, UPLO and N as follows:
-* If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
-* K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
-* TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A
-* as defined when TRANSR = 'N'. The contents of RFP A are
-* defined by UPLO as follows: If UPLO = 'U' the RFP A
-* contains the ( N*(N+1)/2 ) elements of upper packed A
-* either in normal or conjugate-transpose Format. If
-* UPLO = 'L' the RFP A contains the ( N*(N+1) /2 ) elements
-* of lower packed A either in normal or conjugate-transpose
-* Format. The LDA of RFP A is (N+1)/2 when TRANSR = 'C'. When
-* TRANSR is 'N' the LDA is N+1 when N is even and is N when
-* is odd. See the Note below for more details.
-* Unchanged on exit.
+*> \ingroup complexOTHERcomputational
*
-* WORK (workspace) REAL array, dimension (LWORK),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION CLANHF( NORM, TRANSR, UPLO, N, A, WORK )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER NORM, TRANSR, UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ REAL WORK( 0: * )
+ COMPLEX A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clanhp.f b/SRC/clanhp.f
index 1d10856d..5b8987d4 100644
--- a/SRC/clanhp.f
+++ b/SRC/clanhp.f
@@ -1,9 +1,119 @@
+*> \brief \b CLANHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANHP( NORM, UPLO, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANHP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex hermitian matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> CLANHP returns the value
+*>
+*> CLANHP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANHP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> hermitian matrix A is supplied.
+*> = 'U': Upper triangular part of A is supplied
+*> = 'L': Lower triangular part of A is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANHP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANHP( NORM, UPLO, N, AP, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,61 +124,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CLANHP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex hermitian matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* CLANHP returns the value
-*
-* CLANHP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANHP as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* hermitian matrix A is supplied.
-* = 'U': Upper triangular part of A is supplied
-* = 'L': Lower triangular part of A is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANHP is
-* set to zero.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clanhs.f b/SRC/clanhs.f
index da8f1477..ad0b3e6f 100644
--- a/SRC/clanhs.f
+++ b/SRC/clanhs.f
@@ -1,9 +1,111 @@
+*> \brief \b CLANHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANHS( NORM, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANHS returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> Hessenberg matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> CLANHS returns the value
+*>
+*> CLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANHS as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANHS is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The n by n upper Hessenberg matrix A; the part of A below the
+*> first sub-diagonal is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANHS( NORM, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -14,53 +116,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLANHS returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* Hessenberg matrix A.
-*
-* Description
-* ===========
-*
-* CLANHS returns the value
-*
-* CLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANHS as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANHS is
-* set to zero.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The n by n upper Hessenberg matrix A; the part of A below the
-* first sub-diagonal is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clanht.f b/SRC/clanht.f
index 788a5ba9..15f674c7 100644
--- a/SRC/clanht.f
+++ b/SRC/clanht.f
@@ -1,9 +1,103 @@
+*> \brief \b CLANHT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANHT( NORM, N, D, E )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* COMPLEX E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANHT returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex Hermitian tridiagonal matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> CLANHT returns the value
+*>
+*> CLANHT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANHT as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANHT is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> The (n-1) sub-diagonal or super-diagonal elements of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANHT( NORM, N, D, E )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -14,48 +108,6 @@
COMPLEX E( * )
* ..
*
-* Purpose
-* =======
-*
-* CLANHT returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex Hermitian tridiagonal matrix A.
-*
-* Description
-* ===========
-*
-* CLANHT returns the value
-*
-* CLANHT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANHT as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANHT is
-* set to zero.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of A.
-*
-* E (input) COMPLEX array, dimension (N-1)
-* The (n-1) sub-diagonal or super-diagonal elements of A.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clansb.f b/SRC/clansb.f
index 1ba4900d..7f4b7197 100644
--- a/SRC/clansb.f
+++ b/SRC/clansb.f
@@ -1,10 +1,132 @@
+*> \brief \b CLANSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANSB( NORM, UPLO, N, K, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANSB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n symmetric band matrix A, with k super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> CLANSB returns the value
+*>
+*> CLANSB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANSB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> band matrix A is supplied.
+*> = 'U': Upper triangular part is supplied
+*> = 'L': Lower triangular part is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANSB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals or sub-diagonals of the
+*> band matrix A. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first K+1 rows of AB. The j-th column of A is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANSB( NORM, UPLO, N, K, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -15,66 +137,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLANSB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n symmetric band matrix A, with k super-diagonals.
-*
-* Description
-* ===========
-*
-* CLANSB returns the value
-*
-* CLANSB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANSB as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* band matrix A is supplied.
-* = 'U': Upper triangular part is supplied
-* = 'L': Lower triangular part is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANSB is
-* set to zero.
-*
-* K (input) INTEGER
-* The number of super-diagonals or sub-diagonals of the
-* band matrix A. K >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first K+1 rows of AB. The j-th column of A is
-* stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clansp.f b/SRC/clansp.f
index 351800c6..a57984c3 100644
--- a/SRC/clansp.f
+++ b/SRC/clansp.f
@@ -1,9 +1,117 @@
+*> \brief \b CLANSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANSP( NORM, UPLO, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANSP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex symmetric matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> CLANSP returns the value
+*>
+*> CLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANSP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is supplied.
+*> = 'U': Upper triangular part of A is supplied
+*> = 'L': Lower triangular part of A is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANSP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANSP( NORM, UPLO, N, AP, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,59 +122,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CLANSP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex symmetric matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* CLANSP returns the value
-*
-* CLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANSP as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is supplied.
-* = 'U': Upper triangular part of A is supplied
-* = 'L': Lower triangular part of A is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANSP is
-* set to zero.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clansy.f b/SRC/clansy.f
index 66082022..d1e68c3f 100644
--- a/SRC/clansy.f
+++ b/SRC/clansy.f
@@ -1,9 +1,125 @@
+*> \brief \b CLANSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANSY( NORM, UPLO, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANSY returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex symmetric matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> CLANSY returns the value
+*>
+*> CLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANSY as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is to be referenced.
+*> = 'U': Upper triangular part of A is referenced
+*> = 'L': Lower triangular part of A is referenced
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANSY is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYauxiliary
+*
+* =====================================================================
REAL FUNCTION CLANSY( NORM, UPLO, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,64 +130,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLANSY returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex symmetric matrix A.
-*
-* Description
-* ===========
-*
-* CLANSY returns the value
-*
-* CLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANSY as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is to be referenced.
-* = 'U': Upper triangular part of A is referenced
-* = 'L': Lower triangular part of A is referenced
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANSY is
-* set to zero.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clantb.f b/SRC/clantb.f
index 6771e60e..6746c4ca 100644
--- a/SRC/clantb.f
+++ b/SRC/clantb.f
@@ -1,87 +1,152 @@
- REAL FUNCTION CLANTB( NORM, UPLO, DIAG, N, K, AB,
- $ LDAB, WORK )
+*> \brief \b CLANTB
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER K, LDAB, N
-* ..
-* .. Array Arguments ..
- REAL WORK( * )
- COMPLEX AB( LDAB, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION CLANTB( NORM, UPLO, DIAG, N, K, AB,
+* LDAB, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* CLANTB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n triangular band matrix A, with ( k + 1 ) diagonals.
-*
-* Description
-* ===========
-*
-* CLANTB returns the value
-*
-* CLANTB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANTB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n triangular band matrix A, with ( k + 1 ) diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> CLANTB returns the value
+*>
+*> CLANTB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANTB as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANTB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANTB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals of the matrix A if UPLO = 'L'.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first k+1 rows of AB. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> Note that when DIAG = 'U', the elements of the array AB
+*> corresponding to the diagonal elements of the matrix A are
+*> not referenced, but are assumed to be one.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+* Authors
+* =======
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANTB is
-* set to zero.
+*> \date November 2011
*
-* K (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals of the matrix A if UPLO = 'L'.
-* K >= 0.
+*> \ingroup complexOTHERauxiliary
*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first k+1 rows of AB. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-* Note that when DIAG = 'U', the elements of the array AB
-* corresponding to the diagonal elements of the matrix A are
-* not referenced, but are assumed to be one.
+* =====================================================================
+ REAL FUNCTION CLANTB( NORM, UPLO, DIAG, N, K, AB,
+ $ LDAB, WORK )
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+ REAL WORK( * )
+ COMPLEX AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clantp.f b/SRC/clantp.f
index 2926942e..5b94631c 100644
--- a/SRC/clantp.f
+++ b/SRC/clantp.f
@@ -1,78 +1,136 @@
- REAL FUNCTION CLANTP( NORM, UPLO, DIAG, N, AP, WORK )
+*> \brief \b CLANTP
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- REAL WORK( * )
- COMPLEX AP( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION CLANTP( NORM, UPLO, DIAG, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX AP( * )
+* ..
+*
* Purpose
* =======
*
-* CLANTP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* triangular matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* CLANTP returns the value
-*
-* CLANTP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANTP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> triangular matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> CLANTP returns the value
+*>
+*> CLANTP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANTP as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANTP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, CLANTP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> Note that when DIAG = 'U', the elements of the array AP
+*> corresponding to the diagonal elements of the matrix A are
+*> not referenced, but are assumed to be one.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \date November 2011
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \ingroup complexOTHERauxiliary
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, CLANTP is
-* set to zero.
+* =====================================================================
+ REAL FUNCTION CLANTP( NORM, UPLO, DIAG, N, AP, WORK )
*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* Note that when DIAG = 'U', the elements of the array AP
-* corresponding to the diagonal elements of the matrix A are
-* not referenced, but are assumed to be one.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ REAL WORK( * )
+ COMPLEX AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clantr.f b/SRC/clantr.f
index 6c225c13..1107182a 100644
--- a/SRC/clantr.f
+++ b/SRC/clantr.f
@@ -1,88 +1,153 @@
- REAL FUNCTION CLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
- $ WORK )
+*> \brief \b CLANTR
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL WORK( * )
- COMPLEX A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION CLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL WORK( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CLANTR returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* trapezoidal or triangular matrix A.
-*
-* Description
-* ===========
-*
-* CLANTR returns the value
-*
-* CLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLANTR returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> trapezoidal or triangular matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> CLANTR returns the value
+*>
+*> CLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in CLANTR as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in CLANTR as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower trapezoidal.
+*> = 'U': Upper trapezoidal
+*> = 'L': Lower trapezoidal
+*> Note that A is triangular instead of trapezoidal if M = N.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A has unit diagonal.
+*> = 'N': Non-unit diagonal
+*> = 'U': Unit diagonal
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0, and if
+*> UPLO = 'U', M <= N. When M = 0, CLANTR is set to zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0, and if
+*> UPLO = 'L', N <= M. When N = 0, CLANTR is set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The trapezoidal matrix A (A is triangular if M = N).
+*> If UPLO = 'U', the leading m by n upper trapezoidal part of
+*> the array A contains the upper trapezoidal matrix, and the
+*> strictly lower triangular part of A is not referenced.
+*> If UPLO = 'L', the leading m by n lower trapezoidal part of
+*> the array A contains the lower trapezoidal matrix, and the
+*> strictly upper triangular part of A is not referenced. Note
+*> that when DIAG = 'U', the diagonal elements of A are not
+*> referenced and are assumed to be one.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower trapezoidal.
-* = 'U': Upper trapezoidal
-* = 'L': Lower trapezoidal
-* Note that A is triangular instead of trapezoidal if M = N.
+* Authors
+* =======
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A has unit diagonal.
-* = 'N': Non-unit diagonal
-* = 'U': Unit diagonal
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0, and if
-* UPLO = 'U', M <= N. When M = 0, CLANTR is set to zero.
+*> \date November 2011
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0, and if
-* UPLO = 'L', N <= M. When N = 0, CLANTR is set to zero.
+*> \ingroup complexOTHERauxiliary
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The trapezoidal matrix A (A is triangular if M = N).
-* If UPLO = 'U', the leading m by n upper trapezoidal part of
-* the array A contains the upper trapezoidal matrix, and the
-* strictly lower triangular part of A is not referenced.
-* If UPLO = 'L', the leading m by n lower trapezoidal part of
-* the array A contains the lower trapezoidal matrix, and the
-* strictly upper triangular part of A is not referenced. Note
-* that when DIAG = 'U', the diagonal elements of A are not
-* referenced and are assumed to be one.
+* =====================================================================
+ REAL FUNCTION CLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+ $ WORK )
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL WORK( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clapll.f b/SRC/clapll.f
index 2095a27b..7be51af6 100644
--- a/SRC/clapll.f
+++ b/SRC/clapll.f
@@ -1,9 +1,101 @@
+*> \brief \b CLAPLL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAPLL( N, X, INCX, Y, INCY, SSMIN )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* REAL SSMIN
+* ..
+* .. Array Arguments ..
+* COMPLEX X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given two column vectors X and Y, let
+*>
+*> A = ( X Y ).
+*>
+*> The subroutine first computes the QR factorization of A = Q*R,
+*> and then computes the SVD of the 2-by-2 upper triangular matrix R.
+*> The smaller singular value of R is returned in SSMIN, which is used
+*> as the measurement of the linear dependency of the vectors X and Y.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vectors X and Y.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (1+(N-1)*INCX)
+*> On entry, X contains the N-vector X.
+*> On exit, X is overwritten.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (1+(N-1)*INCY)
+*> On entry, Y contains the N-vector Y.
+*> On exit, Y is overwritten.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between successive elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[out] SSMIN
+*> \verbatim
+*> SSMIN is REAL
+*> The smallest singular value of the N-by-2 matrix A = ( X Y ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAPLL( N, X, INCX, Y, INCY, SSMIN )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
@@ -13,41 +105,6 @@
COMPLEX X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* Given two column vectors X and Y, let
-*
-* A = ( X Y ).
-*
-* The subroutine first computes the QR factorization of A = Q*R,
-* and then computes the SVD of the 2-by-2 upper triangular matrix R.
-* The smaller singular value of R is returned in SSMIN, which is used
-* as the measurement of the linear dependency of the vectors X and Y.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The length of the vectors X and Y.
-*
-* X (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
-* On entry, X contains the N-vector X.
-* On exit, X is overwritten.
-*
-* INCX (input) INTEGER
-* The increment between successive elements of X. INCX > 0.
-*
-* Y (input/output) COMPLEX array, dimension (1+(N-1)*INCY)
-* On entry, Y contains the N-vector Y.
-* On exit, Y is overwritten.
-*
-* INCY (input) INTEGER
-* The increment between successive elements of Y. INCY > 0.
-*
-* SSMIN (output) REAL
-* The smallest singular value of the N-by-2 matrix A = ( X Y ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clapmr.f b/SRC/clapmr.f
index 35b0404c..0a9e5473 100644
--- a/SRC/clapmr.f
+++ b/SRC/clapmr.f
@@ -1,14 +1,105 @@
+*> \brief \b CLAPMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAPMR( FORWRD, M, N, X, LDX, K )
+*
+* .. Scalar Arguments ..
+* LOGICAL FORWRD
+* INTEGER LDX, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER K( * )
+* COMPLEX X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAPMR rearranges the rows of the M by N matrix X as specified
+*> by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
+*> If FORWRD = .TRUE., forward permutation:
+*>
+*> X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
+*>
+*> If FORWRD = .FALSE., backward permutation:
+*>
+*> X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FORWRD
+*> \verbatim
+*> FORWRD is LOGICAL
+*> = .TRUE., forward permutation
+*> = .FALSE., backward permutation
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,N)
+*> On entry, the M by N matrix X.
+*> On exit, X contains the permuted matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X, LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] K
+*> \verbatim
+*> K is INTEGER array, dimension (M)
+*> On entry, K contains the permutation vector. K is used as
+*> internal workspace, but reset to its original value on
+*> output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAPMR( FORWRD, M, N, X, LDX, K )
- IMPLICIT NONE
*
-* Originally CLAPMT
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Adapted to CLAPMR
-* July 2010
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL FORWRD
@@ -19,44 +110,6 @@
COMPLEX X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAPMR rearranges the rows of the M by N matrix X as specified
-* by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
-* If FORWRD = .TRUE., forward permutation:
-*
-* X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
-*
-* If FORWRD = .FALSE., backward permutation:
-*
-* X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
-*
-* Arguments
-* =========
-*
-* FORWRD (input) LOGICAL
-* = .TRUE., forward permutation
-* = .FALSE., backward permutation
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix X. N >= 0.
-*
-* X (input/output) COMPLEX array, dimension (LDX,N)
-* On entry, the M by N matrix X.
-* On exit, X contains the permuted matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X, LDX >= MAX(1,M).
-*
-* K (input/output) INTEGER array, dimension (M)
-* On entry, K contains the permutation vector. K is used as
-* internal workspace, but reset to its original value on
-* output.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/clapmt.f b/SRC/clapmt.f
index ff3acd4c..598acbae 100644
--- a/SRC/clapmt.f
+++ b/SRC/clapmt.f
@@ -1,9 +1,105 @@
+*> \brief \b CLAPMT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAPMT( FORWRD, M, N, X, LDX, K )
+*
+* .. Scalar Arguments ..
+* LOGICAL FORWRD
+* INTEGER LDX, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER K( * )
+* COMPLEX X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAPMT rearranges the columns of the M by N matrix X as specified
+*> by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
+*> If FORWRD = .TRUE., forward permutation:
+*>
+*> X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
+*>
+*> If FORWRD = .FALSE., backward permutation:
+*>
+*> X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FORWRD
+*> \verbatim
+*> FORWRD is LOGICAL
+*> = .TRUE., forward permutation
+*> = .FALSE., backward permutation
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,N)
+*> On entry, the M by N matrix X.
+*> On exit, X contains the permuted matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X, LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] K
+*> \verbatim
+*> K is INTEGER array, dimension (N)
+*> On entry, K contains the permutation vector. K is used as
+*> internal workspace, but reset to its original value on
+*> output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAPMT( FORWRD, M, N, X, LDX, K )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL FORWRD
@@ -14,44 +110,6 @@
COMPLEX X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAPMT rearranges the columns of the M by N matrix X as specified
-* by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
-* If FORWRD = .TRUE., forward permutation:
-*
-* X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
-*
-* If FORWRD = .FALSE., backward permutation:
-*
-* X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
-*
-* Arguments
-* =========
-*
-* FORWRD (input) LOGICAL
-* = .TRUE., forward permutation
-* = .FALSE., backward permutation
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix X. N >= 0.
-*
-* X (input/output) COMPLEX array, dimension (LDX,N)
-* On entry, the M by N matrix X.
-* On exit, X contains the permuted matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X, LDX >= MAX(1,M).
-*
-* K (input/output) INTEGER array, dimension (N)
-* On entry, K contains the permutation vector. K is used as
-* internal workspace, but reset to its original value on
-* output.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/claqgb.f b/SRC/claqgb.f
index 23b915b4..049768b5 100644
--- a/SRC/claqgb.f
+++ b/SRC/claqgb.f
@@ -1,10 +1,163 @@
+*> \brief \b CLAQGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED
+* INTEGER KL, KU, LDAB, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL C( * ), R( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQGB equilibrates a general M by N band matrix A with KL
+*> subdiagonals and KU superdiagonals using the row and scaling factors
+*> in the vectors R and C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix, in the same storage format
+*> as A. See EQUED for the form of the equilibrated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDA >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> The row scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> Ratio of the smallest R(i) to the largest R(i).
+*> \endverbatim
+*>
+*> \param[in] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> Ratio of the smallest C(i) to the largest C(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if row or column scaling
+*> should be done based on the ratio of the row or column scaling
+*> factors. If ROWCND < THRESH, row scaling is done, and if
+*> COLCND < THRESH, column scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if row scaling
+*> should be done based on the absolute size of the largest matrix
+*> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBauxiliary
+*
+* =====================================================================
SUBROUTINE CLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
$ AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED
@@ -16,77 +169,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQGB equilibrates a general M by N band matrix A with KL
-* subdiagonals and KU superdiagonals using the row and scaling factors
-* in the vectors R and C.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
-*
-* On exit, the equilibrated matrix, in the same storage format
-* as A. See EQUED for the form of the equilibrated matrix.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDA >= KL+KU+1.
-*
-* R (input) REAL array, dimension (M)
-* The row scale factors for A.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A.
-*
-* ROWCND (input) REAL
-* Ratio of the smallest R(i) to the largest R(i).
-*
-* COLCND (input) REAL
-* Ratio of the smallest C(i) to the largest C(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if row or column scaling
-* should be done based on the ratio of the row or column scaling
-* factors. If ROWCND < THRESH, row scaling is done, and if
-* COLCND < THRESH, column scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if row scaling
-* should be done based on the absolute size of the largest matrix
-* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqge.f b/SRC/claqge.f
index 7309d6e6..04ad25f1 100644
--- a/SRC/claqge.f
+++ b/SRC/claqge.f
@@ -1,10 +1,145 @@
+*> \brief \b CLAQGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED
+* INTEGER LDA, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL C( * ), R( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQGE equilibrates a general M by N matrix A using the row and
+*> column scaling factors in the vectors R and C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M by N matrix A.
+*> On exit, the equilibrated matrix. See EQUED for the form of
+*> the equilibrated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> The row scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> Ratio of the smallest R(i) to the largest R(i).
+*> \endverbatim
+*>
+*> \param[in] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> Ratio of the smallest C(i) to the largest C(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if row or column scaling
+*> should be done based on the ratio of the row or column scaling
+*> factors. If ROWCND < THRESH, row scaling is done, and if
+*> COLCND < THRESH, column scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if row scaling
+*> should be done based on the absolute size of the largest matrix
+*> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEauxiliary
+*
+* =====================================================================
SUBROUTINE CLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
$ EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED
@@ -16,66 +151,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQGE equilibrates a general M by N matrix A using the row and
-* column scaling factors in the vectors R and C.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M by N matrix A.
-* On exit, the equilibrated matrix. See EQUED for the form of
-* the equilibrated matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
-*
-* R (input) REAL array, dimension (M)
-* The row scale factors for A.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A.
-*
-* ROWCND (input) REAL
-* Ratio of the smallest R(i) to the largest R(i).
-*
-* COLCND (input) REAL
-* Ratio of the smallest C(i) to the largest C(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if row or column scaling
-* should be done based on the ratio of the row or column scaling
-* factors. If ROWCND < THRESH, row scaling is done, and if
-* COLCND < THRESH, column scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if row scaling
-* should be done based on the absolute size of the largest matrix
-* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqhb.f b/SRC/claqhb.f
index f1696d2c..ab0449bb 100644
--- a/SRC/claqhb.f
+++ b/SRC/claqhb.f
@@ -1,9 +1,144 @@
+*> \brief \b CLAQHB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQHB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER KD, LDAB, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQHB equilibrates an Hermitian band matrix A using the scaling
+*> factors in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H *U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAQHB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,69 +150,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQHB equilibrates an Hermitian band matrix A using the scaling
-* factors in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H *U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* S (output) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqhe.f b/SRC/claqhe.f
index 089ed9f0..aab30380 100644
--- a/SRC/claqhe.f
+++ b/SRC/claqhe.f
@@ -1,9 +1,137 @@
+*> \brief \b CLAQHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQHE( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER LDA, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQHE equilibrates a Hermitian matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED = 'Y', the equilibrated matrix:
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexHEauxiliary
+*
+* =====================================================================
SUBROUTINE CLAQHE( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,65 +143,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQHE equilibrates a Hermitian matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if EQUED = 'Y', the equilibrated matrix:
-* diag(S) * A * diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* S (input) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqhp.f b/SRC/claqhp.f
index 045d8be8..36ca37ab 100644
--- a/SRC/claqhp.f
+++ b/SRC/claqhp.f
@@ -1,9 +1,129 @@
+*> \brief \b CLAQHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQHP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQHP equilibrates a Hermitian matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix: diag(S) * A * diag(S), in
+*> the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAQHP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,60 +135,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQHP equilibrates a Hermitian matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the equilibrated matrix: diag(S) * A * diag(S), in
-* the same storage format as A.
-*
-* S (input) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqp2.f b/SRC/claqp2.f
index da2e7722..d60abcfc 100644
--- a/SRC/claqp2.f
+++ b/SRC/claqp2.f
@@ -1,82 +1,158 @@
- SUBROUTINE CLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
- $ WORK )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER LDA, M, N, OFFSET
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL VN1( * ), VN2( * )
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CLAQP2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+* WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, M, N, OFFSET
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL VN1( * ), VN2( * )
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLAQP2 computes a QR factorization with column pivoting of
-* the block A(OFFSET+1:M,1:N).
-* The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQP2 computes a QR factorization with column pivoting of
+*> the block A(OFFSET+1:M,1:N).
+*> The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* OFFSET (input) INTEGER
-* The number of rows of the matrix A that must be pivoted
-* but no factorized. OFFSET >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
-* the triangular factor obtained; the elements in block
-* A(OFFSET+1:M,1:N) below the diagonal, together with the
-* array TAU, represent the orthogonal matrix Q as a product of
-* elementary reflectors. Block A(1:OFFSET,1:N) has been
-* accordingly pivoted, but no factorized.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(i) = 0,
-* the i-th column of A is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> The number of rows of the matrix A that must be pivoted
+*> but no factorized. OFFSET >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
+*> the triangular factor obtained; the elements in block
+*> A(OFFSET+1:M,1:N) below the diagonal, together with the
+*> array TAU, represent the orthogonal matrix Q as a product of
+*> elementary reflectors. Block A(1:OFFSET,1:N) has been
+*> accordingly pivoted, but no factorized.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(i) = 0,
+*> the i-th column of A is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*> VN1 is REAL array, dimension (N)
+*> The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*> VN2 is REAL array, dimension (N)
+*> The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* VN1 (input/output) REAL array, dimension (N)
-* The vector with the partial column norms.
+*> \date November 2011
*
-* VN2 (input/output) REAL array, dimension (N)
-* The vector with the exact column norms.
+*> \ingroup complexOTHERauxiliary
*
-* WORK (workspace) COMPLEX array, dimension (N)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+ $ WORK )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* .. Scalar Arguments ..
+ INTEGER LDA, M, N, OFFSET
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL VN1( * ), VN2( * )
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqps.f b/SRC/claqps.f
index d6e08d1b..ec0e3109 100644
--- a/SRC/claqps.f
+++ b/SRC/claqps.f
@@ -1,98 +1,186 @@
- SUBROUTINE CLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
- $ VN2, AUXV, F, LDF )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER KB, LDA, LDF, M, N, NB, OFFSET
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL VN1( * ), VN2( * )
- COMPLEX A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
-* ..
-*
+*> \brief \b CLAQPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+* VN2, AUXV, F, LDF )
+*
+* .. Scalar Arguments ..
+* INTEGER KB, LDA, LDF, M, N, NB, OFFSET
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL VN1( * ), VN2( * )
+* COMPLEX A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* CLAQPS computes a step of QR factorization with column pivoting
-* of a complex M-by-N matrix A by using Blas-3. It tries to factorize
-* NB columns from A starting from the row OFFSET+1, and updates all
-* of the matrix with Blas-3 xGEMM.
-*
-* In some cases, due to catastrophic cancellations, it cannot
-* factorize NB columns. Hence, the actual number of factorized
-* columns is returned in KB.
-*
-* Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQPS computes a step of QR factorization with column pivoting
+*> of a complex M-by-N matrix A by using Blas-3. It tries to factorize
+*> NB columns from A starting from the row OFFSET+1, and updates all
+*> of the matrix with Blas-3 xGEMM.
+*>
+*> In some cases, due to catastrophic cancellations, it cannot
+*> factorize NB columns. Hence, the actual number of factorized
+*> columns is returned in KB.
+*>
+*> Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0
-*
-* OFFSET (input) INTEGER
-* The number of rows of A that have been factorized in
-* previous steps.
-*
-* NB (input) INTEGER
-* The number of columns to factorize.
-*
-* KB (output) INTEGER
-* The number of columns actually factorized.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, block A(OFFSET+1:M,1:KB) is the triangular
-* factor obtained and block A(1:OFFSET,1:N) has been
-* accordingly pivoted, but no factorized.
-* The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
-* been updated.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* JPVT(I) = K <==> Column K of the full matrix A has been
-* permuted into position I in AP.
-*
-* TAU (output) COMPLEX array, dimension (KB)
-* The scalar factors of the elementary reflectors.
-*
-* VN1 (input/output) REAL array, dimension (N)
-* The vector with the partial column norms.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> The number of rows of A that have been factorized in
+*> previous steps.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to factorize.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns actually factorized.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, block A(OFFSET+1:M,1:KB) is the triangular
+*> factor obtained and block A(1:OFFSET,1:N) has been
+*> accordingly pivoted, but no factorized.
+*> The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
+*> been updated.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> JPVT(I) = K <==> Column K of the full matrix A has been
+*> permuted into position I in AP.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (KB)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*> VN1 is REAL array, dimension (N)
+*> The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*> VN2 is REAL array, dimension (N)
+*> The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[in,out] AUXV
+*> \verbatim
+*> AUXV is COMPLEX array, dimension (NB)
+*> Auxiliar vector.
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is COMPLEX array, dimension (LDF,NB)
+*> Matrix F**H = L * Y**H * A.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the array F. LDF >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* VN2 (input/output) REAL array, dimension (N)
-* The vector with the exact column norms.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AUXV (input/output) COMPLEX array, dimension (NB)
-* Auxiliar vector.
+*> \date November 2011
*
-* F (input/output) COMPLEX array, dimension (LDF,NB)
-* Matrix F**H = L * Y**H * A.
+*> \ingroup complexOTHERauxiliary
*
-* LDF (input) INTEGER
-* The leading dimension of the array F. LDF >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+ $ VN2, AUXV, F, LDF )
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER KB, LDA, LDF, M, N, NB, OFFSET
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL VN1( * ), VN2( * )
+ COMPLEX A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
+* ..
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqr0.f b/SRC/claqr0.f
index 0d09d548..fa7ca84b 100644
--- a/SRC/claqr0.f
+++ b/SRC/claqr0.f
@@ -1,156 +1,250 @@
- SUBROUTINE CLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
- $ IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*> \brief \b CLAQR0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+* IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQR0 computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**H, where T is an upper triangular matrix (the
+*> Schur form), and Z is the unitary matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input unitary
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
- LOGICAL WANTT, WANTZ
-* ..
-* .. Array Arguments ..
- COMPLEX H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*> H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*> previous call to CGEBAL, and then passed to CGEHRD when the
+*> matrix output by CGEBAL is reduced to Hessenberg form.
+*> Otherwise, ILO and IHI should be set to 1 and N,
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and WANTT is .TRUE., then H
+*> contains the upper triangular matrix T from the Schur
+*> decomposition (the Schur form). If INFO = 0 and WANT is
+*> .FALSE., then the contents of H are unspecified on exit.
+*> (The output value of H when INFO.GT.0 is given under the
+*> description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*> j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
+*> in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
+*> stored in the same order as on the diagonal of the Schur
+*> form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,IHI)
+*> If WANTZ is .FALSE., then Z is not referenced.
+*> If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*> replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*> orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*> (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if WANTZ is .TRUE.
+*> then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension LWORK
+*> On exit, if LWORK = -1, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient, but LWORK typically as large as 6*N may
+*> be required for optimal performance. A workspace query
+*> to determine the optimal workspace size is recommended.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then CLAQR0 does a workspace query.
+*> In this case, CLAQR0 checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, CLAQR0 failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is a unitary matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*> = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the unitary matrix in (*) (regard-
+*> less of the value of WANTT.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* CLAQR0 computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**H, where T is an upper triangular matrix (the
-* Schur form), and Z is the unitary matrix of Schur vectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Optionally Z may be postmultiplied into an input unitary
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup complexOTHERauxiliary
*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-* previous call to CGEBAL, and then passed to CGEHRD when the
-* matrix output by CGEBAL is reduced to Hessenberg form.
-* Otherwise, ILO and IHI should be set to 1 and N,
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) COMPLEX array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and WANTT is .TRUE., then H
-* contains the upper triangular matrix T from the Schur
-* decomposition (the Schur form). If INFO = 0 and WANT is
-* .FALSE., then the contents of H are unspecified on exit.
-* (The output value of H when INFO.GT.0 is given under the
-* description of INFO below.)
-*
-* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* W (output) COMPLEX array, dimension (N)
-* The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
-* in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
-* stored in the same order as on the diagonal of the Schur
-* form returned in H, with W(i) = H(i,i).
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,IHI)
-* If WANTZ is .FALSE., then Z is not referenced.
-* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-* orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-* (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if WANTZ is .TRUE.
-* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) COMPLEX array, dimension LWORK
-* On exit, if LWORK = -1, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient, but LWORK typically as large as 6*N may
-* be required for optimal performance. A workspace query
-* to determine the optimal workspace size is recommended.
-*
-* If LWORK = -1, then CLAQR0 does a workspace query.
-* In this case, CLAQR0 checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, CLAQR0 failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and WANT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is a unitary matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*
-* (final value of Z(ILO:IHI,ILOZ:IHIZ)
-* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
-*
-* where U is the unitary matrix in (*) (regard-
-* less of the value of WANTT.)
-*
-* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-* accessed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> References:
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*> Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*> 929--947, 2002.
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*> of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+ $ IHIZ, Z, LDZ, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* References:
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-* Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-* 929--947, 2002.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-* of Matrix Analysis, volume 23, pages 948--973, 2002.
+* .. Scalar Arguments ..
+ INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+ LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+ COMPLEX H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
*
* ================================================================
* .. Parameters ..
diff --git a/SRC/claqr1.f b/SRC/claqr1.f
index a9224b78..dab88ddb 100644
--- a/SRC/claqr1.f
+++ b/SRC/claqr1.f
@@ -1,57 +1,118 @@
- SUBROUTINE CLAQR1( N, H, LDH, S1, S2, V )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- COMPLEX S1, S2
- INTEGER LDH, N
-* ..
-* .. Array Arguments ..
- COMPLEX H( LDH, * ), V( * )
-* ..
-*
+*> \brief \b CLAQR1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQR1( N, H, LDH, S1, S2, V )
+*
+* .. Scalar Arguments ..
+* COMPLEX S1, S2
+* INTEGER LDH, N
+* ..
+* .. Array Arguments ..
+* COMPLEX H( LDH, * ), V( * )
+* ..
+*
* Purpose
* =======
*
-* Given a 2-by-2 or 3-by-3 matrix H, CLAQR1 sets v to a
-* scalar multiple of the first column of the product
-*
-* (*) K = (H - s1*I)*(H - s2*I)
-*
-* scaling to avoid overflows and most underflows.
-*
-* This is useful for starting double implicit shift bulges
-* in the QR algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given a 2-by-2 or 3-by-3 matrix H, CLAQR1 sets v to a
+*> scalar multiple of the first column of the product
+*>
+*> (*) K = (H - s1*I)*(H - s2*I)
+*>
+*> scaling to avoid overflows and most underflows.
+*>
+*> This is useful for starting double implicit shift bulges
+*> in the QR algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) integer
-* Order of the matrix H. N must be either 2 or 3.
-*
-* H (input) COMPLEX array of dimension (LDH,N)
-* The 2-by-2 or 3-by-3 matrix H in (*).
+*> \param[in] N
+*> \verbatim
+*> N is integer
+*> Order of the matrix H. N must be either 2 or 3.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is COMPLEX array of dimension (LDH,N)
+*> The 2-by-2 or 3-by-3 matrix H in (*).
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> The leading dimension of H as declared in
+*> the calling procedure. LDH.GE.N
+*> \endverbatim
+*>
+*> \param[in] S1
+*> \verbatim
+*> S1 is COMPLEX
+*> \endverbatim
+*> \verbatim
+*> S2 S1 and S2 are the shifts defining K in (*) above.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array of dimension N
+*> A scalar multiple of the first column of the
+*> matrix K in (*).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDH (input) integer
-* The leading dimension of H as declared in
-* the calling procedure. LDH.GE.N
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S1 (input) COMPLEX
+*> \date November 2011
*
-* S2 S1 and S2 are the shifts defining K in (*) above.
+*> \ingroup complexOTHERauxiliary
*
-* V (output) COMPLEX array of dimension N
-* A scalar multiple of the first column of the
-* matrix K in (*).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLAQR1( N, H, LDH, S1, S2, V )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX S1, S2
+ INTEGER LDH, N
+* ..
+* .. Array Arguments ..
+ COMPLEX H( LDH, * ), V( * )
+* ..
*
* ================================================================
*
diff --git a/SRC/claqr2.f b/SRC/claqr2.f
index d7d27e09..e4f65d75 100644
--- a/SRC/claqr2.f
+++ b/SRC/claqr2.f
@@ -1,10 +1,277 @@
+*> \brief \b CLAQR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+* IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
+* NV, WV, LDWV, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+* $ LDZ, LWORK, N, ND, NH, NS, NV, NW
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( * ), WV( LDWV, * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQR2 is identical to CLAQR3 except that it avoids
+*> recursion by calling CLAHQR instead of CLAQR4.
+*>
+*> Aggressive early deflation:
+*>
+*> This subroutine accepts as input an upper Hessenberg matrix
+*> H and performs an unitary similarity transformation
+*> designed to detect and deflate fully converged eigenvalues from
+*> a trailing principal submatrix. On output H has been over-
+*> written by a new Hessenberg matrix that is a perturbation of
+*> an unitary similarity transformation of H. It is to be
+*> hoped that the final version of H has many zero subdiagonal
+*> entries.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> If .TRUE., then the Hessenberg matrix H is fully updated
+*> so that the triangular Schur factor may be
+*> computed (in cooperation with the calling subroutine).
+*> If .FALSE., then only enough of H is updated to preserve
+*> the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> If .TRUE., then the unitary matrix Z is updated so
+*> so that the unitary Schur factor may be computed
+*> (in cooperation with the calling subroutine).
+*> If .FALSE., then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H and (if WANTZ is .TRUE.) the
+*> order of the unitary matrix Z.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is INTEGER
+*> It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*> KBOT and KTOP together determine an isolated block
+*> along the diagonal of the Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is INTEGER
+*> It is assumed without a check that either
+*> KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
+*> determine an isolated block along the diagonal of the
+*> Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> On input the initial N-by-N section of H stores the
+*> Hessenberg matrix undergoing aggressive early deflation.
+*> On output H has been transformed by a unitary
+*> similarity transformation, perturbed, and the returned
+*> to Hessenberg form that (it is to be hoped) has some
+*> zero subdiagonal entries.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> Leading dimension of H just as declared in the calling
+*> subroutine. N .LE. LDH
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,N)
+*> IF WANTZ is .TRUE., then on output, the unitary
+*> similarity transformation mentioned above has been
+*> accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer
+*> The leading dimension of Z just as declared in the
+*> calling subroutine. 1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*> NS is integer
+*> The number of unconverged (ie approximate) eigenvalues
+*> returned in SR and SI that may be used as shifts by the
+*> calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is integer
+*> The number of converged eigenvalues uncovered by this
+*> subroutine.
+*> \endverbatim
+*>
+*> \param[out] SH
+*> \verbatim
+*> SH is COMPLEX array, dimension KBOT
+*> On output, approximate eigenvalues that may
+*> be used for shifts are stored in SH(KBOT-ND-NS+1)
+*> through SR(KBOT-ND). Converged eigenvalues are
+*> stored in SH(KBOT-ND+1) through SH(KBOT).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,NW)
+*> An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> The leading dimension of V just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> The number of columns of T. NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is integer
+*> The leading dimension of T just as declared in the
+*> calling subroutine. NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer
+*> The number of rows of work array WV available for
+*> workspace. NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is COMPLEX array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer
+*> The leading dimension of W just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension LWORK.
+*> On exit, WORK(1) is set to an estimate of the optimal value
+*> of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer
+*> The dimension of the work array WORK. LWORK = 2*NW
+*> suffices, but greater efficiency may result from larger
+*> values of LWORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; CLAQR2
+*> only estimates the optimal workspace size for the given
+*> values of N, NW, KTOP and KBOT. The estimate is returned
+*> in WORK(1). No error message related to LWORK is issued
+*> by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
$ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
$ NV, WV, LDWV, WORK, LWORK )
*
-* -- LAPACK auxiliary routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- April 2009 --
+* -- LAPACK auxiliary routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -16,148 +283,6 @@
$ WORK( * ), WV( LDWV, * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQR2 is identical to CLAQR3 except that it avoids
-* recursion by calling CLAHQR instead of CLAQR4.
-*
-* Aggressive early deflation:
-*
-* This subroutine accepts as input an upper Hessenberg matrix
-* H and performs an unitary similarity transformation
-* designed to detect and deflate fully converged eigenvalues from
-* a trailing principal submatrix. On output H has been over-
-* written by a new Hessenberg matrix that is a perturbation of
-* an unitary similarity transformation of H. It is to be
-* hoped that the final version of H has many zero subdiagonal
-* entries.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* If .TRUE., then the Hessenberg matrix H is fully updated
-* so that the triangular Schur factor may be
-* computed (in cooperation with the calling subroutine).
-* If .FALSE., then only enough of H is updated to preserve
-* the eigenvalues.
-*
-* WANTZ (input) LOGICAL
-* If .TRUE., then the unitary matrix Z is updated so
-* so that the unitary Schur factor may be computed
-* (in cooperation with the calling subroutine).
-* If .FALSE., then Z is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix H and (if WANTZ is .TRUE.) the
-* order of the unitary matrix Z.
-*
-* KTOP (input) INTEGER
-* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-* KBOT and KTOP together determine an isolated block
-* along the diagonal of the Hessenberg matrix.
-*
-* KBOT (input) INTEGER
-* It is assumed without a check that either
-* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
-* determine an isolated block along the diagonal of the
-* Hessenberg matrix.
-*
-* NW (input) INTEGER
-* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
-*
-* H (input/output) COMPLEX array, dimension (LDH,N)
-* On input the initial N-by-N section of H stores the
-* Hessenberg matrix undergoing aggressive early deflation.
-* On output H has been transformed by a unitary
-* similarity transformation, perturbed, and the returned
-* to Hessenberg form that (it is to be hoped) has some
-* zero subdiagonal entries.
-*
-* LDH (input) integer
-* Leading dimension of H just as declared in the calling
-* subroutine. N .LE. LDH
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,N)
-* IF WANTZ is .TRUE., then on output, the unitary
-* similarity transformation mentioned above has been
-* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ is .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer
-* The leading dimension of Z just as declared in the
-* calling subroutine. 1 .LE. LDZ.
-*
-* NS (output) integer
-* The number of unconverged (ie approximate) eigenvalues
-* returned in SR and SI that may be used as shifts by the
-* calling subroutine.
-*
-* ND (output) integer
-* The number of converged eigenvalues uncovered by this
-* subroutine.
-*
-* SH (output) COMPLEX array, dimension KBOT
-* On output, approximate eigenvalues that may
-* be used for shifts are stored in SH(KBOT-ND-NS+1)
-* through SR(KBOT-ND). Converged eigenvalues are
-* stored in SH(KBOT-ND+1) through SH(KBOT).
-*
-* V (workspace) COMPLEX array, dimension (LDV,NW)
-* An NW-by-NW work array.
-*
-* LDV (input) integer scalar
-* The leading dimension of V just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* NH (input) integer scalar
-* The number of columns of T. NH.GE.NW.
-*
-* T (workspace) COMPLEX array, dimension (LDT,NW)
-*
-* LDT (input) integer
-* The leading dimension of T just as declared in the
-* calling subroutine. NW .LE. LDT
-*
-* NV (input) integer
-* The number of rows of work array WV available for
-* workspace. NV.GE.NW.
-*
-* WV (workspace) COMPLEX array, dimension (LDWV,NW)
-*
-* LDWV (input) integer
-* The leading dimension of W just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* WORK (workspace) COMPLEX array, dimension LWORK.
-* On exit, WORK(1) is set to an estimate of the optimal value
-* of LWORK for the given values of N, NW, KTOP and KBOT.
-*
-* LWORK (input) integer
-* The dimension of the work array WORK. LWORK = 2*NW
-* suffices, but greater efficiency may result from larger
-* values of LWORK.
-*
-* If LWORK = -1, then a workspace query is assumed; CLAQR2
-* only estimates the optimal workspace size for the given
-* values of N, NW, KTOP and KBOT. The estimate is returned
-* in WORK(1). No error message related to LWORK is issued
-* by XERBLA. Neither H nor Z are accessed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
* ================================================================
*
* .. Parameters ..
diff --git a/SRC/claqr3.f b/SRC/claqr3.f
index 9412bbd6..06150ce2 100644
--- a/SRC/claqr3.f
+++ b/SRC/claqr3.f
@@ -1,10 +1,274 @@
+*> \brief \b CLAQR3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+* IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
+* NV, WV, LDWV, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+* $ LDZ, LWORK, N, ND, NH, NS, NV, NW
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( * ), WV( LDWV, * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Aggressive early deflation:
+*>
+*> CLAQR3 accepts as input an upper Hessenberg matrix
+*> H and performs an unitary similarity transformation
+*> designed to detect and deflate fully converged eigenvalues from
+*> a trailing principal submatrix. On output H has been over-
+*> written by a new Hessenberg matrix that is a perturbation of
+*> an unitary similarity transformation of H. It is to be
+*> hoped that the final version of H has many zero subdiagonal
+*> entries.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> If .TRUE., then the Hessenberg matrix H is fully updated
+*> so that the triangular Schur factor may be
+*> computed (in cooperation with the calling subroutine).
+*> If .FALSE., then only enough of H is updated to preserve
+*> the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> If .TRUE., then the unitary matrix Z is updated so
+*> so that the unitary Schur factor may be computed
+*> (in cooperation with the calling subroutine).
+*> If .FALSE., then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H and (if WANTZ is .TRUE.) the
+*> order of the unitary matrix Z.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is INTEGER
+*> It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*> KBOT and KTOP together determine an isolated block
+*> along the diagonal of the Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is INTEGER
+*> It is assumed without a check that either
+*> KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
+*> determine an isolated block along the diagonal of the
+*> Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> On input the initial N-by-N section of H stores the
+*> Hessenberg matrix undergoing aggressive early deflation.
+*> On output H has been transformed by a unitary
+*> similarity transformation, perturbed, and the returned
+*> to Hessenberg form that (it is to be hoped) has some
+*> zero subdiagonal entries.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> Leading dimension of H just as declared in the calling
+*> subroutine. N .LE. LDH
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,N)
+*> IF WANTZ is .TRUE., then on output, the unitary
+*> similarity transformation mentioned above has been
+*> accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer
+*> The leading dimension of Z just as declared in the
+*> calling subroutine. 1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*> NS is integer
+*> The number of unconverged (ie approximate) eigenvalues
+*> returned in SR and SI that may be used as shifts by the
+*> calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is integer
+*> The number of converged eigenvalues uncovered by this
+*> subroutine.
+*> \endverbatim
+*>
+*> \param[out] SH
+*> \verbatim
+*> SH is COMPLEX array, dimension KBOT
+*> On output, approximate eigenvalues that may
+*> be used for shifts are stored in SH(KBOT-ND-NS+1)
+*> through SR(KBOT-ND). Converged eigenvalues are
+*> stored in SH(KBOT-ND+1) through SH(KBOT).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,NW)
+*> An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> The leading dimension of V just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> The number of columns of T. NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is integer
+*> The leading dimension of T just as declared in the
+*> calling subroutine. NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer
+*> The number of rows of work array WV available for
+*> workspace. NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is COMPLEX array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer
+*> The leading dimension of W just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension LWORK.
+*> On exit, WORK(1) is set to an estimate of the optimal value
+*> of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer
+*> The dimension of the work array WORK. LWORK = 2*NW
+*> suffices, but greater efficiency may result from larger
+*> values of LWORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; CLAQR3
+*> only estimates the optimal workspace size for the given
+*> values of N, NW, KTOP and KBOT. The estimate is returned
+*> in WORK(1). No error message related to LWORK is issued
+*> by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
$ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
$ NV, WV, LDWV, WORK, LWORK )
*
-* -- LAPACK auxiliary routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- April 2009 --
+* -- LAPACK auxiliary routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -16,145 +280,6 @@
$ WORK( * ), WV( LDWV, * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* Aggressive early deflation:
-*
-* CLAQR3 accepts as input an upper Hessenberg matrix
-* H and performs an unitary similarity transformation
-* designed to detect and deflate fully converged eigenvalues from
-* a trailing principal submatrix. On output H has been over-
-* written by a new Hessenberg matrix that is a perturbation of
-* an unitary similarity transformation of H. It is to be
-* hoped that the final version of H has many zero subdiagonal
-* entries.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* If .TRUE., then the Hessenberg matrix H is fully updated
-* so that the triangular Schur factor may be
-* computed (in cooperation with the calling subroutine).
-* If .FALSE., then only enough of H is updated to preserve
-* the eigenvalues.
-*
-* WANTZ (input) LOGICAL
-* If .TRUE., then the unitary matrix Z is updated so
-* so that the unitary Schur factor may be computed
-* (in cooperation with the calling subroutine).
-* If .FALSE., then Z is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix H and (if WANTZ is .TRUE.) the
-* order of the unitary matrix Z.
-*
-* KTOP (input) INTEGER
-* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-* KBOT and KTOP together determine an isolated block
-* along the diagonal of the Hessenberg matrix.
-*
-* KBOT (input) INTEGER
-* It is assumed without a check that either
-* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
-* determine an isolated block along the diagonal of the
-* Hessenberg matrix.
-*
-* NW (input) INTEGER
-* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
-*
-* H (input/output) COMPLEX array, dimension (LDH,N)
-* On input the initial N-by-N section of H stores the
-* Hessenberg matrix undergoing aggressive early deflation.
-* On output H has been transformed by a unitary
-* similarity transformation, perturbed, and the returned
-* to Hessenberg form that (it is to be hoped) has some
-* zero subdiagonal entries.
-*
-* LDH (input) integer
-* Leading dimension of H just as declared in the calling
-* subroutine. N .LE. LDH
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,N)
-* IF WANTZ is .TRUE., then on output, the unitary
-* similarity transformation mentioned above has been
-* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ is .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer
-* The leading dimension of Z just as declared in the
-* calling subroutine. 1 .LE. LDZ.
-*
-* NS (output) integer
-* The number of unconverged (ie approximate) eigenvalues
-* returned in SR and SI that may be used as shifts by the
-* calling subroutine.
-*
-* ND (output) integer
-* The number of converged eigenvalues uncovered by this
-* subroutine.
-*
-* SH (output) COMPLEX array, dimension KBOT
-* On output, approximate eigenvalues that may
-* be used for shifts are stored in SH(KBOT-ND-NS+1)
-* through SR(KBOT-ND). Converged eigenvalues are
-* stored in SH(KBOT-ND+1) through SH(KBOT).
-*
-* V (workspace) COMPLEX array, dimension (LDV,NW)
-* An NW-by-NW work array.
-*
-* LDV (input) integer scalar
-* The leading dimension of V just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* NH (input) integer scalar
-* The number of columns of T. NH.GE.NW.
-*
-* T (workspace) COMPLEX array, dimension (LDT,NW)
-*
-* LDT (input) integer
-* The leading dimension of T just as declared in the
-* calling subroutine. NW .LE. LDT
-*
-* NV (input) integer
-* The number of rows of work array WV available for
-* workspace. NV.GE.NW.
-*
-* WV (workspace) COMPLEX array, dimension (LDWV,NW)
-*
-* LDWV (input) integer
-* The leading dimension of W just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* WORK (workspace) COMPLEX array, dimension LWORK.
-* On exit, WORK(1) is set to an estimate of the optimal value
-* of LWORK for the given values of N, NW, KTOP and KBOT.
-*
-* LWORK (input) integer
-* The dimension of the work array WORK. LWORK = 2*NW
-* suffices, but greater efficiency may result from larger
-* values of LWORK.
-*
-* If LWORK = -1, then a workspace query is assumed; CLAQR3
-* only estimates the optimal workspace size for the given
-* values of N, NW, KTOP and KBOT. The estimate is returned
-* in WORK(1). No error message related to LWORK is issued
-* by XERBLA. Neither H nor Z are accessed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
* ================================================================
*
* .. Parameters ..
diff --git a/SRC/claqr4.f b/SRC/claqr4.f
index 091be868..7ee1d08c 100644
--- a/SRC/claqr4.f
+++ b/SRC/claqr4.f
@@ -1,164 +1,259 @@
- SUBROUTINE CLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
- $ IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*> \brief \b CLAQR4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+* IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+*
+* Purpose
+* =======
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
- LOGICAL WANTT, WANTZ
-* ..
-* .. Array Arguments ..
- COMPLEX H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
-* ..
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQR4 implements one level of recursion for CLAQR0.
+*> It is a complete implementation of the small bulge multi-shift
+*> QR algorithm. It may be called by CLAQR0 and, for large enough
+*> deflation window size, it may be called by CLAQR3. This
+*> subroutine is identical to CLAQR0 except that it calls CLAQR2
+*> instead of CLAQR3.
+*>
+*> CLAQR4 computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**H, where T is an upper triangular matrix (the
+*> Schur form), and Z is the unitary matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input unitary
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*>
+*>\endverbatim
*
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*> H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*> previous call to CGEBAL, and then passed to CGEHRD when the
+*> matrix output by CGEBAL is reduced to Hessenberg form.
+*> Otherwise, ILO and IHI should be set to 1 and N,
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and WANTT is .TRUE., then H
+*> contains the upper triangular matrix T from the Schur
+*> decomposition (the Schur form). If INFO = 0 and WANT is
+*> .FALSE., then the contents of H are unspecified on exit.
+*> (The output value of H when INFO.GT.0 is given under the
+*> description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*> j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
+*> in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
+*> stored in the same order as on the diagonal of the Schur
+*> form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,IHI)
+*> If WANTZ is .FALSE., then Z is not referenced.
+*> If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*> replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*> orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*> (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if WANTZ is .TRUE.
+*> then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension LWORK
+*> On exit, if LWORK = -1, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient, but LWORK typically as large as 6*N may
+*> be required for optimal performance. A workspace query
+*> to determine the optimal workspace size is recommended.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then CLAQR4 does a workspace query.
+*> In this case, CLAQR4 checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, CLAQR4 failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is a unitary matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*> = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the unitary matrix in (*) (regard-
+*> less of the value of WANTT.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* CLAQR4 implements one level of recursion for CLAQR0.
-* It is a complete implementation of the small bulge multi-shift
-* QR algorithm. It may be called by CLAQR0 and, for large enough
-* deflation window size, it may be called by CLAQR3. This
-* subroutine is identical to CLAQR0 except that it calls CLAQR2
-* instead of CLAQR3.
-*
-* CLAQR4 computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**H, where T is an upper triangular matrix (the
-* Schur form), and Z is the unitary matrix of Schur vectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Optionally Z may be postmultiplied into an input unitary
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup complexOTHERauxiliary
*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-* previous call to CGEBAL, and then passed to CGEHRD when the
-* matrix output by CGEBAL is reduced to Hessenberg form.
-* Otherwise, ILO and IHI should be set to 1 and N,
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) COMPLEX array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and WANTT is .TRUE., then H
-* contains the upper triangular matrix T from the Schur
-* decomposition (the Schur form). If INFO = 0 and WANT is
-* .FALSE., then the contents of H are unspecified on exit.
-* (The output value of H when INFO.GT.0 is given under the
-* description of INFO below.)
-*
-* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* W (output) COMPLEX array, dimension (N)
-* The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
-* in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
-* stored in the same order as on the diagonal of the Schur
-* form returned in H, with W(i) = H(i,i).
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,IHI)
-* If WANTZ is .FALSE., then Z is not referenced.
-* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-* orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-* (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if WANTZ is .TRUE.
-* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) COMPLEX array, dimension LWORK
-* On exit, if LWORK = -1, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient, but LWORK typically as large as 6*N may
-* be required for optimal performance. A workspace query
-* to determine the optimal workspace size is recommended.
-*
-* If LWORK = -1, then CLAQR4 does a workspace query.
-* In this case, CLAQR4 checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, CLAQR4 failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and WANT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is a unitary matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*
-* (final value of Z(ILO:IHI,ILOZ:IHIZ)
-* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
-*
-* where U is the unitary matrix in (*) (regard-
-* less of the value of WANTT.)
-*
-* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-* accessed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> References:
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*> Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*> 929--947, 2002.
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*> of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+ $ IHIZ, Z, LDZ, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* References:
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-* Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-* 929--947, 2002.
+* .. Scalar Arguments ..
+ INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+ LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+ COMPLEX H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-* of Matrix Analysis, volume 23, pages 948--973, 2002.
*
* ================================================================
*
diff --git a/SRC/claqr5.f b/SRC/claqr5.f
index 7199183a..cff6fbe3 100644
--- a/SRC/claqr5.f
+++ b/SRC/claqr5.f
@@ -1,10 +1,257 @@
+*> \brief \b CLAQR5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
+* H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
+* WV, LDWV, NH, WH, LDWH )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
+* $ LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ),
+* $ WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQR5 called by CLAQR0 performs a
+*> single small-bulge multi-shift QR sweep.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is logical scalar
+*> WANTT = .true. if the triangular Schur factor
+*> is being computed. WANTT is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is logical scalar
+*> WANTZ = .true. if the unitary Schur factor is being
+*> computed. WANTZ is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] KACC22
+*> \verbatim
+*> KACC22 is integer with value 0, 1, or 2.
+*> Specifies the computation mode of far-from-diagonal
+*> orthogonal updates.
+*> = 0: CLAQR5 does not accumulate reflections and does not
+*> use matrix-matrix multiply to update far-from-diagonal
+*> matrix entries.
+*> = 1: CLAQR5 accumulates reflections and uses matrix-matrix
+*> multiply to update the far-from-diagonal matrix entries.
+*> = 2: CLAQR5 accumulates reflections, uses matrix-matrix
+*> multiply to update the far-from-diagonal matrix entries,
+*> and takes advantage of 2-by-2 block structure during
+*> matrix multiplies.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is integer scalar
+*> N is the order of the Hessenberg matrix H upon which this
+*> subroutine operates.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is integer scalar
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is integer scalar
+*> These are the first and last rows and columns of an
+*> isolated diagonal block upon which the QR sweep is to be
+*> applied. It is assumed without a check that
+*> either KTOP = 1 or H(KTOP,KTOP-1) = 0
+*> and
+*> either KBOT = N or H(KBOT+1,KBOT) = 0.
+*> \endverbatim
+*>
+*> \param[in] NSHFTS
+*> \verbatim
+*> NSHFTS is integer scalar
+*> NSHFTS gives the number of simultaneous shifts. NSHFTS
+*> must be positive and even.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is COMPLEX array of size (NSHFTS)
+*> S contains the shifts of origin that define the multi-
+*> shift QR sweep. On output S may be reordered.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX array of size (LDH,N)
+*> On input H contains a Hessenberg matrix. On output a
+*> multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
+*> to the isolated diagonal block in rows and columns KTOP
+*> through KBOT.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer scalar
+*> LDH is the leading dimension of H just as declared in the
+*> calling procedure. LDH.GE.MAX(1,N).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array of size (LDZ,IHI)
+*> If WANTZ = .TRUE., then the QR Sweep unitary
+*> similarity transformation is accumulated into
+*> Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ = .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer scalar
+*> LDA is the leading dimension of Z just as declared in
+*> the calling procedure. LDZ.GE.N.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array of size (LDV,NSHFTS/2)
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> LDV is the leading dimension of V as declared in the
+*> calling procedure. LDV.GE.3.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array of size
+*> (LDU,3*NSHFTS-3)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is integer scalar
+*> LDU is the leading dimension of U just as declared in the
+*> in the calling subroutine. LDU.GE.3*NSHFTS-3.
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> NH is the number of columns in array WH available for
+*> workspace. NH.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WH
+*> \verbatim
+*> WH is COMPLEX array of size (LDWH,NH)
+*> \endverbatim
+*>
+*> \param[in] LDWH
+*> \verbatim
+*> LDWH is integer scalar
+*> Leading dimension of WH just as declared in the
+*> calling procedure. LDWH.GE.3*NSHFTS-3.
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer scalar
+*> NV is the number of rows in WV agailable for workspace.
+*> NV.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is COMPLEX array of size
+*> (LDWV,3*NSHFTS-3)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer scalar
+*> LDWV is the leading dimension of WV as declared in the
+*> in the calling subroutine. LDWV.GE.NV.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> Reference:
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and
+*> Level 3 Performance, SIAM Journal of Matrix Analysis,
+*> volume 23, pages 929--947, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
$ H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
$ WV, LDWV, NH, WH, LDWH )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
@@ -16,132 +263,6 @@
$ WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQR5 called by CLAQR0 performs a
-* single small-bulge multi-shift QR sweep.
-*
-* Arguments
-* =========
-*
-* WANTT (input) logical scalar
-* WANTT = .true. if the triangular Schur factor
-* is being computed. WANTT is set to .false. otherwise.
-*
-* WANTZ (input) logical scalar
-* WANTZ = .true. if the unitary Schur factor is being
-* computed. WANTZ is set to .false. otherwise.
-*
-* KACC22 (input) integer with value 0, 1, or 2.
-* Specifies the computation mode of far-from-diagonal
-* orthogonal updates.
-* = 0: CLAQR5 does not accumulate reflections and does not
-* use matrix-matrix multiply to update far-from-diagonal
-* matrix entries.
-* = 1: CLAQR5 accumulates reflections and uses matrix-matrix
-* multiply to update the far-from-diagonal matrix entries.
-* = 2: CLAQR5 accumulates reflections, uses matrix-matrix
-* multiply to update the far-from-diagonal matrix entries,
-* and takes advantage of 2-by-2 block structure during
-* matrix multiplies.
-*
-* N (input) integer scalar
-* N is the order of the Hessenberg matrix H upon which this
-* subroutine operates.
-*
-* KTOP (input) integer scalar
-*
-* KBOT (input) integer scalar
-* These are the first and last rows and columns of an
-* isolated diagonal block upon which the QR sweep is to be
-* applied. It is assumed without a check that
-* either KTOP = 1 or H(KTOP,KTOP-1) = 0
-* and
-* either KBOT = N or H(KBOT+1,KBOT) = 0.
-*
-* NSHFTS (input) integer scalar
-* NSHFTS gives the number of simultaneous shifts. NSHFTS
-* must be positive and even.
-*
-* S (input/output) COMPLEX array of size (NSHFTS)
-* S contains the shifts of origin that define the multi-
-* shift QR sweep. On output S may be reordered.
-*
-* H (input/output) COMPLEX array of size (LDH,N)
-* On input H contains a Hessenberg matrix. On output a
-* multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
-* to the isolated diagonal block in rows and columns KTOP
-* through KBOT.
-*
-* LDH (input) integer scalar
-* LDH is the leading dimension of H just as declared in the
-* calling procedure. LDH.GE.MAX(1,N).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
-*
-* Z (input/output) COMPLEX array of size (LDZ,IHI)
-* If WANTZ = .TRUE., then the QR Sweep unitary
-* similarity transformation is accumulated into
-* Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ = .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer scalar
-* LDA is the leading dimension of Z just as declared in
-* the calling procedure. LDZ.GE.N.
-*
-* V (workspace) COMPLEX array of size (LDV,NSHFTS/2)
-*
-* LDV (input) integer scalar
-* LDV is the leading dimension of V as declared in the
-* calling procedure. LDV.GE.3.
-*
-* U (workspace) COMPLEX array of size
-* (LDU,3*NSHFTS-3)
-*
-* LDU (input) integer scalar
-* LDU is the leading dimension of U just as declared in the
-* in the calling subroutine. LDU.GE.3*NSHFTS-3.
-*
-* NH (input) integer scalar
-* NH is the number of columns in array WH available for
-* workspace. NH.GE.1.
-*
-* WH (workspace) COMPLEX array of size (LDWH,NH)
-*
-* LDWH (input) integer scalar
-* Leading dimension of WH just as declared in the
-* calling procedure. LDWH.GE.3*NSHFTS-3.
-*
-* NV (input) integer scalar
-* NV is the number of rows in WV agailable for workspace.
-* NV.GE.1.
-*
-* WV (workspace) COMPLEX array of size
-* (LDWV,3*NSHFTS-3)
-*
-* LDWV (input) integer scalar
-* LDWV is the leading dimension of WV as declared in the
-* in the calling subroutine. LDWV.GE.NV.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* Reference:
-*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and
-* Level 3 Performance, SIAM Journal of Matrix Analysis,
-* volume 23, pages 929--947, 2002.
-*
* ================================================================
* .. Parameters ..
COMPLEX ZERO, ONE
diff --git a/SRC/claqsb.f b/SRC/claqsb.f
index bb05e50c..bed37187 100644
--- a/SRC/claqsb.f
+++ b/SRC/claqsb.f
@@ -1,9 +1,144 @@
+*> \brief \b CLAQSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER KD, LDAB, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQSB equilibrates a symmetric band matrix A using the scaling
+*> factors in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H *U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,69 +150,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQSB equilibrates a symmetric band matrix A using the scaling
-* factors in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H *U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* S (input) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqsp.f b/SRC/claqsp.f
index da3e8a06..b1d1d2df 100644
--- a/SRC/claqsp.f
+++ b/SRC/claqsp.f
@@ -1,9 +1,129 @@
+*> \brief \b CLAQSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQSP equilibrates a symmetric matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix: diag(S) * A * diag(S), in
+*> the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,60 +135,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQSP equilibrates a symmetric matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the equilibrated matrix: diag(S) * A * diag(S), in
-* the same storage format as A.
-*
-* S (input) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claqsy.f b/SRC/claqsy.f
index 33fc9e7c..9c15efb6 100644
--- a/SRC/claqsy.f
+++ b/SRC/claqsy.f
@@ -1,9 +1,137 @@
+*> \brief \b CLAQSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER LDA, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAQSY equilibrates a symmetric matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED = 'Y', the equilibrated matrix:
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYauxiliary
+*
+* =====================================================================
SUBROUTINE CLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,65 +143,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAQSY equilibrates a symmetric matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if EQUED = 'Y', the equilibrated matrix:
-* diag(S) * A * diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* S (input) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clar1v.f b/SRC/clar1v.f
index 713a1d71..cb19b219 100644
--- a/SRC/clar1v.f
+++ b/SRC/clar1v.f
@@ -1,3 +1,229 @@
+*> \brief \b CLAR1V
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
+* PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
+* R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTNC
+* INTEGER B1, BN, N, NEGCNT, R
+* REAL GAPTOL, LAMBDA, MINGMA, NRMINV, PIVMIN, RESID,
+* $ RQCORR, ZTZ
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * )
+* REAL D( * ), L( * ), LD( * ), LLD( * ),
+* $ WORK( * )
+* COMPLEX Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAR1V computes the (scaled) r-th column of the inverse of
+*> the sumbmatrix in rows B1 through BN of the tridiagonal matrix
+*> L D L**T - sigma I. When sigma is close to an eigenvalue, the
+*> computed vector is an accurate eigenvector. Usually, r corresponds
+*> to the index where the eigenvector is largest in magnitude.
+*> The following steps accomplish this computation :
+*> (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
+*> (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
+*> (c) Computation of the diagonal elements of the inverse of
+*> L D L**T - sigma I by combining the above transforms, and choosing
+*> r as the index where the diagonal of the inverse is (one of the)
+*> largest in magnitude.
+*> (d) Computation of the (scaled) r-th column of the inverse using the
+*> twisted factorization obtained by combining the top part of the
+*> the stationary and the bottom part of the progressive transform.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix L D L**T.
+*> \endverbatim
+*>
+*> \param[in] B1
+*> \verbatim
+*> B1 is INTEGER
+*> First index of the submatrix of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] BN
+*> \verbatim
+*> BN is INTEGER
+*> Last index of the submatrix of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] LAMBDA
+*> \verbatim
+*> LAMBDA is REAL
+*> The shift. In order to compute an accurate eigenvector,
+*> LAMBDA should be a good approximation to an eigenvalue
+*> of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal matrix
+*> L, in elements 1 to N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] LD
+*> \verbatim
+*> LD is REAL array, dimension (N-1)
+*> The n-1 elements L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] LLD
+*> \verbatim
+*> LLD is REAL array, dimension (N-1)
+*> The n-1 elements L(i)*L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] GAPTOL
+*> \verbatim
+*> GAPTOL is REAL
+*> Tolerance that indicates when eigenvector entries are negligible
+*> w.r.t. their contribution to the residual.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (N)
+*> On input, all entries of Z must be set to 0.
+*> On output, Z contains the (scaled) r-th column of the
+*> inverse. The scaling is such that Z(R) equals 1.
+*> \endverbatim
+*>
+*> \param[in] WANTNC
+*> \verbatim
+*> WANTNC is LOGICAL
+*> Specifies whether NEGCNT has to be computed.
+*> \endverbatim
+*>
+*> \param[out] NEGCNT
+*> \verbatim
+*> NEGCNT is INTEGER
+*> If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin
+*> in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] ZTZ
+*> \verbatim
+*> ZTZ is REAL
+*> The square of the 2-norm of Z.
+*> \endverbatim
+*>
+*> \param[out] MINGMA
+*> \verbatim
+*> MINGMA is REAL
+*> The reciprocal of the largest (in magnitude) diagonal
+*> element of the inverse of L D L**T - sigma I.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is INTEGER
+*> The twist index for the twisted factorization used to
+*> compute Z.
+*> On input, 0 <= R <= N. If R is input as 0, R is set to
+*> the index where (L D L**T - sigma I)^{-1} is largest
+*> in magnitude. If 1 <= R <= N, R is unchanged.
+*> On output, R contains the twist index used to compute Z.
+*> Ideally, R designates the position of the maximum entry in the
+*> eigenvector.
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension (2)
+*> The support of the vector in Z, i.e., the vector Z is
+*> nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).
+*> \endverbatim
+*>
+*> \param[out] NRMINV
+*> \verbatim
+*> NRMINV is REAL
+*> NRMINV = 1/SQRT( ZTZ )
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The residual of the FP vector.
+*> RESID = ABS( MINGMA )/SQRT( ZTZ )
+*> \endverbatim
+*>
+*> \param[out] RQCORR
+*> \verbatim
+*> RQCORR is REAL
+*> The Rayleigh Quotient correction to LAMBDA.
+*> RQCORR = MINGMA*TMP
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
$ PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
$ R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
@@ -5,7 +231,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTNC
@@ -20,118 +246,6 @@
COMPLEX Z( * )
* ..
*
-* Purpose
-* =======
-*
-* CLAR1V computes the (scaled) r-th column of the inverse of
-* the sumbmatrix in rows B1 through BN of the tridiagonal matrix
-* L D L**T - sigma I. When sigma is close to an eigenvalue, the
-* computed vector is an accurate eigenvector. Usually, r corresponds
-* to the index where the eigenvector is largest in magnitude.
-* The following steps accomplish this computation :
-* (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
-* (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
-* (c) Computation of the diagonal elements of the inverse of
-* L D L**T - sigma I by combining the above transforms, and choosing
-* r as the index where the diagonal of the inverse is (one of the)
-* largest in magnitude.
-* (d) Computation of the (scaled) r-th column of the inverse using the
-* twisted factorization obtained by combining the top part of the
-* the stationary and the bottom part of the progressive transform.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix L D L**T.
-*
-* B1 (input) INTEGER
-* First index of the submatrix of L D L**T.
-*
-* BN (input) INTEGER
-* Last index of the submatrix of L D L**T.
-*
-* LAMBDA (input) REAL
-* The shift. In order to compute an accurate eigenvector,
-* LAMBDA should be a good approximation to an eigenvalue
-* of L D L**T.
-*
-* L (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal matrix
-* L, in elements 1 to N-1.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D.
-*
-* LD (input) REAL array, dimension (N-1)
-* The n-1 elements L(i)*D(i).
-*
-* LLD (input) REAL array, dimension (N-1)
-* The n-1 elements L(i)*L(i)*D(i).
-*
-* PIVMIN (input) REAL
-* The minimum pivot in the Sturm sequence.
-*
-* GAPTOL (input) REAL
-* Tolerance that indicates when eigenvector entries are negligible
-* w.r.t. their contribution to the residual.
-*
-* Z (input/output) COMPLEX array, dimension (N)
-* On input, all entries of Z must be set to 0.
-* On output, Z contains the (scaled) r-th column of the
-* inverse. The scaling is such that Z(R) equals 1.
-*
-* WANTNC (input) LOGICAL
-* Specifies whether NEGCNT has to be computed.
-*
-* NEGCNT (output) INTEGER
-* If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin
-* in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.
-*
-* ZTZ (output) REAL
-* The square of the 2-norm of Z.
-*
-* MINGMA (output) REAL
-* The reciprocal of the largest (in magnitude) diagonal
-* element of the inverse of L D L**T - sigma I.
-*
-* R (input/output) INTEGER
-* The twist index for the twisted factorization used to
-* compute Z.
-* On input, 0 <= R <= N. If R is input as 0, R is set to
-* the index where (L D L**T - sigma I)^{-1} is largest
-* in magnitude. If 1 <= R <= N, R is unchanged.
-* On output, R contains the twist index used to compute Z.
-* Ideally, R designates the position of the maximum entry in the
-* eigenvector.
-*
-* ISUPPZ (output) INTEGER array, dimension (2)
-* The support of the vector in Z, i.e., the vector Z is
-* nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).
-*
-* NRMINV (output) REAL
-* NRMINV = 1/SQRT( ZTZ )
-*
-* RESID (output) REAL
-* The residual of the FP vector.
-* RESID = ABS( MINGMA )/SQRT( ZTZ )
-*
-* RQCORR (output) REAL
-* The Rayleigh Quotient correction to LAMBDA.
-* RQCORR = MINGMA*TMP
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clar2v.f b/SRC/clar2v.f
index 3b36a206..eab25210 100644
--- a/SRC/clar2v.f
+++ b/SRC/clar2v.f
@@ -1,57 +1,120 @@
- SUBROUTINE CLAR2V( N, X, Y, Z, INCX, C, S, INCC )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, N
-* ..
-* .. Array Arguments ..
- REAL C( * )
- COMPLEX S( * ), X( * ), Y( * ), Z( * )
-* ..
-*
+*> \brief \b CLAR2V
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAR2V( N, X, Y, Z, INCX, C, S, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, N
+* ..
+* .. Array Arguments ..
+* REAL C( * )
+* COMPLEX S( * ), X( * ), Y( * ), Z( * )
+* ..
+*
* Purpose
* =======
*
-* CLAR2V applies a vector of complex plane rotations with real cosines
-* from both sides to a sequence of 2-by-2 complex Hermitian matrices,
-* defined by the elements of the vectors x, y and z. For i = 1,2,...,n
-*
-* ( x(i) z(i) ) :=
-* ( conjg(z(i)) y(i) )
-*
-* ( c(i) conjg(s(i)) ) ( x(i) z(i) ) ( c(i) -conjg(s(i)) )
-* ( -s(i) c(i) ) ( conjg(z(i)) y(i) ) ( s(i) c(i) )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAR2V applies a vector of complex plane rotations with real cosines
+*> from both sides to a sequence of 2-by-2 complex Hermitian matrices,
+*> defined by the elements of the vectors x, y and z. For i = 1,2,...,n
+*>
+*> ( x(i) z(i) ) :=
+*> ( conjg(z(i)) y(i) )
+*>
+*> ( c(i) conjg(s(i)) ) ( x(i) z(i) ) ( c(i) -conjg(s(i)) )
+*> ( -s(i) c(i) ) ( conjg(z(i)) y(i) ) ( s(i) c(i) )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be applied.
-*
-* X (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
-* The vector x; the elements of x are assumed to be real.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be applied.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (1+(N-1)*INCX)
+*> The vector x; the elements of x are assumed to be real.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (1+(N-1)*INCX)
+*> The vector y; the elements of y are assumed to be real.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (1+(N-1)*INCX)
+*> The vector z.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X, Y and Z. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX array, dimension (1+(N-1)*INCC)
+*> The sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C and S. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Y (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
-* The vector y; the elements of y are assumed to be real.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Z (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
-* The vector z.
+*> \date November 2011
*
-* INCX (input) INTEGER
-* The increment between elements of X, Y and Z. INCX > 0.
+*> \ingroup complexOTHERauxiliary
*
-* C (input) REAL array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* =====================================================================
+ SUBROUTINE CLAR2V( N, X, Y, Z, INCX, C, S, INCC )
*
-* S (input) COMPLEX array, dimension (1+(N-1)*INCC)
-* The sines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C and S. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, N
+* ..
+* .. Array Arguments ..
+ REAL C( * )
+ COMPLEX S( * ), X( * ), Y( * ), Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarcm.f b/SRC/clarcm.f
index 6a01a1b9..2d65be21 100644
--- a/SRC/clarcm.f
+++ b/SRC/clarcm.f
@@ -1,57 +1,123 @@
- SUBROUTINE CLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LDC, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), RWORK( * )
- COMPLEX B( LDB, * ), C( LDC, * )
-* ..
-*
+*> \brief \b CLARCM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDC, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), RWORK( * )
+* COMPLEX B( LDB, * ), C( LDC, * )
+* ..
+*
* Purpose
* =======
*
-* CLARCM performs a very simple matrix-matrix multiplication:
-* C := A * B,
-* where A is M by M and real; B is M by N and complex;
-* C is M by N and complex.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARCM performs a very simple matrix-matrix multiplication:
+*> C := A * B,
+*> where A is M by M and real; B is M by N and complex;
+*> C is M by N and complex.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A and of the matrix C.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns and rows of the matrix B and
-* the number of columns of the matrix C.
-* N >= 0.
-*
-* A (input) REAL array, dimension (LDA, M)
-* A contains the M by M matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A and of the matrix C.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns and rows of the matrix B and
+*> the number of columns of the matrix C.
+*> N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, M)
+*> A contains the M by M matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >=max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> B contains the M by N matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >=max(1,M).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, N)
+*> C contains the M by N matrix C.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >=max(1,M).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*M*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >=max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) REAL array, dimension (LDB, N)
-* B contains the M by N matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >=max(1,M).
+*> \ingroup complexOTHERauxiliary
*
-* C (input) COMPLEX array, dimension (LDC, N)
-* C contains the M by N matrix C.
+* =====================================================================
+ SUBROUTINE CLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >=max(1,M).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (workspace) REAL array, dimension (2*M*N)
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LDC, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), RWORK( * )
+ COMPLEX B( LDB, * ), C( LDC, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarf.f b/SRC/clarf.f
index e98ebc48..060c2310 100644
--- a/SRC/clarf.f
+++ b/SRC/clarf.f
@@ -1,10 +1,129 @@
+*> \brief \b CLARF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, LDC, M, N
+* COMPLEX TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX C( LDC, * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARF applies a complex elementary reflector H to a complex M-by-N
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*> H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar and v is a complex vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*> To apply H**H (the conjugate transpose of H), supply conjg(tau) instead
+*> tau.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension
+*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*> or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*> The vector v in the representation of H. V is not used if
+*> TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE
@@ -15,59 +134,6 @@
COMPLEX C( LDC, * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLARF applies a complex elementary reflector H to a complex M-by-N
-* matrix C, from either the left or the right. H is represented in the
-* form
-*
-* H = I - tau * v * v**H
-*
-* where tau is a complex scalar and v is a complex vector.
-*
-* If tau = 0, then H is taken to be the unit matrix.
-*
-* To apply H**H (the conjugate transpose of H), supply conjg(tau) instead
-* tau.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) COMPLEX array, dimension
-* (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-* or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-* The vector v in the representation of H. V is not used if
-* TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0.
-*
-* TAU (input) COMPLEX
-* The value tau in the representation of H.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clarfb.f b/SRC/clarfb.f
index e68a11bd..d38fccfa 100644
--- a/SRC/clarfb.f
+++ b/SRC/clarfb.f
@@ -1,117 +1,179 @@
- SUBROUTINE CLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
- $ T, LDT, C, LDC, WORK, LDWORK )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, SIDE, STOREV, TRANS
- INTEGER K, LDC, LDT, LDV, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX C( LDC, * ), T( LDT, * ), V( LDV, * ),
- $ WORK( LDWORK, * )
-* ..
-*
+*> \brief \b CLARFB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+* T, LDT, C, LDC, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX C( LDC, * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* CLARFB applies a complex block reflector H or its transpose H**H to a
-* complex M-by-N matrix C, from either the left or the right.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARFB applies a complex block reflector H or its transpose H**H to a
+*> complex M-by-N matrix C, from either the left or the right.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**H from the Left
-* = 'R': apply H or H**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H**H (Conjugate transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columnwise
-* = 'R': Rowwise
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* K (input) INTEGER
-* The order of the matrix T (= the number of elementary
-* reflectors whose product defines the block reflector).
-*
-* V (input) COMPLEX array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,M) if STOREV = 'R' and SIDE = 'L'
-* (LDV,N) if STOREV = 'R' and SIDE = 'R'
-* The matrix V. See Further Details.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-* if STOREV = 'R', LDV >= K.
-*
-* T (input) COMPLEX array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**H from the Left
+*> = 'R': apply H or H**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columnwise
+*> = 'R': Rowwise
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T (= the number of elementary
+*> reflectors whose product defines the block reflector).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,K)
+*> \ingroup complexOTHERauxiliary
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= max(1,N);
-* if SIDE = 'R', LDWORK >= max(1,M).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* The matrix V. See Further Details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*> if STOREV = 'R', LDV >= K.
+*>
+*> T (input) COMPLEX array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*> C (input/output) COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*>
+*> LDC (input) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*>
+*> WORK (workspace) COMPLEX array, dimension (LDWORK,K)
+*>
+*> LDWORK (input) INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= max(1,N);
+*> if SIDE = 'R', LDWORK >= max(1,M).
+*>
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
+*> ( v1 1 ) ( 1 v2 v2 v2 )
+*> ( v1 v2 1 ) ( 1 v3 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
+*> ( v1 v2 v3 ) ( v2 v2 v2 1 )
+*> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
+*> ( 1 v3 )
+*> ( 1 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+ $ T, LDT, C, LDC, WORK, LDWORK )
*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
-* ( v1 1 ) ( 1 v2 v2 v2 )
-* ( v1 v2 1 ) ( 1 v3 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* V = ( v1 v2 v3 ) V = ( v1 v1 1 )
-* ( v1 v2 v3 ) ( v2 v2 v2 1 )
-* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
-* ( 1 v3 )
-* ( 1 )
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, SIDE, STOREV, TRANS
+ INTEGER K, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX C( LDC, * ), T( LDT, * ), V( LDV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarfg.f b/SRC/clarfg.f
index 42233e05..f10bd9a4 100644
--- a/SRC/clarfg.f
+++ b/SRC/clarfg.f
@@ -1,9 +1,107 @@
+*> \brief \b CLARFG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARFG( N, ALPHA, X, INCX, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* COMPLEX ALPHA, TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARFG generates a complex elementary reflector H of order n, such
+*> that
+*>
+*> H**H * ( alpha ) = ( beta ), H**H * H = I.
+*> ( x ) ( 0 )
+*>
+*> where alpha and beta are scalars, with beta real, and x is an
+*> (n-1)-element complex vector. H is represented in the form
+*>
+*> H = I - tau * ( 1 ) * ( 1 v**H ) ,
+*> ( v )
+*>
+*> where tau is a complex scalar and v is a complex (n-1)-element
+*> vector. Note that H is not hermitian.
+*>
+*> If the elements of x are all zero and alpha is real, then tau = 0
+*> and H is taken to be the unit matrix.
+*>
+*> Otherwise 1 <= real(tau) <= 2 and abs(tau-1) <= 1 .
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the elementary reflector.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, the value alpha.
+*> On exit, it is overwritten with the value beta.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension
+*> (1+(N-2)*abs(INCX))
+*> On entry, the vector x.
+*> On exit, it is overwritten with the vector v.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX
+*> The value tau.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLARFG( N, ALPHA, X, INCX, TAU )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,50 +111,6 @@
COMPLEX X( * )
* ..
*
-* Purpose
-* =======
-*
-* CLARFG generates a complex elementary reflector H of order n, such
-* that
-*
-* H**H * ( alpha ) = ( beta ), H**H * H = I.
-* ( x ) ( 0 )
-*
-* where alpha and beta are scalars, with beta real, and x is an
-* (n-1)-element complex vector. H is represented in the form
-*
-* H = I - tau * ( 1 ) * ( 1 v**H ) ,
-* ( v )
-*
-* where tau is a complex scalar and v is a complex (n-1)-element
-* vector. Note that H is not hermitian.
-*
-* If the elements of x are all zero and alpha is real, then tau = 0
-* and H is taken to be the unit matrix.
-*
-* Otherwise 1 <= real(tau) <= 2 and abs(tau-1) <= 1 .
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the elementary reflector.
-*
-* ALPHA (input/output) COMPLEX
-* On entry, the value alpha.
-* On exit, it is overwritten with the value beta.
-*
-* X (input/output) COMPLEX array, dimension
-* (1+(N-2)*abs(INCX))
-* On entry, the vector x.
-* On exit, it is overwritten with the vector v.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
-*
-* TAU (output) COMPLEX
-* The value tau.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clarfgp.f b/SRC/clarfgp.f
index a80c393b..4d66e9da 100644
--- a/SRC/clarfgp.f
+++ b/SRC/clarfgp.f
@@ -1,9 +1,105 @@
+*> \brief \b CLARFGP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARFGP( N, ALPHA, X, INCX, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* COMPLEX ALPHA, TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARFGP generates a complex elementary reflector H of order n, such
+*> that
+*>
+*> H**H * ( alpha ) = ( beta ), H**H * H = I.
+*> ( x ) ( 0 )
+*>
+*> where alpha and beta are scalars, beta is real and non-negative, and
+*> x is an (n-1)-element complex vector. H is represented in the form
+*>
+*> H = I - tau * ( 1 ) * ( 1 v**H ) ,
+*> ( v )
+*>
+*> where tau is a complex scalar and v is a complex (n-1)-element
+*> vector. Note that H is not hermitian.
+*>
+*> If the elements of x are all zero and alpha is real, then tau = 0
+*> and H is taken to be the unit matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the elementary reflector.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, the value alpha.
+*> On exit, it is overwritten with the value beta.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension
+*> (1+(N-2)*abs(INCX))
+*> On entry, the vector x.
+*> On exit, it is overwritten with the vector v.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX
+*> The value tau.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLARFGP( N, ALPHA, X, INCX, TAU )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,48 +109,6 @@
COMPLEX X( * )
* ..
*
-* Purpose
-* =======
-*
-* CLARFGP generates a complex elementary reflector H of order n, such
-* that
-*
-* H**H * ( alpha ) = ( beta ), H**H * H = I.
-* ( x ) ( 0 )
-*
-* where alpha and beta are scalars, beta is real and non-negative, and
-* x is an (n-1)-element complex vector. H is represented in the form
-*
-* H = I - tau * ( 1 ) * ( 1 v**H ) ,
-* ( v )
-*
-* where tau is a complex scalar and v is a complex (n-1)-element
-* vector. Note that H is not hermitian.
-*
-* If the elements of x are all zero and alpha is real, then tau = 0
-* and H is taken to be the unit matrix.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the elementary reflector.
-*
-* ALPHA (input/output) COMPLEX
-* On entry, the value alpha.
-* On exit, it is overwritten with the value beta.
-*
-* X (input/output) COMPLEX array, dimension
-* (1+(N-2)*abs(INCX))
-* On entry, the vector x.
-* On exit, it is overwritten with the vector v.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
-*
-* TAU (output) COMPLEX
-* The value tau.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clarft.f b/SRC/clarft.f
index 3a7be33a..8e02dec5 100644
--- a/SRC/clarft.f
+++ b/SRC/clarft.f
@@ -1,105 +1,150 @@
- SUBROUTINE CLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, STOREV
- INTEGER K, LDT, LDV, N
-* ..
-* .. Array Arguments ..
- COMPLEX T( LDT, * ), TAU( * ), V( LDV, * )
-* ..
-*
+*> \brief \b CLARFT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, STOREV
+* INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+* COMPLEX T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* CLARFT forms the triangular factor T of a complex block reflector H
-* of order n, which is defined as a product of k elementary reflectors.
-*
-* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*
-* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
-*
-* If STOREV = 'C', the vector which defines the elementary reflector
-* H(i) is stored in the i-th column of the array V, and
-*
-* H = I - V * T * V**H
-*
-* If STOREV = 'R', the vector which defines the elementary reflector
-* H(i) is stored in the i-th row of the array V, and
-*
-* H = I - V**H * T * V
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARFT forms the triangular factor T of a complex block reflector H
+*> of order n, which is defined as a product of k elementary reflectors.
+*>
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
+*>
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*>
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
+*>
+*> H = I - V * T * V**H
+*>
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
+*>
+*> H = I - V**H * T * V
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIRECT (input) CHARACTER*1
-* Specifies the order in which the elementary reflectors are
-* multiplied to form the block reflector:
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Specifies how the vectors which define the elementary
-* reflectors are stored (see also Further Details):
-* = 'C': columnwise
-* = 'R': rowwise
-*
-* N (input) INTEGER
-* The order of the block reflector H. N >= 0.
-*
-* K (input) INTEGER
-* The order of the triangular factor T (= the number of
-* elementary reflectors). K >= 1.
-*
-* V (input/output) COMPLEX array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,N) if STOREV = 'R'
-* The matrix V. See further details.
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies the order in which the elementary reflectors are
+*> multiplied to form the block reflector:
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i).
+*> \date November 2011
*
-* T (output) COMPLEX array, dimension (LDT,K)
-* The k by k triangular factor T of the block reflector.
-* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-* lower triangular. The rest of the array is not used.
+*> \ingroup complexOTHERauxiliary
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors are stored (see also Further Details):
+*> = 'C': columnwise
+*> = 'R': rowwise
+*>
+*> N (input) INTEGER
+*> The order of the block reflector H. N >= 0.
+*>
+*> K (input) INTEGER
+*> The order of the triangular factor T (= the number of
+*> elementary reflectors). K >= 1.
+*>
+*> V (input/output) COMPLEX array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,N) if STOREV = 'R'
+*> The matrix V. See further details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>
+*> TAU (input) COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i).
+*>
+*> T (output) COMPLEX array, dimension (LDT,K)
+*> The k by k triangular factor T of the block reflector.
+*> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*> lower triangular. The rest of the array is not used.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
+*> ( v1 1 ) ( 1 v2 v2 v2 )
+*> ( v1 v2 1 ) ( 1 v3 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
+*> ( v1 v2 v3 ) ( v2 v2 v2 1 )
+*> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
+*> ( 1 v3 )
+*> ( 1 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
-* ( v1 1 ) ( 1 v2 v2 v2 )
-* ( v1 v2 1 ) ( 1 v3 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* V = ( v1 v2 v3 ) V = ( v1 v1 1 )
-* ( v1 v2 v3 ) ( v2 v2 v2 1 )
-* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
-* ( 1 v3 )
-* ( 1 )
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, STOREV
+ INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+ COMPLEX T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarfx.f b/SRC/clarfx.f
index c1cc9726..9da4dc8b 100644
--- a/SRC/clarfx.f
+++ b/SRC/clarfx.f
@@ -1,10 +1,120 @@
+*> \brief \b CLARFX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER LDC, M, N
+* COMPLEX TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX C( LDC, * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARFX applies a complex elementary reflector H to a complex m by n
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*> H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar and v is a complex vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix
+*>
+*> This version uses inline code if H has order < 11.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension (M) if SIDE = 'L'
+*> or (N) if SIDE = 'R'
+*> The vector v in the representation of H.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> WORK is not referenced if H has order < 11.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE
@@ -15,53 +125,6 @@
COMPLEX C( LDC, * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLARFX applies a complex elementary reflector H to a complex m by n
-* matrix C, from either the left or the right. H is represented in the
-* form
-*
-* H = I - tau * v * v**H
-*
-* where tau is a complex scalar and v is a complex vector.
-*
-* If tau = 0, then H is taken to be the unit matrix
-*
-* This version uses inline code if H has order < 11.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) COMPLEX array, dimension (M) if SIDE = 'L'
-* or (N) if SIDE = 'R'
-* The vector v in the representation of H.
-*
-* TAU (input) COMPLEX
-* The value tau in the representation of H.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDA >= max(1,M).
-*
-* WORK (workspace) COMPLEX array, dimension (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
-* WORK is not referenced if H has order < 11.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clargv.f b/SRC/clargv.f
index 97ff56ad..072b3e32 100644
--- a/SRC/clargv.f
+++ b/SRC/clargv.f
@@ -1,68 +1,133 @@
- SUBROUTINE CLARGV( N, X, INCX, Y, INCY, C, INCC )
+*> \brief \b CLARGV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, INCY, N
-* ..
-* .. Array Arguments ..
- REAL C( * )
- COMPLEX X( * ), Y( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLARGV( N, X, INCX, Y, INCY, C, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* REAL C( * )
+* COMPLEX X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* CLARGV generates a vector of complex plane rotations with real
-* cosines, determined by elements of the complex vectors x and y.
-* For i = 1,2,...,n
-*
-* ( c(i) s(i) ) ( x(i) ) = ( r(i) )
-* ( -conjg(s(i)) c(i) ) ( y(i) ) = ( 0 )
-*
-* where c(i)**2 + ABS(s(i))**2 = 1
-*
-* The following conventions are used (these are the same as in CLARTG,
-* but differ from the BLAS1 routine CROTG):
-* If y(i)=0, then c(i)=1 and s(i)=0.
-* If x(i)=0, then c(i)=0 and s(i) is chosen so that r(i) is real.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARGV generates a vector of complex plane rotations with real
+*> cosines, determined by elements of the complex vectors x and y.
+*> For i = 1,2,...,n
+*>
+*> ( c(i) s(i) ) ( x(i) ) = ( r(i) )
+*> ( -conjg(s(i)) c(i) ) ( y(i) ) = ( 0 )
+*>
+*> where c(i)**2 + ABS(s(i))**2 = 1
+*>
+*> The following conventions are used (these are the same as in CLARTG,
+*> but differ from the BLAS1 routine CROTG):
+*> If y(i)=0, then c(i)=1 and s(i)=0.
+*> If x(i)=0, then c(i)=0 and s(i) is chosen so that r(i) is real.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be generated.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be generated.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (1+(N-1)*INCX)
+*> On entry, the vector x.
+*> On exit, x(i) is overwritten by r(i), for i = 1,...,n.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (1+(N-1)*INCY)
+*> On entry, the vector y.
+*> On exit, the sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C. INCC > 0.
+*> \endverbatim
+*>
*
-* X (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
-* On entry, the vector x.
-* On exit, x(i) is overwritten by r(i), for i = 1,...,n.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
+* Authors
+* =======
*
-* Y (input/output) COMPLEX array, dimension (1+(N-1)*INCY)
-* On entry, the vector y.
-* On exit, the sines of the plane rotations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCY (input) INTEGER
-* The increment between elements of Y. INCY > 0.
+*> \date November 2011
*
-* C (output) REAL array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+*> \ingroup complexOTHERauxiliary
*
-* INCC (input) INTEGER
-* The increment between elements of C. INCC > 0.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 6-6-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+*>
+*> This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). 10 feb 03, SJH.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLARGV( N, X, INCX, Y, INCY, C, INCC )
*
-* 6-6-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). 10 feb 03, SJH.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ REAL C( * )
+ COMPLEX X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarnv.f b/SRC/clarnv.f
index eb89ca05..7b571790 100644
--- a/SRC/clarnv.f
+++ b/SRC/clarnv.f
@@ -1,54 +1,110 @@
- SUBROUTINE CLARNV( IDIST, ISEED, N, X )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IDIST, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- COMPLEX X( * )
-* ..
-*
+*> \brief \b CLARNV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARNV( IDIST, ISEED, N, X )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX X( * )
+* ..
+*
* Purpose
* =======
*
-* CLARNV returns a vector of n random complex numbers from a uniform or
-* normal distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARNV returns a vector of n random complex numbers from a uniform or
+*> normal distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IDIST (input) INTEGER
-* Specifies the distribution of the random numbers:
-* = 1: real and imaginary parts each uniform (0,1)
-* = 2: real and imaginary parts each uniform (-1,1)
-* = 3: real and imaginary parts each normal (0,1)
-* = 4: uniformly distributed on the disc abs(z) < 1
-* = 5: uniformly distributed on the circle abs(z) = 1
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the distribution of the random numbers:
+*> = 1: real and imaginary parts each uniform (0,1)
+*> = 2: real and imaginary parts each uniform (-1,1)
+*> = 3: real and imaginary parts each normal (0,1)
+*> = 4: uniformly distributed on the disc abs(z) < 1
+*> = 5: uniformly distributed on the circle abs(z) = 1
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of random numbers to be generated.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> The generated random numbers.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of random numbers to be generated.
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
*
-* X (output) COMPLEX array, dimension (N)
-* The generated random numbers.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine calls the auxiliary routine SLARUV to generate random
+*> real numbers from a uniform (0,1) distribution, in batches of up to
+*> 128 using vectorisable code. The Box-Muller method is used to
+*> transform numbers from a uniform to a normal distribution.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLARNV( IDIST, ISEED, N, X )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine calls the auxiliary routine SLARUV to generate random
-* real numbers from a uniform (0,1) distribution, in batches of up to
-* 128 using vectorisable code. The Box-Muller method is used to
-* transform numbers from a uniform to a normal distribution.
+* .. Scalar Arguments ..
+ INTEGER IDIST, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ COMPLEX X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarrv.f b/SRC/clarrv.f
index 7b711617..f0f105cf 100644
--- a/SRC/clarrv.f
+++ b/SRC/clarrv.f
@@ -1,3 +1,280 @@
+*> \brief \b CLARRV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN,
+* ISPLIT, M, DOL, DOU, MINRGP,
+* RTOL1, RTOL2, W, WERR, WGAP,
+* IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER DOL, DOU, INFO, LDZ, M, N
+* REAL MINRGP, PIVMIN, RTOL1, RTOL2, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), INDEXW( * ), ISPLIT( * ),
+* $ ISUPPZ( * ), IWORK( * )
+* REAL D( * ), GERS( * ), L( * ), W( * ), WERR( * ),
+* $ WGAP( * ), WORK( * )
+* COMPLEX Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARRV computes the eigenvectors of the tridiagonal matrix
+*> T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
+*> The input eigenvalues should have been computed by SLARRE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> Lower and upper bounds of the interval that contains the desired
+*> eigenvalues. VL < VU. Needed to compute gaps on the left or right
+*> end of the extremal eigenvalues in the desired RANGE.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the N diagonal elements of the diagonal matrix D.
+*> On exit, D may be overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] L
+*> \verbatim
+*> L is REAL array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the unit
+*> bidiagonal matrix L are in elements 1 to N-1 of L
+*> (if the matrix is not splitted.) At the end of each block
+*> is stored the corresponding shift as given by SLARRE.
+*> On exit, L is overwritten.
+*> \endverbatim
+*> \verbatim
+*> PIVMIN (in) DOUBLE PRECISION
+*> The minimum pivot allowed in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into blocks.
+*> The first block consists of rows/columns 1 to
+*> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
+*> through ISPLIT( 2 ), etc.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of input eigenvalues. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] DOL
+*> \verbatim
+*> DOL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] DOU
+*> \verbatim
+*> DOU is INTEGER
+*> If the user wants to compute only selected eigenvectors from all
+*> the eigenvalues supplied, he can specify an index range DOL:DOU.
+*> Or else the setting DOL=1, DOU=M should be applied.
+*> Note that DOL and DOU refer to the order in which the eigenvalues
+*> are stored in W.
+*> If the user wants to compute only selected eigenpairs, then
+*> the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
+*> computed eigenvectors. All other columns of Z are set to zero.
+*> \endverbatim
+*>
+*> \param[in] MINRGP
+*> \verbatim
+*> MINRGP is REAL
+*> \endverbatim
+*>
+*> \param[in] RTOL1
+*> \verbatim
+*> RTOL1 is REAL
+*> \endverbatim
+*>
+*> \param[in] RTOL2
+*> \verbatim
+*> RTOL2 is REAL
+*> Parameters for bisection.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements of W contain the APPROXIMATE eigenvalues for
+*> which eigenvectors are to be computed. The eigenvalues
+*> should be grouped by split-off block and ordered from
+*> smallest to largest within the block ( The output array
+*> W from SLARRE is expected here ). Furthermore, they are with
+*> respect to the shift of the corresponding root representation
+*> for their block. On exit, W holds the eigenvalues of the
+*> UNshifted matrix.
+*> \endverbatim
+*>
+*> \param[in,out] WERR
+*> \verbatim
+*> WERR is REAL array, dimension (N)
+*> The first M elements contain the semiwidth of the uncertainty
+*> interval of the corresponding eigenvalue in W
+*> \endverbatim
+*>
+*> \param[in,out] WGAP
+*> \verbatim
+*> WGAP is REAL array, dimension (N)
+*> The separation from the right neighbor eigenvalue in W.
+*> \endverbatim
+*>
+*> \param[in] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The indices of the blocks (submatrices) associated with the
+*> corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
+*> W(i) belongs to the first block from the top, =2 if W(i)
+*> belongs to the second block, etc.
+*> \endverbatim
+*>
+*> \param[in] INDEXW
+*> \verbatim
+*> INDEXW is INTEGER array, dimension (N)
+*> The indices of the eigenvalues within each block (submatrix);
+*> for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
+*> i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
+*> \endverbatim
+*>
+*> \param[in] GERS
+*> \verbatim
+*> GERS is REAL array, dimension (2*N)
+*> The N Gerschgorin intervals (the i-th Gerschgorin interval
+*> is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
+*> be computed from the original UNshifted matrix.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is array, dimension (LDZ, max(1,M) )
+*> If INFO = 0, the first M columns of Z contain the
+*> orthonormal eigenvectors of the matrix T
+*> corresponding to the input eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The I-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*I-1 ) through
+*> ISUPPZ( 2*I ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (12*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> \endverbatim
+*> \verbatim
+*> > 0: A problem occured in CLARRV.
+*> < 0: One of the called subroutines signaled an internal problem.
+*> Needs inspection of the corresponding parameter IINFO
+*> for further information.
+*> \endverbatim
+*> \verbatim
+*> =-1: Problem in SLARRB when refining a child's eigenvalues.
+*> =-2: Problem in SLARRF when computing the RRR of a child.
+*> When a child is inside a tight cluster, it can be difficult
+*> to find an RRR. A partial remedy from the user's point of
+*> view is to make the parameter MINRGP smaller and recompile.
+*> However, as the orthogonality of the computed vectors is
+*> proportional to 1/MINRGP, the user should be aware that
+*> he might be trading in precision when he decreases MINRGP.
+*> =-3: Problem in SLARRB when refining a single eigenvalue
+*> after the Rayleigh correction was rejected.
+*> = 5: The Rayleigh Quotient Iteration failed to converge to
+*> full accuracy in MAXITR steps.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN,
$ ISPLIT, M, DOL, DOU, MINRGP,
$ RTOL1, RTOL2, W, WERR, WGAP,
@@ -7,7 +284,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER DOL, DOU, INFO, LDZ, M, N
@@ -21,156 +298,6 @@
COMPLEX Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CLARRV computes the eigenvectors of the tridiagonal matrix
-* T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
-* The input eigenvalues should have been computed by SLARRE.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* Lower and upper bounds of the interval that contains the desired
-* eigenvalues. VL < VU. Needed to compute gaps on the left or right
-* end of the extremal eigenvalues in the desired RANGE.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the N diagonal elements of the diagonal matrix D.
-* On exit, D may be overwritten.
-*
-* L (input/output) REAL array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the unit
-* bidiagonal matrix L are in elements 1 to N-1 of L
-* (if the matrix is not splitted.) At the end of each block
-* is stored the corresponding shift as given by SLARRE.
-* On exit, L is overwritten.
-*
-* PIVMIN (in) DOUBLE PRECISION
-* The minimum pivot allowed in the Sturm sequence.
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into blocks.
-* The first block consists of rows/columns 1 to
-* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
-* through ISPLIT( 2 ), etc.
-*
-* M (input) INTEGER
-* The total number of input eigenvalues. 0 <= M <= N.
-*
-* DOL (input) INTEGER
-*
-* DOU (input) INTEGER
-* If the user wants to compute only selected eigenvectors from all
-* the eigenvalues supplied, he can specify an index range DOL:DOU.
-* Or else the setting DOL=1, DOU=M should be applied.
-* Note that DOL and DOU refer to the order in which the eigenvalues
-* are stored in W.
-* If the user wants to compute only selected eigenpairs, then
-* the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
-* computed eigenvectors. All other columns of Z are set to zero.
-*
-* MINRGP (input) REAL
-*
-* RTOL1 (input) REAL
-*
-* RTOL2 (input) REAL
-* Parameters for bisection.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
-*
-* W (input/output) REAL array, dimension (N)
-* The first M elements of W contain the APPROXIMATE eigenvalues for
-* which eigenvectors are to be computed. The eigenvalues
-* should be grouped by split-off block and ordered from
-* smallest to largest within the block ( The output array
-* W from SLARRE is expected here ). Furthermore, they are with
-* respect to the shift of the corresponding root representation
-* for their block. On exit, W holds the eigenvalues of the
-* UNshifted matrix.
-*
-* WERR (input/output) REAL array, dimension (N)
-* The first M elements contain the semiwidth of the uncertainty
-* interval of the corresponding eigenvalue in W
-*
-* WGAP (input/output) REAL array, dimension (N)
-* The separation from the right neighbor eigenvalue in W.
-*
-* IBLOCK (input) INTEGER array, dimension (N)
-* The indices of the blocks (submatrices) associated with the
-* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
-* W(i) belongs to the first block from the top, =2 if W(i)
-* belongs to the second block, etc.
-*
-* INDEXW (input) INTEGER array, dimension (N)
-* The indices of the eigenvalues within each block (submatrix);
-* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
-* i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
-*
-* GERS (input) REAL array, dimension (2*N)
-* The N Gerschgorin intervals (the i-th Gerschgorin interval
-* is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
-* be computed from the original UNshifted matrix.
-*
-* Z (output)COMPLEX array, dimension (LDZ, max(1,M) )
-* If INFO = 0, the first M columns of Z contain the
-* orthonormal eigenvectors of the matrix T
-* corresponding to the input eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The I-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*I-1 ) through
-* ISUPPZ( 2*I ).
-*
-* WORK (workspace) REAL array, dimension (12*N)
-*
-* IWORK (workspace) INTEGER array, dimension (7*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-*
-* > 0: A problem occured in CLARRV.
-* < 0: One of the called subroutines signaled an internal problem.
-* Needs inspection of the corresponding parameter IINFO
-* for further information.
-*
-* =-1: Problem in SLARRB when refining a child's eigenvalues.
-* =-2: Problem in SLARRF when computing the RRR of a child.
-* When a child is inside a tight cluster, it can be difficult
-* to find an RRR. A partial remedy from the user's point of
-* view is to make the parameter MINRGP smaller and recompile.
-* However, as the orthogonality of the computed vectors is
-* proportional to 1/MINRGP, the user should be aware that
-* he might be trading in precision when he decreases MINRGP.
-* =-3: Problem in SLARRB when refining a single eigenvalue
-* after the Rayleigh correction was rejected.
-* = 5: The Rayleigh Quotient Iteration failed to converge to
-* full accuracy in MAXITR steps.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clarscl2.f b/SRC/clarscl2.f
index 4fc079a4..8fdc7793 100644
--- a/SRC/clarscl2.f
+++ b/SRC/clarscl2.f
@@ -1,51 +1,100 @@
- SUBROUTINE CLARSCL2 ( M, N, D, X, LDX )
+*> \brief \b CLARSCL2
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER M, N, LDX
-* ..
-* .. Array Arguments ..
- COMPLEX X( LDX, * )
- REAL D( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CLARSCL2 ( M, N, D, X, LDX )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+* COMPLEX X( LDX, * )
+* REAL D( * )
+* ..
+*
* Purpose
* =======
*
-* CLARSCL2 performs a reciprocal diagonal scaling on an vector:
-* x <-- inv(D) * x
-* where the REAL diagonal matrix D is stored as a vector.
-*
-* Eventually to be replaced by BLAS_cge_diag_scale in the new BLAS
-* standard.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARSCL2 performs a reciprocal diagonal scaling on an vector:
+*> x <-- inv(D) * x
+*> where the REAL diagonal matrix D is stored as a vector.
+*>
+*> Eventually to be replaced by BLAS_cge_diag_scale in the new BLAS
+*> standard.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of D and X. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of D and X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of D and X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, length M
+*> Diagonal matrix D, stored as a vector of length M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,N)
+*> On entry, the vector X to be scaled by D.
+*> On exit, the scaled vector.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the vector X. LDX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of D and X. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) REAL array, length M
-* Diagonal matrix D, stored as a vector of length M.
+*> \date November 2011
*
-* X (input/output) COMPLEX array, dimension (LDX,N)
-* On entry, the vector X to be scaled by D.
-* On exit, the scaled vector.
+*> \ingroup complexOTHERcomputational
*
-* LDX (input) INTEGER
-* The leading dimension of the vector X. LDX >= 0.
+* =====================================================================
+ SUBROUTINE CLARSCL2 ( M, N, D, X, LDX )
+*
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+ COMPLEX X( LDX, * )
+ REAL D( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clartg.f b/SRC/clartg.f
index 1bcab75e..0204eedf 100644
--- a/SRC/clartg.f
+++ b/SRC/clartg.f
@@ -1,55 +1,113 @@
- SUBROUTINE CLARTG( F, G, CS, SN, R )
+*> \brief \b CLARTG
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL CS
- COMPLEX F, G, R, SN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLARTG( F, G, CS, SN, R )
+*
+* .. Scalar Arguments ..
+* REAL CS
+* COMPLEX F, G, R, SN
+* ..
+*
* Purpose
* =======
*
-* CLARTG generates a plane rotation so that
-*
-* [ CS SN ] [ F ] [ R ]
-* [ __ ] . [ ] = [ ] where CS**2 + |SN|**2 = 1.
-* [ -SN CS ] [ G ] [ 0 ]
-*
-* This is a faster version of the BLAS1 routine CROTG, except for
-* the following differences:
-* F and G are unchanged on return.
-* If G=0, then CS=1 and SN=0.
-* If F=0, then CS=0 and SN is chosen so that R is real.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARTG generates a plane rotation so that
+*>
+*> [ CS SN ] [ F ] [ R ]
+*> [ __ ] . [ ] = [ ] where CS**2 + |SN|**2 = 1.
+*> [ -SN CS ] [ G ] [ 0 ]
+*>
+*> This is a faster version of the BLAS1 routine CROTG, except for
+*> the following differences:
+*> F and G are unchanged on return.
+*> If G=0, then CS=1 and SN=0.
+*> If F=0, then CS=0 and SN is chosen so that R is real.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) COMPLEX
-* The first component of vector to be rotated.
+*> \param[in] F
+*> \verbatim
+*> F is COMPLEX
+*> The first component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is COMPLEX
+*> The second component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is REAL
+*> The cosine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is COMPLEX
+*> The sine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX
+*> The nonzero component of the rotated vector.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* G (input) COMPLEX
-* The second component of vector to be rotated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CS (output) REAL
-* The cosine of the rotation.
+*> \date November 2011
*
-* SN (output) COMPLEX
-* The sine of the rotation.
+*> \ingroup complexOTHERauxiliary
*
-* R (output) COMPLEX
-* The nonzero component of the rotated vector.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> 3-5-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+*>
+*> This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). 10 feb 03, SJH.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLARTG( F, G, CS, SN, R )
*
-* 3-5-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). 10 feb 03, SJH.
+* .. Scalar Arguments ..
+ REAL CS
+ COMPLEX F, G, R, SN
+* ..
*
* =====================================================================
*
diff --git a/SRC/clartv.f b/SRC/clartv.f
index 4ff17258..609b127f 100644
--- a/SRC/clartv.f
+++ b/SRC/clartv.f
@@ -1,53 +1,116 @@
- SUBROUTINE CLARTV( N, X, INCX, Y, INCY, C, S, INCC )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, INCY, N
-* ..
-* .. Array Arguments ..
- REAL C( * )
- COMPLEX S( * ), X( * ), Y( * )
-* ..
-*
+*> \brief \b CLARTV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARTV( N, X, INCX, Y, INCY, C, S, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* REAL C( * )
+* COMPLEX S( * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* CLARTV applies a vector of complex plane rotations with real cosines
-* to elements of the complex vectors x and y. For i = 1,2,...,n
-*
-* ( x(i) ) := ( c(i) s(i) ) ( x(i) )
-* ( y(i) ) ( -conjg(s(i)) c(i) ) ( y(i) )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARTV applies a vector of complex plane rotations with real cosines
+*> to elements of the complex vectors x and y. For i = 1,2,...,n
+*>
+*> ( x(i) ) := ( c(i) s(i) ) ( x(i) )
+*> ( y(i) ) ( -conjg(s(i)) c(i) ) ( y(i) )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be applied.
-*
-* X (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
-* The vector x.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be applied.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (1+(N-1)*INCX)
+*> The vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (1+(N-1)*INCY)
+*> The vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX array, dimension (1+(N-1)*INCC)
+*> The sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C and S. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Y (input/output) COMPLEX array, dimension (1+(N-1)*INCY)
-* The vector y.
+*> \date November 2011
*
-* INCY (input) INTEGER
-* The increment between elements of Y. INCY > 0.
+*> \ingroup complexOTHERauxiliary
*
-* C (input) REAL array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* =====================================================================
+ SUBROUTINE CLARTV( N, X, INCX, Y, INCY, C, S, INCC )
*
-* S (input) COMPLEX array, dimension (1+(N-1)*INCC)
-* The sines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C and S. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ REAL C( * )
+ COMPLEX S( * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarz.f b/SRC/clarz.f
index 6853cb19..2a24845e 100644
--- a/SRC/clarz.f
+++ b/SRC/clarz.f
@@ -1,82 +1,157 @@
- SUBROUTINE CLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE
- INTEGER INCV, L, LDC, M, N
- COMPLEX TAU
-* ..
-* .. Array Arguments ..
- COMPLEX C( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b CLARZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, L, LDC, M, N
+* COMPLEX TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX C( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLARZ applies a complex elementary reflector H to a complex
-* M-by-N matrix C, from either the left or the right. H is represented
-* in the form
-*
-* H = I - tau * v * v**H
-*
-* where tau is a complex scalar and v is a complex vector.
-*
-* If tau = 0, then H is taken to be the unit matrix.
-*
-* To apply H**H (the conjugate transpose of H), supply conjg(tau) instead
-* tau.
-*
-* H is a product of k elementary reflectors as returned by CTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARZ applies a complex elementary reflector H to a complex
+*> M-by-N matrix C, from either the left or the right. H is represented
+*> in the form
+*>
+*> H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar and v is a complex vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*> To apply H**H (the conjugate transpose of H), supply conjg(tau) instead
+*> tau.
+*>
+*> H is a product of k elementary reflectors as returned by CTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* L (input) INTEGER
-* The number of entries of the vector V containing
-* the meaningful part of the Householder vectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* V (input) COMPLEX array, dimension (1+(L-1)*abs(INCV))
-* The vector v in the representation of H as returned by
-* CTZRZF. V is not used if TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of entries of the vector V containing
+*> the meaningful part of the Householder vectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension (1+(L-1)*abs(INCV))
+*> The vector v in the representation of H as returned by
+*> CTZRZF. V is not used if TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX
-* The value tau in the representation of H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
+*> \date November 2011
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \ingroup complexOTHERcomputational
*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER SIDE
+ INTEGER INCV, L, LDC, M, N
+ COMPLEX TAU
+* ..
+* .. Array Arguments ..
+ COMPLEX C( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarzb.f b/SRC/clarzb.f
index 114d9bb4..52ba20f9 100644
--- a/SRC/clarzb.f
+++ b/SRC/clarzb.f
@@ -1,99 +1,193 @@
- SUBROUTINE CLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
- $ LDV, T, LDT, C, LDC, WORK, LDWORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, SIDE, STOREV, TRANS
- INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX C( LDC, * ), T( LDT, * ), V( LDV, * ),
- $ WORK( LDWORK, * )
-* ..
-*
+*> \brief \b CLARZB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
+* LDV, T, LDT, C, LDC, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX C( LDC, * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* CLARZB applies a complex block reflector H or its transpose H**H
-* to a complex distributed M-by-N C from the left or the right.
-*
-* Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARZB applies a complex block reflector H or its transpose H**H
+*> to a complex distributed M-by-N C from the left or the right.
+*>
+*> Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**H from the Left
-* = 'R': apply H or H**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H**H (Conjugate transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columnwise (not supported yet)
-* = 'R': Rowwise
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* K (input) INTEGER
-* The order of the matrix T (= the number of elementary
-* reflectors whose product defines the block reflector).
-*
-* L (input) INTEGER
-* The number of columns of the matrix V containing the
-* meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* V (input) COMPLEX array, dimension (LDV,NV).
-* If STOREV = 'C', NV = K; if STOREV = 'R', NV = L.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K.
-*
-* T (input) COMPLEX array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**H from the Left
+*> = 'R': apply H or H**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columnwise (not supported yet)
+*> = 'R': Rowwise
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T (= the number of elementary
+*> reflectors whose product defines the block reflector).
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix V containing the
+*> meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,NV).
+*> If STOREV = 'C', NV = K; if STOREV = 'R', NV = L.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK,K)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= max(1,N);
+*> if SIDE = 'R', LDWORK >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,K)
+*> \ingroup complexOTHERcomputational
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= max(1,N);
-* if SIDE = 'R', LDWORK >= max(1,M).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
+ $ LDV, T, LDT, C, LDC, WORK, LDWORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, SIDE, STOREV, TRANS
+ INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX C( LDC, * ), T( LDT, * ), V( LDV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clarzt.f b/SRC/clarzt.f
index 527686d9..84e67a2d 100644
--- a/SRC/clarzt.f
+++ b/SRC/clarzt.f
@@ -1,123 +1,168 @@
- SUBROUTINE CLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, STOREV
- INTEGER K, LDT, LDV, N
-* ..
-* .. Array Arguments ..
- COMPLEX T( LDT, * ), TAU( * ), V( LDV, * )
-* ..
-*
+*> \brief \b CLARZT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, STOREV
+* INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+* COMPLEX T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* CLARZT forms the triangular factor T of a complex block reflector
-* H of order > n, which is defined as a product of k elementary
-* reflectors.
-*
-* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*
-* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
-*
-* If STOREV = 'C', the vector which defines the elementary reflector
-* H(i) is stored in the i-th column of the array V, and
-*
-* H = I - V * T * V**H
-*
-* If STOREV = 'R', the vector which defines the elementary reflector
-* H(i) is stored in the i-th row of the array V, and
-*
-* H = I - V**H * T * V
-*
-* Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARZT forms the triangular factor T of a complex block reflector
+*> H of order > n, which is defined as a product of k elementary
+*> reflectors.
+*>
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
+*>
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*>
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
+*>
+*> H = I - V * T * V**H
+*>
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
+*>
+*> H = I - V**H * T * V
+*>
+*> Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIRECT (input) CHARACTER*1
-* Specifies the order in which the elementary reflectors are
-* multiplied to form the block reflector:
-* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Specifies how the vectors which define the elementary
-* reflectors are stored (see also Further Details):
-* = 'C': columnwise (not supported yet)
-* = 'R': rowwise
-*
-* N (input) INTEGER
-* The order of the block reflector H. N >= 0.
-*
-* K (input) INTEGER
-* The order of the triangular factor T (= the number of
-* elementary reflectors). K >= 1.
-*
-* V (input/output) COMPLEX array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,N) if STOREV = 'R'
-* The matrix V. See further details.
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies the order in which the elementary reflectors are
+*> multiplied to form the block reflector:
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i).
+*> \date November 2011
*
-* T (output) COMPLEX array, dimension (LDT,K)
-* The k by k triangular factor T of the block reflector.
-* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-* lower triangular. The rest of the array is not used.
+*> \ingroup complexOTHERcomputational
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors are stored (see also Further Details):
+*> = 'C': columnwise (not supported yet)
+*> = 'R': rowwise
+*>
+*> N (input) INTEGER
+*> The order of the block reflector H. N >= 0.
+*>
+*> K (input) INTEGER
+*> The order of the triangular factor T (= the number of
+*> elementary reflectors). K >= 1.
+*>
+*> V (input/output) COMPLEX array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,N) if STOREV = 'R'
+*> The matrix V. See further details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>
+*> TAU (input) COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i).
+*>
+*> T (output) COMPLEX array, dimension (LDT,K)
+*> The k by k triangular factor T of the block reflector.
+*> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*> lower triangular. The rest of the array is not used.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> ______V_____
+*> ( v1 v2 v3 ) / \
+*> ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 )
+*> V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 )
+*> ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 )
+*> ( v1 v2 v3 )
+*> . . .
+*> . . .
+*> 1 . .
+*> 1 .
+*> 1
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> ______V_____
+*> 1 / \
+*> . 1 ( 1 . . . . v1 v1 v1 v1 v1 )
+*> . . 1 ( . 1 . . . v2 v2 v2 v2 v2 )
+*> . . . ( . . 1 . . v3 v3 v3 v3 v3 )
+*> . . .
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*> V = ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* ______V_____
-* ( v1 v2 v3 ) / \
-* ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 )
-* V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 )
-* ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 )
-* ( v1 v2 v3 )
-* . . .
-* . . .
-* 1 . .
-* 1 .
-* 1
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
-*
-* ______V_____
-* 1 / \
-* . 1 ( 1 . . . . v1 v1 v1 v1 v1 )
-* . . 1 ( . 1 . . . v2 v2 v2 v2 v2 )
-* . . . ( . . 1 . . v3 v3 v3 v3 v3 )
-* . . .
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-* V = ( v1 v2 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, STOREV
+ INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+ COMPLEX T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clascl.f b/SRC/clascl.f
index 6c469bfb..3dc4231a 100644
--- a/SRC/clascl.f
+++ b/SRC/clascl.f
@@ -1,9 +1,138 @@
+*> \brief \b CLASCL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TYPE
+* INTEGER INFO, KL, KU, LDA, M, N
+* REAL CFROM, CTO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLASCL multiplies the M by N complex matrix A by the real scalar
+*> CTO/CFROM. This is done without over/underflow as long as the final
+*> result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
+*> A may be full, upper triangular, lower triangular, upper Hessenberg,
+*> or banded.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> TYPE indices the storage type of the input matrix.
+*> = 'G': A is a full matrix.
+*> = 'L': A is a lower triangular matrix.
+*> = 'U': A is an upper triangular matrix.
+*> = 'H': A is an upper Hessenberg matrix.
+*> = 'B': A is a symmetric band matrix with lower bandwidth KL
+*> and upper bandwidth KU and with the only the lower
+*> half stored.
+*> = 'Q': A is a symmetric band matrix with lower bandwidth KL
+*> and upper bandwidth KU and with the only the upper
+*> half stored.
+*> = 'Z': A is a band matrix with lower bandwidth KL and upper
+*> bandwidth KU. See CGBTRF for storage details.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower bandwidth of A. Referenced only if TYPE = 'B',
+*> 'Q' or 'Z'.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper bandwidth of A. Referenced only if TYPE = 'B',
+*> 'Q' or 'Z'.
+*> \endverbatim
+*>
+*> \param[in] CFROM
+*> \verbatim
+*> CFROM is REAL
+*> \param[in] CTO
+*> \verbatim
+*> CTO is REAL
+*> The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
+*> without over/underflow if the final result CTO*A(I,J)/CFROM
+*> can be represented without over/underflow. CFROM must be
+*> nonzero.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The matrix to be multiplied by CTO/CFROM. See TYPE for the
+*> storage type.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 - successful exit
+*> <0 - if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TYPE
@@ -14,65 +143,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLASCL multiplies the M by N complex matrix A by the real scalar
-* CTO/CFROM. This is done without over/underflow as long as the final
-* result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
-* A may be full, upper triangular, lower triangular, upper Hessenberg,
-* or banded.
-*
-* Arguments
-* =========
-*
-* TYPE (input) CHARACTER*1
-* TYPE indices the storage type of the input matrix.
-* = 'G': A is a full matrix.
-* = 'L': A is a lower triangular matrix.
-* = 'U': A is an upper triangular matrix.
-* = 'H': A is an upper Hessenberg matrix.
-* = 'B': A is a symmetric band matrix with lower bandwidth KL
-* and upper bandwidth KU and with the only the lower
-* half stored.
-* = 'Q': A is a symmetric band matrix with lower bandwidth KL
-* and upper bandwidth KU and with the only the upper
-* half stored.
-* = 'Z': A is a band matrix with lower bandwidth KL and upper
-* bandwidth KU. See CGBTRF for storage details.
-*
-* KL (input) INTEGER
-* The lower bandwidth of A. Referenced only if TYPE = 'B',
-* 'Q' or 'Z'.
-*
-* KU (input) INTEGER
-* The upper bandwidth of A. Referenced only if TYPE = 'B',
-* 'Q' or 'Z'.
-*
-* CFROM (input) REAL
-* CTO (input) REAL
-* The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
-* without over/underflow if the final result CTO*A(I,J)/CFROM
-* can be represented without over/underflow. CFROM must be
-* nonzero.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* The matrix to be multiplied by CTO/CFROM. See TYPE for the
-* storage type.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* INFO (output) INTEGER
-* 0 - successful exit
-* <0 - if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clascl2.f b/SRC/clascl2.f
index 489d8d28..9efe93df 100644
--- a/SRC/clascl2.f
+++ b/SRC/clascl2.f
@@ -1,51 +1,100 @@
- SUBROUTINE CLASCL2 ( M, N, D, X, LDX )
+*> \brief \b CLASCL2
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER M, N, LDX
-* ..
-* .. Array Arguments ..
- REAL D( * )
- COMPLEX X( LDX, * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CLASCL2 ( M, N, D, X, LDX )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* COMPLEX X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* CLASCL2 performs a diagonal scaling on a vector:
-* x <-- D * x
-* where the diagonal REAL matrix D is stored as a vector.
-*
-* Eventually to be replaced by BLAS_cge_diag_scale in the new BLAS
-* standard.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLASCL2 performs a diagonal scaling on a vector:
+*> x <-- D * x
+*> where the diagonal REAL matrix D is stored as a vector.
+*>
+*> Eventually to be replaced by BLAS_cge_diag_scale in the new BLAS
+*> standard.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of D and X. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of D and X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of D and X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, length M
+*> Diagonal matrix D, stored as a vector of length M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,N)
+*> On entry, the vector X to be scaled by D.
+*> On exit, the scaled vector.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the vector X. LDX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of D and X. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) REAL array, length M
-* Diagonal matrix D, stored as a vector of length M.
+*> \date November 2011
*
-* X (input/output) COMPLEX array, dimension (LDX,N)
-* On entry, the vector X to be scaled by D.
-* On exit, the scaled vector.
+*> \ingroup complexOTHERcomputational
*
-* LDX (input) INTEGER
-* The leading dimension of the vector X. LDX >= 0.
+* =====================================================================
+ SUBROUTINE CLASCL2 ( M, N, D, X, LDX )
+*
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+ REAL D( * )
+ COMPLEX X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/claset.f b/SRC/claset.f
index 7c0cbddb..75344a92 100644
--- a/SRC/claset.f
+++ b/SRC/claset.f
@@ -1,9 +1,107 @@
+*> \brief \b CLASET
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, M, N
+* COMPLEX ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLASET initializes a 2-D array A to BETA on the diagonal and
+*> ALPHA on the offdiagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be set.
+*> = 'U': Upper triangular part is set. The lower triangle
+*> is unchanged.
+*> = 'L': Lower triangular part is set. The upper triangle
+*> is unchanged.
+*> Otherwise: All of the matrix A is set.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of A.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> All the offdiagonal array elements are set to ALPHA.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> All the diagonal array elements are set to BETA.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the m by n matrix A.
+*> On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
+*> A(i,i) = BETA , 1 <= i <= min(m,n)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,43 +112,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLASET initializes a 2-D array A to BETA on the diagonal and
-* ALPHA on the offdiagonals.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be set.
-* = 'U': Upper triangular part is set. The lower triangle
-* is unchanged.
-* = 'L': Lower triangular part is set. The upper triangle
-* is unchanged.
-* Otherwise: All of the matrix A is set.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of A.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of A.
-*
-* ALPHA (input) COMPLEX
-* All the offdiagonal array elements are set to ALPHA.
-*
-* BETA (input) COMPLEX
-* All the diagonal array elements are set to BETA.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
-* A(i,i) = BETA , 1 <= i <= min(m,n)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/clasr.f b/SRC/clasr.f
index 5f18a4b2..8464cd9b 100644
--- a/SRC/clasr.f
+++ b/SRC/clasr.f
@@ -1,9 +1,201 @@
+*> \brief \b CLASR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, PIVOT, SIDE
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL C( * ), S( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLASR applies a sequence of real plane rotations to a complex matrix
+*> A, from either the left or the right.
+*>
+*> When SIDE = 'L', the transformation takes the form
+*>
+*> A := P*A
+*>
+*> and when SIDE = 'R', the transformation takes the form
+*>
+*> A := A*P**T
+*>
+*> where P is an orthogonal matrix consisting of a sequence of z plane
+*> rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
+*> and P**T is the transpose of P.
+*>
+*> When DIRECT = 'F' (Forward sequence), then
+*>
+*> P = P(z-1) * ... * P(2) * P(1)
+*>
+*> and when DIRECT = 'B' (Backward sequence), then
+*>
+*> P = P(1) * P(2) * ... * P(z-1)
+*>
+*> where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
+*>
+*> R(k) = ( c(k) s(k) )
+*> = ( -s(k) c(k) ).
+*>
+*> When PIVOT = 'V' (Variable pivot), the rotation is performed
+*> for the plane (k,k+1), i.e., P(k) has the form
+*>
+*> P(k) = ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( c(k) s(k) )
+*> ( -s(k) c(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*>
+*> where R(k) appears as a rank-2 modification to the identity matrix in
+*> rows and columns k and k+1.
+*>
+*> When PIVOT = 'T' (Top pivot), the rotation is performed for the
+*> plane (1,k+1), so P(k) has the form
+*>
+*> P(k) = ( c(k) s(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( -s(k) c(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*>
+*> where R(k) appears in rows and columns 1 and k+1.
+*>
+*> Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
+*> performed for the plane (k,z), giving P(k) the form
+*>
+*> P(k) = ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( c(k) s(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( -s(k) c(k) )
+*>
+*> where R(k) appears in rows and columns k and z. The rotations are
+*> performed without ever forming P(k) explicitly.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> Specifies whether the plane rotation matrix P is applied to
+*> A on the left or the right.
+*> = 'L': Left, compute A := P*A
+*> = 'R': Right, compute A:= A*P**T
+*> \endverbatim
+*>
+*> \param[in] PIVOT
+*> \verbatim
+*> PIVOT is CHARACTER*1
+*> Specifies the plane for which P(k) is a plane rotation
+*> matrix.
+*> = 'V': Variable pivot, the plane (k,k+1)
+*> = 'T': Top pivot, the plane (1,k+1)
+*> = 'B': Bottom pivot, the plane (k,z)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies whether P is a forward or backward sequence of
+*> plane rotations.
+*> = 'F': Forward, P = P(z-1)*...*P(2)*P(1)
+*> = 'B': Backward, P = P(1)*P(2)*...*P(z-1)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. If m <= 1, an immediate
+*> return is effected.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. If n <= 1, an
+*> immediate return is effected.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> The cosines c(k) of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> The sines s(k) of the plane rotations. The 2-by-2 plane
+*> rotation part of the matrix P(k), R(k), has the form
+*> R(k) = ( c(k) s(k) )
+*> ( -s(k) c(k) ).
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix A. On exit, A is overwritten by P*A if
+*> SIDE = 'R' or by A*P**T if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIRECT, PIVOT, SIDE
@@ -14,131 +206,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLASR applies a sequence of real plane rotations to a complex matrix
-* A, from either the left or the right.
-*
-* When SIDE = 'L', the transformation takes the form
-*
-* A := P*A
-*
-* and when SIDE = 'R', the transformation takes the form
-*
-* A := A*P**T
-*
-* where P is an orthogonal matrix consisting of a sequence of z plane
-* rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
-* and P**T is the transpose of P.
-*
-* When DIRECT = 'F' (Forward sequence), then
-*
-* P = P(z-1) * ... * P(2) * P(1)
-*
-* and when DIRECT = 'B' (Backward sequence), then
-*
-* P = P(1) * P(2) * ... * P(z-1)
-*
-* where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
-*
-* R(k) = ( c(k) s(k) )
-* = ( -s(k) c(k) ).
-*
-* When PIVOT = 'V' (Variable pivot), the rotation is performed
-* for the plane (k,k+1), i.e., P(k) has the form
-*
-* P(k) = ( 1 )
-* ( ... )
-* ( 1 )
-* ( c(k) s(k) )
-* ( -s(k) c(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-*
-* where R(k) appears as a rank-2 modification to the identity matrix in
-* rows and columns k and k+1.
-*
-* When PIVOT = 'T' (Top pivot), the rotation is performed for the
-* plane (1,k+1), so P(k) has the form
-*
-* P(k) = ( c(k) s(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-* ( -s(k) c(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-*
-* where R(k) appears in rows and columns 1 and k+1.
-*
-* Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
-* performed for the plane (k,z), giving P(k) the form
-*
-* P(k) = ( 1 )
-* ( ... )
-* ( 1 )
-* ( c(k) s(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-* ( -s(k) c(k) )
-*
-* where R(k) appears in rows and columns k and z. The rotations are
-* performed without ever forming P(k) explicitly.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* Specifies whether the plane rotation matrix P is applied to
-* A on the left or the right.
-* = 'L': Left, compute A := P*A
-* = 'R': Right, compute A:= A*P**T
-*
-* PIVOT (input) CHARACTER*1
-* Specifies the plane for which P(k) is a plane rotation
-* matrix.
-* = 'V': Variable pivot, the plane (k,k+1)
-* = 'T': Top pivot, the plane (1,k+1)
-* = 'B': Bottom pivot, the plane (k,z)
-*
-* DIRECT (input) CHARACTER*1
-* Specifies whether P is a forward or backward sequence of
-* plane rotations.
-* = 'F': Forward, P = P(z-1)*...*P(2)*P(1)
-* = 'B': Backward, P = P(1)*P(2)*...*P(z-1)
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. If m <= 1, an immediate
-* return is effected.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. If n <= 1, an
-* immediate return is effected.
-*
-* C (input) REAL array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* The cosines c(k) of the plane rotations.
-*
-* S (input) REAL array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* The sines s(k) of the plane rotations. The 2-by-2 plane
-* rotation part of the matrix P(k), R(k), has the form
-* R(k) = ( c(k) s(k) )
-* ( -s(k) c(k) ).
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix A. On exit, A is overwritten by P*A if
-* SIDE = 'R' or by A*P**T if SIDE = 'L'.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/classq.f b/SRC/classq.f
index 8232f97e..fbf4afc6 100644
--- a/SRC/classq.f
+++ b/SRC/classq.f
@@ -1,9 +1,107 @@
+*> \brief \b CLASSQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLASSQ( N, X, INCX, SCALE, SUMSQ )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* REAL SCALE, SUMSQ
+* ..
+* .. Array Arguments ..
+* COMPLEX X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLASSQ returns the values scl and ssq such that
+*>
+*> ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
+*>
+*> where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
+*> assumed to be at least unity and the value of ssq will then satisfy
+*>
+*> 1.0 .le. ssq .le. ( sumsq + 2*n ).
+*>
+*> scale is assumed to be non-negative and scl returns the value
+*>
+*> scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
+*> i
+*>
+*> scale and sumsq must be supplied in SCALE and SUMSQ respectively.
+*> SCALE and SUMSQ are overwritten by scl and ssq respectively.
+*>
+*> The routine makes only one pass through the vector X.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements to be used from the vector X.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> The vector x as described above.
+*> x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of the vector X.
+*> INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On entry, the value scale in the equation above.
+*> On exit, SCALE is overwritten with the value scl .
+*> \endverbatim
+*>
+*> \param[in,out] SUMSQ
+*> \verbatim
+*> SUMSQ is REAL
+*> On entry, the value sumsq in the equation above.
+*> On exit, SUMSQ is overwritten with the value ssq .
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLASSQ( N, X, INCX, SCALE, SUMSQ )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,50 +111,6 @@
COMPLEX X( * )
* ..
*
-* Purpose
-* =======
-*
-* CLASSQ returns the values scl and ssq such that
-*
-* ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
-*
-* where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
-* assumed to be at least unity and the value of ssq will then satisfy
-*
-* 1.0 .le. ssq .le. ( sumsq + 2*n ).
-*
-* scale is assumed to be non-negative and scl returns the value
-*
-* scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
-* i
-*
-* scale and sumsq must be supplied in SCALE and SUMSQ respectively.
-* SCALE and SUMSQ are overwritten by scl and ssq respectively.
-*
-* The routine makes only one pass through the vector X.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of elements to be used from the vector X.
-*
-* X (input) COMPLEX array, dimension (N)
-* The vector x as described above.
-* x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
-*
-* INCX (input) INTEGER
-* The increment between successive values of the vector X.
-* INCX > 0.
-*
-* SCALE (input/output) REAL
-* On entry, the value scale in the equation above.
-* On exit, SCALE is overwritten with the value scl .
-*
-* SUMSQ (input/output) REAL
-* On entry, the value sumsq in the equation above.
-* On exit, SUMSQ is overwritten with the value ssq .
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/claswp.f b/SRC/claswp.f
index 206e1f5f..e72d44c2 100644
--- a/SRC/claswp.f
+++ b/SRC/claswp.f
@@ -1,60 +1,125 @@
- SUBROUTINE CLASWP( N, A, LDA, K1, K2, IPIV, INCX )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCX, K1, K2, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * )
-* ..
-*
+*> \brief \b CLASWP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, K1, K2, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CLASWP performs a series of row interchanges on the matrix A.
-* One row interchange is initiated for each of rows K1 through K2 of A.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLASWP performs a series of row interchanges on the matrix A.
+*> One row interchange is initiated for each of rows K1 through K2 of A.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the matrix of column dimension N to which the row
-* interchanges will be applied.
-* On exit, the permuted matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the matrix of column dimension N to which the row
+*> interchanges will be applied.
+*> On exit, the permuted matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] K1
+*> \verbatim
+*> K1 is INTEGER
+*> The first element of IPIV for which a row interchange will
+*> be done.
+*> \endverbatim
+*>
+*> \param[in] K2
+*> \verbatim
+*> K2 is INTEGER
+*> The last element of IPIV for which a row interchange will
+*> be done.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (K2*abs(INCX))
+*> The vector of pivot indices. Only the elements in positions
+*> K1 through K2 of IPIV are accessed.
+*> IPIV(K) = L implies rows K and L are to be interchanged.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of IPIV. If IPIV
+*> is negative, the pivots are applied in reverse order.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K1 (input) INTEGER
-* The first element of IPIV for which a row interchange will
-* be done.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* K2 (input) INTEGER
-* The last element of IPIV for which a row interchange will
-* be done.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (K2*abs(INCX))
-* The vector of pivot indices. Only the elements in positions
-* K1 through K2 of IPIV are accessed.
-* IPIV(K) = L implies rows K and L are to be interchanged.
+*> \ingroup complexOTHERauxiliary
*
-* INCX (input) INTEGER
-* The increment between successive values of IPIV. If IPIV
-* is negative, the pivots are applied in reverse order.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by
+*> R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by
-* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* .. Scalar Arguments ..
+ INTEGER INCX, K1, K2, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clasyf.f b/SRC/clasyf.f
index 643d0efb..5e39317a 100644
--- a/SRC/clasyf.f
+++ b/SRC/clasyf.f
@@ -1,9 +1,159 @@
+*> \brief \b CLASYF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KB, LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), W( LDW, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLASYF computes a partial factorization of a complex symmetric matrix
+*> A using the Bunch-Kaufman diagonal pivoting method. The partial
+*> factorization has the form:
+*>
+*> A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
+*> ( 0 U22 ) ( 0 D ) ( U12**T U22**T )
+*>
+*> A = ( L11 0 ) ( D 0 ) ( L11**T L21**T ) if UPLO = 'L'
+*> ( L21 I ) ( 0 A22 ) ( 0 I )
+*>
+*> where the order of D is at most NB. The actual order is returned in
+*> the argument KB, and is either NB or NB-1, or N if N <= NB.
+*> Note that U**T denotes the transpose of U.
+*>
+*> CLASYF is an auxiliary routine called by CSYTRF. It uses blocked code
+*> (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
+*> A22 (if UPLO = 'L').
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The maximum number of columns of the matrix A that should be
+*> factored. NB should be at least 2 to allow for 2-by-2 pivot
+*> blocks.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns of A that were actually factored.
+*> KB is either NB-1 or NB, or N if N <= NB.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> On exit, A contains details of the partial factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If UPLO = 'U', only the last KB elements of IPIV are set;
+*> if UPLO = 'L', only the first KB elements are set.
+*> \endverbatim
+*> \verbatim
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (LDW,NB)
+*> \endverbatim
+*>
+*> \param[in] LDW
+*> \verbatim
+*> LDW is INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+* =====================================================================
SUBROUTINE CLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,85 +164,6 @@
COMPLEX A( LDA, * ), W( LDW, * )
* ..
*
-* Purpose
-* =======
-*
-* CLASYF computes a partial factorization of a complex symmetric matrix
-* A using the Bunch-Kaufman diagonal pivoting method. The partial
-* factorization has the form:
-*
-* A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
-* ( 0 U22 ) ( 0 D ) ( U12**T U22**T )
-*
-* A = ( L11 0 ) ( D 0 ) ( L11**T L21**T ) if UPLO = 'L'
-* ( L21 I ) ( 0 A22 ) ( 0 I )
-*
-* where the order of D is at most NB. The actual order is returned in
-* the argument KB, and is either NB or NB-1, or N if N <= NB.
-* Note that U**T denotes the transpose of U.
-*
-* CLASYF is an auxiliary routine called by CSYTRF. It uses blocked code
-* (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
-* A22 (if UPLO = 'L').
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The maximum number of columns of the matrix A that should be
-* factored. NB should be at least 2 to allow for 2-by-2 pivot
-* blocks.
-*
-* KB (output) INTEGER
-* The number of columns of A that were actually factored.
-* KB is either NB-1 or NB, or N if N <= NB.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, A contains details of the partial factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If UPLO = 'U', only the last KB elements of IPIV are set;
-* if UPLO = 'L', only the first KB elements are set.
-*
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* W (workspace) COMPLEX array, dimension (LDW,NB)
-*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clatbs.f b/SRC/clatbs.f
index c03d002d..2766fbb2 100644
--- a/SRC/clatbs.f
+++ b/SRC/clatbs.f
@@ -1,10 +1,248 @@
+*> \brief \b CLATBS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
+* SCALE, CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* REAL CNORM( * )
+* COMPLEX AB( LDAB, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATBS solves one of the triangular systems
+*>
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
+*>
+*> with scaling to prevent overflow, where A is an upper or lower
+*> triangular band matrix. Here A**T denotes the transpose of A, x and b
+*> are n-element vectors, and s is a scaling factor, usually less than
+*> or equal to 1, chosen so that the components of x will be less than
+*> the overflow threshold. If the unscaled problem will not cause
+*> overflow, the Level 2 BLAS routine CTBSV is called. If the matrix A
+*> is singular (A(j,j) = 0 for some j), then s is set to 0 and a
+*> non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T * x = s*b (Transpose)
+*> = 'C': Solve A**H * x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of subdiagonals or superdiagonals in the
+*> triangular matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s for the triangular system
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, CTBSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine CTBSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T *x = b or
+*> A**H *x = b. The basic algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call CTBSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
$ SCALE, CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -16,159 +254,6 @@
COMPLEX AB( LDAB, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATBS solves one of the triangular systems
-*
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
-*
-* with scaling to prevent overflow, where A is an upper or lower
-* triangular band matrix. Here A**T denotes the transpose of A, x and b
-* are n-element vectors, and s is a scaling factor, usually less than
-* or equal to 1, chosen so that the components of x will be less than
-* the overflow threshold. If the unscaled problem will not cause
-* overflow, the Level 2 BLAS routine CTBSV is called. If the matrix A
-* is singular (A(j,j) = 0 for some j), then s is set to 0 and a
-* non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T * x = s*b (Transpose)
-* = 'C': Solve A**H * x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of subdiagonals or superdiagonals in the
-* triangular matrix A. KD >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* X (input/output) COMPLEX array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) REAL
-* The scaling factor s for the triangular system
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) REAL array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, CTBSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine CTBSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T *x = b or
-* A**H *x = b. The basic algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call CTBSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clatdf.f b/SRC/clatdf.f
index b053fe27..55a103db 100644
--- a/SRC/clatdf.f
+++ b/SRC/clatdf.f
@@ -1,10 +1,170 @@
+*> \brief \b CLATDF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
+* JPIV )
+*
+* .. Scalar Arguments ..
+* INTEGER IJOB, LDZ, N
+* REAL RDSCAL, RDSUM
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* COMPLEX RHS( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATDF computes the contribution to the reciprocal Dif-estimate
+*> by solving for x in Z * x = b, where b is chosen such that the norm
+*> of x is as large as possible. It is assumed that LU decomposition
+*> of Z has been computed by CGETC2. On entry RHS = f holds the
+*> contribution from earlier solved sub-systems, and on return RHS = x.
+*>
+*> The factorization of Z returned by CGETC2 has the form
+*> Z = P * L * U * Q, where P and Q are permutation matrices. L is lower
+*> triangular with unit diagonal elements and U is upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> IJOB = 2: First compute an approximative null-vector e
+*> of Z using CGECON, e is normalized and solve for
+*> Zx = +-e - f with the sign giving the greater value of
+*> 2-norm(x). About 5 times as expensive as Default.
+*> IJOB .ne. 2: Local look ahead strategy where
+*> all entries of the r.h.s. b is choosen as either +1 or
+*> -1. Default.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Z.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> On entry, the LU part of the factorization of the n-by-n
+*> matrix Z computed by CGETC2: Z = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*> RHS is REAL array, dimension (N).
+*> On entry, RHS contains contributions from other subsystems.
+*> On exit, RHS contains the solution of the subsystem with
+*> entries according to the value of IJOB (see above).
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*> RDSUM is REAL
+*> On entry, the sum of squares of computed contributions to
+*> the Dif-estimate under computation by CTGSYL, where the
+*> scaling factor RDSCAL (see below) has been factored out.
+*> On exit, the corresponding sum of squares updated with the
+*> contributions from the current sub-system.
+*> If TRANS = 'T' RDSUM is not touched.
+*> NOTE: RDSUM only makes sense when CTGSY2 is called by CTGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*> RDSCAL is REAL
+*> On entry, scaling factor used to prevent overflow in RDSUM.
+*> On exit, RDSCAL is updated w.r.t. the current contributions
+*> in RDSUM.
+*> If TRANS = 'T', RDSCAL is not touched.
+*> NOTE: RDSCAL only makes sense when CTGSY2 is called by
+*> CTGSYL.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> This routine is a further developed implementation of algorithm
+*> BSOLVE in [1] using complete pivoting in the LU factorization.
+*>
+*> [1] Bo Kagstrom and Lars Westin,
+*> Generalized Schur Methods with Condition Estimators for
+*> Solving the Generalized Sylvester Equation, IEEE Transactions
+*> on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
+*>
+*> [2] Peter Poromaa,
+*> On Efficient and Robust Estimators for the Separation
+*> between two Regular Matrix Pairs with Applications in
+*> Condition Estimation. Report UMINF-95.05, Department of
+*> Computing Science, Umea University, S-901 87 Umea, Sweden,
+*> 1995.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
$ JPIV )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IJOB, LDZ, N
@@ -15,93 +175,6 @@
COMPLEX RHS( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CLATDF computes the contribution to the reciprocal Dif-estimate
-* by solving for x in Z * x = b, where b is chosen such that the norm
-* of x is as large as possible. It is assumed that LU decomposition
-* of Z has been computed by CGETC2. On entry RHS = f holds the
-* contribution from earlier solved sub-systems, and on return RHS = x.
-*
-* The factorization of Z returned by CGETC2 has the form
-* Z = P * L * U * Q, where P and Q are permutation matrices. L is lower
-* triangular with unit diagonal elements and U is upper triangular.
-*
-* Arguments
-* =========
-*
-* IJOB (input) INTEGER
-* IJOB = 2: First compute an approximative null-vector e
-* of Z using CGECON, e is normalized and solve for
-* Zx = +-e - f with the sign giving the greater value of
-* 2-norm(x). About 5 times as expensive as Default.
-* IJOB .ne. 2: Local look ahead strategy where
-* all entries of the r.h.s. b is choosen as either +1 or
-* -1. Default.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Z.
-*
-* Z (input) REAL array, dimension (LDZ, N)
-* On entry, the LU part of the factorization of the n-by-n
-* matrix Z computed by CGETC2: Z = P * L * U * Q
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDA >= max(1, N).
-*
-* RHS (input/output) REAL array, dimension (N).
-* On entry, RHS contains contributions from other subsystems.
-* On exit, RHS contains the solution of the subsystem with
-* entries according to the value of IJOB (see above).
-*
-* RDSUM (input/output) REAL
-* On entry, the sum of squares of computed contributions to
-* the Dif-estimate under computation by CTGSYL, where the
-* scaling factor RDSCAL (see below) has been factored out.
-* On exit, the corresponding sum of squares updated with the
-* contributions from the current sub-system.
-* If TRANS = 'T' RDSUM is not touched.
-* NOTE: RDSUM only makes sense when CTGSY2 is called by CTGSYL.
-*
-* RDSCAL (input/output) REAL
-* On entry, scaling factor used to prevent overflow in RDSUM.
-* On exit, RDSCAL is updated w.r.t. the current contributions
-* in RDSUM.
-* If TRANS = 'T', RDSCAL is not touched.
-* NOTE: RDSCAL only makes sense when CTGSY2 is called by
-* CTGSYL.
-*
-* IPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
-*
-* JPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* This routine is a further developed implementation of algorithm
-* BSOLVE in [1] using complete pivoting in the LU factorization.
-*
-* [1] Bo Kagstrom and Lars Westin,
-* Generalized Schur Methods with Condition Estimators for
-* Solving the Generalized Sylvester Equation, IEEE Transactions
-* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
-*
-* [2] Peter Poromaa,
-* On Efficient and Robust Estimators for the Separation
-* between two Regular Matrix Pairs with Applications in
-* Condition Estimation. Report UMINF-95.05, Department of
-* Computing Science, Umea University, S-901 87 Umea, Sweden,
-* 1995.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clatps.f b/SRC/clatps.f
index cf91950b..c7cd0965 100644
--- a/SRC/clatps.f
+++ b/SRC/clatps.f
@@ -1,10 +1,236 @@
+*> \brief \b CLATPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
+* CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* REAL CNORM( * )
+* COMPLEX AP( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATPS solves one of the triangular systems
+*>
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
+*>
+*> with scaling to prevent overflow, where A is an upper or lower
+*> triangular matrix stored in packed form. Here A**T denotes the
+*> transpose of A, A**H denotes the conjugate transpose of A, x and b
+*> are n-element vectors, and s is a scaling factor, usually less than
+*> or equal to 1, chosen so that the components of x will be less than
+*> the overflow threshold. If the unscaled problem will not cause
+*> overflow, the Level 2 BLAS routine CTPSV is called. If the matrix A
+*> is singular (A(j,j) = 0 for some j), then s is set to 0 and a
+*> non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T * x = s*b (Transpose)
+*> = 'C': Solve A**H * x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s for the triangular system
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, CTPSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine CTPSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T *x = b or
+*> A**H *x = b. The basic algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call CTPSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
$ CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -16,153 +242,6 @@
COMPLEX AP( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATPS solves one of the triangular systems
-*
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
-*
-* with scaling to prevent overflow, where A is an upper or lower
-* triangular matrix stored in packed form. Here A**T denotes the
-* transpose of A, A**H denotes the conjugate transpose of A, x and b
-* are n-element vectors, and s is a scaling factor, usually less than
-* or equal to 1, chosen so that the components of x will be less than
-* the overflow threshold. If the unscaled problem will not cause
-* overflow, the Level 2 BLAS routine CTPSV is called. If the matrix A
-* is singular (A(j,j) = 0 for some j), then s is set to 0 and a
-* non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T * x = s*b (Transpose)
-* = 'C': Solve A**H * x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* X (input/output) COMPLEX array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) REAL
-* The scaling factor s for the triangular system
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) REAL array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, CTPSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine CTPSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T *x = b or
-* A**H *x = b. The basic algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call CTPSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clatrd.f b/SRC/clatrd.f
index 4a3aecd5..9c3a5689 100644
--- a/SRC/clatrd.f
+++ b/SRC/clatrd.f
@@ -1,139 +1,174 @@
- SUBROUTINE CLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDW, N, NB
-* ..
-* .. Array Arguments ..
- REAL E( * )
- COMPLEX A( LDA, * ), TAU( * ), W( LDW, * )
-* ..
-*
+*> \brief \b CLATRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* REAL E( * )
+* COMPLEX A( LDA, * ), TAU( * ), W( LDW, * )
+* ..
+*
* Purpose
* =======
*
-* CLATRD reduces NB rows and columns of a complex Hermitian matrix A to
-* Hermitian tridiagonal form by a unitary similarity
-* transformation Q**H * A * Q, and returns the matrices V and W which are
-* needed to apply the transformation to the unreduced part of A.
-*
-* If UPLO = 'U', CLATRD reduces the last NB rows and columns of a
-* matrix, of which the upper triangle is supplied;
-* if UPLO = 'L', CLATRD reduces the first NB rows and columns of a
-* matrix, of which the lower triangle is supplied.
-*
-* This is an auxiliary routine called by CHETRD.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATRD reduces NB rows and columns of a complex Hermitian matrix A to
+*> Hermitian tridiagonal form by a unitary similarity
+*> transformation Q**H * A * Q, and returns the matrices V and W which are
+*> needed to apply the transformation to the unreduced part of A.
+*>
+*> If UPLO = 'U', CLATRD reduces the last NB rows and columns of a
+*> matrix, of which the upper triangle is supplied;
+*> if UPLO = 'L', CLATRD reduces the first NB rows and columns of a
+*> matrix, of which the lower triangle is supplied.
+*>
+*> This is an auxiliary routine called by CHETRD.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NB (input) INTEGER
-* The number of rows and columns to be reduced.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit:
-* if UPLO = 'U', the last NB columns have been reduced to
-* tridiagonal form, with the diagonal elements overwriting
-* the diagonal elements of A; the elements above the diagonal
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors;
-* if UPLO = 'L', the first NB columns have been reduced to
-* tridiagonal form, with the diagonal elements overwriting
-* the diagonal elements of A; the elements below the diagonal
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of rows and columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (output) REAL array, dimension (N-1)
-* If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
-* elements of the last NB columns of the reduced matrix;
-* if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
-* the first NB columns of the reduced matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (N-1)
-* The scalar factors of the elementary reflectors, stored in
-* TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
-* See Further Details.
+*> \date November 2011
*
-* W (output) COMPLEX array, dimension (LDW,NB)
-* The n-by-nb matrix W required to update the unreduced part
-* of A.
+*> \ingroup complexOTHERauxiliary
*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> E (output) REAL array, dimension (N-1)
+*> If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
+*> elements of the last NB columns of the reduced matrix;
+*> if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
+*> the first NB columns of the reduced matrix.
+*>
+*> TAU (output) COMPLEX array, dimension (N-1)
+*> The scalar factors of the elementary reflectors, stored in
+*> TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
+*> See Further Details.
+*>
+*> W (output) COMPLEX array, dimension (LDW,NB)
+*> The n-by-nb matrix W required to update the unreduced part
+*> of A.
+*>
+*> LDW (input) INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n) H(n-1) . . . H(n-nb+1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
+*> and tau in TAU(i-1).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*> and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the n-by-nb matrix V
+*> which is needed, with W, to apply the transformation to the unreduced
+*> part of the matrix, using a Hermitian rank-2k update of the form:
+*> A := A - V*W**H - W*V**H.
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5 and nb = 2:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( a a a v4 v5 ) ( d )
+*> ( a a v4 v5 ) ( 1 d )
+*> ( a 1 v5 ) ( v1 1 a )
+*> ( d 1 ) ( v1 v2 a a )
+*> ( d ) ( v1 v2 a a a )
+*>
+*> where d denotes a diagonal element of the reduced matrix, a denotes
+*> an element of the original matrix that is unchanged, and vi denotes
+*> an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n) H(n-1) . . . H(n-nb+1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
-* and tau in TAU(i-1).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-* and tau in TAU(i).
-*
-* The elements of the vectors v together form the n-by-nb matrix V
-* which is needed, with W, to apply the transformation to the unreduced
-* part of the matrix, using a Hermitian rank-2k update of the form:
-* A := A - V*W**H - W*V**H.
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5 and nb = 2:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( a a a v4 v5 ) ( d )
-* ( a a v4 v5 ) ( 1 d )
-* ( a 1 v5 ) ( v1 1 a )
-* ( d 1 ) ( v1 v2 a a )
-* ( d ) ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d denotes a diagonal element of the reduced matrix, a denotes
-* an element of the original matrix that is unchanged, and vi denotes
-* an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+ REAL E( * )
+ COMPLEX A( LDA, * ), TAU( * ), W( LDW, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clatrs.f b/SRC/clatrs.f
index cc398ed8..d2599aeb 100644
--- a/SRC/clatrs.f
+++ b/SRC/clatrs.f
@@ -1,10 +1,244 @@
+*> \brief \b CLATRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
+* CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, LDA, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* REAL CNORM( * )
+* COMPLEX A( LDA, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATRS solves one of the triangular systems
+*>
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
+*>
+*> with scaling to prevent overflow. Here A is an upper or lower
+*> triangular matrix, A**T denotes the transpose of A, A**H denotes the
+*> conjugate transpose of A, x and b are n-element vectors, and s is a
+*> scaling factor, usually less than or equal to 1, chosen so that the
+*> components of x will be less than the overflow threshold. If the
+*> unscaled problem will not cause overflow, the Level 2 BLAS routine
+*> CTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
+*> then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T * x = s*b (Transpose)
+*> = 'C': Solve A**H * x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max (1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s for the triangular system
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, CTRSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine CTRSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T *x = b or
+*> A**H *x = b. The basic algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call CTRSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
$ CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -16,158 +250,6 @@
COMPLEX A( LDA, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATRS solves one of the triangular systems
-*
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
-*
-* with scaling to prevent overflow. Here A is an upper or lower
-* triangular matrix, A**T denotes the transpose of A, A**H denotes the
-* conjugate transpose of A, x and b are n-element vectors, and s is a
-* scaling factor, usually less than or equal to 1, chosen so that the
-* components of x will be less than the overflow threshold. If the
-* unscaled problem will not cause overflow, the Level 2 BLAS routine
-* CTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
-* then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T * x = s*b (Transpose)
-* = 'C': Solve A**H * x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max (1,N).
-*
-* X (input/output) COMPLEX array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) REAL
-* The scaling factor s for the triangular system
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) REAL array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, CTRSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine CTRSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T *x = b or
-* A**H *x = b. The basic algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call CTRSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clatrz.f b/SRC/clatrz.f
index 31713e53..bdccf4f7 100644
--- a/SRC/clatrz.f
+++ b/SRC/clatrz.f
@@ -1,84 +1,148 @@
- SUBROUTINE CLATRZ( M, N, L, A, LDA, TAU, WORK )
+*> \brief \b CLATRZ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER L, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLATRZ( M, N, L, A, LDA, TAU, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER L, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLATRZ factors the M-by-(M+L) complex upper trapezoidal matrix
-* [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z by means
-* of unitary transformations, where Z is an (M+L)-by-(M+L) unitary
-* matrix and, R and A1 are M-by-M upper triangular matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATRZ factors the M-by-(M+L) complex upper trapezoidal matrix
+*> [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z by means
+*> of unitary transformations, where Z is an (M+L)-by-(M+L) unitary
+*> matrix and, R and A1 are M-by-M upper triangular matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing the
-* meaningful part of the Householder vectors. N-M >= L >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing the
+*> meaningful part of the Householder vectors. N-M >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements N-L+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> unitary matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (M)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements N-L+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* unitary matrix Z as a product of M elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAU (output) COMPLEX array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \ingroup complexOTHERcomputational
*
-* WORK (workspace) COMPLEX array, dimension (M)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an l element vector. tau and z( k )
+*> are chosen to annihilate the elements of the kth row of A2.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A2, such that the elements of z( k ) are
+*> in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A1.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLATRZ( M, N, L, A, LDA, TAU, WORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an l element vector. tau and z( k )
-* are chosen to annihilate the elements of the kth row of A2.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A2, such that the elements of z( k ) are
-* in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A1.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER L, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clatzm.f b/SRC/clatzm.f
index ca3431ba..c4ea274c 100644
--- a/SRC/clatzm.f
+++ b/SRC/clatzm.f
@@ -1,92 +1,164 @@
- SUBROUTINE CLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE
- INTEGER INCV, LDC, M, N
- COMPLEX TAU
-* ..
-* .. Array Arguments ..
- COMPLEX C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b CLATZM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, LDC, M, N
+* COMPLEX TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine CUNMRZ.
-*
-* CLATZM applies a Householder matrix generated by CTZRQF to a matrix.
-*
-* Let P = I - tau*u*u**H, u = ( 1 ),
-* ( v )
-* where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
-* SIDE = 'R'.
-*
-* If SIDE equals 'L', let
-* C = [ C1 ] 1
-* [ C2 ] m-1
-* n
-* Then C is overwritten by P*C.
-*
-* If SIDE equals 'R', let
-* C = [ C1, C2 ] m
-* 1 n-1
-* Then C is overwritten by C*P.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine CUNMRZ.
+*>
+*> CLATZM applies a Householder matrix generated by CTZRQF to a matrix.
+*>
+*> Let P = I - tau*u*u**H, u = ( 1 ),
+*> ( v )
+*> where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
+*> SIDE = 'R'.
+*>
+*> If SIDE equals 'L', let
+*> C = [ C1 ] 1
+*> [ C2 ] m-1
+*> n
+*> Then C is overwritten by P*C.
+*>
+*> If SIDE equals 'R', let
+*> C = [ C1, C2 ] m
+*> 1 n-1
+*> Then C is overwritten by C*P.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': form P * C
-* = 'R': form C * P
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) COMPLEX array, dimension
-* (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-* (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-* The vector v in the representation of P. V is not used
-* if TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0
-*
-* TAU (input) COMPLEX
-* The value tau in the representation of P.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form P * C
+*> = 'R': form C * P
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension
+*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*> (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*> The vector v in the representation of P. V is not used
+*> if TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX
+*> The value tau in the representation of P.
+*> \endverbatim
+*>
+*> \param[in,out] C1
+*> \verbatim
+*> C1 is COMPLEX array, dimension
+*> (LDC,N) if SIDE = 'L'
+*> (M,1) if SIDE = 'R'
+*> On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
+*> if SIDE = 'R'.
+*> \endverbatim
+*> \verbatim
+*> On exit, the first row of P*C if SIDE = 'L', or the first
+*> column of C*P if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in,out] C2
+*> \verbatim
+*> C2 is COMPLEX array, dimension
+*> (LDC, N) if SIDE = 'L'
+*> (LDC, N-1) if SIDE = 'R'
+*> On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
+*> m x (n - 1) matrix C2 if SIDE = 'R'.
+*> \endverbatim
+*> \verbatim
+*> On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
+*> if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the arrays C1 and C2.
+*> LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L'
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C1 (input/output) COMPLEX array, dimension
-* (LDC,N) if SIDE = 'L'
-* (M,1) if SIDE = 'R'
-* On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
-* if SIDE = 'R'.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, the first row of P*C if SIDE = 'L', or the first
-* column of C*P if SIDE = 'R'.
+*> \date November 2011
*
-* C2 (input/output) COMPLEX array, dimension
-* (LDC, N) if SIDE = 'L'
-* (LDC, N-1) if SIDE = 'R'
-* On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
-* m x (n - 1) matrix C2 if SIDE = 'R'.
+*> \ingroup complexOTHERcomputational
*
-* On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
-* if SIDE = 'R'.
+* =====================================================================
+ SUBROUTINE CLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the arrays C1 and C2.
-* LDC >= max(1,M).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L'
-* (M) if SIDE = 'R'
+* .. Scalar Arguments ..
+ CHARACTER SIDE
+ INTEGER INCV, LDC, M, N
+ COMPLEX TAU
+* ..
+* .. Array Arguments ..
+ COMPLEX C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/clauu2.f b/SRC/clauu2.f
index 181194d0..6fa3a996 100644
--- a/SRC/clauu2.f
+++ b/SRC/clauu2.f
@@ -1,9 +1,103 @@
+*> \brief \b CLAUU2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAUU2( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAUU2 computes the product U * U**H or L**H * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
+*>
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
+*>
+*> This is the unblocked form of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the triangular factor stored in the array A
+*> is upper or lower triangular:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the triangular factor U or L. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the triangular factor U or L.
+*> On exit, if UPLO = 'U', the upper triangle of A is
+*> overwritten with the upper triangle of the product U * U**H;
+*> if UPLO = 'L', the lower triangle of A is overwritten with
+*> the lower triangle of the product L**H * L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAUU2( UPLO, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,46 +107,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAUU2 computes the product U * U**H or L**H * L, where the triangular
-* factor U or L is stored in the upper or lower triangular part of
-* the array A.
-*
-* If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
-* overwriting the factor U in A.
-* If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
-* overwriting the factor L in A.
-*
-* This is the unblocked form of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the triangular factor stored in the array A
-* is upper or lower triangular:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the triangular factor U or L. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the triangular factor U or L.
-* On exit, if UPLO = 'U', the upper triangle of A is
-* overwritten with the upper triangle of the product U * U**H;
-* if UPLO = 'L', the lower triangle of A is overwritten with
-* the lower triangle of the product L**H * L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/clauum.f b/SRC/clauum.f
index 6d5d6559..dcfa26ea 100644
--- a/SRC/clauum.f
+++ b/SRC/clauum.f
@@ -1,9 +1,103 @@
+*> \brief \b CLAUUM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAUUM( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAUUM computes the product U * U**H or L**H * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
+*>
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
+*>
+*> This is the blocked form of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the triangular factor stored in the array A
+*> is upper or lower triangular:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the triangular factor U or L. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the triangular factor U or L.
+*> On exit, if UPLO = 'U', the upper triangle of A is
+*> overwritten with the upper triangle of the product U * U**H;
+*> if UPLO = 'L', the lower triangle of A is overwritten with
+*> the lower triangle of the product L**H * L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CLAUUM( UPLO, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,46 +107,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAUUM computes the product U * U**H or L**H * L, where the triangular
-* factor U or L is stored in the upper or lower triangular part of
-* the array A.
-*
-* If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
-* overwriting the factor U in A.
-* If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
-* overwriting the factor L in A.
-*
-* This is the blocked form of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the triangular factor stored in the array A
-* is upper or lower triangular:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the triangular factor U or L. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the triangular factor U or L.
-* On exit, if UPLO = 'U', the upper triangle of A is
-* overwritten with the upper triangle of the product U * U**H;
-* if UPLO = 'L', the lower triangle of A is overwritten with
-* the lower triangle of the product L**H * L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpbcon.f b/SRC/cpbcon.f
index 42d5ca1d..c8c4c93e 100644
--- a/SRC/cpbcon.f
+++ b/SRC/cpbcon.f
@@ -1,12 +1,134 @@
+*> \brief \b CPBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex Hermitian positive definite band matrix using
+*> the Cholesky factorization A = U**H*U or A = L*L**H computed by
+*> CPBTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor stored in AB;
+*> = 'L': Lower triangular factor stored in AB.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H of the band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of U or L is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm (or infinity-norm) of the Hermitian band matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
$ RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,58 +140,6 @@
COMPLEX AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CPBCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex Hermitian positive definite band matrix using
-* the Cholesky factorization A = U**H*U or A = L*L**H computed by
-* CPBTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor stored in AB;
-* = 'L': Lower triangular factor stored in AB.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H of the band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of U or L is
-* stored in the j-th column of the array AB as follows:
-* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* ANORM (input) REAL
-* The 1-norm (or infinity-norm) of the Hermitian band matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpbequ.f b/SRC/cpbequ.f
index c968fea7..cd892ada 100644
--- a/SRC/cpbequ.f
+++ b/SRC/cpbequ.f
@@ -1,9 +1,131 @@
+*> \brief \b CPBEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBEQU computes row and column scalings intended to equilibrate a
+*> Hermitian positive definite band matrix A and reduce its condition
+*> number (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular of A is stored;
+*> = 'L': Lower triangular of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangle of the Hermitian band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,60 +137,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CPBEQU computes row and column scalings intended to equilibrate a
-* Hermitian positive definite band matrix A and reduce its condition
-* number (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular of A is stored;
-* = 'L': Lower triangular of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangle of the Hermitian band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KD+1.
-*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
-*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
-*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpbrfs.f b/SRC/cpbrfs.f
index 7c4d0fcf..1fcc6abe 100644
--- a/SRC/cpbrfs.f
+++ b/SRC/cpbrfs.f
@@ -1,12 +1,190 @@
+*> \brief \b CPBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
+* LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian positive definite
+*> and banded, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangle of the Hermitian band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX array, dimension (LDAFB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H of the band matrix A as computed by
+*> CPBTRF, in the same storage format as A (see AB).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CPBTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
$ LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,91 +196,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPBRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian positive definite
-* and banded, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangle of the Hermitian band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* AFB (input) COMPLEX array, dimension (LDAFB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H of the band matrix A as computed by
-* CPBTRF, in the same storage format as A (see AB).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= KD+1.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CPBTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpbstf.f b/SRC/cpbstf.f
index fe1cd307..610d787b 100644
--- a/SRC/cpbstf.f
+++ b/SRC/cpbstf.f
@@ -1,102 +1,157 @@
- SUBROUTINE CPBSTF( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- COMPLEX AB( LDAB, * )
-* ..
-*
+*> \brief \b CPBSTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBSTF( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* CPBSTF computes a split Cholesky factorization of a complex
-* Hermitian positive definite band matrix A.
-*
-* This routine is designed to be used in conjunction with CHBGST.
-*
-* The factorization has the form A = S**H*S where S is a band matrix
-* of the same bandwidth as A and the following structure:
-*
-* S = ( U )
-* ( M L )
-*
-* where U is upper triangular of order m = (n+kd)/2, and L is lower
-* triangular of order n-m.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBSTF computes a split Cholesky factorization of a complex
+*> Hermitian positive definite band matrix A.
+*>
+*> This routine is designed to be used in conjunction with CHBGST.
+*>
+*> The factorization has the form A = S**H*S where S is a band matrix
+*> of the same bandwidth as A and the following structure:
+*>
+*> S = ( U )
+*> ( M L )
+*>
+*> where U is upper triangular of order m = (n+kd)/2, and L is lower
+*> triangular of order n-m.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first kd+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first kd+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the factor S from the split Cholesky
-* factorization A = S**H*S. See Further Details.
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the factorization could not be completed,
-* because the updated element a(i,i) was negative; the
-* matrix A is not positive definite.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* factorization A = S**H*S. See Further Details.
+*>
+*> LDAB (input) INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the factorization could not be completed,
+*> because the updated element a(i,i) was negative; the
+*> matrix A is not positive definite.
+*>
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 7, KD = 2:
+*>
+*> S = ( s11 s12 s13 )
+*> ( s22 s23 s24 )
+*> ( s33 s34 )
+*> ( s44 )
+*> ( s53 s54 s55 )
+*> ( s64 s65 s66 )
+*> ( s75 s76 s77 )
+*>
+*> If UPLO = 'U', the array AB holds:
+*>
+*> on entry: on exit:
+*>
+*> * * a13 a24 a35 a46 a57 * * s13 s24 s53**H s64**H s75**H
+*> * a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54**H s65**H s76**H
+*> a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
+*>
+*> If UPLO = 'L', the array AB holds:
+*>
+*> on entry: on exit:
+*>
+*> a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
+*> a21 a32 a43 a54 a65 a76 * s12**H s23**H s34**H s54 s65 s76 *
+*> a31 a42 a53 a64 a64 * * s13**H s24**H s53 s64 s75 * *
+*>
+*> Array elements marked * are not used by the routine; s12**H denotes
+*> conjg(s12); the diagonal elements of S are real.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPBSTF( UPLO, N, KD, AB, LDAB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 7, KD = 2:
-*
-* S = ( s11 s12 s13 )
-* ( s22 s23 s24 )
-* ( s33 s34 )
-* ( s44 )
-* ( s53 s54 s55 )
-* ( s64 s65 s66 )
-* ( s75 s76 s77 )
-*
-* If UPLO = 'U', the array AB holds:
-*
-* on entry: on exit:
-*
-* * * a13 a24 a35 a46 a57 * * s13 s24 s53**H s64**H s75**H
-* * a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54**H s65**H s76**H
-* a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
-*
-* If UPLO = 'L', the array AB holds:
-*
-* on entry: on exit:
-*
-* a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
-* a21 a32 a43 a54 a65 a76 * s12**H s23**H s34**H s54 s65 s76 *
-* a31 a42 a53 a64 a64 * * s13**H s24**H s53 s64 s75 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; s12**H denotes
-* conjg(s12); the diagonal elements of S are real.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpbsv.f b/SRC/cpbsv.f
index 74c394e2..128bf449 100644
--- a/SRC/cpbsv.f
+++ b/SRC/cpbsv.f
@@ -1,104 +1,176 @@
- SUBROUTINE CPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX AB( LDAB, * ), B( LDB, * )
-* ..
-*
+*> \brief <b> CPBSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX AB( LDAB, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CPBSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite band matrix and X
-* and B are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular band matrix, and L is a lower
-* triangular band matrix, with the same number of superdiagonals or
-* subdiagonals as A. The factored form of A is then used to solve the
-* system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite band matrix and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular band matrix, and L is a lower
+*> triangular band matrix, with the same number of superdiagonals or
+*> subdiagonals as A. The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
-* See below for further details.
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H*U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H*U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup complexOTHERsolve
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* On entry: On exit:
-*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* On entry: On exit:
-*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpbsvx.f b/SRC/cpbsvx.f
index 71488497..187cd11a 100644
--- a/SRC/cpbsvx.f
+++ b/SRC/cpbsvx.f
@@ -1,11 +1,345 @@
+*> \brief <b> CPBSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
+* EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * ), S( * )
+* COMPLEX AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
+*> compute the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite band matrix and X
+*> and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular band matrix, and L is a lower
+*> triangular band matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFB contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. AB and AFB will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AFB and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFB and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array, except
+*> if FACT = 'F' and EQUED = 'Y', then A must contain the
+*> equilibrated matrix diag(S)*A*diag(S). The j-th column of A
+*> is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) COMPLEX array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H of the band matrix
+*> A, in the same storage format as A (see AB). If EQUED = 'Y',
+*> then AFB is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFB is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFB is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13
+*> a22 a23 a24
+*> a33 a34 a35
+*> a44 a45 a46
+*> a55 a56
+*> (aij=conjg(aji)) a66
+*>
+*> Band storage of the upper triangle of A:
+*>
+*> * * a13 a24 a35 a46
+*> * a12 a23 a34 a45 a56
+*> a11 a22 a33 a44 a55 a66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> a11 a22 a33 a44 a55 a66
+*> a21 a32 a43 a54 a65 *
+*> a31 a42 a53 a64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
$ EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -18,225 +352,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPBSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
-* compute the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite band matrix and X
-* and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular band matrix, and L is a lower
-* triangular band matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFB contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. AB and AFB will not
-* be modified.
-* = 'N': The matrix A will be copied to AFB and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFB and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array, except
-* if FACT = 'F' and EQUED = 'Y', then A must contain the
-* equilibrated matrix diag(S)*A*diag(S). The j-th column of A
-* is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
-* See below for further details.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KD+1.
-*
-* AFB (input or output) COMPLEX array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H of the band matrix
-* A, in the same storage format as A (see AB). If EQUED = 'Y',
-* then AFB is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFB is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H.
-*
-* If FACT = 'E', then AFB is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= KD+1.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13
-* a22 a23 a24
-* a33 a34 a35
-* a44 a45 a46
-* a55 a56
-* (aij=conjg(aji)) a66
-*
-* Band storage of the upper triangle of A:
-*
-* * * a13 a24 a35 a46
-* * a12 a23 a34 a45 a56
-* a11 a22 a33 a44 a55 a66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* a11 a22 a33 a44 a55 a66
-* a21 a32 a43 a54 a65 *
-* a31 a42 a53 a64 * *
-*
-* Array elements marked * are not used by the routine.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpbtf2.f b/SRC/cpbtf2.f
index ca2948c4..85649795 100644
--- a/SRC/cpbtf2.f
+++ b/SRC/cpbtf2.f
@@ -1,91 +1,154 @@
- SUBROUTINE CPBTF2( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- COMPLEX AB( LDAB, * )
-* ..
-*
+*> \brief \b CPBTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBTF2( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* CPBTF2 computes the Cholesky factorization of a complex Hermitian
-* positive definite band matrix A.
-*
-* The factorization has the form
-* A = U**H * U , if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix, U**H is the conjugate transpose
-* of U, and L is lower triangular.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBTF2 computes the Cholesky factorization of a complex Hermitian
+*> positive definite band matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U , if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix, U**H is the conjugate transpose
+*> of U, and L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H *U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite, and the factorization could not be
-* completed.
-*
-* Further Details
-* ===============
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H *U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On entry: On exit:
+*> \date November 2011
*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> \ingroup complexOTHERcomputational
*
-* Similarly, if UPLO = 'L' the format of A is as follows:
*
-* On entry: On exit:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPBTF2( UPLO, N, KD, AB, LDAB, INFO )
*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpbtrf.f b/SRC/cpbtrf.f
index 6ba42425..d80a45c4 100644
--- a/SRC/cpbtrf.f
+++ b/SRC/cpbtrf.f
@@ -1,89 +1,152 @@
- SUBROUTINE CPBTRF( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- COMPLEX AB( LDAB, * )
-* ..
-*
+*> \brief \b CPBTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBTRF( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* CPBTRF computes the Cholesky factorization of a complex Hermitian
-* positive definite band matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite band matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H*U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input/output) COMPLEX array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H*U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> Contributed by
+*> Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPBTRF( UPLO, N, KD, AB, LDAB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* On entry: On exit:
-*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* On entry: On exit:
-*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
-*
-* Array elements marked * are not used by the routine.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Contributed by
-* Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpbtrs.f b/SRC/cpbtrs.f
index 89c97a04..f5090aeb 100644
--- a/SRC/cpbtrs.f
+++ b/SRC/cpbtrs.f
@@ -1,64 +1,130 @@
- SUBROUTINE CPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX AB( LDAB, * ), B( LDB, * )
-* ..
-*
+*> \brief \b CPBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX AB( LDAB, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CPBTRS solves a system of linear equations A*X = B with a Hermitian
-* positive definite band matrix A using the Cholesky factorization
-* A = U**H*U or A = L*L**H computed by CPBTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBTRS solves a system of linear equations A*X = B with a Hermitian
+*> positive definite band matrix A using the Cholesky factorization
+*> A = U**H*U or A = L*L**H computed by CPBTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor stored in AB;
-* = 'L': Lower triangular factor stored in AB.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor stored in AB;
+*> = 'L': Lower triangular factor stored in AB.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H of the band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of U or L is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H of the band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of U or L is
-* stored in the j-th column of the array AB as follows:
-* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup complexOTHERcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE CPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpftrf.f b/SRC/cpftrf.f
index 56c352b7..9bd1369a 100644
--- a/SRC/cpftrf.f
+++ b/SRC/cpftrf.f
@@ -1,176 +1,241 @@
- SUBROUTINE CPFTRF( TRANSR, UPLO, N, A, INFO )
+*> \brief \b CPFTRF
*
-* -- LAPACK routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 ----
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER N, INFO
-* ..
-* .. Array Arguments ..
- COMPLEX A( 0: * )
+* Definition
+* ==========
*
+* SUBROUTINE CPFTRF( TRANSR, UPLO, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( 0: * )
+*
* Purpose
* =======
*
-* CPFTRF computes the Cholesky factorization of a complex Hermitian
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the block version of the algorithm, calling Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPFTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the block version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of RFP A is stored;
-* = 'L': Lower triangle of RFP A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension ( N*(N+1)/2 );
-* On entry, the Hermitian matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
-* the Conjugate-transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A. If UPLO = 'L' the RFP A contains the elements
-* of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
-* 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
-* is odd. See the Note below for more details.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization RFP A = U**H*U or RFP A = L*L**H.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of RFP A is stored;
+*> = 'L': Lower triangle of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( N*(N+1)/2 );
+*> On entry, the Hermitian matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
+*> the Conjugate-transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A. If UPLO = 'L' the RFP A contains the elements
+*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
+*> 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
+*> is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization RFP A = U**H*U or RFP A = L*L**H.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*> \verbatim
+*> Further Notes on RFP Format:
+*> ============================
+*> \endverbatim
+*> \verbatim
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*> \endverbatim
+*> \verbatim
+*> AP is Upper AP is Lower
+*> \endverbatim
+*> \verbatim
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*> \endverbatim
+*> \verbatim
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*> \endverbatim
+*> \verbatim
+*> RFP A RFP A
+*> \endverbatim
+*> \verbatim
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*> \endverbatim
+*> \verbatim
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*> \endverbatim
+*> \verbatim
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*> \endverbatim
+*> \verbatim
+*> RFP A RFP A
+*> \endverbatim
+*> \verbatim
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*> \endverbatim
+*> \verbatim
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*> \endverbatim
+*> \verbatim
+*> AP is Upper AP is Lower
+*> \endverbatim
+*> \verbatim
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*> \endverbatim
+*> \verbatim
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*> \endverbatim
+*> \verbatim
+*> RFP A RFP A
+*> \endverbatim
+*> \verbatim
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*> \endverbatim
+*> \verbatim
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*> \endverbatim
+*> \verbatim
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*> \endverbatim
+*> \verbatim
+*> RFP A RFP A
+*> \endverbatim
+*> \verbatim
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Further Notes on RFP Format:
-* ============================
-*
-*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
+*> \date November 2011
*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
+*> \ingroup complexOTHERcomputational
*
+* =====================================================================
+ SUBROUTINE CPFTRF( TRANSR, UPLO, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+ COMPLEX A( 0: * )
*
* =====================================================================
*
diff --git a/SRC/cpftri.f b/SRC/cpftri.f
index beed1c91..4dfa0188 100644
--- a/SRC/cpftri.f
+++ b/SRC/cpftri.f
@@ -1,167 +1,223 @@
- SUBROUTINE CPFTRI( TRANSR, UPLO, N, A, INFO )
+*> \brief \b CPFTRI
*
-* -- LAPACK routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* .. Array Arguments ..
- COMPLEX A( 0: * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CPFTRI( TRANSR, UPLO, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* .. Array Arguments ..
+* COMPLEX A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* CPFTRI computes the inverse of a complex Hermitian positive definite
-* matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
-* computed by CPFTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPFTRI computes the inverse of a complex Hermitian positive definite
+*> matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
+*> computed by CPFTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension ( N*(N+1)/2 );
-* On entry, the Hermitian matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
-* the Conjugate-transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A. If UPLO = 'L' the RFP A contains the elements
-* of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
-* 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
-* is odd. See the Note below for more details.
-*
-* On exit, the Hermitian inverse of the original matrix, in the
-* same storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
-* Further Details
-* ===============
-*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( N*(N+1)/2 );
+*> On entry, the Hermitian matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
+*> the Conjugate-transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A. If UPLO = 'L' the RFP A contains the elements
+*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
+*> 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
+*> is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the Hermitian inverse of the original matrix, in the
+*> same storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RFP A RFP A
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
+*> \date November 2011
*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
+*> \ingroup complexOTHERcomputational
*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPFTRI( TRANSR, UPLO, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* .. Array Arguments ..
+ COMPLEX A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpftrs.f b/SRC/cpftrs.f
index 602bd79c..7d6558d1 100644
--- a/SRC/cpftrs.f
+++ b/SRC/cpftrs.f
@@ -1,166 +1,231 @@
- SUBROUTINE CPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX A( 0: * ), B( LDB, * )
-* ..
-*
+*> \brief \b CPFTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( 0: * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CPFTRS solves a system of linear equations A*X = B with a Hermitian
-* positive definite matrix A using the Cholesky factorization
-* A = U**H*U or A = L*L**H computed by CPFTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPFTRS solves a system of linear equations A*X = B with a Hermitian
+*> positive definite matrix A using the Cholesky factorization
+*> A = U**H*U or A = L*L**H computed by CPFTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of RFP A is stored;
-* = 'L': Lower triangle of RFP A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of RFP A is stored;
+*> = 'L': Lower triangle of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( N*(N+1)/2 );
+*> The triangular factor U or L from the Cholesky factorization
+*> of RFP A = U**H*U or RFP A = L*L**H, as computed by CPFTRF.
+*> See note below for more details about RFP A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension ( N*(N+1)/2 );
-* The triangular factor U or L from the Cholesky factorization
-* of RFP A = U**H*U or RFP A = L*L**H, as computed by CPFTRF.
-* See note below for more details about RFP A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( 0: * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpocon.f b/SRC/cpocon.f
index 948d4f18..0015b3ed 100644
--- a/SRC/cpocon.f
+++ b/SRC/cpocon.f
@@ -1,12 +1,122 @@
+*> \brief \b CPOCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex Hermitian positive definite matrix using the
+*> Cholesky factorization A = U**H*U or A = L*L**H computed by CPOTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm (or infinity-norm) of the Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOcomputational
+*
+* =====================================================================
SUBROUTINE CPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,49 +128,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CPOCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex Hermitian positive definite matrix using the
-* Cholesky factorization A = U**H*U or A = L*L**H computed by CPOTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by CPOTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* ANORM (input) REAL
-* The 1-norm (or infinity-norm) of the Hermitian matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpoequ.f b/SRC/cpoequ.f
index 0d426cc9..9d47615c 100644
--- a/SRC/cpoequ.f
+++ b/SRC/cpoequ.f
@@ -1,62 +1,123 @@
- SUBROUTINE CPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- REAL AMAX, SCOND
-* ..
-* .. Array Arguments ..
- REAL S( * )
- COMPLEX A( LDA, * )
-* ..
-*
+*> \brief \b CPOEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CPOEQU computes row and column scalings intended to equilibrate a
-* Hermitian positive definite matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOEQU computes row and column scalings intended to equilibrate a
+*> Hermitian positive definite matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The N-by-N Hermitian positive definite matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The N-by-N Hermitian positive definite matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup complexPOcomputational
*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE CPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ REAL S( * )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpoequb.f b/SRC/cpoequb.f
index 93e0a5a2..564d1ecd 100644
--- a/SRC/cpoequb.f
+++ b/SRC/cpoequb.f
@@ -1,67 +1,123 @@
- SUBROUTINE CPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- REAL AMAX, SCOND
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * )
- REAL S( * )
-* ..
-*
+*> \brief \b CPOEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* REAL S( * )
+* ..
+*
* Purpose
* =======
*
-* CPOEQUB computes row and column scalings intended to equilibrate a
-* symmetric positive definite matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOEQUB computes row and column scalings intended to equilibrate a
+*> symmetric positive definite matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The N-by-N symmetric positive definite matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The N-by-N symmetric positive definite matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup complexPOcomputational
*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE CPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * )
+ REAL S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cporfs.f b/SRC/cporfs.f
index b8b1ae2a..dad137cc 100644
--- a/SRC/cporfs.f
+++ b/SRC/cporfs.f
@@ -1,12 +1,184 @@
+*> \brief \b CPORFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
+* LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPORFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian positive definite,
+*> and provides error bounds and backward error estimates for the
+*> solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CPOTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOcomputational
+*
+* =====================================================================
SUBROUTINE CPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
$ LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,88 +190,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPORFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian positive definite,
-* and provides error bounds and backward error estimates for the
-* solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by CPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CPOTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/cporfsx.f b/SRC/cporfsx.f
index c2e4c606..d461c881 100644
--- a/SRC/cporfsx.f
+++ b/SRC/cporfsx.f
@@ -1,18 +1,414 @@
+*> \brief \b CPORFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, S, B,
+* LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* REAL RWORK( * ), S( * ), PARAMS(*), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CPORFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive
+*> definite, and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOcomputational
+*
+* =====================================================================
SUBROUTINE CPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, S, B,
$ LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -27,269 +423,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CPORFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive
-* definite, and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* S (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/cposv.f b/SRC/cposv.f
index 9b41bdf5..e3ef0ef5 100644
--- a/SRC/cposv.f
+++ b/SRC/cposv.f
@@ -1,9 +1,132 @@
+*> \brief <b> CPOSV computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**H* U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix. The factored form of A is then used to solve the system of
+*> equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOsolve
+*
+* =====================================================================
SUBROUTINE CPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,65 +136,6 @@
COMPLEX A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**H* U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix. The factored form of A is then used to solve the system of
-* equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
-*
* =====================================================================
*
* .. External Functions ..
diff --git a/SRC/cposvx.f b/SRC/cposvx.f
index 89327a06..45116c20 100644
--- a/SRC/cposvx.f
+++ b/SRC/cposvx.f
@@ -1,11 +1,307 @@
+*> \brief <b> CPOSVX computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
+* S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * ), S( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
+*> compute the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**H* U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. A and AF will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A, except if FACT = 'F' and
+*> EQUED = 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced. A is not modified if
+*> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, in the same storage
+*> format as A. If EQUED .ne. 'N', then AF is the factored form
+*> of the equilibrated matrix diag(S)*A*diag(S).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS righthand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOsolve
+*
+* =====================================================================
SUBROUTINE CPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -18,195 +314,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
-* compute the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**H* U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. A and AF will not
-* be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A, except if FACT = 'F' and
-* EQUED = 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced. A is not modified if
-* FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, in the same storage
-* format as A. If EQUED .ne. 'N', then AF is the factored form
-* of the equilibrated matrix diag(S)*A*diag(S).
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H of the original
-* matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS righthand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cposvxx.f b/SRC/cposvxx.f
index 74881816..cff81a23 100644
--- a/SRC/cposvxx.f
+++ b/SRC/cposvxx.f
@@ -1,18 +1,517 @@
+*> \brief <b> CPOSVXX computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
+* S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* REAL S( * ), PARAMS( * ), BERR( * ), RWORK( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T
+*> to compute the solution to a complex system of linear equations
+*> A * X = B, where A is an N-by-N symmetric positive definite matrix
+*> and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. CPOSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> CPOSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> CPOSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what CPOSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A (see argument RCOND). If the reciprocal of the condition number
+*> is less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF contains the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A and AF are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the symmetric matrix A, except if FACT = 'F' and EQUED =
+*> 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper
+*> triangular part of A contains the upper triangular part of the
+*> matrix A, and the strictly lower triangular part of A is not
+*> referenced. If UPLO = 'L', the leading N-by-N lower triangular
+*> part of A contains the lower triangular part of the matrix A, and
+*> the strictly upper triangular part of A is not referenced. A is
+*> not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
+*> 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A. If EQUED .ne. 'N', then AF is the factored
+*> form of the equilibrated matrix diag(S)*A*diag(S).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOsolve
+*
+* =====================================================================
SUBROUTINE CPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -27,363 +526,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T
-* to compute the solution to a complex system of linear equations
-* A * X = B, where A is an N-by-N symmetric positive definite matrix
-* and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. CPOSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* CPOSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* CPOSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what CPOSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A (see argument RCOND). If the reciprocal of the condition number
-* is less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF contains the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A and AF are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A, except if FACT = 'F' and EQUED =
-* 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper
-* triangular part of A contains the upper triangular part of the
-* matrix A, and the strictly lower triangular part of A is not
-* referenced. If UPLO = 'L', the leading N-by-N lower triangular
-* part of A contains the lower triangular part of the matrix A, and
-* the strictly upper triangular part of A is not referenced. A is
-* not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
-* 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A. If EQUED .ne. 'N', then AF is the factored
-* form of the equilibrated matrix diag(S)*A*diag(S).
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the original
-* matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/cpotf2.f b/SRC/cpotf2.f
index e725b7ec..b8fb82ec 100644
--- a/SRC/cpotf2.f
+++ b/SRC/cpotf2.f
@@ -1,9 +1,111 @@
+*> \brief \b CPOTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOTF2( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOTF2 computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U , if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOcomputational
+*
+* =====================================================================
SUBROUTINE CPOTF2( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,53 +115,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOTF2 computes the Cholesky factorization of a complex Hermitian
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U , if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpotrf.f b/SRC/cpotrf.f
index 9c4ced52..3664f102 100644
--- a/SRC/cpotrf.f
+++ b/SRC/cpotrf.f
@@ -1,9 +1,109 @@
+*> \brief \b CPOTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOTRF( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the block version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOcomputational
+*
+* =====================================================================
SUBROUTINE CPOTRF( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,51 +113,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOTRF computes the Cholesky factorization of a complex Hermitian
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpotri.f b/SRC/cpotri.f
index 32a9691c..32333736 100644
--- a/SRC/cpotri.f
+++ b/SRC/cpotri.f
@@ -1,9 +1,96 @@
+*> \brief \b CPOTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOTRI( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOTRI computes the inverse of a complex Hermitian positive definite
+*> matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
+*> computed by CPOTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, as computed by
+*> CPOTRF.
+*> On exit, the upper or lower triangle of the (Hermitian)
+*> inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexPOcomputational
+*
+* =====================================================================
SUBROUTINE CPOTRI( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,39 +100,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOTRI computes the inverse of a complex Hermitian positive definite
-* matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
-* computed by CPOTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, as computed by
-* CPOTRF.
-* On exit, the upper or lower triangle of the (Hermitian)
-* inverse of A, overwriting the input factor U or L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
* =====================================================================
*
* .. External Functions ..
diff --git a/SRC/cpotrs.f b/SRC/cpotrs.f
index 9c0e5853..70c7a219 100644
--- a/SRC/cpotrs.f
+++ b/SRC/cpotrs.f
@@ -1,56 +1,119 @@
- SUBROUTINE CPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b CPOTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CPOTRS solves a system of linear equations A*X = B with a Hermitian
-* positive definite matrix A using the Cholesky factorization
-* A = U**H*U or A = L*L**H computed by CPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOTRS solves a system of linear equations A*X = B with a Hermitian
+*> positive definite matrix A using the Cholesky factorization
+*> A = U**H*U or A = L*L**H computed by CPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by CPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by CPOTRF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complexPOcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE CPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cppcon.f b/SRC/cppcon.f
index 9fb43a2b..4e49f058 100644
--- a/SRC/cppcon.f
+++ b/SRC/cppcon.f
@@ -1,11 +1,119 @@
+*> \brief \b CPPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPCON( UPLO, N, AP, ANORM, RCOND, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex Hermitian positive definite packed matrix using
+*> the Cholesky factorization A = U**H*U or A = L*L**H computed by
+*> CPPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, packed columnwise in a linear
+*> array. The j-th column of U or L is stored in the array AP
+*> as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm (or infinity-norm) of the Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPPCON( UPLO, N, AP, ANORM, RCOND, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,51 +125,6 @@
COMPLEX AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CPPCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex Hermitian positive definite packed matrix using
-* the Cholesky factorization A = U**H*U or A = L*L**H computed by
-* CPPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, packed columnwise in a linear
-* array. The j-th column of U or L is stored in the array AP
-* as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
-*
-* ANORM (input) REAL
-* The 1-norm (or infinity-norm) of the Hermitian matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cppequ.f b/SRC/cppequ.f
index 93ad30dd..1122daae 100644
--- a/SRC/cppequ.f
+++ b/SRC/cppequ.f
@@ -1,9 +1,118 @@
+*> \brief \b CPPEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL S( * )
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPEQU computes row and column scalings intended to equilibrate a
+*> Hermitian positive definite matrix A in packed storage and reduce
+*> its condition number (with respect to the two-norm). S contains the
+*> scale factors, S(i)=1/sqrt(A(i,i)), chosen so that the scaled matrix
+*> B with elements B(i,j)=S(i)*A(i,j)*S(j) has ones on the diagonal.
+*> This choice of S puts the condition number of B within a factor N of
+*> the smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,53 +124,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CPPEQU computes row and column scalings intended to equilibrate a
-* Hermitian positive definite matrix A in packed storage and reduce
-* its condition number (with respect to the two-norm). S contains the
-* scale factors, S(i)=1/sqrt(A(i,i)), chosen so that the scaled matrix
-* B with elements B(i,j)=S(i)*A(i,j)*S(j) has ones on the diagonal.
-* This choice of S puts the condition number of B within a factor N of
-* the smallest possible condition number over all possible diagonal
-* scalings.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
-*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
-*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpprfs.f b/SRC/cpprfs.f
index 871d9717..5d998df1 100644
--- a/SRC/cpprfs.f
+++ b/SRC/cpprfs.f
@@ -1,12 +1,172 @@
+*> \brief \b CPPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
+* BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian positive definite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is COMPLEX array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by SPPTRF/CPPTRF,
+*> packed columnwise in a linear array in the same format as A
+*> (see AP).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CPPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
$ BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,82 +178,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian positive definite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by SPPTRF/CPPTRF,
-* packed columnwise in a linear array in the same format as A
-* (see AP).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CPPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/cppsv.f b/SRC/cppsv.f
index 82abdcfd..17124627 100644
--- a/SRC/cppsv.f
+++ b/SRC/cppsv.f
@@ -1,90 +1,156 @@
- SUBROUTINE CPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> CPPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CPPSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix stored in
-* packed format and X and B are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix. The factored form of A is then used to solve the system of
-* equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix stored in
+*> packed format and X and B are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix. The factored form of A is then used to solve the system of
+*> equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, in the same storage
+*> format as A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, in the same storage
-* format as A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup complexOTHERsolve
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cppsvx.f b/SRC/cppsvx.f
index 01826dfb..9aa8e662 100644
--- a/SRC/cppsvx.f
+++ b/SRC/cppsvx.f
@@ -1,10 +1,314 @@
+*> \brief <b> CPPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
+* X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * ), S( * )
+* COMPLEX AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
+*> compute the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix stored in
+*> packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**H * U , if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix, L is a lower triangular
+*> matrix, and **H indicates conjugate transpose.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFP contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. AP and AFP will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array, except if FACT = 'F'
+*> and EQUED = 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). The j-th column of A is stored in the
+*> array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details. A is not modified if
+*> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) COMPLEX array, dimension (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, in the same storage
+*> format as A. If EQUED .ne. 'N', then AFP is the factored
+*> form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H * U or A = L * L**H of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFP is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H of the equilibrated
+*> matrix A (see the description of AP for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
$ X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -17,205 +321,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPPSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
-* compute the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix stored in
-* packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**H * U , if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix, L is a lower triangular
-* matrix, and **H indicates conjugate transpose.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFP contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. AP and AFP will not
-* be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array, except if FACT = 'F'
-* and EQUED = 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). The j-th column of A is stored in the
-* array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details. A is not modified if
-* FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* AFP (input or output) COMPLEX array, dimension (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, in the same storage
-* format as A. If EQUED .ne. 'N', then AFP is the factored
-* form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H * U or A = L * L**H of the original
-* matrix A.
-*
-* If FACT = 'E', then AFP is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H of the equilibrated
-* matrix A (see the description of AP for the form of the
-* equilibrated matrix).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpptrf.f b/SRC/cpptrf.f
index a1bb65b4..b3f7785f 100644
--- a/SRC/cpptrf.f
+++ b/SRC/cpptrf.f
@@ -1,74 +1,131 @@
- SUBROUTINE CPPTRF( UPLO, N, AP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX AP( * )
-* ..
-*
+*> \brief \b CPPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPTRF( UPLO, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * )
+* ..
+*
* Purpose
* =======
*
-* CPPTRF computes the Cholesky factorization of a complex Hermitian
-* positive definite matrix A stored in packed format.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A stored in packed format.
+*>
+*> The factorization has the form
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H*U or A = L*L**H, in the same
+*> storage format as A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
+*> \date November 2011
*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H*U or A = L*L**H, in the same
-* storage format as A.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPPTRF( UPLO, N, AP, INFO )
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpptri.f b/SRC/cpptri.f
index ae2c8a30..98b8a305 100644
--- a/SRC/cpptri.f
+++ b/SRC/cpptri.f
@@ -1,9 +1,95 @@
+*> \brief \b CPPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPTRI( UPLO, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPTRI computes the inverse of a complex Hermitian positive definite
+*> matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
+*> computed by CPPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor is stored in AP;
+*> = 'L': Lower triangular factor is stored in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, packed columnwise as
+*> a linear array. The j-th column of U or L is stored in the
+*> array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the upper or lower triangle of the (Hermitian)
+*> inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPPTRI( UPLO, N, AP, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,40 +99,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CPPTRI computes the inverse of a complex Hermitian positive definite
-* matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
-* computed by CPPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor is stored in AP;
-* = 'L': Lower triangular factor is stored in AP.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, packed columnwise as
-* a linear array. The j-th column of U or L is stored in the
-* array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
-*
-* On exit, the upper or lower triangle of the (Hermitian)
-* inverse of A, overwriting the input factor U or L.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpptrs.f b/SRC/cpptrs.f
index e3987459..d88c9c94 100644
--- a/SRC/cpptrs.f
+++ b/SRC/cpptrs.f
@@ -1,57 +1,117 @@
- SUBROUTINE CPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b CPPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CPPTRS solves a system of linear equations A*X = B with a Hermitian
-* positive definite matrix A in packed storage using the Cholesky
-* factorization A = U**H*U or A = L*L**H computed by CPPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPTRS solves a system of linear equations A*X = B with a Hermitian
+*> positive definite matrix A in packed storage using the Cholesky
+*> factorization A = U**H*U or A = L*L**H computed by CPPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, packed columnwise in a linear
+*> array. The j-th column of U or L is stored in the array AP
+*> as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \date November 2011
*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, packed columnwise in a linear
-* array. The j-th column of U or L is stored in the array AP
-* as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \ingroup complexOTHERcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE CPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpstf2.f b/SRC/cpstf2.f
index 4684c6c0..10a54fda 100644
--- a/SRC/cpstf2.f
+++ b/SRC/cpstf2.f
@@ -1,8 +1,143 @@
+*> \brief \b CPSTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* REAL TOL
+* INTEGER INFO, LDA, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* REAL WORK( 2*N )
+* INTEGER PIV( N )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPSTF2 computes the Cholesky factorization with complete
+*> pivoting of a complex Hermitian positive semidefinite matrix A.
+*>
+*> The factorization has the form
+*> P**T * A * P = U**H * U , if UPLO = 'U',
+*> P**T * A * P = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular, and
+*> P is stored as vector PIV.
+*>
+*> This algorithm does not attempt to check that A is positive
+*> semidefinite. This version of the algorithm calls level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization as above.
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of A given by the number of steps the algorithm
+*> completed.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> User defined tolerance. If TOL < 0, then N*U*MAX( A( K,K ) )
+*> will be used. The algorithm terminates at the (K-1)st step
+*> if the pivot <= TOL.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> Work space.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0: If INFO = -K, the K-th argument had an illegal value,
+*> = 0: algorithm completed successfully, and
+*> > 0: the matrix A is either rank deficient with computed rank
+*> as returned in RANK, or is indefinite. See Section 7 of
+*> LAPACK Working Note #161 for further information.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
*
-* -- LAPACK PROTOTYPE routine (version 3.2.2) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL TOL
@@ -15,70 +150,6 @@
INTEGER PIV( N )
* ..
*
-* Purpose
-* =======
-*
-* CPSTF2 computes the Cholesky factorization with complete
-* pivoting of a complex Hermitian positive semidefinite matrix A.
-*
-* The factorization has the form
-* P**T * A * P = U**H * U , if UPLO = 'U',
-* P**T * A * P = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular, and
-* P is stored as vector PIV.
-*
-* This algorithm does not attempt to check that A is positive
-* semidefinite. This version of the algorithm calls level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization as above.
-*
-* PIV (output) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
-*
-* RANK (output) INTEGER
-* The rank of A given by the number of steps the algorithm
-* completed.
-*
-* TOL (input) REAL
-* User defined tolerance. If TOL < 0, then N*U*MAX( A( K,K ) )
-* will be used. The algorithm terminates at the (K-1)st step
-* if the pivot <= TOL.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (2*N)
-* Work space.
-*
-* INFO (output) INTEGER
-* < 0: If INFO = -K, the K-th argument had an illegal value,
-* = 0: algorithm completed successfully, and
-* > 0: the matrix A is either rank deficient with computed rank
-* as returned in RANK, or is indefinite. See Section 7 of
-* LAPACK Working Note #161 for further information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpstrf.f b/SRC/cpstrf.f
index d998d109..5032010d 100644
--- a/SRC/cpstrf.f
+++ b/SRC/cpstrf.f
@@ -1,8 +1,143 @@
+*> \brief \b CPSTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* REAL TOL
+* INTEGER INFO, LDA, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* REAL WORK( 2*N )
+* INTEGER PIV( N )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPSTRF computes the Cholesky factorization with complete
+*> pivoting of a complex Hermitian positive semidefinite matrix A.
+*>
+*> The factorization has the form
+*> P**T * A * P = U**H * U , if UPLO = 'U',
+*> P**T * A * P = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular, and
+*> P is stored as vector PIV.
+*>
+*> This algorithm does not attempt to check that A is positive
+*> semidefinite. This version of the algorithm calls level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization as above.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of A given by the number of steps the algorithm
+*> completed.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> User defined tolerance. If TOL < 0, then N*U*MAX( A(K,K) )
+*> will be used. The algorithm terminates at the (K-1)st step
+*> if the pivot <= TOL.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> Work space.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0: If INFO = -K, the K-th argument had an illegal value,
+*> = 0: algorithm completed successfully, and
+*> > 0: the matrix A is either rank deficient with computed rank
+*> as returned in RANK, or is indefinite. See Section 7 of
+*> LAPACK Working Note #161 for further information.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL TOL
@@ -15,70 +150,6 @@
INTEGER PIV( N )
* ..
*
-* Purpose
-* =======
-*
-* CPSTRF computes the Cholesky factorization with complete
-* pivoting of a complex Hermitian positive semidefinite matrix A.
-*
-* The factorization has the form
-* P**T * A * P = U**H * U , if UPLO = 'U',
-* P**T * A * P = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular, and
-* P is stored as vector PIV.
-*
-* This algorithm does not attempt to check that A is positive
-* semidefinite. This version of the algorithm calls level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization as above.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* PIV (output) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
-*
-* RANK (output) INTEGER
-* The rank of A given by the number of steps the algorithm
-* completed.
-*
-* TOL (input) REAL
-* User defined tolerance. If TOL < 0, then N*U*MAX( A(K,K) )
-* will be used. The algorithm terminates at the (K-1)st step
-* if the pivot <= TOL.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-* Work space.
-*
-* INFO (output) INTEGER
-* < 0: If INFO = -K, the K-th argument had an illegal value,
-* = 0: algorithm completed successfully, and
-* > 0: the matrix A is either rank deficient with computed rank
-* as returned in RANK, or is indefinite. See Section 7 of
-* LAPACK Working Note #161 for further information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cptcon.f b/SRC/cptcon.f
index 5ef936a1..c34169e0 100644
--- a/SRC/cptcon.f
+++ b/SRC/cptcon.f
@@ -1,65 +1,131 @@
- SUBROUTINE CPTCON( N, D, E, ANORM, RCOND, RWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- REAL ANORM, RCOND
-* ..
-* .. Array Arguments ..
- REAL D( * ), RWORK( * )
- COMPLEX E( * )
-* ..
-*
+*> \brief \b CPTCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTCON( N, D, E, ANORM, RCOND, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* REAL D( * ), RWORK( * )
+* COMPLEX E( * )
+* ..
+*
* Purpose
* =======
*
-* CPTCON computes the reciprocal of the condition number (in the
-* 1-norm) of a complex Hermitian positive definite tridiagonal matrix
-* using the factorization A = L*D*L**H or A = U**H*D*U computed by
-* CPTTRF.
-*
-* Norm(inv(A)) is computed by a direct method, and the reciprocal of
-* the condition number is computed as
-* RCOND = 1 / (ANORM * norm(inv(A))).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTCON computes the reciprocal of the condition number (in the
+*> 1-norm) of a complex Hermitian positive definite tridiagonal matrix
+*> using the factorization A = L*D*L**H or A = U**H*D*U computed by
+*> CPTTRF.
+*>
+*> Norm(inv(A)) is computed by a direct method, and the reciprocal of
+*> the condition number is computed as
+*> RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization of A, as computed by CPTTRF.
-*
-* E (input) COMPLEX array, dimension (N-1)
-* The (n-1) off-diagonal elements of the unit bidiagonal factor
-* U or L from the factorization of A, as computed by CPTTRF.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization of A, as computed by CPTTRF.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the unit bidiagonal factor
+*> U or L from the factorization of A, as computed by CPTTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the
+*> 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ANORM (input) REAL
-* The 1-norm of the original matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the
-* 1-norm of inv(A) computed in this routine.
+*> \date November 2011
*
-* RWORK (workspace) REAL array, dimension (N)
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The method used is described in Nicholas J. Higham, "Efficient
+*> Algorithms for Computing the Condition Number of a Tridiagonal
+*> Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CPTCON( N, D, E, ANORM, RCOND, RWORK, INFO )
*
-* The method used is described in Nicholas J. Higham, "Efficient
-* Algorithms for Computing the Condition Number of a Tridiagonal
-* Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+ REAL D( * ), RWORK( * )
+ COMPLEX E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cpteqr.f b/SRC/cpteqr.f
index 9b475944..89beee1f 100644
--- a/SRC/cpteqr.f
+++ b/SRC/cpteqr.f
@@ -1,9 +1,146 @@
+*> \brief \b CPTEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), WORK( * )
+* COMPLEX Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric positive definite tridiagonal matrix by first factoring the
+*> matrix using SPTTRF and then calling CBDSQR to compute the singular
+*> values of the bidiagonal factor.
+*>
+*> This routine computes the eigenvalues of the positive definite
+*> tridiagonal matrix to high relative accuracy. This means that if the
+*> eigenvalues range over many orders of magnitude in size, then the
+*> small eigenvalues and corresponding eigenvectors will be computed
+*> more accurately than, for example, with the standard QR method.
+*>
+*> The eigenvectors of a full or band positive definite Hermitian matrix
+*> can also be found if CHETRD, CHPTRD, or CHBTRD has been used to
+*> reduce this matrix to tridiagonal form. (The reduction to
+*> tridiagonal form, however, may preclude the possibility of obtaining
+*> high relative accuracy in the small eigenvalues of the original
+*> matrix, if these eigenvalues range over many orders of magnitude.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'V': Compute eigenvectors of original Hermitian
+*> matrix also. Array Z contains the unitary matrix
+*> used to reduce the original matrix to tridiagonal
+*> form.
+*> = 'I': Compute eigenvectors of tridiagonal matrix also.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix.
+*> On normal exit, D contains the eigenvalues, in descending
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the unitary matrix used in the
+*> reduction to tridiagonal form.
+*> On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
+*> original Hermitian matrix;
+*> if COMPZ = 'I', the orthonormal eigenvectors of the
+*> tridiagonal matrix.
+*> If INFO > 0 on exit, Z contains the eigenvectors associated
+*> with only the stored eigenvalues.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> COMPZ = 'V' or 'I', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is:
+*> <= N the Cholesky factorization of the matrix could
+*> not be performed because the i-th principal minor
+*> was not positive definite.
+*> > N the SVD algorithm failed to converge;
+*> if INFO = N+i, i off-diagonal elements of the
+*> bidiagonal factor did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -14,79 +151,6 @@
COMPLEX Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CPTEQR computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric positive definite tridiagonal matrix by first factoring the
-* matrix using SPTTRF and then calling CBDSQR to compute the singular
-* values of the bidiagonal factor.
-*
-* This routine computes the eigenvalues of the positive definite
-* tridiagonal matrix to high relative accuracy. This means that if the
-* eigenvalues range over many orders of magnitude in size, then the
-* small eigenvalues and corresponding eigenvectors will be computed
-* more accurately than, for example, with the standard QR method.
-*
-* The eigenvectors of a full or band positive definite Hermitian matrix
-* can also be found if CHETRD, CHPTRD, or CHBTRD has been used to
-* reduce this matrix to tridiagonal form. (The reduction to
-* tridiagonal form, however, may preclude the possibility of obtaining
-* high relative accuracy in the small eigenvalues of the original
-* matrix, if these eigenvalues range over many orders of magnitude.)
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'V': Compute eigenvectors of original Hermitian
-* matrix also. Array Z contains the unitary matrix
-* used to reduce the original matrix to tridiagonal
-* form.
-* = 'I': Compute eigenvectors of tridiagonal matrix also.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix.
-* On normal exit, D contains the eigenvalues, in descending
-* order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the unitary matrix used in the
-* reduction to tridiagonal form.
-* On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
-* original Hermitian matrix;
-* if COMPZ = 'I', the orthonormal eigenvectors of the
-* tridiagonal matrix.
-* If INFO > 0 on exit, Z contains the eigenvectors associated
-* with only the stored eigenvalues.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* COMPZ = 'V' or 'I', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is:
-* <= N the Cholesky factorization of the matrix could
-* not be performed because the i-th principal minor
-* was not positive definite.
-* > N the SVD algorithm failed to converge;
-* if INFO = N+i, i off-diagonal elements of the
-* bidiagonal factor did not converge to zero.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/cptrfs.f b/SRC/cptrfs.f
index baf63c67..7de49a81 100644
--- a/SRC/cptrfs.f
+++ b/SRC/cptrfs.f
@@ -1,10 +1,184 @@
+*> \brief \b CPTRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTRFS( UPLO, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
+* FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), D( * ), DF( * ), FERR( * ),
+* $ RWORK( * )
+* COMPLEX B( LDB, * ), E( * ), EF( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian positive definite
+*> and tridiagonal, and provides error bounds and backward error
+*> estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the superdiagonal or the subdiagonal of the
+*> tridiagonal matrix A is stored and the form of the
+*> factorization:
+*> = 'U': E is the superdiagonal of A, and A = U**H*D*U;
+*> = 'L': E is the subdiagonal of A, and A = L*D*L**H.
+*> (The two forms are equivalent if A is real.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n real diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the tridiagonal matrix A
+*> (see UPLO).
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from
+*> the factorization computed by CPTTRF.
+*> \endverbatim
+*>
+*> \param[in] EF
+*> \verbatim
+*> EF is COMPLEX array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the unit bidiagonal
+*> factor U or L from the factorization computed by CPTTRF
+*> (see UPLO).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CPTTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPTRFS( UPLO, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
$ FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,87 +191,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPTRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian positive definite
-* and tridiagonal, and provides error bounds and backward error
-* estimates for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the superdiagonal or the subdiagonal of the
-* tridiagonal matrix A is stored and the form of the
-* factorization:
-* = 'U': E is the superdiagonal of A, and A = U**H*D*U;
-* = 'L': E is the subdiagonal of A, and A = L*D*L**H.
-* (The two forms are equivalent if A is real.)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n real diagonal elements of the tridiagonal matrix A.
-*
-* E (input) COMPLEX array, dimension (N-1)
-* The (n-1) off-diagonal elements of the tridiagonal matrix A
-* (see UPLO).
-*
-* DF (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from
-* the factorization computed by CPTTRF.
-*
-* EF (input) COMPLEX array, dimension (N-1)
-* The (n-1) off-diagonal elements of the unit bidiagonal
-* factor U or L from the factorization computed by CPTTRF
-* (see UPLO).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CPTTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cptsv.f b/SRC/cptsv.f
index 4e6d87e3..94d46807 100644
--- a/SRC/cptsv.f
+++ b/SRC/cptsv.f
@@ -1,9 +1,116 @@
+*> \brief \b CPTSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTSV( N, NRHS, D, E, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* COMPLEX B( LDB, * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTSV computes the solution to a complex system of linear equations
+*> A*X = B, where A is an N-by-N Hermitian positive definite tridiagonal
+*> matrix, and X and B are N-by-NRHS matrices.
+*>
+*> A is factored as A = L*D*L**H, and the factored form of A is then
+*> used to solve the system of equations.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A. On exit, the n diagonal elements of the diagonal matrix
+*> D from the factorization A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A. On exit, the (n-1) subdiagonal elements of the
+*> unit bidiagonal factor L from the L*D*L**H factorization of
+*> A. E can also be regarded as the superdiagonal of the unit
+*> bidiagonal factor U from the U**H*D*U factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the solution has not been
+*> computed. The factorization has not been completed
+*> unless i = N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPTSV( N, NRHS, D, E, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDB, N, NRHS
@@ -13,53 +120,6 @@
COMPLEX B( LDB, * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* CPTSV computes the solution to a complex system of linear equations
-* A*X = B, where A is an N-by-N Hermitian positive definite tridiagonal
-* matrix, and X and B are N-by-NRHS matrices.
-*
-* A is factored as A = L*D*L**H, and the factored form of A is then
-* used to solve the system of equations.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A. On exit, the n diagonal elements of the diagonal matrix
-* D from the factorization A = L*D*L**H.
-*
-* E (input/output) COMPLEX array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A. On exit, the (n-1) subdiagonal elements of the
-* unit bidiagonal factor L from the L*D*L**H factorization of
-* A. E can also be regarded as the superdiagonal of the unit
-* bidiagonal factor U from the U**H*D*U factorization of A.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the solution has not been
-* computed. The factorization has not been completed
-* unless i = N.
-*
* =====================================================================
*
* .. External Subroutines ..
diff --git a/SRC/cptsvx.f b/SRC/cptsvx.f
index 816f709f..0c515dd8 100644
--- a/SRC/cptsvx.f
+++ b/SRC/cptsvx.f
@@ -1,10 +1,232 @@
+*> \brief \b CPTSVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
+* RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), D( * ), DF( * ), FERR( * ),
+* $ RWORK( * )
+* COMPLEX B( LDB, * ), E( * ), EF( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTSVX uses the factorization A = L*D*L**H to compute the solution
+*> to a complex system of linear equations A*X = B, where A is an
+*> N-by-N Hermitian positive definite tridiagonal matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the matrix A is factored as A = L*D*L**H, where L
+*> is a unit lower bidiagonal matrix and D is diagonal. The
+*> factorization can also be regarded as having the form
+*> A = U**H*D*U.
+*>
+*> 2. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix
+*> A is supplied on entry.
+*> = 'F': On entry, DF and EF contain the factored form of A.
+*> D, E, DF, and EF will not be modified.
+*> = 'N': The matrix A will be copied to DF and EF and
+*> factored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] DF
+*> \verbatim
+*> DF is or output) REAL array, dimension (N)
+*> If FACT = 'F', then DF is an input argument and on entry
+*> contains the n diagonal elements of the diagonal matrix D
+*> from the L*D*L**H factorization of A.
+*> If FACT = 'N', then DF is an output argument and on exit
+*> contains the n diagonal elements of the diagonal matrix D
+*> from the L*D*L**H factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] EF
+*> \verbatim
+*> EF is or output) COMPLEX array, dimension (N-1)
+*> If FACT = 'F', then EF is an input argument and on entry
+*> contains the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the L*D*L**H factorization of A.
+*> If FACT = 'N', then EF is an output argument and on exit
+*> contains the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the L*D*L**H factorization of A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal condition number of the matrix A. If RCOND
+*> is less than the machine precision (in particular, if
+*> RCOND = 0), the matrix is singular to working precision.
+*> This condition is indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in any
+*> element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
$ RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT
@@ -18,133 +240,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPTSVX uses the factorization A = L*D*L**H to compute the solution
-* to a complex system of linear equations A*X = B, where A is an
-* N-by-N Hermitian positive definite tridiagonal matrix and X and B
-* are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the matrix A is factored as A = L*D*L**H, where L
-* is a unit lower bidiagonal matrix and D is diagonal. The
-* factorization can also be regarded as having the form
-* A = U**H*D*U.
-*
-* 2. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix
-* A is supplied on entry.
-* = 'F': On entry, DF and EF contain the factored form of A.
-* D, E, DF, and EF will not be modified.
-* = 'N': The matrix A will be copied to DF and EF and
-* factored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) COMPLEX array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* DF (input or output) REAL array, dimension (N)
-* If FACT = 'F', then DF is an input argument and on entry
-* contains the n diagonal elements of the diagonal matrix D
-* from the L*D*L**H factorization of A.
-* If FACT = 'N', then DF is an output argument and on exit
-* contains the n diagonal elements of the diagonal matrix D
-* from the L*D*L**H factorization of A.
-*
-* EF (input or output) COMPLEX array, dimension (N-1)
-* If FACT = 'F', then EF is an input argument and on entry
-* contains the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the L*D*L**H factorization of A.
-* If FACT = 'N', then EF is an output argument and on exit
-* contains the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the L*D*L**H factorization of A.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The reciprocal condition number of the matrix A. If RCOND
-* is less than the machine precision (in particular, if
-* RCOND = 0), the matrix is singular to working precision.
-* This condition is indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in any
-* element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpttrf.f b/SRC/cpttrf.f
index 022db764..1b8d811d 100644
--- a/SRC/cpttrf.f
+++ b/SRC/cpttrf.f
@@ -1,9 +1,93 @@
+*> \brief \b CPTTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTTRF( N, D, E, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* COMPLEX E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTTRF computes the L*D*L**H factorization of a complex Hermitian
+*> positive definite tridiagonal matrix A. The factorization may also
+*> be regarded as having the form A = U**H *D*U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A. On exit, the n diagonal elements of the diagonal matrix
+*> D from the L*D*L**H factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A. On exit, the (n-1) subdiagonal elements of the
+*> unit bidiagonal factor L from the L*D*L**H factorization of A.
+*> E can also be regarded as the superdiagonal of the unit
+*> bidiagonal factor U from the U**H *D*U factorization of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite; if k < N, the factorization could not
+*> be completed, while if k = N, the factorization was
+*> completed, but D(N) <= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPTTRF( N, D, E, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, N
@@ -13,39 +97,6 @@
COMPLEX E( * )
* ..
*
-* Purpose
-* =======
-*
-* CPTTRF computes the L*D*L**H factorization of a complex Hermitian
-* positive definite tridiagonal matrix A. The factorization may also
-* be regarded as having the form A = U**H *D*U.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A. On exit, the n diagonal elements of the diagonal matrix
-* D from the L*D*L**H factorization of A.
-*
-* E (input/output) COMPLEX array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A. On exit, the (n-1) subdiagonal elements of the
-* unit bidiagonal factor L from the L*D*L**H factorization of A.
-* E can also be regarded as the superdiagonal of the unit
-* bidiagonal factor U from the U**H *D*U factorization of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite; if k < N, the factorization could not
-* be completed, while if k = N, the factorization was
-* completed, but D(N) <= 0.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cpttrs.f b/SRC/cpttrs.f
index c906a66f..a4301745 100644
--- a/SRC/cpttrs.f
+++ b/SRC/cpttrs.f
@@ -1,9 +1,122 @@
+*> \brief \b CPTTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTTRS( UPLO, N, NRHS, D, E, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* COMPLEX B( LDB, * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTTRS solves a tridiagonal system of the form
+*> A * X = B
+*> using the factorization A = U**H*D*U or A = L*D*L**H computed by CPTTRF.
+*> D is a diagonal matrix specified in the vector D, U (or L) is a unit
+*> bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
+*> the vector E, and X and B are N by NRHS matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the form of the factorization and whether the
+*> vector E is the superdiagonal of the upper bidiagonal factor
+*> U or the subdiagonal of the lower bidiagonal factor L.
+*> = 'U': A = U**H*D*U, E is the superdiagonal of U
+*> = 'L': A = L*D*L**H, E is the subdiagonal of L
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization A = U**H*D*U or A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> If UPLO = 'U', the (n-1) superdiagonal elements of the unit
+*> bidiagonal factor U from the factorization A = U**H*D*U.
+*> If UPLO = 'L', the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the factorization A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors B for the system of
+*> linear equations.
+*> On exit, the solution vectors, X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPTTRS( UPLO, N, NRHS, D, E, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,55 +127,6 @@
COMPLEX B( LDB, * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* CPTTRS solves a tridiagonal system of the form
-* A * X = B
-* using the factorization A = U**H*D*U or A = L*D*L**H computed by CPTTRF.
-* D is a diagonal matrix specified in the vector D, U (or L) is a unit
-* bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
-* the vector E, and X and B are N by NRHS matrices.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies the form of the factorization and whether the
-* vector E is the superdiagonal of the upper bidiagonal factor
-* U or the subdiagonal of the lower bidiagonal factor L.
-* = 'U': A = U**H*D*U, E is the superdiagonal of U
-* = 'L': A = L*D*L**H, E is the subdiagonal of L
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization A = U**H*D*U or A = L*D*L**H.
-*
-* E (input) COMPLEX array, dimension (N-1)
-* If UPLO = 'U', the (n-1) superdiagonal elements of the unit
-* bidiagonal factor U from the factorization A = U**H*D*U.
-* If UPLO = 'L', the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the factorization A = L*D*L**H.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors B for the system of
-* linear equations.
-* On exit, the solution vectors, X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cptts2.f b/SRC/cptts2.f
index 3e81af3f..00d173a3 100644
--- a/SRC/cptts2.f
+++ b/SRC/cptts2.f
@@ -1,9 +1,114 @@
+*> \brief \b CPTTS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTTS2( IUPLO, N, NRHS, D, E, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER IUPLO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* COMPLEX B( LDB, * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTTS2 solves a tridiagonal system of the form
+*> A * X = B
+*> using the factorization A = U**H*D*U or A = L*D*L**H computed by CPTTRF.
+*> D is a diagonal matrix specified in the vector D, U (or L) is a unit
+*> bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
+*> the vector E, and X and B are N by NRHS matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IUPLO
+*> \verbatim
+*> IUPLO is INTEGER
+*> Specifies the form of the factorization and whether the
+*> vector E is the superdiagonal of the upper bidiagonal factor
+*> U or the subdiagonal of the lower bidiagonal factor L.
+*> = 1: A = U**H *D*U, E is the superdiagonal of U
+*> = 0: A = L*D*L**H, E is the subdiagonal of L
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization A = U**H *D*U or A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> If IUPLO = 1, the (n-1) superdiagonal elements of the unit
+*> bidiagonal factor U from the factorization A = U**H*D*U.
+*> If IUPLO = 0, the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the factorization A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors B for the system of
+*> linear equations.
+*> On exit, the solution vectors, X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CPTTS2( IUPLO, N, NRHS, D, E, B, LDB )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IUPLO, LDB, N, NRHS
@@ -13,51 +118,6 @@
COMPLEX B( LDB, * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* CPTTS2 solves a tridiagonal system of the form
-* A * X = B
-* using the factorization A = U**H*D*U or A = L*D*L**H computed by CPTTRF.
-* D is a diagonal matrix specified in the vector D, U (or L) is a unit
-* bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
-* the vector E, and X and B are N by NRHS matrices.
-*
-* Arguments
-* =========
-*
-* IUPLO (input) INTEGER
-* Specifies the form of the factorization and whether the
-* vector E is the superdiagonal of the upper bidiagonal factor
-* U or the subdiagonal of the lower bidiagonal factor L.
-* = 1: A = U**H *D*U, E is the superdiagonal of U
-* = 0: A = L*D*L**H, E is the subdiagonal of L
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization A = U**H *D*U or A = L*D*L**H.
-*
-* E (input) COMPLEX array, dimension (N-1)
-* If IUPLO = 1, the (n-1) superdiagonal elements of the unit
-* bidiagonal factor U from the factorization A = U**H*D*U.
-* If IUPLO = 0, the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the factorization A = L*D*L**H.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors B for the system of
-* linear equations.
-* On exit, the solution vectors, X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/crot.f b/SRC/crot.f
index 99be483d..32904041 100644
--- a/SRC/crot.f
+++ b/SRC/crot.f
@@ -1,9 +1,103 @@
+*> \brief \b CROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CROT( N, CX, INCX, CY, INCY, C, S )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* REAL C
+* COMPLEX S
+* ..
+* .. Array Arguments ..
+* COMPLEX CX( * ), CY( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CROT applies a plane rotation, where the cos (C) is real and the
+*> sin (S) is complex, and the vectors CX and CY are complex.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements in the vectors CX and CY.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*> CX is COMPLEX array, dimension (N)
+*> On input, the vector X.
+*> On output, CX is overwritten with C*X + S*Y.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of CY. INCX <> 0.
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*> CY is COMPLEX array, dimension (N)
+*> On input, the vector Y.
+*> On output, CY is overwritten with -CONJG(S)*X + C*Y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between successive values of CY. INCX <> 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX
+*> C and S define a rotation
+*> [ C S ]
+*> [ -conjg(S) C ]
+*> where C*C + S*CONJG(S) = 1.0.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CROT( N, CX, INCX, CY, INCY, C, S )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
@@ -14,39 +108,6 @@
COMPLEX CX( * ), CY( * )
* ..
*
-* Purpose
-* =======
-*
-* CROT applies a plane rotation, where the cos (C) is real and the
-* sin (S) is complex, and the vectors CX and CY are complex.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of elements in the vectors CX and CY.
-*
-* CX (input/output) COMPLEX array, dimension (N)
-* On input, the vector X.
-* On output, CX is overwritten with C*X + S*Y.
-*
-* INCX (input) INTEGER
-* The increment between successive values of CY. INCX <> 0.
-*
-* CY (input/output) COMPLEX array, dimension (N)
-* On input, the vector Y.
-* On output, CY is overwritten with -CONJG(S)*X + C*Y.
-*
-* INCY (input) INTEGER
-* The increment between successive values of CY. INCX <> 0.
-*
-* C (input) REAL
-* S (input) COMPLEX
-* C and S define a rotation
-* [ C S ]
-* [ -conjg(S) C ]
-* where C*C + S*CONJG(S) = 1.0.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cspcon.f b/SRC/cspcon.f
index f1c6debe..cc57228c 100644
--- a/SRC/cspcon.f
+++ b/SRC/cspcon.f
@@ -1,11 +1,119 @@
+*> \brief \b CSPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex symmetric packed matrix A using the
+*> factorization A = U*D*U**T or A = L*D*L**T computed by CSPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSPTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,51 +125,6 @@
COMPLEX AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CSPCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex symmetric packed matrix A using the
-* factorization A = U*D*U**T or A = L*D*L**T computed by CSPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSPTRF, stored as a
-* packed triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSPTRF.
-*
-* ANORM (input) REAL
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cspmv.f b/SRC/cspmv.f
index 68043a36..51560ac8 100644
--- a/SRC/cspmv.f
+++ b/SRC/cspmv.f
@@ -1,9 +1,155 @@
+*> \brief \b CSPMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPMV( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, INCY, N
+* COMPLEX ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * ), X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension at least
+*> ( ( N*( N + 1 ) )/2 ).
+*> Before entry, with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on.
+*> Before entry, with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the N-
+*> element vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CSPMV( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,82 +160,6 @@
COMPLEX AP( * ), X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* CSPMV performs the matrix-vector operation
-*
-* y := alpha*A*x + beta*y,
-*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric matrix, supplied in packed form.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) COMPLEX
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AP (input) COMPLEX array, dimension at least
-* ( ( N*( N + 1 ) )/2 ).
-* Before entry, with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on.
-* Before entry, with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on.
-* Unchanged on exit.
-*
-* X (input) COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the N-
-* element vector x.
-* Unchanged on exit.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA (input) COMPLEX
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y (input/output) COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cspr.f b/SRC/cspr.f
index cb54ff2f..7843e4f8 100644
--- a/SRC/cspr.f
+++ b/SRC/cspr.f
@@ -1,9 +1,136 @@
+*> \brief \b CSPR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPR( UPLO, N, ALPHA, X, INCX, AP )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, N
+* COMPLEX ALPHA
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPR performs the symmetric rank 1 operation
+*>
+*> A := alpha*x*x**H + A,
+*>
+*> where alpha is a complex scalar, x is an n element vector and A is an
+*> n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the N-
+*> element vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension at least
+*> ( ( N*( N + 1 ) )/2 ).
+*> Before entry, with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry, with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CSPR( UPLO, N, ALPHA, X, INCX, AP )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,72 +141,6 @@
COMPLEX AP( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* CSPR performs the symmetric rank 1 operation
-*
-* A := alpha*x*x**H + A,
-*
-* where alpha is a complex scalar, x is an n element vector and A is an
-* n by n symmetric matrix, supplied in packed form.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) COMPLEX
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X (input) COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the N-
-* element vector x.
-* Unchanged on exit.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* AP (input/output) COMPLEX array, dimension at least
-* ( ( N*( N + 1 ) )/2 ).
-* Before entry, with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry, with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csprfs.f b/SRC/csprfs.f
index 3eae840d..3a0603ea 100644
--- a/SRC/csprfs.f
+++ b/SRC/csprfs.f
@@ -1,12 +1,181 @@
+*> \brief \b CSPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
+* FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is COMPLEX array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A. AFP contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or
+*> A = L*D*L**T as computed by CSPTRF, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CSPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
$ FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -19,87 +188,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CSPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The factored form of the matrix A. AFP contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or
-* A = L*D*L**T as computed by CSPTRF, stored as a packed
-* triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSPTRF.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CSPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cspsv.f b/SRC/cspsv.f
index 01b8e650..c54120be 100644
--- a/SRC/cspsv.f
+++ b/SRC/cspsv.f
@@ -1,105 +1,175 @@
- SUBROUTINE CSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> CSPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CSPSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric matrix stored in packed format and X
-* and B are N-by-NRHS matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, D is symmetric and block diagonal with 1-by-1
-* and 2-by-2 diagonal blocks. The factored form of A is then used to
-* solve the system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric matrix stored in packed format and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, D is symmetric and block diagonal with 1-by-1
+*> and 2-by-2 diagonal blocks. The factored form of A is then used to
+*> solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by CSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by CSPTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be
-* computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by CSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by CSPTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Further Details
-* ===============
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
+*> \ingroup complexOTHERsolve
*
-* Two-dimensional storage of the symmetric matrix A:
*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cspsvx.f b/SRC/cspsvx.f
index 397dd762..1930529b 100644
--- a/SRC/cspsvx.f
+++ b/SRC/cspsvx.f
@@ -1,10 +1,279 @@
+*> \brief <b> CSPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
+* LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPSVX uses the diagonal pivoting factorization A = U*D*U**T or
+*> A = L*D*L**T to compute the solution to a complex system of linear
+*> equations A * X = B, where A is an N-by-N symmetric matrix stored
+*> in packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AFP and IPIV contain the factored form
+*> of A. AP, AFP and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) COMPLEX array, dimension (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by CSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by CSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by CSPTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by CSPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
$ LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -18,173 +287,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CSPSVX uses the diagonal pivoting factorization A = U*D*U**T or
-* A = L*D*L**T to compute the solution to a complex system of linear
-* equations A * X = B, where A is an N-by-N symmetric matrix stored
-* in packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AFP and IPIV contain the factored form
-* of A. AP, AFP and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* AFP (input or output) COMPLEX array, dimension (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by CSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by CSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by CSPTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by CSPTRF.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csptrf.f b/SRC/csptrf.f
index 4a84f624..7a9e8ce8 100644
--- a/SRC/csptrf.f
+++ b/SRC/csptrf.f
@@ -1,9 +1,162 @@
+*> \brief \b CSPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPTRF( UPLO, N, AP, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPTRF computes the factorization of a complex symmetric matrix A
+*> stored in packed format using the Bunch-Kaufman diagonal pivoting
+*> method:
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L, stored as a packed triangular
+*> matrix overwriting A (see below for further details).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CSPTRF( UPLO, N, AP, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,98 +167,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CSPTRF computes the factorization of a complex symmetric matrix A
-* stored in packed format using the Bunch-Kaufman diagonal pivoting
-* method:
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L, stored as a packed triangular
-* matrix overwriting A (see below for further details).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csptri.f b/SRC/csptri.f
index 503f66db..34407a3f 100644
--- a/SRC/csptri.f
+++ b/SRC/csptri.f
@@ -1,9 +1,111 @@
+*> \brief \b CSPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPTRI computes the inverse of a complex symmetric indefinite matrix
+*> A in packed storage using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by CSPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CSPTRF,
+*> stored as a packed triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix, stored as a packed triangular matrix. The j-th column
+*> of inv(A) is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSPTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,49 +116,6 @@
COMPLEX AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CSPTRI computes the inverse of a complex symmetric indefinite matrix
-* A in packed storage using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by CSPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CSPTRF,
-* stored as a packed triangular matrix.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix, stored as a packed triangular matrix. The j-th column
-* of inv(A) is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSPTRF.
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csptrs.f b/SRC/csptrs.f
index 939a4719..8937a0c5 100644
--- a/SRC/csptrs.f
+++ b/SRC/csptrs.f
@@ -1,61 +1,125 @@
- SUBROUTINE CSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b CSPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CSPTRS solves a system of linear equations A*X = B with a complex
-* symmetric matrix A stored in packed format using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by CSPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPTRS solves a system of linear equations A*X = B with a complex
+*> symmetric matrix A stored in packed format using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by CSPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSPTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSPTRF, stored as a
-* packed triangular matrix.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSPTRF.
+*> \ingroup complexOTHERcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE CSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/csrscl.f b/SRC/csrscl.f
index d4788f6a..b59115b2 100644
--- a/SRC/csrscl.f
+++ b/SRC/csrscl.f
@@ -1,9 +1,85 @@
+*> \brief \b CSRSCL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSRSCL( N, SA, SX, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* REAL SA
+* ..
+* .. Array Arguments ..
+* COMPLEX SX( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSRSCL multiplies an n-element complex vector x by the real scalar
+*> 1/a. This is done without overflow or underflow as long as
+*> the final result x/a does not overflow or underflow.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of components of the vector x.
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*> SA is REAL
+*> The scalar a which is used to divide each component of x.
+*> SA must be >= 0, or the subroutine will divide by zero.
+*> \endverbatim
+*>
+*> \param[in,out] SX
+*> \verbatim
+*> SX is COMPLEX array, dimension
+*> (1+(N-1)*abs(INCX))
+*> The n-element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of the vector SX.
+*> > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE CSRSCL( N, SA, SX, INCX )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,31 +89,6 @@
COMPLEX SX( * )
* ..
*
-* Purpose
-* =======
-*
-* CSRSCL multiplies an n-element complex vector x by the real scalar
-* 1/a. This is done without overflow or underflow as long as
-* the final result x/a does not overflow or underflow.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of components of the vector x.
-*
-* SA (input) REAL
-* The scalar a which is used to divide each component of x.
-* SA must be >= 0, or the subroutine will divide by zero.
-*
-* SX (input/output) COMPLEX array, dimension
-* (1+(N-1)*abs(INCX))
-* The n-element vector x.
-*
-* INCX (input) INTEGER
-* The increment between successive values of the vector SX.
-* > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cstedc.f b/SRC/cstedc.f
index 5be81ca5..1dbb4917 100644
--- a/SRC/cstedc.f
+++ b/SRC/cstedc.f
@@ -1,10 +1,222 @@
+*> \brief \b CSTEDC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK,
+* LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), E( * ), RWORK( * )
+* COMPLEX WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSTEDC computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the divide and conquer method.
+*> The eigenvectors of a full or band complex Hermitian matrix can also
+*> be found if CHETRD or CHPTRD or CHBTRD has been used to reduce this
+*> matrix to tridiagonal form.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none. See SLAED3 for details.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'I': Compute eigenvectors of tridiagonal matrix also.
+*> = 'V': Compute eigenvectors of original Hermitian matrix
+*> also. On entry, Z contains the unitary matrix used
+*> to reduce the original matrix to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the subdiagonal elements of the tridiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,N)
+*> On entry, if COMPZ = 'V', then Z contains the unitary
+*> matrix used in the reduction to tridiagonal form.
+*> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*> orthonormal eigenvectors of the original Hermitian matrix,
+*> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*> of the symmetric tridiagonal matrix.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If COMPZ = 'N' or 'I', or N <= 1, LWORK must be at least 1.
+*> If COMPZ = 'V' and N > 1, LWORK must be at least N*N.
+*> Note that for COMPZ = 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LWORK need
+*> only be 1.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK.
+*> If COMPZ = 'N' or N <= 1, LRWORK must be at least 1.
+*> If COMPZ = 'V' and N > 1, LRWORK must be at least
+*> 1 + 3*N + 2*N*lg N + 4*N**2 ,
+*> where lg( N ) = smallest integer k such
+*> that 2**k >= N.
+*> If COMPZ = 'I' and N > 1, LRWORK must be at least
+*> 1 + 4*N + 2*N**2 .
+*> Note that for COMPZ = 'I' or 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LRWORK
+*> need only be max(1,2*(N-1)).
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If COMPZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If COMPZ = 'V' or N > 1, LIWORK must be at least
+*> 6 + 6*N + 5*N*lg N.
+*> If COMPZ = 'I' or N > 1, LIWORK must be at least
+*> 3 + 5*N .
+*> Note that for COMPZ = 'I' or 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LIWORK
+*> need only be 1.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute an eigenvalue while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK,
$ LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -16,129 +228,6 @@
COMPLEX WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CSTEDC computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric tridiagonal matrix using the divide and conquer method.
-* The eigenvectors of a full or band complex Hermitian matrix can also
-* be found if CHETRD or CHPTRD or CHBTRD has been used to reduce this
-* matrix to tridiagonal form.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none. See SLAED3 for details.
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'I': Compute eigenvectors of tridiagonal matrix also.
-* = 'V': Compute eigenvectors of original Hermitian matrix
-* also. On entry, Z contains the unitary matrix used
-* to reduce the original matrix to tridiagonal form.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the subdiagonal elements of the tridiagonal matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,N)
-* On entry, if COMPZ = 'V', then Z contains the unitary
-* matrix used in the reduction to tridiagonal form.
-* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-* orthonormal eigenvectors of the original Hermitian matrix,
-* and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-* of the symmetric tridiagonal matrix.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If eigenvectors are desired, then LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If COMPZ = 'N' or 'I', or N <= 1, LWORK must be at least 1.
-* If COMPZ = 'V' and N > 1, LWORK must be at least N*N.
-* Note that for COMPZ = 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LWORK need
-* only be 1.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) REAL array, dimension (MAX(1,LRWORK))
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK.
-* If COMPZ = 'N' or N <= 1, LRWORK must be at least 1.
-* If COMPZ = 'V' and N > 1, LRWORK must be at least
-* 1 + 3*N + 2*N*lg N + 4*N**2 ,
-* where lg( N ) = smallest integer k such
-* that 2**k >= N.
-* If COMPZ = 'I' and N > 1, LRWORK must be at least
-* 1 + 4*N + 2*N**2 .
-* Note that for COMPZ = 'I' or 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LRWORK
-* need only be max(1,2*(N-1)).
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If COMPZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If COMPZ = 'V' or N > 1, LIWORK must be at least
-* 6 + 6*N + 5*N*lg N.
-* If COMPZ = 'I' or N > 1, LIWORK must be at least
-* 3 + 5*N .
-* Note that for COMPZ = 'I' or 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LIWORK
-* need only be 1.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute an eigenvalue while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cstegr.f b/SRC/cstegr.f
index b044d4a4..326fbe96 100644
--- a/SRC/cstegr.f
+++ b/SRC/cstegr.f
@@ -1,14 +1,259 @@
+*> \brief \b CSTEGR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * )
+* COMPLEX Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSTEGR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
+*> a well defined set of pairwise different real eigenvalues, the corresponding
+*> real eigenvectors are pairwise orthogonal.
+*>
+*> The spectrum may be computed either completely or partially by specifying
+*> either an interval (VL,VU] or a range of indices IL:IU for the desired
+*> eigenvalues.
+*>
+*> CSTEGR is a compatability wrapper around the improved CSTEMR routine.
+*> See SSTEMR for further details.
+*>
+*> One important change is that the ABSTOL parameter no longer provides any
+*> benefit and hence is no longer used.
+*>
+*> Note : CSTEGR and CSTEMR work only on machines which follow
+*> IEEE-754 floating-point standard in their handling of infinities and
+*> NaNs. Normal execution may create these exceptiona values and hence
+*> may abort due to a floating point exception in environments which
+*> do not conform to the IEEE-754 standard.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal matrix
+*> T. On exit, D is overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the tridiagonal
+*> matrix T in elements 1 to N-1 of E. E(N) need not be set on
+*> input, but is used internally as workspace.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> Unused. Was the absolute error tolerance for the
+*> eigenvalues/eigenvectors in previous versions.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix T
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> Supplying N columns is always safe.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th computed eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ). This is relevant in the case when the matrix
+*> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal
+*> (and minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,18*N)
+*> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N)
+*> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
+*> if only the eigenvalues are to be computed.
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = 1X, internal error in SLARRE,
+*> if INFO = 2X, internal error in CLARRV.
+*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
+*> the nonzero error code returned by SLARRE or
+*> CLARRV, respectively.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
-
- IMPLICIT NONE
-*
*
* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -21,145 +266,6 @@
COMPLEX Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CSTEGR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
-* a well defined set of pairwise different real eigenvalues, the corresponding
-* real eigenvectors are pairwise orthogonal.
-*
-* The spectrum may be computed either completely or partially by specifying
-* either an interval (VL,VU] or a range of indices IL:IU for the desired
-* eigenvalues.
-*
-* CSTEGR is a compatability wrapper around the improved CSTEMR routine.
-* See SSTEMR for further details.
-*
-* One important change is that the ABSTOL parameter no longer provides any
-* benefit and hence is no longer used.
-*
-* Note : CSTEGR and CSTEMR work only on machines which follow
-* IEEE-754 floating-point standard in their handling of infinities and
-* NaNs. Normal execution may create these exceptiona values and hence
-* may abort due to a floating point exception in environments which
-* do not conform to the IEEE-754 standard.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal matrix
-* T. On exit, D is overwritten.
-*
-* E (input/output) REAL array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the tridiagonal
-* matrix T in elements 1 to N-1 of E. E(N) need not be set on
-* input, but is used internally as workspace.
-* On exit, E is overwritten.
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* Unused. Was the absolute error tolerance for the
-* eigenvalues/eigenvectors in previous versions.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix T
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-* Supplying N columns is always safe.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', then LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th computed eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ). This is relevant in the case when the matrix
-* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
-*
-* WORK (workspace/output) REAL array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal
-* (and minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,18*N)
-* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (LIWORK)
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N)
-* if the eigenvectors are desired, and LIWORK >= max(1,8*N)
-* if only the eigenvalues are to be computed.
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* On exit, INFO
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = 1X, internal error in SLARRE,
-* if INFO = 2X, internal error in CLARRV.
-* Here, the digit X = ABS( IINFO ) < 10, where IINFO is
-* the nonzero error code returned by SLARRE or
-* CLARRV, respectively.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cstein.f b/SRC/cstein.f
index 041ffa5f..25df410e 100644
--- a/SRC/cstein.f
+++ b/SRC/cstein.f
@@ -1,10 +1,184 @@
+*> \brief \b CSTEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), IFAIL( * ), ISPLIT( * ),
+* $ IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * )
+* COMPLEX Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSTEIN computes the eigenvectors of a real symmetric tridiagonal
+*> matrix T corresponding to specified eigenvalues, using inverse
+*> iteration.
+*>
+*> The maximum number of iterations allowed for each eigenvector is
+*> specified by an internal parameter MAXITS (currently set to 5).
+*>
+*> Although the eigenvectors are real, they are stored in a complex
+*> array, which may be passed to CUNMTR or CUPMTR for back
+*> transformation to the eigenvectors of a complex Hermitian matrix
+*> which was reduced to tridiagonal form.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix
+*> T, stored in elements 1 to N-1.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenvectors to be found. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements of W contain the eigenvalues for
+*> which eigenvectors are to be computed. The eigenvalues
+*> should be grouped by split-off block and ordered from
+*> smallest to largest within the block. ( The output array
+*> W from SSTEBZ with ORDER = 'B' is expected here. )
+*> \endverbatim
+*>
+*> \param[in] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The submatrix indices associated with the corresponding
+*> eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to
+*> the first submatrix from the top, =2 if W(i) belongs to
+*> the second submatrix, etc. ( The output array IBLOCK
+*> from SSTEBZ is expected here. )
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into submatrices.
+*> The first submatrix consists of rows/columns 1 to
+*> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
+*> through ISPLIT( 2 ), etc.
+*> ( The output array ISPLIT from SSTEBZ is expected here. )
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, M)
+*> The computed eigenvectors. The eigenvector associated
+*> with the eigenvalue W(i) is stored in the i-th column of
+*> Z. Any vector which fails to converge is set to its current
+*> iterate after MAXITS iterations.
+*> The imaginary parts of the eigenvectors are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (M)
+*> On normal exit, all elements of IFAIL are zero.
+*> If one or more eigenvectors fail to converge after
+*> MAXITS iterations, then their indices are stored in
+*> array IFAIL.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge
+*> in MAXITS iterations. Their indices are stored in
+*> array IFAIL.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> MAXITS INTEGER, default = 5
+*> The maximum number of iterations performed.
+*> \endverbatim
+*> \verbatim
+*> EXTRA INTEGER, default = 2
+*> The number of iterations performed after norm growth
+*> criterion is satisfied, should be at least 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDZ, M, N
@@ -16,96 +190,6 @@
COMPLEX Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CSTEIN computes the eigenvectors of a real symmetric tridiagonal
-* matrix T corresponding to specified eigenvalues, using inverse
-* iteration.
-*
-* The maximum number of iterations allowed for each eigenvector is
-* specified by an internal parameter MAXITS (currently set to 5).
-*
-* Although the eigenvectors are real, they are stored in a complex
-* array, which may be passed to CUNMTR or CUPMTR for back
-* transformation to the eigenvectors of a complex Hermitian matrix
-* which was reduced to tridiagonal form.
-*
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix
-* T, stored in elements 1 to N-1.
-*
-* M (input) INTEGER
-* The number of eigenvectors to be found. 0 <= M <= N.
-*
-* W (input) REAL array, dimension (N)
-* The first M elements of W contain the eigenvalues for
-* which eigenvectors are to be computed. The eigenvalues
-* should be grouped by split-off block and ordered from
-* smallest to largest within the block. ( The output array
-* W from SSTEBZ with ORDER = 'B' is expected here. )
-*
-* IBLOCK (input) INTEGER array, dimension (N)
-* The submatrix indices associated with the corresponding
-* eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to
-* the first submatrix from the top, =2 if W(i) belongs to
-* the second submatrix, etc. ( The output array IBLOCK
-* from SSTEBZ is expected here. )
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into submatrices.
-* The first submatrix consists of rows/columns 1 to
-* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
-* through ISPLIT( 2 ), etc.
-* ( The output array ISPLIT from SSTEBZ is expected here. )
-*
-* Z (output) COMPLEX array, dimension (LDZ, M)
-* The computed eigenvectors. The eigenvector associated
-* with the eigenvalue W(i) is stored in the i-th column of
-* Z. Any vector which fails to converge is set to its current
-* iterate after MAXITS iterations.
-* The imaginary parts of the eigenvectors are set to zero.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (5*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* IFAIL (output) INTEGER array, dimension (M)
-* On normal exit, all elements of IFAIL are zero.
-* If one or more eigenvectors fail to converge after
-* MAXITS iterations, then their indices are stored in
-* array IFAIL.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge
-* in MAXITS iterations. Their indices are stored in
-* array IFAIL.
-*
-* Internal Parameters
-* ===================
-*
-* MAXITS INTEGER, default = 5
-* The maximum number of iterations performed.
-*
-* EXTRA INTEGER, default = 2
-* The number of iterations performed after norm growth
-* criterion is satisfied, should be at least 1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cstemr.f b/SRC/cstemr.f
index 94256243..4a02e15a 100644
--- a/SRC/cstemr.f
+++ b/SRC/cstemr.f
@@ -1,12 +1,332 @@
+*> \brief \b CSTEMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
+* M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
+* IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* LOGICAL TRYRAC
+* INTEGER IL, INFO, IU, LDZ, NZC, LIWORK, LWORK, M, N
+* REAL VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * )
+* COMPLEX Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSTEMR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
+*> a well defined set of pairwise different real eigenvalues, the corresponding
+*> real eigenvectors are pairwise orthogonal.
+*>
+*> The spectrum may be computed either completely or partially by specifying
+*> either an interval (VL,VU] or a range of indices IL:IU for the desired
+*> eigenvalues.
+*>
+*> Depending on the number of desired eigenvalues, these are computed either
+*> by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
+*> computed by the use of various suitable L D L^T factorizations near clusters
+*> of close eigenvalues (referred to as RRRs, Relatively Robust
+*> Representations). An informal sketch of the algorithm follows.
+*>
+*> For each unreduced block (submatrix) of T,
+*> (a) Compute T - sigma I = L D L^T, so that L and D
+*> define all the wanted eigenvalues to high relative accuracy.
+*> This means that small relative changes in the entries of D and L
+*> cause only small relative changes in the eigenvalues and
+*> eigenvectors. The standard (unfactored) representation of the
+*> tridiagonal matrix T does not have this property in general.
+*> (b) Compute the eigenvalues to suitable accuracy.
+*> If the eigenvectors are desired, the algorithm attains full
+*> accuracy of the computed eigenvalues only right before
+*> the corresponding vectors have to be computed, see steps c) and d).
+*> (c) For each cluster of close eigenvalues, select a new
+*> shift close to the cluster, find a new factorization, and refine
+*> the shifted eigenvalues to suitable accuracy.
+*> (d) For each eigenvalue with a large enough relative separation compute
+*> the corresponding eigenvector by forming a rank revealing twisted
+*> factorization. Go back to (c) for any clusters that remain.
+*>
+*> For more details, see:
+*> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
+*> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
+*> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
+*> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
+*> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
+*> 2004. Also LAPACK Working Note 154.
+*> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem",
+*> Computer Science Division Technical Report No. UCB/CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*> Further Details
+*> 1.CSTEMR works only on machines which follow IEEE-754
+*> floating-point standard in their handling of infinities and NaNs.
+*> This permits the use of efficient inner loops avoiding a check for
+*> zero divisors.
+*>
+*> 2. LAPACK routines can be used to reduce a complex Hermitean matrix to
+*> real symmetric tridiagonal form.
+*>
+*> (Any complex Hermitean tridiagonal matrix has real values on its diagonal
+*> and potentially complex numbers on its off-diagonals. By applying a
+*> similarity transform with an appropriate diagonal matrix
+*> diag(1,e^{i \phy_1}, ... , e^{i \phy_{n-1}}), the complex Hermitean
+*> matrix can be transformed into a real symmetric matrix and complex
+*> arithmetic can be entirely avoided.)
+*>
+*> While the eigenvectors of the real symmetric tridiagonal matrix are real,
+*> the eigenvectors of original complex Hermitean matrix have complex entries
+*> in general.
+*> Since LAPACK drivers overwrite the matrix data with the eigenvectors,
+*> CSTEMR accepts complex workspace to facilitate interoperability
+*> with CUNMTR or CUPMTR.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal matrix
+*> T. On exit, D is overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the tridiagonal
+*> matrix T in elements 1 to N-1 of E. E(N) need not be set on
+*> input, but is used internally as workspace.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix T
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and can be computed with a workspace
+*> query by setting NZC = -1, see below.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] NZC
+*> \verbatim
+*> NZC is INTEGER
+*> The number of eigenvectors to be held in the array Z.
+*> If RANGE = 'A', then NZC >= max(1,N).
+*> If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
+*> If RANGE = 'I', then NZC >= IU-IL+1.
+*> If NZC = -1, then a workspace query is assumed; the
+*> routine calculates the number of columns of the array Z that
+*> are needed to hold the eigenvectors.
+*> This value is returned as the first entry of the Z array, and
+*> no error message related to NZC is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th computed eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ). This is relevant in the case when the matrix
+*> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
+*> \endverbatim
+*>
+*> \param[in,out] TRYRAC
+*> \verbatim
+*> TRYRAC is LOGICAL
+*> If TRYRAC.EQ..TRUE., indicates that the code should check whether
+*> the tridiagonal matrix defines its eigenvalues to high relative
+*> accuracy. If so, the code uses relative-accuracy preserving
+*> algorithms that might be (a bit) slower depending on the matrix.
+*> If the matrix does not define its eigenvalues to high relative
+*> accuracy, the code can uses possibly faster algorithms.
+*> If TRYRAC.EQ..FALSE., the code is not required to guarantee
+*> relatively accurate eigenvalues and can use the fastest possible
+*> techniques.
+*> On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
+*> does not define its eigenvalues to high relative accuracy.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal
+*> (and minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,18*N)
+*> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N)
+*> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
+*> if only the eigenvalues are to be computed.
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = 1X, internal error in SLARRE,
+*> if INFO = 2X, internal error in CLARRV.
+*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
+*> the nonzero error code returned by SLARRE or
+*> CLARRV, respectively.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
$ IWORK, LIWORK, INFO )
- IMPLICIT NONE
*
-* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK computational routine (version 3.2.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -20,215 +340,6 @@
COMPLEX Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CSTEMR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
-* a well defined set of pairwise different real eigenvalues, the corresponding
-* real eigenvectors are pairwise orthogonal.
-*
-* The spectrum may be computed either completely or partially by specifying
-* either an interval (VL,VU] or a range of indices IL:IU for the desired
-* eigenvalues.
-*
-* Depending on the number of desired eigenvalues, these are computed either
-* by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
-* computed by the use of various suitable L D L^T factorizations near clusters
-* of close eigenvalues (referred to as RRRs, Relatively Robust
-* Representations). An informal sketch of the algorithm follows.
-*
-* For each unreduced block (submatrix) of T,
-* (a) Compute T - sigma I = L D L^T, so that L and D
-* define all the wanted eigenvalues to high relative accuracy.
-* This means that small relative changes in the entries of D and L
-* cause only small relative changes in the eigenvalues and
-* eigenvectors. The standard (unfactored) representation of the
-* tridiagonal matrix T does not have this property in general.
-* (b) Compute the eigenvalues to suitable accuracy.
-* If the eigenvectors are desired, the algorithm attains full
-* accuracy of the computed eigenvalues only right before
-* the corresponding vectors have to be computed, see steps c) and d).
-* (c) For each cluster of close eigenvalues, select a new
-* shift close to the cluster, find a new factorization, and refine
-* the shifted eigenvalues to suitable accuracy.
-* (d) For each eigenvalue with a large enough relative separation compute
-* the corresponding eigenvector by forming a rank revealing twisted
-* factorization. Go back to (c) for any clusters that remain.
-*
-* For more details, see:
-* - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
-* to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
-* Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
-* - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
-* Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
-* 2004. Also LAPACK Working Note 154.
-* - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem",
-* Computer Science Division Technical Report No. UCB/CSD-97-971,
-* UC Berkeley, May 1997.
-*
-* Further Details
-* 1.CSTEMR works only on machines which follow IEEE-754
-* floating-point standard in their handling of infinities and NaNs.
-* This permits the use of efficient inner loops avoiding a check for
-* zero divisors.
-*
-* 2. LAPACK routines can be used to reduce a complex Hermitean matrix to
-* real symmetric tridiagonal form.
-*
-* (Any complex Hermitean tridiagonal matrix has real values on its diagonal
-* and potentially complex numbers on its off-diagonals. By applying a
-* similarity transform with an appropriate diagonal matrix
-* diag(1,e^{i \phy_1}, ... , e^{i \phy_{n-1}}), the complex Hermitean
-* matrix can be transformed into a real symmetric matrix and complex
-* arithmetic can be entirely avoided.)
-*
-* While the eigenvectors of the real symmetric tridiagonal matrix are real,
-* the eigenvectors of original complex Hermitean matrix have complex entries
-* in general.
-* Since LAPACK drivers overwrite the matrix data with the eigenvectors,
-* CSTEMR accepts complex workspace to facilitate interoperability
-* with CUNMTR or CUPMTR.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal matrix
-* T. On exit, D is overwritten.
-*
-* E (input/output) REAL array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the tridiagonal
-* matrix T in elements 1 to N-1 of E. E(N) need not be set on
-* input, but is used internally as workspace.
-* On exit, E is overwritten.
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) COMPLEX array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix T
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and can be computed with a workspace
-* query by setting NZC = -1, see below.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', then LDZ >= max(1,N).
-*
-* NZC (input) INTEGER
-* The number of eigenvectors to be held in the array Z.
-* If RANGE = 'A', then NZC >= max(1,N).
-* If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
-* If RANGE = 'I', then NZC >= IU-IL+1.
-* If NZC = -1, then a workspace query is assumed; the
-* routine calculates the number of columns of the array Z that
-* are needed to hold the eigenvectors.
-* This value is returned as the first entry of the Z array, and
-* no error message related to NZC is issued by XERBLA.
-*
-* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th computed eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ). This is relevant in the case when the matrix
-* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
-*
-* TRYRAC (input/output) LOGICAL
-* If TRYRAC.EQ..TRUE., indicates that the code should check whether
-* the tridiagonal matrix defines its eigenvalues to high relative
-* accuracy. If so, the code uses relative-accuracy preserving
-* algorithms that might be (a bit) slower depending on the matrix.
-* If the matrix does not define its eigenvalues to high relative
-* accuracy, the code can uses possibly faster algorithms.
-* If TRYRAC.EQ..FALSE., the code is not required to guarantee
-* relatively accurate eigenvalues and can use the fastest possible
-* techniques.
-* On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
-* does not define its eigenvalues to high relative accuracy.
-*
-* WORK (workspace/output) REAL array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal
-* (and minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,18*N)
-* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (LIWORK)
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N)
-* if the eigenvectors are desired, and LIWORK >= max(1,8*N)
-* if only the eigenvalues are to be computed.
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* On exit, INFO
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = 1X, internal error in SLARRE,
-* if INFO = 2X, internal error in CLARRV.
-* Here, the digit X = ABS( IINFO ) < 10, where IINFO is
-* the nonzero error code returned by SLARRE or
-* CLARRV, respectively.
-*
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csteqr.f b/SRC/csteqr.f
index ad7542c2..6c73389e 100644
--- a/SRC/csteqr.f
+++ b/SRC/csteqr.f
@@ -1,9 +1,133 @@
+*> \brief \b CSTEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), WORK( * )
+* COMPLEX Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the implicit QL or QR method.
+*> The eigenvectors of a full or band complex Hermitian matrix can also
+*> be found if CHETRD or CHPTRD or CHBTRD has been used to reduce this
+*> matrix to tridiagonal form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'V': Compute eigenvalues and eigenvectors of the original
+*> Hermitian matrix. On entry, Z must contain the
+*> unitary matrix used to reduce the original matrix
+*> to tridiagonal form.
+*> = 'I': Compute eigenvalues and eigenvectors of the
+*> tridiagonal matrix. Z is initialized to the identity
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', then Z contains the unitary
+*> matrix used in the reduction to tridiagonal form.
+*> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*> orthonormal eigenvectors of the original Hermitian matrix,
+*> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*> of the symmetric tridiagonal matrix.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (max(1,2*N-2))
+*> If COMPZ = 'N', then WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm has failed to find all the eigenvalues in
+*> a total of 30*N iterations; if INFO = i, then i
+*> elements of E have not converged to zero; on exit, D
+*> and E contain the elements of a symmetric tridiagonal
+*> matrix which is unitarily similar to the original
+*> matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -14,66 +138,6 @@
COMPLEX Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CSTEQR computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric tridiagonal matrix using the implicit QL or QR method.
-* The eigenvectors of a full or band complex Hermitian matrix can also
-* be found if CHETRD or CHPTRD or CHBTRD has been used to reduce this
-* matrix to tridiagonal form.
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'V': Compute eigenvalues and eigenvectors of the original
-* Hermitian matrix. On entry, Z must contain the
-* unitary matrix used to reduce the original matrix
-* to tridiagonal form.
-* = 'I': Compute eigenvalues and eigenvectors of the
-* tridiagonal matrix. Z is initialized to the identity
-* matrix.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', then Z contains the unitary
-* matrix used in the reduction to tridiagonal form.
-* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-* orthonormal eigenvectors of the original Hermitian matrix,
-* and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-* of the symmetric tridiagonal matrix.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* eigenvectors are desired, then LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (max(1,2*N-2))
-* If COMPZ = 'N', then WORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm has failed to find all the eigenvalues in
-* a total of 30*N iterations; if INFO = i, then i
-* elements of E have not converged to zero; on exit, D
-* and E contain the elements of a symmetric tridiagonal
-* matrix which is unitarily similar to the original
-* matrix.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csycon.f b/SRC/csycon.f
index 10601bea..c70341dd 100644
--- a/SRC/csycon.f
+++ b/SRC/csycon.f
@@ -1,12 +1,126 @@
+*> \brief \b CSYCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex symmetric matrix A using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by CSYTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+* =====================================================================
SUBROUTINE CSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,53 +132,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CSYCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex symmetric matrix A using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by CSYTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSYTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
-*
-* ANORM (input) REAL
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csyconv.f b/SRC/csyconv.f
index a3900d2c..3f4fbda7 100644
--- a/SRC/csyconv.f
+++ b/SRC/csyconv.f
@@ -1,69 +1,135 @@
- SUBROUTINE CSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK PROTOTYPE routine (version 3.2.2) --
-* -- Written by Julie Langou of the Univ. of TN --
-* May 2010
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO, WAY
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b CSYCONV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, WAY
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CSYCONV convert A given by TRF into L and D and vice-versa.
-* Get Non-diag elements of D (returned in workspace) and
-* apply or reverse permutation done in TRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYCONV convert A given by TRF into L and D and vice-versa.
+*> Get Non-diag elements of D (returned in workspace) and
+*> apply or reverse permutation done in TRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* WAY (input) CHARACTER*1
-* = 'C': Convert
-* = 'R': Revert
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] WAY
+*> \verbatim
+*> WAY is CHARACTER*1
+*> = 'C': Convert
+*> = 'R': Revert
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1.
+*> LWORK = N
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (N)
+*> \ingroup complexSYcomputational
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1.
-* LWORK = N
+* =====================================================================
+ SUBROUTINE CSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO, WAY
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/csyequb.f b/SRC/csyequb.f
index efe8c85d..6fba71c7 100644
--- a/SRC/csyequb.f
+++ b/SRC/csyequb.f
@@ -1,84 +1,154 @@
- SUBROUTINE CSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*> \brief \b CSYEQUB
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- REAL AMAX, SCOND
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), WORK( * )
- REAL S( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* REAL AMAX, SCOND
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), WORK( * )
+* REAL S( * )
+* ..
+*
* Purpose
* =======
*
-* CSYEQUB computes row and column scalings intended to equilibrate a
-* symmetric matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYEQUB computes row and column scalings intended to equilibrate a
+*> symmetric matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The N-by-N symmetric matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The N-by-N symmetric matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+* Authors
+* =======
*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (3*N)
+*> \ingroup complexSYcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
+*> Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
+*> DOI 10.1023/B:NUMA.0000016606.32820.69
+*> Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
*
-* Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
-* Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
-* DOI 10.1023/B:NUMA.0000016606.32820.69
-* Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ REAL AMAX, SCOND
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), WORK( * )
+ REAL S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/csymv.f b/SRC/csymv.f
index 06d95b10..e3d771da 100644
--- a/SRC/csymv.f
+++ b/SRC/csymv.f
@@ -1,9 +1,161 @@
+*> \brief \b CSYMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, INCY, LDA, N
+* COMPLEX ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> Before entry, with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced.
+*> Before entry, with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the N-
+*> element vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYauxiliary
+*
+* =====================================================================
SUBROUTINE CSYMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,85 +166,6 @@
COMPLEX A( LDA, * ), X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* CSYMV performs the matrix-vector operation
-*
-* y := alpha*A*x + beta*y,
-*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric matrix.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) COMPLEX
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX array, dimension ( LDA, N )
-* Before entry, with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced.
-* Before entry, with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the N-
-* element vector x.
-* Unchanged on exit.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA (input) COMPLEX
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y (input/output) COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csyr.f b/SRC/csyr.f
index cd74bb8d..a1e17946 100644
--- a/SRC/csyr.f
+++ b/SRC/csyr.f
@@ -1,9 +1,139 @@
+*> \brief \b CSYR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYR( UPLO, N, ALPHA, X, INCX, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, LDA, N
+* COMPLEX ALPHA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYR performs the symmetric rank 1 operation
+*>
+*> A := alpha*x*x**H + A,
+*>
+*> where alpha is a complex scalar, x is an n element vector and A is an
+*> n by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the N-
+*> element vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> Before entry, with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry, with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYauxiliary
+*
+* =====================================================================
SUBROUTINE CSYR( UPLO, N, ALPHA, X, INCX, A, LDA )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,72 +144,6 @@
COMPLEX A( LDA, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* CSYR performs the symmetric rank 1 operation
-*
-* A := alpha*x*x**H + A,
-*
-* where alpha is a complex scalar, x is an n element vector and A is an
-* n by n symmetric matrix.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) COMPLEX
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X (input) COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the N-
-* element vector x.
-* Unchanged on exit.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* A (input/output) COMPLEX array, dimension ( LDA, N )
-* Before entry, with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry, with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csyrfs.f b/SRC/csyrfs.f
index c7c203c9..c4ce1609 100644
--- a/SRC/csyrfs.f
+++ b/SRC/csyrfs.f
@@ -1,12 +1,193 @@
+*> \brief \b CSYRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite, and
+*> provides error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or
+*> A = L*D*L**T as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by CSYTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+* =====================================================================
SUBROUTINE CSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -19,93 +200,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CSYRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite, and
-* provides error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or
-* A = L*D*L**T as computed by CSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by CSYTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csyrfsx.f b/SRC/csyrfsx.f
index c5d67e22..3db0f49b 100644
--- a/SRC/csyrfsx.f
+++ b/SRC/csyrfsx.f
@@ -1,18 +1,423 @@
+*> \brief \b CSYRFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYRFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* REAL S( * ), PARAMS( * ), BERR( * ), RWORK( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CSYRFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite, and
+*> provides error bounds and backward error estimates for the
+*> solution. In addition to normwise error bound, the code provides
+*> maximum componentwise error bound if possible. See comments for
+*> ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or A =
+*> L*D*L**T as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+* =====================================================================
SUBROUTINE CSYRFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,274 +433,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* CSYRFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite, and
-* provides error bounds and backward error estimates for the
-* solution. In addition to normwise error bound, the code provides
-* maximum componentwise error bound if possible. See comments for
-* ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or A =
-* L*D*L**T as computed by SSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/csysv.f b/SRC/csysv.f
index 17e22a3e..93168cab 100644
--- a/SRC/csysv.f
+++ b/SRC/csysv.f
@@ -1,11 +1,174 @@
+*> \brief <b> CSYSV computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, LWORK, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
+*> used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the block diagonal matrix D and the
+*> multipliers used to obtain the factor U or L from the
+*> factorization A = U*D*U**T or A = L*D*L**T as computed by
+*> CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by CSYTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= 1, and for best performance
+*> LWORK >= max(1,N*NB), where NB is the optimal blocksize for
+*> CSYTRF.
+*> for LWORK < N, TRS will be done with Level BLAS 2
+*> for LWORK >= N, TRS will be done with Level BLAS 3
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYsolve
+*
+* =====================================================================
SUBROUTINE CSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,94 +179,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CSYSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
-* used to solve the system of equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the block diagonal matrix D and the
-* multipliers used to obtain the factor U or L from the
-* factorization A = U*D*U**T or A = L*D*L**T as computed by
-* CSYTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by CSYTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= 1, and for best performance
-* LWORK >= max(1,N*NB), where NB is the optimal blocksize for
-* CSYTRF.
-* for LWORK < N, TRS will be done with Level BLAS 2
-* for LWORK >= N, TRS will be done with Level BLAS 3
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/csysvx.f b/SRC/csysvx.f
index af1b2c7a..d359e6de 100644
--- a/SRC/csysvx.f
+++ b/SRC/csysvx.f
@@ -1,11 +1,286 @@
+*> \brief <b> CSYSVX computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
+* LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYSVX uses the diagonal pivoting factorization to compute the
+*> solution to a complex system of linear equations A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
+*> The form of the factorization is
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AF and IPIV contain the factored form
+*> of A. A, AF and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by CSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by CSYTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= max(1,2*N), and for best
+*> performance, when FACT = 'N', LWORK >= max(1,2*N,N*NB), where
+*> NB is the optimal blocksize for CSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYsolve
+*
+* =====================================================================
SUBROUTINE CSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
$ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -19,173 +294,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CSYSVX uses the diagonal pivoting factorization to compute the
-* solution to a complex system of linear equations A * X = B,
-* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
-* The form of the factorization is
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AF and IPIV contain the factored form
-* of A. A, AF and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by CSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by CSYTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by CSYTRF.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= max(1,2*N), and for best
-* performance, when FACT = 'N', LWORK >= max(1,2*N,N*NB), where
-* NB is the optimal blocksize for CSYTRF.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csysvxx.f b/SRC/csysvxx.f
index 04a6bf81..7b27d29a 100644
--- a/SRC/csysvxx.f
+++ b/SRC/csysvxx.f
@@ -1,18 +1,530 @@
+*> \brief <b> CSYSVXX computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* REAL S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> CSYSVXX uses the diagonal pivoting factorization to compute the
+*> solution to a complex system of linear equations A * X = B, where
+*> A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. CSYSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> CSYSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> CSYSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what CSYSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 3. If some D(i,i)=0, so that D is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is
+*> less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(R) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T as computed by SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block
+*> structure of D, as determined by SSYTRF. If IPIV(k) > 0,
+*> then rows and columns k and IPIV(k) were interchanged and
+*> D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
+*> IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
+*> -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
+*> diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
+*> then rows and columns k+1 and -IPIV(k) were interchanged
+*> and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block
+*> structure of D, as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYsolve
+*
+* =====================================================================
SUBROUTINE CSYSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,372 +540,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CSYSVXX uses the diagonal pivoting factorization to compute the
-* solution to a complex system of linear equations A * X = B, where
-* A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. CSYSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* CSYSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* CSYSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what CSYSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 3. If some D(i,i)=0, so that D is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is
-* less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(R) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T as computed by SSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block
-* structure of D, as determined by SSYTRF. If IPIV(k) > 0,
-* then rows and columns k and IPIV(k) were interchanged and
-* D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
-* IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
-* -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
-* diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
-* then rows and columns k+1 and -IPIV(k) were interchanged
-* and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block
-* structure of D, as determined by SSYTRF.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/csyswapr.f b/SRC/csyswapr.f
index c19764cb..15e02a87 100644
--- a/SRC/csyswapr.f
+++ b/SRC/csyswapr.f
@@ -1,54 +1,111 @@
- SUBROUTINE CSYSWAPR( UPLO, N, A, LDA, I1, I2)
+*> \brief \b CSYSWAPR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER I1, I2, LDA, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, N )
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CSYSWAPR( UPLO, N, A, LDA, I1, I2)
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, N )
+*
* Purpose
* =======
*
-* CSYSWAPR applies an elementary permutation on the rows and the columns of
-* a symmetric matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYSWAPR applies an elementary permutation on the rows and the columns of
+*> a symmetric matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] I1
+*> \verbatim
+*> I1 is INTEGER
+*> Index of the first row to swap
+*> \endverbatim
+*>
+*> \param[in] I2
+*> \verbatim
+*> I2 is INTEGER
+*> Index of the second row to swap
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CSYTRF.
+*> \date November 2011
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \ingroup complexSYauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ SUBROUTINE CSYSWAPR( UPLO, N, A, LDA, I1, I2)
*
-* I1 (input) INTEGER
-* Index of the first row to swap
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* I2 (input) INTEGER
-* Index of the second row to swap
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, N )
*
* =====================================================================
*
diff --git a/SRC/csytf2.f b/SRC/csytf2.f
index 964ebfed..6e558a9d 100644
--- a/SRC/csytf2.f
+++ b/SRC/csytf2.f
@@ -1,9 +1,180 @@
+*> \brief \b CSYTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYTF2( UPLO, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYTF2 computes the factorization of a complex symmetric matrix A
+*> using the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U**T is the transpose of U, and D is symmetric and
+*> block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 09-29-06 - patch from
+*> Bobby Cheng, MathWorks
+*>
+*> Replace l.209 and l.377
+*> IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*> by
+*> IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. SISNAN(ABSAKK) ) THEN
+*>
+*> 1-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CSYTF2( UPLO, N, A, LDA, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,113 +185,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CSYTF2 computes the factorization of a complex symmetric matrix A
-* using the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U**T is the transpose of U, and D is symmetric and
-* block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 09-29-06 - patch from
-* Bobby Cheng, MathWorks
-*
-* Replace l.209 and l.377
-* IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
-* by
-* IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. SISNAN(ABSAKK) ) THEN
-*
-* 1-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/csytrf.f b/SRC/csytrf.f
index da90c228..f0e16c6f 100644
--- a/SRC/csytrf.f
+++ b/SRC/csytrf.f
@@ -1,9 +1,187 @@
+*> \brief \b CSYTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYTRF computes the factorization of a complex symmetric matrix A
+*> using the Bunch-Kaufman diagonal pivoting method. The form of the
+*> factorization is
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1. For best performance
+*> LWORK >= N*NB, where NB is the block size returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,113 +192,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CSYTRF computes the factorization of a complex symmetric matrix A
-* using the Bunch-Kaufman diagonal pivoting method. The form of the
-* factorization is
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* with 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1. For best performance
-* LWORK >= N*NB, where NB is the block size returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/csytri.f b/SRC/csytri.f
index 26a279e5..36f2789a 100644
--- a/SRC/csytri.f
+++ b/SRC/csytri.f
@@ -1,63 +1,125 @@
- SUBROUTINE CSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b CSYTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CSYTRI computes the inverse of a complex symmetric indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* CSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYTRI computes the inverse of a complex symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> CSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complexSYcomputational
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
+* =====================================================================
+ SUBROUTINE CSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (2*N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/csytri2.f b/SRC/csytri2.f
index f52dbbf0..fdbd95ba 100644
--- a/SRC/csytri2.f
+++ b/SRC/csytri2.f
@@ -1,13 +1,130 @@
+*> \brief \b CSYTRI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYTRI2 computes the inverse of a COMPLEX hermitian indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> CSYTRF. CSYTRI2 sets the LEADING DIMENSION of the workspace
+*> before calling CSYTRI2X that actually computes the inverse.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NB structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N+NB+1)*(NB+3)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> WORK is size >= (N+NB+1)*(NB+3)
+*> If LDWORK = -1, then a workspace query is assumed; the routine
+*> calculates:
+*> - the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array,
+*> - and no error message related to LDWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+* =====================================================================
SUBROUTINE CSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* -- Written by Julie Langou of the Univ. of TN --
+* November 2011
*
-* @generated c
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER INFO, LDA, LWORK, N
@@ -17,61 +134,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CSYTRI2 computes the inverse of a COMPLEX hermitian indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* CSYTRF. CSYTRI2 sets the LEADING DIMENSION of the workspace
-* before calling CSYTRI2X that actually computes the inverse.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CSYTRF.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NB structure of D
-* as determined by CSYTRF.
-*
-* WORK (workspace) COMPLEX array, dimension (N+NB+1)*(NB+3)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* WORK is size >= (N+NB+1)*(NB+3)
-* If LDWORK = -1, then a workspace query is assumed; the routine
-* calculates:
-* - the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array,
-* - and no error message related to LDWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/csytri2x.f b/SRC/csytri2x.f
index b5e58f6a..c6b1f651 100644
--- a/SRC/csytri2x.f
+++ b/SRC/csytri2x.f
@@ -1,68 +1,131 @@
- SUBROUTINE CSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*> \brief \b CSYTRI2X
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N, NB
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), WORK( N+NB+1,* )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), WORK( N+NB+1,* )
+* ..
+*
* Purpose
* =======
*
-* CSYTRI2X computes the inverse of a real symmetric indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* CSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYTRI2X computes the inverse of a real symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> CSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the NNB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the NNB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NNB structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N+NNB+1,NNB+3)
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NNB structure of D
-* as determined by CSYTRF.
+*> \ingroup complexSYcomputational
*
-* WORK (workspace) COMPLEX array, dimension (N+NNB+1,NNB+3)
+* =====================================================================
+ SUBROUTINE CSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
*
-* NB (input) INTEGER
-* Block size
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), WORK( N+NB+1,* )
+* ..
*
* =====================================================================
*
diff --git a/SRC/csytrs.f b/SRC/csytrs.f
index 4918ca9e..cacbf41e 100644
--- a/SRC/csytrs.f
+++ b/SRC/csytrs.f
@@ -1,63 +1,130 @@
- SUBROUTINE CSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b CSYTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* CSYTRS solves a system of linear equations A*X = B with a complex
-* symmetric matrix A using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by CSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYTRS solves a system of linear equations A*X = B with a complex
+*> symmetric matrix A using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by CSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
+*> \ingroup complexSYcomputational
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE CSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/csytrs2.f b/SRC/csytrs2.f
index 98bc1cb0..0fea54d3 100644
--- a/SRC/csytrs2.f
+++ b/SRC/csytrs2.f
@@ -1,69 +1,137 @@
- SUBROUTINE CSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
- $ WORK, INFO )
+*> \brief \b CSYTRS2
*
-* -- LAPACK PROTOTYPE routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CSYTRS2 solves a system of linear equations A*X = B with a COMPLEX
-* symmetric matrix A using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by CSYTRF and converted by CSYCONV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYTRS2 solves a system of linear equations A*X = B with a COMPLEX
+*> symmetric matrix A using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by CSYTRF and converted by CSYCONV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by CSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CSYTRF.
+*> \date November 2011
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \ingroup complexSYcomputational
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE CSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctbcon.f b/SRC/ctbcon.f
index 4d7e620e..64af631e 100644
--- a/SRC/ctbcon.f
+++ b/SRC/ctbcon.f
@@ -1,12 +1,144 @@
+*> \brief \b CTBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, KD, LDAB, N
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBCON estimates the reciprocal of the condition number of a
+*> triangular band matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
$ RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,65 +150,6 @@
COMPLEX AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CTBCON estimates the reciprocal of the condition number of a
-* triangular band matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctbrfs.f b/SRC/ctbrfs.f
index 4104c987..79161133 100644
--- a/SRC/ctbrfs.f
+++ b/SRC/ctbrfs.f
@@ -1,12 +1,189 @@
+*> \brief \b CTBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AB( LDAB, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular band
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by CTBTRS or some other
+*> means before entering this routine. CTBRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,92 +195,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CTBRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular band
-* coefficient matrix.
-*
-* The solution matrix X must be computed by CTBTRS or some other
-* means before entering this routine. CTBRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctbtrs.f b/SRC/ctbtrs.f
index 78af210f..c15fc180 100644
--- a/SRC/ctbtrs.f
+++ b/SRC/ctbtrs.f
@@ -1,10 +1,147 @@
+*> \brief \b CTBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBTRS solves a triangular system of the form
+*>
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*>
+*> where A is a triangular band matrix of order N, and B is an
+*> N-by-NRHS matrix. A check is made to verify that A is nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of AB. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the
+*> solutions X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,70 +151,6 @@
COMPLEX AB( LDAB, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CTBTRS solves a triangular system of the form
-*
-* A * X = B, A**T * X = B, or A**H * X = B,
-*
-* where A is a triangular band matrix of order N, and B is an
-* N-by-NRHS matrix. A check is made to verify that A is nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of AB. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the
-* solutions X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctfsm.f b/SRC/ctfsm.f
index f975e0ed..a2e3d77c 100644
--- a/SRC/ctfsm.f
+++ b/SRC/ctfsm.f
@@ -1,235 +1,320 @@
- SUBROUTINE CTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
- $ B, LDB )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b CTFSM
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
- INTEGER LDB, M, N
- COMPLEX ALPHA
-* ..
-* .. Array Arguments ..
- COMPLEX A( 0: * ), B( 0: LDB-1, 0: * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
+* B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
+* INTEGER LDB, M, N
+* COMPLEX ALPHA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( 0: * ), B( 0: LDB-1, 0: * )
+* ..
+*
* Purpose
* =======
*
-* Level 3 BLAS like routine for A in RFP Format.
-*
-* CTFSM solves the matrix equation
-*
-* op( A )*X = alpha*B or X*op( A ) = alpha*B
-*
-* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**H.
-*
-* A is in Rectangular Full Packed (RFP) Format.
-*
-* The matrix X is overwritten on B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Level 3 BLAS like routine for A in RFP Format.
+*>
+*> CTFSM solves the matrix equation
+*>
+*> op( A )*X = alpha*B or X*op( A ) = alpha*B
+*>
+*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**H.
+*>
+*> A is in Rectangular Full Packed (RFP) Format.
+*>
+*> The matrix X is overwritten on B.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal Form of RFP A is stored;
-* = 'C': The Conjugate-transpose Form of RFP A is stored.
-*
-* SIDE (input) CHARACTER*1
-* On entry, SIDE specifies whether op( A ) appears on the left
-* or right of X as follows:
-*
-* SIDE = 'L' or 'l' op( A )*X = alpha*B.
-*
-* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
-*
-* Unchanged on exit.
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the RFP matrix A came from
-* an upper or lower triangular matrix as follows:
-* UPLO = 'U' or 'u' RFP A came from an upper triangular matrix
-* UPLO = 'L' or 'l' RFP A came from a lower triangular matrix
-*
-* Unchanged on exit.
-*
-* TRANS (input) CHARACTER*1
-* On entry, TRANS specifies the form of op( A ) to be used
-* in the matrix multiplication as follows:
-*
-* TRANS = 'N' or 'n' op( A ) = A.
-*
-* TRANS = 'C' or 'c' op( A ) = conjg( A' ).
-*
-* Unchanged on exit.
-*
-* DIAG (input) CHARACTER*1
-* On entry, DIAG specifies whether or not RFP A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal Form of RFP A is stored;
+*> = 'C': The Conjugate-transpose Form of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) appears on the left
+*> or right of X as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the RFP matrix A came from
+*> an upper or lower triangular matrix as follows:
+*> UPLO = 'U' or 'u' RFP A came from an upper triangular matrix
+*> UPLO = 'L' or 'l' RFP A came from a lower triangular matrix
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the form of op( A ) to be used
+*> in the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' op( A ) = conjg( A' ).
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not RFP A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (N*(N+1)/2)
+*> NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
+*> RFP Format is described by TRANSR, UPLO and N as follows:
+*> If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
+*> K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
+*> TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A as
+*> defined when TRANSR = 'N'. The contents of RFP A are defined
+*> by UPLO as follows: If UPLO = 'U' the RFP A contains the NT
+*> elements of upper packed A either in normal or
+*> conjugate-transpose Format. If UPLO = 'L' the RFP A contains
+*> the NT elements of lower packed A either in normal or
+*> conjugate-transpose Format. The LDA of RFP A is (N+1)/2 when
+*> TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is
+*> even and is N when is odd.
+*> See the Note below for more details. Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> Before entry, the leading m by n part of the array B must
+*> contain the right-hand side matrix B, and on exit is
+*> overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) COMPLEX
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX array, dimension (N*(N+1)/2)
-* NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
-* RFP Format is described by TRANSR, UPLO and N as follows:
-* If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
-* K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
-* TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A as
-* defined when TRANSR = 'N'. The contents of RFP A are defined
-* by UPLO as follows: If UPLO = 'U' the RFP A contains the NT
-* elements of upper packed A either in normal or
-* conjugate-transpose Format. If UPLO = 'L' the RFP A contains
-* the NT elements of lower packed A either in normal or
-* conjugate-transpose Format. The LDA of RFP A is (N+1)/2 when
-* TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is
-* even and is N when is odd.
-* See the Note below for more details. Unchanged on exit.
+*> \date November 2011
*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* Before entry, the leading m by n part of the array B must
-* contain the right-hand side matrix B, and on exit is
-* overwritten by the solution matrix X.
+*> \ingroup complexOTHERcomputational
*
-* LDB (input) INTEGER
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
+ $ B, LDB )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
+ INTEGER LDB, M, N
+ COMPLEX ALPHA
+* ..
+* .. Array Arguments ..
+ COMPLEX A( 0: * ), B( 0: LDB-1, 0: * )
+* ..
*
* =====================================================================
* ..
diff --git a/SRC/ctftri.f b/SRC/ctftri.f
index 4921bc90..a69257bd 100644
--- a/SRC/ctftri.f
+++ b/SRC/ctftri.f
@@ -1,173 +1,233 @@
- SUBROUTINE CTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO, DIAG
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( 0: * )
-* ..
-*
+*> \brief \b CTFTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO, DIAG
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* CTFTRI computes the inverse of a triangular matrix A stored in RFP
-* format.
-*
-* This is a Level 3 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTFTRI computes the inverse of a triangular matrix A stored in RFP
+*> format.
+*>
+*> This is a Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension ( N*(N+1)/2 );
-* On entry, the triangular matrix A in RFP format. RFP format
-* is described by TRANSR, UPLO, and N as follows: If TRANSR =
-* 'N' then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
-* the Conjugate-transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A; If UPLO = 'L' the RFP A contains the nt
-* elements of lower packed A. The LDA of RFP A is (N+1)/2 when
-* TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is
-* even and N is odd. See the Note below for more details.
-*
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
-*
-* Further Details
-* ===============
-*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( N*(N+1)/2 );
+*> On entry, the triangular matrix A in RFP format. RFP format
+*> is described by TRANSR, UPLO, and N as follows: If TRANSR =
+*> 'N' then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
+*> the Conjugate-transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A; If UPLO = 'L' the RFP A contains the nt
+*> elements of lower packed A. The LDA of RFP A is (N+1)/2 when
+*> TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is
+*> even and N is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RFP A RFP A
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
+*> \date November 2011
*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
+*> \ingroup complexOTHERcomputational
*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO, DIAG
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctfttp.f b/SRC/ctfttp.f
index 0d9ca8ac..155b6c5c 100644
--- a/SRC/ctfttp.f
+++ b/SRC/ctfttp.f
@@ -1,161 +1,219 @@
- SUBROUTINE CTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX AP( 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b CTFTTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* CTFTTP copies a triangular matrix A from rectangular full packed
-* format (TF) to standard packed format (TP).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTFTTP copies a triangular matrix A from rectangular full packed
+*> format (TF) to standard packed format (TP).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF is in Normal format;
-* = 'C': ARF is in Conjugate-transpose format;
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF is in Normal format;
+*> = 'C': ARF is in Conjugate-transpose format;
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ARF
+*> \verbatim
+*> ARF is COMPLEX array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ARF (input) COMPLEX array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \date November 2011
*
-* AP (output) COMPLEX array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctfttr.f b/SRC/ctfttr.f
index 7502acda..988084fb 100644
--- a/SRC/ctfttr.f
+++ b/SRC/ctfttr.f
@@ -1,165 +1,227 @@
- SUBROUTINE CTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX A( 0: LDA-1, 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b CTFTTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* CTFTTR copies a triangular matrix A from rectangular full packed
-* format (TF) to standard full format (TR).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTFTTR copies a triangular matrix A from rectangular full packed
+*> format (TF) to standard full format (TR).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF is in Normal format;
-* = 'C': ARF is in Conjugate-transpose format;
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF is in Normal format;
+*> = 'C': ARF is in Conjugate-transpose format;
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ARF
+*> \verbatim
+*> ARF is COMPLEX array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> On exit, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ARF (input) COMPLEX array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) COMPLEX array, dimension ( LDA, N )
-* On exit, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctgevc.f b/SRC/ctgevc.f
index 392b35a1..aca854b2 100644
--- a/SRC/ctgevc.f
+++ b/SRC/ctgevc.f
@@ -1,10 +1,220 @@
+*> \brief \b CTGEVC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
+* LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, SIDE
+* INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* REAL RWORK( * )
+* COMPLEX P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTGEVC computes some or all of the right and/or left eigenvectors of
+*> a pair of complex matrices (S,P), where S and P are upper triangular.
+*> Matrix pairs of this type are produced by the generalized Schur
+*> factorization of a complex matrix pair (A,B):
+*>
+*> A = Q*S*Z**H, B = Q*P*Z**H
+*>
+*> as computed by CGGHRD + CHGEQZ.
+*>
+*> The right eigenvector x and the left eigenvector y of (S,P)
+*> corresponding to an eigenvalue w are defined by:
+*>
+*> S*x = w*P*x, (y**H)*S = w*(y**H)*P,
+*>
+*> where y**H denotes the conjugate tranpose of y.
+*> The eigenvalues are not input to this routine, but are computed
+*> directly from the diagonal elements of S and P.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of (S,P), or the products Z*X and/or Q*Y,
+*> where Z and Q are input matrices.
+*> If Q and Z are the unitary factors from the generalized Schur
+*> factorization of a matrix pair (A,B), then Z*X and Q*Y
+*> are the matrices of right and left eigenvectors of (A,B).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute all right and/or left eigenvectors;
+*> = 'B': compute all right and/or left eigenvectors,
+*> backtransformed by the matrices in VR and/or VL;
+*> = 'S': compute selected right and/or left eigenvectors,
+*> specified by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY='S', SELECT specifies the eigenvectors to be
+*> computed. The eigenvector corresponding to the j-th
+*> eigenvalue is computed if SELECT(j) = .TRUE..
+*> Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices S and P. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX array, dimension (LDS,N)
+*> The upper triangular matrix S from a generalized Schur
+*> factorization, as computed by CHGEQZ.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of array S. LDS >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is COMPLEX array, dimension (LDP,N)
+*> The upper triangular matrix P from a generalized Schur
+*> factorization, as computed by CHGEQZ. P must have real
+*> diagonal elements.
+*> \endverbatim
+*>
+*> \param[in] LDP
+*> \verbatim
+*> LDP is INTEGER
+*> The leading dimension of array P. LDP >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,MM)
+*> On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*> contain an N-by-N matrix Q (usually the unitary matrix Q
+*> of left Schur vectors returned by CHGEQZ).
+*> On exit, if SIDE = 'L' or 'B', VL contains:
+*> if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
+*> if HOWMNY = 'B', the matrix Q*Y;
+*> if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
+*> SELECT, stored consecutively in the columns of
+*> VL, in the same order as their eigenvalues.
+*> Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of array VL. LDVL >= 1, and if
+*> SIDE = 'L' or 'l' or 'B' or 'b', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,MM)
+*> On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*> contain an N-by-N matrix Q (usually the unitary matrix Z
+*> of right Schur vectors returned by CHGEQZ).
+*> On exit, if SIDE = 'R' or 'B', VR contains:
+*> if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
+*> if HOWMNY = 'B', the matrix Z*X;
+*> if HOWMNY = 'S', the right eigenvectors of (S,P) specified by
+*> SELECT, stored consecutively in the columns of
+*> VR, in the same order as their eigenvalues.
+*> Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> SIDE = 'R' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR actually
+*> used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
+*> is set to N. Each selected eigenvector occupies one column.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGEcomputational
+*
+* =====================================================================
SUBROUTINE CTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
$ LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, SIDE
@@ -18,121 +228,6 @@
* ..
*
*
-* Purpose
-* =======
-*
-* CTGEVC computes some or all of the right and/or left eigenvectors of
-* a pair of complex matrices (S,P), where S and P are upper triangular.
-* Matrix pairs of this type are produced by the generalized Schur
-* factorization of a complex matrix pair (A,B):
-*
-* A = Q*S*Z**H, B = Q*P*Z**H
-*
-* as computed by CGGHRD + CHGEQZ.
-*
-* The right eigenvector x and the left eigenvector y of (S,P)
-* corresponding to an eigenvalue w are defined by:
-*
-* S*x = w*P*x, (y**H)*S = w*(y**H)*P,
-*
-* where y**H denotes the conjugate tranpose of y.
-* The eigenvalues are not input to this routine, but are computed
-* directly from the diagonal elements of S and P.
-*
-* This routine returns the matrices X and/or Y of right and left
-* eigenvectors of (S,P), or the products Z*X and/or Q*Y,
-* where Z and Q are input matrices.
-* If Q and Z are the unitary factors from the generalized Schur
-* factorization of a matrix pair (A,B), then Z*X and Q*Y
-* are the matrices of right and left eigenvectors of (A,B).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute all right and/or left eigenvectors;
-* = 'B': compute all right and/or left eigenvectors,
-* backtransformed by the matrices in VR and/or VL;
-* = 'S': compute selected right and/or left eigenvectors,
-* specified by the logical array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY='S', SELECT specifies the eigenvectors to be
-* computed. The eigenvector corresponding to the j-th
-* eigenvalue is computed if SELECT(j) = .TRUE..
-* Not referenced if HOWMNY = 'A' or 'B'.
-*
-* N (input) INTEGER
-* The order of the matrices S and P. N >= 0.
-*
-* S (input) COMPLEX array, dimension (LDS,N)
-* The upper triangular matrix S from a generalized Schur
-* factorization, as computed by CHGEQZ.
-*
-* LDS (input) INTEGER
-* The leading dimension of array S. LDS >= max(1,N).
-*
-* P (input) COMPLEX array, dimension (LDP,N)
-* The upper triangular matrix P from a generalized Schur
-* factorization, as computed by CHGEQZ. P must have real
-* diagonal elements.
-*
-* LDP (input) INTEGER
-* The leading dimension of array P. LDP >= max(1,N).
-*
-* VL (input/output) COMPLEX array, dimension (LDVL,MM)
-* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-* contain an N-by-N matrix Q (usually the unitary matrix Q
-* of left Schur vectors returned by CHGEQZ).
-* On exit, if SIDE = 'L' or 'B', VL contains:
-* if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
-* if HOWMNY = 'B', the matrix Q*Y;
-* if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
-* SELECT, stored consecutively in the columns of
-* VL, in the same order as their eigenvalues.
-* Not referenced if SIDE = 'R'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of array VL. LDVL >= 1, and if
-* SIDE = 'L' or 'l' or 'B' or 'b', LDVL >= N.
-*
-* VR (input/output) COMPLEX array, dimension (LDVR,MM)
-* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-* contain an N-by-N matrix Q (usually the unitary matrix Z
-* of right Schur vectors returned by CHGEQZ).
-* On exit, if SIDE = 'R' or 'B', VR contains:
-* if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
-* if HOWMNY = 'B', the matrix Z*X;
-* if HOWMNY = 'S', the right eigenvectors of (S,P) specified by
-* SELECT, stored consecutively in the columns of
-* VR, in the same order as their eigenvalues.
-* Not referenced if SIDE = 'L'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* SIDE = 'R' or 'B', LDVR >= N.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR actually
-* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
-* is set to N. Each selected eigenvector occupies one column.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctgex2.f b/SRC/ctgex2.f
index a6dc79e3..d4789754 100644
--- a/SRC/ctgex2.f
+++ b/SRC/ctgex2.f
@@ -1,116 +1,200 @@
- SUBROUTINE CTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
- $ LDZ, J1, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- LOGICAL WANTQ, WANTZ
- INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
- $ Z( LDZ, * )
-* ..
-*
+*> \brief \b CTGEX2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+* LDZ, J1, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* CTGEX2 swaps adjacent diagonal 1 by 1 blocks (A11,B11) and (A22,B22)
-* in an upper triangular matrix pair (A, B) by an unitary equivalence
-* transformation.
-*
-* (A, B) must be in generalized Schur canonical form, that is, A and
-* B are both upper triangular.
-*
-* Optionally, the matrices Q and Z of generalized Schur vectors are
-* updated.
-*
-* Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
-* Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTGEX2 swaps adjacent diagonal 1 by 1 blocks (A11,B11) and (A22,B22)
+*> in an upper triangular matrix pair (A, B) by an unitary equivalence
+*> transformation.
+*>
+*> (A, B) must be in generalized Schur canonical form, that is, A and
+*> B are both upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*> Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
+*> Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX arrays, dimensions (LDA,N)
-* On entry, the matrix A in the pair (A, B).
-* On exit, the updated matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX arrays, dimensions (LDB,N)
-* On entry, the matrix B in the pair (A, B).
-* On exit, the updated matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) COMPLEX array, dimension (LDZ,N)
-* If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit,
-* the updated matrix Q.
-* Not referenced if WANTQ = .FALSE..
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1;
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,N)
-* If WANTZ = .TRUE, on entry, the unitary matrix Z. On exit,
-* the updated matrix Z.
-* Not referenced if WANTZ = .FALSE..
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX arrays, dimensions (LDA,N)
+*> On entry, the matrix A in the pair (A, B).
+*> On exit, the updated matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX arrays, dimensions (LDB,N)
+*> On entry, the matrix B in the pair (A, B).
+*> On exit, the updated matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDZ,N)
+*> If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit,
+*> the updated matrix Q.
+*> Not referenced if WANTQ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1;
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,N)
+*> If WANTZ = .TRUE, on entry, the unitary matrix Z. On exit,
+*> the updated matrix Z.
+*> Not referenced if WANTZ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1;
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in] J1
+*> \verbatim
+*> J1 is INTEGER
+*> The index to the first block (A11, B11).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit.
+*> =1: The transformed matrix pair (A, B) would be too far
+*> from generalized Schur form; the problem is ill-
+*> conditioned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1;
-* If WANTZ = .TRUE., LDZ >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* J1 (input) INTEGER
-* The index to the first block (A11, B11).
+*> \date November 2011
*
-* INFO (output) INTEGER
-* =0: Successful exit.
-* =1: The transformed matrix pair (A, B) would be too far
-* from generalized Schur form; the problem is ill-
-* conditioned.
+*> \ingroup complexGEauxiliary
*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> In the current code both weak and strong stability tests are
+*> performed. The user can omit the strong stability test by changing
+*> the internal logical parameter WANDS to .FALSE.. See ref. [2] for
+*> details.
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software, Report UMINF-94.04,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, 1994. Also as LAPACK Working Note 87. To appear in
+*> Numerical Algorithms, 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+ $ LDZ, J1, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* In the current code both weak and strong stability tests are
-* performed. The user can omit the strong stability test by changing
-* the internal logical parameter WANDS to .FALSE.. See ref. [2] for
-* details.
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software, Report UMINF-94.04,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, 1994. Also as LAPACK Working Note 87. To appear in
-* Numerical Algorithms, 1996.
+* .. Scalar Arguments ..
+ LOGICAL WANTQ, WANTZ
+ INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+ $ Z( LDZ, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctgexc.f b/SRC/ctgexc.f
index 1f35a26f..afa40652 100644
--- a/SRC/ctgexc.f
+++ b/SRC/ctgexc.f
@@ -1,126 +1,213 @@
- SUBROUTINE CTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
- $ LDZ, IFST, ILST, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- LOGICAL WANTQ, WANTZ
- INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
- $ Z( LDZ, * )
-* ..
-*
+*> \brief \b CTGEXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+* LDZ, IFST, ILST, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* CTGEXC reorders the generalized Schur decomposition of a complex
-* matrix pair (A,B), using an unitary equivalence transformation
-* (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with
-* row index IFST is moved to row ILST.
-*
-* (A, B) must be in generalized Schur canonical form, that is, A and
-* B are both upper triangular.
-*
-* Optionally, the matrices Q and Z of generalized Schur vectors are
-* updated.
-*
-* Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
-* Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTGEXC reorders the generalized Schur decomposition of a complex
+*> matrix pair (A,B), using an unitary equivalence transformation
+*> (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with
+*> row index IFST is moved to row ILST.
+*>
+*> (A, B) must be in generalized Schur canonical form, that is, A and
+*> B are both upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*> Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
+*> Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the upper triangular matrix A in the pair (A, B).
-* On exit, the updated matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the upper triangular matrix B in the pair (A, B).
-* On exit, the updated matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) COMPLEX array, dimension (LDZ,N)
-* On entry, if WANTQ = .TRUE., the unitary matrix Q.
-* On exit, the updated matrix Q.
-* If WANTQ = .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1;
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,N)
-* On entry, if WANTZ = .TRUE., the unitary matrix Z.
-* On exit, the updated matrix Z.
-* If WANTZ = .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1;
-* If WANTZ = .TRUE., LDZ >= N.
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the upper triangular matrix A in the pair (A, B).
+*> On exit, the updated matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> On entry, the upper triangular matrix B in the pair (A, B).
+*> On exit, the updated matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDZ,N)
+*> On entry, if WANTQ = .TRUE., the unitary matrix Q.
+*> On exit, the updated matrix Q.
+*> If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1;
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,N)
+*> On entry, if WANTZ = .TRUE., the unitary matrix Z.
+*> On exit, the updated matrix Z.
+*> If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1;
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in] IFST
+*> \verbatim
+*> IFST is INTEGER
+*> \endverbatim
+*>
+*> \param[in,out] ILST
+*> \verbatim
+*> ILST is INTEGER
+*> Specify the reordering of the diagonal blocks of (A, B).
+*> The block with row index IFST is moved to row ILST, by a
+*> sequence of swapping between adjacent blocks.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit.
+*> <0: if INFO = -i, the i-th argument had an illegal value.
+*> =1: The transformed matrix pair (A, B) would be too far
+*> from generalized Schur form; the problem is ill-
+*> conditioned. (A, B) may have been partially reordered,
+*> and ILST points to the first row of the current
+*> position of the block being moved.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IFST (input) INTEGER
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ILST (input/output) INTEGER
-* Specify the reordering of the diagonal blocks of (A, B).
-* The block with row index IFST is moved to row ILST, by a
-* sequence of swapping between adjacent blocks.
+*> \date November 2011
*
-* INFO (output) INTEGER
-* =0: Successful exit.
-* <0: if INFO = -i, the i-th argument had an illegal value.
-* =1: The transformed matrix pair (A, B) would be too far
-* from generalized Schur form; the problem is ill-
-* conditioned. (A, B) may have been partially reordered,
-* and ILST points to the first row of the current
-* position of the block being moved.
+*> \ingroup complexGEcomputational
*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software, Report
+*> UMINF - 94.04, Department of Computing Science, Umea University,
+*> S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
+*> To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
+*> 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+ $ LDZ, IFST, ILST, INFO )
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software, Report
-* UMINF - 94.04, Department of Computing Science, Umea University,
-* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
-* To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
-* 1996.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL WANTQ, WANTZ
+ INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+ $ Z( LDZ, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctgsen.f b/SRC/ctgsen.f
index 62008623..6f1139a8 100644
--- a/SRC/ctgsen.f
+++ b/SRC/ctgsen.f
@@ -1,13 +1,432 @@
+*> \brief \b CTGSEN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
+* ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF,
+* WORK, LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK,
+* $ M, N
+* REAL PL, PR
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* REAL DIF( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), Q( LDQ, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTGSEN reorders the generalized Schur decomposition of a complex
+*> matrix pair (A, B) (in terms of an unitary equivalence trans-
+*> formation Q**H * (A, B) * Z), so that a selected cluster of eigenvalues
+*> appears in the leading diagonal blocks of the pair (A,B). The leading
+*> columns of Q and Z form unitary bases of the corresponding left and
+*> right eigenspaces (deflating subspaces). (A, B) must be in
+*> generalized Schur canonical form, that is, A and B are both upper
+*> triangular.
+*>
+*> CTGSEN also computes the generalized eigenvalues
+*>
+*> w(j)= ALPHA(j) / BETA(j)
+*>
+*> of the reordered matrix pair (A, B).
+*>
+*> Optionally, the routine computes estimates of reciprocal condition
+*> numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
+*> (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
+*> between the matrix pairs (A11, B11) and (A22,B22) that correspond to
+*> the selected cluster and the eigenvalues outside the cluster, resp.,
+*> and norms of "projections" onto left and right eigenspaces w.r.t.
+*> the selected cluster in the (1,1)-block.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is integer
+*> Specifies whether condition numbers are required for the
+*> cluster of eigenvalues (PL and PR) or the deflating subspaces
+*> (Difu and Difl):
+*> =0: Only reorder w.r.t. SELECT. No extras.
+*> =1: Reciprocal of norms of "projections" onto left and right
+*> eigenspaces w.r.t. the selected cluster (PL and PR).
+*> =2: Upper bounds on Difu and Difl. F-norm-based estimate
+*> (DIF(1:2)).
+*> =3: Estimate of Difu and Difl. 1-norm-based estimate
+*> (DIF(1:2)).
+*> About 5 times as expensive as IJOB = 2.
+*> =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
+*> version to get it all.
+*> =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
+*> \endverbatim
+*>
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> SELECT specifies the eigenvalues in the selected cluster. To
+*> select an eigenvalue w(j), SELECT(j) must be set to
+*> .TRUE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension(LDA,N)
+*> On entry, the upper triangular matrix A, in generalized
+*> Schur canonical form.
+*> On exit, A is overwritten by the reordered matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension(LDB,N)
+*> On entry, the upper triangular matrix B, in generalized
+*> Schur canonical form.
+*> On exit, B is overwritten by the reordered matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> The diagonal elements of A and B, respectively,
+*> when the pair (A,B) has been reduced to generalized Schur
+*> form. ALPHA(i)/BETA(i) i=1,...,N are the generalized
+*> eigenvalues.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
+*> On exit, Q has been postmultiplied by the left unitary
+*> transformation matrix which reorder (A, B); The leading M
+*> columns of Q form orthonormal bases for the specified pair of
+*> left eigenspaces (deflating subspaces).
+*> If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ,N)
+*> On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
+*> On exit, Z has been postmultiplied by the left unitary
+*> transformation matrix which reorder (A, B); The leading M
+*> columns of Z form orthonormal bases for the specified pair of
+*> left eigenspaces (deflating subspaces).
+*> If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The dimension of the specified pair of left and right
+*> eigenspaces, (deflating subspaces) 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[out] PL
+*> \verbatim
+*> PL is REAL
+*> \param[out] PR
+*> \verbatim
+*> PR is REAL
+*> If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
+*> reciprocal of the norm of "projections" onto left and right
+*> eigenspace with respect to the selected cluster.
+*> 0 < PL, PR <= 1.
+*> If M = 0 or M = N, PL = PR = 1.
+*> If IJOB = 0, 2 or 3 PL, PR are not referenced.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL array, dimension (2).
+*> If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
+*> If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
+*> Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
+*> estimates of Difu and Difl, computed using reversed
+*> communication with CLACN2.
+*> If M = 0 or N, DIF(1:2) = F-norm([A, B]).
+*> If IJOB = 0 or 1, DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1
+*> If IJOB = 1, 2 or 4, LWORK >= 2*M*(N-M)
+*> If IJOB = 3 or 5, LWORK >= 4*M*(N-M)
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= 1.
+*> If IJOB = 1, 2 or 4, LIWORK >= N+2;
+*> If IJOB = 3 or 5, LIWORK >= MAX(N+2, 2*M*(N-M));
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit.
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> =1: Reordering of (A, B) failed because the transformed
+*> matrix pair (A, B) would be too far from generalized
+*> Schur form; the problem is very ill-conditioned.
+*> (A, B) may have been partially reordered.
+*> If requested, 0 is returned in DIF(*), PL and PR.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> CTGSEN first collects the selected eigenvalues by computing unitary
+*> U and W that move them to the top left corner of (A, B). In other
+*> words, the selected eigenvalues are the eigenvalues of (A11, B11) in
+*>
+*> U**H*(A, B)*W = (A11 A12) (B11 B12) n1
+*> ( 0 A22),( 0 B22) n2
+*> n1 n2 n1 n2
+*>
+*> where N = n1+n2 and U**H means the conjugate transpose of U. The first
+*> n1 columns of U and W span the specified pair of left and right
+*> eigenspaces (deflating subspaces) of (A, B).
+*>
+*> If (A, B) has been obtained from the generalized real Schur
+*> decomposition of a matrix pair (C, D) = Q*(A, B)*Z', then the
+*> reordered generalized Schur form of (C, D) is given by
+*>
+*> (C, D) = (Q*U)*(U**H *(A, B)*W)*(Z*W)**H,
+*>
+*> and the first n1 columns of Q*U and Z*W span the corresponding
+*> deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
+*>
+*> Note that if the selected eigenvalue is sufficiently ill-conditioned,
+*> then its value may differ significantly from its value before
+*> reordering.
+*>
+*> The reciprocal condition numbers of the left and right eigenspaces
+*> spanned by the first n1 columns of U and W (or Q*U and Z*W) may
+*> be returned in DIF(1:2), corresponding to Difu and Difl, resp.
+*>
+*> The Difu and Difl are defined as:
+*>
+*> Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
+*> and
+*> Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
+*>
+*> where sigma-min(Zu) is the smallest singular value of the
+*> (2*n1*n2)-by-(2*n1*n2) matrix
+*>
+*> Zu = [ kron(In2, A11) -kron(A22**H, In1) ]
+*> [ kron(In2, B11) -kron(B22**H, In1) ].
+*>
+*> Here, Inx is the identity matrix of size nx and A22**H is the
+*> conjuguate transpose of A22. kron(X, Y) is the Kronecker product between
+*> the matrices X and Y.
+*>
+*> When DIF(2) is small, small changes in (A, B) can cause large changes
+*> in the deflating subspace. An approximate (asymptotic) bound on the
+*> maximum angular error in the computed deflating subspaces is
+*>
+*> EPS * norm((A, B)) / DIF(2),
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal norm of the projectors on the left and right
+*> eigenspaces associated with (A11, B11) may be returned in PL and PR.
+*> They are computed as follows. First we compute L and R so that
+*> P*(A, B)*Q is block diagonal, where
+*>
+*> P = ( I -L ) n1 Q = ( I R ) n1
+*> ( 0 I ) n2 and ( 0 I ) n2
+*> n1 n2 n1 n2
+*>
+*> and (L, R) is the solution to the generalized Sylvester equation
+*>
+*> A11*R - L*A22 = -A12
+*> B11*R - L*B22 = -B12
+*>
+*> Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
+*> An approximate (asymptotic) bound on the average absolute error of
+*> the selected eigenvalues is
+*>
+*> EPS * norm((A, B)) / PL.
+*>
+*> There are also global error bounds which valid for perturbations up
+*> to a certain restriction: A lower bound (x) on the smallest
+*> F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
+*> coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
+*> (i.e. (A + E, B + F), is
+*>
+*> x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
+*>
+*> An approximate bound on x can be computed from DIF(1:2), PL and PR.
+*>
+*> If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
+*> (L', R') and unperturbed (L, R) left and right deflating subspaces
+*> associated with the selected cluster in the (1,1)-blocks can be
+*> bounded as
+*>
+*> max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
+*> max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
+*>
+*> See LAPACK User's Guide section 4.11 or the following references
+*> for more information.
+*>
+*> Note that if the default method for computing the Frobenius-norm-
+*> based estimate DIF is not wanted (see CLATDF), then the parameter
+*> IDIFJB (see below) should be changed from 3 to 4 (routine CLATDF
+*> (IJOB = 2 will be used)). See CTGSYL for more details.
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> References
+*> ==========
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software, Report
+*> UMINF - 94.04, Department of Computing Science, Umea University,
+*> S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
+*> To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
+*> 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
$ ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF,
$ WORK, LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTQ, WANTZ
@@ -23,302 +442,6 @@
$ BETA( * ), Q( LDQ, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CTGSEN reorders the generalized Schur decomposition of a complex
-* matrix pair (A, B) (in terms of an unitary equivalence trans-
-* formation Q**H * (A, B) * Z), so that a selected cluster of eigenvalues
-* appears in the leading diagonal blocks of the pair (A,B). The leading
-* columns of Q and Z form unitary bases of the corresponding left and
-* right eigenspaces (deflating subspaces). (A, B) must be in
-* generalized Schur canonical form, that is, A and B are both upper
-* triangular.
-*
-* CTGSEN also computes the generalized eigenvalues
-*
-* w(j)= ALPHA(j) / BETA(j)
-*
-* of the reordered matrix pair (A, B).
-*
-* Optionally, the routine computes estimates of reciprocal condition
-* numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
-* (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
-* between the matrix pairs (A11, B11) and (A22,B22) that correspond to
-* the selected cluster and the eigenvalues outside the cluster, resp.,
-* and norms of "projections" onto left and right eigenspaces w.r.t.
-* the selected cluster in the (1,1)-block.
-*
-*
-* Arguments
-* =========
-*
-* IJOB (input) integer
-* Specifies whether condition numbers are required for the
-* cluster of eigenvalues (PL and PR) or the deflating subspaces
-* (Difu and Difl):
-* =0: Only reorder w.r.t. SELECT. No extras.
-* =1: Reciprocal of norms of "projections" onto left and right
-* eigenspaces w.r.t. the selected cluster (PL and PR).
-* =2: Upper bounds on Difu and Difl. F-norm-based estimate
-* (DIF(1:2)).
-* =3: Estimate of Difu and Difl. 1-norm-based estimate
-* (DIF(1:2)).
-* About 5 times as expensive as IJOB = 2.
-* =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
-* version to get it all.
-* =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
-*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* SELECT specifies the eigenvalues in the selected cluster. To
-* select an eigenvalue w(j), SELECT(j) must be set to
-* .TRUE..
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension(LDA,N)
-* On entry, the upper triangular matrix A, in generalized
-* Schur canonical form.
-* On exit, A is overwritten by the reordered matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension(LDB,N)
-* On entry, the upper triangular matrix B, in generalized
-* Schur canonical form.
-* On exit, B is overwritten by the reordered matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX array, dimension (N)
-* BETA (output) COMPLEX array, dimension (N)
-* The diagonal elements of A and B, respectively,
-* when the pair (A,B) has been reduced to generalized Schur
-* form. ALPHA(i)/BETA(i) i=1,...,N are the generalized
-* eigenvalues.
-*
-* Q (input/output) COMPLEX array, dimension (LDQ,N)
-* On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
-* On exit, Q has been postmultiplied by the left unitary
-* transformation matrix which reorder (A, B); The leading M
-* columns of Q form orthonormal bases for the specified pair of
-* left eigenspaces (deflating subspaces).
-* If WANTQ = .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) COMPLEX array, dimension (LDZ,N)
-* On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
-* On exit, Z has been postmultiplied by the left unitary
-* transformation matrix which reorder (A, B); The leading M
-* columns of Z form orthonormal bases for the specified pair of
-* left eigenspaces (deflating subspaces).
-* If WANTZ = .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If WANTZ = .TRUE., LDZ >= N.
-*
-* M (output) INTEGER
-* The dimension of the specified pair of left and right
-* eigenspaces, (deflating subspaces) 0 <= M <= N.
-*
-* PL (output) REAL
-* PR (output) REAL
-* If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
-* reciprocal of the norm of "projections" onto left and right
-* eigenspace with respect to the selected cluster.
-* 0 < PL, PR <= 1.
-* If M = 0 or M = N, PL = PR = 1.
-* If IJOB = 0, 2 or 3 PL, PR are not referenced.
-*
-* DIF (output) REAL array, dimension (2).
-* If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
-* If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
-* Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
-* estimates of Difu and Difl, computed using reversed
-* communication with CLACN2.
-* If M = 0 or N, DIF(1:2) = F-norm([A, B]).
-* If IJOB = 0 or 1, DIF is not referenced.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1
-* If IJOB = 1, 2 or 4, LWORK >= 2*M*(N-M)
-* If IJOB = 3 or 5, LWORK >= 4*M*(N-M)
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= 1.
-* If IJOB = 1, 2 or 4, LIWORK >= N+2;
-* If IJOB = 3 or 5, LIWORK >= MAX(N+2, 2*M*(N-M));
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* =0: Successful exit.
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* =1: Reordering of (A, B) failed because the transformed
-* matrix pair (A, B) would be too far from generalized
-* Schur form; the problem is very ill-conditioned.
-* (A, B) may have been partially reordered.
-* If requested, 0 is returned in DIF(*), PL and PR.
-*
-*
-* Further Details
-* ===============
-*
-* CTGSEN first collects the selected eigenvalues by computing unitary
-* U and W that move them to the top left corner of (A, B). In other
-* words, the selected eigenvalues are the eigenvalues of (A11, B11) in
-*
-* U**H*(A, B)*W = (A11 A12) (B11 B12) n1
-* ( 0 A22),( 0 B22) n2
-* n1 n2 n1 n2
-*
-* where N = n1+n2 and U**H means the conjugate transpose of U. The first
-* n1 columns of U and W span the specified pair of left and right
-* eigenspaces (deflating subspaces) of (A, B).
-*
-* If (A, B) has been obtained from the generalized real Schur
-* decomposition of a matrix pair (C, D) = Q*(A, B)*Z', then the
-* reordered generalized Schur form of (C, D) is given by
-*
-* (C, D) = (Q*U)*(U**H *(A, B)*W)*(Z*W)**H,
-*
-* and the first n1 columns of Q*U and Z*W span the corresponding
-* deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
-*
-* Note that if the selected eigenvalue is sufficiently ill-conditioned,
-* then its value may differ significantly from its value before
-* reordering.
-*
-* The reciprocal condition numbers of the left and right eigenspaces
-* spanned by the first n1 columns of U and W (or Q*U and Z*W) may
-* be returned in DIF(1:2), corresponding to Difu and Difl, resp.
-*
-* The Difu and Difl are defined as:
-*
-* Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
-* and
-* Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
-*
-* where sigma-min(Zu) is the smallest singular value of the
-* (2*n1*n2)-by-(2*n1*n2) matrix
-*
-* Zu = [ kron(In2, A11) -kron(A22**H, In1) ]
-* [ kron(In2, B11) -kron(B22**H, In1) ].
-*
-* Here, Inx is the identity matrix of size nx and A22**H is the
-* conjuguate transpose of A22. kron(X, Y) is the Kronecker product between
-* the matrices X and Y.
-*
-* When DIF(2) is small, small changes in (A, B) can cause large changes
-* in the deflating subspace. An approximate (asymptotic) bound on the
-* maximum angular error in the computed deflating subspaces is
-*
-* EPS * norm((A, B)) / DIF(2),
-*
-* where EPS is the machine precision.
-*
-* The reciprocal norm of the projectors on the left and right
-* eigenspaces associated with (A11, B11) may be returned in PL and PR.
-* They are computed as follows. First we compute L and R so that
-* P*(A, B)*Q is block diagonal, where
-*
-* P = ( I -L ) n1 Q = ( I R ) n1
-* ( 0 I ) n2 and ( 0 I ) n2
-* n1 n2 n1 n2
-*
-* and (L, R) is the solution to the generalized Sylvester equation
-*
-* A11*R - L*A22 = -A12
-* B11*R - L*B22 = -B12
-*
-* Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
-* An approximate (asymptotic) bound on the average absolute error of
-* the selected eigenvalues is
-*
-* EPS * norm((A, B)) / PL.
-*
-* There are also global error bounds which valid for perturbations up
-* to a certain restriction: A lower bound (x) on the smallest
-* F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
-* coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
-* (i.e. (A + E, B + F), is
-*
-* x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
-*
-* An approximate bound on x can be computed from DIF(1:2), PL and PR.
-*
-* If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
-* (L', R') and unperturbed (L, R) left and right deflating subspaces
-* associated with the selected cluster in the (1,1)-blocks can be
-* bounded as
-*
-* max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
-* max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
-*
-* See LAPACK User's Guide section 4.11 or the following references
-* for more information.
-*
-* Note that if the default method for computing the Frobenius-norm-
-* based estimate DIF is not wanted (see CLATDF), then the parameter
-* IDIFJB (see below) should be changed from 3 to 4 (routine CLATDF
-* (IJOB = 2 will be used)). See CTGSYL for more details.
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* References
-* ==========
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software, Report
-* UMINF - 94.04, Department of Computing Science, Umea University,
-* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
-* To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
-* 1996.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctgsja.f b/SRC/ctgsja.f
index 5247c1f7..7314102d 100644
--- a/SRC/ctgsja.f
+++ b/SRC/ctgsja.f
@@ -1,11 +1,312 @@
+*> \brief \b CTGSJA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
+* LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
+* Q, LDQ, WORK, NCYCLE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N,
+* $ NCYCLE, P
+* REAL TOLA, TOLB
+* ..
+* .. Array Arguments ..
+* REAL ALPHA( * ), BETA( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTGSJA computes the generalized singular value decomposition (GSVD)
+*> of two complex upper triangular (or trapezoidal) matrices A and B.
+*>
+*> On entry, it is assumed that matrices A and B have the following
+*> forms, which may be obtained by the preprocessing subroutine CGGSVP
+*> from a general M-by-N matrix A and P-by-N matrix B:
+*>
+*> N-K-L K L
+*> A = K ( 0 A12 A13 ) if M-K-L >= 0;
+*> L ( 0 0 A23 )
+*> M-K-L ( 0 0 0 )
+*>
+*> N-K-L K L
+*> A = K ( 0 A12 A13 ) if M-K-L < 0;
+*> M-K ( 0 0 A23 )
+*>
+*> N-K-L K L
+*> B = L ( 0 0 B13 )
+*> P-L ( 0 0 0 )
+*>
+*> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
+*> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
+*> otherwise A23 is (M-K)-by-L upper trapezoidal.
+*>
+*> On exit,
+*>
+*> U**H *A*Q = D1*( 0 R ), V**H *B*Q = D2*( 0 R ),
+*>
+*> where U, V and Q are unitary matrices.
+*> R is a nonsingular upper triangular matrix, and D1
+*> and D2 are ``diagonal'' matrices, which are of the following
+*> structures:
+*>
+*> If M-K-L >= 0,
+*>
+*> K L
+*> D1 = K ( I 0 )
+*> L ( 0 C )
+*> M-K-L ( 0 0 )
+*>
+*> K L
+*> D2 = L ( 0 S )
+*> P-L ( 0 0 )
+*>
+*> N-K-L K L
+*> ( 0 R ) = K ( 0 R11 R12 ) K
+*> L ( 0 0 R22 ) L
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
+*> S = diag( BETA(K+1), ... , BETA(K+L) ),
+*> C**2 + S**2 = I.
+*>
+*> R is stored in A(1:K+L,N-K-L+1:N) on exit.
+*>
+*> If M-K-L < 0,
+*>
+*> K M-K K+L-M
+*> D1 = K ( I 0 0 )
+*> M-K ( 0 C 0 )
+*>
+*> K M-K K+L-M
+*> D2 = M-K ( 0 S 0 )
+*> K+L-M ( 0 0 I )
+*> P-L ( 0 0 0 )
+*>
+*> N-K-L K M-K K+L-M
+*> ( 0 R ) = K ( 0 R11 R12 R13 )
+*> M-K ( 0 0 R22 R23 )
+*> K+L-M ( 0 0 0 R33 )
+*>
+*> where
+*> C = diag( ALPHA(K+1), ... , ALPHA(M) ),
+*> S = diag( BETA(K+1), ... , BETA(M) ),
+*> C**2 + S**2 = I.
+*>
+*> R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
+*> ( 0 R22 R23 )
+*> in B(M-K+1:L,N+M-K-L+1:N) on exit.
+*>
+*> The computation of the unitary transformation matrices U, V or Q
+*> is optional. These matrices may either be formed explicitly, or they
+*> may be postmultiplied into input matrices U1, V1, or Q1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': U must contain a unitary matrix U1 on entry, and
+*> the product U1*U is returned;
+*> = 'I': U is initialized to the unit matrix, and the
+*> unitary matrix U is returned;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': V must contain a unitary matrix V1 on entry, and
+*> the product V1*V is returned;
+*> = 'I': V is initialized to the unit matrix, and the
+*> unitary matrix V is returned;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Q must contain a unitary matrix Q1 on entry, and
+*> the product Q1*Q is returned;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> unitary matrix Q is returned;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> A (input/output) COMPLEX array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
+*> matrix R or part of R. See Purpose for details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> B (input/output) COMPLEX array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
+*> a part of R. See Purpose for details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*>
+*> TOLA (input) REAL
+*> TOLB (input) REAL
+*> TOLA and TOLB are the convergence criteria for the Jacobi-
+*> Kogbetliantz iteration procedure. Generally, they are the
+*> same as used in the preprocessing step, say
+*> TOLA = MAX(M,N)*norm(A)*MACHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MACHEPS.
+*>
+*> ALPHA (output) REAL array, dimension (N)
+*> BETA (output) REAL array, dimension (N)
+*> On exit, ALPHA and BETA contain the generalized singular
+*> value pairs of A and B;
+*> ALPHA(1:K) = 1,
+*> BETA(1:K) = 0,
+*> and if M-K-L >= 0,
+*> ALPHA(K+1:K+L) = diag(C),
+*> BETA(K+1:K+L) = diag(S),
+*> or if M-K-L < 0,
+*> ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
+*> BETA(K+1:M) = S, BETA(M+1:K+L) = 1.
+*> Furthermore, if K+L < N,
+*> ALPHA(K+L+1:N) = 0
+*> BETA(K+L+1:N) = 0.
+*>
+*> U (input/output) COMPLEX array, dimension (LDU,M)
+*> On entry, if JOBU = 'U', U must contain a matrix U1 (usually
+*> the unitary matrix returned by CGGSVP).
+*> On exit,
+*> if JOBU = 'I', U contains the unitary matrix U;
+*> if JOBU = 'U', U contains the product U1*U.
+*> If JOBU = 'N', U is not referenced.
+*>
+*> LDU (input) INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*>
+*> V (input/output) COMPLEX array, dimension (LDV,P)
+*> On entry, if JOBV = 'V', V must contain a matrix V1 (usually
+*> the unitary matrix returned by CGGSVP).
+*> On exit,
+*> if JOBV = 'I', V contains the unitary matrix V;
+*> if JOBV = 'V', V contains the product V1*V.
+*> If JOBV = 'N', V is not referenced.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*>
+*> Q (input/output) COMPLEX array, dimension (LDQ,N)
+*> On entry, if JOBQ = 'Q', Q must contain a matrix Q1 (usually
+*> the unitary matrix returned by CGGSVP).
+*> On exit,
+*> if JOBQ = 'I', Q contains the unitary matrix Q;
+*> if JOBQ = 'Q', Q contains the product Q1*Q.
+*> If JOBQ = 'N', Q is not referenced.
+*>
+*> LDQ (input) INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*>
+*> WORK (workspace) COMPLEX array, dimension (2*N)
+*>
+*> NCYCLE (output) INTEGER
+*> The number of cycles required for convergence.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the procedure does not converge after MAXIT cycles.
+*>
+*> Internal Parameters
+*> ===================
+*>
+*> MAXIT INTEGER
+*> MAXIT specifies the total loops that the iterative procedure
+*> may take. If after MAXIT cycles, the routine fails to
+*> converge, we return INFO = 1.
+*>
+*>
+*> CTGSJA essentially uses a variant of Kogbetliantz algorithm to reduce
+*> min(L,M-K)-by-L triangular (or trapezoidal) matrix A23 and L-by-L
+*> matrix B13 to the form:
+*>
+*> U1**H *A13*Q1 = C1*R1; V1**H *B13*Q1 = S1*R1,
+*>
+*> where U1, V1 and Q1 are unitary matrix.
+*> C1 and S1 are diagonal matrices satisfying
+*>
+*> C1**2 + S1**2 = I,
+*>
+*> and R1 is an L-by-L nonsingular upper triangular matrix.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
$ LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
$ Q, LDQ, WORK, NCYCLE, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -19,244 +320,6 @@
$ U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CTGSJA computes the generalized singular value decomposition (GSVD)
-* of two complex upper triangular (or trapezoidal) matrices A and B.
-*
-* On entry, it is assumed that matrices A and B have the following
-* forms, which may be obtained by the preprocessing subroutine CGGSVP
-* from a general M-by-N matrix A and P-by-N matrix B:
-*
-* N-K-L K L
-* A = K ( 0 A12 A13 ) if M-K-L >= 0;
-* L ( 0 0 A23 )
-* M-K-L ( 0 0 0 )
-*
-* N-K-L K L
-* A = K ( 0 A12 A13 ) if M-K-L < 0;
-* M-K ( 0 0 A23 )
-*
-* N-K-L K L
-* B = L ( 0 0 B13 )
-* P-L ( 0 0 0 )
-*
-* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
-* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
-* otherwise A23 is (M-K)-by-L upper trapezoidal.
-*
-* On exit,
-*
-* U**H *A*Q = D1*( 0 R ), V**H *B*Q = D2*( 0 R ),
-*
-* where U, V and Q are unitary matrices.
-* R is a nonsingular upper triangular matrix, and D1
-* and D2 are ``diagonal'' matrices, which are of the following
-* structures:
-*
-* If M-K-L >= 0,
-*
-* K L
-* D1 = K ( I 0 )
-* L ( 0 C )
-* M-K-L ( 0 0 )
-*
-* K L
-* D2 = L ( 0 S )
-* P-L ( 0 0 )
-*
-* N-K-L K L
-* ( 0 R ) = K ( 0 R11 R12 ) K
-* L ( 0 0 R22 ) L
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
-* S = diag( BETA(K+1), ... , BETA(K+L) ),
-* C**2 + S**2 = I.
-*
-* R is stored in A(1:K+L,N-K-L+1:N) on exit.
-*
-* If M-K-L < 0,
-*
-* K M-K K+L-M
-* D1 = K ( I 0 0 )
-* M-K ( 0 C 0 )
-*
-* K M-K K+L-M
-* D2 = M-K ( 0 S 0 )
-* K+L-M ( 0 0 I )
-* P-L ( 0 0 0 )
-*
-* N-K-L K M-K K+L-M
-* ( 0 R ) = K ( 0 R11 R12 R13 )
-* M-K ( 0 0 R22 R23 )
-* K+L-M ( 0 0 0 R33 )
-*
-* where
-* C = diag( ALPHA(K+1), ... , ALPHA(M) ),
-* S = diag( BETA(K+1), ... , BETA(M) ),
-* C**2 + S**2 = I.
-*
-* R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
-* ( 0 R22 R23 )
-* in B(M-K+1:L,N+M-K-L+1:N) on exit.
-*
-* The computation of the unitary transformation matrices U, V or Q
-* is optional. These matrices may either be formed explicitly, or they
-* may be postmultiplied into input matrices U1, V1, or Q1.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': U must contain a unitary matrix U1 on entry, and
-* the product U1*U is returned;
-* = 'I': U is initialized to the unit matrix, and the
-* unitary matrix U is returned;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': V must contain a unitary matrix V1 on entry, and
-* the product V1*V is returned;
-* = 'I': V is initialized to the unit matrix, and the
-* unitary matrix V is returned;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Q must contain a unitary matrix Q1 on entry, and
-* the product Q1*Q is returned;
-* = 'I': Q is initialized to the unit matrix, and the
-* unitary matrix Q is returned;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* K (input) INTEGER
-* L (input) INTEGER
-* K and L specify the subblocks in the input matrices A and B:
-* A23 = A(K+1:MIN(K+L,M),N-L+1:N) and B13 = B(1:L,,N-L+1:N)
-* of A and B, whose GSVD is going to be computed by CTGSJA.
-* See Further Details.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
-* matrix R or part of R. See Purpose for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
-* a part of R. See Purpose for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TOLA (input) REAL
-* TOLB (input) REAL
-* TOLA and TOLB are the convergence criteria for the Jacobi-
-* Kogbetliantz iteration procedure. Generally, they are the
-* same as used in the preprocessing step, say
-* TOLA = MAX(M,N)*norm(A)*MACHEPS,
-* TOLB = MAX(P,N)*norm(B)*MACHEPS.
-*
-* ALPHA (output) REAL array, dimension (N)
-* BETA (output) REAL array, dimension (N)
-* On exit, ALPHA and BETA contain the generalized singular
-* value pairs of A and B;
-* ALPHA(1:K) = 1,
-* BETA(1:K) = 0,
-* and if M-K-L >= 0,
-* ALPHA(K+1:K+L) = diag(C),
-* BETA(K+1:K+L) = diag(S),
-* or if M-K-L < 0,
-* ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
-* BETA(K+1:M) = S, BETA(M+1:K+L) = 1.
-* Furthermore, if K+L < N,
-* ALPHA(K+L+1:N) = 0
-* BETA(K+L+1:N) = 0.
-*
-* U (input/output) COMPLEX array, dimension (LDU,M)
-* On entry, if JOBU = 'U', U must contain a matrix U1 (usually
-* the unitary matrix returned by CGGSVP).
-* On exit,
-* if JOBU = 'I', U contains the unitary matrix U;
-* if JOBU = 'U', U contains the product U1*U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (input/output) COMPLEX array, dimension (LDV,P)
-* On entry, if JOBV = 'V', V must contain a matrix V1 (usually
-* the unitary matrix returned by CGGSVP).
-* On exit,
-* if JOBV = 'I', V contains the unitary matrix V;
-* if JOBV = 'V', V contains the product V1*V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (input/output) COMPLEX array, dimension (LDQ,N)
-* On entry, if JOBQ = 'Q', Q must contain a matrix Q1 (usually
-* the unitary matrix returned by CGGSVP).
-* On exit,
-* if JOBQ = 'I', Q contains the unitary matrix Q;
-* if JOBQ = 'Q', Q contains the product Q1*Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* NCYCLE (output) INTEGER
-* The number of cycles required for convergence.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the procedure does not converge after MAXIT cycles.
-*
-* Internal Parameters
-* ===================
-*
-* MAXIT INTEGER
-* MAXIT specifies the total loops that the iterative procedure
-* may take. If after MAXIT cycles, the routine fails to
-* converge, we return INFO = 1.
-*
-* Further Details
-* ===============
-*
-* CTGSJA essentially uses a variant of Kogbetliantz algorithm to reduce
-* min(L,M-K)-by-L triangular (or trapezoidal) matrix A23 and L-by-L
-* matrix B13 to the form:
-*
-* U1**H *A13*Q1 = C1*R1; V1**H *B13*Q1 = S1*R1,
-*
-* where U1, V1 and Q1 are unitary matrix.
-* C1 and S1 are diagonal matrices satisfying
-*
-* C1**2 + S1**2 = I,
-*
-* and R1 is an L-by-L nonsingular upper triangular matrix.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctgsna.f b/SRC/ctgsna.f
index 99a81309..2775677c 100644
--- a/SRC/ctgsna.f
+++ b/SRC/ctgsna.f
@@ -1,11 +1,309 @@
+*> \brief \b CTGSNA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
+* LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, JOB
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* REAL DIF( * ), S( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTGSNA estimates reciprocal condition numbers for specified
+*> eigenvalues and/or eigenvectors of a matrix pair (A, B).
+*>
+*> (A, B) must be in generalized Schur canonical form, that is, A and
+*> B are both upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for
+*> eigenvalues (S) or eigenvectors (DIF):
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for eigenvectors only (DIF);
+*> = 'B': for both eigenvalues and eigenvectors (S and DIF).
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute condition numbers for all eigenpairs;
+*> = 'S': compute condition numbers for selected eigenpairs
+*> specified by the array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenpairs for which
+*> condition numbers are required. To select condition numbers
+*> for the corresponding j-th eigenvalue and/or eigenvector,
+*> SELECT(j) must be set to .TRUE..
+*> If HOWMNY = 'A', SELECT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the square matrix pair (A, B). N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The upper triangular matrix A in the pair (A,B).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> The upper triangular matrix B in the pair (A, B).
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,M)
+*> IF JOB = 'E' or 'B', VL must contain left eigenvectors of
+*> (A, B), corresponding to the eigenpairs specified by HOWMNY
+*> and SELECT. The eigenvectors must be stored in consecutive
+*> columns of VL, as returned by CTGEVC.
+*> If JOB = 'V', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; and
+*> If JOB = 'E' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,M)
+*> IF JOB = 'E' or 'B', VR must contain right eigenvectors of
+*> (A, B), corresponding to the eigenpairs specified by HOWMNY
+*> and SELECT. The eigenvectors must be stored in consecutive
+*> columns of VR, as returned by CTGEVC.
+*> If JOB = 'V', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1;
+*> If JOB = 'E' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (MM)
+*> If JOB = 'E' or 'B', the reciprocal condition numbers of the
+*> selected eigenvalues, stored in consecutive elements of the
+*> array.
+*> If JOB = 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL array, dimension (MM)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the selected eigenvectors, stored in consecutive
+*> elements of the array.
+*> If the eigenvalues cannot be reordered to compute DIF(j),
+*> DIF(j) is set to 0; this can only occur when the true value
+*> would be very small anyway.
+*> For each eigenvalue/vector specified by SELECT, DIF stores
+*> a Frobenius norm-based estimate of Difl.
+*> If JOB = 'E', DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of elements in the arrays S and DIF. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of elements of the arrays S and DIF used to store
+*> the specified condition numbers; for each selected eigenvalue
+*> one element is used. If HOWMNY = 'A', M is set to N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> If JOB = 'V' or 'B', LWORK >= max(1,2*N*N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N+2)
+*> If JOB = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The reciprocal of the condition number of the i-th generalized
+*> eigenvalue w = (a, b) is defined as
+*>
+*> S(I) = (|v**HAu|**2 + |v**HBu|**2)**(1/2) / (norm(u)*norm(v))
+*>
+*> where u and v are the right and left eigenvectors of (A, B)
+*> corresponding to w; |z| denotes the absolute value of the complex
+*> number, and norm(u) denotes the 2-norm of the vector u. The pair
+*> (a, b) corresponds to an eigenvalue w = a/b (= v**HAu/v**HBu) of the
+*> matrix pair (A, B). If both a and b equal zero, then (A,B) is
+*> singular and S(I) = -1 is returned.
+*>
+*> An approximate error bound on the chordal distance between the i-th
+*> computed generalized eigenvalue w and the corresponding exact
+*> eigenvalue lambda is
+*>
+*> chord(w, lambda) <= EPS * norm(A, B) / S(I),
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal of the condition number of the right eigenvector u
+*> and left eigenvector v corresponding to the generalized eigenvalue w
+*> is defined as follows. Suppose
+*>
+*> (A, B) = ( a * ) ( b * ) 1
+*> ( 0 A22 ),( 0 B22 ) n-1
+*> 1 n-1 1 n-1
+*>
+*> Then the reciprocal condition number DIF(I) is
+*>
+*> Difl[(a, b), (A22, B22)] = sigma-min( Zl )
+*>
+*> where sigma-min(Zl) denotes the smallest singular value of
+*>
+*> Zl = [ kron(a, In-1) -kron(1, A22) ]
+*> [ kron(b, In-1) -kron(1, B22) ].
+*>
+*> Here In-1 is the identity matrix of size n-1 and X**H is the conjugate
+*> transpose of X. kron(X, Y) is the Kronecker product between the
+*> matrices X and Y.
+*>
+*> We approximate the smallest singular value of Zl with an upper
+*> bound. This is done by CLATDF.
+*>
+*> An approximate error bound for a computed eigenvector VL(i) or
+*> VR(i) is given by
+*>
+*> EPS * norm(A, B) / DIF(i).
+*>
+*> See ref. [2-3] for more details and further references.
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> References
+*> ==========
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software, Report
+*> UMINF - 94.04, Department of Computing Science, Umea University,
+*> S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
+*> To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75.
+*> To appear in ACM Trans. on Math. Software, Vol 22, No 1, 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
$ LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, JOB
@@ -19,194 +317,6 @@
$ VR( LDVR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CTGSNA estimates reciprocal condition numbers for specified
-* eigenvalues and/or eigenvectors of a matrix pair (A, B).
-*
-* (A, B) must be in generalized Schur canonical form, that is, A and
-* B are both upper triangular.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for
-* eigenvalues (S) or eigenvectors (DIF):
-* = 'E': for eigenvalues only (S);
-* = 'V': for eigenvectors only (DIF);
-* = 'B': for both eigenvalues and eigenvectors (S and DIF).
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute condition numbers for all eigenpairs;
-* = 'S': compute condition numbers for selected eigenpairs
-* specified by the array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenpairs for which
-* condition numbers are required. To select condition numbers
-* for the corresponding j-th eigenvalue and/or eigenvector,
-* SELECT(j) must be set to .TRUE..
-* If HOWMNY = 'A', SELECT is not referenced.
-*
-* N (input) INTEGER
-* The order of the square matrix pair (A, B). N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The upper triangular matrix A in the pair (A,B).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,N)
-* The upper triangular matrix B in the pair (A, B).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* VL (input) COMPLEX array, dimension (LDVL,M)
-* IF JOB = 'E' or 'B', VL must contain left eigenvectors of
-* (A, B), corresponding to the eigenpairs specified by HOWMNY
-* and SELECT. The eigenvectors must be stored in consecutive
-* columns of VL, as returned by CTGEVC.
-* If JOB = 'V', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; and
-* If JOB = 'E' or 'B', LDVL >= N.
-*
-* VR (input) COMPLEX array, dimension (LDVR,M)
-* IF JOB = 'E' or 'B', VR must contain right eigenvectors of
-* (A, B), corresponding to the eigenpairs specified by HOWMNY
-* and SELECT. The eigenvectors must be stored in consecutive
-* columns of VR, as returned by CTGEVC.
-* If JOB = 'V', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1;
-* If JOB = 'E' or 'B', LDVR >= N.
-*
-* S (output) REAL array, dimension (MM)
-* If JOB = 'E' or 'B', the reciprocal condition numbers of the
-* selected eigenvalues, stored in consecutive elements of the
-* array.
-* If JOB = 'V', S is not referenced.
-*
-* DIF (output) REAL array, dimension (MM)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the selected eigenvectors, stored in consecutive
-* elements of the array.
-* If the eigenvalues cannot be reordered to compute DIF(j),
-* DIF(j) is set to 0; this can only occur when the true value
-* would be very small anyway.
-* For each eigenvalue/vector specified by SELECT, DIF stores
-* a Frobenius norm-based estimate of Difl.
-* If JOB = 'E', DIF is not referenced.
-*
-* MM (input) INTEGER
-* The number of elements in the arrays S and DIF. MM >= M.
-*
-* M (output) INTEGER
-* The number of elements of the arrays S and DIF used to store
-* the specified condition numbers; for each selected eigenvalue
-* one element is used. If HOWMNY = 'A', M is set to N.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* If JOB = 'V' or 'B', LWORK >= max(1,2*N*N).
-*
-* IWORK (workspace) INTEGER array, dimension (N+2)
-* If JOB = 'E', IWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit
-* < 0: If INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The reciprocal of the condition number of the i-th generalized
-* eigenvalue w = (a, b) is defined as
-*
-* S(I) = (|v**HAu|**2 + |v**HBu|**2)**(1/2) / (norm(u)*norm(v))
-*
-* where u and v are the right and left eigenvectors of (A, B)
-* corresponding to w; |z| denotes the absolute value of the complex
-* number, and norm(u) denotes the 2-norm of the vector u. The pair
-* (a, b) corresponds to an eigenvalue w = a/b (= v**HAu/v**HBu) of the
-* matrix pair (A, B). If both a and b equal zero, then (A,B) is
-* singular and S(I) = -1 is returned.
-*
-* An approximate error bound on the chordal distance between the i-th
-* computed generalized eigenvalue w and the corresponding exact
-* eigenvalue lambda is
-*
-* chord(w, lambda) <= EPS * norm(A, B) / S(I),
-*
-* where EPS is the machine precision.
-*
-* The reciprocal of the condition number of the right eigenvector u
-* and left eigenvector v corresponding to the generalized eigenvalue w
-* is defined as follows. Suppose
-*
-* (A, B) = ( a * ) ( b * ) 1
-* ( 0 A22 ),( 0 B22 ) n-1
-* 1 n-1 1 n-1
-*
-* Then the reciprocal condition number DIF(I) is
-*
-* Difl[(a, b), (A22, B22)] = sigma-min( Zl )
-*
-* where sigma-min(Zl) denotes the smallest singular value of
-*
-* Zl = [ kron(a, In-1) -kron(1, A22) ]
-* [ kron(b, In-1) -kron(1, B22) ].
-*
-* Here In-1 is the identity matrix of size n-1 and X**H is the conjugate
-* transpose of X. kron(X, Y) is the Kronecker product between the
-* matrices X and Y.
-*
-* We approximate the smallest singular value of Zl with an upper
-* bound. This is done by CLATDF.
-*
-* An approximate error bound for a computed eigenvector VL(i) or
-* VR(i) is given by
-*
-* EPS * norm(A, B) / DIF(i).
-*
-* See ref. [2-3] for more details and further references.
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* References
-* ==========
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software, Report
-* UMINF - 94.04, Department of Computing Science, Umea University,
-* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
-* To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75.
-* To appear in ACM Trans. on Math. Software, Vol 22, No 1, 1996.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctgsy2.f b/SRC/ctgsy2.f
index c4543da4..a224b23c 100644
--- a/SRC/ctgsy2.f
+++ b/SRC/ctgsy2.f
@@ -1,3 +1,258 @@
+*> \brief \b CTGSY2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+* LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N
+* REAL RDSCAL, RDSUM, SCALE
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTGSY2 solves the generalized Sylvester equation
+*>
+*> A * R - L * B = scale * C (1)
+*> D * R - L * E = scale * F
+*>
+*> using Level 1 and 2 BLAS, where R and L are unknown M-by-N matrices,
+*> (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
+*> N-by-N and M-by-N, respectively. A, B, D and E are upper triangular
+*> (i.e., (A,D) and (B,E) in generalized Schur form).
+*>
+*> The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
+*> scaling factor chosen to avoid overflow.
+*>
+*> In matrix notation solving equation (1) corresponds to solve
+*> Zx = scale * b, where Z is defined as
+*>
+*> Z = [ kron(In, A) -kron(B**H, Im) ] (2)
+*> [ kron(In, D) -kron(E**H, Im) ],
+*>
+*> Ik is the identity matrix of size k and X**H is the transpose of X.
+*> kron(X, Y) is the Kronecker product between the matrices X and Y.
+*>
+*> If TRANS = 'C', y in the conjugate transposed system Z**H*y = scale*b
+*> is solved for, which is equivalent to solve for R and L in
+*>
+*> A**H * R + D**H * L = scale * C (3)
+*> R * B**H + L * E**H = scale * -F
+*>
+*> This case is used to compute an estimate of Dif[(A, D), (B, E)] =
+*> = sigma_min(Z) using reverse communicaton with CLACON.
+*>
+*> CTGSY2 also (IJOB >= 1) contributes to the computation in CTGSYL
+*> of an upper bound on the separation between to matrix pairs. Then
+*> the input (A, D), (B, E) are sub-pencils of two matrix pairs in
+*> CTGSYL.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N', solve the generalized Sylvester equation (1).
+*> = 'T': solve the 'transposed' system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what kind of functionality to be performed.
+*> =0: solve (1) only.
+*> =1: A contribution from this subsystem to a Frobenius
+*> norm-based estimate of the separation between two matrix
+*> pairs is computed. (look ahead strategy is used).
+*> =2: A contribution from this subsystem to a Frobenius
+*> norm-based estimate of the separation between two matrix
+*> pairs is computed. (SGECON on sub-systems is used.)
+*> Not referenced if TRANS = 'T'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the order of A and D, and the row
+*> dimension of C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of B and E, and the column
+*> dimension of C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, M)
+*> On entry, A contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the matrix A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> On entry, B contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the matrix B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, N)
+*> On entry, C contains the right-hand-side of the first matrix
+*> equation in (1).
+*> On exit, if IJOB = 0, C has been overwritten by the solution
+*> R.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the matrix C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (LDD, M)
+*> On entry, D contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of the matrix D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (LDE, N)
+*> On entry, E contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the matrix E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is COMPLEX array, dimension (LDF, N)
+*> On entry, F contains the right-hand-side of the second matrix
+*> equation in (1).
+*> On exit, if IJOB = 0, F has been overwritten by the solution
+*> L.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the matrix F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
+*> R and L (C and F on entry) will hold the solutions to a
+*> slightly perturbed system but the input matrices A, B, D and
+*> E have not been changed. If SCALE = 0, R and L will hold the
+*> solutions to the homogeneous system with C = F = 0.
+*> Normally, SCALE = 1.
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*> RDSUM is REAL
+*> On entry, the sum of squares of computed contributions to
+*> the Dif-estimate under computation by CTGSYL, where the
+*> scaling factor RDSCAL (see below) has been factored out.
+*> On exit, the corresponding sum of squares updated with the
+*> contributions from the current sub-system.
+*> If TRANS = 'T' RDSUM is not touched.
+*> NOTE: RDSUM only makes sense when CTGSY2 is called by
+*> CTGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*> RDSCAL is REAL
+*> On entry, scaling factor used to prevent overflow in RDSUM.
+*> On exit, RDSCAL is updated w.r.t. the current contributions
+*> in RDSUM.
+*> If TRANS = 'T', RDSCAL is not touched.
+*> NOTE: RDSCAL only makes sense when CTGSY2 is called by
+*> CTGSYL.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, if INFO is set to
+*> =0: Successful exit
+*> <0: If INFO = -i, input argument number i is illegal.
+*> >0: The matrix pairs (A, D) and (B, E) have common or very
+*> close eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
$ INFO )
@@ -5,7 +260,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -17,153 +272,6 @@
$ D( LDD, * ), E( LDE, * ), F( LDF, * )
* ..
*
-* Purpose
-* =======
-*
-* CTGSY2 solves the generalized Sylvester equation
-*
-* A * R - L * B = scale * C (1)
-* D * R - L * E = scale * F
-*
-* using Level 1 and 2 BLAS, where R and L are unknown M-by-N matrices,
-* (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
-* N-by-N and M-by-N, respectively. A, B, D and E are upper triangular
-* (i.e., (A,D) and (B,E) in generalized Schur form).
-*
-* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
-* scaling factor chosen to avoid overflow.
-*
-* In matrix notation solving equation (1) corresponds to solve
-* Zx = scale * b, where Z is defined as
-*
-* Z = [ kron(In, A) -kron(B**H, Im) ] (2)
-* [ kron(In, D) -kron(E**H, Im) ],
-*
-* Ik is the identity matrix of size k and X**H is the transpose of X.
-* kron(X, Y) is the Kronecker product between the matrices X and Y.
-*
-* If TRANS = 'C', y in the conjugate transposed system Z**H*y = scale*b
-* is solved for, which is equivalent to solve for R and L in
-*
-* A**H * R + D**H * L = scale * C (3)
-* R * B**H + L * E**H = scale * -F
-*
-* This case is used to compute an estimate of Dif[(A, D), (B, E)] =
-* = sigma_min(Z) using reverse communicaton with CLACON.
-*
-* CTGSY2 also (IJOB >= 1) contributes to the computation in CTGSYL
-* of an upper bound on the separation between to matrix pairs. Then
-* the input (A, D), (B, E) are sub-pencils of two matrix pairs in
-* CTGSYL.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N', solve the generalized Sylvester equation (1).
-* = 'T': solve the 'transposed' system (3).
-*
-* IJOB (input) INTEGER
-* Specifies what kind of functionality to be performed.
-* =0: solve (1) only.
-* =1: A contribution from this subsystem to a Frobenius
-* norm-based estimate of the separation between two matrix
-* pairs is computed. (look ahead strategy is used).
-* =2: A contribution from this subsystem to a Frobenius
-* norm-based estimate of the separation between two matrix
-* pairs is computed. (SGECON on sub-systems is used.)
-* Not referenced if TRANS = 'T'.
-*
-* M (input) INTEGER
-* On entry, M specifies the order of A and D, and the row
-* dimension of C, F, R and L.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of B and E, and the column
-* dimension of C, F, R and L.
-*
-* A (input) COMPLEX array, dimension (LDA, M)
-* On entry, A contains an upper triangular matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the matrix A. LDA >= max(1, M).
-*
-* B (input) COMPLEX array, dimension (LDB, N)
-* On entry, B contains an upper triangular matrix.
-*
-* LDB (input) INTEGER
-* The leading dimension of the matrix B. LDB >= max(1, N).
-*
-* C (input/output) COMPLEX array, dimension (LDC, N)
-* On entry, C contains the right-hand-side of the first matrix
-* equation in (1).
-* On exit, if IJOB = 0, C has been overwritten by the solution
-* R.
-*
-* LDC (input) INTEGER
-* The leading dimension of the matrix C. LDC >= max(1, M).
-*
-* D (input) COMPLEX array, dimension (LDD, M)
-* On entry, D contains an upper triangular matrix.
-*
-* LDD (input) INTEGER
-* The leading dimension of the matrix D. LDD >= max(1, M).
-*
-* E (input) COMPLEX array, dimension (LDE, N)
-* On entry, E contains an upper triangular matrix.
-*
-* LDE (input) INTEGER
-* The leading dimension of the matrix E. LDE >= max(1, N).
-*
-* F (input/output) COMPLEX array, dimension (LDF, N)
-* On entry, F contains the right-hand-side of the second matrix
-* equation in (1).
-* On exit, if IJOB = 0, F has been overwritten by the solution
-* L.
-*
-* LDF (input) INTEGER
-* The leading dimension of the matrix F. LDF >= max(1, M).
-*
-* SCALE (output) REAL
-* On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
-* R and L (C and F on entry) will hold the solutions to a
-* slightly perturbed system but the input matrices A, B, D and
-* E have not been changed. If SCALE = 0, R and L will hold the
-* solutions to the homogeneous system with C = F = 0.
-* Normally, SCALE = 1.
-*
-* RDSUM (input/output) REAL
-* On entry, the sum of squares of computed contributions to
-* the Dif-estimate under computation by CTGSYL, where the
-* scaling factor RDSCAL (see below) has been factored out.
-* On exit, the corresponding sum of squares updated with the
-* contributions from the current sub-system.
-* If TRANS = 'T' RDSUM is not touched.
-* NOTE: RDSUM only makes sense when CTGSY2 is called by
-* CTGSYL.
-*
-* RDSCAL (input/output) REAL
-* On entry, scaling factor used to prevent overflow in RDSUM.
-* On exit, RDSCAL is updated w.r.t. the current contributions
-* in RDSUM.
-* If TRANS = 'T', RDSCAL is not touched.
-* NOTE: RDSCAL only makes sense when CTGSY2 is called by
-* CTGSYL.
-*
-* INFO (output) INTEGER
-* On exit, if INFO is set to
-* =0: Successful exit
-* <0: If INFO = -i, input argument number i is illegal.
-* >0: The matrix pairs (A, D) and (B, E) have common or very
-* close eigenvalues.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctgsyl.f b/SRC/ctgsyl.f
index 45d85032..6484d3e5 100644
--- a/SRC/ctgsyl.f
+++ b/SRC/ctgsyl.f
@@ -1,11 +1,300 @@
+*> \brief \b CTGSYL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+* LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF,
+* $ LWORK, M, N
+* REAL DIF, SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTGSYL solves the generalized Sylvester equation:
+*>
+*> A * R - L * B = scale * C (1)
+*> D * R - L * E = scale * F
+*>
+*> where R and L are unknown m-by-n matrices, (A, D), (B, E) and
+*> (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
+*> respectively, with complex entries. A, B, D and E are upper
+*> triangular (i.e., (A,D) and (B,E) in generalized Schur form).
+*>
+*> The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1
+*> is an output scaling factor chosen to avoid overflow.
+*>
+*> In matrix notation (1) is equivalent to solve Zx = scale*b, where Z
+*> is defined as
+*>
+*> Z = [ kron(In, A) -kron(B**H, Im) ] (2)
+*> [ kron(In, D) -kron(E**H, Im) ],
+*>
+*> Here Ix is the identity matrix of size x and X**H is the conjugate
+*> transpose of X. Kron(X, Y) is the Kronecker product between the
+*> matrices X and Y.
+*>
+*> If TRANS = 'C', y in the conjugate transposed system Z**H *y = scale*b
+*> is solved for, which is equivalent to solve for R and L in
+*>
+*> A**H * R + D**H * L = scale * C (3)
+*> R * B**H + L * E**H = scale * -F
+*>
+*> This case (TRANS = 'C') is used to compute an one-norm-based estimate
+*> of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
+*> and (B,E), using CLACON.
+*>
+*> If IJOB >= 1, CTGSYL computes a Frobenius norm-based estimate of
+*> Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
+*> reciprocal of the smallest singular value of Z.
+*>
+*> This is a level-3 BLAS algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': solve the generalized sylvester equation (1).
+*> = 'C': solve the "conjugate transposed" system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what kind of functionality to be performed.
+*> =0: solve (1) only.
+*> =1: The functionality of 0 and 3.
+*> =2: The functionality of 0 and 4.
+*> =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*> (look ahead strategy is used).
+*> =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*> (CGECON on sub-systems is used).
+*> Not referenced if TRANS = 'C'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the matrices A and D, and the row dimension of
+*> the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices B and E, and the column dimension
+*> of the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, M)
+*> The upper triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> The upper triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, N)
+*> On entry, C contains the right-hand-side of the first matrix
+*> equation in (1) or (3).
+*> On exit, if IJOB = 0, 1 or 2, C has been overwritten by
+*> the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
+*> the solution achieved during the computation of the
+*> Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (LDD, M)
+*> The upper triangular matrix D.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of the array D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (LDE, N)
+*> The upper triangular matrix E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the array E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is COMPLEX array, dimension (LDF, N)
+*> On entry, F contains the right-hand-side of the second matrix
+*> equation in (1) or (3).
+*> On exit, if IJOB = 0, 1 or 2, F has been overwritten by
+*> the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
+*> the solution achieved during the computation of the
+*> Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the array F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL
+*> On exit DIF is the reciprocal of a lower bound of the
+*> reciprocal of the Dif-function, i.e. DIF is an upper bound of
+*> Dif[(A,D), (B,E)] = sigma-min(Z), where Z as in (2).
+*> IF IJOB = 0 or TRANS = 'C', DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On exit SCALE is the scaling factor in (1) or (3).
+*> If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
+*> to a slightly perturbed system but the input matrices A, B,
+*> D and E have not been changed. If SCALE = 0, R and L will
+*> hold the solutions to the homogenious system with C = F = 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK > = 1.
+*> If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M+N+2)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: successful exit
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> >0: (A, D) and (B, E) have common or very close
+*> eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
+*> No 1, 1996.
+*>
+*> [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
+*> Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
+*> Appl., 15(4):1045-1060, 1994.
+*>
+*> [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
+*> Condition Estimators for Solving the Generalized Sylvester
+*> Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
+*> July 1989, pp 745-751.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -20,177 +309,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CTGSYL solves the generalized Sylvester equation:
-*
-* A * R - L * B = scale * C (1)
-* D * R - L * E = scale * F
-*
-* where R and L are unknown m-by-n matrices, (A, D), (B, E) and
-* (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
-* respectively, with complex entries. A, B, D and E are upper
-* triangular (i.e., (A,D) and (B,E) in generalized Schur form).
-*
-* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1
-* is an output scaling factor chosen to avoid overflow.
-*
-* In matrix notation (1) is equivalent to solve Zx = scale*b, where Z
-* is defined as
-*
-* Z = [ kron(In, A) -kron(B**H, Im) ] (2)
-* [ kron(In, D) -kron(E**H, Im) ],
-*
-* Here Ix is the identity matrix of size x and X**H is the conjugate
-* transpose of X. Kron(X, Y) is the Kronecker product between the
-* matrices X and Y.
-*
-* If TRANS = 'C', y in the conjugate transposed system Z**H *y = scale*b
-* is solved for, which is equivalent to solve for R and L in
-*
-* A**H * R + D**H * L = scale * C (3)
-* R * B**H + L * E**H = scale * -F
-*
-* This case (TRANS = 'C') is used to compute an one-norm-based estimate
-* of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
-* and (B,E), using CLACON.
-*
-* If IJOB >= 1, CTGSYL computes a Frobenius norm-based estimate of
-* Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
-* reciprocal of the smallest singular value of Z.
-*
-* This is a level-3 BLAS algorithm.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N': solve the generalized sylvester equation (1).
-* = 'C': solve the "conjugate transposed" system (3).
-*
-* IJOB (input) INTEGER
-* Specifies what kind of functionality to be performed.
-* =0: solve (1) only.
-* =1: The functionality of 0 and 3.
-* =2: The functionality of 0 and 4.
-* =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
-* (look ahead strategy is used).
-* =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
-* (CGECON on sub-systems is used).
-* Not referenced if TRANS = 'C'.
-*
-* M (input) INTEGER
-* The order of the matrices A and D, and the row dimension of
-* the matrices C, F, R and L.
-*
-* N (input) INTEGER
-* The order of the matrices B and E, and the column dimension
-* of the matrices C, F, R and L.
-*
-* A (input) COMPLEX array, dimension (LDA, M)
-* The upper triangular matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, M).
-*
-* B (input) COMPLEX array, dimension (LDB, N)
-* The upper triangular matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1, N).
-*
-* C (input/output) COMPLEX array, dimension (LDC, N)
-* On entry, C contains the right-hand-side of the first matrix
-* equation in (1) or (3).
-* On exit, if IJOB = 0, 1 or 2, C has been overwritten by
-* the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
-* the solution achieved during the computation of the
-* Dif-estimate.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1, M).
-*
-* D (input) COMPLEX array, dimension (LDD, M)
-* The upper triangular matrix D.
-*
-* LDD (input) INTEGER
-* The leading dimension of the array D. LDD >= max(1, M).
-*
-* E (input) COMPLEX array, dimension (LDE, N)
-* The upper triangular matrix E.
-*
-* LDE (input) INTEGER
-* The leading dimension of the array E. LDE >= max(1, N).
-*
-* F (input/output) COMPLEX array, dimension (LDF, N)
-* On entry, F contains the right-hand-side of the second matrix
-* equation in (1) or (3).
-* On exit, if IJOB = 0, 1 or 2, F has been overwritten by
-* the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
-* the solution achieved during the computation of the
-* Dif-estimate.
-*
-* LDF (input) INTEGER
-* The leading dimension of the array F. LDF >= max(1, M).
-*
-* DIF (output) REAL
-* On exit DIF is the reciprocal of a lower bound of the
-* reciprocal of the Dif-function, i.e. DIF is an upper bound of
-* Dif[(A,D), (B,E)] = sigma-min(Z), where Z as in (2).
-* IF IJOB = 0 or TRANS = 'C', DIF is not referenced.
-*
-* SCALE (output) REAL
-* On exit SCALE is the scaling factor in (1) or (3).
-* If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
-* to a slightly perturbed system but the input matrices A, B,
-* D and E have not been changed. If SCALE = 0, R and L will
-* hold the solutions to the homogenious system with C = F = 0.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK > = 1.
-* If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (M+N+2)
-*
-* INFO (output) INTEGER
-* =0: successful exit
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* >0: (A, D) and (B, E) have common or very close
-* eigenvalues.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
-* No 1, 1996.
-*
-* [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
-* Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
-* Appl., 15(4):1045-1060, 1994.
-*
-* [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
-* Condition Estimators for Solving the Generalized Sylvester
-* Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
-* July 1989, pp 745-751.
-*
* =====================================================================
* Replaced various illegal calls to CCOPY by calls to CLASET.
* Sven Hammarling, 1/5/02.
diff --git a/SRC/ctpcon.f b/SRC/ctpcon.f
index e577a546..7552ed83 100644
--- a/SRC/ctpcon.f
+++ b/SRC/ctpcon.f
@@ -1,12 +1,131 @@
+*> \brief \b CTPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, N
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPCON estimates the reciprocal of the condition number of a packed
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,58 +137,6 @@
COMPLEX AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CTPCON estimates the reciprocal of the condition number of a packed
-* triangular matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctpmqrt.f b/SRC/ctpmqrt.f
index 1bcd7b7f..c6cc69c2 100644
--- a/SRC/ctpmqrt.f
+++ b/SRC/ctpmqrt.f
@@ -1,132 +1,190 @@
- SUBROUTINE CTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
- $ A, LDA, B, LDB, WORK, INFO )
- IMPLICIT NONE
+*> \brief \b CTPMQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
-* ..
-* .. Array Arguments ..
- COMPLEX V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
- $ WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
+* A, LDA, B, LDB, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
+* ..
+* .. Array Arguments ..
+* COMPLEX V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CTPMQRT applies a complex orthogonal matrix Q obtained from a
-* "triangular-pentagonal" complex block reflector H to a general
-* complex matrix C, which consists of two blocks A and B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPMQRT applies a complex orthogonal matrix Q obtained from a
+*> "triangular-pentagonal" complex block reflector H to a general
+*> complex matrix C, which consists of two blocks A and B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix B. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-*
-* L (input) INTEGER
-* The order of the trapezoidal part of V.
-* K >= L >= 0. See Further Details.
-*
-* NB (input) INTEGER
-* The block size used for the storage of T. K >= NB >= 1.
-* This must be the same value of NB used to generate T
-* in CTPQRT.
-*
-* V (input) COMPLEX array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CTPQRT in B. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* T (input) COMPLEX array, dimension (LDT,K)
-* The upper triangular factors of the block reflectors
-* as returned by CTPQRT, stored as a NB-by-K matrix.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
-*
-* A (input/output) COMPLEX array, dimension
-* (LDA,N) if SIDE = 'L' or
-* (LDA,K) if SIDE = 'R'
-* On entry, the K-by-N or M-by-K matrix A.
-* On exit, A is overwritten by the corresponding block of
-* Q*C or Q**H*C or C*Q or C*Q**H. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDC >= max(1,K);
-* If SIDE = 'R', LDC >= max(1,M).
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B. N >= 0.
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the M-by-N matrix B.
-* On exit, B is overwritten by the corresponding block of
-* Q*C or Q**H*C or C*Q or C*Q**H. See Further Details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* LDB >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX array. The dimension of WORK is
-* N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* K >= L >= 0. See Further Details.
+*>
+*> NB (input) INTEGER
+*> The block size used for the storage of T. K >= NB >= 1.
+*> This must be the same value of NB used to generate T
+*> in CTPQRT.
+*>
+*> V (input) COMPLEX array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CTPQRT in B. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*>
+*> T (input) COMPLEX array, dimension (LDT,K)
+*> The upper triangular factors of the block reflectors
+*> as returned by CTPQRT, stored as a NB-by-K matrix.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> A (input/output) COMPLEX array, dimension
+*> (LDA,N) if SIDE = 'L' or
+*> (LDA,K) if SIDE = 'R'
+*> On entry, the K-by-N or M-by-K matrix A.
+*> On exit, A is overwritten by the corresponding block of
+*> Q*C or Q**H*C or C*Q or C*Q**H. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDC >= max(1,K);
+*> If SIDE = 'R', LDC >= max(1,M).
+*>
+*> B (input/output) COMPLEX array, dimension (LDB,N)
+*> On entry, the M-by-N matrix B.
+*> On exit, B is overwritten by the corresponding block of
+*> Q*C or Q**H*C or C*Q or C*Q**H. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B.
+*> LDB >= max(1,M).
+*>
+*> WORK (workspace/output) COMPLEX array. The dimension of WORK is
+*> N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The columns of the pentagonal matrix V contain the elementary reflectors
+*> H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
+*> trapezoidal block V2:
+*>
+*> V = [V1]
+*> [V2].
+*>
+*> The size of the trapezoidal block V2 is determined by the parameter L,
+*> where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
+*> rows of a K-by-K upper triangular matrix. If L=K, V2 is upper triangular;
+*> if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
+*>
+*> If SIDE = 'L': C = [A] where A is K-by-N, B is M-by-N and V is M-by-K.
+*> [B]
+*>
+*> If SIDE = 'R': C = [A B] where A is M-by-K, B is M-by-N and V is N-by-K.
+*>
+*> The complex orthogonal matrix Q is formed from V and T.
+*>
+*> If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
+*>
+*> If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C.
+*>
+*> If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
+*>
+*> If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
+ $ A, LDA, B, LDB, WORK, INFO )
*
-* The columns of the pentagonal matrix V contain the elementary reflectors
-* H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
-* trapezoidal block V2:
-*
-* V = [V1]
-* [V2].
-*
-* The size of the trapezoidal block V2 is determined by the parameter L,
-* where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
-* rows of a K-by-K upper triangular matrix. If L=K, V2 is upper triangular;
-* if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
-*
-* If SIDE = 'L': C = [A] where A is K-by-N, B is M-by-N and V is M-by-K.
-* [B]
-*
-* If SIDE = 'R': C = [A B] where A is M-by-K, B is M-by-N and V is N-by-K.
-*
-* The complex orthogonal matrix Q is formed from V and T.
-*
-* If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
-*
-* If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C.
-*
-* If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H.
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
+* ..
+* .. Array Arguments ..
+ COMPLEX V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctpqrt.f b/SRC/ctpqrt.f
index ada345b4..62d7cb5a 100644
--- a/SRC/ctpqrt.f
+++ b/SRC/ctpqrt.f
@@ -1,120 +1,167 @@
- SUBROUTINE CTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
- $ INFO )
- IMPLICIT NONE
+*> \brief \b CTPQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CTPQRT computes a blocked QR factorization of a complex
-* "triangular-pentagonal" matrix C, which is composed of a
-* triangular block A and pentagonal block B, using the compact
-* WY representation for Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPQRT computes a blocked QR factorization of a complex
+*> "triangular-pentagonal" matrix C, which is composed of a
+*> triangular block A and pentagonal block B, using the compact
+*> WY representation for Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B, and the order of the
-* triangular matrix A.
-* N >= 0.
-*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part of B.
-* MIN(M,N) >= L >= 0. See Further Details.
-*
-* NB (input) INTEGER
-* The block size to be used in the blocked QR. N >= NB >= 1.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the upper triangular N-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the pentagonal M-by-N matrix B. The first M-L rows
-* are rectangular, and the last L rows are upper trapezoidal.
-* On exit, B contains the pentagonal matrix V. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B, and the order of the
+*> triangular matrix A.
+*> N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX array, dimension (LDT,N)
-* The upper triangular block reflectors stored in compact form
-* as a sequence of upper triangular blocks. See Further Details.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (NB*N)
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
-*
-* The input matrix C is a (N+M)-by-N matrix
-*
-* C = [ A ]
-* [ B ]
-*
-* where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
-* matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
-* upper trapezoidal matrix B2:
-*
-* B = [ B1 ] <- (M-L)-by-N rectangular
-* [ B2 ] <- L-by-N upper trapezoidal.
-*
-* The upper trapezoidal matrix B2 consists of the first L rows of a
-* N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
-* B is rectangular M-by-N; if M=L=N, B is upper triangular.
-*
-* The matrix W stores the elementary reflectors H(i) in the i-th column
-* below the diagonal (of A) in the (N+M)-by-N input matrix C
-*
-* C = [ A ] <- upper triangular N-by-N
-* [ B ] <- M-by-N pentagonal
-*
-* so that W can be represented as
-*
-* W = [ I ] <- identity, N-by-N
-* [ V ] <- M-by-N, same form as B.
-*
-* Thus, all of information needed for W is contained on exit in B, which
-* we call V above. Note that V has the same form as B; that is,
-*
-* V = [ V1 ] <- (M-L)-by-N rectangular
-* [ V2 ] <- L-by-N upper trapezoidal.
-*
-* The columns of V represent the vectors which define the H(i)'s.
+*>\details \b Further \b Details
+*> \verbatim
+* MIN(M,N) >= L >= 0. See Further Details.
+*>
+*> NB (input) INTEGER
+*> The block size to be used in the blocked QR. N >= NB >= 1.
+*>
+*> A (input/output) COMPLEX array, dimension (LDA,N)
+*> On entry, the upper triangular N-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the upper triangular matrix R.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> B (input/output) COMPLEX array, dimension (LDB,N)
+*> On entry, the pentagonal M-by-N matrix B. The first M-L rows
+*> are rectangular, and the last L rows are upper trapezoidal.
+*> On exit, B contains the pentagonal matrix V. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*>
+*> T (output) COMPLEX array, dimension (LDT,N)
+*> The upper triangular block reflectors stored in compact form
+*> as a sequence of upper triangular blocks. See Further Details.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> WORK (workspace) COMPLEX array, dimension (NB*N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The input matrix C is a (N+M)-by-N matrix
+*>
+*> C = [ A ]
+*> [ B ]
+*>
+*> where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
+*> matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
+*> upper trapezoidal matrix B2:
+*>
+*> B = [ B1 ] <- (M-L)-by-N rectangular
+*> [ B2 ] <- L-by-N upper trapezoidal.
+*>
+*> The upper trapezoidal matrix B2 consists of the first L rows of a
+*> N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
+*> B is rectangular M-by-N; if M=L=N, B is upper triangular.
+*>
+*> The matrix W stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal (of A) in the (N+M)-by-N input matrix C
+*>
+*> C = [ A ] <- upper triangular N-by-N
+*> [ B ] <- M-by-N pentagonal
+*>
+*> so that W can be represented as
+*>
+*> W = [ I ] <- identity, N-by-N
+*> [ V ] <- M-by-N, same form as B.
+*>
+*> Thus, all of information needed for W is contained on exit in B, which
+*> we call V above. Note that V has the same form as B; that is,
+*>
+*> V = [ V1 ] <- (M-L)-by-N rectangular
+*> [ V2 ] <- L-by-N upper trapezoidal.
+*>
+*> The columns of V represent the vectors which define the H(i)'s.
+*>
+*> The number of blocks is B = ceiling(N/NB), where each
+*> block is of order NB except for the last block, which is of order
+*> IB = N - (B-1)*NB. For each of the B blocks, a upper triangular block
+*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
+*> for the last block) T's are stored in the NB-by-N matrix T as
+*>
+*> T = [T1 T2 ... TB].
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
+ $ INFO )
*
-* The number of blocks is B = ceiling(N/NB), where each
-* block is of order NB except for the last block, which is of order
-* IB = N - (B-1)*NB. For each of the B blocks, a upper triangular block
-* reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
-* for the last block) T's are stored in the NB-by-N matrix T as
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* T = [T1 T2 ... TB].
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctpqrt2.f b/SRC/ctpqrt2.f
index 33ea7b92..c6e03d81 100644
--- a/SRC/ctpqrt2.f
+++ b/SRC/ctpqrt2.f
@@ -1,111 +1,157 @@
- SUBROUTINE CTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
- IMPLICIT NONE
+*> \brief \b CTPQRT2
*
-* -- LAPACK routine (version 3.x) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LDT, N, M, L
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDT, N, M, L
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* CTPQRT2 computes a QR factorization of a complex "triangular-pentagonal"
-* matrix C, which is composed of a triangular block A and pentagonal block B,
-* using the compact WY representation for Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPQRT2 computes a QR factorization of a complex "triangular-pentagonal"
+*> matrix C, which is composed of a triangular block A and pentagonal block B,
+*> using the compact WY representation for Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The total number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B, and the order of
-* the triangular matrix A.
-* N >= 0.
-*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part of B.
-* MIN(M,N) >= L >= 0. See Further Details.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the upper triangular N-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the pentagonal M-by-N matrix B. The first M-L rows
-* are rectangular, and the last L rows are upper trapezoidal.
-* On exit, B contains the pentagonal matrix V. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B, and the order of
+*> the triangular matrix A.
+*> N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX array, dimension (LDT,N)
-* The N-by-N upper triangular factor T of the block reflector.
-* See Further Details.
+*> \date November 2011
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N)
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* MIN(M,N) >= L >= 0. See Further Details.
+*>
+*> A (input/output) COMPLEX array, dimension (LDA,N)
+*> On entry, the upper triangular N-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the upper triangular matrix R.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> B (input/output) COMPLEX array, dimension (LDB,N)
+*> On entry, the pentagonal M-by-N matrix B. The first M-L rows
+*> are rectangular, and the last L rows are upper trapezoidal.
+*> On exit, B contains the pentagonal matrix V. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*>
+*> T (output) COMPLEX array, dimension (LDT,N)
+*> The N-by-N upper triangular factor T of the block reflector.
+*> See Further Details.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The input matrix C is a (N+M)-by-N matrix
+*>
+*> C = [ A ]
+*> [ B ]
+*>
+*> where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
+*> matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
+*> upper trapezoidal matrix B2:
+*>
+*> B = [ B1 ] <- (M-L)-by-N rectangular
+*> [ B2 ] <- L-by-N upper trapezoidal.
+*>
+*> The upper trapezoidal matrix B2 consists of the first L rows of a
+*> N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
+*> B is rectangular M-by-N; if M=L=N, B is upper triangular.
+*>
+*> The matrix W stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal (of A) in the (N+M)-by-N input matrix C
+*>
+*> C = [ A ] <- upper triangular N-by-N
+*> [ B ] <- M-by-N pentagonal
+*>
+*> so that W can be represented as
+*>
+*> W = [ I ] <- identity, N-by-N
+*> [ V ] <- M-by-N, same form as B.
+*>
+*> Thus, all of information needed for W is contained on exit in B, which
+*> we call V above. Note that V has the same form as B; that is,
+*>
+*> V = [ V1 ] <- (M-L)-by-N rectangular
+*> [ V2 ] <- L-by-N upper trapezoidal.
+*>
+*> The columns of V represent the vectors which define the H(i)'s.
+*> The (M+N)-by-(M+N) block reflector H is then given by
+*>
+*> H = I - W * T * W**H
+*>
+*> where W**H is the conjugate transpose of W and T is the upper triangular
+*> factor of the block reflector.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
*
-* The input matrix C is a (N+M)-by-N matrix
-*
-* C = [ A ]
-* [ B ]
-*
-* where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
-* matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
-* upper trapezoidal matrix B2:
-*
-* B = [ B1 ] <- (M-L)-by-N rectangular
-* [ B2 ] <- L-by-N upper trapezoidal.
-*
-* The upper trapezoidal matrix B2 consists of the first L rows of a
-* N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
-* B is rectangular M-by-N; if M=L=N, B is upper triangular.
-*
-* The matrix W stores the elementary reflectors H(i) in the i-th column
-* below the diagonal (of A) in the (N+M)-by-N input matrix C
-*
-* C = [ A ] <- upper triangular N-by-N
-* [ B ] <- M-by-N pentagonal
-*
-* so that W can be represented as
-*
-* W = [ I ] <- identity, N-by-N
-* [ V ] <- M-by-N, same form as B.
-*
-* Thus, all of information needed for W is contained on exit in B, which
-* we call V above. Note that V has the same form as B; that is,
-*
-* V = [ V1 ] <- (M-L)-by-N rectangular
-* [ V2 ] <- L-by-N upper trapezoidal.
-*
-* The columns of V represent the vectors which define the H(i)'s.
-* The (M+N)-by-(M+N) block reflector H is then given by
-*
-* H = I - W * T * W**H
+* -- LAPACK computational routine (version 3.x) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where W**H is the conjugate transpose of W and T is the upper triangular
-* factor of the block reflector.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LDT, N, M, L
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctprfb.f b/SRC/ctprfb.f
index 9c7980c0..3f5b7cc1 100644
--- a/SRC/ctprfb.f
+++ b/SRC/ctprfb.f
@@ -1,11 +1,218 @@
+*> \brief \b CTPRFB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
+* V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, L, LDA, LDB, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), T( LDT, * ),
+* $ V( LDV, * ), WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPRFB applies a complex "triangular-pentagonal" block reflector H or its
+*> conjugate transpose H**H to a complex matrix C, which is composed of two
+*> blocks A and B, either from the left or right.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**H from the Left
+*> = 'R': apply H or H**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columns
+*> = 'R': Rows
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B.
+*> N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T, i.e. the number of elementary
+*> reflectors whose product defines the block reflector.
+*> K >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* K >= L >= 0. See Further Details.
+*>
+*> V (input) COMPLEX array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,M) if STOREV = 'R' and SIDE = 'L'
+*> (LDV,N) if STOREV = 'R' and SIDE = 'R'
+*> The pentagonal matrix V, which contains the elementary reflectors
+*> H(1), H(2), ..., H(K). See Further Details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*> if STOREV = 'R', LDV >= K.
+*>
+*> T (input) COMPLEX array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T.
+*> LDT >= K.
+*>
+*> A (input/output) COMPLEX array, dimension
+*> (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
+*> On entry, the K-by-N or M-by-K matrix A.
+*> On exit, A is overwritten by the corresponding block of
+*> H*C or H**H*C or C*H or C*H**H. See Futher Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDC >= max(1,K);
+*> If SIDE = 'R', LDC >= max(1,M).
+*>
+*> B (input/output) COMPLEX array, dimension (LDB,N)
+*> On entry, the M-by-N matrix B.
+*> On exit, B is overwritten by the corresponding block of
+*> H*C or H**H*C or C*H or C*H**H. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B.
+*> LDB >= max(1,M).
+*>
+*> WORK (workspace) COMPLEX array, dimension
+*> (LDWORK,N) if SIDE = 'L',
+*> (LDWORK,K) if SIDE = 'R'.
+*>
+*> LDWORK (input) INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= K;
+*> if SIDE = 'R', LDWORK >= M.
+*>
+*>
+*> The matrix C is a composite matrix formed from blocks A and B.
+*> The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
+*> and if SIDE = 'L', A is of size K-by-N.
+*>
+*> If SIDE = 'R' and DIRECT = 'F', C = [A B].
+*>
+*> If SIDE = 'L' and DIRECT = 'F', C = [A]
+*> [B].
+*>
+*> If SIDE = 'R' and DIRECT = 'B', C = [B A].
+*>
+*> If SIDE = 'L' and DIRECT = 'B', C = [B]
+*> [A].
+*>
+*> The pentagonal matrix V is composed of a rectangular block V1 and a
+*> trapezoidal block V2. The size of the trapezoidal block is determined by
+*> the parameter L, where 0<=L<=K. If L=K, the V2 block of V is triangular;
+*> if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
+*>
+*> If DIRECT = 'F' and STOREV = 'C': V = [V1]
+*> [V2]
+*> - V2 is upper trapezoidal (first L rows of K-by-K upper triangular)
+*>
+*> If DIRECT = 'F' and STOREV = 'R': V = [V1 V2]
+*>
+*> - V2 is lower trapezoidal (first L columns of K-by-K lower triangular)
+*>
+*> If DIRECT = 'B' and STOREV = 'C': V = [V2]
+*> [V1]
+*> - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
+*>
+*> If DIRECT = 'B' and STOREV = 'R': V = [V2 V1]
+*>
+*> - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
+*>
+*> If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
+*>
+*> If STOREV = 'C' and SIDE = 'R', V is N-by-K with V2 L-by-K.
+*>
+*> If STOREV = 'R' and SIDE = 'L', V is K-by-M with V2 K-by-L.
+*>
+*> If STOREV = 'R' and SIDE = 'R', V is K-by-N with V2 K-by-L.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
$ V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.x) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIRECT, SIDE, STOREV, TRANS
@@ -16,149 +223,6 @@
$ V( LDV, * ), WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* CTPRFB applies a complex "triangular-pentagonal" block reflector H or its
-* conjugate transpose H**H to a complex matrix C, which is composed of two
-* blocks A and B, either from the left or right.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**H from the Left
-* = 'R': apply H or H**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H**H (Conjugate transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columns
-* = 'R': Rows
-*
-* M (input) INTEGER
-* The number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B.
-* N >= 0.
-*
-* K (input) INTEGER
-* The order of the matrix T, i.e. the number of elementary
-* reflectors whose product defines the block reflector.
-* K >= 0.
-*
-* L (input) INTEGER
-* The order of the trapezoidal part of V.
-* K >= L >= 0. See Further Details.
-*
-* V (input) COMPLEX array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,M) if STOREV = 'R' and SIDE = 'L'
-* (LDV,N) if STOREV = 'R' and SIDE = 'R'
-* The pentagonal matrix V, which contains the elementary reflectors
-* H(1), H(2), ..., H(K). See Further Details.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-* if STOREV = 'R', LDV >= K.
-*
-* T (input) COMPLEX array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T.
-* LDT >= K.
-*
-* A (input/output) COMPLEX array, dimension
-* (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
-* On entry, the K-by-N or M-by-K matrix A.
-* On exit, A is overwritten by the corresponding block of
-* H*C or H**H*C or C*H or C*H**H. See Futher Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDC >= max(1,K);
-* If SIDE = 'R', LDC >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,N)
-* On entry, the M-by-N matrix B.
-* On exit, B is overwritten by the corresponding block of
-* H*C or H**H*C or C*H or C*H**H. See Further Details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* LDB >= max(1,M).
-*
-* WORK (workspace) COMPLEX array, dimension
-* (LDWORK,N) if SIDE = 'L',
-* (LDWORK,K) if SIDE = 'R'.
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= K;
-* if SIDE = 'R', LDWORK >= M.
-*
-* Further Details
-* ===============
-*
-* The matrix C is a composite matrix formed from blocks A and B.
-* The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
-* and if SIDE = 'L', A is of size K-by-N.
-*
-* If SIDE = 'R' and DIRECT = 'F', C = [A B].
-*
-* If SIDE = 'L' and DIRECT = 'F', C = [A]
-* [B].
-*
-* If SIDE = 'R' and DIRECT = 'B', C = [B A].
-*
-* If SIDE = 'L' and DIRECT = 'B', C = [B]
-* [A].
-*
-* The pentagonal matrix V is composed of a rectangular block V1 and a
-* trapezoidal block V2. The size of the trapezoidal block is determined by
-* the parameter L, where 0<=L<=K. If L=K, the V2 block of V is triangular;
-* if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
-*
-* If DIRECT = 'F' and STOREV = 'C': V = [V1]
-* [V2]
-* - V2 is upper trapezoidal (first L rows of K-by-K upper triangular)
-*
-* If DIRECT = 'F' and STOREV = 'R': V = [V1 V2]
-*
-* - V2 is lower trapezoidal (first L columns of K-by-K lower triangular)
-*
-* If DIRECT = 'B' and STOREV = 'C': V = [V2]
-* [V1]
-* - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
-*
-* If DIRECT = 'B' and STOREV = 'R': V = [V2 V1]
-*
-* - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
-*
-* If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
-*
-* If STOREV = 'C' and SIDE = 'R', V is N-by-K with V2 L-by-K.
-*
-* If STOREV = 'R' and SIDE = 'L', V is K-by-M with V2 K-by-L.
-*
-* If STOREV = 'R' and SIDE = 'R', V is K-by-N with V2 K-by-L.
-*
* ==========================================================================
*
* .. Parameters ..
diff --git a/SRC/ctprfs.f b/SRC/ctprfs.f
index b0e0dd8b..14b4bfa3 100644
--- a/SRC/ctprfs.f
+++ b/SRC/ctprfs.f
@@ -1,12 +1,175 @@
+*> \brief \b CTPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
+* FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular packed
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by CTPTRS or some other
+*> means before entering this routine. CTPRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
$ FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -17,85 +180,6 @@
COMPLEX AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CTPRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular packed
-* coefficient matrix.
-*
-* The solution matrix X must be computed by CTPTRS or some other
-* means before entering this routine. CTPRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctptri.f b/SRC/ctptri.f
index 8ccb9156..65f99c7c 100644
--- a/SRC/ctptri.f
+++ b/SRC/ctptri.f
@@ -1,69 +1,128 @@
- SUBROUTINE CTPTRI( UPLO, DIAG, N, AP, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX AP( * )
-* ..
-*
+*> \brief \b CTPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPTRI( UPLO, DIAG, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * )
+* ..
+*
* Purpose
* =======
*
-* CTPTRI computes the inverse of a complex upper or lower triangular
-* matrix A stored in packed format.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPTRI computes the inverse of a complex upper or lower triangular
+*> matrix A stored in packed format.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangular matrix A, stored
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-* On exit, the (triangular) inverse of the original matrix, in
-* the same packed storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangular matrix A, stored
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same packed storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A triangular matrix A can be transferred to packed storage using one
+*> of the following program segments:
+*>
+*> UPLO = 'U': UPLO = 'L':
+*>
+*> JC = 1 JC = 1
+*> DO 2 J = 1, N DO 2 J = 1, N
+*> DO 1 I = 1, J DO 1 I = J, N
+*> AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
+*> 1 CONTINUE 1 CONTINUE
+*> JC = JC + J JC = JC + N - J + 1
+*> 2 CONTINUE 2 CONTINUE
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTPTRI( UPLO, DIAG, N, AP, INFO )
*
-* A triangular matrix A can be transferred to packed storage using one
-* of the following program segments:
-*
-* UPLO = 'U': UPLO = 'L':
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* JC = 1 JC = 1
-* DO 2 J = 1, N DO 2 J = 1, N
-* DO 1 I = 1, J DO 1 I = J, N
-* AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
-* 1 CONTINUE 1 CONTINUE
-* JC = JC + J JC = JC + N - J + 1
-* 2 CONTINUE 2 CONTINUE
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctptrs.f b/SRC/ctptrs.f
index df9bed36..84852b37 100644
--- a/SRC/ctptrs.f
+++ b/SRC/ctptrs.f
@@ -1,9 +1,131 @@
+*> \brief \b CTPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPTRS solves a triangular system of the form
+*>
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*>
+*> where A is a triangular matrix of order N stored in packed format,
+*> and B is an N-by-NRHS matrix. A check is made to verify that A is
+*> nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the
+*> solutions X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -13,62 +135,6 @@
COMPLEX AP( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CTPTRS solves a triangular system of the form
-*
-* A * X = B, A**T * X = B, or A**H * X = B,
-*
-* where A is a triangular matrix of order N stored in packed format,
-* and B is an N-by-NRHS matrix. A check is made to verify that A is
-* nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the
-* solutions X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctpttf.f b/SRC/ctpttf.f
index fe235a17..5f5e4b31 100644
--- a/SRC/ctpttf.f
+++ b/SRC/ctpttf.f
@@ -1,160 +1,217 @@
- SUBROUTINE CTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b CTPTTF
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX AP( 0: * ), ARF( 0: * )
+* Definition
+* ==========
*
+* SUBROUTINE CTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( 0: * ), ARF( 0: * )
+*
* Purpose
* =======
*
-* CTPTTF copies a triangular matrix A from standard packed format (TP)
-* to rectangular full packed format (TF).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPTTF copies a triangular matrix A from standard packed format (TP)
+*> to rectangular full packed format (TF).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF in Normal format is wanted;
-* = 'C': ARF in Conjugate-transpose format is wanted.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF in Normal format is wanted;
+*> = 'C': ARF in Conjugate-transpose format is wanted.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) COMPLEX array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \date November 2011
*
-* ARF (output) COMPLEX array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( 0: * ), ARF( 0: * )
*
* =====================================================================
*
diff --git a/SRC/ctpttr.f b/SRC/ctpttr.f
index 7dab3dc1..5d39a910 100644
--- a/SRC/ctpttr.f
+++ b/SRC/ctpttr.f
@@ -1,12 +1,105 @@
- SUBROUTINE CTPTTR( UPLO, N, AP, A, LDA, INFO )
+*> \brief \b CTPTTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPTTR( UPLO, N, AP, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AP( * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.3.0) --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPTTR copies a triangular matrix A from standard packed format (TP)
+*> to standard full format (TR).
+*>
+*>\endverbatim
*
-* -- Contributed by Julien Langou of the Univ. of Colorado Denver --
-* November 2010 --
+* Arguments
+* =========
*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular.
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> On exit, the triangular matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE CTPTTR( UPLO, N, AP, A, LDA, INFO )
+*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,45 +109,6 @@
COMPLEX A( LDA, * ), AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CTPTTR copies a triangular matrix A from standard packed format (TP)
-* to standard full format (TR).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular.
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* A (output) COMPLEX array, dimension ( LDA, N )
-* On exit, the triangular matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrcon.f b/SRC/ctrcon.f
index 0cb81c21..da3d0106 100644
--- a/SRC/ctrcon.f
+++ b/SRC/ctrcon.f
@@ -1,12 +1,138 @@
+*> \brief \b CTRCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, LDA, N
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRCON estimates the reciprocal of the condition number of a
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
$ RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,62 +144,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CTRCON estimates the reciprocal of the condition number of a
-* triangular matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrevc.f b/SRC/ctrevc.f
index 82531141..47f197bf 100644
--- a/SRC/ctrevc.f
+++ b/SRC/ctrevc.f
@@ -1,10 +1,221 @@
+*> \brief \b CTREVC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+* LDVR, MM, M, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, SIDE
+* INTEGER INFO, LDT, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* REAL RWORK( * )
+* COMPLEX T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTREVC computes some or all of the right and/or left eigenvectors of
+*> a complex upper triangular matrix T.
+*> Matrices of this type are produced by the Schur factorization of
+*> a complex general matrix: A = Q*T*Q**H, as computed by CHSEQR.
+*>
+*> The right eigenvector x and the left eigenvector y of T corresponding
+*> to an eigenvalue w are defined by:
+*>
+*> T*x = w*x, (y**H)*T = w*(y**H)
+*>
+*> where y**H denotes the conjugate transpose of the vector y.
+*> The eigenvalues are not input to this routine, but are read directly
+*> from the diagonal of T.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
+*> input matrix. If Q is the unitary factor that reduces a matrix A to
+*> Schur form T, then Q*X and Q*Y are the matrices of right and left
+*> eigenvectors of A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute all right and/or left eigenvectors;
+*> = 'B': compute all right and/or left eigenvectors,
+*> backtransformed using the matrices supplied in
+*> VR and/or VL;
+*> = 'S': compute selected right and/or left eigenvectors,
+*> as indicated by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenvectors to be
+*> computed.
+*> The eigenvector corresponding to the j-th eigenvalue is
+*> computed if SELECT(j) = .TRUE..
+*> Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,N)
+*> The upper triangular matrix T. T is modified, but restored
+*> on exit.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,MM)
+*> On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*> contain an N-by-N matrix Q (usually the unitary matrix Q of
+*> Schur vectors returned by CHSEQR).
+*> On exit, if SIDE = 'L' or 'B', VL contains:
+*> if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
+*> if HOWMNY = 'B', the matrix Q*Y;
+*> if HOWMNY = 'S', the left eigenvectors of T specified by
+*> SELECT, stored consecutively in the columns
+*> of VL, in the same order as their
+*> eigenvalues.
+*> Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1, and if
+*> SIDE = 'L' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,MM)
+*> On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*> contain an N-by-N matrix Q (usually the unitary matrix Q of
+*> Schur vectors returned by CHSEQR).
+*> On exit, if SIDE = 'R' or 'B', VR contains:
+*> if HOWMNY = 'A', the matrix X of right eigenvectors of T;
+*> if HOWMNY = 'B', the matrix Q*X;
+*> if HOWMNY = 'S', the right eigenvectors of T specified by
+*> SELECT, stored consecutively in the columns
+*> of VR, in the same order as their
+*> eigenvalues.
+*> Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> SIDE = 'R' or 'B'; LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR actually
+*> used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
+*> is set to N. Each selected eigenvector occupies one
+*> column.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The algorithm used in this program is basically backward (forward)
+*> substitution, with scaling to make the the code robust against
+*> possible overflow.
+*>
+*> Each eigenvector is normalized so that the element of largest
+*> magnitude has magnitude 1; here the magnitude of a complex number
+*> (x,y) is taken to be |x| + |y|.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
$ LDVR, MM, M, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, SIDE
@@ -17,124 +228,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CTREVC computes some or all of the right and/or left eigenvectors of
-* a complex upper triangular matrix T.
-* Matrices of this type are produced by the Schur factorization of
-* a complex general matrix: A = Q*T*Q**H, as computed by CHSEQR.
-*
-* The right eigenvector x and the left eigenvector y of T corresponding
-* to an eigenvalue w are defined by:
-*
-* T*x = w*x, (y**H)*T = w*(y**H)
-*
-* where y**H denotes the conjugate transpose of the vector y.
-* The eigenvalues are not input to this routine, but are read directly
-* from the diagonal of T.
-*
-* This routine returns the matrices X and/or Y of right and left
-* eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
-* input matrix. If Q is the unitary factor that reduces a matrix A to
-* Schur form T, then Q*X and Q*Y are the matrices of right and left
-* eigenvectors of A.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute all right and/or left eigenvectors;
-* = 'B': compute all right and/or left eigenvectors,
-* backtransformed using the matrices supplied in
-* VR and/or VL;
-* = 'S': compute selected right and/or left eigenvectors,
-* as indicated by the logical array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenvectors to be
-* computed.
-* The eigenvector corresponding to the j-th eigenvalue is
-* computed if SELECT(j) = .TRUE..
-* Not referenced if HOWMNY = 'A' or 'B'.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) COMPLEX array, dimension (LDT,N)
-* The upper triangular matrix T. T is modified, but restored
-* on exit.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* VL (input/output) COMPLEX array, dimension (LDVL,MM)
-* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-* contain an N-by-N matrix Q (usually the unitary matrix Q of
-* Schur vectors returned by CHSEQR).
-* On exit, if SIDE = 'L' or 'B', VL contains:
-* if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
-* if HOWMNY = 'B', the matrix Q*Y;
-* if HOWMNY = 'S', the left eigenvectors of T specified by
-* SELECT, stored consecutively in the columns
-* of VL, in the same order as their
-* eigenvalues.
-* Not referenced if SIDE = 'R'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1, and if
-* SIDE = 'L' or 'B', LDVL >= N.
-*
-* VR (input/output) COMPLEX array, dimension (LDVR,MM)
-* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-* contain an N-by-N matrix Q (usually the unitary matrix Q of
-* Schur vectors returned by CHSEQR).
-* On exit, if SIDE = 'R' or 'B', VR contains:
-* if HOWMNY = 'A', the matrix X of right eigenvectors of T;
-* if HOWMNY = 'B', the matrix Q*X;
-* if HOWMNY = 'S', the right eigenvectors of T specified by
-* SELECT, stored consecutively in the columns
-* of VR, in the same order as their
-* eigenvalues.
-* Not referenced if SIDE = 'L'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* SIDE = 'R' or 'B'; LDVR >= N.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR actually
-* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
-* is set to N. Each selected eigenvector occupies one
-* column.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The algorithm used in this program is basically backward (forward)
-* substitution, with scaling to make the the code robust against
-* possible overflow.
-*
-* Each eigenvector is normalized so that the element of largest
-* magnitude has magnitude 1; here the magnitude of a complex number
-* (x,y) is taken to be |x| + |y|.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrexc.f b/SRC/ctrexc.f
index 3a8f0d9b..4c34ae53 100644
--- a/SRC/ctrexc.f
+++ b/SRC/ctrexc.f
@@ -1,65 +1,131 @@
- SUBROUTINE CTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER COMPQ
- INTEGER IFST, ILST, INFO, LDQ, LDT, N
-* ..
-* .. Array Arguments ..
- COMPLEX Q( LDQ, * ), T( LDT, * )
-* ..
-*
+*> \brief \b CTREXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ
+* INTEGER IFST, ILST, INFO, LDQ, LDT, N
+* ..
+* .. Array Arguments ..
+* COMPLEX Q( LDQ, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* CTREXC reorders the Schur factorization of a complex matrix
-* A = Q*T*Q**H, so that the diagonal element of T with row index IFST
-* is moved to row ILST.
-*
-* The Schur form T is reordered by a unitary similarity transformation
-* Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by
-* postmultplying it with Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTREXC reorders the Schur factorization of a complex matrix
+*> A = Q*T*Q**H, so that the diagonal element of T with row index IFST
+*> is moved to row ILST.
+*>
+*> The Schur form T is reordered by a unitary similarity transformation
+*> Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by
+*> postmultplying it with Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* COMPQ (input) CHARACTER*1
-* = 'V': update the matrix Q of Schur vectors;
-* = 'N': do not update Q.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'V': update the matrix Q of Schur vectors;
+*> = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,N)
+*> On entry, the upper triangular matrix T.
+*> On exit, the reordered upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*> On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*> unitary transformation matrix Z which reorders T.
+*> If COMPQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IFST
+*> \verbatim
+*> IFST is INTEGER
+*> \param[in] ILST
+*> \verbatim
+*> ILST is INTEGER
+*> Specify the reordering of the diagonal elements of T:
+*> The element with row index IFST is moved to row ILST by a
+*> sequence of transpositions between adjacent elements.
+*> 1 <= IFST <= N; 1 <= ILST <= N.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (input/output) COMPLEX array, dimension (LDT,N)
-* On entry, the upper triangular matrix T.
-* On exit, the reordered upper triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \date November 2011
*
-* Q (input/output) COMPLEX array, dimension (LDQ,N)
-* On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-* On exit, if COMPQ = 'V', Q has been postmultiplied by the
-* unitary transformation matrix Z which reorders T.
-* If COMPQ = 'N', Q is not referenced.
+*> \ingroup complexOTHERcomputational
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+* =====================================================================
+ SUBROUTINE CTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
*
-* IFST (input) INTEGER
-* ILST (input) INTEGER
-* Specify the reordering of the diagonal elements of T:
-* The element with row index IFST is moved to row ILST by a
-* sequence of transpositions between adjacent elements.
-* 1 <= IFST <= N; 1 <= ILST <= N.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER COMPQ
+ INTEGER IFST, ILST, INFO, LDQ, LDT, N
+* ..
+* .. Array Arguments ..
+ COMPLEX Q( LDQ, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctrrfs.f b/SRC/ctrrfs.f
index ee34596e..a93003f3 100644
--- a/SRC/ctrrfs.f
+++ b/SRC/ctrrfs.f
@@ -1,12 +1,183 @@
+*> \brief \b CTRRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
+* LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by CTRTRS or some other
+*> means before entering this routine. CTRRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
$ LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,89 +189,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular
-* coefficient matrix.
-*
-* The solution matrix X must be computed by CTRTRS or some other
-* means before entering this routine. CTRRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrsen.f b/SRC/ctrsen.f
index a78d5f17..f3b79d21 100644
--- a/SRC/ctrsen.f
+++ b/SRC/ctrsen.f
@@ -1,12 +1,268 @@
+*> \brief \b CTRSEN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,
+* SEP, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, JOB
+* INTEGER INFO, LDQ, LDT, LWORK, M, N
+* REAL S, SEP
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* COMPLEX Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRSEN reorders the Schur factorization of a complex matrix
+*> A = Q*T*Q**H, so that a selected cluster of eigenvalues appears in
+*> the leading positions on the diagonal of the upper triangular matrix
+*> T, and the leading columns of Q form an orthonormal basis of the
+*> corresponding right invariant subspace.
+*>
+*> Optionally the routine computes the reciprocal condition numbers of
+*> the cluster of eigenvalues and/or the invariant subspace.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for the
+*> cluster of eigenvalues (S) or the invariant subspace (SEP):
+*> = 'N': none;
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for invariant subspace only (SEP);
+*> = 'B': for both eigenvalues and invariant subspace (S and
+*> SEP).
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'V': update the matrix Q of Schur vectors;
+*> = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> SELECT specifies the eigenvalues in the selected cluster. To
+*> select the j-th eigenvalue, SELECT(j) must be set to .TRUE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,N)
+*> On entry, the upper triangular matrix T.
+*> On exit, T is overwritten by the reordered matrix T, with the
+*> selected eigenvalues as the leading diagonal elements.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*> On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*> unitary transformation matrix which reorders T; the leading M
+*> columns of Q form an orthonormal basis for the specified
+*> invariant subspace.
+*> If COMPQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> The reordered eigenvalues of T, in the same order as they
+*> appear on the diagonal of T.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The dimension of the specified invariant subspace.
+*> 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL
+*> If JOB = 'E' or 'B', S is a lower bound on the reciprocal
+*> condition number for the selected cluster of eigenvalues.
+*> S cannot underestimate the true reciprocal condition number
+*> by more than a factor of sqrt(N). If M = 0 or N, S = 1.
+*> If JOB = 'N' or 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is REAL
+*> If JOB = 'V' or 'B', SEP is the estimated reciprocal
+*> condition number of the specified invariant subspace. If
+*> M = 0 or N, SEP = norm(T).
+*> If JOB = 'N' or 'E', SEP is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If JOB = 'N', LWORK >= 1;
+*> if JOB = 'E', LWORK = max(1,M*(N-M));
+*> if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> CTRSEN first collects the selected eigenvalues by computing a unitary
+*> transformation Z to move them to the top left corner of T. In other
+*> words, the selected eigenvalues are the eigenvalues of T11 in:
+*>
+*> Z**H * T * Z = ( T11 T12 ) n1
+*> ( 0 T22 ) n2
+*> n1 n2
+*>
+*> where N = n1+n2. The first
+*> n1 columns of Z span the specified invariant subspace of T.
+*>
+*> If T has been obtained from the Schur factorization of a matrix
+*> A = Q*T*Q**H, then the reordered Schur factorization of A is given by
+*> A = (Q*Z)*(Z**H*T*Z)*(Q*Z)**H, and the first n1 columns of Q*Z span the
+*> corresponding invariant subspace of A.
+*>
+*> The reciprocal condition number of the average of the eigenvalues of
+*> T11 may be returned in S. S lies between 0 (very badly conditioned)
+*> and 1 (very well conditioned). It is computed as follows. First we
+*> compute R so that
+*>
+*> P = ( I R ) n1
+*> ( 0 0 ) n2
+*> n1 n2
+*>
+*> is the projector on the invariant subspace associated with T11.
+*> R is the solution of the Sylvester equation:
+*>
+*> T11*R - R*T22 = T12.
+*>
+*> Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
+*> the two-norm of M. Then S is computed as the lower bound
+*>
+*> (1 + F-norm(R)**2)**(-1/2)
+*>
+*> on the reciprocal of 2-norm(P), the true reciprocal condition number.
+*> S cannot underestimate 1 / 2-norm(P) by more than a factor of
+*> sqrt(N).
+*>
+*> An approximate error bound for the computed average of the
+*> eigenvalues of T11 is
+*>
+*> EPS * norm(T) / S
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal condition number of the right invariant subspace
+*> spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
+*> SEP is defined as the separation of T11 and T22:
+*>
+*> sep( T11, T22 ) = sigma-min( C )
+*>
+*> where sigma-min(C) is the smallest singular value of the
+*> n1*n2-by-n1*n2 matrix
+*>
+*> C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
+*>
+*> I(m) is an m by m identity matrix, and kprod denotes the Kronecker
+*> product. We estimate sigma-min(C) by the reciprocal of an estimate of
+*> the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
+*> cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
+*>
+*> When SEP is small, small changes in T can cause large changes in
+*> the invariant subspace. An approximate bound on the maximum angular
+*> error in the computed right invariant subspace is
+*>
+*> EPS * norm(T) / SEP
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,
$ SEP, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, JOB
@@ -18,171 +274,6 @@
COMPLEX Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CTRSEN reorders the Schur factorization of a complex matrix
-* A = Q*T*Q**H, so that a selected cluster of eigenvalues appears in
-* the leading positions on the diagonal of the upper triangular matrix
-* T, and the leading columns of Q form an orthonormal basis of the
-* corresponding right invariant subspace.
-*
-* Optionally the routine computes the reciprocal condition numbers of
-* the cluster of eigenvalues and/or the invariant subspace.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for the
-* cluster of eigenvalues (S) or the invariant subspace (SEP):
-* = 'N': none;
-* = 'E': for eigenvalues only (S);
-* = 'V': for invariant subspace only (SEP);
-* = 'B': for both eigenvalues and invariant subspace (S and
-* SEP).
-*
-* COMPQ (input) CHARACTER*1
-* = 'V': update the matrix Q of Schur vectors;
-* = 'N': do not update Q.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* SELECT specifies the eigenvalues in the selected cluster. To
-* select the j-th eigenvalue, SELECT(j) must be set to .TRUE..
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) COMPLEX array, dimension (LDT,N)
-* On entry, the upper triangular matrix T.
-* On exit, T is overwritten by the reordered matrix T, with the
-* selected eigenvalues as the leading diagonal elements.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* Q (input/output) COMPLEX array, dimension (LDQ,N)
-* On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-* On exit, if COMPQ = 'V', Q has been postmultiplied by the
-* unitary transformation matrix which reorders T; the leading M
-* columns of Q form an orthonormal basis for the specified
-* invariant subspace.
-* If COMPQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
-*
-* W (output) COMPLEX array, dimension (N)
-* The reordered eigenvalues of T, in the same order as they
-* appear on the diagonal of T.
-*
-* M (output) INTEGER
-* The dimension of the specified invariant subspace.
-* 0 <= M <= N.
-*
-* S (output) REAL
-* If JOB = 'E' or 'B', S is a lower bound on the reciprocal
-* condition number for the selected cluster of eigenvalues.
-* S cannot underestimate the true reciprocal condition number
-* by more than a factor of sqrt(N). If M = 0 or N, S = 1.
-* If JOB = 'N' or 'V', S is not referenced.
-*
-* SEP (output) REAL
-* If JOB = 'V' or 'B', SEP is the estimated reciprocal
-* condition number of the specified invariant subspace. If
-* M = 0 or N, SEP = norm(T).
-* If JOB = 'N' or 'E', SEP is not referenced.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If JOB = 'N', LWORK >= 1;
-* if JOB = 'E', LWORK = max(1,M*(N-M));
-* if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* CTRSEN first collects the selected eigenvalues by computing a unitary
-* transformation Z to move them to the top left corner of T. In other
-* words, the selected eigenvalues are the eigenvalues of T11 in:
-*
-* Z**H * T * Z = ( T11 T12 ) n1
-* ( 0 T22 ) n2
-* n1 n2
-*
-* where N = n1+n2. The first
-* n1 columns of Z span the specified invariant subspace of T.
-*
-* If T has been obtained from the Schur factorization of a matrix
-* A = Q*T*Q**H, then the reordered Schur factorization of A is given by
-* A = (Q*Z)*(Z**H*T*Z)*(Q*Z)**H, and the first n1 columns of Q*Z span the
-* corresponding invariant subspace of A.
-*
-* The reciprocal condition number of the average of the eigenvalues of
-* T11 may be returned in S. S lies between 0 (very badly conditioned)
-* and 1 (very well conditioned). It is computed as follows. First we
-* compute R so that
-*
-* P = ( I R ) n1
-* ( 0 0 ) n2
-* n1 n2
-*
-* is the projector on the invariant subspace associated with T11.
-* R is the solution of the Sylvester equation:
-*
-* T11*R - R*T22 = T12.
-*
-* Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
-* the two-norm of M. Then S is computed as the lower bound
-*
-* (1 + F-norm(R)**2)**(-1/2)
-*
-* on the reciprocal of 2-norm(P), the true reciprocal condition number.
-* S cannot underestimate 1 / 2-norm(P) by more than a factor of
-* sqrt(N).
-*
-* An approximate error bound for the computed average of the
-* eigenvalues of T11 is
-*
-* EPS * norm(T) / S
-*
-* where EPS is the machine precision.
-*
-* The reciprocal condition number of the right invariant subspace
-* spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
-* SEP is defined as the separation of T11 and T22:
-*
-* sep( T11, T22 ) = sigma-min( C )
-*
-* where sigma-min(C) is the smallest singular value of the
-* n1*n2-by-n1*n2 matrix
-*
-* C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
-*
-* I(m) is an m by m identity matrix, and kprod denotes the Kronecker
-* product. We estimate sigma-min(C) by the reciprocal of an estimate of
-* the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
-* cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
-*
-* When SEP is small, small changes in T can cause large changes in
-* the invariant subspace. An approximate bound on the maximum angular
-* error in the computed right invariant subspace is
-*
-* EPS * norm(T) / SEP
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrsna.f b/SRC/ctrsna.f
index 988ed573..bf509b04 100644
--- a/SRC/ctrsna.f
+++ b/SRC/ctrsna.f
@@ -1,13 +1,252 @@
+*> \brief \b CTRSNA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+* LDVR, S, SEP, MM, M, WORK, LDWORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, JOB
+* INTEGER INFO, LDT, LDVL, LDVR, LDWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* REAL RWORK( * ), S( * ), SEP( * )
+* COMPLEX T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRSNA estimates reciprocal condition numbers for specified
+*> eigenvalues and/or right eigenvectors of a complex upper triangular
+*> matrix T (or of any matrix Q*T*Q**H with Q unitary).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for
+*> eigenvalues (S) or eigenvectors (SEP):
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for eigenvectors only (SEP);
+*> = 'B': for both eigenvalues and eigenvectors (S and SEP).
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute condition numbers for all eigenpairs;
+*> = 'S': compute condition numbers for selected eigenpairs
+*> specified by the array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenpairs for which
+*> condition numbers are required. To select condition numbers
+*> for the j-th eigenpair, SELECT(j) must be set to .TRUE..
+*> If HOWMNY = 'A', SELECT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT,N)
+*> The upper triangular matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,M)
+*> If JOB = 'E' or 'B', VL must contain left eigenvectors of T
+*> (or of any Q*T*Q**H with Q unitary), corresponding to the
+*> eigenpairs specified by HOWMNY and SELECT. The eigenvectors
+*> must be stored in consecutive columns of VL, as returned by
+*> CHSEIN or CTREVC.
+*> If JOB = 'V', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL.
+*> LDVL >= 1; and if JOB = 'E' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,M)
+*> If JOB = 'E' or 'B', VR must contain right eigenvectors of T
+*> (or of any Q*T*Q**H with Q unitary), corresponding to the
+*> eigenpairs specified by HOWMNY and SELECT. The eigenvectors
+*> must be stored in consecutive columns of VR, as returned by
+*> CHSEIN or CTREVC.
+*> If JOB = 'V', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR.
+*> LDVR >= 1; and if JOB = 'E' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (MM)
+*> If JOB = 'E' or 'B', the reciprocal condition numbers of the
+*> selected eigenvalues, stored in consecutive elements of the
+*> array. Thus S(j), SEP(j), and the j-th columns of VL and VR
+*> all correspond to the same eigenpair (but not in general the
+*> j-th eigenpair, unless all eigenpairs are selected).
+*> If JOB = 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is REAL array, dimension (MM)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the selected eigenvectors, stored in consecutive
+*> elements of the array.
+*> If JOB = 'E', SEP is not referenced.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of elements in the arrays S (if JOB = 'E' or 'B')
+*> and/or SEP (if JOB = 'V' or 'B'). MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of elements of the arrays S and/or SEP actually
+*> used to store the estimated condition numbers.
+*> If HOWMNY = 'A', M is set to N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK,N+6)
+*> If JOB = 'E', WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK.
+*> LDWORK >= 1; and if JOB = 'V' or 'B', LDWORK >= N.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> If JOB = 'E', RWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The reciprocal of the condition number of an eigenvalue lambda is
+*> defined as
+*>
+*> S(lambda) = |v**H*u| / (norm(u)*norm(v))
+*>
+*> where u and v are the right and left eigenvectors of T corresponding
+*> to lambda; v**H denotes the conjugate transpose of v, and norm(u)
+*> denotes the Euclidean norm. These reciprocal condition numbers always
+*> lie between zero (very badly conditioned) and one (very well
+*> conditioned). If n = 1, S(lambda) is defined to be 1.
+*>
+*> An approximate error bound for a computed eigenvalue W(i) is given by
+*>
+*> EPS * norm(T) / S(i)
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal of the condition number of the right eigenvector u
+*> corresponding to lambda is defined as follows. Suppose
+*>
+*> T = ( lambda c )
+*> ( 0 T22 )
+*>
+*> Then the reciprocal condition number is
+*>
+*> SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
+*>
+*> where sigma-min denotes the smallest singular value. We approximate
+*> the smallest singular value by the reciprocal of an estimate of the
+*> one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is
+*> defined to be abs(T(1,1)).
+*>
+*> An approximate error bound for a computed right eigenvector VR(i)
+*> is given by
+*>
+*> EPS * norm(T) / SEP(i)
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
$ LDVR, S, SEP, MM, M, WORK, LDWORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call CLACN2 in place of CLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, JOB
@@ -20,144 +259,6 @@
$ WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRSNA estimates reciprocal condition numbers for specified
-* eigenvalues and/or right eigenvectors of a complex upper triangular
-* matrix T (or of any matrix Q*T*Q**H with Q unitary).
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for
-* eigenvalues (S) or eigenvectors (SEP):
-* = 'E': for eigenvalues only (S);
-* = 'V': for eigenvectors only (SEP);
-* = 'B': for both eigenvalues and eigenvectors (S and SEP).
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute condition numbers for all eigenpairs;
-* = 'S': compute condition numbers for selected eigenpairs
-* specified by the array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenpairs for which
-* condition numbers are required. To select condition numbers
-* for the j-th eigenpair, SELECT(j) must be set to .TRUE..
-* If HOWMNY = 'A', SELECT is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input) COMPLEX array, dimension (LDT,N)
-* The upper triangular matrix T.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* VL (input) COMPLEX array, dimension (LDVL,M)
-* If JOB = 'E' or 'B', VL must contain left eigenvectors of T
-* (or of any Q*T*Q**H with Q unitary), corresponding to the
-* eigenpairs specified by HOWMNY and SELECT. The eigenvectors
-* must be stored in consecutive columns of VL, as returned by
-* CHSEIN or CTREVC.
-* If JOB = 'V', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL.
-* LDVL >= 1; and if JOB = 'E' or 'B', LDVL >= N.
-*
-* VR (input) COMPLEX array, dimension (LDVR,M)
-* If JOB = 'E' or 'B', VR must contain right eigenvectors of T
-* (or of any Q*T*Q**H with Q unitary), corresponding to the
-* eigenpairs specified by HOWMNY and SELECT. The eigenvectors
-* must be stored in consecutive columns of VR, as returned by
-* CHSEIN or CTREVC.
-* If JOB = 'V', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR.
-* LDVR >= 1; and if JOB = 'E' or 'B', LDVR >= N.
-*
-* S (output) REAL array, dimension (MM)
-* If JOB = 'E' or 'B', the reciprocal condition numbers of the
-* selected eigenvalues, stored in consecutive elements of the
-* array. Thus S(j), SEP(j), and the j-th columns of VL and VR
-* all correspond to the same eigenpair (but not in general the
-* j-th eigenpair, unless all eigenpairs are selected).
-* If JOB = 'V', S is not referenced.
-*
-* SEP (output) REAL array, dimension (MM)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the selected eigenvectors, stored in consecutive
-* elements of the array.
-* If JOB = 'E', SEP is not referenced.
-*
-* MM (input) INTEGER
-* The number of elements in the arrays S (if JOB = 'E' or 'B')
-* and/or SEP (if JOB = 'V' or 'B'). MM >= M.
-*
-* M (output) INTEGER
-* The number of elements of the arrays S and/or SEP actually
-* used to store the estimated condition numbers.
-* If HOWMNY = 'A', M is set to N.
-*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,N+6)
-* If JOB = 'E', WORK is not referenced.
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* LDWORK >= 1; and if JOB = 'V' or 'B', LDWORK >= N.
-*
-* RWORK (workspace) REAL array, dimension (N)
-* If JOB = 'E', RWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The reciprocal of the condition number of an eigenvalue lambda is
-* defined as
-*
-* S(lambda) = |v**H*u| / (norm(u)*norm(v))
-*
-* where u and v are the right and left eigenvectors of T corresponding
-* to lambda; v**H denotes the conjugate transpose of v, and norm(u)
-* denotes the Euclidean norm. These reciprocal condition numbers always
-* lie between zero (very badly conditioned) and one (very well
-* conditioned). If n = 1, S(lambda) is defined to be 1.
-*
-* An approximate error bound for a computed eigenvalue W(i) is given by
-*
-* EPS * norm(T) / S(i)
-*
-* where EPS is the machine precision.
-*
-* The reciprocal of the condition number of the right eigenvector u
-* corresponding to lambda is defined as follows. Suppose
-*
-* T = ( lambda c )
-* ( 0 T22 )
-*
-* Then the reciprocal condition number is
-*
-* SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
-*
-* where sigma-min denotes the smallest singular value. We approximate
-* the smallest singular value by the reciprocal of an estimate of the
-* one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is
-* defined to be abs(T(1,1)).
-*
-* An approximate error bound for a computed right eigenvector VR(i)
-* is given by
-*
-* EPS * norm(T) / SEP(i)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrsyl.f b/SRC/ctrsyl.f
index d800cf5d..5637b31c 100644
--- a/SRC/ctrsyl.f
+++ b/SRC/ctrsyl.f
@@ -1,10 +1,158 @@
+*> \brief \b CTRSYL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
+* LDC, SCALE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANA, TRANB
+* INTEGER INFO, ISGN, LDA, LDB, LDC, M, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), C( LDC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRSYL solves the complex Sylvester matrix equation:
+*>
+*> op(A)*X + X*op(B) = scale*C or
+*> op(A)*X - X*op(B) = scale*C,
+*>
+*> where op(A) = A or A**H, and A and B are both upper triangular. A is
+*> M-by-M and B is N-by-N; the right hand side C and the solution X are
+*> M-by-N; and scale is an output scale factor, set <= 1 to avoid
+*> overflow in X.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANA
+*> \verbatim
+*> TRANA is CHARACTER*1
+*> Specifies the option op(A):
+*> = 'N': op(A) = A (No transpose)
+*> = 'C': op(A) = A**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANB
+*> \verbatim
+*> TRANB is CHARACTER*1
+*> Specifies the option op(B):
+*> = 'N': op(B) = B (No transpose)
+*> = 'C': op(B) = B**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] ISGN
+*> \verbatim
+*> ISGN is INTEGER
+*> Specifies the sign in the equation:
+*> = +1: solve op(A)*X + X*op(B) = scale*C
+*> = -1: solve op(A)*X - X*op(B) = scale*C
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the matrix A, and the number of rows in the
+*> matrices X and C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B, and the number of columns in the
+*> matrices X and C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,M)
+*> The upper triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> The upper triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N right hand side matrix C.
+*> On exit, C is overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M)
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scale factor, scale, set <= 1 to avoid overflow in X.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1: A and B have common or very close eigenvalues; perturbed
+*> values were used to solve the equation (but the matrices
+*> A and B are unchanged).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexSYcomputational
+*
+* =====================================================================
SUBROUTINE CTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
$ LDC, SCALE, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANA, TRANB
@@ -15,74 +163,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), C( LDC, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRSYL solves the complex Sylvester matrix equation:
-*
-* op(A)*X + X*op(B) = scale*C or
-* op(A)*X - X*op(B) = scale*C,
-*
-* where op(A) = A or A**H, and A and B are both upper triangular. A is
-* M-by-M and B is N-by-N; the right hand side C and the solution X are
-* M-by-N; and scale is an output scale factor, set <= 1 to avoid
-* overflow in X.
-*
-* Arguments
-* =========
-*
-* TRANA (input) CHARACTER*1
-* Specifies the option op(A):
-* = 'N': op(A) = A (No transpose)
-* = 'C': op(A) = A**H (Conjugate transpose)
-*
-* TRANB (input) CHARACTER*1
-* Specifies the option op(B):
-* = 'N': op(B) = B (No transpose)
-* = 'C': op(B) = B**H (Conjugate transpose)
-*
-* ISGN (input) INTEGER
-* Specifies the sign in the equation:
-* = +1: solve op(A)*X + X*op(B) = scale*C
-* = -1: solve op(A)*X - X*op(B) = scale*C
-*
-* M (input) INTEGER
-* The order of the matrix A, and the number of rows in the
-* matrices X and C. M >= 0.
-*
-* N (input) INTEGER
-* The order of the matrix B, and the number of columns in the
-* matrices X and C. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,M)
-* The upper triangular matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input) COMPLEX array, dimension (LDB,N)
-* The upper triangular matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N right hand side matrix C.
-* On exit, C is overwritten by the solution matrix X.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M)
-*
-* SCALE (output) REAL
-* The scale factor, scale, set <= 1 to avoid overflow in X.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1: A and B have common or very close eigenvalues; perturbed
-* values were used to solve the equation (but the matrices
-* A and B are unchanged).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrti2.f b/SRC/ctrti2.f
index eb343f2c..f74e1aac 100644
--- a/SRC/ctrti2.f
+++ b/SRC/ctrti2.f
@@ -1,9 +1,112 @@
+*> \brief \b CTRTI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRTI2( UPLO, DIAG, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRTI2 computes the inverse of a complex upper or lower triangular
+*> matrix.
+*>
+*> This is the Level 2 BLAS version of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading n by n upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced. If DIAG = 'U', the
+*> diagonal elements of A are also not referenced and are
+*> assumed to be 1.
+*> \endverbatim
+*> \verbatim
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTRTI2( UPLO, DIAG, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,51 +116,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRTI2 computes the inverse of a complex upper or lower triangular
-* matrix.
-*
-* This is the Level 2 BLAS version of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading n by n upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced. If DIAG = 'U', the
-* diagonal elements of A are also not referenced and are
-* assumed to be 1.
-*
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrtri.f b/SRC/ctrtri.f
index aaf4171c..7ce08af4 100644
--- a/SRC/ctrtri.f
+++ b/SRC/ctrtri.f
@@ -1,9 +1,110 @@
+*> \brief \b CTRTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRTRI( UPLO, DIAG, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRTRI computes the inverse of a complex upper or lower triangular
+*> matrix A.
+*>
+*> This is the Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced. If DIAG = 'U', the
+*> diagonal elements of A are also not referenced and are
+*> assumed to be 1.
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTRTRI( UPLO, DIAG, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,50 +114,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRTRI computes the inverse of a complex upper or lower triangular
-* matrix A.
-*
-* This is the Level 3 BLAS version of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced. If DIAG = 'U', the
-* diagonal elements of A are also not referenced and are
-* assumed to be 1.
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrtrs.f b/SRC/ctrtrs.f
index a343eebb..98f0b919 100644
--- a/SRC/ctrtrs.f
+++ b/SRC/ctrtrs.f
@@ -1,10 +1,141 @@
+*> \brief \b CTRTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRTRS solves a triangular system of the form
+*>
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*>
+*> where A is a triangular matrix of order N, and B is an N-by-NRHS
+*> matrix. A check is made to verify that A is nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the solutions
+*> X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,67 +145,6 @@
COMPLEX A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRTRS solves a triangular system of the form
-*
-* A * X = B, A**T * X = B, or A**H * X = B,
-*
-* where A is a triangular matrix of order N, and B is an N-by-NRHS
-* matrix. A check is made to verify that A is nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the solutions
-* X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctrttf.f b/SRC/ctrttf.f
index b5e4ba88..f941aaba 100644
--- a/SRC/ctrttf.f
+++ b/SRC/ctrttf.f
@@ -1,165 +1,227 @@
- SUBROUTINE CTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX A( 0: LDA-1, 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b CTRTTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* CTRTTF copies a triangular matrix A from standard full format (TR)
-* to rectangular full packed format (TF) .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRTTF copies a triangular matrix A from standard full format (TR)
+*> to rectangular full packed format (TF) .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF in Normal mode is wanted;
-* = 'C': ARF in Conjugate Transpose mode is wanted;
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF in Normal mode is wanted;
+*> = 'C': ARF in Conjugate Transpose mode is wanted;
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the matrix A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension ( LDA, N )
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the matrix A. LDA >= max(1,N).
+*> \date November 2011
*
-* ARF (output) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctrttp.f b/SRC/ctrttp.f
index 6700a8fb..b27eb0e0 100644
--- a/SRC/ctrttp.f
+++ b/SRC/ctrttp.f
@@ -1,12 +1,105 @@
- SUBROUTINE CTRTTP( UPLO, N, A, LDA, AP, INFO )
+*> \brief \b CTRTTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRTTP( UPLO, N, A, LDA, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRTTP copies a triangular matrix A from full format (TR) to standard
+*> packed format (TP).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices AP and A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* -- LAPACK routine (version 3.3.0) --
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- and Julien Langou of the Univ. of Colorado Denver --
-* November 2010
+*> \ingroup complexOTHERcomputational
*
+* =====================================================================
+ SUBROUTINE CTRTTP( UPLO, N, A, LDA, AP, INFO )
+*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,45 +109,6 @@
COMPLEX A( LDA, * ), AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CTRTTP copies a triangular matrix A from full format (TR) to standard
-* packed format (TP).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrices AP and A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AP (output) COMPLEX array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ctzrqf.f b/SRC/ctzrqf.f
index 5b8ed7b2..f2562a90 100644
--- a/SRC/ctzrqf.f
+++ b/SRC/ctzrqf.f
@@ -1,87 +1,148 @@
- SUBROUTINE CTZRQF( M, N, A, LDA, TAU, INFO )
+*> \brief \b CTZRQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CTZRQF( M, N, A, LDA, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine CTZRZF.
-*
-* CTZRQF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
-* to upper triangular form by means of unitary transformations.
-*
-* The upper trapezoidal matrix A is factored as
-*
-* A = ( R 0 ) * Z,
-*
-* where Z is an N-by-N unitary matrix and R is an M-by-M upper
-* triangular matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine CTZRZF.
+*>
+*> CTZRQF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
+*> to upper triangular form by means of unitary transformations.
+*>
+*> The upper trapezoidal matrix A is factored as
+*>
+*> A = ( R 0 ) * Z,
+*>
+*> where Z is an N-by-N unitary matrix and R is an M-by-M upper
+*> triangular matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements M+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> unitary matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements M+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* unitary matrix Z as a product of M elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAU (output) COMPLEX array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), whose conjugate transpose is used to
+*> introduce zeros into the (m - k + 1)th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an ( n - m ) element vector.
+*> tau and z( k ) are chosen to annihilate the elements of the kth row
+*> of X.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A, such that the elements of z( k ) are
+*> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTZRQF( M, N, A, LDA, TAU, INFO )
*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), whose conjugate transpose is used to
-* introduce zeros into the (m - k + 1)th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an ( n - m ) element vector.
-* tau and z( k ) are chosen to annihilate the elements of the kth row
-* of X.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A, such that the elements of z( k ) are
-* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ctzrzf.f b/SRC/ctzrzf.f
index 374a7972..48822829 100644
--- a/SRC/ctzrzf.f
+++ b/SRC/ctzrzf.f
@@ -1,102 +1,169 @@
- SUBROUTINE CTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CTZRZF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated c
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CTZRZF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
-* to upper triangular form by means of unitary transformations.
-*
-* The upper trapezoidal matrix A is factored as
-*
-* A = ( R 0 ) * Z,
-*
-* where Z is an N-by-N unitary matrix and R is an M-by-M upper
-* triangular matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTZRZF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
+*> to upper triangular form by means of unitary transformations.
+*>
+*> The upper trapezoidal matrix A is factored as
+*>
+*> A = ( R 0 ) * Z,
+*>
+*> where Z is an N-by-N unitary matrix and R is an M-by-M upper
+*> triangular matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements M+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* unitary matrix Z as a product of M elementary reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements M+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> unitary matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an ( n - m ) element vector.
+*> tau and z( k ) are chosen to annihilate the elements of the kth row
+*> of X.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A, such that the elements of z( k ) are
+*> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an ( n - m ) element vector.
-* tau and z( k ) are chosen to annihilate the elements of the kth row
-* of X.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A, such that the elements of z( k ) are
-* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunbdb.f b/SRC/cunbdb.f
index b14a4d4a..7707953b 100644
--- a/SRC/cunbdb.f
+++ b/SRC/cunbdb.f
@@ -1,15 +1,291 @@
+*> \brief \b CUNBDB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
+* X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
+* TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIGNS, TRANS
+* INTEGER INFO, LDX11, LDX12, LDX21, LDX22, LWORK, M, P,
+* $ Q
+* ..
+* .. Array Arguments ..
+* REAL PHI( * ), THETA( * )
+* COMPLEX TAUP1( * ), TAUP2( * ), TAUQ1( * ), TAUQ2( * ),
+* $ WORK( * ), X11( LDX11, * ), X12( LDX12, * ),
+* $ X21( LDX21, * ), X22( LDX22, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNBDB simultaneously bidiagonalizes the blocks of an M-by-M
+*> partitioned unitary matrix X:
+*>
+*> [ B11 | B12 0 0 ]
+*> [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**H
+*> X = [-----------] = [---------] [----------------] [---------] .
+*> [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
+*> [ 0 | 0 0 I ]
+*>
+*> X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
+*> not the case, then X must be transposed and/or permuted. This can be
+*> done in constant time using the TRANS and SIGNS options. See CUNCSD
+*> for details.)
+*>
+*> The unitary matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
+*> (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
+*> represented implicitly by Householder vectors.
+*>
+*> B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
+*> implicitly by angles THETA, PHI.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] SIGNS
+*> \verbatim
+*> SIGNS is CHARACTER
+*> = 'O': The lower-left block is made nonpositive (the
+*> "other" convention);
+*> otherwise: The upper-right block is made nonpositive (the
+*> "default" convention).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in X11 and X12. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in X11 and X21. 0 <= Q <=
+*> MIN(P,M-P,M-Q).
+*> \endverbatim
+*>
+*> \param[in,out] X11
+*> \verbatim
+*> X11 is COMPLEX array, dimension (LDX11,Q)
+*> On entry, the top-left block of the unitary matrix to be
+*> reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the columns of tril(X11) specify reflectors for P1,
+*> the rows of triu(X11,1) specify reflectors for Q1;
+*> else TRANS = 'T', and
+*> the rows of triu(X11) specify reflectors for P1,
+*> the columns of tril(X11,-1) specify reflectors for Q1.
+*> \endverbatim
+*>
+*> \param[in] LDX11
+*> \verbatim
+*> LDX11 is INTEGER
+*> The leading dimension of X11. If TRANS = 'N', then LDX11 >=
+*> P; else LDX11 >= Q.
+*> \endverbatim
+*>
+*> \param[in,out] X12
+*> \verbatim
+*> X12 is CMPLX array, dimension (LDX12,M-Q)
+*> On entry, the top-right block of the unitary matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the rows of triu(X12) specify the first P reflectors for
+*> Q2;
+*> else TRANS = 'T', and
+*> the columns of tril(X12) specify the first P reflectors
+*> for Q2.
+*> \endverbatim
+*>
+*> \param[in] LDX12
+*> \verbatim
+*> LDX12 is INTEGER
+*> The leading dimension of X12. If TRANS = 'N', then LDX12 >=
+*> P; else LDX11 >= M-Q.
+*> \endverbatim
+*>
+*> \param[in,out] X21
+*> \verbatim
+*> X21 is COMPLEX array, dimension (LDX21,Q)
+*> On entry, the bottom-left block of the unitary matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the columns of tril(X21) specify reflectors for P2;
+*> else TRANS = 'T', and
+*> the rows of triu(X21) specify reflectors for P2.
+*> \endverbatim
+*>
+*> \param[in] LDX21
+*> \verbatim
+*> LDX21 is INTEGER
+*> The leading dimension of X21. If TRANS = 'N', then LDX21 >=
+*> M-P; else LDX21 >= Q.
+*> \endverbatim
+*>
+*> \param[in,out] X22
+*> \verbatim
+*> X22 is COMPLEX array, dimension (LDX22,M-Q)
+*> On entry, the bottom-right block of the unitary matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
+*> M-P-Q reflectors for Q2,
+*> else TRANS = 'T', and
+*> the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
+*> M-P-Q reflectors for P2.
+*> \endverbatim
+*>
+*> \param[in] LDX22
+*> \verbatim
+*> LDX22 is INTEGER
+*> The leading dimension of X22. If TRANS = 'N', then LDX22 >=
+*> M-P; else LDX22 >= M-Q.
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension (Q)
+*> The entries of the bidiagonal blocks B11, B12, B21, B22 can
+*> be computed from the angles THETA and PHI. See Further
+*> Details.
+*> \endverbatim
+*>
+*> \param[out] PHI
+*> \verbatim
+*> PHI is REAL array, dimension (Q-1)
+*> The entries of the bidiagonal blocks B11, B12, B21, B22 can
+*> be computed from the angles THETA and PHI. See Further
+*> Details.
+*> \endverbatim
+*>
+*> \param[out] TAUP1
+*> \verbatim
+*> TAUP1 is COMPLEX array, dimension (P)
+*> The scalar factors of the elementary reflectors that define
+*> P1.
+*> \endverbatim
+*>
+*> \param[out] TAUP2
+*> \verbatim
+*> TAUP2 is COMPLEX array, dimension (M-P)
+*> The scalar factors of the elementary reflectors that define
+*> P2.
+*> \endverbatim
+*>
+*> \param[out] TAUQ1
+*> \verbatim
+*> TAUQ1 is COMPLEX array, dimension (Q)
+*> The scalar factors of the elementary reflectors that define
+*> Q1.
+*> \endverbatim
+*>
+*> \param[out] TAUQ2
+*> \verbatim
+*> TAUQ2 is COMPLEX array, dimension (M-Q)
+*> The scalar factors of the elementary reflectors that define
+*> Q2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= M-Q.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The bidiagonal blocks B11, B12, B21, and B22 are represented
+*> implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
+*> PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
+*> lower bidiagonal. Every entry in each bidiagonal band is a product
+*> of a sine or cosine of a THETA with a sine or cosine of a PHI. See
+*> [1] or CUNCSD for details.
+*>
+*> P1, P2, Q1, and Q2 are represented as products of elementary
+*> reflectors. See CUNCSD for details on generating P1, P2, Q1, and Q2
+*> using CUNGQR and CUNGLQ.
+*>
+*> Reference
+*> =========
+*>
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE CUNBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
$ X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
$ TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine ((version 3.3.0)) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine ((version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIGNS, TRANS
@@ -23,169 +299,6 @@
$ X21( LDX21, * ), X22( LDX22, * )
* ..
*
-* Purpose
-* =======
-*
-* CUNBDB simultaneously bidiagonalizes the blocks of an M-by-M
-* partitioned unitary matrix X:
-*
-* [ B11 | B12 0 0 ]
-* [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**H
-* X = [-----------] = [---------] [----------------] [---------] .
-* [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
-* [ 0 | 0 0 I ]
-*
-* X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
-* not the case, then X must be transposed and/or permuted. This can be
-* done in constant time using the TRANS and SIGNS options. See CUNCSD
-* for details.)
-*
-* The unitary matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
-* (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
-* represented implicitly by Householder vectors.
-*
-* B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
-* implicitly by angles THETA, PHI.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* SIGNS (input) CHARACTER
-* = 'O': The lower-left block is made nonpositive (the
-* "other" convention);
-* otherwise: The upper-right block is made nonpositive (the
-* "default" convention).
-*
-* M (input) INTEGER
-* The number of rows and columns in X.
-*
-* P (input) INTEGER
-* The number of rows in X11 and X12. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in X11 and X21. 0 <= Q <=
-* MIN(P,M-P,M-Q).
-*
-* X11 (input/output) COMPLEX array, dimension (LDX11,Q)
-* On entry, the top-left block of the unitary matrix to be
-* reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the columns of tril(X11) specify reflectors for P1,
-* the rows of triu(X11,1) specify reflectors for Q1;
-* else TRANS = 'T', and
-* the rows of triu(X11) specify reflectors for P1,
-* the columns of tril(X11,-1) specify reflectors for Q1.
-*
-* LDX11 (input) INTEGER
-* The leading dimension of X11. If TRANS = 'N', then LDX11 >=
-* P; else LDX11 >= Q.
-*
-* X12 (input/output) CMPLX array, dimension (LDX12,M-Q)
-* On entry, the top-right block of the unitary matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the rows of triu(X12) specify the first P reflectors for
-* Q2;
-* else TRANS = 'T', and
-* the columns of tril(X12) specify the first P reflectors
-* for Q2.
-*
-* LDX12 (input) INTEGER
-* The leading dimension of X12. If TRANS = 'N', then LDX12 >=
-* P; else LDX11 >= M-Q.
-*
-* X21 (input/output) COMPLEX array, dimension (LDX21,Q)
-* On entry, the bottom-left block of the unitary matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the columns of tril(X21) specify reflectors for P2;
-* else TRANS = 'T', and
-* the rows of triu(X21) specify reflectors for P2.
-*
-* LDX21 (input) INTEGER
-* The leading dimension of X21. If TRANS = 'N', then LDX21 >=
-* M-P; else LDX21 >= Q.
-*
-* X22 (input/output) COMPLEX array, dimension (LDX22,M-Q)
-* On entry, the bottom-right block of the unitary matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
-* M-P-Q reflectors for Q2,
-* else TRANS = 'T', and
-* the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
-* M-P-Q reflectors for P2.
-*
-* LDX22 (input) INTEGER
-* The leading dimension of X22. If TRANS = 'N', then LDX22 >=
-* M-P; else LDX22 >= M-Q.
-*
-* THETA (output) REAL array, dimension (Q)
-* The entries of the bidiagonal blocks B11, B12, B21, B22 can
-* be computed from the angles THETA and PHI. See Further
-* Details.
-*
-* PHI (output) REAL array, dimension (Q-1)
-* The entries of the bidiagonal blocks B11, B12, B21, B22 can
-* be computed from the angles THETA and PHI. See Further
-* Details.
-*
-* TAUP1 (output) COMPLEX array, dimension (P)
-* The scalar factors of the elementary reflectors that define
-* P1.
-*
-* TAUP2 (output) COMPLEX array, dimension (M-P)
-* The scalar factors of the elementary reflectors that define
-* P2.
-*
-* TAUQ1 (output) COMPLEX array, dimension (Q)
-* The scalar factors of the elementary reflectors that define
-* Q1.
-*
-* TAUQ2 (output) COMPLEX array, dimension (M-Q)
-* The scalar factors of the elementary reflectors that define
-* Q2.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= M-Q.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* The bidiagonal blocks B11, B12, B21, and B22 are represented
-* implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
-* PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
-* lower bidiagonal. Every entry in each bidiagonal band is a product
-* of a sine or cosine of a THETA with a sine or cosine of a PHI. See
-* [1] or CUNCSD for details.
-*
-* P1, P2, Q1, and Q2 are represented as products of elementary
-* reflectors. See CUNCSD for details on generating P1, P2, Q1, and Q2
-* using CUNGQR and CUNGLQ.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/cuncsd.f b/SRC/cuncsd.f
index 808daa2d..5d3a883c 100644
--- a/SRC/cuncsd.f
+++ b/SRC/cuncsd.f
@@ -1,20 +1,289 @@
+*> \brief \b CUNCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* RECURSIVE SUBROUTINE CUNCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS,
+* SIGNS, M, P, Q, X11, LDX11, X12,
+* LDX12, X21, LDX21, X22, LDX22, THETA,
+* U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
+* LDV2T, WORK, LWORK, RWORK, LRWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
+* INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LDX11, LDX12,
+* $ LDX21, LDX22, LRWORK, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL THETA( * )
+* REAL RWORK( * )
+* COMPLEX U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * ), WORK( * ), X11( LDX11, * ),
+* $ X12( LDX12, * ), X21( LDX21, * ), X22( LDX22,
+* $ * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNCSD computes the CS decomposition of an M-by-M partitioned
+*> unitary matrix X:
+*>
+*> [ I 0 0 | 0 0 0 ]
+*> [ 0 C 0 | 0 -S 0 ]
+*> [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**H
+*> X = [-----------] = [---------] [---------------------] [---------] .
+*> [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
+*> [ 0 S 0 | 0 C 0 ]
+*> [ 0 0 I | 0 0 0 ]
+*>
+*> X11 is P-by-Q. The unitary matrices U1, U2, V1, and V2 are P-by-P,
+*> (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
+*> R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
+*> which R = MIN(P,M-P,Q,M-Q).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU1
+*> \verbatim
+*> JOBU1 is CHARACTER
+*> = 'Y': U1 is computed;
+*> otherwise: U1 is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBU2
+*> \verbatim
+*> JOBU2 is CHARACTER
+*> = 'Y': U2 is computed;
+*> otherwise: U2 is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV1T
+*> \verbatim
+*> JOBV1T is CHARACTER
+*> = 'Y': V1T is computed;
+*> otherwise: V1T is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV2T
+*> \verbatim
+*> JOBV2T is CHARACTER
+*> = 'Y': V2T is computed;
+*> otherwise: V2T is not computed.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] SIGNS
+*> \verbatim
+*> SIGNS is CHARACTER
+*> = 'O': The lower-left block is made nonpositive (the
+*> "other" convention);
+*> otherwise: The upper-right block is made nonpositive (the
+*> "default" convention).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in X11 and X12. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in X11 and X21. 0 <= Q <= M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,M)
+*> On entry, the unitary matrix whose CSD is desired.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X. LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension (R), in which R =
+*> MIN(P,M-P,Q,M-Q).
+*> C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
+*> S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is COMPLEX array, dimension (P)
+*> If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1.
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
+*> MAX(1,P).
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is COMPLEX array, dimension (M-P)
+*> If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary
+*> matrix U2.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
+*> MAX(1,M-P).
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is COMPLEX array, dimension (Q)
+*> If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary
+*> matrix V1**H.
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
+*> MAX(1,Q).
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is COMPLEX array, dimension (M-Q)
+*> If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary
+*> matrix V2**H.
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
+*> MAX(1,M-Q).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the work array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension MAX(1,LRWORK)
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> If INFO > 0 on exit, RWORK(2:R) contains the values PHI(1),
+*> ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
+*> define the matrix in intermediate bidiagonal-block form
+*> remaining after nonconvergence. INFO specifies the number
+*> of nonzero PHI's.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the RWORK array, returns
+*> this value as the first entry of the work array, and no error
+*> message related to LRWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M-MIN(P,M-P,Q,M-Q))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: CBBCSD did not converge. See the description of RWORK
+*> above for details.
+*> \endverbatim
+*> \verbatim
+*> Reference
+*> =========
+*> \endverbatim
+*> \verbatim
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
RECURSIVE SUBROUTINE CUNCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS,
$ SIGNS, M, P, Q, X11, LDX11, X12,
$ LDX12, X21, LDX21, X22, LDX22, THETA,
$ U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
$ LDV2T, WORK, LWORK, RWORK, LRWORK,
$ IWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* @generated c
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
@@ -31,148 +300,6 @@
$ * )
* ..
*
-* Purpose
-* =======
-*
-* CUNCSD computes the CS decomposition of an M-by-M partitioned
-* unitary matrix X:
-*
-* [ I 0 0 | 0 0 0 ]
-* [ 0 C 0 | 0 -S 0 ]
-* [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**H
-* X = [-----------] = [---------] [---------------------] [---------] .
-* [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
-* [ 0 S 0 | 0 C 0 ]
-* [ 0 0 I | 0 0 0 ]
-*
-* X11 is P-by-Q. The unitary matrices U1, U2, V1, and V2 are P-by-P,
-* (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
-* R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
-* which R = MIN(P,M-P,Q,M-Q).
-*
-* Arguments
-* =========
-*
-* JOBU1 (input) CHARACTER
-* = 'Y': U1 is computed;
-* otherwise: U1 is not computed.
-*
-* JOBU2 (input) CHARACTER
-* = 'Y': U2 is computed;
-* otherwise: U2 is not computed.
-*
-* JOBV1T (input) CHARACTER
-* = 'Y': V1T is computed;
-* otherwise: V1T is not computed.
-*
-* JOBV2T (input) CHARACTER
-* = 'Y': V2T is computed;
-* otherwise: V2T is not computed.
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* SIGNS (input) CHARACTER
-* = 'O': The lower-left block is made nonpositive (the
-* "other" convention);
-* otherwise: The upper-right block is made nonpositive (the
-* "default" convention).
-*
-* M (input) INTEGER
-* The number of rows and columns in X.
-*
-* P (input) INTEGER
-* The number of rows in X11 and X12. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in X11 and X21. 0 <= Q <= M.
-*
-* X (input/workspace) COMPLEX array, dimension (LDX,M)
-* On entry, the unitary matrix whose CSD is desired.
-*
-* LDX (input) INTEGER
-* The leading dimension of X. LDX >= MAX(1,M).
-*
-* THETA (output) REAL array, dimension (R), in which R =
-* MIN(P,M-P,Q,M-Q).
-* C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
-* S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
-*
-* U1 (output) COMPLEX array, dimension (P)
-* If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1.
-*
-* LDU1 (input) INTEGER
-* The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
-* MAX(1,P).
-*
-* U2 (output) COMPLEX array, dimension (M-P)
-* If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary
-* matrix U2.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
-* MAX(1,M-P).
-*
-* V1T (output) COMPLEX array, dimension (Q)
-* If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary
-* matrix V1**H.
-*
-* LDV1T (input) INTEGER
-* The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
-* MAX(1,Q).
-*
-* V2T (output) COMPLEX array, dimension (M-Q)
-* If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary
-* matrix V2**H.
-*
-* LDV2T (input) INTEGER
-* The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
-* MAX(1,M-Q).
-*
-* WORK (workspace) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the work array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension MAX(1,LRWORK)
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-* If INFO > 0 on exit, RWORK(2:R) contains the values PHI(1),
-* ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
-* define the matrix in intermediate bidiagonal-block form
-* remaining after nonconvergence. INFO specifies the number
-* of nonzero PHI's.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK.
-*
-* If LRWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the RWORK array, returns
-* this value as the first entry of the work array, and no error
-* message related to LRWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (M-MIN(P,M-P,Q,M-Q))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: CBBCSD did not converge. See the description of RWORK
-* above for details.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/cung2l.f b/SRC/cung2l.f
index c83fbf80..2bc03ad9 100644
--- a/SRC/cung2l.f
+++ b/SRC/cung2l.f
@@ -1,60 +1,122 @@
- SUBROUTINE CUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b CUNG2L
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNG2L generates an m by n complex matrix Q with orthonormal columns,
-* which is defined as the last n columns of a product of k elementary
-* reflectors of order m
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by CGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNG2L generates an m by n complex matrix Q with orthonormal columns,
+*> which is defined as the last n columns of a product of k elementary
+*> reflectors of order m
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by CGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the (n-k+i)-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by CGEQLF in the last k columns of its array
+*> argument A.
+*> On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the (n-k+i)-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by CGEQLF in the last k columns of its array
-* argument A.
-* On exit, the m-by-n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup complexOTHERcomputational
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEQLF.
+* =====================================================================
+ SUBROUTINE CUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (N)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cung2r.f b/SRC/cung2r.f
index e1c39ad7..e013908f 100644
--- a/SRC/cung2r.f
+++ b/SRC/cung2r.f
@@ -1,60 +1,122 @@
- SUBROUTINE CUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b CUNG2R
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNG2R generates an m by n complex matrix Q with orthonormal columns,
-* which is defined as the first n columns of a product of k elementary
-* reflectors of order m
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by CGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNG2R generates an m by n complex matrix Q with orthonormal columns,
+*> which is defined as the first n columns of a product of k elementary
+*> reflectors of order m
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by CGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the i-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by CGEQRF in the first k columns of its array
+*> argument A.
+*> On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the i-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by CGEQRF in the first k columns of its array
-* argument A.
-* On exit, the m by n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup complexOTHERcomputational
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEQRF.
+* =====================================================================
+ SUBROUTINE CUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (N)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cungbr.f b/SRC/cungbr.f
index 5f3e0f6b..67346b74 100644
--- a/SRC/cungbr.f
+++ b/SRC/cungbr.f
@@ -1,9 +1,159 @@
+*> \brief \b CUNGBR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER VECT
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGBR generates one of the complex unitary matrices Q or P**H
+*> determined by CGEBRD when reducing a complex matrix A to bidiagonal
+*> form: A = Q * B * P**H. Q and P**H are defined as products of
+*> elementary reflectors H(i) or G(i) respectively.
+*>
+*> If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
+*> is of order M:
+*> if m >= k, Q = H(1) H(2) . . . H(k) and CUNGBR returns the first n
+*> columns of Q, where m >= n >= k;
+*> if m < k, Q = H(1) H(2) . . . H(m-1) and CUNGBR returns Q as an
+*> M-by-M matrix.
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**H
+*> is of order N:
+*> if k < n, P**H = G(k) . . . G(2) G(1) and CUNGBR returns the first m
+*> rows of P**H, where n >= m >= k;
+*> if k >= n, P**H = G(n-1) . . . G(2) G(1) and CUNGBR returns P**H as
+*> an N-by-N matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> Specifies whether the matrix Q or the matrix P**H is
+*> required, as defined in the transformation applied by CGEBRD:
+*> = 'Q': generate Q;
+*> = 'P': generate P**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q or P**H to be returned.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q or P**H to be returned.
+*> N >= 0.
+*> If VECT = 'Q', M >= N >= min(M,K);
+*> if VECT = 'P', N >= M >= min(N,K).
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> If VECT = 'Q', the number of columns in the original M-by-K
+*> matrix reduced by CGEBRD.
+*> If VECT = 'P', the number of rows in the original K-by-N
+*> matrix reduced by CGEBRD.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by CGEBRD.
+*> On exit, the M-by-N matrix Q or P**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension
+*> (min(M,K)) if VECT = 'Q'
+*> (min(N,K)) if VECT = 'P'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i) or G(i), which determines Q or P**H, as
+*> returned by CGEBRD in its array argument TAUQ or TAUP.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,min(M,N)).
+*> For optimum performance LWORK >= min(M,N)*NB, where NB
+*> is the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexGBcomputational
+*
+* =====================================================================
SUBROUTINE CUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER VECT
@@ -13,86 +163,6 @@
COMPLEX A( LDA, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CUNGBR generates one of the complex unitary matrices Q or P**H
-* determined by CGEBRD when reducing a complex matrix A to bidiagonal
-* form: A = Q * B * P**H. Q and P**H are defined as products of
-* elementary reflectors H(i) or G(i) respectively.
-*
-* If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
-* is of order M:
-* if m >= k, Q = H(1) H(2) . . . H(k) and CUNGBR returns the first n
-* columns of Q, where m >= n >= k;
-* if m < k, Q = H(1) H(2) . . . H(m-1) and CUNGBR returns Q as an
-* M-by-M matrix.
-*
-* If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**H
-* is of order N:
-* if k < n, P**H = G(k) . . . G(2) G(1) and CUNGBR returns the first m
-* rows of P**H, where n >= m >= k;
-* if k >= n, P**H = G(n-1) . . . G(2) G(1) and CUNGBR returns P**H as
-* an N-by-N matrix.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* Specifies whether the matrix Q or the matrix P**H is
-* required, as defined in the transformation applied by CGEBRD:
-* = 'Q': generate Q;
-* = 'P': generate P**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix Q or P**H to be returned.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q or P**H to be returned.
-* N >= 0.
-* If VECT = 'Q', M >= N >= min(M,K);
-* if VECT = 'P', N >= M >= min(N,K).
-*
-* K (input) INTEGER
-* If VECT = 'Q', the number of columns in the original M-by-K
-* matrix reduced by CGEBRD.
-* If VECT = 'P', the number of rows in the original K-by-N
-* matrix reduced by CGEBRD.
-* K >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by CGEBRD.
-* On exit, the M-by-N matrix Q or P**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
-*
-* TAU (input) COMPLEX array, dimension
-* (min(M,K)) if VECT = 'Q'
-* (min(N,K)) if VECT = 'P'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i) or G(i), which determines Q or P**H, as
-* returned by CGEBRD in its array argument TAUQ or TAUP.
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,min(M,N)).
-* For optimum performance LWORK >= min(M,N)*NB, where NB
-* is the optimal blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cunghr.f b/SRC/cunghr.f
index 83012e93..04e81474 100644
--- a/SRC/cunghr.f
+++ b/SRC/cunghr.f
@@ -1,67 +1,133 @@
- SUBROUTINE CUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CUNGHR
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNGHR generates a complex unitary matrix Q which is defined as the
-* product of IHI-ILO elementary reflectors of order N, as returned by
-* CGEHRD:
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGHR generates a complex unitary matrix Q which is defined as the
+*> product of IHI-ILO elementary reflectors of order N, as returned by
+*> CGEHRD:
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI must have the same values as in the previous call
-* of CGEHRD. Q is equal to the unit matrix except in the
-* submatrix Q(ilo+1:ihi,ilo+1:ihi).
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by CGEHRD.
-* On exit, the N-by-N unitary matrix Q.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI must have the same values as in the previous call
+*> of CGEHRD. Q is equal to the unit matrix except in the
+*> submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by CGEHRD.
+*> On exit, the N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEHRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= IHI-ILO.
+*> For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEHRD.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complexOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= IHI-ILO.
-* For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE CUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cungl2.f b/SRC/cungl2.f
index ab59036f..b1375368 100644
--- a/SRC/cungl2.f
+++ b/SRC/cungl2.f
@@ -1,59 +1,121 @@
- SUBROUTINE CUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b CUNGL2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNGL2 generates an m-by-n complex matrix Q with orthonormal rows,
-* which is defined as the first m rows of a product of k elementary
-* reflectors of order n
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H
-*
-* as returned by CGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGL2 generates an m-by-n complex matrix Q with orthonormal rows,
+*> which is defined as the first m rows of a product of k elementary
+*> reflectors of order n
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by CGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the i-th row must contain the vector which defines
+*> the elementary reflector H(i), for i = 1,2,...,k, as returned
+*> by CGELQF in the first k rows of its array argument A.
+*> On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the i-th row must contain the vector which defines
-* the elementary reflector H(i), for i = 1,2,...,k, as returned
-* by CGELQF in the first k rows of its array argument A.
-* On exit, the m by n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup complexOTHERcomputational
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGELQF.
+* =====================================================================
+ SUBROUTINE CUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (M)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunglq.f b/SRC/cunglq.f
index 3e07b4b4..d66a200c 100644
--- a/SRC/cunglq.f
+++ b/SRC/cunglq.f
@@ -1,70 +1,136 @@
- SUBROUTINE CUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CUNGLQ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNGLQ generates an M-by-N complex matrix Q with orthonormal rows,
-* which is defined as the first M rows of a product of K elementary
-* reflectors of order N
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H
-*
-* as returned by CGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGLQ generates an M-by-N complex matrix Q with orthonormal rows,
+*> which is defined as the first M rows of a product of K elementary
+*> reflectors of order N
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by CGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the i-th row must contain the vector which defines
-* the elementary reflector H(i), for i = 1,2,...,k, as returned
-* by CGELQF in the first k rows of its array argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the i-th row must contain the vector which defines
+*> the elementary reflector H(i), for i = 1,2,...,k, as returned
+*> by CGELQF in the first k rows of its array argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit;
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGELQF.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complexOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE CUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit;
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cungql.f b/SRC/cungql.f
index cc1e19d0..5437cba6 100644
--- a/SRC/cungql.f
+++ b/SRC/cungql.f
@@ -1,71 +1,137 @@
- SUBROUTINE CUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CUNGQL
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNGQL generates an M-by-N complex matrix Q with orthonormal columns,
-* which is defined as the last N columns of a product of K elementary
-* reflectors of order M
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by CGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGQL generates an M-by-N complex matrix Q with orthonormal columns,
+*> which is defined as the last N columns of a product of K elementary
+*> reflectors of order M
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by CGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the (n-k+i)-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by CGEQLF in the last k columns of its array
-* argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the (n-k+i)-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by CGEQLF in the last k columns of its array
+*> argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEQLF.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complexOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE CUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cungqr.f b/SRC/cungqr.f
index 1ea9d2cc..f748cf4b 100644
--- a/SRC/cungqr.f
+++ b/SRC/cungqr.f
@@ -1,71 +1,137 @@
- SUBROUTINE CUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CUNGQR
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
-* which is defined as the first N columns of a product of K elementary
-* reflectors of order M
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by CGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
+*> which is defined as the first N columns of a product of K elementary
+*> reflectors of order M
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by CGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the i-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by CGEQRF in the first k columns of its array
-* argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the i-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by CGEQRF in the first k columns of its array
+*> argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEQRF.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complexOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE CUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cungr2.f b/SRC/cungr2.f
index d1e9d502..aaf7048d 100644
--- a/SRC/cungr2.f
+++ b/SRC/cungr2.f
@@ -1,60 +1,122 @@
- SUBROUTINE CUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b CUNGR2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNGR2 generates an m by n complex matrix Q with orthonormal rows,
-* which is defined as the last m rows of a product of k elementary
-* reflectors of order n
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H
-*
-* as returned by CGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGR2 generates an m by n complex matrix Q with orthonormal rows,
+*> which is defined as the last m rows of a product of k elementary
+*> reflectors of order n
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by CGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the (m-k+i)-th row must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by CGERQF in the last k rows of its array argument
+*> A.
+*> On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the (m-k+i)-th row must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by CGERQF in the last k rows of its array argument
-* A.
-* On exit, the m-by-n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup complexOTHERcomputational
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGERQF.
+* =====================================================================
+ SUBROUTINE CUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (M)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cungrq.f b/SRC/cungrq.f
index 470d6f0c..a81004cb 100644
--- a/SRC/cungrq.f
+++ b/SRC/cungrq.f
@@ -1,71 +1,137 @@
- SUBROUTINE CUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b CUNGRQ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNGRQ generates an M-by-N complex matrix Q with orthonormal rows,
-* which is defined as the last M rows of a product of K elementary
-* reflectors of order N
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H
-*
-* as returned by CGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGRQ generates an M-by-N complex matrix Q with orthonormal rows,
+*> which is defined as the last M rows of a product of K elementary
+*> reflectors of order N
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by CGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the (m-k+i)-th row must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by CGERQF in the last k rows of its array argument
-* A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the (m-k+i)-th row must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by CGERQF in the last k rows of its array argument
+*> A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGERQF.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complexOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE CUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cungtr.f b/SRC/cungtr.f
index 9c95024c..294da22f 100644
--- a/SRC/cungtr.f
+++ b/SRC/cungtr.f
@@ -1,69 +1,133 @@
- SUBROUTINE CUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUNGTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNGTR generates a complex unitary matrix Q which is defined as the
-* product of n-1 elementary reflectors of order N, as returned by
-* CHETRD:
-*
-* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNGTR generates a complex unitary matrix Q which is defined as the
+*> product of n-1 elementary reflectors of order N, as returned by
+*> CHETRD:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A contains elementary reflectors
-* from CHETRD;
-* = 'L': Lower triangle of A contains elementary reflectors
-* from CHETRD.
-*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by CHETRD.
-* On exit, the N-by-N unitary matrix Q.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A contains elementary reflectors
+*> from CHETRD;
+*> = 'L': Lower triangle of A contains elementary reflectors
+*> from CHETRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by CHETRD.
+*> On exit, the N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CHETRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= N-1.
+*> For optimum performance LWORK >= (N-1)*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CHETRD.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complexOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= N-1.
-* For optimum performance LWORK >= (N-1)*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE CUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunm2l.f b/SRC/cunm2l.f
index 525c6fe3..04d52c28 100644
--- a/SRC/cunm2l.f
+++ b/SRC/cunm2l.f
@@ -1,92 +1,168 @@
- SUBROUTINE CUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUNM2L
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNM2L overwrites the general complex m-by-n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by CGEQLF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNM2L overwrites the general complex m-by-n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by CGEQLF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGEQLF in the last k columns of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGEQLF in the last k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEQLF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEQLF.
+*> \date November 2011
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complexOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE CUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunm2r.f b/SRC/cunm2r.f
index 41f9ceb6..d44cf479 100644
--- a/SRC/cunm2r.f
+++ b/SRC/cunm2r.f
@@ -1,92 +1,168 @@
- SUBROUTINE CUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUNM2R
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNM2R overwrites the general complex m-by-n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by CGEQRF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNM2R overwrites the general complex m-by-n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by CGEQRF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGEQRF in the first k columns of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGEQRF in the first k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEQRF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEQRF.
+*> \date November 2011
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complexOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE CUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunmbr.f b/SRC/cunmbr.f
index 872cde44..da72ec69 100644
--- a/SRC/cunmbr.f
+++ b/SRC/cunmbr.f
@@ -1,10 +1,199 @@
+*> \brief \b CUNMBR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
+* LDC, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, VECT
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> If VECT = 'Q', CUNMBR overwrites the general complex M-by-N matrix C
+*> with
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> If VECT = 'P', CUNMBR overwrites the general complex M-by-N matrix C
+*> with
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': P * C C * P
+*> TRANS = 'C': P**H * C C * P**H
+*>
+*> Here Q and P**H are the unitary matrices determined by CGEBRD when
+*> reducing a complex matrix A to bidiagonal form: A = Q * B * P**H. Q
+*> and P**H are defined as products of elementary reflectors H(i) and
+*> G(i) respectively.
+*>
+*> Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
+*> order of the unitary matrix Q or P**H that is applied.
+*>
+*> If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
+*> if nq >= k, Q = H(1) H(2) . . . H(k);
+*> if nq < k, Q = H(1) H(2) . . . H(nq-1).
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
+*> if k < nq, P = G(1) G(2) . . . G(k);
+*> if k >= nq, P = G(1) G(2) . . . G(nq-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'Q': apply Q or Q**H;
+*> = 'P': apply P or P**H.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q, Q**H, P or P**H from the Left;
+*> = 'R': apply Q, Q**H, P or P**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q or P;
+*> = 'C': Conjugate transpose, apply Q**H or P**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> If VECT = 'Q', the number of columns in the original
+*> matrix reduced by CGEBRD.
+*> If VECT = 'P', the number of rows in the original
+*> matrix reduced by CGEBRD.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,min(nq,K)) if VECT = 'Q'
+*> (LDA,nq) if VECT = 'P'
+*> The vectors which define the elementary reflectors H(i) and
+*> G(i), whose products determine the matrices Q and P, as
+*> returned by CGEBRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If VECT = 'Q', LDA >= max(1,nq);
+*> if VECT = 'P', LDA >= max(1,min(nq,K)).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(nq,K))
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i) or G(i) which determines Q or P, as returned
+*> by CGEBRD in the array argument TAUQ or TAUP.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q
+*> or P*C or P**H*C or C*P or C*P**H.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M);
+*> if N = 0 or M = 0, LWORK >= 1.
+*> For optimum performance LWORK >= max(1,N*NB) if SIDE = 'L',
+*> and LWORK >= max(1,M*NB) if SIDE = 'R', where NB is the
+*> optimal blocksize. (NB = 0 if M = 0 or N = 0.)
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
$ LDC, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS, VECT
@@ -15,111 +204,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* If VECT = 'Q', CUNMBR overwrites the general complex M-by-N matrix C
-* with
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* If VECT = 'P', CUNMBR overwrites the general complex M-by-N matrix C
-* with
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': P * C C * P
-* TRANS = 'C': P**H * C C * P**H
-*
-* Here Q and P**H are the unitary matrices determined by CGEBRD when
-* reducing a complex matrix A to bidiagonal form: A = Q * B * P**H. Q
-* and P**H are defined as products of elementary reflectors H(i) and
-* G(i) respectively.
-*
-* Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
-* order of the unitary matrix Q or P**H that is applied.
-*
-* If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
-* if nq >= k, Q = H(1) H(2) . . . H(k);
-* if nq < k, Q = H(1) H(2) . . . H(nq-1).
-*
-* If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
-* if k < nq, P = G(1) G(2) . . . G(k);
-* if k >= nq, P = G(1) G(2) . . . G(nq-1).
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'Q': apply Q or Q**H;
-* = 'P': apply P or P**H.
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q, Q**H, P or P**H from the Left;
-* = 'R': apply Q, Q**H, P or P**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q or P;
-* = 'C': Conjugate transpose, apply Q**H or P**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* If VECT = 'Q', the number of columns in the original
-* matrix reduced by CGEBRD.
-* If VECT = 'P', the number of rows in the original
-* matrix reduced by CGEBRD.
-* K >= 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,min(nq,K)) if VECT = 'Q'
-* (LDA,nq) if VECT = 'P'
-* The vectors which define the elementary reflectors H(i) and
-* G(i), whose products determine the matrices Q and P, as
-* returned by CGEBRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If VECT = 'Q', LDA >= max(1,nq);
-* if VECT = 'P', LDA >= max(1,min(nq,K)).
-*
-* TAU (input) COMPLEX array, dimension (min(nq,K))
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i) or G(i) which determines Q or P, as returned
-* by CGEBRD in the array argument TAUQ or TAUP.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q
-* or P*C or P**H*C or C*P or C*P**H.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M);
-* if N = 0 or M = 0, LWORK >= 1.
-* For optimum performance LWORK >= max(1,N*NB) if SIDE = 'L',
-* and LWORK >= max(1,M*NB) if SIDE = 'R', where NB is the
-* optimal blocksize. (NB = 0 if M = 0 or N = 0.)
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cunmhr.f b/SRC/cunmhr.f
index f63edfd9..4defc19a 100644
--- a/SRC/cunmhr.f
+++ b/SRC/cunmhr.f
@@ -1,10 +1,179 @@
+*> \brief \b CUNMHR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
+* LDC, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER IHI, ILO, INFO, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMHR overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> IHI-ILO elementary reflectors, as returned by CGEHRD:
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI must have the same values as in the previous call
+*> of CGEHRD. Q is equal to the unit matrix except in the
+*> submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*> If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
+*> ILO = 1 and IHI = 0, if M = 0;
+*> if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
+*> ILO = 1 and IHI = 0, if N = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,M) if SIDE = 'L'
+*> (LDA,N) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by CGEHRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEHRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
$ LDC, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,91 +184,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CUNMHR overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* IHI-ILO elementary reflectors, as returned by CGEHRD:
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI must have the same values as in the previous call
-* of CGEHRD. Q is equal to the unit matrix except in the
-* submatrix Q(ilo+1:ihi,ilo+1:ihi).
-* If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
-* ILO = 1 and IHI = 0, if M = 0;
-* if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
-* ILO = 1 and IHI = 0, if N = 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,M) if SIDE = 'L'
-* (LDA,N) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by CGEHRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*
-* TAU (input) COMPLEX array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEHRD.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cunml2.f b/SRC/cunml2.f
index 43178c40..cdf6b44a 100644
--- a/SRC/cunml2.f
+++ b/SRC/cunml2.f
@@ -1,92 +1,168 @@
- SUBROUTINE CUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUNML2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNML2 overwrites the general complex m-by-n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H
-*
-* as returned by CGELQF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNML2 overwrites the general complex m-by-n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by CGELQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGELQF in the first k rows of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGELQF in the first k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGELQF.
+*> \date November 2011
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complexOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE CUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunmlq.f b/SRC/cunmlq.f
index 2becceec..9aea8432 100644
--- a/SRC/cunmlq.f
+++ b/SRC/cunmlq.f
@@ -1,10 +1,173 @@
+*> \brief \b CUNMLQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMLQ overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by CGELQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGELQF in the first k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,88 +178,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CUNMLQ overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H
-*
-* as returned by CGELQF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGELQF in the first k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGELQF.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cunmql.f b/SRC/cunmql.f
index 3f0db6b7..dc639c20 100644
--- a/SRC/cunmql.f
+++ b/SRC/cunmql.f
@@ -1,10 +1,173 @@
+*> \brief \b CUNMQL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMQL overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by CGEQLF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGEQLF in the last k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEQLF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CUNMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,88 +178,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CUNMQL overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by CGEQLF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGEQLF in the last k columns of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEQLF.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cunmqr.f b/SRC/cunmqr.f
index 80bec598..56a0e9ad 100644
--- a/SRC/cunmqr.f
+++ b/SRC/cunmqr.f
@@ -1,10 +1,173 @@
+*> \brief \b CUNMQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMQR overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by CGEQRF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGEQRF in the first k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGEQRF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,88 +178,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CUNMQR overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by CGEQRF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGEQRF in the first k columns of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGEQRF.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cunmr2.f b/SRC/cunmr2.f
index a3fb2823..af8713b8 100644
--- a/SRC/cunmr2.f
+++ b/SRC/cunmr2.f
@@ -1,92 +1,168 @@
- SUBROUTINE CUNMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUNMR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNMR2 overwrites the general complex m-by-n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H
-*
-* as returned by CGERQF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMR2 overwrites the general complex m-by-n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by CGERQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGERQF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGERQF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGERQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGERQF.
+*> \date November 2011
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complexOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE CUNMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunmr3.f b/SRC/cunmr3.f
index 612ffcd9..17bb6fb0 100644
--- a/SRC/cunmr3.f
+++ b/SRC/cunmr3.f
@@ -1,103 +1,187 @@
- SUBROUTINE CUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, L, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUNMR3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, L, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNMR3 overwrites the general complex m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by CTZRZF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMR3 overwrites the general complex m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by CTZRZF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing
-* the meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CTZRZF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CTZRZF.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing
+*> the meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CTZRZF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CTZRZF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+*> \ingroup complexOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, L, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunmrq.f b/SRC/cunmrq.f
index de288c59..53b4a12d 100644
--- a/SRC/cunmrq.f
+++ b/SRC/cunmrq.f
@@ -1,10 +1,173 @@
+*> \brief \b CUNMRQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMRQ overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by CGERQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGERQF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CGERQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CUNMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,88 +178,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CUNMRQ overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H
-*
-* as returned by CGERQF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGERQF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CGERQF.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/cunmrz.f b/SRC/cunmrz.f
index 613d9f6a..c33710e8 100644
--- a/SRC/cunmrz.f
+++ b/SRC/cunmrz.f
@@ -1,111 +1,199 @@
- SUBROUTINE CUNMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
- $ WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUNMRZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNMRZ overwrites the general complex M-by-N matrix C with
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMRZ overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by CTZRZF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
+* Arguments
+* =========
*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing
+*> the meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CTZRZF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CTZRZF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Q = H(1) H(2) . . . H(k)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* as returned by CTZRZF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup complexOTHERcomputational
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing
-* the meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CTZRZF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) COMPLEX array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CTZRZF.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CUNMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+ $ WORK, LWORK, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cunmtr.f b/SRC/cunmtr.f
index e83c6aad..278bf348 100644
--- a/SRC/cunmtr.f
+++ b/SRC/cunmtr.f
@@ -1,10 +1,174 @@
+*> \brief \b CUNMTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, UPLO
+* INTEGER INFO, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNMTR overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by CHETRD:
+*>
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A contains elementary reflectors
+*> from CHETRD;
+*> = 'L': Lower triangle of A contains elementary reflectors
+*> from CHETRD.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (LDA,M) if SIDE = 'L'
+*> (LDA,N) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by CHETRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CHETRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >=M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complexOTHERcomputational
+*
+* =====================================================================
SUBROUTINE CUNMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS, UPLO
@@ -15,89 +179,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CUNMTR overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* nq-1 elementary reflectors, as returned by CHETRD:
-*
-* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A contains elementary reflectors
-* from CHETRD;
-* = 'L': Lower triangle of A contains elementary reflectors
-* from CHETRD.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* A (input) COMPLEX array, dimension
-* (LDA,M) if SIDE = 'L'
-* (LDA,N) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by CHETRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*
-* TAU (input) COMPLEX array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CHETRD.
-*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >=M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/cupgtr.f b/SRC/cupgtr.f
index cbd3453f..2b50e7a6 100644
--- a/SRC/cupgtr.f
+++ b/SRC/cupgtr.f
@@ -1,60 +1,123 @@
- SUBROUTINE CUPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDQ, N
-* ..
-* .. Array Arguments ..
- COMPLEX AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUPGTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDQ, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUPGTR generates a complex unitary matrix Q which is defined as the
-* product of n-1 elementary reflectors H(i) of order n, as returned by
-* CHPTRD using packed storage:
-*
-* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUPGTR generates a complex unitary matrix Q which is defined as the
+*> product of n-1 elementary reflectors H(i) of order n, as returned by
+*> CHPTRD using packed storage:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular packed storage used in previous
-* call to CHPTRD;
-* = 'L': Lower triangular packed storage used in previous
-* call to CHPTRD.
-*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular packed storage used in previous
+*> call to CHPTRD;
+*> = 'L': Lower triangular packed storage used in previous
+*> call to CHPTRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The vectors which define the elementary reflectors, as
+*> returned by CHPTRD.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CHPTRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> The N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N-1)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The vectors which define the elementary reflectors, as
-* returned by CHPTRD.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CHPTRD.
+*> \date November 2011
*
-* Q (output) COMPLEX array, dimension (LDQ,N)
-* The N-by-N unitary matrix Q.
+*> \ingroup complexOTHERcomputational
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+* =====================================================================
+ SUBROUTINE CUPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (N-1)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDQ, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/cupmtr.f b/SRC/cupmtr.f
index c18c2433..9538243a 100644
--- a/SRC/cupmtr.f
+++ b/SRC/cupmtr.f
@@ -1,86 +1,159 @@
- SUBROUTINE CUPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS, UPLO
- INTEGER INFO, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX AP( * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b CUPMTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, UPLO
+* INTEGER INFO, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AP( * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUPMTR overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* nq-1 elementary reflectors, as returned by CHPTRD using packed
-* storage:
-*
-* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUPMTR overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by CHPTRD using packed
+*> storage:
+*>
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular packed storage used in previous
-* call to CHPTRD;
-* = 'L': Lower triangular packed storage used in previous
-* call to CHPTRD.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular packed storage used in previous
+*> call to CHPTRD;
+*> = 'L': Lower triangular packed storage used in previous
+*> call to CHPTRD.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension
+*> (M*(M+1)/2) if SIDE = 'L'
+*> (N*(N+1)/2) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by CHPTRD. AP is modified by the routine but
+*> restored on exit.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M-1) if SIDE = 'L'
+*> or (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by CHPTRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (N) if SIDE = 'L'
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AP (input) COMPLEX array, dimension
-* (M*(M+1)/2) if SIDE = 'L'
-* (N*(N+1)/2) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by CHPTRD. AP is modified by the routine but
-* restored on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (M-1) if SIDE = 'L'
-* or (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by CHPTRD.
+*> \date November 2011
*
-* C (input/output) COMPLEX array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complexOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE CUPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
+ $ INFO )
*
-* WORK (workspace) COMPLEX array, dimension
-* (N) if SIDE = 'L'
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS, UPLO
+ INTEGER INFO, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AP( * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dbbcsd.f b/SRC/dbbcsd.f
index f7b1f004..4f1f9f88 100644
--- a/SRC/dbbcsd.f
+++ b/SRC/dbbcsd.f
@@ -1,16 +1,302 @@
+*> \brief \b DBBCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
+* THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
+* V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
+* B22D, B22E, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
+* INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B11D( * ), B11E( * ), B12D( * ), B12E( * ),
+* $ B21D( * ), B21E( * ), B22D( * ), B22E( * ),
+* $ PHI( * ), THETA( * ), WORK( * )
+* DOUBLE PRECISION U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DBBCSD computes the CS decomposition of an orthogonal matrix in
+*> bidiagonal-block form,
+*>
+*>
+*> [ B11 | B12 0 0 ]
+*> [ 0 | 0 -I 0 ]
+*> X = [----------------]
+*> [ B21 | B22 0 0 ]
+*> [ 0 | 0 0 I ]
+*>
+*> [ C | -S 0 0 ]
+*> [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**T
+*> = [---------] [---------------] [---------] .
+*> [ | U2 ] [ S | C 0 0 ] [ | V2 ]
+*> [ 0 | 0 0 I ]
+*>
+*> X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
+*> than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
+*> transposed and/or permuted. This can be done in constant time using
+*> the TRANS and SIGNS options. See DORCSD for details.)
+*>
+*> The bidiagonal matrices B11, B12, B21, and B22 are represented
+*> implicitly by angles THETA(1:Q) and PHI(1:Q-1).
+*>
+*> The orthogonal matrices U1, U2, V1T, and V2T are input/output.
+*> The input matrices are pre- or post-multiplied by the appropriate
+*> singular vector matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU1
+*> \verbatim
+*> JOBU1 is CHARACTER
+*> = 'Y': U1 is updated;
+*> otherwise: U1 is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBU2
+*> \verbatim
+*> JOBU2 is CHARACTER
+*> = 'Y': U2 is updated;
+*> otherwise: U2 is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBV1T
+*> \verbatim
+*> JOBV1T is CHARACTER
+*> = 'Y': V1T is updated;
+*> otherwise: V1T is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBV2T
+*> \verbatim
+*> JOBV2T is CHARACTER
+*> = 'Y': V2T is updated;
+*> otherwise: V2T is not updated.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X, the orthogonal matrix in
+*> bidiagonal-block form.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in the top-left block of X. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in the top-left block of X.
+*> 0 <= Q <= MIN(P,M-P,M-Q).
+*> \endverbatim
+*>
+*> \param[in,out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension (Q)
+*> On entry, the angles THETA(1),...,THETA(Q) that, along with
+*> PHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block
+*> form. On exit, the angles whose cosines and sines define the
+*> diagonal blocks in the CS decomposition.
+*> \endverbatim
+*>
+*> \param[in,out] PHI
+*> \verbatim
+*> PHI is DOUBLE PRECISION array, dimension (Q-1)
+*> The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),...,
+*> THETA(Q), define the matrix in bidiagonal-block form.
+*> \endverbatim
+*>
+*> \param[in,out] U1
+*> \verbatim
+*> U1 is DOUBLE PRECISION array, dimension (LDU1,P)
+*> On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
+*> by the left singular vector matrix common to [ B11 ; 0 ] and
+*> [ B12 0 0 ; 0 -I 0 0 ].
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of the array U1.
+*> \endverbatim
+*>
+*> \param[in,out] U2
+*> \verbatim
+*> U2 is DOUBLE PRECISION array, dimension (LDU2,M-P)
+*> On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
+*> postmultiplied by the left singular vector matrix common to
+*> [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2.
+*> \endverbatim
+*>
+*> \param[in,out] V1T
+*> \verbatim
+*> V1T is DOUBLE PRECISION array, dimension (LDV1T,Q)
+*> On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
+*> by the transpose of the right singular vector
+*> matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of the array V1T.
+*> \endverbatim
+*>
+*> \param[in,out] V2T
+*> \verbatim
+*> V2T is DOUBLE PRECISION array, dimenison (LDV2T,M-Q)
+*> On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
+*> premultiplied by the transpose of the right
+*> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
+*> [ B22 0 0 ; 0 0 I ].
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of the array V2T.
+*> \endverbatim
+*>
+*> \param[out] B11D
+*> \verbatim
+*> B11D is DOUBLE PRECISION array, dimension (Q)
+*> When DBBCSD converges, B11D contains the cosines of THETA(1),
+*> ..., THETA(Q). If DBBCSD fails to converge, then B11D
+*> contains the diagonal of the partially reduced top-left
+*> block.
+*> \endverbatim
+*>
+*> \param[out] B11E
+*> \verbatim
+*> B11E is DOUBLE PRECISION array, dimension (Q-1)
+*> When DBBCSD converges, B11E contains zeros. If DBBCSD fails
+*> to converge, then B11E contains the superdiagonal of the
+*> partially reduced top-left block.
+*> \endverbatim
+*>
+*> \param[out] B12D
+*> \verbatim
+*> B12D is DOUBLE PRECISION array, dimension (Q)
+*> When DBBCSD converges, B12D contains the negative sines of
+*> THETA(1), ..., THETA(Q). If DBBCSD fails to converge, then
+*> B12D contains the diagonal of the partially reduced top-right
+*> block.
+*> \endverbatim
+*>
+*> \param[out] B12E
+*> \verbatim
+*> B12E is DOUBLE PRECISION array, dimension (Q-1)
+*> When DBBCSD converges, B12E contains zeros. If DBBCSD fails
+*> to converge, then B12E contains the subdiagonal of the
+*> partially reduced top-right block.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= MAX(1,8*Q).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the WORK array,
+*> returns this value as the first entry of the work array, and
+*> no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if DBBCSD did not converge, INFO specifies the number
+*> of nonzero entries in PHI, and B11D, B11E, etc.,
+*> contain the partially reduced matrix.
+*> \endverbatim
+*> \verbatim
+*> Reference
+*> =========
+*> \endverbatim
+*> \verbatim
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLMUL DOUBLE PRECISION, default = MAX(10,MIN(100,EPS**(-1/8)))
+*> TOLMUL controls the convergence criterion of the QR loop.
+*> Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
+*> are within TOLMUL*EPS of either bound.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
$ THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
$ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
$ B22D, B22E, WORK, LWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.0) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
@@ -24,170 +310,6 @@
$ V2T( LDV2T, * )
* ..
*
-* Purpose
-* =======
-*
-* DBBCSD computes the CS decomposition of an orthogonal matrix in
-* bidiagonal-block form,
-*
-*
-* [ B11 | B12 0 0 ]
-* [ 0 | 0 -I 0 ]
-* X = [----------------]
-* [ B21 | B22 0 0 ]
-* [ 0 | 0 0 I ]
-*
-* [ C | -S 0 0 ]
-* [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**T
-* = [---------] [---------------] [---------] .
-* [ | U2 ] [ S | C 0 0 ] [ | V2 ]
-* [ 0 | 0 0 I ]
-*
-* X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
-* than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
-* transposed and/or permuted. This can be done in constant time using
-* the TRANS and SIGNS options. See DORCSD for details.)
-*
-* The bidiagonal matrices B11, B12, B21, and B22 are represented
-* implicitly by angles THETA(1:Q) and PHI(1:Q-1).
-*
-* The orthogonal matrices U1, U2, V1T, and V2T are input/output.
-* The input matrices are pre- or post-multiplied by the appropriate
-* singular vector matrices.
-*
-* Arguments
-* =========
-*
-* JOBU1 (input) CHARACTER
-* = 'Y': U1 is updated;
-* otherwise: U1 is not updated.
-*
-* JOBU2 (input) CHARACTER
-* = 'Y': U2 is updated;
-* otherwise: U2 is not updated.
-*
-* JOBV1T (input) CHARACTER
-* = 'Y': V1T is updated;
-* otherwise: V1T is not updated.
-*
-* JOBV2T (input) CHARACTER
-* = 'Y': V2T is updated;
-* otherwise: V2T is not updated.
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* M (input) INTEGER
-* The number of rows and columns in X, the orthogonal matrix in
-* bidiagonal-block form.
-*
-* P (input) INTEGER
-* The number of rows in the top-left block of X. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in the top-left block of X.
-* 0 <= Q <= MIN(P,M-P,M-Q).
-*
-* THETA (input/output) DOUBLE PRECISION array, dimension (Q)
-* On entry, the angles THETA(1),...,THETA(Q) that, along with
-* PHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block
-* form. On exit, the angles whose cosines and sines define the
-* diagonal blocks in the CS decomposition.
-*
-* PHI (input/workspace) DOUBLE PRECISION array, dimension (Q-1)
-* The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),...,
-* THETA(Q), define the matrix in bidiagonal-block form.
-*
-* U1 (input/output) DOUBLE PRECISION array, dimension (LDU1,P)
-* On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
-* by the left singular vector matrix common to [ B11 ; 0 ] and
-* [ B12 0 0 ; 0 -I 0 0 ].
-*
-* LDU1 (input) INTEGER
-* The leading dimension of the array U1.
-*
-* U2 (input/output) DOUBLE PRECISION array, dimension (LDU2,M-P)
-* On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
-* postmultiplied by the left singular vector matrix common to
-* [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2.
-*
-* V1T (input/output) DOUBLE PRECISION array, dimension (LDV1T,Q)
-* On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
-* by the transpose of the right singular vector
-* matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
-*
-* LDV1T (input) INTEGER
-* The leading dimension of the array V1T.
-*
-* V2T (input/output) DOUBLE PRECISION array, dimenison (LDV2T,M-Q)
-* On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
-* premultiplied by the transpose of the right
-* singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
-* [ B22 0 0 ; 0 0 I ].
-*
-* LDV2T (input) INTEGER
-* The leading dimension of the array V2T.
-*
-* B11D (output) DOUBLE PRECISION array, dimension (Q)
-* When DBBCSD converges, B11D contains the cosines of THETA(1),
-* ..., THETA(Q). If DBBCSD fails to converge, then B11D
-* contains the diagonal of the partially reduced top-left
-* block.
-*
-* B11E (output) DOUBLE PRECISION array, dimension (Q-1)
-* When DBBCSD converges, B11E contains zeros. If DBBCSD fails
-* to converge, then B11E contains the superdiagonal of the
-* partially reduced top-left block.
-*
-* B12D (output) DOUBLE PRECISION array, dimension (Q)
-* When DBBCSD converges, B12D contains the negative sines of
-* THETA(1), ..., THETA(Q). If DBBCSD fails to converge, then
-* B12D contains the diagonal of the partially reduced top-right
-* block.
-*
-* B12E (output) DOUBLE PRECISION array, dimension (Q-1)
-* When DBBCSD converges, B12E contains zeros. If DBBCSD fails
-* to converge, then B12E contains the subdiagonal of the
-* partially reduced top-right block.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= MAX(1,8*Q).
-*
-* If LWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the WORK array,
-* returns this value as the first entry of the work array, and
-* no error message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if DBBCSD did not converge, INFO specifies the number
-* of nonzero entries in PHI, and B11D, B11E, etc.,
-* contain the partially reduced matrix.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
-* Internal Parameters
-* ===================
-*
-* TOLMUL DOUBLE PRECISION, default = MAX(10,MIN(100,EPS**(-1/8)))
-* TOLMUL controls the convergence criterion of the QR loop.
-* Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
-* are within TOLMUL*EPS of either bound.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/dbdsdc.f b/SRC/dbdsdc.f
index ee419e6a..325dc5dd 100644
--- a/SRC/dbdsdc.f
+++ b/SRC/dbdsdc.f
@@ -1,10 +1,212 @@
+*> \brief \b DBDSDC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, UPLO
+* INTEGER INFO, LDU, LDVT, N
+* ..
+* .. Array Arguments ..
+* INTEGER IQ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), Q( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DBDSDC computes the singular value decomposition (SVD) of a real
+*> N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT,
+*> using a divide and conquer method, where S is a diagonal matrix
+*> with non-negative diagonal elements (the singular values of B), and
+*> U and VT are orthogonal matrices of left and right singular vectors,
+*> respectively. DBDSDC can be used to compute all singular values,
+*> and optionally, singular vectors or singular vectors in compact form.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none. See DLASD3 for details.
+*>
+*> The code currently calls DLASDQ if singular values only are desired.
+*> However, it can be slightly modified to compute singular values
+*> using the divide and conquer method.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': B is upper bidiagonal.
+*> = 'L': B is lower bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> Specifies whether singular vectors are to be computed
+*> as follows:
+*> = 'N': Compute singular values only;
+*> = 'P': Compute singular values and compute singular
+*> vectors in compact form;
+*> = 'I': Compute singular values and singular vectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the bidiagonal matrix B.
+*> On exit, if INFO=0, the singular values of B.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the elements of E contain the offdiagonal
+*> elements of the bidiagonal matrix whose SVD is desired.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,N)
+*> If COMPQ = 'I', then:
+*> On exit, if INFO = 0, U contains the left singular vectors
+*> of the bidiagonal matrix.
+*> For other values of COMPQ, U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1.
+*> If singular vectors are desired, then LDU >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension (LDVT,N)
+*> If COMPQ = 'I', then:
+*> On exit, if INFO = 0, VT**T contains the right singular
+*> vectors of the bidiagonal matrix.
+*> For other values of COMPQ, VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1.
+*> If singular vectors are desired, then LDVT >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ)
+*> If COMPQ = 'P', then:
+*> On exit, if INFO = 0, Q and IQ contain the left
+*> and right singular vectors in a compact form,
+*> requiring O(N log N) space instead of 2*N**2.
+*> In particular, Q contains all the DOUBLE PRECISION data in
+*> LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1))))
+*> words of memory, where SMLSIZ is returned by ILAENV and
+*> is equal to the maximum size of the subproblems at the
+*> bottom of the computation tree (usually about 25).
+*> For other values of COMPQ, Q is not referenced.
+*> \endverbatim
+*>
+*> \param[out] IQ
+*> \verbatim
+*> IQ is INTEGER array, dimension (LDIQ)
+*> If COMPQ = 'P', then:
+*> On exit, if INFO = 0, Q and IQ contain the left
+*> and right singular vectors in a compact form,
+*> requiring O(N log N) space instead of 2*N**2.
+*> In particular, IQ contains all INTEGER data in
+*> LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1))))
+*> words of memory, where SMLSIZ is returned by ILAENV and
+*> is equal to the maximum size of the subproblems at the
+*> bottom of the computation tree (usually about 25).
+*> For other values of COMPQ, IQ is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> If COMPQ = 'N' then LWORK >= (4 * N).
+*> If COMPQ = 'P' then LWORK >= (6 * N).
+*> If COMPQ = 'I' then LWORK >= (3 * N**2 + 4 * N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute a singular value.
+*> The update process of divide and conquer failed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, UPLO
@@ -16,119 +218,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DBDSDC computes the singular value decomposition (SVD) of a real
-* N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT,
-* using a divide and conquer method, where S is a diagonal matrix
-* with non-negative diagonal elements (the singular values of B), and
-* U and VT are orthogonal matrices of left and right singular vectors,
-* respectively. DBDSDC can be used to compute all singular values,
-* and optionally, singular vectors or singular vectors in compact form.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none. See DLASD3 for details.
-*
-* The code currently calls DLASDQ if singular values only are desired.
-* However, it can be slightly modified to compute singular values
-* using the divide and conquer method.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': B is upper bidiagonal.
-* = 'L': B is lower bidiagonal.
-*
-* COMPQ (input) CHARACTER*1
-* Specifies whether singular vectors are to be computed
-* as follows:
-* = 'N': Compute singular values only;
-* = 'P': Compute singular values and compute singular
-* vectors in compact form;
-* = 'I': Compute singular values and singular vectors.
-*
-* N (input) INTEGER
-* The order of the matrix B. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the bidiagonal matrix B.
-* On exit, if INFO=0, the singular values of B.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the elements of E contain the offdiagonal
-* elements of the bidiagonal matrix whose SVD is desired.
-* On exit, E has been destroyed.
-*
-* U (output) DOUBLE PRECISION array, dimension (LDU,N)
-* If COMPQ = 'I', then:
-* On exit, if INFO = 0, U contains the left singular vectors
-* of the bidiagonal matrix.
-* For other values of COMPQ, U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1.
-* If singular vectors are desired, then LDU >= max( 1, N ).
-*
-* VT (output) DOUBLE PRECISION array, dimension (LDVT,N)
-* If COMPQ = 'I', then:
-* On exit, if INFO = 0, VT**T contains the right singular
-* vectors of the bidiagonal matrix.
-* For other values of COMPQ, VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1.
-* If singular vectors are desired, then LDVT >= max( 1, N ).
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDQ)
-* If COMPQ = 'P', then:
-* On exit, if INFO = 0, Q and IQ contain the left
-* and right singular vectors in a compact form,
-* requiring O(N log N) space instead of 2*N**2.
-* In particular, Q contains all the DOUBLE PRECISION data in
-* LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1))))
-* words of memory, where SMLSIZ is returned by ILAENV and
-* is equal to the maximum size of the subproblems at the
-* bottom of the computation tree (usually about 25).
-* For other values of COMPQ, Q is not referenced.
-*
-* IQ (output) INTEGER array, dimension (LDIQ)
-* If COMPQ = 'P', then:
-* On exit, if INFO = 0, Q and IQ contain the left
-* and right singular vectors in a compact form,
-* requiring O(N log N) space instead of 2*N**2.
-* In particular, IQ contains all INTEGER data in
-* LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1))))
-* words of memory, where SMLSIZ is returned by ILAENV and
-* is equal to the maximum size of the subproblems at the
-* bottom of the computation tree (usually about 25).
-* For other values of COMPQ, IQ is not referenced.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* If COMPQ = 'N' then LWORK >= (4 * N).
-* If COMPQ = 'P' then LWORK >= (6 * N).
-* If COMPQ = 'I' then LWORK >= (3 * N**2 + 4 * N).
-*
-* IWORK (workspace) INTEGER array, dimension (8*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute a singular value.
-* The update process of divide and conquer failed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
* Changed dimension statement in comment describing E from (N) to
* (N-1). Sven, 17 Feb 05.
diff --git a/SRC/dbdsqr.f b/SRC/dbdsqr.f
index 0c33294a..4577d330 100644
--- a/SRC/dbdsqr.f
+++ b/SRC/dbdsqr.f
@@ -1,10 +1,232 @@
+*> \brief \b DBDSQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
+* LDU, C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( LDC, * ), D( * ), E( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DBDSQR computes the singular values and, optionally, the right and/or
+*> left singular vectors from the singular value decomposition (SVD) of
+*> a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
+*> zero-shift QR algorithm. The SVD of B has the form
+*>
+*> B = Q * S * P**T
+*>
+*> where S is the diagonal matrix of singular values, Q is an orthogonal
+*> matrix of left singular vectors, and P is an orthogonal matrix of
+*> right singular vectors. If left singular vectors are requested, this
+*> subroutine actually returns U*Q instead of Q, and, if right singular
+*> vectors are requested, this subroutine returns P**T*VT instead of
+*> P**T, for given real input matrices U and VT. When U and VT are the
+*> orthogonal matrices that reduce a general matrix A to bidiagonal
+*> form: A = U*B*VT, as computed by DGEBRD, then
+*>
+*> A = (U*Q) * S * (P**T*VT)
+*>
+*> is the SVD of A. Optionally, the subroutine may also compute Q**T*C
+*> for a given real input matrix C.
+*>
+*> See "Computing Small Singular Values of Bidiagonal Matrices With
+*> Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
+*> LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
+*> no. 5, pp. 873-912, Sept 1990) and
+*> "Accurate singular values and differential qd algorithms," by
+*> B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
+*> Department, University of California at Berkeley, July 1992
+*> for a detailed description of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': B is upper bidiagonal;
+*> = 'L': B is lower bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCVT
+*> \verbatim
+*> NCVT is INTEGER
+*> The number of columns of the matrix VT. NCVT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRU
+*> \verbatim
+*> NRU is INTEGER
+*> The number of rows of the matrix U. NRU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> The number of columns of the matrix C. NCC >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the bidiagonal matrix B.
+*> On exit, if INFO=0, the singular values of B in decreasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the N-1 offdiagonal elements of the bidiagonal
+*> matrix B.
+*> On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
+*> will contain the diagonal and superdiagonal elements of a
+*> bidiagonal matrix orthogonally equivalent to the one given
+*> as input.
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension (LDVT, NCVT)
+*> On entry, an N-by-NCVT matrix VT.
+*> On exit, VT is overwritten by P**T * VT.
+*> Not referenced if NCVT = 0.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT.
+*> LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> On entry, an NRU-by-N matrix U.
+*> On exit, U is overwritten by U * Q.
+*> Not referenced if NRU = 0.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,NRU).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC, NCC)
+*> On entry, an N-by-NCC matrix C.
+*> On exit, C is overwritten by Q**T * C.
+*> Not referenced if NCC = 0.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C.
+*> LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0:
+*> if NCVT = NRU = NCC = 0,
+*> = 1, a split was marked by a positive value in E
+*> = 2, current block of Z not diagonalized after 30*N
+*> iterations (in inner while loop)
+*> = 3, termination criterion of outer while loop not met
+*> (program created more than N unreduced blocks)
+*> else NCVT = NRU = NCC = 0,
+*> the algorithm did not converge; D and E contain the
+*> elements of a bidiagonal matrix which is orthogonally
+*> similar to the input matrix B; if INFO = i, i
+*> elements of E have not converged to zero.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8)))
+*> TOLMUL controls the convergence criterion of the QR loop.
+*> If it is positive, TOLMUL*EPS is the desired relative
+*> precision in the computed singular values.
+*> If it is negative, abs(TOLMUL*EPS*sigma_max) is the
+*> desired absolute accuracy in the computed singular
+*> values (corresponds to relative accuracy
+*> abs(TOLMUL*EPS) in the largest singular value.
+*> abs(TOLMUL) should be between 1 and 1/EPS, and preferably
+*> between 10 (for fast convergence) and .1/EPS
+*> (for there to be some accuracy in the results).
+*> Default is to lose at either one eighth or 2 of the
+*> available decimal digits in each computed singular value
+*> (whichever is smaller).
+*> \endverbatim
+*> \verbatim
+*> MAXITR INTEGER, default = 6
+*> MAXITR controls the maximum number of passes of the
+*> algorithm through its inner loop. The algorithms stops
+*> (and so fails to converge) if the number of passes
+*> through the inner loop exceeds MAXITR*N**2.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
$ LDU, C, LDC, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* January 2007
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,139 +237,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DBDSQR computes the singular values and, optionally, the right and/or
-* left singular vectors from the singular value decomposition (SVD) of
-* a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
-* zero-shift QR algorithm. The SVD of B has the form
-*
-* B = Q * S * P**T
-*
-* where S is the diagonal matrix of singular values, Q is an orthogonal
-* matrix of left singular vectors, and P is an orthogonal matrix of
-* right singular vectors. If left singular vectors are requested, this
-* subroutine actually returns U*Q instead of Q, and, if right singular
-* vectors are requested, this subroutine returns P**T*VT instead of
-* P**T, for given real input matrices U and VT. When U and VT are the
-* orthogonal matrices that reduce a general matrix A to bidiagonal
-* form: A = U*B*VT, as computed by DGEBRD, then
-*
-* A = (U*Q) * S * (P**T*VT)
-*
-* is the SVD of A. Optionally, the subroutine may also compute Q**T*C
-* for a given real input matrix C.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices With
-* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
-* LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
-* no. 5, pp. 873-912, Sept 1990) and
-* "Accurate singular values and differential qd algorithms," by
-* B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
-* Department, University of California at Berkeley, July 1992
-* for a detailed description of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': B is upper bidiagonal;
-* = 'L': B is lower bidiagonal.
-*
-* N (input) INTEGER
-* The order of the matrix B. N >= 0.
-*
-* NCVT (input) INTEGER
-* The number of columns of the matrix VT. NCVT >= 0.
-*
-* NRU (input) INTEGER
-* The number of rows of the matrix U. NRU >= 0.
-*
-* NCC (input) INTEGER
-* The number of columns of the matrix C. NCC >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the bidiagonal matrix B.
-* On exit, if INFO=0, the singular values of B in decreasing
-* order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the N-1 offdiagonal elements of the bidiagonal
-* matrix B.
-* On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
-* will contain the diagonal and superdiagonal elements of a
-* bidiagonal matrix orthogonally equivalent to the one given
-* as input.
-*
-* VT (input/output) DOUBLE PRECISION array, dimension (LDVT, NCVT)
-* On entry, an N-by-NCVT matrix VT.
-* On exit, VT is overwritten by P**T * VT.
-* Not referenced if NCVT = 0.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT.
-* LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
-*
-* U (input/output) DOUBLE PRECISION array, dimension (LDU, N)
-* On entry, an NRU-by-N matrix U.
-* On exit, U is overwritten by U * Q.
-* Not referenced if NRU = 0.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,NRU).
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC, NCC)
-* On entry, an N-by-NCC matrix C.
-* On exit, C is overwritten by Q**T * C.
-* Not referenced if NCC = 0.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C.
-* LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0:
-* if NCVT = NRU = NCC = 0,
-* = 1, a split was marked by a positive value in E
-* = 2, current block of Z not diagonalized after 30*N
-* iterations (in inner while loop)
-* = 3, termination criterion of outer while loop not met
-* (program created more than N unreduced blocks)
-* else NCVT = NRU = NCC = 0,
-* the algorithm did not converge; D and E contain the
-* elements of a bidiagonal matrix which is orthogonally
-* similar to the input matrix B; if INFO = i, i
-* elements of E have not converged to zero.
-*
-* Internal Parameters
-* ===================
-*
-* TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8)))
-* TOLMUL controls the convergence criterion of the QR loop.
-* If it is positive, TOLMUL*EPS is the desired relative
-* precision in the computed singular values.
-* If it is negative, abs(TOLMUL*EPS*sigma_max) is the
-* desired absolute accuracy in the computed singular
-* values (corresponds to relative accuracy
-* abs(TOLMUL*EPS) in the largest singular value.
-* abs(TOLMUL) should be between 1 and 1/EPS, and preferably
-* between 10 (for fast convergence) and .1/EPS
-* (for there to be some accuracy in the results).
-* Default is to lose at either one eighth or 2 of the
-* available decimal digits in each computed singular value
-* (whichever is smaller).
-*
-* MAXITR INTEGER, default = 6
-* MAXITR controls the maximum number of passes of the
-* algorithm through its inner loop. The algorithms stops
-* (and so fails to converge) if the number of passes
-* through the inner loop exceeds MAXITR*N**2.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ddisna.f b/SRC/ddisna.f
index 24afafce..887c1b49 100644
--- a/SRC/ddisna.f
+++ b/SRC/ddisna.f
@@ -1,9 +1,118 @@
+*> \brief \b DDISNA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDISNA( JOB, M, N, D, SEP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER INFO, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), SEP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDISNA computes the reciprocal condition numbers for the eigenvectors
+*> of a real symmetric or complex Hermitian matrix or for the left or
+*> right singular vectors of a general m-by-n matrix. The reciprocal
+*> condition number is the 'gap' between the corresponding eigenvalue or
+*> singular value and the nearest other one.
+*>
+*> The bound on the error, measured by angle in radians, in the I-th
+*> computed vector is given by
+*>
+*> DLAMCH( 'E' ) * ( ANORM / SEP( I ) )
+*>
+*> where ANORM = 2-norm(A) = max( abs( D(j) ) ). SEP(I) is not allowed
+*> to be smaller than DLAMCH( 'E' )*ANORM in order to limit the size of
+*> the error bound.
+*>
+*> DDISNA may also be used to compute error bounds for eigenvectors of
+*> the generalized symmetric definite eigenproblem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies for which problem the reciprocal condition numbers
+*> should be computed:
+*> = 'E': the eigenvectors of a symmetric/Hermitian matrix;
+*> = 'L': the left singular vectors of a general matrix;
+*> = 'R': the right singular vectors of a general matrix.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> If JOB = 'L' or 'R', the number of columns of the matrix,
+*> in which case N >= 0. Ignored if JOB = 'E'.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (M) if JOB = 'E'
+*> dimension (min(M,N)) if JOB = 'L' or 'R'
+*> The eigenvalues (if JOB = 'E') or singular values (if JOB =
+*> 'L' or 'R') of the matrix, in either increasing or decreasing
+*> order. If singular values, they must be non-negative.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is DOUBLE PRECISION array, dimension (M) if JOB = 'E'
+*> dimension (min(M,N)) if JOB = 'L' or 'R'
+*> The reciprocal condition numbers of the vectors.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DDISNA( JOB, M, N, D, SEP, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOB
@@ -13,58 +122,6 @@
DOUBLE PRECISION D( * ), SEP( * )
* ..
*
-* Purpose
-* =======
-*
-* DDISNA computes the reciprocal condition numbers for the eigenvectors
-* of a real symmetric or complex Hermitian matrix or for the left or
-* right singular vectors of a general m-by-n matrix. The reciprocal
-* condition number is the 'gap' between the corresponding eigenvalue or
-* singular value and the nearest other one.
-*
-* The bound on the error, measured by angle in radians, in the I-th
-* computed vector is given by
-*
-* DLAMCH( 'E' ) * ( ANORM / SEP( I ) )
-*
-* where ANORM = 2-norm(A) = max( abs( D(j) ) ). SEP(I) is not allowed
-* to be smaller than DLAMCH( 'E' )*ANORM in order to limit the size of
-* the error bound.
-*
-* DDISNA may also be used to compute error bounds for eigenvectors of
-* the generalized symmetric definite eigenproblem.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies for which problem the reciprocal condition numbers
-* should be computed:
-* = 'E': the eigenvectors of a symmetric/Hermitian matrix;
-* = 'L': the left singular vectors of a general matrix;
-* = 'R': the right singular vectors of a general matrix.
-*
-* M (input) INTEGER
-* The number of rows of the matrix. M >= 0.
-*
-* N (input) INTEGER
-* If JOB = 'L' or 'R', the number of columns of the matrix,
-* in which case N >= 0. Ignored if JOB = 'E'.
-*
-* D (input) DOUBLE PRECISION array, dimension (M) if JOB = 'E'
-* dimension (min(M,N)) if JOB = 'L' or 'R'
-* The eigenvalues (if JOB = 'E') or singular values (if JOB =
-* 'L' or 'R') of the matrix, in either increasing or decreasing
-* order. If singular values, they must be non-negative.
-*
-* SEP (output) DOUBLE PRECISION array, dimension (M) if JOB = 'E'
-* dimension (min(M,N)) if JOB = 'L' or 'R'
-* The reciprocal condition numbers of the vectors.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgbbrd.f b/SRC/dgbbrd.f
index fbd77865..05ed67e0 100644
--- a/SRC/dgbbrd.f
+++ b/SRC/dgbbrd.f
@@ -1,10 +1,188 @@
+*> \brief \b DGBBRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
+* LDQ, PT, LDPT, C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER VECT
+* INTEGER INFO, KL, KU, LDAB, LDC, LDPT, LDQ, M, N, NCC
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), C( LDC, * ), D( * ), E( * ),
+* $ PT( LDPT, * ), Q( LDQ, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBBRD reduces a real general m-by-n band matrix A to upper
+*> bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
+*>
+*> The routine computes B, and optionally forms Q or P**T, or computes
+*> Q**T*C for a given matrix C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> Specifies whether or not the matrices Q and P**T are to be
+*> formed.
+*> = 'N': do not form Q or P**T;
+*> = 'Q': form Q only;
+*> = 'P': form P**T only;
+*> = 'B': form both.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> The number of columns of the matrix C. NCC >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals of the matrix A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals of the matrix A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the m-by-n band matrix A, stored in rows 1 to
+*> KL+KU+1. The j-th column of A is stored in the j-th column of
+*> the array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
+*> On exit, A is overwritten by values generated during the
+*> reduction.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (min(M,N)-1)
+*> The superdiagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,M)
+*> If VECT = 'Q' or 'B', the m-by-m orthogonal matrix Q.
+*> If VECT = 'N' or 'P', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] PT
+*> \verbatim
+*> PT is DOUBLE PRECISION array, dimension (LDPT,N)
+*> If VECT = 'P' or 'B', the n-by-n orthogonal matrix P'.
+*> If VECT = 'N' or 'Q', the array PT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the array PT.
+*> LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,NCC)
+*> On entry, an m-by-ncc matrix C.
+*> On exit, C is overwritten by Q**T*C.
+*> C is not referenced if NCC = 0.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C.
+*> LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*max(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+* =====================================================================
SUBROUTINE DGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
$ LDQ, PT, LDPT, C, LDC, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER VECT
@@ -15,89 +193,6 @@
$ PT( LDPT, * ), Q( LDQ, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGBBRD reduces a real general m-by-n band matrix A to upper
-* bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
-*
-* The routine computes B, and optionally forms Q or P**T, or computes
-* Q**T*C for a given matrix C.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* Specifies whether or not the matrices Q and P**T are to be
-* formed.
-* = 'N': do not form Q or P**T;
-* = 'Q': form Q only;
-* = 'P': form P**T only;
-* = 'B': form both.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NCC (input) INTEGER
-* The number of columns of the matrix C. NCC >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals of the matrix A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals of the matrix A. KU >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the m-by-n band matrix A, stored in rows 1 to
-* KL+KU+1. The j-th column of A is stored in the j-th column of
-* the array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
-* On exit, A is overwritten by values generated during the
-* reduction.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KL+KU+1.
-*
-* D (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B.
-*
-* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
-* The superdiagonal elements of the bidiagonal matrix B.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDQ,M)
-* If VECT = 'Q' or 'B', the m-by-m orthogonal matrix Q.
-* If VECT = 'N' or 'P', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
-*
-* PT (output) DOUBLE PRECISION array, dimension (LDPT,N)
-* If VECT = 'P' or 'B', the n-by-n orthogonal matrix P'.
-* If VECT = 'N' or 'Q', the array PT is not referenced.
-*
-* LDPT (input) INTEGER
-* The leading dimension of the array PT.
-* LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,NCC)
-* On entry, an m-by-ncc matrix C.
-* On exit, C is overwritten by Q**T*C.
-* C is not referenced if NCC = 0.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C.
-* LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*max(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgbcon.f b/SRC/dgbcon.f
index 37372c12..4081c119 100644
--- a/SRC/dgbcon.f
+++ b/SRC/dgbcon.f
@@ -1,12 +1,147 @@
+*> \brief \b DGBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, KL, KU, LDAB, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBCON estimates the reciprocal of the condition number of a real
+*> general band matrix A, in either the 1-norm or the infinity-norm,
+*> using the LU factorization computed by DGBTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= N, row i of the matrix was
+*> interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+* =====================================================================
SUBROUTINE DGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,65 +153,6 @@
DOUBLE PRECISION AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGBCON estimates the reciprocal of the condition number of a real
-* general band matrix A, in either the 1-norm or the infinity-norm,
-* using the LU factorization computed by DGBTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= N, row i of the matrix was
-* interchanged with row IPIV(i).
-*
-* ANORM (input) DOUBLE PRECISION
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgbequ.f b/SRC/dgbequ.f
index eb2dd8ac..165e47a0 100644
--- a/SRC/dgbequ.f
+++ b/SRC/dgbequ.f
@@ -1,86 +1,162 @@
- SUBROUTINE DGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
- DOUBLE PRECISION AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), C( * ), R( * )
-* ..
-*
+*> \brief \b DGBEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), C( * ), R( * )
+* ..
+*
* Purpose
* =======
*
-* DGBEQU computes row and column scalings intended to equilibrate an
-* M-by-N band matrix A and reduce its condition number. R returns the
-* row scale factors and C the column scale factors, chosen to try to
-* make the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
-*
-* R(i) and C(j) are restricted to be between SMLNUM = smallest safe
-* number and BIGNUM = largest safe number. Use of these scaling
-* factors is not guaranteed to reduce the condition number of A but
-* works well in practice.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBEQU computes row and column scalings intended to equilibrate an
+*> M-by-N band matrix A and reduce its condition number. R returns the
+*> row scale factors and C the column scale factors, chosen to try to
+*> make the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number. Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The band matrix A, stored in rows 1 to KL+KU+1. The j-th
-* column of A is stored in the j-th column of the array AB as
-* follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
+*> column of A is stored in the j-th column of the array AB as
+*> follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> If INFO = 0, or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) DOUBLE PRECISION array, dimension (M)
-* If INFO = 0, or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) DOUBLE PRECISION
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup doubleGBcomputational
*
-* COLCND (output) DOUBLE PRECISION
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE DGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+ $ AMAX, INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+ DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), C( * ), R( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgbequb.f b/SRC/dgbequb.f
index 57a6aafe..7391ec24 100644
--- a/SRC/dgbequb.f
+++ b/SRC/dgbequb.f
@@ -1,98 +1,169 @@
- SUBROUTINE DGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
- DOUBLE PRECISION AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), C( * ), R( * )
-* ..
-*
+*> \brief \b DGBEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), C( * ), R( * )
+* ..
+*
* Purpose
* =======
*
-* DGBEQUB computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
-* the radix.
-*
-* R(i) and C(j) are restricted to be a power of the radix between
-* SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
-* of these scaling factors is not guaranteed to reduce the condition
-* number of A but works well in practice.
-*
-* This routine differs from DGEEQU by restricting the scaling factors
-* to a power of the radix. Baring over- and underflow, scaling by
-* these factors introduces no additional rounding errors. However, the
-* scaled entries' magnitured are no longer approximately 1 but lie
-* between sqrt(radix) and 1/sqrt(radix).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBEQUB computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
+*> the radix.
+*>
+*> R(i) and C(j) are restricted to be a power of the radix between
+*> SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
+*> of these scaling factors is not guaranteed to reduce the condition
+*> number of A but works well in practice.
+*>
+*> This routine differs from DGEEQU by restricting the scaling factors
+*> to a power of the radix. Baring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors. However, the
+*> scaled entries' magnitured are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) DOUBLE PRECISION array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) DOUBLE PRECISION
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup doubleGBcomputational
*
-* COLCND (output) DOUBLE PRECISION
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE DGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+ $ AMAX, INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+ DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), C( * ), R( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgbrfs.f b/SRC/dgbrfs.f
index f0647c07..306f6bb9 100644
--- a/SRC/dgbrfs.f
+++ b/SRC/dgbrfs.f
@@ -1,13 +1,206 @@
+*> \brief \b DGBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
+* IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is banded, and provides
+*> error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DGBTRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGBTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+* =====================================================================
SUBROUTINE DGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
$ IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -19,99 +212,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGBRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is banded, and provides
-* error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DGBTRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGBTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgbrfsx.f b/SRC/dgbrfsx.f
index e87a835c..5c02f75a 100644
--- a/SRC/dgbrfsx.f
+++ b/SRC/dgbrfsx.f
@@ -1,19 +1,461 @@
+*> \brief \b DGBRFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBRFSX( TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND,
+* BERR, N_ERR_BNDS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, EQUED
+* INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, KL, KU, NRHS,
+* $ NPARAMS, N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DGBRFSX improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED, R
+*> and C below. In this case, the solution and error bounds returned
+*> are for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension (NPARAMS)
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+* =====================================================================
SUBROUTINE DGBRFSX( TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND,
$ BERR, N_ERR_BNDS, ERR_BNDS_NORM,
$ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS, EQUED
INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, KL, KU, NRHS,
@@ -29,301 +471,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DGBRFSX improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED, R
-* and C below. In this case, the solution and error bounds returned
-* are for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension (NPARAMS)
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/dgbsv.f b/SRC/dgbsv.f
index 9db11f68..6eecc0be 100644
--- a/SRC/dgbsv.f
+++ b/SRC/dgbsv.f
@@ -1,99 +1,173 @@
- SUBROUTINE DGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
+*> \brief <b> DGBSV computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK driver routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBSV computes the solution to a real system of linear equations
+*> A * X = B, where A is a band matrix of order N with KL subdiagonals
+*> and KU superdiagonals, and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as A = L * U, where L is a product of permutation
+*> and unit lower triangular matrices with KL subdiagonals, and U is
+*> upper triangular with KL+KU superdiagonals. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KL+KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+KL)
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* DGBSV computes the solution to a real system of linear equations
-* A * X = B, where A is a band matrix of order N with KL subdiagonals
-* and KU superdiagonals, and X and B are N-by-NRHS matrices.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* The LU decomposition with partial pivoting and row interchanges is
-* used to factor A as A = L * U, where L is a product of permutation
-* and unit lower triangular matrices with KL subdiagonals, and U is
-* upper triangular with KL+KU superdiagonals. The factored form of A
-* is then used to solve the system of equations A * X = B.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup doubleGBsolve
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KL+KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+KL)
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U because of fill-in resulting from the row interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U because of fill-in resulting from the row interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgbsvx.f b/SRC/dgbsvx.f
index f3f7616e..863e4bcf 100644
--- a/SRC/dgbsvx.f
+++ b/SRC/dgbsvx.f
@@ -1,11 +1,373 @@
+*> \brief <b> DGBSVX computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
+* RCOND, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ BERR( * ), C( * ), FERR( * ), R( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBSVX uses the LU factorization to compute the solution to a real
+*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
+*> where A is a band matrix of order N with KL subdiagonals and KU
+*> superdiagonals, and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed by this subroutine:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*> matrix A (after equilibration if FACT = 'E') as
+*> A = L * U,
+*> where L is a product of permutation and unit lower triangular
+*> matrices with KL subdiagonals, and U is upper triangular with
+*> KL+KU superdiagonals.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFB and IPIV contain the factored form of
+*> A. If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> AB, AFB, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AFB and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFB and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'F' and EQUED is not 'N', then A must have been
+*> equilibrated by the scaling factors in R and/or C. AB is not
+*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
+*> EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) DOUBLE PRECISION array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains details of the LU factorization of the band matrix
+*> A, as computed by DGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
+*> the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFB is an output argument and on exit
+*> returns details of the LU factorization of A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFB is an output argument and on exit
+*> returns details of the LU factorization of the equilibrated
+*> matrix A (see the description of AB for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = L*U
+*> as computed by DGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*> to the original system of equations. Note that A and B are
+*> modified on exit if EQUED .ne. 'N', and the solution to the
+*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*> and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> On exit, WORK(1) contains the reciprocal pivot growth
+*> factor norm(A)/norm(U). The "max absolute element" norm is
+*> used. If WORK(1) is much less than 1, then the stability
+*> of the LU factorization of the (equilibrated) matrix A
+*> could be poor. This also means that the solution X, condition
+*> estimator RCOND, and forward error bound FERR could be
+*> unreliable. If factorization fails with 0<INFO<=N, then
+*> WORK(1) contains the reciprocal pivot growth factor for the
+*> leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, so the solution and error bounds
+*> could not be computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBsolve
+*
+* =====================================================================
SUBROUTINE DGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
$ RCOND, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
@@ -19,245 +381,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGBSVX uses the LU factorization to compute the solution to a real
-* system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-* where A is a band matrix of order N with KL subdiagonals and KU
-* superdiagonals, and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed by this subroutine:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-* matrix A (after equilibration if FACT = 'E') as
-* A = L * U,
-* where L is a product of permutation and unit lower triangular
-* matrices with KL subdiagonals, and U is upper triangular with
-* KL+KU superdiagonals.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFB and IPIV contain the factored form of
-* A. If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* AB, AFB, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AFB and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFB and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* If FACT = 'F' and EQUED is not 'N', then A must have been
-* equilibrated by the scaling factors in R and/or C. AB is not
-* modified if FACT = 'F' or 'N', or if FACT = 'E' and
-* EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input or output) DOUBLE PRECISION array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains details of the LU factorization of the band matrix
-* A, as computed by DGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-* the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFB is an output argument and on exit
-* returns details of the LU factorization of A.
-*
-* If FACT = 'E', then AFB is an output argument and on exit
-* returns details of the LU factorization of the equilibrated
-* matrix A (see the description of AB for the form of the
-* equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = L*U
-* as computed by DGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-* to the original system of equations. Note that A and B are
-* modified on exit if EQUED .ne. 'N', and the solution to the
-* equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-* and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (3*N)
-* On exit, WORK(1) contains the reciprocal pivot growth
-* factor norm(A)/norm(U). The "max absolute element" norm is
-* used. If WORK(1) is much less than 1, then the stability
-* of the LU factorization of the (equilibrated) matrix A
-* could be poor. This also means that the solution X, condition
-* estimator RCOND, and forward error bound FERR could be
-* unreliable. If factorization fails with 0<INFO<=N, then
-* WORK(1) contains the reciprocal pivot growth factor for the
-* leading INFO columns of A.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, so the solution and error bounds
-* could not be computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgbsvxx.f b/SRC/dgbsvxx.f
index 090975e4..2ce689e9 100644
--- a/SRC/dgbsvxx.f
+++ b/SRC/dgbsvxx.f
@@ -1,19 +1,582 @@
+*> \brief <b> DGBSVXX computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBSVXX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
+* RCOND, RPVGRW, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS, KL, KU
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBSVXX uses the LU factorization to compute the solution to a
+*> double precision system of linear equations A * X = B, where A is an
+*> N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. DGBSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> DGBSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> DGBSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what DGBSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = P * L * U,
+*>
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is less
+*> than machine precision, the routine still goes on to solve for X
+*> and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'F' and EQUED is not 'N', then AB must have been
+*> equilibrated by the scaling factors in R and/or C. AB is not
+*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
+*> EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) DOUBLE PRECISION array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains details of the LU factorization of the band matrix
+*> A, as computed by DGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
+*> the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by DGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit
+*> if EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
+*> inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A. In DGESVX, this quantity is
+*> returned in WORK(1).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension (NPARAMS)
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBsolve
+*
+* =====================================================================
SUBROUTINE DGBSVXX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
$ RCOND, RPVGRW, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
@@ -29,412 +592,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DGBSVXX uses the LU factorization to compute the solution to a
-* double precision system of linear equations A * X = B, where A is an
-* N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. DGBSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* DGBSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* DGBSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what DGBSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = P * L * U,
-*
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is less
-* than machine precision, the routine still goes on to solve for X
-* and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* If FACT = 'F' and EQUED is not 'N', then AB must have been
-* equilibrated by the scaling factors in R and/or C. AB is not
-* modified if FACT = 'F' or 'N', or if FACT = 'E' and
-* EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input or output) DOUBLE PRECISION array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains details of the LU factorization of the band matrix
-* A, as computed by DGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-* the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by DGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit
-* if EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
-* inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A. In DGESVX, this quantity is
-* returned in WORK(1).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension (NPARAMS)
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/dgbtf2.f b/SRC/dgbtf2.f
index 29876366..734a4720 100644
--- a/SRC/dgbtf2.f
+++ b/SRC/dgbtf2.f
@@ -1,88 +1,157 @@
- SUBROUTINE DGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION AB( LDAB, * )
-* ..
-*
+*> \brief \b DGBTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* DGBTF2 computes an LU factorization of a real m-by-n band matrix A
-* using partial pivoting with row interchanges.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBTF2 computes an LU factorization of a real m-by-n band matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup doubleGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U, because of fill-in resulting from the row
+*> interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U, because of fill-in resulting from the row
-* interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgbtrf.f b/SRC/dgbtrf.f
index e86dc0b5..be7d1e3c 100644
--- a/SRC/dgbtrf.f
+++ b/SRC/dgbtrf.f
@@ -1,87 +1,156 @@
- SUBROUTINE DGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION AB( LDAB, * )
-* ..
-*
+*> \brief \b DGBTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* DGBTRF computes an LU factorization of a real m-by-n band matrix A
-* using partial pivoting with row interchanges.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBTRF computes an LU factorization of a real m-by-n band matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup doubleGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U because of fill-in resulting from the row interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U because of fill-in resulting from the row interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgbtrs.f b/SRC/dgbtrs.f
index 8fa729ae..cc7b0739 100644
--- a/SRC/dgbtrs.f
+++ b/SRC/dgbtrs.f
@@ -1,10 +1,139 @@
+*> \brief \b DGBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBTRS solves a system of linear equations
+*> A * X = B or A**T * X = B
+*> with a general band matrix A using the LU factorization computed
+*> by DGBTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T* X = B (Transpose)
+*> = 'C': A**T* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= N, row i of the matrix was
+*> interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+* =====================================================================
SUBROUTINE DGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,61 +144,6 @@
DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DGBTRS solves a system of linear equations
-* A * X = B or A**T * X = B
-* with a general band matrix A using the LU factorization computed
-* by DGBTRF.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T* X = B (Transpose)
-* = 'C': A**T* X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= N, row i of the matrix was
-* interchanged with row IPIV(i).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgebak.f b/SRC/dgebak.f
index 1044bfbb..87377472 100644
--- a/SRC/dgebak.f
+++ b/SRC/dgebak.f
@@ -1,69 +1,139 @@
- SUBROUTINE DGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOB, SIDE
- INTEGER IHI, ILO, INFO, LDV, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION SCALE( * ), V( LDV, * )
-* ..
-*
+*> \brief \b DGEBAK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB, SIDE
+* INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION SCALE( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* DGEBAK forms the right or left eigenvectors of a real general matrix
-* by backward transformation on the computed eigenvectors of the
-* balanced matrix output by DGEBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEBAK forms the right or left eigenvectors of a real general matrix
+*> by backward transformation on the computed eigenvectors of the
+*> balanced matrix output by DGEBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the type of backward transformation required:
-* = 'N', do nothing, return immediately;
-* = 'P', do backward transformation for permutation only;
-* = 'S', do backward transformation for scaling only;
-* = 'B', do backward transformations for both permutation and
-* scaling.
-* JOB must be the same as the argument JOB supplied to DGEBAL.
-*
-* SIDE (input) CHARACTER*1
-* = 'R': V contains right eigenvectors;
-* = 'L': V contains left eigenvectors.
-*
-* N (input) INTEGER
-* The number of rows of the matrix V. N >= 0.
-*
-* ILO (input) INTEGER
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the type of backward transformation required:
+*> = 'N', do nothing, return immediately;
+*> = 'P', do backward transformation for permutation only;
+*> = 'S', do backward transformation for scaling only;
+*> = 'B', do backward transformations for both permutation and
+*> scaling.
+*> JOB must be the same as the argument JOB supplied to DGEBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': V contains right eigenvectors;
+*> = 'L': V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrix V. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> The integers ILO and IHI determined by DGEBAL.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutation and scaling factors, as returned
+*> by DGEBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix V. M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,M)
+*> On entry, the matrix of right or left eigenvectors to be
+*> transformed, as returned by DHSEIN or DTREVC.
+*> On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IHI (input) INTEGER
-* The integers ILO and IHI determined by DGEBAL.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SCALE (input) DOUBLE PRECISION array, dimension (N)
-* Details of the permutation and scaling factors, as returned
-* by DGEBAL.
+*> \date November 2011
*
-* M (input) INTEGER
-* The number of columns of the matrix V. M >= 0.
+*> \ingroup doubleGEcomputational
*
-* V (input/output) DOUBLE PRECISION array, dimension (LDV,M)
-* On entry, the matrix of right or left eigenvectors to be
-* transformed, as returned by DHSEIN or DTREVC.
-* On exit, V is overwritten by the transformed eigenvectors.
+* =====================================================================
+ SUBROUTINE DGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
+ $ INFO )
*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,N).
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
+* .. Scalar Arguments ..
+ CHARACTER JOB, SIDE
+ INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION SCALE( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgebal.f b/SRC/dgebal.f
index 0cbe0999..a8e297da 100644
--- a/SRC/dgebal.f
+++ b/SRC/dgebal.f
@@ -1,104 +1,150 @@
- SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- CHARACTER JOB
- INTEGER IHI, ILO, INFO, LDA, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), SCALE( * )
-* ..
-*
+*> \brief \b DGEBAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), SCALE( * )
+* ..
+*
* Purpose
* =======
*
-* DGEBAL balances a general real matrix A. This involves, first,
-* permuting A by a similarity transformation to isolate eigenvalues
-* in the first 1 to ILO-1 and last IHI+1 to N elements on the
-* diagonal; and second, applying a diagonal similarity transformation
-* to rows and columns ILO to IHI to make the rows and columns as
-* close in norm as possible. Both steps are optional.
-*
-* Balancing may reduce the 1-norm of the matrix, and improve the
-* accuracy of the computed eigenvalues and/or eigenvectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEBAL balances a general real matrix A. This involves, first,
+*> permuting A by a similarity transformation to isolate eigenvalues
+*> in the first 1 to ILO-1 and last IHI+1 to N elements on the
+*> diagonal; and second, applying a diagonal similarity transformation
+*> to rows and columns ILO to IHI to make the rows and columns as
+*> close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrix, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the operations to be performed on A:
-* = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0
-* for i = 1,...,N;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the input matrix A.
-* On exit, A is overwritten by the balanced matrix.
-* If JOB = 'N', A is not referenced.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the operations to be performed on A:
+*> = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0
+*> for i = 1,...,N;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ILO (output) INTEGER
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IHI (output) INTEGER
-* ILO and IHI are set to integers such that on exit
-* A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
-* If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \date November 2011
*
-* SCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied to
-* A. If P(j) is the index of the row and column interchanged
-* with row and column j and D(j) is the scaling factor
-* applied to row and column j, then
-* SCALE(j) = P(j) for j = 1,...,ILO-1
-* = D(j) for j = ILO,...,IHI
-* = P(j) for j = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> ILO (output) INTEGER
+*>
+*> IHI (output) INTEGER
+*> ILO and IHI are set to integers such that on exit
+*> A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
+*> If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*>
+*> SCALE (output) DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied to
+*> A. If P(j) is the index of the row and column interchanged
+*> with row and column j and D(j) is the scaling factor
+*> applied to row and column j, then
+*> SCALE(j) = P(j) for j = 1,...,ILO-1
+*> = D(j) for j = ILO,...,IHI
+*> = P(j) for j = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The permutations consist of row and column interchanges which put
+*> the matrix in the form
+*>
+*> ( T1 X Y )
+*> P A P = ( 0 B Z )
+*> ( 0 0 T2 )
+*>
+*> where T1 and T2 are upper triangular matrices whose eigenvalues lie
+*> along the diagonal. The column indices ILO and IHI mark the starting
+*> and ending columns of the submatrix B. Balancing consists of applying
+*> a diagonal similarity transformation inv(D) * B * D to make the
+*> 1-norms of each row of B and its corresponding column nearly equal.
+*> The output matrix is
+*>
+*> ( T1 X*D Y )
+*> ( 0 inv(D)*B*D inv(D)*Z ).
+*> ( 0 0 T2 )
+*>
+*> Information about the permutations P and the diagonal matrix D is
+*> returned in the vector SCALE.
+*>
+*> This subroutine is based on the EISPACK routine BALANC.
+*>
+*> Modified by Tzu-Yi Chen, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
*
-* The permutations consist of row and column interchanges which put
-* the matrix in the form
-*
-* ( T1 X Y )
-* P A P = ( 0 B Z )
-* ( 0 0 T2 )
-*
-* where T1 and T2 are upper triangular matrices whose eigenvalues lie
-* along the diagonal. The column indices ILO and IHI mark the starting
-* and ending columns of the submatrix B. Balancing consists of applying
-* a diagonal similarity transformation inv(D) * B * D to make the
-* 1-norms of each row of B and its corresponding column nearly equal.
-* The output matrix is
-*
-* ( T1 X*D Y )
-* ( 0 inv(D)*B*D inv(D)*Z ).
-* ( 0 0 T2 )
-*
-* Information about the permutations P and the diagonal matrix D is
-* returned in the vector SCALE.
-*
-* This subroutine is based on the EISPACK routine BALANC.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by Tzu-Yi Chen, Computer Science Division, University of
-* California at Berkeley, USA
+* .. Scalar Arguments ..
+ CHARACTER JOB
+ INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), SCALE( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgebd2.f b/SRC/dgebd2.f
index d0efbf48..366d1c0d 100644
--- a/SRC/dgebd2.f
+++ b/SRC/dgebd2.f
@@ -1,126 +1,159 @@
- SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
- $ TAUQ( * ), WORK( * )
-* ..
-*
+*> \brief \b DGEBD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
+* $ TAUQ( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEBD2 reduces a real general m by n matrix A to upper or lower
-* bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
-*
-* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEBD2 reduces a real general m by n matrix A to upper or lower
+*> bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
+*>
+*> If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the m by n general matrix to be reduced.
-* On exit,
-* if m >= n, the diagonal and the first superdiagonal are
-* overwritten with the upper bidiagonal matrix B; the
-* elements below the diagonal, with the array TAUQ, represent
-* the orthogonal matrix Q as a product of elementary
-* reflectors, and the elements above the first superdiagonal,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors;
-* if m < n, the diagonal and the first subdiagonal are
-* overwritten with the lower bidiagonal matrix B; the
-* elements below the first subdiagonal, with the array TAUQ,
-* represent the orthogonal matrix Q as a product of
-* elementary reflectors, and the elements above the diagonal,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B:
-* D(i) = A(i,i).
-*
-* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
-* The off-diagonal elements of the bidiagonal matrix B:
-* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
-* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAUQ (output) DOUBLE PRECISION array dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q. See Further Details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAUP (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix P. See Further Details.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (max(M,N))
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
+*> The off-diagonal elements of the bidiagonal matrix B:
+*> if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
+*> if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*>
+*> TAUQ (output) DOUBLE PRECISION array dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Q. See Further Details.
+*>
+*> TAUP (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix P. See Further Details.
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (max(M,N))
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> If m >= n,
+*>
+*> Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors;
+*> v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i);
+*> u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n,
+*>
+*> Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors;
+*> v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
+*> u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The contents of A on exit are illustrated by the following examples:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
+*> ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
+*> ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
+*> ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
+*> ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
+*> ( v1 v2 v3 v4 v5 )
+*>
+*> where d and e denote diagonal and off-diagonal elements of B, vi
+*> denotes an element of the vector defining H(i), and ui an element of
+*> the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* If m >= n,
-*
-* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors;
-* v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i);
-* u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n,
-*
-* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors;
-* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
-* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The contents of A on exit are illustrated by the following examples:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
-* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
-* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
-* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
-* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
-* ( v1 v2 v3 v4 v5 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of B, vi
-* denotes an element of the vector defining H(i), and ui an element of
-* the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
+ $ TAUQ( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgebrd.f b/SRC/dgebrd.f
index f4118c7d..b9520583 100644
--- a/SRC/dgebrd.f
+++ b/SRC/dgebrd.f
@@ -1,138 +1,172 @@
- SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
- $ TAUQ( * ), WORK( * )
-* ..
-*
+*> \brief \b DGEBRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
+* $ TAUQ( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEBRD reduces a general real M-by-N matrix A to upper or lower
-* bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
-*
-* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEBRD reduces a general real M-by-N matrix A to upper or lower
+*> bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
+*>
+*> If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N general matrix to be reduced.
-* On exit,
-* if m >= n, the diagonal and the first superdiagonal are
-* overwritten with the upper bidiagonal matrix B; the
-* elements below the diagonal, with the array TAUQ, represent
-* the orthogonal matrix Q as a product of elementary
-* reflectors, and the elements above the first superdiagonal,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors;
-* if m < n, the diagonal and the first subdiagonal are
-* overwritten with the lower bidiagonal matrix B; the
-* elements below the first subdiagonal, with the array TAUQ,
-* represent the orthogonal matrix Q as a product of
-* elementary reflectors, and the elements above the diagonal,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B:
-* D(i) = A(i,i).
-*
-* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
-* The off-diagonal elements of the bidiagonal matrix B:
-* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
-* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
-*
-* TAUQ (output) DOUBLE PRECISION array dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q. See Further Details.
-*
-* TAUP (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix P. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,M,N).
-* For optimum performance LWORK >= (M+N)*NB, where NB
-* is the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
+*> The off-diagonal elements of the bidiagonal matrix B:
+*> if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
+*> if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*>
+*> TAUQ (output) DOUBLE PRECISION array dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Q. See Further Details.
+*>
+*> TAUP (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix P. See Further Details.
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The length of the array WORK. LWORK >= max(1,M,N).
+*> For optimum performance LWORK >= (M+N)*NB, where NB
+*> is the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> If m >= n,
+*>
+*> Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors;
+*> v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i);
+*> u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n,
+*>
+*> Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors;
+*> v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
+*> u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The contents of A on exit are illustrated by the following examples:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
+*> ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
+*> ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
+*> ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
+*> ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
+*> ( v1 v2 v3 v4 v5 )
+*>
+*> where d and e denote diagonal and off-diagonal elements of B, vi
+*> denotes an element of the vector defining H(i), and ui an element of
+*> the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
+ $ INFO )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* If m >= n,
-*
-* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors;
-* v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i);
-* u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n,
-*
-* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors;
-* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
-* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The contents of A on exit are illustrated by the following examples:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
-* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
-* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
-* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
-* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
-* ( v1 v2 v3 v4 v5 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of B, vi
-* denotes an element of the vector defining H(i), and ui an element of
-* the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
+ $ TAUQ( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgecon.f b/SRC/dgecon.f
index 23fa9a37..15b3f935 100644
--- a/SRC/dgecon.f
+++ b/SRC/dgecon.f
@@ -1,12 +1,125 @@
+*> \brief \b DGECON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGECON estimates the reciprocal of the condition number of a general
+*> real matrix A, in either the 1-norm or the infinity-norm, using
+*> the LU factorization computed by DGETRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by DGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEcomputational
+*
+* =====================================================================
SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,52 +131,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGECON estimates the reciprocal of the condition number of a general
-* real matrix A, in either the 1-norm or the infinity-norm, using
-* the LU factorization computed by DGETRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by DGETRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* ANORM (input) DOUBLE PRECISION
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgeequ.f b/SRC/dgeequ.f
index f69fa851..27aa250c 100644
--- a/SRC/dgeequ.f
+++ b/SRC/dgeequ.f
@@ -1,78 +1,148 @@
- SUBROUTINE DGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
- DOUBLE PRECISION AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( * ), R( * )
-* ..
-*
+*> \brief \b DGEEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( * ), R( * )
+* ..
+*
* Purpose
* =======
*
-* DGEEQU computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
-*
-* R(i) and C(j) are restricted to be between SMLNUM = smallest safe
-* number and BIGNUM = largest safe number. Use of these scaling
-* factors is not guaranteed to reduce the condition number of A but
-* works well in practice.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEEQU computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number. Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix whose equilibration factors are
-* to be computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix whose equilibration factors are
+*> to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) DOUBLE PRECISION array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) DOUBLE PRECISION
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup doubleGEcomputational
*
-* COLCND (output) DOUBLE PRECISION
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE DGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+ $ INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+ DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( * ), R( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeequb.f b/SRC/dgeequb.f
index 5d748e78..5d251ef1 100644
--- a/SRC/dgeequb.f
+++ b/SRC/dgeequb.f
@@ -1,90 +1,155 @@
- SUBROUTINE DGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
- DOUBLE PRECISION AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( * ), R( * )
-* ..
-*
+*> \brief \b DGEEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( * ), R( * )
+* ..
+*
* Purpose
* =======
*
-* DGEEQUB computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
-* the radix.
-*
-* R(i) and C(j) are restricted to be a power of the radix between
-* SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
-* of these scaling factors is not guaranteed to reduce the condition
-* number of A but works well in practice.
-*
-* This routine differs from DGEEQU by restricting the scaling factors
-* to a power of the radix. Baring over- and underflow, scaling by
-* these factors introduces no additional rounding errors. However, the
-* scaled entries' magnitured are no longer approximately 1 but lie
-* between sqrt(radix) and 1/sqrt(radix).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEEQUB computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
+*> the radix.
+*>
+*> R(i) and C(j) are restricted to be a power of the radix between
+*> SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
+*> of these scaling factors is not guaranteed to reduce the condition
+*> number of A but works well in practice.
+*>
+*> This routine differs from DGEEQU by restricting the scaling factors
+*> to a power of the radix. Baring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors. However, the
+*> scaled entries' magnitured are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix whose equilibration factors are
-* to be computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix whose equilibration factors are
+*> to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) DOUBLE PRECISION array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) DOUBLE PRECISION
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup doubleGEcomputational
*
-* COLCND (output) DOUBLE PRECISION
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE DGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+ $ INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+ DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( * ), R( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgees.f b/SRC/dgees.f
index 7da117fa..3fd002d7 100644
--- a/SRC/dgees.f
+++ b/SRC/dgees.f
@@ -1,10 +1,218 @@
+*> \brief <b> DGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI,
+* VS, LDVS, WORK, LWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVS, SORT
+* INTEGER INFO, LDA, LDVS, LWORK, N, SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* DOUBLE PRECISION A( LDA, * ), VS( LDVS, * ), WI( * ), WORK( * ),
+* $ WR( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELECT
+* EXTERNAL SELECT
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEES computes for an N-by-N real nonsymmetric matrix A, the
+*> eigenvalues, the real Schur form T, and, optionally, the matrix of
+*> Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
+*>
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> real Schur form so that selected eigenvalues are at the top left.
+*> The leading columns of Z then form an orthonormal basis for the
+*> invariant subspace corresponding to the selected eigenvalues.
+*>
+*> A matrix is in real Schur form if it is upper quasi-triangular with
+*> 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in the
+*> form
+*> [ a b ]
+*> [ c a ]
+*>
+*> where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVS
+*> \verbatim
+*> JOBVS is CHARACTER*1
+*> = 'N': Schur vectors are not computed;
+*> = 'V': Schur vectors are computed.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is procedure) LOGICAL FUNCTION of two DOUBLE PRECISION arguments
+*> SELECT must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'S', SELECT is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> If SORT = 'N', SELECT is not referenced.
+*> An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
+*> SELECT(WR(j),WI(j)) is true; i.e., if either one of a complex
+*> conjugate pair of eigenvalues is selected, then both complex
+*> eigenvalues are selected.
+*> Note that a selected complex eigenvalue may no longer
+*> satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
+*> ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned); in this
+*> case INFO is set to N+2 (see INFO below).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten by its real Schur form T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELECT is true. (Complex conjugate
+*> pairs for which SELECT is true for either
+*> eigenvalue count as 2.)
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> WR and WI contain the real and imaginary parts,
+*> respectively, of the computed eigenvalues in the same order
+*> that they appear on the diagonal of the output Schur form T.
+*> Complex conjugate pairs of eigenvalues will appear
+*> consecutively with the eigenvalue having the positive
+*> imaginary part first.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is DOUBLE PRECISION array, dimension (LDVS,N)
+*> If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
+*> vectors.
+*> If JOBVS = 'N', VS is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> The leading dimension of the array VS. LDVS >= 1; if
+*> JOBVS = 'V', LDVS >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) contains the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,3*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is
+*> <= N: the QR algorithm failed to compute all the
+*> eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
+*> contain those eigenvalues which have converged; if
+*> JOBVS = 'V', VS contains the matrix which reduces A
+*> to its partially converged Schur form.
+*> = N+1: the eigenvalues could not be reordered because some
+*> eigenvalues were too close to separate (the problem
+*> is very ill-conditioned);
+*> = N+2: after reordering, roundoff changed values of some
+*> complex eigenvalues so that leading eigenvalues in
+*> the Schur form no longer satisfy SELECT=.TRUE. This
+*> could also be caused by underflow due to scaling.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+* =====================================================================
SUBROUTINE DGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI,
$ VS, LDVS, WORK, LWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVS, SORT
@@ -20,122 +228,6 @@
EXTERNAL SELECT
* ..
*
-* Purpose
-* =======
-*
-* DGEES computes for an N-by-N real nonsymmetric matrix A, the
-* eigenvalues, the real Schur form T, and, optionally, the matrix of
-* Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
-*
-* Optionally, it also orders the eigenvalues on the diagonal of the
-* real Schur form so that selected eigenvalues are at the top left.
-* The leading columns of Z then form an orthonormal basis for the
-* invariant subspace corresponding to the selected eigenvalues.
-*
-* A matrix is in real Schur form if it is upper quasi-triangular with
-* 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in the
-* form
-* [ a b ]
-* [ c a ]
-*
-* where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
-*
-* Arguments
-* =========
-*
-* JOBVS (input) CHARACTER*1
-* = 'N': Schur vectors are not computed;
-* = 'V': Schur vectors are computed.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELECT).
-*
-* SELECT (external procedure) LOGICAL FUNCTION of two DOUBLE PRECISION arguments
-* SELECT must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'S', SELECT is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* If SORT = 'N', SELECT is not referenced.
-* An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
-* SELECT(WR(j),WI(j)) is true; i.e., if either one of a complex
-* conjugate pair of eigenvalues is selected, then both complex
-* eigenvalues are selected.
-* Note that a selected complex eigenvalue may no longer
-* satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
-* ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned); in this
-* case INFO is set to N+2 (see INFO below).
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten by its real Schur form T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELECT is true. (Complex conjugate
-* pairs for which SELECT is true for either
-* eigenvalue count as 2.)
-*
-* WR (output) DOUBLE PRECISION array, dimension (N)
-*
-* WI (output) DOUBLE PRECISION array, dimension (N)
-* WR and WI contain the real and imaginary parts,
-* respectively, of the computed eigenvalues in the same order
-* that they appear on the diagonal of the output Schur form T.
-* Complex conjugate pairs of eigenvalues will appear
-* consecutively with the eigenvalue having the positive
-* imaginary part first.
-*
-* VS (output) DOUBLE PRECISION array, dimension (LDVS,N)
-* If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
-* vectors.
-* If JOBVS = 'N', VS is not referenced.
-*
-* LDVS (input) INTEGER
-* The leading dimension of the array VS. LDVS >= 1; if
-* JOBVS = 'V', LDVS >= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) contains the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,3*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is
-* <= N: the QR algorithm failed to compute all the
-* eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
-* contain those eigenvalues which have converged; if
-* JOBVS = 'V', VS contains the matrix which reduces A
-* to its partially converged Schur form.
-* = N+1: the eigenvalues could not be reordered because some
-* eigenvalues were too close to separate (the problem
-* is very ill-conditioned);
-* = N+2: after reordering, roundoff changed values of some
-* complex eigenvalues so that leading eigenvalues in
-* the Schur form no longer satisfy SELECT=.TRUE. This
-* could also be caused by underflow due to scaling.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgeesx.f b/SRC/dgeesx.f
index 8852f1b8..10a94684 100644
--- a/SRC/dgeesx.f
+++ b/SRC/dgeesx.f
@@ -1,11 +1,284 @@
+*> \brief <b> DGEESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM,
+* WR, WI, VS, LDVS, RCONDE, RCONDV, WORK, LWORK,
+* IWORK, LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVS, SENSE, SORT
+* INTEGER INFO, LDA, LDVS, LIWORK, LWORK, N, SDIM
+* DOUBLE PRECISION RCONDE, RCONDV
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), VS( LDVS, * ), WI( * ), WORK( * ),
+* $ WR( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELECT
+* EXTERNAL SELECT
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEESX computes for an N-by-N real nonsymmetric matrix A, the
+*> eigenvalues, the real Schur form T, and, optionally, the matrix of
+*> Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
+*>
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> real Schur form so that selected eigenvalues are at the top left;
+*> computes a reciprocal condition number for the average of the
+*> selected eigenvalues (RCONDE); and computes a reciprocal condition
+*> number for the right invariant subspace corresponding to the
+*> selected eigenvalues (RCONDV). The leading columns of Z form an
+*> orthonormal basis for this invariant subspace.
+*>
+*> For further explanation of the reciprocal condition numbers RCONDE
+*> and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
+*> these quantities are called s and sep respectively).
+*>
+*> A real matrix is in real Schur form if it is upper quasi-triangular
+*> with 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in
+*> the form
+*> [ a b ]
+*> [ c a ]
+*>
+*> where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVS
+*> \verbatim
+*> JOBVS is CHARACTER*1
+*> = 'N': Schur vectors are not computed;
+*> = 'V': Schur vectors are computed.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is procedure) LOGICAL FUNCTION of two DOUBLE PRECISION arguments
+*> SELECT must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'S', SELECT is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> If SORT = 'N', SELECT is not referenced.
+*> An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
+*> SELECT(WR(j),WI(j)) is true; i.e., if either one of a
+*> complex conjugate pair of eigenvalues is selected, then both
+*> are. Note that a selected complex eigenvalue may no longer
+*> satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
+*> ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned); in this
+*> case INFO may be set to N+3 (see INFO below).
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': None are computed;
+*> = 'E': Computed for average of selected eigenvalues only;
+*> = 'V': Computed for selected right invariant subspace only;
+*> = 'B': Computed for both.
+*> If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A is overwritten by its real Schur form T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELECT is true. (Complex conjugate
+*> pairs for which SELECT is true for either
+*> eigenvalue count as 2.)
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> WR and WI contain the real and imaginary parts, respectively,
+*> of the computed eigenvalues, in the same order that they
+*> appear on the diagonal of the output Schur form T. Complex
+*> conjugate pairs of eigenvalues appear consecutively with the
+*> eigenvalue having the positive imaginary part first.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is DOUBLE PRECISION array, dimension (LDVS,N)
+*> If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
+*> vectors.
+*> If JOBVS = 'N', VS is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> The leading dimension of the array VS. LDVS >= 1, and if
+*> JOBVS = 'V', LDVS >= N.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION
+*> If SENSE = 'E' or 'B', RCONDE contains the reciprocal
+*> condition number for the average of the selected eigenvalues.
+*> Not referenced if SENSE = 'N' or 'V'.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION
+*> If SENSE = 'V' or 'B', RCONDV contains the reciprocal
+*> condition number for the selected right invariant subspace.
+*> Not referenced if SENSE = 'N' or 'E'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,3*N).
+*> Also, if SENSE = 'E' or 'V' or 'B',
+*> LWORK >= N+2*SDIM*(N-SDIM), where SDIM is the number of
+*> selected eigenvalues computed by this routine. Note that
+*> N+2*SDIM*(N-SDIM) <= N+N*N/2. Note also that an error is only
+*> returned if LWORK < max(1,3*N), but if SENSE = 'E' or 'V' or
+*> 'B' this may not be large enough.
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates upper bounds on the optimal sizes of the
+*> arrays WORK and IWORK, returns these values as the first
+*> entries of the WORK and IWORK arrays, and no error messages
+*> related to LWORK or LIWORK are issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> LIWORK >= 1; if SENSE = 'V' or 'B', LIWORK >= SDIM*(N-SDIM).
+*> Note that SDIM*(N-SDIM) <= N*N/4. Note also that an error is
+*> only returned if LIWORK < 1, but if SENSE = 'V' or 'B' this
+*> may not be large enough.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates upper bounds on the optimal sizes of
+*> the arrays WORK and IWORK, returns these values as the first
+*> entries of the WORK and IWORK arrays, and no error messages
+*> related to LWORK or LIWORK are issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is
+*> <= N: the QR algorithm failed to compute all the
+*> eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
+*> contain those eigenvalues which have converged; if
+*> JOBVS = 'V', VS contains the transformation which
+*> reduces A to its partially converged Schur form.
+*> = N+1: the eigenvalues could not be reordered because some
+*> eigenvalues were too close to separate (the problem
+*> is very ill-conditioned);
+*> = N+2: after reordering, roundoff changed values of some
+*> complex eigenvalues so that leading eigenvalues in
+*> the Schur form no longer satisfy SELECT=.TRUE. This
+*> could also be caused by underflow due to scaling.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+* =====================================================================
SUBROUTINE DGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM,
$ WR, WI, VS, LDVS, RCONDE, RCONDV, WORK, LWORK,
$ IWORK, LIWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK eigen routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVS, SENSE, SORT
@@ -23,168 +296,6 @@
EXTERNAL SELECT
* ..
*
-* Purpose
-* =======
-*
-* DGEESX computes for an N-by-N real nonsymmetric matrix A, the
-* eigenvalues, the real Schur form T, and, optionally, the matrix of
-* Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
-*
-* Optionally, it also orders the eigenvalues on the diagonal of the
-* real Schur form so that selected eigenvalues are at the top left;
-* computes a reciprocal condition number for the average of the
-* selected eigenvalues (RCONDE); and computes a reciprocal condition
-* number for the right invariant subspace corresponding to the
-* selected eigenvalues (RCONDV). The leading columns of Z form an
-* orthonormal basis for this invariant subspace.
-*
-* For further explanation of the reciprocal condition numbers RCONDE
-* and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
-* these quantities are called s and sep respectively).
-*
-* A real matrix is in real Schur form if it is upper quasi-triangular
-* with 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in
-* the form
-* [ a b ]
-* [ c a ]
-*
-* where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
-*
-* Arguments
-* =========
-*
-* JOBVS (input) CHARACTER*1
-* = 'N': Schur vectors are not computed;
-* = 'V': Schur vectors are computed.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELECT).
-*
-* SELECT (external procedure) LOGICAL FUNCTION of two DOUBLE PRECISION arguments
-* SELECT must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'S', SELECT is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* If SORT = 'N', SELECT is not referenced.
-* An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
-* SELECT(WR(j),WI(j)) is true; i.e., if either one of a
-* complex conjugate pair of eigenvalues is selected, then both
-* are. Note that a selected complex eigenvalue may no longer
-* satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
-* ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned); in this
-* case INFO may be set to N+3 (see INFO below).
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': None are computed;
-* = 'E': Computed for average of selected eigenvalues only;
-* = 'V': Computed for selected right invariant subspace only;
-* = 'B': Computed for both.
-* If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the N-by-N matrix A.
-* On exit, A is overwritten by its real Schur form T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELECT is true. (Complex conjugate
-* pairs for which SELECT is true for either
-* eigenvalue count as 2.)
-*
-* WR (output) DOUBLE PRECISION array, dimension (N)
-*
-* WI (output) DOUBLE PRECISION array, dimension (N)
-* WR and WI contain the real and imaginary parts, respectively,
-* of the computed eigenvalues, in the same order that they
-* appear on the diagonal of the output Schur form T. Complex
-* conjugate pairs of eigenvalues appear consecutively with the
-* eigenvalue having the positive imaginary part first.
-*
-* VS (output) DOUBLE PRECISION array, dimension (LDVS,N)
-* If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
-* vectors.
-* If JOBVS = 'N', VS is not referenced.
-*
-* LDVS (input) INTEGER
-* The leading dimension of the array VS. LDVS >= 1, and if
-* JOBVS = 'V', LDVS >= N.
-*
-* RCONDE (output) DOUBLE PRECISION
-* If SENSE = 'E' or 'B', RCONDE contains the reciprocal
-* condition number for the average of the selected eigenvalues.
-* Not referenced if SENSE = 'N' or 'V'.
-*
-* RCONDV (output) DOUBLE PRECISION
-* If SENSE = 'V' or 'B', RCONDV contains the reciprocal
-* condition number for the selected right invariant subspace.
-* Not referenced if SENSE = 'N' or 'E'.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,3*N).
-* Also, if SENSE = 'E' or 'V' or 'B',
-* LWORK >= N+2*SDIM*(N-SDIM), where SDIM is the number of
-* selected eigenvalues computed by this routine. Note that
-* N+2*SDIM*(N-SDIM) <= N+N*N/2. Note also that an error is only
-* returned if LWORK < max(1,3*N), but if SENSE = 'E' or 'V' or
-* 'B' this may not be large enough.
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates upper bounds on the optimal sizes of the
-* arrays WORK and IWORK, returns these values as the first
-* entries of the WORK and IWORK arrays, and no error messages
-* related to LWORK or LIWORK are issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* LIWORK >= 1; if SENSE = 'V' or 'B', LIWORK >= SDIM*(N-SDIM).
-* Note that SDIM*(N-SDIM) <= N*N/4. Note also that an error is
-* only returned if LIWORK < 1, but if SENSE = 'V' or 'B' this
-* may not be large enough.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates upper bounds on the optimal sizes of
-* the arrays WORK and IWORK, returns these values as the first
-* entries of the WORK and IWORK arrays, and no error messages
-* related to LWORK or LIWORK are issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is
-* <= N: the QR algorithm failed to compute all the
-* eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
-* contain those eigenvalues which have converged; if
-* JOBVS = 'V', VS contains the transformation which
-* reduces A to its partially converged Schur form.
-* = N+1: the eigenvalues could not be reordered because some
-* eigenvalues were too close to separate (the problem
-* is very ill-conditioned);
-* = N+2: after reordering, roundoff changed values of some
-* complex eigenvalues so that leading eigenvalues in
-* the Schur form no longer satisfy SELECT=.TRUE. This
-* could also be caused by underflow due to scaling.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgeev.f b/SRC/dgeev.f
index e2129fe4..85f48fe2 100644
--- a/SRC/dgeev.f
+++ b/SRC/dgeev.f
@@ -1,10 +1,191 @@
+*> \brief <b> DGEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR,
+* LDVR, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WI( * ), WORK( * ), WR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEEV computes for an N-by-N real nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> The right eigenvector v(j) of A satisfies
+*> A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*> u(j)**T * A = lambda(j) * u(j)**T
+*> where u(j)**T denotes the transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': left eigenvectors of A are not computed;
+*> = 'V': left eigenvectors of A are computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': right eigenvectors of A are not computed;
+*> = 'V': right eigenvectors of A are computed.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> WR and WI contain the real and imaginary parts,
+*> respectively, of the computed eigenvalues. Complex
+*> conjugate pairs of eigenvalues appear consecutively
+*> with the eigenvalue having the positive imaginary part
+*> first.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order
+*> as their eigenvalues.
+*> If JOBVL = 'N', VL is not referenced.
+*> If the j-th eigenvalue is real, then u(j) = VL(:,j),
+*> the j-th column of VL.
+*> If the j-th and (j+1)-st eigenvalues form a complex
+*> conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
+*> u(j+1) = VL(:,j) - i*VL(:,j+1).
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; if
+*> JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order
+*> as their eigenvalues.
+*> If JOBVR = 'N', VR is not referenced.
+*> If the j-th eigenvalue is real, then v(j) = VR(:,j),
+*> the j-th column of VR.
+*> If the j-th and (j+1)-st eigenvalues form a complex
+*> conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
+*> v(j+1) = VR(:,j) - i*VR(:,j+1).
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1; if
+*> JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,3*N), and
+*> if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good
+*> performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the QR algorithm failed to compute all the
+*> eigenvalues, and no eigenvectors have been computed;
+*> elements i+1:N of WR and WI contain eigenvalues which
+*> have converged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+* =====================================================================
SUBROUTINE DGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR,
$ LDVR, WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -15,103 +196,6 @@
$ WI( * ), WORK( * ), WR( * )
* ..
*
-* Purpose
-* =======
-*
-* DGEEV computes for an N-by-N real nonsymmetric matrix A, the
-* eigenvalues and, optionally, the left and/or right eigenvectors.
-*
-* The right eigenvector v(j) of A satisfies
-* A * v(j) = lambda(j) * v(j)
-* where lambda(j) is its eigenvalue.
-* The left eigenvector u(j) of A satisfies
-* u(j)**T * A = lambda(j) * u(j)**T
-* where u(j)**T denotes the transpose of u(j).
-*
-* The computed eigenvectors are normalized to have Euclidean norm
-* equal to 1 and largest component real.
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': left eigenvectors of A are not computed;
-* = 'V': left eigenvectors of A are computed.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': right eigenvectors of A are not computed;
-* = 'V': right eigenvectors of A are computed.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WR (output) DOUBLE PRECISION array, dimension (N)
-*
-* WI (output) DOUBLE PRECISION array, dimension (N)
-* WR and WI contain the real and imaginary parts,
-* respectively, of the computed eigenvalues. Complex
-* conjugate pairs of eigenvalues appear consecutively
-* with the eigenvalue having the positive imaginary part
-* first.
-*
-* VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order
-* as their eigenvalues.
-* If JOBVL = 'N', VL is not referenced.
-* If the j-th eigenvalue is real, then u(j) = VL(:,j),
-* the j-th column of VL.
-* If the j-th and (j+1)-st eigenvalues form a complex
-* conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
-* u(j+1) = VL(:,j) - i*VL(:,j+1).
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; if
-* JOBVL = 'V', LDVL >= N.
-*
-* VR (output) DOUBLE PRECISION array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order
-* as their eigenvalues.
-* If JOBVR = 'N', VR is not referenced.
-* If the j-th eigenvalue is real, then v(j) = VR(:,j),
-* the j-th column of VR.
-* If the j-th and (j+1)-st eigenvalues form a complex
-* conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
-* v(j+1) = VR(:,j) - i*VR(:,j+1).
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1; if
-* JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,3*N), and
-* if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good
-* performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the QR algorithm failed to compute all the
-* eigenvalues, and no eigenvectors have been computed;
-* elements i+1:N of WR and WI contain eigenvalues which
-* have converged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgeevx.f b/SRC/dgeevx.f
index 483c5a14..2778f8e7 100644
--- a/SRC/dgeevx.f
+++ b/SRC/dgeevx.f
@@ -1,11 +1,307 @@
+*> \brief <b> DGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, WR, WI,
+* VL, LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM,
+* RCONDE, RCONDV, WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER BALANC, JOBVL, JOBVR, SENSE
+* INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
+* DOUBLE PRECISION ABNRM
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), RCONDE( * ), RCONDV( * ),
+* $ SCALE( * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WI( * ), WORK( * ), WR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEEVX computes for an N-by-N real nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> Optionally also, it computes a balancing transformation to improve
+*> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
+*> SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
+*> (RCONDE), and reciprocal condition numbers for the right
+*> eigenvectors (RCONDV).
+*>
+*> The right eigenvector v(j) of A satisfies
+*> A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*> u(j)**T * A = lambda(j) * u(j)**T
+*> where u(j)**T denotes the transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*>
+*> Balancing a matrix means permuting the rows and columns to make it
+*> more nearly upper triangular, and applying a diagonal similarity
+*> transformation D * A * D**(-1), where D is a diagonal matrix, to
+*> make its rows and columns closer in norm and the condition numbers
+*> of its eigenvalues and eigenvectors smaller. The computed
+*> reciprocal condition numbers correspond to the balanced matrix.
+*> Permuting rows and columns will not change the condition numbers
+*> (in exact arithmetic) but diagonal scaling will. For further
+*> explanation of balancing, see section 4.10.2 of the LAPACK
+*> Users' Guide.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER*1
+*> Indicates how the input matrix should be diagonally scaled
+*> and/or permuted to improve the conditioning of its
+*> eigenvalues.
+*> = 'N': Do not diagonally scale or permute;
+*> = 'P': Perform permutations to make the matrix more nearly
+*> upper triangular. Do not diagonally scale;
+*> = 'S': Diagonally scale the matrix, i.e. replace A by
+*> D*A*D**(-1), where D is a diagonal matrix chosen
+*> to make the rows and columns of A more equal in
+*> norm. Do not permute;
+*> = 'B': Both diagonally scale and permute A.
+*> \endverbatim
+*> \verbatim
+*> Computed reciprocal condition numbers will be for the matrix
+*> after balancing and/or permuting. Permuting does not change
+*> condition numbers (in exact arithmetic), but balancing does.
+*> \endverbatim
+*>
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': left eigenvectors of A are not computed;
+*> = 'V': left eigenvectors of A are computed.
+*> If SENSE = 'E' or 'B', JOBVL must = 'V'.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': right eigenvectors of A are not computed;
+*> = 'V': right eigenvectors of A are computed.
+*> If SENSE = 'E' or 'B', JOBVR must = 'V'.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': None are computed;
+*> = 'E': Computed for eigenvalues only;
+*> = 'V': Computed for right eigenvectors only;
+*> = 'B': Computed for eigenvalues and right eigenvectors.
+*> \endverbatim
+*> \verbatim
+*> If SENSE = 'E' or 'B', both left and right eigenvectors
+*> must also be computed (JOBVL = 'V' and JOBVR = 'V').
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten. If JOBVL = 'V' or
+*> JOBVR = 'V', A contains the real Schur form of the balanced
+*> version of the input matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> WR and WI contain the real and imaginary parts,
+*> respectively, of the computed eigenvalues. Complex
+*> conjugate pairs of eigenvalues will appear consecutively
+*> with the eigenvalue having the positive imaginary part
+*> first.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order
+*> as their eigenvalues.
+*> If JOBVL = 'N', VL is not referenced.
+*> If the j-th eigenvalue is real, then u(j) = VL(:,j),
+*> the j-th column of VL.
+*> If the j-th and (j+1)-st eigenvalues form a complex
+*> conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
+*> u(j+1) = VL(:,j) - i*VL(:,j+1).
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; if
+*> JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order
+*> as their eigenvalues.
+*> If JOBVR = 'N', VR is not referenced.
+*> If the j-th eigenvalue is real, then v(j) = VR(:,j),
+*> the j-th column of VR.
+*> If the j-th and (j+1)-st eigenvalues form a complex
+*> conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
+*> v(j+1) = VR(:,j) - i*VR(:,j+1).
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are integer values determined when A was
+*> balanced. The balanced A(i,j) = 0 if I > J and
+*> J = 1,...,ILO-1 or I = IHI+1,...,N.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> when balancing A. If P(j) is the index of the row and column
+*> interchanged with row and column j, and D(j) is the scaling
+*> factor applied to row and column j, then
+*> SCALE(J) = P(J), for J = 1,...,ILO-1
+*> = D(J), for J = ILO,...,IHI
+*> = P(J) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] ABNRM
+*> \verbatim
+*> ABNRM is DOUBLE PRECISION
+*> The one-norm of the balanced matrix (the maximum
+*> of the sum of absolute values of elements of any column).
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension (N)
+*> RCONDE(j) is the reciprocal condition number of the j-th
+*> eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension (N)
+*> RCONDV(j) is the reciprocal condition number of the j-th
+*> right eigenvector.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. If SENSE = 'N' or 'E',
+*> LWORK >= max(1,2*N), and if JOBVL = 'V' or JOBVR = 'V',
+*> LWORK >= 3*N. If SENSE = 'V' or 'B', LWORK >= N*(N+6).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*N-2)
+*> If SENSE = 'N' or 'E', not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the QR algorithm failed to compute all the
+*> eigenvalues, and no eigenvectors or condition numbers
+*> have been computed; elements 1:ILO-1 and i+1:N of WR
+*> and WI contain eigenvalues which have converged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+* =====================================================================
SUBROUTINE DGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, WR, WI,
$ VL, LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM,
$ RCONDE, RCONDV, WORK, LWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER BALANC, JOBVL, JOBVR, SENSE
@@ -19,185 +315,6 @@
$ WI( * ), WORK( * ), WR( * )
* ..
*
-* Purpose
-* =======
-*
-* DGEEVX computes for an N-by-N real nonsymmetric matrix A, the
-* eigenvalues and, optionally, the left and/or right eigenvectors.
-*
-* Optionally also, it computes a balancing transformation to improve
-* the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
-* SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
-* (RCONDE), and reciprocal condition numbers for the right
-* eigenvectors (RCONDV).
-*
-* The right eigenvector v(j) of A satisfies
-* A * v(j) = lambda(j) * v(j)
-* where lambda(j) is its eigenvalue.
-* The left eigenvector u(j) of A satisfies
-* u(j)**T * A = lambda(j) * u(j)**T
-* where u(j)**T denotes the transpose of u(j).
-*
-* The computed eigenvectors are normalized to have Euclidean norm
-* equal to 1 and largest component real.
-*
-* Balancing a matrix means permuting the rows and columns to make it
-* more nearly upper triangular, and applying a diagonal similarity
-* transformation D * A * D**(-1), where D is a diagonal matrix, to
-* make its rows and columns closer in norm and the condition numbers
-* of its eigenvalues and eigenvectors smaller. The computed
-* reciprocal condition numbers correspond to the balanced matrix.
-* Permuting rows and columns will not change the condition numbers
-* (in exact arithmetic) but diagonal scaling will. For further
-* explanation of balancing, see section 4.10.2 of the LAPACK
-* Users' Guide.
-*
-* Arguments
-* =========
-*
-* BALANC (input) CHARACTER*1
-* Indicates how the input matrix should be diagonally scaled
-* and/or permuted to improve the conditioning of its
-* eigenvalues.
-* = 'N': Do not diagonally scale or permute;
-* = 'P': Perform permutations to make the matrix more nearly
-* upper triangular. Do not diagonally scale;
-* = 'S': Diagonally scale the matrix, i.e. replace A by
-* D*A*D**(-1), where D is a diagonal matrix chosen
-* to make the rows and columns of A more equal in
-* norm. Do not permute;
-* = 'B': Both diagonally scale and permute A.
-*
-* Computed reciprocal condition numbers will be for the matrix
-* after balancing and/or permuting. Permuting does not change
-* condition numbers (in exact arithmetic), but balancing does.
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': left eigenvectors of A are not computed;
-* = 'V': left eigenvectors of A are computed.
-* If SENSE = 'E' or 'B', JOBVL must = 'V'.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': right eigenvectors of A are not computed;
-* = 'V': right eigenvectors of A are computed.
-* If SENSE = 'E' or 'B', JOBVR must = 'V'.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': None are computed;
-* = 'E': Computed for eigenvalues only;
-* = 'V': Computed for right eigenvectors only;
-* = 'B': Computed for eigenvalues and right eigenvectors.
-*
-* If SENSE = 'E' or 'B', both left and right eigenvectors
-* must also be computed (JOBVL = 'V' and JOBVR = 'V').
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten. If JOBVL = 'V' or
-* JOBVR = 'V', A contains the real Schur form of the balanced
-* version of the input matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WR (output) DOUBLE PRECISION array, dimension (N)
-*
-* WI (output) DOUBLE PRECISION array, dimension (N)
-* WR and WI contain the real and imaginary parts,
-* respectively, of the computed eigenvalues. Complex
-* conjugate pairs of eigenvalues will appear consecutively
-* with the eigenvalue having the positive imaginary part
-* first.
-*
-* VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order
-* as their eigenvalues.
-* If JOBVL = 'N', VL is not referenced.
-* If the j-th eigenvalue is real, then u(j) = VL(:,j),
-* the j-th column of VL.
-* If the j-th and (j+1)-st eigenvalues form a complex
-* conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
-* u(j+1) = VL(:,j) - i*VL(:,j+1).
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; if
-* JOBVL = 'V', LDVL >= N.
-*
-* VR (output) DOUBLE PRECISION array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order
-* as their eigenvalues.
-* If JOBVR = 'N', VR is not referenced.
-* If the j-th eigenvalue is real, then v(j) = VR(:,j),
-* the j-th column of VR.
-* If the j-th and (j+1)-st eigenvalues form a complex
-* conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
-* v(j+1) = VR(:,j) - i*VR(:,j+1).
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* JOBVR = 'V', LDVR >= N.
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are integer values determined when A was
-* balanced. The balanced A(i,j) = 0 if I > J and
-* J = 1,...,ILO-1 or I = IHI+1,...,N.
-*
-* SCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* when balancing A. If P(j) is the index of the row and column
-* interchanged with row and column j, and D(j) is the scaling
-* factor applied to row and column j, then
-* SCALE(J) = P(J), for J = 1,...,ILO-1
-* = D(J), for J = ILO,...,IHI
-* = P(J) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* ABNRM (output) DOUBLE PRECISION
-* The one-norm of the balanced matrix (the maximum
-* of the sum of absolute values of elements of any column).
-*
-* RCONDE (output) DOUBLE PRECISION array, dimension (N)
-* RCONDE(j) is the reciprocal condition number of the j-th
-* eigenvalue.
-*
-* RCONDV (output) DOUBLE PRECISION array, dimension (N)
-* RCONDV(j) is the reciprocal condition number of the j-th
-* right eigenvector.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. If SENSE = 'N' or 'E',
-* LWORK >= max(1,2*N), and if JOBVL = 'V' or JOBVR = 'V',
-* LWORK >= 3*N. If SENSE = 'V' or 'B', LWORK >= N*(N+6).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (2*N-2)
-* If SENSE = 'N' or 'E', not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the QR algorithm failed to compute all the
-* eigenvalues, and no eigenvectors or condition numbers
-* have been computed; elements 1:ILO-1 and i+1:N of WR
-* and WI contain eigenvalues which have converged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgegs.f b/SRC/dgegs.f
index 1cb128f0..1d2c403b 100644
--- a/SRC/dgegs.f
+++ b/SRC/dgegs.f
@@ -1,11 +1,229 @@
+*> \brief <b> DGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHAR,
+* ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), VSL( LDVSL, * ),
+* $ VSR( LDVSR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine DGGES.
+*>
+*> DGEGS computes the eigenvalues, real Schur form, and, optionally,
+*> left and or/right Schur vectors of a real matrix pair (A,B).
+*> Given two square matrices A and B, the generalized real Schur
+*> factorization has the form
+*>
+*> A = Q*S*Z**T, B = Q*T*Z**T
+*>
+*> where Q and Z are orthogonal matrices, T is upper triangular, and S
+*> is an upper quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal
+*> blocks, the 2-by-2 blocks corresponding to complex conjugate pairs
+*> of eigenvalues of (A,B). The columns of Q are the left Schur vectors
+*> and the columns of Z are the right Schur vectors.
+*>
+*> If only the eigenvalues of (A,B) are needed, the driver routine
+*> DGEGV should be used instead. See DGEGV for a description of the
+*> eigenvalues of the generalized nonsymmetric eigenvalue problem
+*> (GNEP).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors (returned in VSL).
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors (returned in VSR).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the matrix A.
+*> On exit, the upper quasi-triangular matrix S from the
+*> generalized real Schur factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the matrix B.
+*> On exit, the upper triangular matrix T from the generalized
+*> real Schur factorization.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> The real parts of each scalar alpha defining an eigenvalue
+*> of GNEP.
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> The imaginary parts of each scalar alpha defining an
+*> eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th
+*> eigenvalue is real; if positive, then the j-th and (j+1)-st
+*> eigenvalues are a complex conjugate pair, with
+*> ALPHAI(j+1) = -ALPHAI(j).
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> The scalars beta that define the eigenvalues of GNEP.
+*> Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
+*> beta = BETA(j) represent the j-th eigenvalue of the matrix
+*> pair (A,B), in one of the forms lambda = alpha/beta or
+*> mu = beta/alpha. Since either lambda or mu may overflow,
+*> they should not, in general, be computed.
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is DOUBLE PRECISION array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', the matrix of left Schur vectors Q.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >=1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is DOUBLE PRECISION array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', the matrix of right Schur vectors Z.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,4*N).
+*> For good performance, LWORK must generally be larger.
+*> To compute the optimal value of LWORK, call ILAENV to get
+*> blocksizes (for DGEQRF, DORMQR, and DORGQR.) Then compute:
+*> NB -- MAX of the blocksizes for DGEQRF, DORMQR, and DORGQR
+*> The optimal LWORK is 2*N + N*(NB+1).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
+*> be correct for j=INFO+1,...,N.
+*> > N: errors that usually indicate LAPACK problems:
+*> =N+1: error return from DGGBAL
+*> =N+2: error return from DGEQRF
+*> =N+3: error return from DORMQR
+*> =N+4: error return from DORGQR
+*> =N+5: error return from DGGHRD
+*> =N+6: error return from DHGEQZ (other than failed
+*> iteration)
+*> =N+7: error return from DGGBAK (computing VSL)
+*> =N+8: error return from DGGBAK (computing VSR)
+*> =N+9: error return from DLASCL (various places)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+* =====================================================================
SUBROUTINE DGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHAR,
$ ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR
@@ -17,129 +235,6 @@
$ VSR( LDVSR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine DGGES.
-*
-* DGEGS computes the eigenvalues, real Schur form, and, optionally,
-* left and or/right Schur vectors of a real matrix pair (A,B).
-* Given two square matrices A and B, the generalized real Schur
-* factorization has the form
-*
-* A = Q*S*Z**T, B = Q*T*Z**T
-*
-* where Q and Z are orthogonal matrices, T is upper triangular, and S
-* is an upper quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal
-* blocks, the 2-by-2 blocks corresponding to complex conjugate pairs
-* of eigenvalues of (A,B). The columns of Q are the left Schur vectors
-* and the columns of Z are the right Schur vectors.
-*
-* If only the eigenvalues of (A,B) are needed, the driver routine
-* DGEGV should be used instead. See DGEGV for a description of the
-* eigenvalues of the generalized nonsymmetric eigenvalue problem
-* (GNEP).
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors (returned in VSL).
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors (returned in VSR).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the matrix A.
-* On exit, the upper quasi-triangular matrix S from the
-* generalized real Schur factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the matrix B.
-* On exit, the upper triangular matrix T from the generalized
-* real Schur factorization.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (N)
-* The real parts of each scalar alpha defining an eigenvalue
-* of GNEP.
-*
-* ALPHAI (output) DOUBLE PRECISION array, dimension (N)
-* The imaginary parts of each scalar alpha defining an
-* eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th
-* eigenvalue is real; if positive, then the j-th and (j+1)-st
-* eigenvalues are a complex conjugate pair, with
-* ALPHAI(j+1) = -ALPHAI(j).
-*
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* The scalars beta that define the eigenvalues of GNEP.
-* Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
-* beta = BETA(j) represent the j-th eigenvalue of the matrix
-* pair (A,B), in one of the forms lambda = alpha/beta or
-* mu = beta/alpha. Since either lambda or mu may overflow,
-* they should not, in general, be computed.
-*
-* VSL (output) DOUBLE PRECISION array, dimension (LDVSL,N)
-* If JOBVSL = 'V', the matrix of left Schur vectors Q.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >=1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) DOUBLE PRECISION array, dimension (LDVSR,N)
-* If JOBVSR = 'V', the matrix of right Schur vectors Z.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,4*N).
-* For good performance, LWORK must generally be larger.
-* To compute the optimal value of LWORK, call ILAENV to get
-* blocksizes (for DGEQRF, DORMQR, and DORGQR.) Then compute:
-* NB -- MAX of the blocksizes for DGEQRF, DORMQR, and DORGQR
-* The optimal LWORK is 2*N + N*(NB+1).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
-* be correct for j=INFO+1,...,N.
-* > N: errors that usually indicate LAPACK problems:
-* =N+1: error return from DGGBAL
-* =N+2: error return from DGEQRF
-* =N+3: error return from DORMQR
-* =N+4: error return from DORGQR
-* =N+5: error return from DGGHRD
-* =N+6: error return from DHGEQZ (other than failed
-* iteration)
-* =N+7: error return from DGGBAK (computing VSL)
-* =N+8: error return from DGGBAK (computing VSR)
-* =N+9: error return from DLASCL (various places)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgegv.f b/SRC/dgegv.f
index 8c766a4e..b0bf6182 100644
--- a/SRC/dgegv.f
+++ b/SRC/dgegv.f
@@ -1,10 +1,312 @@
+*> \brief <b> DGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
+* BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine DGGEV.
+*>
+*> DGEGV computes the eigenvalues and, optionally, the left and/or right
+*> eigenvectors of a real matrix pair (A,B).
+*> Given two square matrices A and B,
+*> the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
+*> eigenvalues lambda and corresponding (non-zero) eigenvectors x such
+*> that
+*>
+*> A*x = lambda*B*x.
+*>
+*> An alternate form is to find the eigenvalues mu and corresponding
+*> eigenvectors y such that
+*>
+*> mu*A*y = B*y.
+*>
+*> These two forms are equivalent with mu = 1/lambda and x = y if
+*> neither lambda nor mu is zero. In order to deal with the case that
+*> lambda or mu is zero or small, two values alpha and beta are returned
+*> for each eigenvalue, such that lambda = alpha/beta and
+*> mu = beta/alpha.
+*>
+*> The vectors x and y in the above equations are right eigenvectors of
+*> the matrix pair (A,B). Vectors u and v satisfying
+*>
+*> u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
+*>
+*> are left eigenvectors of (A,B).
+*>
+*> Note: this routine performs "full balancing" on A and B
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors (returned
+*> in VL).
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors (returned
+*> in VR).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the matrix A.
+*> If JOBVL = 'V' or JOBVR = 'V', then on exit A
+*> contains the real Schur form of A from the generalized Schur
+*> factorization of the pair (A,B) after balancing.
+*> If no eigenvectors were computed, then only the diagonal
+*> blocks from the Schur form will be correct. See DGGHRD and
+*> DHGEQZ for details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the matrix B.
+*> If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
+*> upper triangular matrix obtained from B in the generalized
+*> Schur factorization of the pair (A,B) after balancing.
+*> If no eigenvectors were computed, then only those elements of
+*> B corresponding to the diagonal blocks from the Schur form of
+*> A will be correct. See DGGHRD and DHGEQZ for details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> The real parts of each scalar alpha defining an eigenvalue of
+*> GNEP.
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> The imaginary parts of each scalar alpha defining an
+*> eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th
+*> eigenvalue is real; if positive, then the j-th and
+*> (j+1)-st eigenvalues are a complex conjugate pair, with
+*> ALPHAI(j+1) = -ALPHAI(j).
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> The scalars beta that define the eigenvalues of GNEP.
+*>
+*> Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
+*> beta = BETA(j) represent the j-th eigenvalue of the matrix
+*> pair (A,B), in one of the forms lambda = alpha/beta or
+*> mu = beta/alpha. Since either lambda or mu may overflow,
+*> they should not, in general, be computed.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored
+*> in the columns of VL, in the same order as their eigenvalues.
+*> If the j-th eigenvalue is real, then u(j) = VL(:,j).
+*> If the j-th and (j+1)-st eigenvalues form a complex conjugate
+*> pair, then
+*> u(j) = VL(:,j) + i*VL(:,j+1)
+*> and
+*> u(j+1) = VL(:,j) - i*VL(:,j+1).
+*> \endverbatim
+*> \verbatim
+*> Each eigenvector is scaled so that its largest component has
+*> abs(real part) + abs(imag. part) = 1, except for eigenvectors
+*> corresponding to an eigenvalue with alpha = beta = 0, which
+*> are set to zero.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors x(j) are stored
+*> in the columns of VR, in the same order as their eigenvalues.
+*> If the j-th eigenvalue is real, then x(j) = VR(:,j).
+*> If the j-th and (j+1)-st eigenvalues form a complex conjugate
+*> pair, then
+*> x(j) = VR(:,j) + i*VR(:,j+1)
+*> and
+*> x(j+1) = VR(:,j) - i*VR(:,j+1).
+*> \endverbatim
+*> \verbatim
+*> Each eigenvector is scaled so that its largest component has
+*> abs(real part) + abs(imag. part) = 1, except for eigenvalues
+*> corresponding to an eigenvalue with alpha = beta = 0, which
+*> are set to zero.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,8*N).
+*> For good performance, LWORK must generally be larger.
+*> To compute the optimal value of LWORK, call ILAENV to get
+*> blocksizes (for DGEQRF, DORMQR, and DORGQR.) Then compute:
+*> NB -- MAX of the blocksizes for DGEQRF, DORMQR, and DORGQR;
+*> The optimal LWORK is:
+*> 2*N + MAX( 6*N, N*(NB+1) ).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
+*> should be correct for j=INFO+1,...,N.
+*> > N: errors that usually indicate LAPACK problems:
+*> =N+1: error return from DGGBAL
+*> =N+2: error return from DGEQRF
+*> =N+3: error return from DORMQR
+*> =N+4: error return from DORGQR
+*> =N+5: error return from DGGHRD
+*> =N+6: error return from DHGEQZ (other than failed
+*> iteration)
+*> =N+7: error return from DTGEVC
+*> =N+8: error return from DGGBAK (computing VL)
+*> =N+9: error return from DGGBAK (computing VR)
+*> =N+10: error return from DLASCL (various calls)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Balancing
+*> ---------
+*>
+*> This driver calls DGGBAL to both permute and scale rows and columns
+*> of A and B. The permutations PL and PR are chosen so that PL*A*PR
+*> and PL*B*R will be upper triangular except for the diagonal blocks
+*> A(i:j,i:j) and B(i:j,i:j), with i and j as close together as
+*> possible. The diagonal scaling matrices DL and DR are chosen so
+*> that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to
+*> one (except for the elements that start out zero.)
+*>
+*> After the eigenvalues and eigenvectors of the balanced matrices
+*> have been computed, DGGBAK transforms the eigenvectors back to what
+*> they would have been (in perfect arithmetic) if they had not been
+*> balanced.
+*>
+*> Contents of A and B on Exit
+*> -------- -- - --- - -- ----
+*>
+*> If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
+*> both), then on exit the arrays A and B will contain the real Schur
+*> form[*] of the "balanced" versions of A and B. If no eigenvectors
+*> are computed, then only the diagonal blocks will be correct.
+*>
+*> [*] See DHGEQZ, DGEGS, or read the book "Matrix Computations",
+*> by Golub & van Loan, pub. by Johns Hopkins U. Press.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
$ BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -16,207 +318,6 @@
$ VR( LDVR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine DGGEV.
-*
-* DGEGV computes the eigenvalues and, optionally, the left and/or right
-* eigenvectors of a real matrix pair (A,B).
-* Given two square matrices A and B,
-* the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
-* eigenvalues lambda and corresponding (non-zero) eigenvectors x such
-* that
-*
-* A*x = lambda*B*x.
-*
-* An alternate form is to find the eigenvalues mu and corresponding
-* eigenvectors y such that
-*
-* mu*A*y = B*y.
-*
-* These two forms are equivalent with mu = 1/lambda and x = y if
-* neither lambda nor mu is zero. In order to deal with the case that
-* lambda or mu is zero or small, two values alpha and beta are returned
-* for each eigenvalue, such that lambda = alpha/beta and
-* mu = beta/alpha.
-*
-* The vectors x and y in the above equations are right eigenvectors of
-* the matrix pair (A,B). Vectors u and v satisfying
-*
-* u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
-*
-* are left eigenvectors of (A,B).
-*
-* Note: this routine performs "full balancing" on A and B
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors (returned
-* in VL).
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors (returned
-* in VR).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the matrix A.
-* If JOBVL = 'V' or JOBVR = 'V', then on exit A
-* contains the real Schur form of A from the generalized Schur
-* factorization of the pair (A,B) after balancing.
-* If no eigenvectors were computed, then only the diagonal
-* blocks from the Schur form will be correct. See DGGHRD and
-* DHGEQZ for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the matrix B.
-* If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
-* upper triangular matrix obtained from B in the generalized
-* Schur factorization of the pair (A,B) after balancing.
-* If no eigenvectors were computed, then only those elements of
-* B corresponding to the diagonal blocks from the Schur form of
-* A will be correct. See DGGHRD and DHGEQZ for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (N)
-* The real parts of each scalar alpha defining an eigenvalue of
-* GNEP.
-*
-* ALPHAI (output) DOUBLE PRECISION array, dimension (N)
-* The imaginary parts of each scalar alpha defining an
-* eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th
-* eigenvalue is real; if positive, then the j-th and
-* (j+1)-st eigenvalues are a complex conjugate pair, with
-* ALPHAI(j+1) = -ALPHAI(j).
-*
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* The scalars beta that define the eigenvalues of GNEP.
-*
-* Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
-* beta = BETA(j) represent the j-th eigenvalue of the matrix
-* pair (A,B), in one of the forms lambda = alpha/beta or
-* mu = beta/alpha. Since either lambda or mu may overflow,
-* they should not, in general, be computed.
-*
-* VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored
-* in the columns of VL, in the same order as their eigenvalues.
-* If the j-th eigenvalue is real, then u(j) = VL(:,j).
-* If the j-th and (j+1)-st eigenvalues form a complex conjugate
-* pair, then
-* u(j) = VL(:,j) + i*VL(:,j+1)
-* and
-* u(j+1) = VL(:,j) - i*VL(:,j+1).
-*
-* Each eigenvector is scaled so that its largest component has
-* abs(real part) + abs(imag. part) = 1, except for eigenvectors
-* corresponding to an eigenvalue with alpha = beta = 0, which
-* are set to zero.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) DOUBLE PRECISION array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors x(j) are stored
-* in the columns of VR, in the same order as their eigenvalues.
-* If the j-th eigenvalue is real, then x(j) = VR(:,j).
-* If the j-th and (j+1)-st eigenvalues form a complex conjugate
-* pair, then
-* x(j) = VR(:,j) + i*VR(:,j+1)
-* and
-* x(j+1) = VR(:,j) - i*VR(:,j+1).
-*
-* Each eigenvector is scaled so that its largest component has
-* abs(real part) + abs(imag. part) = 1, except for eigenvalues
-* corresponding to an eigenvalue with alpha = beta = 0, which
-* are set to zero.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,8*N).
-* For good performance, LWORK must generally be larger.
-* To compute the optimal value of LWORK, call ILAENV to get
-* blocksizes (for DGEQRF, DORMQR, and DORGQR.) Then compute:
-* NB -- MAX of the blocksizes for DGEQRF, DORMQR, and DORGQR;
-* The optimal LWORK is:
-* 2*N + MAX( 6*N, N*(NB+1) ).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
-* should be correct for j=INFO+1,...,N.
-* > N: errors that usually indicate LAPACK problems:
-* =N+1: error return from DGGBAL
-* =N+2: error return from DGEQRF
-* =N+3: error return from DORMQR
-* =N+4: error return from DORGQR
-* =N+5: error return from DGGHRD
-* =N+6: error return from DHGEQZ (other than failed
-* iteration)
-* =N+7: error return from DTGEVC
-* =N+8: error return from DGGBAK (computing VL)
-* =N+9: error return from DGGBAK (computing VR)
-* =N+10: error return from DLASCL (various calls)
-*
-* Further Details
-* ===============
-*
-* Balancing
-* ---------
-*
-* This driver calls DGGBAL to both permute and scale rows and columns
-* of A and B. The permutations PL and PR are chosen so that PL*A*PR
-* and PL*B*R will be upper triangular except for the diagonal blocks
-* A(i:j,i:j) and B(i:j,i:j), with i and j as close together as
-* possible. The diagonal scaling matrices DL and DR are chosen so
-* that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to
-* one (except for the elements that start out zero.)
-*
-* After the eigenvalues and eigenvectors of the balanced matrices
-* have been computed, DGGBAK transforms the eigenvectors back to what
-* they would have been (in perfect arithmetic) if they had not been
-* balanced.
-*
-* Contents of A and B on Exit
-* -------- -- - --- - -- ----
-*
-* If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
-* both), then on exit the arrays A and B will contain the real Schur
-* form[*] of the "balanced" versions of A and B. If no eigenvectors
-* are computed, then only the diagonal blocks will be correct.
-*
-* [*] See DHGEQZ, DGEGS, or read the book "Matrix Computations",
-* by Golub & van Loan, pub. by Johns Hopkins U. Press.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgehd2.f b/SRC/dgehd2.f
index 0f0bc49b..d5167093 100644
--- a/SRC/dgehd2.f
+++ b/SRC/dgehd2.f
@@ -1,90 +1,131 @@
- SUBROUTINE DGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
+*> \brief \b DGEHD2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEHD2 reduces a real general matrix A to upper Hessenberg form H by
-* an orthogonal similarity transformation: Q**T * A * Q = H .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEHD2 reduces a real general matrix A to upper Hessenberg form H by
+*> an orthogonal similarity transformation: Q**T * A * Q = H .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that A is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to DGEBAL; otherwise they should be
-* set to 1 and N respectively. See Further Details.
-* 1 <= ILO <= IHI <= max(1,N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the n by n general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* elements below the first subdiagonal, with the array TAU,
-* represent the orthogonal matrix Q as a product of elementary
-* reflectors. See Further Details.
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* set to 1 and N respectively. See Further Details.
+*> 1 <= ILO <= IHI <= max(1,N).
+*>
+*> A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the n by n general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> elements below the first subdiagonal, with the array TAU,
+*> represent the orthogonal matrix Q as a product of elementary
+*> reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of (ihi-ilo) elementary
+*> reflectors
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
+*> exit in A(i+2:ihi,i), and tau in TAU(i).
+*>
+*> The contents of A are illustrated by the following example, with
+*> n = 7, ilo = 2 and ihi = 6:
+*>
+*> on entry, on exit,
+*>
+*> ( a a a a a a a ) ( a a h h h h a )
+*> ( a a a a a a ) ( a h h h h a )
+*> ( a a a a a a ) ( h h h h h h )
+*> ( a a a a a a ) ( v2 h h h h h )
+*> ( a a a a a a ) ( v2 v3 h h h h )
+*> ( a a a a a a ) ( v2 v3 v4 h h h )
+*> ( a ) ( a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of (ihi-ilo) elementary
-* reflectors
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
-* exit in A(i+2:ihi,i), and tau in TAU(i).
-*
-* The contents of A are illustrated by the following example, with
-* n = 7, ilo = 2 and ihi = 6:
-*
-* on entry, on exit,
-*
-* ( a a a a a a a ) ( a a h h h h a )
-* ( a a a a a a ) ( a h h h h a )
-* ( a a a a a a ) ( h h h h h h )
-* ( a a a a a a ) ( v2 h h h h h )
-* ( a a a a a a ) ( v2 v3 h h h h )
-* ( a a a a a a ) ( v2 v3 v4 h h h )
-* ( a ) ( a )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgehrd.f b/SRC/dgehrd.f
index f0b6bddc..55f9090c 100644
--- a/SRC/dgehrd.f
+++ b/SRC/dgehrd.f
@@ -1,106 +1,147 @@
- SUBROUTINE DGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DGEHRD
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEHRD reduces a real general matrix A to upper Hessenberg form H by
-* an orthogonal similarity transformation: Q**T * A * Q = H .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEHRD reduces a real general matrix A to upper Hessenberg form H by
+*> an orthogonal similarity transformation: Q**T * A * Q = H .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that A is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to DGEBAL; otherwise they should be
-* set to 1 and N respectively. See Further Details.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* elements below the first subdiagonal, with the array TAU,
-* represent the orthogonal matrix Q as a product of elementary
-* reflectors. See Further Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to
-* zero.
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* set to 1 and N respectively. See Further Details.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*>
+*> A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> elements below the first subdiagonal, with the array TAU,
+*> represent the orthogonal matrix Q as a product of elementary
+*> reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to
+*> zero.
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The length of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of (ihi-ilo) elementary
+*> reflectors
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
+*> exit in A(i+2:ihi,i), and tau in TAU(i).
+*>
+*> The contents of A are illustrated by the following example, with
+*> n = 7, ilo = 2 and ihi = 6:
+*>
+*> on entry, on exit,
+*>
+*> ( a a a a a a a ) ( a a h h h h a )
+*> ( a a a a a a ) ( a h h h h a )
+*> ( a a a a a a ) ( h h h h h h )
+*> ( a a a a a a ) ( v2 h h h h h )
+*> ( a a a a a a ) ( v2 v3 h h h h )
+*> ( a a a a a a ) ( v2 v3 v4 h h h )
+*> ( a ) ( a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> This file is a slight modification of LAPACK-3.0's DGEHRD
+*> subroutine incorporating improvements proposed by Quintana-Orti and
+*> Van de Geijn (2006). (See DLAHR2.)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of (ihi-ilo) elementary
-* reflectors
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
-* exit in A(i+2:ihi,i), and tau in TAU(i).
-*
-* The contents of A are illustrated by the following example, with
-* n = 7, ilo = 2 and ihi = 6:
-*
-* on entry, on exit,
-*
-* ( a a a a a a a ) ( a a h h h h a )
-* ( a a a a a a ) ( a h h h h a )
-* ( a a a a a a ) ( h h h h h h )
-* ( a a a a a a ) ( v2 h h h h h )
-* ( a a a a a a ) ( v2 v3 h h h h )
-* ( a a a a a a ) ( v2 v3 v4 h h h )
-* ( a ) ( a )
-*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This file is a slight modification of LAPACK-3.0's DGEHRD
-* subroutine incorporating improvements proposed by Quintana-Orti and
-* Van de Geijn (2006). (See DLAHR2.)
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgejsv.f b/SRC/dgejsv.f
index fdb05767..f40ac425 100644
--- a/SRC/dgejsv.f
+++ b/SRC/dgejsv.f
@@ -1,20 +1,477 @@
+*> \brief \b DGEJSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
+* M, N, A, LDA, SVA, U, LDU, V, LDV,
+* WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* IMPLICIT NONE
+* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), SVA( N ), U( LDU, * ), V( LDV, * ),
+* $ WORK( LWORK )
+* INTEGER IWORK( * )
+* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEJSV computes the singular value decomposition (SVD) of a real M-by-N
+*> matrix [A], where M >= N. The SVD of [A] is written as
+*>
+*> [A] = [U] * [SIGMA] * [V]^t,
+*>
+*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
+*> diagonal elements, [U] is an M-by-N (or M-by-M) orthonormal matrix, and
+*> [V] is an N-by-N orthogonal matrix. The diagonal elements of [SIGMA] are
+*> the singular values of [A]. The columns of [U] and [V] are the left and
+*> the right singular vectors of [A], respectively. The matrices [U] and [V]
+*> are computed and stored in the arrays U and V, respectively. The diagonal
+*> of [SIGMA] is computed and stored in the array SVA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBA
+*> \verbatim
+*> JOBA is CHARACTER*1
+*> Specifies the level of accuracy:
+*> = 'C': This option works well (high relative accuracy) if A = B * D,
+*> with well-conditioned B and arbitrary diagonal matrix D.
+*> The accuracy cannot be spoiled by COLUMN scaling. The
+*> accuracy of the computed output depends on the condition of
+*> B, and the procedure aims at the best theoretical accuracy.
+*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is
+*> bounded by f(M,N)*epsilon* cond(B), independent of D.
+*> The input matrix is preprocessed with the QRF with column
+*> pivoting. This initial preprocessing and preconditioning by
+*> a rank revealing QR factorization is common for all values of
+*> JOBA. Additional actions are specified as follows:
+*> = 'E': Computation as with 'C' with an additional estimate of the
+*> condition number of B. It provides a realistic error bound.
+*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
+*> D1, D2, and well-conditioned matrix C, this option gives
+*> higher accuracy than the 'C' option. If the structure of the
+*> input matrix is not known, and relative accuracy is
+*> desirable, then this option is advisable. The input matrix A
+*> is preprocessed with QR factorization with FULL (row and
+*> column) pivoting.
+*> = 'G' Computation as with 'F' with an additional estimate of the
+*> condition number of B, where A=D*B. If A has heavily weighted
+*> rows, then using this condition number gives too pessimistic
+*> error bound.
+*> = 'A': Small singular values are the noise and the matrix is treated
+*> as numerically rank defficient. The error in the computed
+*> singular values is bounded by f(m,n)*epsilon*||A||.
+*> The computed SVD A = U * S * V^t restores A up to
+*> f(m,n)*epsilon*||A||.
+*> This gives the procedure the licence to discard (set to zero)
+*> all singular values below N*epsilon*||A||.
+*> = 'R': Similar as in 'A'. Rank revealing property of the initial
+*> QR factorization is used do reveal (using triangular factor)
+*> a gap sigma_{r+1} < epsilon * sigma_r in which case the
+*> numerical RANK is declared to be r. The SVD is computed with
+*> absolute error bounds, but more accurately than with 'A'.
+*> \endverbatim
+*>
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> Specifies whether to compute the columns of U:
+*> = 'U': N columns of U are returned in the array U.
+*> = 'F': full set of M left sing. vectors is returned in the array U.
+*> = 'W': U may be used as workspace of length M*N. See the description
+*> of U.
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> Specifies whether to compute the matrix V:
+*> = 'V': N columns of V are returned in the array V; Jacobi rotations
+*> are not explicitly accumulated.
+*> = 'J': N columns of V are returned in the array V, but they are
+*> computed as the product of Jacobi rotations. This option is
+*> allowed only if JOBU .NE. 'N', i.e. in computing the full SVD.
+*> = 'W': V may be used as workspace of length N*N. See the description
+*> of V.
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBR
+*> \verbatim
+*> JOBR is CHARACTER*1
+*> Specifies the RANGE for the singular values. Issues the licence to
+*> set to zero small positive singular values if they are outside
+*> specified range. If A .NE. 0 is scaled so that the largest singular
+*> value of c*A is around DSQRT(BIG), BIG=SLAMCH('O'), then JOBR issues
+*> the licence to kill columns of A whose norm in c*A is less than
+*> DSQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN,
+*> where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E').
+*> = 'N': Do not kill small columns of c*A. This option assumes that
+*> BLAS and QR factorizations and triangular solvers are
+*> implemented to work in that range. If the condition of A
+*> is greater than BIG, use DGESVJ.
+*> = 'R': RESTRICTED range for sigma(c*A) is [DSQRT(SFMIN), DSQRT(BIG)]
+*> (roughly, as described above). This option is recommended.
+*> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*> For computing the singular values in the FULL range [SFMIN,BIG]
+*> use DGESVJ.
+*> \endverbatim
+*>
+*> \param[in] JOBT
+*> \verbatim
+*> JOBT is CHARACTER*1
+*> If the matrix is square then the procedure may determine to use
+*> transposed A if A^t seems to be better with respect to convergence.
+*> If the matrix is not square, JOBT is ignored. This is subject to
+*> changes in the future.
+*> The decision is based on two values of entropy over the adjoint
+*> orbit of A^t * A. See the descriptions of WORK(6) and WORK(7).
+*> = 'T': transpose if entropy test indicates possibly faster
+*> convergence of Jacobi process if A^t is taken as input. If A is
+*> replaced with A^t, then the row pivoting is included automatically.
+*> = 'N': do not speculate.
+*> This option can be used to compute only the singular values, or the
+*> full SVD (U, SIGMA and V). For only one set of singular vectors
+*> (U or V), the caller should provide both U and V, as one of the
+*> matrices is used as workspace if the matrix A is transposed.
+*> The implementer can easily remove this constraint and make the
+*> code more complicated. See the descriptions of U and V.
+*> \endverbatim
+*>
+*> \param[in] JOBP
+*> \verbatim
+*> JOBP is CHARACTER*1
+*> Issues the licence to introduce structured perturbations to drown
+*> denormalized numbers. This licence should be active if the
+*> denormals are poorly implemented, causing slow computation,
+*> especially in cases of fast convergence (!). For details see [1,2].
+*> For the sake of simplicity, this perturbations are included only
+*> when the full SVD or only the singular values are requested. The
+*> implementer/user can easily add the perturbation for the cases of
+*> computing one set of singular vectors.
+*> = 'P': introduce perturbation
+*> = 'N': do not perturb
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] SVA
+*> \verbatim
+*> SVA is DOUBLE PRECISION array, dimension (N)
+*> On exit,
+*> - For WORK(1)/WORK(2) = ONE: The singular values of A. During the
+*> computation SVA contains Euclidean column norms of the
+*> iterated matrices in the array A.
+*> - For WORK(1) .NE. WORK(2): The singular values of A are
+*> (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if
+*> sigma_max(A) overflows or if small singular values have been
+*> saved from underflow by scaling the input matrix A.
+*> - If JOBR='R' then some of the singular values may be returned
+*> as exact zeros obtained by "set to zero" because they are
+*> below the numerical rank threshold or are denormalized numbers.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension ( LDU, N )
+*> If JOBU = 'U', then U contains on exit the M-by-N matrix of
+*> the left singular vectors.
+*> If JOBU = 'F', then U contains on exit the M-by-M matrix of
+*> the left singular vectors, including an ONB
+*> of the orthogonal complement of the Range(A).
+*> If JOBU = 'W' .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N),
+*> then U is used as workspace if the procedure
+*> replaces A with A^t. In that case, [V] is computed
+*> in U as left singular vectors of A^t and then
+*> copied back to the V array. This 'W' option is just
+*> a reminder to the caller that in this case U is
+*> reserved as workspace of length N*N.
+*> If JOBU = 'N' U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U, LDU >= 1.
+*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension ( LDV, N )
+*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
+*> the right singular vectors;
+*> If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N),
+*> then V is used as workspace if the pprocedure
+*> replaces A with A^t. In that case, [U] is computed
+*> in V as right singular vectors of A^t and then
+*> copied back to the U array. This 'W' option is just
+*> a reminder to the caller that in this case V is
+*> reserved as workspace of length N*N.
+*> If JOBV = 'N' V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V, LDV >= 1.
+*> If JOBV = 'V' or 'J' or 'W', then LDV >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension at least LWORK.
+*> On exit, if N.GT.0 .AND. M.GT.0 (else not referenced),
+*> WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such
+*> that SCALE*SVA(1:N) are the computed singular values
+*> of A. (See the description of SVA().)
+*> WORK(2) = See the description of WORK(1).
+*> WORK(3) = SCONDA is an estimate for the condition number of
+*> column equilibrated A. (If JOBA .EQ. 'E' or 'G')
+*> SCONDA is an estimate of DSQRT(||(R^t * R)^(-1)||_1).
+*> It is computed using DPOCON. It holds
+*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
+*> where R is the triangular factor from the QRF of A.
+*> However, if R is truncated and the numerical rank is
+*> determined to be strictly smaller than N, SCONDA is
+*> returned as -1, thus indicating that the smallest
+*> singular values might be lost.
+*> \endverbatim
+*> \verbatim
+*> If full SVD is needed, the following two condition numbers are
+*> useful for the analysis of the algorithm. They are provied for
+*> a developer/implementer who is familiar with the details of
+*> the method.
+*> \endverbatim
+*> \verbatim
+*> WORK(4) = an estimate of the scaled condition number of the
+*> triangular factor in the first QR factorization.
+*> WORK(5) = an estimate of the scaled condition number of the
+*> triangular factor in the second QR factorization.
+*> The following two parameters are computed if JOBT .EQ. 'T'.
+*> They are provided for a developer/implementer who is familiar
+*> with the details of the method.
+*> \endverbatim
+*> \verbatim
+*> WORK(6) = the entropy of A^t*A :: this is the Shannon entropy
+*> of diag(A^t*A) / Trace(A^t*A) taken as point in the
+*> probability simplex.
+*> WORK(7) = the entropy of A*A^t.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> Length of WORK to confirm proper allocation of work space.
+*> LWORK depends on the job:
+*> \endverbatim
+*> \verbatim
+*> If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and
+*> -> .. no scaled condition estimate required (JOBE.EQ.'N'):
+*> LWORK >= max(2*M+N,4*N+1,7). This is the minimal requirement.
+*> ->> For optimal performance (blocked code) the optimal value
+*> is LWORK >= max(2*M+N,3*N+(N+1)*NB,7). Here NB is the optimal
+*> block size for DGEQP3 and DGEQRF.
+*> In general, optimal LWORK is computed as
+*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF), 7).
+*> -> .. an estimate of the scaled condition number of A is
+*> required (JOBA='E', 'G'). In this case, LWORK is the maximum
+*> of the above and N*N+4*N, i.e. LWORK >= max(2*M+N,N*N+4*N,7).
+*> ->> For optimal performance (blocked code) the optimal value
+*> is LWORK >= max(2*M+N,3*N+(N+1)*NB, N*N+4*N, 7).
+*> In general, the optimal length LWORK is computed as
+*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF),
+*> N+N*N+LWORK(DPOCON),7).
+*> \endverbatim
+*> \verbatim
+*> If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),
+*> -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
+*> -> For optimal performance, LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
+*> where NB is the optimal block size for DGEQP3, DGEQRF, DGELQ,
+*> DORMLQ. In general, the optimal length LWORK is computed as
+*> LWORK >= max(2*M+N,N+LWORK(DGEQP3), N+LWORK(DPOCON),
+*> N+LWORK(DGELQ), 2*N+LWORK(DGEQRF), N+LWORK(DORMLQ)).
+*> \endverbatim
+*> \verbatim
+*> If SIGMA and the left singular vectors are needed
+*> -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
+*> -> For optimal performance:
+*> if JOBU.EQ.'U' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
+*> if JOBU.EQ.'F' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,N+M*NB,7),
+*> where NB is the optimal block size for DGEQP3, DGEQRF, DORMQR.
+*> In general, the optimal length LWORK is computed as
+*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DPOCON),
+*> 2*N+LWORK(DGEQRF), N+LWORK(DORMQR)).
+*> Here LWORK(DORMQR) equals N*NB (for JOBU.EQ.'U') or
+*> M*NB (for JOBU.EQ.'F').
+*>
+*> If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and
+*> -> if JOBV.EQ.'V'
+*> the minimal requirement is LWORK >= max(2*M+N,6*N+2*N*N).
+*> -> if JOBV.EQ.'J' the minimal requirement is
+*> LWORK >= max(2*M+N, 4*N+N*N,2*N+N*N+6).
+*> -> For optimal performance, LWORK should be additionally
+*> larger than N+M*NB, where NB is the optimal block size
+*> for DORMQR.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension M+3*N.
+*> On exit,
+*> IWORK(1) = the numerical rank determined after the initial
+*> QR factorization with pivoting. See the descriptions
+*> of JOBA and JOBR.
+*> IWORK(2) = the number of the computed nonzero singular values
+*> IWORK(3) = if nonzero, a warning message:
+*> If IWORK(3).EQ.1 then some of the column norms of A
+*> were denormalized floats. The requested high accuracy
+*> is not warranted by the data.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0 : if INFO = -i, then the i-th argument had an illegal value.
+*> = 0 : successfull exit;
+*> > 0 : DGEJSV did not converge in the maximal allowed number
+*> of sweeps. The computed values may be inaccurate.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> DGEJSV implements a preconditioned Jacobi SVD algorithm. It uses DGEQP3,
+*> DGEQRF, and DGELQF as preprocessors and preconditioners. Optionally, an
+*> additional row pivoting can be used as a preprocessor, which in some
+*> cases results in much higher accuracy. An example is matrix A with the
+*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
+*> diagonal matrices and C is well-conditioned matrix. In that case, complete
+*> pivoting in the first QR factorizations provides accuracy dependent on the
+*> condition number of C, and independent of D1, D2. Such higher accuracy is
+*> not completely understood theoretically, but it works well in practice.
+*> Further, if A can be written as A = B*D, with well-conditioned B and some
+*> diagonal D, then the high accuracy is guaranteed, both theoretically and
+*> in software, independent of D. For more details see [1], [2].
+*> The computational range for the singular values can be the full range
+*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
+*> & LAPACK routines called by DGEJSV are implemented to work in that range.
+*> If that is not the case, then the restriction for safe computation with
+*> the singular values in the range of normalized IEEE numbers is that the
+*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
+*> overflow. This code (DGEJSV) is best used in this restricted range,
+*> meaning that singular values of magnitude below ||A||_2 / DLAMCH('O') are
+*> returned as zeros. See JOBR for details on this.
+*> Further, this implementation is somewhat slower than the one described
+*> in [1,2] due to replacement of some non-LAPACK components, and because
+*> the choice of some tuning parameters in the iterative part (DGESVJ) is
+*> left to the implementer on a particular machine.
+*> The rank revealing QR factorization (in this code: DGEQP3) should be
+*> implemented as in [3]. We have a new version of DGEQP3 under development
+*> that is more robust than the current one in LAPACK, with a cleaner cut in
+*> rank defficient cases. It will be available in the SIGMA library [4].
+*> If M is much larger than N, it is obvious that the inital QRF with
+*> column pivoting can be preprocessed by the QRF without pivoting. That
+*> well known trick is not used in DGEJSV because in some cases heavy row
+*> weighting can be treated with complete pivoting. The overhead in cases
+*> M much larger than N is then only due to pivoting, but the benefits in
+*> terms of accuracy have prevailed. The implementer/user can incorporate
+*> this extra QRF step easily. The implementer can also improve data movement
+*> (matrix transpose, matrix copy, matrix transposed copy) - this
+*> implementation of DGEJSV uses only the simplest, naive data movement.
+*>
+*> Contributors
+*>
+*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
+*>
+*> References
+*>
+*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
+*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
+*> LAPACK Working note 169.
+*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
+*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
+*> LAPACK Working note 170.
+*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
+*> factorization software - a case study.
+*> ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
+*> LAPACK Working note 176.
+*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
+*> QSVD, (H,K)-SVD computations.
+*> Department of Mathematics, University of Zagreb, 2008.
+*>
+*> Bugs, examples and comments
+*>
+*> Please report all bugs and send interesting examples and/or comments to
+*> drmac@math.hr. Thank you.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
$ M, N, A, LDA, SVA, U, LDU, V, LDV,
$ WORK, LWORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Zlatko Drmac of the University of Zagreb and --
-* -- Kresimir Veselic of the Fernuniversitaet Hagen --
-* -- April 2011 --
-*
+* -- LAPACK computational routine (version 1.23, October 23. 2008.) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* This routine is also part of SIGMA (version 1.23, October 23. 2008.)
-* SIGMA is a library of algorithms for highly accurate algorithms for
-* computation of SVD, PSVD, QSVD, (H,K)-SVD, and for solution of the
-* eigenvalue problems Hx = lambda M x, H M x = lambda x with H, M > 0.
+* November 2011
*
* .. Scalar Arguments ..
IMPLICIT NONE
@@ -27,360 +484,6 @@
CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
* ..
*
-* Purpose
-* =======
-*
-* DGEJSV computes the singular value decomposition (SVD) of a real M-by-N
-* matrix [A], where M >= N. The SVD of [A] is written as
-*
-* [A] = [U] * [SIGMA] * [V]^t,
-*
-* where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
-* diagonal elements, [U] is an M-by-N (or M-by-M) orthonormal matrix, and
-* [V] is an N-by-N orthogonal matrix. The diagonal elements of [SIGMA] are
-* the singular values of [A]. The columns of [U] and [V] are the left and
-* the right singular vectors of [A], respectively. The matrices [U] and [V]
-* are computed and stored in the arrays U and V, respectively. The diagonal
-* of [SIGMA] is computed and stored in the array SVA.
-*
-* Arguments
-* =========
-*
-* JOBA (input) CHARACTER*1
-* Specifies the level of accuracy:
-* = 'C': This option works well (high relative accuracy) if A = B * D,
-* with well-conditioned B and arbitrary diagonal matrix D.
-* The accuracy cannot be spoiled by COLUMN scaling. The
-* accuracy of the computed output depends on the condition of
-* B, and the procedure aims at the best theoretical accuracy.
-* The relative error max_{i=1:N}|d sigma_i| / sigma_i is
-* bounded by f(M,N)*epsilon* cond(B), independent of D.
-* The input matrix is preprocessed with the QRF with column
-* pivoting. This initial preprocessing and preconditioning by
-* a rank revealing QR factorization is common for all values of
-* JOBA. Additional actions are specified as follows:
-* = 'E': Computation as with 'C' with an additional estimate of the
-* condition number of B. It provides a realistic error bound.
-* = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
-* D1, D2, and well-conditioned matrix C, this option gives
-* higher accuracy than the 'C' option. If the structure of the
-* input matrix is not known, and relative accuracy is
-* desirable, then this option is advisable. The input matrix A
-* is preprocessed with QR factorization with FULL (row and
-* column) pivoting.
-* = 'G' Computation as with 'F' with an additional estimate of the
-* condition number of B, where A=D*B. If A has heavily weighted
-* rows, then using this condition number gives too pessimistic
-* error bound.
-* = 'A': Small singular values are the noise and the matrix is treated
-* as numerically rank defficient. The error in the computed
-* singular values is bounded by f(m,n)*epsilon*||A||.
-* The computed SVD A = U * S * V^t restores A up to
-* f(m,n)*epsilon*||A||.
-* This gives the procedure the licence to discard (set to zero)
-* all singular values below N*epsilon*||A||.
-* = 'R': Similar as in 'A'. Rank revealing property of the initial
-* QR factorization is used do reveal (using triangular factor)
-* a gap sigma_{r+1} < epsilon * sigma_r in which case the
-* numerical RANK is declared to be r. The SVD is computed with
-* absolute error bounds, but more accurately than with 'A'.
-*
-* JOBU (input) CHARACTER*1
-* Specifies whether to compute the columns of U:
-* = 'U': N columns of U are returned in the array U.
-* = 'F': full set of M left sing. vectors is returned in the array U.
-* = 'W': U may be used as workspace of length M*N. See the description
-* of U.
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* Specifies whether to compute the matrix V:
-* = 'V': N columns of V are returned in the array V; Jacobi rotations
-* are not explicitly accumulated.
-* = 'J': N columns of V are returned in the array V, but they are
-* computed as the product of Jacobi rotations. This option is
-* allowed only if JOBU .NE. 'N', i.e. in computing the full SVD.
-* = 'W': V may be used as workspace of length N*N. See the description
-* of V.
-* = 'N': V is not computed.
-*
-* JOBR (input) CHARACTER*1
-* Specifies the RANGE for the singular values. Issues the licence to
-* set to zero small positive singular values if they are outside
-* specified range. If A .NE. 0 is scaled so that the largest singular
-* value of c*A is around DSQRT(BIG), BIG=SLAMCH('O'), then JOBR issues
-* the licence to kill columns of A whose norm in c*A is less than
-* DSQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN,
-* where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E').
-* = 'N': Do not kill small columns of c*A. This option assumes that
-* BLAS and QR factorizations and triangular solvers are
-* implemented to work in that range. If the condition of A
-* is greater than BIG, use DGESVJ.
-* = 'R': RESTRICTED range for sigma(c*A) is [DSQRT(SFMIN), DSQRT(BIG)]
-* (roughly, as described above). This option is recommended.
-* ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* For computing the singular values in the FULL range [SFMIN,BIG]
-* use DGESVJ.
-*
-* JOBT (input) CHARACTER*1
-* If the matrix is square then the procedure may determine to use
-* transposed A if A^t seems to be better with respect to convergence.
-* If the matrix is not square, JOBT is ignored. This is subject to
-* changes in the future.
-* The decision is based on two values of entropy over the adjoint
-* orbit of A^t * A. See the descriptions of WORK(6) and WORK(7).
-* = 'T': transpose if entropy test indicates possibly faster
-* convergence of Jacobi process if A^t is taken as input. If A is
-* replaced with A^t, then the row pivoting is included automatically.
-* = 'N': do not speculate.
-* This option can be used to compute only the singular values, or the
-* full SVD (U, SIGMA and V). For only one set of singular vectors
-* (U or V), the caller should provide both U and V, as one of the
-* matrices is used as workspace if the matrix A is transposed.
-* The implementer can easily remove this constraint and make the
-* code more complicated. See the descriptions of U and V.
-*
-* JOBP (input) CHARACTER*1
-* Issues the licence to introduce structured perturbations to drown
-* denormalized numbers. This licence should be active if the
-* denormals are poorly implemented, causing slow computation,
-* especially in cases of fast convergence (!). For details see [1,2].
-* For the sake of simplicity, this perturbations are included only
-* when the full SVD or only the singular values are requested. The
-* implementer/user can easily add the perturbation for the cases of
-* computing one set of singular vectors.
-* = 'P': introduce perturbation
-* = 'N': do not perturb
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. M >= N >= 0.
-*
-* A (input/workspace) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* SVA (workspace/output) DOUBLE PRECISION array, dimension (N)
-* On exit,
-* - For WORK(1)/WORK(2) = ONE: The singular values of A. During the
-* computation SVA contains Euclidean column norms of the
-* iterated matrices in the array A.
-* - For WORK(1) .NE. WORK(2): The singular values of A are
-* (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if
-* sigma_max(A) overflows or if small singular values have been
-* saved from underflow by scaling the input matrix A.
-* - If JOBR='R' then some of the singular values may be returned
-* as exact zeros obtained by "set to zero" because they are
-* below the numerical rank threshold or are denormalized numbers.
-*
-* U (workspace/output) DOUBLE PRECISION array, dimension ( LDU, N )
-* If JOBU = 'U', then U contains on exit the M-by-N matrix of
-* the left singular vectors.
-* If JOBU = 'F', then U contains on exit the M-by-M matrix of
-* the left singular vectors, including an ONB
-* of the orthogonal complement of the Range(A).
-* If JOBU = 'W' .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N),
-* then U is used as workspace if the procedure
-* replaces A with A^t. In that case, [V] is computed
-* in U as left singular vectors of A^t and then
-* copied back to the V array. This 'W' option is just
-* a reminder to the caller that in this case U is
-* reserved as workspace of length N*N.
-* If JOBU = 'N' U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U, LDU >= 1.
-* IF JOBU = 'U' or 'F' or 'W', then LDU >= M.
-*
-* V (workspace/output) DOUBLE PRECISION array, dimension ( LDV, N )
-* If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
-* the right singular vectors;
-* If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N),
-* then V is used as workspace if the pprocedure
-* replaces A with A^t. In that case, [U] is computed
-* in V as right singular vectors of A^t and then
-* copied back to the U array. This 'W' option is just
-* a reminder to the caller that in this case V is
-* reserved as workspace of length N*N.
-* If JOBV = 'N' V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V, LDV >= 1.
-* If JOBV = 'V' or 'J' or 'W', then LDV >= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension at least LWORK.
-* On exit, if N.GT.0 .AND. M.GT.0 (else not referenced),
-* WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such
-* that SCALE*SVA(1:N) are the computed singular values
-* of A. (See the description of SVA().)
-* WORK(2) = See the description of WORK(1).
-* WORK(3) = SCONDA is an estimate for the condition number of
-* column equilibrated A. (If JOBA .EQ. 'E' or 'G')
-* SCONDA is an estimate of DSQRT(||(R^t * R)^(-1)||_1).
-* It is computed using DPOCON. It holds
-* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
-* where R is the triangular factor from the QRF of A.
-* However, if R is truncated and the numerical rank is
-* determined to be strictly smaller than N, SCONDA is
-* returned as -1, thus indicating that the smallest
-* singular values might be lost.
-*
-* If full SVD is needed, the following two condition numbers are
-* useful for the analysis of the algorithm. They are provied for
-* a developer/implementer who is familiar with the details of
-* the method.
-*
-* WORK(4) = an estimate of the scaled condition number of the
-* triangular factor in the first QR factorization.
-* WORK(5) = an estimate of the scaled condition number of the
-* triangular factor in the second QR factorization.
-* The following two parameters are computed if JOBT .EQ. 'T'.
-* They are provided for a developer/implementer who is familiar
-* with the details of the method.
-*
-* WORK(6) = the entropy of A^t*A :: this is the Shannon entropy
-* of diag(A^t*A) / Trace(A^t*A) taken as point in the
-* probability simplex.
-* WORK(7) = the entropy of A*A^t.
-*
-* LWORK (input) INTEGER
-* Length of WORK to confirm proper allocation of work space.
-* LWORK depends on the job:
-*
-* If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and
-* -> .. no scaled condition estimate required (JOBE.EQ.'N'):
-* LWORK >= max(2*M+N,4*N+1,7). This is the minimal requirement.
-* ->> For optimal performance (blocked code) the optimal value
-* is LWORK >= max(2*M+N,3*N+(N+1)*NB,7). Here NB is the optimal
-* block size for DGEQP3 and DGEQRF.
-* In general, optimal LWORK is computed as
-* LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF), 7).
-* -> .. an estimate of the scaled condition number of A is
-* required (JOBA='E', 'G'). In this case, LWORK is the maximum
-* of the above and N*N+4*N, i.e. LWORK >= max(2*M+N,N*N+4*N,7).
-* ->> For optimal performance (blocked code) the optimal value
-* is LWORK >= max(2*M+N,3*N+(N+1)*NB, N*N+4*N, 7).
-* In general, the optimal length LWORK is computed as
-* LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF),
-* N+N*N+LWORK(DPOCON),7).
-*
-* If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),
-* -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
-* -> For optimal performance, LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
-* where NB is the optimal block size for DGEQP3, DGEQRF, DGELQ,
-* DORMLQ. In general, the optimal length LWORK is computed as
-* LWORK >= max(2*M+N,N+LWORK(DGEQP3), N+LWORK(DPOCON),
-* N+LWORK(DGELQ), 2*N+LWORK(DGEQRF), N+LWORK(DORMLQ)).
-*
-* If SIGMA and the left singular vectors are needed
-* -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
-* -> For optimal performance:
-* if JOBU.EQ.'U' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
-* if JOBU.EQ.'F' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,N+M*NB,7),
-* where NB is the optimal block size for DGEQP3, DGEQRF, DORMQR.
-* In general, the optimal length LWORK is computed as
-* LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DPOCON),
-* 2*N+LWORK(DGEQRF), N+LWORK(DORMQR)).
-* Here LWORK(DORMQR) equals N*NB (for JOBU.EQ.'U') or
-* M*NB (for JOBU.EQ.'F').
-*
-* If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and
-* -> if JOBV.EQ.'V'
-* the minimal requirement is LWORK >= max(2*M+N,6*N+2*N*N).
-* -> if JOBV.EQ.'J' the minimal requirement is
-* LWORK >= max(2*M+N, 4*N+N*N,2*N+N*N+6).
-* -> For optimal performance, LWORK should be additionally
-* larger than N+M*NB, where NB is the optimal block size
-* for DORMQR.
-*
-* IWORK (workspace/output) INTEGER array, dimension M+3*N.
-* On exit,
-* IWORK(1) = the numerical rank determined after the initial
-* QR factorization with pivoting. See the descriptions
-* of JOBA and JOBR.
-* IWORK(2) = the number of the computed nonzero singular values
-* IWORK(3) = if nonzero, a warning message:
-* If IWORK(3).EQ.1 then some of the column norms of A
-* were denormalized floats. The requested high accuracy
-* is not warranted by the data.
-*
-* INFO (output) INTEGER
-* < 0 : if INFO = -i, then the i-th argument had an illegal value.
-* = 0 : successfull exit;
-* > 0 : DGEJSV did not converge in the maximal allowed number
-* of sweeps. The computed values may be inaccurate.
-*
-* Further Details
-* ===============
-*
-* DGEJSV implements a preconditioned Jacobi SVD algorithm. It uses DGEQP3,
-* DGEQRF, and DGELQF as preprocessors and preconditioners. Optionally, an
-* additional row pivoting can be used as a preprocessor, which in some
-* cases results in much higher accuracy. An example is matrix A with the
-* structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
-* diagonal matrices and C is well-conditioned matrix. In that case, complete
-* pivoting in the first QR factorizations provides accuracy dependent on the
-* condition number of C, and independent of D1, D2. Such higher accuracy is
-* not completely understood theoretically, but it works well in practice.
-* Further, if A can be written as A = B*D, with well-conditioned B and some
-* diagonal D, then the high accuracy is guaranteed, both theoretically and
-* in software, independent of D. For more details see [1], [2].
-* The computational range for the singular values can be the full range
-* ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
-* & LAPACK routines called by DGEJSV are implemented to work in that range.
-* If that is not the case, then the restriction for safe computation with
-* the singular values in the range of normalized IEEE numbers is that the
-* spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
-* overflow. This code (DGEJSV) is best used in this restricted range,
-* meaning that singular values of magnitude below ||A||_2 / DLAMCH('O') are
-* returned as zeros. See JOBR for details on this.
-* Further, this implementation is somewhat slower than the one described
-* in [1,2] due to replacement of some non-LAPACK components, and because
-* the choice of some tuning parameters in the iterative part (DGESVJ) is
-* left to the implementer on a particular machine.
-* The rank revealing QR factorization (in this code: DGEQP3) should be
-* implemented as in [3]. We have a new version of DGEQP3 under development
-* that is more robust than the current one in LAPACK, with a cleaner cut in
-* rank defficient cases. It will be available in the SIGMA library [4].
-* If M is much larger than N, it is obvious that the inital QRF with
-* column pivoting can be preprocessed by the QRF without pivoting. That
-* well known trick is not used in DGEJSV because in some cases heavy row
-* weighting can be treated with complete pivoting. The overhead in cases
-* M much larger than N is then only due to pivoting, but the benefits in
-* terms of accuracy have prevailed. The implementer/user can incorporate
-* this extra QRF step easily. The implementer can also improve data movement
-* (matrix transpose, matrix copy, matrix transposed copy) - this
-* implementation of DGEJSV uses only the simplest, naive data movement.
-*
-* Contributors
-*
-* Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-* References
-*
-* [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
-* SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
-* LAPACK Working note 169.
-* [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
-* SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
-* LAPACK Working note 170.
-* [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
-* factorization software - a case study.
-* ACM Trans. Math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
-* LAPACK Working note 176.
-* [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
-* QSVD, (H,K)-SVD computations.
-* Department of Mathematics, University of Zagreb, 2008.
-*
-* Bugs, examples and comments
-*
-* Please report all bugs and send interesting examples and/or comments to
-* drmac@math.hr. Thank you.
-*
* ===========================================================================
*
* .. Local Parameters ..
diff --git a/SRC/dgelq2.f b/SRC/dgelq2.f
index 77d45108..2e6fe395 100644
--- a/SRC/dgelq2.f
+++ b/SRC/dgelq2.f
@@ -1,67 +1,110 @@
- SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b DGELQ2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGELQ2 computes an LQ factorization of a real m by n matrix A:
-* A = L * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGELQ2 computes an LQ factorization of a real m by n matrix A:
+*> A = L * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and below the diagonal of the array
-* contain the m by min(m,n) lower trapezoidal matrix L (L is
-* lower triangular if m <= n); the elements above the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M)
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (M)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgelqf.f b/SRC/dgelqf.f
index 5a3ceeff..ab94e686 100644
--- a/SRC/dgelqf.f
+++ b/SRC/dgelqf.f
@@ -1,78 +1,121 @@
- SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DGELQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGELQF computes an LQ factorization of a real M-by-N matrix A:
-* A = L * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGELQF computes an LQ factorization of a real M-by-N matrix A:
+*> A = L * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and below the diagonal of the array
-* contain the m-by-min(m,n) lower trapezoidal matrix L (L is
-* lower triangular if m <= n); the elements above the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgels.f b/SRC/dgels.f
index 25176bfb..31fb1ce2 100644
--- a/SRC/dgels.f
+++ b/SRC/dgels.f
@@ -1,10 +1,185 @@
+*> \brief <b> DGELS solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGELS solves overdetermined or underdetermined real linear systems
+*> involving an M-by-N matrix A, or its transpose, using a QR or LQ
+*> factorization of A. It is assumed that A has full rank.
+*>
+*> The following options are provided:
+*>
+*> 1. If TRANS = 'N' and m >= n: find the least squares solution of
+*> an overdetermined system, i.e., solve the least squares problem
+*> minimize || B - A*X ||.
+*>
+*> 2. If TRANS = 'N' and m < n: find the minimum norm solution of
+*> an underdetermined system A * X = B.
+*>
+*> 3. If TRANS = 'T' and m >= n: find the minimum norm solution of
+*> an undetermined system A**T * X = B.
+*>
+*> 4. If TRANS = 'T' and m < n: find the least squares solution of
+*> an overdetermined system, i.e., solve the least squares problem
+*> minimize || B - A**T * X ||.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': the linear system involves A;
+*> = 'T': the linear system involves A**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of the matrices B and X. NRHS >=0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if M >= N, A is overwritten by details of its QR
+*> factorization as returned by DGEQRF;
+*> if M < N, A is overwritten by details of its LQ
+*> factorization as returned by DGELQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the matrix B of right hand side vectors, stored
+*> columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
+*> if TRANS = 'T'.
+*> On exit, if INFO = 0, B is overwritten by the solution
+*> vectors, stored columnwise:
+*> if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
+*> squares solution vectors; the residual sum of squares for the
+*> solution in each column is given by the sum of squares of
+*> elements N+1 to M in that column;
+*> if TRANS = 'N' and m < n, rows 1 to N of B contain the
+*> minimum norm solution vectors;
+*> if TRANS = 'T' and m >= n, rows 1 to M of B contain the
+*> minimum norm solution vectors;
+*> if TRANS = 'T' and m < n, rows 1 to M of B contain the
+*> least squares solution vectors; the residual sum of squares
+*> for the solution in each column is given by the sum of
+*> squares of elements M+1 to N in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= MAX(1,M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= max( 1, MN + max( MN, NRHS ) ).
+*> For optimal performance,
+*> LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
+*> where MN = min(M,N) and NB is the optimum block size.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of the
+*> triangular factor of A is zero, so that A does not have
+*> full rank; the least squares solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsolve
+*
+* =====================================================================
SUBROUTINE DGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -14,107 +189,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGELS solves overdetermined or underdetermined real linear systems
-* involving an M-by-N matrix A, or its transpose, using a QR or LQ
-* factorization of A. It is assumed that A has full rank.
-*
-* The following options are provided:
-*
-* 1. If TRANS = 'N' and m >= n: find the least squares solution of
-* an overdetermined system, i.e., solve the least squares problem
-* minimize || B - A*X ||.
-*
-* 2. If TRANS = 'N' and m < n: find the minimum norm solution of
-* an underdetermined system A * X = B.
-*
-* 3. If TRANS = 'T' and m >= n: find the minimum norm solution of
-* an undetermined system A**T * X = B.
-*
-* 4. If TRANS = 'T' and m < n: find the least squares solution of
-* an overdetermined system, i.e., solve the least squares problem
-* minimize || B - A**T * X ||.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N': the linear system involves A;
-* = 'T': the linear system involves A**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of the matrices B and X. NRHS >=0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if M >= N, A is overwritten by details of its QR
-* factorization as returned by DGEQRF;
-* if M < N, A is overwritten by details of its LQ
-* factorization as returned by DGELQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the matrix B of right hand side vectors, stored
-* columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
-* if TRANS = 'T'.
-* On exit, if INFO = 0, B is overwritten by the solution
-* vectors, stored columnwise:
-* if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
-* squares solution vectors; the residual sum of squares for the
-* solution in each column is given by the sum of squares of
-* elements N+1 to M in that column;
-* if TRANS = 'N' and m < n, rows 1 to N of B contain the
-* minimum norm solution vectors;
-* if TRANS = 'T' and m >= n, rows 1 to M of B contain the
-* minimum norm solution vectors;
-* if TRANS = 'T' and m < n, rows 1 to M of B contain the
-* least squares solution vectors; the residual sum of squares
-* for the solution in each column is given by the sum of
-* squares of elements M+1 to N in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= MAX(1,M,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= max( 1, MN + max( MN, NRHS ) ).
-* For optimal performance,
-* LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
-* where MN = min(M,N) and NB is the optimum block size.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of the
-* triangular factor of A is zero, so that A does not have
-* full rank; the least squares solution could not be
-* computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgelsd.f b/SRC/dgelsd.f
index e2b138e7..c1e785cb 100644
--- a/SRC/dgelsd.f
+++ b/SRC/dgelsd.f
@@ -1,10 +1,217 @@
+*> \brief <b> DGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+* WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGELSD computes the minimum-norm solution to a real linear least
+*> squares problem:
+*> minimize 2-norm(| b - A*x |)
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The problem is solved in three steps:
+*> (1) Reduce the coefficient matrix A to bidiagonal form with
+*> Householder transformations, reducing the original problem
+*> into a "bidiagonal least squares problem" (BLS)
+*> (2) Solve the BLS using a divide and conquer approach.
+*> (3) Apply back all the Householder tranformations to solve
+*> the original least squares problem.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, B is overwritten by the N-by-NRHS solution
+*> matrix X. If m >= n and RANK = n, the residual
+*> sum-of-squares for the solution in the i-th column is given
+*> by the sum of squares of elements n+1:m in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,max(M,N)).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of A in decreasing order.
+*> The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> RCOND is used to determine the effective rank of A.
+*> Singular values S(i) <= RCOND*S(1) are treated as zero.
+*> If RCOND < 0, machine precision is used instead.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the number of singular values
+*> which are greater than RCOND*S(1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK must be at least 1.
+*> The exact minimum amount of workspace needed depends on M,
+*> N and NRHS. As long as LWORK is at least
+*> 12*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2,
+*> if M is greater than or equal to N or
+*> 12*M + 2*M*SMLSIZ + 8*M*NLVL + M*NRHS + (SMLSIZ+1)**2,
+*> if M is less than N, the code will execute correctly.
+*> SMLSIZ is returned by ILAENV and is equal to the maximum
+*> size of the subproblems at the bottom of the computation
+*> tree (usually about 25), and
+*> NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> LIWORK >= max(1, 3 * MINMN * NLVL + 11 * MINMN),
+*> where MINMN = MIN( M,N ).
+*> On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the algorithm for computing the SVD failed to converge;
+*> if INFO = i, i off-diagonal elements of an intermediate
+*> bidiagonal form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ WORK, LWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK solve routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -15,124 +222,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGELSD computes the minimum-norm solution to a real linear least
-* squares problem:
-* minimize 2-norm(| b - A*x |)
-* using the singular value decomposition (SVD) of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The problem is solved in three steps:
-* (1) Reduce the coefficient matrix A to bidiagonal form with
-* Householder transformations, reducing the original problem
-* into a "bidiagonal least squares problem" (BLS)
-* (2) Solve the BLS using a divide and conquer approach.
-* (3) Apply back all the Householder tranformations to solve
-* the original least squares problem.
-*
-* The effective rank of A is determined by treating as zero those
-* singular values which are less than RCOND times the largest singular
-* value.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, B is overwritten by the N-by-NRHS solution
-* matrix X. If m >= n and RANK = n, the residual
-* sum-of-squares for the solution in the i-th column is given
-* by the sum of squares of elements n+1:m in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,max(M,N)).
-*
-* S (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of A in decreasing order.
-* The condition number of A in the 2-norm = S(1)/S(min(m,n)).
-*
-* RCOND (input) DOUBLE PRECISION
-* RCOND is used to determine the effective rank of A.
-* Singular values S(i) <= RCOND*S(1) are treated as zero.
-* If RCOND < 0, machine precision is used instead.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the number of singular values
-* which are greater than RCOND*S(1).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK must be at least 1.
-* The exact minimum amount of workspace needed depends on M,
-* N and NRHS. As long as LWORK is at least
-* 12*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2,
-* if M is greater than or equal to N or
-* 12*M + 2*M*SMLSIZ + 8*M*NLVL + M*NRHS + (SMLSIZ+1)**2,
-* if M is less than N, the code will execute correctly.
-* SMLSIZ is returned by ILAENV and is equal to the maximum
-* size of the subproblems at the bottom of the computation
-* tree (usually about 25), and
-* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
-* LIWORK >= max(1, 3 * MINMN * NLVL + 11 * MINMN),
-* where MINMN = MIN( M,N ).
-* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the algorithm for computing the SVD failed to converge;
-* if INFO = i, i off-diagonal elements of an intermediate
-* bidiagonal form did not converge to zero.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgelss.f b/SRC/dgelss.f
index 9402a5de..2e1cc919 100644
--- a/SRC/dgelss.f
+++ b/SRC/dgelss.f
@@ -1,10 +1,174 @@
+*> \brief <b> DGELSS solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGELSS computes the minimum norm solution to a real linear least
+*> squares problem:
+*>
+*> Minimize 2-norm(| b - A*x |).
+*>
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix
+*> X.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the first min(m,n) rows of A are overwritten with
+*> its right singular vectors, stored rowwise.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, B is overwritten by the N-by-NRHS solution
+*> matrix X. If m >= n and RANK = n, the residual
+*> sum-of-squares for the solution in the i-th column is given
+*> by the sum of squares of elements n+1:m in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,max(M,N)).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of A in decreasing order.
+*> The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> RCOND is used to determine the effective rank of A.
+*> Singular values S(i) <= RCOND*S(1) are treated as zero.
+*> If RCOND < 0, machine precision is used instead.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the number of singular values
+*> which are greater than RCOND*S(1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1, and also:
+*> LWORK >= 3*min(M,N) + max( 2*min(M,N), max(M,N), NRHS )
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the algorithm for computing the SVD failed to converge;
+*> if INFO = i, i off-diagonal elements of an intermediate
+*> bidiagonal form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsolve
+*
+* =====================================================================
SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK solve routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -14,90 +178,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGELSS computes the minimum norm solution to a real linear least
-* squares problem:
-*
-* Minimize 2-norm(| b - A*x |).
-*
-* using the singular value decomposition (SVD) of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix
-* X.
-*
-* The effective rank of A is determined by treating as zero those
-* singular values which are less than RCOND times the largest singular
-* value.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the first min(m,n) rows of A are overwritten with
-* its right singular vectors, stored rowwise.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, B is overwritten by the N-by-NRHS solution
-* matrix X. If m >= n and RANK = n, the residual
-* sum-of-squares for the solution in the i-th column is given
-* by the sum of squares of elements n+1:m in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,max(M,N)).
-*
-* S (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of A in decreasing order.
-* The condition number of A in the 2-norm = S(1)/S(min(m,n)).
-*
-* RCOND (input) DOUBLE PRECISION
-* RCOND is used to determine the effective rank of A.
-* Singular values S(i) <= RCOND*S(1) are treated as zero.
-* If RCOND < 0, machine precision is used instead.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the number of singular values
-* which are greater than RCOND*S(1).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1, and also:
-* LWORK >= 3*min(M,N) + max( 2*min(M,N), max(M,N), NRHS )
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the algorithm for computing the SVD failed to converge;
-* if INFO = i, i off-diagonal elements of an intermediate
-* bidiagonal form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgelsx.f b/SRC/dgelsx.f
index 297801fa..2ef40265 100644
--- a/SRC/dgelsx.f
+++ b/SRC/dgelsx.f
@@ -1,10 +1,179 @@
+*> \brief <b> DGELSX solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine DGELSY.
+*>
+*> DGELSX computes the minimum-norm solution to a real linear least
+*> squares problem:
+*> minimize || A * X - B ||
+*> using a complete orthogonal factorization of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The routine first computes a QR factorization with column pivoting:
+*> A * P = Q * [ R11 R12 ]
+*> [ 0 R22 ]
+*> with R11 defined as the largest leading submatrix whose estimated
+*> condition number is less than 1/RCOND. The order of R11, RANK,
+*> is the effective rank of A.
+*>
+*> Then, R22 is considered to be negligible, and R12 is annihilated
+*> by orthogonal transformations from the right, arriving at the
+*> complete orthogonal factorization:
+*> A * P = Q * [ T11 0 ] * Z
+*> [ 0 0 ]
+*> The minimum-norm solution is then
+*> X = P * Z**T [ inv(T11)*Q1**T*B ]
+*> [ 0 ]
+*> where Q1 consists of the first RANK columns of Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been overwritten by details of its
+*> complete orthogonal factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, the N-by-NRHS solution matrix X.
+*> If m >= n and RANK = n, the residual sum-of-squares for
+*> the solution in the i-th column is given by the sum of
+*> squares of elements N+1:M in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is an
+*> initial column, otherwise it is a free column. Before
+*> the QR factorization of A, all initial columns are
+*> permuted to the leading positions; only the remaining
+*> free columns are moved as a result of column pivoting
+*> during the factorization.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> RCOND is used to determine the effective rank of A, which
+*> is defined as the order of the largest leading triangular
+*> submatrix R11 in the QR factorization with pivoting of A,
+*> whose estimated condition number < 1/RCOND.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the order of the submatrix
+*> R11. This is the same as the order of the submatrix T11
+*> in the complete orthogonal factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (max( min(M,N)+3*N, 2*min(M,N)+NRHS )),
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsolve
+*
+* =====================================================================
SUBROUTINE DGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
@@ -15,98 +184,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine DGELSY.
-*
-* DGELSX computes the minimum-norm solution to a real linear least
-* squares problem:
-* minimize || A * X - B ||
-* using a complete orthogonal factorization of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The routine first computes a QR factorization with column pivoting:
-* A * P = Q * [ R11 R12 ]
-* [ 0 R22 ]
-* with R11 defined as the largest leading submatrix whose estimated
-* condition number is less than 1/RCOND. The order of R11, RANK,
-* is the effective rank of A.
-*
-* Then, R22 is considered to be negligible, and R12 is annihilated
-* by orthogonal transformations from the right, arriving at the
-* complete orthogonal factorization:
-* A * P = Q * [ T11 0 ] * Z
-* [ 0 0 ]
-* The minimum-norm solution is then
-* X = P * Z**T [ inv(T11)*Q1**T*B ]
-* [ 0 ]
-* where Q1 consists of the first RANK columns of Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of matrices B and X. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been overwritten by details of its
-* complete orthogonal factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, the N-by-NRHS solution matrix X.
-* If m >= n and RANK = n, the residual sum-of-squares for
-* the solution in the i-th column is given by the sum of
-* squares of elements N+1:M in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is an
-* initial column, otherwise it is a free column. Before
-* the QR factorization of A, all initial columns are
-* permuted to the leading positions; only the remaining
-* free columns are moved as a result of column pivoting
-* during the factorization.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
-*
-* RCOND (input) DOUBLE PRECISION
-* RCOND is used to determine the effective rank of A, which
-* is defined as the order of the largest leading triangular
-* submatrix R11 in the QR factorization with pivoting of A,
-* whose estimated condition number < 1/RCOND.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the order of the submatrix
-* R11. This is the same as the order of the submatrix T11
-* in the complete orthogonal factorization of A.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (max( min(M,N)+3*N, 2*min(M,N)+NRHS )),
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgelsy.f b/SRC/dgelsy.f
index 8a15eb50..a4848b57 100644
--- a/SRC/dgelsy.f
+++ b/SRC/dgelsy.f
@@ -1,10 +1,212 @@
+*> \brief <b> DGELSY solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGELSY computes the minimum-norm solution to a real linear least
+*> squares problem:
+*> minimize || A * X - B ||
+*> using a complete orthogonal factorization of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The routine first computes a QR factorization with column pivoting:
+*> A * P = Q * [ R11 R12 ]
+*> [ 0 R22 ]
+*> with R11 defined as the largest leading submatrix whose estimated
+*> condition number is less than 1/RCOND. The order of R11, RANK,
+*> is the effective rank of A.
+*>
+*> Then, R22 is considered to be negligible, and R12 is annihilated
+*> by orthogonal transformations from the right, arriving at the
+*> complete orthogonal factorization:
+*> A * P = Q * [ T11 0 ] * Z
+*> [ 0 0 ]
+*> The minimum-norm solution is then
+*> X = P * Z**T [ inv(T11)*Q1**T*B ]
+*> [ 0 ]
+*> where Q1 consists of the first RANK columns of Q.
+*>
+*> This routine is basically identical to the original xGELSX except
+*> three differences:
+*> o The call to the subroutine xGEQPF has been substituted by the
+*> the call to the subroutine xGEQP3. This subroutine is a Blas-3
+*> version of the QR factorization with column pivoting.
+*> o Matrix B (the right hand side) is updated with Blas-3.
+*> o The permutation of matrix B (the right hand side) is faster and
+*> more simple.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been overwritten by details of its
+*> complete orthogonal factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of AP, otherwise column i is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of AP
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> RCOND is used to determine the effective rank of A, which
+*> is defined as the order of the largest leading triangular
+*> submatrix R11 in the QR factorization with pivoting of A,
+*> whose estimated condition number < 1/RCOND.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the order of the submatrix
+*> R11. This is the same as the order of the submatrix T11
+*> in the complete orthogonal factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> The unblocked strategy requires that:
+*> LWORK >= MAX( MN+3*N+1, 2*MN+NRHS ),
+*> where MN = min( M, N ).
+*> The block algorithm requires that:
+*> LWORK >= MAX( MN+2*N+NB*(N+1), 2*MN+NB*NRHS ),
+*> where NB is an upper bound on the blocksize returned
+*> by ILAENV for the routines DGEQP3, DTZRZF, STZRQF, DORMQR,
+*> and DORMRZ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: If INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*> E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -15,122 +217,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGELSY computes the minimum-norm solution to a real linear least
-* squares problem:
-* minimize || A * X - B ||
-* using a complete orthogonal factorization of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The routine first computes a QR factorization with column pivoting:
-* A * P = Q * [ R11 R12 ]
-* [ 0 R22 ]
-* with R11 defined as the largest leading submatrix whose estimated
-* condition number is less than 1/RCOND. The order of R11, RANK,
-* is the effective rank of A.
-*
-* Then, R22 is considered to be negligible, and R12 is annihilated
-* by orthogonal transformations from the right, arriving at the
-* complete orthogonal factorization:
-* A * P = Q * [ T11 0 ] * Z
-* [ 0 0 ]
-* The minimum-norm solution is then
-* X = P * Z**T [ inv(T11)*Q1**T*B ]
-* [ 0 ]
-* where Q1 consists of the first RANK columns of Q.
-*
-* This routine is basically identical to the original xGELSX except
-* three differences:
-* o The call to the subroutine xGEQPF has been substituted by the
-* the call to the subroutine xGEQP3. This subroutine is a Blas-3
-* version of the QR factorization with column pivoting.
-* o Matrix B (the right hand side) is updated with Blas-3.
-* o The permutation of matrix B (the right hand side) is faster and
-* more simple.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of matrices B and X. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been overwritten by details of its
-* complete orthogonal factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of AP, otherwise column i is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of AP
-* was the k-th column of A.
-*
-* RCOND (input) DOUBLE PRECISION
-* RCOND is used to determine the effective rank of A, which
-* is defined as the order of the largest leading triangular
-* submatrix R11 in the QR factorization with pivoting of A,
-* whose estimated condition number < 1/RCOND.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the order of the submatrix
-* R11. This is the same as the order of the submatrix T11
-* in the complete orthogonal factorization of A.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* The unblocked strategy requires that:
-* LWORK >= MAX( MN+3*N+1, 2*MN+NRHS ),
-* where MN = min( M, N ).
-* The block algorithm requires that:
-* LWORK >= MAX( MN+2*N+NB*(N+1), 2*MN+NB*NRHS ),
-* where NB is an upper bound on the blocksize returned
-* by ILAENV for the routines DGEQP3, DTZRZF, STZRQF, DORMQR,
-* and DORMRZ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: If INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-* E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgemqrt.f b/SRC/dgemqrt.f
index 0d4dec9d..a5464b1c 100644
--- a/SRC/dgemqrt.f
+++ b/SRC/dgemqrt.f
@@ -1,96 +1,177 @@
- SUBROUTINE DGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
- $ C, LDC, WORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
-* ..
-*
+*> \brief \b DGEMQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
+* C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEMQRT overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q C C Q
-* TRANS = 'T': Q**T C C Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of K
-* elementary reflectors:
-*
-* Q = H(1) H(2) . . . H(K) = I - V T V**T
-*
-* generated using the compact WY representation as returned by DGEQRT.
-*
-* Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEMQRT overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q C C Q
+*> TRANS = 'T': Q**T C C Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of K
+*> elementary reflectors:
+*>
+*> Q = H(1) H(2) . . . H(K) = I - V T V**T
+*>
+*> generated using the compact WY representation as returned by DGEQRT.
+*>
+*> Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* NB (input) INTEGER
-* The block size used for the storage of T. K >= NB >= 1.
-* This must be the same value of NB used to generate T
-* in CGEQRT.
-*
-* V (input) DOUBLE PRECISION array, dimension (LDV,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGEQRT in the first K columns of its array argument A.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The block size used for the storage of T. K >= NB >= 1.
+*> This must be the same value of NB used to generate T
+*> in CGEQRT.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGEQRT in the first K columns of its array argument A.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,K)
+*> The upper triangular factors of the block reflectors
+*> as returned by CGEQRT, stored as a NB-by-N matrix.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q C, Q**T C, C Q**T or C Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array. The dimension of
+*> WORK is N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (input) DOUBLE PRECISION array, dimension (LDT,K)
-* The upper triangular factors of the block reflectors
-* as returned by CGEQRT, stored as a NB-by-N matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q C, Q**T C, C Q**T or C Q.
+*> \ingroup doubleGEcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE DGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
+ $ C, LDC, WORK, INFO )
*
-* WORK (workspace/output) DOUBLE PRECISION array. The dimension of
-* WORK is N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeql2.f b/SRC/dgeql2.f
index 6516c644..b1bace33 100644
--- a/SRC/dgeql2.f
+++ b/SRC/dgeql2.f
@@ -1,69 +1,110 @@
- SUBROUTINE DGEQL2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b DGEQL2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQL2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQL2 computes a QL factorization of a real m by n matrix A:
-* A = Q * L.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQL2 computes a QL factorization of a real m by n matrix A:
+*> A = Q * L.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, if m >= n, the lower triangle of the subarray
-* A(m-n+1:m,1:n) contains the n by n lower triangular matrix L;
-* if m <= n, the elements on and below the (n-m)-th
-* superdiagonal contain the m by n lower trapezoidal matrix L;
-* the remaining elements, with the array TAU, represent the
-* orthogonal matrix Q as a product of elementary reflectors
-* (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
+*> A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQL2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
-* A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqlf.f b/SRC/dgeqlf.f
index 50463a7f..2a2ad340 100644
--- a/SRC/dgeqlf.f
+++ b/SRC/dgeqlf.f
@@ -1,81 +1,121 @@
- SUBROUTINE DGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DGEQLF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQLF computes a QL factorization of a real M-by-N matrix A:
-* A = Q * L.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQLF computes a QL factorization of a real M-by-N matrix A:
+*> A = Q * L.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if m >= n, the lower triangle of the subarray
-* A(m-n+1:m,1:n) contains the N-by-N lower triangular matrix L;
-* if m <= n, the elements on and below the (n-m)-th
-* superdiagonal contain the M-by-N lower trapezoidal matrix L;
-* the remaining elements, with the array TAU, represent the
-* orthogonal matrix Q as a product of elementary reflectors
-* (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
+*> A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
-* A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqp3.f b/SRC/dgeqp3.f
index 15a9c526..bccd7fc2 100644
--- a/SRC/dgeqp3.f
+++ b/SRC/dgeqp3.f
@@ -1,89 +1,161 @@
- SUBROUTINE DGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DGEQP3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQP3 computes a QR factorization with column pivoting of a
-* matrix A: A*P = Q*R using Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQP3 computes a QR factorization with column pivoting of a
+*> matrix A: A*P = Q*R using Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of the array contains the
-* min(M,N)-by-N upper trapezoidal matrix R; the elements below
-* the diagonal, together with the array TAU, represent the
-* orthogonal matrix Q as a product of min(M,N) elementary
-* reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(J).ne.0, the J-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(J)=0,
-* the J-th column of A is a free column.
-* On exit, if JPVT(J)=K, then the J-th column of A*P was the
-* the K-th column of A.
-*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of the array contains the
+*> min(M,N)-by-N upper trapezoidal matrix R; the elements below
+*> the diagonal, together with the array TAU, represent the
+*> orthogonal matrix Q as a product of min(M,N) elementary
+*> reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(J).ne.0, the J-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(J)=0,
+*> the J-th column of A is a free column.
+*> On exit, if JPVT(J)=K, then the J-th column of A*P was the
+*> the K-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 3*N+1.
+*> For optimal performance LWORK >= 2*N+( N+1 )*NB, where NB
+*> is the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 3*N+1.
-* For optimal performance LWORK >= 2*N+( N+1 )*NB, where NB
-* is the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real/complex scalar, and v is a real/complex vector
+*> with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
+*> A(i+1:m,i), and tau in TAU(i).
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real/complex scalar, and v is a real/complex vector
-* with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
-* A(i+1:m,i), and tau in TAU(i).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqpf.f b/SRC/dgeqpf.f
index e4bf68fd..8d021f64 100644
--- a/SRC/dgeqpf.f
+++ b/SRC/dgeqpf.f
@@ -1,85 +1,153 @@
- SUBROUTINE DGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO )
-*
-* -- LAPACK deprecated computational routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DGEQPF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine DGEQP3.
-*
-* DGEQPF computes a QR factorization with column pivoting of a
-* real M-by-N matrix A: A*P = Q*R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine DGEQP3.
+*>
+*> DGEQPF computes a QR factorization with column pivoting of a
+*> real M-by-N matrix A: A*P = Q*R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of the array contains the
-* min(M,N)-by-N upper triangular matrix R; the elements
-* below the diagonal, together with the array TAU,
-* represent the orthogonal matrix Q as a product of
-* min(m,n) elementary reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of the array contains the
+*> min(M,N)-by-N upper triangular matrix R; the elements
+*> below the diagonal, together with the array TAU,
+*> represent the orthogonal matrix Q as a product of
+*> min(m,n) elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(i) = 0,
+*> the i-th column of A is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(i) = 0,
-* the i-th column of A is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(n)
+*>
+*> Each H(i) has the form
+*>
+*> H = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
+*>
+*> The matrix P is represented in jpvt as follows: If
+*> jpvt(j) = i
+*> then the jth column of P is the ith canonical unit vector.
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(n)
-*
-* Each H(i) has the form
-*
-* H = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
-*
-* The matrix P is represented in jpvt as follows: If
-* jpvt(j) = i
-* then the jth column of P is the ith canonical unit vector.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqr2.f b/SRC/dgeqr2.f
index daefb4bc..a68645e2 100644
--- a/SRC/dgeqr2.f
+++ b/SRC/dgeqr2.f
@@ -1,67 +1,110 @@
- SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b DGEQR2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQR2 computes a QR factorization of a real m by n matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQR2 computes a QR factorization of a real m by n matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(m,n) by n upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqr2p.f b/SRC/dgeqr2p.f
index 2d5a9daa..5220e6c2 100644
--- a/SRC/dgeqr2p.f
+++ b/SRC/dgeqr2p.f
@@ -1,67 +1,110 @@
- SUBROUTINE DGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b DGEQR2P
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQR2 computes a QR factorization of a real m by n matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQR2 computes a QR factorization of a real m by n matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(m,n) by n upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqrf.f b/SRC/dgeqrf.f
index 9608b741..860a30ca 100644
--- a/SRC/dgeqrf.f
+++ b/SRC/dgeqrf.f
@@ -1,79 +1,147 @@
- SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DGEQRF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQRF computes a QR factorization of a real M-by-N matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQRF computes a QR factorization of a real M-by-N matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if m >= n); the elements below the diagonal,
+*> with the array TAU, represent the orthogonal matrix Q as a
+*> product of min(m,n) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqrfp.f b/SRC/dgeqrfp.f
index 5671eb55..e6c3148f 100644
--- a/SRC/dgeqrfp.f
+++ b/SRC/dgeqrfp.f
@@ -1,79 +1,147 @@
- SUBROUTINE DGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DGEQRFP
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQRFP computes a QR factorization of a real M-by-N matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQRFP computes a QR factorization of a real M-by-N matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if m >= n); the elements below the diagonal,
+*> with the array TAU, represent the orthogonal matrix Q as a
+*> product of min(m,n) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqrt.f b/SRC/dgeqrt.f
index 097b5f80..0215f879 100644
--- a/SRC/dgeqrt.f
+++ b/SRC/dgeqrt.f
@@ -1,82 +1,151 @@
- SUBROUTINE DGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
- IMPLICIT NONE
+*> \brief \b DGEQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDT, M, N, NB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDT, M, N, NB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGEQRT computes a blocked QR factorization of a real M-by-N matrix A
-* using the compact WY representation of Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQRT computes a blocked QR factorization of a real M-by-N matrix A
+*> using the compact WY representation of Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The block size to be used in the blocked QR. MIN(M,N) >= NB >= 1.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if M >= N); the elements below the diagonal
-* are the columns of V.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The block size to be used in the blocked QR. MIN(M,N) >= NB >= 1.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if M >= N); the elements below the diagonal
+*> are the columns of V.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,MIN(M,N))
+*> The upper triangular block reflectors stored in compact form
+*> as a sequence of upper triangular blocks. See below
+*> for further details.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NB*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,MIN(M,N))
-* The upper triangular block reflectors stored in compact form
-* as a sequence of upper triangular blocks. See below
-* for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NB*N)
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A.
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A.
+*>
+*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each
+*> block is of order NB except for the last block, which is of order
+*> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block
+*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
+*> for the last block) T's are stored in the NB-by-N matrix T as
+*>
+*> T = (T1 T2 ... TB).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
*
-* Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each
-* block is of order NB except for the last block, which is of order
-* IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block
-* reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
-* for the last block) T's are stored in the NB-by-N matrix T as
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* T = (T1 T2 ... TB).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDT, M, N, NB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqrt2.f b/SRC/dgeqrt2.f
index edb01da4..fea150f2 100644
--- a/SRC/dgeqrt2.f
+++ b/SRC/dgeqrt2.f
@@ -1,73 +1,135 @@
- SUBROUTINE DGEQRT2( M, N, A, LDA, T, LDT, INFO )
+*> \brief \b DGEQRT2
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDT, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), T( LDT, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGEQRT2( M, N, A, LDA, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDT, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* DGEQRT2 computes a QR factorization of a real M-by-N matrix A,
-* using the compact WY representation of Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQRT2 computes a QR factorization of a real M-by-N matrix A,
+*> using the compact WY representation of Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= N.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the real M-by-N matrix A. On exit, the elements on and
-* above the diagonal contain the N-by-N upper triangular matrix R; the
-* elements below the diagonal are the columns of V. See below for
-* further details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the real M-by-N matrix A. On exit, the elements on and
+*> above the diagonal contain the N-by-N upper triangular matrix R; the
+*> elements below the diagonal are the columns of V. See below for
+*> further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,N)
+*> The N-by-N upper triangular factor of the block reflector.
+*> The elements on and above the diagonal contain the block
+*> reflector T; the elements below the diagonal are not used.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> LDT (intput) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,N)
-* The N-by-N upper triangular factor of the block reflector.
-* The elements on and above the diagonal contain the block
-* reflector T; the elements below the diagonal are not used.
-* See below for further details.
+*> \date November 2011
*
-* LDT (intput) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A. The
+*> block reflector H is then given by
+*>
+*> H = I - V * T * V**T
+*>
+*> where V**T is the transpose of V.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGEQRT2( M, N, A, LDA, T, LDT, INFO )
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A. The
-* block reflector H is then given by
-*
-* H = I - V * T * V**T
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where V**T is the transpose of V.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDT, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgeqrt3.f b/SRC/dgeqrt3.f
index 1325365f..9086e061 100644
--- a/SRC/dgeqrt3.f
+++ b/SRC/dgeqrt3.f
@@ -1,79 +1,140 @@
- RECURSIVE SUBROUTINE DGEQRT3( M, N, A, LDA, T, LDT, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
+*> \brief \b DGEQRT3
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N, LDT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), T( LDT, * )
-* ..
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* RECURSIVE SUBROUTINE DGEQRT3( M, N, A, LDA, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N, LDT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* DGEQRT3 recursively computes a QR factorization of a real M-by-N
-* matrix A, using the compact WY representation of Q.
-*
-* Based on the algorithm of Elmroth and Gustavson,
-* IBM J. Res. Develop. Vol 44 No. 4 July 2000.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGEQRT3 recursively computes a QR factorization of a real M-by-N
+*> matrix A, using the compact WY representation of Q.
+*>
+*> Based on the algorithm of Elmroth and Gustavson,
+*> IBM J. Res. Develop. Vol 44 No. 4 July 2000.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= N.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the real M-by-N matrix A. On exit, the elements on and
-* above the diagonal contain the N-by-N upper triangular matrix R; the
-* elements below the diagonal are the columns of V. See below for
-* further details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the real M-by-N matrix A. On exit, the elements on and
+*> above the diagonal contain the N-by-N upper triangular matrix R; the
+*> elements below the diagonal are the columns of V. See below for
+*> further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,N)
+*> The N-by-N upper triangular factor of the block reflector.
+*> The elements on and above the diagonal contain the block
+*> reflector T; the elements below the diagonal are not used.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> LDT (intput) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,N)
-* The N-by-N upper triangular factor of the block reflector.
-* The elements on and above the diagonal contain the block
-* reflector T; the elements below the diagonal are not used.
-* See below for further details.
+*> \date November 2011
*
-* LDT (intput) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A. The
+*> block reflector H is then given by
+*>
+*> H = I - V * T * V**T
+*>
+*> where V**T is the transpose of V.
+*>
+*> For details of the algorithm, see Elmroth and Gustavson (cited above).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ RECURSIVE SUBROUTINE DGEQRT3( M, N, A, LDA, T, LDT, INFO )
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A. The
-* block reflector H is then given by
-*
-* H = I - V * T * V**T
-*
-* where V**T is the transpose of V.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* For details of the algorithm, see Elmroth and Gustavson (cited above).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N, LDT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgerfs.f b/SRC/dgerfs.f
index 4328b8fa..6fb1c163 100644
--- a/SRC/dgerfs.f
+++ b/SRC/dgerfs.f
@@ -1,12 +1,186 @@
+*> \brief \b DGERFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGERFS improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates for
+*> the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by DGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEcomputational
+*
+* =====================================================================
SUBROUTINE DGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -18,87 +192,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGERFS improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates for
-* the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by DGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgerfsx.f b/SRC/dgerfsx.f
index a33c5bfa..37b66716 100644
--- a/SRC/dgerfsx.f
+++ b/SRC/dgerfsx.f
@@ -1,18 +1,435 @@
+*> \brief \b DGERFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGERFSX( TRANS, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX , * ), WORK( * )
+* DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DGERFSX improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED, R
+*> and C below. In this case, the solution and error bounds returned
+*> are for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by DGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed.
+*> If R is accessed, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed.
+*> If C is accessed, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension (NPARAMS)
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEcomputational
+*
+* =====================================================================
SUBROUTINE DGERFSX( TRANS, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,283 +445,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DGERFSX improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED, R
-* and C below. In this case, the solution and error bounds returned
-* are for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by DGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* R (input) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed.
-* If R is accessed, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed.
-* If C is accessed, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension (NPARAMS)
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/dgerq2.f b/SRC/dgerq2.f
index 504536c1..735de981 100644
--- a/SRC/dgerq2.f
+++ b/SRC/dgerq2.f
@@ -1,69 +1,133 @@
- SUBROUTINE DGERQ2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b DGERQ2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGERQ2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGERQ2 computes an RQ factorization of a real m by n matrix A:
-* A = R * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGERQ2 computes an RQ factorization of a real m by n matrix A:
+*> A = R * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, if m <= n, the upper triangle of the subarray
-* A(1:m,n-m+1:n) contains the m by m upper triangular matrix R;
-* if m >= n, the elements on and above the (m-n)-th subdiagonal
-* contain the m by n upper trapezoidal matrix R; the remaining
-* elements, with the array TAU, represent the orthogonal matrix
-* Q as a product of elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the m by n matrix A.
+*> On exit, if m <= n, the upper triangle of the subarray
+*> A(1:m,n-m+1:n) contains the m by m upper triangular matrix R;
+*> if m >= n, the elements on and above the (m-n)-th subdiagonal
+*> contain the m by n upper trapezoidal matrix R; the remaining
+*> elements, with the array TAU, represent the orthogonal matrix
+*> Q as a product of elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M)
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
+*> A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGERQ2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
-* A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgerqf.f b/SRC/dgerqf.f
index b5189716..26b3ed02 100644
--- a/SRC/dgerqf.f
+++ b/SRC/dgerqf.f
@@ -1,81 +1,121 @@
- SUBROUTINE DGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DGERQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGERQF computes an RQ factorization of a real M-by-N matrix A:
-* A = R * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGERQF computes an RQ factorization of a real M-by-N matrix A:
+*> A = R * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if m <= n, the upper triangle of the subarray
-* A(1:m,n-m+1:n) contains the M-by-M upper triangular matrix R;
-* if m >= n, the elements on and above the (m-n)-th subdiagonal
-* contain the M-by-N upper trapezoidal matrix R;
-* the remaining elements, with the array TAU, represent the
-* orthogonal matrix Q as a product of min(m,n) elementary
-* reflectors (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
+*> A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
-* A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgesc2.f b/SRC/dgesc2.f
index d01802d6..f5de050e 100644
--- a/SRC/dgesc2.f
+++ b/SRC/dgesc2.f
@@ -1,64 +1,130 @@
- SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER LDA, N
- DOUBLE PRECISION SCALE
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), JPIV( * )
- DOUBLE PRECISION A( LDA, * ), RHS( * )
-* ..
-*
+*> \brief \b DGESC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* DOUBLE PRECISION A( LDA, * ), RHS( * )
+* ..
+*
* Purpose
* =======
*
-* DGESC2 solves a system of linear equations
-*
-* A * X = scale* RHS
-*
-* with a general N-by-N matrix A using the LU factorization with
-* complete pivoting computed by DGETC2.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGESC2 solves a system of linear equations
+*>
+*> A * X = scale* RHS
+*>
+*> with a general N-by-N matrix A using the LU factorization with
+*> complete pivoting computed by DGETC2.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the LU part of the factorization of the n-by-n
-* matrix A computed by DGETC2: A = P * L * U * Q
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the LU part of the factorization of the n-by-n
+*> matrix A computed by DGETC2: A = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*> RHS is DOUBLE PRECISION array, dimension (N).
+*> On entry, the right hand side vector b.
+*> On exit, the solution vector X.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On exit, SCALE contains the scale factor. SCALE is chosen
+*> 0 <= SCALE <= 1 to prevent owerflow in the solution.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RHS (input/output) DOUBLE PRECISION array, dimension (N).
-* On entry, the right hand side vector b.
-* On exit, the solution vector X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
+*> \date November 2011
*
-* JPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
+*> \ingroup doubleGEauxiliary
*
-* SCALE (output) DOUBLE PRECISION
-* On exit, SCALE contains the scale factor. SCALE is chosen
-* 0 <= SCALE <= 1 to prevent owerflow in the solution.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* .. Scalar Arguments ..
+ INTEGER LDA, N
+ DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), JPIV( * )
+ DOUBLE PRECISION A( LDA, * ), RHS( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgesdd.f b/SRC/dgesdd.f
index 798d25ea..fc361d1d 100644
--- a/SRC/dgesdd.f
+++ b/SRC/dgesdd.f
@@ -1,10 +1,224 @@
+*> \brief \b DGESC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
+* LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), S( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGESDD computes the singular value decomposition (SVD) of a real
+*> M-by-N matrix A, optionally computing the left and right singular
+*> vectors. If singular vectors are desired, it uses a
+*> divide-and-conquer algorithm.
+*>
+*> The SVD is written
+*>
+*> A = U * SIGMA * transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
+*> V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order. The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns VT = V**T, not V.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> Specifies options for computing all or part of the matrix U:
+*> = 'A': all M columns of U and all N rows of V**T are
+*> returned in the arrays U and VT;
+*> = 'S': the first min(M,N) columns of U and the first
+*> min(M,N) rows of V**T are returned in the arrays U
+*> and VT;
+*> = 'O': If M >= N, the first N columns of U are overwritten
+*> on the array A and all rows of V**T are returned in
+*> the array VT;
+*> otherwise, all columns of U are returned in the
+*> array U and the first M rows of V**T are overwritten
+*> in the array A;
+*> = 'N': no columns of U or rows of V**T are computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if JOBZ = 'O', A is overwritten with the first N columns
+*> of U (the left singular vectors, stored
+*> columnwise) if M >= N;
+*> A is overwritten with the first M rows
+*> of V**T (the right singular vectors, stored
+*> rowwise) otherwise.
+*> if JOBZ .ne. 'O', the contents of A are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,UCOL)
+*> UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
+*> UCOL = min(M,N) if JOBZ = 'S'.
+*> If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
+*> orthogonal matrix U;
+*> if JOBZ = 'S', U contains the first min(M,N) columns of U
+*> (the left singular vectors, stored columnwise);
+*> if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1; if
+*> JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension (LDVT,N)
+*> If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
+*> N-by-N orthogonal matrix V**T;
+*> if JOBZ = 'S', VT contains the first min(M,N) rows of
+*> V**T (the right singular vectors, stored rowwise);
+*> if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1; if
+*> JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
+*> if JOBZ = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1.
+*> If JOBZ = 'N',
+*> LWORK >= 3*min(M,N) + max(max(M,N),7*min(M,N)).
+*> If JOBZ = 'O',
+*> LWORK >= 3*min(M,N) +
+*> max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).
+*> If JOBZ = 'S' or 'A'
+*> LWORK >= 3*min(M,N) +
+*> max(max(M,N),4*min(M,N)*min(M,N)+4*min(M,N)).
+*> For good performance, LWORK should generally be larger.
+*> If LWORK = -1 but other input arguments are legal, WORK(1)
+*> returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (8*min(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: DBDSDC did not converge, updating process failed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsing
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
$ LWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.1) --
+* -- LAPACK sing routine (version 3.2.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* March 2009
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ
@@ -16,131 +230,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGESDD computes the singular value decomposition (SVD) of a real
-* M-by-N matrix A, optionally computing the left and right singular
-* vectors. If singular vectors are desired, it uses a
-* divide-and-conquer algorithm.
-*
-* The SVD is written
-*
-* A = U * SIGMA * transpose(V)
-*
-* where SIGMA is an M-by-N matrix which is zero except for its
-* min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
-* V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
-* are the singular values of A; they are real and non-negative, and
-* are returned in descending order. The first min(m,n) columns of
-* U and V are the left and right singular vectors of A.
-*
-* Note that the routine returns VT = V**T, not V.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix U:
-* = 'A': all M columns of U and all N rows of V**T are
-* returned in the arrays U and VT;
-* = 'S': the first min(M,N) columns of U and the first
-* min(M,N) rows of V**T are returned in the arrays U
-* and VT;
-* = 'O': If M >= N, the first N columns of U are overwritten
-* on the array A and all rows of V**T are returned in
-* the array VT;
-* otherwise, all columns of U are returned in the
-* array U and the first M rows of V**T are overwritten
-* in the array A;
-* = 'N': no columns of U or rows of V**T are computed.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if JOBZ = 'O', A is overwritten with the first N columns
-* of U (the left singular vectors, stored
-* columnwise) if M >= N;
-* A is overwritten with the first M rows
-* of V**T (the right singular vectors, stored
-* rowwise) otherwise.
-* if JOBZ .ne. 'O', the contents of A are destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* S (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of A, sorted so that S(i) >= S(i+1).
-*
-* U (output) DOUBLE PRECISION array, dimension (LDU,UCOL)
-* UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
-* UCOL = min(M,N) if JOBZ = 'S'.
-* If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
-* orthogonal matrix U;
-* if JOBZ = 'S', U contains the first min(M,N) columns of U
-* (the left singular vectors, stored columnwise);
-* if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1; if
-* JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
-*
-* VT (output) DOUBLE PRECISION array, dimension (LDVT,N)
-* If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
-* N-by-N orthogonal matrix V**T;
-* if JOBZ = 'S', VT contains the first min(M,N) rows of
-* V**T (the right singular vectors, stored rowwise);
-* if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1; if
-* JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
-* if JOBZ = 'S', LDVT >= min(M,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1.
-* If JOBZ = 'N',
-* LWORK >= 3*min(M,N) + max(max(M,N),7*min(M,N)).
-* If JOBZ = 'O',
-* LWORK >= 3*min(M,N) +
-* max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).
-* If JOBZ = 'S' or 'A'
-* LWORK >= 3*min(M,N) +
-* max(max(M,N),4*min(M,N)*min(M,N)+4*min(M,N)).
-* For good performance, LWORK should generally be larger.
-* If LWORK = -1 but other input arguments are legal, WORK(1)
-* returns the optimal LWORK.
-*
-* IWORK (workspace) INTEGER array, dimension (8*min(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: DBDSDC did not converge, updating process failed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgesv.f b/SRC/dgesv.f
index 0fe73a1f..d020dfb0 100644
--- a/SRC/dgesv.f
+++ b/SRC/dgesv.f
@@ -1,68 +1,131 @@
- SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief <b> DGESV computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DGESV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* The LU decomposition with partial pivoting and row interchanges is
-* used to factor A as
-* A = P * L * U,
-* where P is a permutation matrix, L is unit lower triangular, and U is
-* upper triangular. The factored form of A is then used to solve the
-* system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGESV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as
+*> A = P * L * U,
+*> where P is a permutation matrix, L is unit lower triangular, and U is
+*> upper triangular. The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N coefficient matrix A.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS matrix of right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N coefficient matrix A.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
+*> \ingroup doubleGEsolve
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS matrix of right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+* =====================================================================
+ SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, so the solution could not be computed.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgesvd.f b/SRC/dgesvd.f
index 9a1c8489..e7a005c6 100644
--- a/SRC/dgesvd.f
+++ b/SRC/dgesvd.f
@@ -1,10 +1,214 @@
+*> \brief <b> DGESVD computes the singular value decomposition (SVD) for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU, JOBVT
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), S( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGESVD computes the singular value decomposition (SVD) of a real
+*> M-by-N matrix A, optionally computing the left and/or right singular
+*> vectors. The SVD is written
+*>
+*> A = U * SIGMA * transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
+*> V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order. The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns V**T, not V.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> Specifies options for computing all or part of the matrix U:
+*> = 'A': all M columns of U are returned in array U:
+*> = 'S': the first min(m,n) columns of U (the left singular
+*> vectors) are returned in the array U;
+*> = 'O': the first min(m,n) columns of U (the left singular
+*> vectors) are overwritten on the array A;
+*> = 'N': no columns of U (no left singular vectors) are
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVT
+*> \verbatim
+*> JOBVT is CHARACTER*1
+*> Specifies options for computing all or part of the matrix
+*> V**T:
+*> = 'A': all N rows of V**T are returned in the array VT;
+*> = 'S': the first min(m,n) rows of V**T (the right singular
+*> vectors) are returned in the array VT;
+*> = 'O': the first min(m,n) rows of V**T (the right singular
+*> vectors) are overwritten on the array A;
+*> = 'N': no rows of V**T (no right singular vectors) are
+*> computed.
+*> \endverbatim
+*> \verbatim
+*> JOBVT and JOBU cannot both be 'O'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if JOBU = 'O', A is overwritten with the first min(m,n)
+*> columns of U (the left singular vectors,
+*> stored columnwise);
+*> if JOBVT = 'O', A is overwritten with the first min(m,n)
+*> rows of V**T (the right singular vectors,
+*> stored rowwise);
+*> if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
+*> are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,UCOL)
+*> (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
+*> If JOBU = 'A', U contains the M-by-M orthogonal matrix U;
+*> if JOBU = 'S', U contains the first min(m,n) columns of U
+*> (the left singular vectors, stored columnwise);
+*> if JOBU = 'N' or 'O', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1; if
+*> JOBU = 'S' or 'A', LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension (LDVT,N)
+*> If JOBVT = 'A', VT contains the N-by-N orthogonal matrix
+*> V**T;
+*> if JOBVT = 'S', VT contains the first min(m,n) rows of
+*> V**T (the right singular vectors, stored rowwise);
+*> if JOBVT = 'N' or 'O', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1; if
+*> JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
+*> if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged
+*> superdiagonal elements of an upper bidiagonal matrix B
+*> whose diagonal is in S (not necessarily sorted). B
+*> satisfies A = U * B * VT, so it has the same singular values
+*> as A, and singular vectors related by U and VT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
+*> - PATH 1 (M much larger than N, JOBU='N')
+*> - PATH 1t (N much larger than M, JOBVT='N')
+*> LWORK >= MAX(1,3*MIN(M,N)+MAX(M,N),5*MIN(M,N)) for the other paths
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if DBDSQR did not converge, INFO specifies how many
+*> superdiagonals of an intermediate bidiagonal form B
+*> did not converge to zero. See the description of WORK
+*> above for details.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsing
+*
+* =====================================================================
SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
$ WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK sing routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU, JOBVT
@@ -15,125 +219,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGESVD computes the singular value decomposition (SVD) of a real
-* M-by-N matrix A, optionally computing the left and/or right singular
-* vectors. The SVD is written
-*
-* A = U * SIGMA * transpose(V)
-*
-* where SIGMA is an M-by-N matrix which is zero except for its
-* min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
-* V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
-* are the singular values of A; they are real and non-negative, and
-* are returned in descending order. The first min(m,n) columns of
-* U and V are the left and right singular vectors of A.
-*
-* Note that the routine returns V**T, not V.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix U:
-* = 'A': all M columns of U are returned in array U:
-* = 'S': the first min(m,n) columns of U (the left singular
-* vectors) are returned in the array U;
-* = 'O': the first min(m,n) columns of U (the left singular
-* vectors) are overwritten on the array A;
-* = 'N': no columns of U (no left singular vectors) are
-* computed.
-*
-* JOBVT (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix
-* V**T:
-* = 'A': all N rows of V**T are returned in the array VT;
-* = 'S': the first min(m,n) rows of V**T (the right singular
-* vectors) are returned in the array VT;
-* = 'O': the first min(m,n) rows of V**T (the right singular
-* vectors) are overwritten on the array A;
-* = 'N': no rows of V**T (no right singular vectors) are
-* computed.
-*
-* JOBVT and JOBU cannot both be 'O'.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if JOBU = 'O', A is overwritten with the first min(m,n)
-* columns of U (the left singular vectors,
-* stored columnwise);
-* if JOBVT = 'O', A is overwritten with the first min(m,n)
-* rows of V**T (the right singular vectors,
-* stored rowwise);
-* if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
-* are destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* S (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of A, sorted so that S(i) >= S(i+1).
-*
-* U (output) DOUBLE PRECISION array, dimension (LDU,UCOL)
-* (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
-* If JOBU = 'A', U contains the M-by-M orthogonal matrix U;
-* if JOBU = 'S', U contains the first min(m,n) columns of U
-* (the left singular vectors, stored columnwise);
-* if JOBU = 'N' or 'O', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1; if
-* JOBU = 'S' or 'A', LDU >= M.
-*
-* VT (output) DOUBLE PRECISION array, dimension (LDVT,N)
-* If JOBVT = 'A', VT contains the N-by-N orthogonal matrix
-* V**T;
-* if JOBVT = 'S', VT contains the first min(m,n) rows of
-* V**T (the right singular vectors, stored rowwise);
-* if JOBVT = 'N' or 'O', VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1; if
-* JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
-* if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged
-* superdiagonal elements of an upper bidiagonal matrix B
-* whose diagonal is in S (not necessarily sorted). B
-* satisfies A = U * B * VT, so it has the same singular values
-* as A, and singular vectors related by U and VT.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
-* - PATH 1 (M much larger than N, JOBU='N')
-* - PATH 1t (N much larger than M, JOBVT='N')
-* LWORK >= MAX(1,3*MIN(M,N)+MAX(M,N),5*MIN(M,N)) for the other paths
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if DBDSQR did not converge, INFO specifies how many
-* superdiagonals of an intermediate bidiagonal form B
-* did not converge to zero. See the description of WORK
-* above for details.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgesvj.f b/SRC/dgesvj.f
index 03ac060e..1ff5c9de 100644
--- a/SRC/dgesvj.f
+++ b/SRC/dgesvj.f
@@ -1,258 +1,336 @@
- SUBROUTINE DGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
- $ LDV, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b DGESVJ
*
-* -- Contributed by Zlatko Drmac of the University of Zagreb and --
-* -- Kresimir Veselic of the Fernuniversitaet Hagen --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* This routine is also part of SIGMA (version 1.23, October 23. 2008.)
-* SIGMA is a library of algorithms for highly accurate algorithms for
-* computation of SVD, PSVD, QSVD, (H,K)-SVD, and for solution of the
-* eigenvalue problems Hx = lambda M x, H M x = lambda x with H, M > 0.
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDV, LWORK, M, MV, N
- CHARACTER*1 JOBA, JOBU, JOBV
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), SVA( N ), V( LDV, * ),
- $ WORK( LWORK )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
+* LDV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDV, LWORK, M, MV, N
+* CHARACTER*1 JOBA, JOBU, JOBV
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), SVA( N ), V( LDV, * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DGESVJ computes the singular value decomposition (SVD) of a real
-* M-by-N matrix A, where M >= N. The SVD of A is written as
-* [++] [xx] [x0] [xx]
-* A = U * SIGMA * V^t, [++] = [xx] * [ox] * [xx]
-* [++] [xx]
-* where SIGMA is an N-by-N diagonal matrix, U is an M-by-N orthonormal
-* matrix, and V is an N-by-N orthogonal matrix. The diagonal elements
-* of SIGMA are the singular values of A. The columns of U and V are the
-* left and the right singular vectors of A, respectively.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGESVJ computes the singular value decomposition (SVD) of a real
+*> M-by-N matrix A, where M >= N. The SVD of A is written as
+*> [++] [xx] [x0] [xx]
+*> A = U * SIGMA * V^t, [++] = [xx] * [ox] * [xx]
+*> [++] [xx]
+*> where SIGMA is an N-by-N diagonal matrix, U is an M-by-N orthonormal
+*> matrix, and V is an N-by-N orthogonal matrix. The diagonal elements
+*> of SIGMA are the singular values of A. The columns of U and V are the
+*> left and the right singular vectors of A, respectively.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOBA (input) CHARACTER* 1
-* Specifies the structure of A.
-* = 'L': The input matrix A is lower triangular;
-* = 'U': The input matrix A is upper triangular;
-* = 'G': The input matrix A is general M-by-N matrix, M >= N.
-*
-* JOBU (input) CHARACTER*1
-* Specifies whether to compute the left singular vectors
-* (columns of U):
-* = 'U': The left singular vectors corresponding to the nonzero
-* singular values are computed and returned in the leading
-* columns of A. See more details in the description of A.
-* The default numerical orthogonality threshold is set to
-* approximately TOL=CTOL*EPS, CTOL=DSQRT(M), EPS=DLAMCH('E').
-* = 'C': Analogous to JOBU='U', except that user can control the
-* level of numerical orthogonality of the computed left
-* singular vectors. TOL can be set to TOL = CTOL*EPS, where
-* CTOL is given on input in the array WORK.
-* No CTOL smaller than ONE is allowed. CTOL greater
-* than 1 / EPS is meaningless. The option 'C'
-* can be used if M*EPS is satisfactory orthogonality
-* of the computed left singular vectors, so CTOL=M could
-* save few sweeps of Jacobi rotations.
-* See the descriptions of A and WORK(1).
-* = 'N': The matrix U is not computed. However, see the
-* description of A.
-*
-* JOBV (input) CHARACTER*1
-* Specifies whether to compute the right singular vectors, that
-* is, the matrix V:
-* = 'V' : the matrix V is computed and returned in the array V
-* = 'A' : the Jacobi rotations are applied to the MV-by-N
-* array V. In other words, the right singular vector
-* matrix V is not computed explicitly, instead it is
-* applied to an MV-by-N matrix initially stored in the
-* first MV rows of V.
-* = 'N' : the matrix V is not computed and the array V is not
-* referenced
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. 1/DLAMCH('E') > M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A.
-* M >= N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit :
-* If JOBU .EQ. 'U' .OR. JOBU .EQ. 'C' :
-* If INFO .EQ. 0 :
-* RANKA orthonormal columns of U are returned in the
-* leading RANKA columns of the array A. Here RANKA <= N
-* is the number of computed singular values of A that are
-* above the underflow threshold DLAMCH('S'). The singular
-* vectors corresponding to underflowed or zero singular
-* values are not computed. The value of RANKA is returned
-* in the array WORK as RANKA=NINT(WORK(2)). Also see the
-* descriptions of SVA and WORK. The computed columns of U
-* are mutually numerically orthogonal up to approximately
-* TOL=DSQRT(M)*EPS (default); or TOL=CTOL*EPS (JOBU.EQ.'C'),
-* see the description of JOBU.
-* If INFO .GT. 0 :
-* the procedure DGESVJ did not converge in the given number
-* of iterations (sweeps). In that case, the computed
-* columns of U may not be orthogonal up to TOL. The output
-* U (stored in A), SIGMA (given by the computed singular
-* values in SVA(1:N)) and V is still a decomposition of the
-* input matrix A in the sense that the residual
-* ||A-SCALE*U*SIGMA*V^T||_2 / ||A||_2 is small.
-*
-* If JOBU .EQ. 'N' :
-* If INFO .EQ. 0 :
-* Note that the left singular vectors are 'for free' in the
-* one-sided Jacobi SVD algorithm. However, if only the
-* singular values are needed, the level of numerical
-* orthogonality of U is not an issue and iterations are
-* stopped when the columns of the iterated matrix are
-* numerically orthogonal up to approximately M*EPS. Thus,
-* on exit, A contains the columns of U scaled with the
-* corresponding singular values.
-* If INFO .GT. 0 :
-* the procedure DGESVJ did not converge in the given number
-* of iterations (sweeps).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* SVA (workspace/output) DOUBLE PRECISION array, dimension (N)
-* On exit :
-* If INFO .EQ. 0 :
-* depending on the value SCALE = WORK(1), we have:
-* If SCALE .EQ. ONE :
-* SVA(1:N) contains the computed singular values of A.
-* During the computation SVA contains the Euclidean column
-* norms of the iterated matrices in the array A.
-* If SCALE .NE. ONE :
-* The singular values of A are SCALE*SVA(1:N), and this
-* factored representation is due to the fact that some of the
-* singular values of A might underflow or overflow.
-* If INFO .GT. 0 :
-* the procedure DGESVJ did not converge in the given number of
-* iterations (sweeps) and SCALE*SVA(1:N) may not be accurate.
-*
-* MV (input) INTEGER
-* If JOBV .EQ. 'A', then the product of Jacobi rotations in DGESVJ
-* is applied to the first MV rows of V. See the description of JOBV.
-*
-* V (input/output) DOUBLE PRECISION array, dimension (LDV,N)
-* If JOBV = 'V', then V contains on exit the N-by-N matrix of
-* the right singular vectors;
-* If JOBV = 'A', then V contains the product of the computed right
-* singular vector matrix and the initial matrix in
-* the array V.
-* If JOBV = 'N', then V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V, LDV .GE. 1.
-* If JOBV .EQ. 'V', then LDV .GE. max(1,N).
-* If JOBV .EQ. 'A', then LDV .GE. max(1,MV) .
-*
-* WORK (input/workspace/output) DOUBLE PRECISION array, dimension max(4,M+N).
-* On entry :
-* If JOBU .EQ. 'C' :
-* WORK(1) = CTOL, where CTOL defines the threshold for convergence.
-* The process stops if all columns of A are mutually
-* orthogonal up to CTOL*EPS, EPS=DLAMCH('E').
-* It is required that CTOL >= ONE, i.e. it is not
-* allowed to force the routine to obtain orthogonality
-* below EPS.
-* On exit :
-* WORK(1) = SCALE is the scaling factor such that SCALE*SVA(1:N)
-* are the computed singular values of A.
-* (See description of SVA().)
-* WORK(2) = NINT(WORK(2)) is the number of the computed nonzero
-* singular values.
-* WORK(3) = NINT(WORK(3)) is the number of the computed singular
-* values that are larger than the underflow threshold.
-* WORK(4) = NINT(WORK(4)) is the number of sweeps of Jacobi
-* rotations needed for numerical convergence.
-* WORK(5) = max_{i.NE.j} |COS(A(:,i),A(:,j))| in the last sweep.
-* This is useful information in cases when DGESVJ did
-* not converge, as it can be used to estimate whether
-* the output is stil useful and for post festum analysis.
-* WORK(6) = the largest absolute value over all sines of the
-* Jacobi rotation angles in the last sweep. It can be
-* useful for a post festum analysis.
-*
-* LWORK (input) INTEGER
-* length of WORK, WORK >= MAX(6,M+N)
-*
-* INFO (output) INTEGER
-* = 0 : successful exit.
-* < 0 : if INFO = -i, then the i-th argument had an illegal value
-* > 0 : DGESVJ did not converge in the maximal allowed number (30)
-* of sweeps. The output may still be useful. See the
-* description of WORK.
+*> \param[in] JOBA
+*> \verbatim
+*> JOBA is CHARACTER* 1
+*> Specifies the structure of A.
+*> = 'L': The input matrix A is lower triangular;
+*> = 'U': The input matrix A is upper triangular;
+*> = 'G': The input matrix A is general M-by-N matrix, M >= N.
+*> \endverbatim
+*>
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> Specifies whether to compute the left singular vectors
+*> (columns of U):
+*> = 'U': The left singular vectors corresponding to the nonzero
+*> singular values are computed and returned in the leading
+*> columns of A. See more details in the description of A.
+*> The default numerical orthogonality threshold is set to
+*> approximately TOL=CTOL*EPS, CTOL=DSQRT(M), EPS=DLAMCH('E').
+*> = 'C': Analogous to JOBU='U', except that user can control the
+*> level of numerical orthogonality of the computed left
+*> singular vectors. TOL can be set to TOL = CTOL*EPS, where
+*> CTOL is given on input in the array WORK.
+*> No CTOL smaller than ONE is allowed. CTOL greater
+*> than 1 / EPS is meaningless. The option 'C'
+*> can be used if M*EPS is satisfactory orthogonality
+*> of the computed left singular vectors, so CTOL=M could
+*> save few sweeps of Jacobi rotations.
+*> See the descriptions of A and WORK(1).
+*> = 'N': The matrix U is not computed. However, see the
+*> description of A.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> Specifies whether to compute the right singular vectors, that
+*> is, the matrix V:
+*> = 'V' : the matrix V is computed and returned in the array V
+*> = 'A' : the Jacobi rotations are applied to the MV-by-N
+*> array V. In other words, the right singular vector
+*> matrix V is not computed explicitly, instead it is
+*> applied to an MV-by-N matrix initially stored in the
+*> first MV rows of V.
+*> = 'N' : the matrix V is not computed and the array V is not
+*> referenced
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. 1/DLAMCH('E') > M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit :
+*> If JOBU .EQ. 'U' .OR. JOBU .EQ. 'C' :
+*> If INFO .EQ. 0 :
+*> RANKA orthonormal columns of U are returned in the
+*> leading RANKA columns of the array A. Here RANKA <= N
+*> is the number of computed singular values of A that are
+*> above the underflow threshold DLAMCH('S'). The singular
+*> vectors corresponding to underflowed or zero singular
+*> values are not computed. The value of RANKA is returned
+*> in the array WORK as RANKA=NINT(WORK(2)). Also see the
+*> descriptions of SVA and WORK. The computed columns of U
+*> are mutually numerically orthogonal up to approximately
+*> TOL=DSQRT(M)*EPS (default); or TOL=CTOL*EPS (JOBU.EQ.'C'),
+*> see the description of JOBU.
+*> If INFO .GT. 0 :
+*> the procedure DGESVJ did not converge in the given number
+*> of iterations (sweeps). In that case, the computed
+*> columns of U may not be orthogonal up to TOL. The output
+*> U (stored in A), SIGMA (given by the computed singular
+*> values in SVA(1:N)) and V is still a decomposition of the
+*> input matrix A in the sense that the residual
+*> ||A-SCALE*U*SIGMA*V^T||_2 / ||A||_2 is small.
+*> \endverbatim
+*> \verbatim
+*> If JOBU .EQ. 'N' :
+*> If INFO .EQ. 0 :
+*> Note that the left singular vectors are 'for free' in the
+*> one-sided Jacobi SVD algorithm. However, if only the
+*> singular values are needed, the level of numerical
+*> orthogonality of U is not an issue and iterations are
+*> stopped when the columns of the iterated matrix are
+*> numerically orthogonal up to approximately M*EPS. Thus,
+*> on exit, A contains the columns of U scaled with the
+*> corresponding singular values.
+*> If INFO .GT. 0 :
+*> the procedure DGESVJ did not converge in the given number
+*> of iterations (sweeps).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] SVA
+*> \verbatim
+*> SVA is DOUBLE PRECISION array, dimension (N)
+*> On exit :
+*> If INFO .EQ. 0 :
+*> depending on the value SCALE = WORK(1), we have:
+*> If SCALE .EQ. ONE :
+*> SVA(1:N) contains the computed singular values of A.
+*> During the computation SVA contains the Euclidean column
+*> norms of the iterated matrices in the array A.
+*> If SCALE .NE. ONE :
+*> The singular values of A are SCALE*SVA(1:N), and this
+*> factored representation is due to the fact that some of the
+*> singular values of A might underflow or overflow.
+*> If INFO .GT. 0 :
+*> the procedure DGESVJ did not converge in the given number of
+*> iterations (sweeps) and SCALE*SVA(1:N) may not be accurate.
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> If JOBV .EQ. 'A', then the product of Jacobi rotations in DGESVJ
+*> is applied to the first MV rows of V. See the description of JOBV.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,N)
+*> If JOBV = 'V', then V contains on exit the N-by-N matrix of
+*> the right singular vectors;
+*> If JOBV = 'A', then V contains the product of the computed right
+*> singular vector matrix and the initial matrix in
+*> the array V.
+*> If JOBV = 'N', then V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V, LDV .GE. 1.
+*> If JOBV .EQ. 'V', then LDV .GE. max(1,N).
+*> If JOBV .EQ. 'A', then LDV .GE. max(1,MV) .
+*> \endverbatim
+*>
+*> \param[in,out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension max(4,M+N).
+*> On entry :
+*> If JOBU .EQ. 'C' :
+*> WORK(1) = CTOL, where CTOL defines the threshold for convergence.
+*> The process stops if all columns of A are mutually
+*> orthogonal up to CTOL*EPS, EPS=DLAMCH('E').
+*> It is required that CTOL >= ONE, i.e. it is not
+*> allowed to force the routine to obtain orthogonality
+*> below EPS.
+*> On exit :
+*> WORK(1) = SCALE is the scaling factor such that SCALE*SVA(1:N)
+*> are the computed singular values of A.
+*> (See description of SVA().)
+*> WORK(2) = NINT(WORK(2)) is the number of the computed nonzero
+*> singular values.
+*> WORK(3) = NINT(WORK(3)) is the number of the computed singular
+*> values that are larger than the underflow threshold.
+*> WORK(4) = NINT(WORK(4)) is the number of sweeps of Jacobi
+*> rotations needed for numerical convergence.
+*> WORK(5) = max_{i.NE.j} |COS(A(:,i),A(:,j))| in the last sweep.
+*> This is useful information in cases when DGESVJ did
+*> not converge, as it can be used to estimate whether
+*> the output is stil useful and for post festum analysis.
+*> WORK(6) = the largest absolute value over all sines of the
+*> Jacobi rotation angles in the last sweep. It can be
+*> useful for a post festum analysis.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of WORK, WORK >= MAX(6,M+N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit.
+*> < 0 : if INFO = -i, then the i-th argument had an illegal value
+*> > 0 : DGESVJ did not converge in the maximal allowed number (30)
+*> of sweeps. The output may still be useful. See the
+*> description of WORK.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEcomputational
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The orthogonal N-by-N matrix V is obtained as a product of Jacobi plane
+*> rotations. The rotations are implemented as fast scaled rotations of
+*> Anda and Park [1]. In the case of underflow of the Jacobi angle, a
+*> modified Jacobi transformation of Drmac [4] is used. Pivot strategy uses
+*> column interchanges of de Rijk [2]. The relative accuracy of the computed
+*> singular values and the accuracy of the computed singular vectors (in
+*> angle metric) is as guaranteed by the theory of Demmel and Veselic [3].
+*> The condition number that determines the accuracy in the full rank case
+*> is essentially min_{D=diag} kappa(A*D), where kappa(.) is the
+*> spectral condition number. The best performance of this Jacobi SVD
+*> procedure is achieved if used in an accelerated version of Drmac and
+*> Veselic [5,6], and it is the kernel routine in the SIGMA library [7].
+*> Some tunning parameters (marked with [TP]) are available for the
+*> implementer.
+*> The computational range for the nonzero singular values is the machine
+*> number interval ( UNDERFLOW , OVERFLOW ). In extreme cases, even
+*> denormalized singular values can be computed with the corresponding
+*> gradual loss of accurate digits.
+*>
+*> Contributors
+*> ============
+*>
+*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
+*>
+*> References
+*> ==========
+*>
+*> [1] A. A. Anda and H. Park: Fast plane rotations with dynamic scaling.
+*> SIAM J. matrix Anal. Appl., Vol. 15 (1994), pp. 162-174.
+*> [2] P. P. M. De Rijk: A one-sided Jacobi algorithm for computing the
+*> singular value decomposition on a vector computer.
+*> SIAM J. Sci. Stat. Comp., Vol. 10 (1998), pp. 359-371.
+*> [3] J. Demmel and K. Veselic: Jacobi method is more accurate than QR.
+*> [4] Z. Drmac: Implementation of Jacobi rotations for accurate singular
+*> value computation in floating point arithmetic.
+*> SIAM J. Sci. Comp., Vol. 18 (1997), pp. 1200-1222.
+*> [5] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
+*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
+*> LAPACK Working note 169.
+*> [6] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
+*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
+*> LAPACK Working note 170.
+*> [7] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
+*> QSVD, (H,K)-SVD computations.
+*> Department of Mathematics, University of Zagreb, 2008.
+*>
+*> Bugs, Examples and Comments
+*> ===========================
+*> Please report all bugs and send interesting test examples and comments to
+*> drmac@math.hr. Thank you.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
+ $ LDV, WORK, LWORK, INFO )
*
-* The orthogonal N-by-N matrix V is obtained as a product of Jacobi plane
-* rotations. The rotations are implemented as fast scaled rotations of
-* Anda and Park [1]. In the case of underflow of the Jacobi angle, a
-* modified Jacobi transformation of Drmac [4] is used. Pivot strategy uses
-* column interchanges of de Rijk [2]. The relative accuracy of the computed
-* singular values and the accuracy of the computed singular vectors (in
-* angle metric) is as guaranteed by the theory of Demmel and Veselic [3].
-* The condition number that determines the accuracy in the full rank case
-* is essentially min_{D=diag} kappa(A*D), where kappa(.) is the
-* spectral condition number. The best performance of this Jacobi SVD
-* procedure is achieved if used in an accelerated version of Drmac and
-* Veselic [5,6], and it is the kernel routine in the SIGMA library [7].
-* Some tunning parameters (marked with [TP]) are available for the
-* implementer.
-* The computational range for the nonzero singular values is the machine
-* number interval ( UNDERFLOW , OVERFLOW ). In extreme cases, even
-* denormalized singular values can be computed with the corresponding
-* gradual loss of accurate digits.
-*
-* Contributors
-* ============
-*
-* Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-* References
-* ==========
+* -- LAPACK computational routine (version 1.23, October 23. 2008.) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* [1] A. A. Anda and H. Park: Fast plane rotations with dynamic scaling.
-* SIAM J. matrix Anal. Appl., Vol. 15 (1994), pp. 162-174.
-* [2] P. P. M. De Rijk: A one-sided Jacobi algorithm for computing the
-* singular value decomposition on a vector computer.
-* SIAM J. Sci. Stat. Comp., Vol. 10 (1998), pp. 359-371.
-* [3] J. Demmel and K. Veselic: Jacobi method is more accurate than QR.
-* [4] Z. Drmac: Implementation of Jacobi rotations for accurate singular
-* value computation in floating point arithmetic.
-* SIAM J. Sci. Comp., Vol. 18 (1997), pp. 1200-1222.
-* [5] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
-* SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
-* LAPACK Working note 169.
-* [6] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
-* SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
-* LAPACK Working note 170.
-* [7] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
-* QSVD, (H,K)-SVD computations.
-* Department of Mathematics, University of Zagreb, 2008.
-*
-* Bugs, Examples and Comments
-* ===========================
-* Please report all bugs and send interesting test examples and comments to
-* drmac@math.hr. Thank you.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDV, LWORK, M, MV, N
+ CHARACTER*1 JOBA, JOBU, JOBV
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), SVA( N ), V( LDV, * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgesvx.f b/SRC/dgesvx.f
index 9008c96f..b8bc8950 100644
--- a/SRC/dgesvx.f
+++ b/SRC/dgesvx.f
@@ -1,11 +1,352 @@
+*> \brief <b> DGESVX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), C( * ), FERR( * ), R( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGESVX uses the LU factorization to compute the solution to a real
+*> system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*> matrix A (after equilibration if FACT = 'E') as
+*> A = P * L * U,
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
+*> not 'N', then A must have been equilibrated by the scaling
+*> factors in R and/or C. A is not modified if FACT = 'F' or
+*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) DOUBLE PRECISION array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the factors L and U from the factorization
+*> A = P*L*U as computed by DGETRF. If EQUED .ne. 'N', then
+*> AF is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by DGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*> to the original system of equations. Note that A and B are
+*> modified on exit if EQUED .ne. 'N', and the solution to the
+*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*> and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> On exit, WORK(1) contains the reciprocal pivot growth
+*> factor norm(A)/norm(U). The "max absolute element" norm is
+*> used. If WORK(1) is much less than 1, then the stability
+*> of the LU factorization of the (equilibrated) matrix A
+*> could be poor. This also means that the solution X, condition
+*> estimator RCOND, and forward error bound FERR could be
+*> unreliable. If factorization fails with 0<INFO<=N, then
+*> WORK(1) contains the reciprocal pivot growth factor for the
+*> leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization has
+*> been completed, but the factor U is exactly
+*> singular, so the solution and error bounds
+*> could not be computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsolve
+*
+* =====================================================================
SUBROUTINE DGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
@@ -19,231 +360,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGESVX uses the LU factorization to compute the solution to a real
-* system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-* matrix A (after equilibration if FACT = 'E') as
-* A = P * L * U,
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-* not 'N', then A must have been equilibrated by the scaling
-* factors in R and/or C. A is not modified if FACT = 'F' or
-* 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) DOUBLE PRECISION array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the factors L and U from the factorization
-* A = P*L*U as computed by DGETRF. If EQUED .ne. 'N', then
-* AF is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by DGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-* to the original system of equations. Note that A and B are
-* modified on exit if EQUED .ne. 'N', and the solution to the
-* equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-* and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (4*N)
-* On exit, WORK(1) contains the reciprocal pivot growth
-* factor norm(A)/norm(U). The "max absolute element" norm is
-* used. If WORK(1) is much less than 1, then the stability
-* of the LU factorization of the (equilibrated) matrix A
-* could be poor. This also means that the solution X, condition
-* estimator RCOND, and forward error bound FERR could be
-* unreliable. If factorization fails with 0<INFO<=N, then
-* WORK(1) contains the reciprocal pivot growth factor for the
-* leading INFO columns of A.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization has
-* been completed, but the factor U is exactly
-* singular, so the solution and error bounds
-* could not be computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgesvxx.f b/SRC/dgesvxx.f
index bf582158..88a203da 100644
--- a/SRC/dgesvxx.f
+++ b/SRC/dgesvxx.f
@@ -1,19 +1,561 @@
+*> \brief <b> DGESVXX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGESVXX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW,
+* BERR, N_ERR_BNDS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGESVXX uses the LU factorization to compute the solution to a
+*> double precision system of linear equations A * X = B, where A is an
+*> N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. DGESVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> DGESVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> DGESVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what DGESVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = P * L * U,
+*>
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is less
+*> than machine precision, the routine still goes on to solve for X
+*> and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
+*> not 'N', then A must have been equilibrated by the scaling
+*> factors in R and/or C. A is not modified if FACT = 'F' or
+*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) DOUBLE PRECISION array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the factors L and U from the factorization
+*> A = P*L*U as computed by DGETRF. If EQUED .ne. 'N', then
+*> AF is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by DGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit
+*> if EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
+*> inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A. In DGESVX, this quantity is
+*> returned in WORK(1).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension (NPARAMS)
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsolve
+*
+* =====================================================================
SUBROUTINE DGESVXX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW,
$ BERR, N_ERR_BNDS, ERR_BNDS_NORM,
$ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -29,398 +571,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DGESVXX uses the LU factorization to compute the solution to a
-* double precision system of linear equations A * X = B, where A is an
-* N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. DGESVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* DGESVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* DGESVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what DGESVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = P * L * U,
-*
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is less
-* than machine precision, the routine still goes on to solve for X
-* and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-* not 'N', then A must have been equilibrated by the scaling
-* factors in R and/or C. A is not modified if FACT = 'F' or
-* 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) DOUBLE PRECISION array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the factors L and U from the factorization
-* A = P*L*U as computed by DGETRF. If EQUED .ne. 'N', then
-* AF is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by DGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit
-* if EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
-* inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A. In DGESVX, this quantity is
-* returned in WORK(1).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension (NPARAMS)
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgetc2.f b/SRC/dgetc2.f
index f8e84455..689b607b 100644
--- a/SRC/dgetc2.f
+++ b/SRC/dgetc2.f
@@ -1,64 +1,126 @@
- SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), JPIV( * )
- DOUBLE PRECISION A( LDA, * )
-* ..
-*
+*> \brief \b DGETC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DGETC2 computes an LU factorization with complete pivoting of the
-* n-by-n matrix A. The factorization has the form A = P * L * U * Q,
-* where P and Q are permutation matrices, L is lower triangular with
-* unit diagonal elements and U is upper triangular.
-*
-* This is the Level 2 BLAS algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGETC2 computes an LU factorization with complete pivoting of the
+*> n-by-n matrix A. The factorization has the form A = P * L * U * Q,
+*> where P and Q are permutation matrices, L is lower triangular with
+*> unit diagonal elements and U is upper triangular.
+*>
+*> This is the Level 2 BLAS algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the n-by-n matrix A to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U*Q; the unit diagonal elements of L are not stored.
-* If U(k, k) appears to be less than SMIN, U(k, k) is given the
-* value of SMIN, i.e., giving a nonsingular perturbed system.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the n-by-n matrix A to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U*Q; the unit diagonal elements of L are not stored.
+*> If U(k, k) appears to be less than SMIN, U(k, k) is given the
+*> value of SMIN, i.e., giving a nonsingular perturbed system.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension(N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension(N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, U(k, k) is likely to produce owerflow if
+*> we try to solve for x in Ax = b. So U is perturbed to
+*> avoid the overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (output) INTEGER array, dimension(N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
+*> \date November 2011
*
-* JPIV (output) INTEGER array, dimension(N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
+*> \ingroup doubleGEauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, U(k, k) is likely to produce owerflow if
-* we try to solve for x in Ax = b. So U is perturbed to
-* avoid the overflow.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), JPIV( * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgetf2.f b/SRC/dgetf2.f
index a4277c16..2b1920c5 100644
--- a/SRC/dgetf2.f
+++ b/SRC/dgetf2.f
@@ -1,60 +1,117 @@
- SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO )
+*> \brief \b DGETF2
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DGETF2 computes an LU factorization of a general m-by-n matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the right-looking Level 2 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGETF2 computes an LU factorization of a general m-by-n matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*> A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 2 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the m by n matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the m by n matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup doubleGEcomputational
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* =====================================================================
+ SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO )
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgetrf.f b/SRC/dgetrf.f
index 3f7aebee..099744ce 100644
--- a/SRC/dgetrf.f
+++ b/SRC/dgetrf.f
@@ -1,60 +1,117 @@
- SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * )
-* ..
-*
+*> \brief \b DGETRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the right-looking Level 3 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGETRF computes an LU factorization of a general M-by-N matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*> A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup doubleGEcomputational
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* =====================================================================
+ SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgetri.f b/SRC/dgetri.f
index 09367b64..8f6d834b 100644
--- a/SRC/dgetri.f
+++ b/SRC/dgetri.f
@@ -1,63 +1,124 @@
- SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b DGETRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGETRI computes the inverse of a matrix using the LU factorization
-* computed by DGETRF.
-*
-* This method inverts U and then computes inv(A) by solving the system
-* inv(A)*L = inv(U) for inv(A).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGETRI computes the inverse of a matrix using the LU factorization
+*> computed by DGETRF.
+*>
+*> This method inverts U and then computes inv(A) by solving the system
+*> inv(A)*L = inv(U) for inv(A).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the factors L and U from the factorization
-* A = P*L*U as computed by DGETRF.
-* On exit, if INFO = 0, the inverse of the original matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the factors L and U from the factorization
+*> A = P*L*U as computed by DGETRF.
+*> On exit, if INFO = 0, the inverse of the original matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimal performance LWORK >= N*NB, where NB is
+*> the optimal blocksize returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero; the matrix is
+*> singular and its inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
+*> \date November 2011
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \ingroup doubleGEcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimal performance LWORK >= N*NB, where NB is
-* the optimal blocksize returned by ILAENV.
+* =====================================================================
+ SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is
-* singular and its inverse could not be computed.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgetrs.f b/SRC/dgetrs.f
index 74ca3cc2..660acda4 100644
--- a/SRC/dgetrs.f
+++ b/SRC/dgetrs.f
@@ -1,64 +1,131 @@
- SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DGETRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DGETRS solves a system of linear equations
-* A * X = B or A**T * X = B
-* with a general N-by-N matrix A using the LU factorization computed
-* by DGETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGETRS solves a system of linear equations
+*> A * X = B or A**T * X = B
+*> with a general N-by-N matrix A using the LU factorization computed
+*> by DGETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T* X = B (Transpose)
-* = 'C': A**T* X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T* X = B (Transpose)
+*> = 'C': A**T* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by DGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by DGETRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup doubleGEcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dggbak.f b/SRC/dggbak.f
index 6523d79d..798104c8 100644
--- a/SRC/dggbak.f
+++ b/SRC/dggbak.f
@@ -1,80 +1,158 @@
- SUBROUTINE DGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
- $ LDV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOB, SIDE
- INTEGER IHI, ILO, INFO, LDV, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION LSCALE( * ), RSCALE( * ), V( LDV, * )
-* ..
-*
+*> \brief \b DGGBAK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+* LDV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB, SIDE
+* INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION LSCALE( * ), RSCALE( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* DGGBAK forms the right or left eigenvectors of a real generalized
-* eigenvalue problem A*x = lambda*B*x, by backward transformation on
-* the computed eigenvectors of the balanced pair of matrices output by
-* DGGBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGBAK forms the right or left eigenvectors of a real generalized
+*> eigenvalue problem A*x = lambda*B*x, by backward transformation on
+*> the computed eigenvectors of the balanced pair of matrices output by
+*> DGGBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the type of backward transformation required:
-* = 'N': do nothing, return immediately;
-* = 'P': do backward transformation for permutation only;
-* = 'S': do backward transformation for scaling only;
-* = 'B': do backward transformations for both permutation and
-* scaling.
-* JOB must be the same as the argument JOB supplied to DGGBAL.
-*
-* SIDE (input) CHARACTER*1
-* = 'R': V contains right eigenvectors;
-* = 'L': V contains left eigenvectors.
-*
-* N (input) INTEGER
-* The number of rows of the matrix V. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* The integers ILO and IHI determined by DGGBAL.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* LSCALE (input) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and/or scaling factors applied
-* to the left side of A and B, as returned by DGGBAL.
-*
-* RSCALE (input) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and/or scaling factors applied
-* to the right side of A and B, as returned by DGGBAL.
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the type of backward transformation required:
+*> = 'N': do nothing, return immediately;
+*> = 'P': do backward transformation for permutation only;
+*> = 'S': do backward transformation for scaling only;
+*> = 'B': do backward transformations for both permutation and
+*> scaling.
+*> JOB must be the same as the argument JOB supplied to DGGBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': V contains right eigenvectors;
+*> = 'L': V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrix V. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> The integers ILO and IHI determined by DGGBAL.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] LSCALE
+*> \verbatim
+*> LSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and/or scaling factors applied
+*> to the left side of A and B, as returned by DGGBAL.
+*> \endverbatim
+*>
+*> \param[in] RSCALE
+*> \verbatim
+*> RSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and/or scaling factors applied
+*> to the right side of A and B, as returned by DGGBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix V. M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,M)
+*> On entry, the matrix of right or left eigenvectors to be
+*> transformed, as returned by DTGEVC.
+*> On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the matrix V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of columns of the matrix V. M >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* V (input/output) DOUBLE PRECISION array, dimension (LDV,M)
-* On entry, the matrix of right or left eigenvectors to be
-* transformed, as returned by DTGEVC.
-* On exit, V is overwritten by the transformed eigenvectors.
+*> \date November 2011
*
-* LDV (input) INTEGER
-* The leading dimension of the matrix V. LDV >= max(1,N).
+*> \ingroup doubleGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> See R.C. Ward, Balancing the generalized eigenvalue problem,
+*> SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+ $ LDV, INFO )
*
-* See R.C. Ward, Balancing the generalized eigenvalue problem,
-* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER JOB, SIDE
+ INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION LSCALE( * ), RSCALE( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dggbal.f b/SRC/dggbal.f
index caf85277..412c6d8b 100644
--- a/SRC/dggbal.f
+++ b/SRC/dggbal.f
@@ -1,10 +1,180 @@
+*> \brief \b DGGBAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
+* RSCALE, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER IHI, ILO, INFO, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), LSCALE( * ),
+* $ RSCALE( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGBAL balances a pair of general real matrices (A,B). This
+*> involves, first, permuting A and B by similarity transformations to
+*> isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
+*> elements on the diagonal; and second, applying a diagonal similarity
+*> transformation to rows and columns ILO to IHI to make the rows
+*> and columns as close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrices, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors in the
+*> generalized eigenvalue problem A*x = lambda*B*x.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the operations to be performed on A and B:
+*> = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
+*> and RSCALE(I) = 1.0 for i = 1,...,N.
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the input matrix A.
+*> On exit, A is overwritten by the balanced matrix.
+*> If JOB = 'N', A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the input matrix B.
+*> On exit, B is overwritten by the balanced matrix.
+*> If JOB = 'N', B is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are set to integers such that on exit
+*> A(i,j) = 0 and B(i,j) = 0 if i > j and
+*> j = 1,...,ILO-1 or i = IHI+1,...,N.
+*> If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the left side of A and B. If P(j) is the index of the
+*> row interchanged with row j, and D(j)
+*> is the scaling factor applied to row j, then
+*> LSCALE(j) = P(j) for J = 1,...,ILO-1
+*> = D(j) for J = ILO,...,IHI
+*> = P(j) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the right side of A and B. If P(j) is the index of the
+*> column interchanged with column j, and D(j)
+*> is the scaling factor applied to column j, then
+*> LSCALE(j) = P(j) for J = 1,...,ILO-1
+*> = D(j) for J = ILO,...,IHI
+*> = P(j) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (lwork)
+*> lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
+*> at least 1 when JOB = 'N' or 'P'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> See R.C. WARD, Balancing the generalized eigenvalue problem,
+*> SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
$ RSCALE, WORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOB
@@ -15,94 +185,6 @@
$ RSCALE( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGGBAL balances a pair of general real matrices (A,B). This
-* involves, first, permuting A and B by similarity transformations to
-* isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
-* elements on the diagonal; and second, applying a diagonal similarity
-* transformation to rows and columns ILO to IHI to make the rows
-* and columns as close in norm as possible. Both steps are optional.
-*
-* Balancing may reduce the 1-norm of the matrices, and improve the
-* accuracy of the computed eigenvalues and/or eigenvectors in the
-* generalized eigenvalue problem A*x = lambda*B*x.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies the operations to be performed on A and B:
-* = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
-* and RSCALE(I) = 1.0 for i = 1,...,N.
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the input matrix A.
-* On exit, A is overwritten by the balanced matrix.
-* If JOB = 'N', A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the input matrix B.
-* On exit, B is overwritten by the balanced matrix.
-* If JOB = 'N', B is not referenced.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are set to integers such that on exit
-* A(i,j) = 0 and B(i,j) = 0 if i > j and
-* j = 1,...,ILO-1 or i = IHI+1,...,N.
-* If JOB = 'N' or 'S', ILO = 1 and IHI = N.
-*
-* LSCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the left side of A and B. If P(j) is the index of the
-* row interchanged with row j, and D(j)
-* is the scaling factor applied to row j, then
-* LSCALE(j) = P(j) for J = 1,...,ILO-1
-* = D(j) for J = ILO,...,IHI
-* = P(j) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* RSCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the right side of A and B. If P(j) is the index of the
-* column interchanged with column j, and D(j)
-* is the scaling factor applied to column j, then
-* LSCALE(j) = P(j) for J = 1,...,ILO-1
-* = D(j) for J = ILO,...,IHI
-* = P(j) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (lwork)
-* lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
-* at least 1 when JOB = 'N' or 'P'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* See R.C. WARD, Balancing the generalized eigenvalue problem,
-* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgges.f b/SRC/dgges.f
index 60007d28..2312f122 100644
--- a/SRC/dgges.f
+++ b/SRC/dgges.f
@@ -1,11 +1,288 @@
+*> \brief <b> DGGES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
+* SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR,
+* LDVSR, WORK, LWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR, SORT
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), VSL( LDVSL, * ),
+* $ VSR( LDVSR, * ), WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELCTG
+* EXTERNAL SELCTG
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGES computes for a pair of N-by-N real nonsymmetric matrices (A,B),
+*> the generalized eigenvalues, the generalized real Schur form (S,T),
+*> optionally, the left and/or right matrices of Schur vectors (VSL and
+*> VSR). This gives the generalized Schur factorization
+*>
+*> (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T )
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> quasi-triangular matrix S and the upper triangular matrix T.The
+*> leading columns of VSL and VSR then form an orthonormal basis for the
+*> corresponding left and right eigenspaces (deflating subspaces).
+*>
+*> (If only the generalized eigenvalues are needed, use the driver
+*> DGGEV instead, which is faster.)
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0 or both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized real Schur form if T is
+*> upper triangular with non-negative diagonal and S is block upper
+*> triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond
+*> to real generalized eigenvalues, while 2-by-2 blocks of S will be
+*> "standardized" by making the corresponding elements of T have the
+*> form:
+*> [ a 0 ]
+*> [ 0 b ]
+*>
+*> and the pair of corresponding 2-by-2 blocks in S and T will have a
+*> complex conjugate pair of generalized eigenvalues.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the generalized Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELCTG);
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*> SELCTG is procedure) LOGICAL FUNCTION of three DOUBLE PRECISION arguments
+*> SELCTG must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'N', SELCTG is not referenced.
+*> If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if
+*> SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
+*> one of a complex conjugate pair of eigenvalues is selected,
+*> then both complex eigenvalues are selected.
+*> \endverbatim
+*> \verbatim
+*> Note that in the ill-conditioned case, a selected complex
+*> eigenvalue may no longer satisfy SELCTG(ALPHAR(j),ALPHAI(j),
+*> BETA(j)) = .TRUE. after ordering. INFO is to be set to N+2
+*> in this case.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the first of the pair of matrices.
+*> On exit, A has been overwritten by its generalized Schur
+*> form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the second of the pair of matrices.
+*> On exit, B has been overwritten by its generalized Schur
+*> form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELCTG is true. (Complex conjugate pairs for which
+*> SELCTG is true for either eigenvalue count as 2.)
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i,
+*> and BETA(j),j=1,...,N are the diagonals of the complex Schur
+*> form (S,T) that would result if the 2-by-2 diagonal blocks of
+*> the real Schur form of (A,B) were further reduced to
+*> triangular form using 2-by-2 complex unitary transformations.
+*> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
+*> positive, then the j-th and (j+1)-st eigenvalues are a
+*> complex conjugate pair, with ALPHAI(j+1) negative.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
+*> may easily over- or underflow, and BETA(j) may even be zero.
+*> Thus, the user should avoid naively computing the ratio.
+*> However, ALPHAR and ALPHAI will be always less than and
+*> usually comparable with norm(A) in magnitude, and BETA always
+*> less than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is DOUBLE PRECISION array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >=1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is DOUBLE PRECISION array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N = 0, LWORK >= 1, else LWORK >= 8*N+16.
+*> For good performance , LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
+*> be correct for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in DHGEQZ.
+*> =N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Generalized Schur form no
+*> longer satisfy SELCTG=.TRUE. This could also
+*> be caused due to scaling.
+*> =N+3: reordering failed in DTGSEN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+* =====================================================================
SUBROUTINE DGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
$ SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR,
$ LDVSR, WORK, LWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR, SORT
@@ -22,169 +299,6 @@
EXTERNAL SELCTG
* ..
*
-* Purpose
-* =======
-*
-* DGGES computes for a pair of N-by-N real nonsymmetric matrices (A,B),
-* the generalized eigenvalues, the generalized real Schur form (S,T),
-* optionally, the left and/or right matrices of Schur vectors (VSL and
-* VSR). This gives the generalized Schur factorization
-*
-* (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T )
-*
-* Optionally, it also orders the eigenvalues so that a selected cluster
-* of eigenvalues appears in the leading diagonal blocks of the upper
-* quasi-triangular matrix S and the upper triangular matrix T.The
-* leading columns of VSL and VSR then form an orthonormal basis for the
-* corresponding left and right eigenspaces (deflating subspaces).
-*
-* (If only the generalized eigenvalues are needed, use the driver
-* DGGEV instead, which is faster.)
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is a
-* reasonable interpretation for beta=0 or both being zero.
-*
-* A pair of matrices (S,T) is in generalized real Schur form if T is
-* upper triangular with non-negative diagonal and S is block upper
-* triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond
-* to real generalized eigenvalues, while 2-by-2 blocks of S will be
-* "standardized" by making the corresponding elements of T have the
-* form:
-* [ a 0 ]
-* [ 0 b ]
-*
-* and the pair of corresponding 2-by-2 blocks in S and T will have a
-* complex conjugate pair of generalized eigenvalues.
-*
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors.
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the generalized Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELCTG);
-*
-* SELCTG (external procedure) LOGICAL FUNCTION of three DOUBLE PRECISION arguments
-* SELCTG must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'N', SELCTG is not referenced.
-* If SORT = 'S', SELCTG is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if
-* SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
-* one of a complex conjugate pair of eigenvalues is selected,
-* then both complex eigenvalues are selected.
-*
-* Note that in the ill-conditioned case, a selected complex
-* eigenvalue may no longer satisfy SELCTG(ALPHAR(j),ALPHAI(j),
-* BETA(j)) = .TRUE. after ordering. INFO is to be set to N+2
-* in this case.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the first of the pair of matrices.
-* On exit, A has been overwritten by its generalized Schur
-* form S.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the second of the pair of matrices.
-* On exit, B has been overwritten by its generalized Schur
-* form T.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELCTG is true. (Complex conjugate pairs for which
-* SELCTG is true for either eigenvalue count as 2.)
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (N)
-*
-* ALPHAI (output) DOUBLE PRECISION array, dimension (N)
-*
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i,
-* and BETA(j),j=1,...,N are the diagonals of the complex Schur
-* form (S,T) that would result if the 2-by-2 diagonal blocks of
-* the real Schur form of (A,B) were further reduced to
-* triangular form using 2-by-2 complex unitary transformations.
-* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
-* positive, then the j-th and (j+1)-st eigenvalues are a
-* complex conjugate pair, with ALPHAI(j+1) negative.
-*
-* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
-* may easily over- or underflow, and BETA(j) may even be zero.
-* Thus, the user should avoid naively computing the ratio.
-* However, ALPHAR and ALPHAI will be always less than and
-* usually comparable with norm(A) in magnitude, and BETA always
-* less than and usually comparable with norm(B).
-*
-* VSL (output) DOUBLE PRECISION array, dimension (LDVSL,N)
-* If JOBVSL = 'V', VSL will contain the left Schur vectors.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >=1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) DOUBLE PRECISION array, dimension (LDVSR,N)
-* If JOBVSR = 'V', VSR will contain the right Schur vectors.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N = 0, LWORK >= 1, else LWORK >= 8*N+16.
-* For good performance , LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
-* be correct for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in DHGEQZ.
-* =N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Generalized Schur form no
-* longer satisfy SELCTG=.TRUE. This could also
-* be caused due to scaling.
-* =N+3: reordering failed in DTGSEN.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dggesx.f b/SRC/dggesx.f
index 328013fd..9e598eb1 100644
--- a/SRC/dggesx.f
+++ b/SRC/dggesx.f
@@ -1,12 +1,371 @@
+*> \brief <b> DGGESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA,
+* B, LDB, SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL,
+* VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK,
+* LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR, SENSE, SORT
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LIWORK, LWORK, N,
+* $ SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), RCONDE( 2 ),
+* $ RCONDV( 2 ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+* $ WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELCTG
+* EXTERNAL SELCTG
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGESX computes for a pair of N-by-N real nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, the real Schur form (S,T), and,
+*> optionally, the left and/or right matrices of Schur vectors (VSL and
+*> VSR). This gives the generalized Schur factorization
+*>
+*> (A,B) = ( (VSL) S (VSR)**T, (VSL) T (VSR)**T )
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> quasi-triangular matrix S and the upper triangular matrix T; computes
+*> a reciprocal condition number for the average of the selected
+*> eigenvalues (RCONDE); and computes a reciprocal condition number for
+*> the right and left deflating subspaces corresponding to the selected
+*> eigenvalues (RCONDV). The leading columns of VSL and VSR then form
+*> an orthonormal basis for the corresponding left and right eigenspaces
+*> (deflating subspaces).
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0 or for both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized real Schur form if T is
+*> upper triangular with non-negative diagonal and S is block upper
+*> triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond
+*> to real generalized eigenvalues, while 2-by-2 blocks of S will be
+*> "standardized" by making the corresponding elements of T have the
+*> form:
+*> [ a 0 ]
+*> [ 0 b ]
+*>
+*> and the pair of corresponding 2-by-2 blocks in S and T will have a
+*> complex conjugate pair of generalized eigenvalues.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the generalized Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELCTG).
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*> SELCTG is procedure) LOGICAL FUNCTION of three DOUBLE PRECISION arguments
+*> SELCTG must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'N', SELCTG is not referenced.
+*> If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if
+*> SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
+*> one of a complex conjugate pair of eigenvalues is selected,
+*> then both complex eigenvalues are selected.
+*> Note that a selected complex eigenvalue may no longer satisfy
+*> SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) = .TRUE. after ordering,
+*> since ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned), in this
+*> case INFO is set to N+3.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N' : None are computed;
+*> = 'E' : Computed for average of selected eigenvalues only;
+*> = 'V' : Computed for selected deflating subspaces only;
+*> = 'B' : Computed for both.
+*> If SENSE = 'E', 'V', or 'B', SORT must equal 'S'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the first of the pair of matrices.
+*> On exit, A has been overwritten by its generalized Schur
+*> form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the second of the pair of matrices.
+*> On exit, B has been overwritten by its generalized Schur
+*> form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELCTG is true. (Complex conjugate pairs for which
+*> SELCTG is true for either eigenvalue count as 2.)
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
+*> and BETA(j),j=1,...,N are the diagonals of the complex Schur
+*> form (S,T) that would result if the 2-by-2 diagonal blocks of
+*> the real Schur form of (A,B) were further reduced to
+*> triangular form using 2-by-2 complex unitary transformations.
+*> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
+*> positive, then the j-th and (j+1)-st eigenvalues are a
+*> complex conjugate pair, with ALPHAI(j+1) negative.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
+*> may easily over- or underflow, and BETA(j) may even be zero.
+*> Thus, the user should avoid naively computing the ratio.
+*> However, ALPHAR and ALPHAI will be always less than and
+*> usually comparable with norm(A) in magnitude, and BETA always
+*> less than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is DOUBLE PRECISION array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >=1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is DOUBLE PRECISION array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension ( 2 )
+*> If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
+*> reciprocal condition numbers for the average of the selected
+*> eigenvalues.
+*> Not referenced if SENSE = 'N' or 'V'.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension ( 2 )
+*> If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
+*> reciprocal condition numbers for the selected deflating
+*> subspaces.
+*> Not referenced if SENSE = 'N' or 'E'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N = 0, LWORK >= 1, else if SENSE = 'E', 'V', or 'B',
+*> LWORK >= max( 8*N, 6*N+16, 2*SDIM*(N-SDIM) ), else
+*> LWORK >= max( 8*N, 6*N+16 ).
+*> Note that 2*SDIM*(N-SDIM) <= N*N/2.
+*> Note also that an error is only returned if
+*> LWORK < max( 8*N, 6*N+16), but if SENSE = 'E' or 'V' or 'B'
+*> this may not be large enough.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the bound on the optimal size of the WORK
+*> array and the minimum size of the IWORK array, returns these
+*> values as the first entries of the WORK and IWORK arrays, and
+*> no error message related to LWORK or LIWORK is issued by
+*> XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If SENSE = 'N' or N = 0, LIWORK >= 1, otherwise
+*> LIWORK >= N+6.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the bound on the optimal size of the
+*> WORK array and the minimum size of the IWORK array, returns
+*> these values as the first entries of the WORK and IWORK
+*> arrays, and no error message related to LWORK or LIWORK is
+*> issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
+*> be correct for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in DHGEQZ
+*> =N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Generalized Schur form no
+*> longer satisfy SELCTG=.TRUE. This could also
+*> be caused due to scaling.
+*> =N+3: reordering failed in DTGSEN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> An approximate (asymptotic) bound on the average absolute error of
+*> the selected eigenvalues is
+*>
+*> EPS * norm((A, B)) / RCONDE( 1 ).
+*>
+*> An approximate (asymptotic) bound on the maximum angular error in
+*> the computed deflating subspaces is
+*>
+*> EPS * norm((A, B)) / RCONDV( 2 ).
+*>
+*> See LAPACK User's Guide, section 4.11 for more information.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA,
$ B, LDB, SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL,
$ VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK,
$ LIWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.1) --
+* -- LAPACK eigen routine (version 3.2.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR, SENSE, SORT
@@ -26,227 +385,6 @@
EXTERNAL SELCTG
* ..
*
-* Purpose
-* =======
-*
-* DGGESX computes for a pair of N-by-N real nonsymmetric matrices
-* (A,B), the generalized eigenvalues, the real Schur form (S,T), and,
-* optionally, the left and/or right matrices of Schur vectors (VSL and
-* VSR). This gives the generalized Schur factorization
-*
-* (A,B) = ( (VSL) S (VSR)**T, (VSL) T (VSR)**T )
-*
-* Optionally, it also orders the eigenvalues so that a selected cluster
-* of eigenvalues appears in the leading diagonal blocks of the upper
-* quasi-triangular matrix S and the upper triangular matrix T; computes
-* a reciprocal condition number for the average of the selected
-* eigenvalues (RCONDE); and computes a reciprocal condition number for
-* the right and left deflating subspaces corresponding to the selected
-* eigenvalues (RCONDV). The leading columns of VSL and VSR then form
-* an orthonormal basis for the corresponding left and right eigenspaces
-* (deflating subspaces).
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is a
-* reasonable interpretation for beta=0 or for both being zero.
-*
-* A pair of matrices (S,T) is in generalized real Schur form if T is
-* upper triangular with non-negative diagonal and S is block upper
-* triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond
-* to real generalized eigenvalues, while 2-by-2 blocks of S will be
-* "standardized" by making the corresponding elements of T have the
-* form:
-* [ a 0 ]
-* [ 0 b ]
-*
-* and the pair of corresponding 2-by-2 blocks in S and T will have a
-* complex conjugate pair of generalized eigenvalues.
-*
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors.
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the generalized Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELCTG).
-*
-* SELCTG (external procedure) LOGICAL FUNCTION of three DOUBLE PRECISION arguments
-* SELCTG must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'N', SELCTG is not referenced.
-* If SORT = 'S', SELCTG is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if
-* SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
-* one of a complex conjugate pair of eigenvalues is selected,
-* then both complex eigenvalues are selected.
-* Note that a selected complex eigenvalue may no longer satisfy
-* SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) = .TRUE. after ordering,
-* since ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned), in this
-* case INFO is set to N+3.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N' : None are computed;
-* = 'E' : Computed for average of selected eigenvalues only;
-* = 'V' : Computed for selected deflating subspaces only;
-* = 'B' : Computed for both.
-* If SENSE = 'E', 'V', or 'B', SORT must equal 'S'.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the first of the pair of matrices.
-* On exit, A has been overwritten by its generalized Schur
-* form S.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the second of the pair of matrices.
-* On exit, B has been overwritten by its generalized Schur
-* form T.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELCTG is true. (Complex conjugate pairs for which
-* SELCTG is true for either eigenvalue count as 2.)
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (N)
-*
-* ALPHAI (output) DOUBLE PRECISION array, dimension (N)
-*
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
-* and BETA(j),j=1,...,N are the diagonals of the complex Schur
-* form (S,T) that would result if the 2-by-2 diagonal blocks of
-* the real Schur form of (A,B) were further reduced to
-* triangular form using 2-by-2 complex unitary transformations.
-* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
-* positive, then the j-th and (j+1)-st eigenvalues are a
-* complex conjugate pair, with ALPHAI(j+1) negative.
-*
-* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
-* may easily over- or underflow, and BETA(j) may even be zero.
-* Thus, the user should avoid naively computing the ratio.
-* However, ALPHAR and ALPHAI will be always less than and
-* usually comparable with norm(A) in magnitude, and BETA always
-* less than and usually comparable with norm(B).
-*
-* VSL (output) DOUBLE PRECISION array, dimension (LDVSL,N)
-* If JOBVSL = 'V', VSL will contain the left Schur vectors.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >=1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) DOUBLE PRECISION array, dimension (LDVSR,N)
-* If JOBVSR = 'V', VSR will contain the right Schur vectors.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* RCONDE (output) DOUBLE PRECISION array, dimension ( 2 )
-* If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
-* reciprocal condition numbers for the average of the selected
-* eigenvalues.
-* Not referenced if SENSE = 'N' or 'V'.
-*
-* RCONDV (output) DOUBLE PRECISION array, dimension ( 2 )
-* If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
-* reciprocal condition numbers for the selected deflating
-* subspaces.
-* Not referenced if SENSE = 'N' or 'E'.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N = 0, LWORK >= 1, else if SENSE = 'E', 'V', or 'B',
-* LWORK >= max( 8*N, 6*N+16, 2*SDIM*(N-SDIM) ), else
-* LWORK >= max( 8*N, 6*N+16 ).
-* Note that 2*SDIM*(N-SDIM) <= N*N/2.
-* Note also that an error is only returned if
-* LWORK < max( 8*N, 6*N+16), but if SENSE = 'E' or 'V' or 'B'
-* this may not be large enough.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the bound on the optimal size of the WORK
-* array and the minimum size of the IWORK array, returns these
-* values as the first entries of the WORK and IWORK arrays, and
-* no error message related to LWORK or LIWORK is issued by
-* XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If SENSE = 'N' or N = 0, LIWORK >= 1, otherwise
-* LIWORK >= N+6.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the bound on the optimal size of the
-* WORK array and the minimum size of the IWORK array, returns
-* these values as the first entries of the WORK and IWORK
-* arrays, and no error message related to LWORK or LIWORK is
-* issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
-* be correct for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in DHGEQZ
-* =N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Generalized Schur form no
-* longer satisfy SELCTG=.TRUE. This could also
-* be caused due to scaling.
-* =N+3: reordering failed in DTGSEN.
-*
-* Further Details
-* ===============
-*
-* An approximate (asymptotic) bound on the average absolute error of
-* the selected eigenvalues is
-*
-* EPS * norm((A, B)) / RCONDE( 1 ).
-*
-* An approximate (asymptotic) bound on the maximum angular error in
-* the computed deflating subspaces is
-*
-* EPS * norm((A, B)) / RCONDV( 2 ).
-*
-* See LAPACK User's Guide, section 4.11 for more information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dggev.f b/SRC/dggev.f
index 607cfa84..57b1cf09 100644
--- a/SRC/dggev.f
+++ b/SRC/dggev.f
@@ -1,10 +1,229 @@
+*> \brief <b> DGGEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
+* BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B)
+*> the generalized eigenvalues, and optionally, the left and/or right
+*> generalized eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*>
+*> A * v(j) = lambda(j) * B * v(j).
+*>
+*> The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*>
+*> u(j)**H * A = lambda(j) * u(j)**H * B .
+*>
+*> where u(j)**H is the conjugate-transpose of u(j).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the matrix A in the pair (A,B).
+*> On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the matrix B in the pair (A,B).
+*> On exit, B has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. If ALPHAI(j) is zero, then
+*> the j-th eigenvalue is real; if positive, then the j-th and
+*> (j+1)-st eigenvalues are a complex conjugate pair, with
+*> ALPHAI(j+1) negative.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
+*> may easily over- or underflow, and BETA(j) may even be zero.
+*> Thus, the user should avoid naively computing the ratio
+*> alpha/beta. However, ALPHAR and ALPHAI will be always less
+*> than and usually comparable with norm(A) in magnitude, and
+*> BETA always less than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order as
+*> their eigenvalues. If the j-th eigenvalue is real, then
+*> u(j) = VL(:,j), the j-th column of VL. If the j-th and
+*> (j+1)-th eigenvalues form a complex conjugate pair, then
+*> u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
+*> Each eigenvector is scaled so the largest component has
+*> abs(real part)+abs(imag. part)=1.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order as
+*> their eigenvalues. If the j-th eigenvalue is real, then
+*> v(j) = VR(:,j), the j-th column of VR. If the j-th and
+*> (j+1)-th eigenvalues form a complex conjugate pair, then
+*> v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
+*> Each eigenvector is scaled so the largest component has
+*> abs(real part)+abs(imag. part)=1.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,8*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
+*> should be correct for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in DHGEQZ.
+*> =N+2: error return from DTGEVC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+* =====================================================================
SUBROUTINE DGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
$ BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -16,130 +235,6 @@
$ VR( LDVR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B)
-* the generalized eigenvalues, and optionally, the left and/or right
-* generalized eigenvectors.
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar
-* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
-* singular. It is usually represented as the pair (alpha,beta), as
-* there is a reasonable interpretation for beta=0, and even for both
-* being zero.
-*
-* The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-*
-* A * v(j) = lambda(j) * B * v(j).
-*
-* The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-*
-* u(j)**H * A = lambda(j) * u(j)**H * B .
-*
-* where u(j)**H is the conjugate-transpose of u(j).
-*
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the matrix A in the pair (A,B).
-* On exit, A has been overwritten.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the matrix B in the pair (A,B).
-* On exit, B has been overwritten.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (N)
-*
-* ALPHAI (output) DOUBLE PRECISION array, dimension (N)
-*
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. If ALPHAI(j) is zero, then
-* the j-th eigenvalue is real; if positive, then the j-th and
-* (j+1)-st eigenvalues are a complex conjugate pair, with
-* ALPHAI(j+1) negative.
-*
-* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
-* may easily over- or underflow, and BETA(j) may even be zero.
-* Thus, the user should avoid naively computing the ratio
-* alpha/beta. However, ALPHAR and ALPHAI will be always less
-* than and usually comparable with norm(A) in magnitude, and
-* BETA always less than and usually comparable with norm(B).
-*
-* VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order as
-* their eigenvalues. If the j-th eigenvalue is real, then
-* u(j) = VL(:,j), the j-th column of VL. If the j-th and
-* (j+1)-th eigenvalues form a complex conjugate pair, then
-* u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
-* Each eigenvector is scaled so the largest component has
-* abs(real part)+abs(imag. part)=1.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) DOUBLE PRECISION array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order as
-* their eigenvalues. If the j-th eigenvalue is real, then
-* v(j) = VR(:,j), the j-th column of VR. If the j-th and
-* (j+1)-th eigenvalues form a complex conjugate pair, then
-* v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
-* Each eigenvector is scaled so the largest component has
-* abs(real part)+abs(imag. part)=1.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,8*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
-* should be correct for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in DHGEQZ.
-* =N+2: error return from DTGEVC.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dggevx.f b/SRC/dggevx.f
index 9a501a33..e1b521cb 100644
--- a/SRC/dggevx.f
+++ b/SRC/dggevx.f
@@ -1,12 +1,396 @@
+*> \brief <b> DGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
+* ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, ILO,
+* IHI, LSCALE, RSCALE, ABNRM, BBNRM, RCONDE,
+* RCONDV, WORK, LWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER BALANC, JOBVL, JOBVR, SENSE
+* INTEGER IHI, ILO, INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* DOUBLE PRECISION ABNRM, BBNRM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), LSCALE( * ),
+* $ RCONDE( * ), RCONDV( * ), RSCALE( * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGEVX computes for a pair of N-by-N real nonsymmetric matrices (A,B)
+*> the generalized eigenvalues, and optionally, the left and/or right
+*> generalized eigenvectors.
+*>
+*> Optionally also, it computes a balancing transformation to improve
+*> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
+*> LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
+*> the eigenvalues (RCONDE), and reciprocal condition numbers for the
+*> right eigenvectors (RCONDV).
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*>
+*> A * v(j) = lambda(j) * B * v(j) .
+*>
+*> The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*>
+*> u(j)**H * A = lambda(j) * u(j)**H * B.
+*>
+*> where u(j)**H is the conjugate-transpose of u(j).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER*1
+*> Specifies the balance option to be performed.
+*> = 'N': do not diagonally scale or permute;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> Computed reciprocal condition numbers will be for the
+*> matrices after permuting and/or balancing. Permuting does
+*> not change condition numbers (in exact arithmetic), but
+*> balancing does.
+*> \endverbatim
+*>
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': none are computed;
+*> = 'E': computed for eigenvalues only;
+*> = 'V': computed for eigenvectors only;
+*> = 'B': computed for eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the matrix A in the pair (A,B).
+*> On exit, A has been overwritten. If JOBVL='V' or JOBVR='V'
+*> or both, then A contains the first part of the real Schur
+*> form of the "balanced" versions of the input A and B.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the matrix B in the pair (A,B).
+*> On exit, B has been overwritten. If JOBVL='V' or JOBVR='V'
+*> or both, then B contains the second part of the real Schur
+*> form of the "balanced" versions of the input A and B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. If ALPHAI(j) is zero, then
+*> the j-th eigenvalue is real; if positive, then the j-th and
+*> (j+1)-st eigenvalues are a complex conjugate pair, with
+*> ALPHAI(j+1) negative.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
+*> may easily over- or underflow, and BETA(j) may even be zero.
+*> Thus, the user should avoid naively computing the ratio
+*> ALPHA/BETA. However, ALPHAR and ALPHAI will be always less
+*> than and usually comparable with norm(A) in magnitude, and
+*> BETA always less than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order as
+*> their eigenvalues. If the j-th eigenvalue is real, then
+*> u(j) = VL(:,j), the j-th column of VL. If the j-th and
+*> (j+1)-th eigenvalues form a complex conjugate pair, then
+*> u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
+*> Each eigenvector will be scaled so the largest component have
+*> abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order as
+*> their eigenvalues. If the j-th eigenvalue is real, then
+*> v(j) = VR(:,j), the j-th column of VR. If the j-th and
+*> (j+1)-th eigenvalues form a complex conjugate pair, then
+*> v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
+*> Each eigenvector will be scaled so the largest component have
+*> abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are integer values such that on exit
+*> A(i,j) = 0 and B(i,j) = 0 if i > j and
+*> j = 1,...,ILO-1 or i = IHI+1,...,N.
+*> If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the left side of A and B. If PL(j) is the index of the
+*> row interchanged with row j, and DL(j) is the scaling
+*> factor applied to row j, then
+*> LSCALE(j) = PL(j) for j = 1,...,ILO-1
+*> = DL(j) for j = ILO,...,IHI
+*> = PL(j) for j = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the right side of A and B. If PR(j) is the index of the
+*> column interchanged with column j, and DR(j) is the scaling
+*> factor applied to column j, then
+*> RSCALE(j) = PR(j) for j = 1,...,ILO-1
+*> = DR(j) for j = ILO,...,IHI
+*> = PR(j) for j = IHI+1,...,N
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] ABNRM
+*> \verbatim
+*> ABNRM is DOUBLE PRECISION
+*> The one-norm of the balanced matrix A.
+*> \endverbatim
+*>
+*> \param[out] BBNRM
+*> \verbatim
+*> BBNRM is DOUBLE PRECISION
+*> The one-norm of the balanced matrix B.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension (N)
+*> If SENSE = 'E' or 'B', the reciprocal condition numbers of
+*> the eigenvalues, stored in consecutive elements of the array.
+*> For a complex conjugate pair of eigenvalues two consecutive
+*> elements of RCONDE are set to the same value. Thus RCONDE(j),
+*> RCONDV(j), and the j-th columns of VL and VR all correspond
+*> to the j-th eigenpair.
+*> If SENSE = 'N or 'V', RCONDE is not referenced.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension (N)
+*> If SENSE = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the eigenvectors, stored in consecutive elements
+*> of the array. For a complex eigenvector two consecutive
+*> elements of RCONDV are set to the same value. If the
+*> eigenvalues cannot be reordered to compute RCONDV(j),
+*> RCONDV(j) is set to 0; this can only occur when the true
+*> value would be very small anyway.
+*> If SENSE = 'N' or 'E', RCONDV is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> If BALANC = 'S' or 'B', or JOBVL = 'V', or JOBVR = 'V',
+*> LWORK >= max(1,6*N).
+*> If SENSE = 'E' or 'B', LWORK >= max(1,10*N).
+*> If SENSE = 'V' or 'B', LWORK >= 2*N*N+8*N+16.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N+6)
+*> If SENSE = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> If SENSE = 'N', BWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
+*> should be correct for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in DHGEQZ.
+*> =N+2: error return from DTGEVC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Balancing a matrix pair (A,B) includes, first, permuting rows and
+*> columns to isolate eigenvalues, second, applying diagonal similarity
+*> transformation to the rows and columns to make the rows and columns
+*> as close in norm as possible. The computed reciprocal condition
+*> numbers correspond to the balanced matrix. Permuting rows and columns
+*> will not change the condition numbers (in exact arithmetic) but
+*> diagonal scaling will. For further explanation of balancing, see
+*> section 4.11.1.2 of LAPACK Users' Guide.
+*>
+*> An approximate error bound on the chordal distance between the i-th
+*> computed generalized eigenvalue w and the corresponding exact
+*> eigenvalue lambda is
+*>
+*> chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
+*>
+*> An approximate error bound for the angle between the i-th computed
+*> eigenvector VL(i) or VR(i) is given by
+*>
+*> EPS * norm(ABNRM, BBNRM) / DIF(i).
+*>
+*> For further explanation of the reciprocal condition numbers RCONDE
+*> and RCONDV, see section 4.11 of LAPACK User's Guide.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
$ ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, ILO,
$ IHI, LSCALE, RSCALE, ABNRM, BBNRM, RCONDE,
$ RCONDV, WORK, LWORK, IWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER BALANC, JOBVL, JOBVR, SENSE
@@ -22,248 +406,6 @@
$ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGGEVX computes for a pair of N-by-N real nonsymmetric matrices (A,B)
-* the generalized eigenvalues, and optionally, the left and/or right
-* generalized eigenvectors.
-*
-* Optionally also, it computes a balancing transformation to improve
-* the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
-* LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
-* the eigenvalues (RCONDE), and reciprocal condition numbers for the
-* right eigenvectors (RCONDV).
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar
-* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
-* singular. It is usually represented as the pair (alpha,beta), as
-* there is a reasonable interpretation for beta=0, and even for both
-* being zero.
-*
-* The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-*
-* A * v(j) = lambda(j) * B * v(j) .
-*
-* The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-*
-* u(j)**H * A = lambda(j) * u(j)**H * B.
-*
-* where u(j)**H is the conjugate-transpose of u(j).
-*
-*
-* Arguments
-* =========
-*
-* BALANC (input) CHARACTER*1
-* Specifies the balance option to be performed.
-* = 'N': do not diagonally scale or permute;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-* Computed reciprocal condition numbers will be for the
-* matrices after permuting and/or balancing. Permuting does
-* not change condition numbers (in exact arithmetic), but
-* balancing does.
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': none are computed;
-* = 'E': computed for eigenvalues only;
-* = 'V': computed for eigenvectors only;
-* = 'B': computed for eigenvalues and eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the matrix A in the pair (A,B).
-* On exit, A has been overwritten. If JOBVL='V' or JOBVR='V'
-* or both, then A contains the first part of the real Schur
-* form of the "balanced" versions of the input A and B.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the matrix B in the pair (A,B).
-* On exit, B has been overwritten. If JOBVL='V' or JOBVR='V'
-* or both, then B contains the second part of the real Schur
-* form of the "balanced" versions of the input A and B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (N)
-*
-* ALPHAI (output) DOUBLE PRECISION array, dimension (N)
-*
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. If ALPHAI(j) is zero, then
-* the j-th eigenvalue is real; if positive, then the j-th and
-* (j+1)-st eigenvalues are a complex conjugate pair, with
-* ALPHAI(j+1) negative.
-*
-* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
-* may easily over- or underflow, and BETA(j) may even be zero.
-* Thus, the user should avoid naively computing the ratio
-* ALPHA/BETA. However, ALPHAR and ALPHAI will be always less
-* than and usually comparable with norm(A) in magnitude, and
-* BETA always less than and usually comparable with norm(B).
-*
-* VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order as
-* their eigenvalues. If the j-th eigenvalue is real, then
-* u(j) = VL(:,j), the j-th column of VL. If the j-th and
-* (j+1)-th eigenvalues form a complex conjugate pair, then
-* u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
-* Each eigenvector will be scaled so the largest component have
-* abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) DOUBLE PRECISION array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order as
-* their eigenvalues. If the j-th eigenvalue is real, then
-* v(j) = VR(:,j), the j-th column of VR. If the j-th and
-* (j+1)-th eigenvalues form a complex conjugate pair, then
-* v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
-* Each eigenvector will be scaled so the largest component have
-* abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are integer values such that on exit
-* A(i,j) = 0 and B(i,j) = 0 if i > j and
-* j = 1,...,ILO-1 or i = IHI+1,...,N.
-* If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
-*
-* LSCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the left side of A and B. If PL(j) is the index of the
-* row interchanged with row j, and DL(j) is the scaling
-* factor applied to row j, then
-* LSCALE(j) = PL(j) for j = 1,...,ILO-1
-* = DL(j) for j = ILO,...,IHI
-* = PL(j) for j = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* RSCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the right side of A and B. If PR(j) is the index of the
-* column interchanged with column j, and DR(j) is the scaling
-* factor applied to column j, then
-* RSCALE(j) = PR(j) for j = 1,...,ILO-1
-* = DR(j) for j = ILO,...,IHI
-* = PR(j) for j = IHI+1,...,N
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* ABNRM (output) DOUBLE PRECISION
-* The one-norm of the balanced matrix A.
-*
-* BBNRM (output) DOUBLE PRECISION
-* The one-norm of the balanced matrix B.
-*
-* RCONDE (output) DOUBLE PRECISION array, dimension (N)
-* If SENSE = 'E' or 'B', the reciprocal condition numbers of
-* the eigenvalues, stored in consecutive elements of the array.
-* For a complex conjugate pair of eigenvalues two consecutive
-* elements of RCONDE are set to the same value. Thus RCONDE(j),
-* RCONDV(j), and the j-th columns of VL and VR all correspond
-* to the j-th eigenpair.
-* If SENSE = 'N or 'V', RCONDE is not referenced.
-*
-* RCONDV (output) DOUBLE PRECISION array, dimension (N)
-* If SENSE = 'V' or 'B', the estimated reciprocal condition
-* numbers of the eigenvectors, stored in consecutive elements
-* of the array. For a complex eigenvector two consecutive
-* elements of RCONDV are set to the same value. If the
-* eigenvalues cannot be reordered to compute RCONDV(j),
-* RCONDV(j) is set to 0; this can only occur when the true
-* value would be very small anyway.
-* If SENSE = 'N' or 'E', RCONDV is not referenced.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* If BALANC = 'S' or 'B', or JOBVL = 'V', or JOBVR = 'V',
-* LWORK >= max(1,6*N).
-* If SENSE = 'E' or 'B', LWORK >= max(1,10*N).
-* If SENSE = 'V' or 'B', LWORK >= 2*N*N+8*N+16.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (N+6)
-* If SENSE = 'E', IWORK is not referenced.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* If SENSE = 'N', BWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
-* should be correct for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in DHGEQZ.
-* =N+2: error return from DTGEVC.
-*
-* Further Details
-* ===============
-*
-* Balancing a matrix pair (A,B) includes, first, permuting rows and
-* columns to isolate eigenvalues, second, applying diagonal similarity
-* transformation to the rows and columns to make the rows and columns
-* as close in norm as possible. The computed reciprocal condition
-* numbers correspond to the balanced matrix. Permuting rows and columns
-* will not change the condition numbers (in exact arithmetic) but
-* diagonal scaling will. For further explanation of balancing, see
-* section 4.11.1.2 of LAPACK Users' Guide.
-*
-* An approximate error bound on the chordal distance between the i-th
-* computed generalized eigenvalue w and the corresponding exact
-* eigenvalue lambda is
-*
-* chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
-*
-* An approximate error bound for the angle between the i-th computed
-* eigenvector VL(i) or VR(i) is given by
-*
-* EPS * norm(ABNRM, BBNRM) / DIF(i).
-*
-* For further explanation of the reciprocal condition numbers RCONDE
-* and RCONDV, see section 4.11 of LAPACK User's Guide.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dggglm.f b/SRC/dggglm.f
index ef0c11fe..76b5cc38 100644
--- a/SRC/dggglm.f
+++ b/SRC/dggglm.f
@@ -1,10 +1,185 @@
+*> \brief <b> DGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), D( * ), WORK( * ),
+* $ X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGGLM solves a general Gauss-Markov linear model (GLM) problem:
+*>
+*> minimize || y ||_2 subject to d = A*x + B*y
+*> x
+*>
+*> where A is an N-by-M matrix, B is an N-by-P matrix, and d is a
+*> given N-vector. It is assumed that M <= N <= M+P, and
+*>
+*> rank(A) = M and rank( A B ) = N.
+*>
+*> Under these assumptions, the constrained equation is always
+*> consistent, and there is a unique solution x and a minimal 2-norm
+*> solution y, which is obtained using a generalized QR factorization
+*> of the matrices (A, B) given by
+*>
+*> A = Q*(R), B = Q*T*Z.
+*> (0)
+*>
+*> In particular, if matrix B is square nonsingular, then the problem
+*> GLM is equivalent to the following weighted linear least squares
+*> problem
+*>
+*> minimize || inv(B)*(d-A*x) ||_2
+*> x
+*>
+*> where inv(B) denotes the inverse of B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= N-M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,M)
+*> On entry, the N-by-M matrix A.
+*> On exit, the upper triangular part of the array A contains
+*> the M-by-M upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,P)
+*> On entry, the N-by-P matrix B.
+*> On exit, if N <= P, the upper triangle of the subarray
+*> B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
+*> if N > P, the elements on and above the (N-P)th subdiagonal
+*> contain the N-by-P upper trapezoidal matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, D is the left hand side of the GLM equation.
+*> On exit, D is destroyed.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (M)
+*> \param[out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension (P)
+*> On exit, X and Y are the solutions of the GLM problem.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N+M+P).
+*> For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB,
+*> where NB is an upper bound for the optimal blocksizes for
+*> DGEQRF, SGERQF, DORMQR and SORMRQ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the upper triangular factor R associated with A in the
+*> generalized QR factorization of the pair (A, B) is
+*> singular, so that rank(A) < M; the least squares
+*> solution could not be computed.
+*> = 2: the bottom (N-M) by (N-M) part of the upper trapezoidal
+*> factor T associated with B in the generalized QR
+*> factorization of the pair (A, B) is singular, so that
+*> rank( A B ) < N; the least squares solution could not
+*> be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, P
@@ -14,101 +189,6 @@
$ X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* DGGGLM solves a general Gauss-Markov linear model (GLM) problem:
-*
-* minimize || y ||_2 subject to d = A*x + B*y
-* x
-*
-* where A is an N-by-M matrix, B is an N-by-P matrix, and d is a
-* given N-vector. It is assumed that M <= N <= M+P, and
-*
-* rank(A) = M and rank( A B ) = N.
-*
-* Under these assumptions, the constrained equation is always
-* consistent, and there is a unique solution x and a minimal 2-norm
-* solution y, which is obtained using a generalized QR factorization
-* of the matrices (A, B) given by
-*
-* A = Q*(R), B = Q*T*Z.
-* (0)
-*
-* In particular, if matrix B is square nonsingular, then the problem
-* GLM is equivalent to the following weighted linear least squares
-* problem
-*
-* minimize || inv(B)*(d-A*x) ||_2
-* x
-*
-* where inv(B) denotes the inverse of B.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. 0 <= M <= N.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= N-M.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,M)
-* On entry, the N-by-M matrix A.
-* On exit, the upper triangular part of the array A contains
-* the M-by-M upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,P)
-* On entry, the N-by-P matrix B.
-* On exit, if N <= P, the upper triangle of the subarray
-* B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
-* if N > P, the elements on and above the (N-P)th subdiagonal
-* contain the N-by-P upper trapezoidal matrix T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, D is the left hand side of the GLM equation.
-* On exit, D is destroyed.
-*
-* X (output) DOUBLE PRECISION array, dimension (M)
-* Y (output) DOUBLE PRECISION array, dimension (P)
-* On exit, X and Y are the solutions of the GLM problem.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N+M+P).
-* For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB,
-* where NB is an upper bound for the optimal blocksizes for
-* DGEQRF, SGERQF, DORMQR and SORMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the upper triangular factor R associated with A in the
-* generalized QR factorization of the pair (A, B) is
-* singular, so that rank(A) < M; the least squares
-* solution could not be computed.
-* = 2: the bottom (N-M) by (N-M) part of the upper trapezoidal
-* factor T associated with B in the generalized QR
-* factorization of the pair (A, B) is singular, so that
-* rank( A B ) < N; the least squares solution could not
-* be computed.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/dgghrd.f b/SRC/dgghrd.f
index 4d5ca181..2d4b367a 100644
--- a/SRC/dgghrd.f
+++ b/SRC/dgghrd.f
@@ -1,10 +1,208 @@
+*> \brief \b DGGHRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
+* LDQ, Z, LDZ, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, COMPZ
+* INTEGER IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGHRD reduces a pair of real matrices (A,B) to generalized upper
+*> Hessenberg form using orthogonal transformations, where A is a
+*> general matrix and B is upper triangular. The form of the
+*> generalized eigenvalue problem is
+*> A*x = lambda*B*x,
+*> and B is typically made upper triangular by computing its QR
+*> factorization and moving the orthogonal matrix Q to the left side
+*> of the equation.
+*>
+*> This subroutine simultaneously reduces A to a Hessenberg matrix H:
+*> Q**T*A*Z = H
+*> and transforms B to another upper triangular matrix T:
+*> Q**T*B*Z = T
+*> in order to reduce the problem to its standard form
+*> H*y = lambda*T*y
+*> where y = Z**T*x.
+*>
+*> The orthogonal matrices Q and Z are determined as products of Givens
+*> rotations. They may either be formed explicitly, or they may be
+*> postmultiplied into input matrices Q1 and Z1, so that
+*>
+*> Q1 * A * Z1**T = (Q1*Q) * H * (Z1*Z)**T
+*>
+*> Q1 * B * Z1**T = (Q1*Q) * T * (Z1*Z)**T
+*>
+*> If Q1 is the orthogonal matrix from the QR factorization of B in the
+*> original equation A*x = lambda*B*x, then DGGHRD reduces the original
+*> problem to generalized Hessenberg form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'N': do not compute Q;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> orthogonal matrix Q is returned;
+*> = 'V': Q must contain an orthogonal matrix Q1 on entry,
+*> and the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': do not compute Z;
+*> = 'I': Z is initialized to the unit matrix, and the
+*> orthogonal matrix Z is returned;
+*> = 'V': Z must contain an orthogonal matrix Z1 on entry,
+*> and the product Z1*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI mark the rows and columns of A which are to be
+*> reduced. It is assumed that A is already upper triangular
+*> in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
+*> normally set by a previous call to SGGBAL; otherwise they
+*> should be set to 1 and N respectively.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the N-by-N general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> rest is set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the N-by-N upper triangular matrix B.
+*> On exit, the upper triangular matrix T = Q**T B Z. The
+*> elements below the diagonal are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, N)
+*> On entry, if COMPQ = 'V', the orthogonal matrix Q1,
+*> typically from the QR factorization of B.
+*> On exit, if COMPQ='I', the orthogonal matrix Q, and if
+*> COMPQ = 'V', the product Q1*Q.
+*> Not referenced if COMPQ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the orthogonal matrix Z1.
+*> On exit, if COMPZ='I', the orthogonal matrix Z, and if
+*> COMPZ = 'V', the product Z1*Z.
+*> Not referenced if COMPZ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z.
+*> LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine reduces A to Hessenberg and B to triangular form by
+*> an unblocked reduction, as described in _Matrix_Computations_,
+*> by Golub and Van Loan (Johns Hopkins Press.)
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
$ LDQ, Z, LDZ, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, COMPZ
@@ -15,116 +213,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DGGHRD reduces a pair of real matrices (A,B) to generalized upper
-* Hessenberg form using orthogonal transformations, where A is a
-* general matrix and B is upper triangular. The form of the
-* generalized eigenvalue problem is
-* A*x = lambda*B*x,
-* and B is typically made upper triangular by computing its QR
-* factorization and moving the orthogonal matrix Q to the left side
-* of the equation.
-*
-* This subroutine simultaneously reduces A to a Hessenberg matrix H:
-* Q**T*A*Z = H
-* and transforms B to another upper triangular matrix T:
-* Q**T*B*Z = T
-* in order to reduce the problem to its standard form
-* H*y = lambda*T*y
-* where y = Z**T*x.
-*
-* The orthogonal matrices Q and Z are determined as products of Givens
-* rotations. They may either be formed explicitly, or they may be
-* postmultiplied into input matrices Q1 and Z1, so that
-*
-* Q1 * A * Z1**T = (Q1*Q) * H * (Z1*Z)**T
-*
-* Q1 * B * Z1**T = (Q1*Q) * T * (Z1*Z)**T
-*
-* If Q1 is the orthogonal matrix from the QR factorization of B in the
-* original equation A*x = lambda*B*x, then DGGHRD reduces the original
-* problem to generalized Hessenberg form.
-*
-* Arguments
-* =========
-*
-* COMPQ (input) CHARACTER*1
-* = 'N': do not compute Q;
-* = 'I': Q is initialized to the unit matrix, and the
-* orthogonal matrix Q is returned;
-* = 'V': Q must contain an orthogonal matrix Q1 on entry,
-* and the product Q1*Q is returned.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': do not compute Z;
-* = 'I': Z is initialized to the unit matrix, and the
-* orthogonal matrix Z is returned;
-* = 'V': Z must contain an orthogonal matrix Z1 on entry,
-* and the product Z1*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI mark the rows and columns of A which are to be
-* reduced. It is assumed that A is already upper triangular
-* in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
-* normally set by a previous call to SGGBAL; otherwise they
-* should be set to 1 and N respectively.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the N-by-N general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* rest is set to zero.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the N-by-N upper triangular matrix B.
-* On exit, the upper triangular matrix T = Q**T B Z. The
-* elements below the diagonal are set to zero.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ, N)
-* On entry, if COMPQ = 'V', the orthogonal matrix Q1,
-* typically from the QR factorization of B.
-* On exit, if COMPQ='I', the orthogonal matrix Q, and if
-* COMPQ = 'V', the product Q1*Q.
-* Not referenced if COMPQ='N'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the orthogonal matrix Z1.
-* On exit, if COMPZ='I', the orthogonal matrix Z, and if
-* COMPZ = 'V', the product Z1*Z.
-* Not referenced if COMPZ='N'.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z.
-* LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* This routine reduces A to Hessenberg and B to triangular form by
-* an unblocked reduction, as described in _Matrix_Computations_,
-* by Golub and Van Loan (Johns Hopkins Press.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgglse.f b/SRC/dgglse.f
index e50f39d0..b08a72f3 100644
--- a/SRC/dgglse.f
+++ b/SRC/dgglse.f
@@ -1,10 +1,182 @@
+*> \brief <b> DGGLSE solves overdetermined or underdetermined systems for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( * ), D( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGLSE solves the linear equality-constrained least squares (LSE)
+*> problem:
+*>
+*> minimize || c - A*x ||_2 subject to B*x = d
+*>
+*> where A is an M-by-N matrix, B is a P-by-N matrix, c is a given
+*> M-vector, and d is a given P-vector. It is assumed that
+*> P <= N <= M+P, and
+*>
+*> rank(B) = P and rank( (A) ) = N.
+*> ( (B) )
+*>
+*> These conditions ensure that the LSE problem has a unique solution,
+*> which is obtained using a generalized RQ factorization of the
+*> matrices (B, A) given by
+*>
+*> B = (0 R)*Q, A = Z*T*Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. 0 <= P <= N <= M+P.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, the upper triangle of the subarray B(1:P,N-P+1:N)
+*> contains the P-by-P upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (M)
+*> On entry, C contains the right hand side vector for the
+*> least squares part of the LSE problem.
+*> On exit, the residual sum of squares for the solution
+*> is given by the sum of squares of elements N-P+1 to M of
+*> vector C.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (P)
+*> On entry, D contains the right hand side vector for the
+*> constrained equation.
+*> On exit, D is destroyed.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> On exit, X is the solution of the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M+N+P).
+*> For optimum performance LWORK >= P+min(M,N)+max(M,N)*NB,
+*> where NB is an upper bound for the optimal blocksizes for
+*> DGEQRF, SGERQF, DORMQR and SORMRQ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the upper triangular factor R associated with B in the
+*> generalized RQ factorization of the pair (B, A) is
+*> singular, so that rank(B) < P; the least squares
+*> solution could not be computed.
+*> = 2: the (N-P) by (N-P) part of the upper trapezoidal factor
+*> T associated with A in the generalized RQ factorization
+*> of the pair (B, A) is singular, so that
+*> rank( (A) ) < N; the least squares solution could not
+*> ( (B) )
+*> be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERsolve
+*
+* =====================================================================
SUBROUTINE DGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, P
@@ -14,98 +186,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DGGLSE solves the linear equality-constrained least squares (LSE)
-* problem:
-*
-* minimize || c - A*x ||_2 subject to B*x = d
-*
-* where A is an M-by-N matrix, B is a P-by-N matrix, c is a given
-* M-vector, and d is a given P-vector. It is assumed that
-* P <= N <= M+P, and
-*
-* rank(B) = P and rank( (A) ) = N.
-* ( (B) )
-*
-* These conditions ensure that the LSE problem has a unique solution,
-* which is obtained using a generalized RQ factorization of the
-* matrices (B, A) given by
-*
-* B = (0 R)*Q, A = Z*T*Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. 0 <= P <= N <= M+P.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, the upper triangle of the subarray B(1:P,N-P+1:N)
-* contains the P-by-P upper triangular matrix R.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* C (input/output) DOUBLE PRECISION array, dimension (M)
-* On entry, C contains the right hand side vector for the
-* least squares part of the LSE problem.
-* On exit, the residual sum of squares for the solution
-* is given by the sum of squares of elements N-P+1 to M of
-* vector C.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (P)
-* On entry, D contains the right hand side vector for the
-* constrained equation.
-* On exit, D is destroyed.
-*
-* X (output) DOUBLE PRECISION array, dimension (N)
-* On exit, X is the solution of the LSE problem.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M+N+P).
-* For optimum performance LWORK >= P+min(M,N)+max(M,N)*NB,
-* where NB is an upper bound for the optimal blocksizes for
-* DGEQRF, SGERQF, DORMQR and SORMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the upper triangular factor R associated with B in the
-* generalized RQ factorization of the pair (B, A) is
-* singular, so that rank(B) < P; the least squares
-* solution could not be computed.
-* = 2: the (N-P) by (N-P) part of the upper trapezoidal factor
-* T associated with A in the generalized RQ factorization
-* of the pair (B, A) is singular, so that
-* rank( (A) ) < N; the least squares solution could not
-* ( (B) )
-* be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dggqrf.f b/SRC/dggqrf.f
index ae8b7d0d..4f214ffb 100644
--- a/SRC/dggqrf.f
+++ b/SRC/dggqrf.f
@@ -1,145 +1,203 @@
- SUBROUTINE DGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
- $ LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b DGGQRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGGQRF computes a generalized QR factorization of an N-by-M matrix A
-* and an N-by-P matrix B:
-*
-* A = Q*R, B = Q*T*Z,
-*
-* where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal
-* matrix, and R and T assume one of the forms:
-*
-* if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N,
-* ( 0 ) N-M N M-N
-* M
-*
-* where R11 is upper triangular, and
-*
-* if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P,
-* P-N N ( T21 ) P
-* P
-*
-* where T12 or T21 is upper triangular.
-*
-* In particular, if B is square and nonsingular, the GQR factorization
-* of A and B implicitly gives the QR factorization of inv(B)*A:
-*
-* inv(B)*A = Z**T*(inv(T)*R)
-*
-* where inv(B) denotes the inverse of the matrix B, and Z**T denotes the
-* transpose of the matrix Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGQRF computes a generalized QR factorization of an N-by-M matrix A
+*> and an N-by-P matrix B:
+*>
+*> A = Q*R, B = Q*T*Z,
+*>
+*> where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal
+*> matrix, and R and T assume one of the forms:
+*>
+*> if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N,
+*> ( 0 ) N-M N M-N
+*> M
+*>
+*> where R11 is upper triangular, and
+*>
+*> if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P,
+*> P-N N ( T21 ) P
+*> P
+*>
+*> where T12 or T21 is upper triangular.
+*>
+*> In particular, if B is square and nonsingular, the GQR factorization
+*> of A and B implicitly gives the QR factorization of inv(B)*A:
+*>
+*> inv(B)*A = Z**T*(inv(T)*R)
+*>
+*> where inv(B) denotes the inverse of the matrix B, and Z**T denotes the
+*> transpose of the matrix Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,M)
+*> On entry, the N-by-M matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(N,M)-by-M upper trapezoidal matrix R (R is
+*> upper triangular if N >= M); the elements below the diagonal,
+*> with the array TAUA, represent the orthogonal matrix Q as a
+*> product of min(N,M) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,M)
-* On entry, the N-by-M matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(N,M)-by-M upper trapezoidal matrix R (R is
-* upper triangular if N >= M); the elements below the diagonal,
-* with the array TAUA, represent the orthogonal matrix Q as a
-* product of min(N,M) elementary reflectors (see Further
-* Details).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* TAUA (output) DOUBLE PRECISION array, dimension (min(N,M))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q (see Further Details).
+*> \ingroup doubleOTHERcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,P)
-* On entry, the N-by-P matrix B.
-* On exit, if N <= P, the upper triangle of the subarray
-* B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
-* if N > P, the elements on and above the (N-P)-th subdiagonal
-* contain the N-by-P upper trapezoidal matrix T; the remaining
-* elements, with the array TAUB, represent the orthogonal
-* matrix Z as a product of elementary reflectors (see Further
-* Details).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* TAUB (output) DOUBLE PRECISION array, dimension (min(N,P))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Z (see Further Details).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N,M,P).
-* For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
-* where NB1 is the optimal blocksize for the QR factorization
-* of an N-by-M matrix, NB2 is the optimal blocksize for the
-* RQ factorization of an N-by-P matrix, and NB3 is the optimal
-* blocksize for a call of DORMQR.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* represent the orthogonal matrix Q (see Further Details).
+*>
+*> B (input/output) DOUBLE PRECISION array, dimension (LDB,P)
+*> On entry, the N-by-P matrix B.
+*> On exit, if N <= P, the upper triangle of the subarray
+*> B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
+*> if N > P, the elements on and above the (N-P)-th subdiagonal
+*> contain the N-by-P upper trapezoidal matrix T; the remaining
+*> elements, with the array TAUB, represent the orthogonal
+*> matrix Z as a product of elementary reflectors (see Further
+*> Details).
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*>
+*> TAUB (output) DOUBLE PRECISION array, dimension (min(N,P))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Z (see Further Details).
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N,M,P).
+*> For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
+*> where NB1 is the optimal blocksize for the QR factorization
+*> of an N-by-M matrix, NB2 is the optimal blocksize for the
+*> RQ factorization of an N-by-P matrix, and NB3 is the optimal
+*> blocksize for a call of DORMQR.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(n,m).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taua * v * v**T
+*>
+*> where taua is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*> and taua in TAUA(i).
+*> To form Q explicitly, use LAPACK subroutine DORGQR.
+*> To use Q to update another matrix, use LAPACK subroutine DORMQR.
+*>
+*> The matrix Z is represented as a product of elementary reflectors
+*>
+*> Z = H(1) H(2) . . . H(k), where k = min(n,p).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taub * v * v**T
+*>
+*> where taub is a real scalar, and v is a real vector with
+*> v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
+*> B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
+*> To form Z explicitly, use LAPACK subroutine DORGRQ.
+*> To use Z to update another matrix, use LAPACK subroutine DORMRQ.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
+ $ LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(n,m).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taua * v * v**T
-*
-* where taua is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-* and taua in TAUA(i).
-* To form Q explicitly, use LAPACK subroutine DORGQR.
-* To use Q to update another matrix, use LAPACK subroutine DORMQR.
-*
-* The matrix Z is represented as a product of elementary reflectors
-*
-* Z = H(1) H(2) . . . H(k), where k = min(n,p).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taub * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where taub is a real scalar, and v is a real vector with
-* v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
-* B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
-* To form Z explicitly, use LAPACK subroutine DORGRQ.
-* To use Z to update another matrix, use LAPACK subroutine DORMRQ.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dggrqf.f b/SRC/dggrqf.f
index 0af9a837..67839eb0 100644
--- a/SRC/dggrqf.f
+++ b/SRC/dggrqf.f
@@ -1,144 +1,202 @@
- SUBROUTINE DGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
- $ LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b DGGRQF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGGRQF computes a generalized RQ factorization of an M-by-N matrix A
-* and a P-by-N matrix B:
-*
-* A = R*Q, B = Z*T*Q,
-*
-* where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal
-* matrix, and R and T assume one of the forms:
-*
-* if M <= N, R = ( 0 R12 ) M, or if M > N, R = ( R11 ) M-N,
-* N-M M ( R21 ) N
-* N
-*
-* where R12 or R21 is upper triangular, and
-*
-* if P >= N, T = ( T11 ) N , or if P < N, T = ( T11 T12 ) P,
-* ( 0 ) P-N P N-P
-* N
-*
-* where T11 is upper triangular.
-*
-* In particular, if B is square and nonsingular, the GRQ factorization
-* of A and B implicitly gives the RQ factorization of A*inv(B):
-*
-* A*inv(B) = (R*inv(T))*Z**T
-*
-* where inv(B) denotes the inverse of the matrix B, and Z**T denotes the
-* transpose of the matrix Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGRQF computes a generalized RQ factorization of an M-by-N matrix A
+*> and a P-by-N matrix B:
+*>
+*> A = R*Q, B = Z*T*Q,
+*>
+*> where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal
+*> matrix, and R and T assume one of the forms:
+*>
+*> if M <= N, R = ( 0 R12 ) M, or if M > N, R = ( R11 ) M-N,
+*> N-M M ( R21 ) N
+*> N
+*>
+*> where R12 or R21 is upper triangular, and
+*>
+*> if P >= N, T = ( T11 ) N , or if P < N, T = ( T11 T12 ) P,
+*> ( 0 ) P-N P N-P
+*> N
+*>
+*> where T11 is upper triangular.
+*>
+*> In particular, if B is square and nonsingular, the GRQ factorization
+*> of A and B implicitly gives the RQ factorization of A*inv(B):
+*>
+*> A*inv(B) = (R*inv(T))*Z**T
+*>
+*> where inv(B) denotes the inverse of the matrix B, and Z**T denotes the
+*> transpose of the matrix Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, if M <= N, the upper triangle of the subarray
+*> A(1:M,N-M+1:N) contains the M-by-M upper triangular matrix R;
+*> if M > N, the elements on and above the (M-N)-th subdiagonal
+*> contain the M-by-N upper trapezoidal matrix R; the remaining
+*> elements, with the array TAUA, represent the orthogonal
+*> matrix Q as a product of elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, if M <= N, the upper triangle of the subarray
-* A(1:M,N-M+1:N) contains the M-by-M upper triangular matrix R;
-* if M > N, the elements on and above the (M-N)-th subdiagonal
-* contain the M-by-N upper trapezoidal matrix R; the remaining
-* elements, with the array TAUA, represent the orthogonal
-* matrix Q as a product of elementary reflectors (see Further
-* Details).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAUA (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q (see Further Details).
+*> \ingroup doubleOTHERcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(P,N)-by-N upper trapezoidal matrix T (T is
-* upper triangular if P >= N); the elements below the diagonal,
-* with the array TAUB, represent the orthogonal matrix Z as a
-* product of elementary reflectors (see Further Details).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TAUB (output) DOUBLE PRECISION array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Z (see Further Details).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N,M,P).
-* For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
-* where NB1 is the optimal blocksize for the RQ factorization
-* of an M-by-N matrix, NB2 is the optimal blocksize for the
-* QR factorization of a P-by-N matrix, and NB3 is the optimal
-* blocksize for a call of DORMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INF0= -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* represent the orthogonal matrix Q (see Further Details).
+*>
+*> B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(P,N)-by-N upper trapezoidal matrix T (T is
+*> upper triangular if P >= N); the elements below the diagonal,
+*> with the array TAUB, represent the orthogonal matrix Z as a
+*> product of elementary reflectors (see Further Details).
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*>
+*> TAUB (output) DOUBLE PRECISION array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Z (see Further Details).
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N,M,P).
+*> For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
+*> where NB1 is the optimal blocksize for the RQ factorization
+*> of an M-by-N matrix, NB2 is the optimal blocksize for the
+*> QR factorization of a P-by-N matrix, and NB3 is the optimal
+*> blocksize for a call of DORMRQ.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INF0= -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taua * v * v**T
+*>
+*> where taua is a real scalar, and v is a real vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
+*> A(m-k+i,1:n-k+i-1), and taua in TAUA(i).
+*> To form Q explicitly, use LAPACK subroutine DORGRQ.
+*> To use Q to update another matrix, use LAPACK subroutine DORMRQ.
+*>
+*> The matrix Z is represented as a product of elementary reflectors
+*>
+*> Z = H(1) H(2) . . . H(k), where k = min(p,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taub * v * v**T
+*>
+*> where taub is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:p) is stored on exit in B(i+1:p,i),
+*> and taub in TAUB(i).
+*> To form Z explicitly, use LAPACK subroutine DORGQR.
+*> To use Z to update another matrix, use LAPACK subroutine DORMQR.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
+ $ LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taua * v * v**T
-*
-* where taua is a real scalar, and v is a real vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
-* A(m-k+i,1:n-k+i-1), and taua in TAUA(i).
-* To form Q explicitly, use LAPACK subroutine DORGRQ.
-* To use Q to update another matrix, use LAPACK subroutine DORMRQ.
-*
-* The matrix Z is represented as a product of elementary reflectors
-*
-* Z = H(1) H(2) . . . H(k), where k = min(p,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taub * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where taub is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:p) is stored on exit in B(i+1:p,i),
-* and taub in TAUB(i).
-* To form Z explicitly, use LAPACK subroutine DORGQR.
-* To use Z to update another matrix, use LAPACK subroutine DORMQR.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dggsvd.f b/SRC/dggsvd.f
index e10c85a8..102e610d 100644
--- a/SRC/dggsvd.f
+++ b/SRC/dggsvd.f
@@ -1,11 +1,335 @@
+*> \brief <b> DGGSVD computes the singular value decomposition (SVD) for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
+* LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), Q( LDQ, * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGSVD computes the generalized singular value decomposition (GSVD)
+*> of an M-by-N real matrix A and P-by-N real matrix B:
+*>
+*> U**T*A*Q = D1*( 0 R ), V**T*B*Q = D2*( 0 R )
+*>
+*> where U, V and Q are orthogonal matrices.
+*> Let K+L = the effective numerical rank of the matrix (A**T,B**T)**T,
+*> then R is a K+L-by-K+L nonsingular upper triangular matrix, D1 and
+*> D2 are M-by-(K+L) and P-by-(K+L) "diagonal" matrices and of the
+*> following structures, respectively:
+*>
+*> If M-K-L >= 0,
+*>
+*> K L
+*> D1 = K ( I 0 )
+*> L ( 0 C )
+*> M-K-L ( 0 0 )
+*>
+*> K L
+*> D2 = L ( 0 S )
+*> P-L ( 0 0 )
+*>
+*> N-K-L K L
+*> ( 0 R ) = K ( 0 R11 R12 )
+*> L ( 0 0 R22 )
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
+*> S = diag( BETA(K+1), ... , BETA(K+L) ),
+*> C**2 + S**2 = I.
+*>
+*> R is stored in A(1:K+L,N-K-L+1:N) on exit.
+*>
+*> If M-K-L < 0,
+*>
+*> K M-K K+L-M
+*> D1 = K ( I 0 0 )
+*> M-K ( 0 C 0 )
+*>
+*> K M-K K+L-M
+*> D2 = M-K ( 0 S 0 )
+*> K+L-M ( 0 0 I )
+*> P-L ( 0 0 0 )
+*>
+*> N-K-L K M-K K+L-M
+*> ( 0 R ) = K ( 0 R11 R12 R13 )
+*> M-K ( 0 0 R22 R23 )
+*> K+L-M ( 0 0 0 R33 )
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(M) ),
+*> S = diag( BETA(K+1), ... , BETA(M) ),
+*> C**2 + S**2 = I.
+*>
+*> (R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N), and R33 is stored
+*> ( 0 R22 R23 )
+*> in B(M-K+1:L,N+M-K-L+1:N) on exit.
+*>
+*> The routine computes C, S, R, and optionally the orthogonal
+*> transformation matrices U, V and Q.
+*>
+*> In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
+*> A and B implicitly gives the SVD of A*inv(B):
+*> A*inv(B) = U*(D1*inv(D2))*V**T.
+*> If ( A**T,B**T)**T has orthonormal columns, then the GSVD of A and B is
+*> also equal to the CS decomposition of A and B. Furthermore, the GSVD
+*> can be used to derive the solution of the eigenvalue problem:
+*> A**T*A x = lambda* B**T*B x.
+*> In some literature, the GSVD of A and B is presented in the form
+*> U**T*A*X = ( 0 D1 ), V**T*B*X = ( 0 D2 )
+*> where U and V are orthogonal and X is nonsingular, D1 and D2 are
+*> ``diagonal''. The former GSVD form can be converted to the latter
+*> form by taking the nonsingular matrix X as
+*>
+*> X = Q*( I 0 )
+*> ( 0 inv(R) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': Orthogonal matrix U is computed;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': Orthogonal matrix V is computed;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Orthogonal matrix Q is computed;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> \param[out] L
+*> \verbatim
+*> L is INTEGER
+*> On exit, K and L specify the dimension of the subblocks
+*> described in the Purpose section.
+*> K + L = effective numerical rank of (A**T,B**T)**T.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A contains the triangular matrix R, or part of R.
+*> See Purpose for details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, B contains the triangular matrix R if M-K-L < 0.
+*> See Purpose for details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION array, dimension (N)
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> On exit, ALPHA and BETA contain the generalized singular
+*> value pairs of A and B;
+*> ALPHA(1:K) = 1,
+*> BETA(1:K) = 0,
+*> and if M-K-L >= 0,
+*> ALPHA(K+1:K+L) = C,
+*> BETA(K+1:K+L) = S,
+*> or if M-K-L < 0,
+*> ALPHA(K+1:M)=C, ALPHA(M+1:K+L)=0
+*> BETA(K+1:M) =S, BETA(M+1:K+L) =1
+*> and
+*> ALPHA(K+L+1:N) = 0
+*> BETA(K+L+1:N) = 0
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,M)
+*> If JOBU = 'U', U contains the M-by-M orthogonal matrix U.
+*> If JOBU = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,P)
+*> If JOBV = 'V', V contains the P-by-P orthogonal matrix V.
+*> If JOBV = 'N', V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> If JOBQ = 'Q', Q contains the N-by-N orthogonal matrix Q.
+*> If JOBQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> dimension (max(3*N,M,P)+N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> On exit, IWORK stores the sorting information. More
+*> precisely, the following loop will sort ALPHA
+*> for I = K+1, min(M,K+L)
+*> swap ALPHA(I) and ALPHA(IWORK(I))
+*> endfor
+*> such that ALPHA(1) >= ALPHA(2) >= ... >= ALPHA(N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, the Jacobi-type procedure failed to
+*> converge. For further details, see subroutine DTGSJA.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLA DOUBLE PRECISION
+*> TOLB DOUBLE PRECISION
+*> TOLA and TOLB are the thresholds to determine the effective
+*> rank of (A',B')**T. Generally, they are set to
+*> TOLA = MAX(M,N)*norm(A)*MAZHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MAZHEPS.
+*> The size of TOLA and TOLB may affect the size of backward
+*> errors of the decomposition.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERsing
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 2-96 Based on modifications by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
$ LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
$ IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK sing routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -18,210 +342,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGGSVD computes the generalized singular value decomposition (GSVD)
-* of an M-by-N real matrix A and P-by-N real matrix B:
-*
-* U**T*A*Q = D1*( 0 R ), V**T*B*Q = D2*( 0 R )
-*
-* where U, V and Q are orthogonal matrices.
-* Let K+L = the effective numerical rank of the matrix (A**T,B**T)**T,
-* then R is a K+L-by-K+L nonsingular upper triangular matrix, D1 and
-* D2 are M-by-(K+L) and P-by-(K+L) "diagonal" matrices and of the
-* following structures, respectively:
-*
-* If M-K-L >= 0,
-*
-* K L
-* D1 = K ( I 0 )
-* L ( 0 C )
-* M-K-L ( 0 0 )
-*
-* K L
-* D2 = L ( 0 S )
-* P-L ( 0 0 )
-*
-* N-K-L K L
-* ( 0 R ) = K ( 0 R11 R12 )
-* L ( 0 0 R22 )
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
-* S = diag( BETA(K+1), ... , BETA(K+L) ),
-* C**2 + S**2 = I.
-*
-* R is stored in A(1:K+L,N-K-L+1:N) on exit.
-*
-* If M-K-L < 0,
-*
-* K M-K K+L-M
-* D1 = K ( I 0 0 )
-* M-K ( 0 C 0 )
-*
-* K M-K K+L-M
-* D2 = M-K ( 0 S 0 )
-* K+L-M ( 0 0 I )
-* P-L ( 0 0 0 )
-*
-* N-K-L K M-K K+L-M
-* ( 0 R ) = K ( 0 R11 R12 R13 )
-* M-K ( 0 0 R22 R23 )
-* K+L-M ( 0 0 0 R33 )
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(M) ),
-* S = diag( BETA(K+1), ... , BETA(M) ),
-* C**2 + S**2 = I.
-*
-* (R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N), and R33 is stored
-* ( 0 R22 R23 )
-* in B(M-K+1:L,N+M-K-L+1:N) on exit.
-*
-* The routine computes C, S, R, and optionally the orthogonal
-* transformation matrices U, V and Q.
-*
-* In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
-* A and B implicitly gives the SVD of A*inv(B):
-* A*inv(B) = U*(D1*inv(D2))*V**T.
-* If ( A**T,B**T)**T has orthonormal columns, then the GSVD of A and B is
-* also equal to the CS decomposition of A and B. Furthermore, the GSVD
-* can be used to derive the solution of the eigenvalue problem:
-* A**T*A x = lambda* B**T*B x.
-* In some literature, the GSVD of A and B is presented in the form
-* U**T*A*X = ( 0 D1 ), V**T*B*X = ( 0 D2 )
-* where U and V are orthogonal and X is nonsingular, D1 and D2 are
-* ``diagonal''. The former GSVD form can be converted to the latter
-* form by taking the nonsingular matrix X as
-*
-* X = Q*( I 0 )
-* ( 0 inv(R) ).
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': Orthogonal matrix U is computed;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': Orthogonal matrix V is computed;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Orthogonal matrix Q is computed;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* K (output) INTEGER
-* L (output) INTEGER
-* On exit, K and L specify the dimension of the subblocks
-* described in the Purpose section.
-* K + L = effective numerical rank of (A**T,B**T)**T.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A contains the triangular matrix R, or part of R.
-* See Purpose for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, B contains the triangular matrix R if M-K-L < 0.
-* See Purpose for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* ALPHA (output) DOUBLE PRECISION array, dimension (N)
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, ALPHA and BETA contain the generalized singular
-* value pairs of A and B;
-* ALPHA(1:K) = 1,
-* BETA(1:K) = 0,
-* and if M-K-L >= 0,
-* ALPHA(K+1:K+L) = C,
-* BETA(K+1:K+L) = S,
-* or if M-K-L < 0,
-* ALPHA(K+1:M)=C, ALPHA(M+1:K+L)=0
-* BETA(K+1:M) =S, BETA(M+1:K+L) =1
-* and
-* ALPHA(K+L+1:N) = 0
-* BETA(K+L+1:N) = 0
-*
-* U (output) DOUBLE PRECISION array, dimension (LDU,M)
-* If JOBU = 'U', U contains the M-by-M orthogonal matrix U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (output) DOUBLE PRECISION array, dimension (LDV,P)
-* If JOBV = 'V', V contains the P-by-P orthogonal matrix V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDQ,N)
-* If JOBQ = 'Q', Q contains the N-by-N orthogonal matrix Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* WORK (workspace) DOUBLE PRECISION array,
-* dimension (max(3*N,M,P)+N)
-*
-* IWORK (workspace/output) INTEGER array, dimension (N)
-* On exit, IWORK stores the sorting information. More
-* precisely, the following loop will sort ALPHA
-* for I = K+1, min(M,K+L)
-* swap ALPHA(I) and ALPHA(IWORK(I))
-* endfor
-* such that ALPHA(1) >= ALPHA(2) >= ... >= ALPHA(N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, the Jacobi-type procedure failed to
-* converge. For further details, see subroutine DTGSJA.
-*
-* Internal Parameters
-* ===================
-*
-* TOLA DOUBLE PRECISION
-* TOLB DOUBLE PRECISION
-* TOLA and TOLB are the thresholds to determine the effective
-* rank of (A',B')**T. Generally, they are set to
-* TOLA = MAX(M,N)*norm(A)*MAZHEPS,
-* TOLB = MAX(P,N)*norm(B)*MAZHEPS.
-* The size of TOLA and TOLB may affect the size of backward
-* errors of the decomposition.
-*
-* Further Details
-* ===============
-*
-* 2-96 Based on modifications by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dggsvp.f b/SRC/dggsvp.f
index f8dc923e..ba04325e 100644
--- a/SRC/dggsvp.f
+++ b/SRC/dggsvp.f
@@ -1,11 +1,256 @@
+*> \brief \b DGGSVP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
+* TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
+* IWORK, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
+* DOUBLE PRECISION TOLA, TOLB
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGGSVP computes orthogonal matrices U, V and Q such that
+*>
+*> N-K-L K L
+*> U**T*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;
+*> L ( 0 0 A23 )
+*> M-K-L ( 0 0 0 )
+*>
+*> N-K-L K L
+*> = K ( 0 A12 A13 ) if M-K-L < 0;
+*> M-K ( 0 0 A23 )
+*>
+*> N-K-L K L
+*> V**T*B*Q = L ( 0 0 B13 )
+*> P-L ( 0 0 0 )
+*>
+*> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
+*> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
+*> otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective
+*> numerical rank of the (M+P)-by-N matrix (A**T,B**T)**T.
+*>
+*> This decomposition is the preprocessing step for computing the
+*> Generalized Singular Value Decomposition (GSVD), see subroutine
+*> DGGSVD.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': Orthogonal matrix U is computed;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': Orthogonal matrix V is computed;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Orthogonal matrix Q is computed;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A contains the triangular (or trapezoidal) matrix
+*> described in the Purpose section.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, B contains the triangular matrix described in
+*> the Purpose section.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[in] TOLA
+*> \verbatim
+*> TOLA is DOUBLE PRECISION
+*> \param[in] TOLB
+*> \verbatim
+*> TOLB is DOUBLE PRECISION
+*> TOLA and TOLB are the thresholds to determine the effective
+*> numerical rank of matrix B and a subblock of A. Generally,
+*> they are set to
+*> TOLA = MAX(M,N)*norm(A)*MAZHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MAZHEPS.
+*> The size of TOLA and TOLB may affect the size of backward
+*> errors of the decomposition.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> \param[out] L
+*> \verbatim
+*> L is INTEGER
+*> On exit, K and L specify the dimension of the subblocks
+*> described in Purpose section.
+*> K + L = effective numerical rank of (A**T,B**T)**T.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,M)
+*> If JOBU = 'U', U contains the orthogonal matrix U.
+*> If JOBU = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,P)
+*> If JOBV = 'V', V contains the orthogonal matrix V.
+*> If JOBV = 'N', V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> If JOBQ = 'Q', Q contains the orthogonal matrix Q.
+*> If JOBQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (max(3*N,M,P))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The subroutine uses LAPACK subroutine DGEQPF for the QR factorization
+*> with column pivoting to detect the effective numerical rank of the
+*> a matrix. It may be replaced by a better rank determination strategy.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
$ TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
$ IWORK, TAU, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -18,131 +263,6 @@
$ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGGSVP computes orthogonal matrices U, V and Q such that
-*
-* N-K-L K L
-* U**T*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;
-* L ( 0 0 A23 )
-* M-K-L ( 0 0 0 )
-*
-* N-K-L K L
-* = K ( 0 A12 A13 ) if M-K-L < 0;
-* M-K ( 0 0 A23 )
-*
-* N-K-L K L
-* V**T*B*Q = L ( 0 0 B13 )
-* P-L ( 0 0 0 )
-*
-* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
-* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
-* otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective
-* numerical rank of the (M+P)-by-N matrix (A**T,B**T)**T.
-*
-* This decomposition is the preprocessing step for computing the
-* Generalized Singular Value Decomposition (GSVD), see subroutine
-* DGGSVD.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': Orthogonal matrix U is computed;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': Orthogonal matrix V is computed;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Orthogonal matrix Q is computed;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A contains the triangular (or trapezoidal) matrix
-* described in the Purpose section.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, B contains the triangular matrix described in
-* the Purpose section.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TOLA (input) DOUBLE PRECISION
-* TOLB (input) DOUBLE PRECISION
-* TOLA and TOLB are the thresholds to determine the effective
-* numerical rank of matrix B and a subblock of A. Generally,
-* they are set to
-* TOLA = MAX(M,N)*norm(A)*MAZHEPS,
-* TOLB = MAX(P,N)*norm(B)*MAZHEPS.
-* The size of TOLA and TOLB may affect the size of backward
-* errors of the decomposition.
-*
-* K (output) INTEGER
-* L (output) INTEGER
-* On exit, K and L specify the dimension of the subblocks
-* described in Purpose section.
-* K + L = effective numerical rank of (A**T,B**T)**T.
-*
-* U (output) DOUBLE PRECISION array, dimension (LDU,M)
-* If JOBU = 'U', U contains the orthogonal matrix U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (output) DOUBLE PRECISION array, dimension (LDV,P)
-* If JOBV = 'V', V contains the orthogonal matrix V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDQ,N)
-* If JOBQ = 'Q', Q contains the orthogonal matrix Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (max(3*N,M,P))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-*
-* Further Details
-* ===============
-*
-* The subroutine uses LAPACK subroutine DGEQPF for the QR factorization
-* with column pivoting to detect the effective numerical rank of the
-* a matrix. It may be replaced by a better rank determination strategy.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgsvj0.f b/SRC/dgsvj0.f
index 94c8fadc..55a3f002 100644
--- a/SRC/dgsvj0.f
+++ b/SRC/dgsvj0.f
@@ -1,22 +1,217 @@
- SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
- $ SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*> \brief \b DGSVJ0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
+* SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP
+* DOUBLE PRECISION EPS, SFMIN, TOL
+* CHARACTER*1 JOBV
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), SVA( N ), D( N ), V( LDV, * ),
+* $ WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGSVJ0 is called from DGESVJ as a pre-processor and that is its main
+*> purpose. It applies Jacobi rotations in the same way as DGESVJ does, but
+*> it does not check convergence (stopping criterion). Few tuning
+*> parameters (marked by [TP]) are available for the implementer.
+*>
+*> Further Details
+*> ~~~~~~~~~~~~~~~
+*> DGSVJ0 is used just to enable SGESVJ to call a simplified version of
+*> itself to work on a submatrix of the original matrix.
+*>
+*> Contributors
+*> ~~~~~~~~~~~~
+*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
+*>
+*> Bugs, Examples and Comments
+*> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*> Please report all bugs and send interesting test examples and comments to
+*> drmac@math.hr. Thank you.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> Specifies whether the output from this procedure is used
+*> to compute the matrix V:
+*> = 'V': the product of the Jacobi rotations is accumulated
+*> by postmulyiplying the N-by-N array V.
+*> (See the description of V.)
+*> = 'A': the product of the Jacobi rotations is accumulated
+*> by postmulyiplying the MV-by-N array V.
+*> (See the descriptions of MV and V.)
+*> = 'N': the Jacobi rotations are not accumulated.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, M-by-N matrix A, such that A*diag(D) represents
+*> the input matrix.
+*> On exit,
+*> A_onexit * D_onexit represents the input matrix A*diag(D)
+*> post-multiplied by a sequence of Jacobi rotations, where the
+*> rotation threshold and the total number of sweeps are given in
+*> TOL and NSWEEP, respectively.
+*> (See the descriptions of D, TOL and NSWEEP.)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The array D accumulates the scaling factors from the fast scaled
+*> Jacobi rotations.
+*> On entry, A*diag(D) represents the input matrix.
+*> On exit, A_onexit*diag(D_onexit) represents the input matrix
+*> post-multiplied by a sequence of Jacobi rotations, where the
+*> rotation threshold and the total number of sweeps are given in
+*> TOL and NSWEEP, respectively.
+*> (See the descriptions of A, TOL and NSWEEP.)
+*> \endverbatim
+*>
+*> \param[in,out] SVA
+*> \verbatim
+*> SVA is DOUBLE PRECISION array, dimension (N)
+*> On entry, SVA contains the Euclidean norms of the columns of
+*> the matrix A*diag(D).
+*> On exit, SVA contains the Euclidean norms of the columns of
+*> the matrix onexit*diag(D_onexit).
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> If JOBV .EQ. 'A', then MV rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV = 'N', then MV is not referenced.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,N)
+*> If JOBV .EQ. 'V' then N rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV .EQ. 'A' then MV rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV = 'N', then V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V, LDV >= 1.
+*> If JOBV = 'V', LDV .GE. N.
+*> If JOBV = 'A', LDV .GE. MV.
+*> \endverbatim
+*>
+*> \param[in] EPS
+*> \verbatim
+*> EPS is DOUBLE PRECISION
+*> EPS = DLAMCH('Epsilon')
+*> \endverbatim
+*>
+*> \param[in] SFMIN
+*> \verbatim
+*> SFMIN is DOUBLE PRECISION
+*> SFMIN = DLAMCH('Safe Minimum')
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> TOL is the threshold for Jacobi rotations. For a pair
+*> A(:,p), A(:,q) of pivot columns, the Jacobi rotation is
+*> applied only if DABS(COS(angle(A(:,p),A(:,q)))) .GT. TOL.
+*> \endverbatim
+*>
+*> \param[in] NSWEEP
+*> \verbatim
+*> NSWEEP is INTEGER
+*> NSWEEP is the number of sweeps of Jacobi rotations to be
+*> performed.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> LWORK is the dimension of WORK. LWORK .GE. M.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit.
+*> < 0 : if INFO = -i, then the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- LAPACK routine (version 3.3.1) --
+*> \date November 2011
*
-* -- Contributed by Zlatko Drmac of the University of Zagreb and --
-* -- Kresimir Veselic of the Fernuniversitaet Hagen --
-* -- April 2011 --
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
+ $ SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
*
+* -- LAPACK computational routine (version 1.23, October 23. 2008.) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine is also part of SIGMA (version 1.23, October 23. 2008.)
-* SIGMA is a library of algorithms for highly accurate algorithms for
-* computation of SVD, PSVD, QSVD, (H,K)-SVD, and for solution of the
-* eigenvalue problems Hx = lambda M x, H M x = lambda x with H, M > 0.
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP
DOUBLE PRECISION EPS, SFMIN, TOL
@@ -27,119 +222,6 @@
$ WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* DGSVJ0 is called from DGESVJ as a pre-processor and that is its main
-* purpose. It applies Jacobi rotations in the same way as DGESVJ does, but
-* it does not check convergence (stopping criterion). Few tuning
-* parameters (marked by [TP]) are available for the implementer.
-*
-* Further Details
-* ~~~~~~~~~~~~~~~
-* DGSVJ0 is used just to enable SGESVJ to call a simplified version of
-* itself to work on a submatrix of the original matrix.
-*
-* Contributors
-* ~~~~~~~~~~~~
-* Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-* Bugs, Examples and Comments
-* ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* Please report all bugs and send interesting test examples and comments to
-* drmac@math.hr. Thank you.
-*
-* Arguments
-* =========
-*
-* JOBV (input) CHARACTER*1
-* Specifies whether the output from this procedure is used
-* to compute the matrix V:
-* = 'V': the product of the Jacobi rotations is accumulated
-* by postmulyiplying the N-by-N array V.
-* (See the description of V.)
-* = 'A': the product of the Jacobi rotations is accumulated
-* by postmulyiplying the MV-by-N array V.
-* (See the descriptions of MV and V.)
-* = 'N': the Jacobi rotations are not accumulated.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A.
-* M >= N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, M-by-N matrix A, such that A*diag(D) represents
-* the input matrix.
-* On exit,
-* A_onexit * D_onexit represents the input matrix A*diag(D)
-* post-multiplied by a sequence of Jacobi rotations, where the
-* rotation threshold and the total number of sweeps are given in
-* TOL and NSWEEP, respectively.
-* (See the descriptions of D, TOL and NSWEEP.)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (input/workspace/output) DOUBLE PRECISION array, dimension (N)
-* The array D accumulates the scaling factors from the fast scaled
-* Jacobi rotations.
-* On entry, A*diag(D) represents the input matrix.
-* On exit, A_onexit*diag(D_onexit) represents the input matrix
-* post-multiplied by a sequence of Jacobi rotations, where the
-* rotation threshold and the total number of sweeps are given in
-* TOL and NSWEEP, respectively.
-* (See the descriptions of A, TOL and NSWEEP.)
-*
-* SVA (input/workspace/output) DOUBLE PRECISION array, dimension (N)
-* On entry, SVA contains the Euclidean norms of the columns of
-* the matrix A*diag(D).
-* On exit, SVA contains the Euclidean norms of the columns of
-* the matrix onexit*diag(D_onexit).
-*
-* MV (input) INTEGER
-* If JOBV .EQ. 'A', then MV rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV = 'N', then MV is not referenced.
-*
-* V (input/output) DOUBLE PRECISION array, dimension (LDV,N)
-* If JOBV .EQ. 'V' then N rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV .EQ. 'A' then MV rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV = 'N', then V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V, LDV >= 1.
-* If JOBV = 'V', LDV .GE. N.
-* If JOBV = 'A', LDV .GE. MV.
-*
-* EPS (input) DOUBLE PRECISION
-* EPS = DLAMCH('Epsilon')
-*
-* SFMIN (input) DOUBLE PRECISION
-* SFMIN = DLAMCH('Safe Minimum')
-*
-* TOL (input) DOUBLE PRECISION
-* TOL is the threshold for Jacobi rotations. For a pair
-* A(:,p), A(:,q) of pivot columns, the Jacobi rotation is
-* applied only if DABS(COS(angle(A(:,p),A(:,q)))) .GT. TOL.
-*
-* NSWEEP (input) INTEGER
-* NSWEEP is the number of sweeps of Jacobi rotations to be
-* performed.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* LWORK is the dimension of WORK. LWORK .GE. M.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit.
-* < 0 : if INFO = -i, then the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Parameters ..
diff --git a/SRC/dgsvj1.f b/SRC/dgsvj1.f
index f915b4cc..dc2f0b3b 100644
--- a/SRC/dgsvj1.f
+++ b/SRC/dgsvj1.f
@@ -1,22 +1,237 @@
- SUBROUTINE DGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
- $ EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*> \brief \b DGSVJ1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
+* EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION EPS, SFMIN, TOL
+* INTEGER INFO, LDA, LDV, LWORK, M, MV, N, N1, NSWEEP
+* CHARACTER*1 JOBV
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( N ), SVA( N ), V( LDV, * ),
+* $ WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGSVJ1 is called from SGESVJ as a pre-processor and that is its main
+*> purpose. It applies Jacobi rotations in the same way as SGESVJ does, but
+*> it targets only particular pivots and it does not check convergence
+*> (stopping criterion). Few tunning parameters (marked by [TP]) are
+*> available for the implementer.
+*>
+*> Further Details
+*> ~~~~~~~~~~~~~~~
+*> DGSVJ1 applies few sweeps of Jacobi rotations in the column space of
+*> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
+*> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The
+*> block-entries (tiles) of the (1,2) off-diagonal block are marked by the
+*> [x]'s in the following scheme:
+*>
+*> | * * * [x] [x] [x]|
+*> | * * * [x] [x] [x]| Row-cycling in the nblr-by-nblc [x] blocks.
+*> | * * * [x] [x] [x]| Row-cyclic pivoting inside each [x] block.
+*> |[x] [x] [x] * * * |
+*> |[x] [x] [x] * * * |
+*> |[x] [x] [x] * * * |
+*>
+*> In terms of the columns of A, the first N1 columns are rotated 'against'
+*> the remaining N-N1 columns, trying to increase the angle between the
+*> corresponding subspaces. The off-diagonal block is N1-by(N-N1) and it is
+*> tiled using quadratic tiles of side KBL. Here, KBL is a tunning parmeter.
+*> The number of sweeps is given in NSWEEP and the orthogonality threshold
+*> is given in TOL.
+*>
+*> Contributors
+*> ~~~~~~~~~~~~
+*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> Specifies whether the output from this procedure is used
+*> to compute the matrix V:
+*> = 'V': the product of the Jacobi rotations is accumulated
+*> by postmulyiplying the N-by-N array V.
+*> (See the description of V.)
+*> = 'A': the product of the Jacobi rotations is accumulated
+*> by postmulyiplying the MV-by-N array V.
+*> (See the descriptions of MV and V.)
+*> = 'N': the Jacobi rotations are not accumulated.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> N1 specifies the 2 x 2 block partition, the first N1 columns are
+*> rotated 'against' the remaining N-N1 columns of A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, M-by-N matrix A, such that A*diag(D) represents
+*> the input matrix.
+*> On exit,
+*> A_onexit * D_onexit represents the input matrix A*diag(D)
+*> post-multiplied by a sequence of Jacobi rotations, where the
+*> rotation threshold and the total number of sweeps are given in
+*> TOL and NSWEEP, respectively.
+*> (See the descriptions of N1, D, TOL and NSWEEP.)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The array D accumulates the scaling factors from the fast scaled
+*> Jacobi rotations.
+*> On entry, A*diag(D) represents the input matrix.
+*> On exit, A_onexit*diag(D_onexit) represents the input matrix
+*> post-multiplied by a sequence of Jacobi rotations, where the
+*> rotation threshold and the total number of sweeps are given in
+*> TOL and NSWEEP, respectively.
+*> (See the descriptions of N1, A, TOL and NSWEEP.)
+*> \endverbatim
+*>
+*> \param[in,out] SVA
+*> \verbatim
+*> SVA is DOUBLE PRECISION array, dimension (N)
+*> On entry, SVA contains the Euclidean norms of the columns of
+*> the matrix A*diag(D).
+*> On exit, SVA contains the Euclidean norms of the columns of
+*> the matrix onexit*diag(D_onexit).
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> If JOBV .EQ. 'A', then MV rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV = 'N', then MV is not referenced.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,N)
+*> If JOBV .EQ. 'V' then N rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV .EQ. 'A' then MV rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV = 'N', then V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V, LDV >= 1.
+*> If JOBV = 'V', LDV .GE. N.
+*> If JOBV = 'A', LDV .GE. MV.
+*> \endverbatim
+*>
+*> \param[in] EPS
+*> \verbatim
+*> EPS is DOUBLE PRECISION
+*> EPS = DLAMCH('Epsilon')
+*> \endverbatim
+*>
+*> \param[in] SFMIN
+*> \verbatim
+*> SFMIN is DOUBLE PRECISION
+*> SFMIN = DLAMCH('Safe Minimum')
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> TOL is the threshold for Jacobi rotations. For a pair
+*> A(:,p), A(:,q) of pivot columns, the Jacobi rotation is
+*> applied only if DABS(COS(angle(A(:,p),A(:,q)))) .GT. TOL.
+*> \endverbatim
+*>
+*> \param[in] NSWEEP
+*> \verbatim
+*> NSWEEP is INTEGER
+*> NSWEEP is the number of sweeps of Jacobi rotations to be
+*> performed.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> LWORK is the dimension of WORK. LWORK .GE. M.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit.
+*> < 0 : if INFO = -i, then the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- LAPACK routine (version 3.3.1) --
+*> \date November 2011
*
-* -- Contributed by Zlatko Drmac of the University of Zagreb and --
-* -- Kresimir Veselic of the Fernuniversitaet Hagen --
-* -- April 2011 --
+*> \ingroup doubleOTHERcomputational
*
+* =====================================================================
+ SUBROUTINE DGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
+ $ EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*
+* -- LAPACK computational routine (version 1.23, October 23. 2008.) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine is also part of SIGMA (version 1.23, October 23. 2008.)
-* SIGMA is a library of algorithms for highly accurate algorithms for
-* computation of SVD, PSVD, QSVD, (H,K)-SVD, and for solution of the
-* eigenvalue problems Hx = lambda M x, H M x = lambda x with H, M > 0.
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
DOUBLE PRECISION EPS, SFMIN, TOL
INTEGER INFO, LDA, LDV, LWORK, M, MV, N, N1, NSWEEP
@@ -27,136 +242,6 @@
$ WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* DGSVJ1 is called from SGESVJ as a pre-processor and that is its main
-* purpose. It applies Jacobi rotations in the same way as SGESVJ does, but
-* it targets only particular pivots and it does not check convergence
-* (stopping criterion). Few tunning parameters (marked by [TP]) are
-* available for the implementer.
-*
-* Further Details
-* ~~~~~~~~~~~~~~~
-* DGSVJ1 applies few sweeps of Jacobi rotations in the column space of
-* the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
-* off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The
-* block-entries (tiles) of the (1,2) off-diagonal block are marked by the
-* [x]'s in the following scheme:
-*
-* | * * * [x] [x] [x]|
-* | * * * [x] [x] [x]| Row-cycling in the nblr-by-nblc [x] blocks.
-* | * * * [x] [x] [x]| Row-cyclic pivoting inside each [x] block.
-* |[x] [x] [x] * * * |
-* |[x] [x] [x] * * * |
-* |[x] [x] [x] * * * |
-*
-* In terms of the columns of A, the first N1 columns are rotated 'against'
-* the remaining N-N1 columns, trying to increase the angle between the
-* corresponding subspaces. The off-diagonal block is N1-by(N-N1) and it is
-* tiled using quadratic tiles of side KBL. Here, KBL is a tunning parmeter.
-* The number of sweeps is given in NSWEEP and the orthogonality threshold
-* is given in TOL.
-*
-* Contributors
-* ~~~~~~~~~~~~
-* Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-* Arguments
-* =========
-*
-* JOBV (input) CHARACTER*1
-* Specifies whether the output from this procedure is used
-* to compute the matrix V:
-* = 'V': the product of the Jacobi rotations is accumulated
-* by postmulyiplying the N-by-N array V.
-* (See the description of V.)
-* = 'A': the product of the Jacobi rotations is accumulated
-* by postmulyiplying the MV-by-N array V.
-* (See the descriptions of MV and V.)
-* = 'N': the Jacobi rotations are not accumulated.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A.
-* M >= N >= 0.
-*
-* N1 (input) INTEGER
-* N1 specifies the 2 x 2 block partition, the first N1 columns are
-* rotated 'against' the remaining N-N1 columns of A.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, M-by-N matrix A, such that A*diag(D) represents
-* the input matrix.
-* On exit,
-* A_onexit * D_onexit represents the input matrix A*diag(D)
-* post-multiplied by a sequence of Jacobi rotations, where the
-* rotation threshold and the total number of sweeps are given in
-* TOL and NSWEEP, respectively.
-* (See the descriptions of N1, D, TOL and NSWEEP.)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (input/workspace/output) DOUBLE PRECISION array, dimension (N)
-* The array D accumulates the scaling factors from the fast scaled
-* Jacobi rotations.
-* On entry, A*diag(D) represents the input matrix.
-* On exit, A_onexit*diag(D_onexit) represents the input matrix
-* post-multiplied by a sequence of Jacobi rotations, where the
-* rotation threshold and the total number of sweeps are given in
-* TOL and NSWEEP, respectively.
-* (See the descriptions of N1, A, TOL and NSWEEP.)
-*
-* SVA (input/workspace/output) DOUBLE PRECISION array, dimension (N)
-* On entry, SVA contains the Euclidean norms of the columns of
-* the matrix A*diag(D).
-* On exit, SVA contains the Euclidean norms of the columns of
-* the matrix onexit*diag(D_onexit).
-*
-* MV (input) INTEGER
-* If JOBV .EQ. 'A', then MV rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV = 'N', then MV is not referenced.
-*
-* V (input/output) DOUBLE PRECISION array, dimension (LDV,N)
-* If JOBV .EQ. 'V' then N rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV .EQ. 'A' then MV rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV = 'N', then V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V, LDV >= 1.
-* If JOBV = 'V', LDV .GE. N.
-* If JOBV = 'A', LDV .GE. MV.
-*
-* EPS (input) DOUBLE PRECISION
-* EPS = DLAMCH('Epsilon')
-*
-* SFMIN (input) DOUBLE PRECISION
-* SFMIN = DLAMCH('Safe Minimum')
-*
-* TOL (input) DOUBLE PRECISION
-* TOL is the threshold for Jacobi rotations. For a pair
-* A(:,p), A(:,q) of pivot columns, the Jacobi rotation is
-* applied only if DABS(COS(angle(A(:,p),A(:,q)))) .GT. TOL.
-*
-* NSWEEP (input) INTEGER
-* NSWEEP is the number of sweeps of Jacobi rotations to be
-* performed.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* LWORK is the dimension of WORK. LWORK .GE. M.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit.
-* < 0 : if INFO = -i, then the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Parameters ..
diff --git a/SRC/dgtcon.f b/SRC/dgtcon.f
index b84d7009..4beb11ca 100644
--- a/SRC/dgtcon.f
+++ b/SRC/dgtcon.f
@@ -1,12 +1,147 @@
+*> \brief \b DGTCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTCON estimates the reciprocal of the condition number of a real
+*> tridiagonal matrix A using the LU factorization as computed by
+*> DGTTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A as computed by DGTTRF.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is DOUBLE PRECISION array, dimension (N-2)
+*> The (n-2) elements of the second superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,65 +153,6 @@
DOUBLE PRECISION D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGTCON estimates the reciprocal of the condition number of a real
-* tridiagonal matrix A using the LU factorization as computed by
-* DGTTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A as computed by DGTTRF.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input) DOUBLE PRECISION array, dimension (N-2)
-* The (n-2) elements of the second superdiagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* ANORM (input) DOUBLE PRECISION
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgtrfs.f b/SRC/dgtrfs.f
index 2bd9d217..a3180380 100644
--- a/SRC/dgtrfs.f
+++ b/SRC/dgtrfs.f
@@ -1,13 +1,210 @@
+*> \brief \b DGTRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
+* IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), DF( * ),
+* $ DL( * ), DLF( * ), DU( * ), DU2( * ), DUF( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is tridiagonal, and provides
+*> error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DLF
+*> \verbatim
+*> DLF is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A as computed by DGTTRF.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DUF
+*> \verbatim
+*> DUF is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is DOUBLE PRECISION array, dimension (N-2)
+*> The (n-2) elements of the second superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGTTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
$ IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -20,99 +217,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGTRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is tridiagonal, and provides
-* error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of A.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) superdiagonal elements of A.
-*
-* DLF (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A as computed by DGTTRF.
-*
-* DF (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DUF (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input) DOUBLE PRECISION array, dimension (N-2)
-* The (n-2) elements of the second superdiagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGTTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgtsv.f b/SRC/dgtsv.f
index e1bf1920..9d510113 100644
--- a/SRC/dgtsv.f
+++ b/SRC/dgtsv.f
@@ -1,73 +1,138 @@
- SUBROUTINE DGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*> \brief \b DGTSV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * )
+* ..
+*
* Purpose
* =======
*
-* DGTSV solves the equation
-*
-* A*X = B,
-*
-* where A is an n by n tridiagonal matrix, by Gaussian elimination with
-* partial pivoting.
-*
-* Note that the equation A**T*X = B may be solved by interchanging the
-* order of the arguments DU and DL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTSV solves the equation
+*>
+*> A*X = B,
+*>
+*> where A is an n by n tridiagonal matrix, by Gaussian elimination with
+*> partial pivoting.
+*>
+*> Note that the equation A**T*X = B may be solved by interchanging the
+*> order of the arguments DU and DL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, DL must contain the (n-1) sub-diagonal elements of
-* A.
-*
-* On exit, DL is overwritten by the (n-2) elements of the
-* second super-diagonal of the upper triangular matrix U from
-* the LU factorization of A, in DL(1), ..., DL(n-2).
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, D must contain the diagonal elements of A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, DL must contain the (n-1) sub-diagonal elements of
+*> A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DL is overwritten by the (n-2) elements of the
+*> second super-diagonal of the upper triangular matrix U from
+*> the LU factorization of A, in DL(1), ..., DL(n-2).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, D must contain the diagonal elements of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, D is overwritten by the n diagonal elements of U.
+*> \endverbatim
+*>
+*> \param[in,out] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, DU must contain the (n-1) super-diagonal elements
+*> of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DU is overwritten by the (n-1) elements of the first
+*> super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix of right hand side matrix B.
+*> On exit, if INFO = 0, the N by NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero, and the solution
+*> has not been computed. The factorization has not been
+*> completed unless i = N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, D is overwritten by the n diagonal elements of U.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, DU must contain the (n-1) super-diagonal elements
-* of A.
+*> \date November 2011
*
-* On exit, DU is overwritten by the (n-1) elements of the first
-* super-diagonal of U.
+*> \ingroup doubleOTHERcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix of right hand side matrix B.
-* On exit, if INFO = 0, the N by NRHS solution matrix X.
+* =====================================================================
+ SUBROUTINE DGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero, and the solution
-* has not been computed. The factorization has not been
-* completed unless i = N.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgtsvx.f b/SRC/dgtsvx.f
index 77879ebf..ea5eed71 100644
--- a/SRC/dgtsvx.f
+++ b/SRC/dgtsvx.f
@@ -1,11 +1,296 @@
+*> \brief \b DGTSVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
+* DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, TRANS
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), DF( * ),
+* $ DL( * ), DLF( * ), DU( * ), DU2( * ), DUF( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTSVX uses the LU factorization to compute the solution to a real
+*> system of linear equations A * X = B or A**T * X = B,
+*> where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
+*> as A = L * U, where L is a product of permutation and unit lower
+*> bidiagonal matrices and U is upper triangular with nonzeros in
+*> only the main diagonal and first two superdiagonals.
+*>
+*> 2. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': DLF, DF, DUF, DU2, and IPIV contain the factored
+*> form of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV
+*> will not be modified.
+*> = 'N': The matrix will be copied to DLF, DF, and DUF
+*> and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in,out] DLF
+*> \verbatim
+*> DLF is or output) DOUBLE PRECISION array, dimension (N-1)
+*> If FACT = 'F', then DLF is an input argument and on entry
+*> contains the (n-1) multipliers that define the matrix L from
+*> the LU factorization of A as computed by DGTTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DLF is an output argument and on exit
+*> contains the (n-1) multipliers that define the matrix L from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DF
+*> \verbatim
+*> DF is or output) DOUBLE PRECISION array, dimension (N)
+*> If FACT = 'F', then DF is an input argument and on entry
+*> contains the n diagonal elements of the upper triangular
+*> matrix U from the LU factorization of A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DF is an output argument and on exit
+*> contains the n diagonal elements of the upper triangular
+*> matrix U from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DUF
+*> \verbatim
+*> DUF is or output) DOUBLE PRECISION array, dimension (N-1)
+*> If FACT = 'F', then DUF is an input argument and on entry
+*> contains the (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DUF is an output argument and on exit
+*> contains the (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in,out] DU2
+*> \verbatim
+*> DU2 is or output) DOUBLE PRECISION array, dimension (N-2)
+*> If FACT = 'F', then DU2 is an input argument and on entry
+*> contains the (n-2) elements of the second superdiagonal of
+*> U.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DU2 is an output argument and on exit
+*> contains the (n-2) elements of the second superdiagonal of
+*> U.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the LU factorization of A as
+*> computed by DGTTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the LU factorization of A;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
+*> a row interchange was not required.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization
+*> has not been completed unless i = N, but the
+*> factor U is exactly singular, so the solution
+*> and error bounds could not be computed.
+*> RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
$ DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, TRANS
@@ -19,175 +304,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGTSVX uses the LU factorization to compute the solution to a real
-* system of linear equations A * X = B or A**T * X = B,
-* where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
-* as A = L * U, where L is a product of permutation and unit lower
-* bidiagonal matrices and U is upper triangular with nonzeros in
-* only the main diagonal and first two superdiagonals.
-*
-* 2. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': DLF, DF, DUF, DU2, and IPIV contain the factored
-* form of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV
-* will not be modified.
-* = 'N': The matrix will be copied to DLF, DF, and DUF
-* and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of A.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of A.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) superdiagonal elements of A.
-*
-* DLF (input or output) DOUBLE PRECISION array, dimension (N-1)
-* If FACT = 'F', then DLF is an input argument and on entry
-* contains the (n-1) multipliers that define the matrix L from
-* the LU factorization of A as computed by DGTTRF.
-*
-* If FACT = 'N', then DLF is an output argument and on exit
-* contains the (n-1) multipliers that define the matrix L from
-* the LU factorization of A.
-*
-* DF (input or output) DOUBLE PRECISION array, dimension (N)
-* If FACT = 'F', then DF is an input argument and on entry
-* contains the n diagonal elements of the upper triangular
-* matrix U from the LU factorization of A.
-*
-* If FACT = 'N', then DF is an output argument and on exit
-* contains the n diagonal elements of the upper triangular
-* matrix U from the LU factorization of A.
-*
-* DUF (input or output) DOUBLE PRECISION array, dimension (N-1)
-* If FACT = 'F', then DUF is an input argument and on entry
-* contains the (n-1) elements of the first superdiagonal of U.
-*
-* If FACT = 'N', then DUF is an output argument and on exit
-* contains the (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input or output) DOUBLE PRECISION array, dimension (N-2)
-* If FACT = 'F', then DU2 is an input argument and on entry
-* contains the (n-2) elements of the second superdiagonal of
-* U.
-*
-* If FACT = 'N', then DU2 is an output argument and on exit
-* contains the (n-2) elements of the second superdiagonal of
-* U.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the LU factorization of A as
-* computed by DGTTRF.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the LU factorization of A;
-* row i of the matrix was interchanged with row IPIV(i).
-* IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
-* a row interchange was not required.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization
-* has not been completed unless i = N, but the
-* factor U is exactly singular, so the solution
-* and error bounds could not be computed.
-* RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dgttrf.f b/SRC/dgttrf.f
index d12df005..d2dee1ce 100644
--- a/SRC/dgttrf.f
+++ b/SRC/dgttrf.f
@@ -1,73 +1,136 @@
- SUBROUTINE DGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION D( * ), DL( * ), DU( * ), DU2( * )
-* ..
-*
+*> \brief \b DGTTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
* Purpose
* =======
*
-* DGTTRF computes an LU factorization of a real tridiagonal matrix A
-* using elimination with partial pivoting and row interchanges.
-*
-* The factorization has the form
-* A = L * U
-* where L is a product of permutation and unit lower bidiagonal
-* matrices and U is upper triangular with nonzeros in only the main
-* diagonal and first two superdiagonals.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTTRF computes an LU factorization of a real tridiagonal matrix A
+*> using elimination with partial pivoting and row interchanges.
+*>
+*> The factorization has the form
+*> A = L * U
+*> where L is a product of permutation and unit lower bidiagonal
+*> matrices and U is upper triangular with nonzeros in only the main
+*> diagonal and first two superdiagonals.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* DL (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, DL must contain the (n-1) sub-diagonal elements of
-* A.
-*
-* On exit, DL is overwritten by the (n-1) multipliers that
-* define the matrix L from the LU factorization of A.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, D must contain the diagonal elements of A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, DL must contain the (n-1) sub-diagonal elements of
+*> A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DL is overwritten by the (n-1) multipliers that
+*> define the matrix L from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, D must contain the diagonal elements of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, D is overwritten by the n diagonal elements of the
+*> upper triangular matrix U from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, DU must contain the (n-1) super-diagonal elements
+*> of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DU is overwritten by the (n-1) elements of the first
+*> super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[out] DU2
+*> \verbatim
+*> DU2 is DOUBLE PRECISION array, dimension (N-2)
+*> On exit, DU2 is overwritten by the (n-2) elements of the
+*> second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, D is overwritten by the n diagonal elements of the
-* upper triangular matrix U from the LU factorization of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, DU must contain the (n-1) super-diagonal elements
-* of A.
+*> \date November 2011
*
-* On exit, DU is overwritten by the (n-1) elements of the first
-* super-diagonal of U.
+*> \ingroup doubleOTHERcomputational
*
-* DU2 (output) DOUBLE PRECISION array, dimension (N-2)
-* On exit, DU2 is overwritten by the (n-2) elements of the
-* second super-diagonal of U.
+* =====================================================================
+ SUBROUTINE DGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION D( * ), DL( * ), DU( * ), DU2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dgttrs.f b/SRC/dgttrs.f
index 2373fb4a..f186703b 100644
--- a/SRC/dgttrs.f
+++ b/SRC/dgttrs.f
@@ -1,10 +1,139 @@
+*> \brief \b DGTTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTTRS solves one of the systems of equations
+*> A*X = B or A**T*X = B,
+*> with a tridiagonal matrix A using the LU factorization computed
+*> by DGTTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T* X = B (Transpose)
+*> = 'C': A**T* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is DOUBLE PRECISION array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the matrix of right hand side vectors B.
+*> On exit, B is overwritten by the solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,61 +144,6 @@
DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
* ..
*
-* Purpose
-* =======
-*
-* DGTTRS solves one of the systems of equations
-* A*X = B or A**T*X = B,
-* with a tridiagonal matrix A using the LU factorization computed
-* by DGTTRF.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T* X = B (Transpose)
-* = 'C': A**T* X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
-*
-* DU2 (input) DOUBLE PRECISION array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the matrix of right hand side vectors B.
-* On exit, B is overwritten by the solution vectors X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dgtts2.f b/SRC/dgtts2.f
index 98a13c17..5ecf75ba 100644
--- a/SRC/dgtts2.f
+++ b/SRC/dgtts2.f
@@ -1,68 +1,137 @@
- SUBROUTINE DGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER ITRANS, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
-* ..
-*
+*> \brief \b DGTTS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER ITRANS, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
* Purpose
* =======
*
-* DGTTS2 solves one of the systems of equations
-* A*X = B or A**T*X = B,
-* with a tridiagonal matrix A using the LU factorization computed
-* by DGTTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTTS2 solves one of the systems of equations
+*> A*X = B or A**T*X = B,
+*> with a tridiagonal matrix A using the LU factorization computed
+*> by DGTTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITRANS (input) INTEGER
-* Specifies the form of the system of equations.
-* = 0: A * X = B (No transpose)
-* = 1: A**T* X = B (Transpose)
-* = 2: A**T* X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
+*> \param[in] ITRANS
+*> \verbatim
+*> ITRANS is INTEGER
+*> Specifies the form of the system of equations.
+*> = 0: A * X = B (No transpose)
+*> = 1: A**T* X = B (Transpose)
+*> = 2: A**T* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is DOUBLE PRECISION array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the matrix of right hand side vectors B.
+*> On exit, B is overwritten by the solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
+*> \date November 2011
*
-* DU2 (input) DOUBLE PRECISION array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
+*> \ingroup doubleOTHERauxiliary
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
+* =====================================================================
+ SUBROUTINE DGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the matrix of right hand side vectors B.
-* On exit, B is overwritten by the solution vectors X.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER ITRANS, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dhgeqz.f b/SRC/dhgeqz.f
index be409c56..c2a21cc3 100644
--- a/SRC/dhgeqz.f
+++ b/SRC/dhgeqz.f
@@ -1,11 +1,308 @@
+*> \brief \b DHGEQZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
+* ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, COMPZ, JOB
+* INTEGER IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION ALPHAI( * ), ALPHAR( * ), BETA( * ),
+* $ H( LDH, * ), Q( LDQ, * ), T( LDT, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DHGEQZ computes the eigenvalues of a real matrix pair (H,T),
+*> where H is an upper Hessenberg matrix and T is upper triangular,
+*> using the double-shift QZ method.
+*> Matrix pairs of this type are produced by the reduction to
+*> generalized upper Hessenberg form of a real matrix pair (A,B):
+*>
+*> A = Q1*H*Z1**T, B = Q1*T*Z1**T,
+*>
+*> as computed by DGGHRD.
+*>
+*> If JOB='S', then the Hessenberg-triangular pair (H,T) is
+*> also reduced to generalized Schur form,
+*>
+*> H = Q*S*Z**T, T = Q*P*Z**T,
+*>
+*> where Q and Z are orthogonal matrices, P is an upper triangular
+*> matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2
+*> diagonal blocks.
+*>
+*> The 1-by-1 blocks correspond to real eigenvalues of the matrix pair
+*> (H,T) and the 2-by-2 blocks correspond to complex conjugate pairs of
+*> eigenvalues.
+*>
+*> Additionally, the 2-by-2 upper triangular diagonal blocks of P
+*> corresponding to 2-by-2 blocks of S are reduced to positive diagonal
+*> form, i.e., if S(j+1,j) is non-zero, then P(j+1,j) = P(j,j+1) = 0,
+*> P(j,j) > 0, and P(j+1,j+1) > 0.
+*>
+*> Optionally, the orthogonal matrix Q from the generalized Schur
+*> factorization may be postmultiplied into an input matrix Q1, and the
+*> orthogonal matrix Z may be postmultiplied into an input matrix Z1.
+*> If Q1 and Z1 are the orthogonal matrices from DGGHRD that reduced
+*> the matrix pair (A,B) to generalized upper Hessenberg form, then the
+*> output matrices Q1*Q and Z1*Z are the orthogonal factors from the
+*> generalized Schur factorization of (A,B):
+*>
+*> A = (Q1*Q)*S*(Z1*Z)**T, B = (Q1*Q)*P*(Z1*Z)**T.
+*>
+*> To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently,
+*> of (A,B)) are computed as a pair of values (alpha,beta), where alpha is
+*> complex and beta real.
+*> If beta is nonzero, lambda = alpha / beta is an eigenvalue of the
+*> generalized nonsymmetric eigenvalue problem (GNEP)
+*> A*x = lambda*B*x
+*> and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
+*> alternate form of the GNEP
+*> mu*A*y = B*y.
+*> Real eigenvalues can be read directly from the generalized Schur
+*> form:
+*> alpha = S(i,i), beta = P(i,i).
+*>
+*> Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
+*> Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
+*> pp. 241--256.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> = 'E': Compute eigenvalues only;
+*> = 'S': Compute eigenvalues and the Schur form.
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'N': Left Schur vectors (Q) are not computed;
+*> = 'I': Q is initialized to the unit matrix and the matrix Q
+*> of left Schur vectors of (H,T) is returned;
+*> = 'V': Q must contain an orthogonal matrix Q1 on entry and
+*> the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Right Schur vectors (Z) are not computed;
+*> = 'I': Z is initialized to the unit matrix and the matrix Z
+*> of right Schur vectors of (H,T) is returned;
+*> = 'V': Z must contain an orthogonal matrix Z1 on entry and
+*> the product Z1*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices H, T, Q, and Z. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI mark the rows and columns of H which are in
+*> Hessenberg form. It is assumed that A is already upper
+*> triangular in rows and columns 1:ILO-1 and IHI+1:N.
+*> If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH, N)
+*> On entry, the N-by-N upper Hessenberg matrix H.
+*> On exit, if JOB = 'S', H contains the upper quasi-triangular
+*> matrix S from the generalized Schur factorization.
+*> If JOB = 'E', the diagonal blocks of H match those of S, but
+*> the rest of H is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT, N)
+*> On entry, the N-by-N upper triangular matrix T.
+*> On exit, if JOB = 'S', T contains the upper triangular
+*> matrix P from the generalized Schur factorization;
+*> 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks of S
+*> are reduced to positive diagonal form, i.e., if H(j+1,j) is
+*> non-zero, then T(j+1,j) = T(j,j+1) = 0, T(j,j) > 0, and
+*> T(j+1,j+1) > 0.
+*> If JOB = 'E', the diagonal blocks of T match those of P, but
+*> the rest of T is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> The real parts of each scalar alpha defining an eigenvalue
+*> of GNEP.
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> The imaginary parts of each scalar alpha defining an
+*> eigenvalue of GNEP.
+*> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
+*> positive, then the j-th and (j+1)-st eigenvalues are a
+*> complex conjugate pair, with ALPHAI(j+1) = -ALPHAI(j).
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> The scalars beta that define the eigenvalues of GNEP.
+*> Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
+*> beta = BETA(j) represent the j-th eigenvalue of the matrix
+*> pair (A,B), in one of the forms lambda = alpha/beta or
+*> mu = beta/alpha. Since either lambda or mu may overflow,
+*> they should not, in general, be computed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, N)
+*> On entry, if COMPZ = 'V', the orthogonal matrix Q1 used in
+*> the reduction of (A,B) to generalized Hessenberg form.
+*> On exit, if COMPZ = 'I', the orthogonal matrix of left Schur
+*> vectors of (H,T), and if COMPZ = 'V', the orthogonal matrix
+*> of left Schur vectors of (A,B).
+*> Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If COMPQ='V' or 'I', then LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the orthogonal matrix Z1 used in
+*> the reduction of (A,B) to generalized Hessenberg form.
+*> On exit, if COMPZ = 'I', the orthogonal matrix of
+*> right Schur vectors of (H,T), and if COMPZ = 'V', the
+*> orthogonal matrix of right Schur vectors of (A,B).
+*> Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If COMPZ='V' or 'I', then LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1,...,N: the QZ iteration did not converge. (H,T) is not
+*> in Schur form, but ALPHAR(i), ALPHAI(i), and
+*> BETA(i), i=INFO+1,...,N should be correct.
+*> = N+1,...,2*N: the shift calculation failed. (H,T) is not
+*> in Schur form, but ALPHAR(i), ALPHAI(i), and
+*> BETA(i), i=INFO-N+1,...,N should be correct.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Iteration counters:
+*>
+*> JITER -- counts iterations.
+*> IITER -- counts iterations run since ILAST was last
+*> changed. This is therefore reset only when a 1-by-1 or
+*> 2-by-2 block deflates off the bottom.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
$ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK,
$ LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, COMPZ, JOB
@@ -17,194 +314,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DHGEQZ computes the eigenvalues of a real matrix pair (H,T),
-* where H is an upper Hessenberg matrix and T is upper triangular,
-* using the double-shift QZ method.
-* Matrix pairs of this type are produced by the reduction to
-* generalized upper Hessenberg form of a real matrix pair (A,B):
-*
-* A = Q1*H*Z1**T, B = Q1*T*Z1**T,
-*
-* as computed by DGGHRD.
-*
-* If JOB='S', then the Hessenberg-triangular pair (H,T) is
-* also reduced to generalized Schur form,
-*
-* H = Q*S*Z**T, T = Q*P*Z**T,
-*
-* where Q and Z are orthogonal matrices, P is an upper triangular
-* matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2
-* diagonal blocks.
-*
-* The 1-by-1 blocks correspond to real eigenvalues of the matrix pair
-* (H,T) and the 2-by-2 blocks correspond to complex conjugate pairs of
-* eigenvalues.
-*
-* Additionally, the 2-by-2 upper triangular diagonal blocks of P
-* corresponding to 2-by-2 blocks of S are reduced to positive diagonal
-* form, i.e., if S(j+1,j) is non-zero, then P(j+1,j) = P(j,j+1) = 0,
-* P(j,j) > 0, and P(j+1,j+1) > 0.
-*
-* Optionally, the orthogonal matrix Q from the generalized Schur
-* factorization may be postmultiplied into an input matrix Q1, and the
-* orthogonal matrix Z may be postmultiplied into an input matrix Z1.
-* If Q1 and Z1 are the orthogonal matrices from DGGHRD that reduced
-* the matrix pair (A,B) to generalized upper Hessenberg form, then the
-* output matrices Q1*Q and Z1*Z are the orthogonal factors from the
-* generalized Schur factorization of (A,B):
-*
-* A = (Q1*Q)*S*(Z1*Z)**T, B = (Q1*Q)*P*(Z1*Z)**T.
-*
-* To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently,
-* of (A,B)) are computed as a pair of values (alpha,beta), where alpha is
-* complex and beta real.
-* If beta is nonzero, lambda = alpha / beta is an eigenvalue of the
-* generalized nonsymmetric eigenvalue problem (GNEP)
-* A*x = lambda*B*x
-* and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
-* alternate form of the GNEP
-* mu*A*y = B*y.
-* Real eigenvalues can be read directly from the generalized Schur
-* form:
-* alpha = S(i,i), beta = P(i,i).
-*
-* Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
-* Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
-* pp. 241--256.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* = 'E': Compute eigenvalues only;
-* = 'S': Compute eigenvalues and the Schur form.
-*
-* COMPQ (input) CHARACTER*1
-* = 'N': Left Schur vectors (Q) are not computed;
-* = 'I': Q is initialized to the unit matrix and the matrix Q
-* of left Schur vectors of (H,T) is returned;
-* = 'V': Q must contain an orthogonal matrix Q1 on entry and
-* the product Q1*Q is returned.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Right Schur vectors (Z) are not computed;
-* = 'I': Z is initialized to the unit matrix and the matrix Z
-* of right Schur vectors of (H,T) is returned;
-* = 'V': Z must contain an orthogonal matrix Z1 on entry and
-* the product Z1*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrices H, T, Q, and Z. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* ILO and IHI mark the rows and columns of H which are in
-* Hessenberg form. It is assumed that A is already upper
-* triangular in rows and columns 1:ILO-1 and IHI+1:N.
-* If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
-*
-* H (input/output) DOUBLE PRECISION array, dimension (LDH, N)
-* On entry, the N-by-N upper Hessenberg matrix H.
-* On exit, if JOB = 'S', H contains the upper quasi-triangular
-* matrix S from the generalized Schur factorization.
-* If JOB = 'E', the diagonal blocks of H match those of S, but
-* the rest of H is unspecified.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max( 1, N ).
-*
-* T (input/output) DOUBLE PRECISION array, dimension (LDT, N)
-* On entry, the N-by-N upper triangular matrix T.
-* On exit, if JOB = 'S', T contains the upper triangular
-* matrix P from the generalized Schur factorization;
-* 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks of S
-* are reduced to positive diagonal form, i.e., if H(j+1,j) is
-* non-zero, then T(j+1,j) = T(j,j+1) = 0, T(j,j) > 0, and
-* T(j+1,j+1) > 0.
-* If JOB = 'E', the diagonal blocks of T match those of P, but
-* the rest of T is unspecified.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max( 1, N ).
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (N)
-* The real parts of each scalar alpha defining an eigenvalue
-* of GNEP.
-*
-* ALPHAI (output) DOUBLE PRECISION array, dimension (N)
-* The imaginary parts of each scalar alpha defining an
-* eigenvalue of GNEP.
-* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
-* positive, then the j-th and (j+1)-st eigenvalues are a
-* complex conjugate pair, with ALPHAI(j+1) = -ALPHAI(j).
-*
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* The scalars beta that define the eigenvalues of GNEP.
-* Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
-* beta = BETA(j) represent the j-th eigenvalue of the matrix
-* pair (A,B), in one of the forms lambda = alpha/beta or
-* mu = beta/alpha. Since either lambda or mu may overflow,
-* they should not, in general, be computed.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ, N)
-* On entry, if COMPZ = 'V', the orthogonal matrix Q1 used in
-* the reduction of (A,B) to generalized Hessenberg form.
-* On exit, if COMPZ = 'I', the orthogonal matrix of left Schur
-* vectors of (H,T), and if COMPZ = 'V', the orthogonal matrix
-* of left Schur vectors of (A,B).
-* Not referenced if COMPZ = 'N'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If COMPQ='V' or 'I', then LDQ >= N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the orthogonal matrix Z1 used in
-* the reduction of (A,B) to generalized Hessenberg form.
-* On exit, if COMPZ = 'I', the orthogonal matrix of
-* right Schur vectors of (H,T), and if COMPZ = 'V', the
-* orthogonal matrix of right Schur vectors of (A,B).
-* Not referenced if COMPZ = 'N'.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If COMPZ='V' or 'I', then LDZ >= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1,...,N: the QZ iteration did not converge. (H,T) is not
-* in Schur form, but ALPHAR(i), ALPHAI(i), and
-* BETA(i), i=INFO+1,...,N should be correct.
-* = N+1,...,2*N: the shift calculation failed. (H,T) is not
-* in Schur form, but ALPHAR(i), ALPHAI(i), and
-* BETA(i), i=INFO-N+1,...,N should be correct.
-*
-* Further Details
-* ===============
-*
-* Iteration counters:
-*
-* JITER -- counts iterations.
-* IITER -- counts iterations run since ILAST was last
-* changed. This is therefore reset only when a 1-by-1 or
-* 2-by-2 block deflates off the bottom.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dhsein.f b/SRC/dhsein.f
index 77ba88ce..2e20113b 100644
--- a/SRC/dhsein.f
+++ b/SRC/dhsein.f
@@ -1,11 +1,263 @@
+*> \brief \b DHSEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, WR, WI,
+* VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL,
+* IFAILR, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EIGSRC, INITV, SIDE
+* INTEGER INFO, LDH, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IFAILL( * ), IFAILR( * )
+* DOUBLE PRECISION H( LDH, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WI( * ), WORK( * ), WR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DHSEIN uses inverse iteration to find specified right and/or left
+*> eigenvectors of a real upper Hessenberg matrix H.
+*>
+*> The right eigenvector x and the left eigenvector y of the matrix H
+*> corresponding to an eigenvalue w are defined by:
+*>
+*> H * x = w * x, y**h * H = w * y**h
+*>
+*> where y**h denotes the conjugate transpose of the vector y.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] EIGSRC
+*> \verbatim
+*> EIGSRC is CHARACTER*1
+*> Specifies the source of eigenvalues supplied in (WR,WI):
+*> = 'Q': the eigenvalues were found using DHSEQR; thus, if
+*> H has zero subdiagonal elements, and so is
+*> block-triangular, then the j-th eigenvalue can be
+*> assumed to be an eigenvalue of the block containing
+*> the j-th row/column. This property allows DHSEIN to
+*> perform inverse iteration on just one diagonal block.
+*> = 'N': no assumptions are made on the correspondence
+*> between eigenvalues and diagonal blocks. In this
+*> case, DHSEIN must always perform inverse iteration
+*> using the whole matrix H.
+*> \endverbatim
+*>
+*> \param[in] INITV
+*> \verbatim
+*> INITV is CHARACTER*1
+*> = 'N': no initial vectors are supplied;
+*> = 'U': user-supplied initial vectors are stored in the arrays
+*> VL and/or VR.
+*> \endverbatim
+*>
+*> \param[in,out] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> Specifies the eigenvectors to be computed. To select the
+*> real eigenvector corresponding to a real eigenvalue WR(j),
+*> SELECT(j) must be set to .TRUE.. To select the complex
+*> eigenvector corresponding to a complex eigenvalue
+*> (WR(j),WI(j)), with complex conjugate (WR(j+1),WI(j+1)),
+*> either SELECT(j) or SELECT(j+1) or both must be set to
+*> .TRUE.; then on exit SELECT(j) is .TRUE. and SELECT(j+1) is
+*> .FALSE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> The upper Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \param[in] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> On entry, the real and imaginary parts of the eigenvalues of
+*> H; a complex conjugate pair of eigenvalues must be stored in
+*> consecutive elements of WR and WI.
+*> On exit, WR may have been altered since close eigenvalues
+*> are perturbed slightly in searching for independent
+*> eigenvectors.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,MM)
+*> On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must
+*> contain starting vectors for the inverse iteration for the
+*> left eigenvectors; the starting vector for each eigenvector
+*> must be in the same column(s) in which the eigenvector will
+*> be stored.
+*> On exit, if SIDE = 'L' or 'B', the left eigenvectors
+*> specified by SELECT will be stored consecutively in the
+*> columns of VL, in the same order as their eigenvalues. A
+*> complex eigenvector corresponding to a complex eigenvalue is
+*> stored in two consecutive columns, the first holding the real
+*> part and the second the imaginary part.
+*> If SIDE = 'R', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL.
+*> LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,MM)
+*> On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must
+*> contain starting vectors for the inverse iteration for the
+*> right eigenvectors; the starting vector for each eigenvector
+*> must be in the same column(s) in which the eigenvector will
+*> be stored.
+*> On exit, if SIDE = 'R' or 'B', the right eigenvectors
+*> specified by SELECT will be stored consecutively in the
+*> columns of VR, in the same order as their eigenvalues. A
+*> complex eigenvector corresponding to a complex eigenvalue is
+*> stored in two consecutive columns, the first holding the real
+*> part and the second the imaginary part.
+*> If SIDE = 'L', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR.
+*> LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR required to
+*> store the eigenvectors; each selected real eigenvector
+*> occupies one column and each selected complex eigenvector
+*> occupies two columns.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ((N+2)*N)
+*> \endverbatim
+*>
+*> \param[out] IFAILL
+*> \verbatim
+*> IFAILL is INTEGER array, dimension (MM)
+*> If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left
+*> eigenvector in the i-th column of VL (corresponding to the
+*> eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the
+*> eigenvector converged satisfactorily. If the i-th and (i+1)th
+*> columns of VL hold a complex eigenvector, then IFAILL(i) and
+*> IFAILL(i+1) are set to the same value.
+*> If SIDE = 'R', IFAILL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] IFAILR
+*> \verbatim
+*> IFAILR is INTEGER array, dimension (MM)
+*> If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right
+*> eigenvector in the i-th column of VR (corresponding to the
+*> eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the
+*> eigenvector converged satisfactorily. If the i-th and (i+1)th
+*> columns of VR hold a complex eigenvector, then IFAILR(i) and
+*> IFAILR(i+1) are set to the same value.
+*> If SIDE = 'L', IFAILR is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, i is the number of eigenvectors which
+*> failed to converge; see IFAILL and IFAILR for further
+*> details.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Each eigenvector is normalized so that the element of largest
+*> magnitude has magnitude 1; here the magnitude of a complex number
+*> (x,y) is taken to be |x|+|y|.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, WR, WI,
$ VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL,
$ IFAILR, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EIGSRC, INITV, SIDE
@@ -18,152 +270,6 @@
$ WI( * ), WORK( * ), WR( * )
* ..
*
-* Purpose
-* =======
-*
-* DHSEIN uses inverse iteration to find specified right and/or left
-* eigenvectors of a real upper Hessenberg matrix H.
-*
-* The right eigenvector x and the left eigenvector y of the matrix H
-* corresponding to an eigenvalue w are defined by:
-*
-* H * x = w * x, y**h * H = w * y**h
-*
-* where y**h denotes the conjugate transpose of the vector y.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* EIGSRC (input) CHARACTER*1
-* Specifies the source of eigenvalues supplied in (WR,WI):
-* = 'Q': the eigenvalues were found using DHSEQR; thus, if
-* H has zero subdiagonal elements, and so is
-* block-triangular, then the j-th eigenvalue can be
-* assumed to be an eigenvalue of the block containing
-* the j-th row/column. This property allows DHSEIN to
-* perform inverse iteration on just one diagonal block.
-* = 'N': no assumptions are made on the correspondence
-* between eigenvalues and diagonal blocks. In this
-* case, DHSEIN must always perform inverse iteration
-* using the whole matrix H.
-*
-* INITV (input) CHARACTER*1
-* = 'N': no initial vectors are supplied;
-* = 'U': user-supplied initial vectors are stored in the arrays
-* VL and/or VR.
-*
-* SELECT (input/output) LOGICAL array, dimension (N)
-* Specifies the eigenvectors to be computed. To select the
-* real eigenvector corresponding to a real eigenvalue WR(j),
-* SELECT(j) must be set to .TRUE.. To select the complex
-* eigenvector corresponding to a complex eigenvalue
-* (WR(j),WI(j)), with complex conjugate (WR(j+1),WI(j+1)),
-* either SELECT(j) or SELECT(j+1) or both must be set to
-* .TRUE.; then on exit SELECT(j) is .TRUE. and SELECT(j+1) is
-* .FALSE..
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* H (input) DOUBLE PRECISION array, dimension (LDH,N)
-* The upper Hessenberg matrix H.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* WR (input/output) DOUBLE PRECISION array, dimension (N)
-* WI (input) DOUBLE PRECISION array, dimension (N)
-* On entry, the real and imaginary parts of the eigenvalues of
-* H; a complex conjugate pair of eigenvalues must be stored in
-* consecutive elements of WR and WI.
-* On exit, WR may have been altered since close eigenvalues
-* are perturbed slightly in searching for independent
-* eigenvectors.
-*
-* VL (input/output) DOUBLE PRECISION array, dimension (LDVL,MM)
-* On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must
-* contain starting vectors for the inverse iteration for the
-* left eigenvectors; the starting vector for each eigenvector
-* must be in the same column(s) in which the eigenvector will
-* be stored.
-* On exit, if SIDE = 'L' or 'B', the left eigenvectors
-* specified by SELECT will be stored consecutively in the
-* columns of VL, in the same order as their eigenvalues. A
-* complex eigenvector corresponding to a complex eigenvalue is
-* stored in two consecutive columns, the first holding the real
-* part and the second the imaginary part.
-* If SIDE = 'R', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL.
-* LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.
-*
-* VR (input/output) DOUBLE PRECISION array, dimension (LDVR,MM)
-* On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must
-* contain starting vectors for the inverse iteration for the
-* right eigenvectors; the starting vector for each eigenvector
-* must be in the same column(s) in which the eigenvector will
-* be stored.
-* On exit, if SIDE = 'R' or 'B', the right eigenvectors
-* specified by SELECT will be stored consecutively in the
-* columns of VR, in the same order as their eigenvalues. A
-* complex eigenvector corresponding to a complex eigenvalue is
-* stored in two consecutive columns, the first holding the real
-* part and the second the imaginary part.
-* If SIDE = 'L', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR.
-* LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR required to
-* store the eigenvectors; each selected real eigenvector
-* occupies one column and each selected complex eigenvector
-* occupies two columns.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension ((N+2)*N)
-*
-* IFAILL (output) INTEGER array, dimension (MM)
-* If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left
-* eigenvector in the i-th column of VL (corresponding to the
-* eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the
-* eigenvector converged satisfactorily. If the i-th and (i+1)th
-* columns of VL hold a complex eigenvector, then IFAILL(i) and
-* IFAILL(i+1) are set to the same value.
-* If SIDE = 'R', IFAILL is not referenced.
-*
-* IFAILR (output) INTEGER array, dimension (MM)
-* If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right
-* eigenvector in the i-th column of VR (corresponding to the
-* eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the
-* eigenvector converged satisfactorily. If the i-th and (i+1)th
-* columns of VR hold a complex eigenvector, then IFAILR(i) and
-* IFAILR(i+1) are set to the same value.
-* If SIDE = 'L', IFAILR is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, i is the number of eigenvectors which
-* failed to converge; see IFAILL and IFAILR for further
-* details.
-*
-* Further Details
-* ===============
-*
-* Each eigenvector is normalized so that the element of largest
-* magnitude has magnitude 1; here the magnitude of a complex number
-* (x,y) is taken to be |x|+|y|.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dhseqr.f b/SRC/dhseqr.f
index 08447dc1..bb94d2a3 100644
--- a/SRC/dhseqr.f
+++ b/SRC/dhseqr.f
@@ -1,9 +1,250 @@
+*> \brief \b DHSEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z,
+* LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
+* CHARACTER COMPZ, JOB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+* $ Z( LDZ, * )
+* ..
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DHSEQR computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**T, where T is an upper quasi-triangular matrix (the
+*> Schur form), and Z is the orthogonal matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input orthogonal
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> = 'E': compute eigenvalues only;
+*> = 'S': compute eigenvalues and the Schur form T.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': no Schur vectors are computed;
+*> = 'I': Z is initialized to the unit matrix and the matrix Z
+*> of Schur vectors of H is returned;
+*> = 'V': Z must contain an orthogonal matrix Q on entry, and
+*> the product Q*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
+*> set by a previous call to DGEBAL, and then passed to DGEHRD
+*> when the matrix output by DGEBAL is reduced to Hessenberg
+*> form. Otherwise ILO and IHI should be set to 1 and N
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and JOB = 'S', then H contains the
+*> upper quasi-triangular matrix T from the Schur decomposition
+*> (the Schur form); 2-by-2 diagonal blocks (corresponding to
+*> complex conjugate pairs of eigenvalues) are returned in
+*> standard form, with H(i,i) = H(i+1,i+1) and
+*> H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and JOB = 'E', the
+*> contents of H are unspecified on exit. (The output value of
+*> H when INFO.GT.0 is given under the description of INFO
+*> below.)
+*> \endverbatim
+*> \verbatim
+*> Unlike earlier versions of DHSEQR, this subroutine may
+*> explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
+*> or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> The real and imaginary parts, respectively, of the computed
+*> eigenvalues. If two eigenvalues are computed as a complex
+*> conjugate pair, they are stored in consecutive elements of
+*> WR and WI, say the i-th and (i+1)th, with WI(i) .GT. 0 and
+*> WI(i+1) .LT. 0. If JOB = 'S', the eigenvalues are stored in
+*> the same order as on the diagonal of the Schur form returned
+*> in H, with WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2
+*> diagonal block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
+*> WI(i+1) = -WI(i).
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,N)
+*> If COMPZ = 'N', Z is not referenced.
+*> If COMPZ = 'I', on entry Z need not be set and on exit,
+*> if INFO = 0, Z contains the orthogonal matrix Z of the Schur
+*> vectors of H. If COMPZ = 'V', on entry Z must contain an
+*> N-by-N matrix Q, which is assumed to be equal to the unit
+*> matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
+*> if INFO = 0, Z contains Q*Z.
+*> Normally Q is the orthogonal matrix generated by DORGHR
+*> after the call to DGEHRD which formed the Hessenberg matrix
+*> H. (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if COMPZ = 'I' or
+*> COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient and delivers very good and sometimes
+*> optimal performance. However, LWORK as large as 11*N
+*> may be required for optimal performance. A workspace
+*> query is recommended to determine the optimal workspace
+*> size.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then DHSEQR does a workspace query.
+*> In this case, DHSEQR checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .LT. 0: if INFO = -i, the i-th argument had an illegal
+*> value
+*> .GT. 0: if INFO = i, DHSEQR failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and JOB = 'E', then on exit, the
+*> remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and JOB = 'S', then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is an orthogonal matrix. The final
+*> value of H is upper Hessenberg and quasi-triangular
+*> in rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'V', then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z) = (initial value of Z)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the orthogonal matrix in (*) (regard-
+*> less of the value of JOB.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'I', then on exit
+*> (final value of Z) = U
+*> where U is the orthogonal matrix in (*) (regard-
+*> less of the value of JOB.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'N', then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z,
$ LDZ, WORK, LWORK, INFO )
*
* -- LAPACK computational routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
@@ -13,152 +254,6 @@
DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ),
$ Z( LDZ, * )
* ..
-* Purpose
-* =======
-*
-* DHSEQR computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**T, where T is an upper quasi-triangular matrix (the
-* Schur form), and Z is the orthogonal matrix of Schur vectors.
-*
-* Optionally Z may be postmultiplied into an input orthogonal
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* = 'E': compute eigenvalues only;
-* = 'S': compute eigenvalues and the Schur form T.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': no Schur vectors are computed;
-* = 'I': Z is initialized to the unit matrix and the matrix Z
-* of Schur vectors of H is returned;
-* = 'V': Z must contain an orthogonal matrix Q on entry, and
-* the product Q*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to DGEBAL, and then passed to DGEHRD
-* when the matrix output by DGEBAL is reduced to Hessenberg
-* form. Otherwise ILO and IHI should be set to 1 and N
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) DOUBLE PRECISION array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and JOB = 'S', then H contains the
-* upper quasi-triangular matrix T from the Schur decomposition
-* (the Schur form); 2-by-2 diagonal blocks (corresponding to
-* complex conjugate pairs of eigenvalues) are returned in
-* standard form, with H(i,i) = H(i+1,i+1) and
-* H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and JOB = 'E', the
-* contents of H are unspecified on exit. (The output value of
-* H when INFO.GT.0 is given under the description of INFO
-* below.)
-*
-* Unlike earlier versions of DHSEQR, this subroutine may
-* explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
-* or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* WR (output) DOUBLE PRECISION array, dimension (N)
-* WI (output) DOUBLE PRECISION array, dimension (N)
-* The real and imaginary parts, respectively, of the computed
-* eigenvalues. If two eigenvalues are computed as a complex
-* conjugate pair, they are stored in consecutive elements of
-* WR and WI, say the i-th and (i+1)th, with WI(i) .GT. 0 and
-* WI(i+1) .LT. 0. If JOB = 'S', the eigenvalues are stored in
-* the same order as on the diagonal of the Schur form returned
-* in H, with WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2
-* diagonal block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
-* WI(i+1) = -WI(i).
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
-* If COMPZ = 'N', Z is not referenced.
-* If COMPZ = 'I', on entry Z need not be set and on exit,
-* if INFO = 0, Z contains the orthogonal matrix Z of the Schur
-* vectors of H. If COMPZ = 'V', on entry Z must contain an
-* N-by-N matrix Q, which is assumed to be equal to the unit
-* matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
-* if INFO = 0, Z contains Q*Z.
-* Normally Q is the orthogonal matrix generated by DORGHR
-* after the call to DGEHRD which formed the Hessenberg matrix
-* H. (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if COMPZ = 'I' or
-* COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient and delivers very good and sometimes
-* optimal performance. However, LWORK as large as 11*N
-* may be required for optimal performance. A workspace
-* query is recommended to determine the optimal workspace
-* size.
-*
-* If LWORK = -1, then DHSEQR does a workspace query.
-* In this case, DHSEQR checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .LT. 0: if INFO = -i, the i-th argument had an illegal
-* value
-* .GT. 0: if INFO = i, DHSEQR failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and JOB = 'E', then on exit, the
-* remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and JOB = 'S', then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is an orthogonal matrix. The final
-* value of H is upper Hessenberg and quasi-triangular
-* in rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and COMPZ = 'V', then on exit
-*
-* (final value of Z) = (initial value of Z)*U
-*
-* where U is the orthogonal matrix in (*) (regard-
-* less of the value of JOB.)
-*
-* If INFO .GT. 0 and COMPZ = 'I', then on exit
-* (final value of Z) = U
-* where U is the orthogonal matrix in (*) (regard-
-* less of the value of JOB.)
-*
-* If INFO .GT. 0 and COMPZ = 'N', then Z is not
-* accessed.
-*
* ================================================================
* Default values supplied by
* ILAENV(ISPEC,'DHSEQR',JOB(:1)//COMPZ(:1),N,ILO,IHI,LWORK).
diff --git a/SRC/disnan.f b/SRC/disnan.f
index cbe58abd..db9d3b83 100644
--- a/SRC/disnan.f
+++ b/SRC/disnan.f
@@ -1,26 +1,64 @@
- LOGICAL FUNCTION DISNAN( DIN )
+*> \brief \b DISNAN
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION DIN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION DISNAN( DIN )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION DIN
+* ..
+*
* Purpose
* =======
*
-* DISNAN returns .TRUE. if its argument is NaN, and .FALSE.
-* otherwise. To be replaced by the Fortran 2003 intrinsic in the
-* future.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DISNAN returns .TRUE. if its argument is NaN, and .FALSE.
+*> otherwise. To be replaced by the Fortran 2003 intrinsic in the
+*> future.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIN (input) DOUBLE PRECISION
-* Input to test for NaN.
+*> \param[in] DIN
+*> \verbatim
+*> DIN is DOUBLE PRECISION
+*> Input to test for NaN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ LOGICAL FUNCTION DISNAN( DIN )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION DIN
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_gbamv.f b/SRC/dla_gbamv.f
index 37cac580..910f241e 100644
--- a/SRC/dla_gbamv.f
+++ b/SRC/dla_gbamv.f
@@ -1,121 +1,197 @@
- SUBROUTINE DLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
- $ INCX, BETA, Y, INCY )
+*> \brief \b DLA_GBAMV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), X( * ), Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
+* INCX, BETA, Y, INCY )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* DLA_GBAMV performs one of the matrix-vector operations
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-* or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_GBAMV performs one of the matrix-vector operations
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) INTEGER
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
-* BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-* BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* ALPHA (input) DOUBLE PRECISION
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AB (input) DOUBLE PRECISION array of DIMENSION ( LDAB, n )
-* Before entry, the leading m by n part of the array AB must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDAB (input) INTEGER
-* On entry, LDA specifies the first dimension of AB as declared
-* in the calling (sub) program. LDAB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X (input) DOUBLE PRECISION array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is INTEGER
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
+*> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array of DIMENSION ( LDAB, n )
+*> Before entry, the leading m by n part of the array AB must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> On entry, LDA specifies the first dimension of AB as declared
+*> in the calling (sub) program. LDAB must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) DOUBLE PRECISION
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup doubleGBcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
+* =====================================================================
+ SUBROUTINE DLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
+ $ INCX, BETA, Y, INCY )
*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Level 2 Blas routine.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_gbrcond.f b/SRC/dla_gbrcond.f
index 7875adb9..4564e6ef 100644
--- a/SRC/dla_gbrcond.f
+++ b/SRC/dla_gbrcond.f
@@ -1,17 +1,172 @@
+*> \brief \b DLA_GBRCOND
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLA_GBRCOND( TRANS, N, KL, KU, AB, LDAB,
+* AFB, LDAFB, IPIV, CMODE, C,
+* INFO, WORK, IWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER N, LDAB, LDAFB, INFO, KL, KU, CMODE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * ), IPIV( * )
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), WORK( * ),
+* $ C( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_GBRCOND Estimates the Skeel condition number of op(A) * op2(C)
+*> where op2 is determined by CMODE as follows
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> The Skeel condition number cond(A) = norminf( |inv(A)||A| )
+*> is computed by computing scaling factors R such that
+*> diag(R)*A*op2(C) is row equilibrated and computing the standard
+*> infinity-norm condition number.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by DGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] CMODE
+*> \verbatim
+*> CMODE is INTEGER
+*> Determines op2(C) in the formula op(A) * op2(C) as follows:
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * op2(C).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (5*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLA_GBRCOND( TRANS, N, KL, KU, AB, LDAB,
$ AFB, LDAFB, IPIV, CMODE, C,
$ INFO, WORK, IWORK )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS
INTEGER N, LDAB, LDAFB, INFO, KL, KU, CMODE
@@ -22,81 +177,6 @@
$ C( * )
* ..
*
-* Purpose
-* =======
-*
-* DLA_GBRCOND Estimates the Skeel condition number of op(A) * op2(C)
-* where op2 is determined by CMODE as follows
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-* The Skeel condition number cond(A) = norminf( |inv(A)||A| )
-* is computed by computing scaling factors R such that
-* diag(R)*A*op2(C) is row equilibrated and computing the standard
-* infinity-norm condition number.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by DGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* CMODE (input) INTEGER
-* Determines op2(C) in the formula op(A) * op2(C) as follows:
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * op2(C).
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) DOUBLE PRECISION array, dimension (5*N).
-* Workspace.
-*
-* IWORK (input) INTEGER array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dla_gbrfsx_extended.f b/SRC/dla_gbrfsx_extended.f
index bddd6942..67bba413 100644
--- a/SRC/dla_gbrfsx_extended.f
+++ b/SRC/dla_gbrfsx_extended.f
@@ -1,3 +1,416 @@
+*> \brief \b DLA_GBRFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLA_GBRFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, KL, KU,
+* NRHS, AB, LDAB, AFB, LDAFB, IPIV,
+* COLEQU, C, B, LDB, Y, LDY,
+* BERR_OUT, N_NORMS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, RES, AYB, DY,
+* Y_TAIL, RCOND, ITHRESH, RTHRESH,
+* DZ_UB, IGNORE_CWISE, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
+* $ PREC_TYPE, TRANS_TYPE, N_NORMS, ITHRESH
+* LOGICAL COLEQU, IGNORE_CWISE
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES(*), DY(*), Y_TAIL(*)
+* DOUBLE PRECISION C( * ), AYB(*), RCOND, BERR_OUT(*),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_GBRFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by DGBRFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] TRANS_TYPE
+*> \verbatim
+*> TRANS_TYPE is INTEGER
+*> Specifies the transposition operation on A.
+*> The value is defined by ILATRANS(T) where T is a CHARACTER and
+*> T = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by DGBTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by DGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by DGBTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by DLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace. This can be the same workspace passed for Y_TAIL.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to DGBTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+* =====================================================================
SUBROUTINE DLA_GBRFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, KL, KU,
$ NRHS, AB, LDAB, AFB, LDAFB, IPIV,
$ COLEQU, C, B, LDB, Y, LDY,
@@ -6,16 +419,11 @@
$ Y_TAIL, RCOND, ITHRESH, RTHRESH,
$ DZ_UB, IGNORE_CWISE, INFO )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
$ PREC_TYPE, TRANS_TYPE, N_NORMS, ITHRESH
@@ -31,260 +439,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DLA_GBRFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by DGBRFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* TRANS_TYPE (input) INTEGER
-* Specifies the transposition operation on A.
-* The value is defined by ILATRANS(T) where T is a CHARACTER and
-* T = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by DGBTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by DGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by DGBTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by DLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace. This can be the same workspace passed for Y_TAIL.
-*
-* DY (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to DGBTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dla_gbrpvgrw.f b/SRC/dla_gbrpvgrw.f
index 7a9a43f6..6fea77b8 100644
--- a/SRC/dla_gbrpvgrw.f
+++ b/SRC/dla_gbrpvgrw.f
@@ -1,67 +1,125 @@
- DOUBLE PRECISION FUNCTION DLA_GBRPVGRW( N, KL, KU, NCOLS, AB,
- $ LDAB, AFB, LDAFB )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * )
-* ..
-*
+*> \brief \b DLA_GBRPVGRW
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLA_GBRPVGRW( N, KL, KU, NCOLS, AB,
+* LDAB, AFB, LDAFB )
+*
+* .. Scalar Arguments ..
+* INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * )
+* ..
+*
* Purpose
* =======
*
-* DLA_GBRPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_GBRPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+*> \date November 2011
*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \ingroup doubleGBcomputational
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLA_GBRPVGRW( N, KL, KU, NCOLS, AB,
+ $ LDAB, AFB, LDAFB )
*
-* AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+* .. Scalar Arguments ..
+ INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_geamv.f b/SRC/dla_geamv.f
index b5e74f1d..8689189f 100644
--- a/SRC/dla_geamv.f
+++ b/SRC/dla_geamv.f
@@ -1,115 +1,186 @@
- SUBROUTINE DLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
- $ Y, INCY )
+*> \brief \b DLA_GEAMV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER INCX, INCY, LDA, M, N, TRANS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
+* Y, INCY )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER INCX, INCY, LDA, M, N, TRANS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* DLA_GEAMV performs one of the matrix-vector operations
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-* or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_GEAMV performs one of the matrix-vector operations
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) INTEGER
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
-* BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-* BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) DOUBLE PRECISION
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) DOUBLE PRECISION array of DIMENSION ( LDA, n )
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is INTEGER
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
+*> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n )
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION
+*> Array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) DOUBLE PRECISION array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \date November 2011
*
-* BETA (input) DOUBLE PRECISION
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \ingroup doubleGEcomputational
*
-* Y (input/output) DOUBLE PRECISION
-* Array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+* =====================================================================
+ SUBROUTINE DLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
+ $ Y, INCY )
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Level 2 Blas routine.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER INCX, INCY, LDA, M, N, TRANS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_gercond.f b/SRC/dla_gercond.f
index 85ae26b5..88760e56 100644
--- a/SRC/dla_gercond.f
+++ b/SRC/dla_gercond.f
@@ -1,89 +1,163 @@
- DOUBLE PRECISION FUNCTION DLA_GERCOND ( TRANS, N, A, LDA, AF,
- $ LDAF, IPIV, CMODE, C,
- $ INFO, WORK, IWORK )
+*> \brief \b DLA_GERCOND
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER N, LDA, LDAF, INFO, CMODE
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), IWORK( * )
- DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ),
- $ C( * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLA_GERCOND ( TRANS, N, A, LDA, AF,
+* LDAF, IPIV, CMODE, C,
+* INFO, WORK, IWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER N, LDA, LDAF, INFO, CMODE
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ),
+* $ C( * )
+* ..
+*
* Purpose
* =======
*
-* DLA_GERCOND estimates the Skeel condition number of op(A) * op2(C)
-* where op2 is determined by CMODE as follows
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-* The Skeel condition number cond(A) = norminf( |inv(A)||A| )
-* is computed by computing scaling factors R such that
-* diag(R)*A*op2(C) is row equilibrated and computing the standard
-* infinity-norm condition number.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_GERCOND estimates the Skeel condition number of op(A) * op2(C)
+*> where op2 is determined by CMODE as follows
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> The Skeel condition number cond(A) = norminf( |inv(A)||A| )
+*> is computed by computing scaling factors R such that
+*> diag(R)*A*op2(C) is row equilibrated and computing the standard
+*> infinity-norm condition number.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by DGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by DGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by DGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] CMODE
+*> \verbatim
+*> CMODE is INTEGER
+*> Determines op2(C) in the formula op(A) * op2(C) as follows:
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * op2(C).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by DGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CMODE (input) INTEGER
-* Determines op2(C) in the formula op(A) * op2(C) as follows:
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
+*> \date November 2011
*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * op2(C).
+*> \ingroup doubleGEcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLA_GERCOND ( TRANS, N, A, LDA, AF,
+ $ LDAF, IPIV, CMODE, C,
+ $ INFO, WORK, IWORK )
*
-* WORK (input) DOUBLE PRECISION array, dimension (3*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* IWORK (input) INTEGER array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER N, LDA, LDAF, INFO, CMODE
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), IWORK( * )
+ DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ),
+ $ C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_gerfsx_extended.f b/SRC/dla_gerfsx_extended.f
index ad4aa060..83f16969 100644
--- a/SRC/dla_gerfsx_extended.f
+++ b/SRC/dla_gerfsx_extended.f
@@ -1,3 +1,402 @@
+*> \brief \b DLA_GERFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLA_GERFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, NRHS, A,
+* LDA, AF, LDAF, IPIV, COLEQU, C, B,
+* LDB, Y, LDY, BERR_OUT, N_NORMS,
+* ERRS_N, ERRS_C, RES, AYB, DY,
+* Y_TAIL, RCOND, ITHRESH, RTHRESH,
+* DZ_UB, IGNORE_CWISE, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ TRANS_TYPE, N_NORMS, ITHRESH
+* LOGICAL COLEQU, IGNORE_CWISE
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* DOUBLE PRECISION C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERRS_N( NRHS, * ), ERRS_C( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_GERFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by DGERFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] TRANS_TYPE
+*> \verbatim
+*> TRANS_TYPE is INTEGER
+*> Specifies the transposition operation on A.
+*> The value is defined by ILATRANS(T) where T is a CHARACTER and
+*> T = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by DGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by DGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by DLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace. This can be the same workspace passed for Y_TAIL.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to DGETRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEcomputational
+*
+* =====================================================================
SUBROUTINE DLA_GERFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, NRHS, A,
$ LDA, AF, LDAF, IPIV, COLEQU, C, B,
$ LDB, Y, LDY, BERR_OUT, N_NORMS,
@@ -5,16 +404,11 @@
$ Y_TAIL, RCOND, ITHRESH, RTHRESH,
$ DZ_UB, IGNORE_CWISE, INFO )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ TRANS_TYPE, N_NORMS, ITHRESH
@@ -29,254 +423,6 @@
$ ERRS_N( NRHS, * ), ERRS_C( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DLA_GERFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by DGERFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* TRANS_TYPE (input) INTEGER
-* Specifies the transposition operation on A.
-* The value is defined by ILATRANS(T) where T is a CHARACTER and
-* T = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by DGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by DGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by DLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace. This can be the same workspace passed for Y_TAIL.
-*
-* DY (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to DGETRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dla_gerpvgrw.f b/SRC/dla_gerpvgrw.f
index fb020a6c..ee59d9eb 100644
--- a/SRC/dla_gerpvgrw.f
+++ b/SRC/dla_gerpvgrw.f
@@ -1,55 +1,107 @@
- DOUBLE PRECISION FUNCTION DLA_GERPVGRW( N, NCOLS, A, LDA, AF,
- $ LDAF )
+*> \brief \b DLA_GERPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N, NCOLS, LDA, LDAF
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDAF, * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLA_GERPVGRW( N, NCOLS, A, LDA, AF,
+* LDAF )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * )
+* ..
+*
* Purpose
* =======
-*
-* DLA_GERPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_GERPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by DGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \ingroup doubleGEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLA_GERPVGRW( N, NCOLS, A, LDA, AF,
+ $ LDAF )
*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by DGETRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER N, NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDAF, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_lin_berr.f b/SRC/dla_lin_berr.f
index b0893524..fb1feaaf 100644
--- a/SRC/dla_lin_berr.f
+++ b/SRC/dla_lin_berr.f
@@ -1,15 +1,103 @@
- SUBROUTINE DLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*> \brief \b DLA_LIN_BERR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NZ, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AYB( N, NRHS ), BERR( NRHS )
+* DOUBLE PRECISION RES( N, NRHS )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_LIN_BERR computes component-wise relative backward error from
+*> the formula
+*> max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the component-wise absolute value of the matrix
+*> or vector Z.
+*>
+*>\endverbatim
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NZ
+*> \verbatim
+*> NZ is INTEGER
+*> We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
+*> guard against spuriously zero residuals. Default value is N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices AYB, RES, and BERR. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is DOUBLE PRECISION array, dimension (N,NRHS)
+*> The residual matrix, i.e., the matrix R in the relative backward
+*> error formula above.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N, NRHS)
+*> The denominator in the relative backward error formula above, i.e.,
+*> the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
+*> are from iterative refinement (see dla_gerfsx_extended.f).
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The component-wise relative backward error from the formula above.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE DLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER N, NZ, NRHS
* ..
@@ -18,42 +106,6 @@
DOUBLE PRECISION RES( N, NRHS )
* ..
*
-* Purpose
-* =======
-*
-* DLA_LIN_BERR computes component-wise relative backward error from
-* the formula
-* max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the component-wise absolute value of the matrix
-* or vector Z.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NZ (input) INTEGER
-* We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
-* guard against spuriously zero residuals. Default value is N.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices AYB, RES, and BERR. NRHS >= 0.
-*
-* RES (input) DOUBLE PRECISION array, dimension (N,NRHS)
-* The residual matrix, i.e., the matrix R in the relative backward
-* error formula above.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N, NRHS)
-* The denominator in the relative backward error formula above, i.e.,
-* the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
-* are from iterative refinement (see dla_gerfsx_extended.f).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The component-wise relative backward error from the formula above.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dla_porcond.f b/SRC/dla_porcond.f
index 9eb572f2..1c0c6d1c 100644
--- a/SRC/dla_porcond.f
+++ b/SRC/dla_porcond.f
@@ -1,82 +1,153 @@
- DOUBLE PRECISION FUNCTION DLA_PORCOND( UPLO, N, A, LDA, AF, LDAF,
- $ CMODE, C, INFO, WORK,
- $ IWORK )
+*> \brief \b DLA_PORCOND
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N, LDA, LDAF, INFO, CMODE
- DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ),
- $ C( * )
-* ..
-* .. Array Arguments ..
- INTEGER IWORK( * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLA_PORCOND( UPLO, N, A, LDA, AF, LDAF,
+* CMODE, C, INFO, WORK,
+* IWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO, CMODE
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ),
+* $ C( * )
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLA_PORCOND Estimates the Skeel condition number of op(A) * op2(C)
-* where op2 is determined by CMODE as follows
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-* The Skeel condition number cond(A) = norminf( |inv(A)||A| )
-* is computed by computing scaling factors R such that
-* diag(R)*A*op2(C) is row equilibrated and computing the standard
-* infinity-norm condition number.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_PORCOND Estimates the Skeel condition number of op(A) * op2(C)
+*> where op2 is determined by CMODE as follows
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> The Skeel condition number cond(A) = norminf( |inv(A)||A| )
+*> is computed by computing scaling factors R such that
+*> diag(R)*A*op2(C) is row equilibrated and computing the standard
+*> infinity-norm condition number.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPOTRF.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] CMODE
+*> \verbatim
+*> CMODE is INTEGER
+*> Determines op2(C) in the formula op(A) * op2(C) as follows:
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * op2(C).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CMODE (input) INTEGER
-* Determines op2(C) in the formula op(A) * op2(C) as follows:
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
+*> \date November 2011
*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * op2(C).
+*> \ingroup doublePOcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLA_PORCOND( UPLO, N, A, LDA, AF, LDAF,
+ $ CMODE, C, INFO, WORK,
+ $ IWORK )
*
-* WORK (input) DOUBLE PRECISION array, dimension (3*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* IWORK (input) INTEGER array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N, LDA, LDAF, INFO, CMODE
+ DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ),
+ $ C( * )
+* ..
+* .. Array Arguments ..
+ INTEGER IWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_porfsx_extended.f b/SRC/dla_porfsx_extended.f
index bc96c424..2ede3d51 100644
--- a/SRC/dla_porfsx_extended.f
+++ b/SRC/dla_porfsx_extended.f
@@ -1,3 +1,393 @@
+*> \brief \b DLA_PORFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLA_PORFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, COLEQU, C, B, LDB, Y,
+* LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* DOUBLE PRECISION C( * ), AYB(*), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_PORFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by DPORFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by DPOTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by DLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace. This can be the same workspace passed for Y_TAIL.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to DPOTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOcomputational
+*
+* =====================================================================
SUBROUTINE DLA_PORFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, COLEQU, C, B, LDB, Y,
$ LDY, BERR_OUT, N_NORMS,
@@ -6,16 +396,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -31,246 +416,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DLA_PORFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by DPORFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by DPOTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by DLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace. This can be the same workspace passed for Y_TAIL.
-*
-* DY (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to DPOTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dla_porpvgrw.f b/SRC/dla_porpvgrw.f
index 731a8ac8..aba2c2d8 100644
--- a/SRC/dla_porpvgrw.f
+++ b/SRC/dla_porpvgrw.f
@@ -1,58 +1,114 @@
- DOUBLE PRECISION FUNCTION DLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF,
- $ LDAF, WORK )
+*> \brief \b DLA_PORPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER NCOLS, LDA, LDAF
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF,
+* LDAF, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
+* ..
+*
* Purpose
* =======
-*
-* DLA_PORPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_PORPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup doublePOcomputational
*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPOTRF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF,
+ $ LDAF, WORK )
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) DOUBLE PRECISION array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_syamv.f b/SRC/dla_syamv.f
index 8c48a252..b93ce503 100644
--- a/SRC/dla_syamv.f
+++ b/SRC/dla_syamv.f
@@ -1,118 +1,191 @@
- SUBROUTINE DLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
- $ INCY )
+*> \brief \b DLA_SYAMV
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER INCX, INCY, LDA, N, UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER INCX, INCY, LDA, N, UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* DLA_SYAMV performs the matrix-vector operation
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* n by n symmetric matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_SYAMV performs the matrix-vector operation
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> n by n symmetric matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) INTEGER
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = BLAS_UPPER Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = BLAS_LOWER Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) DOUBLE PRECISION .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) DOUBLE PRECISION array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X (input) DOUBLE PRECISION array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) )
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is INTEGER
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_UPPER Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_LOWER Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION .
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) )
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION .
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> ( 1 + ( n - 1 )*abs( INCY ) )
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) DOUBLE PRECISION .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* ( 1 + ( n - 1 )*abs( INCY ) )
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup doubleSYcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*> -- Modified for the absolute-value product, April 2006
+*> Jason Riedy, UC Berkeley
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+ $ INCY )
*
-* Level 2 Blas routine.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
-* -- Modified for the absolute-value product, April 2006
-* Jason Riedy, UC Berkeley
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER INCX, INCY, LDA, N, UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_syrcond.f b/SRC/dla_syrcond.f
index fd39a3c5..1055f41d 100644
--- a/SRC/dla_syrcond.f
+++ b/SRC/dla_syrcond.f
@@ -1,85 +1,158 @@
- DOUBLE PRECISION FUNCTION DLA_SYRCOND( UPLO, N, A, LDA, AF, LDAF,
- $ IPIV, CMODE, C, INFO, WORK,
- $ IWORK )
+*> \brief \b DLA_SYRCOND
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N, LDA, LDAF, INFO, CMODE
-* ..
-* .. Array Arguments
- INTEGER IWORK( * ), IPIV( * )
- DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ), C( * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLA_SYRCOND( UPLO, N, A, LDA, AF, LDAF,
+* IPIV, CMODE, C, INFO, WORK,
+* IWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO, CMODE
+* ..
+* .. Array Arguments
+* INTEGER IWORK( * ), IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ), C( * )
+* ..
+*
* Purpose
* =======
*
-* DLA_SYRCOND estimates the Skeel condition number of op(A) * op2(C)
-* where op2 is determined by CMODE as follows
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-* The Skeel condition number cond(A) = norminf( |inv(A)||A| )
-* is computed by computing scaling factors R such that
-* diag(R)*A*op2(C) is row equilibrated and computing the standard
-* infinity-norm condition number.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_SYRCOND estimates the Skeel condition number of op(A) * op2(C)
+*> where op2 is determined by CMODE as follows
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> The Skeel condition number cond(A) = norminf( |inv(A)||A| )
+*> is computed by computing scaling factors R such that
+*> diag(R)*A*op2(C) is row equilibrated and computing the standard
+*> infinity-norm condition number.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] CMODE
+*> \verbatim
+*> CMODE is INTEGER
+*> Determines op2(C) in the formula op(A) * op2(C) as follows:
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * op2(C).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CMODE (input) INTEGER
-* Determines op2(C) in the formula op(A) * op2(C) as follows:
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
+*> \date November 2011
*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * op2(C).
+*> \ingroup doubleSYcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLA_SYRCOND( UPLO, N, A, LDA, AF, LDAF,
+ $ IPIV, CMODE, C, INFO, WORK,
+ $ IWORK )
*
-* WORK (input) DOUBLE PRECISION array, dimension (3*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* IWORK (input) INTEGER array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N, LDA, LDAF, INFO, CMODE
+* ..
+* .. Array Arguments
+ INTEGER IWORK( * ), IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * ), C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_syrfsx_extended.f b/SRC/dla_syrfsx_extended.f
index b654fa6d..fb4c5d18 100644
--- a/SRC/dla_syrfsx_extended.f
+++ b/SRC/dla_syrfsx_extended.f
@@ -1,3 +1,401 @@
+*> \brief \b DLA_SYRFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLA_SYRFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, IPIV, COLEQU, C, B, LDB,
+* Y, LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* DOUBLE PRECISION C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_SYRFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by DSYRFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by DSYTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by DLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace. This can be the same workspace passed for Y_TAIL.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is DOUBLE PRECISION array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to DSYTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+* =====================================================================
SUBROUTINE DLA_SYRFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, IPIV, COLEQU, C, B, LDB,
$ Y, LDY, BERR_OUT, N_NORMS,
@@ -6,16 +404,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -32,250 +425,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DLA_SYRFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by DSYRFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by DSYTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by DLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace. This can be the same workspace passed for Y_TAIL.
-*
-* DY (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) DOUBLE PRECISION array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to DSYTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dla_syrpvgrw.f b/SRC/dla_syrpvgrw.f
index 64d025b2..5a93a375 100644
--- a/SRC/dla_syrpvgrw.f
+++ b/SRC/dla_syrpvgrw.f
@@ -1,71 +1,137 @@
- DOUBLE PRECISION FUNCTION DLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF,
- $ LDAF, IPIV, WORK )
+*> \brief \b DLA_SYRPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER N, INFO, LDA, LDAF
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF,
+* LDAF, IPIV, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
+* ..
+*
* Purpose
* =======
-*
-* DLA_SYRPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLA_SYRPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The value of INFO returned from DSYTRF, .i.e., the pivot in
+*> column INFO is exactly 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* INFO (input) INTEGER
-* The value of INFO returned from DSYTRF, .i.e., the pivot in
-* column INFO is exactly 0.
-*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSYTRF.
+*> \ingroup doubleSYcomputational
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF,
+ $ LDAF, IPIV, WORK )
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) DOUBLE PRECISION array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dla_wwaddw.f b/SRC/dla_wwaddw.f
index 0eb61da9..cf77f761 100644
--- a/SRC/dla_wwaddw.f
+++ b/SRC/dla_wwaddw.f
@@ -1,44 +1,91 @@
- SUBROUTINE DLA_WWADDW( N, X, Y, W )
+*> \brief \b DLA_WWADDW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION X( * ), Y( * ), W( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLA_WWADDW( N, X, Y, W )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION X( * ), Y( * ), W( * )
+* ..
+*
* Purpose
-* =======
-*
-* DLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
+* =======
*
-* This works for all extant IBM's hex and binary floating point
-* arithmetics, but not for decimal.
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
+*>
+*> This works for all extant IBM's hex and binary floating point
+*> arithmetics, but not for decimal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of vectors X, Y, and W.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of vectors X, Y, and W.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> The first part of the doubled-single accumulation vector.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension (N)
+*> The second part of the doubled-single accumulation vector.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The vector to be added.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input/output) DOUBLE PRECISION array, dimension (N)
-* The first part of the doubled-single accumulation vector.
+*> \date November 2011
*
-* Y (input/output) DOUBLE PRECISION array, dimension (N)
-* The second part of the doubled-single accumulation vector.
+*> \ingroup doubleOTHERcomputational
*
-* W (input) DOUBLE PRECISION array, dimension (N)
-* The vector to be added.
+* =====================================================================
+ SUBROUTINE DLA_WWADDW( N, X, Y, W )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION X( * ), Y( * ), W( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlabad.f b/SRC/dlabad.f
index 8eb5ce4f..df99ff30 100644
--- a/SRC/dlabad.f
+++ b/SRC/dlabad.f
@@ -1,38 +1,79 @@
- SUBROUTINE DLABAD( SMALL, LARGE )
+*> \brief \b DLABAD
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION LARGE, SMALL
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLABAD( SMALL, LARGE )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION LARGE, SMALL
+* ..
+*
* Purpose
* =======
*
-* DLABAD takes as input the values computed by DLAMCH for underflow and
-* overflow, and returns the square root of each of these values if the
-* log of LARGE is sufficiently large. This subroutine is intended to
-* identify machines with a large exponent range, such as the Crays, and
-* redefine the underflow and overflow limits to be the square roots of
-* the values computed by DLAMCH. This subroutine is needed because
-* DLAMCH does not compensate for poor arithmetic in the upper half of
-* the exponent range, as is found on a Cray.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLABAD takes as input the values computed by DLAMCH for underflow and
+*> overflow, and returns the square root of each of these values if the
+*> log of LARGE is sufficiently large. This subroutine is intended to
+*> identify machines with a large exponent range, such as the Crays, and
+*> redefine the underflow and overflow limits to be the square roots of
+*> the values computed by DLAMCH. This subroutine is needed because
+*> DLAMCH does not compensate for poor arithmetic in the upper half of
+*> the exponent range, as is found on a Cray.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SMALL (input/output) DOUBLE PRECISION
-* On entry, the underflow threshold as computed by DLAMCH.
-* On exit, if LOG10(LARGE) is sufficiently large, the square
-* root of SMALL, otherwise unchanged.
+*> \param[in,out] SMALL
+*> \verbatim
+*> SMALL is DOUBLE PRECISION
+*> On entry, the underflow threshold as computed by DLAMCH.
+*> On exit, if LOG10(LARGE) is sufficiently large, the square
+*> root of SMALL, otherwise unchanged.
+*> \endverbatim
+*>
+*> \param[in,out] LARGE
+*> \verbatim
+*> LARGE is DOUBLE PRECISION
+*> On entry, the overflow threshold as computed by DLAMCH.
+*> On exit, if LOG10(LARGE) is sufficiently large, the square
+*> root of LARGE, otherwise unchanged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* LARGE (input/output) DOUBLE PRECISION
-* On entry, the overflow threshold as computed by DLAMCH.
-* On exit, if LOG10(LARGE) is sufficiently large, the square
-* root of LARGE, otherwise unchanged.
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ SUBROUTINE DLABAD( SMALL, LARGE )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION LARGE, SMALL
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlabrd.f b/SRC/dlabrd.f
index 0a153af1..e40e7418 100644
--- a/SRC/dlabrd.f
+++ b/SRC/dlabrd.f
@@ -1,137 +1,175 @@
- SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
- $ LDY )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDX, LDY, M, N, NB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
- $ TAUQ( * ), X( LDX, * ), Y( LDY, * )
-* ..
-*
+*> \brief \b DLABRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+* LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDX, LDY, M, N, NB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
+* $ TAUQ( * ), X( LDX, * ), Y( LDY, * )
+* ..
+*
* Purpose
* =======
*
-* DLABRD reduces the first NB rows and columns of a real general
-* m by n matrix A to upper or lower bidiagonal form by an orthogonal
-* transformation Q**T * A * P, and returns the matrices X and Y which
-* are needed to apply the transformation to the unreduced part of A.
-*
-* If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
-* bidiagonal form.
-*
-* This is an auxiliary routine called by DGEBRD
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLABRD reduces the first NB rows and columns of a real general
+*> m by n matrix A to upper or lower bidiagonal form by an orthogonal
+*> transformation Q**T * A * P, and returns the matrices X and Y which
+*> are needed to apply the transformation to the unreduced part of A.
+*>
+*> If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
+*> bidiagonal form.
+*>
+*> This is an auxiliary routine called by DGEBRD
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A.
-*
-* NB (input) INTEGER
-* The number of leading rows and columns of A to be reduced.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the m by n general matrix to be reduced.
-* On exit, the first NB rows and columns of the matrix are
-* overwritten; the rest of the array is unchanged.
-* If m >= n, elements on and below the diagonal in the first NB
-* columns, with the array TAUQ, represent the orthogonal
-* matrix Q as a product of elementary reflectors; and
-* elements above the diagonal in the first NB rows, with the
-* array TAUP, represent the orthogonal matrix P as a product
-* of elementary reflectors.
-* If m < n, elements below the diagonal in the first NB
-* columns, with the array TAUQ, represent the orthogonal
-* matrix Q as a product of elementary reflectors, and
-* elements on and above the diagonal in the first NB rows,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) DOUBLE PRECISION array, dimension (NB)
-* The diagonal elements of the first NB rows and columns of
-* the reduced matrix. D(i) = A(i,i).
-*
-* E (output) DOUBLE PRECISION array, dimension (NB)
-* The off-diagonal elements of the first NB rows and columns of
-* the reduced matrix.
-*
-* TAUQ (output) DOUBLE PRECISION array dimension (NB)
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q. See Further Details.
-*
-* TAUP (output) DOUBLE PRECISION array, dimension (NB)
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix P. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of leading rows and columns of A to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NB)
-* The m-by-nb matrix X required to update the unreduced part
-* of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,M).
+*> \date November 2011
*
-* Y (output) DOUBLE PRECISION array, dimension (LDY,NB)
-* The n-by-nb matrix Y required to update the unreduced part
-* of A.
+*> \ingroup doubleOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (NB)
+*> The diagonal elements of the first NB rows and columns of
+*> the reduced matrix. D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (NB)
+*> The off-diagonal elements of the first NB rows and columns of
+*> the reduced matrix.
+*>
+*> TAUQ (output) DOUBLE PRECISION array dimension (NB)
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Q. See Further Details.
+*>
+*> TAUP (output) DOUBLE PRECISION array, dimension (NB)
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix P. See Further Details.
+*>
+*> X (output) DOUBLE PRECISION array, dimension (LDX,NB)
+*> The m-by-nb matrix X required to update the unreduced part
+*> of A.
+*>
+*> LDX (input) INTEGER
+*> The leading dimension of the array X. LDX >= max(1,M).
+*>
+*> Y (output) DOUBLE PRECISION array, dimension (LDY,NB)
+*> The n-by-nb matrix Y required to update the unreduced part
+*> of A.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors.
+*>
+*> If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
+*> A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
+*> A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The elements of the vectors v and u together form the m-by-nb matrix
+*> V and the nb-by-n matrix U**T which are needed, with X and Y, to apply
+*> the transformation to the unreduced part of the matrix, using a block
+*> update of the form: A := A - V*Y**T - X*U**T.
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with nb = 2:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
+*> ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
+*> ( v1 v2 a a a ) ( v1 1 a a a a )
+*> ( v1 v2 a a a ) ( v1 v2 a a a a )
+*> ( v1 v2 a a a ) ( v1 v2 a a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix which is unchanged,
+*> vi denotes an element of the vector defining H(i), and ui an element
+*> of the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+ $ LDY )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors.
-*
-* If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
-* A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
-* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The elements of the vectors v and u together form the m-by-nb matrix
-* V and the nb-by-n matrix U**T which are needed, with X and Y, to apply
-* the transformation to the unreduced part of the matrix, using a block
-* update of the form: A := A - V*Y**T - X*U**T.
-*
-* The contents of A on exit are illustrated by the following examples
-* with nb = 2:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
-* ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
-* ( v1 v2 a a a ) ( v1 1 a a a a )
-* ( v1 v2 a a a ) ( v1 v2 a a a a )
-* ( v1 v2 a a a ) ( v1 v2 a a a a )
-* ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix which is unchanged,
-* vi denotes an element of the vector defining H(i), and ui an element
-* of the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER LDA, LDX, LDY, M, N, NB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ),
+ $ TAUQ( * ), X( LDX, * ), Y( LDY, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlacn2.f b/SRC/dlacn2.f
index 7550f1dc..28a22acc 100644
--- a/SRC/dlacn2.f
+++ b/SRC/dlacn2.f
@@ -1,75 +1,141 @@
- SUBROUTINE DLACN2( N, V, X, ISGN, EST, KASE, ISAVE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KASE, N
- DOUBLE PRECISION EST
-* ..
-* .. Array Arguments ..
- INTEGER ISGN( * ), ISAVE( 3 )
- DOUBLE PRECISION V( * ), X( * )
-* ..
-*
+*> \brief \b DLACN2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLACN2( N, V, X, ISGN, EST, KASE, ISAVE )
+*
+* .. Scalar Arguments ..
+* INTEGER KASE, N
+* DOUBLE PRECISION EST
+* ..
+* .. Array Arguments ..
+* INTEGER ISGN( * ), ISAVE( 3 )
+* DOUBLE PRECISION V( * ), X( * )
+* ..
+*
* Purpose
* =======
*
-* DLACN2 estimates the 1-norm of a square, real matrix A.
-* Reverse communication is used for evaluating matrix-vector products.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLACN2 estimates the 1-norm of a square, real matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 1.
-*
-* V (workspace) DOUBLE PRECISION array, dimension (N)
-* On the final return, V = A*W, where EST = norm(V)/norm(W)
-* (W is not returned).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (N)
-* On an intermediate return, X should be overwritten by
-* A * X, if KASE=1,
-* A**T * X, if KASE=2,
-* and DLACN2 must be re-called with all the other parameters
-* unchanged.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (N)
+*> On the final return, V = A*W, where EST = norm(V)/norm(W)
+*> (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> On an intermediate return, X should be overwritten by
+*> A * X, if KASE=1,
+*> A**T * X, if KASE=2,
+*> and DLACN2 must be re-called with all the other parameters
+*> unchanged.
+*> \endverbatim
+*>
+*> \param[out] ISGN
+*> \verbatim
+*> ISGN is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*> EST is DOUBLE PRECISION
+*> On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
+*> unchanged from the previous call to DLACN2.
+*> On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*> KASE is INTEGER
+*> On the initial call to DLACN2, KASE should be 0.
+*> On an intermediate return, KASE will be 1 or 2, indicating
+*> whether X should be overwritten by A * X or A**T * X.
+*> On the final return from DLACN2, KASE will again be 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISAVE
+*> \verbatim
+*> ISAVE is INTEGER array, dimension (3)
+*> ISAVE is used to save variables between calls to DLACN2
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ISGN (workspace) INTEGER array, dimension (N)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* EST (input/output) DOUBLE PRECISION
-* On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
-* unchanged from the previous call to DLACN2.
-* On exit, EST is an estimate (a lower bound) for norm(A).
+*> \date November 2011
*
-* KASE (input/output) INTEGER
-* On the initial call to DLACN2, KASE should be 0.
-* On an intermediate return, KASE will be 1 or 2, indicating
-* whether X should be overwritten by A * X or A**T * X.
-* On the final return from DLACN2, KASE will again be 0.
+*> \ingroup doubleOTHERauxiliary
*
-* ISAVE (input/output) INTEGER array, dimension (3)
-* ISAVE is used to save variables between calls to DLACN2
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Contributed by Nick Higham, University of Manchester.
+*> Originally named SONEST, dated March 16, 1988.
+*>
+*> Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*> a real or complex matrix, with applications to condition estimation",
+*> ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*> This is a thread safe version of DLACON, which uses the array ISAVE
+*> in place of a SAVE statement, as follows:
+*>
+*> DLACON DLACN2
+*> JUMP ISAVE(1)
+*> J ISAVE(2)
+*> ITER ISAVE(3)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLACN2( N, V, X, ISGN, EST, KASE, ISAVE )
*
-* Contributed by Nick Higham, University of Manchester.
-* Originally named SONEST, dated March 16, 1988.
-*
-* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
-* a real or complex matrix, with applications to condition estimation",
-* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
-*
-* This is a thread safe version of DLACON, which uses the array ISAVE
-* in place of a SAVE statement, as follows:
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DLACON DLACN2
-* JUMP ISAVE(1)
-* J ISAVE(2)
-* ITER ISAVE(3)
+* .. Scalar Arguments ..
+ INTEGER KASE, N
+ DOUBLE PRECISION EST
+* ..
+* .. Array Arguments ..
+ INTEGER ISGN( * ), ISAVE( 3 )
+ DOUBLE PRECISION V( * ), X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlacon.f b/SRC/dlacon.f
index 3b050e15..39719115 100644
--- a/SRC/dlacon.f
+++ b/SRC/dlacon.f
@@ -1,64 +1,129 @@
- SUBROUTINE DLACON( N, V, X, ISGN, EST, KASE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KASE, N
- DOUBLE PRECISION EST
-* ..
-* .. Array Arguments ..
- INTEGER ISGN( * )
- DOUBLE PRECISION V( * ), X( * )
-* ..
-*
+*> \brief \b DLACON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLACON( N, V, X, ISGN, EST, KASE )
+*
+* .. Scalar Arguments ..
+* INTEGER KASE, N
+* DOUBLE PRECISION EST
+* ..
+* .. Array Arguments ..
+* INTEGER ISGN( * )
+* DOUBLE PRECISION V( * ), X( * )
+* ..
+*
* Purpose
* =======
*
-* DLACON estimates the 1-norm of a square, real matrix A.
-* Reverse communication is used for evaluating matrix-vector products.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLACON estimates the 1-norm of a square, real matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 1.
-*
-* V (workspace) DOUBLE PRECISION array, dimension (N)
-* On the final return, V = A*W, where EST = norm(V)/norm(W)
-* (W is not returned).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (N)
+*> On the final return, V = A*W, where EST = norm(V)/norm(W)
+*> (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> On an intermediate return, X should be overwritten by
+*> A * X, if KASE=1,
+*> A**T * X, if KASE=2,
+*> and DLACON must be re-called with all the other parameters
+*> unchanged.
+*> \endverbatim
+*>
+*> \param[out] ISGN
+*> \verbatim
+*> ISGN is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*> EST is DOUBLE PRECISION
+*> On entry with KASE = 1 or 2 and JUMP = 3, EST should be
+*> unchanged from the previous call to DLACON.
+*> On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*> KASE is INTEGER
+*> On the initial call to DLACON, KASE should be 0.
+*> On an intermediate return, KASE will be 1 or 2, indicating
+*> whether X should be overwritten by A * X or A**T * X.
+*> On the final return from DLACON, KASE will again be 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input/output) DOUBLE PRECISION array, dimension (N)
-* On an intermediate return, X should be overwritten by
-* A * X, if KASE=1,
-* A**T * X, if KASE=2,
-* and DLACON must be re-called with all the other parameters
-* unchanged.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ISGN (workspace) INTEGER array, dimension (N)
+*> \date November 2011
*
-* EST (input/output) DOUBLE PRECISION
-* On entry with KASE = 1 or 2 and JUMP = 3, EST should be
-* unchanged from the previous call to DLACON.
-* On exit, EST is an estimate (a lower bound) for norm(A).
+*> \ingroup doubleOTHERauxiliary
*
-* KASE (input/output) INTEGER
-* On the initial call to DLACON, KASE should be 0.
-* On an intermediate return, KASE will be 1 or 2, indicating
-* whether X should be overwritten by A * X or A**T * X.
-* On the final return from DLACON, KASE will again be 0.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> Contributed by Nick Higham, University of Manchester.
+*> Originally named SONEST, dated March 16, 1988.
+*>
+*> Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*> a real or complex matrix, with applications to condition estimation",
+*> ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLACON( N, V, X, ISGN, EST, KASE )
*
-* Contributed by Nick Higham, University of Manchester.
-* Originally named SONEST, dated March 16, 1988.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
-* a real or complex matrix, with applications to condition estimation",
-* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+* .. Scalar Arguments ..
+ INTEGER KASE, N
+ DOUBLE PRECISION EST
+* ..
+* .. Array Arguments ..
+ INTEGER ISGN( * )
+ DOUBLE PRECISION V( * ), X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlacpy.f b/SRC/dlacpy.f
index 94694de5..0f2657f1 100644
--- a/SRC/dlacpy.f
+++ b/SRC/dlacpy.f
@@ -1,52 +1,112 @@
- SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDB, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DLACPY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DLACPY copies all or part of a two-dimensional matrix A to another
-* matrix B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLACPY copies all or part of a two-dimensional matrix A to another
+*> matrix B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be copied to B.
-* = 'U': Upper triangular part
-* = 'L': Lower triangular part
-* Otherwise: All of the matrix A
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be copied to B.
+*> = 'U': Upper triangular part
+*> = 'L': Lower triangular part
+*> Otherwise: All of the matrix A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m by n matrix A. If UPLO = 'U', only the upper triangle
+*> or trapezoid is accessed; if UPLO = 'L', only the lower
+*> triangle or trapezoid is accessed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> On exit, B = A in the locations specified by UPLO.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \date November 2011
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m by n matrix A. If UPLO = 'U', only the upper triangle
-* or trapezoid is accessed; if UPLO = 'L', only the lower
-* triangle or trapezoid is accessed.
+*> \ingroup auxOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
*
-* B (output) DOUBLE PRECISION array, dimension (LDB,N)
-* On exit, B = A in the locations specified by UPLO.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dladiv.f b/SRC/dladiv.f
index 3ff46eba..b2c9c037 100644
--- a/SRC/dladiv.f
+++ b/SRC/dladiv.f
@@ -1,42 +1,95 @@
- SUBROUTINE DLADIV( A, B, C, D, P, Q )
+*> \brief \b DLADIV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION A, B, C, D, P, Q
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLADIV( A, B, C, D, P, Q )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION A, B, C, D, P, Q
+* ..
+*
* Purpose
* =======
*
-* DLADIV performs complex division in real arithmetic
-*
-* a + i*b
-* p + i*q = ---------
-* c + i*d
-*
-* The algorithm is due to Robert L. Smith and can be found
-* in D. Knuth, The art of Computer Programming, Vol.2, p.195
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLADIV performs complex division in real arithmetic
+*>
+*> a + i*b
+*> p + i*q = ---------
+*> c + i*d
+*>
+*> The algorithm is due to Robert L. Smith and can be found
+*> in D. Knuth, The art of Computer Programming, Vol.2, p.195
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) DOUBLE PRECISION
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION
+*> The scalars a, b, c, and d in the above expression.
+*> \endverbatim
+*>
+*> \param[out] P
+*> \verbatim
+*> P is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION
+*> The scalars p and q in the above expression.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* B (input) DOUBLE PRECISION
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input) DOUBLE PRECISION
+*> \date November 2011
*
-* D (input) DOUBLE PRECISION
-* The scalars a, b, c, and d in the above expression.
+*> \ingroup auxOTHERauxiliary
*
-* P (output) DOUBLE PRECISION
+* =====================================================================
+ SUBROUTINE DLADIV( A, B, C, D, P, Q )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Q (output) DOUBLE PRECISION
-* The scalars p and q in the above expression.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION A, B, C, D, P, Q
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlae2.f b/SRC/dlae2.f
index a1e47519..8c312f77 100644
--- a/SRC/dlae2.f
+++ b/SRC/dlae2.f
@@ -1,54 +1,109 @@
- SUBROUTINE DLAE2( A, B, C, RT1, RT2 )
+*> \brief \b DLAE2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION A, B, C, RT1, RT2
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAE2( A, B, C, RT1, RT2 )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION A, B, C, RT1, RT2
+* ..
+*
* Purpose
* =======
*
-* DLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix
-* [ A B ]
-* [ B C ].
-* On return, RT1 is the eigenvalue of larger absolute value, and RT2
-* is the eigenvalue of smaller absolute value.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix
+*> [ A B ]
+*> [ B C ].
+*> On return, RT1 is the eigenvalue of larger absolute value, and RT2
+*> is the eigenvalue of smaller absolute value.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) DOUBLE PRECISION
-* The (1,1) element of the 2-by-2 matrix.
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION
+*> The (1,2) and (2,1) elements of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] RT1
+*> \verbatim
+*> RT1 is DOUBLE PRECISION
+*> The eigenvalue of larger absolute value.
+*> \endverbatim
+*>
+*> \param[out] RT2
+*> \verbatim
+*> RT2 is DOUBLE PRECISION
+*> The eigenvalue of smaller absolute value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* B (input) DOUBLE PRECISION
-* The (1,2) and (2,1) elements of the 2-by-2 matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input) DOUBLE PRECISION
-* The (2,2) element of the 2-by-2 matrix.
+*> \date November 2011
*
-* RT1 (output) DOUBLE PRECISION
-* The eigenvalue of larger absolute value.
+*> \ingroup auxOTHERauxiliary
*
-* RT2 (output) DOUBLE PRECISION
-* The eigenvalue of smaller absolute value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> RT1 is accurate to a few ulps barring over/underflow.
+*>
+*> RT2 may be inaccurate if there is massive cancellation in the
+*> determinant A*C-B*B; higher precision or correctly rounded or
+*> correctly truncated arithmetic would be needed to compute RT2
+*> accurately in all cases.
+*>
+*> Overflow is possible only if RT1 is within a factor of 5 of overflow.
+*> Underflow is harmless if the input data is 0 or exceeds
+*> underflow_threshold / macheps.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAE2( A, B, C, RT1, RT2 )
*
-* RT1 is accurate to a few ulps barring over/underflow.
-*
-* RT2 may be inaccurate if there is massive cancellation in the
-* determinant A*C-B*B; higher precision or correctly rounded or
-* correctly truncated arithmetic would be needed to compute RT2
-* accurately in all cases.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Overflow is possible only if RT1 is within a factor of 5 of overflow.
-* Underflow is harmless if the input data is 0 or exceeds
-* underflow_threshold / macheps.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION A, B, C, RT1, RT2
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaebz.f b/SRC/dlaebz.f
index 4226ae06..eabda879 100644
--- a/SRC/dlaebz.f
+++ b/SRC/dlaebz.f
@@ -1,3 +1,314 @@
+*> \brief \b DLAEBZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAEBZ( IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL,
+* RELTOL, PIVMIN, D, E, E2, NVAL, AB, C, MOUT,
+* NAB, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IJOB, INFO, MINP, MMAX, MOUT, N, NBMIN, NITMAX
+* DOUBLE PRECISION ABSTOL, PIVMIN, RELTOL
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * ), NAB( MMAX, * ), NVAL( * )
+* DOUBLE PRECISION AB( MMAX, * ), C( * ), D( * ), E( * ), E2( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAEBZ contains the iteration loops which compute and use the
+*> function N(w), which is the count of eigenvalues of a symmetric
+*> tridiagonal matrix T less than or equal to its argument w. It
+*> performs a choice of two types of loops:
+*>
+*> IJOB=1, followed by
+*> IJOB=2: It takes as input a list of intervals and returns a list of
+*> sufficiently small intervals whose union contains the same
+*> eigenvalues as the union of the original intervals.
+*> The input intervals are (AB(j,1),AB(j,2)], j=1,...,MINP.
+*> The output interval (AB(j,1),AB(j,2)] will contain
+*> eigenvalues NAB(j,1)+1,...,NAB(j,2), where 1 <= j <= MOUT.
+*>
+*> IJOB=3: It performs a binary search in each input interval
+*> (AB(j,1),AB(j,2)] for a point w(j) such that
+*> N(w(j))=NVAL(j), and uses C(j) as the starting point of
+*> the search. If such a w(j) is found, then on output
+*> AB(j,1)=AB(j,2)=w. If no such w(j) is found, then on output
+*> (AB(j,1),AB(j,2)] will be a small interval containing the
+*> point where N(w) jumps through NVAL(j), unless that point
+*> lies outside the initial interval.
+*>
+*> Note that the intervals are in all cases half-open intervals,
+*> i.e., of the form (a,b] , which includes b but not a .
+*>
+*> To avoid underflow, the matrix should be scaled so that its largest
+*> element is no greater than overflow**(1/2) * underflow**(1/4)
+*> in absolute value. To assure the most accurate computation
+*> of small eigenvalues, the matrix should be scaled to be
+*> not much smaller than that, either.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966
+*>
+*> Note: the arguments are, in general, *not* checked for unreasonable
+*> values.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what is to be done:
+*> = 1: Compute NAB for the initial intervals.
+*> = 2: Perform bisection iteration to find eigenvalues of T.
+*> = 3: Perform bisection iteration to invert N(w), i.e.,
+*> to find a point which has a specified number of
+*> eigenvalues of T to its left.
+*> Other values will cause DLAEBZ to return with INFO=-1.
+*> \endverbatim
+*>
+*> \param[in] NITMAX
+*> \verbatim
+*> NITMAX is INTEGER
+*> The maximum number of "levels" of bisection to be
+*> performed, i.e., an interval of width W will not be made
+*> smaller than 2^(-NITMAX) * W. If not all intervals
+*> have converged after NITMAX iterations, then INFO is set
+*> to the number of non-converged intervals.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension n of the tridiagonal matrix T. It must be at
+*> least 1.
+*> \endverbatim
+*>
+*> \param[in] MMAX
+*> \verbatim
+*> MMAX is INTEGER
+*> The maximum number of intervals. If more than MMAX intervals
+*> are generated, then DLAEBZ will quit with INFO=MMAX+1.
+*> \endverbatim
+*>
+*> \param[in] MINP
+*> \verbatim
+*> MINP is INTEGER
+*> The initial number of intervals. It may not be greater than
+*> MMAX.
+*> \endverbatim
+*>
+*> \param[in] NBMIN
+*> \verbatim
+*> NBMIN is INTEGER
+*> The smallest number of intervals that should be processed
+*> using a vector loop. If zero, then only the scalar loop
+*> will be used.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The minimum (absolute) width of an interval. When an
+*> interval is narrower than ABSTOL, or than RELTOL times the
+*> larger (in magnitude) endpoint, then it is considered to be
+*> sufficiently small, i.e., converged. This must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] RELTOL
+*> \verbatim
+*> RELTOL is DOUBLE PRECISION
+*> The minimum relative width of an interval. When an interval
+*> is narrower than ABSTOL, or than RELTOL times the larger (in
+*> magnitude) endpoint, then it is considered to be
+*> sufficiently small, i.e., converged. Note: this should
+*> always be at least radix*machine epsilon.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum absolute value of a "pivot" in the Sturm
+*> sequence loop.
+*> This must be at least max |e(j)**2|*safe_min and at
+*> least safe_min, where safe_min is at least
+*> the smallest number that can divide one without overflow.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> The offdiagonal elements of the tridiagonal matrix T in
+*> positions 1 through N-1. E(N) is arbitrary.
+*> \endverbatim
+*>
+*> \param[in] E2
+*> \verbatim
+*> E2 is DOUBLE PRECISION array, dimension (N)
+*> The squares of the offdiagonal elements of the tridiagonal
+*> matrix T. E2(N) is ignored.
+*> \endverbatim
+*>
+*> \param[in,out] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (MINP)
+*> If IJOB=1 or 2, not referenced.
+*> If IJOB=3, the desired values of N(w). The elements of NVAL
+*> will be reordered to correspond with the intervals in AB.
+*> Thus, NVAL(j) on output will not, in general be the same as
+*> NVAL(j) on input, but it will correspond with the interval
+*> (AB(j,1),AB(j,2)] on output.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (MMAX,2)
+*> The endpoints of the intervals. AB(j,1) is a(j), the left
+*> endpoint of the j-th interval, and AB(j,2) is b(j), the
+*> right endpoint of the j-th interval. The input intervals
+*> will, in general, be modified, split, and reordered by the
+*> calculation.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (MMAX)
+*> If IJOB=1, ignored.
+*> If IJOB=2, workspace.
+*> If IJOB=3, then on input C(j) should be initialized to the
+*> first search point in the binary search.
+*> \endverbatim
+*>
+*> \param[out] MOUT
+*> \verbatim
+*> MOUT is INTEGER
+*> If IJOB=1, the number of eigenvalues in the intervals.
+*> If IJOB=2 or 3, the number of intervals output.
+*> If IJOB=3, MOUT will equal MINP.
+*> \endverbatim
+*>
+*> \param[in,out] NAB
+*> \verbatim
+*> NAB is INTEGER array, dimension (MMAX,2)
+*> If IJOB=1, then on output NAB(i,j) will be set to N(AB(i,j)).
+*> If IJOB=2, then on input, NAB(i,j) should be set. It must
+*> satisfy the condition:
+*> N(AB(i,1)) <= NAB(i,1) <= NAB(i,2) <= N(AB(i,2)),
+*> which means that in interval i only eigenvalues
+*> NAB(i,1)+1,...,NAB(i,2) will be considered. Usually,
+*> NAB(i,j)=N(AB(i,j)), from a previous call to DLAEBZ with
+*> IJOB=1.
+*> On output, NAB(i,j) will contain
+*> max(na(k),min(nb(k),N(AB(i,j)))), where k is the index of
+*> the input interval that the output interval
+*> (AB(j,1),AB(j,2)] came from, and na(k) and nb(k) are the
+*> the input values of NAB(k,1) and NAB(k,2).
+*> If IJOB=3, then on output, NAB(i,j) contains N(AB(i,j)),
+*> unless N(w) > NVAL(i) for all search points w , in which
+*> case NAB(i,1) will not be modified, i.e., the output
+*> value will be the same as the input value (modulo
+*> reorderings -- see NVAL and AB), or unless N(w) < NVAL(i)
+*> for all search points w , in which case NAB(i,2) will
+*> not be modified. Normally, NAB should be set to some
+*> distinctive value(s) before DLAEBZ is called.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MMAX)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MMAX)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: All intervals converged.
+*> = 1--MMAX: The last INFO intervals did not converge.
+*> = MMAX+1: More than MMAX intervals were generated.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine is intended to be called only by other LAPACK
+*> routines, thus the interface is less user-friendly. It is intended
+*> for two purposes:
+*>
+*> (a) finding eigenvalues. In this case, DLAEBZ should have one or
+*> more initial intervals set up in AB, and DLAEBZ should be called
+*> with IJOB=1. This sets up NAB, and also counts the eigenvalues.
+*> Intervals with no eigenvalues would usually be thrown out at
+*> this point. Also, if not all the eigenvalues in an interval i
+*> are desired, NAB(i,1) can be increased or NAB(i,2) decreased.
+*> For example, set NAB(i,1)=NAB(i,2)-1 to get the largest
+*> eigenvalue. DLAEBZ is then called with IJOB=2 and MMAX
+*> no smaller than the value of MOUT returned by the call with
+*> IJOB=1. After this (IJOB=2) call, eigenvalues NAB(i,1)+1
+*> through NAB(i,2) are approximately AB(i,1) (or AB(i,2)) to the
+*> tolerance specified by ABSTOL and RELTOL.
+*>
+*> (b) finding an interval (a',b'] containing eigenvalues w(f),...,w(l).
+*> In this case, start with a Gershgorin interval (a,b). Set up
+*> AB to contain 2 search intervals, both initially (a,b). One
+*> NVAL element should contain f-1 and the other should contain l
+*> , while C should contain a and b, resp. NAB(i,1) should be -1
+*> and NAB(i,2) should be N+1, to flag an error if the desired
+*> interval does not lie in (a,b). DLAEBZ is then called with
+*> IJOB=3. On exit, if w(f-1) < w(f), then one of the intervals --
+*> j -- will have AB(j,1)=AB(j,2) and NAB(j,1)=NAB(j,2)=f-1, while
+*> if, to the specified tolerance, w(f-k)=...=w(f+r), k > 0 and r
+*> >= 0, then the interval will have N(AB(j,1))=NAB(j,1)=f-k and
+*> N(AB(j,2))=NAB(j,2)=f+r. The cases w(l) < w(l+1) and
+*> w(l-r)=...=w(l+k) are handled similarly.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAEBZ( IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL,
$ RELTOL, PIVMIN, D, E, E2, NVAL, AB, C, MOUT,
$ NAB, WORK, IWORK, INFO )
@@ -5,7 +316,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IJOB, INFO, MINP, MMAX, MOUT, N, NBMIN, NITMAX
@@ -17,209 +328,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAEBZ contains the iteration loops which compute and use the
-* function N(w), which is the count of eigenvalues of a symmetric
-* tridiagonal matrix T less than or equal to its argument w. It
-* performs a choice of two types of loops:
-*
-* IJOB=1, followed by
-* IJOB=2: It takes as input a list of intervals and returns a list of
-* sufficiently small intervals whose union contains the same
-* eigenvalues as the union of the original intervals.
-* The input intervals are (AB(j,1),AB(j,2)], j=1,...,MINP.
-* The output interval (AB(j,1),AB(j,2)] will contain
-* eigenvalues NAB(j,1)+1,...,NAB(j,2), where 1 <= j <= MOUT.
-*
-* IJOB=3: It performs a binary search in each input interval
-* (AB(j,1),AB(j,2)] for a point w(j) such that
-* N(w(j))=NVAL(j), and uses C(j) as the starting point of
-* the search. If such a w(j) is found, then on output
-* AB(j,1)=AB(j,2)=w. If no such w(j) is found, then on output
-* (AB(j,1),AB(j,2)] will be a small interval containing the
-* point where N(w) jumps through NVAL(j), unless that point
-* lies outside the initial interval.
-*
-* Note that the intervals are in all cases half-open intervals,
-* i.e., of the form (a,b] , which includes b but not a .
-*
-* To avoid underflow, the matrix should be scaled so that its largest
-* element is no greater than overflow**(1/2) * underflow**(1/4)
-* in absolute value. To assure the most accurate computation
-* of small eigenvalues, the matrix should be scaled to be
-* not much smaller than that, either.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966
-*
-* Note: the arguments are, in general, *not* checked for unreasonable
-* values.
-*
-* Arguments
-* =========
-*
-* IJOB (input) INTEGER
-* Specifies what is to be done:
-* = 1: Compute NAB for the initial intervals.
-* = 2: Perform bisection iteration to find eigenvalues of T.
-* = 3: Perform bisection iteration to invert N(w), i.e.,
-* to find a point which has a specified number of
-* eigenvalues of T to its left.
-* Other values will cause DLAEBZ to return with INFO=-1.
-*
-* NITMAX (input) INTEGER
-* The maximum number of "levels" of bisection to be
-* performed, i.e., an interval of width W will not be made
-* smaller than 2^(-NITMAX) * W. If not all intervals
-* have converged after NITMAX iterations, then INFO is set
-* to the number of non-converged intervals.
-*
-* N (input) INTEGER
-* The dimension n of the tridiagonal matrix T. It must be at
-* least 1.
-*
-* MMAX (input) INTEGER
-* The maximum number of intervals. If more than MMAX intervals
-* are generated, then DLAEBZ will quit with INFO=MMAX+1.
-*
-* MINP (input) INTEGER
-* The initial number of intervals. It may not be greater than
-* MMAX.
-*
-* NBMIN (input) INTEGER
-* The smallest number of intervals that should be processed
-* using a vector loop. If zero, then only the scalar loop
-* will be used.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The minimum (absolute) width of an interval. When an
-* interval is narrower than ABSTOL, or than RELTOL times the
-* larger (in magnitude) endpoint, then it is considered to be
-* sufficiently small, i.e., converged. This must be at least
-* zero.
-*
-* RELTOL (input) DOUBLE PRECISION
-* The minimum relative width of an interval. When an interval
-* is narrower than ABSTOL, or than RELTOL times the larger (in
-* magnitude) endpoint, then it is considered to be
-* sufficiently small, i.e., converged. Note: this should
-* always be at least radix*machine epsilon.
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum absolute value of a "pivot" in the Sturm
-* sequence loop.
-* This must be at least max |e(j)**2|*safe_min and at
-* least safe_min, where safe_min is at least
-* the smallest number that can divide one without overflow.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T.
-*
-* E (input) DOUBLE PRECISION array, dimension (N)
-* The offdiagonal elements of the tridiagonal matrix T in
-* positions 1 through N-1. E(N) is arbitrary.
-*
-* E2 (input) DOUBLE PRECISION array, dimension (N)
-* The squares of the offdiagonal elements of the tridiagonal
-* matrix T. E2(N) is ignored.
-*
-* NVAL (input/output) INTEGER array, dimension (MINP)
-* If IJOB=1 or 2, not referenced.
-* If IJOB=3, the desired values of N(w). The elements of NVAL
-* will be reordered to correspond with the intervals in AB.
-* Thus, NVAL(j) on output will not, in general be the same as
-* NVAL(j) on input, but it will correspond with the interval
-* (AB(j,1),AB(j,2)] on output.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (MMAX,2)
-* The endpoints of the intervals. AB(j,1) is a(j), the left
-* endpoint of the j-th interval, and AB(j,2) is b(j), the
-* right endpoint of the j-th interval. The input intervals
-* will, in general, be modified, split, and reordered by the
-* calculation.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (MMAX)
-* If IJOB=1, ignored.
-* If IJOB=2, workspace.
-* If IJOB=3, then on input C(j) should be initialized to the
-* first search point in the binary search.
-*
-* MOUT (output) INTEGER
-* If IJOB=1, the number of eigenvalues in the intervals.
-* If IJOB=2 or 3, the number of intervals output.
-* If IJOB=3, MOUT will equal MINP.
-*
-* NAB (input/output) INTEGER array, dimension (MMAX,2)
-* If IJOB=1, then on output NAB(i,j) will be set to N(AB(i,j)).
-* If IJOB=2, then on input, NAB(i,j) should be set. It must
-* satisfy the condition:
-* N(AB(i,1)) <= NAB(i,1) <= NAB(i,2) <= N(AB(i,2)),
-* which means that in interval i only eigenvalues
-* NAB(i,1)+1,...,NAB(i,2) will be considered. Usually,
-* NAB(i,j)=N(AB(i,j)), from a previous call to DLAEBZ with
-* IJOB=1.
-* On output, NAB(i,j) will contain
-* max(na(k),min(nb(k),N(AB(i,j)))), where k is the index of
-* the input interval that the output interval
-* (AB(j,1),AB(j,2)] came from, and na(k) and nb(k) are the
-* the input values of NAB(k,1) and NAB(k,2).
-* If IJOB=3, then on output, NAB(i,j) contains N(AB(i,j)),
-* unless N(w) > NVAL(i) for all search points w , in which
-* case NAB(i,1) will not be modified, i.e., the output
-* value will be the same as the input value (modulo
-* reorderings -- see NVAL and AB), or unless N(w) < NVAL(i)
-* for all search points w , in which case NAB(i,2) will
-* not be modified. Normally, NAB should be set to some
-* distinctive value(s) before DLAEBZ is called.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MMAX)
-* Workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (MMAX)
-* Workspace.
-*
-* INFO (output) INTEGER
-* = 0: All intervals converged.
-* = 1--MMAX: The last INFO intervals did not converge.
-* = MMAX+1: More than MMAX intervals were generated.
-*
-* Further Details
-* ===============
-*
-* This routine is intended to be called only by other LAPACK
-* routines, thus the interface is less user-friendly. It is intended
-* for two purposes:
-*
-* (a) finding eigenvalues. In this case, DLAEBZ should have one or
-* more initial intervals set up in AB, and DLAEBZ should be called
-* with IJOB=1. This sets up NAB, and also counts the eigenvalues.
-* Intervals with no eigenvalues would usually be thrown out at
-* this point. Also, if not all the eigenvalues in an interval i
-* are desired, NAB(i,1) can be increased or NAB(i,2) decreased.
-* For example, set NAB(i,1)=NAB(i,2)-1 to get the largest
-* eigenvalue. DLAEBZ is then called with IJOB=2 and MMAX
-* no smaller than the value of MOUT returned by the call with
-* IJOB=1. After this (IJOB=2) call, eigenvalues NAB(i,1)+1
-* through NAB(i,2) are approximately AB(i,1) (or AB(i,2)) to the
-* tolerance specified by ABSTOL and RELTOL.
-*
-* (b) finding an interval (a',b'] containing eigenvalues w(f),...,w(l).
-* In this case, start with a Gershgorin interval (a,b). Set up
-* AB to contain 2 search intervals, both initially (a,b). One
-* NVAL element should contain f-1 and the other should contain l
-* , while C should contain a and b, resp. NAB(i,1) should be -1
-* and NAB(i,2) should be N+1, to flag an error if the desired
-* interval does not lie in (a,b). DLAEBZ is then called with
-* IJOB=3. On exit, if w(f-1) < w(f), then one of the intervals --
-* j -- will have AB(j,1)=AB(j,2) and NAB(j,1)=NAB(j,2)=f-1, while
-* if, to the specified tolerance, w(f-k)=...=w(f+r), k > 0 and r
-* >= 0, then the interval will have N(AB(j,1))=NAB(j,1)=f-k and
-* N(AB(j,2))=NAB(j,2)=f+r. The cases w(l) < w(l+1) and
-* w(l-r)=...=w(l+k) are handled similarly.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaed0.f b/SRC/dlaed0.f
index 5816070b..7d5009ab 100644
--- a/SRC/dlaed0.f
+++ b/SRC/dlaed0.f
@@ -1,10 +1,179 @@
+*> \brief \b DLAED0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED0( ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, LDQ, LDQS, N, QSIZ
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), Q( LDQ, * ), QSTORE( LDQS, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAED0 computes all eigenvalues and corresponding eigenvectors of a
+*> symmetric tridiagonal matrix using the divide and conquer method.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> = 0: Compute eigenvalues only.
+*> = 1: Compute eigenvectors of original dense symmetric matrix
+*> also. On entry, Q contains the orthogonal matrix used
+*> to reduce the original matrix to tridiagonal form.
+*> = 2: Compute eigenvalues and eigenvectors of tridiagonal
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the orthogonal matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the main diagonal of the tridiagonal matrix.
+*> On exit, its eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, N)
+*> On entry, Q must contain an N-by-N orthogonal matrix.
+*> If ICOMPQ = 0 Q is not referenced.
+*> If ICOMPQ = 1 On entry, Q is a subset of the columns of the
+*> orthogonal matrix used to reduce the full
+*> matrix to tridiagonal form corresponding to
+*> the subset of the full matrix which is being
+*> decomposed at this time.
+*> If ICOMPQ = 2 On entry, Q will be the identity matrix.
+*> On exit, Q contains the eigenvectors of the
+*> tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If eigenvectors are
+*> desired, then LDQ >= max(1,N). In any case, LDQ >= 1.
+*> \endverbatim
+*>
+*> \param[out] QSTORE
+*> \verbatim
+*> QSTORE is DOUBLE PRECISION array, dimension (LDQS, N)
+*> Referenced only when ICOMPQ = 1. Used to store parts of
+*> the eigenvector matrix when the updating matrix multiplies
+*> take place.
+*> \endverbatim
+*>
+*> \param[in] LDQS
+*> \verbatim
+*> LDQS is INTEGER
+*> The leading dimension of the array QSTORE. If ICOMPQ = 1,
+*> then LDQS >= max(1,N). In any case, LDQS >= 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> If ICOMPQ = 0 or 1, the dimension of WORK must be at least
+*> 1 + 3*N + 2*N*lg N + 3*N**2
+*> ( lg( N ) = smallest integer k
+*> such that 2^k >= N )
+*> If ICOMPQ = 2, the dimension of WORK must be at least
+*> 4*N + N**2.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array,
+*> If ICOMPQ = 0 or 1, the dimension of IWORK must be at least
+*> 6 + 6*N + 5*N*lg N.
+*> ( lg( N ) = smallest integer k
+*> such that 2^k >= N )
+*> If ICOMPQ = 2, the dimension of IWORK must be at least
+*> 3 + 5*N.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute an eigenvalue while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAED0( ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, LDQ, LDQS, N, QSIZ
@@ -15,93 +184,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAED0 computes all eigenvalues and corresponding eigenvectors of a
-* symmetric tridiagonal matrix using the divide and conquer method.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* = 0: Compute eigenvalues only.
-* = 1: Compute eigenvectors of original dense symmetric matrix
-* also. On entry, Q contains the orthogonal matrix used
-* to reduce the original matrix to tridiagonal form.
-* = 2: Compute eigenvalues and eigenvectors of tridiagonal
-* matrix.
-*
-* QSIZ (input) INTEGER
-* The dimension of the orthogonal matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the main diagonal of the tridiagonal matrix.
-* On exit, its eigenvalues.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix.
-* On exit, E has been destroyed.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ, N)
-* On entry, Q must contain an N-by-N orthogonal matrix.
-* If ICOMPQ = 0 Q is not referenced.
-* If ICOMPQ = 1 On entry, Q is a subset of the columns of the
-* orthogonal matrix used to reduce the full
-* matrix to tridiagonal form corresponding to
-* the subset of the full matrix which is being
-* decomposed at this time.
-* If ICOMPQ = 2 On entry, Q will be the identity matrix.
-* On exit, Q contains the eigenvectors of the
-* tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If eigenvectors are
-* desired, then LDQ >= max(1,N). In any case, LDQ >= 1.
-*
-* QSTORE (workspace) DOUBLE PRECISION array, dimension (LDQS, N)
-* Referenced only when ICOMPQ = 1. Used to store parts of
-* the eigenvector matrix when the updating matrix multiplies
-* take place.
-*
-* LDQS (input) INTEGER
-* The leading dimension of the array QSTORE. If ICOMPQ = 1,
-* then LDQS >= max(1,N). In any case, LDQS >= 1.
-*
-* WORK (workspace) DOUBLE PRECISION array,
-* If ICOMPQ = 0 or 1, the dimension of WORK must be at least
-* 1 + 3*N + 2*N*lg N + 3*N**2
-* ( lg( N ) = smallest integer k
-* such that 2^k >= N )
-* If ICOMPQ = 2, the dimension of WORK must be at least
-* 4*N + N**2.
-*
-* IWORK (workspace) INTEGER array,
-* If ICOMPQ = 0 or 1, the dimension of IWORK must be at least
-* 6 + 6*N + 5*N*lg N.
-* ( lg( N ) = smallest integer k
-* such that 2^k >= N )
-* If ICOMPQ = 2, the dimension of IWORK must be at least
-* 3 + 5*N.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute an eigenvalue while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaed1.f b/SRC/dlaed1.f
index df64289c..2a9aa24c 100644
--- a/SRC/dlaed1.f
+++ b/SRC/dlaed1.f
@@ -1,103 +1,179 @@
- SUBROUTINE DLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER CUTPNT, INFO, LDQ, N
- DOUBLE PRECISION RHO
-* ..
-* .. Array Arguments ..
- INTEGER INDXQ( * ), IWORK( * )
- DOUBLE PRECISION D( * ), Q( LDQ, * ), WORK( * )
-* ..
-*
+*> \brief \b DLAED1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CUTPNT, INFO, LDQ, N
+* DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+* INTEGER INDXQ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), Q( LDQ, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLAED1 computes the updated eigensystem of a diagonal
-* matrix after modification by a rank-one symmetric matrix. This
-* routine is used only for the eigenproblem which requires all
-* eigenvalues and eigenvectors of a tridiagonal matrix. DLAED7 handles
-* the case in which eigenvalues only or eigenvalues and eigenvectors
-* of a full symmetric matrix (which was reduced to tridiagonal form)
-* are desired.
-*
-* T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out)
-*
-* where Z = Q**T*u, u is a vector of length N with ones in the
-* CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
-*
-* The eigenvectors of the original matrix are stored in Q, and the
-* eigenvalues are in D. The algorithm consists of three stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple eigenvalues or if there is a zero in
-* the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine DLAED2.
-*
-* The second stage consists of calculating the updated
-* eigenvalues. This is done by finding the roots of the secular
-* equation via the routine DLAED4 (as called by DLAED3).
-* This routine also calculates the eigenvectors of the current
-* problem.
-*
-* The final stage consists of computing the updated eigenvectors
-* directly using the updated eigenvalues. The eigenvectors for
-* the current problem are multiplied with the eigenvectors from
-* the overall problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAED1 computes the updated eigensystem of a diagonal
+*> matrix after modification by a rank-one symmetric matrix. This
+*> routine is used only for the eigenproblem which requires all
+*> eigenvalues and eigenvectors of a tridiagonal matrix. DLAED7 handles
+*> the case in which eigenvalues only or eigenvalues and eigenvectors
+*> of a full symmetric matrix (which was reduced to tridiagonal form)
+*> are desired.
+*>
+*> T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out)
+*>
+*> where Z = Q**T*u, u is a vector of length N with ones in the
+*> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
+*>
+*> The eigenvectors of the original matrix are stored in Q, and the
+*> eigenvalues are in D. The algorithm consists of three stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple eigenvalues or if there is a zero in
+*> the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine DLAED2.
+*>
+*> The second stage consists of calculating the updated
+*> eigenvalues. This is done by finding the roots of the secular
+*> equation via the routine DLAED4 (as called by DLAED3).
+*> This routine also calculates the eigenvectors of the current
+*> problem.
+*>
+*> The final stage consists of computing the updated eigenvectors
+*> directly using the updated eigenvalues. The eigenvectors for
+*> the current problem are multiplied with the eigenvectors from
+*> the overall problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the eigenvalues of the rank-1-perturbed matrix.
-* On exit, the eigenvalues of the repaired matrix.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, the eigenvectors of the rank-1-perturbed matrix.
-* On exit, the eigenvectors of the repaired tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* INDXQ (input/output) INTEGER array, dimension (N)
-* On entry, the permutation which separately sorts the two
-* subproblems in D into ascending order.
-* On exit, the permutation which will reintegrate the
-* subproblems back into sorted order,
-* i.e. D( INDXQ( I = 1, N ) ) will be in ascending order.
-*
-* RHO (input) DOUBLE PRECISION
-* The subdiagonal entry used to create the rank-1 modification.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the eigenvalues of the rank-1-perturbed matrix.
+*> On exit, the eigenvalues of the repaired matrix.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, the eigenvectors of the rank-1-perturbed matrix.
+*> On exit, the eigenvectors of the repaired tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> On entry, the permutation which separately sorts the two
+*> subproblems in D into ascending order.
+*> On exit, the permutation which will reintegrate the
+*> subproblems back into sorted order,
+*> i.e. D( INDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> The subdiagonal entry used to create the rank-1 modification.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> The location of the last eigenvalue in the leading sub-matrix.
+*> min(1,N) <= CUTPNT <= N/2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N + N**2)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CUTPNT (input) INTEGER
-* The location of the last eigenvalue in the leading sub-matrix.
-* min(1,N) <= CUTPNT <= N/2.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N + N**2)
+*> \date November 2011
*
-* IWORK (workspace) INTEGER array, dimension (4*N)
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK,
+ $ INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
+* .. Scalar Arguments ..
+ INTEGER CUTPNT, INFO, LDQ, N
+ DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+ INTEGER INDXQ( * ), IWORK( * )
+ DOUBLE PRECISION D( * ), Q( LDQ, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaed2.f b/SRC/dlaed2.f
index 055213c4..95776870 100644
--- a/SRC/dlaed2.f
+++ b/SRC/dlaed2.f
@@ -1,10 +1,219 @@
+*> \brief \b DLAED2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED2( K, N, N1, D, Q, LDQ, INDXQ, RHO, Z, DLAMDA, W,
+* Q2, INDX, INDXC, INDXP, COLTYP, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDQ, N, N1
+* DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+* INTEGER COLTYP( * ), INDX( * ), INDXC( * ), INDXP( * ),
+* $ INDXQ( * )
+* DOUBLE PRECISION D( * ), DLAMDA( * ), Q( LDQ, * ), Q2( * ),
+* $ W( * ), Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAED2 merges the two sets of eigenvalues together into a single
+*> sorted set. Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur: when two or more
+*> eigenvalues are close together or if there is a tiny entry in the
+*> Z vector. For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> The number of non-deflated eigenvalues, and the order of the
+*> related secular equation. 0 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The location of the last eigenvalue in the leading sub-matrix.
+*> min(1,N) <= N1 <= N/2.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, D contains the eigenvalues of the two submatrices to
+*> be combined.
+*> On exit, D contains the trailing (N-K) updated eigenvalues
+*> (those which were deflated) sorted into increasing order.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, N)
+*> On entry, Q contains the eigenvectors of two submatrices in
+*> the two square blocks with corners at (1,1), (N1,N1)
+*> and (N1+1, N1+1), (N,N).
+*> On exit, Q contains the trailing (N-K) updated eigenvectors
+*> (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> The permutation which separately sorts the two sub-problems
+*> in D into ascending order. Note that elements in the second
+*> half of this permutation must first have N1 added to their
+*> values. Destroyed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> On entry, the off-diagonal element associated with the rank-1
+*> cut which originally split the two submatrices which are now
+*> being recombined.
+*> On exit, RHO has been modified to the value required by
+*> DLAED3.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (N)
+*> On entry, Z contains the updating vector (the last
+*> row of the first sub-eigenvector matrix and the first row of
+*> the second sub-eigenvector matrix).
+*> On exit, the contents of Z have been destroyed by the updating
+*> process.
+*> \endverbatim
+*>
+*> \param[out] DLAMDA
+*> \verbatim
+*> DLAMDA is DOUBLE PRECISION array, dimension (N)
+*> A copy of the first K eigenvalues which will be used by
+*> DLAED3 to form the secular equation.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first k values of the final deflation-altered z-vector
+*> which will be passed to DLAED3.
+*> \endverbatim
+*>
+*> \param[out] Q2
+*> \verbatim
+*> Q2 is DOUBLE PRECISION array, dimension (N1**2+(N-N1)**2)
+*> A copy of the first K eigenvectors which will be used by
+*> DLAED3 in a matrix multiply (DGEMM) to solve for the new
+*> eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] INDX
+*> \verbatim
+*> INDX is INTEGER array, dimension (N)
+*> The permutation used to sort the contents of DLAMDA into
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] INDXC
+*> \verbatim
+*> INDXC is INTEGER array, dimension (N)
+*> The permutation used to arrange the columns of the deflated
+*> Q matrix into three groups: the first group contains non-zero
+*> elements only at and above N1, the second contains
+*> non-zero elements only below N1, and the third is dense.
+*> \endverbatim
+*>
+*> \param[out] INDXP
+*> \verbatim
+*> INDXP is INTEGER array, dimension (N)
+*> The permutation used to place deflated values of D at the end
+*> of the array. INDXP(1:K) points to the nondeflated D-values
+*> and INDXP(K+1:N) points to the deflated eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] COLTYP
+*> \verbatim
+*> COLTYP is INTEGER array, dimension (N)
+*> During execution, a label which will indicate which of the
+*> following types a column in the Q2 matrix is:
+*> 1 : non-zero in the upper half only;
+*> 2 : dense;
+*> 3 : non-zero in the lower half only;
+*> 4 : deflated.
+*> On exit, COLTYP(i) is the number of columns of type i,
+*> for i=1 to 4 only.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAED2( K, N, N1, D, Q, LDQ, INDXQ, RHO, Z, DLAMDA, W,
$ Q2, INDX, INDXC, INDXP, COLTYP, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, K, LDQ, N, N1
@@ -17,116 +226,6 @@
$ W( * ), Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAED2 merges the two sets of eigenvalues together into a single
-* sorted set. Then it tries to deflate the size of the problem.
-* There are two ways in which deflation can occur: when two or more
-* eigenvalues are close together or if there is a tiny entry in the
-* Z vector. For each such occurrence the order of the related secular
-* equation problem is reduced by one.
-*
-* Arguments
-* =========
-*
-* K (output) INTEGER
-* The number of non-deflated eigenvalues, and the order of the
-* related secular equation. 0 <= K <=N.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* N1 (input) INTEGER
-* The location of the last eigenvalue in the leading sub-matrix.
-* min(1,N) <= N1 <= N/2.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, D contains the eigenvalues of the two submatrices to
-* be combined.
-* On exit, D contains the trailing (N-K) updated eigenvalues
-* (those which were deflated) sorted into increasing order.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ, N)
-* On entry, Q contains the eigenvectors of two submatrices in
-* the two square blocks with corners at (1,1), (N1,N1)
-* and (N1+1, N1+1), (N,N).
-* On exit, Q contains the trailing (N-K) updated eigenvectors
-* (those which were deflated) in its last N-K columns.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* INDXQ (input/output) INTEGER array, dimension (N)
-* The permutation which separately sorts the two sub-problems
-* in D into ascending order. Note that elements in the second
-* half of this permutation must first have N1 added to their
-* values. Destroyed on exit.
-*
-* RHO (input/output) DOUBLE PRECISION
-* On entry, the off-diagonal element associated with the rank-1
-* cut which originally split the two submatrices which are now
-* being recombined.
-* On exit, RHO has been modified to the value required by
-* DLAED3.
-*
-* Z (input) DOUBLE PRECISION array, dimension (N)
-* On entry, Z contains the updating vector (the last
-* row of the first sub-eigenvector matrix and the first row of
-* the second sub-eigenvector matrix).
-* On exit, the contents of Z have been destroyed by the updating
-* process.
-*
-* DLAMDA (output) DOUBLE PRECISION array, dimension (N)
-* A copy of the first K eigenvalues which will be used by
-* DLAED3 to form the secular equation.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first k values of the final deflation-altered z-vector
-* which will be passed to DLAED3.
-*
-* Q2 (output) DOUBLE PRECISION array, dimension (N1**2+(N-N1)**2)
-* A copy of the first K eigenvectors which will be used by
-* DLAED3 in a matrix multiply (DGEMM) to solve for the new
-* eigenvectors.
-*
-* INDX (workspace) INTEGER array, dimension (N)
-* The permutation used to sort the contents of DLAMDA into
-* ascending order.
-*
-* INDXC (output) INTEGER array, dimension (N)
-* The permutation used to arrange the columns of the deflated
-* Q matrix into three groups: the first group contains non-zero
-* elements only at and above N1, the second contains
-* non-zero elements only below N1, and the third is dense.
-*
-* INDXP (workspace) INTEGER array, dimension (N)
-* The permutation used to place deflated values of D at the end
-* of the array. INDXP(1:K) points to the nondeflated D-values
-* and INDXP(K+1:N) points to the deflated eigenvalues.
-*
-* COLTYP (workspace/output) INTEGER array, dimension (N)
-* During execution, a label which will indicate which of the
-* following types a column in the Q2 matrix is:
-* 1 : non-zero in the upper half only;
-* 2 : dense;
-* 3 : non-zero in the lower half only;
-* 4 : deflated.
-* On exit, COLTYP(i) is the number of columns of type i,
-* for i=1 to 4 only.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaed3.f b/SRC/dlaed3.f
index 41c4695b..b9a96c3c 100644
--- a/SRC/dlaed3.f
+++ b/SRC/dlaed3.f
@@ -1,10 +1,198 @@
+*> \brief \b DLAED3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
+* CTOT, W, S, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDQ, N, N1
+* DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+* INTEGER CTOT( * ), INDX( * )
+* DOUBLE PRECISION D( * ), DLAMDA( * ), Q( LDQ, * ), Q2( * ),
+* $ S( * ), W( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAED3 finds the roots of the secular equation, as defined by the
+*> values in D, W, and RHO, between 1 and K. It makes the
+*> appropriate calls to DLAED4 and then updates the eigenvectors by
+*> multiplying the matrix of eigenvectors of the pair of eigensystems
+*> being combined by the matrix of eigenvectors of the K-by-K system
+*> which is solved here.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of terms in the rational function to be solved by
+*> DLAED4. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the Q matrix.
+*> N >= K (deflation may result in N>K).
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The location of the last eigenvalue in the leading submatrix.
+*> min(1,N) <= N1 <= N/2.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> D(I) contains the updated eigenvalues for
+*> 1 <= I <= K.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> Initially the first K columns are used as workspace.
+*> On output the columns 1 to K contain
+*> the updated eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> The value of the parameter in the rank one update equation.
+*> RHO >= 0 required.
+*> \endverbatim
+*>
+*> \param[in,out] DLAMDA
+*> \verbatim
+*> DLAMDA is DOUBLE PRECISION array, dimension (K)
+*> The first K elements of this array contain the old roots
+*> of the deflated updating problem. These are the poles
+*> of the secular equation. May be changed on output by
+*> having lowest order bit set to zero on Cray X-MP, Cray Y-MP,
+*> Cray-2, or Cray C-90, as described above.
+*> \endverbatim
+*>
+*> \param[in] Q2
+*> \verbatim
+*> Q2 is DOUBLE PRECISION array, dimension (LDQ2, N)
+*> The first K columns of this matrix contain the non-deflated
+*> eigenvectors for the split problem.
+*> \endverbatim
+*>
+*> \param[in] INDX
+*> \verbatim
+*> INDX is INTEGER array, dimension (N)
+*> The permutation used to arrange the columns of the deflated
+*> Q matrix into three groups (see DLAED2).
+*> The rows of the eigenvectors found by DLAED4 must be likewise
+*> permuted before the matrix multiply can take place.
+*> \endverbatim
+*>
+*> \param[in] CTOT
+*> \verbatim
+*> CTOT is INTEGER array, dimension (4)
+*> A count of the total number of the various types of columns
+*> in Q, as described in INDX. The fourth column type is any
+*> column which has been deflated.
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (K)
+*> The first K elements of this array contain the components
+*> of the deflation-adjusted updating vector. Destroyed on
+*> output.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N1 + 1)*K
+*> Will contain the eigenvectors of the repaired matrix which
+*> will be multiplied by the previously accumulated eigenvectors
+*> to update the system.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of S. LDS >= max(1,K).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
$ CTOT, W, S, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, K, LDQ, N, N1
@@ -16,102 +204,6 @@
$ S( * ), W( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAED3 finds the roots of the secular equation, as defined by the
-* values in D, W, and RHO, between 1 and K. It makes the
-* appropriate calls to DLAED4 and then updates the eigenvectors by
-* multiplying the matrix of eigenvectors of the pair of eigensystems
-* being combined by the matrix of eigenvectors of the K-by-K system
-* which is solved here.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* K (input) INTEGER
-* The number of terms in the rational function to be solved by
-* DLAED4. K >= 0.
-*
-* N (input) INTEGER
-* The number of rows and columns in the Q matrix.
-* N >= K (deflation may result in N>K).
-*
-* N1 (input) INTEGER
-* The location of the last eigenvalue in the leading submatrix.
-* min(1,N) <= N1 <= N/2.
-*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* D(I) contains the updated eigenvalues for
-* 1 <= I <= K.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDQ,N)
-* Initially the first K columns are used as workspace.
-* On output the columns 1 to K contain
-* the updated eigenvectors.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* RHO (input) DOUBLE PRECISION
-* The value of the parameter in the rank one update equation.
-* RHO >= 0 required.
-*
-* DLAMDA (input/output) DOUBLE PRECISION array, dimension (K)
-* The first K elements of this array contain the old roots
-* of the deflated updating problem. These are the poles
-* of the secular equation. May be changed on output by
-* having lowest order bit set to zero on Cray X-MP, Cray Y-MP,
-* Cray-2, or Cray C-90, as described above.
-*
-* Q2 (input) DOUBLE PRECISION array, dimension (LDQ2, N)
-* The first K columns of this matrix contain the non-deflated
-* eigenvectors for the split problem.
-*
-* INDX (input) INTEGER array, dimension (N)
-* The permutation used to arrange the columns of the deflated
-* Q matrix into three groups (see DLAED2).
-* The rows of the eigenvectors found by DLAED4 must be likewise
-* permuted before the matrix multiply can take place.
-*
-* CTOT (input) INTEGER array, dimension (4)
-* A count of the total number of the various types of columns
-* in Q, as described in INDX. The fourth column type is any
-* column which has been deflated.
-*
-* W (input/output) DOUBLE PRECISION array, dimension (K)
-* The first K elements of this array contain the components
-* of the deflation-adjusted updating vector. Destroyed on
-* output.
-*
-* S (workspace) DOUBLE PRECISION array, dimension (N1 + 1)*K
-* Will contain the eigenvectors of the repaired matrix which
-* will be multiplied by the previously accumulated eigenvectors
-* to update the system.
-*
-* LDS (input) INTEGER
-* The leading dimension of S. LDS >= max(1,K).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaed4.f b/SRC/dlaed4.f
index bb90ab13..4506242b 100644
--- a/SRC/dlaed4.f
+++ b/SRC/dlaed4.f
@@ -1,90 +1,163 @@
- SUBROUTINE DLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER I, INFO, N
- DOUBLE PRECISION DLAM, RHO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), DELTA( * ), Z( * )
-* ..
-*
+*> \brief \b DLAED4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER I, INFO, N
+* DOUBLE PRECISION DLAM, RHO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), DELTA( * ), Z( * )
+* ..
+*
* Purpose
* =======
*
-* This subroutine computes the I-th updated eigenvalue of a symmetric
-* rank-one modification to a diagonal matrix whose elements are
-* given in the array d, and that
-*
-* D(i) < D(j) for i < j
-*
-* and that RHO > 0. This is arranged by the calling routine, and is
-* no loss in generality. The rank-one modified system is thus
-*
-* diag( D ) + RHO * Z * Z_transpose.
-*
-* where we assume the Euclidean norm of Z is 1.
-*
-* The method consists of approximating the rational functions in the
-* secular equation by simpler interpolating rational functions.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine computes the I-th updated eigenvalue of a symmetric
+*> rank-one modification to a diagonal matrix whose elements are
+*> given in the array d, and that
+*>
+*> D(i) < D(j) for i < j
+*>
+*> and that RHO > 0. This is arranged by the calling routine, and is
+*> no loss in generality. The rank-one modified system is thus
+*>
+*> diag( D ) + RHO * Z * Z_transpose.
+*>
+*> where we assume the Euclidean norm of Z is 1.
+*>
+*> The method consists of approximating the rational functions in the
+*> secular equation by simpler interpolating rational functions.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of all arrays.
-*
-* I (input) INTEGER
-* The index of the eigenvalue to be computed. 1 <= I <= N.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The original eigenvalues. It is assumed that they are in
-* order, D(I) < D(J) for I < J.
-*
-* Z (input) DOUBLE PRECISION array, dimension (N)
-* The components of the updating vector.
-*
-* DELTA (output) DOUBLE PRECISION array, dimension (N)
-* If N .GT. 2, DELTA contains (D(j) - lambda_I) in its j-th
-* component. If N = 1, then DELTA(1) = 1. If N = 2, see DLAED5
-* for detail. The vector DELTA contains the information necessary
-* to construct the eigenvectors by DLAED3 and DLAED9.
-*
-* RHO (input) DOUBLE PRECISION
-* The scalar in the symmetric updating formula.
-*
-* DLAM (output) DOUBLE PRECISION
-* The computed lambda_I, the I-th updated eigenvalue.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = 1, the updating process failed.
-*
-* Internal Parameters
-* ===================
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of all arrays.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> The index of the eigenvalue to be computed. 1 <= I <= N.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The original eigenvalues. It is assumed that they are in
+*> order, D(I) < D(J) for I < J.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (N)
+*> The components of the updating vector.
+*> \endverbatim
+*>
+*> \param[out] DELTA
+*> \verbatim
+*> DELTA is DOUBLE PRECISION array, dimension (N)
+*> If N .GT. 2, DELTA contains (D(j) - lambda_I) in its j-th
+*> component. If N = 1, then DELTA(1) = 1. If N = 2, see DLAED5
+*> for detail. The vector DELTA contains the information necessary
+*> to construct the eigenvectors by DLAED3 and DLAED9.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> The scalar in the symmetric updating formula.
+*> \endverbatim
+*>
+*> \param[out] DLAM
+*> \verbatim
+*> DLAM is DOUBLE PRECISION
+*> The computed lambda_I, the I-th updated eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = 1, the updating process failed.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> Logical variable ORGATI (origin-at-i?) is used for distinguishing
+*> whether D(i) or D(i+1) is treated as the origin.
+*> \endverbatim
+*> \verbatim
+*> ORGATI = .true. origin at i
+*> ORGATI = .false. origin at i+1
+*> \endverbatim
+*> \verbatim
+*> Logical variable SWTCH3 (switch-for-3-poles?) is for noting
+*> if we are working with THREE poles!
+*> \endverbatim
+*> \verbatim
+*> MAXIT is the maximum number of iterations allowed for each
+*> eigenvalue.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Logical variable ORGATI (origin-at-i?) is used for distinguishing
-* whether D(i) or D(i+1) is treated as the origin.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ORGATI = .true. origin at i
-* ORGATI = .false. origin at i+1
+*> \date November 2011
*
-* Logical variable SWTCH3 (switch-for-3-poles?) is for noting
-* if we are working with THREE poles!
+*> \ingroup auxOTHERcomputational
*
-* MAXIT is the maximum number of iterations allowed for each
-* eigenvalue.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
*
-* Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER I, INFO, N
+ DOUBLE PRECISION DLAM, RHO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), DELTA( * ), Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaed5.f b/SRC/dlaed5.f
index 5890dd49..fd8b5cc2 100644
--- a/SRC/dlaed5.f
+++ b/SRC/dlaed5.f
@@ -1,61 +1,123 @@
- SUBROUTINE DLAED5( I, D, Z, DELTA, RHO, DLAM )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER I
- DOUBLE PRECISION DLAM, RHO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( 2 ), DELTA( 2 ), Z( 2 )
-* ..
-*
+*> \brief \b DLAED5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED5( I, D, Z, DELTA, RHO, DLAM )
+*
+* .. Scalar Arguments ..
+* INTEGER I
+* DOUBLE PRECISION DLAM, RHO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( 2 ), DELTA( 2 ), Z( 2 )
+* ..
+*
* Purpose
* =======
*
-* This subroutine computes the I-th eigenvalue of a symmetric rank-one
-* modification of a 2-by-2 diagonal matrix
-*
-* diag( D ) + RHO * Z * transpose(Z) .
-*
-* The diagonal elements in the array D are assumed to satisfy
-*
-* D(i) < D(j) for i < j .
-*
-* We also assume RHO > 0 and that the Euclidean norm of the vector
-* Z is one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine computes the I-th eigenvalue of a symmetric rank-one
+*> modification of a 2-by-2 diagonal matrix
+*>
+*> diag( D ) + RHO * Z * transpose(Z) .
+*>
+*> The diagonal elements in the array D are assumed to satisfy
+*>
+*> D(i) < D(j) for i < j .
+*>
+*> We also assume RHO > 0 and that the Euclidean norm of the vector
+*> Z is one.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* I (input) INTEGER
-* The index of the eigenvalue to be computed. I = 1 or I = 2.
-*
-* D (input) DOUBLE PRECISION array, dimension (2)
-* The original eigenvalues. We assume D(1) < D(2).
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> The index of the eigenvalue to be computed. I = 1 or I = 2.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (2)
+*> The original eigenvalues. We assume D(1) < D(2).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (2)
+*> The components of the updating vector.
+*> \endverbatim
+*>
+*> \param[out] DELTA
+*> \verbatim
+*> DELTA is DOUBLE PRECISION array, dimension (2)
+*> The vector DELTA contains the information necessary
+*> to construct the eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> The scalar in the symmetric updating formula.
+*> \endverbatim
+*>
+*> \param[out] DLAM
+*> \verbatim
+*> DLAM is DOUBLE PRECISION
+*> The computed lambda_I, the I-th updated eigenvalue.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Z (input) DOUBLE PRECISION array, dimension (2)
-* The components of the updating vector.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DELTA (output) DOUBLE PRECISION array, dimension (2)
-* The vector DELTA contains the information necessary
-* to construct the eigenvectors.
+*> \date November 2011
*
-* RHO (input) DOUBLE PRECISION
-* The scalar in the symmetric updating formula.
+*> \ingroup auxOTHERcomputational
*
-* DLAM (output) DOUBLE PRECISION
-* The computed lambda_I, the I-th updated eigenvalue.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAED5( I, D, Z, DELTA, RHO, DLAM )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER I
+ DOUBLE PRECISION DLAM, RHO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( 2 ), DELTA( 2 ), Z( 2 )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaed6.f b/SRC/dlaed6.f
index 4722304e..602f23db 100644
--- a/SRC/dlaed6.f
+++ b/SRC/dlaed6.f
@@ -1,81 +1,150 @@
- SUBROUTINE DLAED6( KNITER, ORGATI, RHO, D, Z, FINIT, TAU, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* February 2007
-*
-* .. Scalar Arguments ..
- LOGICAL ORGATI
- INTEGER INFO, KNITER
- DOUBLE PRECISION FINIT, RHO, TAU
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( 3 ), Z( 3 )
-* ..
-*
+*> \brief \b DLAED6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED6( KNITER, ORGATI, RHO, D, Z, FINIT, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL ORGATI
+* INTEGER INFO, KNITER
+* DOUBLE PRECISION FINIT, RHO, TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( 3 ), Z( 3 )
+* ..
+*
* Purpose
* =======
*
-* DLAED6 computes the positive or negative root (closest to the origin)
-* of
-* z(1) z(2) z(3)
-* f(x) = rho + --------- + ---------- + ---------
-* d(1)-x d(2)-x d(3)-x
-*
-* It is assumed that
-*
-* if ORGATI = .true. the root is between d(2) and d(3);
-* otherwise it is between d(1) and d(2)
-*
-* This routine will be called by DLAED4 when necessary. In most cases,
-* the root sought is the smallest in magnitude, though it might not be
-* in some extremely rare situations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAED6 computes the positive or negative root (closest to the origin)
+*> of
+*> z(1) z(2) z(3)
+*> f(x) = rho + --------- + ---------- + ---------
+*> d(1)-x d(2)-x d(3)-x
+*>
+*> It is assumed that
+*>
+*> if ORGATI = .true. the root is between d(2) and d(3);
+*> otherwise it is between d(1) and d(2)
+*>
+*> This routine will be called by DLAED4 when necessary. In most cases,
+*> the root sought is the smallest in magnitude, though it might not be
+*> in some extremely rare situations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* KNITER (input) INTEGER
-* Refer to DLAED4 for its significance.
-*
-* ORGATI (input) LOGICAL
-* If ORGATI is true, the needed root is between d(2) and
-* d(3); otherwise it is between d(1) and d(2). See
-* DLAED4 for further details.
-*
-* RHO (input) DOUBLE PRECISION
-* Refer to the equation f(x) above.
-*
-* D (input) DOUBLE PRECISION array, dimension (3)
-* D satisfies d(1) < d(2) < d(3).
+*> \param[in] KNITER
+*> \verbatim
+*> KNITER is INTEGER
+*> Refer to DLAED4 for its significance.
+*> \endverbatim
+*>
+*> \param[in] ORGATI
+*> \verbatim
+*> ORGATI is LOGICAL
+*> If ORGATI is true, the needed root is between d(2) and
+*> d(3); otherwise it is between d(1) and d(2). See
+*> DLAED4 for further details.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> Refer to the equation f(x) above.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (3)
+*> D satisfies d(1) < d(2) < d(3).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (3)
+*> Each of the elements in z must be positive.
+*> \endverbatim
+*>
+*> \param[in] FINIT
+*> \verbatim
+*> FINIT is DOUBLE PRECISION
+*> The value of f at 0. It is more accurate than the one
+*> evaluated inside this routine (if someone wants to do
+*> so).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> The root of the equation f(x).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = 1, failure to converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Z (input) DOUBLE PRECISION array, dimension (3)
-* Each of the elements in z must be positive.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* FINIT (input) DOUBLE PRECISION
-* The value of f at 0. It is more accurate than the one
-* evaluated inside this routine (if someone wants to do
-* so).
+*> \date November 2011
*
-* TAU (output) DOUBLE PRECISION
-* The root of the equation f(x).
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = 1, failure to converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 30/06/99: Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> 10/02/03: This version has a few statements commented out for thread
+*> safety (machine parameters are computed on each entry). SJH.
+*>
+*> 05/10/06: Modified from a new version of Ren-Cang Li, use
+*> Gragg-Thornton-Warner cubic convergent scheme for better stability.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAED6( KNITER, ORGATI, RHO, D, Z, FINIT, TAU, INFO )
*
-* 30/06/99: Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
-*
-* 10/02/03: This version has a few statements commented out for thread
-* safety (machine parameters are computed on each entry). SJH.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 05/10/06: Modified from a new version of Ren-Cang Li, use
-* Gragg-Thornton-Warner cubic convergent scheme for better stability.
+* .. Scalar Arguments ..
+ LOGICAL ORGATI
+ INTEGER INFO, KNITER
+ DOUBLE PRECISION FINIT, RHO, TAU
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( 3 ), Z( 3 )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaed7.f b/SRC/dlaed7.f
index 98b7d3bd..63352ac8 100644
--- a/SRC/dlaed7.f
+++ b/SRC/dlaed7.f
@@ -1,12 +1,267 @@
+*> \brief \b DLAED7
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED7( ICOMPQ, N, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
+* LDQ, INDXQ, RHO, CUTPNT, QSTORE, QPTR, PRMPTR,
+* PERM, GIVPTR, GIVCOL, GIVNUM, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CURLVL, CURPBM, CUTPNT, ICOMPQ, INFO, LDQ, N,
+* $ QSIZ, TLVLS
+* DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), GIVPTR( * ), INDXQ( * ),
+* $ IWORK( * ), PERM( * ), PRMPTR( * ), QPTR( * )
+* DOUBLE PRECISION D( * ), GIVNUM( 2, * ), Q( LDQ, * ),
+* $ QSTORE( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAED7 computes the updated eigensystem of a diagonal
+*> matrix after modification by a rank-one symmetric matrix. This
+*> routine is used only for the eigenproblem which requires all
+*> eigenvalues and optionally eigenvectors of a dense symmetric matrix
+*> that has been reduced to tridiagonal form. DLAED1 handles
+*> the case in which all eigenvalues and eigenvectors of a symmetric
+*> tridiagonal matrix are desired.
+*>
+*> T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out)
+*>
+*> where Z = Q**Tu, u is a vector of length N with ones in the
+*> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
+*>
+*> The eigenvectors of the original matrix are stored in Q, and the
+*> eigenvalues are in D. The algorithm consists of three stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple eigenvalues or if there is a zero in
+*> the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine DLAED8.
+*>
+*> The second stage consists of calculating the updated
+*> eigenvalues. This is done by finding the roots of the secular
+*> equation via the routine DLAED4 (as called by DLAED9).
+*> This routine also calculates the eigenvectors of the current
+*> problem.
+*>
+*> The final stage consists of computing the updated eigenvectors
+*> directly using the updated eigenvalues. The eigenvectors for
+*> the current problem are multiplied with the eigenvectors from
+*> the overall problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> = 0: Compute eigenvalues only.
+*> = 1: Compute eigenvectors of original dense symmetric matrix
+*> also. On entry, Q contains the orthogonal matrix used
+*> to reduce the original matrix to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the orthogonal matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in] TLVLS
+*> \verbatim
+*> TLVLS is INTEGER
+*> The total number of merging levels in the overall divide and
+*> conquer tree.
+*> \endverbatim
+*>
+*> \param[in] CURLVL
+*> \verbatim
+*> CURLVL is INTEGER
+*> The current level in the overall merge routine,
+*> 0 <= CURLVL <= TLVLS.
+*> \endverbatim
+*>
+*> \param[in] CURPBM
+*> \verbatim
+*> CURPBM is INTEGER
+*> The current problem in the current level in the overall
+*> merge routine (counting from upper left to lower right).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the eigenvalues of the rank-1-perturbed matrix.
+*> On exit, the eigenvalues of the repaired matrix.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, N)
+*> On entry, the eigenvectors of the rank-1-perturbed matrix.
+*> On exit, the eigenvectors of the repaired tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> The permutation which will reintegrate the subproblem just
+*> solved back into sorted order, i.e., D( INDXQ( I = 1, N ) )
+*> will be in ascending order.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> The subdiagonal element used to create the rank-1
+*> modification.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> Contains the location of the last eigenvalue in the leading
+*> sub-matrix. min(1,N) <= CUTPNT <= N.
+*> \endverbatim
+*>
+*> \param[in,out] QSTORE
+*> \verbatim
+*> QSTORE is DOUBLE PRECISION array, dimension (N**2+1)
+*> Stores eigenvectors of submatrices encountered during
+*> divide and conquer, packed together. QPTR points to
+*> beginning of the submatrices.
+*> \endverbatim
+*>
+*> \param[in,out] QPTR
+*> \verbatim
+*> QPTR is INTEGER array, dimension (N+2)
+*> List of indices pointing to beginning of submatrices stored
+*> in QSTORE. The submatrices are numbered starting at the
+*> bottom left of the divide and conquer tree, from left to
+*> right and bottom to top.
+*> \endverbatim
+*>
+*> \param[in] PRMPTR
+*> \verbatim
+*> PRMPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in PERM a
+*> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
+*> indicates the size of the permutation and also the size of
+*> the full, non-deflated problem.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N lg N)
+*> Contains the permutations (from deflation and sorting) to be
+*> applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in GIVCOL a
+*> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
+*> indicates the number of Givens rotations.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N lg N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension (2, N lg N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N+2*QSIZ*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAED7( ICOMPQ, N, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
$ LDQ, INDXQ, RHO, CUTPNT, QSTORE, QPTR, PRMPTR,
$ PERM, GIVPTR, GIVCOL, GIVNUM, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER CURLVL, CURPBM, CUTPNT, ICOMPQ, INFO, LDQ, N,
@@ -20,144 +275,6 @@
$ QSTORE( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAED7 computes the updated eigensystem of a diagonal
-* matrix after modification by a rank-one symmetric matrix. This
-* routine is used only for the eigenproblem which requires all
-* eigenvalues and optionally eigenvectors of a dense symmetric matrix
-* that has been reduced to tridiagonal form. DLAED1 handles
-* the case in which all eigenvalues and eigenvectors of a symmetric
-* tridiagonal matrix are desired.
-*
-* T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out)
-*
-* where Z = Q**Tu, u is a vector of length N with ones in the
-* CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
-*
-* The eigenvectors of the original matrix are stored in Q, and the
-* eigenvalues are in D. The algorithm consists of three stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple eigenvalues or if there is a zero in
-* the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine DLAED8.
-*
-* The second stage consists of calculating the updated
-* eigenvalues. This is done by finding the roots of the secular
-* equation via the routine DLAED4 (as called by DLAED9).
-* This routine also calculates the eigenvectors of the current
-* problem.
-*
-* The final stage consists of computing the updated eigenvectors
-* directly using the updated eigenvalues. The eigenvectors for
-* the current problem are multiplied with the eigenvectors from
-* the overall problem.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* = 0: Compute eigenvalues only.
-* = 1: Compute eigenvectors of original dense symmetric matrix
-* also. On entry, Q contains the orthogonal matrix used
-* to reduce the original matrix to tridiagonal form.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* QSIZ (input) INTEGER
-* The dimension of the orthogonal matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
-*
-* TLVLS (input) INTEGER
-* The total number of merging levels in the overall divide and
-* conquer tree.
-*
-* CURLVL (input) INTEGER
-* The current level in the overall merge routine,
-* 0 <= CURLVL <= TLVLS.
-*
-* CURPBM (input) INTEGER
-* The current problem in the current level in the overall
-* merge routine (counting from upper left to lower right).
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the eigenvalues of the rank-1-perturbed matrix.
-* On exit, the eigenvalues of the repaired matrix.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ, N)
-* On entry, the eigenvectors of the rank-1-perturbed matrix.
-* On exit, the eigenvectors of the repaired tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* INDXQ (output) INTEGER array, dimension (N)
-* The permutation which will reintegrate the subproblem just
-* solved back into sorted order, i.e., D( INDXQ( I = 1, N ) )
-* will be in ascending order.
-*
-* RHO (input) DOUBLE PRECISION
-* The subdiagonal element used to create the rank-1
-* modification.
-*
-* CUTPNT (input) INTEGER
-* Contains the location of the last eigenvalue in the leading
-* sub-matrix. min(1,N) <= CUTPNT <= N.
-*
-* QSTORE (input/output) DOUBLE PRECISION array, dimension (N**2+1)
-* Stores eigenvectors of submatrices encountered during
-* divide and conquer, packed together. QPTR points to
-* beginning of the submatrices.
-*
-* QPTR (input/output) INTEGER array, dimension (N+2)
-* List of indices pointing to beginning of submatrices stored
-* in QSTORE. The submatrices are numbered starting at the
-* bottom left of the divide and conquer tree, from left to
-* right and bottom to top.
-*
-* PRMPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in PERM a
-* level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
-* indicates the size of the permutation and also the size of
-* the full, non-deflated problem.
-*
-* PERM (input) INTEGER array, dimension (N lg N)
-* Contains the permutations (from deflation and sorting) to be
-* applied to each eigenblock.
-*
-* GIVPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in GIVCOL a
-* level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
-* indicates the number of Givens rotations.
-*
-* GIVCOL (input) INTEGER array, dimension (2, N lg N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (input) DOUBLE PRECISION array, dimension (2, N lg N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N+2*QSIZ*N)
-*
-* IWORK (workspace) INTEGER array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaed8.f b/SRC/dlaed8.f
index 82b20df2..c99a622e 100644
--- a/SRC/dlaed8.f
+++ b/SRC/dlaed8.f
@@ -1,11 +1,250 @@
+*> \brief \b DLAED8
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED8( ICOMPQ, K, N, QSIZ, D, Q, LDQ, INDXQ, RHO,
+* CUTPNT, Z, DLAMDA, Q2, LDQ2, W, PERM, GIVPTR,
+* GIVCOL, GIVNUM, INDXP, INDX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CUTPNT, GIVPTR, ICOMPQ, INFO, K, LDQ, LDQ2, N,
+* $ QSIZ
+* DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), INDX( * ), INDXP( * ),
+* $ INDXQ( * ), PERM( * )
+* DOUBLE PRECISION D( * ), DLAMDA( * ), GIVNUM( 2, * ),
+* $ Q( LDQ, * ), Q2( LDQ2, * ), W( * ), Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAED8 merges the two sets of eigenvalues together into a single
+*> sorted set. Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur: when two or more
+*> eigenvalues are close together or if there is a tiny element in the
+*> Z vector. For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> = 0: Compute eigenvalues only.
+*> = 1: Compute eigenvectors of original dense symmetric matrix
+*> also. On entry, Q contains the orthogonal matrix used
+*> to reduce the original matrix to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> The number of non-deflated eigenvalues, and the order of the
+*> related secular equation.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the orthogonal matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the eigenvalues of the two submatrices to be
+*> combined. On exit, the trailing (N-K) updated eigenvalues
+*> (those which were deflated) sorted into increasing order.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> If ICOMPQ = 0, Q is not referenced. Otherwise,
+*> on entry, Q contains the eigenvectors of the partially solved
+*> system which has been previously updated in matrix
+*> multiplies with other partially solved eigensystems.
+*> On exit, Q contains the trailing (N-K) updated eigenvectors
+*> (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> The permutation which separately sorts the two sub-problems
+*> in D into ascending order. Note that elements in the second
+*> half of this permutation must first have CUTPNT added to
+*> their values in order to be accurate.
+*> \endverbatim
+*>
+*> \param[in,out] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> On entry, the off-diagonal element associated with the rank-1
+*> cut which originally split the two submatrices which are now
+*> being recombined.
+*> On exit, RHO has been modified to the value required by
+*> DLAED3.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> The location of the last eigenvalue in the leading
+*> sub-matrix. min(1,N) <= CUTPNT <= N.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (N)
+*> On entry, Z contains the updating vector (the last row of
+*> the first sub-eigenvector matrix and the first row of the
+*> second sub-eigenvector matrix).
+*> On exit, the contents of Z are destroyed by the updating
+*> process.
+*> \endverbatim
+*>
+*> \param[out] DLAMDA
+*> \verbatim
+*> DLAMDA is DOUBLE PRECISION array, dimension (N)
+*> A copy of the first K eigenvalues which will be used by
+*> DLAED3 to form the secular equation.
+*> \endverbatim
+*>
+*> \param[out] Q2
+*> \verbatim
+*> Q2 is DOUBLE PRECISION array, dimension (LDQ2,N)
+*> If ICOMPQ = 0, Q2 is not referenced. Otherwise,
+*> a copy of the first K eigenvectors which will be used by
+*> DLAED7 in a matrix multiply (DGEMM) to update the new
+*> eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQ2
+*> \verbatim
+*> LDQ2 is INTEGER
+*> The leading dimension of the array Q2. LDQ2 >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first k values of the final deflation-altered z-vector and
+*> will be passed to DLAED3.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N)
+*> The permutations (from deflation and sorting) to be applied
+*> to each eigenblock.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension (2, N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] INDXP
+*> \verbatim
+*> INDXP is INTEGER array, dimension (N)
+*> The permutation used to place deflated values of D at the end
+*> of the array. INDXP(1:K) points to the nondeflated D-values
+*> and INDXP(K+1:N) points to the deflated eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] INDX
+*> \verbatim
+*> INDX is INTEGER array, dimension (N)
+*> The permutation used to sort the contents of D into ascending
+*> order.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAED8( ICOMPQ, K, N, QSIZ, D, Q, LDQ, INDXQ, RHO,
$ CUTPNT, Z, DLAMDA, Q2, LDQ2, W, PERM, GIVPTR,
$ GIVCOL, GIVNUM, INDXP, INDX, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER CUTPNT, GIVPTR, ICOMPQ, INFO, K, LDQ, LDQ2, N,
@@ -19,129 +258,6 @@
$ Q( LDQ, * ), Q2( LDQ2, * ), W( * ), Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAED8 merges the two sets of eigenvalues together into a single
-* sorted set. Then it tries to deflate the size of the problem.
-* There are two ways in which deflation can occur: when two or more
-* eigenvalues are close together or if there is a tiny element in the
-* Z vector. For each such occurrence the order of the related secular
-* equation problem is reduced by one.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* = 0: Compute eigenvalues only.
-* = 1: Compute eigenvectors of original dense symmetric matrix
-* also. On entry, Q contains the orthogonal matrix used
-* to reduce the original matrix to tridiagonal form.
-*
-* K (output) INTEGER
-* The number of non-deflated eigenvalues, and the order of the
-* related secular equation.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* QSIZ (input) INTEGER
-* The dimension of the orthogonal matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the eigenvalues of the two submatrices to be
-* combined. On exit, the trailing (N-K) updated eigenvalues
-* (those which were deflated) sorted into increasing order.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* If ICOMPQ = 0, Q is not referenced. Otherwise,
-* on entry, Q contains the eigenvectors of the partially solved
-* system which has been previously updated in matrix
-* multiplies with other partially solved eigensystems.
-* On exit, Q contains the trailing (N-K) updated eigenvectors
-* (those which were deflated) in its last N-K columns.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* INDXQ (input) INTEGER array, dimension (N)
-* The permutation which separately sorts the two sub-problems
-* in D into ascending order. Note that elements in the second
-* half of this permutation must first have CUTPNT added to
-* their values in order to be accurate.
-*
-* RHO (input/output) DOUBLE PRECISION
-* On entry, the off-diagonal element associated with the rank-1
-* cut which originally split the two submatrices which are now
-* being recombined.
-* On exit, RHO has been modified to the value required by
-* DLAED3.
-*
-* CUTPNT (input) INTEGER
-* The location of the last eigenvalue in the leading
-* sub-matrix. min(1,N) <= CUTPNT <= N.
-*
-* Z (input) DOUBLE PRECISION array, dimension (N)
-* On entry, Z contains the updating vector (the last row of
-* the first sub-eigenvector matrix and the first row of the
-* second sub-eigenvector matrix).
-* On exit, the contents of Z are destroyed by the updating
-* process.
-*
-* DLAMDA (output) DOUBLE PRECISION array, dimension (N)
-* A copy of the first K eigenvalues which will be used by
-* DLAED3 to form the secular equation.
-*
-* Q2 (output) DOUBLE PRECISION array, dimension (LDQ2,N)
-* If ICOMPQ = 0, Q2 is not referenced. Otherwise,
-* a copy of the first K eigenvectors which will be used by
-* DLAED7 in a matrix multiply (DGEMM) to update the new
-* eigenvectors.
-*
-* LDQ2 (input) INTEGER
-* The leading dimension of the array Q2. LDQ2 >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first k values of the final deflation-altered z-vector and
-* will be passed to DLAED3.
-*
-* PERM (output) INTEGER array, dimension (N)
-* The permutations (from deflation and sorting) to be applied
-* to each eigenblock.
-*
-* GIVPTR (output) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem.
-*
-* GIVCOL (output) INTEGER array, dimension (2, N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (output) DOUBLE PRECISION array, dimension (2, N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* INDXP (workspace) INTEGER array, dimension (N)
-* The permutation used to place deflated values of D at the end
-* of the array. INDXP(1:K) points to the nondeflated D-values
-* and INDXP(K+1:N) points to the deflated eigenvalues.
-*
-* INDX (workspace) INTEGER array, dimension (N)
-* The permutation used to sort the contents of D into ascending
-* order.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaed9.f b/SRC/dlaed9.f
index cdf22900..0b53df22 100644
--- a/SRC/dlaed9.f
+++ b/SRC/dlaed9.f
@@ -1,87 +1,172 @@
- SUBROUTINE DLAED9( K, KSTART, KSTOP, N, D, Q, LDQ, RHO, DLAMDA, W,
- $ S, LDS, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, K, KSTART, KSTOP, LDQ, LDS, N
- DOUBLE PRECISION RHO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), DLAMDA( * ), Q( LDQ, * ), S( LDS, * ),
- $ W( * )
-* ..
-*
+*> \brief \b DLAED9
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAED9( K, KSTART, KSTOP, N, D, Q, LDQ, RHO, DLAMDA, W,
+* S, LDS, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, KSTART, KSTOP, LDQ, LDS, N
+* DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), DLAMDA( * ), Q( LDQ, * ), S( LDS, * ),
+* $ W( * )
+* ..
+*
* Purpose
* =======
*
-* DLAED9 finds the roots of the secular equation, as defined by the
-* values in D, Z, and RHO, between KSTART and KSTOP. It makes the
-* appropriate calls to DLAED4 and then stores the new matrix of
-* eigenvectors for use in calculating the next level of Z vectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAED9 finds the roots of the secular equation, as defined by the
+*> values in D, Z, and RHO, between KSTART and KSTOP. It makes the
+*> appropriate calls to DLAED4 and then stores the new matrix of
+*> eigenvectors for use in calculating the next level of Z vectors.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* K (input) INTEGER
-* The number of terms in the rational function to be solved by
-* DLAED4. K >= 0.
-*
-* KSTART (input) INTEGER
-*
-* KSTOP (input) INTEGER
-* The updated eigenvalues Lambda(I), KSTART <= I <= KSTOP
-* are to be computed. 1 <= KSTART <= KSTOP <= K.
-*
-* N (input) INTEGER
-* The number of rows and columns in the Q matrix.
-* N >= K (delation may result in N > K).
-*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* D(I) contains the updated eigenvalues
-* for KSTART <= I <= KSTOP.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDQ,N)
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max( 1, N ).
-*
-* RHO (input) DOUBLE PRECISION
-* The value of the parameter in the rank one update equation.
-* RHO >= 0 required.
-*
-* DLAMDA (input) DOUBLE PRECISION array, dimension (K)
-* The first K elements of this array contain the old roots
-* of the deflated updating problem. These are the poles
-* of the secular equation.
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of terms in the rational function to be solved by
+*> DLAED4. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] KSTART
+*> \verbatim
+*> KSTART is INTEGER
+*> \endverbatim
+*>
+*> \param[in] KSTOP
+*> \verbatim
+*> KSTOP is INTEGER
+*> The updated eigenvalues Lambda(I), KSTART <= I <= KSTOP
+*> are to be computed. 1 <= KSTART <= KSTOP <= K.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the Q matrix.
+*> N >= K (delation may result in N > K).
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> D(I) contains the updated eigenvalues
+*> for KSTART <= I <= KSTOP.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> The value of the parameter in the rank one update equation.
+*> RHO >= 0 required.
+*> \endverbatim
+*>
+*> \param[in] DLAMDA
+*> \verbatim
+*> DLAMDA is DOUBLE PRECISION array, dimension (K)
+*> The first K elements of this array contain the old roots
+*> of the deflated updating problem. These are the poles
+*> of the secular equation.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (K)
+*> The first K elements of this array contain the components
+*> of the deflation-adjusted updating vector.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (LDS, K)
+*> Will contain the eigenvectors of the repaired matrix which
+*> will be stored for subsequent Z vector calculation and
+*> multiplied by the previously accumulated eigenvectors
+*> to update the system.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of S. LDS >= max( 1, K ).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* W (input) DOUBLE PRECISION array, dimension (K)
-* The first K elements of this array contain the components
-* of the deflation-adjusted updating vector.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S (output) DOUBLE PRECISION array, dimension (LDS, K)
-* Will contain the eigenvectors of the repaired matrix which
-* will be stored for subsequent Z vector calculation and
-* multiplied by the previously accumulated eigenvectors
-* to update the system.
+*> \date November 2011
*
-* LDS (input) INTEGER
-* The leading dimension of S. LDS >= max( 1, K ).
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAED9( K, KSTART, KSTOP, N, D, Q, LDQ, RHO, DLAMDA, W,
+ $ S, LDS, INFO )
*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, K, KSTART, KSTOP, LDQ, LDS, N
+ DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), DLAMDA( * ), Q( LDQ, * ), S( LDS, * ),
+ $ W( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaeda.f b/SRC/dlaeda.f
index 653d55cf..378ccb66 100644
--- a/SRC/dlaeda.f
+++ b/SRC/dlaeda.f
@@ -1,94 +1,182 @@
- SUBROUTINE DLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
- $ GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER CURLVL, CURPBM, INFO, N, TLVLS
-* ..
-* .. Array Arguments ..
- INTEGER GIVCOL( 2, * ), GIVPTR( * ), PERM( * ),
- $ PRMPTR( * ), QPTR( * )
- DOUBLE PRECISION GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
-* ..
-*
+*> \brief \b DLAEDA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
+* GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CURLVL, CURPBM, INFO, N, TLVLS
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), GIVPTR( * ), PERM( * ),
+* $ PRMPTR( * ), QPTR( * )
+* DOUBLE PRECISION GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
+* ..
+*
* Purpose
* =======
*
-* DLAEDA computes the Z vector corresponding to the merge step in the
-* CURLVLth step of the merge process with TLVLS steps for the CURPBMth
-* problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAEDA computes the Z vector corresponding to the merge step in the
+*> CURLVLth step of the merge process with TLVLS steps for the CURPBMth
+*> problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* TLVLS (input) INTEGER
-* The total number of merging levels in the overall divide and
-* conquer tree.
-*
-* CURLVL (input) INTEGER
-* The current level in the overall merge routine,
-* 0 <= curlvl <= tlvls.
-*
-* CURPBM (input) INTEGER
-* The current problem in the current level in the overall
-* merge routine (counting from upper left to lower right).
-*
-* PRMPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in PERM a
-* level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
-* indicates the size of the permutation and incidentally the
-* size of the full, non-deflated problem.
-*
-* PERM (input) INTEGER array, dimension (N lg N)
-* Contains the permutations (from deflation and sorting) to be
-* applied to each eigenblock.
-*
-* GIVPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in GIVCOL a
-* level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
-* indicates the number of Givens rotations.
-*
-* GIVCOL (input) INTEGER array, dimension (2, N lg N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (input) DOUBLE PRECISION array, dimension (2, N lg N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* Q (input) DOUBLE PRECISION array, dimension (N**2)
-* Contains the square eigenblocks from previous levels, the
-* starting positions for blocks are given by QPTR.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] TLVLS
+*> \verbatim
+*> TLVLS is INTEGER
+*> The total number of merging levels in the overall divide and
+*> conquer tree.
+*> \endverbatim
+*>
+*> \param[in] CURLVL
+*> \verbatim
+*> CURLVL is INTEGER
+*> The current level in the overall merge routine,
+*> 0 <= curlvl <= tlvls.
+*> \endverbatim
+*>
+*> \param[in] CURPBM
+*> \verbatim
+*> CURPBM is INTEGER
+*> The current problem in the current level in the overall
+*> merge routine (counting from upper left to lower right).
+*> \endverbatim
+*>
+*> \param[in] PRMPTR
+*> \verbatim
+*> PRMPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in PERM a
+*> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
+*> indicates the size of the permutation and incidentally the
+*> size of the full, non-deflated problem.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N lg N)
+*> Contains the permutations (from deflation and sorting) to be
+*> applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in GIVCOL a
+*> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
+*> indicates the number of Givens rotations.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N lg N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension (2, N lg N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (N**2)
+*> Contains the square eigenblocks from previous levels, the
+*> starting positions for blocks are given by QPTR.
+*> \endverbatim
+*>
+*> \param[in] QPTR
+*> \verbatim
+*> QPTR is INTEGER array, dimension (N+2)
+*> Contains a list of pointers which indicate where in Q an
+*> eigenblock is stored. SQRT( QPTR(i+1) - QPTR(i) ) indicates
+*> the size of the block.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (N)
+*> On output this vector contains the updating vector (the last
+*> row of the first sub-eigenvector matrix and the first row of
+*> the second sub-eigenvector matrix).
+*> \endverbatim
+*>
+*> \param[out] ZTEMP
+*> \verbatim
+*> ZTEMP is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* QPTR (input) INTEGER array, dimension (N+2)
-* Contains a list of pointers which indicate where in Q an
-* eigenblock is stored. SQRT( QPTR(i+1) - QPTR(i) ) indicates
-* the size of the block.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Z (output) DOUBLE PRECISION array, dimension (N)
-* On output this vector contains the updating vector (the last
-* row of the first sub-eigenvector matrix and the first row of
-* the second sub-eigenvector matrix).
+*> \date November 2011
*
-* ZTEMP (workspace) DOUBLE PRECISION array, dimension (N)
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
+ $ GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER CURLVL, CURPBM, INFO, N, TLVLS
+* ..
+* .. Array Arguments ..
+ INTEGER GIVCOL( 2, * ), GIVPTR( * ), PERM( * ),
+ $ PRMPTR( * ), QPTR( * )
+ DOUBLE PRECISION GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaein.f b/SRC/dlaein.f
index f99daac9..2bcac239 100644
--- a/SRC/dlaein.f
+++ b/SRC/dlaein.f
@@ -1,10 +1,173 @@
+*> \brief \b DLAEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAEIN( RIGHTV, NOINIT, N, H, LDH, WR, WI, VR, VI, B,
+* LDB, WORK, EPS3, SMLNUM, BIGNUM, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL NOINIT, RIGHTV
+* INTEGER INFO, LDB, LDH, N
+* DOUBLE PRECISION BIGNUM, EPS3, SMLNUM, WI, WR
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), H( LDH, * ), VI( * ), VR( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAEIN uses inverse iteration to find a right or left eigenvector
+*> corresponding to the eigenvalue (WR,WI) of a real upper Hessenberg
+*> matrix H.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RIGHTV
+*> \verbatim
+*> RIGHTV is LOGICAL
+*> = .TRUE. : compute right eigenvector;
+*> = .FALSE.: compute left eigenvector.
+*> \endverbatim
+*>
+*> \param[in] NOINIT
+*> \verbatim
+*> NOINIT is LOGICAL
+*> = .TRUE. : no initial vector supplied in (VR,VI).
+*> = .FALSE.: initial vector supplied in (VR,VI).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> The upper Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION
+*> The real and imaginary parts of the eigenvalue of H whose
+*> corresponding right or left eigenvector is to be computed.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in,out] VI
+*> \verbatim
+*> VI is DOUBLE PRECISION array, dimension (N)
+*> On entry, if NOINIT = .FALSE. and WI = 0.0, VR must contain
+*> a real starting vector for inverse iteration using the real
+*> eigenvalue WR; if NOINIT = .FALSE. and WI.ne.0.0, VR and VI
+*> must contain the real and imaginary parts of a complex
+*> starting vector for inverse iteration using the complex
+*> eigenvalue (WR,WI); otherwise VR and VI need not be set.
+*> On exit, if WI = 0.0 (real eigenvalue), VR contains the
+*> computed real eigenvector; if WI.ne.0.0 (complex eigenvalue),
+*> VR and VI contain the real and imaginary parts of the
+*> computed complex eigenvector. The eigenvector is normalized
+*> so that the component of largest magnitude has magnitude 1;
+*> here the magnitude of a complex number (x,y) is taken to be
+*> |x| + |y|.
+*> VI is not referenced if WI = 0.0.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] EPS3
+*> \verbatim
+*> EPS3 is DOUBLE PRECISION
+*> A small machine-dependent value which is used to perturb
+*> close eigenvalues, and to replace zero pivots.
+*> \endverbatim
+*>
+*> \param[in] SMLNUM
+*> \verbatim
+*> SMLNUM is DOUBLE PRECISION
+*> A machine-dependent value close to the underflow threshold.
+*> \endverbatim
+*>
+*> \param[in] BIGNUM
+*> \verbatim
+*> BIGNUM is DOUBLE PRECISION
+*> A machine-dependent value close to the overflow threshold.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: inverse iteration did not converge; VR is set to the
+*> last iterate, and so is VI if WI.ne.0.0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAEIN( RIGHTV, NOINIT, N, H, LDH, WR, WI, VR, VI, B,
$ LDB, WORK, EPS3, SMLNUM, BIGNUM, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL NOINIT, RIGHTV
@@ -16,79 +179,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAEIN uses inverse iteration to find a right or left eigenvector
-* corresponding to the eigenvalue (WR,WI) of a real upper Hessenberg
-* matrix H.
-*
-* Arguments
-* =========
-*
-* RIGHTV (input) LOGICAL
-* = .TRUE. : compute right eigenvector;
-* = .FALSE.: compute left eigenvector.
-*
-* NOINIT (input) LOGICAL
-* = .TRUE. : no initial vector supplied in (VR,VI).
-* = .FALSE.: initial vector supplied in (VR,VI).
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* H (input) DOUBLE PRECISION array, dimension (LDH,N)
-* The upper Hessenberg matrix H.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* WR (input) DOUBLE PRECISION
-*
-* WI (input) DOUBLE PRECISION
-* The real and imaginary parts of the eigenvalue of H whose
-* corresponding right or left eigenvector is to be computed.
-*
-* VR (input/output) DOUBLE PRECISION array, dimension (N)
-*
-* VI (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, if NOINIT = .FALSE. and WI = 0.0, VR must contain
-* a real starting vector for inverse iteration using the real
-* eigenvalue WR; if NOINIT = .FALSE. and WI.ne.0.0, VR and VI
-* must contain the real and imaginary parts of a complex
-* starting vector for inverse iteration using the complex
-* eigenvalue (WR,WI); otherwise VR and VI need not be set.
-* On exit, if WI = 0.0 (real eigenvalue), VR contains the
-* computed real eigenvector; if WI.ne.0.0 (complex eigenvalue),
-* VR and VI contain the real and imaginary parts of the
-* computed complex eigenvector. The eigenvector is normalized
-* so that the component of largest magnitude has magnitude 1;
-* here the magnitude of a complex number (x,y) is taken to be
-* |x| + |y|.
-* VI is not referenced if WI = 0.0.
-*
-* B (workspace) DOUBLE PRECISION array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= N+1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* EPS3 (input) DOUBLE PRECISION
-* A small machine-dependent value which is used to perturb
-* close eigenvalues, and to replace zero pivots.
-*
-* SMLNUM (input) DOUBLE PRECISION
-* A machine-dependent value close to the underflow threshold.
-*
-* BIGNUM (input) DOUBLE PRECISION
-* A machine-dependent value close to the overflow threshold.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* = 1: inverse iteration did not converge; VR is set to the
-* last iterate, and so is VI if WI.ne.0.0.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaev2.f b/SRC/dlaev2.f
index c84b09c8..85a8e7bf 100644
--- a/SRC/dlaev2.f
+++ b/SRC/dlaev2.f
@@ -1,66 +1,127 @@
- SUBROUTINE DLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
+*> \brief \b DLAEV2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION A, B, C, CS1, RT1, RT2, SN1
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION A, B, C, CS1, RT1, RT2, SN1
+* ..
+*
* Purpose
* =======
*
-* DLAEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix
-* [ A B ]
-* [ B C ].
-* On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
-* eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
-* eigenvector for RT1, giving the decomposition
-*
-* [ CS1 SN1 ] [ A B ] [ CS1 -SN1 ] = [ RT1 0 ]
-* [-SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ].
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix
+*> [ A B ]
+*> [ B C ].
+*> On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
+*> eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
+*> eigenvector for RT1, giving the decomposition
+*>
+*> [ CS1 SN1 ] [ A B ] [ CS1 -SN1 ] = [ RT1 0 ]
+*> [-SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ].
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) DOUBLE PRECISION
-* The (1,1) element of the 2-by-2 matrix.
-*
-* B (input) DOUBLE PRECISION
-* The (1,2) element and the conjugate of the (2,1) element of
-* the 2-by-2 matrix.
-*
-* C (input) DOUBLE PRECISION
-* The (2,2) element of the 2-by-2 matrix.
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION
+*> The (1,2) element and the conjugate of the (2,1) element of
+*> the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] RT1
+*> \verbatim
+*> RT1 is DOUBLE PRECISION
+*> The eigenvalue of larger absolute value.
+*> \endverbatim
+*>
+*> \param[out] RT2
+*> \verbatim
+*> RT2 is DOUBLE PRECISION
+*> The eigenvalue of smaller absolute value.
+*> \endverbatim
+*>
+*> \param[out] CS1
+*> \verbatim
+*> CS1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SN1
+*> \verbatim
+*> SN1 is DOUBLE PRECISION
+*> The vector (CS1, SN1) is a unit right eigenvector for RT1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RT1 (output) DOUBLE PRECISION
-* The eigenvalue of larger absolute value.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RT2 (output) DOUBLE PRECISION
-* The eigenvalue of smaller absolute value.
+*> \date November 2011
*
-* CS1 (output) DOUBLE PRECISION
+*> \ingroup auxOTHERauxiliary
*
-* SN1 (output) DOUBLE PRECISION
-* The vector (CS1, SN1) is a unit right eigenvector for RT1.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> RT1 is accurate to a few ulps barring over/underflow.
+*>
+*> RT2 may be inaccurate if there is massive cancellation in the
+*> determinant A*C-B*B; higher precision or correctly rounded or
+*> correctly truncated arithmetic would be needed to compute RT2
+*> accurately in all cases.
+*>
+*> CS1 and SN1 are accurate to a few ulps barring over/underflow.
+*>
+*> Overflow is possible only if RT1 is within a factor of 5 of overflow.
+*> Underflow is harmless if the input data is 0 or exceeds
+*> underflow_threshold / macheps.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
*
-* RT1 is accurate to a few ulps barring over/underflow.
-*
-* RT2 may be inaccurate if there is massive cancellation in the
-* determinant A*C-B*B; higher precision or correctly rounded or
-* correctly truncated arithmetic would be needed to compute RT2
-* accurately in all cases.
-*
-* CS1 and SN1 are accurate to a few ulps barring over/underflow.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Overflow is possible only if RT1 is within a factor of 5 of overflow.
-* Underflow is harmless if the input data is 0 or exceeds
-* underflow_threshold / macheps.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION A, B, C, CS1, RT1, RT2, SN1
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaexc.f b/SRC/dlaexc.f
index 42a0a156..ab4c7816 100644
--- a/SRC/dlaexc.f
+++ b/SRC/dlaexc.f
@@ -1,10 +1,139 @@
+*> \brief \b DLAEXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAEXC( WANTQ, N, T, LDT, Q, LDQ, J1, N1, N2, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ
+* INTEGER INFO, J1, LDQ, LDT, N, N1, N2
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAEXC swaps adjacent diagonal blocks T11 and T22 of order 1 or 2 in
+*> an upper quasi-triangular matrix T by an orthogonal similarity
+*> transformation.
+*>
+*> T must be in Schur canonical form, that is, block upper triangular
+*> with 1-by-1 and 2-by-2 diagonal blocks; each 2-by-2 diagonal block
+*> has its diagonal elemnts equal and its off-diagonal elements of
+*> opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> = .TRUE. : accumulate the transformation in the matrix Q;
+*> = .FALSE.: do not accumulate the transformation.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,N)
+*> On entry, the upper quasi-triangular matrix T, in Schur
+*> canonical form.
+*> On exit, the updated matrix T, again in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, if WANTQ is .TRUE., the orthogonal matrix Q.
+*> On exit, if WANTQ is .TRUE., the updated matrix Q.
+*> If WANTQ is .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1; and if WANTQ is .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in] J1
+*> \verbatim
+*> J1 is INTEGER
+*> The index of the first row of the first block T11.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The order of the first block T11. N1 = 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> The order of the second block T22. N2 = 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: the transformed matrix T would be too far from Schur
+*> form; the blocks are not swapped and T and Q are
+*> unchanged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAEXC( WANTQ, N, T, LDT, Q, LDQ, J1, N1, N2, WORK,
$ INFO )
*
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTQ
@@ -14,62 +143,6 @@
DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAEXC swaps adjacent diagonal blocks T11 and T22 of order 1 or 2 in
-* an upper quasi-triangular matrix T by an orthogonal similarity
-* transformation.
-*
-* T must be in Schur canonical form, that is, block upper triangular
-* with 1-by-1 and 2-by-2 diagonal blocks; each 2-by-2 diagonal block
-* has its diagonal elemnts equal and its off-diagonal elements of
-* opposite sign.
-*
-* Arguments
-* =========
-*
-* WANTQ (input) LOGICAL
-* = .TRUE. : accumulate the transformation in the matrix Q;
-* = .FALSE.: do not accumulate the transformation.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) DOUBLE PRECISION array, dimension (LDT,N)
-* On entry, the upper quasi-triangular matrix T, in Schur
-* canonical form.
-* On exit, the updated matrix T, again in Schur canonical form.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, if WANTQ is .TRUE., the orthogonal matrix Q.
-* On exit, if WANTQ is .TRUE., the updated matrix Q.
-* If WANTQ is .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1; and if WANTQ is .TRUE., LDQ >= N.
-*
-* J1 (input) INTEGER
-* The index of the first row of the first block T11.
-*
-* N1 (input) INTEGER
-* The order of the first block T11. N1 = 0, 1 or 2.
-*
-* N2 (input) INTEGER
-* The order of the second block T22. N2 = 0, 1 or 2.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* = 1: the transformed matrix T would be too far from Schur
-* form; the blocks are not swapped and T and Q are
-* unchanged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlag2.f b/SRC/dlag2.f
index 4e21196b..d9df2002 100644
--- a/SRC/dlag2.f
+++ b/SRC/dlag2.f
@@ -1,10 +1,157 @@
+*> \brief \b DLAG2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1,
+* WR2, WI )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB
+* DOUBLE PRECISION SAFMIN, SCALE1, SCALE2, WI, WR1, WR2
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue
+*> problem A - w B, with scaling as necessary to avoid over-/underflow.
+*>
+*> The scaling factor "s" results in a modified eigenvalue equation
+*>
+*> s A - w B
+*>
+*> where s is a non-negative scaling factor chosen so that w, w B,
+*> and s A do not overflow and, if possible, do not underflow, either.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, 2)
+*> On entry, the 2 x 2 matrix A. It is assumed that its 1-norm
+*> is less than 1/SAFMIN. Entries less than
+*> sqrt(SAFMIN)*norm(A) are subject to being treated as zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= 2.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, 2)
+*> On entry, the 2 x 2 upper triangular matrix B. It is
+*> assumed that the one-norm of B is less than 1/SAFMIN. The
+*> diagonals should be at least sqrt(SAFMIN) times the largest
+*> element of B (in absolute value); if a diagonal is smaller
+*> than that, then +/- sqrt(SAFMIN) will be used instead of
+*> that diagonal.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= 2.
+*> \endverbatim
+*>
+*> \param[in] SAFMIN
+*> \verbatim
+*> SAFMIN is DOUBLE PRECISION
+*> The smallest positive number s.t. 1/SAFMIN does not
+*> overflow. (This should always be DLAMCH('S') -- it is an
+*> argument in order to avoid having to call DLAMCH frequently.)
+*> \endverbatim
+*>
+*> \param[out] SCALE1
+*> \verbatim
+*> SCALE1 is DOUBLE PRECISION
+*> A scaling factor used to avoid over-/underflow in the
+*> eigenvalue equation which defines the first eigenvalue. If
+*> the eigenvalues are complex, then the eigenvalues are
+*> ( WR1 +/- WI i ) / SCALE1 (which may lie outside the
+*> exponent range of the machine), SCALE1=SCALE2, and SCALE1
+*> will always be positive. If the eigenvalues are real, then
+*> the first (real) eigenvalue is WR1 / SCALE1 , but this may
+*> overflow or underflow, and in fact, SCALE1 may be zero or
+*> less than the underflow threshhold if the exact eigenvalue
+*> is sufficiently large.
+*> \endverbatim
+*>
+*> \param[out] SCALE2
+*> \verbatim
+*> SCALE2 is DOUBLE PRECISION
+*> A scaling factor used to avoid over-/underflow in the
+*> eigenvalue equation which defines the second eigenvalue. If
+*> the eigenvalues are complex, then SCALE2=SCALE1. If the
+*> eigenvalues are real, then the second (real) eigenvalue is
+*> WR2 / SCALE2 , but this may overflow or underflow, and in
+*> fact, SCALE2 may be zero or less than the underflow
+*> threshhold if the exact eigenvalue is sufficiently large.
+*> \endverbatim
+*>
+*> \param[out] WR1
+*> \verbatim
+*> WR1 is DOUBLE PRECISION
+*> If the eigenvalue is real, then WR1 is SCALE1 times the
+*> eigenvalue closest to the (2,2) element of A B**(-1). If the
+*> eigenvalue is complex, then WR1=WR2 is SCALE1 times the real
+*> part of the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] WR2
+*> \verbatim
+*> WR2 is DOUBLE PRECISION
+*> If the eigenvalue is real, then WR2 is SCALE2 times the
+*> other eigenvalue. If the eigenvalue is complex, then
+*> WR1=WR2 is SCALE1 times the real part of the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION
+*> If the eigenvalue is real, then WI is zero. If the
+*> eigenvalue is complex, then WI is SCALE1 times the imaginary
+*> part of the eigenvalues. WI will always be non-negative.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1,
$ WR2, WI )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB
@@ -14,83 +161,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue
-* problem A - w B, with scaling as necessary to avoid over-/underflow.
-*
-* The scaling factor "s" results in a modified eigenvalue equation
-*
-* s A - w B
-*
-* where s is a non-negative scaling factor chosen so that w, w B,
-* and s A do not overflow and, if possible, do not underflow, either.
-*
-* Arguments
-* =========
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, 2)
-* On entry, the 2 x 2 matrix A. It is assumed that its 1-norm
-* is less than 1/SAFMIN. Entries less than
-* sqrt(SAFMIN)*norm(A) are subject to being treated as zero.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= 2.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB, 2)
-* On entry, the 2 x 2 upper triangular matrix B. It is
-* assumed that the one-norm of B is less than 1/SAFMIN. The
-* diagonals should be at least sqrt(SAFMIN) times the largest
-* element of B (in absolute value); if a diagonal is smaller
-* than that, then +/- sqrt(SAFMIN) will be used instead of
-* that diagonal.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= 2.
-*
-* SAFMIN (input) DOUBLE PRECISION
-* The smallest positive number s.t. 1/SAFMIN does not
-* overflow. (This should always be DLAMCH('S') -- it is an
-* argument in order to avoid having to call DLAMCH frequently.)
-*
-* SCALE1 (output) DOUBLE PRECISION
-* A scaling factor used to avoid over-/underflow in the
-* eigenvalue equation which defines the first eigenvalue. If
-* the eigenvalues are complex, then the eigenvalues are
-* ( WR1 +/- WI i ) / SCALE1 (which may lie outside the
-* exponent range of the machine), SCALE1=SCALE2, and SCALE1
-* will always be positive. If the eigenvalues are real, then
-* the first (real) eigenvalue is WR1 / SCALE1 , but this may
-* overflow or underflow, and in fact, SCALE1 may be zero or
-* less than the underflow threshhold if the exact eigenvalue
-* is sufficiently large.
-*
-* SCALE2 (output) DOUBLE PRECISION
-* A scaling factor used to avoid over-/underflow in the
-* eigenvalue equation which defines the second eigenvalue. If
-* the eigenvalues are complex, then SCALE2=SCALE1. If the
-* eigenvalues are real, then the second (real) eigenvalue is
-* WR2 / SCALE2 , but this may overflow or underflow, and in
-* fact, SCALE2 may be zero or less than the underflow
-* threshhold if the exact eigenvalue is sufficiently large.
-*
-* WR1 (output) DOUBLE PRECISION
-* If the eigenvalue is real, then WR1 is SCALE1 times the
-* eigenvalue closest to the (2,2) element of A B**(-1). If the
-* eigenvalue is complex, then WR1=WR2 is SCALE1 times the real
-* part of the eigenvalues.
-*
-* WR2 (output) DOUBLE PRECISION
-* If the eigenvalue is real, then WR2 is SCALE2 times the
-* other eigenvalue. If the eigenvalue is complex, then
-* WR1=WR2 is SCALE1 times the real part of the eigenvalues.
-*
-* WI (output) DOUBLE PRECISION
-* If the eigenvalue is real, then WI is zero. If the
-* eigenvalue is complex, then WI is SCALE1 times the imaginary
-* part of the eigenvalues. WI will always be non-negative.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlag2s.f b/SRC/dlag2s.f
index a90409fe..000c6f1c 100644
--- a/SRC/dlag2s.f
+++ b/SRC/dlag2s.f
@@ -1,58 +1,117 @@
- SUBROUTINE DLAG2S( M, N, A, LDA, SA, LDSA, INFO )
-*
-* -- LAPACK PROTOTYPE auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDSA, M, N
-* ..
-* .. Array Arguments ..
- REAL SA( LDSA, * )
- DOUBLE PRECISION A( LDA, * )
-* ..
-*
+*> \brief \b DLAG2S
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAG2S( M, N, A, LDA, SA, LDSA, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDSA, M, N
+* ..
+* .. Array Arguments ..
+* REAL SA( LDSA, * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DLAG2S converts a DOUBLE PRECISION matrix, SA, to a SINGLE
-* PRECISION matrix, A.
-*
-* RMAX is the overflow for the SINGLE PRECISION arithmetic
-* DLAG2S checks that all the entries of A are between -RMAX and
-* RMAX. If not the convertion is aborted and a flag is raised.
-*
-* This is an auxiliary routine so there is no argument checking.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAG2S converts a DOUBLE PRECISION matrix, SA, to a SINGLE
+*> PRECISION matrix, A.
+*>
+*> RMAX is the overflow for the SINGLE PRECISION arithmetic
+*> DLAG2S checks that all the entries of A are between -RMAX and
+*> RMAX. If not the convertion is aborted and a flag is raised.
+*>
+*> This is an auxiliary routine so there is no argument checking.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of lines of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of lines of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N coefficient matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] SA
+*> \verbatim
+*> SA is REAL array, dimension (LDSA,N)
+*> On exit, if INFO=0, the M-by-N coefficient matrix SA; if
+*> INFO>0, the content of SA is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDSA
+*> \verbatim
+*> LDSA is INTEGER
+*> The leading dimension of the array SA. LDSA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> = 1: an entry of the matrix A is greater than the SINGLE
+*> PRECISION overflow threshold, in this case, the content
+*> of SA in exit is unspecified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N coefficient matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup doubleOTHERauxiliary
*
-* SA (output) REAL array, dimension (LDSA,N)
-* On exit, if INFO=0, the M-by-N coefficient matrix SA; if
-* INFO>0, the content of SA is unspecified.
+* =====================================================================
+ SUBROUTINE DLAG2S( M, N, A, LDA, SA, LDSA, INFO )
*
-* LDSA (input) INTEGER
-* The leading dimension of the array SA. LDSA >= max(1,M).
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* = 1: an entry of the matrix A is greater than the SINGLE
-* PRECISION overflow threshold, in this case, the content
-* of SA in exit is unspecified.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDSA, M, N
+* ..
+* .. Array Arguments ..
+ REAL SA( LDSA, * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlags2.f b/SRC/dlags2.f
index 1116e551..d4517a4b 100644
--- a/SRC/dlags2.f
+++ b/SRC/dlags2.f
@@ -1,82 +1,159 @@
- SUBROUTINE DLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
- $ SNV, CSQ, SNQ )
+*> \brief \b DLAGS2
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL UPPER
- DOUBLE PRECISION A1, A2, A3, B1, B2, B3, CSQ, CSU, CSV, SNQ,
- $ SNU, SNV
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
+* SNV, CSQ, SNQ )
+*
+* .. Scalar Arguments ..
+* LOGICAL UPPER
+* DOUBLE PRECISION A1, A2, A3, B1, B2, B3, CSQ, CSU, CSV, SNQ,
+* $ SNU, SNV
+* ..
+*
* Purpose
* =======
*
-* DLAGS2 computes 2-by-2 orthogonal matrices U, V and Q, such
-* that if ( UPPER ) then
-*
-* U**T *A*Q = U**T *( A1 A2 )*Q = ( x 0 )
-* ( 0 A3 ) ( x x )
-* and
-* V**T*B*Q = V**T *( B1 B2 )*Q = ( x 0 )
-* ( 0 B3 ) ( x x )
-*
-* or if ( .NOT.UPPER ) then
-*
-* U**T *A*Q = U**T *( A1 0 )*Q = ( x x )
-* ( A2 A3 ) ( 0 x )
-* and
-* V**T*B*Q = V**T*( B1 0 )*Q = ( x x )
-* ( B2 B3 ) ( 0 x )
-*
-* The rows of the transformed A and B are parallel, where
-*
-* U = ( CSU SNU ), V = ( CSV SNV ), Q = ( CSQ SNQ )
-* ( -SNU CSU ) ( -SNV CSV ) ( -SNQ CSQ )
-*
-* Z**T denotes the transpose of Z.
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAGS2 computes 2-by-2 orthogonal matrices U, V and Q, such
+*> that if ( UPPER ) then
+*>
+*> U**T *A*Q = U**T *( A1 A2 )*Q = ( x 0 )
+*> ( 0 A3 ) ( x x )
+*> and
+*> V**T*B*Q = V**T *( B1 B2 )*Q = ( x 0 )
+*> ( 0 B3 ) ( x x )
+*>
+*> or if ( .NOT.UPPER ) then
+*>
+*> U**T *A*Q = U**T *( A1 0 )*Q = ( x x )
+*> ( A2 A3 ) ( 0 x )
+*> and
+*> V**T*B*Q = V**T*( B1 0 )*Q = ( x x )
+*> ( B2 B3 ) ( 0 x )
+*>
+*> The rows of the transformed A and B are parallel, where
+*>
+*> U = ( CSU SNU ), V = ( CSV SNV ), Q = ( CSQ SNQ )
+*> ( -SNU CSU ) ( -SNV CSV ) ( -SNQ CSQ )
+*>
+*> Z**T denotes the transpose of Z.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPPER (input) LOGICAL
-* = .TRUE.: the input matrices A and B are upper triangular.
-* = .FALSE.: the input matrices A and B are lower triangular.
-*
-* A1 (input) DOUBLE PRECISION
-*
-* A2 (input) DOUBLE PRECISION
-*
-* A3 (input) DOUBLE PRECISION
-* On entry, A1, A2 and A3 are elements of the input 2-by-2
-* upper (lower) triangular matrix A.
-*
-* B1 (input) DOUBLE PRECISION
-*
-* B2 (input) DOUBLE PRECISION
-*
-* B3 (input) DOUBLE PRECISION
-* On entry, B1, B2 and B3 are elements of the input 2-by-2
-* upper (lower) triangular matrix B.
+*> \param[in] UPPER
+*> \verbatim
+*> UPPER is LOGICAL
+*> = .TRUE.: the input matrices A and B are upper triangular.
+*> = .FALSE.: the input matrices A and B are lower triangular.
+*> \endverbatim
+*>
+*> \param[in] A1
+*> \verbatim
+*> A1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] A2
+*> \verbatim
+*> A2 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] A3
+*> \verbatim
+*> A3 is DOUBLE PRECISION
+*> On entry, A1, A2 and A3 are elements of the input 2-by-2
+*> upper (lower) triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] B1
+*> \verbatim
+*> B1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] B2
+*> \verbatim
+*> B2 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] B3
+*> \verbatim
+*> B3 is DOUBLE PRECISION
+*> On entry, B1, B2 and B3 are elements of the input 2-by-2
+*> upper (lower) triangular matrix B.
+*> \endverbatim
+*>
+*> \param[out] CSU
+*> \verbatim
+*> CSU is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SNU
+*> \verbatim
+*> SNU is DOUBLE PRECISION
+*> The desired orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[out] CSV
+*> \verbatim
+*> CSV is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SNV
+*> \verbatim
+*> SNV is DOUBLE PRECISION
+*> The desired orthogonal matrix V.
+*> \endverbatim
+*>
+*> \param[out] CSQ
+*> \verbatim
+*> CSQ is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SNQ
+*> \verbatim
+*> SNQ is DOUBLE PRECISION
+*> The desired orthogonal matrix Q.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CSU (output) DOUBLE PRECISION
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SNU (output) DOUBLE PRECISION
-* The desired orthogonal matrix U.
+*> \date November 2011
*
-* CSV (output) DOUBLE PRECISION
+*> \ingroup doubleOTHERauxiliary
*
-* SNV (output) DOUBLE PRECISION
-* The desired orthogonal matrix V.
+* =====================================================================
+ SUBROUTINE DLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
+ $ SNV, CSQ, SNQ )
*
-* CSQ (output) DOUBLE PRECISION
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SNQ (output) DOUBLE PRECISION
-* The desired orthogonal matrix Q.
+* .. Scalar Arguments ..
+ LOGICAL UPPER
+ DOUBLE PRECISION A1, A2, A3, B1, B2, B3, CSQ, CSU, CSV, SNQ,
+ $ SNU, SNV
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlagtf.f b/SRC/dlagtf.f
index 09216dfc..d6c398de 100644
--- a/SRC/dlagtf.f
+++ b/SRC/dlagtf.f
@@ -1,99 +1,171 @@
- SUBROUTINE DLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- DOUBLE PRECISION LAMBDA, TOL
-* ..
-* .. Array Arguments ..
- INTEGER IN( * )
- DOUBLE PRECISION A( * ), B( * ), C( * ), D( * )
-* ..
-*
+*> \brief \b DLAGTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* DOUBLE PRECISION LAMBDA, TOL
+* ..
+* .. Array Arguments ..
+* INTEGER IN( * )
+* DOUBLE PRECISION A( * ), B( * ), C( * ), D( * )
+* ..
+*
* Purpose
* =======
*
-* DLAGTF factorizes the matrix (T - lambda*I), where T is an n by n
-* tridiagonal matrix and lambda is a scalar, as
-*
-* T - lambda*I = PLU,
-*
-* where P is a permutation matrix, L is a unit lower tridiagonal matrix
-* with at most one non-zero sub-diagonal elements per column and U is
-* an upper triangular matrix with at most two non-zero super-diagonal
-* elements per column.
-*
-* The factorization is obtained by Gaussian elimination with partial
-* pivoting and implicit row scaling.
-*
-* The parameter LAMBDA is included in the routine so that DLAGTF may
-* be used, in conjunction with DLAGTS, to obtain eigenvectors of T by
-* inverse iteration.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAGTF factorizes the matrix (T - lambda*I), where T is an n by n
+*> tridiagonal matrix and lambda is a scalar, as
+*>
+*> T - lambda*I = PLU,
+*>
+*> where P is a permutation matrix, L is a unit lower tridiagonal matrix
+*> with at most one non-zero sub-diagonal elements per column and U is
+*> an upper triangular matrix with at most two non-zero super-diagonal
+*> elements per column.
+*>
+*> The factorization is obtained by Gaussian elimination with partial
+*> pivoting and implicit row scaling.
+*>
+*> The parameter LAMBDA is included in the routine so that DLAGTF may
+*> be used, in conjunction with DLAGTS, to obtain eigenvectors of T by
+*> inverse iteration.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix T.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, A must contain the diagonal elements of T.
-*
-* On exit, A is overwritten by the n diagonal elements of the
-* upper triangular matrix U of the factorization of T.
-*
-* LAMBDA (input) DOUBLE PRECISION
-* On entry, the scalar lambda.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, B must contain the (n-1) super-diagonal elements of
-* T.
-*
-* On exit, B is overwritten by the (n-1) super-diagonal
-* elements of the matrix U of the factorization of T.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, C must contain the (n-1) sub-diagonal elements of
-* T.
-*
-* On exit, C is overwritten by the (n-1) sub-diagonal elements
-* of the matrix L of the factorization of T.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N)
+*> On entry, A must contain the diagonal elements of T.
+*> \endverbatim
+*> \verbatim
+*> On exit, A is overwritten by the n diagonal elements of the
+*> upper triangular matrix U of the factorization of T.
+*> \endverbatim
+*>
+*> \param[in] LAMBDA
+*> \verbatim
+*> LAMBDA is DOUBLE PRECISION
+*> On entry, the scalar lambda.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, B must contain the (n-1) super-diagonal elements of
+*> T.
+*> \endverbatim
+*> \verbatim
+*> On exit, B is overwritten by the (n-1) super-diagonal
+*> elements of the matrix U of the factorization of T.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, C must contain the (n-1) sub-diagonal elements of
+*> T.
+*> \endverbatim
+*> \verbatim
+*> On exit, C is overwritten by the (n-1) sub-diagonal elements
+*> of the matrix L of the factorization of T.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> On entry, a relative tolerance used to indicate whether or
+*> not the matrix (T - lambda*I) is nearly singular. TOL should
+*> normally be chose as approximately the largest relative error
+*> in the elements of T. For example, if the elements of T are
+*> correct to about 4 significant figures, then TOL should be
+*> set to about 5*10**(-4). If TOL is supplied as less than eps,
+*> where eps is the relative machine precision, then the value
+*> eps is used in place of TOL.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N-2)
+*> On exit, D is overwritten by the (n-2) second super-diagonal
+*> elements of the matrix U of the factorization of T.
+*> \endverbatim
+*>
+*> \param[out] IN
+*> \verbatim
+*> IN is INTEGER array, dimension (N)
+*> On exit, IN contains details of the permutation matrix P. If
+*> an interchange occurred at the kth step of the elimination,
+*> then IN(k) = 1, otherwise IN(k) = 0. The element IN(n)
+*> returns the smallest positive integer j such that
+*> \endverbatim
+*> \verbatim
+*> abs( u(j,j) ).le. norm( (T - lambda*I)(j) )*TOL,
+*> \endverbatim
+*> \verbatim
+*> where norm( A(j) ) denotes the sum of the absolute values of
+*> the jth row of the matrix A. If no such j exists then IN(n)
+*> is returned as zero. If IN(n) is returned as positive, then a
+*> diagonal element of U is small, indicating that
+*> (T - lambda*I) is singular or nearly singular,
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> .lt. 0: if INFO = -k, the kth argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TOL (input) DOUBLE PRECISION
-* On entry, a relative tolerance used to indicate whether or
-* not the matrix (T - lambda*I) is nearly singular. TOL should
-* normally be chose as approximately the largest relative error
-* in the elements of T. For example, if the elements of T are
-* correct to about 4 significant figures, then TOL should be
-* set to about 5*10**(-4). If TOL is supplied as less than eps,
-* where eps is the relative machine precision, then the value
-* eps is used in place of TOL.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (output) DOUBLE PRECISION array, dimension (N-2)
-* On exit, D is overwritten by the (n-2) second super-diagonal
-* elements of the matrix U of the factorization of T.
+*> \date November 2011
*
-* IN (output) INTEGER array, dimension (N)
-* On exit, IN contains details of the permutation matrix P. If
-* an interchange occurred at the kth step of the elimination,
-* then IN(k) = 1, otherwise IN(k) = 0. The element IN(n)
-* returns the smallest positive integer j such that
+*> \ingroup auxOTHERcomputational
*
-* abs( u(j,j) ).le. norm( (T - lambda*I)(j) )*TOL,
+* =====================================================================
+ SUBROUTINE DLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
*
-* where norm( A(j) ) denotes the sum of the absolute values of
-* the jth row of the matrix A. If no such j exists then IN(n)
-* is returned as zero. If IN(n) is returned as positive, then a
-* diagonal element of U is small, indicating that
-* (T - lambda*I) is singular or nearly singular,
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* .lt. 0: if INFO = -k, the kth argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ DOUBLE PRECISION LAMBDA, TOL
+* ..
+* .. Array Arguments ..
+ INTEGER IN( * )
+ DOUBLE PRECISION A( * ), B( * ), C( * ), D( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlagtm.f b/SRC/dlagtm.f
index 690bf2bf..4f2349c2 100644
--- a/SRC/dlagtm.f
+++ b/SRC/dlagtm.f
@@ -1,10 +1,145 @@
+*> \brief \b DLAGTM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
+* B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAGTM performs a matrix-vector product of the form
+*>
+*> B := alpha * A * X + beta * B
+*>
+*> where A is a tridiagonal matrix of order N, B and X are N by NRHS
+*> matrices, and alpha and beta are real scalars, each of which may be
+*> 0., 1., or -1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': No transpose, B := alpha * A * X + beta * B
+*> = 'T': Transpose, B := alpha * A'* X + beta * B
+*> = 'C': Conjugate transpose = Transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) super-diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The N by NRHS matrix X.
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(N,1).
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> The scalar beta. BETA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix B.
+*> On exit, B is overwritten by the matrix expression
+*> B := alpha * A * X + beta * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(N,1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
$ B, LDB )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -16,63 +151,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAGTM performs a matrix-vector product of the form
-*
-* B := alpha * A * X + beta * B
-*
-* where A is a tridiagonal matrix of order N, B and X are N by NRHS
-* matrices, and alpha and beta are real scalars, each of which may be
-* 0., 1., or -1.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': No transpose, B := alpha * A * X + beta * B
-* = 'T': Transpose, B := alpha * A'* X + beta * B
-* = 'C': Conjugate transpose = Transpose
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B.
-*
-* ALPHA (input) DOUBLE PRECISION
-* The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) sub-diagonal elements of T.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of T.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) super-diagonal elements of T.
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The N by NRHS matrix X.
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(N,1).
-*
-* BETA (input) DOUBLE PRECISION
-* The scalar beta. BETA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 1.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix B.
-* On exit, B is overwritten by the matrix expression
-* B := alpha * A * X + beta * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(N,1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlagts.f b/SRC/dlagts.f
index b67bf022..d7e93f56 100644
--- a/SRC/dlagts.f
+++ b/SRC/dlagts.f
@@ -1,9 +1,163 @@
+*> \brief \b DLAGTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAGTS( JOB, N, A, B, C, D, IN, Y, TOL, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, JOB, N
+* DOUBLE PRECISION TOL
+* ..
+* .. Array Arguments ..
+* INTEGER IN( * )
+* DOUBLE PRECISION A( * ), B( * ), C( * ), D( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAGTS may be used to solve one of the systems of equations
+*>
+*> (T - lambda*I)*x = y or (T - lambda*I)**T*x = y,
+*>
+*> where T is an n by n tridiagonal matrix, for x, following the
+*> factorization of (T - lambda*I) as
+*>
+*> (T - lambda*I) = P*L*U ,
+*>
+*> by routine DLAGTF. The choice of equation to be solved is
+*> controlled by the argument JOB, and in each case there is an option
+*> to perturb zero or very small diagonal elements of U, this option
+*> being intended for use in applications such as inverse iteration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is INTEGER
+*> Specifies the job to be performed by DLAGTS as follows:
+*> = 1: The equations (T - lambda*I)x = y are to be solved,
+*> but diagonal elements of U are not to be perturbed.
+*> = -1: The equations (T - lambda*I)x = y are to be solved
+*> and, if overflow would otherwise occur, the diagonal
+*> elements of U are to be perturbed. See argument TOL
+*> below.
+*> = 2: The equations (T - lambda*I)**Tx = y are to be solved,
+*> but diagonal elements of U are not to be perturbed.
+*> = -2: The equations (T - lambda*I)**Tx = y are to be solved
+*> and, if overflow would otherwise occur, the diagonal
+*> elements of U are to be perturbed. See argument TOL
+*> below.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N)
+*> On entry, A must contain the diagonal elements of U as
+*> returned from DLAGTF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, B must contain the first super-diagonal elements of
+*> U as returned from DLAGTF.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, C must contain the sub-diagonal elements of L as
+*> returned from DLAGTF.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N-2)
+*> On entry, D must contain the second super-diagonal elements
+*> of U as returned from DLAGTF.
+*> \endverbatim
+*>
+*> \param[in] IN
+*> \verbatim
+*> IN is INTEGER array, dimension (N)
+*> On entry, IN must contain details of the matrix P as returned
+*> from DLAGTF.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension (N)
+*> On entry, the right hand side vector y.
+*> On exit, Y is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[in,out] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> On entry, with JOB .lt. 0, TOL should be the minimum
+*> perturbation to be made to very small diagonal elements of U.
+*> TOL should normally be chosen as about eps*norm(U), where eps
+*> is the relative machine precision, but if TOL is supplied as
+*> non-positive, then it is reset to eps*max( abs( u(i,j) ) ).
+*> If JOB .gt. 0 then TOL is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, TOL is changed as described above, only if TOL is
+*> non-positive on entry. Otherwise TOL is unchanged.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> .lt. 0: if INFO = -i, the i-th argument had an illegal value
+*> .gt. 0: overflow would occur when computing the INFO(th)
+*> element of the solution vector x. This can only occur
+*> when JOB is supplied as positive and either means
+*> that a diagonal element of U is very small, or that
+*> the elements of the right-hand side vector y are very
+*> large.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAGTS( JOB, N, A, B, C, D, IN, Y, TOL, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, JOB, N
@@ -14,89 +168,6 @@
DOUBLE PRECISION A( * ), B( * ), C( * ), D( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAGTS may be used to solve one of the systems of equations
-*
-* (T - lambda*I)*x = y or (T - lambda*I)**T*x = y,
-*
-* where T is an n by n tridiagonal matrix, for x, following the
-* factorization of (T - lambda*I) as
-*
-* (T - lambda*I) = P*L*U ,
-*
-* by routine DLAGTF. The choice of equation to be solved is
-* controlled by the argument JOB, and in each case there is an option
-* to perturb zero or very small diagonal elements of U, this option
-* being intended for use in applications such as inverse iteration.
-*
-* Arguments
-* =========
-*
-* JOB (input) INTEGER
-* Specifies the job to be performed by DLAGTS as follows:
-* = 1: The equations (T - lambda*I)x = y are to be solved,
-* but diagonal elements of U are not to be perturbed.
-* = -1: The equations (T - lambda*I)x = y are to be solved
-* and, if overflow would otherwise occur, the diagonal
-* elements of U are to be perturbed. See argument TOL
-* below.
-* = 2: The equations (T - lambda*I)**Tx = y are to be solved,
-* but diagonal elements of U are not to be perturbed.
-* = -2: The equations (T - lambda*I)**Tx = y are to be solved
-* and, if overflow would otherwise occur, the diagonal
-* elements of U are to be perturbed. See argument TOL
-* below.
-*
-* N (input) INTEGER
-* The order of the matrix T.
-*
-* A (input) DOUBLE PRECISION array, dimension (N)
-* On entry, A must contain the diagonal elements of U as
-* returned from DLAGTF.
-*
-* B (input) DOUBLE PRECISION array, dimension (N-1)
-* On entry, B must contain the first super-diagonal elements of
-* U as returned from DLAGTF.
-*
-* C (input) DOUBLE PRECISION array, dimension (N-1)
-* On entry, C must contain the sub-diagonal elements of L as
-* returned from DLAGTF.
-*
-* D (input) DOUBLE PRECISION array, dimension (N-2)
-* On entry, D must contain the second super-diagonal elements
-* of U as returned from DLAGTF.
-*
-* IN (input) INTEGER array, dimension (N)
-* On entry, IN must contain details of the matrix P as returned
-* from DLAGTF.
-*
-* Y (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the right hand side vector y.
-* On exit, Y is overwritten by the solution vector x.
-*
-* TOL (input/output) DOUBLE PRECISION
-* On entry, with JOB .lt. 0, TOL should be the minimum
-* perturbation to be made to very small diagonal elements of U.
-* TOL should normally be chosen as about eps*norm(U), where eps
-* is the relative machine precision, but if TOL is supplied as
-* non-positive, then it is reset to eps*max( abs( u(i,j) ) ).
-* If JOB .gt. 0 then TOL is not referenced.
-*
-* On exit, TOL is changed as described above, only if TOL is
-* non-positive on entry. Otherwise TOL is unchanged.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* .lt. 0: if INFO = -i, the i-th argument had an illegal value
-* .gt. 0: overflow would occur when computing the INFO(th)
-* element of the solution vector x. This can only occur
-* when JOB is supplied as positive and either means
-* that a diagonal element of U is very small, or that
-* the elements of the right-hand side vector y are very
-* large.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlagv2.f b/SRC/dlagv2.f
index 2952e71c..ebd9f855 100644
--- a/SRC/dlagv2.f
+++ b/SRC/dlagv2.f
@@ -1,94 +1,173 @@
- SUBROUTINE DLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL,
- $ CSR, SNR )
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB
- DOUBLE PRECISION CSL, CSR, SNL, SNR
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), ALPHAI( 2 ), ALPHAR( 2 ),
- $ B( LDB, * ), BETA( 2 )
-* ..
-*
+*> \brief \b DLAGV2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL,
+* CSR, SNR )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB
+* DOUBLE PRECISION CSL, CSR, SNL, SNR
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( 2 ), ALPHAR( 2 ),
+* $ B( LDB, * ), BETA( 2 )
+* ..
+*
* Purpose
* =======
*
-* DLAGV2 computes the Generalized Schur factorization of a real 2-by-2
-* matrix pencil (A,B) where B is upper triangular. This routine
-* computes orthogonal (rotation) matrices given by CSL, SNL and CSR,
-* SNR such that
-*
-* 1) if the pencil (A,B) has two real eigenvalues (include 0/0 or 1/0
-* types), then
-*
-* [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
-* [ 0 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
-*
-* [ b11 b12 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
-* [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ],
-*
-* 2) if the pencil (A,B) has a pair of complex conjugate eigenvalues,
-* then
-*
-* [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
-* [ a21 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
-*
-* [ b11 0 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
-* [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ]
-*
-* where b11 >= b22 > 0.
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAGV2 computes the Generalized Schur factorization of a real 2-by-2
+*> matrix pencil (A,B) where B is upper triangular. This routine
+*> computes orthogonal (rotation) matrices given by CSL, SNL and CSR,
+*> SNR such that
+*>
+*> 1) if the pencil (A,B) has two real eigenvalues (include 0/0 or 1/0
+*> types), then
+*>
+*> [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
+*> [ 0 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
+*>
+*> [ b11 b12 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
+*> [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ],
+*>
+*> 2) if the pencil (A,B) has a pair of complex conjugate eigenvalues,
+*> then
+*>
+*> [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
+*> [ a21 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
+*>
+*> [ b11 0 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
+*> [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ]
+*>
+*> where b11 >= b22 > 0.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, 2)
-* On entry, the 2 x 2 matrix A.
-* On exit, A is overwritten by the ``A-part'' of the
-* generalized Schur form.
-*
-* LDA (input) INTEGER
-* THe leading dimension of the array A. LDA >= 2.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, 2)
-* On entry, the upper triangular 2 x 2 matrix B.
-* On exit, B is overwritten by the ``B-part'' of the
-* generalized Schur form.
-*
-* LDB (input) INTEGER
-* THe leading dimension of the array B. LDB >= 2.
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (2)
-*
-* ALPHAI (output) DOUBLE PRECISION array, dimension (2)
-*
-* BETA (output) DOUBLE PRECISION array, dimension (2)
-* (ALPHAR(k)+i*ALPHAI(k))/BETA(k) are the eigenvalues of the
-* pencil (A,B), k=1,2, i = sqrt(-1). Note that BETA(k) may
-* be zero.
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, 2)
+*> On entry, the 2 x 2 matrix A.
+*> On exit, A is overwritten by the ``A-part'' of the
+*> generalized Schur form.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> THe leading dimension of the array A. LDA >= 2.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, 2)
+*> On entry, the upper triangular 2 x 2 matrix B.
+*> On exit, B is overwritten by the ``B-part'' of the
+*> generalized Schur form.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> THe leading dimension of the array B. LDB >= 2.
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (2)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (2)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (2)
+*> (ALPHAR(k)+i*ALPHAI(k))/BETA(k) are the eigenvalues of the
+*> pencil (A,B), k=1,2, i = sqrt(-1). Note that BETA(k) may
+*> be zero.
+*> \endverbatim
+*>
+*> \param[out] CSL
+*> \verbatim
+*> CSL is DOUBLE PRECISION
+*> The cosine of the left rotation matrix.
+*> \endverbatim
+*>
+*> \param[out] SNL
+*> \verbatim
+*> SNL is DOUBLE PRECISION
+*> The sine of the left rotation matrix.
+*> \endverbatim
+*>
+*> \param[out] CSR
+*> \verbatim
+*> CSR is DOUBLE PRECISION
+*> The cosine of the right rotation matrix.
+*> \endverbatim
+*>
+*> \param[out] SNR
+*> \verbatim
+*> SNR is DOUBLE PRECISION
+*> The sine of the right rotation matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CSL (output) DOUBLE PRECISION
-* The cosine of the left rotation matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SNL (output) DOUBLE PRECISION
-* The sine of the left rotation matrix.
+*> \date November 2011
*
-* CSR (output) DOUBLE PRECISION
-* The cosine of the right rotation matrix.
+*> \ingroup doubleOTHERauxiliary
*
-* SNR (output) DOUBLE PRECISION
-* The sine of the right rotation matrix.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL,
+ $ CSR, SNR )
*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB
+ DOUBLE PRECISION CSL, CSR, SNL, SNR
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), ALPHAI( 2 ), ALPHAR( 2 ),
+ $ B( LDB, * ), BETA( 2 )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlahqr.f b/SRC/dlahqr.f
index e782ece8..cece494c 100644
--- a/SRC/dlahqr.f
+++ b/SRC/dlahqr.f
@@ -1,9 +1,215 @@
+*> \brief \b DLAHQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+* ILOZ, IHIZ, Z, LDZ, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION H( LDH, * ), WI( * ), WR( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DLAHQR is an auxiliary routine called by DHSEQR to update the
+*> eigenvalues and Schur decomposition already computed by DHSEQR, by
+*> dealing with the Hessenberg submatrix in rows and columns ILO to
+*> IHI.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper quasi-triangular in
+*> rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless
+*> ILO = 1). DLAHQR works primarily with the Hessenberg
+*> submatrix in rows and columns ILO to IHI, but applies
+*> transformations to all of H if WANTT is .TRUE..
+*> 1 <= ILO <= max(1,IHI); IHI <= N.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO is zero and if WANTT is .TRUE., H is upper
+*> quasi-triangular in rows and columns ILO:IHI, with any
+*> 2-by-2 diagonal blocks in standard form. If INFO is zero
+*> and WANTT is .FALSE., the contents of H are unspecified on
+*> exit. The output state of H if INFO is nonzero is given
+*> below under the description of INFO.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> The real and imaginary parts, respectively, of the computed
+*> eigenvalues ILO to IHI are stored in the corresponding
+*> elements of WR and WI. If two eigenvalues are computed as a
+*> complex conjugate pair, they are stored in consecutive
+*> elements of WR and WI, say the i-th and (i+1)th, with
+*> WI(i) > 0 and WI(i+1) < 0. If WANTT is .TRUE., the
+*> eigenvalues are stored in the same order as on the diagonal
+*> of the Schur form returned in H, with WR(i) = H(i,i), and, if
+*> H(i:i+1,i:i+1) is a 2-by-2 diagonal block,
+*> WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE..
+*> 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,N)
+*> If WANTZ is .TRUE., on entry Z must contain the current
+*> matrix Z of transformations accumulated by DHSEQR, and on
+*> exit Z has been updated; transformations are applied only to
+*> the submatrix Z(ILOZ:IHIZ,ILO:IHI).
+*> If WANTZ is .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: If INFO = i, DLAHQR failed to compute all the
+*> eigenvalues ILO to IHI in a total of 30 iterations
+*> per eigenvalue; elements i+1:ihi of WR and WI
+*> contain those eigenvalues which have been
+*> successfully computed.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the
+*> eigenvalues of the upper Hessenberg matrix rows
+*> and columns ILO thorugh INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> (*) (initial value of H)*U = U*(final value of H)
+*> where U is an orthognal matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> (final value of Z) = (initial value of Z)*U
+*> where U is the orthogonal matrix in (*)
+*> (regardless of the value of WANTT.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 02-96 Based on modifications by
+*> David Day, Sandia National Laboratory, USA
+*>
+*> 12-04 Further modifications by
+*> Ralph Byers, University of Kansas, USA
+*> This is a modified version of DLAHQR from LAPACK version 3.0.
+*> It is (1) more robust against overflow and underflow and
+*> (2) adopts the more conservative Ahues & Tisseur stopping
+*> criterion (LAWN 122, 1997).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
$ ILOZ, IHIZ, Z, LDZ, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
@@ -13,119 +219,6 @@
DOUBLE PRECISION H( LDH, * ), WI( * ), WR( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAHQR is an auxiliary routine called by DHSEQR to update the
-* eigenvalues and Schur decomposition already computed by DHSEQR, by
-* dealing with the Hessenberg submatrix in rows and columns ILO to
-* IHI.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper quasi-triangular in
-* rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless
-* ILO = 1). DLAHQR works primarily with the Hessenberg
-* submatrix in rows and columns ILO to IHI, but applies
-* transformations to all of H if WANTT is .TRUE..
-* 1 <= ILO <= max(1,IHI); IHI <= N.
-*
-* H (input/output) DOUBLE PRECISION array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO is zero and if WANTT is .TRUE., H is upper
-* quasi-triangular in rows and columns ILO:IHI, with any
-* 2-by-2 diagonal blocks in standard form. If INFO is zero
-* and WANTT is .FALSE., the contents of H are unspecified on
-* exit. The output state of H if INFO is nonzero is given
-* below under the description of INFO.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* WR (output) DOUBLE PRECISION array, dimension (N)
-*
-* WI (output) DOUBLE PRECISION array, dimension (N)
-* The real and imaginary parts, respectively, of the computed
-* eigenvalues ILO to IHI are stored in the corresponding
-* elements of WR and WI. If two eigenvalues are computed as a
-* complex conjugate pair, they are stored in consecutive
-* elements of WR and WI, say the i-th and (i+1)th, with
-* WI(i) > 0 and WI(i+1) < 0. If WANTT is .TRUE., the
-* eigenvalues are stored in the same order as on the diagonal
-* of the Schur form returned in H, with WR(i) = H(i,i), and, if
-* H(i:i+1,i:i+1) is a 2-by-2 diagonal block,
-* WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE..
-* 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
-* If WANTZ is .TRUE., on entry Z must contain the current
-* matrix Z of transformations accumulated by DHSEQR, and on
-* exit Z has been updated; transformations are applied only to
-* the submatrix Z(ILOZ:IHIZ,ILO:IHI).
-* If WANTZ is .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: If INFO = i, DLAHQR failed to compute all the
-* eigenvalues ILO to IHI in a total of 30 iterations
-* per eigenvalue; elements i+1:ihi of WR and WI
-* contain those eigenvalues which have been
-* successfully computed.
-*
-* If INFO .GT. 0 and WANTT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the
-* eigenvalues of the upper Hessenberg matrix rows
-* and columns ILO thorugh INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-* (*) (initial value of H)*U = U*(final value of H)
-* where U is an orthognal matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-* (final value of Z) = (initial value of Z)*U
-* where U is the orthogonal matrix in (*)
-* (regardless of the value of WANTT.)
-*
-* Further Details
-* ===============
-*
-* 02-96 Based on modifications by
-* David Day, Sandia National Laboratory, USA
-*
-* 12-04 Further modifications by
-* Ralph Byers, University of Kansas, USA
-* This is a modified version of DLAHQR from LAPACK version 3.0.
-* It is (1) more robust against overflow and underflow and
-* (2) adopts the more conservative Ahues & Tisseur stopping
-* criterion (LAWN 122, 1997).
-*
* =========================================================
*
* .. Parameters ..
diff --git a/SRC/dlahr2.f b/SRC/dlahr2.f
index 8d588503..2f9e8648 100644
--- a/SRC/dlahr2.f
+++ b/SRC/dlahr2.f
@@ -1,118 +1,164 @@
- SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*> \brief \b DLAHR2
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LDT, LDY, N, NB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ),
- $ Y( LDY, NB )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ),
+* $ Y( LDY, NB )
+* ..
+*
* Purpose
* =======
*
-* DLAHR2 reduces the first NB columns of A real general n-BY-(n-k+1)
-* matrix A so that elements below the k-th subdiagonal are zero. The
-* reduction is performed by an orthogonal similarity transformation
-* Q**T * A * Q. The routine returns the matrices V and T which determine
-* Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
-*
-* This is an auxiliary routine called by DGEHRD.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAHR2 reduces the first NB columns of A real general n-BY-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by an orthogonal similarity transformation
+*> Q**T * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
+*>
+*> This is an auxiliary routine called by DGEHRD.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* K (input) INTEGER
-* The offset for the reduction. Elements below the k-th
-* subdiagonal in the first NB columns are reduced to zero.
-* K < N.
-*
-* NB (input) INTEGER
-* The number of columns to be reduced.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N-K+1)
-* On entry, the n-by-(n-k+1) general matrix A.
-* On exit, the elements on and above the k-th subdiagonal in
-* the first NB columns are overwritten with the corresponding
-* elements of the reduced matrix; the elements below the k-th
-* subdiagonal, with the array TAU, represent the matrix Q as a
-* product of elementary reflectors. The other columns of A are
-* unchanged. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (NB)
-* The scalar factors of the elementary reflectors. See Further
-* Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The offset for the reduction. Elements below the k-th
+*> subdiagonal in the first NB columns are reduced to zero.
+*> K < N.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,NB)
-* The upper triangular matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* Y (output) DOUBLE PRECISION array, dimension (LDY,NB)
-* The n-by-nb matrix Y.
+*> \ingroup doubleOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= N.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* unchanged. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (NB)
+*> The scalar factors of the elementary reflectors. See Further
+*> Details.
+*>
+*> T (output) DOUBLE PRECISION array, dimension (LDT,NB)
+*> The upper triangular matrix T.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> Y (output) DOUBLE PRECISION array, dimension (LDY,NB)
+*> The n-by-nb matrix Y.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= N.
+*>
+*>
+*> The matrix Q is represented as a product of nb elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*> A(i+k+1:n,i), and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*> V which is needed, with T and Y, to apply the transformation to the
+*> unreduced part of the matrix, using an update of the form:
+*> A := (I - V*T*V**T) * (A - Y*V**T).
+*>
+*> The contents of A on exit are illustrated by the following example
+*> with n = 7, k = 3 and nb = 2:
+*>
+*> ( a a a a a )
+*> ( a a a a a )
+*> ( a a a a a )
+*> ( h h a a a )
+*> ( v1 h a a a )
+*> ( v1 v2 a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> This subroutine is a slight modification of LAPACK-3.0's DLAHRD
+*> incorporating improvements proposed by Quintana-Orti and Van de
+*> Gejin. Note that the entries of A(1:K,2:NB) differ from those
+*> returned by the original LAPACK-3.0's DLAHRD routine. (This
+*> subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
+*>
+*> References
+*> ==========
+*>
+*> Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
+*> performance of reduction to Hessenberg form," ACM Transactions on
+*> Mathematical Software, 32(2):180-194, June 2006.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
*
-* The matrix Q is represented as a product of nb elementary reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-* A(i+k+1:n,i), and tau in TAU(i).
-*
-* The elements of the vectors v together form the (n-k+1)-by-nb matrix
-* V which is needed, with T and Y, to apply the transformation to the
-* unreduced part of the matrix, using an update of the form:
-* A := (I - V*T*V**T) * (A - Y*V**T).
-*
-* The contents of A on exit are illustrated by the following example
-* with n = 7, k = 3 and nb = 2:
-*
-* ( a a a a a )
-* ( a a a a a )
-* ( a a a a a )
-* ( h h a a a )
-* ( v1 h a a a )
-* ( v1 v2 a a a )
-* ( v1 v2 a a a )
-*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
-*
-* This subroutine is a slight modification of LAPACK-3.0's DLAHRD
-* incorporating improvements proposed by Quintana-Orti and Van de
-* Gejin. Note that the entries of A(1:K,2:NB) differ from those
-* returned by the original LAPACK-3.0's DLAHRD routine. (This
-* subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
-*
-* References
-* ==========
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
-* performance of reduction to Hessenberg form," ACM Transactions on
-* Mathematical Software, 32(2):180-194, June 2006.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ),
+ $ Y( LDY, NB )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlahrd.f b/SRC/dlahrd.f
index ad9cbd11..cefa448f 100644
--- a/SRC/dlahrd.f
+++ b/SRC/dlahrd.f
@@ -1,106 +1,152 @@
- SUBROUTINE DLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LDT, LDY, N, NB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ),
- $ Y( LDY, NB )
-* ..
-*
+*> \brief \b DLAHRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ),
+* $ Y( LDY, NB )
+* ..
+*
* Purpose
* =======
*
-* DLAHRD reduces the first NB columns of a real general n-by-(n-k+1)
-* matrix A so that elements below the k-th subdiagonal are zero. The
-* reduction is performed by an orthogonal similarity transformation
-* Q**T * A * Q. The routine returns the matrices V and T which determine
-* Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
-*
-* This is an OBSOLETE auxiliary routine.
-* This routine will be 'deprecated' in a future release.
-* Please use the new routine DLAHR2 instead.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAHRD reduces the first NB columns of a real general n-by-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by an orthogonal similarity transformation
+*> Q**T * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
+*>
+*> This is an OBSOLETE auxiliary routine.
+*> This routine will be 'deprecated' in a future release.
+*> Please use the new routine DLAHR2 instead.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* K (input) INTEGER
-* The offset for the reduction. Elements below the k-th
-* subdiagonal in the first NB columns are reduced to zero.
-*
-* NB (input) INTEGER
-* The number of columns to be reduced.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N-K+1)
-* On entry, the n-by-(n-k+1) general matrix A.
-* On exit, the elements on and above the k-th subdiagonal in
-* the first NB columns are overwritten with the corresponding
-* elements of the reduced matrix; the elements below the k-th
-* subdiagonal, with the array TAU, represent the matrix Q as a
-* product of elementary reflectors. The other columns of A are
-* unchanged. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (NB)
-* The scalar factors of the elementary reflectors. See Further
-* Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The offset for the reduction. Elements below the k-th
+*> subdiagonal in the first NB columns are reduced to zero.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,NB)
-* The upper triangular matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* Y (output) DOUBLE PRECISION array, dimension (LDY,NB)
-* The n-by-nb matrix Y.
+*> \ingroup doubleOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= N.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* unchanged. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (NB)
+*> The scalar factors of the elementary reflectors. See Further
+*> Details.
+*>
+*> T (output) DOUBLE PRECISION array, dimension (LDT,NB)
+*> The upper triangular matrix T.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> Y (output) DOUBLE PRECISION array, dimension (LDY,NB)
+*> The n-by-nb matrix Y.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= N.
+*>
+*>
+*> The matrix Q is represented as a product of nb elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*> A(i+k+1:n,i), and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*> V which is needed, with T and Y, to apply the transformation to the
+*> unreduced part of the matrix, using an update of the form:
+*> A := (I - V*T*V**T) * (A - Y*V**T).
+*>
+*> The contents of A on exit are illustrated by the following example
+*> with n = 7, k = 3 and nb = 2:
+*>
+*> ( a h a a a )
+*> ( a h a a a )
+*> ( a h a a a )
+*> ( h h a a a )
+*> ( v1 h a a a )
+*> ( v1 v2 a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
*
-* The matrix Q is represented as a product of nb elementary reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-* A(i+k+1:n,i), and tau in TAU(i).
-*
-* The elements of the vectors v together form the (n-k+1)-by-nb matrix
-* V which is needed, with T and Y, to apply the transformation to the
-* unreduced part of the matrix, using an update of the form:
-* A := (I - V*T*V**T) * (A - Y*V**T).
-*
-* The contents of A on exit are illustrated by the following example
-* with n = 7, k = 3 and nb = 2:
-*
-* ( a h a a a )
-* ( a h a a a )
-* ( a h a a a )
-* ( h h a a a )
-* ( v1 h a a a )
-* ( v1 v2 a a a )
-* ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ),
+ $ Y( LDY, NB )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaic1.f b/SRC/dlaic1.f
index 6dd1aebd..496f6f0b 100644
--- a/SRC/dlaic1.f
+++ b/SRC/dlaic1.f
@@ -1,77 +1,143 @@
- SUBROUTINE DLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER J, JOB
- DOUBLE PRECISION C, GAMMA, S, SEST, SESTPR
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION W( J ), X( J )
-* ..
-*
+*> \brief \b DLAIC1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
+*
+* .. Scalar Arguments ..
+* INTEGER J, JOB
+* DOUBLE PRECISION C, GAMMA, S, SEST, SESTPR
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION W( J ), X( J )
+* ..
+*
* Purpose
* =======
*
-* DLAIC1 applies one step of incremental condition estimation in
-* its simplest version:
-*
-* Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j
-* lower triangular matrix L, such that
-* twonorm(L*x) = sest
-* Then DLAIC1 computes sestpr, s, c such that
-* the vector
-* [ s*x ]
-* xhat = [ c ]
-* is an approximate singular vector of
-* [ L 0 ]
-* Lhat = [ w**T gamma ]
-* in the sense that
-* twonorm(Lhat*xhat) = sestpr.
-*
-* Depending on JOB, an estimate for the largest or smallest singular
-* value is computed.
-*
-* Note that [s c]**T and sestpr**2 is an eigenpair of the system
-*
-* diag(sest*sest, 0) + [alpha gamma] * [ alpha ]
-* [ gamma ]
-*
-* where alpha = x**T*w.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAIC1 applies one step of incremental condition estimation in
+*> its simplest version:
+*>
+*> Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j
+*> lower triangular matrix L, such that
+*> twonorm(L*x) = sest
+*> Then DLAIC1 computes sestpr, s, c such that
+*> the vector
+*> [ s*x ]
+*> xhat = [ c ]
+*> is an approximate singular vector of
+*> [ L 0 ]
+*> Lhat = [ w**T gamma ]
+*> in the sense that
+*> twonorm(Lhat*xhat) = sestpr.
+*>
+*> Depending on JOB, an estimate for the largest or smallest singular
+*> value is computed.
+*>
+*> Note that [s c]**T and sestpr**2 is an eigenpair of the system
+*>
+*> diag(sest*sest, 0) + [alpha gamma] * [ alpha ]
+*> [ gamma ]
+*>
+*> where alpha = x**T*w.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) INTEGER
-* = 1: an estimate for the largest singular value is computed.
-* = 2: an estimate for the smallest singular value is computed.
-*
-* J (input) INTEGER
-* Length of X and W
-*
-* X (input) DOUBLE PRECISION array, dimension (J)
-* The j-vector x.
+*> \param[in] JOB
+*> \verbatim
+*> JOB is INTEGER
+*> = 1: an estimate for the largest singular value is computed.
+*> = 2: an estimate for the smallest singular value is computed.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Length of X and W
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (J)
+*> The j-vector x.
+*> \endverbatim
+*>
+*> \param[in] SEST
+*> \verbatim
+*> SEST is DOUBLE PRECISION
+*> Estimated singular value of j by j matrix L
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (J)
+*> The j-vector w.
+*> \endverbatim
+*>
+*> \param[in] GAMMA
+*> \verbatim
+*> GAMMA is DOUBLE PRECISION
+*> The diagonal element gamma.
+*> \endverbatim
+*>
+*> \param[out] SESTPR
+*> \verbatim
+*> SESTPR is DOUBLE PRECISION
+*> Estimated singular value of (j+1) by (j+1) matrix Lhat.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION
+*> Sine needed in forming xhat.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> Cosine needed in forming xhat.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SEST (input) DOUBLE PRECISION
-* Estimated singular value of j by j matrix L
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* W (input) DOUBLE PRECISION array, dimension (J)
-* The j-vector w.
+*> \date November 2011
*
-* GAMMA (input) DOUBLE PRECISION
-* The diagonal element gamma.
+*> \ingroup doubleOTHERauxiliary
*
-* SESTPR (output) DOUBLE PRECISION
-* Estimated singular value of (j+1) by (j+1) matrix Lhat.
+* =====================================================================
+ SUBROUTINE DLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
*
-* S (output) DOUBLE PRECISION
-* Sine needed in forming xhat.
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* C (output) DOUBLE PRECISION
-* Cosine needed in forming xhat.
+* .. Scalar Arguments ..
+ INTEGER J, JOB
+ DOUBLE PRECISION C, GAMMA, S, SEST, SESTPR
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION W( J ), X( J )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaisnan.f b/SRC/dlaisnan.f
index 6c358b96..626500ee 100644
--- a/SRC/dlaisnan.f
+++ b/SRC/dlaisnan.f
@@ -1,38 +1,79 @@
- LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 )
+*> \brief \b DLAISNAN
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION DIN1, DIN2
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION DIN1, DIN2
+* ..
+*
* Purpose
* =======
*
-* This routine is not for general use. It exists solely to avoid
-* over-optimization in DISNAN.
-*
-* DLAISNAN checks for NaNs by comparing its two arguments for
-* inequality. NaN is the only floating-point value where NaN != NaN
-* returns .TRUE. To check for NaNs, pass the same variable as both
-* arguments.
-*
-* A compiler must assume that the two arguments are
-* not the same variable, and the test will not be optimized away.
-* Interprocedural or whole-program optimization may delete this
-* test. The ISNAN functions will be replaced by the correct
-* Fortran 03 intrinsic once the intrinsic is widely available.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is not for general use. It exists solely to avoid
+*> over-optimization in DISNAN.
+*>
+*> DLAISNAN checks for NaNs by comparing its two arguments for
+*> inequality. NaN is the only floating-point value where NaN != NaN
+*> returns .TRUE. To check for NaNs, pass the same variable as both
+*> arguments.
+*>
+*> A compiler must assume that the two arguments are
+*> not the same variable, and the test will not be optimized away.
+*> Interprocedural or whole-program optimization may delete this
+*> test. The ISNAN functions will be replaced by the correct
+*> Fortran 03 intrinsic once the intrinsic is widely available.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIN1 (input) DOUBLE PRECISION
+*> \param[in] DIN1
+*> \verbatim
+*> DIN1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] DIN2
+*> \verbatim
+*> DIN2 is DOUBLE PRECISION
+*> Two numbers to compare for inequality.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DIN2 (input) DOUBLE PRECISION
-* Two numbers to compare for inequality.
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION DIN1, DIN2
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaln2.f b/SRC/dlaln2.f
index 59ea7d42..7aeb27bb 100644
--- a/SRC/dlaln2.f
+++ b/SRC/dlaln2.f
@@ -1,10 +1,219 @@
+*> \brief \b DLALN2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B,
+* LDB, WR, WI, X, LDX, SCALE, XNORM, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL LTRANS
+* INTEGER INFO, LDA, LDB, LDX, NA, NW
+* DOUBLE PRECISION CA, D1, D2, SCALE, SMIN, WI, WR, XNORM
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLALN2 solves a system of the form (ca A - w D ) X = s B
+*> or (ca A**T - w D) X = s B with possible scaling ("s") and
+*> perturbation of A. (A**T means A-transpose.)
+*>
+*> A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA
+*> real diagonal matrix, w is a real or complex value, and X and B are
+*> NA x 1 matrices -- real if w is real, complex if w is complex. NA
+*> may be 1 or 2.
+*>
+*> If w is complex, X and B are represented as NA x 2 matrices,
+*> the first column of each being the real part and the second
+*> being the imaginary part.
+*>
+*> "s" is a scaling factor (.LE. 1), computed by DLALN2, which is
+*> so chosen that X can be computed without overflow. X is further
+*> scaled if necessary to assure that norm(ca A - w D)*norm(X) is less
+*> than overflow.
+*>
+*> If both singular values of (ca A - w D) are less than SMIN,
+*> SMIN*identity will be used instead of (ca A - w D). If only one
+*> singular value is less than SMIN, one element of (ca A - w D) will be
+*> perturbed enough to make the smallest singular value roughly SMIN.
+*> If both singular values are at least SMIN, (ca A - w D) will not be
+*> perturbed. In any case, the perturbation will be at most some small
+*> multiple of max( SMIN, ulp*norm(ca A - w D) ). The singular values
+*> are computed by infinity-norm approximations, and thus will only be
+*> correct to a factor of 2 or so.
+*>
+*> Note: all input quantities are assumed to be smaller than overflow
+*> by a reasonable factor. (See BIGNUM.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LTRANS
+*> \verbatim
+*> LTRANS is LOGICAL
+*> =.TRUE.: A-transpose will be used.
+*> =.FALSE.: A will be used (not transposed.)
+*> \endverbatim
+*>
+*> \param[in] NA
+*> \verbatim
+*> NA is INTEGER
+*> The size of the matrix A. It may (only) be 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> 1 if "w" is real, 2 if "w" is complex. It may only be 1
+*> or 2.
+*> \endverbatim
+*>
+*> \param[in] SMIN
+*> \verbatim
+*> SMIN is DOUBLE PRECISION
+*> The desired lower bound on the singular values of A. This
+*> should be a safe distance away from underflow or overflow,
+*> say, between (underflow/machine precision) and (machine
+*> precision * overflow ). (See BIGNUM and ULP.)
+*> \endverbatim
+*>
+*> \param[in] CA
+*> \verbatim
+*> CA is DOUBLE PRECISION
+*> The coefficient c, which A is multiplied by.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,NA)
+*> The NA x NA matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least NA.
+*> \endverbatim
+*>
+*> \param[in] D1
+*> \verbatim
+*> D1 is DOUBLE PRECISION
+*> The 1,1 element in the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] D2
+*> \verbatim
+*> D2 is DOUBLE PRECISION
+*> The 2,2 element in the diagonal matrix D. Not used if NW=1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NW)
+*> The NA x NW matrix B (right-hand side). If NW=2 ("w" is
+*> complex), column 1 contains the real part of B and column 2
+*> contains the imaginary part.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least NA.
+*> \endverbatim
+*>
+*> \param[in] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION
+*> The real part of the scalar "w".
+*> \endverbatim
+*>
+*> \param[in] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION
+*> The imaginary part of the scalar "w". Not used if NW=1.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NW)
+*> The NA x NW matrix X (unknowns), as computed by DLALN2.
+*> If NW=2 ("w" is complex), on exit, column 1 will contain
+*> the real part of X and column 2 will contain the imaginary
+*> part.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X. It must be at least NA.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scale factor that B must be multiplied by to insure
+*> that overflow does not occur when computing X. Thus,
+*> (ca A - w D) X will be SCALE*B, not B (ignoring
+*> perturbations of A.) It will be at most 1.
+*> \endverbatim
+*>
+*> \param[out] XNORM
+*> \verbatim
+*> XNORM is DOUBLE PRECISION
+*> The infinity-norm of X, when X is regarded as an NA x NW
+*> real matrix.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> An error flag. It will be set to zero if no error occurs,
+*> a negative number if an argument is in error, or a positive
+*> number if ca A - w D had to be perturbed.
+*> The possible values are:
+*> = 0: No error occurred, and (ca A - w D) did not have to be
+*> perturbed.
+*> = 1: (ca A - w D) had to be perturbed to make its smallest
+*> (or only) singular value greater than SMIN.
+*> NOTE: In the interests of speed, this routine does not
+*> check the inputs for errors.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B,
$ LDB, WR, WI, X, LDX, SCALE, XNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LTRANS
@@ -15,120 +224,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DLALN2 solves a system of the form (ca A - w D ) X = s B
-* or (ca A**T - w D) X = s B with possible scaling ("s") and
-* perturbation of A. (A**T means A-transpose.)
-*
-* A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA
-* real diagonal matrix, w is a real or complex value, and X and B are
-* NA x 1 matrices -- real if w is real, complex if w is complex. NA
-* may be 1 or 2.
-*
-* If w is complex, X and B are represented as NA x 2 matrices,
-* the first column of each being the real part and the second
-* being the imaginary part.
-*
-* "s" is a scaling factor (.LE. 1), computed by DLALN2, which is
-* so chosen that X can be computed without overflow. X is further
-* scaled if necessary to assure that norm(ca A - w D)*norm(X) is less
-* than overflow.
-*
-* If both singular values of (ca A - w D) are less than SMIN,
-* SMIN*identity will be used instead of (ca A - w D). If only one
-* singular value is less than SMIN, one element of (ca A - w D) will be
-* perturbed enough to make the smallest singular value roughly SMIN.
-* If both singular values are at least SMIN, (ca A - w D) will not be
-* perturbed. In any case, the perturbation will be at most some small
-* multiple of max( SMIN, ulp*norm(ca A - w D) ). The singular values
-* are computed by infinity-norm approximations, and thus will only be
-* correct to a factor of 2 or so.
-*
-* Note: all input quantities are assumed to be smaller than overflow
-* by a reasonable factor. (See BIGNUM.)
-*
-* Arguments
-* ==========
-*
-* LTRANS (input) LOGICAL
-* =.TRUE.: A-transpose will be used.
-* =.FALSE.: A will be used (not transposed.)
-*
-* NA (input) INTEGER
-* The size of the matrix A. It may (only) be 1 or 2.
-*
-* NW (input) INTEGER
-* 1 if "w" is real, 2 if "w" is complex. It may only be 1
-* or 2.
-*
-* SMIN (input) DOUBLE PRECISION
-* The desired lower bound on the singular values of A. This
-* should be a safe distance away from underflow or overflow,
-* say, between (underflow/machine precision) and (machine
-* precision * overflow ). (See BIGNUM and ULP.)
-*
-* CA (input) DOUBLE PRECISION
-* The coefficient c, which A is multiplied by.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,NA)
-* The NA x NA matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least NA.
-*
-* D1 (input) DOUBLE PRECISION
-* The 1,1 element in the diagonal matrix D.
-*
-* D2 (input) DOUBLE PRECISION
-* The 2,2 element in the diagonal matrix D. Not used if NW=1.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NW)
-* The NA x NW matrix B (right-hand side). If NW=2 ("w" is
-* complex), column 1 contains the real part of B and column 2
-* contains the imaginary part.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least NA.
-*
-* WR (input) DOUBLE PRECISION
-* The real part of the scalar "w".
-*
-* WI (input) DOUBLE PRECISION
-* The imaginary part of the scalar "w". Not used if NW=1.
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NW)
-* The NA x NW matrix X (unknowns), as computed by DLALN2.
-* If NW=2 ("w" is complex), on exit, column 1 will contain
-* the real part of X and column 2 will contain the imaginary
-* part.
-*
-* LDX (input) INTEGER
-* The leading dimension of X. It must be at least NA.
-*
-* SCALE (output) DOUBLE PRECISION
-* The scale factor that B must be multiplied by to insure
-* that overflow does not occur when computing X. Thus,
-* (ca A - w D) X will be SCALE*B, not B (ignoring
-* perturbations of A.) It will be at most 1.
-*
-* XNORM (output) DOUBLE PRECISION
-* The infinity-norm of X, when X is regarded as an NA x NW
-* real matrix.
-*
-* INFO (output) INTEGER
-* An error flag. It will be set to zero if no error occurs,
-* a negative number if an argument is in error, or a positive
-* number if ca A - w D had to be perturbed.
-* The possible values are:
-* = 0: No error occurred, and (ca A - w D) did not have to be
-* perturbed.
-* = 1: (ca A - w D) had to be perturbed to make its smallest
-* (or only) singular value greater than SMIN.
-* NOTE: In the interests of speed, this routine does not
-* check the inputs for errors.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlals0.f b/SRC/dlals0.f
index 22f74610..04dbf98e 100644
--- a/SRC/dlals0.f
+++ b/SRC/dlals0.f
@@ -1,11 +1,276 @@
+*> \brief \b DLALS0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
+* PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
+* POLES, DIFL, DIFR, Z, K, C, S, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
+* $ LDGNUM, NL, NR, NRHS, SQRE
+* DOUBLE PRECISION C, S
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), PERM( * )
+* DOUBLE PRECISION B( LDB, * ), BX( LDBX, * ), DIFL( * ),
+* $ DIFR( LDGNUM, * ), GIVNUM( LDGNUM, * ),
+* $ POLES( LDGNUM, * ), WORK( * ), Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLALS0 applies back the multiplying factors of either the left or the
+*> right singular vector matrix of a diagonal matrix appended by a row
+*> to the right hand side matrix B in solving the least squares problem
+*> using the divide-and-conquer SVD approach.
+*>
+*> For the left singular vector matrix, three types of orthogonal
+*> matrices are involved:
+*>
+*> (1L) Givens rotations: the number of such rotations is GIVPTR; the
+*> pairs of columns/rows they were applied to are stored in GIVCOL;
+*> and the C- and S-values of these rotations are stored in GIVNUM.
+*>
+*> (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
+*> row, and for J=2:N, PERM(J)-th row of B is to be moved to the
+*> J-th row.
+*>
+*> (3L) The left singular vector matrix of the remaining matrix.
+*>
+*> For the right singular vector matrix, four types of orthogonal
+*> matrices are involved:
+*>
+*> (1R) The right singular vector matrix of the remaining matrix.
+*>
+*> (2R) If SQRE = 1, one extra Givens rotation to generate the right
+*> null space.
+*>
+*> (3R) The inverse transformation of (2L).
+*>
+*> (4R) The inverse transformation of (1L).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed in
+*> factored form:
+*> = 0: Left singular vector matrix.
+*> = 1: Right singular vector matrix.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has row dimension N = NL + NR + 1,
+*> and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension ( LDB, NRHS )
+*> On input, B contains the right hand sides of the least
+*> squares problem in rows 1 through M. On output, B contains
+*> the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB must be at least
+*> max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*> BX is DOUBLE PRECISION array, dimension ( LDBX, NRHS )
+*> \endverbatim
+*>
+*> \param[in] LDBX
+*> \verbatim
+*> LDBX is INTEGER
+*> The leading dimension of BX.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( N )
+*> The permutations (from deflation and sorting) applied
+*> to the two blocks.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*> Each pair of numbers indicates a pair of rows/columns
+*> involved in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER
+*> The leading dimension of GIVCOL, must be at least N.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*> Each number indicates the C or S value used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] LDGNUM
+*> \verbatim
+*> LDGNUM is INTEGER
+*> The leading dimension of arrays DIFR, POLES and
+*> GIVNUM, must be at least K.
+*> \endverbatim
+*>
+*> \param[in] POLES
+*> \verbatim
+*> POLES is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*> On entry, POLES(1:K, 1) contains the new singular
+*> values obtained from solving the secular equation, and
+*> POLES(1:K, 2) is an array containing the poles in the secular
+*> equation.
+*> \endverbatim
+*>
+*> \param[in] DIFL
+*> \verbatim
+*> DIFL is DOUBLE PRECISION array, dimension ( K ).
+*> On entry, DIFL(I) is the distance between I-th updated
+*> (undeflated) singular value and the I-th (undeflated) old
+*> singular value.
+*> \endverbatim
+*>
+*> \param[in] DIFR
+*> \verbatim
+*> DIFR is DOUBLE PRECISION array, dimension ( LDGNUM, 2 ).
+*> On entry, DIFR(I, 1) contains the distances between I-th
+*> updated (undeflated) singular value and the I+1-th
+*> (undeflated) old singular value. And DIFR(I, 2) is the
+*> normalizing factor for the I-th right singular vector.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( K )
+*> Contain the components of the deflation-adjusted updating row
+*> vector.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix,
+*> This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> C contains garbage if SQRE =0 and the C-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION
+*> S contains garbage if SQRE =0 and the S-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( K )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
$ PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
$ POLES, DIFL, DIFR, Z, K, C, S, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
@@ -19,148 +284,6 @@
$ POLES( LDGNUM, * ), WORK( * ), Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLALS0 applies back the multiplying factors of either the left or the
-* right singular vector matrix of a diagonal matrix appended by a row
-* to the right hand side matrix B in solving the least squares problem
-* using the divide-and-conquer SVD approach.
-*
-* For the left singular vector matrix, three types of orthogonal
-* matrices are involved:
-*
-* (1L) Givens rotations: the number of such rotations is GIVPTR; the
-* pairs of columns/rows they were applied to are stored in GIVCOL;
-* and the C- and S-values of these rotations are stored in GIVNUM.
-*
-* (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
-* row, and for J=2:N, PERM(J)-th row of B is to be moved to the
-* J-th row.
-*
-* (3L) The left singular vector matrix of the remaining matrix.
-*
-* For the right singular vector matrix, four types of orthogonal
-* matrices are involved:
-*
-* (1R) The right singular vector matrix of the remaining matrix.
-*
-* (2R) If SQRE = 1, one extra Givens rotation to generate the right
-* null space.
-*
-* (3R) The inverse transformation of (2L).
-*
-* (4R) The inverse transformation of (1L).
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed in
-* factored form:
-* = 0: Left singular vector matrix.
-* = 1: Right singular vector matrix.
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has row dimension N = NL + NR + 1,
-* and column dimension M = N + SQRE.
-*
-* NRHS (input) INTEGER
-* The number of columns of B and BX. NRHS must be at least 1.
-*
-* B (input/output) DOUBLE PRECISION array, dimension ( LDB, NRHS )
-* On input, B contains the right hand sides of the least
-* squares problem in rows 1 through M. On output, B contains
-* the solution X in rows 1 through N.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB must be at least
-* max(1,MAX( M, N ) ).
-*
-* BX (workspace) DOUBLE PRECISION array, dimension ( LDBX, NRHS )
-*
-* LDBX (input) INTEGER
-* The leading dimension of BX.
-*
-* PERM (input) INTEGER array, dimension ( N )
-* The permutations (from deflation and sorting) applied
-* to the two blocks.
-*
-* GIVPTR (input) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem.
-*
-* GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 )
-* Each pair of numbers indicates a pair of rows/columns
-* involved in a Givens rotation.
-*
-* LDGCOL (input) INTEGER
-* The leading dimension of GIVCOL, must be at least N.
-*
-* GIVNUM (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-* Each number indicates the C or S value used in the
-* corresponding Givens rotation.
-*
-* LDGNUM (input) INTEGER
-* The leading dimension of arrays DIFR, POLES and
-* GIVNUM, must be at least K.
-*
-* POLES (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-* On entry, POLES(1:K, 1) contains the new singular
-* values obtained from solving the secular equation, and
-* POLES(1:K, 2) is an array containing the poles in the secular
-* equation.
-*
-* DIFL (input) DOUBLE PRECISION array, dimension ( K ).
-* On entry, DIFL(I) is the distance between I-th updated
-* (undeflated) singular value and the I-th (undeflated) old
-* singular value.
-*
-* DIFR (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 ).
-* On entry, DIFR(I, 1) contains the distances between I-th
-* updated (undeflated) singular value and the I+1-th
-* (undeflated) old singular value. And DIFR(I, 2) is the
-* normalizing factor for the I-th right singular vector.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( K )
-* Contain the components of the deflation-adjusted updating row
-* vector.
-*
-* K (input) INTEGER
-* Contains the dimension of the non-deflated matrix,
-* This is the order of the related secular equation. 1 <= K <=N.
-*
-* C (input) DOUBLE PRECISION
-* C contains garbage if SQRE =0 and the C-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* S (input) DOUBLE PRECISION
-* S contains garbage if SQRE =0 and the S-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( K )
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlalsa.f b/SRC/dlalsa.f
index e5e2f7ae..dfde8fcc 100644
--- a/SRC/dlalsa.f
+++ b/SRC/dlalsa.f
@@ -1,12 +1,276 @@
+*> \brief \b DLALSA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
+* LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
+* GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
+* $ SMLSIZ
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
+* $ K( * ), PERM( LDGCOL, * )
+* DOUBLE PRECISION B( LDB, * ), BX( LDBX, * ), C( * ),
+* $ DIFL( LDU, * ), DIFR( LDU, * ),
+* $ GIVNUM( LDU, * ), POLES( LDU, * ), S( * ),
+* $ U( LDU, * ), VT( LDU, * ), WORK( * ),
+* $ Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLALSA is an itermediate step in solving the least squares problem
+*> by computing the SVD of the coefficient matrix in compact form (The
+*> singular vectors are computed as products of simple orthorgonal
+*> matrices.).
+*>
+*> If ICOMPQ = 0, DLALSA applies the inverse of the left singular vector
+*> matrix of an upper bidiagonal matrix to the right hand side; and if
+*> ICOMPQ = 1, DLALSA applies the right singular vector matrix to the
+*> right hand side. The singular vector matrices were generated in
+*> compact form by DLALSA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether the left or the right singular vector
+*> matrix is involved.
+*> = 0: Left singular vector matrix
+*> = 1: Right singular vector matrix
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The row and column dimensions of the upper bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension ( LDB, NRHS )
+*> On input, B contains the right hand sides of the least
+*> squares problem in rows 1 through M.
+*> On output, B contains the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B in the calling subprogram.
+*> LDB must be at least max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*> BX is DOUBLE PRECISION array, dimension ( LDBX, NRHS )
+*> On exit, the result of applying the left or right singular
+*> vector matrix to B.
+*> \endverbatim
+*>
+*> \param[in] LDBX
+*> \verbatim
+*> LDBX is INTEGER
+*> The leading dimension of BX.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ).
+*> On entry, U contains the left singular vector matrices of all
+*> subproblems at the bottom level.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER, LDU = > N.
+*> The leading dimension of arrays U, VT, DIFL, DIFR,
+*> POLES, GIVNUM, and Z.
+*> \endverbatim
+*>
+*> \param[in] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ).
+*> On entry, VT**T contains the right singular vector matrices of
+*> all subproblems at the bottom level.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER array, dimension ( N ).
+*> \endverbatim
+*>
+*> \param[in] DIFL
+*> \verbatim
+*> DIFL is DOUBLE PRECISION array, dimension ( LDU, NLVL ).
+*> where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
+*> \endverbatim
+*>
+*> \param[in] DIFR
+*> \verbatim
+*> DIFR is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*> On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
+*> distances between singular values on the I-th level and
+*> singular values on the (I -1)-th level, and DIFR(*, 2 * I)
+*> record the normalizing factors of the right singular vectors
+*> matrices of subproblems on I-th level.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( LDU, NLVL ).
+*> On entry, Z(1, I) contains the components of the deflation-
+*> adjusted updating row vector for subproblems on the I-th
+*> level.
+*> \endverbatim
+*>
+*> \param[in] POLES
+*> \verbatim
+*> POLES is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*> On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
+*> singular values involved in the secular equations on the I-th
+*> level.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension ( N ).
+*> On entry, GIVPTR( I ) records the number of Givens
+*> rotations performed on the I-th problem on the computation
+*> tree.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
+*> On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
+*> locations of Givens rotations performed on the I-th level on
+*> the computation tree.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER, LDGCOL = > N.
+*> The leading dimension of arrays GIVCOL and PERM.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( LDGCOL, NLVL ).
+*> On entry, PERM(*, I) records permutations done on the I-th
+*> level of the computation tree.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*> On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
+*> values of Givens rotations performed on the I-th level on the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension ( N ).
+*> On entry, if the I-th subproblem is not square,
+*> C( I ) contains the C-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension ( N ).
+*> On entry, if the I-th subproblem is not square,
+*> S( I ) contains the S-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array.
+*> The dimension must be at least N.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array.
+*> The dimension must be at least 3 * N
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
$ LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
$ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
@@ -22,140 +286,6 @@
$ Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* DLALSA is an itermediate step in solving the least squares problem
-* by computing the SVD of the coefficient matrix in compact form (The
-* singular vectors are computed as products of simple orthorgonal
-* matrices.).
-*
-* If ICOMPQ = 0, DLALSA applies the inverse of the left singular vector
-* matrix of an upper bidiagonal matrix to the right hand side; and if
-* ICOMPQ = 1, DLALSA applies the right singular vector matrix to the
-* right hand side. The singular vector matrices were generated in
-* compact form by DLALSA.
-*
-* Arguments
-* =========
-*
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether the left or the right singular vector
-* matrix is involved.
-* = 0: Left singular vector matrix
-* = 1: Right singular vector matrix
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The row and column dimensions of the upper bidiagonal matrix.
-*
-* NRHS (input) INTEGER
-* The number of columns of B and BX. NRHS must be at least 1.
-*
-* B (input/output) DOUBLE PRECISION array, dimension ( LDB, NRHS )
-* On input, B contains the right hand sides of the least
-* squares problem in rows 1 through M.
-* On output, B contains the solution X in rows 1 through N.
-*
-* LDB (input) INTEGER
-* The leading dimension of B in the calling subprogram.
-* LDB must be at least max(1,MAX( M, N ) ).
-*
-* BX (output) DOUBLE PRECISION array, dimension ( LDBX, NRHS )
-* On exit, the result of applying the left or right singular
-* vector matrix to B.
-*
-* LDBX (input) INTEGER
-* The leading dimension of BX.
-*
-* U (input) DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ).
-* On entry, U contains the left singular vector matrices of all
-* subproblems at the bottom level.
-*
-* LDU (input) INTEGER, LDU = > N.
-* The leading dimension of arrays U, VT, DIFL, DIFR,
-* POLES, GIVNUM, and Z.
-*
-* VT (input) DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ).
-* On entry, VT**T contains the right singular vector matrices of
-* all subproblems at the bottom level.
-*
-* K (input) INTEGER array, dimension ( N ).
-*
-* DIFL (input) DOUBLE PRECISION array, dimension ( LDU, NLVL ).
-* where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
-*
-* DIFR (input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-* On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
-* distances between singular values on the I-th level and
-* singular values on the (I -1)-th level, and DIFR(*, 2 * I)
-* record the normalizing factors of the right singular vectors
-* matrices of subproblems on I-th level.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( LDU, NLVL ).
-* On entry, Z(1, I) contains the components of the deflation-
-* adjusted updating row vector for subproblems on the I-th
-* level.
-*
-* POLES (input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-* On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
-* singular values involved in the secular equations on the I-th
-* level.
-*
-* GIVPTR (input) INTEGER array, dimension ( N ).
-* On entry, GIVPTR( I ) records the number of Givens
-* rotations performed on the I-th problem on the computation
-* tree.
-*
-* GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
-* On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
-* locations of Givens rotations performed on the I-th level on
-* the computation tree.
-*
-* LDGCOL (input) INTEGER, LDGCOL = > N.
-* The leading dimension of arrays GIVCOL and PERM.
-*
-* PERM (input) INTEGER array, dimension ( LDGCOL, NLVL ).
-* On entry, PERM(*, I) records permutations done on the I-th
-* level of the computation tree.
-*
-* GIVNUM (input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-* On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
-* values of Givens rotations performed on the I-th level on the
-* computation tree.
-*
-* C (input) DOUBLE PRECISION array, dimension ( N ).
-* On entry, if the I-th subproblem is not square,
-* C( I ) contains the C-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* S (input) DOUBLE PRECISION array, dimension ( N ).
-* On entry, if the I-th subproblem is not square,
-* S( I ) contains the S-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* WORK (workspace) DOUBLE PRECISION array.
-* The dimension must be at least N.
-*
-* IWORK (workspace) INTEGER array.
-* The dimension must be at least 3 * N
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlalsd.f b/SRC/dlalsd.f
index 596343c3..d072be1b 100644
--- a/SRC/dlalsd.f
+++ b/SRC/dlalsd.f
@@ -1,10 +1,186 @@
+*> \brief \b DLALSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
+* RANK, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS, RANK, SMLSIZ
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION B( LDB, * ), D( * ), E( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLALSD uses the singular value decomposition of A to solve the least
+*> squares problem of finding X to minimize the Euclidean norm of each
+*> column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
+*> are N-by-NRHS. The solution X overwrites B.
+*>
+*> The singular values of A smaller than RCOND times the largest
+*> singular value are treated as zero in solving the least squares
+*> problem; in this case a minimum norm solution is returned.
+*> The actual singular values are returned in D in ascending order.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': D and E define an upper bidiagonal matrix.
+*> = 'L': D and E define a lower bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the bidiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry D contains the main diagonal of the bidiagonal
+*> matrix. On exit, if INFO = 0, D contains its singular values.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> Contains the super-diagonal entries of the bidiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On input, B contains the right hand sides of the least
+*> squares problem. On output, B contains the solution X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B in the calling subprogram.
+*> LDB must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The singular values of A less than or equal to RCOND times
+*> the largest singular value are treated as zero in solving
+*> the least squares problem. If RCOND is negative,
+*> machine precision is used instead.
+*> For example, if diag(S)*X=B were the least squares problem,
+*> where diag(S) is a diagonal matrix of singular values, the
+*> solution would be X(i) = B(i) / S(i) if S(i) is greater than
+*> RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
+*> RCOND*max(S).
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The number of singular values of A greater than RCOND times
+*> the largest singular value.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension at least
+*> (9*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2),
+*> where NLVL = max(0, INT(log_2 (N/(SMLSIZ+1))) + 1).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least
+*> (3*N*NLVL + 11*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute a singular value while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through MOD(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
$ RANK, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,96 +192,6 @@
DOUBLE PRECISION B( LDB, * ), D( * ), E( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLALSD uses the singular value decomposition of A to solve the least
-* squares problem of finding X to minimize the Euclidean norm of each
-* column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
-* are N-by-NRHS. The solution X overwrites B.
-*
-* The singular values of A smaller than RCOND times the largest
-* singular value are treated as zero in solving the least squares
-* problem; in this case a minimum norm solution is returned.
-* The actual singular values are returned in D in ascending order.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': D and E define an upper bidiagonal matrix.
-* = 'L': D and E define a lower bidiagonal matrix.
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The dimension of the bidiagonal matrix. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS must be at least 1.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry D contains the main diagonal of the bidiagonal
-* matrix. On exit, if INFO = 0, D contains its singular values.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* Contains the super-diagonal entries of the bidiagonal matrix.
-* On exit, E has been destroyed.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On input, B contains the right hand sides of the least
-* squares problem. On output, B contains the solution X.
-*
-* LDB (input) INTEGER
-* The leading dimension of B in the calling subprogram.
-* LDB must be at least max(1,N).
-*
-* RCOND (input) DOUBLE PRECISION
-* The singular values of A less than or equal to RCOND times
-* the largest singular value are treated as zero in solving
-* the least squares problem. If RCOND is negative,
-* machine precision is used instead.
-* For example, if diag(S)*X=B were the least squares problem,
-* where diag(S) is a diagonal matrix of singular values, the
-* solution would be X(i) = B(i) / S(i) if S(i) is greater than
-* RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
-* RCOND*max(S).
-*
-* RANK (output) INTEGER
-* The number of singular values of A greater than RCOND times
-* the largest singular value.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension at least
-* (9*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2),
-* where NLVL = max(0, INT(log_2 (N/(SMLSIZ+1))) + 1).
-*
-* IWORK (workspace) INTEGER array, dimension at least
-* (3*N*NLVL + 11*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute a singular value while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through MOD(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlamrg.f b/SRC/dlamrg.f
index 35fa9f93..9d137bb1 100644
--- a/SRC/dlamrg.f
+++ b/SRC/dlamrg.f
@@ -1,51 +1,108 @@
- SUBROUTINE DLAMRG( N1, N2, A, DTRD1, DTRD2, INDEX )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER DTRD1, DTRD2, N1, N2
-* ..
-* .. Array Arguments ..
- INTEGER INDEX( * )
- DOUBLE PRECISION A( * )
-* ..
-*
+*> \brief \b DLAMRG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAMRG( N1, N2, A, DTRD1, DTRD2, INDEX )
+*
+* .. Scalar Arguments ..
+* INTEGER DTRD1, DTRD2, N1, N2
+* ..
+* .. Array Arguments ..
+* INTEGER INDEX( * )
+* DOUBLE PRECISION A( * )
+* ..
+*
* Purpose
* =======
*
-* DLAMRG will create a permutation list which will merge the elements
-* of A (which is composed of two independently sorted sets) into a
-* single set which is sorted in ascending order.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAMRG will create a permutation list which will merge the elements
+*> of A (which is composed of two independently sorted sets) into a
+*> single set which is sorted in ascending order.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N1 (input) INTEGER
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> These arguements contain the respective lengths of the two
+*> sorted lists to be merged.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N1+N2)
+*> The first N1 elements of A contain a list of numbers which
+*> are sorted in either ascending or descending order. Likewise
+*> for the final N2 elements.
+*> \endverbatim
+*>
+*> \param[in] DTRD1
+*> \verbatim
+*> DTRD1 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] DTRD2
+*> \verbatim
+*> DTRD2 is INTEGER
+*> These are the strides to be taken through the array A.
+*> Allowable strides are 1 and -1. They indicate whether a
+*> subset of A is sorted in ascending (DTRDx = 1) or descending
+*> (DTRDx = -1) order.
+*> \endverbatim
+*>
+*> \param[out] INDEX
+*> \verbatim
+*> INDEX is INTEGER array, dimension (N1+N2)
+*> On exit this array will contain a permutation such that
+*> if B( I ) = A( INDEX( I ) ) for I=1,N1+N2, then B will be
+*> sorted in ascending order.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N2 (input) INTEGER
-* These arguements contain the respective lengths of the two
-* sorted lists to be merged.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (N1+N2)
-* The first N1 elements of A contain a list of numbers which
-* are sorted in either ascending or descending order. Likewise
-* for the final N2 elements.
+*> \date November 2011
*
-* DTRD1 (input) INTEGER
+*> \ingroup auxOTHERcomputational
*
-* DTRD2 (input) INTEGER
-* These are the strides to be taken through the array A.
-* Allowable strides are 1 and -1. They indicate whether a
-* subset of A is sorted in ascending (DTRDx = 1) or descending
-* (DTRDx = -1) order.
+* =====================================================================
+ SUBROUTINE DLAMRG( N1, N2, A, DTRD1, DTRD2, INDEX )
*
-* INDEX (output) INTEGER array, dimension (N1+N2)
-* On exit this array will contain a permutation such that
-* if B( I ) = A( INDEX( I ) ) for I=1,N1+N2, then B will be
-* sorted in ascending order.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER DTRD1, DTRD2, N1, N2
+* ..
+* .. Array Arguments ..
+ INTEGER INDEX( * )
+ DOUBLE PRECISION A( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaneg.f b/SRC/dlaneg.f
index e5d46c63..9a182965 100644
--- a/SRC/dlaneg.f
+++ b/SRC/dlaneg.f
@@ -1,72 +1,133 @@
- INTEGER FUNCTION DLANEG( N, D, LLD, SIGMA, PIVMIN, R )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER N, R
- DOUBLE PRECISION PIVMIN, SIGMA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), LLD( * )
-* ..
-*
+*> \brief \b DLANEG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION DLANEG( N, D, LLD, SIGMA, PIVMIN, R )
+*
+* .. Scalar Arguments ..
+* INTEGER N, R
+* DOUBLE PRECISION PIVMIN, SIGMA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), LLD( * )
+* ..
+*
* Purpose
* =======
*
-* DLANEG computes the Sturm count, the number of negative pivots
-* encountered while factoring tridiagonal T - sigma I = L D L^T.
-* This implementation works directly on the factors without forming
-* the tridiagonal matrix T. The Sturm count is also the number of
-* eigenvalues of T less than sigma.
-*
-* This routine is called from DLARRB.
-*
-* The current routine does not use the PIVMIN parameter but rather
-* requires IEEE-754 propagation of Infinities and NaNs. This
-* routine also has no input range restrictions but does require
-* default exception handling such that x/0 produces Inf when x is
-* non-zero, and Inf/Inf produces NaN. For more information, see:
-*
-* Marques, Riedy, and Voemel, "Benefits of IEEE-754 Features in
-* Modern Symmetric Tridiagonal Eigensolvers," SIAM Journal on
-* Scientific Computing, v28, n5, 2006. DOI 10.1137/050641624
-* (Tech report version in LAWN 172 with the same title.)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANEG computes the Sturm count, the number of negative pivots
+*> encountered while factoring tridiagonal T - sigma I = L D L^T.
+*> This implementation works directly on the factors without forming
+*> the tridiagonal matrix T. The Sturm count is also the number of
+*> eigenvalues of T less than sigma.
+*>
+*> This routine is called from DLARRB.
+*>
+*> The current routine does not use the PIVMIN parameter but rather
+*> requires IEEE-754 propagation of Infinities and NaNs. This
+*> routine also has no input range restrictions but does require
+*> default exception handling such that x/0 produces Inf when x is
+*> non-zero, and Inf/Inf produces NaN. For more information, see:
+*>
+*> Marques, Riedy, and Voemel, "Benefits of IEEE-754 Features in
+*> Modern Symmetric Tridiagonal Eigensolvers," SIAM Journal on
+*> Scientific Computing, v28, n5, 2006. DOI 10.1137/050641624
+*> (Tech report version in LAWN 172 with the same title.)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The N diagonal elements of the diagonal matrix D.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The N diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] LLD
+*> \verbatim
+*> LLD is DOUBLE PRECISION array, dimension (N-1)
+*> The (N-1) elements L(i)*L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] SIGMA
+*> \verbatim
+*> SIGMA is DOUBLE PRECISION
+*> Shift amount in T - sigma I = L D L^T.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot in the Sturm sequence. May be used
+*> when zero pivots are encountered on non-IEEE-754
+*> architectures.
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is INTEGER
+*> The twist index for the twisted factorization that is used
+*> for the negcount.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LLD (input) DOUBLE PRECISION array, dimension (N-1)
-* The (N-1) elements L(i)*L(i)*D(i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SIGMA (input) DOUBLE PRECISION
-* Shift amount in T - sigma I = L D L^T.
+*> \date November 2011
*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot in the Sturm sequence. May be used
-* when zero pivots are encountered on non-IEEE-754
-* architectures.
+*> \ingroup auxOTHERauxiliary
*
-* R (input) INTEGER
-* The twist index for the twisted factorization that is used
-* for the negcount.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*> Jason Riedy, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION DLANEG( N, D, LLD, SIGMA, PIVMIN, R )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-* Jason Riedy, University of California, Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER N, R
+ DOUBLE PRECISION PIVMIN, SIGMA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), LLD( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlangb.f b/SRC/dlangb.f
index 60bda8e1..b1c0a8f0 100644
--- a/SRC/dlangb.f
+++ b/SRC/dlangb.f
@@ -1,10 +1,126 @@
+*> \brief \b DLANGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANGB( NORM, N, KL, KU, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER KL, KU, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANGB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> DLANGB returns the value
+*>
+*> DLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANGB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANGB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of sub-diagonals of the matrix A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of super-diagonals of the matrix A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
+*> column of A is stored in the j-th column of the array AB as
+*> follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLANGB( NORM, N, KL, KU, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -14,61 +130,6 @@
DOUBLE PRECISION AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLANGB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
-*
-* Description
-* ===========
-*
-* DLANGB returns the value
-*
-* DLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANGB as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANGB is
-* set to zero.
-*
-* KL (input) INTEGER
-* The number of sub-diagonals of the matrix A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of super-diagonals of the matrix A. KU >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The band matrix A, stored in rows 1 to KL+KU+1. The j-th
-* column of A is stored in the j-th column of the array AB as
-* follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
*
diff --git a/SRC/dlange.f b/SRC/dlange.f
index 471c2371..3621b859 100644
--- a/SRC/dlange.f
+++ b/SRC/dlange.f
@@ -1,9 +1,116 @@
+*> \brief \b DLANGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANGE( NORM, M, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANGE returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> DLANGE returns the value
+*>
+*> DLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANGE as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0. When M = 0,
+*> DLANGE is set to zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0. When N = 0,
+*> DLANGE is set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLANGE( NORM, M, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,56 +120,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLANGE returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real matrix A.
-*
-* Description
-* ===========
-*
-* DLANGE returns the value
-*
-* DLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANGE as described
-* above.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0. When M = 0,
-* DLANGE is set to zero.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0. When N = 0,
-* DLANGE is set to zero.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlangt.f b/SRC/dlangt.f
index 7b5f6e8b..59b738f8 100644
--- a/SRC/dlangt.f
+++ b/SRC/dlangt.f
@@ -1,9 +1,108 @@
+*> \brief \b DLANGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANGT( NORM, N, DL, D, DU )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), DL( * ), DU( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANGT returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real tridiagonal matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> DLANGT returns the value
+*>
+*> DLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANGT as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANGT is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLANGT( NORM, N, DL, D, DU )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,51 +112,6 @@
DOUBLE PRECISION D( * ), DL( * ), DU( * )
* ..
*
-* Purpose
-* =======
-*
-* DLANGT returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real tridiagonal matrix A.
-*
-* Description
-* ===========
-*
-* DLANGT returns the value
-*
-* DLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANGT as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANGT is
-* set to zero.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlanhs.f b/SRC/dlanhs.f
index 32070964..f920586d 100644
--- a/SRC/dlanhs.f
+++ b/SRC/dlanhs.f
@@ -1,9 +1,110 @@
+*> \brief \b DLANHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANHS( NORM, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANHS returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> Hessenberg matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> DLANHS returns the value
+*>
+*> DLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANHS as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANHS is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The n by n upper Hessenberg matrix A; the part of A below the
+*> first sub-diagonal is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLANHS( NORM, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,53 +114,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLANHS returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* Hessenberg matrix A.
-*
-* Description
-* ===========
-*
-* DLANHS returns the value
-*
-* DLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANHS as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANHS is
-* set to zero.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The n by n upper Hessenberg matrix A; the part of A below the
-* first sub-diagonal is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlansb.f b/SRC/dlansb.f
index 0191008a..1ba2dda6 100644
--- a/SRC/dlansb.f
+++ b/SRC/dlansb.f
@@ -1,10 +1,131 @@
+*> \brief \b DLANSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANSB( NORM, UPLO, N, K, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANSB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n symmetric band matrix A, with k super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> DLANSB returns the value
+*>
+*> DLANSB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANSB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> band matrix A is supplied.
+*> = 'U': Upper triangular part is supplied
+*> = 'L': Lower triangular part is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANSB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals or sub-diagonals of the
+*> band matrix A. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first K+1 rows of AB. The j-th column of A is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLANSB( NORM, UPLO, N, K, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,66 +135,6 @@
DOUBLE PRECISION AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLANSB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n symmetric band matrix A, with k super-diagonals.
-*
-* Description
-* ===========
-*
-* DLANSB returns the value
-*
-* DLANSB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANSB as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* band matrix A is supplied.
-* = 'U': Upper triangular part is supplied
-* = 'L': Lower triangular part is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANSB is
-* set to zero.
-*
-* K (input) INTEGER
-* The number of super-diagonals or sub-diagonals of the
-* band matrix A. K >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first K+1 rows of AB. The j-th column of A is
-* stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlansf.f b/SRC/dlansf.f
index e7662877..db0de825 100644
--- a/SRC/dlansf.f
+++ b/SRC/dlansf.f
@@ -1,165 +1,224 @@
- DOUBLE PRECISION FUNCTION DLANSF( NORM, TRANSR, UPLO, N, A, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER NORM, TRANSR, UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( 0: * ), WORK( 0: * )
-* ..
-*
+*> \brief \b DLANSF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANSF( NORM, TRANSR, UPLO, N, A, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, TRANSR, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( 0: * ), WORK( 0: * )
+* ..
+*
* Purpose
* =======
*
-* DLANSF returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real symmetric matrix A in RFP format.
-*
-* Description
-* ===========
-*
-* DLANSF returns the value
-*
-* DLANSF = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANSF returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real symmetric matrix A in RFP format.
+*>
+*> Description
+*> ===========
+*>
+*> DLANSF returns the value
+*>
+*> DLANSF = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANSF as described
-* above.
-*
-* TRANSR (input) CHARACTER*1
-* Specifies whether the RFP format of A is normal or
-* transposed format.
-* = 'N': RFP format is Normal;
-* = 'T': RFP format is Transpose.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANSF as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> Specifies whether the RFP format of A is normal or
+*> transposed format.
+*> = 'N': RFP format is Normal;
+*> = 'T': RFP format is Transpose.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the RFP matrix A came from
+*> an upper or lower triangular matrix as follows:
+*> = 'U': RFP A came from an upper triangular matrix;
+*> = 'L': RFP A came from a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANSF is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension ( N*(N+1)/2 );
+*> On entry, the upper (if UPLO = 'U') or lower (if UPLO = 'L')
+*> part of the symmetric matrix A stored in RFP format. See the
+*> "Notes" below for more details.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the RFP matrix A came from
-* an upper or lower triangular matrix as follows:
-* = 'U': RFP A came from an upper triangular matrix;
-* = 'L': RFP A came from a lower triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANSF is
-* set to zero.
+*> \date November 2011
*
-* A (input) DOUBLE PRECISION array, dimension ( N*(N+1)/2 );
-* On entry, the upper (if UPLO = 'U') or lower (if UPLO = 'L')
-* part of the symmetric matrix A stored in RFP format. See the
-* "Notes" below for more details.
-* Unchanged on exit.
+*> \ingroup doubleOTHERcomputational
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> Reference
+*> =========
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLANSF( NORM, TRANSR, UPLO, N, A, WORK )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
-*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference
-* =========
+* .. Scalar Arguments ..
+ CHARACTER NORM, TRANSR, UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( 0: * ), WORK( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlansp.f b/SRC/dlansp.f
index 3f456cde..76d500a0 100644
--- a/SRC/dlansp.f
+++ b/SRC/dlansp.f
@@ -1,9 +1,116 @@
+*> \brief \b DLANSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANSP( NORM, UPLO, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANSP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real symmetric matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> DLANSP returns the value
+*>
+*> DLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANSP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is supplied.
+*> = 'U': Upper triangular part of A is supplied
+*> = 'L': Lower triangular part of A is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANSP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLANSP( NORM, UPLO, N, AP, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -13,59 +120,6 @@
DOUBLE PRECISION AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLANSP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real symmetric matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* DLANSP returns the value
-*
-* DLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANSP as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is supplied.
-* = 'U': Upper triangular part of A is supplied
-* = 'L': Lower triangular part of A is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANSP is
-* set to zero.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlanst.f b/SRC/dlanst.f
index b5acf1da..c988c461 100644
--- a/SRC/dlanst.f
+++ b/SRC/dlanst.f
@@ -1,9 +1,102 @@
+*> \brief \b DLANST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANST( NORM, N, D, E )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANST returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real symmetric tridiagonal matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> DLANST returns the value
+*>
+*> DLANST = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANST as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANST is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) sub-diagonal or super-diagonal elements of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLANST( NORM, N, D, E )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,48 +106,6 @@
DOUBLE PRECISION D( * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* DLANST returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real symmetric tridiagonal matrix A.
-*
-* Description
-* ===========
-*
-* DLANST returns the value
-*
-* DLANST = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANST as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANST is
-* set to zero.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of A.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) sub-diagonal or super-diagonal elements of A.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlansy.f b/SRC/dlansy.f
index 4aa14856..69eb6248 100644
--- a/SRC/dlansy.f
+++ b/SRC/dlansy.f
@@ -1,9 +1,124 @@
+*> \brief \b DLANSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANSY( NORM, UPLO, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANSY returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real symmetric matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> DLANSY returns the value
+*>
+*> DLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANSY as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is to be referenced.
+*> = 'U': Upper triangular part of A is referenced
+*> = 'L': Lower triangular part of A is referenced
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANSY is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLANSY( NORM, UPLO, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -13,64 +128,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLANSY returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real symmetric matrix A.
-*
-* Description
-* ===========
-*
-* DLANSY returns the value
-*
-* DLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANSY as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is to be referenced.
-* = 'U': Upper triangular part of A is referenced
-* = 'L': Lower triangular part of A is referenced
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANSY is
-* set to zero.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlantb.f b/SRC/dlantb.f
index 7c2c023e..934fdcee 100644
--- a/SRC/dlantb.f
+++ b/SRC/dlantb.f
@@ -1,86 +1,150 @@
- DOUBLE PRECISION FUNCTION DLANTB( NORM, UPLO, DIAG, N, K, AB,
- $ LDAB, WORK )
+*> \brief \b DLANTB
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER K, LDAB, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANTB( NORM, UPLO, DIAG, N, K, AB,
+* LDAB, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLANTB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n triangular band matrix A, with ( k + 1 ) diagonals.
-*
-* Description
-* ===========
-*
-* DLANTB returns the value
-*
-* DLANTB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANTB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n triangular band matrix A, with ( k + 1 ) diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> DLANTB returns the value
+*>
+*> DLANTB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANTB as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANTB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANTB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals of the matrix A if UPLO = 'L'.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first k+1 rows of AB. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> Note that when DIAG = 'U', the elements of the array AB
+*> corresponding to the diagonal elements of the matrix A are
+*> not referenced, but are assumed to be one.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+* Authors
+* =======
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANTB is
-* set to zero.
+*> \date November 2011
*
-* K (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals of the matrix A if UPLO = 'L'.
-* K >= 0.
+*> \ingroup doubleOTHERauxiliary
*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first k+1 rows of AB. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-* Note that when DIAG = 'U', the elements of the array AB
-* corresponding to the diagonal elements of the matrix A are
-* not referenced, but are assumed to be one.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLANTB( NORM, UPLO, DIAG, N, K, AB,
+ $ LDAB, WORK )
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlantp.f b/SRC/dlantp.f
index de04ca51..1cf63cf4 100644
--- a/SRC/dlantp.f
+++ b/SRC/dlantp.f
@@ -1,77 +1,134 @@
- DOUBLE PRECISION FUNCTION DLANTP( NORM, UPLO, DIAG, N, AP, WORK )
+*> \brief \b DLANTP
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLANTP( NORM, UPLO, DIAG, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLANTP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* triangular matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* DLANTP returns the value
-*
-* DLANTP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANTP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> triangular matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> DLANTP returns the value
+*>
+*> DLANTP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANTP as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANTP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, DLANTP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> Note that when DIAG = 'U', the elements of the array AP
+*> corresponding to the diagonal elements of the matrix A are
+*> not referenced, but are assumed to be one.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \date November 2011
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \ingroup doubleOTHERauxiliary
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, DLANTP is
-* set to zero.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLANTP( NORM, UPLO, DIAG, N, AP, WORK )
*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* Note that when DIAG = 'U', the elements of the array AP
-* corresponding to the diagonal elements of the matrix A are
-* not referenced, but are assumed to be one.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlantr.f b/SRC/dlantr.f
index 775e0948..e5728f63 100644
--- a/SRC/dlantr.f
+++ b/SRC/dlantr.f
@@ -1,87 +1,151 @@
- DOUBLE PRECISION FUNCTION DLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
- $ WORK )
+*> \brief \b DLANTR
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLANTR returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* trapezoidal or triangular matrix A.
-*
-* Description
-* ===========
-*
-* DLANTR returns the value
-*
-* DLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANTR returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> trapezoidal or triangular matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> DLANTR returns the value
+*>
+*> DLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in DLANTR as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in DLANTR as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower trapezoidal.
+*> = 'U': Upper trapezoidal
+*> = 'L': Lower trapezoidal
+*> Note that A is triangular instead of trapezoidal if M = N.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A has unit diagonal.
+*> = 'N': Non-unit diagonal
+*> = 'U': Unit diagonal
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0, and if
+*> UPLO = 'U', M <= N. When M = 0, DLANTR is set to zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0, and if
+*> UPLO = 'L', N <= M. When N = 0, DLANTR is set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The trapezoidal matrix A (A is triangular if M = N).
+*> If UPLO = 'U', the leading m by n upper trapezoidal part of
+*> the array A contains the upper trapezoidal matrix, and the
+*> strictly lower triangular part of A is not referenced.
+*> If UPLO = 'L', the leading m by n lower trapezoidal part of
+*> the array A contains the lower trapezoidal matrix, and the
+*> strictly upper triangular part of A is not referenced. Note
+*> that when DIAG = 'U', the diagonal elements of A are not
+*> referenced and are assumed to be one.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower trapezoidal.
-* = 'U': Upper trapezoidal
-* = 'L': Lower trapezoidal
-* Note that A is triangular instead of trapezoidal if M = N.
+* Authors
+* =======
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A has unit diagonal.
-* = 'N': Non-unit diagonal
-* = 'U': Unit diagonal
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0, and if
-* UPLO = 'U', M <= N. When M = 0, DLANTR is set to zero.
+*> \date November 2011
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0, and if
-* UPLO = 'L', N <= M. When N = 0, DLANTR is set to zero.
+*> \ingroup doubleOTHERauxiliary
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The trapezoidal matrix A (A is triangular if M = N).
-* If UPLO = 'U', the leading m by n upper trapezoidal part of
-* the array A contains the upper trapezoidal matrix, and the
-* strictly lower triangular part of A is not referenced.
-* If UPLO = 'L', the leading m by n lower trapezoidal part of
-* the array A contains the lower trapezoidal matrix, and the
-* strictly upper triangular part of A is not referenced. Note
-* that when DIAG = 'U', the diagonal elements of A are not
-* referenced and are assumed to be one.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+ $ WORK )
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlanv2.f b/SRC/dlanv2.f
index e94d6cde..4f6c8b07 100644
--- a/SRC/dlanv2.f
+++ b/SRC/dlanv2.f
@@ -1,64 +1,134 @@
- SUBROUTINE DLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
+*> \brief \b DLANV2
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
+* ..
+*
* Purpose
* =======
*
-* DLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric
-* matrix in standard form:
-*
-* [ A B ] = [ CS -SN ] [ AA BB ] [ CS SN ]
-* [ C D ] [ SN CS ] [ CC DD ] [-SN CS ]
-*
-* where either
-* 1) CC = 0 so that AA and DD are real eigenvalues of the matrix, or
-* 2) AA = DD and BB*CC < 0, so that AA + or - sqrt(BB*CC) are complex
-* conjugate eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric
+*> matrix in standard form:
+*>
+*> [ A B ] = [ CS -SN ] [ AA BB ] [ CS SN ]
+*> [ C D ] [ SN CS ] [ CC DD ] [-SN CS ]
+*>
+*> where either
+*> 1) CC = 0 so that AA and DD are real eigenvalues of the matrix, or
+*> 2) AA = DD and BB*CC < 0, so that AA + or - sqrt(BB*CC) are complex
+*> conjugate eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input/output) DOUBLE PRECISION
-*
-* B (input/output) DOUBLE PRECISION
-*
-* C (input/output) DOUBLE PRECISION
-*
-* D (input/output) DOUBLE PRECISION
-* On entry, the elements of the input matrix.
-* On exit, they are overwritten by the elements of the
-* standardised Schur form.
-*
-* RT1R (output) DOUBLE PRECISION
-*
-* RT1I (output) DOUBLE PRECISION
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION
+*> On entry, the elements of the input matrix.
+*> On exit, they are overwritten by the elements of the
+*> standardised Schur form.
+*> \endverbatim
+*>
+*> \param[out] RT1R
+*> \verbatim
+*> RT1R is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] RT1I
+*> \verbatim
+*> RT1I is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] RT2R
+*> \verbatim
+*> RT2R is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] RT2I
+*> \verbatim
+*> RT2I is DOUBLE PRECISION
+*> The real and imaginary parts of the eigenvalues. If the
+*> eigenvalues are a complex conjugate pair, RT1I > 0.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is DOUBLE PRECISION
+*> Parameters of the rotation matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RT2R (output) DOUBLE PRECISION
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RT2I (output) DOUBLE PRECISION
-* The real and imaginary parts of the eigenvalues. If the
-* eigenvalues are a complex conjugate pair, RT1I > 0.
+*> \date November 2011
*
-* CS (output) DOUBLE PRECISION
+*> \ingroup doubleOTHERauxiliary
*
-* SN (output) DOUBLE PRECISION
-* Parameters of the rotation matrix.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by V. Sima, Research Institute for Informatics, Bucharest,
+*> Romania, to reduce the risk of cancellation errors,
+*> when computing real eigenvalues, and to ensure, if possible, that
+*> abs(RT1R) >= abs(RT2R).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by V. Sima, Research Institute for Informatics, Bucharest,
-* Romania, to reduce the risk of cancellation errors,
-* when computing real eigenvalues, and to ensure, if possible, that
-* abs(RT1R) >= abs(RT2R).
+* .. Scalar Arguments ..
+ DOUBLE PRECISION A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlapll.f b/SRC/dlapll.f
index 76ed6e1c..fd7dc45c 100644
--- a/SRC/dlapll.f
+++ b/SRC/dlapll.f
@@ -1,9 +1,103 @@
+*> \brief \b DLAPLL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* DOUBLE PRECISION SSMIN
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given two column vectors X and Y, let
+*>
+*> A = ( X Y ).
+*>
+*> The subroutine first computes the QR factorization of A = Q*R,
+*> and then computes the SVD of the 2-by-2 upper triangular matrix R.
+*> The smaller singular value of R is returned in SSMIN, which is used
+*> as the measurement of the linear dependency of the vectors X and Y.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vectors X and Y.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCX)
+*> On entry, X contains the N-vector X.
+*> On exit, X is overwritten.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCY)
+*> On entry, Y contains the N-vector Y.
+*> On exit, Y is overwritten.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between successive elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[out] SSMIN
+*> \verbatim
+*> SSMIN is DOUBLE PRECISION
+*> The smallest singular value of the N-by-2 matrix A = ( X Y ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
@@ -13,43 +107,6 @@
DOUBLE PRECISION X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* Given two column vectors X and Y, let
-*
-* A = ( X Y ).
-*
-* The subroutine first computes the QR factorization of A = Q*R,
-* and then computes the SVD of the 2-by-2 upper triangular matrix R.
-* The smaller singular value of R is returned in SSMIN, which is used
-* as the measurement of the linear dependency of the vectors X and Y.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The length of the vectors X and Y.
-*
-* X (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCX)
-* On entry, X contains the N-vector X.
-* On exit, X is overwritten.
-*
-* INCX (input) INTEGER
-* The increment between successive elements of X. INCX > 0.
-*
-* Y (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCY)
-* On entry, Y contains the N-vector Y.
-* On exit, Y is overwritten.
-*
-* INCY (input) INTEGER
-* The increment between successive elements of Y. INCY > 0.
-*
-* SSMIN (output) DOUBLE PRECISION
-* The smallest singular value of the N-by-2 matrix A = ( X Y ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlapmr.f b/SRC/dlapmr.f
index f29ea34a..1ae6b0be 100644
--- a/SRC/dlapmr.f
+++ b/SRC/dlapmr.f
@@ -1,14 +1,105 @@
+*> \brief \b DLAPMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAPMR( FORWRD, M, N, X, LDX, K )
+*
+* .. Scalar Arguments ..
+* LOGICAL FORWRD
+* INTEGER LDX, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER K( * )
+* DOUBLE PRECISION X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAPMR rearranges the rows of the M by N matrix X as specified
+*> by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
+*> If FORWRD = .TRUE., forward permutation:
+*>
+*> X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
+*>
+*> If FORWRD = .FALSE., backward permutation:
+*>
+*> X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FORWRD
+*> \verbatim
+*> FORWRD is LOGICAL
+*> = .TRUE., forward permutation
+*> = .FALSE., backward permutation
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,N)
+*> On entry, the M by N matrix X.
+*> On exit, X contains the permuted matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X, LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] K
+*> \verbatim
+*> K is INTEGER array, dimension (M)
+*> On entry, K contains the permutation vector. K is used as
+*> internal workspace, but reset to its original value on
+*> output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAPMR( FORWRD, M, N, X, LDX, K )
- IMPLICIT NONE
*
-* Originally DLAPMT
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Adapted to DLAPMR
-* July 2010
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL FORWRD
@@ -19,44 +110,6 @@
DOUBLE PRECISION X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAPMR rearranges the rows of the M by N matrix X as specified
-* by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
-* If FORWRD = .TRUE., forward permutation:
-*
-* X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
-*
-* If FORWRD = .FALSE., backward permutation:
-*
-* X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
-*
-* Arguments
-* =========
-*
-* FORWRD (input) LOGICAL
-* = .TRUE., forward permutation
-* = .FALSE., backward permutation
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix X. N >= 0.
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,N)
-* On entry, the M by N matrix X.
-* On exit, X contains the permuted matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X, LDX >= MAX(1,M).
-*
-* K (input/output) INTEGER array, dimension (M)
-* On entry, K contains the permutation vector. K is used as
-* internal workspace, but reset to its original value on
-* output.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dlapmt.f b/SRC/dlapmt.f
index ffa1cefa..d3343386 100644
--- a/SRC/dlapmt.f
+++ b/SRC/dlapmt.f
@@ -1,9 +1,105 @@
+*> \brief \b DLAPMT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAPMT( FORWRD, M, N, X, LDX, K )
+*
+* .. Scalar Arguments ..
+* LOGICAL FORWRD
+* INTEGER LDX, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER K( * )
+* DOUBLE PRECISION X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAPMT rearranges the columns of the M by N matrix X as specified
+*> by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
+*> If FORWRD = .TRUE., forward permutation:
+*>
+*> X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
+*>
+*> If FORWRD = .FALSE., backward permutation:
+*>
+*> X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FORWRD
+*> \verbatim
+*> FORWRD is LOGICAL
+*> = .TRUE., forward permutation
+*> = .FALSE., backward permutation
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,N)
+*> On entry, the M by N matrix X.
+*> On exit, X contains the permuted matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X, LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] K
+*> \verbatim
+*> K is INTEGER array, dimension (N)
+*> On entry, K contains the permutation vector. K is used as
+*> internal workspace, but reset to its original value on
+*> output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAPMT( FORWRD, M, N, X, LDX, K )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL FORWRD
@@ -14,44 +110,6 @@
DOUBLE PRECISION X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAPMT rearranges the columns of the M by N matrix X as specified
-* by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
-* If FORWRD = .TRUE., forward permutation:
-*
-* X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
-*
-* If FORWRD = .FALSE., backward permutation:
-*
-* X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
-*
-* Arguments
-* =========
-*
-* FORWRD (input) LOGICAL
-* = .TRUE., forward permutation
-* = .FALSE., backward permutation
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix X. N >= 0.
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,N)
-* On entry, the M by N matrix X.
-* On exit, X contains the permuted matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X, LDX >= MAX(1,M).
-*
-* K (input/output) INTEGER array, dimension (N)
-* On entry, K contains the permutation vector. K is used as
-* internal workspace, but reset to its original value on
-* output.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dlapy2.f b/SRC/dlapy2.f
index c28bf171..89f47d2d 100644
--- a/SRC/dlapy2.f
+++ b/SRC/dlapy2.f
@@ -1,27 +1,68 @@
- DOUBLE PRECISION FUNCTION DLAPY2( X, Y )
+*> \brief \b DLAPY2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION X, Y
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLAPY2( X, Y )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION X, Y
+* ..
+*
* Purpose
* =======
*
-* DLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary
-* overflow.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary
+*> overflow.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* X (input) DOUBLE PRECISION
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION
+*> X and Y specify the values x and y.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* Y (input) DOUBLE PRECISION
-* X and Y specify the values x and y.
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLAPY2( X, Y )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION X, Y
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlapy3.f b/SRC/dlapy3.f
index f4f9fb16..b77022b8 100644
--- a/SRC/dlapy3.f
+++ b/SRC/dlapy3.f
@@ -1,29 +1,73 @@
- DOUBLE PRECISION FUNCTION DLAPY3( X, Y, Z )
+*> \brief \b DLAPY3
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION X, Y, Z
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLAPY3( X, Y, Z )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION X, Y, Z
+* ..
+*
* Purpose
* =======
*
-* DLAPY3 returns sqrt(x**2+y**2+z**2), taking care not to cause
-* unnecessary overflow.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAPY3 returns sqrt(x**2+y**2+z**2), taking care not to cause
+*> unnecessary overflow.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* X (input) DOUBLE PRECISION
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION
+*> X, Y and Z specify the values x, y and z.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Y (input) DOUBLE PRECISION
+*> \date November 2011
*
-* Z (input) DOUBLE PRECISION
-* X, Y and Z specify the values x, y and z.
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLAPY3( X, Y, Z )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION X, Y, Z
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaqgb.f b/SRC/dlaqgb.f
index 9addce26..1c73dc7d 100644
--- a/SRC/dlaqgb.f
+++ b/SRC/dlaqgb.f
@@ -1,10 +1,162 @@
+*> \brief \b DLAQGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED
+* INTEGER KL, KU, LDAB, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), C( * ), R( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQGB equilibrates a general M by N band matrix A with KL
+*> subdiagonals and KU superdiagonals using the row and scaling factors
+*> in the vectors R and C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix, in the same storage format
+*> as A. See EQUED for the form of the equilibrated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDA >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> The row scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> Ratio of the smallest R(i) to the largest R(i).
+*> \endverbatim
+*>
+*> \param[in] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> Ratio of the smallest C(i) to the largest C(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if row or column scaling
+*> should be done based on the ratio of the row or column scaling
+*> factors. If ROWCND < THRESH, row scaling is done, and if
+*> COLCND < THRESH, column scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if row scaling
+*> should be done based on the absolute size of the largest matrix
+*> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBauxiliary
+*
+* =====================================================================
SUBROUTINE DLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
$ AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED
@@ -15,77 +167,6 @@
DOUBLE PRECISION AB( LDAB, * ), C( * ), R( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQGB equilibrates a general M by N band matrix A with KL
-* subdiagonals and KU superdiagonals using the row and scaling factors
-* in the vectors R and C.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
-*
-* On exit, the equilibrated matrix, in the same storage format
-* as A. See EQUED for the form of the equilibrated matrix.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDA >= KL+KU+1.
-*
-* R (input) DOUBLE PRECISION array, dimension (M)
-* The row scale factors for A.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A.
-*
-* ROWCND (input) DOUBLE PRECISION
-* Ratio of the smallest R(i) to the largest R(i).
-*
-* COLCND (input) DOUBLE PRECISION
-* Ratio of the smallest C(i) to the largest C(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if row or column scaling
-* should be done based on the ratio of the row or column scaling
-* factors. If ROWCND < THRESH, row scaling is done, and if
-* COLCND < THRESH, column scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if row scaling
-* should be done based on the absolute size of the largest matrix
-* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaqge.f b/SRC/dlaqge.f
index b3e2734a..1d874d2d 100644
--- a/SRC/dlaqge.f
+++ b/SRC/dlaqge.f
@@ -1,10 +1,144 @@
+*> \brief \b DLAQGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED
+* INTEGER LDA, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( * ), R( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQGE equilibrates a general M by N matrix A using the row and
+*> column scaling factors in the vectors R and C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M by N matrix A.
+*> On exit, the equilibrated matrix. See EQUED for the form of
+*> the equilibrated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> The row scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> Ratio of the smallest R(i) to the largest R(i).
+*> \endverbatim
+*>
+*> \param[in] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> Ratio of the smallest C(i) to the largest C(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if row or column scaling
+*> should be done based on the ratio of the row or column scaling
+*> factors. If ROWCND < THRESH, row scaling is done, and if
+*> COLCND < THRESH, column scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if row scaling
+*> should be done based on the absolute size of the largest matrix
+*> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEauxiliary
+*
+* =====================================================================
SUBROUTINE DLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
$ EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED
@@ -15,66 +149,6 @@
DOUBLE PRECISION A( LDA, * ), C( * ), R( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQGE equilibrates a general M by N matrix A using the row and
-* column scaling factors in the vectors R and C.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M by N matrix A.
-* On exit, the equilibrated matrix. See EQUED for the form of
-* the equilibrated matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
-*
-* R (input) DOUBLE PRECISION array, dimension (M)
-* The row scale factors for A.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A.
-*
-* ROWCND (input) DOUBLE PRECISION
-* Ratio of the smallest R(i) to the largest R(i).
-*
-* COLCND (input) DOUBLE PRECISION
-* Ratio of the smallest C(i) to the largest C(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if row or column scaling
-* should be done based on the ratio of the row or column scaling
-* factors. If ROWCND < THRESH, row scaling is done, and if
-* COLCND < THRESH, column scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if row scaling
-* should be done based on the absolute size of the largest matrix
-* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaqp2.f b/SRC/dlaqp2.f
index 192df23a..038030e3 100644
--- a/SRC/dlaqp2.f
+++ b/SRC/dlaqp2.f
@@ -1,82 +1,158 @@
- SUBROUTINE DLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
- $ WORK )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER LDA, M, N, OFFSET
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b DLAQP2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+* WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, M, N, OFFSET
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLAQP2 computes a QR factorization with column pivoting of
-* the block A(OFFSET+1:M,1:N).
-* The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQP2 computes a QR factorization with column pivoting of
+*> the block A(OFFSET+1:M,1:N).
+*> The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* OFFSET (input) INTEGER
-* The number of rows of the matrix A that must be pivoted
-* but no factorized. OFFSET >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
-* the triangular factor obtained; the elements in block
-* A(OFFSET+1:M,1:N) below the diagonal, together with the
-* array TAU, represent the orthogonal matrix Q as a product of
-* elementary reflectors. Block A(1:OFFSET,1:N) has been
-* accordingly pivoted, but no factorized.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(i) = 0,
-* the i-th column of A is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> The number of rows of the matrix A that must be pivoted
+*> but no factorized. OFFSET >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
+*> the triangular factor obtained; the elements in block
+*> A(OFFSET+1:M,1:N) below the diagonal, together with the
+*> array TAU, represent the orthogonal matrix Q as a product of
+*> elementary reflectors. Block A(1:OFFSET,1:N) has been
+*> accordingly pivoted, but no factorized.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(i) = 0,
+*> the i-th column of A is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*> VN1 is DOUBLE PRECISION array, dimension (N)
+*> The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*> VN2 is DOUBLE PRECISION array, dimension (N)
+*> The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* VN1 (input/output) DOUBLE PRECISION array, dimension (N)
-* The vector with the partial column norms.
+*> \date November 2011
*
-* VN2 (input/output) DOUBLE PRECISION array, dimension (N)
-* The vector with the exact column norms.
+*> \ingroup doubleOTHERauxiliary
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+ $ WORK )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* .. Scalar Arguments ..
+ INTEGER LDA, M, N, OFFSET
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
+ $ WORK( * )
+* ..
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaqps.f b/SRC/dlaqps.f
index 66cc9104..59062250 100644
--- a/SRC/dlaqps.f
+++ b/SRC/dlaqps.f
@@ -1,98 +1,186 @@
- SUBROUTINE DLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
- $ VN2, AUXV, F, LDF )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER KB, LDA, LDF, M, N, NB, OFFSET
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
- $ VN1( * ), VN2( * )
-* ..
-*
+*> \brief \b DLAQPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+* VN2, AUXV, F, LDF )
+*
+* .. Scalar Arguments ..
+* INTEGER KB, LDA, LDF, M, N, NB, OFFSET
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
+* $ VN1( * ), VN2( * )
+* ..
+*
* Purpose
* =======
*
-* DLAQPS computes a step of QR factorization with column pivoting
-* of a real M-by-N matrix A by using Blas-3. It tries to factorize
-* NB columns from A starting from the row OFFSET+1, and updates all
-* of the matrix with Blas-3 xGEMM.
-*
-* In some cases, due to catastrophic cancellations, it cannot
-* factorize NB columns. Hence, the actual number of factorized
-* columns is returned in KB.
-*
-* Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQPS computes a step of QR factorization with column pivoting
+*> of a real M-by-N matrix A by using Blas-3. It tries to factorize
+*> NB columns from A starting from the row OFFSET+1, and updates all
+*> of the matrix with Blas-3 xGEMM.
+*>
+*> In some cases, due to catastrophic cancellations, it cannot
+*> factorize NB columns. Hence, the actual number of factorized
+*> columns is returned in KB.
+*>
+*> Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0
-*
-* OFFSET (input) INTEGER
-* The number of rows of A that have been factorized in
-* previous steps.
-*
-* NB (input) INTEGER
-* The number of columns to factorize.
-*
-* KB (output) INTEGER
-* The number of columns actually factorized.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, block A(OFFSET+1:M,1:KB) is the triangular
-* factor obtained and block A(1:OFFSET,1:N) has been
-* accordingly pivoted, but no factorized.
-* The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
-* been updated.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* JPVT(I) = K <==> Column K of the full matrix A has been
-* permuted into position I in AP.
-*
-* TAU (output) DOUBLE PRECISION array, dimension (KB)
-* The scalar factors of the elementary reflectors.
-*
-* VN1 (input/output) DOUBLE PRECISION array, dimension (N)
-* The vector with the partial column norms.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> The number of rows of A that have been factorized in
+*> previous steps.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to factorize.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns actually factorized.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, block A(OFFSET+1:M,1:KB) is the triangular
+*> factor obtained and block A(1:OFFSET,1:N) has been
+*> accordingly pivoted, but no factorized.
+*> The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
+*> been updated.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> JPVT(I) = K <==> Column K of the full matrix A has been
+*> permuted into position I in AP.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (KB)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*> VN1 is DOUBLE PRECISION array, dimension (N)
+*> The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*> VN2 is DOUBLE PRECISION array, dimension (N)
+*> The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[in,out] AUXV
+*> \verbatim
+*> AUXV is DOUBLE PRECISION array, dimension (NB)
+*> Auxiliar vector.
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is DOUBLE PRECISION array, dimension (LDF,NB)
+*> Matrix F**T = L*Y**T*A.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the array F. LDF >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* VN2 (input/output) DOUBLE PRECISION array, dimension (N)
-* The vector with the exact column norms.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AUXV (input/output) DOUBLE PRECISION array, dimension (NB)
-* Auxiliar vector.
+*> \date November 2011
*
-* F (input/output) DOUBLE PRECISION array, dimension (LDF,NB)
-* Matrix F**T = L*Y**T*A.
+*> \ingroup doubleOTHERauxiliary
*
-* LDF (input) INTEGER
-* The leading dimension of the array F. LDF >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+ $ VN2, AUXV, F, LDF )
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER KB, LDA, LDF, M, N, NB, OFFSET
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
+ $ VN1( * ), VN2( * )
+* ..
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaqr0.f b/SRC/dlaqr0.f
index 1fb9b4fc..d178661d 100644
--- a/SRC/dlaqr0.f
+++ b/SRC/dlaqr0.f
@@ -1,9 +1,268 @@
+*> \brief \b DLAQR0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+* ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQR0 computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**T, where T is an upper quasi-triangular matrix (the
+*> Schur form), and Z is the orthogonal matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input orthogonal
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*> H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*> previous call to DGEBAL, and then passed to DGEHRD when the
+*> matrix output by DGEBAL is reduced to Hessenberg form.
+*> Otherwise, ILO and IHI should be set to 1 and N,
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and WANTT is .TRUE., then H contains
+*> the upper quasi-triangular matrix T from the Schur
+*> decomposition (the Schur form); 2-by-2 diagonal blocks
+*> (corresponding to complex conjugate pairs of eigenvalues)
+*> are returned in standard form, with H(i,i) = H(i+1,i+1)
+*> and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is
+*> .FALSE., then the contents of H are unspecified on exit.
+*> (The output value of H when INFO.GT.0 is given under the
+*> description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*> j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (IHI)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (IHI)
+*> The real and imaginary parts, respectively, of the computed
+*> eigenvalues of H(ILO:IHI,ILO:IHI) are stored in WR(ILO:IHI)
+*> and WI(ILO:IHI). If two eigenvalues are computed as a
+*> complex conjugate pair, they are stored in consecutive
+*> elements of WR and WI, say the i-th and (i+1)th, with
+*> WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then
+*> the eigenvalues are stored in the same order as on the
+*> diagonal of the Schur form returned in H, with
+*> WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal
+*> block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
+*> WI(i+1) = -WI(i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE..
+*> 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,IHI)
+*> If WANTZ is .FALSE., then Z is not referenced.
+*> If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*> replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*> orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*> (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if WANTZ is .TRUE.
+*> then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension LWORK
+*> On exit, if LWORK = -1, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient, but LWORK typically as large as 6*N may
+*> be required for optimal performance. A workspace query
+*> to determine the optimal workspace size is recommended.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then DLAQR0 does a workspace query.
+*> In this case, DLAQR0 checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, DLAQR0 failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is an orthogonal matrix. The final
+*> value of H is upper Hessenberg and quasi-triangular
+*> in rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*> = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the orthogonal matrix in (*) (regard-
+*> less of the value of WANTT.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*> accessed.
+*> \endverbatim
+*> \verbatim
+*> \endverbatim
+*> \verbatim
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*> \endverbatim
+*> \verbatim
+*> References:
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*> Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*> 929--947, 2002.
+*> \endverbatim
+*> \verbatim
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*> of Matrix Analysis, volume 23, pages 948--973, 2002.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
$ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
@@ -14,164 +273,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQR0 computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**T, where T is an upper quasi-triangular matrix (the
-* Schur form), and Z is the orthogonal matrix of Schur vectors.
-*
-* Optionally Z may be postmultiplied into an input orthogonal
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-* previous call to DGEBAL, and then passed to DGEHRD when the
-* matrix output by DGEBAL is reduced to Hessenberg form.
-* Otherwise, ILO and IHI should be set to 1 and N,
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) DOUBLE PRECISION array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and WANTT is .TRUE., then H contains
-* the upper quasi-triangular matrix T from the Schur
-* decomposition (the Schur form); 2-by-2 diagonal blocks
-* (corresponding to complex conjugate pairs of eigenvalues)
-* are returned in standard form, with H(i,i) = H(i+1,i+1)
-* and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is
-* .FALSE., then the contents of H are unspecified on exit.
-* (The output value of H when INFO.GT.0 is given under the
-* description of INFO below.)
-*
-* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* WR (output) DOUBLE PRECISION array, dimension (IHI)
-*
-* WI (output) DOUBLE PRECISION array, dimension (IHI)
-* The real and imaginary parts, respectively, of the computed
-* eigenvalues of H(ILO:IHI,ILO:IHI) are stored in WR(ILO:IHI)
-* and WI(ILO:IHI). If two eigenvalues are computed as a
-* complex conjugate pair, they are stored in consecutive
-* elements of WR and WI, say the i-th and (i+1)th, with
-* WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then
-* the eigenvalues are stored in the same order as on the
-* diagonal of the Schur form returned in H, with
-* WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal
-* block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
-* WI(i+1) = -WI(i).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE..
-* 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,IHI)
-* If WANTZ is .FALSE., then Z is not referenced.
-* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-* orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-* (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if WANTZ is .TRUE.
-* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension LWORK
-* On exit, if LWORK = -1, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient, but LWORK typically as large as 6*N may
-* be required for optimal performance. A workspace query
-* to determine the optimal workspace size is recommended.
-*
-* If LWORK = -1, then DLAQR0 does a workspace query.
-* In this case, DLAQR0 checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, DLAQR0 failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and WANT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is an orthogonal matrix. The final
-* value of H is upper Hessenberg and quasi-triangular
-* in rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*
-* (final value of Z(ILO:IHI,ILOZ:IHIZ)
-* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
-*
-* where U is the orthogonal matrix in (*) (regard-
-* less of the value of WANTT.)
-*
-* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-* accessed.
-*
-* Arguments
-* =========
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* References:
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-* Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-* 929--947, 2002.
-*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-* of Matrix Analysis, volume 23, pages 948--973, 2002.
-*
* ================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaqr1.f b/SRC/dlaqr1.f
index b3395df3..acd83f8b 100644
--- a/SRC/dlaqr1.f
+++ b/SRC/dlaqr1.f
@@ -1,67 +1,136 @@
- SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- DOUBLE PRECISION SI1, SI2, SR1, SR2
- INTEGER LDH, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION H( LDH, * ), V( * )
-* ..
-*
+*> \brief \b DLAQR1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION SI1, SI2, SR1, SR2
+* INTEGER LDH, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION H( LDH, * ), V( * )
+* ..
+*
* Purpose
* =======
*
-* Given a 2-by-2 or 3-by-3 matrix H, DLAQR1 sets v to a
-* scalar multiple of the first column of the product
-*
-* (*) K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)
-*
-* scaling to avoid overflows and most underflows. It
-* is assumed that either
-*
-* 1) sr1 = sr2 and si1 = -si2
-* or
-* 2) si1 = si2 = 0.
-*
-* This is useful for starting double implicit shift bulges
-* in the QR algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given a 2-by-2 or 3-by-3 matrix H, DLAQR1 sets v to a
+*> scalar multiple of the first column of the product
+*>
+*> (*) K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)
+*>
+*> scaling to avoid overflows and most underflows. It
+*> is assumed that either
+*>
+*> 1) sr1 = sr2 and si1 = -si2
+*> or
+*> 2) si1 = si2 = 0.
+*>
+*> This is useful for starting double implicit shift bulges
+*> in the QR algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) integer
-* Order of the matrix H. N must be either 2 or 3.
-*
-* H (input) DOUBLE PRECISION array of dimension (LDH,N)
-* The 2-by-2 or 3-by-3 matrix H in (*).
-*
-* LDH (input) integer
-* The leading dimension of H as declared in
-* the calling procedure. LDH.GE.N
-*
-* SR1 (input) DOUBLE PRECISION
+*> \param[in] N
+*> \verbatim
+*> N is integer
+*> Order of the matrix H. N must be either 2 or 3.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is DOUBLE PRECISION array of dimension (LDH,N)
+*> The 2-by-2 or 3-by-3 matrix H in (*).
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> The leading dimension of H as declared in
+*> the calling procedure. LDH.GE.N
+*> \endverbatim
+*>
+*> \param[in] SR1
+*> \verbatim
+*> SR1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] SI1
+*> \verbatim
+*> SI1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] SR2
+*> \verbatim
+*> SR2 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] SI2
+*> \verbatim
+*> SI2 is DOUBLE PRECISION
+*> The shifts in (*).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array of dimension N
+*> A scalar multiple of the first column of the
+*> matrix K in (*).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SI1 (input) DOUBLE PRECISION
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SR2 (input) DOUBLE PRECISION
+*> \date November 2011
*
-* SI2 (input) DOUBLE PRECISION
-* The shifts in (*).
+*> \ingroup doubleOTHERauxiliary
*
-* V (output) DOUBLE PRECISION array of dimension N
-* A scalar multiple of the first column of the
-* matrix K in (*).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
+* .. Scalar Arguments ..
+ DOUBLE PRECISION SI1, SI2, SR1, SR2
+ INTEGER LDH, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION H( LDH, * ), V( * )
+* ..
*
* ================================================================
*
diff --git a/SRC/dlaqr2.f b/SRC/dlaqr2.f
index 115f5379..5bd5e877 100644
--- a/SRC/dlaqr2.f
+++ b/SRC/dlaqr2.f
@@ -1,10 +1,286 @@
+*> \brief \b DLAQR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+* IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
+* LDT, NV, WV, LDWV, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+* $ LDZ, LWORK, N, ND, NH, NS, NV, NW
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION H( LDH, * ), SI( * ), SR( * ), T( LDT, * ),
+* $ V( LDV, * ), WORK( * ), WV( LDWV, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQR2 is identical to DLAQR3 except that it avoids
+*> recursion by calling DLAHQR instead of DLAQR4.
+*>
+*> Aggressive early deflation:
+*>
+*> This subroutine accepts as input an upper Hessenberg matrix
+*> H and performs an orthogonal similarity transformation
+*> designed to detect and deflate fully converged eigenvalues from
+*> a trailing principal submatrix. On output H has been over-
+*> written by a new Hessenberg matrix that is a perturbation of
+*> an orthogonal similarity transformation of H. It is to be
+*> hoped that the final version of H has many zero subdiagonal
+*> entries.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> If .TRUE., then the Hessenberg matrix H is fully updated
+*> so that the quasi-triangular Schur factor may be
+*> computed (in cooperation with the calling subroutine).
+*> If .FALSE., then only enough of H is updated to preserve
+*> the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> If .TRUE., then the orthogonal matrix Z is updated so
+*> so that the orthogonal Schur factor may be computed
+*> (in cooperation with the calling subroutine).
+*> If .FALSE., then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H and (if WANTZ is .TRUE.) the
+*> order of the orthogonal matrix Z.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is INTEGER
+*> It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*> KBOT and KTOP together determine an isolated block
+*> along the diagonal of the Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is INTEGER
+*> It is assumed without a check that either
+*> KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
+*> determine an isolated block along the diagonal of the
+*> Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> On input the initial N-by-N section of H stores the
+*> Hessenberg matrix undergoing aggressive early deflation.
+*> On output H has been transformed by an orthogonal
+*> similarity transformation, perturbed, and the returned
+*> to Hessenberg form that (it is to be hoped) has some
+*> zero subdiagonal entries.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> Leading dimension of H just as declared in the calling
+*> subroutine. N .LE. LDH
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,N)
+*> IF WANTZ is .TRUE., then on output, the orthogonal
+*> similarity transformation mentioned above has been
+*> accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer
+*> The leading dimension of Z just as declared in the
+*> calling subroutine. 1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*> NS is integer
+*> The number of unconverged (ie approximate) eigenvalues
+*> returned in SR and SI that may be used as shifts by the
+*> calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is integer
+*> The number of converged eigenvalues uncovered by this
+*> subroutine.
+*> \endverbatim
+*>
+*> \param[out] SR
+*> \verbatim
+*> SR is DOUBLE PRECISION array, dimension (KBOT)
+*> \endverbatim
+*>
+*> \param[out] SI
+*> \verbatim
+*> SI is DOUBLE PRECISION array, dimension (KBOT)
+*> On output, the real and imaginary parts of approximate
+*> eigenvalues that may be used for shifts are stored in
+*> SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
+*> SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively.
+*> The real and imaginary parts of converged eigenvalues
+*> are stored in SR(KBOT-ND+1) through SR(KBOT) and
+*> SI(KBOT-ND+1) through SI(KBOT), respectively.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,NW)
+*> An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> The leading dimension of V just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> The number of columns of T. NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is integer
+*> The leading dimension of T just as declared in the
+*> calling subroutine. NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer
+*> The number of rows of work array WV available for
+*> workspace. NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is DOUBLE PRECISION array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer
+*> The leading dimension of W just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> On exit, WORK(1) is set to an estimate of the optimal value
+*> of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer
+*> The dimension of the work array WORK. LWORK = 2*NW
+*> suffices, but greater efficiency may result from larger
+*> values of LWORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; DLAQR2
+*> only estimates the optimal workspace size for the given
+*> values of N, NW, KTOP and KBOT. The estimate is returned
+*> in WORK(1). No error message related to LWORK is issued
+*> by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
$ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
$ LDT, NV, WV, LDWV, WORK, LWORK )
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- June 2010 --
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -17,153 +293,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQR2 is identical to DLAQR3 except that it avoids
-* recursion by calling DLAHQR instead of DLAQR4.
-*
-* Aggressive early deflation:
-*
-* This subroutine accepts as input an upper Hessenberg matrix
-* H and performs an orthogonal similarity transformation
-* designed to detect and deflate fully converged eigenvalues from
-* a trailing principal submatrix. On output H has been over-
-* written by a new Hessenberg matrix that is a perturbation of
-* an orthogonal similarity transformation of H. It is to be
-* hoped that the final version of H has many zero subdiagonal
-* entries.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* If .TRUE., then the Hessenberg matrix H is fully updated
-* so that the quasi-triangular Schur factor may be
-* computed (in cooperation with the calling subroutine).
-* If .FALSE., then only enough of H is updated to preserve
-* the eigenvalues.
-*
-* WANTZ (input) LOGICAL
-* If .TRUE., then the orthogonal matrix Z is updated so
-* so that the orthogonal Schur factor may be computed
-* (in cooperation with the calling subroutine).
-* If .FALSE., then Z is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix H and (if WANTZ is .TRUE.) the
-* order of the orthogonal matrix Z.
-*
-* KTOP (input) INTEGER
-* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-* KBOT and KTOP together determine an isolated block
-* along the diagonal of the Hessenberg matrix.
-*
-* KBOT (input) INTEGER
-* It is assumed without a check that either
-* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
-* determine an isolated block along the diagonal of the
-* Hessenberg matrix.
-*
-* NW (input) INTEGER
-* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
-*
-* H (input/output) DOUBLE PRECISION array, dimension (LDH,N)
-* On input the initial N-by-N section of H stores the
-* Hessenberg matrix undergoing aggressive early deflation.
-* On output H has been transformed by an orthogonal
-* similarity transformation, perturbed, and the returned
-* to Hessenberg form that (it is to be hoped) has some
-* zero subdiagonal entries.
-*
-* LDH (input) integer
-* Leading dimension of H just as declared in the calling
-* subroutine. N .LE. LDH
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
-* IF WANTZ is .TRUE., then on output, the orthogonal
-* similarity transformation mentioned above has been
-* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ is .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer
-* The leading dimension of Z just as declared in the
-* calling subroutine. 1 .LE. LDZ.
-*
-* NS (output) integer
-* The number of unconverged (ie approximate) eigenvalues
-* returned in SR and SI that may be used as shifts by the
-* calling subroutine.
-*
-* ND (output) integer
-* The number of converged eigenvalues uncovered by this
-* subroutine.
-*
-* SR (output) DOUBLE PRECISION array, dimension (KBOT)
-*
-* SI (output) DOUBLE PRECISION array, dimension (KBOT)
-* On output, the real and imaginary parts of approximate
-* eigenvalues that may be used for shifts are stored in
-* SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
-* SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively.
-* The real and imaginary parts of converged eigenvalues
-* are stored in SR(KBOT-ND+1) through SR(KBOT) and
-* SI(KBOT-ND+1) through SI(KBOT), respectively.
-*
-* V (workspace) DOUBLE PRECISION array, dimension (LDV,NW)
-* An NW-by-NW work array.
-*
-* LDV (input) integer scalar
-* The leading dimension of V just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* NH (input) integer scalar
-* The number of columns of T. NH.GE.NW.
-*
-* T (workspace) DOUBLE PRECISION array, dimension (LDT,NW)
-*
-* LDT (input) integer
-* The leading dimension of T just as declared in the
-* calling subroutine. NW .LE. LDT
-*
-* NV (input) integer
-* The number of rows of work array WV available for
-* workspace. NV.GE.NW.
-*
-* WV (workspace) DOUBLE PRECISION array, dimension (LDWV,NW)
-*
-* LDWV (input) integer
-* The leading dimension of W just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-* On exit, WORK(1) is set to an estimate of the optimal value
-* of LWORK for the given values of N, NW, KTOP and KBOT.
-*
-* LWORK (input) integer
-* The dimension of the work array WORK. LWORK = 2*NW
-* suffices, but greater efficiency may result from larger
-* values of LWORK.
-*
-* If LWORK = -1, then a workspace query is assumed; DLAQR2
-* only estimates the optimal workspace size for the given
-* values of N, NW, KTOP and KBOT. The estimate is returned
-* in WORK(1). No error message related to LWORK is issued
-* by XERBLA. Neither H nor Z are accessed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
* ================================================================
* .. Parameters ..
DOUBLE PRECISION ZERO, ONE
diff --git a/SRC/dlaqr3.f b/SRC/dlaqr3.f
index a0a0c475..6e230dfb 100644
--- a/SRC/dlaqr3.f
+++ b/SRC/dlaqr3.f
@@ -1,10 +1,283 @@
+*> \brief \b DLAQR3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+* IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
+* LDT, NV, WV, LDWV, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+* $ LDZ, LWORK, N, ND, NH, NS, NV, NW
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION H( LDH, * ), SI( * ), SR( * ), T( LDT, * ),
+* $ V( LDV, * ), WORK( * ), WV( LDWV, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Aggressive early deflation:
+*>
+*> DLAQR3 accepts as input an upper Hessenberg matrix
+*> H and performs an orthogonal similarity transformation
+*> designed to detect and deflate fully converged eigenvalues from
+*> a trailing principal submatrix. On output H has been over-
+*> written by a new Hessenberg matrix that is a perturbation of
+*> an orthogonal similarity transformation of H. It is to be
+*> hoped that the final version of H has many zero subdiagonal
+*> entries.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> If .TRUE., then the Hessenberg matrix H is fully updated
+*> so that the quasi-triangular Schur factor may be
+*> computed (in cooperation with the calling subroutine).
+*> If .FALSE., then only enough of H is updated to preserve
+*> the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> If .TRUE., then the orthogonal matrix Z is updated so
+*> so that the orthogonal Schur factor may be computed
+*> (in cooperation with the calling subroutine).
+*> If .FALSE., then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H and (if WANTZ is .TRUE.) the
+*> order of the orthogonal matrix Z.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is INTEGER
+*> It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*> KBOT and KTOP together determine an isolated block
+*> along the diagonal of the Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is INTEGER
+*> It is assumed without a check that either
+*> KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
+*> determine an isolated block along the diagonal of the
+*> Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> On input the initial N-by-N section of H stores the
+*> Hessenberg matrix undergoing aggressive early deflation.
+*> On output H has been transformed by an orthogonal
+*> similarity transformation, perturbed, and the returned
+*> to Hessenberg form that (it is to be hoped) has some
+*> zero subdiagonal entries.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> Leading dimension of H just as declared in the calling
+*> subroutine. N .LE. LDH
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,N)
+*> IF WANTZ is .TRUE., then on output, the orthogonal
+*> similarity transformation mentioned above has been
+*> accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer
+*> The leading dimension of Z just as declared in the
+*> calling subroutine. 1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*> NS is integer
+*> The number of unconverged (ie approximate) eigenvalues
+*> returned in SR and SI that may be used as shifts by the
+*> calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is integer
+*> The number of converged eigenvalues uncovered by this
+*> subroutine.
+*> \endverbatim
+*>
+*> \param[out] SR
+*> \verbatim
+*> SR is DOUBLE PRECISION array, dimension (KBOT)
+*> \endverbatim
+*>
+*> \param[out] SI
+*> \verbatim
+*> SI is DOUBLE PRECISION array, dimension (KBOT)
+*> On output, the real and imaginary parts of approximate
+*> eigenvalues that may be used for shifts are stored in
+*> SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
+*> SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively.
+*> The real and imaginary parts of converged eigenvalues
+*> are stored in SR(KBOT-ND+1) through SR(KBOT) and
+*> SI(KBOT-ND+1) through SI(KBOT), respectively.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,NW)
+*> An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> The leading dimension of V just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> The number of columns of T. NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is integer
+*> The leading dimension of T just as declared in the
+*> calling subroutine. NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer
+*> The number of rows of work array WV available for
+*> workspace. NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is DOUBLE PRECISION array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer
+*> The leading dimension of W just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> On exit, WORK(1) is set to an estimate of the optimal value
+*> of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer
+*> The dimension of the work array WORK. LWORK = 2*NW
+*> suffices, but greater efficiency may result from larger
+*> values of LWORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; DLAQR3
+*> only estimates the optimal workspace size for the given
+*> values of N, NW, KTOP and KBOT. The estimate is returned
+*> in WORK(1). No error message related to LWORK is issued
+*> by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
$ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
$ LDT, NV, WV, LDWV, WORK, LWORK )
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- June 2010 --
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -17,150 +290,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* Aggressive early deflation:
-*
-* DLAQR3 accepts as input an upper Hessenberg matrix
-* H and performs an orthogonal similarity transformation
-* designed to detect and deflate fully converged eigenvalues from
-* a trailing principal submatrix. On output H has been over-
-* written by a new Hessenberg matrix that is a perturbation of
-* an orthogonal similarity transformation of H. It is to be
-* hoped that the final version of H has many zero subdiagonal
-* entries.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* If .TRUE., then the Hessenberg matrix H is fully updated
-* so that the quasi-triangular Schur factor may be
-* computed (in cooperation with the calling subroutine).
-* If .FALSE., then only enough of H is updated to preserve
-* the eigenvalues.
-*
-* WANTZ (input) LOGICAL
-* If .TRUE., then the orthogonal matrix Z is updated so
-* so that the orthogonal Schur factor may be computed
-* (in cooperation with the calling subroutine).
-* If .FALSE., then Z is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix H and (if WANTZ is .TRUE.) the
-* order of the orthogonal matrix Z.
-*
-* KTOP (input) INTEGER
-* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-* KBOT and KTOP together determine an isolated block
-* along the diagonal of the Hessenberg matrix.
-*
-* KBOT (input) INTEGER
-* It is assumed without a check that either
-* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
-* determine an isolated block along the diagonal of the
-* Hessenberg matrix.
-*
-* NW (input) INTEGER
-* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
-*
-* H (input/output) DOUBLE PRECISION array, dimension (LDH,N)
-* On input the initial N-by-N section of H stores the
-* Hessenberg matrix undergoing aggressive early deflation.
-* On output H has been transformed by an orthogonal
-* similarity transformation, perturbed, and the returned
-* to Hessenberg form that (it is to be hoped) has some
-* zero subdiagonal entries.
-*
-* LDH (input) integer
-* Leading dimension of H just as declared in the calling
-* subroutine. N .LE. LDH
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
-* IF WANTZ is .TRUE., then on output, the orthogonal
-* similarity transformation mentioned above has been
-* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ is .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer
-* The leading dimension of Z just as declared in the
-* calling subroutine. 1 .LE. LDZ.
-*
-* NS (output) integer
-* The number of unconverged (ie approximate) eigenvalues
-* returned in SR and SI that may be used as shifts by the
-* calling subroutine.
-*
-* ND (output) integer
-* The number of converged eigenvalues uncovered by this
-* subroutine.
-*
-* SR (output) DOUBLE PRECISION array, dimension (KBOT)
-*
-* SI (output) DOUBLE PRECISION array, dimension (KBOT)
-* On output, the real and imaginary parts of approximate
-* eigenvalues that may be used for shifts are stored in
-* SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
-* SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively.
-* The real and imaginary parts of converged eigenvalues
-* are stored in SR(KBOT-ND+1) through SR(KBOT) and
-* SI(KBOT-ND+1) through SI(KBOT), respectively.
-*
-* V (workspace) DOUBLE PRECISION array, dimension (LDV,NW)
-* An NW-by-NW work array.
-*
-* LDV (input) integer scalar
-* The leading dimension of V just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* NH (input) integer scalar
-* The number of columns of T. NH.GE.NW.
-*
-* T (workspace) DOUBLE PRECISION array, dimension (LDT,NW)
-*
-* LDT (input) integer
-* The leading dimension of T just as declared in the
-* calling subroutine. NW .LE. LDT
-*
-* NV (input) integer
-* The number of rows of work array WV available for
-* workspace. NV.GE.NW.
-*
-* WV (workspace) DOUBLE PRECISION array, dimension (LDWV,NW)
-*
-* LDWV (input) integer
-* The leading dimension of W just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-* On exit, WORK(1) is set to an estimate of the optimal value
-* of LWORK for the given values of N, NW, KTOP and KBOT.
-*
-* LWORK (input) integer
-* The dimension of the work array WORK. LWORK = 2*NW
-* suffices, but greater efficiency may result from larger
-* values of LWORK.
-*
-* If LWORK = -1, then a workspace query is assumed; DLAQR3
-* only estimates the optimal workspace size for the given
-* values of N, NW, KTOP and KBOT. The estimate is returned
-* in WORK(1). No error message related to LWORK is issued
-* by XERBLA. Neither H nor Z are accessed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
* ================================================================
* .. Parameters ..
DOUBLE PRECISION ZERO, ONE
diff --git a/SRC/dlaqr4.f b/SRC/dlaqr4.f
index 8a42623e..c949b026 100644
--- a/SRC/dlaqr4.f
+++ b/SRC/dlaqr4.f
@@ -1,183 +1,287 @@
- SUBROUTINE DLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
- $ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*> \brief \b DLAQR4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+* ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQR4 implements one level of recursion for DLAQR0.
+*> It is a complete implementation of the small bulge multi-shift
+*> QR algorithm. It may be called by DLAQR0 and, for large enough
+*> deflation window size, it may be called by DLAQR3. This
+*> subroutine is identical to DLAQR0 except that it calls DLAQR2
+*> instead of DLAQR3.
+*>
+*> DLAQR4 computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**T, where T is an upper quasi-triangular matrix (the
+*> Schur form), and Z is the orthogonal matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input orthogonal
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
- LOGICAL WANTT, WANTZ
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ),
- $ Z( LDZ, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*> H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*> previous call to DGEBAL, and then passed to DGEHRD when the
+*> matrix output by DGEBAL is reduced to Hessenberg form.
+*> Otherwise, ILO and IHI should be set to 1 and N,
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and WANTT is .TRUE., then H contains
+*> the upper quasi-triangular matrix T from the Schur
+*> decomposition (the Schur form); 2-by-2 diagonal blocks
+*> (corresponding to complex conjugate pairs of eigenvalues)
+*> are returned in standard form, with H(i,i) = H(i+1,i+1)
+*> and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is
+*> .FALSE., then the contents of H are unspecified on exit.
+*> (The output value of H when INFO.GT.0 is given under the
+*> description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*> j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (IHI)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (IHI)
+*> The real and imaginary parts, respectively, of the computed
+*> eigenvalues of H(ILO:IHI,ILO:IHI) are stored in WR(ILO:IHI)
+*> and WI(ILO:IHI). If two eigenvalues are computed as a
+*> complex conjugate pair, they are stored in consecutive
+*> elements of WR and WI, say the i-th and (i+1)th, with
+*> WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then
+*> the eigenvalues are stored in the same order as on the
+*> diagonal of the Schur form returned in H, with
+*> WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal
+*> block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
+*> WI(i+1) = -WI(i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE..
+*> 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,IHI)
+*> If WANTZ is .FALSE., then Z is not referenced.
+*> If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*> replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*> orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*> (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if WANTZ is .TRUE.
+*> then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension LWORK
+*> On exit, if LWORK = -1, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient, but LWORK typically as large as 6*N may
+*> be required for optimal performance. A workspace query
+*> to determine the optimal workspace size is recommended.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then DLAQR4 does a workspace query.
+*> In this case, DLAQR4 checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, DLAQR4 failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is an orthogonal matrix. The final
+*> value of H is upper Hessenberg and quasi-triangular
+*> in rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*> = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the orthogonal matrix in (*) (regard-
+*> less of the value of WANTT.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* DLAQR4 implements one level of recursion for DLAQR0.
-* It is a complete implementation of the small bulge multi-shift
-* QR algorithm. It may be called by DLAQR0 and, for large enough
-* deflation window size, it may be called by DLAQR3. This
-* subroutine is identical to DLAQR0 except that it calls DLAQR2
-* instead of DLAQR3.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DLAQR4 computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**T, where T is an upper quasi-triangular matrix (the
-* Schur form), and Z is the orthogonal matrix of Schur vectors.
+*> \date November 2011
*
-* Optionally Z may be postmultiplied into an input orthogonal
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*> \ingroup doubleOTHERauxiliary
*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-* previous call to DGEBAL, and then passed to DGEHRD when the
-* matrix output by DGEBAL is reduced to Hessenberg form.
-* Otherwise, ILO and IHI should be set to 1 and N,
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) DOUBLE PRECISION array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and WANTT is .TRUE., then H contains
-* the upper quasi-triangular matrix T from the Schur
-* decomposition (the Schur form); 2-by-2 diagonal blocks
-* (corresponding to complex conjugate pairs of eigenvalues)
-* are returned in standard form, with H(i,i) = H(i+1,i+1)
-* and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is
-* .FALSE., then the contents of H are unspecified on exit.
-* (The output value of H when INFO.GT.0 is given under the
-* description of INFO below.)
-*
-* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* WR (output) DOUBLE PRECISION array, dimension (IHI)
-*
-* WI (output) DOUBLE PRECISION array, dimension (IHI)
-* The real and imaginary parts, respectively, of the computed
-* eigenvalues of H(ILO:IHI,ILO:IHI) are stored in WR(ILO:IHI)
-* and WI(ILO:IHI). If two eigenvalues are computed as a
-* complex conjugate pair, they are stored in consecutive
-* elements of WR and WI, say the i-th and (i+1)th, with
-* WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then
-* the eigenvalues are stored in the same order as on the
-* diagonal of the Schur form returned in H, with
-* WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal
-* block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
-* WI(i+1) = -WI(i).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE..
-* 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,IHI)
-* If WANTZ is .FALSE., then Z is not referenced.
-* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-* orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-* (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if WANTZ is .TRUE.
-* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension LWORK
-* On exit, if LWORK = -1, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient, but LWORK typically as large as 6*N may
-* be required for optimal performance. A workspace query
-* to determine the optimal workspace size is recommended.
-*
-* If LWORK = -1, then DLAQR4 does a workspace query.
-* In this case, DLAQR4 checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, DLAQR4 failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and WANT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is an orthogonal matrix. The final
-* value of H is upper Hessenberg and quasi-triangular
-* in rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*
-* (final value of Z(ILO:IHI,ILOZ:IHIZ)
-* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
-*
-* where U is the orthogonal matrix in (*) (regard-
-* less of the value of WANTT.)
-*
-* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-* accessed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> References:
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*> Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*> 929--947, 2002.
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*> of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+ $ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* References:
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-* Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-* 929--947, 2002.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-* of Matrix Analysis, volume 23, pages 948--973, 2002.
+* .. Scalar Arguments ..
+ INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+ LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+ $ Z( LDZ, * )
+* ..
*
* ================================================================
* .. Parameters ..
diff --git a/SRC/dlaqr5.f b/SRC/dlaqr5.f
index 1560d8bf..fd58ed26 100644
--- a/SRC/dlaqr5.f
+++ b/SRC/dlaqr5.f
@@ -1,3 +1,257 @@
+*> \brief \b DLAQR5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS,
+* SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U,
+* LDU, NV, WV, LDWV, NH, WH, LDWH )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
+* $ LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION H( LDH, * ), SI( * ), SR( * ), U( LDU, * ),
+* $ V( LDV, * ), WH( LDWH, * ), WV( LDWV, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQR5, called by DLAQR0, performs a
+*> single small-bulge multi-shift QR sweep.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is logical scalar
+*> WANTT = .true. if the quasi-triangular Schur factor
+*> is being computed. WANTT is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is logical scalar
+*> WANTZ = .true. if the orthogonal Schur factor is being
+*> computed. WANTZ is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] KACC22
+*> \verbatim
+*> KACC22 is integer with value 0, 1, or 2.
+*> Specifies the computation mode of far-from-diagonal
+*> orthogonal updates.
+*> = 0: DLAQR5 does not accumulate reflections and does not
+*> use matrix-matrix multiply to update far-from-diagonal
+*> matrix entries.
+*> = 1: DLAQR5 accumulates reflections and uses matrix-matrix
+*> multiply to update the far-from-diagonal matrix entries.
+*> = 2: DLAQR5 accumulates reflections, uses matrix-matrix
+*> multiply to update the far-from-diagonal matrix entries,
+*> and takes advantage of 2-by-2 block structure during
+*> matrix multiplies.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is integer scalar
+*> N is the order of the Hessenberg matrix H upon which this
+*> subroutine operates.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is integer scalar
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is integer scalar
+*> These are the first and last rows and columns of an
+*> isolated diagonal block upon which the QR sweep is to be
+*> applied. It is assumed without a check that
+*> either KTOP = 1 or H(KTOP,KTOP-1) = 0
+*> and
+*> either KBOT = N or H(KBOT+1,KBOT) = 0.
+*> \endverbatim
+*>
+*> \param[in] NSHFTS
+*> \verbatim
+*> NSHFTS is integer scalar
+*> NSHFTS gives the number of simultaneous shifts. NSHFTS
+*> must be positive and even.
+*> \endverbatim
+*>
+*> \param[in,out] SR
+*> \verbatim
+*> SR is DOUBLE PRECISION array of size (NSHFTS)
+*> \endverbatim
+*>
+*> \param[in,out] SI
+*> \verbatim
+*> SI is DOUBLE PRECISION array of size (NSHFTS)
+*> SR contains the real parts and SI contains the imaginary
+*> parts of the NSHFTS shifts of origin that define the
+*> multi-shift QR sweep. On output SR and SI may be
+*> reordered.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array of size (LDH,N)
+*> On input H contains a Hessenberg matrix. On output a
+*> multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
+*> to the isolated diagonal block in rows and columns KTOP
+*> through KBOT.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer scalar
+*> LDH is the leading dimension of H just as declared in the
+*> calling procedure. LDH.GE.MAX(1,N).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array of size (LDZ,IHI)
+*> If WANTZ = .TRUE., then the QR Sweep orthogonal
+*> similarity transformation is accumulated into
+*> Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ = .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer scalar
+*> LDA is the leading dimension of Z just as declared in
+*> the calling procedure. LDZ.GE.N.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array of size (LDV,NSHFTS/2)
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> LDV is the leading dimension of V as declared in the
+*> calling procedure. LDV.GE.3.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array of size
+*> (LDU,3*NSHFTS-3)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is integer scalar
+*> LDU is the leading dimension of U just as declared in the
+*> in the calling subroutine. LDU.GE.3*NSHFTS-3.
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> NH is the number of columns in array WH available for
+*> workspace. NH.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WH
+*> \verbatim
+*> WH is DOUBLE PRECISION array of size (LDWH,NH)
+*> \endverbatim
+*>
+*> \param[in] LDWH
+*> \verbatim
+*> LDWH is integer scalar
+*> Leading dimension of WH just as declared in the
+*> calling procedure. LDWH.GE.3*NSHFTS-3.
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer scalar
+*> NV is the number of rows in WV agailable for workspace.
+*> NV.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is DOUBLE PRECISION array of size
+*> (LDWV,3*NSHFTS-3)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer scalar
+*> LDWV is the leading dimension of WV as declared in the
+*> in the calling subroutine. LDWV.GE.NV.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> Reference:
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and
+*> Level 3 Performance, SIAM Journal of Matrix Analysis,
+*> volume 23, pages 929--947, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS,
$ SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U,
$ LDU, NV, WV, LDWV, NH, WH, LDWH )
@@ -5,7 +259,7 @@
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
@@ -18,136 +272,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQR5, called by DLAQR0, performs a
-* single small-bulge multi-shift QR sweep.
-*
-* Arguments
-* =========
-*
-* WANTT (input) logical scalar
-* WANTT = .true. if the quasi-triangular Schur factor
-* is being computed. WANTT is set to .false. otherwise.
-*
-* WANTZ (input) logical scalar
-* WANTZ = .true. if the orthogonal Schur factor is being
-* computed. WANTZ is set to .false. otherwise.
-*
-* KACC22 (input) integer with value 0, 1, or 2.
-* Specifies the computation mode of far-from-diagonal
-* orthogonal updates.
-* = 0: DLAQR5 does not accumulate reflections and does not
-* use matrix-matrix multiply to update far-from-diagonal
-* matrix entries.
-* = 1: DLAQR5 accumulates reflections and uses matrix-matrix
-* multiply to update the far-from-diagonal matrix entries.
-* = 2: DLAQR5 accumulates reflections, uses matrix-matrix
-* multiply to update the far-from-diagonal matrix entries,
-* and takes advantage of 2-by-2 block structure during
-* matrix multiplies.
-*
-* N (input) integer scalar
-* N is the order of the Hessenberg matrix H upon which this
-* subroutine operates.
-*
-* KTOP (input) integer scalar
-*
-* KBOT (input) integer scalar
-* These are the first and last rows and columns of an
-* isolated diagonal block upon which the QR sweep is to be
-* applied. It is assumed without a check that
-* either KTOP = 1 or H(KTOP,KTOP-1) = 0
-* and
-* either KBOT = N or H(KBOT+1,KBOT) = 0.
-*
-* NSHFTS (input) integer scalar
-* NSHFTS gives the number of simultaneous shifts. NSHFTS
-* must be positive and even.
-*
-* SR (input/output) DOUBLE PRECISION array of size (NSHFTS)
-*
-* SI (input/output) DOUBLE PRECISION array of size (NSHFTS)
-* SR contains the real parts and SI contains the imaginary
-* parts of the NSHFTS shifts of origin that define the
-* multi-shift QR sweep. On output SR and SI may be
-* reordered.
-*
-* H (input/output) DOUBLE PRECISION array of size (LDH,N)
-* On input H contains a Hessenberg matrix. On output a
-* multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
-* to the isolated diagonal block in rows and columns KTOP
-* through KBOT.
-*
-* LDH (input) integer scalar
-* LDH is the leading dimension of H just as declared in the
-* calling procedure. LDH.GE.MAX(1,N).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
-*
-* Z (input/output) DOUBLE PRECISION array of size (LDZ,IHI)
-* If WANTZ = .TRUE., then the QR Sweep orthogonal
-* similarity transformation is accumulated into
-* Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ = .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer scalar
-* LDA is the leading dimension of Z just as declared in
-* the calling procedure. LDZ.GE.N.
-*
-* V (workspace) DOUBLE PRECISION array of size (LDV,NSHFTS/2)
-*
-* LDV (input) integer scalar
-* LDV is the leading dimension of V as declared in the
-* calling procedure. LDV.GE.3.
-*
-* U (workspace) DOUBLE PRECISION array of size
-* (LDU,3*NSHFTS-3)
-*
-* LDU (input) integer scalar
-* LDU is the leading dimension of U just as declared in the
-* in the calling subroutine. LDU.GE.3*NSHFTS-3.
-*
-* NH (input) integer scalar
-* NH is the number of columns in array WH available for
-* workspace. NH.GE.1.
-*
-* WH (workspace) DOUBLE PRECISION array of size (LDWH,NH)
-*
-* LDWH (input) integer scalar
-* Leading dimension of WH just as declared in the
-* calling procedure. LDWH.GE.3*NSHFTS-3.
-*
-* NV (input) integer scalar
-* NV is the number of rows in WV agailable for workspace.
-* NV.GE.1.
-*
-* WV (workspace) DOUBLE PRECISION array of size
-* (LDWV,3*NSHFTS-3)
-*
-* LDWV (input) integer scalar
-* LDWV is the leading dimension of WV as declared in the
-* in the calling subroutine. LDWV.GE.NV.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* Reference:
-*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and
-* Level 3 Performance, SIAM Journal of Matrix Analysis,
-* volume 23, pages 929--947, 2002.
-*
* ================================================================
* .. Parameters ..
DOUBLE PRECISION ZERO, ONE
diff --git a/SRC/dlaqsb.f b/SRC/dlaqsb.f
index 5a0baab5..a376bac0 100644
--- a/SRC/dlaqsb.f
+++ b/SRC/dlaqsb.f
@@ -1,9 +1,143 @@
+*> \brief \b DLAQSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER KD, LDAB, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), S( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQSB equilibrates a symmetric band matrix A using the scaling
+*> factors in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -14,69 +148,6 @@
DOUBLE PRECISION AB( LDAB, * ), S( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQSB equilibrates a symmetric band matrix A using the scaling
-* factors in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaqsp.f b/SRC/dlaqsp.f
index 7cfad592..05d296d4 100644
--- a/SRC/dlaqsp.f
+++ b/SRC/dlaqsp.f
@@ -1,9 +1,128 @@
+*> \brief \b DLAQSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), S( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQSP equilibrates a symmetric matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix: diag(S) * A * diag(S), in
+*> the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -14,60 +133,6 @@
DOUBLE PRECISION AP( * ), S( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQSP equilibrates a symmetric matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the equilibrated matrix: diag(S) * A * diag(S), in
-* the same storage format as A.
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaqsy.f b/SRC/dlaqsy.f
index 68779cac..dec36a28 100644
--- a/SRC/dlaqsy.f
+++ b/SRC/dlaqsy.f
@@ -1,9 +1,136 @@
+*> \brief \b DLAQSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), S( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQSY equilibrates a symmetric matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED = 'Y', the equilibrated matrix:
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYauxiliary
+*
+* =====================================================================
SUBROUTINE DLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -14,65 +141,6 @@
DOUBLE PRECISION A( LDA, * ), S( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQSY equilibrates a symmetric matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if EQUED = 'Y', the equilibrated matrix:
-* diag(S) * A * diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlaqtr.f b/SRC/dlaqtr.f
index 512ab1b6..840698ce 100644
--- a/SRC/dlaqtr.f
+++ b/SRC/dlaqtr.f
@@ -1,10 +1,166 @@
+*> \brief \b DLAQTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAQTR( LTRAN, LREAL, N, T, LDT, B, W, SCALE, X, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL LREAL, LTRAN
+* INTEGER INFO, LDT, N
+* DOUBLE PRECISION SCALE, W
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( * ), T( LDT, * ), WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAQTR solves the real quasi-triangular system
+*>
+*> op(T)*p = scale*c, if LREAL = .TRUE.
+*>
+*> or the complex quasi-triangular systems
+*>
+*> op(T + iB)*(p+iq) = scale*(c+id), if LREAL = .FALSE.
+*>
+*> in real arithmetic, where T is upper quasi-triangular.
+*> If LREAL = .FALSE., then the first diagonal block of T must be
+*> 1 by 1, B is the specially structured matrix
+*>
+*> B = [ b(1) b(2) ... b(n) ]
+*> [ w ]
+*> [ w ]
+*> [ . ]
+*> [ w ]
+*>
+*> op(A) = A or A**T, A**T denotes the transpose of
+*> matrix A.
+*>
+*> On input, X = [ c ]. On output, X = [ p ].
+*> [ d ] [ q ]
+*>
+*> This subroutine is designed for the condition number estimation
+*> in routine DTRSNA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LTRAN
+*> \verbatim
+*> LTRAN is LOGICAL
+*> On entry, LTRAN specifies the option of conjugate transpose:
+*> = .FALSE., op(T+i*B) = T+i*B,
+*> = .TRUE., op(T+i*B) = (T+i*B)**T.
+*> \endverbatim
+*>
+*> \param[in] LREAL
+*> \verbatim
+*> LREAL is LOGICAL
+*> On entry, LREAL specifies the input matrix structure:
+*> = .FALSE., the input is complex
+*> = .TRUE., the input is real
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of T+i*B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,N)
+*> On entry, T contains a matrix in Schur canonical form.
+*> If LREAL = .FALSE., then the first diagonal block of T mu
+*> be 1 by 1.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the matrix T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (N)
+*> On entry, B contains the elements to form the matrix
+*> B as described above.
+*> If LREAL = .TRUE., B is not referenced.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is DOUBLE PRECISION
+*> On entry, W is the diagonal element of the matrix B.
+*> If LREAL = .TRUE., W is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On exit, SCALE is the scale factor.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (2*N)
+*> On entry, X contains the right hand side of the system.
+*> On exit, X is overwritten by the solution.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO is set to
+*> 0: successful exit.
+*> 1: the some diagonal 1 by 1 block has been perturbed by
+*> a small number SMIN to keep nonsingularity.
+*> 2: the some diagonal 2 by 2 block has been perturbed by
+*> a small number in DLALN2 to keep nonsingularity.
+*> NOTE: In the interests of speed, this routine does not
+*> check the inputs for errors.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAQTR( LTRAN, LREAL, N, T, LDT, B, W, SCALE, X, WORK,
$ INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LREAL, LTRAN
@@ -15,88 +171,6 @@
DOUBLE PRECISION B( * ), T( LDT, * ), WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAQTR solves the real quasi-triangular system
-*
-* op(T)*p = scale*c, if LREAL = .TRUE.
-*
-* or the complex quasi-triangular systems
-*
-* op(T + iB)*(p+iq) = scale*(c+id), if LREAL = .FALSE.
-*
-* in real arithmetic, where T is upper quasi-triangular.
-* If LREAL = .FALSE., then the first diagonal block of T must be
-* 1 by 1, B is the specially structured matrix
-*
-* B = [ b(1) b(2) ... b(n) ]
-* [ w ]
-* [ w ]
-* [ . ]
-* [ w ]
-*
-* op(A) = A or A**T, A**T denotes the transpose of
-* matrix A.
-*
-* On input, X = [ c ]. On output, X = [ p ].
-* [ d ] [ q ]
-*
-* This subroutine is designed for the condition number estimation
-* in routine DTRSNA.
-*
-* Arguments
-* =========
-*
-* LTRAN (input) LOGICAL
-* On entry, LTRAN specifies the option of conjugate transpose:
-* = .FALSE., op(T+i*B) = T+i*B,
-* = .TRUE., op(T+i*B) = (T+i*B)**T.
-*
-* LREAL (input) LOGICAL
-* On entry, LREAL specifies the input matrix structure:
-* = .FALSE., the input is complex
-* = .TRUE., the input is real
-*
-* N (input) INTEGER
-* On entry, N specifies the order of T+i*B. N >= 0.
-*
-* T (input) DOUBLE PRECISION array, dimension (LDT,N)
-* On entry, T contains a matrix in Schur canonical form.
-* If LREAL = .FALSE., then the first diagonal block of T mu
-* be 1 by 1.
-*
-* LDT (input) INTEGER
-* The leading dimension of the matrix T. LDT >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (N)
-* On entry, B contains the elements to form the matrix
-* B as described above.
-* If LREAL = .TRUE., B is not referenced.
-*
-* W (input) DOUBLE PRECISION
-* On entry, W is the diagonal element of the matrix B.
-* If LREAL = .TRUE., W is not referenced.
-*
-* SCALE (output) DOUBLE PRECISION
-* On exit, SCALE is the scale factor.
-*
-* X (input/output) DOUBLE PRECISION array, dimension (2*N)
-* On entry, X contains the right hand side of the system.
-* On exit, X is overwritten by the solution.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* On exit, INFO is set to
-* 0: successful exit.
-* 1: the some diagonal 1 by 1 block has been perturbed by
-* a small number SMIN to keep nonsingularity.
-* 2: the some diagonal 2 by 2 block has been perturbed by
-* a small number in DLALN2 to keep nonsingularity.
-* NOTE: In the interests of speed, this routine does not
-* check the inputs for errors.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlar1v.f b/SRC/dlar1v.f
index adc13085..7912c74e 100644
--- a/SRC/dlar1v.f
+++ b/SRC/dlar1v.f
@@ -1,3 +1,229 @@
+*> \brief \b DLAR1V
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
+* PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
+* R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTNC
+* INTEGER B1, BN, N, NEGCNT, R
+* DOUBLE PRECISION GAPTOL, LAMBDA, MINGMA, NRMINV, PIVMIN, RESID,
+* $ RQCORR, ZTZ
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * )
+* DOUBLE PRECISION D( * ), L( * ), LD( * ), LLD( * ),
+* $ WORK( * )
+* DOUBLE PRECISION Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAR1V computes the (scaled) r-th column of the inverse of
+*> the sumbmatrix in rows B1 through BN of the tridiagonal matrix
+*> L D L**T - sigma I. When sigma is close to an eigenvalue, the
+*> computed vector is an accurate eigenvector. Usually, r corresponds
+*> to the index where the eigenvector is largest in magnitude.
+*> The following steps accomplish this computation :
+*> (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
+*> (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
+*> (c) Computation of the diagonal elements of the inverse of
+*> L D L**T - sigma I by combining the above transforms, and choosing
+*> r as the index where the diagonal of the inverse is (one of the)
+*> largest in magnitude.
+*> (d) Computation of the (scaled) r-th column of the inverse using the
+*> twisted factorization obtained by combining the top part of the
+*> the stationary and the bottom part of the progressive transform.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix L D L**T.
+*> \endverbatim
+*>
+*> \param[in] B1
+*> \verbatim
+*> B1 is INTEGER
+*> First index of the submatrix of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] BN
+*> \verbatim
+*> BN is INTEGER
+*> Last index of the submatrix of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] LAMBDA
+*> \verbatim
+*> LAMBDA is DOUBLE PRECISION
+*> The shift. In order to compute an accurate eigenvector,
+*> LAMBDA should be a good approximation to an eigenvalue
+*> of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal matrix
+*> L, in elements 1 to N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] LD
+*> \verbatim
+*> LD is DOUBLE PRECISION array, dimension (N-1)
+*> The n-1 elements L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] LLD
+*> \verbatim
+*> LLD is DOUBLE PRECISION array, dimension (N-1)
+*> The n-1 elements L(i)*L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] GAPTOL
+*> \verbatim
+*> GAPTOL is DOUBLE PRECISION
+*> Tolerance that indicates when eigenvector entries are negligible
+*> w.r.t. their contribution to the residual.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (N)
+*> On input, all entries of Z must be set to 0.
+*> On output, Z contains the (scaled) r-th column of the
+*> inverse. The scaling is such that Z(R) equals 1.
+*> \endverbatim
+*>
+*> \param[in] WANTNC
+*> \verbatim
+*> WANTNC is LOGICAL
+*> Specifies whether NEGCNT has to be computed.
+*> \endverbatim
+*>
+*> \param[out] NEGCNT
+*> \verbatim
+*> NEGCNT is INTEGER
+*> If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin
+*> in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] ZTZ
+*> \verbatim
+*> ZTZ is DOUBLE PRECISION
+*> The square of the 2-norm of Z.
+*> \endverbatim
+*>
+*> \param[out] MINGMA
+*> \verbatim
+*> MINGMA is DOUBLE PRECISION
+*> The reciprocal of the largest (in magnitude) diagonal
+*> element of the inverse of L D L**T - sigma I.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is INTEGER
+*> The twist index for the twisted factorization used to
+*> compute Z.
+*> On input, 0 <= R <= N. If R is input as 0, R is set to
+*> the index where (L D L**T - sigma I)^{-1} is largest
+*> in magnitude. If 1 <= R <= N, R is unchanged.
+*> On output, R contains the twist index used to compute Z.
+*> Ideally, R designates the position of the maximum entry in the
+*> eigenvector.
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension (2)
+*> The support of the vector in Z, i.e., the vector Z is
+*> nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).
+*> \endverbatim
+*>
+*> \param[out] NRMINV
+*> \verbatim
+*> NRMINV is DOUBLE PRECISION
+*> NRMINV = 1/SQRT( ZTZ )
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The residual of the FP vector.
+*> RESID = ABS( MINGMA )/SQRT( ZTZ )
+*> \endverbatim
+*>
+*> \param[out] RQCORR
+*> \verbatim
+*> RQCORR is DOUBLE PRECISION
+*> The Rayleigh Quotient correction to LAMBDA.
+*> RQCORR = MINGMA*TMP
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
$ PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
$ R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
@@ -5,7 +231,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTNC
@@ -20,118 +246,6 @@
DOUBLE PRECISION Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAR1V computes the (scaled) r-th column of the inverse of
-* the sumbmatrix in rows B1 through BN of the tridiagonal matrix
-* L D L**T - sigma I. When sigma is close to an eigenvalue, the
-* computed vector is an accurate eigenvector. Usually, r corresponds
-* to the index where the eigenvector is largest in magnitude.
-* The following steps accomplish this computation :
-* (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
-* (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
-* (c) Computation of the diagonal elements of the inverse of
-* L D L**T - sigma I by combining the above transforms, and choosing
-* r as the index where the diagonal of the inverse is (one of the)
-* largest in magnitude.
-* (d) Computation of the (scaled) r-th column of the inverse using the
-* twisted factorization obtained by combining the top part of the
-* the stationary and the bottom part of the progressive transform.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix L D L**T.
-*
-* B1 (input) INTEGER
-* First index of the submatrix of L D L**T.
-*
-* BN (input) INTEGER
-* Last index of the submatrix of L D L**T.
-*
-* LAMBDA (input) DOUBLE PRECISION
-* The shift. In order to compute an accurate eigenvector,
-* LAMBDA should be a good approximation to an eigenvalue
-* of L D L**T.
-*
-* L (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal matrix
-* L, in elements 1 to N-1.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D.
-*
-* LD (input) DOUBLE PRECISION array, dimension (N-1)
-* The n-1 elements L(i)*D(i).
-*
-* LLD (input) DOUBLE PRECISION array, dimension (N-1)
-* The n-1 elements L(i)*L(i)*D(i).
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot in the Sturm sequence.
-*
-* GAPTOL (input) DOUBLE PRECISION
-* Tolerance that indicates when eigenvector entries are negligible
-* w.r.t. their contribution to the residual.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (N)
-* On input, all entries of Z must be set to 0.
-* On output, Z contains the (scaled) r-th column of the
-* inverse. The scaling is such that Z(R) equals 1.
-*
-* WANTNC (input) LOGICAL
-* Specifies whether NEGCNT has to be computed.
-*
-* NEGCNT (output) INTEGER
-* If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin
-* in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.
-*
-* ZTZ (output) DOUBLE PRECISION
-* The square of the 2-norm of Z.
-*
-* MINGMA (output) DOUBLE PRECISION
-* The reciprocal of the largest (in magnitude) diagonal
-* element of the inverse of L D L**T - sigma I.
-*
-* R (input/output) INTEGER
-* The twist index for the twisted factorization used to
-* compute Z.
-* On input, 0 <= R <= N. If R is input as 0, R is set to
-* the index where (L D L**T - sigma I)^{-1} is largest
-* in magnitude. If 1 <= R <= N, R is unchanged.
-* On output, R contains the twist index used to compute Z.
-* Ideally, R designates the position of the maximum entry in the
-* eigenvector.
-*
-* ISUPPZ (output) INTEGER array, dimension (2)
-* The support of the vector in Z, i.e., the vector Z is
-* nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).
-*
-* NRMINV (output) DOUBLE PRECISION
-* NRMINV = 1/SQRT( ZTZ )
-*
-* RESID (output) DOUBLE PRECISION
-* The residual of the FP vector.
-* RESID = ABS( MINGMA )/SQRT( ZTZ )
-*
-* RQCORR (output) DOUBLE PRECISION
-* The Rayleigh Quotient correction to LAMBDA.
-* RQCORR = MINGMA*TMP
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlar2v.f b/SRC/dlar2v.f
index 3ead67d2..03ab2ef4 100644
--- a/SRC/dlar2v.f
+++ b/SRC/dlar2v.f
@@ -1,56 +1,118 @@
- SUBROUTINE DLAR2V( N, X, Y, Z, INCX, C, S, INCC )
+*> \brief \b DLAR2V
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( * ), S( * ), X( * ), Y( * ), Z( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAR2V( N, X, Y, Z, INCX, C, S, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), S( * ), X( * ), Y( * ), Z( * )
+* ..
+*
* Purpose
* =======
*
-* DLAR2V applies a vector of real plane rotations from both sides to
-* a sequence of 2-by-2 real symmetric matrices, defined by the elements
-* of the vectors x, y and z. For i = 1,2,...,n
-*
-* ( x(i) z(i) ) := ( c(i) s(i) ) ( x(i) z(i) ) ( c(i) -s(i) )
-* ( z(i) y(i) ) ( -s(i) c(i) ) ( z(i) y(i) ) ( s(i) c(i) )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAR2V applies a vector of real plane rotations from both sides to
+*> a sequence of 2-by-2 real symmetric matrices, defined by the elements
+*> of the vectors x, y and z. For i = 1,2,...,n
+*>
+*> ( x(i) z(i) ) := ( c(i) s(i) ) ( x(i) z(i) ) ( c(i) -s(i) )
+*> ( z(i) y(i) ) ( -s(i) c(i) ) ( z(i) y(i) ) ( s(i) c(i) )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be applied.
-*
-* X (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCX)
-* The vector x.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be applied.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCX)
+*> The vector x.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCX)
+*> The vector y.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCX)
+*> The vector z.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X, Y and Z. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
+*> The sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C and S. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Y (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCX)
-* The vector y.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Z (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCX)
-* The vector z.
+*> \date November 2011
*
-* INCX (input) INTEGER
-* The increment between elements of X, Y and Z. INCX > 0.
+*> \ingroup doubleOTHERauxiliary
*
-* C (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* =====================================================================
+ SUBROUTINE DLAR2V( N, X, Y, Z, INCX, C, S, INCC )
*
-* S (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
-* The sines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C and S. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( * ), S( * ), X( * ), Y( * ), Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarf.f b/SRC/dlarf.f
index 0d9278c9..c6468ea0 100644
--- a/SRC/dlarf.f
+++ b/SRC/dlarf.f
@@ -1,10 +1,125 @@
+*> \brief \b DLARF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, LDC, M, N
+* DOUBLE PRECISION TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARF applies a real elementary reflector H to a real m by n matrix
+*> C, from either the left or the right. H is represented in the form
+*>
+*> H = I - tau * v * v**T
+*>
+*> where tau is a real scalar and v is a real vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension
+*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*> or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*> The vector v in the representation of H. V is not used if
+*> TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE
@@ -15,55 +130,6 @@
DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLARF applies a real elementary reflector H to a real m by n matrix
-* C, from either the left or the right. H is represented in the form
-*
-* H = I - tau * v * v**T
-*
-* where tau is a real scalar and v is a real vector.
-*
-* If tau = 0, then H is taken to be the unit matrix.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) DOUBLE PRECISION array, dimension
-* (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-* or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-* The vector v in the representation of H. V is not used if
-* TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0.
-*
-* TAU (input) DOUBLE PRECISION
-* The value tau in the representation of H.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarfb.f b/SRC/dlarfb.f
index 3338bbf6..03e64216 100644
--- a/SRC/dlarfb.f
+++ b/SRC/dlarfb.f
@@ -1,117 +1,179 @@
- SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
- $ T, LDT, C, LDC, WORK, LDWORK )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, SIDE, STOREV, TRANS
- INTEGER K, LDC, LDT, LDV, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ),
- $ WORK( LDWORK, * )
-* ..
-*
+*> \brief \b DLARFB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+* T, LDT, C, LDC, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* DLARFB applies a real block reflector H or its transpose H**T to a
-* real m by n matrix C, from either the left or the right.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARFB applies a real block reflector H or its transpose H**T to a
+*> real m by n matrix C, from either the left or the right.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**T from the Left
-* = 'R': apply H or H**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'T': apply H**T (Transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columnwise
-* = 'R': Rowwise
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* K (input) INTEGER
-* The order of the matrix T (= the number of elementary
-* reflectors whose product defines the block reflector).
-*
-* V (input) DOUBLE PRECISION array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,M) if STOREV = 'R' and SIDE = 'L'
-* (LDV,N) if STOREV = 'R' and SIDE = 'R'
-* The matrix V. See Further Details.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-* if STOREV = 'R', LDV >= K.
-*
-* T (input) DOUBLE PRECISION array, dimension (LDT,K)
-* The triangular k by k matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**T from the Left
+*> = 'R': apply H or H**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'T': apply H**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columnwise
+*> = 'R': Rowwise
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T (= the number of elementary
+*> reflectors whose product defines the block reflector).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,K)
+*> \ingroup doubleOTHERauxiliary
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= max(1,N);
-* if SIDE = 'R', LDWORK >= max(1,M).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* The matrix V. See Further Details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*> if STOREV = 'R', LDV >= K.
+*>
+*> T (input) DOUBLE PRECISION array, dimension (LDT,K)
+*> The triangular k by k matrix T in the representation of the
+*> block reflector.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*> C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
+*>
+*> LDC (input) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,K)
+*>
+*> LDWORK (input) INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= max(1,N);
+*> if SIDE = 'R', LDWORK >= max(1,M).
+*>
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
+*> ( v1 1 ) ( 1 v2 v2 v2 )
+*> ( v1 v2 1 ) ( 1 v3 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
+*> ( v1 v2 v3 ) ( v2 v2 v2 1 )
+*> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
+*> ( 1 v3 )
+*> ( 1 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+ $ T, LDT, C, LDC, WORK, LDWORK )
*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
-* ( v1 1 ) ( 1 v2 v2 v2 )
-* ( v1 v2 1 ) ( 1 v3 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* V = ( v1 v2 v3 ) V = ( v1 v1 1 )
-* ( v1 v2 v3 ) ( v2 v2 v2 1 )
-* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
-* ( 1 v3 )
-* ( 1 )
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, SIDE, STOREV, TRANS
+ INTEGER K, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarfg.f b/SRC/dlarfg.f
index a4221e79..fdb1d55e 100644
--- a/SRC/dlarfg.f
+++ b/SRC/dlarfg.f
@@ -1,9 +1,107 @@
+*> \brief \b DLARFG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* DOUBLE PRECISION ALPHA, TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARFG generates a real elementary reflector H of order n, such
+*> that
+*>
+*> H * ( alpha ) = ( beta ), H**T * H = I.
+*> ( x ) ( 0 )
+*>
+*> where alpha and beta are scalars, and x is an (n-1)-element real
+*> vector. H is represented in the form
+*>
+*> H = I - tau * ( 1 ) * ( 1 v**T ) ,
+*> ( v )
+*>
+*> where tau is a real scalar and v is a real (n-1)-element
+*> vector.
+*>
+*> If the elements of x are all zero, then tau = 0 and H is taken to be
+*> the unit matrix.
+*>
+*> Otherwise 1 <= tau <= 2.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the elementary reflector.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, the value alpha.
+*> On exit, it is overwritten with the value beta.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension
+*> (1+(N-2)*abs(INCX))
+*> On entry, the vector x.
+*> On exit, it is overwritten with the vector v.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> The value tau.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,50 +111,6 @@
DOUBLE PRECISION X( * )
* ..
*
-* Purpose
-* =======
-*
-* DLARFG generates a real elementary reflector H of order n, such
-* that
-*
-* H * ( alpha ) = ( beta ), H**T * H = I.
-* ( x ) ( 0 )
-*
-* where alpha and beta are scalars, and x is an (n-1)-element real
-* vector. H is represented in the form
-*
-* H = I - tau * ( 1 ) * ( 1 v**T ) ,
-* ( v )
-*
-* where tau is a real scalar and v is a real (n-1)-element
-* vector.
-*
-* If the elements of x are all zero, then tau = 0 and H is taken to be
-* the unit matrix.
-*
-* Otherwise 1 <= tau <= 2.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the elementary reflector.
-*
-* ALPHA (input/output) DOUBLE PRECISION
-* On entry, the value alpha.
-* On exit, it is overwritten with the value beta.
-*
-* X (input/output) DOUBLE PRECISION array, dimension
-* (1+(N-2)*abs(INCX))
-* On entry, the vector x.
-* On exit, it is overwritten with the vector v.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
-*
-* TAU (output) DOUBLE PRECISION
-* The value tau.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarfgp.f b/SRC/dlarfgp.f
index 54c63e47..30bd57ec 100644
--- a/SRC/dlarfgp.f
+++ b/SRC/dlarfgp.f
@@ -1,9 +1,105 @@
+*> \brief \b DLARFGP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARFGP( N, ALPHA, X, INCX, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* DOUBLE PRECISION ALPHA, TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARFGP generates a real elementary reflector H of order n, such
+*> that
+*>
+*> H * ( alpha ) = ( beta ), H**T * H = I.
+*> ( x ) ( 0 )
+*>
+*> where alpha and beta are scalars, beta is non-negative, and x is
+*> an (n-1)-element real vector. H is represented in the form
+*>
+*> H = I - tau * ( 1 ) * ( 1 v**T ) ,
+*> ( v )
+*>
+*> where tau is a real scalar and v is a real (n-1)-element
+*> vector.
+*>
+*> If the elements of x are all zero, then tau = 0 and H is taken to be
+*> the unit matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the elementary reflector.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, the value alpha.
+*> On exit, it is overwritten with the value beta.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension
+*> (1+(N-2)*abs(INCX))
+*> On entry, the vector x.
+*> On exit, it is overwritten with the vector v.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> The value tau.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLARFGP( N, ALPHA, X, INCX, TAU )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,48 +109,6 @@
DOUBLE PRECISION X( * )
* ..
*
-* Purpose
-* =======
-*
-* DLARFGP generates a real elementary reflector H of order n, such
-* that
-*
-* H * ( alpha ) = ( beta ), H**T * H = I.
-* ( x ) ( 0 )
-*
-* where alpha and beta are scalars, beta is non-negative, and x is
-* an (n-1)-element real vector. H is represented in the form
-*
-* H = I - tau * ( 1 ) * ( 1 v**T ) ,
-* ( v )
-*
-* where tau is a real scalar and v is a real (n-1)-element
-* vector.
-*
-* If the elements of x are all zero, then tau = 0 and H is taken to be
-* the unit matrix.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the elementary reflector.
-*
-* ALPHA (input/output) DOUBLE PRECISION
-* On entry, the value alpha.
-* On exit, it is overwritten with the value beta.
-*
-* X (input/output) DOUBLE PRECISION array, dimension
-* (1+(N-2)*abs(INCX))
-* On entry, the vector x.
-* On exit, it is overwritten with the vector v.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
-*
-* TAU (output) DOUBLE PRECISION
-* The value tau.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarft.f b/SRC/dlarft.f
index bbfa9c78..c5603cd1 100644
--- a/SRC/dlarft.f
+++ b/SRC/dlarft.f
@@ -1,106 +1,150 @@
- SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, STOREV
- INTEGER K, LDT, LDV, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * )
-* ..
-*
+*> \brief \b DLARFT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, STOREV
+* INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* DLARFT forms the triangular factor T of a real block reflector H
-* of order n, which is defined as a product of k elementary reflectors.
-*
-* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*
-* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
-*
-* If STOREV = 'C', the vector which defines the elementary reflector
-* H(i) is stored in the i-th column of the array V, and
-*
-* H = I - V * T * V**T
-*
-* If STOREV = 'R', the vector which defines the elementary reflector
-* H(i) is stored in the i-th row of the array V, and
-*
-* H = I - V**T * T * V
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARFT forms the triangular factor T of a real block reflector H
+*> of order n, which is defined as a product of k elementary reflectors.
+*>
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
+*>
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*>
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
+*>
+*> H = I - V * T * V**T
+*>
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
+*>
+*> H = I - V**T * T * V
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIRECT (input) CHARACTER*1
-* Specifies the order in which the elementary reflectors are
-* multiplied to form the block reflector:
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Specifies how the vectors which define the elementary
-* reflectors are stored (see also Further Details):
-* = 'C': columnwise
-* = 'R': rowwise
-*
-* N (input) INTEGER
-* The order of the block reflector H. N >= 0.
-*
-* K (input) INTEGER
-* The order of the triangular factor T (= the number of
-* elementary reflectors). K >= 1.
-*
-* V (input/output) DOUBLE PRECISION array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,N) if STOREV = 'R'
-* The matrix V. See further details.
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies the order in which the elementary reflectors are
+*> multiplied to form the block reflector:
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i).
+*> \date November 2011
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,K)
-* The k by k triangular factor T of the block reflector.
-* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-* lower triangular. The rest of the array is not used.
+*> \ingroup doubleOTHERauxiliary
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors are stored (see also Further Details):
+*> = 'C': columnwise
+*> = 'R': rowwise
+*>
+*> N (input) INTEGER
+*> The order of the block reflector H. N >= 0.
+*>
+*> K (input) INTEGER
+*> The order of the triangular factor T (= the number of
+*> elementary reflectors). K >= 1.
+*>
+*> V (input/output) DOUBLE PRECISION array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,N) if STOREV = 'R'
+*> The matrix V. See further details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>
+*> TAU (input) DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i).
+*>
+*> T (output) DOUBLE PRECISION array, dimension (LDT,K)
+*> The k by k triangular factor T of the block reflector.
+*> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*> lower triangular. The rest of the array is not used.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
+*> ( v1 1 ) ( 1 v2 v2 v2 )
+*> ( v1 v2 1 ) ( 1 v3 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
+*> ( v1 v2 v3 ) ( v2 v2 v2 1 )
+*> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
+*> ( 1 v3 )
+*> ( 1 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
-* ( v1 1 ) ( 1 v2 v2 v2 )
-* ( v1 v2 1 ) ( 1 v3 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* V = ( v1 v2 v3 ) V = ( v1 v1 1 )
-* ( v1 v2 v3 ) ( v2 v2 v2 1 )
-* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
-* ( 1 v3 )
-* ( 1 )
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, STOREV
+ INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarfx.f b/SRC/dlarfx.f
index ce3e7d2e..65d51388 100644
--- a/SRC/dlarfx.f
+++ b/SRC/dlarfx.f
@@ -1,10 +1,121 @@
+*> \brief \b DLARFX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER LDC, M, N
+* DOUBLE PRECISION TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARFX applies a real elementary reflector H to a real m by n
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*> H = I - tau * v * v**T
+*>
+*> where tau is a real scalar and v is a real vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix
+*>
+*> This version uses inline code if H has order < 11.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (M) if SIDE = 'L'
+*> or (N) if SIDE = 'R'
+*> The vector v in the representation of H.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDA >= (1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> WORK is not referenced if H has order < 11.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE
@@ -15,54 +126,6 @@
DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLARFX applies a real elementary reflector H to a real m by n
-* matrix C, from either the left or the right. H is represented in the
-* form
-*
-* H = I - tau * v * v**T
-*
-* where tau is a real scalar and v is a real vector.
-*
-* If tau = 0, then H is taken to be the unit matrix
-*
-* This version uses inline code if H has order < 11.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) DOUBLE PRECISION array, dimension (M) if SIDE = 'L'
-* or (N) if SIDE = 'R'
-* The vector v in the representation of H.
-*
-* TAU (input) DOUBLE PRECISION
-* The value tau in the representation of H.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDA >= (1,M).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
-* WORK is not referenced if H has order < 11.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlargv.f b/SRC/dlargv.f
index 84293261..dd962dc2 100644
--- a/SRC/dlargv.f
+++ b/SRC/dlargv.f
@@ -1,53 +1,112 @@
- SUBROUTINE DLARGV( N, X, INCX, Y, INCY, C, INCC )
+*> \brief \b DLARGV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, INCY, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( * ), X( * ), Y( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLARGV( N, X, INCX, Y, INCY, C, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* DLARGV generates a vector of real plane rotations, determined by
-* elements of the real vectors x and y. For i = 1,2,...,n
-*
-* ( c(i) s(i) ) ( x(i) ) = ( a(i) )
-* ( -s(i) c(i) ) ( y(i) ) = ( 0 )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARGV generates a vector of real plane rotations, determined by
+*> elements of the real vectors x and y. For i = 1,2,...,n
+*>
+*> ( c(i) s(i) ) ( x(i) ) = ( a(i) )
+*> ( -s(i) c(i) ) ( y(i) ) = ( 0 )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be generated.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be generated.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCX)
+*> On entry, the vector x.
+*> On exit, x(i) is overwritten by a(i), for i = 1,...,n.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCY)
+*> On entry, the vector y.
+*> On exit, the sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCX)
-* On entry, the vector x.
-* On exit, x(i) is overwritten by a(i), for i = 1,...,n.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
+*> \date November 2011
*
-* Y (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCY)
-* On entry, the vector y.
-* On exit, the sines of the plane rotations.
+*> \ingroup doubleOTHERauxiliary
*
-* INCY (input) INTEGER
-* The increment between elements of Y. INCY > 0.
+* =====================================================================
+ SUBROUTINE DLARGV( N, X, INCX, Y, INCY, C, INCC )
*
-* C (output) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarnv.f b/SRC/dlarnv.f
index c8b421c2..97233fca 100644
--- a/SRC/dlarnv.f
+++ b/SRC/dlarnv.f
@@ -1,52 +1,108 @@
- SUBROUTINE DLARNV( IDIST, ISEED, N, X )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IDIST, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION X( * )
-* ..
-*
+*> \brief \b DLARNV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARNV( IDIST, ISEED, N, X )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION X( * )
+* ..
+*
* Purpose
* =======
*
-* DLARNV returns a vector of n random real numbers from a uniform or
-* normal distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARNV returns a vector of n random real numbers from a uniform or
+*> normal distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IDIST (input) INTEGER
-* Specifies the distribution of the random numbers:
-* = 1: uniform (0,1)
-* = 2: uniform (-1,1)
-* = 3: normal (0,1)
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the distribution of the random numbers:
+*> = 1: uniform (0,1)
+*> = 2: uniform (-1,1)
+*> = 3: normal (0,1)
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of random numbers to be generated.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> The generated random numbers.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of random numbers to be generated.
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
*
-* X (output) DOUBLE PRECISION array, dimension (N)
-* The generated random numbers.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine calls the auxiliary routine DLARUV to generate random
+*> real numbers from a uniform (0,1) distribution, in batches of up to
+*> 128 using vectorisable code. The Box-Muller method is used to
+*> transform numbers from a uniform to a normal distribution.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARNV( IDIST, ISEED, N, X )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine calls the auxiliary routine DLARUV to generate random
-* real numbers from a uniform (0,1) distribution, in batches of up to
-* 128 using vectorisable code. The Box-Muller method is used to
-* transform numbers from a uniform to a normal distribution.
+* .. Scalar Arguments ..
+ INTEGER IDIST, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarra.f b/SRC/dlarra.f
index 3407d088..c9b30000 100644
--- a/SRC/dlarra.f
+++ b/SRC/dlarra.f
@@ -1,80 +1,152 @@
- SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM,
- $ NSPLIT, ISPLIT, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N, NSPLIT
- DOUBLE PRECISION SPLTOL, TNRM
-* ..
-* .. Array Arguments ..
- INTEGER ISPLIT( * )
- DOUBLE PRECISION D( * ), E( * ), E2( * )
-* ..
-*
+*> \brief \b DLARRA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM,
+* NSPLIT, ISPLIT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N, NSPLIT
+* DOUBLE PRECISION SPLTOL, TNRM
+* ..
+* .. Array Arguments ..
+* INTEGER ISPLIT( * )
+* DOUBLE PRECISION D( * ), E( * ), E2( * )
+* ..
+*
* Purpose
* =======
*
-* Compute the splitting points with threshold SPLTOL.
-* DLARRA sets any "small" off-diagonal elements to zero.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute the splitting points with threshold SPLTOL.
+*> DLARRA sets any "small" off-diagonal elements to zero.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N > 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal
-* matrix T.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the first (N-1) entries contain the subdiagonal
-* elements of the tridiagonal matrix T; E(N) need not be set.
-* On exit, the entries E( ISPLIT( I ) ), 1 <= I <= NSPLIT,
-* are set to zero, the other entries of E are untouched.
-*
-* E2 (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the first (N-1) entries contain the SQUARES of the
-* subdiagonal elements of the tridiagonal matrix T;
-* E2(N) need not be set.
-* On exit, the entries E2( ISPLIT( I ) ),
-* 1 <= I <= NSPLIT, have been set to zero
-*
-* SPLTOL (input) DOUBLE PRECISION
-* The threshold for splitting. Two criteria can be used:
-* SPLTOL<0 : criterion based on absolute off-diagonal value
-* SPLTOL>0 : criterion that preserves relative accuracy
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N > 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal
+*> matrix T.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> On entry, the first (N-1) entries contain the subdiagonal
+*> elements of the tridiagonal matrix T; E(N) need not be set.
+*> On exit, the entries E( ISPLIT( I ) ), 1 <= I <= NSPLIT,
+*> are set to zero, the other entries of E are untouched.
+*> \endverbatim
+*>
+*> \param[in,out] E2
+*> \verbatim
+*> E2 is DOUBLE PRECISION array, dimension (N)
+*> On entry, the first (N-1) entries contain the SQUARES of the
+*> subdiagonal elements of the tridiagonal matrix T;
+*> E2(N) need not be set.
+*> On exit, the entries E2( ISPLIT( I ) ),
+*> 1 <= I <= NSPLIT, have been set to zero
+*> \endverbatim
+*>
+*> \param[in] SPLTOL
+*> \verbatim
+*> SPLTOL is DOUBLE PRECISION
+*> The threshold for splitting. Two criteria can be used:
+*> SPLTOL<0 : criterion based on absolute off-diagonal value
+*> SPLTOL>0 : criterion that preserves relative accuracy
+*> \endverbatim
+*>
+*> \param[in] TNRM
+*> \verbatim
+*> TNRM is DOUBLE PRECISION
+*> The norm of the matrix.
+*> \endverbatim
+*>
+*> \param[out] NSPLIT
+*> \verbatim
+*> NSPLIT is INTEGER
+*> The number of blocks T splits into. 1 <= NSPLIT <= N.
+*> \endverbatim
+*>
+*> \param[out] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into blocks.
+*> The first block consists of rows/columns 1 to ISPLIT(1),
+*> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
+*> etc., and the NSPLIT-th consists of rows/columns
+*> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TNRM (input) DOUBLE PRECISION
-* The norm of the matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NSPLIT (output) INTEGER
-* The number of blocks T splits into. 1 <= NSPLIT <= N.
+*> \date November 2011
*
-* ISPLIT (output) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into blocks.
-* The first block consists of rows/columns 1 to ISPLIT(1),
-* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
-* etc., and the NSPLIT-th consists of rows/columns
-* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM,
+ $ NSPLIT, ISPLIT, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER INFO, N, NSPLIT
+ DOUBLE PRECISION SPLTOL, TNRM
+* ..
+* .. Array Arguments ..
+ INTEGER ISPLIT( * )
+ DOUBLE PRECISION D( * ), E( * ), E2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarrb.f b/SRC/dlarrb.f
index e4d00d90..69b4f899 100644
--- a/SRC/dlarrb.f
+++ b/SRC/dlarrb.f
@@ -1,3 +1,195 @@
+*> \brief \b DLARRB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
+* RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
+* PIVMIN, SPDIAM, TWIST, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IFIRST, ILAST, INFO, N, OFFSET, TWIST
+* DOUBLE PRECISION PIVMIN, RTOL1, RTOL2, SPDIAM
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), LLD( * ), W( * ),
+* $ WERR( * ), WGAP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given the relatively robust representation(RRR) L D L^T, DLARRB
+*> does "limited" bisection to refine the eigenvalues of L D L^T,
+*> W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial
+*> guesses for these eigenvalues are input in W, the corresponding estimate
+*> of the error in these guesses and their gaps are input in WERR
+*> and WGAP, respectively. During bisection, intervals
+*> [left, right] are maintained by storing their mid-points and
+*> semi-widths in the arrays W and WERR respectively.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The N diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] LLD
+*> \verbatim
+*> LLD is DOUBLE PRECISION array, dimension (N-1)
+*> The (N-1) elements L(i)*L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] IFIRST
+*> \verbatim
+*> IFIRST is INTEGER
+*> The index of the first eigenvalue to be computed.
+*> \endverbatim
+*>
+*> \param[in] ILAST
+*> \verbatim
+*> ILAST is INTEGER
+*> The index of the last eigenvalue to be computed.
+*> \endverbatim
+*>
+*> \param[in] RTOL1
+*> \verbatim
+*> RTOL1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] RTOL2
+*> \verbatim
+*> RTOL2 is DOUBLE PRECISION
+*> Tolerance for the convergence of the bisection intervals.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> where GAP is the (estimated) distance to the nearest
+*> eigenvalue.
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> Offset for the arrays W, WGAP and WERR, i.e., the IFIRST-OFFSET
+*> through ILAST-OFFSET elements of these arrays are to be used.
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
+*> estimates of the eigenvalues of L D L^T indexed IFIRST throug
+*> ILAST.
+*> On output, these estimates are refined.
+*> \endverbatim
+*>
+*> \param[in,out] WGAP
+*> \verbatim
+*> WGAP is DOUBLE PRECISION array, dimension (N-1)
+*> On input, the (estimated) gaps between consecutive
+*> eigenvalues of L D L^T, i.e., WGAP(I-OFFSET) is the gap between
+*> eigenvalues I and I+1. Note that if IFIRST.EQ.ILAST
+*> then WGAP(IFIRST-OFFSET) must be set to ZERO.
+*> On output, these gaps are refined.
+*> \endverbatim
+*>
+*> \param[in,out] WERR
+*> \verbatim
+*> WERR is DOUBLE PRECISION array, dimension (N)
+*> On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are
+*> the errors in the estimates of the corresponding elements in W.
+*> On output, these errors are refined.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] SPDIAM
+*> \verbatim
+*> SPDIAM is DOUBLE PRECISION
+*> The spectral diameter of the matrix.
+*> \endverbatim
+*>
+*> \param[in] TWIST
+*> \verbatim
+*> TWIST is INTEGER
+*> The twist index for the twisted factorization that is used
+*> for the negcount.
+*> TWIST = N: Compute negcount from L D L^T - LAMBDA I = L+ D+ L+^T
+*> TWIST = 1: Compute negcount from L D L^T - LAMBDA I = U- D- U-^T
+*> TWIST = R: Compute negcount from L D L^T - LAMBDA I = N(r) D(r) N(r)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error flag.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
$ RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
$ PIVMIN, SPDIAM, TWIST, INFO )
@@ -5,7 +197,7 @@
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IFIRST, ILAST, INFO, N, OFFSET, TWIST
@@ -17,99 +209,6 @@
$ WERR( * ), WGAP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* Given the relatively robust representation(RRR) L D L^T, DLARRB
-* does "limited" bisection to refine the eigenvalues of L D L^T,
-* W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial
-* guesses for these eigenvalues are input in W, the corresponding estimate
-* of the error in these guesses and their gaps are input in WERR
-* and WGAP, respectively. During bisection, intervals
-* [left, right] are maintained by storing their mid-points and
-* semi-widths in the arrays W and WERR respectively.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The N diagonal elements of the diagonal matrix D.
-*
-* LLD (input) DOUBLE PRECISION array, dimension (N-1)
-* The (N-1) elements L(i)*L(i)*D(i).
-*
-* IFIRST (input) INTEGER
-* The index of the first eigenvalue to be computed.
-*
-* ILAST (input) INTEGER
-* The index of the last eigenvalue to be computed.
-*
-* RTOL1 (input) DOUBLE PRECISION
-*
-* RTOL2 (input) DOUBLE PRECISION
-* Tolerance for the convergence of the bisection intervals.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
-* where GAP is the (estimated) distance to the nearest
-* eigenvalue.
-*
-* OFFSET (input) INTEGER
-* Offset for the arrays W, WGAP and WERR, i.e., the IFIRST-OFFSET
-* through ILAST-OFFSET elements of these arrays are to be used.
-*
-* W (input/output) DOUBLE PRECISION array, dimension (N)
-* On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
-* estimates of the eigenvalues of L D L^T indexed IFIRST throug
-* ILAST.
-* On output, these estimates are refined.
-*
-* WGAP (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On input, the (estimated) gaps between consecutive
-* eigenvalues of L D L^T, i.e., WGAP(I-OFFSET) is the gap between
-* eigenvalues I and I+1. Note that if IFIRST.EQ.ILAST
-* then WGAP(IFIRST-OFFSET) must be set to ZERO.
-* On output, these gaps are refined.
-*
-* WERR (input/output) DOUBLE PRECISION array, dimension (N)
-* On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are
-* the errors in the estimates of the corresponding elements in W.
-* On output, these errors are refined.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-* Workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (2*N)
-* Workspace.
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot in the Sturm sequence.
-*
-* SPDIAM (input) DOUBLE PRECISION
-* The spectral diameter of the matrix.
-*
-* TWIST (input) INTEGER
-* The twist index for the twisted factorization that is used
-* for the negcount.
-* TWIST = N: Compute negcount from L D L^T - LAMBDA I = L+ D+ L+^T
-* TWIST = 1: Compute negcount from L D L^T - LAMBDA I = U- D- U-^T
-* TWIST = R: Compute negcount from L D L^T - LAMBDA I = N(r) D(r) N(r)
-*
-* INFO (output) INTEGER
-* Error flag.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarrc.f b/SRC/dlarrc.f
index 933fddc5..4f013584 100644
--- a/SRC/dlarrc.f
+++ b/SRC/dlarrc.f
@@ -1,73 +1,152 @@
- SUBROUTINE DLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
- $ EIGCNT, LCNT, RCNT, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOBT
- INTEGER EIGCNT, INFO, LCNT, N, RCNT
- DOUBLE PRECISION PIVMIN, VL, VU
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
-* ..
-*
+*> \brief \b DLARRC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
+* EIGCNT, LCNT, RCNT, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBT
+* INTEGER EIGCNT, INFO, LCNT, N, RCNT
+* DOUBLE PRECISION PIVMIN, VL, VU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* ..
+*
* Purpose
* =======
*
-* Find the number of eigenvalues of the symmetric tridiagonal matrix T
-* that are in the interval (VL,VU] if JOBT = 'T', and of L D L^T
-* if JOBT = 'L'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Find the number of eigenvalues of the symmetric tridiagonal matrix T
+*> that are in the interval (VL,VU] if JOBT = 'T', and of L D L^T
+*> if JOBT = 'L'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOBT (input) CHARACTER*1
-* = 'T': Compute Sturm count for matrix T.
-* = 'L': Compute Sturm count for matrix L D L^T.
-*
-* N (input) INTEGER
-* The order of the matrix. N > 0.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* The lower and upper bounds for the eigenvalues.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* JOBT = 'T': The N diagonal elements of the tridiagonal matrix T.
-* JOBT = 'L': The N diagonal elements of the diagonal matrix D.
-*
-* E (input) DOUBLE PRECISION array, dimension (N)
-* JOBT = 'T': The N-1 offdiagonal elements of the matrix T.
-* JOBT = 'L': The N-1 offdiagonal elements of the matrix L.
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot in the Sturm sequence for T.
+*> \param[in] JOBT
+*> \verbatim
+*> JOBT is CHARACTER*1
+*> = 'T': Compute Sturm count for matrix T.
+*> = 'L': Compute Sturm count for matrix L D L^T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N > 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> The lower and upper bounds for the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> JOBT = 'T': The N diagonal elements of the tridiagonal matrix T.
+*> JOBT = 'L': The N diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> JOBT = 'T': The N-1 offdiagonal elements of the matrix T.
+*> JOBT = 'L': The N-1 offdiagonal elements of the matrix L.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[out] EIGCNT
+*> \verbatim
+*> EIGCNT is INTEGER
+*> The number of eigenvalues of the symmetric tridiagonal matrix T
+*> that are in the interval (VL,VU]
+*> \endverbatim
+*>
+*> \param[out] LCNT
+*> \verbatim
+*> LCNT is INTEGER
+*> \endverbatim
+*>
+*> \param[out] RCNT
+*> \verbatim
+*> RCNT is INTEGER
+*> The left and right negcounts of the interval.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* EIGCNT (output) INTEGER
-* The number of eigenvalues of the symmetric tridiagonal matrix T
-* that are in the interval (VL,VU]
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LCNT (output) INTEGER
+*> \date November 2011
*
-* RCNT (output) INTEGER
-* The left and right negcounts of the interval.
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
+ $ EIGCNT, LCNT, RCNT, INFO )
*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER JOBT
+ INTEGER EIGCNT, INFO, LCNT, N, RCNT
+ DOUBLE PRECISION PIVMIN, VL, VU
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarrd.f b/SRC/dlarrd.f
index 46e8fc48..15a95bd3 100644
--- a/SRC/dlarrd.f
+++ b/SRC/dlarrd.f
@@ -1,12 +1,321 @@
+*> \brief \b DLARRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
+* RELTOL, D, E, E2, PIVMIN, NSPLIT, ISPLIT,
+* M, W, WERR, WL, WU, IBLOCK, INDEXW,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER ORDER, RANGE
+* INTEGER IL, INFO, IU, M, N, NSPLIT
+* DOUBLE PRECISION PIVMIN, RELTOL, VL, VU, WL, WU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), INDEXW( * ),
+* $ ISPLIT( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), E2( * ),
+* $ GERS( * ), W( * ), WERR( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARRD computes the eigenvalues of a symmetric tridiagonal
+*> matrix T to suitable accuracy. This is an auxiliary code to be
+*> called from DSTEMR.
+*> The user may ask for all eigenvalues, all eigenvalues
+*> in the half-open interval (VL, VU], or the IL-th through IU-th
+*> eigenvalues.
+*>
+*> To avoid overflow, the matrix must be scaled so that its
+*> largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest
+*> accuracy, it should not be much smaller than that.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': ("All") all eigenvalues will be found.
+*> = 'V': ("Value") all eigenvalues in the half-open interval
+*> (VL, VU] will be found.
+*> = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
+*> entire matrix) will be found.
+*> \endverbatim
+*>
+*> \param[in] ORDER
+*> \verbatim
+*> ORDER is CHARACTER*1
+*> = 'B': ("By Block") the eigenvalues will be grouped by
+*> split-off block (see IBLOCK, ISPLIT) and
+*> ordered from smallest to largest within
+*> the block.
+*> = 'E': ("Entire matrix")
+*> the eigenvalues for the entire matrix
+*> will be ordered from smallest to
+*> largest.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. Eigenvalues less than or equal
+*> to VL, or greater than VU, will not be returned. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] GERS
+*> \verbatim
+*> GERS is DOUBLE PRECISION array, dimension (2*N)
+*> The N Gerschgorin intervals (the i-th Gerschgorin interval
+*> is (GERS(2*i-1), GERS(2*i)).
+*> \endverbatim
+*>
+*> \param[in] RELTOL
+*> \verbatim
+*> RELTOL is DOUBLE PRECISION
+*> The minimum relative width of an interval. When an interval
+*> is narrower than RELTOL times the larger (in
+*> magnitude) endpoint, then it is considered to be
+*> sufficiently small, i.e., converged. Note: this should
+*> always be at least radix*machine epsilon.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E2
+*> \verbatim
+*> E2 is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot allowed in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[in] NSPLIT
+*> \verbatim
+*> NSPLIT is INTEGER
+*> The number of diagonal blocks in the matrix T.
+*> 1 <= NSPLIT <= N.
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into submatrices.
+*> The first submatrix consists of rows/columns 1 to ISPLIT(1),
+*> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
+*> etc., and the NSPLIT-th consists of rows/columns
+*> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> (Only the first NSPLIT elements will actually be used, but
+*> since the user cannot know a priori what value NSPLIT will
+*> have, N words must be reserved for ISPLIT.)
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The actual number of eigenvalues found. 0 <= M <= N.
+*> (See also the description of INFO=2,3.)
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On exit, the first M elements of W will contain the
+*> eigenvalue approximations. DLARRD computes an interval
+*> I_j = (a_j, b_j] that includes eigenvalue j. The eigenvalue
+*> approximation is given as the interval midpoint
+*> W(j)= ( a_j + b_j)/2. The corresponding error is bounded by
+*> WERR(j) = abs( a_j - b_j)/2
+*> \endverbatim
+*>
+*> \param[out] WERR
+*> \verbatim
+*> WERR is DOUBLE PRECISION array, dimension (N)
+*> The error bound on the corresponding eigenvalue approximation
+*> in W.
+*> \endverbatim
+*>
+*> \param[out] WL
+*> \verbatim
+*> WL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] WU
+*> \verbatim
+*> WU is DOUBLE PRECISION
+*> The interval (WL, WU] contains all the wanted eigenvalues.
+*> If RANGE='V', then WL=VL and WU=VU.
+*> If RANGE='A', then WL and WU are the global Gerschgorin bounds
+*> on the spectrum.
+*> If RANGE='I', then WL and WU are computed by DLAEBZ from the
+*> index range specified.
+*> \endverbatim
+*>
+*> \param[out] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> At each row/column j where E(j) is zero or small, the
+*> matrix T is considered to split into a block diagonal
+*> matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which
+*> block (from 1 to the number of blocks) the eigenvalue W(i)
+*> belongs. (DLARRD may use the remaining N-M elements as
+*> workspace.)
+*> \endverbatim
+*>
+*> \param[out] INDEXW
+*> \verbatim
+*> INDEXW is INTEGER array, dimension (N)
+*> The indices of the eigenvalues within each block (submatrix);
+*> for example, INDEXW(i)= j and IBLOCK(i)=k imply that the
+*> i-th eigenvalue W(i) is the j-th eigenvalue in block k.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: some or all of the eigenvalues failed to converge or
+*> were not computed:
+*> =1 or 3: Bisection failed to converge for some
+*> eigenvalues; these eigenvalues are flagged by a
+*> negative block number. The effect is that the
+*> eigenvalues may not be as accurate as the
+*> absolute and relative tolerances. This is
+*> generally caused by unexpectedly inaccurate
+*> arithmetic.
+*> =2 or 3: RANGE='I' only: Not all of the eigenvalues
+*> IL:IU were found.
+*> Effect: M < IU+1-IL
+*> Cause: non-monotonic arithmetic, causing the
+*> Sturm sequence to be non-monotonic.
+*> Cure: recalculate, using RANGE='A', and pick
+*> out eigenvalues IL:IU. In some cases,
+*> increasing the PARAMETER "FUDGE" may
+*> make things work.
+*> = 4: RANGE='I', and the Gershgorin interval
+*> initially used was too small. No eigenvalues
+*> were computed.
+*> Probable cause: your machine has sloppy
+*> floating-point arithmetic.
+*> Cure: Increase the PARAMETER "FUDGE",
+*> recompile, and try again.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> FUDGE DOUBLE PRECISION, default = 2
+*> A "fudge factor" to widen the Gershgorin intervals. Ideally,
+*> a value of 1 should work, but on machines with sloppy
+*> arithmetic, this needs to be larger. The default for
+*> publicly released versions should be large enough to handle
+*> the worst machine around. Note that this has no effect
+*> on accuracy of the solution.
+*> \endverbatim
+*> \verbatim
+*> Based on contributions by
+*> W. Kahan, University of California, Berkeley, USA
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
$ RELTOL, D, E, E2, PIVMIN, NSPLIT, ISPLIT,
$ M, W, WERR, WL, WU, IBLOCK, INDEXW,
$ WORK, IWORK, INFO )
*
-* -- LAPACK auxiliary routine (version 3.3.0) --
+* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER ORDER, RANGE
@@ -20,192 +329,6 @@
$ GERS( * ), W( * ), WERR( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLARRD computes the eigenvalues of a symmetric tridiagonal
-* matrix T to suitable accuracy. This is an auxiliary code to be
-* called from DSTEMR.
-* The user may ask for all eigenvalues, all eigenvalues
-* in the half-open interval (VL, VU], or the IL-th through IU-th
-* eigenvalues.
-*
-* To avoid overflow, the matrix must be scaled so that its
-* largest element is no greater than overflow**(1/2) *
-* underflow**(1/4) in absolute value, and for greatest
-* accuracy, it should not be much smaller than that.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966.
-*
-* Arguments
-* =========
-*
-* RANGE (input) CHARACTER*1
-* = 'A': ("All") all eigenvalues will be found.
-* = 'V': ("Value") all eigenvalues in the half-open interval
-* (VL, VU] will be found.
-* = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
-* entire matrix) will be found.
-*
-* ORDER (input) CHARACTER*1
-* = 'B': ("By Block") the eigenvalues will be grouped by
-* split-off block (see IBLOCK, ISPLIT) and
-* ordered from smallest to largest within
-* the block.
-* = 'E': ("Entire matrix")
-* the eigenvalues for the entire matrix
-* will be ordered from smallest to
-* largest.
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix T. N >= 0.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. Eigenvalues less than or equal
-* to VL, or greater than VU, will not be returned. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* GERS (input) DOUBLE PRECISION array, dimension (2*N)
-* The N Gerschgorin intervals (the i-th Gerschgorin interval
-* is (GERS(2*i-1), GERS(2*i)).
-*
-* RELTOL (input) DOUBLE PRECISION
-* The minimum relative width of an interval. When an interval
-* is narrower than RELTOL times the larger (in
-* magnitude) endpoint, then it is considered to be
-* sufficiently small, i.e., converged. Note: this should
-* always be at least radix*machine epsilon.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) off-diagonal elements of the tridiagonal matrix T.
-*
-* E2 (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot allowed in the Sturm sequence for T.
-*
-* NSPLIT (input) INTEGER
-* The number of diagonal blocks in the matrix T.
-* 1 <= NSPLIT <= N.
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into submatrices.
-* The first submatrix consists of rows/columns 1 to ISPLIT(1),
-* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
-* etc., and the NSPLIT-th consists of rows/columns
-* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
-* (Only the first NSPLIT elements will actually be used, but
-* since the user cannot know a priori what value NSPLIT will
-* have, N words must be reserved for ISPLIT.)
-*
-* M (output) INTEGER
-* The actual number of eigenvalues found. 0 <= M <= N.
-* (See also the description of INFO=2,3.)
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* On exit, the first M elements of W will contain the
-* eigenvalue approximations. DLARRD computes an interval
-* I_j = (a_j, b_j] that includes eigenvalue j. The eigenvalue
-* approximation is given as the interval midpoint
-* W(j)= ( a_j + b_j)/2. The corresponding error is bounded by
-* WERR(j) = abs( a_j - b_j)/2
-*
-* WERR (output) DOUBLE PRECISION array, dimension (N)
-* The error bound on the corresponding eigenvalue approximation
-* in W.
-*
-* WL (output) DOUBLE PRECISION
-*
-* WU (output) DOUBLE PRECISION
-* The interval (WL, WU] contains all the wanted eigenvalues.
-* If RANGE='V', then WL=VL and WU=VU.
-* If RANGE='A', then WL and WU are the global Gerschgorin bounds
-* on the spectrum.
-* If RANGE='I', then WL and WU are computed by DLAEBZ from the
-* index range specified.
-*
-* IBLOCK (output) INTEGER array, dimension (N)
-* At each row/column j where E(j) is zero or small, the
-* matrix T is considered to split into a block diagonal
-* matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which
-* block (from 1 to the number of blocks) the eigenvalue W(i)
-* belongs. (DLARRD may use the remaining N-M elements as
-* workspace.)
-*
-* INDEXW (output) INTEGER array, dimension (N)
-* The indices of the eigenvalues within each block (submatrix);
-* for example, INDEXW(i)= j and IBLOCK(i)=k imply that the
-* i-th eigenvalue W(i) is the j-th eigenvalue in block k.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: some or all of the eigenvalues failed to converge or
-* were not computed:
-* =1 or 3: Bisection failed to converge for some
-* eigenvalues; these eigenvalues are flagged by a
-* negative block number. The effect is that the
-* eigenvalues may not be as accurate as the
-* absolute and relative tolerances. This is
-* generally caused by unexpectedly inaccurate
-* arithmetic.
-* =2 or 3: RANGE='I' only: Not all of the eigenvalues
-* IL:IU were found.
-* Effect: M < IU+1-IL
-* Cause: non-monotonic arithmetic, causing the
-* Sturm sequence to be non-monotonic.
-* Cure: recalculate, using RANGE='A', and pick
-* out eigenvalues IL:IU. In some cases,
-* increasing the PARAMETER "FUDGE" may
-* make things work.
-* = 4: RANGE='I', and the Gershgorin interval
-* initially used was too small. No eigenvalues
-* were computed.
-* Probable cause: your machine has sloppy
-* floating-point arithmetic.
-* Cure: Increase the PARAMETER "FUDGE",
-* recompile, and try again.
-*
-* Internal Parameters
-* ===================
-*
-* FUDGE DOUBLE PRECISION, default = 2
-* A "fudge factor" to widen the Gershgorin intervals. Ideally,
-* a value of 1 should work, but on machines with sloppy
-* arithmetic, this needs to be larger. The default for
-* publicly released versions should be large enough to handle
-* the worst machine around. Note that this has no effect
-* on accuracy of the solution.
-*
-* Based on contributions by
-* W. Kahan, University of California, Berkeley, USA
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarre.f b/SRC/dlarre.f
index 699fde94..876e3ecb 100644
--- a/SRC/dlarre.f
+++ b/SRC/dlarre.f
@@ -1,13 +1,300 @@
+*> \brief \b DLARRE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2,
+* RTOL1, RTOL2, SPLTOL, NSPLIT, ISPLIT, M,
+* W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER RANGE
+* INTEGER IL, INFO, IU, M, N, NSPLIT
+* DOUBLE PRECISION PIVMIN, RTOL1, RTOL2, SPLTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * ),
+* $ INDEXW( * )
+* DOUBLE PRECISION D( * ), E( * ), E2( * ), GERS( * ),
+* $ W( * ),WERR( * ), WGAP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> To find the desired eigenvalues of a given real symmetric
+*> tridiagonal matrix T, DLARRE sets any "small" off-diagonal
+*> elements to zero, and for each unreduced block T_i, it finds
+*> (a) a suitable shift at one end of the block's spectrum,
+*> (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and
+*> (c) eigenvalues of each L_i D_i L_i^T.
+*> The representations and eigenvalues found are then used by
+*> DSTEMR to compute the eigenvectors of T.
+*> The accuracy varies depending on whether bisection is used to
+*> find a few eigenvalues or the dqds algorithm (subroutine DLASQ2) to
+*> conpute all and then discard any unwanted one.
+*> As an added benefit, DLARRE also outputs the n
+*> Gerschgorin intervals for the matrices L_i D_i L_i^T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': ("All") all eigenvalues will be found.
+*> = 'V': ("Value") all eigenvalues in the half-open interval
+*> (VL, VU] will be found.
+*> = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
+*> entire matrix) will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N > 0.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds for the eigenvalues.
+*> Eigenvalues less than or equal to VL, or greater than VU,
+*> will not be returned. VL < VU.
+*> If RANGE='I' or ='A', DLARRE computes bounds on the desired
+*> part of the spectrum.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal
+*> matrix T.
+*> On exit, the N diagonal elements of the diagonal
+*> matrices D_i.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> On entry, the first (N-1) entries contain the subdiagonal
+*> elements of the tridiagonal matrix T; E(N) need not be set.
+*> On exit, E contains the subdiagonal elements of the unit
+*> bidiagonal matrices L_i. The entries E( ISPLIT( I ) ),
+*> 1 <= I <= NSPLIT, contain the base points sigma_i on output.
+*> \endverbatim
+*>
+*> \param[in,out] E2
+*> \verbatim
+*> E2 is DOUBLE PRECISION array, dimension (N)
+*> On entry, the first (N-1) entries contain the SQUARES of the
+*> subdiagonal elements of the tridiagonal matrix T;
+*> E2(N) need not be set.
+*> On exit, the entries E2( ISPLIT( I ) ),
+*> 1 <= I <= NSPLIT, have been set to zero
+*> \endverbatim
+*>
+*> \param[in] RTOL1
+*> \verbatim
+*> RTOL1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] RTOL2
+*> \verbatim
+*> RTOL2 is DOUBLE PRECISION
+*> Parameters for bisection.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> \endverbatim
+*>
+*> \param[in] SPLTOL
+*> \verbatim
+*> SPLTOL is DOUBLE PRECISION
+*> The threshold for splitting.
+*> \endverbatim
+*>
+*> \param[out] NSPLIT
+*> \verbatim
+*> NSPLIT is INTEGER
+*> The number of blocks T splits into. 1 <= NSPLIT <= N.
+*> \endverbatim
+*>
+*> \param[out] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into blocks.
+*> The first block consists of rows/columns 1 to ISPLIT(1),
+*> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
+*> etc., and the NSPLIT-th consists of rows/columns
+*> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues (of all L_i D_i L_i^T)
+*> found.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the eigenvalues. The
+*> eigenvalues of each of the blocks, L_i D_i L_i^T, are
+*> sorted in ascending order ( DLARRE may use the
+*> remaining N-M elements as workspace).
+*> \endverbatim
+*>
+*> \param[out] WERR
+*> \verbatim
+*> WERR is DOUBLE PRECISION array, dimension (N)
+*> The error bound on the corresponding eigenvalue in W.
+*> \endverbatim
+*>
+*> \param[out] WGAP
+*> \verbatim
+*> WGAP is DOUBLE PRECISION array, dimension (N)
+*> The separation from the right neighbor eigenvalue in W.
+*> The gap is only with respect to the eigenvalues of the same block
+*> as each block has its own representation tree.
+*> Exception: at the right end of a block we store the left gap
+*> \endverbatim
+*>
+*> \param[out] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The indices of the blocks (submatrices) associated with the
+*> corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
+*> W(i) belongs to the first block from the top, =2 if W(i)
+*> belongs to the second block, etc.
+*> \endverbatim
+*>
+*> \param[out] INDEXW
+*> \verbatim
+*> INDEXW is INTEGER array, dimension (N)
+*> The indices of the eigenvalues within each block (submatrix);
+*> for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
+*> i-th eigenvalue W(i) is the 10-th eigenvalue in block 2
+*> \endverbatim
+*>
+*> \param[out] GERS
+*> \verbatim
+*> GERS is DOUBLE PRECISION array, dimension (2*N)
+*> The N Gerschgorin intervals (the i-th Gerschgorin interval
+*> is (GERS(2*i-1), GERS(2*i)).
+*> \endverbatim
+*>
+*> \param[out] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (6*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: A problem occured in DLARRE.
+*> < 0: One of the called subroutines signaled an internal problem.
+*> Needs inspection of the corresponding parameter IINFO
+*> for further information.
+*> \endverbatim
+*> \verbatim
+*> =-1: Problem in DLARRD.
+*> = 2: No base representation could be found in MAXTRY iterations.
+*> Increasing MAXTRY and recompilation might be a remedy.
+*> =-3: Problem in DLARRB when computing the refined root
+*> representation for DLASQ2.
+*> =-4: Problem in DLARRB when preforming bisection on the
+*> desired part of the spectrum.
+*> =-5: Problem in DLASQ2.
+*> =-6: Problem in DLASQ2.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> The base representations are required to suffer very little
+*> element growth and consequently define all their eigenvalues to
+*> high relative accuracy.
+*> ===============
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2,
$ RTOL1, RTOL2, SPLTOL, NSPLIT, ISPLIT, M,
$ W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
$ WORK, IWORK, INFO )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER RANGE
@@ -21,165 +308,6 @@
$ W( * ),WERR( * ), WGAP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* To find the desired eigenvalues of a given real symmetric
-* tridiagonal matrix T, DLARRE sets any "small" off-diagonal
-* elements to zero, and for each unreduced block T_i, it finds
-* (a) a suitable shift at one end of the block's spectrum,
-* (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and
-* (c) eigenvalues of each L_i D_i L_i^T.
-* The representations and eigenvalues found are then used by
-* DSTEMR to compute the eigenvectors of T.
-* The accuracy varies depending on whether bisection is used to
-* find a few eigenvalues or the dqds algorithm (subroutine DLASQ2) to
-* conpute all and then discard any unwanted one.
-* As an added benefit, DLARRE also outputs the n
-* Gerschgorin intervals for the matrices L_i D_i L_i^T.
-*
-* Arguments
-* =========
-*
-* RANGE (input) CHARACTER*1
-* = 'A': ("All") all eigenvalues will be found.
-* = 'V': ("Value") all eigenvalues in the half-open interval
-* (VL, VU] will be found.
-* = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
-* entire matrix) will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N > 0.
-*
-* VL (input/output) DOUBLE PRECISION
-*
-* VU (input/output) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds for the eigenvalues.
-* Eigenvalues less than or equal to VL, or greater than VU,
-* will not be returned. VL < VU.
-* If RANGE='I' or ='A', DLARRE computes bounds on the desired
-* part of the spectrum.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal
-* matrix T.
-* On exit, the N diagonal elements of the diagonal
-* matrices D_i.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the first (N-1) entries contain the subdiagonal
-* elements of the tridiagonal matrix T; E(N) need not be set.
-* On exit, E contains the subdiagonal elements of the unit
-* bidiagonal matrices L_i. The entries E( ISPLIT( I ) ),
-* 1 <= I <= NSPLIT, contain the base points sigma_i on output.
-*
-* E2 (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the first (N-1) entries contain the SQUARES of the
-* subdiagonal elements of the tridiagonal matrix T;
-* E2(N) need not be set.
-* On exit, the entries E2( ISPLIT( I ) ),
-* 1 <= I <= NSPLIT, have been set to zero
-*
-* RTOL1 (input) DOUBLE PRECISION
-*
-* RTOL2 (input) DOUBLE PRECISION
-* Parameters for bisection.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
-*
-* SPLTOL (input) DOUBLE PRECISION
-* The threshold for splitting.
-*
-* NSPLIT (output) INTEGER
-* The number of blocks T splits into. 1 <= NSPLIT <= N.
-*
-* ISPLIT (output) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into blocks.
-* The first block consists of rows/columns 1 to ISPLIT(1),
-* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
-* etc., and the NSPLIT-th consists of rows/columns
-* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
-*
-* M (output) INTEGER
-* The total number of eigenvalues (of all L_i D_i L_i^T)
-* found.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the eigenvalues. The
-* eigenvalues of each of the blocks, L_i D_i L_i^T, are
-* sorted in ascending order ( DLARRE may use the
-* remaining N-M elements as workspace).
-*
-* WERR (output) DOUBLE PRECISION array, dimension (N)
-* The error bound on the corresponding eigenvalue in W.
-*
-* WGAP (output) DOUBLE PRECISION array, dimension (N)
-* The separation from the right neighbor eigenvalue in W.
-* The gap is only with respect to the eigenvalues of the same block
-* as each block has its own representation tree.
-* Exception: at the right end of a block we store the left gap
-*
-* IBLOCK (output) INTEGER array, dimension (N)
-* The indices of the blocks (submatrices) associated with the
-* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
-* W(i) belongs to the first block from the top, =2 if W(i)
-* belongs to the second block, etc.
-*
-* INDEXW (output) INTEGER array, dimension (N)
-* The indices of the eigenvalues within each block (submatrix);
-* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
-* i-th eigenvalue W(i) is the 10-th eigenvalue in block 2
-*
-* GERS (output) DOUBLE PRECISION array, dimension (2*N)
-* The N Gerschgorin intervals (the i-th Gerschgorin interval
-* is (GERS(2*i-1), GERS(2*i)).
-*
-* PIVMIN (output) DOUBLE PRECISION
-* The minimum pivot in the Sturm sequence for T.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (6*N)
-* Workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-* Workspace.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: A problem occured in DLARRE.
-* < 0: One of the called subroutines signaled an internal problem.
-* Needs inspection of the corresponding parameter IINFO
-* for further information.
-*
-* =-1: Problem in DLARRD.
-* = 2: No base representation could be found in MAXTRY iterations.
-* Increasing MAXTRY and recompilation might be a remedy.
-* =-3: Problem in DLARRB when computing the refined root
-* representation for DLASQ2.
-* =-4: Problem in DLARRB when preforming bisection on the
-* desired part of the spectrum.
-* =-5: Problem in DLASQ2.
-* =-6: Problem in DLASQ2.
-*
-* Further Details
-* The base representations are required to suffer very little
-* element growth and consequently define all their eigenvalues to
-* high relative accuracy.
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarrf.f b/SRC/dlarrf.f
index 17c4dd05..db2e0907 100644
--- a/SRC/dlarrf.f
+++ b/SRC/dlarrf.f
@@ -1,3 +1,191 @@
+*> \brief \b DLARRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRF( N, D, L, LD, CLSTRT, CLEND,
+* W, WGAP, WERR,
+* SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA,
+* DPLUS, LPLUS, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CLSTRT, CLEND, INFO, N
+* DOUBLE PRECISION CLGAPL, CLGAPR, PIVMIN, SIGMA, SPDIAM
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), DPLUS( * ), L( * ), LD( * ),
+* $ LPLUS( * ), W( * ), WGAP( * ), WERR( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given the initial representation L D L^T and its cluster of close
+*> eigenvalues (in a relative measure), W( CLSTRT ), W( CLSTRT+1 ), ...
+*> W( CLEND ), DLARRF finds a new relatively robust representation
+*> L D L^T - SIGMA I = L(+) D(+) L(+)^T such that at least one of the
+*> eigenvalues of L(+) D(+) L(+)^T is relatively isolated.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix (subblock, if the matrix splitted).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The N diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (N-1)
+*> The (N-1) subdiagonal elements of the unit bidiagonal
+*> matrix L.
+*> \endverbatim
+*>
+*> \param[in] LD
+*> \verbatim
+*> LD is DOUBLE PRECISION array, dimension (N-1)
+*> The (N-1) elements L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] CLSTRT
+*> \verbatim
+*> CLSTRT is INTEGER
+*> The index of the first eigenvalue in the cluster.
+*> \endverbatim
+*>
+*> \param[in] CLEND
+*> \verbatim
+*> CLEND is INTEGER
+*> The index of the last eigenvalue in the cluster.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension
+*> dimension is >= (CLEND-CLSTRT+1)
+*> The eigenvalue APPROXIMATIONS of L D L^T in ascending order.
+*> W( CLSTRT ) through W( CLEND ) form the cluster of relatively
+*> close eigenalues.
+*> \endverbatim
+*>
+*> \param[in,out] WGAP
+*> \verbatim
+*> WGAP is DOUBLE PRECISION array, dimension
+*> dimension is >= (CLEND-CLSTRT+1)
+*> The separation from the right neighbor eigenvalue in W.
+*> \endverbatim
+*>
+*> \param[in] WERR
+*> \verbatim
+*> WERR is DOUBLE PRECISION array, dimension
+*> dimension is >= (CLEND-CLSTRT+1)
+*> WERR contain the semiwidth of the uncertainty
+*> interval of the corresponding eigenvalue APPROXIMATION in W
+*> \endverbatim
+*>
+*> \param[in] SPDIAM
+*> \verbatim
+*> SPDIAM is DOUBLE PRECISION
+*> estimate of the spectral diameter obtained from the
+*> Gerschgorin intervals
+*> \endverbatim
+*>
+*> \param[in] CLGAPL
+*> \verbatim
+*> CLGAPL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] CLGAPR
+*> \verbatim
+*> CLGAPR is DOUBLE PRECISION
+*> absolute gap on each end of the cluster.
+*> Set by the calling routine to protect against shifts too close
+*> to eigenvalues outside the cluster.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot allowed in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[out] SIGMA
+*> \verbatim
+*> SIGMA is DOUBLE PRECISION
+*> The shift used to form L(+) D(+) L(+)^T.
+*> \endverbatim
+*>
+*> \param[out] DPLUS
+*> \verbatim
+*> DPLUS is DOUBLE PRECISION array, dimension (N)
+*> The N diagonal elements of the diagonal matrix D(+).
+*> \endverbatim
+*>
+*> \param[out] LPLUS
+*> \verbatim
+*> LPLUS is DOUBLE PRECISION array, dimension (N-1)
+*> The first (N-1) elements of LPLUS contain the subdiagonal
+*> elements of the unit bidiagonal matrix L(+).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Signals processing OK (=0) or failure (=1)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLARRF( N, D, L, LD, CLSTRT, CLEND,
$ W, WGAP, WERR,
$ SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA,
@@ -6,8 +194,8 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-**
+* November 2011
+*
* .. Scalar Arguments ..
INTEGER CLSTRT, CLEND, INFO, N
DOUBLE PRECISION CLGAPL, CLGAPR, PIVMIN, SIGMA, SPDIAM
@@ -17,92 +205,6 @@
$ LPLUS( * ), W( * ), WGAP( * ), WERR( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* Given the initial representation L D L^T and its cluster of close
-* eigenvalues (in a relative measure), W( CLSTRT ), W( CLSTRT+1 ), ...
-* W( CLEND ), DLARRF finds a new relatively robust representation
-* L D L^T - SIGMA I = L(+) D(+) L(+)^T such that at least one of the
-* eigenvalues of L(+) D(+) L(+)^T is relatively isolated.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix (subblock, if the matrix splitted).
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The N diagonal elements of the diagonal matrix D.
-*
-* L (input) DOUBLE PRECISION array, dimension (N-1)
-* The (N-1) subdiagonal elements of the unit bidiagonal
-* matrix L.
-*
-* LD (input) DOUBLE PRECISION array, dimension (N-1)
-* The (N-1) elements L(i)*D(i).
-*
-* CLSTRT (input) INTEGER
-* The index of the first eigenvalue in the cluster.
-*
-* CLEND (input) INTEGER
-* The index of the last eigenvalue in the cluster.
-*
-* W (input) DOUBLE PRECISION array, dimension
-* dimension is >= (CLEND-CLSTRT+1)
-* The eigenvalue APPROXIMATIONS of L D L^T in ascending order.
-* W( CLSTRT ) through W( CLEND ) form the cluster of relatively
-* close eigenalues.
-*
-* WGAP (input/output) DOUBLE PRECISION array, dimension
-* dimension is >= (CLEND-CLSTRT+1)
-* The separation from the right neighbor eigenvalue in W.
-*
-* WERR (input) DOUBLE PRECISION array, dimension
-* dimension is >= (CLEND-CLSTRT+1)
-* WERR contain the semiwidth of the uncertainty
-* interval of the corresponding eigenvalue APPROXIMATION in W
-*
-* SPDIAM (input) DOUBLE PRECISION
-* estimate of the spectral diameter obtained from the
-* Gerschgorin intervals
-*
-* CLGAPL (input) DOUBLE PRECISION
-*
-* CLGAPR (input) DOUBLE PRECISION
-* absolute gap on each end of the cluster.
-* Set by the calling routine to protect against shifts too close
-* to eigenvalues outside the cluster.
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot allowed in the Sturm sequence.
-*
-* SIGMA (output) DOUBLE PRECISION
-* The shift used to form L(+) D(+) L(+)^T.
-*
-* DPLUS (output) DOUBLE PRECISION array, dimension (N)
-* The N diagonal elements of the diagonal matrix D(+).
-*
-* LPLUS (output) DOUBLE PRECISION array, dimension (N-1)
-* The first (N-1) elements of LPLUS contain the subdiagonal
-* elements of the unit bidiagonal matrix L(+).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-* Workspace.
-*
-* INFO (output) INTEGER
-* Signals processing OK (=0) or failure (=1)
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarrj.f b/SRC/dlarrj.f
index 5ef36a0e..6c94c05a 100644
--- a/SRC/dlarrj.f
+++ b/SRC/dlarrj.f
@@ -1,3 +1,167 @@
+*> \brief \b DLARRJ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST,
+* RTOL, OFFSET, W, WERR, WORK, IWORK,
+* PIVMIN, SPDIAM, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IFIRST, ILAST, INFO, N, OFFSET
+* DOUBLE PRECISION PIVMIN, RTOL, SPDIAM
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), E2( * ), W( * ),
+* $ WERR( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given the initial eigenvalue approximations of T, DLARRJ
+*> does bisection to refine the eigenvalues of T,
+*> W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial
+*> guesses for these eigenvalues are input in W, the corresponding estimate
+*> of the error in these guesses in WERR. During bisection, intervals
+*> [left, right] are maintained by storing their mid-points and
+*> semi-widths in the arrays W and WERR respectively.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The N diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] E2
+*> \verbatim
+*> E2 is DOUBLE PRECISION array, dimension (N-1)
+*> The Squares of the (N-1) subdiagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] IFIRST
+*> \verbatim
+*> IFIRST is INTEGER
+*> The index of the first eigenvalue to be computed.
+*> \endverbatim
+*>
+*> \param[in] ILAST
+*> \verbatim
+*> ILAST is INTEGER
+*> The index of the last eigenvalue to be computed.
+*> \endverbatim
+*>
+*> \param[in] RTOL
+*> \verbatim
+*> RTOL is DOUBLE PRECISION
+*> Tolerance for the convergence of the bisection intervals.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.RTOL*MAX(|LEFT|,|RIGHT|).
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET
+*> through ILAST-OFFSET elements of these arrays are to be used.
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
+*> estimates of the eigenvalues of L D L^T indexed IFIRST through
+*> ILAST.
+*> On output, these estimates are refined.
+*> \endverbatim
+*>
+*> \param[in,out] WERR
+*> \verbatim
+*> WERR is DOUBLE PRECISION array, dimension (N)
+*> On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are
+*> the errors in the estimates of the corresponding elements in W.
+*> On output, these errors are refined.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[in] SPDIAM
+*> \verbatim
+*> SPDIAM is DOUBLE PRECISION
+*> The spectral diameter of T.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error flag.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST,
$ RTOL, OFFSET, W, WERR, WORK, IWORK,
$ PIVMIN, SPDIAM, INFO )
@@ -5,7 +169,7 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IFIRST, ILAST, INFO, N, OFFSET
@@ -17,80 +181,6 @@
$ WERR( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* Given the initial eigenvalue approximations of T, DLARRJ
-* does bisection to refine the eigenvalues of T,
-* W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial
-* guesses for these eigenvalues are input in W, the corresponding estimate
-* of the error in these guesses in WERR. During bisection, intervals
-* [left, right] are maintained by storing their mid-points and
-* semi-widths in the arrays W and WERR respectively.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The N diagonal elements of T.
-*
-* E2 (input) DOUBLE PRECISION array, dimension (N-1)
-* The Squares of the (N-1) subdiagonal elements of T.
-*
-* IFIRST (input) INTEGER
-* The index of the first eigenvalue to be computed.
-*
-* ILAST (input) INTEGER
-* The index of the last eigenvalue to be computed.
-*
-* RTOL (input) DOUBLE PRECISION
-* Tolerance for the convergence of the bisection intervals.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.RTOL*MAX(|LEFT|,|RIGHT|).
-*
-* OFFSET (input) INTEGER
-* Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET
-* through ILAST-OFFSET elements of these arrays are to be used.
-*
-* W (input/output) DOUBLE PRECISION array, dimension (N)
-* On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
-* estimates of the eigenvalues of L D L^T indexed IFIRST through
-* ILAST.
-* On output, these estimates are refined.
-*
-* WERR (input/output) DOUBLE PRECISION array, dimension (N)
-* On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are
-* the errors in the estimates of the corresponding elements in W.
-* On output, these errors are refined.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-* Workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (2*N)
-* Workspace.
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot in the Sturm sequence for T.
-*
-* SPDIAM (input) DOUBLE PRECISION
-* The spectral diameter of T.
-*
-* INFO (output) INTEGER
-* Error flag.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarrk.f b/SRC/dlarrk.f
index 72f276f5..e60d1331 100644
--- a/SRC/dlarrk.f
+++ b/SRC/dlarrk.f
@@ -1,11 +1,146 @@
+*> \brief \b DLARRK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRK( N, IW, GL, GU,
+* D, E2, PIVMIN, RELTOL, W, WERR, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, IW, N
+* DOUBLE PRECISION PIVMIN, RELTOL, GL, GU, W, WERR
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E2( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARRK computes one eigenvalue of a symmetric tridiagonal
+*> matrix T to suitable accuracy. This is an auxiliary code to be
+*> called from DSTEMR.
+*>
+*> To avoid overflow, the matrix must be scaled so that its
+*> largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest
+*> accuracy, it should not be much smaller than that.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] IW
+*> \verbatim
+*> IW is INTEGER
+*> The index of the eigenvalues to be returned.
+*> \endverbatim
+*>
+*> \param[in] GL
+*> \verbatim
+*> GL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] GU
+*> \verbatim
+*> GU is DOUBLE PRECISION
+*> An upper and a lower bound on the eigenvalue.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E2
+*> \verbatim
+*> E2 is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot allowed in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[in] RELTOL
+*> \verbatim
+*> RELTOL is DOUBLE PRECISION
+*> The minimum relative width of an interval. When an interval
+*> is narrower than RELTOL times the larger (in
+*> magnitude) endpoint, then it is considered to be
+*> sufficiently small, i.e., converged. Note: this should
+*> always be at least radix*machine epsilon.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] WERR
+*> \verbatim
+*> WERR is DOUBLE PRECISION
+*> The error bound on the corresponding eigenvalue approximation
+*> in W.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Eigenvalue converged
+*> = -1: Eigenvalue did NOT converge
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> FUDGE DOUBLE PRECISION, default = 2
+*> A "fudge factor" to widen the Gershgorin intervals.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLARRK( N, IW, GL, GU,
$ D, E2, PIVMIN, RELTOL, W, WERR, INFO)
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, IW, N
@@ -15,68 +150,6 @@
DOUBLE PRECISION D( * ), E2( * )
* ..
*
-* Purpose
-* =======
-*
-* DLARRK computes one eigenvalue of a symmetric tridiagonal
-* matrix T to suitable accuracy. This is an auxiliary code to be
-* called from DSTEMR.
-*
-* To avoid overflow, the matrix must be scaled so that its
-* largest element is no greater than overflow**(1/2) *
-* underflow**(1/4) in absolute value, and for greatest
-* accuracy, it should not be much smaller than that.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix T. N >= 0.
-*
-* IW (input) INTEGER
-* The index of the eigenvalues to be returned.
-*
-* GL (input) DOUBLE PRECISION
-*
-* GU (input) DOUBLE PRECISION
-* An upper and a lower bound on the eigenvalue.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E2 (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot allowed in the Sturm sequence for T.
-*
-* RELTOL (input) DOUBLE PRECISION
-* The minimum relative width of an interval. When an interval
-* is narrower than RELTOL times the larger (in
-* magnitude) endpoint, then it is considered to be
-* sufficiently small, i.e., converged. Note: this should
-* always be at least radix*machine epsilon.
-*
-* W (output) DOUBLE PRECISION
-*
-* WERR (output) DOUBLE PRECISION
-* The error bound on the corresponding eigenvalue approximation
-* in W.
-*
-* INFO (output) INTEGER
-* = 0: Eigenvalue converged
-* = -1: Eigenvalue did NOT converge
-*
-* Internal Parameters
-* ===================
-*
-* FUDGE DOUBLE PRECISION, default = 2
-* A "fudge factor" to widen the Gershgorin intervals.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarrr.f b/SRC/dlarrr.f
index c888edb4..9b24b301 100644
--- a/SRC/dlarrr.f
+++ b/SRC/dlarrr.f
@@ -1,53 +1,109 @@
- SUBROUTINE DLARRR( N, D, E, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N, INFO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
-* ..
-*
-*
+*> \brief \b DLARRR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRR( N, D, E, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* ..
+*
+*
* Purpose
* =======
*
-* Perform tests to decide whether the symmetric tridiagonal matrix T
-* warrants expensive computations which guarantee high relative accuracy
-* in the eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Perform tests to decide whether the symmetric tridiagonal matrix T
+*> warrants expensive computations which guarantee high relative accuracy
+*> in the eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N > 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N > 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The N diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> On entry, the first (N-1) entries contain the subdiagonal
+*> elements of the tridiagonal matrix T; E(N) is set to ZERO.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> INFO = 0(default) : the matrix warrants computations preserving
+*> relative accuracy.
+*> INFO = 1 : the matrix warrants computations guaranteeing
+*> only absolute accuracy.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The N diagonal elements of the tridiagonal matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the first (N-1) entries contain the subdiagonal
-* elements of the tridiagonal matrix T; E(N) is set to ZERO.
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
-* INFO = 0(default) : the matrix warrants computations preserving
-* relative accuracy.
-* INFO = 1 : the matrix warrants computations guaranteeing
-* only absolute accuracy.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARRR( N, D, E, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+* ..
*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
*
* =====================================================================
*
diff --git a/SRC/dlarrv.f b/SRC/dlarrv.f
index f7585f3c..af58d978 100644
--- a/SRC/dlarrv.f
+++ b/SRC/dlarrv.f
@@ -1,3 +1,282 @@
+*> \brief \b DLARRV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN,
+* ISPLIT, M, DOL, DOU, MINRGP,
+* RTOL1, RTOL2, W, WERR, WGAP,
+* IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER DOL, DOU, INFO, LDZ, M, N
+* DOUBLE PRECISION MINRGP, PIVMIN, RTOL1, RTOL2, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), INDEXW( * ), ISPLIT( * ),
+* $ ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), GERS( * ), L( * ), W( * ), WERR( * ),
+* $ WGAP( * ), WORK( * )
+* DOUBLE PRECISION Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARRV computes the eigenvectors of the tridiagonal matrix
+*> T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
+*> The input eigenvalues should have been computed by DLARRE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> Lower and upper bounds of the interval that contains the desired
+*> eigenvalues. VL < VU. Needed to compute gaps on the left or right
+*> end of the extremal eigenvalues in the desired RANGE.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the N diagonal elements of the diagonal matrix D.
+*> On exit, D may be overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the unit
+*> bidiagonal matrix L are in elements 1 to N-1 of L
+*> (if the matrix is not splitted.) At the end of each block
+*> is stored the corresponding shift as given by DLARRE.
+*> On exit, L is overwritten.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot allowed in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into blocks.
+*> The first block consists of rows/columns 1 to
+*> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
+*> through ISPLIT( 2 ), etc.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of input eigenvalues. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] DOL
+*> \verbatim
+*> DOL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] DOU
+*> \verbatim
+*> DOU is INTEGER
+*> If the user wants to compute only selected eigenvectors from all
+*> the eigenvalues supplied, he can specify an index range DOL:DOU.
+*> Or else the setting DOL=1, DOU=M should be applied.
+*> Note that DOL and DOU refer to the order in which the eigenvalues
+*> are stored in W.
+*> If the user wants to compute only selected eigenpairs, then
+*> the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
+*> computed eigenvectors. All other columns of Z are set to zero.
+*> \endverbatim
+*>
+*> \param[in] MINRGP
+*> \verbatim
+*> MINRGP is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] RTOL1
+*> \verbatim
+*> RTOL1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] RTOL2
+*> \verbatim
+*> RTOL2 is DOUBLE PRECISION
+*> Parameters for bisection.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements of W contain the APPROXIMATE eigenvalues for
+*> which eigenvectors are to be computed. The eigenvalues
+*> should be grouped by split-off block and ordered from
+*> smallest to largest within the block ( The output array
+*> W from DLARRE is expected here ). Furthermore, they are with
+*> respect to the shift of the corresponding root representation
+*> for their block. On exit, W holds the eigenvalues of the
+*> UNshifted matrix.
+*> \endverbatim
+*>
+*> \param[in,out] WERR
+*> \verbatim
+*> WERR is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the semiwidth of the uncertainty
+*> interval of the corresponding eigenvalue in W
+*> \endverbatim
+*>
+*> \param[in,out] WGAP
+*> \verbatim
+*> WGAP is DOUBLE PRECISION array, dimension (N)
+*> The separation from the right neighbor eigenvalue in W.
+*> \endverbatim
+*>
+*> \param[in] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The indices of the blocks (submatrices) associated with the
+*> corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
+*> W(i) belongs to the first block from the top, =2 if W(i)
+*> belongs to the second block, etc.
+*> \endverbatim
+*>
+*> \param[in] INDEXW
+*> \verbatim
+*> INDEXW is INTEGER array, dimension (N)
+*> The indices of the eigenvalues within each block (submatrix);
+*> for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
+*> i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
+*> \endverbatim
+*>
+*> \param[in] GERS
+*> \verbatim
+*> GERS is DOUBLE PRECISION array, dimension (2*N)
+*> The N Gerschgorin intervals (the i-th Gerschgorin interval
+*> is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
+*> be computed from the original UNshifted matrix.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
+*> If INFO = 0, the first M columns of Z contain the
+*> orthonormal eigenvectors of the matrix T
+*> corresponding to the input eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The I-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*I-1 ) through
+*> ISUPPZ( 2*I ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (12*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> \endverbatim
+*> \verbatim
+*> > 0: A problem occured in DLARRV.
+*> < 0: One of the called subroutines signaled an internal problem.
+*> Needs inspection of the corresponding parameter IINFO
+*> for further information.
+*> \endverbatim
+*> \verbatim
+*> =-1: Problem in DLARRB when refining a child's eigenvalues.
+*> =-2: Problem in DLARRF when computing the RRR of a child.
+*> When a child is inside a tight cluster, it can be difficult
+*> to find an RRR. A partial remedy from the user's point of
+*> view is to make the parameter MINRGP smaller and recompile.
+*> However, as the orthogonality of the computed vectors is
+*> proportional to 1/MINRGP, the user should be aware that
+*> he might be trading in precision when he decreases MINRGP.
+*> =-3: Problem in DLARRB when refining a single eigenvalue
+*> after the Rayleigh correction was rejected.
+*> = 5: The Rayleigh Quotient Iteration failed to converge to
+*> full accuracy in MAXITR steps.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN,
$ ISPLIT, M, DOL, DOU, MINRGP,
$ RTOL1, RTOL2, W, WERR, WGAP,
@@ -7,7 +286,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER DOL, DOU, INFO, LDZ, M, N
@@ -21,156 +300,6 @@
DOUBLE PRECISION Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DLARRV computes the eigenvectors of the tridiagonal matrix
-* T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
-* The input eigenvalues should have been computed by DLARRE.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* Lower and upper bounds of the interval that contains the desired
-* eigenvalues. VL < VU. Needed to compute gaps on the left or right
-* end of the extremal eigenvalues in the desired RANGE.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the N diagonal elements of the diagonal matrix D.
-* On exit, D may be overwritten.
-*
-* L (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the unit
-* bidiagonal matrix L are in elements 1 to N-1 of L
-* (if the matrix is not splitted.) At the end of each block
-* is stored the corresponding shift as given by DLARRE.
-* On exit, L is overwritten.
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot allowed in the Sturm sequence.
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into blocks.
-* The first block consists of rows/columns 1 to
-* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
-* through ISPLIT( 2 ), etc.
-*
-* M (input) INTEGER
-* The total number of input eigenvalues. 0 <= M <= N.
-*
-* DOL (input) INTEGER
-*
-* DOU (input) INTEGER
-* If the user wants to compute only selected eigenvectors from all
-* the eigenvalues supplied, he can specify an index range DOL:DOU.
-* Or else the setting DOL=1, DOU=M should be applied.
-* Note that DOL and DOU refer to the order in which the eigenvalues
-* are stored in W.
-* If the user wants to compute only selected eigenpairs, then
-* the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
-* computed eigenvectors. All other columns of Z are set to zero.
-*
-* MINRGP (input) DOUBLE PRECISION
-*
-* RTOL1 (input) DOUBLE PRECISION
-*
-* RTOL2 (input) DOUBLE PRECISION
-* Parameters for bisection.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
-*
-* W (input/output) DOUBLE PRECISION array, dimension (N)
-* The first M elements of W contain the APPROXIMATE eigenvalues for
-* which eigenvectors are to be computed. The eigenvalues
-* should be grouped by split-off block and ordered from
-* smallest to largest within the block ( The output array
-* W from DLARRE is expected here ). Furthermore, they are with
-* respect to the shift of the corresponding root representation
-* for their block. On exit, W holds the eigenvalues of the
-* UNshifted matrix.
-*
-* WERR (input/output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the semiwidth of the uncertainty
-* interval of the corresponding eigenvalue in W
-*
-* WGAP (input/output) DOUBLE PRECISION array, dimension (N)
-* The separation from the right neighbor eigenvalue in W.
-*
-* IBLOCK (input) INTEGER array, dimension (N)
-* The indices of the blocks (submatrices) associated with the
-* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
-* W(i) belongs to the first block from the top, =2 if W(i)
-* belongs to the second block, etc.
-*
-* INDEXW (input) INTEGER array, dimension (N)
-* The indices of the eigenvalues within each block (submatrix);
-* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
-* i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
-*
-* GERS (input) DOUBLE PRECISION array, dimension (2*N)
-* The N Gerschgorin intervals (the i-th Gerschgorin interval
-* is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
-* be computed from the original UNshifted matrix.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
-* If INFO = 0, the first M columns of Z contain the
-* orthonormal eigenvectors of the matrix T
-* corresponding to the input eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The I-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*I-1 ) through
-* ISUPPZ( 2*I ).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (12*N)
-*
-* IWORK (workspace) INTEGER array, dimension (7*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-*
-* > 0: A problem occured in DLARRV.
-* < 0: One of the called subroutines signaled an internal problem.
-* Needs inspection of the corresponding parameter IINFO
-* for further information.
-*
-* =-1: Problem in DLARRB when refining a child's eigenvalues.
-* =-2: Problem in DLARRF when computing the RRR of a child.
-* When a child is inside a tight cluster, it can be difficult
-* to find an RRR. A partial remedy from the user's point of
-* view is to make the parameter MINRGP smaller and recompile.
-* However, as the orthogonality of the computed vectors is
-* proportional to 1/MINRGP, the user should be aware that
-* he might be trading in precision when he decreases MINRGP.
-* =-3: Problem in DLARRB when refining a single eigenvalue
-* after the Rayleigh correction was rejected.
-* = 5: The Rayleigh Quotient Iteration failed to converge to
-* full accuracy in MAXITR steps.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlarscl2.f b/SRC/dlarscl2.f
index e501a796..0a91b846 100644
--- a/SRC/dlarscl2.f
+++ b/SRC/dlarscl2.f
@@ -1,50 +1,98 @@
- SUBROUTINE DLARSCL2 ( M, N, D, X, LDX )
+*> \brief \b DLARSCL2
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER M, N, LDX
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), X( LDX, * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLARSCL2 ( M, N, D, X, LDX )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DLARSCL2 performs a reciprocal diagonal scaling on an vector:
-* x <-- inv(D) * x
-* where the diagonal matrix D is stored as a vector.
-*
-* Eventually to be replaced by BLAS_dge_diag_scale in the new BLAS
-* standard.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARSCL2 performs a reciprocal diagonal scaling on an vector:
+*> x <-- inv(D) * x
+*> where the diagonal matrix D is stored as a vector.
+*>
+*> Eventually to be replaced by BLAS_dge_diag_scale in the new BLAS
+*> standard.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of D and X. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of D and X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of D and X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (M)
+*> Diagonal matrix D, stored as a vector of length M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,N)
+*> On entry, the vector X to be scaled by D.
+*> On exit, the scaled vector.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the vector X. LDX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of D and X. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) DOUBLE PRECISION array, dimension (M)
-* Diagonal matrix D, stored as a vector of length M.
+*> \date November 2011
*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,N)
-* On entry, the vector X to be scaled by D.
-* On exit, the scaled vector.
+*> \ingroup doubleOTHERcomputational
*
-* LDX (input) INTEGER
-* The leading dimension of the vector X. LDX >= 0.
+* =====================================================================
+ SUBROUTINE DLARSCL2 ( M, N, D, X, LDX )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlartg.f b/SRC/dlartg.f
index b708beda..3971df11 100644
--- a/SRC/dlartg.f
+++ b/SRC/dlartg.f
@@ -1,52 +1,103 @@
- SUBROUTINE DLARTG( F, G, CS, SN, R )
+*> \brief \b DLARTG
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION CS, F, G, R, SN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLARTG( F, G, CS, SN, R )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION CS, F, G, R, SN
+* ..
+*
* Purpose
* =======
*
-* DLARTG generate a plane rotation so that
-*
-* [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
-* [ -SN CS ] [ G ] [ 0 ]
-*
-* This is a slower, more accurate version of the BLAS1 routine DROTG,
-* with the following other differences:
-* F and G are unchanged on return.
-* If G=0, then CS=1 and SN=0.
-* If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
-* floating point operations (saves work in DBDSQR when
-* there are zeros on the diagonal).
-*
-* If F exceeds G in magnitude, CS will be positive.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARTG generate a plane rotation so that
+*>
+*> [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
+*> [ -SN CS ] [ G ] [ 0 ]
+*>
+*> This is a slower, more accurate version of the BLAS1 routine DROTG,
+*> with the following other differences:
+*> F and G are unchanged on return.
+*> If G=0, then CS=1 and SN=0.
+*> If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
+*> floating point operations (saves work in DBDSQR when
+*> there are zeros on the diagonal).
+*>
+*> If F exceeds G in magnitude, CS will be positive.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) DOUBLE PRECISION
-* The first component of vector to be rotated.
+*> \param[in] F
+*> \verbatim
+*> F is DOUBLE PRECISION
+*> The first component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is DOUBLE PRECISION
+*> The second component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is DOUBLE PRECISION
+*> The cosine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is DOUBLE PRECISION
+*> The sine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION
+*> The nonzero component of the rotated vector.
+*> \endverbatim
+*> \verbatim
+*> This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). 10 feb 03, SJH.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* G (input) DOUBLE PRECISION
-* The second component of vector to be rotated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CS (output) DOUBLE PRECISION
-* The cosine of the rotation.
+*> \date November 2011
*
-* SN (output) DOUBLE PRECISION
-* The sine of the rotation.
+*> \ingroup auxOTHERauxiliary
*
-* R (output) DOUBLE PRECISION
-* The nonzero component of the rotated vector.
+* =====================================================================
+ SUBROUTINE DLARTG( F, G, CS, SN, R )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). 10 feb 03, SJH.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION CS, F, G, R, SN
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlartgp.f b/SRC/dlartgp.f
index 8d56e931..85c74853 100644
--- a/SRC/dlartgp.f
+++ b/SRC/dlartgp.f
@@ -1,54 +1,101 @@
- SUBROUTINE DLARTGP( F, G, CS, SN, R )
+*> \brief \b DLARTGP
*
-* Originally DLARTG
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* Adapted to DLARTGP
-* July 2010
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION CS, F, G, R, SN
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLARTGP( F, G, CS, SN, R )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION CS, F, G, R, SN
+* ..
+*
* Purpose
* =======
*
-* DLARTGP generates a plane rotation so that
-*
-* [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
-* [ -SN CS ] [ G ] [ 0 ]
-*
-* This is a slower, more accurate version of the Level 1 BLAS routine DROTG,
-* with the following other differences:
-* F and G are unchanged on return.
-* If G=0, then CS=(+/-)1 and SN=0.
-* If F=0 and (G .ne. 0), then CS=0 and SN=(+/-)1.
-*
-* The sign is chosen so that R >= 0.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARTGP generates a plane rotation so that
+*>
+*> [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
+*> [ -SN CS ] [ G ] [ 0 ]
+*>
+*> This is a slower, more accurate version of the Level 1 BLAS routine DROTG,
+*> with the following other differences:
+*> F and G are unchanged on return.
+*> If G=0, then CS=(+/-)1 and SN=0.
+*> If F=0 and (G .ne. 0), then CS=0 and SN=(+/-)1.
+*>
+*> The sign is chosen so that R >= 0.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) DOUBLE PRECISION
-* The first component of vector to be rotated.
+*> \param[in] F
+*> \verbatim
+*> F is DOUBLE PRECISION
+*> The first component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is DOUBLE PRECISION
+*> The second component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is DOUBLE PRECISION
+*> The cosine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is DOUBLE PRECISION
+*> The sine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION
+*> The nonzero component of the rotated vector.
+*> \endverbatim
+*> \verbatim
+*> This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). 10 feb 03, SJH.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* G (input) DOUBLE PRECISION
-* The second component of vector to be rotated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CS (output) DOUBLE PRECISION
-* The cosine of the rotation.
+*> \date November 2011
*
-* SN (output) DOUBLE PRECISION
-* The sine of the rotation.
+*> \ingroup auxOTHERauxiliary
*
-* R (output) DOUBLE PRECISION
-* The nonzero component of the rotated vector.
+* =====================================================================
+ SUBROUTINE DLARTGP( F, G, CS, SN, R )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). 10 feb 03, SJH.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION CS, F, G, R, SN
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlartgs.f b/SRC/dlartgs.f
index d95d5562..cadd6554 100644
--- a/SRC/dlartgs.f
+++ b/SRC/dlartgs.f
@@ -1,49 +1,95 @@
- SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.0) --
+*> \brief \b DLARTGS
*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION CS, SIGMA, SN, X, Y
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION CS, SIGMA, SN, X, Y
+* ..
+*
* Purpose
* =======
*
-* DLARTGS generates a plane rotation designed to introduce a bulge in
-* Golub-Reinsch-style implicit QR iteration for the bidiagonal SVD
-* problem. X and Y are the top-row entries, and SIGMA is the shift.
-* The computed CS and SN define a plane rotation satisfying
-*
-* [ CS SN ] . [ X^2 - SIGMA ] = [ R ],
-* [ -SN CS ] [ X * Y ] [ 0 ]
-*
-* with R nonnegative. If X^2 - SIGMA and X * Y are 0, then the
-* rotation is by PI/2.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARTGS generates a plane rotation designed to introduce a bulge in
+*> Golub-Reinsch-style implicit QR iteration for the bidiagonal SVD
+*> problem. X and Y are the top-row entries, and SIGMA is the shift.
+*> The computed CS and SN define a plane rotation satisfying
+*>
+*> [ CS SN ] . [ X^2 - SIGMA ] = [ R ],
+*> [ -SN CS ] [ X * Y ] [ 0 ]
+*>
+*> with R nonnegative. If X^2 - SIGMA and X * Y are 0, then the
+*> rotation is by PI/2.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* X (input) DOUBLE PRECISION
-* The (1,1) entry of an upper bidiagonal matrix.
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION
+*> The (1,1) entry of an upper bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION
+*> The (1,2) entry of an upper bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] SIGMA
+*> \verbatim
+*> SIGMA is DOUBLE PRECISION
+*> The shift.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is DOUBLE PRECISION
+*> The cosine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is DOUBLE PRECISION
+*> The sine of the rotation.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Y (input) DOUBLE PRECISION
-* The (1,2) entry of an upper bidiagonal matrix.
+*> \date November 2011
*
-* SIGMA (input) DOUBLE PRECISION
-* The shift.
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN )
*
-* CS (output) DOUBLE PRECISION
-* The cosine of the rotation.
+* -- LAPACK computational routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SN (output) DOUBLE PRECISION
-* The sine of the rotation.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION CS, SIGMA, SN, X, Y
+* ..
*
* ===================================================================
*
diff --git a/SRC/dlartv.f b/SRC/dlartv.f
index 0a782246..7b5bbfcd 100644
--- a/SRC/dlartv.f
+++ b/SRC/dlartv.f
@@ -1,54 +1,116 @@
- SUBROUTINE DLARTV( N, X, INCX, Y, INCY, C, S, INCC )
+*> \brief \b DLARTV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, INCY, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( * ), S( * ), X( * ), Y( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARTV( N, X, INCX, Y, INCY, C, S, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), S( * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* DLARTV applies a vector of real plane rotations to elements of the
-* real vectors x and y. For i = 1,2,...,n
-*
-* ( x(i) ) := ( c(i) s(i) ) ( x(i) )
-* ( y(i) ) ( -s(i) c(i) ) ( y(i) )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARTV applies a vector of real plane rotations to elements of the
+*> real vectors x and y. For i = 1,2,...,n
+*>
+*> ( x(i) ) := ( c(i) s(i) ) ( x(i) )
+*> ( y(i) ) ( -s(i) c(i) ) ( y(i) )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be applied.
-*
-* X (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCX)
-* The vector x.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be applied.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCX)
+*> The vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array,
+*> dimension (1+(N-1)*INCY)
+*> The vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
+*> The sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C and S. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Y (input/output) DOUBLE PRECISION array,
-* dimension (1+(N-1)*INCY)
-* The vector y.
+*> \date November 2011
*
-* INCY (input) INTEGER
-* The increment between elements of Y. INCY > 0.
+*> \ingroup doubleOTHERauxiliary
*
-* C (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* =====================================================================
+ SUBROUTINE DLARTV( N, X, INCX, Y, INCY, C, S, INCC )
*
-* S (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
-* The sines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C and S. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( * ), S( * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaruv.f b/SRC/dlaruv.f
index 22d05316..bef41c87 100644
--- a/SRC/dlaruv.f
+++ b/SRC/dlaruv.f
@@ -1,53 +1,106 @@
- SUBROUTINE DLARUV( ISEED, N, X )
+*> \brief \b DLARUV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION X( N )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLARUV( ISEED, N, X )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION X( N )
+* ..
+*
* Purpose
* =======
*
-* DLARUV returns a vector of n random real numbers from a uniform (0,1)
-* distribution (n <= 128).
-*
-* This is an auxiliary routine called by DLARNV and ZLARNV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARUV returns a vector of n random real numbers from a uniform (0,1)
+*> distribution (n <= 128).
+*>
+*> This is an auxiliary routine called by DLARNV and ZLARNV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of random numbers to be generated. N <= 128.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> The generated random numbers.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of random numbers to be generated. N <= 128.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
*
-* X (output) DOUBLE PRECISION array, dimension (N)
-* The generated random numbers.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine uses a multiplicative congruential method with modulus
+*> 2**48 and multiplier 33952834046453 (see G.S.Fishman,
+*> 'Multiplicative congruential random number generators with modulus
+*> 2**b: an exhaustive analysis for b = 32 and a partial analysis for
+*> b = 48', Math. Comp. 189, pp 331-344, 1990).
+*>
+*> 48-bit integers are stored in 4 integer array elements with 12 bits
+*> per element. Hence the routine is portable across machines with
+*> integers of 32 bits or more.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARUV( ISEED, N, X )
*
-* This routine uses a multiplicative congruential method with modulus
-* 2**48 and multiplier 33952834046453 (see G.S.Fishman,
-* 'Multiplicative congruential random number generators with modulus
-* 2**b: an exhaustive analysis for b = 32 and a partial analysis for
-* b = 48', Math. Comp. 189, pp 331-344, 1990).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 48-bit integers are stored in 4 integer array elements with 12 bits
-* per element. Hence the routine is portable across machines with
-* integers of 32 bits or more.
+* .. Scalar Arguments ..
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION X( N )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarz.f b/SRC/dlarz.f
index c4ac4fa4..a5f7d115 100644
--- a/SRC/dlarz.f
+++ b/SRC/dlarz.f
@@ -1,80 +1,155 @@
- SUBROUTINE DLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE
- INTEGER INCV, L, LDC, M, N
- DOUBLE PRECISION TAU
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b DLARZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, L, LDC, M, N
+* DOUBLE PRECISION TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLARZ applies a real elementary reflector H to a real M-by-N
-* matrix C, from either the left or the right. H is represented in the
-* form
-*
-* H = I - tau * v * v**T
-*
-* where tau is a real scalar and v is a real vector.
-*
-* If tau = 0, then H is taken to be the unit matrix.
-*
-*
-* H is a product of k elementary reflectors as returned by DTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARZ applies a real elementary reflector H to a real M-by-N
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*> H = I - tau * v * v**T
+*>
+*> where tau is a real scalar and v is a real vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*>
+*> H is a product of k elementary reflectors as returned by DTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* L (input) INTEGER
-* The number of entries of the vector V containing
-* the meaningful part of the Householder vectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* V (input) DOUBLE PRECISION array, dimension (1+(L-1)*abs(INCV))
-* The vector v in the representation of H as returned by
-* DTZRZF. V is not used if TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of entries of the vector V containing
+*> the meaningful part of the Householder vectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (1+(L-1)*abs(INCV))
+*> The vector v in the representation of H as returned by
+*> DTZRZF. V is not used if TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) DOUBLE PRECISION
-* The value tau in the representation of H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
+*> \date November 2011
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \ingroup doubleOTHERcomputational
*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER SIDE
+ INTEGER INCV, L, LDC, M, N
+ DOUBLE PRECISION TAU
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarzb.f b/SRC/dlarzb.f
index 46674774..a3900c28 100644
--- a/SRC/dlarzb.f
+++ b/SRC/dlarzb.f
@@ -1,99 +1,193 @@
- SUBROUTINE DLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
- $ LDV, T, LDT, C, LDC, WORK, LDWORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, SIDE, STOREV, TRANS
- INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ),
- $ WORK( LDWORK, * )
-* ..
-*
+*> \brief \b DLARZB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
+* LDV, T, LDT, C, LDC, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* DLARZB applies a real block reflector H or its transpose H**T to
-* a real distributed M-by-N C from the left or the right.
-*
-* Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARZB applies a real block reflector H or its transpose H**T to
+*> a real distributed M-by-N C from the left or the right.
+*>
+*> Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**T from the Left
-* = 'R': apply H or H**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H**T (Transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columnwise (not supported yet)
-* = 'R': Rowwise
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* K (input) INTEGER
-* The order of the matrix T (= the number of elementary
-* reflectors whose product defines the block reflector).
-*
-* L (input) INTEGER
-* The number of columns of the matrix V containing the
-* meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* V (input) DOUBLE PRECISION array, dimension (LDV,NV).
-* If STOREV = 'C', NV = K; if STOREV = 'R', NV = L.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K.
-*
-* T (input) DOUBLE PRECISION array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**T from the Left
+*> = 'R': apply H or H**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columnwise (not supported yet)
+*> = 'R': Rowwise
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T (= the number of elementary
+*> reflectors whose product defines the block reflector).
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix V containing the
+*> meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,NV).
+*> If STOREV = 'C', NV = K; if STOREV = 'R', NV = L.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LDWORK,K)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= max(1,N);
+*> if SIDE = 'R', LDWORK >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,K)
+*> \ingroup doubleOTHERcomputational
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= max(1,N);
-* if SIDE = 'R', LDWORK >= max(1,M).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
+ $ LDV, T, LDT, C, LDC, WORK, LDWORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, SIDE, STOREV, TRANS
+ INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlarzt.f b/SRC/dlarzt.f
index 7decd445..f91d46dc 100644
--- a/SRC/dlarzt.f
+++ b/SRC/dlarzt.f
@@ -1,123 +1,168 @@
- SUBROUTINE DLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, STOREV
- INTEGER K, LDT, LDV, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * )
-* ..
-*
+*> \brief \b DLARZT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, STOREV
+* INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* DLARZT forms the triangular factor T of a real block reflector
-* H of order > n, which is defined as a product of k elementary
-* reflectors.
-*
-* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*
-* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
-*
-* If STOREV = 'C', the vector which defines the elementary reflector
-* H(i) is stored in the i-th column of the array V, and
-*
-* H = I - V * T * V**T
-*
-* If STOREV = 'R', the vector which defines the elementary reflector
-* H(i) is stored in the i-th row of the array V, and
-*
-* H = I - V**T * T * V
-*
-* Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARZT forms the triangular factor T of a real block reflector
+*> H of order > n, which is defined as a product of k elementary
+*> reflectors.
+*>
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
+*>
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*>
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
+*>
+*> H = I - V * T * V**T
+*>
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
+*>
+*> H = I - V**T * T * V
+*>
+*> Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIRECT (input) CHARACTER*1
-* Specifies the order in which the elementary reflectors are
-* multiplied to form the block reflector:
-* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Specifies how the vectors which define the elementary
-* reflectors are stored (see also Further Details):
-* = 'C': columnwise (not supported yet)
-* = 'R': rowwise
-*
-* N (input) INTEGER
-* The order of the block reflector H. N >= 0.
-*
-* K (input) INTEGER
-* The order of the triangular factor T (= the number of
-* elementary reflectors). K >= 1.
-*
-* V (input/output) DOUBLE PRECISION array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,N) if STOREV = 'R'
-* The matrix V. See further details.
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies the order in which the elementary reflectors are
+*> multiplied to form the block reflector:
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i).
+*> \date November 2011
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,K)
-* The k by k triangular factor T of the block reflector.
-* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-* lower triangular. The rest of the array is not used.
+*> \ingroup doubleOTHERcomputational
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors are stored (see also Further Details):
+*> = 'C': columnwise (not supported yet)
+*> = 'R': rowwise
+*>
+*> N (input) INTEGER
+*> The order of the block reflector H. N >= 0.
+*>
+*> K (input) INTEGER
+*> The order of the triangular factor T (= the number of
+*> elementary reflectors). K >= 1.
+*>
+*> V (input/output) DOUBLE PRECISION array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,N) if STOREV = 'R'
+*> The matrix V. See further details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>
+*> TAU (input) DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i).
+*>
+*> T (output) DOUBLE PRECISION array, dimension (LDT,K)
+*> The k by k triangular factor T of the block reflector.
+*> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*> lower triangular. The rest of the array is not used.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> ______V_____
+*> ( v1 v2 v3 ) / \
+*> ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 )
+*> V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 )
+*> ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 )
+*> ( v1 v2 v3 )
+*> . . .
+*> . . .
+*> 1 . .
+*> 1 .
+*> 1
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> ______V_____
+*> 1 / \
+*> . 1 ( 1 . . . . v1 v1 v1 v1 v1 )
+*> . . 1 ( . 1 . . . v2 v2 v2 v2 v2 )
+*> . . . ( . . 1 . . v3 v3 v3 v3 v3 )
+*> . . .
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*> V = ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* ______V_____
-* ( v1 v2 v3 ) / \
-* ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 )
-* V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 )
-* ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 )
-* ( v1 v2 v3 )
-* . . .
-* . . .
-* 1 . .
-* 1 .
-* 1
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
-*
-* ______V_____
-* 1 / \
-* . 1 ( 1 . . . . v1 v1 v1 v1 v1 )
-* . . 1 ( . 1 . . . v2 v2 v2 v2 v2 )
-* . . . ( . . 1 . . v3 v3 v3 v3 v3 )
-* . . .
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-* V = ( v1 v2 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, STOREV
+ INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlas2.f b/SRC/dlas2.f
index 27e09b44..d2c5ffb9 100644
--- a/SRC/dlas2.f
+++ b/SRC/dlas2.f
@@ -1,59 +1,114 @@
- SUBROUTINE DLAS2( F, G, H, SSMIN, SSMAX )
+*> \brief \b DLAS2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION F, G, H, SSMAX, SSMIN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAS2( F, G, H, SSMIN, SSMAX )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION F, G, H, SSMAX, SSMIN
+* ..
+*
* Purpose
* =======
*
-* DLAS2 computes the singular values of the 2-by-2 matrix
-* [ F G ]
-* [ 0 H ].
-* On return, SSMIN is the smaller singular value and SSMAX is the
-* larger singular value.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAS2 computes the singular values of the 2-by-2 matrix
+*> [ F G ]
+*> [ 0 H ].
+*> On return, SSMIN is the smaller singular value and SSMAX is the
+*> larger singular value.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) DOUBLE PRECISION
-* The (1,1) element of the 2-by-2 matrix.
+*> \param[in] F
+*> \verbatim
+*> F is DOUBLE PRECISION
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is DOUBLE PRECISION
+*> The (1,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is DOUBLE PRECISION
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] SSMIN
+*> \verbatim
+*> SSMIN is DOUBLE PRECISION
+*> The smaller singular value.
+*> \endverbatim
+*>
+*> \param[out] SSMAX
+*> \verbatim
+*> SSMAX is DOUBLE PRECISION
+*> The larger singular value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* G (input) DOUBLE PRECISION
-* The (1,2) element of the 2-by-2 matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* H (input) DOUBLE PRECISION
-* The (2,2) element of the 2-by-2 matrix.
+*> \date November 2011
*
-* SSMIN (output) DOUBLE PRECISION
-* The smaller singular value.
+*> \ingroup auxOTHERauxiliary
*
-* SSMAX (output) DOUBLE PRECISION
-* The larger singular value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Barring over/underflow, all output quantities are correct to within
+*> a few units in the last place (ulps), even in the absence of a guard
+*> digit in addition/subtraction.
+*>
+*> In IEEE arithmetic, the code works correctly if one matrix element is
+*> infinite.
+*>
+*> Overflow will not occur unless the largest singular value itself
+*> overflows, or is within a few ulps of overflow. (On machines with
+*> partial overflow, like the Cray, overflow may occur if the largest
+*> singular value is within a factor of 2 of overflow.)
+*>
+*> Underflow is harmless if underflow is gradual. Otherwise, results
+*> may correspond to a matrix modified by perturbations of size near
+*> the underflow threshold.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLAS2( F, G, H, SSMIN, SSMAX )
*
-* Barring over/underflow, all output quantities are correct to within
-* a few units in the last place (ulps), even in the absence of a guard
-* digit in addition/subtraction.
-*
-* In IEEE arithmetic, the code works correctly if one matrix element is
-* infinite.
-*
-* Overflow will not occur unless the largest singular value itself
-* overflows, or is within a few ulps of overflow. (On machines with
-* partial overflow, like the Cray, overflow may occur if the largest
-* singular value is within a factor of 2 of overflow.)
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Underflow is harmless if underflow is gradual. Otherwise, results
-* may correspond to a matrix modified by perturbations of size near
-* the underflow threshold.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION F, G, H, SSMAX, SSMIN
+* ..
*
* ====================================================================
*
diff --git a/SRC/dlascl.f b/SRC/dlascl.f
index 7cdb8940..645f56ed 100644
--- a/SRC/dlascl.f
+++ b/SRC/dlascl.f
@@ -1,9 +1,139 @@
+*> \brief \b DLASCL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TYPE
+* INTEGER INFO, KL, KU, LDA, M, N
+* DOUBLE PRECISION CFROM, CTO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASCL multiplies the M by N real matrix A by the real scalar
+*> CTO/CFROM. This is done without over/underflow as long as the final
+*> result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
+*> A may be full, upper triangular, lower triangular, upper Hessenberg,
+*> or banded.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> TYPE indices the storage type of the input matrix.
+*> = 'G': A is a full matrix.
+*> = 'L': A is a lower triangular matrix.
+*> = 'U': A is an upper triangular matrix.
+*> = 'H': A is an upper Hessenberg matrix.
+*> = 'B': A is a symmetric band matrix with lower bandwidth KL
+*> and upper bandwidth KU and with the only the lower
+*> half stored.
+*> = 'Q': A is a symmetric band matrix with lower bandwidth KL
+*> and upper bandwidth KU and with the only the upper
+*> half stored.
+*> = 'Z': A is a band matrix with lower bandwidth KL and upper
+*> bandwidth KU. See DGBTRF for storage details.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower bandwidth of A. Referenced only if TYPE = 'B',
+*> 'Q' or 'Z'.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper bandwidth of A. Referenced only if TYPE = 'B',
+*> 'Q' or 'Z'.
+*> \endverbatim
+*>
+*> \param[in] CFROM
+*> \verbatim
+*> CFROM is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] CTO
+*> \verbatim
+*> CTO is DOUBLE PRECISION
+*> The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
+*> without over/underflow if the final result CTO*A(I,J)/CFROM
+*> can be represented without over/underflow. CFROM must be
+*> nonzero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The matrix to be multiplied by CTO/CFROM. See TYPE for the
+*> storage type.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 - successful exit
+*> <0 - if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TYPE
@@ -14,66 +144,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DLASCL multiplies the M by N real matrix A by the real scalar
-* CTO/CFROM. This is done without over/underflow as long as the final
-* result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
-* A may be full, upper triangular, lower triangular, upper Hessenberg,
-* or banded.
-*
-* Arguments
-* =========
-*
-* TYPE (input) CHARACTER*1
-* TYPE indices the storage type of the input matrix.
-* = 'G': A is a full matrix.
-* = 'L': A is a lower triangular matrix.
-* = 'U': A is an upper triangular matrix.
-* = 'H': A is an upper Hessenberg matrix.
-* = 'B': A is a symmetric band matrix with lower bandwidth KL
-* and upper bandwidth KU and with the only the lower
-* half stored.
-* = 'Q': A is a symmetric band matrix with lower bandwidth KL
-* and upper bandwidth KU and with the only the upper
-* half stored.
-* = 'Z': A is a band matrix with lower bandwidth KL and upper
-* bandwidth KU. See DGBTRF for storage details.
-*
-* KL (input) INTEGER
-* The lower bandwidth of A. Referenced only if TYPE = 'B',
-* 'Q' or 'Z'.
-*
-* KU (input) INTEGER
-* The upper bandwidth of A. Referenced only if TYPE = 'B',
-* 'Q' or 'Z'.
-*
-* CFROM (input) DOUBLE PRECISION
-*
-* CTO (input) DOUBLE PRECISION
-* The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
-* without over/underflow if the final result CTO*A(I,J)/CFROM
-* can be represented without over/underflow. CFROM must be
-* nonzero.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* The matrix to be multiplied by CTO/CFROM. See TYPE for the
-* storage type.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* INFO (output) INTEGER
-* 0 - successful exit
-* <0 - if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlascl2.f b/SRC/dlascl2.f
index eefccbbf..9346a883 100644
--- a/SRC/dlascl2.f
+++ b/SRC/dlascl2.f
@@ -1,50 +1,98 @@
- SUBROUTINE DLASCL2 ( M, N, D, X, LDX )
+*> \brief \b DLASCL2
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER M, N, LDX
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), X( LDX, * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLASCL2 ( M, N, D, X, LDX )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DLASCL2 performs a diagonal scaling on a vector:
-* x <-- D * x
-* where the diagonal matrix D is stored as a vector.
-*
-* Eventually to be replaced by BLAS_dge_diag_scale in the new BLAS
-* standard.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASCL2 performs a diagonal scaling on a vector:
+*> x <-- D * x
+*> where the diagonal matrix D is stored as a vector.
+*>
+*> Eventually to be replaced by BLAS_dge_diag_scale in the new BLAS
+*> standard.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of D and X. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of D and X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of D and X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, length M
+*> Diagonal matrix D, stored as a vector of length M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,N)
+*> On entry, the vector X to be scaled by D.
+*> On exit, the scaled vector.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the vector X. LDX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of D and X. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) DOUBLE PRECISION array, length M
-* Diagonal matrix D, stored as a vector of length M.
+*> \date November 2011
*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,N)
-* On entry, the vector X to be scaled by D.
-* On exit, the scaled vector.
+*> \ingroup doubleOTHERcomputational
*
-* LDX (input) INTEGER
-* The leading dimension of the vector X. LDX >= 0.
+* =====================================================================
+ SUBROUTINE DLASCL2 ( M, N, D, X, LDX )
+*
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasd0.f b/SRC/dlasd0.f
index 2ad48270..59a16a90 100644
--- a/SRC/dlasd0.f
+++ b/SRC/dlasd0.f
@@ -1,86 +1,168 @@
- SUBROUTINE DLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
- $ WORK, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDU, LDVT, N, SMLSIZ, SQRE
-* ..
-* .. Array Arguments ..
- INTEGER IWORK( * )
- DOUBLE PRECISION D( * ), E( * ), U( LDU, * ), VT( LDVT, * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b DLASD0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDU, LDVT, N, SMLSIZ, SQRE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), U( LDU, * ), VT( LDVT, * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* Using a divide and conquer approach, DLASD0 computes the singular
-* value decomposition (SVD) of a real upper bidiagonal N-by-M
-* matrix B with diagonal D and offdiagonal E, where M = N + SQRE.
-* The algorithm computes orthogonal matrices U and VT such that
-* B = U * S * VT. The singular values S are overwritten on D.
-*
-* A related subroutine, DLASDA, computes only the singular values,
-* and optionally, the singular vectors in compact form.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Using a divide and conquer approach, DLASD0 computes the singular
+*> value decomposition (SVD) of a real upper bidiagonal N-by-M
+*> matrix B with diagonal D and offdiagonal E, where M = N + SQRE.
+*> The algorithm computes orthogonal matrices U and VT such that
+*> B = U * S * VT. The singular values S are overwritten on D.
+*>
+*> A related subroutine, DLASDA, computes only the singular values,
+*> and optionally, the singular vectors in compact form.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* On entry, the row dimension of the upper bidiagonal matrix.
-* This is also the dimension of the main diagonal array D.
-*
-* SQRE (input) INTEGER
-* Specifies the column dimension of the bidiagonal matrix.
-* = 0: The bidiagonal matrix has column dimension M = N;
-* = 1: The bidiagonal matrix has column dimension M = N+1;
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry D contains the main diagonal of the bidiagonal
-* matrix.
-* On exit D, if INFO = 0, contains its singular values.
-*
-* E (input) DOUBLE PRECISION array, dimension (M-1)
-* Contains the subdiagonal entries of the bidiagonal matrix.
-* On exit, E has been destroyed.
-*
-* U (output) DOUBLE PRECISION array, dimension at least (LDQ, N)
-* On exit, U contains the left singular vectors.
-*
-* LDU (input) INTEGER
-* On entry, leading dimension of U.
-*
-* VT (output) DOUBLE PRECISION array, dimension at least (LDVT, M)
-* On exit, VT**T contains the right singular vectors.
-*
-* LDVT (input) INTEGER
-* On entry, leading dimension of VT.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, the row dimension of the upper bidiagonal matrix.
+*> This is also the dimension of the main diagonal array D.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> Specifies the column dimension of the bidiagonal matrix.
+*> = 0: The bidiagonal matrix has column dimension M = N;
+*> = 1: The bidiagonal matrix has column dimension M = N+1;
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry D contains the main diagonal of the bidiagonal
+*> matrix.
+*> On exit D, if INFO = 0, contains its singular values.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (M-1)
+*> Contains the subdiagonal entries of the bidiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension at least (LDQ, N)
+*> On exit, U contains the left singular vectors.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> On entry, leading dimension of U.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension at least (LDVT, M)
+*> On exit, VT**T contains the right singular vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> On entry, leading dimension of VT.
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> On entry, maximum size of the subproblems at the
+*> bottom of the computation tree.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER work array.
+*> Dimension must be at least (8 * N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION work array.
+*> Dimension must be at least (3 * M**2 + 2 * M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SMLSIZ (input) INTEGER
-* On entry, maximum size of the subproblems at the
-* bottom of the computation tree.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IWORK (workspace) INTEGER work array.
-* Dimension must be at least (8 * N)
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION work array.
-* Dimension must be at least (3 * M**2 + 2 * M)
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
+ $ WORK, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER INFO, LDU, LDVT, N, SMLSIZ, SQRE
+* ..
+* .. Array Arguments ..
+ INTEGER IWORK( * )
+ DOUBLE PRECISION D( * ), E( * ), U( LDU, * ), VT( LDVT, * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasd1.f b/SRC/dlasd1.f
index 23f1587e..fc3d8efd 100644
--- a/SRC/dlasd1.f
+++ b/SRC/dlasd1.f
@@ -1,132 +1,221 @@
- SUBROUTINE DLASD1( NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT,
- $ IDXQ, IWORK, WORK, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDU, LDVT, NL, NR, SQRE
- DOUBLE PRECISION ALPHA, BETA
-* ..
-* .. Array Arguments ..
- INTEGER IDXQ( * ), IWORK( * )
- DOUBLE PRECISION D( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
-* ..
-*
+*> \brief \b DLASD1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD1( NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT,
+* IDXQ, IWORK, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDU, LDVT, NL, NR, SQRE
+* DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* INTEGER IDXQ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLASD1 computes the SVD of an upper bidiagonal N-by-M matrix B,
-* where N = NL + NR + 1 and M = N + SQRE. DLASD1 is called from DLASD0.
-*
-* A related subroutine DLASD7 handles the case in which the singular
-* values (and the singular vectors in factored form) are desired.
-*
-* DLASD1 computes the SVD as follows:
-*
-* ( D1(in) 0 0 0 )
-* B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
-* ( 0 0 D2(in) 0 )
-*
-* = U(out) * ( D(out) 0) * VT(out)
-*
-* where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M
-* with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
-* elsewhere; and the entry b is empty if SQRE = 0.
-*
-* The left singular vectors of the original matrix are stored in U, and
-* the transpose of the right singular vectors are stored in VT, and the
-* singular values are in D. The algorithm consists of three stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple singular values or when there are zeros in
-* the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine DLASD2.
-*
-* The second stage consists of calculating the updated
-* singular values. This is done by finding the square roots of the
-* roots of the secular equation via the routine DLASD4 (as called
-* by DLASD3). This routine also calculates the singular vectors of
-* the current problem.
-*
-* The final stage consists of computing the updated singular vectors
-* directly using the updated singular values. The singular vectors
-* for the current problem are multiplied with the singular vectors
-* from the overall problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASD1 computes the SVD of an upper bidiagonal N-by-M matrix B,
+*> where N = NL + NR + 1 and M = N + SQRE. DLASD1 is called from DLASD0.
+*>
+*> A related subroutine DLASD7 handles the case in which the singular
+*> values (and the singular vectors in factored form) are desired.
+*>
+*> DLASD1 computes the SVD as follows:
+*>
+*> ( D1(in) 0 0 0 )
+*> B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
+*> ( 0 0 D2(in) 0 )
+*>
+*> = U(out) * ( D(out) 0) * VT(out)
+*>
+*> where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M
+*> with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
+*> elsewhere; and the entry b is empty if SQRE = 0.
+*>
+*> The left singular vectors of the original matrix are stored in U, and
+*> the transpose of the right singular vectors are stored in VT, and the
+*> singular values are in D. The algorithm consists of three stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple singular values or when there are zeros in
+*> the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine DLASD2.
+*>
+*> The second stage consists of calculating the updated
+*> singular values. This is done by finding the square roots of the
+*> roots of the secular equation via the routine DLASD4 (as called
+*> by DLASD3). This routine also calculates the singular vectors of
+*> the current problem.
+*>
+*> The final stage consists of computing the updated singular vectors
+*> directly using the updated singular values. The singular vectors
+*> for the current problem are multiplied with the singular vectors
+*> from the overall problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has row dimension N = NL + NR + 1,
-* and column dimension M = N + SQRE.
-*
-* D (input/output) DOUBLE PRECISION array,
-* dimension (N = NL+NR+1).
-* On entry D(1:NL,1:NL) contains the singular values of the
-* upper block; and D(NL+2:N) contains the singular values of
-* the lower block. On exit D(1:N) contains the singular values
-* of the modified matrix.
-*
-* ALPHA (input/output) DOUBLE PRECISION
-* Contains the diagonal element associated with the added row.
-*
-* BETA (input/output) DOUBLE PRECISION
-* Contains the off-diagonal element associated with the added
-* row.
-*
-* U (input/output) DOUBLE PRECISION array, dimension(LDU,N)
-* On entry U(1:NL, 1:NL) contains the left singular vectors of
-* the upper block; U(NL+2:N, NL+2:N) contains the left singular
-* vectors of the lower block. On exit U contains the left
-* singular vectors of the bidiagonal matrix.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max( 1, N ).
-*
-* VT (input/output) DOUBLE PRECISION array, dimension(LDVT,M)
-* where M = N + SQRE.
-* On entry VT(1:NL+1, 1:NL+1)**T contains the right singular
-* vectors of the upper block; VT(NL+2:M, NL+2:M)**T contains
-* the right singular vectors of the lower block. On exit
-* VT**T contains the right singular vectors of the
-* bidiagonal matrix.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= max( 1, M ).
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has row dimension N = NL + NR + 1,
+*> and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array,
+*> dimension (N = NL+NR+1).
+*> On entry D(1:NL,1:NL) contains the singular values of the
+*> upper block; and D(NL+2:N) contains the singular values of
+*> the lower block. On exit D(1:N) contains the singular values
+*> of the modified matrix.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> Contains the diagonal element associated with the added row.
+*> \endverbatim
+*>
+*> \param[in,out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> Contains the off-diagonal element associated with the added
+*> row.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension(LDU,N)
+*> On entry U(1:NL, 1:NL) contains the left singular vectors of
+*> the upper block; U(NL+2:N, NL+2:N) contains the left singular
+*> vectors of the lower block. On exit U contains the left
+*> singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension(LDVT,M)
+*> where M = N + SQRE.
+*> On entry VT(1:NL+1, 1:NL+1)**T contains the right singular
+*> vectors of the upper block; VT(NL+2:M, NL+2:M)**T contains
+*> the right singular vectors of the lower block. On exit
+*> VT**T contains the right singular vectors of the
+*> bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= max( 1, M ).
+*> \endverbatim
+*>
+*> \param[out] IDXQ
+*> \verbatim
+*> IDXQ is INTEGER array, dimension(N)
+*> This contains the permutation which will reintegrate the
+*> subproblem just solved back into sorted order, i.e.
+*> D( IDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension( 4 * N )
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension( 3*M**2 + 2*M )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IDXQ (output) INTEGER array, dimension(N)
-* This contains the permutation which will reintegrate the
-* subproblem just solved back into sorted order, i.e.
-* D( IDXQ( I = 1, N ) ) will be in ascending order.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IWORK (workspace) INTEGER array, dimension( 4 * N )
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension( 3*M**2 + 2*M )
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASD1( NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT,
+ $ IDXQ, IWORK, WORK, INFO )
*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDU, LDVT, NL, NR, SQRE
+ DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+ INTEGER IDXQ( * ), IWORK( * )
+ DOUBLE PRECISION D( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasd2.f b/SRC/dlasd2.f
index 7ff9066e..267cc2cb 100644
--- a/SRC/dlasd2.f
+++ b/SRC/dlasd2.f
@@ -1,3 +1,270 @@
+*> \brief \b DLASD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD2( NL, NR, SQRE, K, D, Z, ALPHA, BETA, U, LDU, VT,
+* LDVT, DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX,
+* IDXC, IDXQ, COLTYP, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE
+* DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* INTEGER COLTYP( * ), IDX( * ), IDXC( * ), IDXP( * ),
+* $ IDXQ( * )
+* DOUBLE PRECISION D( * ), DSIGMA( * ), U( LDU, * ),
+* $ U2( LDU2, * ), VT( LDVT, * ), VT2( LDVT2, * ),
+* $ Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASD2 merges the two sets of singular values together into a single
+*> sorted set. Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur: when two or more
+*> singular values are close together or if there is a tiny entry in the
+*> Z vector. For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*>
+*> DLASD2 is called from DLASD1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has N = NL + NR + 1 rows and
+*> M = N + SQRE >= N columns.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix,
+*> This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension(N)
+*> On entry D contains the singular values of the two submatrices
+*> to be combined. On exit D contains the trailing (N-K) updated
+*> singular values (those which were deflated) sorted into
+*> increasing order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension(N)
+*> On exit Z contains the updating row vector in the secular
+*> equation.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> Contains the diagonal element associated with the added row.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> Contains the off-diagonal element associated with the added
+*> row.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension(LDU,N)
+*> On entry U contains the left singular vectors of two
+*> submatrices in the two square blocks with corners at (1,1),
+*> (NL, NL), and (NL+2, NL+2), (N,N).
+*> On exit U contains the trailing (N-K) updated left singular
+*> vectors (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension(LDVT,M)
+*> On entry VT**T contains the right singular vectors of two
+*> submatrices in the two square blocks with corners at (1,1),
+*> (NL+1, NL+1), and (NL+2, NL+2), (M,M).
+*> On exit VT**T contains the trailing (N-K) updated right singular
+*> vectors (those which were deflated) in its last N-K columns.
+*> In case SQRE =1, the last row of VT spans the right null
+*> space.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= M.
+*> \endverbatim
+*>
+*> \param[out] DSIGMA
+*> \verbatim
+*> DSIGMA is DOUBLE PRECISION array, dimension (N)
+*> Contains a copy of the diagonal elements (K-1 singular values
+*> and one zero) in the secular equation.
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is DOUBLE PRECISION array, dimension(LDU2,N)
+*> Contains a copy of the first K-1 left singular vectors which
+*> will be used by DLASD3 in a matrix multiply (DGEMM) to solve
+*> for the new left singular vectors. U2 is arranged into four
+*> blocks. The first block contains a column with 1 at NL+1 and
+*> zero everywhere else; the second block contains non-zero
+*> entries only at and above NL; the third contains non-zero
+*> entries only below NL+1; and the fourth is dense.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2. LDU2 >= N.
+*> \endverbatim
+*>
+*> \param[out] VT2
+*> \verbatim
+*> VT2 is DOUBLE PRECISION array, dimension(LDVT2,N)
+*> VT2**T contains a copy of the first K right singular vectors
+*> which will be used by DLASD3 in a matrix multiply (DGEMM) to
+*> solve for the new right singular vectors. VT2 is arranged into
+*> three blocks. The first block contains a row that corresponds
+*> to the special 0 diagonal element in SIGMA; the second block
+*> contains non-zeros only at and before NL +1; the third block
+*> contains non-zeros only at and after NL +2.
+*> \endverbatim
+*>
+*> \param[in] LDVT2
+*> \verbatim
+*> LDVT2 is INTEGER
+*> The leading dimension of the array VT2. LDVT2 >= M.
+*> \endverbatim
+*>
+*> \param[out] IDXP
+*> \verbatim
+*> IDXP is INTEGER array dimension(N)
+*> This will contain the permutation used to place deflated
+*> values of D at the end of the array. On output IDXP(2:K)
+*> points to the nondeflated D-values and IDXP(K+1:N)
+*> points to the deflated singular values.
+*> \endverbatim
+*>
+*> \param[out] IDX
+*> \verbatim
+*> IDX is INTEGER array dimension(N)
+*> This will contain the permutation used to sort the contents of
+*> D into ascending order.
+*> \endverbatim
+*>
+*> \param[out] IDXC
+*> \verbatim
+*> IDXC is INTEGER array dimension(N)
+*> This will contain the permutation used to arrange the columns
+*> of the deflated U matrix into three groups: the first group
+*> contains non-zero entries only at and above NL, the second
+*> contains non-zero entries only below NL+2, and the third is
+*> dense.
+*> \endverbatim
+*>
+*> \param[in,out] IDXQ
+*> \verbatim
+*> IDXQ is INTEGER array dimension(N)
+*> This contains the permutation which separately sorts the two
+*> sub-problems in D into ascending order. Note that entries in
+*> the first hlaf of this permutation must first be moved one
+*> position backward; and entries in the second half
+*> must first have NL+1 added to their values.
+*> \endverbatim
+*>
+*> \param[out] COLTYP
+*> \verbatim
+*> COLTYP is INTEGER array dimension(N)
+*> As workspace, this will contain a label which will indicate
+*> which of the following types a column in the U2 matrix or a
+*> row in the VT2 matrix is:
+*> 1 : non-zero in the upper half only
+*> 2 : non-zero in the lower half only
+*> 3 : dense
+*> 4 : deflated
+*> \endverbatim
+*> \verbatim
+*> On exit, it is an array of dimension 4, with COLTYP(I) being
+*> the dimension of the I-th type columns.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLASD2( NL, NR, SQRE, K, D, Z, ALPHA, BETA, U, LDU, VT,
$ LDVT, DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX,
$ IDXC, IDXQ, COLTYP, INFO )
@@ -5,7 +272,7 @@
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE
@@ -19,152 +286,6 @@
$ Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASD2 merges the two sets of singular values together into a single
-* sorted set. Then it tries to deflate the size of the problem.
-* There are two ways in which deflation can occur: when two or more
-* singular values are close together or if there is a tiny entry in the
-* Z vector. For each such occurrence the order of the related secular
-* equation problem is reduced by one.
-*
-* DLASD2 is called from DLASD1.
-*
-* Arguments
-* =========
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has N = NL + NR + 1 rows and
-* M = N + SQRE >= N columns.
-*
-* K (output) INTEGER
-* Contains the dimension of the non-deflated matrix,
-* This is the order of the related secular equation. 1 <= K <=N.
-*
-* D (input/output) DOUBLE PRECISION array, dimension(N)
-* On entry D contains the singular values of the two submatrices
-* to be combined. On exit D contains the trailing (N-K) updated
-* singular values (those which were deflated) sorted into
-* increasing order.
-*
-* Z (output) DOUBLE PRECISION array, dimension(N)
-* On exit Z contains the updating row vector in the secular
-* equation.
-*
-* ALPHA (input) DOUBLE PRECISION
-* Contains the diagonal element associated with the added row.
-*
-* BETA (input) DOUBLE PRECISION
-* Contains the off-diagonal element associated with the added
-* row.
-*
-* U (input/output) DOUBLE PRECISION array, dimension(LDU,N)
-* On entry U contains the left singular vectors of two
-* submatrices in the two square blocks with corners at (1,1),
-* (NL, NL), and (NL+2, NL+2), (N,N).
-* On exit U contains the trailing (N-K) updated left singular
-* vectors (those which were deflated) in its last N-K columns.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= N.
-*
-* VT (input/output) DOUBLE PRECISION array, dimension(LDVT,M)
-* On entry VT**T contains the right singular vectors of two
-* submatrices in the two square blocks with corners at (1,1),
-* (NL+1, NL+1), and (NL+2, NL+2), (M,M).
-* On exit VT**T contains the trailing (N-K) updated right singular
-* vectors (those which were deflated) in its last N-K columns.
-* In case SQRE =1, the last row of VT spans the right null
-* space.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= M.
-*
-* DSIGMA (output) DOUBLE PRECISION array, dimension (N)
-* Contains a copy of the diagonal elements (K-1 singular values
-* and one zero) in the secular equation.
-*
-* U2 (output) DOUBLE PRECISION array, dimension(LDU2,N)
-* Contains a copy of the first K-1 left singular vectors which
-* will be used by DLASD3 in a matrix multiply (DGEMM) to solve
-* for the new left singular vectors. U2 is arranged into four
-* blocks. The first block contains a column with 1 at NL+1 and
-* zero everywhere else; the second block contains non-zero
-* entries only at and above NL; the third contains non-zero
-* entries only below NL+1; and the fourth is dense.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2. LDU2 >= N.
-*
-* VT2 (output) DOUBLE PRECISION array, dimension(LDVT2,N)
-* VT2**T contains a copy of the first K right singular vectors
-* which will be used by DLASD3 in a matrix multiply (DGEMM) to
-* solve for the new right singular vectors. VT2 is arranged into
-* three blocks. The first block contains a row that corresponds
-* to the special 0 diagonal element in SIGMA; the second block
-* contains non-zeros only at and before NL +1; the third block
-* contains non-zeros only at and after NL +2.
-*
-* LDVT2 (input) INTEGER
-* The leading dimension of the array VT2. LDVT2 >= M.
-*
-* IDXP (workspace) INTEGER array dimension(N)
-* This will contain the permutation used to place deflated
-* values of D at the end of the array. On output IDXP(2:K)
-* points to the nondeflated D-values and IDXP(K+1:N)
-* points to the deflated singular values.
-*
-* IDX (workspace) INTEGER array dimension(N)
-* This will contain the permutation used to sort the contents of
-* D into ascending order.
-*
-* IDXC (output) INTEGER array dimension(N)
-* This will contain the permutation used to arrange the columns
-* of the deflated U matrix into three groups: the first group
-* contains non-zero entries only at and above NL, the second
-* contains non-zero entries only below NL+2, and the third is
-* dense.
-*
-* IDXQ (input/output) INTEGER array dimension(N)
-* This contains the permutation which separately sorts the two
-* sub-problems in D into ascending order. Note that entries in
-* the first hlaf of this permutation must first be moved one
-* position backward; and entries in the second half
-* must first have NL+1 added to their values.
-*
-* COLTYP (workspace/output) INTEGER array dimension(N)
-* As workspace, this will contain a label which will indicate
-* which of the following types a column in the U2 matrix or a
-* row in the VT2 matrix is:
-* 1 : non-zero in the upper half only
-* 2 : non-zero in the lower half only
-* 3 : dense
-* 4 : deflated
-*
-* On exit, it is an array of dimension 4, with COLTYP(I) being
-* the dimension of the I-th type columns.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasd3.f b/SRC/dlasd3.f
index 5f3111c7..d360c4c7 100644
--- a/SRC/dlasd3.f
+++ b/SRC/dlasd3.f
@@ -1,3 +1,226 @@
+*> \brief \b DLASD3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD3( NL, NR, SQRE, K, D, Q, LDQ, DSIGMA, U, LDU, U2,
+* LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR,
+* $ SQRE
+* ..
+* .. Array Arguments ..
+* INTEGER CTOT( * ), IDXC( * )
+* DOUBLE PRECISION D( * ), DSIGMA( * ), Q( LDQ, * ), U( LDU, * ),
+* $ U2( LDU2, * ), VT( LDVT, * ), VT2( LDVT2, * ),
+* $ Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASD3 finds all the square roots of the roots of the secular
+*> equation, as defined by the values in D and Z. It makes the
+*> appropriate calls to DLASD4 and then updates the singular
+*> vectors by matrix multiplication.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*> DLASD3 is called from DLASD1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has N = NL + NR + 1 rows and
+*> M = N + SQRE >= N columns.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The size of the secular equation, 1 =< K = < N.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension(K)
+*> On exit the square roots of the roots of the secular equation,
+*> in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array,
+*> dimension at least (LDQ,K).
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= K.
+*> \endverbatim
+*>
+*> \param[in] DSIGMA
+*> \verbatim
+*> DSIGMA is DOUBLE PRECISION array, dimension(K)
+*> The first K elements of this array contain the old roots
+*> of the deflated updating problem. These are the poles
+*> of the secular equation.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> The last N - K columns of this matrix contain the deflated
+*> left singular vectors.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= N.
+*> \endverbatim
+*>
+*> \param[in,out] U2
+*> \verbatim
+*> U2 is DOUBLE PRECISION array, dimension (LDU2, N)
+*> The first K columns of this matrix contain the non-deflated
+*> left singular vectors for the split problem.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2. LDU2 >= N.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension (LDVT, M)
+*> The last M - K columns of VT**T contain the deflated
+*> right singular vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VT2
+*> \verbatim
+*> VT2 is DOUBLE PRECISION array, dimension (LDVT2, N)
+*> The first K columns of VT2**T contain the non-deflated
+*> right singular vectors for the split problem.
+*> \endverbatim
+*>
+*> \param[in] LDVT2
+*> \verbatim
+*> LDVT2 is INTEGER
+*> The leading dimension of the array VT2. LDVT2 >= N.
+*> \endverbatim
+*>
+*> \param[in] IDXC
+*> \verbatim
+*> IDXC is INTEGER array, dimension ( N )
+*> The permutation used to arrange the columns of U (and rows of
+*> VT) into three groups: the first group contains non-zero
+*> entries only at and above (or before) NL +1; the second
+*> contains non-zero entries only at and below (or after) NL+2;
+*> and the third is dense. The first column of U and the row of
+*> VT are treated separately, however.
+*> \endverbatim
+*> \verbatim
+*> The rows of the singular vectors found by DLASD4
+*> must be likewise permuted before the matrix multiplies can
+*> take place.
+*> \endverbatim
+*>
+*> \param[in] CTOT
+*> \verbatim
+*> CTOT is INTEGER array, dimension ( 4 )
+*> A count of the total number of the various types of columns
+*> in U (or rows in VT), as described in IDXC. The fourth column
+*> type is any column which has been deflated.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (K)
+*> The first K elements of this array contain the components
+*> of the deflation-adjusted updating row vector.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLASD3( NL, NR, SQRE, K, D, Q, LDQ, DSIGMA, U, LDU, U2,
$ LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z,
$ INFO )
@@ -5,7 +228,7 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR,
@@ -18,118 +241,6 @@
$ Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASD3 finds all the square roots of the roots of the secular
-* equation, as defined by the values in D and Z. It makes the
-* appropriate calls to DLASD4 and then updates the singular
-* vectors by matrix multiplication.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* DLASD3 is called from DLASD1.
-*
-* Arguments
-* =========
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has N = NL + NR + 1 rows and
-* M = N + SQRE >= N columns.
-*
-* K (input) INTEGER
-* The size of the secular equation, 1 =< K = < N.
-*
-* D (output) DOUBLE PRECISION array, dimension(K)
-* On exit the square roots of the roots of the secular equation,
-* in ascending order.
-*
-* Q (workspace) DOUBLE PRECISION array,
-* dimension at least (LDQ,K).
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= K.
-*
-* DSIGMA (input) DOUBLE PRECISION array, dimension(K)
-* The first K elements of this array contain the old roots
-* of the deflated updating problem. These are the poles
-* of the secular equation.
-*
-* U (output) DOUBLE PRECISION array, dimension (LDU, N)
-* The last N - K columns of this matrix contain the deflated
-* left singular vectors.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= N.
-*
-* U2 (input/output) DOUBLE PRECISION array, dimension (LDU2, N)
-* The first K columns of this matrix contain the non-deflated
-* left singular vectors for the split problem.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2. LDU2 >= N.
-*
-* VT (output) DOUBLE PRECISION array, dimension (LDVT, M)
-* The last M - K columns of VT**T contain the deflated
-* right singular vectors.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= N.
-*
-* VT2 (input/output) DOUBLE PRECISION array, dimension (LDVT2, N)
-* The first K columns of VT2**T contain the non-deflated
-* right singular vectors for the split problem.
-*
-* LDVT2 (input) INTEGER
-* The leading dimension of the array VT2. LDVT2 >= N.
-*
-* IDXC (input) INTEGER array, dimension ( N )
-* The permutation used to arrange the columns of U (and rows of
-* VT) into three groups: the first group contains non-zero
-* entries only at and above (or before) NL +1; the second
-* contains non-zero entries only at and below (or after) NL+2;
-* and the third is dense. The first column of U and the row of
-* VT are treated separately, however.
-*
-* The rows of the singular vectors found by DLASD4
-* must be likewise permuted before the matrix multiplies can
-* take place.
-*
-* CTOT (input) INTEGER array, dimension ( 4 )
-* A count of the total number of the various types of columns
-* in U (or rows in VT), as described in IDXC. The fourth column
-* type is any column which has been deflated.
-*
-* Z (input) DOUBLE PRECISION array, dimension (K)
-* The first K elements of this array contain the components
-* of the deflation-adjusted updating row vector.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasd4.f b/SRC/dlasd4.f
index 802c7c64..678905cb 100644
--- a/SRC/dlasd4.f
+++ b/SRC/dlasd4.f
@@ -1,95 +1,171 @@
- SUBROUTINE DLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER I, INFO, N
- DOUBLE PRECISION RHO, SIGMA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), DELTA( * ), WORK( * ), Z( * )
-* ..
-*
+*> \brief \b DLASD4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER I, INFO, N
+* DOUBLE PRECISION RHO, SIGMA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), DELTA( * ), WORK( * ), Z( * )
+* ..
+*
* Purpose
* =======
*
-* This subroutine computes the square root of the I-th updated
-* eigenvalue of a positive symmetric rank-one modification to
-* a positive diagonal matrix whose entries are given as the squares
-* of the corresponding entries in the array d, and that
-*
-* 0 <= D(i) < D(j) for i < j
-*
-* and that RHO > 0. This is arranged by the calling routine, and is
-* no loss in generality. The rank-one modified system is thus
-*
-* diag( D ) * diag( D ) + RHO * Z * Z_transpose.
-*
-* where we assume the Euclidean norm of Z is 1.
-*
-* The method consists of approximating the rational functions in the
-* secular equation by simpler interpolating rational functions.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine computes the square root of the I-th updated
+*> eigenvalue of a positive symmetric rank-one modification to
+*> a positive diagonal matrix whose entries are given as the squares
+*> of the corresponding entries in the array d, and that
+*>
+*> 0 <= D(i) < D(j) for i < j
+*>
+*> and that RHO > 0. This is arranged by the calling routine, and is
+*> no loss in generality. The rank-one modified system is thus
+*>
+*> diag( D ) * diag( D ) + RHO * Z * Z_transpose.
+*>
+*> where we assume the Euclidean norm of Z is 1.
+*>
+*> The method consists of approximating the rational functions in the
+*> secular equation by simpler interpolating rational functions.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of all arrays.
-*
-* I (input) INTEGER
-* The index of the eigenvalue to be computed. 1 <= I <= N.
-*
-* D (input) DOUBLE PRECISION array, dimension ( N )
-* The original eigenvalues. It is assumed that they are in
-* order, 0 <= D(I) < D(J) for I < J.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( N )
-* The components of the updating vector.
-*
-* DELTA (output) DOUBLE PRECISION array, dimension ( N )
-* If N .ne. 1, DELTA contains (D(j) - sigma_I) in its j-th
-* component. If N = 1, then DELTA(1) = 1. The vector DELTA
-* contains the information necessary to construct the
-* (singular) eigenvectors.
-*
-* RHO (input) DOUBLE PRECISION
-* The scalar in the symmetric updating formula.
-*
-* SIGMA (output) DOUBLE PRECISION
-* The computed sigma_I, the I-th updated eigenvalue.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( N )
-* If N .ne. 1, WORK contains (D(j) + sigma_I) in its j-th
-* component. If N = 1, then WORK( 1 ) = 1.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = 1, the updating process failed.
-*
-* Internal Parameters
-* ===================
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of all arrays.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> The index of the eigenvalue to be computed. 1 <= I <= N.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( N )
+*> The original eigenvalues. It is assumed that they are in
+*> order, 0 <= D(I) < D(J) for I < J.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( N )
+*> The components of the updating vector.
+*> \endverbatim
+*>
+*> \param[out] DELTA
+*> \verbatim
+*> DELTA is DOUBLE PRECISION array, dimension ( N )
+*> If N .ne. 1, DELTA contains (D(j) - sigma_I) in its j-th
+*> component. If N = 1, then DELTA(1) = 1. The vector DELTA
+*> contains the information necessary to construct the
+*> (singular) eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> The scalar in the symmetric updating formula.
+*> \endverbatim
+*>
+*> \param[out] SIGMA
+*> \verbatim
+*> SIGMA is DOUBLE PRECISION
+*> The computed sigma_I, the I-th updated eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( N )
+*> If N .ne. 1, WORK contains (D(j) + sigma_I) in its j-th
+*> component. If N = 1, then WORK( 1 ) = 1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = 1, the updating process failed.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> Logical variable ORGATI (origin-at-i?) is used for distinguishing
+*> whether D(i) or D(i+1) is treated as the origin.
+*> \endverbatim
+*> \verbatim
+*> ORGATI = .true. origin at i
+*> ORGATI = .false. origin at i+1
+*> \endverbatim
+*> \verbatim
+*> Logical variable SWTCH3 (switch-for-3-poles?) is for noting
+*> if we are working with THREE poles!
+*> \endverbatim
+*> \verbatim
+*> MAXIT is the maximum number of iterations allowed for each
+*> eigenvalue.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Logical variable ORGATI (origin-at-i?) is used for distinguishing
-* whether D(i) or D(i+1) is treated as the origin.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ORGATI = .true. origin at i
-* ORGATI = .false. origin at i+1
+*> \date November 2011
*
-* Logical variable SWTCH3 (switch-for-3-poles?) is for noting
-* if we are working with THREE poles!
+*> \ingroup auxOTHERauxiliary
*
-* MAXIT is the maximum number of iterations allowed for each
-* eigenvalue.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO )
*
-* Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER I, INFO, N
+ DOUBLE PRECISION RHO, SIGMA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), DELTA( * ), WORK( * ), Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasd5.f b/SRC/dlasd5.f
index 77244511..0dea7aec 100644
--- a/SRC/dlasd5.f
+++ b/SRC/dlasd5.f
@@ -1,66 +1,131 @@
- SUBROUTINE DLASD5( I, D, Z, DELTA, RHO, DSIGMA, WORK )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER I
- DOUBLE PRECISION DSIGMA, RHO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( 2 ), DELTA( 2 ), WORK( 2 ), Z( 2 )
-* ..
-*
+*> \brief \b DLASD5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD5( I, D, Z, DELTA, RHO, DSIGMA, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER I
+* DOUBLE PRECISION DSIGMA, RHO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( 2 ), DELTA( 2 ), WORK( 2 ), Z( 2 )
+* ..
+*
* Purpose
* =======
*
-* This subroutine computes the square root of the I-th eigenvalue
-* of a positive symmetric rank-one modification of a 2-by-2 diagonal
-* matrix
-*
-* diag( D ) * diag( D ) + RHO * Z * transpose(Z) .
-*
-* The diagonal entries in the array D are assumed to satisfy
-*
-* 0 <= D(i) < D(j) for i < j .
-*
-* We also assume RHO > 0 and that the Euclidean norm of the vector
-* Z is one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine computes the square root of the I-th eigenvalue
+*> of a positive symmetric rank-one modification of a 2-by-2 diagonal
+*> matrix
+*>
+*> diag( D ) * diag( D ) + RHO * Z * transpose(Z) .
+*>
+*> The diagonal entries in the array D are assumed to satisfy
+*>
+*> 0 <= D(i) < D(j) for i < j .
+*>
+*> We also assume RHO > 0 and that the Euclidean norm of the vector
+*> Z is one.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* I (input) INTEGER
-* The index of the eigenvalue to be computed. I = 1 or I = 2.
-*
-* D (input) DOUBLE PRECISION array, dimension ( 2 )
-* The original eigenvalues. We assume 0 <= D(1) < D(2).
-*
-* Z (input) DOUBLE PRECISION array, dimension ( 2 )
-* The components of the updating vector.
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> The index of the eigenvalue to be computed. I = 1 or I = 2.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( 2 )
+*> The original eigenvalues. We assume 0 <= D(1) < D(2).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( 2 )
+*> The components of the updating vector.
+*> \endverbatim
+*>
+*> \param[out] DELTA
+*> \verbatim
+*> DELTA is DOUBLE PRECISION array, dimension ( 2 )
+*> Contains (D(j) - sigma_I) in its j-th component.
+*> The vector DELTA contains the information necessary
+*> to construct the eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> The scalar in the symmetric updating formula.
+*> \endverbatim
+*>
+*> \param[out] DSIGMA
+*> \verbatim
+*> DSIGMA is DOUBLE PRECISION
+*> The computed sigma_I, the I-th updated eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( 2 )
+*> WORK contains (D(j) + sigma_I) in its j-th component.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DELTA (output) DOUBLE PRECISION array, dimension ( 2 )
-* Contains (D(j) - sigma_I) in its j-th component.
-* The vector DELTA contains the information necessary
-* to construct the eigenvectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RHO (input) DOUBLE PRECISION
-* The scalar in the symmetric updating formula.
+*> \date November 2011
*
-* DSIGMA (output) DOUBLE PRECISION
-* The computed sigma_I, the I-th updated eigenvalue.
+*> \ingroup auxOTHERauxiliary
*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( 2 )
-* WORK contains (D(j) + sigma_I) in its j-th component.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASD5( I, D, Z, DELTA, RHO, DSIGMA, WORK )
*
-* Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER I
+ DOUBLE PRECISION DSIGMA, RHO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( 2 ), DELTA( 2 ), WORK( 2 ), Z( 2 )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasd6.f b/SRC/dlasd6.f
index d86465d5..f7b4a6af 100644
--- a/SRC/dlasd6.f
+++ b/SRC/dlasd6.f
@@ -1,3 +1,315 @@
+*> \brief \b DLASD6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD6( ICOMPQ, NL, NR, SQRE, D, VF, VL, ALPHA, BETA,
+* IDXQ, PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM,
+* LDGNUM, POLES, DIFL, DIFR, Z, K, C, S, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
+* $ NR, SQRE
+* DOUBLE PRECISION ALPHA, BETA, C, S
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), IDXQ( * ), IWORK( * ),
+* $ PERM( * )
+* DOUBLE PRECISION D( * ), DIFL( * ), DIFR( * ),
+* $ GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
+* $ VF( * ), VL( * ), WORK( * ), Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASD6 computes the SVD of an updated upper bidiagonal matrix B
+*> obtained by merging two smaller ones by appending a row. This
+*> routine is used only for the problem which requires all singular
+*> values and optionally singular vector matrices in factored form.
+*> B is an N-by-M matrix with N = NL + NR + 1 and M = N + SQRE.
+*> A related subroutine, DLASD1, handles the case in which all singular
+*> values and singular vectors of the bidiagonal matrix are desired.
+*>
+*> DLASD6 computes the SVD as follows:
+*>
+*> ( D1(in) 0 0 0 )
+*> B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
+*> ( 0 0 D2(in) 0 )
+*>
+*> = U(out) * ( D(out) 0) * VT(out)
+*>
+*> where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M
+*> with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
+*> elsewhere; and the entry b is empty if SQRE = 0.
+*>
+*> The singular values of B can be computed using D1, D2, the first
+*> components of all the right singular vectors of the lower block, and
+*> the last components of all the right singular vectors of the upper
+*> block. These components are stored and updated in VF and VL,
+*> respectively, in DLASD6. Hence U and VT are not explicitly
+*> referenced.
+*>
+*> The singular values are stored in D. The algorithm consists of two
+*> stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple singular values or if there is a zero
+*> in the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine DLASD7.
+*>
+*> The second stage consists of calculating the updated
+*> singular values. This is done by finding the roots of the
+*> secular equation via the routine DLASD4 (as called by DLASD8).
+*> This routine also updates VF and VL and computes the distances
+*> between the updated singular values and the old singular
+*> values.
+*>
+*> DLASD6 is called from DLASDA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed in
+*> factored form:
+*> = 0: Compute singular values only.
+*> = 1: Compute singular vectors in factored form as well.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has row dimension N = NL + NR + 1,
+*> and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( NL+NR+1 ).
+*> On entry D(1:NL,1:NL) contains the singular values of the
+*> upper block, and D(NL+2:N) contains the singular values
+*> of the lower block. On exit D(1:N) contains the singular
+*> values of the modified matrix.
+*> \endverbatim
+*>
+*> \param[in,out] VF
+*> \verbatim
+*> VF is DOUBLE PRECISION array, dimension ( M )
+*> On entry, VF(1:NL+1) contains the first components of all
+*> right singular vectors of the upper block; and VF(NL+2:M)
+*> contains the first components of all right singular vectors
+*> of the lower block. On exit, VF contains the first components
+*> of all right singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension ( M )
+*> On entry, VL(1:NL+1) contains the last components of all
+*> right singular vectors of the upper block; and VL(NL+2:M)
+*> contains the last components of all right singular vectors of
+*> the lower block. On exit, VL contains the last components of
+*> all right singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> Contains the diagonal element associated with the added row.
+*> \endverbatim
+*>
+*> \param[in,out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> Contains the off-diagonal element associated with the added
+*> row.
+*> \endverbatim
+*>
+*> \param[out] IDXQ
+*> \verbatim
+*> IDXQ is INTEGER array, dimension ( N )
+*> This contains the permutation which will reintegrate the
+*> subproblem just solved back into sorted order, i.e.
+*> D( IDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( N )
+*> The permutations (from deflation and sorting) to be applied
+*> to each block. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER
+*> leading dimension of GIVCOL, must be at least N.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*> Each number indicates the C or S value to be used in the
+*> corresponding Givens rotation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[in] LDGNUM
+*> \verbatim
+*> LDGNUM is INTEGER
+*> The leading dimension of GIVNUM and POLES, must be at least N.
+*> \endverbatim
+*>
+*> \param[out] POLES
+*> \verbatim
+*> POLES is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*> On exit, POLES(1,*) is an array containing the new singular
+*> values obtained from solving the secular equation, and
+*> POLES(2,*) is an array containing the poles in the secular
+*> equation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] DIFL
+*> \verbatim
+*> DIFL is DOUBLE PRECISION array, dimension ( N )
+*> On exit, DIFL(I) is the distance between I-th updated
+*> (undeflated) singular value and the I-th (undeflated) old
+*> singular value.
+*> \endverbatim
+*>
+*> \param[out] DIFR
+*> \verbatim
+*> DIFR is DOUBLE PRECISION array,
+*> dimension ( LDGNUM, 2 ) if ICOMPQ = 1 and
+*> dimension ( N ) if ICOMPQ = 0.
+*> On exit, DIFR(I, 1) is the distance between I-th updated
+*> (undeflated) singular value and the I+1-th (undeflated) old
+*> singular value.
+*> \endverbatim
+*> \verbatim
+*> If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
+*> normalizing factors for the right singular vector matrix.
+*> \endverbatim
+*> \verbatim
+*> See DLASD8 for details on DIFL and DIFR.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( M )
+*> The first elements of this array contain the components
+*> of the deflation-adjusted updating row vector.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix,
+*> This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> C contains garbage if SQRE =0 and the C-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION
+*> S contains garbage if SQRE =0 and the S-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( 4 * M )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension ( 3 * N )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLASD6( ICOMPQ, NL, NR, SQRE, D, VF, VL, ALPHA, BETA,
$ IDXQ, PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM,
$ LDGNUM, POLES, DIFL, DIFR, Z, K, C, S, WORK,
@@ -6,7 +318,7 @@
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
@@ -21,185 +333,6 @@
$ VF( * ), VL( * ), WORK( * ), Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASD6 computes the SVD of an updated upper bidiagonal matrix B
-* obtained by merging two smaller ones by appending a row. This
-* routine is used only for the problem which requires all singular
-* values and optionally singular vector matrices in factored form.
-* B is an N-by-M matrix with N = NL + NR + 1 and M = N + SQRE.
-* A related subroutine, DLASD1, handles the case in which all singular
-* values and singular vectors of the bidiagonal matrix are desired.
-*
-* DLASD6 computes the SVD as follows:
-*
-* ( D1(in) 0 0 0 )
-* B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
-* ( 0 0 D2(in) 0 )
-*
-* = U(out) * ( D(out) 0) * VT(out)
-*
-* where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M
-* with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
-* elsewhere; and the entry b is empty if SQRE = 0.
-*
-* The singular values of B can be computed using D1, D2, the first
-* components of all the right singular vectors of the lower block, and
-* the last components of all the right singular vectors of the upper
-* block. These components are stored and updated in VF and VL,
-* respectively, in DLASD6. Hence U and VT are not explicitly
-* referenced.
-*
-* The singular values are stored in D. The algorithm consists of two
-* stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple singular values or if there is a zero
-* in the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine DLASD7.
-*
-* The second stage consists of calculating the updated
-* singular values. This is done by finding the roots of the
-* secular equation via the routine DLASD4 (as called by DLASD8).
-* This routine also updates VF and VL and computes the distances
-* between the updated singular values and the old singular
-* values.
-*
-* DLASD6 is called from DLASDA.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed in
-* factored form:
-* = 0: Compute singular values only.
-* = 1: Compute singular vectors in factored form as well.
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has row dimension N = NL + NR + 1,
-* and column dimension M = N + SQRE.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( NL+NR+1 ).
-* On entry D(1:NL,1:NL) contains the singular values of the
-* upper block, and D(NL+2:N) contains the singular values
-* of the lower block. On exit D(1:N) contains the singular
-* values of the modified matrix.
-*
-* VF (input/output) DOUBLE PRECISION array, dimension ( M )
-* On entry, VF(1:NL+1) contains the first components of all
-* right singular vectors of the upper block; and VF(NL+2:M)
-* contains the first components of all right singular vectors
-* of the lower block. On exit, VF contains the first components
-* of all right singular vectors of the bidiagonal matrix.
-*
-* VL (input/output) DOUBLE PRECISION array, dimension ( M )
-* On entry, VL(1:NL+1) contains the last components of all
-* right singular vectors of the upper block; and VL(NL+2:M)
-* contains the last components of all right singular vectors of
-* the lower block. On exit, VL contains the last components of
-* all right singular vectors of the bidiagonal matrix.
-*
-* ALPHA (input/output) DOUBLE PRECISION
-* Contains the diagonal element associated with the added row.
-*
-* BETA (input/output) DOUBLE PRECISION
-* Contains the off-diagonal element associated with the added
-* row.
-*
-* IDXQ (output) INTEGER array, dimension ( N )
-* This contains the permutation which will reintegrate the
-* subproblem just solved back into sorted order, i.e.
-* D( IDXQ( I = 1, N ) ) will be in ascending order.
-*
-* PERM (output) INTEGER array, dimension ( N )
-* The permutations (from deflation and sorting) to be applied
-* to each block. Not referenced if ICOMPQ = 0.
-*
-* GIVPTR (output) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem. Not referenced if ICOMPQ = 0.
-*
-* GIVCOL (output) INTEGER array, dimension ( LDGCOL, 2 )
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation. Not referenced if ICOMPQ = 0.
-*
-* LDGCOL (input) INTEGER
-* leading dimension of GIVCOL, must be at least N.
-*
-* GIVNUM (output) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-* Each number indicates the C or S value to be used in the
-* corresponding Givens rotation. Not referenced if ICOMPQ = 0.
-*
-* LDGNUM (input) INTEGER
-* The leading dimension of GIVNUM and POLES, must be at least N.
-*
-* POLES (output) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-* On exit, POLES(1,*) is an array containing the new singular
-* values obtained from solving the secular equation, and
-* POLES(2,*) is an array containing the poles in the secular
-* equation. Not referenced if ICOMPQ = 0.
-*
-* DIFL (output) DOUBLE PRECISION array, dimension ( N )
-* On exit, DIFL(I) is the distance between I-th updated
-* (undeflated) singular value and the I-th (undeflated) old
-* singular value.
-*
-* DIFR (output) DOUBLE PRECISION array,
-* dimension ( LDGNUM, 2 ) if ICOMPQ = 1 and
-* dimension ( N ) if ICOMPQ = 0.
-* On exit, DIFR(I, 1) is the distance between I-th updated
-* (undeflated) singular value and the I+1-th (undeflated) old
-* singular value.
-*
-* If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
-* normalizing factors for the right singular vector matrix.
-*
-* See DLASD8 for details on DIFL and DIFR.
-*
-* Z (output) DOUBLE PRECISION array, dimension ( M )
-* The first elements of this array contain the components
-* of the deflation-adjusted updating row vector.
-*
-* K (output) INTEGER
-* Contains the dimension of the non-deflated matrix,
-* This is the order of the related secular equation. 1 <= K <=N.
-*
-* C (output) DOUBLE PRECISION
-* C contains garbage if SQRE =0 and the C-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* S (output) DOUBLE PRECISION
-* S contains garbage if SQRE =0 and the S-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( 4 * M )
-*
-* IWORK (workspace) INTEGER array, dimension ( 3 * N )
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasd7.f b/SRC/dlasd7.f
index 45e4e4f8..187527da 100644
--- a/SRC/dlasd7.f
+++ b/SRC/dlasd7.f
@@ -1,3 +1,279 @@
+*> \brief \b DLASD7
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD7( ICOMPQ, NL, NR, SQRE, K, D, Z, ZW, VF, VFW, VL,
+* VLW, ALPHA, BETA, DSIGMA, IDX, IDXP, IDXQ,
+* PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
+* C, S, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
+* $ NR, SQRE
+* DOUBLE PRECISION ALPHA, BETA, C, S
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), IDX( * ), IDXP( * ),
+* $ IDXQ( * ), PERM( * )
+* DOUBLE PRECISION D( * ), DSIGMA( * ), GIVNUM( LDGNUM, * ),
+* $ VF( * ), VFW( * ), VL( * ), VLW( * ), Z( * ),
+* $ ZW( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASD7 merges the two sets of singular values together into a single
+*> sorted set. Then it tries to deflate the size of the problem. There
+*> are two ways in which deflation can occur: when two or more singular
+*> values are close together or if there is a tiny entry in the Z
+*> vector. For each such occurrence the order of the related
+*> secular equation problem is reduced by one.
+*>
+*> DLASD7 is called from DLASD6.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed
+*> in compact form, as follows:
+*> = 0: Compute singular values only.
+*> = 1: Compute singular vectors of upper
+*> bidiagonal matrix in compact form.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has
+*> N = NL + NR + 1 rows and
+*> M = N + SQRE >= N columns.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix, this is
+*> the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( N )
+*> On entry D contains the singular values of the two submatrices
+*> to be combined. On exit D contains the trailing (N-K) updated
+*> singular values (those which were deflated) sorted into
+*> increasing order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( M )
+*> On exit Z contains the updating row vector in the secular
+*> equation.
+*> \endverbatim
+*>
+*> \param[out] ZW
+*> \verbatim
+*> ZW is DOUBLE PRECISION array, dimension ( M )
+*> Workspace for Z.
+*> \endverbatim
+*>
+*> \param[in,out] VF
+*> \verbatim
+*> VF is DOUBLE PRECISION array, dimension ( M )
+*> On entry, VF(1:NL+1) contains the first components of all
+*> right singular vectors of the upper block; and VF(NL+2:M)
+*> contains the first components of all right singular vectors
+*> of the lower block. On exit, VF contains the first components
+*> of all right singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[out] VFW
+*> \verbatim
+*> VFW is DOUBLE PRECISION array, dimension ( M )
+*> Workspace for VF.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension ( M )
+*> On entry, VL(1:NL+1) contains the last components of all
+*> right singular vectors of the upper block; and VL(NL+2:M)
+*> contains the last components of all right singular vectors
+*> of the lower block. On exit, VL contains the last components
+*> of all right singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[out] VLW
+*> \verbatim
+*> VLW is DOUBLE PRECISION array, dimension ( M )
+*> Workspace for VL.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> Contains the diagonal element associated with the added row.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> Contains the off-diagonal element associated with the added
+*> row.
+*> \endverbatim
+*>
+*> \param[out] DSIGMA
+*> \verbatim
+*> DSIGMA is DOUBLE PRECISION array, dimension ( N )
+*> Contains a copy of the diagonal elements (K-1 singular values
+*> and one zero) in the secular equation.
+*> \endverbatim
+*>
+*> \param[out] IDX
+*> \verbatim
+*> IDX is INTEGER array, dimension ( N )
+*> This will contain the permutation used to sort the contents of
+*> D into ascending order.
+*> \endverbatim
+*>
+*> \param[out] IDXP
+*> \verbatim
+*> IDXP is INTEGER array, dimension ( N )
+*> This will contain the permutation used to place deflated
+*> values of D at the end of the array. On output IDXP(2:K)
+*> points to the nondeflated D-values and IDXP(K+1:N)
+*> points to the deflated singular values.
+*> \endverbatim
+*>
+*> \param[in] IDXQ
+*> \verbatim
+*> IDXQ is INTEGER array, dimension ( N )
+*> This contains the permutation which separately sorts the two
+*> sub-problems in D into ascending order. Note that entries in
+*> the first half of this permutation must first be moved one
+*> position backward; and entries in the second half
+*> must first have NL+1 added to their values.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( N )
+*> The permutations (from deflation and sorting) to be applied
+*> to each singular block. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER
+*> The leading dimension of GIVCOL, must be at least N.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*> Each number indicates the C or S value to be used in the
+*> corresponding Givens rotation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[in] LDGNUM
+*> \verbatim
+*> LDGNUM is INTEGER
+*> The leading dimension of GIVNUM, must be at least N.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> C contains garbage if SQRE =0 and the C-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION
+*> S contains garbage if SQRE =0 and the S-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLASD7( ICOMPQ, NL, NR, SQRE, K, D, Z, ZW, VF, VFW, VL,
$ VLW, ALPHA, BETA, DSIGMA, IDX, IDXP, IDXQ,
$ PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
@@ -6,7 +282,7 @@
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
@@ -21,148 +297,6 @@
$ ZW( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASD7 merges the two sets of singular values together into a single
-* sorted set. Then it tries to deflate the size of the problem. There
-* are two ways in which deflation can occur: when two or more singular
-* values are close together or if there is a tiny entry in the Z
-* vector. For each such occurrence the order of the related
-* secular equation problem is reduced by one.
-*
-* DLASD7 is called from DLASD6.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed
-* in compact form, as follows:
-* = 0: Compute singular values only.
-* = 1: Compute singular vectors of upper
-* bidiagonal matrix in compact form.
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has
-* N = NL + NR + 1 rows and
-* M = N + SQRE >= N columns.
-*
-* K (output) INTEGER
-* Contains the dimension of the non-deflated matrix, this is
-* the order of the related secular equation. 1 <= K <=N.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( N )
-* On entry D contains the singular values of the two submatrices
-* to be combined. On exit D contains the trailing (N-K) updated
-* singular values (those which were deflated) sorted into
-* increasing order.
-*
-* Z (output) DOUBLE PRECISION array, dimension ( M )
-* On exit Z contains the updating row vector in the secular
-* equation.
-*
-* ZW (workspace) DOUBLE PRECISION array, dimension ( M )
-* Workspace for Z.
-*
-* VF (input/output) DOUBLE PRECISION array, dimension ( M )
-* On entry, VF(1:NL+1) contains the first components of all
-* right singular vectors of the upper block; and VF(NL+2:M)
-* contains the first components of all right singular vectors
-* of the lower block. On exit, VF contains the first components
-* of all right singular vectors of the bidiagonal matrix.
-*
-* VFW (workspace) DOUBLE PRECISION array, dimension ( M )
-* Workspace for VF.
-*
-* VL (input/output) DOUBLE PRECISION array, dimension ( M )
-* On entry, VL(1:NL+1) contains the last components of all
-* right singular vectors of the upper block; and VL(NL+2:M)
-* contains the last components of all right singular vectors
-* of the lower block. On exit, VL contains the last components
-* of all right singular vectors of the bidiagonal matrix.
-*
-* VLW (workspace) DOUBLE PRECISION array, dimension ( M )
-* Workspace for VL.
-*
-* ALPHA (input) DOUBLE PRECISION
-* Contains the diagonal element associated with the added row.
-*
-* BETA (input) DOUBLE PRECISION
-* Contains the off-diagonal element associated with the added
-* row.
-*
-* DSIGMA (output) DOUBLE PRECISION array, dimension ( N )
-* Contains a copy of the diagonal elements (K-1 singular values
-* and one zero) in the secular equation.
-*
-* IDX (workspace) INTEGER array, dimension ( N )
-* This will contain the permutation used to sort the contents of
-* D into ascending order.
-*
-* IDXP (workspace) INTEGER array, dimension ( N )
-* This will contain the permutation used to place deflated
-* values of D at the end of the array. On output IDXP(2:K)
-* points to the nondeflated D-values and IDXP(K+1:N)
-* points to the deflated singular values.
-*
-* IDXQ (input) INTEGER array, dimension ( N )
-* This contains the permutation which separately sorts the two
-* sub-problems in D into ascending order. Note that entries in
-* the first half of this permutation must first be moved one
-* position backward; and entries in the second half
-* must first have NL+1 added to their values.
-*
-* PERM (output) INTEGER array, dimension ( N )
-* The permutations (from deflation and sorting) to be applied
-* to each singular block. Not referenced if ICOMPQ = 0.
-*
-* GIVPTR (output) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem. Not referenced if ICOMPQ = 0.
-*
-* GIVCOL (output) INTEGER array, dimension ( LDGCOL, 2 )
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation. Not referenced if ICOMPQ = 0.
-*
-* LDGCOL (input) INTEGER
-* The leading dimension of GIVCOL, must be at least N.
-*
-* GIVNUM (output) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-* Each number indicates the C or S value to be used in the
-* corresponding Givens rotation. Not referenced if ICOMPQ = 0.
-*
-* LDGNUM (input) INTEGER
-* The leading dimension of GIVNUM, must be at least N.
-*
-* C (output) DOUBLE PRECISION
-* C contains garbage if SQRE =0 and the C-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* S (output) DOUBLE PRECISION
-* S contains garbage if SQRE =0 and the S-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasd8.f b/SRC/dlasd8.f
index 68fee483..7593c921 100644
--- a/SRC/dlasd8.f
+++ b/SRC/dlasd8.f
@@ -1,10 +1,174 @@
+*> \brief \b DLASD8
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
+* DSIGMA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, K, LDDIFR
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), DIFL( * ), DIFR( LDDIFR, * ),
+* $ DSIGMA( * ), VF( * ), VL( * ), WORK( * ),
+* $ Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASD8 finds the square roots of the roots of the secular equation,
+*> as defined by the values in DSIGMA and Z. It makes the appropriate
+*> calls to DLASD4, and stores, for each element in D, the distance
+*> to its two nearest poles (elements in DSIGMA). It also updates
+*> the arrays VF and VL, the first and last components of all the
+*> right singular vectors of the original bidiagonal matrix.
+*>
+*> DLASD8 is called from DLASD6.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed in
+*> factored form in the calling routine:
+*> = 0: Compute singular values only.
+*> = 1: Compute singular vectors in factored form as well.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of terms in the rational function to be solved
+*> by DLASD4. K >= 1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( K )
+*> On output, D contains the updated singular values.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( K )
+*> On entry, the first K elements of this array contain the
+*> components of the deflation-adjusted updating row vector.
+*> On exit, Z is updated.
+*> \endverbatim
+*>
+*> \param[in,out] VF
+*> \verbatim
+*> VF is DOUBLE PRECISION array, dimension ( K )
+*> On entry, VF contains information passed through DBEDE8.
+*> On exit, VF contains the first K components of the first
+*> components of all right singular vectors of the bidiagonal
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension ( K )
+*> On entry, VL contains information passed through DBEDE8.
+*> On exit, VL contains the first K components of the last
+*> components of all right singular vectors of the bidiagonal
+*> matrix.
+*> \endverbatim
+*>
+*> \param[out] DIFL
+*> \verbatim
+*> DIFL is DOUBLE PRECISION array, dimension ( K )
+*> On exit, DIFL(I) = D(I) - DSIGMA(I).
+*> \endverbatim
+*>
+*> \param[out] DIFR
+*> \verbatim
+*> DIFR is DOUBLE PRECISION array,
+*> dimension ( LDDIFR, 2 ) if ICOMPQ = 1 and
+*> dimension ( K ) if ICOMPQ = 0.
+*> On exit, DIFR(I,1) = D(I) - DSIGMA(I+1), DIFR(K,1) is not
+*> defined and will not be referenced.
+*> \endverbatim
+*> \verbatim
+*> If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
+*> normalizing factors for the right singular vector matrix.
+*> \endverbatim
+*>
+*> \param[in] LDDIFR
+*> \verbatim
+*> LDDIFR is INTEGER
+*> The leading dimension of DIFR, must be at least K.
+*> \endverbatim
+*>
+*> \param[in,out] DSIGMA
+*> \verbatim
+*> DSIGMA is DOUBLE PRECISION array, dimension ( K )
+*> On entry, the first K elements of this array contain the old
+*> roots of the deflated updating problem. These are the poles
+*> of the secular equation.
+*> On exit, the elements of DSIGMA may be very slightly altered
+*> in value.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension at least 3 * K
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
$ DSIGMA, WORK, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, K, LDDIFR
@@ -15,87 +179,6 @@
$ Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASD8 finds the square roots of the roots of the secular equation,
-* as defined by the values in DSIGMA and Z. It makes the appropriate
-* calls to DLASD4, and stores, for each element in D, the distance
-* to its two nearest poles (elements in DSIGMA). It also updates
-* the arrays VF and VL, the first and last components of all the
-* right singular vectors of the original bidiagonal matrix.
-*
-* DLASD8 is called from DLASD6.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed in
-* factored form in the calling routine:
-* = 0: Compute singular values only.
-* = 1: Compute singular vectors in factored form as well.
-*
-* K (input) INTEGER
-* The number of terms in the rational function to be solved
-* by DLASD4. K >= 1.
-*
-* D (output) DOUBLE PRECISION array, dimension ( K )
-* On output, D contains the updated singular values.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension ( K )
-* On entry, the first K elements of this array contain the
-* components of the deflation-adjusted updating row vector.
-* On exit, Z is updated.
-*
-* VF (input/output) DOUBLE PRECISION array, dimension ( K )
-* On entry, VF contains information passed through DBEDE8.
-* On exit, VF contains the first K components of the first
-* components of all right singular vectors of the bidiagonal
-* matrix.
-*
-* VL (input/output) DOUBLE PRECISION array, dimension ( K )
-* On entry, VL contains information passed through DBEDE8.
-* On exit, VL contains the first K components of the last
-* components of all right singular vectors of the bidiagonal
-* matrix.
-*
-* DIFL (output) DOUBLE PRECISION array, dimension ( K )
-* On exit, DIFL(I) = D(I) - DSIGMA(I).
-*
-* DIFR (output) DOUBLE PRECISION array,
-* dimension ( LDDIFR, 2 ) if ICOMPQ = 1 and
-* dimension ( K ) if ICOMPQ = 0.
-* On exit, DIFR(I,1) = D(I) - DSIGMA(I+1), DIFR(K,1) is not
-* defined and will not be referenced.
-*
-* If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
-* normalizing factors for the right singular vector matrix.
-*
-* LDDIFR (input) INTEGER
-* The leading dimension of DIFR, must be at least K.
-*
-* DSIGMA (input/output) DOUBLE PRECISION array, dimension ( K )
-* On entry, the first K elements of this array contain the old
-* roots of the deflated updating problem. These are the poles
-* of the secular equation.
-* On exit, the elements of DSIGMA may be very slightly altered
-* in value.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension at least 3 * K
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasda.f b/SRC/dlasda.f
index f852dfc9..7139837a 100644
--- a/SRC/dlasda.f
+++ b/SRC/dlasda.f
@@ -1,3 +1,273 @@
+*> \brief \b DLASDA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASDA( ICOMPQ, SMLSIZ, N, SQRE, D, E, U, LDU, VT, K,
+* DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL,
+* PERM, GIVNUM, C, S, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
+* $ K( * ), PERM( LDGCOL, * )
+* DOUBLE PRECISION C( * ), D( * ), DIFL( LDU, * ), DIFR( LDU, * ),
+* $ E( * ), GIVNUM( LDU, * ), POLES( LDU, * ),
+* $ S( * ), U( LDU, * ), VT( LDU, * ), WORK( * ),
+* $ Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Using a divide and conquer approach, DLASDA computes the singular
+*> value decomposition (SVD) of a real upper bidiagonal N-by-M matrix
+*> B with diagonal D and offdiagonal E, where M = N + SQRE. The
+*> algorithm computes the singular values in the SVD B = U * S * VT.
+*> The orthogonal matrices U and VT are optionally computed in
+*> compact form.
+*>
+*> A related subroutine, DLASD0, computes the singular values and
+*> the singular vectors in explicit form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed
+*> in compact form, as follows
+*> = 0: Compute singular values only.
+*> = 1: Compute singular vectors of upper bidiagonal
+*> matrix in compact form.
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The row dimension of the upper bidiagonal matrix. This is
+*> also the dimension of the main diagonal array D.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> Specifies the column dimension of the bidiagonal matrix.
+*> = 0: The bidiagonal matrix has column dimension M = N;
+*> = 1: The bidiagonal matrix has column dimension M = N + 1.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( N )
+*> On entry D contains the main diagonal of the bidiagonal
+*> matrix. On exit D, if INFO = 0, contains its singular values.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension ( M-1 )
+*> Contains the subdiagonal entries of the bidiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array,
+*> dimension ( LDU, SMLSIZ ) if ICOMPQ = 1, and not referenced
+*> if ICOMPQ = 0. If ICOMPQ = 1, on exit, U contains the left
+*> singular vector matrices of all subproblems at the bottom
+*> level.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER, LDU = > N.
+*> The leading dimension of arrays U, VT, DIFL, DIFR, POLES,
+*> GIVNUM, and Z.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array,
+*> dimension ( LDU, SMLSIZ+1 ) if ICOMPQ = 1, and not referenced
+*> if ICOMPQ = 0. If ICOMPQ = 1, on exit, VT**T contains the right
+*> singular vector matrices of all subproblems at the bottom
+*> level.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER array,
+*> dimension ( N ) if ICOMPQ = 1 and dimension 1 if ICOMPQ = 0.
+*> If ICOMPQ = 1, on exit, K(I) is the dimension of the I-th
+*> secular equation on the computation tree.
+*> \endverbatim
+*>
+*> \param[out] DIFL
+*> \verbatim
+*> DIFL is DOUBLE PRECISION array, dimension ( LDU, NLVL ),
+*> where NLVL = floor(log_2 (N/SMLSIZ))).
+*> \endverbatim
+*>
+*> \param[out] DIFR
+*> \verbatim
+*> DIFR is DOUBLE PRECISION array,
+*> dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1 and
+*> dimension ( N ) if ICOMPQ = 0.
+*> If ICOMPQ = 1, on exit, DIFL(1:N, I) and DIFR(1:N, 2 * I - 1)
+*> record distances between singular values on the I-th
+*> level and singular values on the (I -1)-th level, and
+*> DIFR(1:N, 2 * I ) contains the normalizing factors for
+*> the right singular vector matrix. See DLASD8 for details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array,
+*> dimension ( LDU, NLVL ) if ICOMPQ = 1 and
+*> dimension ( N ) if ICOMPQ = 0.
+*> The first K elements of Z(1, I) contain the components of
+*> the deflation-adjusted updating row vector for subproblems
+*> on the I-th level.
+*> \endverbatim
+*>
+*> \param[out] POLES
+*> \verbatim
+*> POLES is DOUBLE PRECISION array,
+*> dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced
+*> if ICOMPQ = 0. If ICOMPQ = 1, on exit, POLES(1, 2*I - 1) and
+*> POLES(1, 2*I) contain the new and old singular values
+*> involved in the secular equations on the I-th level.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array,
+*> dimension ( N ) if ICOMPQ = 1, and not referenced if
+*> ICOMPQ = 0. If ICOMPQ = 1, on exit, GIVPTR( I ) records
+*> the number of Givens rotations performed on the I-th
+*> problem on the computation tree.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array,
+*> dimension ( LDGCOL, 2 * NLVL ) if ICOMPQ = 1, and not
+*> referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I,
+*> GIVCOL(1, 2 *I - 1) and GIVCOL(1, 2 *I) record the locations
+*> of Givens rotations performed on the I-th level on the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER, LDGCOL = > N.
+*> The leading dimension of arrays GIVCOL and PERM.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array,
+*> dimension ( LDGCOL, NLVL ) if ICOMPQ = 1, and not referenced
+*> if ICOMPQ = 0. If ICOMPQ = 1, on exit, PERM(1, I) records
+*> permutations done on the I-th level of the computation tree.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array,
+*> dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not
+*> referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I,
+*> GIVNUM(1, 2 *I - 1) and GIVNUM(1, 2 *I) record the C- and S-
+*> values of Givens rotations performed on the I-th level on
+*> the computation tree.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array,
+*> dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0.
+*> If ICOMPQ = 1 and the I-th subproblem is not square, on exit,
+*> C( I ) contains the C-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension ( N ) if
+*> ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1
+*> and the I-th subproblem is not square, on exit, S( I )
+*> contains the S-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (6 * N + (SMLSIZ + 1)*(SMLSIZ + 1)).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array.
+*> Dimension must be at least (7 * N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLASDA( ICOMPQ, SMLSIZ, N, SQRE, D, E, U, LDU, VT, K,
$ DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL,
$ PERM, GIVNUM, C, S, WORK, IWORK, INFO )
@@ -5,7 +275,7 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE
@@ -19,154 +289,6 @@
$ Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* Using a divide and conquer approach, DLASDA computes the singular
-* value decomposition (SVD) of a real upper bidiagonal N-by-M matrix
-* B with diagonal D and offdiagonal E, where M = N + SQRE. The
-* algorithm computes the singular values in the SVD B = U * S * VT.
-* The orthogonal matrices U and VT are optionally computed in
-* compact form.
-*
-* A related subroutine, DLASD0, computes the singular values and
-* the singular vectors in explicit form.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed
-* in compact form, as follows
-* = 0: Compute singular values only.
-* = 1: Compute singular vectors of upper bidiagonal
-* matrix in compact form.
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The row dimension of the upper bidiagonal matrix. This is
-* also the dimension of the main diagonal array D.
-*
-* SQRE (input) INTEGER
-* Specifies the column dimension of the bidiagonal matrix.
-* = 0: The bidiagonal matrix has column dimension M = N;
-* = 1: The bidiagonal matrix has column dimension M = N + 1.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( N )
-* On entry D contains the main diagonal of the bidiagonal
-* matrix. On exit D, if INFO = 0, contains its singular values.
-*
-* E (input) DOUBLE PRECISION array, dimension ( M-1 )
-* Contains the subdiagonal entries of the bidiagonal matrix.
-* On exit, E has been destroyed.
-*
-* U (output) DOUBLE PRECISION array,
-* dimension ( LDU, SMLSIZ ) if ICOMPQ = 1, and not referenced
-* if ICOMPQ = 0. If ICOMPQ = 1, on exit, U contains the left
-* singular vector matrices of all subproblems at the bottom
-* level.
-*
-* LDU (input) INTEGER, LDU = > N.
-* The leading dimension of arrays U, VT, DIFL, DIFR, POLES,
-* GIVNUM, and Z.
-*
-* VT (output) DOUBLE PRECISION array,
-* dimension ( LDU, SMLSIZ+1 ) if ICOMPQ = 1, and not referenced
-* if ICOMPQ = 0. If ICOMPQ = 1, on exit, VT**T contains the right
-* singular vector matrices of all subproblems at the bottom
-* level.
-*
-* K (output) INTEGER array,
-* dimension ( N ) if ICOMPQ = 1 and dimension 1 if ICOMPQ = 0.
-* If ICOMPQ = 1, on exit, K(I) is the dimension of the I-th
-* secular equation on the computation tree.
-*
-* DIFL (output) DOUBLE PRECISION array, dimension ( LDU, NLVL ),
-* where NLVL = floor(log_2 (N/SMLSIZ))).
-*
-* DIFR (output) DOUBLE PRECISION array,
-* dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1 and
-* dimension ( N ) if ICOMPQ = 0.
-* If ICOMPQ = 1, on exit, DIFL(1:N, I) and DIFR(1:N, 2 * I - 1)
-* record distances between singular values on the I-th
-* level and singular values on the (I -1)-th level, and
-* DIFR(1:N, 2 * I ) contains the normalizing factors for
-* the right singular vector matrix. See DLASD8 for details.
-*
-* Z (output) DOUBLE PRECISION array,
-* dimension ( LDU, NLVL ) if ICOMPQ = 1 and
-* dimension ( N ) if ICOMPQ = 0.
-* The first K elements of Z(1, I) contain the components of
-* the deflation-adjusted updating row vector for subproblems
-* on the I-th level.
-*
-* POLES (output) DOUBLE PRECISION array,
-* dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced
-* if ICOMPQ = 0. If ICOMPQ = 1, on exit, POLES(1, 2*I - 1) and
-* POLES(1, 2*I) contain the new and old singular values
-* involved in the secular equations on the I-th level.
-*
-* GIVPTR (output) INTEGER array,
-* dimension ( N ) if ICOMPQ = 1, and not referenced if
-* ICOMPQ = 0. If ICOMPQ = 1, on exit, GIVPTR( I ) records
-* the number of Givens rotations performed on the I-th
-* problem on the computation tree.
-*
-* GIVCOL (output) INTEGER array,
-* dimension ( LDGCOL, 2 * NLVL ) if ICOMPQ = 1, and not
-* referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I,
-* GIVCOL(1, 2 *I - 1) and GIVCOL(1, 2 *I) record the locations
-* of Givens rotations performed on the I-th level on the
-* computation tree.
-*
-* LDGCOL (input) INTEGER, LDGCOL = > N.
-* The leading dimension of arrays GIVCOL and PERM.
-*
-* PERM (output) INTEGER array,
-* dimension ( LDGCOL, NLVL ) if ICOMPQ = 1, and not referenced
-* if ICOMPQ = 0. If ICOMPQ = 1, on exit, PERM(1, I) records
-* permutations done on the I-th level of the computation tree.
-*
-* GIVNUM (output) DOUBLE PRECISION array,
-* dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not
-* referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I,
-* GIVNUM(1, 2 *I - 1) and GIVNUM(1, 2 *I) record the C- and S-
-* values of Givens rotations performed on the I-th level on
-* the computation tree.
-*
-* C (output) DOUBLE PRECISION array,
-* dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0.
-* If ICOMPQ = 1 and the I-th subproblem is not square, on exit,
-* C( I ) contains the C-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* S (output) DOUBLE PRECISION array, dimension ( N ) if
-* ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1
-* and the I-th subproblem is not square, on exit, S( I )
-* contains the S-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (6 * N + (SMLSIZ + 1)*(SMLSIZ + 1)).
-*
-* IWORK (workspace) INTEGER array.
-* Dimension must be at least (7 * N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasdq.f b/SRC/dlasdq.f
index 92764640..7d3656e1 100644
--- a/SRC/dlasdq.f
+++ b/SRC/dlasdq.f
@@ -1,10 +1,219 @@
+*> \brief \b DLASDQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASDQ( UPLO, SQRE, N, NCVT, NRU, NCC, D, E, VT, LDVT,
+* U, LDU, C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU, SQRE
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( LDC, * ), D( * ), E( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASDQ computes the singular value decomposition (SVD) of a real
+*> (upper or lower) bidiagonal matrix with diagonal D and offdiagonal
+*> E, accumulating the transformations if desired. Letting B denote
+*> the input bidiagonal matrix, the algorithm computes orthogonal
+*> matrices Q and P such that B = Q * S * P**T (P**T denotes the transpose
+*> of P). The singular values S are overwritten on D.
+*>
+*> The input matrix U is changed to U * Q if desired.
+*> The input matrix VT is changed to P**T * VT if desired.
+*> The input matrix C is changed to Q**T * C if desired.
+*>
+*> See "Computing Small Singular Values of Bidiagonal Matrices With
+*> Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
+*> LAPACK Working Note #3, for a detailed description of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the input bidiagonal matrix
+*> is upper or lower bidiagonal, and wether it is square are
+*> not.
+*> UPLO = 'U' or 'u' B is upper bidiagonal.
+*> UPLO = 'L' or 'l' B is lower bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: then the input matrix is N-by-N.
+*> = 1: then the input matrix is N-by-(N+1) if UPLU = 'U' and
+*> (N+1)-by-N if UPLU = 'L'.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has
+*> N = NL + NR + 1 rows and
+*> M = N + SQRE >= N columns.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of rows and columns
+*> in the matrix. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in] NCVT
+*> \verbatim
+*> NCVT is INTEGER
+*> On entry, NCVT specifies the number of columns of
+*> the matrix VT. NCVT must be at least 0.
+*> \endverbatim
+*>
+*> \param[in] NRU
+*> \verbatim
+*> NRU is INTEGER
+*> On entry, NRU specifies the number of rows of
+*> the matrix U. NRU must be at least 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> On entry, NCC specifies the number of columns of
+*> the matrix C. NCC must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, D contains the diagonal entries of the
+*> bidiagonal matrix whose SVD is desired. On normal exit,
+*> D contains the singular values in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array.
+*> dimension is (N-1) if SQRE = 0 and N if SQRE = 1.
+*> On entry, the entries of E contain the offdiagonal entries
+*> of the bidiagonal matrix whose SVD is desired. On normal
+*> exit, E will contain 0. If the algorithm does not converge,
+*> D and E will contain the diagonal and superdiagonal entries
+*> of a bidiagonal matrix orthogonally equivalent to the one
+*> given as input.
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension (LDVT, NCVT)
+*> On entry, contains a matrix which on exit has been
+*> premultiplied by P**T, dimension N-by-NCVT if SQRE = 0
+*> and (N+1)-by-NCVT if SQRE = 1 (not referenced if NCVT=0).
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> On entry, LDVT specifies the leading dimension of VT as
+*> declared in the calling (sub) program. LDVT must be at
+*> least 1. If NCVT is nonzero LDVT must also be at least N.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> On entry, contains a matrix which on exit has been
+*> postmultiplied by Q, dimension NRU-by-N if SQRE = 0
+*> and NRU-by-(N+1) if SQRE = 1 (not referenced if NRU=0).
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> On entry, LDU specifies the leading dimension of U as
+*> declared in the calling (sub) program. LDU must be at
+*> least max( 1, NRU ) .
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC, NCC)
+*> On entry, contains an N-by-NCC matrix which on exit
+*> has been premultiplied by Q**T dimension N-by-NCC if SQRE = 0
+*> and (N+1)-by-NCC if SQRE = 1 (not referenced if NCC=0).
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the leading dimension of C as
+*> declared in the calling (sub) program. LDC must be at
+*> least 1. If NCC is nonzero, LDC must also be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> Workspace. Only referenced if one of NCVT, NRU, or NCC is
+*> nonzero, and if N is at least 2.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, a value of 0 indicates a successful exit.
+*> If INFO < 0, argument number -INFO is illegal.
+*> If INFO > 0, the algorithm did not converge, and INFO
+*> specifies how many superdiagonals did not converge.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLASDQ( UPLO, SQRE, N, NCVT, NRU, NCC, D, E, VT, LDVT,
$ U, LDU, C, LDC, WORK, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,120 +224,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASDQ computes the singular value decomposition (SVD) of a real
-* (upper or lower) bidiagonal matrix with diagonal D and offdiagonal
-* E, accumulating the transformations if desired. Letting B denote
-* the input bidiagonal matrix, the algorithm computes orthogonal
-* matrices Q and P such that B = Q * S * P**T (P**T denotes the transpose
-* of P). The singular values S are overwritten on D.
-*
-* The input matrix U is changed to U * Q if desired.
-* The input matrix VT is changed to P**T * VT if desired.
-* The input matrix C is changed to Q**T * C if desired.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices With
-* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
-* LAPACK Working Note #3, for a detailed description of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the input bidiagonal matrix
-* is upper or lower bidiagonal, and wether it is square are
-* not.
-* UPLO = 'U' or 'u' B is upper bidiagonal.
-* UPLO = 'L' or 'l' B is lower bidiagonal.
-*
-* SQRE (input) INTEGER
-* = 0: then the input matrix is N-by-N.
-* = 1: then the input matrix is N-by-(N+1) if UPLU = 'U' and
-* (N+1)-by-N if UPLU = 'L'.
-*
-* The bidiagonal matrix has
-* N = NL + NR + 1 rows and
-* M = N + SQRE >= N columns.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of rows and columns
-* in the matrix. N must be at least 0.
-*
-* NCVT (input) INTEGER
-* On entry, NCVT specifies the number of columns of
-* the matrix VT. NCVT must be at least 0.
-*
-* NRU (input) INTEGER
-* On entry, NRU specifies the number of rows of
-* the matrix U. NRU must be at least 0.
-*
-* NCC (input) INTEGER
-* On entry, NCC specifies the number of columns of
-* the matrix C. NCC must be at least 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, D contains the diagonal entries of the
-* bidiagonal matrix whose SVD is desired. On normal exit,
-* D contains the singular values in ascending order.
-*
-* E (input/output) DOUBLE PRECISION array.
-* dimension is (N-1) if SQRE = 0 and N if SQRE = 1.
-* On entry, the entries of E contain the offdiagonal entries
-* of the bidiagonal matrix whose SVD is desired. On normal
-* exit, E will contain 0. If the algorithm does not converge,
-* D and E will contain the diagonal and superdiagonal entries
-* of a bidiagonal matrix orthogonally equivalent to the one
-* given as input.
-*
-* VT (input/output) DOUBLE PRECISION array, dimension (LDVT, NCVT)
-* On entry, contains a matrix which on exit has been
-* premultiplied by P**T, dimension N-by-NCVT if SQRE = 0
-* and (N+1)-by-NCVT if SQRE = 1 (not referenced if NCVT=0).
-*
-* LDVT (input) INTEGER
-* On entry, LDVT specifies the leading dimension of VT as
-* declared in the calling (sub) program. LDVT must be at
-* least 1. If NCVT is nonzero LDVT must also be at least N.
-*
-* U (input/output) DOUBLE PRECISION array, dimension (LDU, N)
-* On entry, contains a matrix which on exit has been
-* postmultiplied by Q, dimension NRU-by-N if SQRE = 0
-* and NRU-by-(N+1) if SQRE = 1 (not referenced if NRU=0).
-*
-* LDU (input) INTEGER
-* On entry, LDU specifies the leading dimension of U as
-* declared in the calling (sub) program. LDU must be at
-* least max( 1, NRU ) .
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC, NCC)
-* On entry, contains an N-by-NCC matrix which on exit
-* has been premultiplied by Q**T dimension N-by-NCC if SQRE = 0
-* and (N+1)-by-NCC if SQRE = 1 (not referenced if NCC=0).
-*
-* LDC (input) INTEGER
-* On entry, LDC specifies the leading dimension of C as
-* declared in the calling (sub) program. LDC must be at
-* least 1. If NCC is nonzero, LDC must also be at least N.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-* Workspace. Only referenced if one of NCVT, NRU, or NCC is
-* nonzero, and if N is at least 2.
-*
-* INFO (output) INTEGER
-* On exit, a value of 0 indicates a successful exit.
-* If INFO < 0, argument number -INFO is illegal.
-* If INFO > 0, the algorithm did not converge, and INFO
-* specifies how many superdiagonals did not converge.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasdt.f b/SRC/dlasdt.f
index 0c71dc59..db9953bf 100644
--- a/SRC/dlasdt.f
+++ b/SRC/dlasdt.f
@@ -1,55 +1,119 @@
- SUBROUTINE DLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
+*> \brief \b DLASDT
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LVL, MSUB, N, ND
-* ..
-* .. Array Arguments ..
- INTEGER INODE( * ), NDIML( * ), NDIMR( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
+*
+* .. Scalar Arguments ..
+* INTEGER LVL, MSUB, N, ND
+* ..
+* .. Array Arguments ..
+* INTEGER INODE( * ), NDIML( * ), NDIMR( * )
+* ..
+*
* Purpose
* =======
*
-* DLASDT creates a tree of subproblems for bidiagonal divide and
-* conquer.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASDT creates a tree of subproblems for bidiagonal divide and
+*> conquer.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* On entry, the number of diagonal elements of the
-* bidiagonal matrix.
-*
-* LVL (output) INTEGER
-* On exit, the number of levels on the computation tree.
-*
-* ND (output) INTEGER
-* On exit, the number of nodes on the tree.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, the number of diagonal elements of the
+*> bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[out] LVL
+*> \verbatim
+*> LVL is INTEGER
+*> On exit, the number of levels on the computation tree.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is INTEGER
+*> On exit, the number of nodes on the tree.
+*> \endverbatim
+*>
+*> \param[out] INODE
+*> \verbatim
+*> INODE is INTEGER array, dimension ( N )
+*> On exit, centers of subproblems.
+*> \endverbatim
+*>
+*> \param[out] NDIML
+*> \verbatim
+*> NDIML is INTEGER array, dimension ( N )
+*> On exit, row dimensions of left children.
+*> \endverbatim
+*>
+*> \param[out] NDIMR
+*> \verbatim
+*> NDIMR is INTEGER array, dimension ( N )
+*> On exit, row dimensions of right children.
+*> \endverbatim
+*>
+*> \param[in] MSUB
+*> \verbatim
+*> MSUB is INTEGER
+*> On entry, the maximum row dimension each subproblem at the
+*> bottom of the tree can be of.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INODE (output) INTEGER array, dimension ( N )
-* On exit, centers of subproblems.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NDIML (output) INTEGER array, dimension ( N )
-* On exit, row dimensions of left children.
+*> \date November 2011
*
-* NDIMR (output) INTEGER array, dimension ( N )
-* On exit, row dimensions of right children.
+*> \ingroup auxOTHERauxiliary
*
-* MSUB (input) INTEGER
-* On entry, the maximum row dimension each subproblem at the
-* bottom of the tree can be of.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER LVL, MSUB, N, ND
+* ..
+* .. Array Arguments ..
+ INTEGER INODE( * ), NDIML( * ), NDIMR( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaset.f b/SRC/dlaset.f
index 9648dd00..98645b83 100644
--- a/SRC/dlaset.f
+++ b/SRC/dlaset.f
@@ -1,9 +1,113 @@
+*> \brief \b DLASET
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, M, N
+* DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASET initializes an m-by-n matrix A to BETA on the diagonal and
+*> ALPHA on the offdiagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be set.
+*> = 'U': Upper triangular part is set; the strictly lower
+*> triangular part of A is not changed.
+*> = 'L': Lower triangular part is set; the strictly upper
+*> triangular part of A is not changed.
+*> Otherwise: All of the matrix A is set.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> The constant to which the offdiagonal elements are to be set.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> The constant to which the diagonal elements are to be set.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On exit, the leading m-by-n submatrix of A is set as follows:
+*> \endverbatim
+*> \verbatim
+*> if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
+*> if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
+*> otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
+*> \endverbatim
+*> \verbatim
+*> and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,47 +118,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DLASET initializes an m-by-n matrix A to BETA on the diagonal and
-* ALPHA on the offdiagonals.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be set.
-* = 'U': Upper triangular part is set; the strictly lower
-* triangular part of A is not changed.
-* = 'L': Lower triangular part is set; the strictly upper
-* triangular part of A is not changed.
-* Otherwise: All of the matrix A is set.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* ALPHA (input) DOUBLE PRECISION
-* The constant to which the offdiagonal elements are to be set.
-*
-* BETA (input) DOUBLE PRECISION
-* The constant to which the diagonal elements are to be set.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On exit, the leading m-by-n submatrix of A is set as follows:
-*
-* if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
-* if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
-* otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
-*
-* and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dlasq1.f b/SRC/dlasq1.f
index 9ecb07b6..92a46888 100644
--- a/SRC/dlasq1.f
+++ b/SRC/dlasq1.f
@@ -1,14 +1,109 @@
- SUBROUTINE DLASQ1( N, D, E, WORK, INFO )
+*> \brief \b DLASQ1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASQ1( N, D, E, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASQ1 computes the singular values of a real N-by-N bidiagonal
+*> matrix with diagonal D and off-diagonal E. The singular values
+*> are computed to high relative accuracy, in the absence of
+*> denormalization, underflow and overflow. The algorithm was first
+*> presented in
+*>
+*> "Accurate singular values and differential qd algorithms" by K. V.
+*> Fernando and B. N. Parlett, Numer. Math., Vol-67, No. 2, pp. 191-230,
+*> 1994,
+*>
+*> and the present implementation is described in "An implementation of
+*> the dqds Algorithm (Positive Case)", LAPACK Working Note.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, D contains the diagonal elements of the
+*> bidiagonal matrix whose SVD is desired. On normal exit,
+*> D contains the singular values in decreasing order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> On entry, elements E(1:N-1) contain the off-diagonal elements
+*> of the bidiagonal matrix whose SVD is desired.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm failed
+*> = 1, a split was marked by a positive value in E
+*> = 2, current block of Z not diagonalized after 100*N
+*> iterations (in inner while loop) On exit D and E
+*> represent a matrix with the same singular values
+*> which the calling subroutine could use to finish the
+*> computation, or even feed back into DLASQ1
+*> = 3, termination criterion of outer while loop not met
+*> (program created more than N unreduced blocks)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- LAPACK routine (version 3.2) --
+*> \date November 2011
*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
+*> \ingroup auxOTHERcomputational
*
+* =====================================================================
+ SUBROUTINE DLASQ1( N, D, E, WORK, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, N
@@ -17,53 +112,6 @@
DOUBLE PRECISION D( * ), E( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASQ1 computes the singular values of a real N-by-N bidiagonal
-* matrix with diagonal D and off-diagonal E. The singular values
-* are computed to high relative accuracy, in the absence of
-* denormalization, underflow and overflow. The algorithm was first
-* presented in
-*
-* "Accurate singular values and differential qd algorithms" by K. V.
-* Fernando and B. N. Parlett, Numer. Math., Vol-67, No. 2, pp. 191-230,
-* 1994,
-*
-* and the present implementation is described in "An implementation of
-* the dqds Algorithm (Positive Case)", LAPACK Working Note.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows and columns in the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, D contains the diagonal elements of the
-* bidiagonal matrix whose SVD is desired. On normal exit,
-* D contains the singular values in decreasing order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, elements E(1:N-1) contain the off-diagonal elements
-* of the bidiagonal matrix whose SVD is desired.
-* On exit, E is overwritten.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm failed
-* = 1, a split was marked by a positive value in E
-* = 2, current block of Z not diagonalized after 100*N
-* iterations (in inner while loop) On exit D and E
-* represent a matrix with the same singular values
-* which the calling subroutine could use to finish the
-* computation, or even feed back into DLASQ1
-* = 3, termination criterion of outer while loop not met
-* (program created more than N unreduced blocks)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasq2.f b/SRC/dlasq2.f
index 82639956..5c45cc49 100644
--- a/SRC/dlasq2.f
+++ b/SRC/dlasq2.f
@@ -1,75 +1,122 @@
- SUBROUTINE DLASQ2( N, Z, INFO )
-*
-* -- LAPACK routine (version 3.2) --
+*> \brief \b DLASQ2
*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION Z( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DLASQ2( N, Z, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION Z( * )
+* ..
+*
* Purpose
* =======
*
-* DLASQ2 computes all the eigenvalues of the symmetric positive
-* definite tridiagonal matrix associated with the qd array Z to high
-* relative accuracy are computed to high relative accuracy, in the
-* absence of denormalization, underflow and overflow.
-*
-* To see the relation of Z to the tridiagonal matrix, let L be a
-* unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and
-* let U be an upper bidiagonal matrix with 1's above and diagonal
-* Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the
-* symmetric tridiagonal to which it is similar.
-*
-* Note : DLASQ2 defines a logical variable, IEEE, which is true
-* on machines which follow ieee-754 floating-point standard in their
-* handling of infinities and NaNs, and false otherwise. This variable
-* is passed to DLASQ3.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASQ2 computes all the eigenvalues of the symmetric positive
+*> definite tridiagonal matrix associated with the qd array Z to high
+*> relative accuracy are computed to high relative accuracy, in the
+*> absence of denormalization, underflow and overflow.
+*>
+*> To see the relation of Z to the tridiagonal matrix, let L be a
+*> unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and
+*> let U be an upper bidiagonal matrix with 1's above and diagonal
+*> Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the
+*> symmetric tridiagonal to which it is similar.
+*>
+*> Note : DLASQ2 defines a logical variable, IEEE, which is true
+*> on machines which follow ieee-754 floating-point standard in their
+*> handling of infinities and NaNs, and false otherwise. This variable
+*> is passed to DLASQ3.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows and columns in the matrix. N >= 0.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension ( 4*N )
-* On entry Z holds the qd array. On exit, entries 1 to N hold
-* the eigenvalues in decreasing order, Z( 2*N+1 ) holds the
-* trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If
-* N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 )
-* holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of
-* shifts that failed.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if the i-th argument is a scalar and had an illegal
-* value, then INFO = -i, if the i-th argument is an
-* array and the j-entry had an illegal value, then
-* INFO = -(i*100+j)
-* > 0: the algorithm failed
-* = 1, a split was marked by a positive value in E
-* = 2, current block of Z not diagonalized after 100*N
-* iterations (in inner while loop). On exit Z holds
-* a qd array with the same eigenvalues as the given Z.
-* = 3, termination criterion of outer while loop not met
-* (program created more than N unreduced blocks)
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( 4*N )
+*> On entry Z holds the qd array. On exit, entries 1 to N hold
+*> the eigenvalues in decreasing order, Z( 2*N+1 ) holds the
+*> trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If
+*> N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 )
+*> holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of
+*> shifts that failed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if the i-th argument is a scalar and had an illegal
+*> value, then INFO = -i, if the i-th argument is an
+*> array and the j-entry had an illegal value, then
+*> INFO = -(i*100+j)
+*> > 0: the algorithm failed
+*> = 1, a split was marked by a positive value in E
+*> = 2, current block of Z not diagonalized after 100*N
+*> iterations (in inner while loop). On exit Z holds
+*> a qd array with the same eigenvalues as the given Z.
+*> = 3, termination criterion of outer while loop not met
+*> (program created more than N unreduced blocks)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Local Variables: I0:N0 defines a current unreduced segment of Z.
+*> The shifts are accumulated in SIGMA. Iteration count is in ITER.
+*> Ping-pong is controlled by PP (alternates between 0 and 1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASQ2( N, Z, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Local Variables: I0:N0 defines a current unreduced segment of Z.
-* The shifts are accumulated in SIGMA. Iteration count is in ITER.
-* Ping-pong is controlled by PP (alternates between 0 and 1).
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasq3.f b/SRC/dlasq3.f
index a39620ed..6c869ab9 100644
--- a/SRC/dlasq3.f
+++ b/SRC/dlasq3.f
@@ -1,16 +1,184 @@
+*> \brief \b DLASQ3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL,
+* ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1,
+* DN2, G, TAU )
+*
+* .. Scalar Arguments ..
+* LOGICAL IEEE
+* INTEGER I0, ITER, N0, NDIV, NFAIL, PP
+* DOUBLE PRECISION DESIG, DMIN, DMIN1, DMIN2, DN, DN1, DN2, G,
+* $ QMAX, SIGMA, TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASQ3 checks for deflation, computes a shift (TAU) and calls dqds.
+*> In case of failure it changes shifts, and tries again until output
+*> is positive.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] I0
+*> \verbatim
+*> I0 is INTEGER
+*> First index.
+*> \endverbatim
+*>
+*> \param[in,out] N0
+*> \verbatim
+*> N0 is INTEGER
+*> Last index.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( 4*N )
+*> Z holds the qd array.
+*> \endverbatim
+*>
+*> \param[in,out] PP
+*> \verbatim
+*> PP is INTEGER
+*> PP=0 for ping, PP=1 for pong.
+*> PP=2 indicates that flipping was applied to the Z array
+*> and that the initial tests for deflation should not be
+*> performed.
+*> \endverbatim
+*>
+*> \param[out] DMIN
+*> \verbatim
+*> DMIN is DOUBLE PRECISION
+*> Minimum value of d.
+*> \endverbatim
+*>
+*> \param[out] SIGMA
+*> \verbatim
+*> SIGMA is DOUBLE PRECISION
+*> Sum of shifts used in current segment.
+*> \endverbatim
+*>
+*> \param[in,out] DESIG
+*> \verbatim
+*> DESIG is DOUBLE PRECISION
+*> Lower order part of SIGMA
+*> \endverbatim
+*>
+*> \param[in] QMAX
+*> \verbatim
+*> QMAX is DOUBLE PRECISION
+*> Maximum value of q.
+*> \endverbatim
+*>
+*> \param[out] NFAIL
+*> \verbatim
+*> NFAIL is INTEGER
+*> Number of times shift was too big.
+*> \endverbatim
+*>
+*> \param[out] ITER
+*> \verbatim
+*> ITER is INTEGER
+*> Number of iterations.
+*> \endverbatim
+*>
+*> \param[out] NDIV
+*> \verbatim
+*> NDIV is INTEGER
+*> Number of divisions.
+*> \endverbatim
+*>
+*> \param[in] IEEE
+*> \verbatim
+*> IEEE is LOGICAL
+*> Flag for IEEE or non IEEE arithmetic (passed to DLASQ5).
+*> \endverbatim
+*>
+*> \param[in,out] TTYPE
+*> \verbatim
+*> TTYPE is INTEGER
+*> Shift type.
+*> \endverbatim
+*>
+*> \param[in,out] DMIN1
+*> \verbatim
+*> DMIN1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] DMIN2
+*> \verbatim
+*> DMIN2 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] DN
+*> \verbatim
+*> DN is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] DN1
+*> \verbatim
+*> DN1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] DN2
+*> \verbatim
+*> DN2 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] G
+*> \verbatim
+*> G is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in,out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> \endverbatim
+*> \verbatim
+*> These are passed as arguments in order to save their values
+*> between calls to DLASQ3.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL,
$ ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1,
$ DN2, G, TAU )
*
-* -- LAPACK routine (version 3.2.2) --
-*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- June 2010 --
-*
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL IEEE
@@ -22,75 +190,6 @@
DOUBLE PRECISION Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASQ3 checks for deflation, computes a shift (TAU) and calls dqds.
-* In case of failure it changes shifts, and tries again until output
-* is positive.
-*
-* Arguments
-* =========
-*
-* I0 (input) INTEGER
-* First index.
-*
-* N0 (input/output) INTEGER
-* Last index.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( 4*N )
-* Z holds the qd array.
-*
-* PP (input/output) INTEGER
-* PP=0 for ping, PP=1 for pong.
-* PP=2 indicates that flipping was applied to the Z array
-* and that the initial tests for deflation should not be
-* performed.
-*
-* DMIN (output) DOUBLE PRECISION
-* Minimum value of d.
-*
-* SIGMA (output) DOUBLE PRECISION
-* Sum of shifts used in current segment.
-*
-* DESIG (input/output) DOUBLE PRECISION
-* Lower order part of SIGMA
-*
-* QMAX (input) DOUBLE PRECISION
-* Maximum value of q.
-*
-* NFAIL (output) INTEGER
-* Number of times shift was too big.
-*
-* ITER (output) INTEGER
-* Number of iterations.
-*
-* NDIV (output) INTEGER
-* Number of divisions.
-*
-* IEEE (input) LOGICAL
-* Flag for IEEE or non IEEE arithmetic (passed to DLASQ5).
-*
-* TTYPE (input/output) INTEGER
-* Shift type.
-*
-* DMIN1 (input/output) DOUBLE PRECISION
-*
-* DMIN2 (input/output) DOUBLE PRECISION
-*
-* DN (input/output) DOUBLE PRECISION
-*
-* DN1 (input/output) DOUBLE PRECISION
-*
-* DN2 (input/output) DOUBLE PRECISION
-*
-* G (input/output) DOUBLE PRECISION
-*
-* TAU (input/output) DOUBLE PRECISION
-*
-* These are passed as arguments in order to save their values
-* between calls to DLASQ3.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasq4.f b/SRC/dlasq4.f
index 420320a8..f05b60d2 100644
--- a/SRC/dlasq4.f
+++ b/SRC/dlasq4.f
@@ -1,80 +1,162 @@
- SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
- $ DN1, DN2, TAU, TTYPE, G )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER I0, N0, N0IN, PP, TTYPE
- DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DN1, DN2, G, TAU
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION Z( * )
-* ..
-*
+*> \brief \b DLASQ4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
+* DN1, DN2, TAU, TTYPE, G )
+*
+* .. Scalar Arguments ..
+* INTEGER I0, N0, N0IN, PP, TTYPE
+* DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DN1, DN2, G, TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION Z( * )
+* ..
+*
* Purpose
* =======
*
-* DLASQ4 computes an approximation TAU to the smallest eigenvalue
-* using values of d from the previous transform.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASQ4 computes an approximation TAU to the smallest eigenvalue
+*> using values of d from the previous transform.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* I0 (input) INTEGER
-* First index.
-*
-* N0 (input) INTEGER
-* Last index.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( 4*N )
-* Z holds the qd array.
-*
-* PP (input) INTEGER
-* PP=0 for ping, PP=1 for pong.
-*
-* NOIN (input) INTEGER
-* The value of N0 at start of EIGTEST.
-*
-* DMIN (input) DOUBLE PRECISION
-* Minimum value of d.
-*
-* DMIN1 (input) DOUBLE PRECISION
-* Minimum value of d, excluding D( N0 ).
-*
-* DMIN2 (input) DOUBLE PRECISION
-* Minimum value of d, excluding D( N0 ) and D( N0-1 ).
-*
-* DN (input) DOUBLE PRECISION
-* d(N)
-*
-* DN1 (input) DOUBLE PRECISION
-* d(N-1)
+*> \param[in] I0
+*> \verbatim
+*> I0 is INTEGER
+*> First index.
+*> \endverbatim
+*>
+*> \param[in] N0
+*> \verbatim
+*> N0 is INTEGER
+*> Last index.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( 4*N )
+*> Z holds the qd array.
+*> \endverbatim
+*>
+*> \param[in] PP
+*> \verbatim
+*> PP is INTEGER
+*> PP=0 for ping, PP=1 for pong.
+*> \endverbatim
+*>
+*> \param[in] NOIN
+*> \verbatim
+*> NOIN is INTEGER
+*> The value of N0 at start of EIGTEST.
+*> \endverbatim
+*>
+*> \param[in] DMIN
+*> \verbatim
+*> DMIN is DOUBLE PRECISION
+*> Minimum value of d.
+*> \endverbatim
+*>
+*> \param[in] DMIN1
+*> \verbatim
+*> DMIN1 is DOUBLE PRECISION
+*> Minimum value of d, excluding D( N0 ).
+*> \endverbatim
+*>
+*> \param[in] DMIN2
+*> \verbatim
+*> DMIN2 is DOUBLE PRECISION
+*> Minimum value of d, excluding D( N0 ) and D( N0-1 ).
+*> \endverbatim
+*>
+*> \param[in] DN
+*> \verbatim
+*> DN is DOUBLE PRECISION
+*> d(N)
+*> \endverbatim
+*>
+*> \param[in] DN1
+*> \verbatim
+*> DN1 is DOUBLE PRECISION
+*> d(N-1)
+*> \endverbatim
+*>
+*> \param[in] DN2
+*> \verbatim
+*> DN2 is DOUBLE PRECISION
+*> d(N-2)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> This is the shift.
+*> \endverbatim
+*>
+*> \param[out] TTYPE
+*> \verbatim
+*> TTYPE is INTEGER
+*> Shift type.
+*> \endverbatim
+*>
+*> \param[in,out] G
+*> \verbatim
+*> G is REAL
+*> G is passed as an argument in order to save its value between
+*> calls to DLASQ4.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DN2 (input) DOUBLE PRECISION
-* d(N-2)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION
-* This is the shift.
+*> \date November 2011
*
-* TTYPE (output) INTEGER
-* Shift type.
+*> \ingroup auxOTHERcomputational
*
-* G (input/output) REAL
-* G is passed as an argument in order to save its value between
-* calls to DLASQ4.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> CNST1 = 9/16
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
+ $ DN1, DN2, TAU, TTYPE, G )
*
-* CNST1 = 9/16
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER I0, N0, N0IN, PP, TTYPE
+ DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DN1, DN2, G, TAU
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasq5.f b/SRC/dlasq5.f
index 294a4819..bd1142a5 100644
--- a/SRC/dlasq5.f
+++ b/SRC/dlasq5.f
@@ -1,15 +1,133 @@
- SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN,
- $ DNM1, DNM2, IEEE )
+*> \brief \b DLASQ5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN,
+* DNM1, DNM2, IEEE )
+*
+* .. Scalar Arguments ..
+* LOGICAL IEEE
+* INTEGER I0, N0, PP
+* DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2, TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASQ5 computes one dqds transform in ping-pong form, one
+*> version for IEEE machines another for non IEEE machines.
+*>
+*>\endverbatim
*
-* -- LAPACK routine (version 3.2) --
+* Arguments
+* =========
+*
+*> \param[in] I0
+*> \verbatim
+*> I0 is INTEGER
+*> First index.
+*> \endverbatim
+*>
+*> \param[in] N0
+*> \verbatim
+*> N0 is INTEGER
+*> Last index.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( 4*N )
+*> Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
+*> an extra argument.
+*> \endverbatim
+*>
+*> \param[in] PP
+*> \verbatim
+*> PP is INTEGER
+*> PP=0 for ping, PP=1 for pong.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> This is the shift.
+*> \endverbatim
+*>
+*> \param[out] DMIN
+*> \verbatim
+*> DMIN is DOUBLE PRECISION
+*> Minimum value of d.
+*> \endverbatim
+*>
+*> \param[out] DMIN1
+*> \verbatim
+*> DMIN1 is DOUBLE PRECISION
+*> Minimum value of d, excluding D( N0 ).
+*> \endverbatim
+*>
+*> \param[out] DMIN2
+*> \verbatim
+*> DMIN2 is DOUBLE PRECISION
+*> Minimum value of d, excluding D( N0 ) and D( N0-1 ).
+*> \endverbatim
+*>
+*> \param[out] DN
+*> \verbatim
+*> DN is DOUBLE PRECISION
+*> d(N0), the last value of d.
+*> \endverbatim
+*>
+*> \param[out] DNM1
+*> \verbatim
+*> DNM1 is DOUBLE PRECISION
+*> d(N0-1).
+*> \endverbatim
+*>
+*> \param[out] DNM2
+*> \verbatim
+*> DNM2 is DOUBLE PRECISION
+*> d(N0-2).
+*> \endverbatim
+*>
+*> \param[in] IEEE
+*> \verbatim
+*> IEEE is LOGICAL
+*> Flag for IEEE or non IEEE arithmetic.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN,
+ $ DNM1, DNM2, IEEE )
+*
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL IEEE
@@ -20,52 +138,6 @@
DOUBLE PRECISION Z( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASQ5 computes one dqds transform in ping-pong form, one
-* version for IEEE machines another for non IEEE machines.
-*
-* Arguments
-* =========
-*
-* I0 (input) INTEGER
-* First index.
-*
-* N0 (input) INTEGER
-* Last index.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( 4*N )
-* Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
-* an extra argument.
-*
-* PP (input) INTEGER
-* PP=0 for ping, PP=1 for pong.
-*
-* TAU (input) DOUBLE PRECISION
-* This is the shift.
-*
-* DMIN (output) DOUBLE PRECISION
-* Minimum value of d.
-*
-* DMIN1 (output) DOUBLE PRECISION
-* Minimum value of d, excluding D( N0 ).
-*
-* DMIN2 (output) DOUBLE PRECISION
-* Minimum value of d, excluding D( N0 ) and D( N0-1 ).
-*
-* DN (output) DOUBLE PRECISION
-* d(N0), the last value of d.
-*
-* DNM1 (output) DOUBLE PRECISION
-* d(N0-1).
-*
-* DNM2 (output) DOUBLE PRECISION
-* d(N0-2).
-*
-* IEEE (input) LOGICAL
-* Flag for IEEE or non IEEE arithmetic.
-*
* =====================================================================
*
* .. Parameter ..
diff --git a/SRC/dlasq6.f b/SRC/dlasq6.f
index 2be20317..6a62e94a 100644
--- a/SRC/dlasq6.f
+++ b/SRC/dlasq6.f
@@ -1,63 +1,128 @@
- SUBROUTINE DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN,
- $ DNM1, DNM2 )
-*
-* -- LAPACK routine (version 3.2) --
-*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER I0, N0, PP
- DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION Z( * )
-* ..
-*
+*> \brief \b DLASQ6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN,
+* DNM1, DNM2 )
+*
+* .. Scalar Arguments ..
+* INTEGER I0, N0, PP
+* DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION Z( * )
+* ..
+*
* Purpose
* =======
*
-* DLASQ6 computes one dqd (shift equal to zero) transform in
-* ping-pong form, with protection against underflow and overflow.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASQ6 computes one dqd (shift equal to zero) transform in
+*> ping-pong form, with protection against underflow and overflow.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* I0 (input) INTEGER
-* First index.
-*
-* N0 (input) INTEGER
-* Last index.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( 4*N )
-* Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
-* an extra argument.
-*
-* PP (input) INTEGER
-* PP=0 for ping, PP=1 for pong.
+*> \param[in] I0
+*> \verbatim
+*> I0 is INTEGER
+*> First index.
+*> \endverbatim
+*>
+*> \param[in] N0
+*> \verbatim
+*> N0 is INTEGER
+*> Last index.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( 4*N )
+*> Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
+*> an extra argument.
+*> \endverbatim
+*>
+*> \param[in] PP
+*> \verbatim
+*> PP is INTEGER
+*> PP=0 for ping, PP=1 for pong.
+*> \endverbatim
+*>
+*> \param[out] DMIN
+*> \verbatim
+*> DMIN is DOUBLE PRECISION
+*> Minimum value of d.
+*> \endverbatim
+*>
+*> \param[out] DMIN1
+*> \verbatim
+*> DMIN1 is DOUBLE PRECISION
+*> Minimum value of d, excluding D( N0 ).
+*> \endverbatim
+*>
+*> \param[out] DMIN2
+*> \verbatim
+*> DMIN2 is DOUBLE PRECISION
+*> Minimum value of d, excluding D( N0 ) and D( N0-1 ).
+*> \endverbatim
+*>
+*> \param[out] DN
+*> \verbatim
+*> DN is DOUBLE PRECISION
+*> d(N0), the last value of d.
+*> \endverbatim
+*>
+*> \param[out] DNM1
+*> \verbatim
+*> DNM1 is DOUBLE PRECISION
+*> d(N0-1).
+*> \endverbatim
+*>
+*> \param[out] DNM2
+*> \verbatim
+*> DNM2 is DOUBLE PRECISION
+*> d(N0-2).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DMIN (output) DOUBLE PRECISION
-* Minimum value of d.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DMIN1 (output) DOUBLE PRECISION
-* Minimum value of d, excluding D( N0 ).
+*> \date November 2011
*
-* DMIN2 (output) DOUBLE PRECISION
-* Minimum value of d, excluding D( N0 ) and D( N0-1 ).
+*> \ingroup auxOTHERcomputational
*
-* DN (output) DOUBLE PRECISION
-* d(N0), the last value of d.
+* =====================================================================
+ SUBROUTINE DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN,
+ $ DNM1, DNM2 )
*
-* DNM1 (output) DOUBLE PRECISION
-* d(N0-1).
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DNM2 (output) DOUBLE PRECISION
-* d(N0-2).
+* .. Scalar Arguments ..
+ INTEGER I0, N0, PP
+ DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasr.f b/SRC/dlasr.f
index 55ab2e37..4b066cf7 100644
--- a/SRC/dlasr.f
+++ b/SRC/dlasr.f
@@ -1,142 +1,208 @@
- SUBROUTINE DLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
+*> \brief \b DLASR
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, PIVOT, SIDE
- INTEGER LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( * ), S( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, PIVOT, SIDE
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* DLASR applies a sequence of plane rotations to a real matrix A,
-* from either the left or the right.
-*
-* When SIDE = 'L', the transformation takes the form
-*
-* A := P*A
-*
-* and when SIDE = 'R', the transformation takes the form
-*
-* A := A*P**T
-*
-* where P is an orthogonal matrix consisting of a sequence of z plane
-* rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
-* and P**T is the transpose of P.
-*
-* When DIRECT = 'F' (Forward sequence), then
-*
-* P = P(z-1) * ... * P(2) * P(1)
-*
-* and when DIRECT = 'B' (Backward sequence), then
-*
-* P = P(1) * P(2) * ... * P(z-1)
-*
-* where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
-*
-* R(k) = ( c(k) s(k) )
-* = ( -s(k) c(k) ).
-*
-* When PIVOT = 'V' (Variable pivot), the rotation is performed
-* for the plane (k,k+1), i.e., P(k) has the form
-*
-* P(k) = ( 1 )
-* ( ... )
-* ( 1 )
-* ( c(k) s(k) )
-* ( -s(k) c(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-*
-* where R(k) appears as a rank-2 modification to the identity matrix in
-* rows and columns k and k+1.
-*
-* When PIVOT = 'T' (Top pivot), the rotation is performed for the
-* plane (1,k+1), so P(k) has the form
-*
-* P(k) = ( c(k) s(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-* ( -s(k) c(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-*
-* where R(k) appears in rows and columns 1 and k+1.
-*
-* Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
-* performed for the plane (k,z), giving P(k) the form
-*
-* P(k) = ( 1 )
-* ( ... )
-* ( 1 )
-* ( c(k) s(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-* ( -s(k) c(k) )
-*
-* where R(k) appears in rows and columns k and z. The rotations are
-* performed without ever forming P(k) explicitly.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASR applies a sequence of plane rotations to a real matrix A,
+*> from either the left or the right.
+*>
+*> When SIDE = 'L', the transformation takes the form
+*>
+*> A := P*A
+*>
+*> and when SIDE = 'R', the transformation takes the form
+*>
+*> A := A*P**T
+*>
+*> where P is an orthogonal matrix consisting of a sequence of z plane
+*> rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
+*> and P**T is the transpose of P.
+*>
+*> When DIRECT = 'F' (Forward sequence), then
+*>
+*> P = P(z-1) * ... * P(2) * P(1)
+*>
+*> and when DIRECT = 'B' (Backward sequence), then
+*>
+*> P = P(1) * P(2) * ... * P(z-1)
+*>
+*> where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
+*>
+*> R(k) = ( c(k) s(k) )
+*> = ( -s(k) c(k) ).
+*>
+*> When PIVOT = 'V' (Variable pivot), the rotation is performed
+*> for the plane (k,k+1), i.e., P(k) has the form
+*>
+*> P(k) = ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( c(k) s(k) )
+*> ( -s(k) c(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*>
+*> where R(k) appears as a rank-2 modification to the identity matrix in
+*> rows and columns k and k+1.
+*>
+*> When PIVOT = 'T' (Top pivot), the rotation is performed for the
+*> plane (1,k+1), so P(k) has the form
+*>
+*> P(k) = ( c(k) s(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( -s(k) c(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*>
+*> where R(k) appears in rows and columns 1 and k+1.
+*>
+*> Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
+*> performed for the plane (k,z), giving P(k) the form
+*>
+*> P(k) = ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( c(k) s(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( -s(k) c(k) )
+*>
+*> where R(k) appears in rows and columns k and z. The rotations are
+*> performed without ever forming P(k) explicitly.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* Specifies whether the plane rotation matrix P is applied to
-* A on the left or the right.
-* = 'L': Left, compute A := P*A
-* = 'R': Right, compute A:= A*P**T
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> Specifies whether the plane rotation matrix P is applied to
+*> A on the left or the right.
+*> = 'L': Left, compute A := P*A
+*> = 'R': Right, compute A:= A*P**T
+*> \endverbatim
+*>
+*> \param[in] PIVOT
+*> \verbatim
+*> PIVOT is CHARACTER*1
+*> Specifies the plane for which P(k) is a plane rotation
+*> matrix.
+*> = 'V': Variable pivot, the plane (k,k+1)
+*> = 'T': Top pivot, the plane (1,k+1)
+*> = 'B': Bottom pivot, the plane (k,z)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies whether P is a forward or backward sequence of
+*> plane rotations.
+*> = 'F': Forward, P = P(z-1)*...*P(2)*P(1)
+*> = 'B': Backward, P = P(1)*P(2)*...*P(z-1)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. If m <= 1, an immediate
+*> return is effected.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. If n <= 1, an
+*> immediate return is effected.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> The cosines c(k) of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> The sines s(k) of the plane rotations. The 2-by-2 plane
+*> rotation part of the matrix P(k), R(k), has the form
+*> R(k) = ( c(k) s(k) )
+*> ( -s(k) c(k) ).
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix A. On exit, A is overwritten by P*A if
+*> SIDE = 'R' or by A*P**T if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
*
-* PIVOT (input) CHARACTER*1
-* Specifies the plane for which P(k) is a plane rotation
-* matrix.
-* = 'V': Variable pivot, the plane (k,k+1)
-* = 'T': Top pivot, the plane (1,k+1)
-* = 'B': Bottom pivot, the plane (k,z)
-*
-* DIRECT (input) CHARACTER*1
-* Specifies whether P is a forward or backward sequence of
-* plane rotations.
-* = 'F': Forward, P = P(z-1)*...*P(2)*P(1)
-* = 'B': Backward, P = P(1)*P(2)*...*P(z-1)
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A. If m <= 1, an immediate
-* return is effected.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. If n <= 1, an
-* immediate return is effected.
+*> \date November 2011
*
-* C (input) DOUBLE PRECISION array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* The cosines c(k) of the plane rotations.
+*> \ingroup auxOTHERauxiliary
*
-* S (input) DOUBLE PRECISION array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* The sines s(k) of the plane rotations. The 2-by-2 plane
-* rotation part of the matrix P(k), R(k), has the form
-* R(k) = ( c(k) s(k) )
-* ( -s(k) c(k) ).
+* =====================================================================
+ SUBROUTINE DLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix A. On exit, A is overwritten by P*A if
-* SIDE = 'R' or by A*P**T if SIDE = 'L'.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, PIVOT, SIDE
+ INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasrt.f b/SRC/dlasrt.f
index 90eda0cd..33c51c1e 100644
--- a/SRC/dlasrt.f
+++ b/SRC/dlasrt.f
@@ -1,9 +1,89 @@
+*> \brief \b DLASRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASRT( ID, N, D, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER ID
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Sort the numbers in D in increasing order (if ID = 'I') or
+*> in decreasing order (if ID = 'D' ).
+*>
+*> Use Quick Sort, reverting to Insertion sort on arrays of
+*> size <= 20. Dimension of STACK limits N to about 2**32.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ID
+*> \verbatim
+*> ID is CHARACTER*1
+*> = 'I': sort D in increasing order;
+*> = 'D': sort D in decreasing order.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the array D.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the array to be sorted.
+*> On exit, D has been sorted into increasing order
+*> (D(1) <= ... <= D(N) ) or into decreasing order
+*> (D(1) >= ... >= D(N) ), depending on ID.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DLASRT( ID, N, D, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER ID
@@ -13,35 +93,6 @@
DOUBLE PRECISION D( * )
* ..
*
-* Purpose
-* =======
-*
-* Sort the numbers in D in increasing order (if ID = 'I') or
-* in decreasing order (if ID = 'D' ).
-*
-* Use Quick Sort, reverting to Insertion sort on arrays of
-* size <= 20. Dimension of STACK limits N to about 2**32.
-*
-* Arguments
-* =========
-*
-* ID (input) CHARACTER*1
-* = 'I': sort D in increasing order;
-* = 'D': sort D in decreasing order.
-*
-* N (input) INTEGER
-* The length of the array D.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the array to be sorted.
-* On exit, D has been sorted into increasing order
-* (D(1) <= ... <= D(N) ) or into decreasing order
-* (D(1) >= ... >= D(N) ), depending on ID.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlassq.f b/SRC/dlassq.f
index 51cce918..02203294 100644
--- a/SRC/dlassq.f
+++ b/SRC/dlassq.f
@@ -1,9 +1,104 @@
+*> \brief \b DLASSQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASSQ( N, X, INCX, SCALE, SUMSQ )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* DOUBLE PRECISION SCALE, SUMSQ
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASSQ returns the values scl and smsq such that
+*>
+*> ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
+*>
+*> where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is
+*> assumed to be non-negative and scl returns the value
+*>
+*> scl = max( scale, abs( x( i ) ) ).
+*>
+*> scale and sumsq must be supplied in SCALE and SUMSQ and
+*> scl and smsq are overwritten on SCALE and SUMSQ respectively.
+*>
+*> The routine makes only one pass through the vector x.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements to be used from the vector X.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> The vector for which a scaled sum of squares is computed.
+*> x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of the vector X.
+*> INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On entry, the value scale in the equation above.
+*> On exit, SCALE is overwritten with scl , the scaling factor
+*> for the sum of squares.
+*> \endverbatim
+*>
+*> \param[in,out] SUMSQ
+*> \verbatim
+*> SUMSQ is DOUBLE PRECISION
+*> On entry, the value sumsq in the equation above.
+*> On exit, SUMSQ is overwritten with smsq , the basic sum of
+*> squares from which scl has been factored out.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLASSQ( N, X, INCX, SCALE, SUMSQ )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,47 +108,6 @@
DOUBLE PRECISION X( * )
* ..
*
-* Purpose
-* =======
-*
-* DLASSQ returns the values scl and smsq such that
-*
-* ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
-*
-* where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is
-* assumed to be non-negative and scl returns the value
-*
-* scl = max( scale, abs( x( i ) ) ).
-*
-* scale and sumsq must be supplied in SCALE and SUMSQ and
-* scl and smsq are overwritten on SCALE and SUMSQ respectively.
-*
-* The routine makes only one pass through the vector x.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of elements to be used from the vector X.
-*
-* X (input) DOUBLE PRECISION array, dimension (N)
-* The vector for which a scaled sum of squares is computed.
-* x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
-*
-* INCX (input) INTEGER
-* The increment between successive values of the vector X.
-* INCX > 0.
-*
-* SCALE (input/output) DOUBLE PRECISION
-* On entry, the value scale in the equation above.
-* On exit, SCALE is overwritten with scl , the scaling factor
-* for the sum of squares.
-*
-* SUMSQ (input/output) DOUBLE PRECISION
-* On entry, the value sumsq in the equation above.
-* On exit, SUMSQ is overwritten with smsq , the basic sum of
-* squares from which scl has been factored out.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasv2.f b/SRC/dlasv2.f
index dd3b7e98..4dd6eee1 100644
--- a/SRC/dlasv2.f
+++ b/SRC/dlasv2.f
@@ -1,78 +1,145 @@
- SUBROUTINE DLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
+*> \brief \b DLASV2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
+* ..
+*
* Purpose
* =======
*
-* DLASV2 computes the singular value decomposition of a 2-by-2
-* triangular matrix
-* [ F G ]
-* [ 0 H ].
-* On return, abs(SSMAX) is the larger singular value, abs(SSMIN) is the
-* smaller singular value, and (CSL,SNL) and (CSR,SNR) are the left and
-* right singular vectors for abs(SSMAX), giving the decomposition
-*
-* [ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ]
-* [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ].
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASV2 computes the singular value decomposition of a 2-by-2
+*> triangular matrix
+*> [ F G ]
+*> [ 0 H ].
+*> On return, abs(SSMAX) is the larger singular value, abs(SSMIN) is the
+*> smaller singular value, and (CSL,SNL) and (CSR,SNR) are the left and
+*> right singular vectors for abs(SSMAX), giving the decomposition
+*>
+*> [ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ]
+*> [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ].
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) DOUBLE PRECISION
-* The (1,1) element of the 2-by-2 matrix.
-*
-* G (input) DOUBLE PRECISION
-* The (1,2) element of the 2-by-2 matrix.
-*
-* H (input) DOUBLE PRECISION
-* The (2,2) element of the 2-by-2 matrix.
-*
-* SSMIN (output) DOUBLE PRECISION
-* abs(SSMIN) is the smaller singular value.
-*
-* SSMAX (output) DOUBLE PRECISION
-* abs(SSMAX) is the larger singular value.
+*> \param[in] F
+*> \verbatim
+*> F is DOUBLE PRECISION
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is DOUBLE PRECISION
+*> The (1,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is DOUBLE PRECISION
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] SSMIN
+*> \verbatim
+*> SSMIN is DOUBLE PRECISION
+*> abs(SSMIN) is the smaller singular value.
+*> \endverbatim
+*>
+*> \param[out] SSMAX
+*> \verbatim
+*> SSMAX is DOUBLE PRECISION
+*> abs(SSMAX) is the larger singular value.
+*> \endverbatim
+*>
+*> \param[out] SNL
+*> \verbatim
+*> SNL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] CSL
+*> \verbatim
+*> CSL is DOUBLE PRECISION
+*> The vector (CSL, SNL) is a unit left singular vector for the
+*> singular value abs(SSMAX).
+*> \endverbatim
+*>
+*> \param[out] SNR
+*> \verbatim
+*> SNR is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] CSR
+*> \verbatim
+*> CSR is DOUBLE PRECISION
+*> The vector (CSR, SNR) is a unit right singular vector for the
+*> singular value abs(SSMAX).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SNL (output) DOUBLE PRECISION
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CSL (output) DOUBLE PRECISION
-* The vector (CSL, SNL) is a unit left singular vector for the
-* singular value abs(SSMAX).
+*> \date November 2011
*
-* SNR (output) DOUBLE PRECISION
+*> \ingroup auxOTHERauxiliary
*
-* CSR (output) DOUBLE PRECISION
-* The vector (CSR, SNR) is a unit right singular vector for the
-* singular value abs(SSMAX).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Any input parameter may be aliased with any output parameter.
+*>
+*> Barring over/underflow and assuming a guard digit in subtraction, all
+*> output quantities are correct to within a few units in the last
+*> place (ulps).
+*>
+*> In IEEE arithmetic, the code works correctly if one matrix element is
+*> infinite.
+*>
+*> Overflow will not occur unless the largest singular value itself
+*> overflows or is within a few ulps of overflow. (On machines with
+*> partial overflow, like the Cray, overflow may occur if the largest
+*> singular value is within a factor of 2 of overflow.)
+*>
+*> Underflow is harmless if underflow is gradual. Otherwise, results
+*> may correspond to a matrix modified by perturbations of size near
+*> the underflow threshold.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
*
-* Any input parameter may be aliased with any output parameter.
-*
-* Barring over/underflow and assuming a guard digit in subtraction, all
-* output quantities are correct to within a few units in the last
-* place (ulps).
-*
-* In IEEE arithmetic, the code works correctly if one matrix element is
-* infinite.
-*
-* Overflow will not occur unless the largest singular value itself
-* overflows or is within a few ulps of overflow. (On machines with
-* partial overflow, like the Cray, overflow may occur if the largest
-* singular value is within a factor of 2 of overflow.)
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Underflow is harmless if underflow is gradual. Otherwise, results
-* may correspond to a matrix modified by perturbations of size near
-* the underflow threshold.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlaswp.f b/SRC/dlaswp.f
index 5239ba1f..b3efd426 100644
--- a/SRC/dlaswp.f
+++ b/SRC/dlaswp.f
@@ -1,60 +1,125 @@
- SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCX, K1, K2, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * )
-* ..
-*
+*> \brief \b DLASWP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, K1, K2, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DLASWP performs a series of row interchanges on the matrix A.
-* One row interchange is initiated for each of rows K1 through K2 of A.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASWP performs a series of row interchanges on the matrix A.
+*> One row interchange is initiated for each of rows K1 through K2 of A.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the matrix of column dimension N to which the row
-* interchanges will be applied.
-* On exit, the permuted matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the matrix of column dimension N to which the row
+*> interchanges will be applied.
+*> On exit, the permuted matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] K1
+*> \verbatim
+*> K1 is INTEGER
+*> The first element of IPIV for which a row interchange will
+*> be done.
+*> \endverbatim
+*>
+*> \param[in] K2
+*> \verbatim
+*> K2 is INTEGER
+*> The last element of IPIV for which a row interchange will
+*> be done.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (K2*abs(INCX))
+*> The vector of pivot indices. Only the elements in positions
+*> K1 through K2 of IPIV are accessed.
+*> IPIV(K) = L implies rows K and L are to be interchanged.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of IPIV. If IPIV
+*> is negative, the pivots are applied in reverse order.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K1 (input) INTEGER
-* The first element of IPIV for which a row interchange will
-* be done.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* K2 (input) INTEGER
-* The last element of IPIV for which a row interchange will
-* be done.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (K2*abs(INCX))
-* The vector of pivot indices. Only the elements in positions
-* K1 through K2 of IPIV are accessed.
-* IPIV(K) = L implies rows K and L are to be interchanged.
+*> \ingroup doubleOTHERauxiliary
*
-* INCX (input) INTEGER
-* The increment between successive values of IPIV. If IPIV
-* is negative, the pivots are applied in reverse order.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by
+*> R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by
-* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* .. Scalar Arguments ..
+ INTEGER INCX, K1, K2, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlasy2.f b/SRC/dlasy2.f
index d88ddb1d..b5a0cf94 100644
--- a/SRC/dlasy2.f
+++ b/SRC/dlasy2.f
@@ -1,10 +1,175 @@
+*> \brief \b DLASY2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASY2( LTRANL, LTRANR, ISGN, N1, N2, TL, LDTL, TR,
+* LDTR, B, LDB, SCALE, X, LDX, XNORM, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL LTRANL, LTRANR
+* INTEGER INFO, ISGN, LDB, LDTL, LDTR, LDX, N1, N2
+* DOUBLE PRECISION SCALE, XNORM
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), TL( LDTL, * ), TR( LDTR, * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASY2 solves for the N1 by N2 matrix X, 1 <= N1,N2 <= 2, in
+*>
+*> op(TL)*X + ISGN*X*op(TR) = SCALE*B,
+*>
+*> where TL is N1 by N1, TR is N2 by N2, B is N1 by N2, and ISGN = 1 or
+*> -1. op(T) = T or T**T, where T**T denotes the transpose of T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LTRANL
+*> \verbatim
+*> LTRANL is LOGICAL
+*> On entry, LTRANL specifies the op(TL):
+*> = .FALSE., op(TL) = TL,
+*> = .TRUE., op(TL) = TL**T.
+*> \endverbatim
+*>
+*> \param[in] LTRANR
+*> \verbatim
+*> LTRANR is LOGICAL
+*> On entry, LTRANR specifies the op(TR):
+*> = .FALSE., op(TR) = TR,
+*> = .TRUE., op(TR) = TR**T.
+*> \endverbatim
+*>
+*> \param[in] ISGN
+*> \verbatim
+*> ISGN is INTEGER
+*> On entry, ISGN specifies the sign of the equation
+*> as described before. ISGN may only be 1 or -1.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> On entry, N1 specifies the order of matrix TL.
+*> N1 may only be 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> On entry, N2 specifies the order of matrix TR.
+*> N2 may only be 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] TL
+*> \verbatim
+*> TL is DOUBLE PRECISION array, dimension (LDTL,2)
+*> On entry, TL contains an N1 by N1 matrix.
+*> \endverbatim
+*>
+*> \param[in] LDTL
+*> \verbatim
+*> LDTL is INTEGER
+*> The leading dimension of the matrix TL. LDTL >= max(1,N1).
+*> \endverbatim
+*>
+*> \param[in] TR
+*> \verbatim
+*> TR is DOUBLE PRECISION array, dimension (LDTR,2)
+*> On entry, TR contains an N2 by N2 matrix.
+*> \endverbatim
+*>
+*> \param[in] LDTR
+*> \verbatim
+*> LDTR is INTEGER
+*> The leading dimension of the matrix TR. LDTR >= max(1,N2).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,2)
+*> On entry, the N1 by N2 matrix B contains the right-hand
+*> side of the equation.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the matrix B. LDB >= max(1,N1).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On exit, SCALE contains the scale factor. SCALE is chosen
+*> less than or equal to 1 to prevent the solution overflowing.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,2)
+*> On exit, X contains the N1 by N2 solution.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the matrix X. LDX >= max(1,N1).
+*> \endverbatim
+*>
+*> \param[out] XNORM
+*> \verbatim
+*> XNORM is DOUBLE PRECISION
+*> On exit, XNORM is the infinity-norm of the solution.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO is set to
+*> 0: successful exit.
+*> 1: TL and TR have too close eigenvalues, so TL or
+*> TR is perturbed to get a nonsingular equation.
+*> NOTE: In the interests of speed, this routine does not
+*> check the inputs for errors.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYauxiliary
+*
+* =====================================================================
SUBROUTINE DLASY2( LTRANL, LTRANR, ISGN, N1, N2, TL, LDTL, TR,
$ LDTR, B, LDB, SCALE, X, LDX, XNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LTRANL, LTRANR
@@ -16,81 +181,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DLASY2 solves for the N1 by N2 matrix X, 1 <= N1,N2 <= 2, in
-*
-* op(TL)*X + ISGN*X*op(TR) = SCALE*B,
-*
-* where TL is N1 by N1, TR is N2 by N2, B is N1 by N2, and ISGN = 1 or
-* -1. op(T) = T or T**T, where T**T denotes the transpose of T.
-*
-* Arguments
-* =========
-*
-* LTRANL (input) LOGICAL
-* On entry, LTRANL specifies the op(TL):
-* = .FALSE., op(TL) = TL,
-* = .TRUE., op(TL) = TL**T.
-*
-* LTRANR (input) LOGICAL
-* On entry, LTRANR specifies the op(TR):
-* = .FALSE., op(TR) = TR,
-* = .TRUE., op(TR) = TR**T.
-*
-* ISGN (input) INTEGER
-* On entry, ISGN specifies the sign of the equation
-* as described before. ISGN may only be 1 or -1.
-*
-* N1 (input) INTEGER
-* On entry, N1 specifies the order of matrix TL.
-* N1 may only be 0, 1 or 2.
-*
-* N2 (input) INTEGER
-* On entry, N2 specifies the order of matrix TR.
-* N2 may only be 0, 1 or 2.
-*
-* TL (input) DOUBLE PRECISION array, dimension (LDTL,2)
-* On entry, TL contains an N1 by N1 matrix.
-*
-* LDTL (input) INTEGER
-* The leading dimension of the matrix TL. LDTL >= max(1,N1).
-*
-* TR (input) DOUBLE PRECISION array, dimension (LDTR,2)
-* On entry, TR contains an N2 by N2 matrix.
-*
-* LDTR (input) INTEGER
-* The leading dimension of the matrix TR. LDTR >= max(1,N2).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,2)
-* On entry, the N1 by N2 matrix B contains the right-hand
-* side of the equation.
-*
-* LDB (input) INTEGER
-* The leading dimension of the matrix B. LDB >= max(1,N1).
-*
-* SCALE (output) DOUBLE PRECISION
-* On exit, SCALE contains the scale factor. SCALE is chosen
-* less than or equal to 1 to prevent the solution overflowing.
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,2)
-* On exit, X contains the N1 by N2 solution.
-*
-* LDX (input) INTEGER
-* The leading dimension of the matrix X. LDX >= max(1,N1).
-*
-* XNORM (output) DOUBLE PRECISION
-* On exit, XNORM is the infinity-norm of the solution.
-*
-* INFO (output) INTEGER
-* On exit, INFO is set to
-* 0: successful exit.
-* 1: TL and TR have too close eigenvalues, so TL or
-* TR is perturbed to get a nonsingular equation.
-* NOTE: In the interests of speed, this routine does not
-* check the inputs for errors.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlasyf.f b/SRC/dlasyf.f
index ffb2d9ec..4fcb287b 100644
--- a/SRC/dlasyf.f
+++ b/SRC/dlasyf.f
@@ -1,9 +1,158 @@
+*> \brief \b DLASYF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KB, LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), W( LDW, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASYF computes a partial factorization of a real symmetric matrix A
+*> using the Bunch-Kaufman diagonal pivoting method. The partial
+*> factorization has the form:
+*>
+*> A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
+*> ( 0 U22 ) ( 0 D ) ( U12**T U22**T )
+*>
+*> A = ( L11 0 ) ( D 0 ) ( L11**T L21**T ) if UPLO = 'L'
+*> ( L21 I ) ( 0 A22 ) ( 0 I )
+*>
+*> where the order of D is at most NB. The actual order is returned in
+*> the argument KB, and is either NB or NB-1, or N if N <= NB.
+*>
+*> DLASYF is an auxiliary routine called by DSYTRF. It uses blocked code
+*> (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
+*> A22 (if UPLO = 'L').
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The maximum number of columns of the matrix A that should be
+*> factored. NB should be at least 2 to allow for 2-by-2 pivot
+*> blocks.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns of A that were actually factored.
+*> KB is either NB-1 or NB, or N if N <= NB.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> On exit, A contains details of the partial factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If UPLO = 'U', only the last KB elements of IPIV are set;
+*> if UPLO = 'L', only the first KB elements are set.
+*> \endverbatim
+*> \verbatim
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (LDW,NB)
+*> \endverbatim
+*>
+*> \param[in] LDW
+*> \verbatim
+*> LDW is INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+* =====================================================================
SUBROUTINE DLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,84 +163,6 @@
DOUBLE PRECISION A( LDA, * ), W( LDW, * )
* ..
*
-* Purpose
-* =======
-*
-* DLASYF computes a partial factorization of a real symmetric matrix A
-* using the Bunch-Kaufman diagonal pivoting method. The partial
-* factorization has the form:
-*
-* A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
-* ( 0 U22 ) ( 0 D ) ( U12**T U22**T )
-*
-* A = ( L11 0 ) ( D 0 ) ( L11**T L21**T ) if UPLO = 'L'
-* ( L21 I ) ( 0 A22 ) ( 0 I )
-*
-* where the order of D is at most NB. The actual order is returned in
-* the argument KB, and is either NB or NB-1, or N if N <= NB.
-*
-* DLASYF is an auxiliary routine called by DSYTRF. It uses blocked code
-* (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
-* A22 (if UPLO = 'L').
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The maximum number of columns of the matrix A that should be
-* factored. NB should be at least 2 to allow for 2-by-2 pivot
-* blocks.
-*
-* KB (output) INTEGER
-* The number of columns of A that were actually factored.
-* KB is either NB-1 or NB, or N if N <= NB.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, A contains details of the partial factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If UPLO = 'U', only the last KB elements of IPIV are set;
-* if UPLO = 'L', only the first KB elements are set.
-*
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* W (workspace) DOUBLE PRECISION array, dimension (LDW,NB)
-*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlat2s.f b/SRC/dlat2s.f
index b48e2128..d18308ef 100644
--- a/SRC/dlat2s.f
+++ b/SRC/dlat2s.f
@@ -1,60 +1,121 @@
- SUBROUTINE DLAT2S( UPLO, N, A, LDA, SA, LDSA, INFO )
-*
-* -- LAPACK PROTOTYPE auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDSA, N
-* ..
-* .. Array Arguments ..
- REAL SA( LDSA, * )
- DOUBLE PRECISION A( LDA, * )
-* ..
-*
+*> \brief \b DLAT2S
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAT2S( UPLO, N, A, LDA, SA, LDSA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDSA, N
+* ..
+* .. Array Arguments ..
+* REAL SA( LDSA, * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DLAT2S converts a DOUBLE PRECISION triangular matrix, SA, to a SINGLE
-* PRECISION triangular matrix, A.
-*
-* RMAX is the overflow for the SINGLE PRECISION arithmetic
-* DLAS2S checks that all the entries of A are between -RMAX and
-* RMAX. If not the convertion is aborted and a flag is raised.
-*
-* This is an auxiliary routine so there is no argument checking.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAT2S converts a DOUBLE PRECISION triangular matrix, SA, to a SINGLE
+*> PRECISION triangular matrix, A.
+*>
+*> RMAX is the overflow for the SINGLE PRECISION arithmetic
+*> DLAS2S checks that all the entries of A are between -RMAX and
+*> RMAX. If not the convertion is aborted and a flag is raised.
+*>
+*> This is an auxiliary routine so there is no argument checking.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N triangular coefficient matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SA
+*> \verbatim
+*> SA is REAL array, dimension (LDSA,N)
+*> Only the UPLO part of SA is referenced. On exit, if INFO=0,
+*> the N-by-N coefficient matrix SA; if INFO>0, the content of
+*> the UPLO part of SA is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDSA
+*> \verbatim
+*> LDSA is INTEGER
+*> The leading dimension of the array SA. LDSA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> = 1: an entry of the matrix A is greater than the SINGLE
+*> PRECISION overflow threshold, in this case, the content
+*> of the UPLO part of SA in exit is unspecified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N triangular coefficient matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup doubleOTHERauxiliary
*
-* SA (output) REAL array, dimension (LDSA,N)
-* Only the UPLO part of SA is referenced. On exit, if INFO=0,
-* the N-by-N coefficient matrix SA; if INFO>0, the content of
-* the UPLO part of SA is unspecified.
+* =====================================================================
+ SUBROUTINE DLAT2S( UPLO, N, A, LDA, SA, LDSA, INFO )
*
-* LDSA (input) INTEGER
-* The leading dimension of the array SA. LDSA >= max(1,M).
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* = 1: an entry of the matrix A is greater than the SINGLE
-* PRECISION overflow threshold, in this case, the content
-* of the UPLO part of SA in exit is unspecified.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDSA, N
+* ..
+* .. Array Arguments ..
+ REAL SA( LDSA, * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlatbs.f b/SRC/dlatbs.f
index 6390adb4..b76c358d 100644
--- a/SRC/dlatbs.f
+++ b/SRC/dlatbs.f
@@ -1,10 +1,247 @@
+*> \brief \b DLATBS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
+* SCALE, CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), CNORM( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATBS solves one of the triangular systems
+*>
+*> A *x = s*b or A**T*x = s*b
+*>
+*> with scaling to prevent overflow, where A is an upper or lower
+*> triangular band matrix. Here A**T denotes the transpose of A, x and b
+*> are n-element vectors, and s is a scaling factor, usually less than
+*> or equal to 1, chosen so that the components of x will be less than
+*> the overflow threshold. If the unscaled problem will not cause
+*> overflow, the Level 2 BLAS routine DTBSV is called. If the matrix A
+*> is singular (A(j,j) = 0 for some j), then s is set to 0 and a
+*> non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T* x = s*b (Transpose)
+*> = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of subdiagonals or superdiagonals in the
+*> triangular matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s for the triangular system
+*> A * x = s*b or A**T* x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, DTBSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTBSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
+*> algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call DTBSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
$ SCALE, CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -15,159 +252,6 @@
DOUBLE PRECISION AB( LDAB, * ), CNORM( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATBS solves one of the triangular systems
-*
-* A *x = s*b or A**T*x = s*b
-*
-* with scaling to prevent overflow, where A is an upper or lower
-* triangular band matrix. Here A**T denotes the transpose of A, x and b
-* are n-element vectors, and s is a scaling factor, usually less than
-* or equal to 1, chosen so that the components of x will be less than
-* the overflow threshold. If the unscaled problem will not cause
-* overflow, the Level 2 BLAS routine DTBSV is called. If the matrix A
-* is singular (A(j,j) = 0 for some j), then s is set to 0 and a
-* non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T* x = s*b (Transpose)
-* = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of subdiagonals or superdiagonals in the
-* triangular matrix A. KD >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* X (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) DOUBLE PRECISION
-* The scaling factor s for the triangular system
-* A * x = s*b or A**T* x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) DOUBLE PRECISION array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, DTBSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTBSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
-* algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call DTBSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlatdf.f b/SRC/dlatdf.f
index 82f1f876..f497057f 100644
--- a/SRC/dlatdf.f
+++ b/SRC/dlatdf.f
@@ -1,10 +1,168 @@
+*> \brief \b DLATDF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
+* JPIV )
+*
+* .. Scalar Arguments ..
+* INTEGER IJOB, LDZ, N
+* DOUBLE PRECISION RDSCAL, RDSUM
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* DOUBLE PRECISION RHS( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATDF uses the LU factorization of the n-by-n matrix Z computed by
+*> DGETC2 and computes a contribution to the reciprocal Dif-estimate
+*> by solving Z * x = b for x, and choosing the r.h.s. b such that
+*> the norm of x is as large as possible. On entry RHS = b holds the
+*> contribution from earlier solved sub-systems, and on return RHS = x.
+*>
+*> The factorization of Z returned by DGETC2 has the form Z = P*L*U*Q,
+*> where P and Q are permutation matrices. L is lower triangular with
+*> unit diagonal elements and U is upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> IJOB = 2: First compute an approximative null-vector e
+*> of Z using DGECON, e is normalized and solve for
+*> Zx = +-e - f with the sign giving the greater value
+*> of 2-norm(x). About 5 times as expensive as Default.
+*> IJOB .ne. 2: Local look ahead strategy where all entries of
+*> the r.h.s. b is choosen as either +1 or -1 (Default).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Z.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> On entry, the LU part of the factorization of the n-by-n
+*> matrix Z computed by DGETC2: Z = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*> RHS is DOUBLE PRECISION array, dimension (N)
+*> On entry, RHS contains contributions from other subsystems.
+*> On exit, RHS contains the solution of the subsystem with
+*> entries acoording to the value of IJOB (see above).
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*> RDSUM is DOUBLE PRECISION
+*> On entry, the sum of squares of computed contributions to
+*> the Dif-estimate under computation by DTGSYL, where the
+*> scaling factor RDSCAL (see below) has been factored out.
+*> On exit, the corresponding sum of squares updated with the
+*> contributions from the current sub-system.
+*> If TRANS = 'T' RDSUM is not touched.
+*> NOTE: RDSUM only makes sense when DTGSY2 is called by STGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*> RDSCAL is DOUBLE PRECISION
+*> On entry, scaling factor used to prevent overflow in RDSUM.
+*> On exit, RDSCAL is updated w.r.t. the current contributions
+*> in RDSUM.
+*> If TRANS = 'T', RDSCAL is not touched.
+*> NOTE: RDSCAL only makes sense when DTGSY2 is called by
+*> DTGSYL.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> This routine is a further developed implementation of algorithm
+*> BSOLVE in [1] using complete pivoting in the LU factorization.
+*>
+*> [1] Bo Kagstrom and Lars Westin,
+*> Generalized Schur Methods with Condition Estimators for
+*> Solving the Generalized Sylvester Equation, IEEE Transactions
+*> on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
+*>
+*> [2] Peter Poromaa,
+*> On Efficient and Robust Estimators for the Separation
+*> between two Regular Matrix Pairs with Applications in
+*> Condition Estimation. Report IMINF-95.05, Departement of
+*> Computing Science, Umea University, S-901 87 Umea, Sweden, 1995.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
$ JPIV )
*
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IJOB, LDZ, N
@@ -15,91 +173,6 @@
DOUBLE PRECISION RHS( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DLATDF uses the LU factorization of the n-by-n matrix Z computed by
-* DGETC2 and computes a contribution to the reciprocal Dif-estimate
-* by solving Z * x = b for x, and choosing the r.h.s. b such that
-* the norm of x is as large as possible. On entry RHS = b holds the
-* contribution from earlier solved sub-systems, and on return RHS = x.
-*
-* The factorization of Z returned by DGETC2 has the form Z = P*L*U*Q,
-* where P and Q are permutation matrices. L is lower triangular with
-* unit diagonal elements and U is upper triangular.
-*
-* Arguments
-* =========
-*
-* IJOB (input) INTEGER
-* IJOB = 2: First compute an approximative null-vector e
-* of Z using DGECON, e is normalized and solve for
-* Zx = +-e - f with the sign giving the greater value
-* of 2-norm(x). About 5 times as expensive as Default.
-* IJOB .ne. 2: Local look ahead strategy where all entries of
-* the r.h.s. b is choosen as either +1 or -1 (Default).
-*
-* N (input) INTEGER
-* The number of columns of the matrix Z.
-*
-* Z (input) DOUBLE PRECISION array, dimension (LDZ, N)
-* On entry, the LU part of the factorization of the n-by-n
-* matrix Z computed by DGETC2: Z = P * L * U * Q
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDA >= max(1, N).
-*
-* RHS (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, RHS contains contributions from other subsystems.
-* On exit, RHS contains the solution of the subsystem with
-* entries acoording to the value of IJOB (see above).
-*
-* RDSUM (input/output) DOUBLE PRECISION
-* On entry, the sum of squares of computed contributions to
-* the Dif-estimate under computation by DTGSYL, where the
-* scaling factor RDSCAL (see below) has been factored out.
-* On exit, the corresponding sum of squares updated with the
-* contributions from the current sub-system.
-* If TRANS = 'T' RDSUM is not touched.
-* NOTE: RDSUM only makes sense when DTGSY2 is called by STGSYL.
-*
-* RDSCAL (input/output) DOUBLE PRECISION
-* On entry, scaling factor used to prevent overflow in RDSUM.
-* On exit, RDSCAL is updated w.r.t. the current contributions
-* in RDSUM.
-* If TRANS = 'T', RDSCAL is not touched.
-* NOTE: RDSCAL only makes sense when DTGSY2 is called by
-* DTGSYL.
-*
-* IPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
-*
-* JPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* This routine is a further developed implementation of algorithm
-* BSOLVE in [1] using complete pivoting in the LU factorization.
-*
-* [1] Bo Kagstrom and Lars Westin,
-* Generalized Schur Methods with Condition Estimators for
-* Solving the Generalized Sylvester Equation, IEEE Transactions
-* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
-*
-* [2] Peter Poromaa,
-* On Efficient and Robust Estimators for the Separation
-* between two Regular Matrix Pairs with Applications in
-* Condition Estimation. Report IMINF-95.05, Departement of
-* Computing Science, Umea University, S-901 87 Umea, Sweden, 1995.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlatps.f b/SRC/dlatps.f
index beed5198..f1429f2a 100644
--- a/SRC/dlatps.f
+++ b/SRC/dlatps.f
@@ -1,10 +1,234 @@
+*> \brief \b DLATPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
+* CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), CNORM( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATPS solves one of the triangular systems
+*>
+*> A *x = s*b or A**T*x = s*b
+*>
+*> with scaling to prevent overflow, where A is an upper or lower
+*> triangular matrix stored in packed form. Here A**T denotes the
+*> transpose of A, x and b are n-element vectors, and s is a scaling
+*> factor, usually less than or equal to 1, chosen so that the
+*> components of x will be less than the overflow threshold. If the
+*> unscaled problem will not cause overflow, the Level 2 BLAS routine
+*> DTPSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
+*> then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T* x = s*b (Transpose)
+*> = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s for the triangular system
+*> A * x = s*b or A**T* x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, DTPSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTPSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
+*> algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call DTPSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
$ CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -15,152 +239,6 @@
DOUBLE PRECISION AP( * ), CNORM( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATPS solves one of the triangular systems
-*
-* A *x = s*b or A**T*x = s*b
-*
-* with scaling to prevent overflow, where A is an upper or lower
-* triangular matrix stored in packed form. Here A**T denotes the
-* transpose of A, x and b are n-element vectors, and s is a scaling
-* factor, usually less than or equal to 1, chosen so that the
-* components of x will be less than the overflow threshold. If the
-* unscaled problem will not cause overflow, the Level 2 BLAS routine
-* DTPSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
-* then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T* x = s*b (Transpose)
-* = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* X (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) DOUBLE PRECISION
-* The scaling factor s for the triangular system
-* A * x = s*b or A**T* x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) DOUBLE PRECISION array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, DTPSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTPSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
-* algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call DTPSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlatrd.f b/SRC/dlatrd.f
index f7849fd2..78be8e19 100644
--- a/SRC/dlatrd.f
+++ b/SRC/dlatrd.f
@@ -1,138 +1,172 @@
- SUBROUTINE DLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDW, N, NB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), E( * ), TAU( * ), W( LDW, * )
-* ..
-*
+*> \brief \b DLATRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), E( * ), TAU( * ), W( LDW, * )
+* ..
+*
* Purpose
* =======
*
-* DLATRD reduces NB rows and columns of a real symmetric matrix A to
-* symmetric tridiagonal form by an orthogonal similarity
-* transformation Q**T * A * Q, and returns the matrices V and W which are
-* needed to apply the transformation to the unreduced part of A.
-*
-* If UPLO = 'U', DLATRD reduces the last NB rows and columns of a
-* matrix, of which the upper triangle is supplied;
-* if UPLO = 'L', DLATRD reduces the first NB rows and columns of a
-* matrix, of which the lower triangle is supplied.
-*
-* This is an auxiliary routine called by DSYTRD.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATRD reduces NB rows and columns of a real symmetric matrix A to
+*> symmetric tridiagonal form by an orthogonal similarity
+*> transformation Q**T * A * Q, and returns the matrices V and W which are
+*> needed to apply the transformation to the unreduced part of A.
+*>
+*> If UPLO = 'U', DLATRD reduces the last NB rows and columns of a
+*> matrix, of which the upper triangle is supplied;
+*> if UPLO = 'L', DLATRD reduces the first NB rows and columns of a
+*> matrix, of which the lower triangle is supplied.
+*>
+*> This is an auxiliary routine called by DSYTRD.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NB (input) INTEGER
-* The number of rows and columns to be reduced.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit:
-* if UPLO = 'U', the last NB columns have been reduced to
-* tridiagonal form, with the diagonal elements overwriting
-* the diagonal elements of A; the elements above the diagonal
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors;
-* if UPLO = 'L', the first NB columns have been reduced to
-* tridiagonal form, with the diagonal elements overwriting
-* the diagonal elements of A; the elements below the diagonal
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= (1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of rows and columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
-* elements of the last NB columns of the reduced matrix;
-* if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
-* the first NB columns of the reduced matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (N-1)
-* The scalar factors of the elementary reflectors, stored in
-* TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
-* See Further Details.
+*> \date November 2011
*
-* W (output) DOUBLE PRECISION array, dimension (LDW,NB)
-* The n-by-nb matrix W required to update the unreduced part
-* of A.
+*> \ingroup doubleOTHERauxiliary
*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= (1,N).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (N-1)
+*> If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
+*> elements of the last NB columns of the reduced matrix;
+*> if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
+*> the first NB columns of the reduced matrix.
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (N-1)
+*> The scalar factors of the elementary reflectors, stored in
+*> TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
+*> See Further Details.
+*>
+*> W (output) DOUBLE PRECISION array, dimension (LDW,NB)
+*> The n-by-nb matrix W required to update the unreduced part
+*> of A.
+*>
+*> LDW (input) INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n) H(n-1) . . . H(n-nb+1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
+*> and tau in TAU(i-1).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*> and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the n-by-nb matrix V
+*> which is needed, with W, to apply the transformation to the unreduced
+*> part of the matrix, using a symmetric rank-2k update of the form:
+*> A := A - V*W**T - W*V**T.
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5 and nb = 2:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( a a a v4 v5 ) ( d )
+*> ( a a v4 v5 ) ( 1 d )
+*> ( a 1 v5 ) ( v1 1 a )
+*> ( d 1 ) ( v1 v2 a a )
+*> ( d ) ( v1 v2 a a a )
+*>
+*> where d denotes a diagonal element of the reduced matrix, a denotes
+*> an element of the original matrix that is unchanged, and vi denotes
+*> an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n) H(n-1) . . . H(n-nb+1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
-* and tau in TAU(i-1).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-* and tau in TAU(i).
-*
-* The elements of the vectors v together form the n-by-nb matrix V
-* which is needed, with W, to apply the transformation to the unreduced
-* part of the matrix, using a symmetric rank-2k update of the form:
-* A := A - V*W**T - W*V**T.
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5 and nb = 2:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( a a a v4 v5 ) ( d )
-* ( a a v4 v5 ) ( 1 d )
-* ( a 1 v5 ) ( v1 1 a )
-* ( d 1 ) ( v1 v2 a a )
-* ( d ) ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d denotes a diagonal element of the reduced matrix, a denotes
-* an element of the original matrix that is unchanged, and vi denotes
-* an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), E( * ), TAU( * ), W( LDW, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlatrs.f b/SRC/dlatrs.f
index 8409fce2..1389437c 100644
--- a/SRC/dlatrs.f
+++ b/SRC/dlatrs.f
@@ -1,10 +1,243 @@
+*> \brief \b DLATRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
+* CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), CNORM( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATRS solves one of the triangular systems
+*>
+*> A *x = s*b or A**T *x = s*b
+*>
+*> with scaling to prevent overflow. Here A is an upper or lower
+*> triangular matrix, A**T denotes the transpose of A, x and b are
+*> n-element vectors, and s is a scaling factor, usually less than
+*> or equal to 1, chosen so that the components of x will be less than
+*> the overflow threshold. If the unscaled problem will not cause
+*> overflow, the Level 2 BLAS routine DTRSV is called. If the matrix A
+*> is singular (A(j,j) = 0 for some j), then s is set to 0 and a
+*> non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T* x = s*b (Transpose)
+*> = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max (1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s for the triangular system
+*> A * x = s*b or A**T* x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, DTRSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTRSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
+*> algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call DTRSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
$ CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -15,158 +248,6 @@
DOUBLE PRECISION A( LDA, * ), CNORM( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATRS solves one of the triangular systems
-*
-* A *x = s*b or A**T *x = s*b
-*
-* with scaling to prevent overflow. Here A is an upper or lower
-* triangular matrix, A**T denotes the transpose of A, x and b are
-* n-element vectors, and s is a scaling factor, usually less than
-* or equal to 1, chosen so that the components of x will be less than
-* the overflow threshold. If the unscaled problem will not cause
-* overflow, the Level 2 BLAS routine DTRSV is called. If the matrix A
-* is singular (A(j,j) = 0 for some j), then s is set to 0 and a
-* non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T* x = s*b (Transpose)
-* = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max (1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) DOUBLE PRECISION
-* The scaling factor s for the triangular system
-* A * x = s*b or A**T* x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) DOUBLE PRECISION array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, DTRSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTRSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
-* algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call DTRSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlatrz.f b/SRC/dlatrz.f
index 65980853..776814e2 100644
--- a/SRC/dlatrz.f
+++ b/SRC/dlatrz.f
@@ -1,84 +1,148 @@
- SUBROUTINE DLATRZ( M, N, L, A, LDA, TAU, WORK )
+*> \brief \b DLATRZ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER L, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLATRZ( M, N, L, A, LDA, TAU, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER L, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLATRZ factors the M-by-(M+L) real upper trapezoidal matrix
-* [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z, by means
-* of orthogonal transformations. Z is an (M+L)-by-(M+L) orthogonal
-* matrix and, R and A1 are M-by-M upper triangular matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATRZ factors the M-by-(M+L) real upper trapezoidal matrix
+*> [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z, by means
+*> of orthogonal transformations. Z is an (M+L)-by-(M+L) orthogonal
+*> matrix and, R and A1 are M-by-M upper triangular matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing the
-* meaningful part of the Householder vectors. N-M >= L >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing the
+*> meaningful part of the Householder vectors. N-M >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements N-L+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> orthogonal matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements N-L+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* orthogonal matrix Z as a product of M elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAU (output) DOUBLE PRECISION array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \ingroup doubleOTHERcomputational
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an l element vector. tau and z( k )
+*> are chosen to annihilate the elements of the kth row of A2.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A2, such that the elements of z( k ) are
+*> in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A1.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLATRZ( M, N, L, A, LDA, TAU, WORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an l element vector. tau and z( k )
-* are chosen to annihilate the elements of the kth row of A2.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A2, such that the elements of z( k ) are
-* in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A1.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER L, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlatzm.f b/SRC/dlatzm.f
index eeda8ba4..09d6e7d9 100644
--- a/SRC/dlatzm.f
+++ b/SRC/dlatzm.f
@@ -1,91 +1,163 @@
- SUBROUTINE DLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE
- INTEGER INCV, LDC, M, N
- DOUBLE PRECISION TAU
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b DLATZM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, LDC, M, N
+* DOUBLE PRECISION TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine DORMRZ.
-*
-* DLATZM applies a Householder matrix generated by DTZRQF to a matrix.
-*
-* Let P = I - tau*u*u**T, u = ( 1 ),
-* ( v )
-* where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
-* SIDE = 'R'.
-*
-* If SIDE equals 'L', let
-* C = [ C1 ] 1
-* [ C2 ] m-1
-* n
-* Then C is overwritten by P*C.
-*
-* If SIDE equals 'R', let
-* C = [ C1, C2 ] m
-* 1 n-1
-* Then C is overwritten by C*P.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine DORMRZ.
+*>
+*> DLATZM applies a Householder matrix generated by DTZRQF to a matrix.
+*>
+*> Let P = I - tau*u*u**T, u = ( 1 ),
+*> ( v )
+*> where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
+*> SIDE = 'R'.
+*>
+*> If SIDE equals 'L', let
+*> C = [ C1 ] 1
+*> [ C2 ] m-1
+*> n
+*> Then C is overwritten by P*C.
+*>
+*> If SIDE equals 'R', let
+*> C = [ C1, C2 ] m
+*> 1 n-1
+*> Then C is overwritten by C*P.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': form P * C
-* = 'R': form C * P
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) DOUBLE PRECISION array, dimension
-* (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-* (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-* The vector v in the representation of P. V is not used
-* if TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0
-*
-* TAU (input) DOUBLE PRECISION
-* The value tau in the representation of P.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form P * C
+*> = 'R': form C * P
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension
+*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*> (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*> The vector v in the representation of P. V is not used
+*> if TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> The value tau in the representation of P.
+*> \endverbatim
+*>
+*> \param[in,out] C1
+*> \verbatim
+*> C1 is DOUBLE PRECISION array, dimension
+*> (LDC,N) if SIDE = 'L'
+*> (M,1) if SIDE = 'R'
+*> On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
+*> if SIDE = 'R'.
+*> \endverbatim
+*> \verbatim
+*> On exit, the first row of P*C if SIDE = 'L', or the first
+*> column of C*P if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in,out] C2
+*> \verbatim
+*> C2 is DOUBLE PRECISION array, dimension
+*> (LDC, N) if SIDE = 'L'
+*> (LDC, N-1) if SIDE = 'R'
+*> On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
+*> m x (n - 1) matrix C2 if SIDE = 'R'.
+*> \endverbatim
+*> \verbatim
+*> On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
+*> if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the arrays C1 and C2. LDC >= (1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L'
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C1 (input/output) DOUBLE PRECISION array, dimension
-* (LDC,N) if SIDE = 'L'
-* (M,1) if SIDE = 'R'
-* On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
-* if SIDE = 'R'.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, the first row of P*C if SIDE = 'L', or the first
-* column of C*P if SIDE = 'R'.
+*> \date November 2011
*
-* C2 (input/output) DOUBLE PRECISION array, dimension
-* (LDC, N) if SIDE = 'L'
-* (LDC, N-1) if SIDE = 'R'
-* On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
-* m x (n - 1) matrix C2 if SIDE = 'R'.
+*> \ingroup doubleOTHERcomputational
*
-* On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
-* if SIDE = 'R'.
+* =====================================================================
+ SUBROUTINE DLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the arrays C1 and C2. LDC >= (1,M).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L'
-* (M) if SIDE = 'R'
+* .. Scalar Arguments ..
+ CHARACTER SIDE
+ INTEGER INCV, LDC, M, N
+ DOUBLE PRECISION TAU
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dlauu2.f b/SRC/dlauu2.f
index c49939df..7926c294 100644
--- a/SRC/dlauu2.f
+++ b/SRC/dlauu2.f
@@ -1,9 +1,103 @@
+*> \brief \b DLAUU2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAUU2( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAUU2 computes the product U * U**T or L**T * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
+*>
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
+*>
+*> This is the unblocked form of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the triangular factor stored in the array A
+*> is upper or lower triangular:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the triangular factor U or L. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the triangular factor U or L.
+*> On exit, if UPLO = 'U', the upper triangle of A is
+*> overwritten with the upper triangle of the product U * U**T;
+*> if UPLO = 'L', the lower triangle of A is overwritten with
+*> the lower triangle of the product L**T * L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAUU2( UPLO, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,46 +107,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAUU2 computes the product U * U**T or L**T * L, where the triangular
-* factor U or L is stored in the upper or lower triangular part of
-* the array A.
-*
-* If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
-* overwriting the factor U in A.
-* If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
-* overwriting the factor L in A.
-*
-* This is the unblocked form of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the triangular factor stored in the array A
-* is upper or lower triangular:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the triangular factor U or L. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the triangular factor U or L.
-* On exit, if UPLO = 'U', the upper triangle of A is
-* overwritten with the upper triangle of the product U * U**T;
-* if UPLO = 'L', the lower triangle of A is overwritten with
-* the lower triangle of the product L**T * L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dlauum.f b/SRC/dlauum.f
index c1ab1a48..da3ae3e6 100644
--- a/SRC/dlauum.f
+++ b/SRC/dlauum.f
@@ -1,9 +1,103 @@
+*> \brief \b DLAUUM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAUUM( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAUUM computes the product U * U**T or L**T * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
+*>
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
+*>
+*> This is the blocked form of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the triangular factor stored in the array A
+*> is upper or lower triangular:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the triangular factor U or L. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the triangular factor U or L.
+*> On exit, if UPLO = 'U', the upper triangle of A is
+*> overwritten with the upper triangle of the product U * U**T;
+*> if UPLO = 'L', the lower triangle of A is overwritten with
+*> the lower triangle of the product L**T * L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DLAUUM( UPLO, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,46 +107,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAUUM computes the product U * U**T or L**T * L, where the triangular
-* factor U or L is stored in the upper or lower triangular part of
-* the array A.
-*
-* If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
-* overwriting the factor U in A.
-* If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
-* overwriting the factor L in A.
-*
-* This is the blocked form of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the triangular factor stored in the array A
-* is upper or lower triangular:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the triangular factor U or L. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the triangular factor U or L.
-* On exit, if UPLO = 'U', the upper triangle of A is
-* overwritten with the upper triangle of the product U * U**T;
-* if UPLO = 'L', the lower triangle of A is overwritten with
-* the lower triangle of the product L**T * L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dopgtr.f b/SRC/dopgtr.f
index 7d7aaf80..4f8e7ab7 100644
--- a/SRC/dopgtr.f
+++ b/SRC/dopgtr.f
@@ -1,60 +1,123 @@
- SUBROUTINE DOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDQ, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DOPGTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDQ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DOPGTR generates a real orthogonal matrix Q which is defined as the
-* product of n-1 elementary reflectors H(i) of order n, as returned by
-* DSPTRD using packed storage:
-*
-* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DOPGTR generates a real orthogonal matrix Q which is defined as the
+*> product of n-1 elementary reflectors H(i) of order n, as returned by
+*> DSPTRD using packed storage:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular packed storage used in previous
-* call to DSPTRD;
-* = 'L': Lower triangular packed storage used in previous
-* call to DSPTRD.
-*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular packed storage used in previous
+*> call to DSPTRD;
+*> = 'L': Lower triangular packed storage used in previous
+*> call to DSPTRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The vectors which define the elementary reflectors, as
+*> returned by DSPTRD.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DSPTRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> The N-by-N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N-1)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The vectors which define the elementary reflectors, as
-* returned by DSPTRD.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DSPTRD.
+*> \date November 2011
*
-* Q (output) DOUBLE PRECISION array, dimension (LDQ,N)
-* The N-by-N orthogonal matrix Q.
+*> \ingroup doubleOTHERcomputational
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+* =====================================================================
+ SUBROUTINE DOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N-1)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDQ, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dopmtr.f b/SRC/dopmtr.f
index 715d9f00..8d081f89 100644
--- a/SRC/dopmtr.f
+++ b/SRC/dopmtr.f
@@ -1,86 +1,159 @@
- SUBROUTINE DOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS, UPLO
- INTEGER INFO, LDC, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DOPMTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, UPLO
+* INTEGER INFO, LDC, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DOPMTR overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* nq-1 elementary reflectors, as returned by DSPTRD using packed
-* storage:
-*
-* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DOPMTR overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by DSPTRD using packed
+*> storage:
+*>
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular packed storage used in previous
-* call to DSPTRD;
-* = 'L': Lower triangular packed storage used in previous
-* call to DSPTRD.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular packed storage used in previous
+*> call to DSPTRD;
+*> = 'L': Lower triangular packed storage used in previous
+*> call to DSPTRD.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension
+*> (M*(M+1)/2) if SIDE = 'L'
+*> (N*(N+1)/2) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by DSPTRD. AP is modified by the routine but
+*> restored on exit.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M-1) if SIDE = 'L'
+*> or (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DSPTRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L'
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AP (input) DOUBLE PRECISION array, dimension
-* (M*(M+1)/2) if SIDE = 'L'
-* (N*(N+1)/2) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by DSPTRD. AP is modified by the routine but
-* restored on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (M-1) if SIDE = 'L'
-* or (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DSPTRD.
+*> \date November 2011
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup doubleOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE DOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
+ $ INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L'
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS, UPLO
+ INTEGER INFO, LDC, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorbdb.f b/SRC/dorbdb.f
index 6123ba35..f0af17dc 100644
--- a/SRC/dorbdb.f
+++ b/SRC/dorbdb.f
@@ -1,15 +1,291 @@
+*> \brief \b DORBDB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
+* X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
+* TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIGNS, TRANS
+* INTEGER INFO, LDX11, LDX12, LDX21, LDX22, LWORK, M, P,
+* $ Q
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION PHI( * ), THETA( * )
+* DOUBLE PRECISION TAUP1( * ), TAUP2( * ), TAUQ1( * ), TAUQ2( * ),
+* $ WORK( * ), X11( LDX11, * ), X12( LDX12, * ),
+* $ X21( LDX21, * ), X22( LDX22, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORBDB simultaneously bidiagonalizes the blocks of an M-by-M
+*> partitioned orthogonal matrix X:
+*>
+*> [ B11 | B12 0 0 ]
+*> [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**T
+*> X = [-----------] = [---------] [----------------] [---------] .
+*> [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
+*> [ 0 | 0 0 I ]
+*>
+*> X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
+*> not the case, then X must be transposed and/or permuted. This can be
+*> done in constant time using the TRANS and SIGNS options. See DORCSD
+*> for details.)
+*>
+*> The orthogonal matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
+*> (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
+*> represented implicitly by Householder vectors.
+*>
+*> B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
+*> implicitly by angles THETA, PHI.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] SIGNS
+*> \verbatim
+*> SIGNS is CHARACTER
+*> = 'O': The lower-left block is made nonpositive (the
+*> "other" convention);
+*> otherwise: The upper-right block is made nonpositive (the
+*> "default" convention).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in X11 and X12. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in X11 and X21. 0 <= Q <=
+*> MIN(P,M-P,M-Q).
+*> \endverbatim
+*>
+*> \param[in,out] X11
+*> \verbatim
+*> X11 is DOUBLE PRECISION array, dimension (LDX11,Q)
+*> On entry, the top-left block of the orthogonal matrix to be
+*> reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the columns of tril(X11) specify reflectors for P1,
+*> the rows of triu(X11,1) specify reflectors for Q1;
+*> else TRANS = 'T', and
+*> the rows of triu(X11) specify reflectors for P1,
+*> the columns of tril(X11,-1) specify reflectors for Q1.
+*> \endverbatim
+*>
+*> \param[in] LDX11
+*> \verbatim
+*> LDX11 is INTEGER
+*> The leading dimension of X11. If TRANS = 'N', then LDX11 >=
+*> P; else LDX11 >= Q.
+*> \endverbatim
+*>
+*> \param[in,out] X12
+*> \verbatim
+*> X12 is DOUBLE PRECISION array, dimension (LDX12,M-Q)
+*> On entry, the top-right block of the orthogonal matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the rows of triu(X12) specify the first P reflectors for
+*> Q2;
+*> else TRANS = 'T', and
+*> the columns of tril(X12) specify the first P reflectors
+*> for Q2.
+*> \endverbatim
+*>
+*> \param[in] LDX12
+*> \verbatim
+*> LDX12 is INTEGER
+*> The leading dimension of X12. If TRANS = 'N', then LDX12 >=
+*> P; else LDX11 >= M-Q.
+*> \endverbatim
+*>
+*> \param[in,out] X21
+*> \verbatim
+*> X21 is DOUBLE PRECISION array, dimension (LDX21,Q)
+*> On entry, the bottom-left block of the orthogonal matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the columns of tril(X21) specify reflectors for P2;
+*> else TRANS = 'T', and
+*> the rows of triu(X21) specify reflectors for P2.
+*> \endverbatim
+*>
+*> \param[in] LDX21
+*> \verbatim
+*> LDX21 is INTEGER
+*> The leading dimension of X21. If TRANS = 'N', then LDX21 >=
+*> M-P; else LDX21 >= Q.
+*> \endverbatim
+*>
+*> \param[in,out] X22
+*> \verbatim
+*> X22 is DOUBLE PRECISION array, dimension (LDX22,M-Q)
+*> On entry, the bottom-right block of the orthogonal matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
+*> M-P-Q reflectors for Q2,
+*> else TRANS = 'T', and
+*> the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
+*> M-P-Q reflectors for P2.
+*> \endverbatim
+*>
+*> \param[in] LDX22
+*> \verbatim
+*> LDX22 is INTEGER
+*> The leading dimension of X22. If TRANS = 'N', then LDX22 >=
+*> M-P; else LDX22 >= M-Q.
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension (Q)
+*> The entries of the bidiagonal blocks B11, B12, B21, B22 can
+*> be computed from the angles THETA and PHI. See Further
+*> Details.
+*> \endverbatim
+*>
+*> \param[out] PHI
+*> \verbatim
+*> PHI is DOUBLE PRECISION array, dimension (Q-1)
+*> The entries of the bidiagonal blocks B11, B12, B21, B22 can
+*> be computed from the angles THETA and PHI. See Further
+*> Details.
+*> \endverbatim
+*>
+*> \param[out] TAUP1
+*> \verbatim
+*> TAUP1 is DOUBLE PRECISION array, dimension (P)
+*> The scalar factors of the elementary reflectors that define
+*> P1.
+*> \endverbatim
+*>
+*> \param[out] TAUP2
+*> \verbatim
+*> TAUP2 is DOUBLE PRECISION array, dimension (M-P)
+*> The scalar factors of the elementary reflectors that define
+*> P2.
+*> \endverbatim
+*>
+*> \param[out] TAUQ1
+*> \verbatim
+*> TAUQ1 is DOUBLE PRECISION array, dimension (Q)
+*> The scalar factors of the elementary reflectors that define
+*> Q1.
+*> \endverbatim
+*>
+*> \param[out] TAUQ2
+*> \verbatim
+*> TAUQ2 is DOUBLE PRECISION array, dimension (M-Q)
+*> The scalar factors of the elementary reflectors that define
+*> Q2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= M-Q.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The bidiagonal blocks B11, B12, B21, and B22 are represented
+*> implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
+*> PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
+*> lower bidiagonal. Every entry in each bidiagonal band is a product
+*> of a sine or cosine of a THETA with a sine or cosine of a PHI. See
+*> [1] or DORCSD for details.
+*>
+*> P1, P2, Q1, and Q2 are represented as products of elementary
+*> reflectors. See DORCSD for details on generating P1, P2, Q1, and Q2
+*> using DORGQR and DORGLQ.
+*>
+*> Reference
+*> =========
+*>
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DORBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
$ X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
$ TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.0) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIGNS, TRANS
@@ -23,169 +299,6 @@
$ X21( LDX21, * ), X22( LDX22, * )
* ..
*
-* Purpose
-* =======
-*
-* DORBDB simultaneously bidiagonalizes the blocks of an M-by-M
-* partitioned orthogonal matrix X:
-*
-* [ B11 | B12 0 0 ]
-* [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**T
-* X = [-----------] = [---------] [----------------] [---------] .
-* [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
-* [ 0 | 0 0 I ]
-*
-* X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
-* not the case, then X must be transposed and/or permuted. This can be
-* done in constant time using the TRANS and SIGNS options. See DORCSD
-* for details.)
-*
-* The orthogonal matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
-* (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
-* represented implicitly by Householder vectors.
-*
-* B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
-* implicitly by angles THETA, PHI.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* SIGNS (input) CHARACTER
-* = 'O': The lower-left block is made nonpositive (the
-* "other" convention);
-* otherwise: The upper-right block is made nonpositive (the
-* "default" convention).
-*
-* M (input) INTEGER
-* The number of rows and columns in X.
-*
-* P (input) INTEGER
-* The number of rows in X11 and X12. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in X11 and X21. 0 <= Q <=
-* MIN(P,M-P,M-Q).
-*
-* X11 (input/output) DOUBLE PRECISION array, dimension (LDX11,Q)
-* On entry, the top-left block of the orthogonal matrix to be
-* reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the columns of tril(X11) specify reflectors for P1,
-* the rows of triu(X11,1) specify reflectors for Q1;
-* else TRANS = 'T', and
-* the rows of triu(X11) specify reflectors for P1,
-* the columns of tril(X11,-1) specify reflectors for Q1.
-*
-* LDX11 (input) INTEGER
-* The leading dimension of X11. If TRANS = 'N', then LDX11 >=
-* P; else LDX11 >= Q.
-*
-* X12 (input/output) DOUBLE PRECISION array, dimension (LDX12,M-Q)
-* On entry, the top-right block of the orthogonal matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the rows of triu(X12) specify the first P reflectors for
-* Q2;
-* else TRANS = 'T', and
-* the columns of tril(X12) specify the first P reflectors
-* for Q2.
-*
-* LDX12 (input) INTEGER
-* The leading dimension of X12. If TRANS = 'N', then LDX12 >=
-* P; else LDX11 >= M-Q.
-*
-* X21 (input/output) DOUBLE PRECISION array, dimension (LDX21,Q)
-* On entry, the bottom-left block of the orthogonal matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the columns of tril(X21) specify reflectors for P2;
-* else TRANS = 'T', and
-* the rows of triu(X21) specify reflectors for P2.
-*
-* LDX21 (input) INTEGER
-* The leading dimension of X21. If TRANS = 'N', then LDX21 >=
-* M-P; else LDX21 >= Q.
-*
-* X22 (input/output) DOUBLE PRECISION array, dimension (LDX22,M-Q)
-* On entry, the bottom-right block of the orthogonal matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
-* M-P-Q reflectors for Q2,
-* else TRANS = 'T', and
-* the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
-* M-P-Q reflectors for P2.
-*
-* LDX22 (input) INTEGER
-* The leading dimension of X22. If TRANS = 'N', then LDX22 >=
-* M-P; else LDX22 >= M-Q.
-*
-* THETA (output) DOUBLE PRECISION array, dimension (Q)
-* The entries of the bidiagonal blocks B11, B12, B21, B22 can
-* be computed from the angles THETA and PHI. See Further
-* Details.
-*
-* PHI (output) DOUBLE PRECISION array, dimension (Q-1)
-* The entries of the bidiagonal blocks B11, B12, B21, B22 can
-* be computed from the angles THETA and PHI. See Further
-* Details.
-*
-* TAUP1 (output) DOUBLE PRECISION array, dimension (P)
-* The scalar factors of the elementary reflectors that define
-* P1.
-*
-* TAUP2 (output) DOUBLE PRECISION array, dimension (M-P)
-* The scalar factors of the elementary reflectors that define
-* P2.
-*
-* TAUQ1 (output) DOUBLE PRECISION array, dimension (Q)
-* The scalar factors of the elementary reflectors that define
-* Q1.
-*
-* TAUQ2 (output) DOUBLE PRECISION array, dimension (M-Q)
-* The scalar factors of the elementary reflectors that define
-* Q2.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= M-Q.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* The bidiagonal blocks B11, B12, B21, and B22 are represented
-* implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
-* PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
-* lower bidiagonal. Every entry in each bidiagonal band is a product
-* of a sine or cosine of a THETA with a sine or cosine of a PHI. See
-* [1] or DORCSD for details.
-*
-* P1, P2, Q1, and Q2 are represented as products of elementary
-* reflectors. See DORCSD for details on generating P1, P2, Q1, and Q2
-* using DORGQR and DORGLQ.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/dorcsd.f b/SRC/dorcsd.f
index ca5596d3..a16c9d49 100644
--- a/SRC/dorcsd.f
+++ b/SRC/dorcsd.f
@@ -1,19 +1,268 @@
+*> \brief \b DORCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* RECURSIVE SUBROUTINE DORCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS,
+* SIGNS, M, P, Q, X11, LDX11, X12,
+* LDX12, X21, LDX21, X22, LDX22, THETA,
+* U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
+* LDV2T, WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
+* INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LDX11, LDX12,
+* $ LDX21, LDX22, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION THETA( * )
+* DOUBLE PRECISION U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * ), WORK( * ), X11( LDX11, * ),
+* $ X12( LDX12, * ), X21( LDX21, * ), X22( LDX22,
+* $ * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORCSD computes the CS decomposition of an M-by-M partitioned
+*> orthogonal matrix X:
+*>
+*> [ I 0 0 | 0 0 0 ]
+*> [ 0 C 0 | 0 -S 0 ]
+*> [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**T
+*> X = [-----------] = [---------] [---------------------] [---------] .
+*> [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
+*> [ 0 S 0 | 0 C 0 ]
+*> [ 0 0 I | 0 0 0 ]
+*>
+*> X11 is P-by-Q. The orthogonal matrices U1, U2, V1, and V2 are P-by-P,
+*> (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
+*> R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
+*> which R = MIN(P,M-P,Q,M-Q).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU1
+*> \verbatim
+*> JOBU1 is CHARACTER
+*> = 'Y': U1 is computed;
+*> otherwise: U1 is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBU2
+*> \verbatim
+*> JOBU2 is CHARACTER
+*> = 'Y': U2 is computed;
+*> otherwise: U2 is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV1T
+*> \verbatim
+*> JOBV1T is CHARACTER
+*> = 'Y': V1T is computed;
+*> otherwise: V1T is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV2T
+*> \verbatim
+*> JOBV2T is CHARACTER
+*> = 'Y': V2T is computed;
+*> otherwise: V2T is not computed.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] SIGNS
+*> \verbatim
+*> SIGNS is CHARACTER
+*> = 'O': The lower-left block is made nonpositive (the
+*> "other" convention);
+*> otherwise: The upper-right block is made nonpositive (the
+*> "default" convention).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in X11 and X12. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in X11 and X21. 0 <= Q <= M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,M)
+*> On entry, the orthogonal matrix whose CSD is desired.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X. LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension (R), in which R =
+*> MIN(P,M-P,Q,M-Q).
+*> C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
+*> S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is DOUBLE PRECISION array, dimension (P)
+*> If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1.
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
+*> MAX(1,P).
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is DOUBLE PRECISION array, dimension (M-P)
+*> If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal
+*> matrix U2.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
+*> MAX(1,M-P).
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is DOUBLE PRECISION array, dimension (Q)
+*> If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal
+*> matrix V1**T.
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
+*> MAX(1,Q).
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is DOUBLE PRECISION array, dimension (M-Q)
+*> If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal
+*> matrix V2**T.
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
+*> MAX(1,M-Q).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> If INFO > 0 on exit, WORK(2:R) contains the values PHI(1),
+*> ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
+*> define the matrix in intermediate bidiagonal-block form
+*> remaining after nonconvergence. INFO specifies the number
+*> of nonzero PHI's.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the work array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M-MIN(P, M-P, Q, M-Q))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: DBBCSD did not converge. See the description of WORK
+*> above for details.
+*> \endverbatim
+*> \verbatim
+*> Reference
+*> =========
+*> \endverbatim
+*> \verbatim
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
RECURSIVE SUBROUTINE DORCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS,
$ SIGNS, M, P, Q, X11, LDX11, X12,
$ LDX12, X21, LDX21, X22, LDX22, THETA,
$ U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
$ LDV2T, WORK, LWORK, IWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* @precisions normal d -> s
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
@@ -29,137 +278,6 @@
$ * )
* ..
*
-* Purpose
-* =======
-*
-* DORCSD computes the CS decomposition of an M-by-M partitioned
-* orthogonal matrix X:
-*
-* [ I 0 0 | 0 0 0 ]
-* [ 0 C 0 | 0 -S 0 ]
-* [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**T
-* X = [-----------] = [---------] [---------------------] [---------] .
-* [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
-* [ 0 S 0 | 0 C 0 ]
-* [ 0 0 I | 0 0 0 ]
-*
-* X11 is P-by-Q. The orthogonal matrices U1, U2, V1, and V2 are P-by-P,
-* (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
-* R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
-* which R = MIN(P,M-P,Q,M-Q).
-*
-* Arguments
-* =========
-*
-* JOBU1 (input) CHARACTER
-* = 'Y': U1 is computed;
-* otherwise: U1 is not computed.
-*
-* JOBU2 (input) CHARACTER
-* = 'Y': U2 is computed;
-* otherwise: U2 is not computed.
-*
-* JOBV1T (input) CHARACTER
-* = 'Y': V1T is computed;
-* otherwise: V1T is not computed.
-*
-* JOBV2T (input) CHARACTER
-* = 'Y': V2T is computed;
-* otherwise: V2T is not computed.
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* SIGNS (input) CHARACTER
-* = 'O': The lower-left block is made nonpositive (the
-* "other" convention);
-* otherwise: The upper-right block is made nonpositive (the
-* "default" convention).
-*
-* M (input) INTEGER
-* The number of rows and columns in X.
-*
-* P (input) INTEGER
-* The number of rows in X11 and X12. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in X11 and X21. 0 <= Q <= M.
-*
-* X (input/workspace) DOUBLE PRECISION array, dimension (LDX,M)
-* On entry, the orthogonal matrix whose CSD is desired.
-*
-* LDX (input) INTEGER
-* The leading dimension of X. LDX >= MAX(1,M).
-*
-* THETA (output) DOUBLE PRECISION array, dimension (R), in which R =
-* MIN(P,M-P,Q,M-Q).
-* C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
-* S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
-*
-* U1 (output) DOUBLE PRECISION array, dimension (P)
-* If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1.
-*
-* LDU1 (input) INTEGER
-* The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
-* MAX(1,P).
-*
-* U2 (output) DOUBLE PRECISION array, dimension (M-P)
-* If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal
-* matrix U2.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
-* MAX(1,M-P).
-*
-* V1T (output) DOUBLE PRECISION array, dimension (Q)
-* If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal
-* matrix V1**T.
-*
-* LDV1T (input) INTEGER
-* The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
-* MAX(1,Q).
-*
-* V2T (output) DOUBLE PRECISION array, dimension (M-Q)
-* If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal
-* matrix V2**T.
-*
-* LDV2T (input) INTEGER
-* The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
-* MAX(1,M-Q).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-* If INFO > 0 on exit, WORK(2:R) contains the values PHI(1),
-* ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
-* define the matrix in intermediate bidiagonal-block form
-* remaining after nonconvergence. INFO specifies the number
-* of nonzero PHI's.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the work array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (M-MIN(P, M-P, Q, M-Q))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: DBBCSD did not converge. See the description of WORK
-* above for details.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/dorg2l.f b/SRC/dorg2l.f
index 9d9eb97a..80040321 100644
--- a/SRC/dorg2l.f
+++ b/SRC/dorg2l.f
@@ -1,60 +1,122 @@
- SUBROUTINE DORG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b DORG2L
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DORG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORG2L generates an m by n real matrix Q with orthonormal columns,
-* which is defined as the last n columns of a product of k elementary
-* reflectors of order m
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by DGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORG2L generates an m by n real matrix Q with orthonormal columns,
+*> which is defined as the last n columns of a product of k elementary
+*> reflectors of order m
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by DGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the (n-k+i)-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by DGEQLF in the last k columns of its array
+*> argument A.
+*> On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the (n-k+i)-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by DGEQLF in the last k columns of its array
-* argument A.
-* On exit, the m by n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup doubleOTHERcomputational
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEQLF.
+* =====================================================================
+ SUBROUTINE DORG2L( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorg2r.f b/SRC/dorg2r.f
index 14a543ef..88be4a66 100644
--- a/SRC/dorg2r.f
+++ b/SRC/dorg2r.f
@@ -1,60 +1,122 @@
- SUBROUTINE DORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b DORG2R
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORG2R generates an m by n real matrix Q with orthonormal columns,
-* which is defined as the first n columns of a product of k elementary
-* reflectors of order m
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORG2R generates an m by n real matrix Q with orthonormal columns,
+*> which is defined as the first n columns of a product of k elementary
+*> reflectors of order m
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the i-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by DGEQRF in the first k columns of its array
+*> argument A.
+*> On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the i-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by DGEQRF in the first k columns of its array
-* argument A.
-* On exit, the m-by-n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup doubleOTHERcomputational
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEQRF.
+* =====================================================================
+ SUBROUTINE DORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorgbr.f b/SRC/dorgbr.f
index 2bb421a4..a99bf674 100644
--- a/SRC/dorgbr.f
+++ b/SRC/dorgbr.f
@@ -1,9 +1,159 @@
+*> \brief \b DORGBR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER VECT
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGBR generates one of the real orthogonal matrices Q or P**T
+*> determined by DGEBRD when reducing a real matrix A to bidiagonal
+*> form: A = Q * B * P**T. Q and P**T are defined as products of
+*> elementary reflectors H(i) or G(i) respectively.
+*>
+*> If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
+*> is of order M:
+*> if m >= k, Q = H(1) H(2) . . . H(k) and DORGBR returns the first n
+*> columns of Q, where m >= n >= k;
+*> if m < k, Q = H(1) H(2) . . . H(m-1) and DORGBR returns Q as an
+*> M-by-M matrix.
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**T
+*> is of order N:
+*> if k < n, P**T = G(k) . . . G(2) G(1) and DORGBR returns the first m
+*> rows of P**T, where n >= m >= k;
+*> if k >= n, P**T = G(n-1) . . . G(2) G(1) and DORGBR returns P**T as
+*> an N-by-N matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> Specifies whether the matrix Q or the matrix P**T is
+*> required, as defined in the transformation applied by DGEBRD:
+*> = 'Q': generate Q;
+*> = 'P': generate P**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q or P**T to be returned.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q or P**T to be returned.
+*> N >= 0.
+*> If VECT = 'Q', M >= N >= min(M,K);
+*> if VECT = 'P', N >= M >= min(N,K).
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> If VECT = 'Q', the number of columns in the original M-by-K
+*> matrix reduced by DGEBRD.
+*> If VECT = 'P', the number of rows in the original K-by-N
+*> matrix reduced by DGEBRD.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by DGEBRD.
+*> On exit, the M-by-N matrix Q or P**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension
+*> (min(M,K)) if VECT = 'Q'
+*> (min(N,K)) if VECT = 'P'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i) or G(i), which determines Q or P**T, as
+*> returned by DGEBRD in its array argument TAUQ or TAUP.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,min(M,N)).
+*> For optimum performance LWORK >= min(M,N)*NB, where NB
+*> is the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGBcomputational
+*
+* =====================================================================
SUBROUTINE DORGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER VECT
@@ -13,86 +163,6 @@
DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DORGBR generates one of the real orthogonal matrices Q or P**T
-* determined by DGEBRD when reducing a real matrix A to bidiagonal
-* form: A = Q * B * P**T. Q and P**T are defined as products of
-* elementary reflectors H(i) or G(i) respectively.
-*
-* If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
-* is of order M:
-* if m >= k, Q = H(1) H(2) . . . H(k) and DORGBR returns the first n
-* columns of Q, where m >= n >= k;
-* if m < k, Q = H(1) H(2) . . . H(m-1) and DORGBR returns Q as an
-* M-by-M matrix.
-*
-* If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**T
-* is of order N:
-* if k < n, P**T = G(k) . . . G(2) G(1) and DORGBR returns the first m
-* rows of P**T, where n >= m >= k;
-* if k >= n, P**T = G(n-1) . . . G(2) G(1) and DORGBR returns P**T as
-* an N-by-N matrix.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* Specifies whether the matrix Q or the matrix P**T is
-* required, as defined in the transformation applied by DGEBRD:
-* = 'Q': generate Q;
-* = 'P': generate P**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix Q or P**T to be returned.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q or P**T to be returned.
-* N >= 0.
-* If VECT = 'Q', M >= N >= min(M,K);
-* if VECT = 'P', N >= M >= min(N,K).
-*
-* K (input) INTEGER
-* If VECT = 'Q', the number of columns in the original M-by-K
-* matrix reduced by DGEBRD.
-* If VECT = 'P', the number of rows in the original K-by-N
-* matrix reduced by DGEBRD.
-* K >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by DGEBRD.
-* On exit, the M-by-N matrix Q or P**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (input) DOUBLE PRECISION array, dimension
-* (min(M,K)) if VECT = 'Q'
-* (min(N,K)) if VECT = 'P'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i) or G(i), which determines Q or P**T, as
-* returned by DGEBRD in its array argument TAUQ or TAUP.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,min(M,N)).
-* For optimum performance LWORK >= min(M,N)*NB, where NB
-* is the optimal blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dorghr.f b/SRC/dorghr.f
index 8676f965..ff2c018d 100644
--- a/SRC/dorghr.f
+++ b/SRC/dorghr.f
@@ -1,67 +1,133 @@
- SUBROUTINE DORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DORGHR
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORGHR generates a real orthogonal matrix Q which is defined as the
-* product of IHI-ILO elementary reflectors of order N, as returned by
-* DGEHRD:
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGHR generates a real orthogonal matrix Q which is defined as the
+*> product of IHI-ILO elementary reflectors of order N, as returned by
+*> DGEHRD:
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI must have the same values as in the previous call
-* of DGEHRD. Q is equal to the unit matrix except in the
-* submatrix Q(ilo+1:ihi,ilo+1:ihi).
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by DGEHRD.
-* On exit, the N-by-N orthogonal matrix Q.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI must have the same values as in the previous call
+*> of DGEHRD. Q is equal to the unit matrix except in the
+*> submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by DGEHRD.
+*> On exit, the N-by-N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEHRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= IHI-ILO.
+*> For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEHRD.
+*> \date November 2011
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup doubleOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= IHI-ILO.
-* For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE DORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorgl2.f b/SRC/dorgl2.f
index eac97a3e..7133388c 100644
--- a/SRC/dorgl2.f
+++ b/SRC/dorgl2.f
@@ -1,59 +1,121 @@
- SUBROUTINE DORGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b DORGL2
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DORGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORGL2 generates an m by n real matrix Q with orthonormal rows,
-* which is defined as the first m rows of a product of k elementary
-* reflectors of order n
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by DGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGL2 generates an m by n real matrix Q with orthonormal rows,
+*> which is defined as the first m rows of a product of k elementary
+*> reflectors of order n
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by DGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the i-th row must contain the vector which defines
+*> the elementary reflector H(i), for i = 1,2,...,k, as returned
+*> by DGELQF in the first k rows of its array argument A.
+*> On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the i-th row must contain the vector which defines
-* the elementary reflector H(i), for i = 1,2,...,k, as returned
-* by DGELQF in the first k rows of its array argument A.
-* On exit, the m-by-n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup doubleOTHERcomputational
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGELQF.
+* =====================================================================
+ SUBROUTINE DORGL2( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorglq.f b/SRC/dorglq.f
index bab4269f..c02b1c89 100644
--- a/SRC/dorglq.f
+++ b/SRC/dorglq.f
@@ -1,70 +1,136 @@
- SUBROUTINE DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DORGLQ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORGLQ generates an M-by-N real matrix Q with orthonormal rows,
-* which is defined as the first M rows of a product of K elementary
-* reflectors of order N
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by DGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGLQ generates an M-by-N real matrix Q with orthonormal rows,
+*> which is defined as the first M rows of a product of K elementary
+*> reflectors of order N
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by DGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the i-th row must contain the vector which defines
-* the elementary reflector H(i), for i = 1,2,...,k, as returned
-* by DGELQF in the first k rows of its array argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the i-th row must contain the vector which defines
+*> the elementary reflector H(i), for i = 1,2,...,k, as returned
+*> by DGELQF in the first k rows of its array argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGELQF.
+*> \date November 2011
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup doubleOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorgql.f b/SRC/dorgql.f
index 92e0c413..60f2221f 100644
--- a/SRC/dorgql.f
+++ b/SRC/dorgql.f
@@ -1,71 +1,137 @@
- SUBROUTINE DORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DORGQL
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORGQL generates an M-by-N real matrix Q with orthonormal columns,
-* which is defined as the last N columns of a product of K elementary
-* reflectors of order M
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by DGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGQL generates an M-by-N real matrix Q with orthonormal columns,
+*> which is defined as the last N columns of a product of K elementary
+*> reflectors of order M
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by DGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the (n-k+i)-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by DGEQLF in the last k columns of its array
-* argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the (n-k+i)-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by DGEQLF in the last k columns of its array
+*> argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEQLF.
+*> \date November 2011
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup doubleOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE DORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorgqr.f b/SRC/dorgqr.f
index a080f0dc..fbfe6d06 100644
--- a/SRC/dorgqr.f
+++ b/SRC/dorgqr.f
@@ -1,71 +1,137 @@
- SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DORGQR
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORGQR generates an M-by-N real matrix Q with orthonormal columns,
-* which is defined as the first N columns of a product of K elementary
-* reflectors of order M
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGQR generates an M-by-N real matrix Q with orthonormal columns,
+*> which is defined as the first N columns of a product of K elementary
+*> reflectors of order M
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the i-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by DGEQRF in the first k columns of its array
-* argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the i-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by DGEQRF in the first k columns of its array
+*> argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEQRF.
+*> \date November 2011
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup doubleOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorgr2.f b/SRC/dorgr2.f
index 76b48f66..9e4e60e4 100644
--- a/SRC/dorgr2.f
+++ b/SRC/dorgr2.f
@@ -1,60 +1,122 @@
- SUBROUTINE DORGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b DORGR2
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DORGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORGR2 generates an m by n real matrix Q with orthonormal rows,
-* which is defined as the last m rows of a product of k elementary
-* reflectors of order n
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGR2 generates an m by n real matrix Q with orthonormal rows,
+*> which is defined as the last m rows of a product of k elementary
+*> reflectors of order n
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the (m-k+i)-th row must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by DGERQF in the last k rows of its array argument
+*> A.
+*> On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the (m-k+i)-th row must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by DGERQF in the last k rows of its array argument
-* A.
-* On exit, the m by n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup doubleOTHERcomputational
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGERQF.
+* =====================================================================
+ SUBROUTINE DORGR2( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorgrq.f b/SRC/dorgrq.f
index dffbb756..27049af8 100644
--- a/SRC/dorgrq.f
+++ b/SRC/dorgrq.f
@@ -1,71 +1,137 @@
- SUBROUTINE DORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DORGRQ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORGRQ generates an M-by-N real matrix Q with orthonormal rows,
-* which is defined as the last M rows of a product of K elementary
-* reflectors of order N
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGRQ generates an M-by-N real matrix Q with orthonormal rows,
+*> which is defined as the last M rows of a product of K elementary
+*> reflectors of order N
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the (m-k+i)-th row must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by DGERQF in the last k rows of its array argument
-* A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the (m-k+i)-th row must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by DGERQF in the last k rows of its array argument
+*> A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGERQF.
+*> \date November 2011
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup doubleOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE DORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorgtr.f b/SRC/dorgtr.f
index 827ed494..85f15c31 100644
--- a/SRC/dorgtr.f
+++ b/SRC/dorgtr.f
@@ -1,69 +1,133 @@
- SUBROUTINE DORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DORGTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORGTR generates a real orthogonal matrix Q which is defined as the
-* product of n-1 elementary reflectors of order N, as returned by
-* DSYTRD:
-*
-* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORGTR generates a real orthogonal matrix Q which is defined as the
+*> product of n-1 elementary reflectors of order N, as returned by
+*> DSYTRD:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A contains elementary reflectors
-* from DSYTRD;
-* = 'L': Lower triangle of A contains elementary reflectors
-* from DSYTRD.
-*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by DSYTRD.
-* On exit, the N-by-N orthogonal matrix Q.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A contains elementary reflectors
+*> from DSYTRD;
+*> = 'L': Lower triangle of A contains elementary reflectors
+*> from DSYTRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by DSYTRD.
+*> On exit, the N-by-N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DSYTRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N-1).
+*> For optimum performance LWORK >= (N-1)*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DSYTRD.
+*> \date November 2011
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup doubleOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N-1).
-* For optimum performance LWORK >= (N-1)*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE DORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorm2l.f b/SRC/dorm2l.f
index 0c176827..63487489 100644
--- a/SRC/dorm2l.f
+++ b/SRC/dorm2l.f
@@ -1,92 +1,168 @@
- SUBROUTINE DORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DORM2L
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORM2L overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T * C if SIDE = 'L' and TRANS = 'T', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'T',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by DGEQLF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORM2L overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T * C if SIDE = 'L' and TRANS = 'T', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'T',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by DGEQLF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q**T (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DGEQLF in the last k columns of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DGEQLF in the last k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEQLF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEQLF.
+*> \date November 2011
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup doubleOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE DORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dorm2r.f b/SRC/dorm2r.f
index 2dab71a7..2ec70206 100644
--- a/SRC/dorm2r.f
+++ b/SRC/dorm2r.f
@@ -1,92 +1,168 @@
- SUBROUTINE DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DORM2R
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORM2R overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T* C if SIDE = 'L' and TRANS = 'T', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'T',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DGEQRF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORM2R overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T* C if SIDE = 'L' and TRANS = 'T', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'T',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DGEQRF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q**T (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DGEQRF in the first k columns of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DGEQRF in the first k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEQRF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEQRF.
+*> \date November 2011
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup doubleOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dormbr.f b/SRC/dormbr.f
index aefc2f92..a20a75f9 100644
--- a/SRC/dormbr.f
+++ b/SRC/dormbr.f
@@ -1,10 +1,197 @@
+*> \brief \b DORMBR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
+* LDC, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, VECT
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> If VECT = 'Q', DORMBR overwrites the general real M-by-N matrix C
+*> with
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> If VECT = 'P', DORMBR overwrites the general real M-by-N matrix C
+*> with
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': P * C C * P
+*> TRANS = 'T': P**T * C C * P**T
+*>
+*> Here Q and P**T are the orthogonal matrices determined by DGEBRD when
+*> reducing a real matrix A to bidiagonal form: A = Q * B * P**T. Q and
+*> P**T are defined as products of elementary reflectors H(i) and G(i)
+*> respectively.
+*>
+*> Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
+*> order of the orthogonal matrix Q or P**T that is applied.
+*>
+*> If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
+*> if nq >= k, Q = H(1) H(2) . . . H(k);
+*> if nq < k, Q = H(1) H(2) . . . H(nq-1).
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
+*> if k < nq, P = G(1) G(2) . . . G(k);
+*> if k >= nq, P = G(1) G(2) . . . G(nq-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'Q': apply Q or Q**T;
+*> = 'P': apply P or P**T.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q, Q**T, P or P**T from the Left;
+*> = 'R': apply Q, Q**T, P or P**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q or P;
+*> = 'T': Transpose, apply Q**T or P**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> If VECT = 'Q', the number of columns in the original
+*> matrix reduced by DGEBRD.
+*> If VECT = 'P', the number of rows in the original
+*> matrix reduced by DGEBRD.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,min(nq,K)) if VECT = 'Q'
+*> (LDA,nq) if VECT = 'P'
+*> The vectors which define the elementary reflectors H(i) and
+*> G(i), whose products determine the matrices Q and P, as
+*> returned by DGEBRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If VECT = 'Q', LDA >= max(1,nq);
+*> if VECT = 'P', LDA >= max(1,min(nq,K)).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(nq,K))
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i) or G(i) which determines Q or P, as returned
+*> by DGEBRD in the array argument TAUQ or TAUP.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q
+*> or P*C or P**T*C or C*P or C*P**T.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DORMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
$ LDC, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS, VECT
@@ -14,110 +201,6 @@
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* If VECT = 'Q', DORMBR overwrites the general real M-by-N matrix C
-* with
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* If VECT = 'P', DORMBR overwrites the general real M-by-N matrix C
-* with
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': P * C C * P
-* TRANS = 'T': P**T * C C * P**T
-*
-* Here Q and P**T are the orthogonal matrices determined by DGEBRD when
-* reducing a real matrix A to bidiagonal form: A = Q * B * P**T. Q and
-* P**T are defined as products of elementary reflectors H(i) and G(i)
-* respectively.
-*
-* Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
-* order of the orthogonal matrix Q or P**T that is applied.
-*
-* If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
-* if nq >= k, Q = H(1) H(2) . . . H(k);
-* if nq < k, Q = H(1) H(2) . . . H(nq-1).
-*
-* If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
-* if k < nq, P = G(1) G(2) . . . G(k);
-* if k >= nq, P = G(1) G(2) . . . G(nq-1).
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'Q': apply Q or Q**T;
-* = 'P': apply P or P**T.
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q, Q**T, P or P**T from the Left;
-* = 'R': apply Q, Q**T, P or P**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q or P;
-* = 'T': Transpose, apply Q**T or P**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* If VECT = 'Q', the number of columns in the original
-* matrix reduced by DGEBRD.
-* If VECT = 'P', the number of rows in the original
-* matrix reduced by DGEBRD.
-* K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,min(nq,K)) if VECT = 'Q'
-* (LDA,nq) if VECT = 'P'
-* The vectors which define the elementary reflectors H(i) and
-* G(i), whose products determine the matrices Q and P, as
-* returned by DGEBRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If VECT = 'Q', LDA >= max(1,nq);
-* if VECT = 'P', LDA >= max(1,min(nq,K)).
-*
-* TAU (input) DOUBLE PRECISION array, dimension (min(nq,K))
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i) or G(i) which determines Q or P, as returned
-* by DGEBRD in the array argument TAUQ or TAUP.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q
-* or P*C or P**T*C or C*P or C*P**T.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dormhr.f b/SRC/dormhr.f
index c649d6ad..37772747 100644
--- a/SRC/dormhr.f
+++ b/SRC/dormhr.f
@@ -1,10 +1,178 @@
+*> \brief \b DORMHR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
+* LDC, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER IHI, ILO, INFO, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMHR overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> IHI-ILO elementary reflectors, as returned by DGEHRD:
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI must have the same values as in the previous call
+*> of DGEHRD. Q is equal to the unit matrix except in the
+*> submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*> If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
+*> ILO = 1 and IHI = 0, if M = 0;
+*> if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
+*> ILO = 1 and IHI = 0, if N = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,M) if SIDE = 'L'
+*> (LDA,N) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by DGEHRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEHRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
$ LDC, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,91 +182,6 @@
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DORMHR overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* IHI-ILO elementary reflectors, as returned by DGEHRD:
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI must have the same values as in the previous call
-* of DGEHRD. Q is equal to the unit matrix except in the
-* submatrix Q(ilo+1:ihi,ilo+1:ihi).
-* If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
-* ILO = 1 and IHI = 0, if M = 0;
-* if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
-* ILO = 1 and IHI = 0, if N = 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,M) if SIDE = 'L'
-* (LDA,N) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by DGEHRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*
-* TAU (input) DOUBLE PRECISION array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEHRD.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dorml2.f b/SRC/dorml2.f
index d2b0a907..cbc7e8d2 100644
--- a/SRC/dorml2.f
+++ b/SRC/dorml2.f
@@ -1,92 +1,168 @@
- SUBROUTINE DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DORML2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORML2 overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T* C if SIDE = 'L' and TRANS = 'T', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'T',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by DGELQF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORML2 overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T* C if SIDE = 'L' and TRANS = 'T', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'T',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by DGELQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q**T (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DGELQF in the first k rows of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DGELQF in the first k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGELQF.
+*> \date November 2011
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup doubleOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dormlq.f b/SRC/dormlq.f
index f81e86a8..1135cc6e 100644
--- a/SRC/dormlq.f
+++ b/SRC/dormlq.f
@@ -1,10 +1,172 @@
+*> \brief \b DORMLQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMLQ overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by DGELQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DGELQF in the first k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,88 +176,6 @@
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DORMLQ overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by DGELQF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DGELQF in the first k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGELQF.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dormql.f b/SRC/dormql.f
index 178d524f..6fe8bbd6 100644
--- a/SRC/dormql.f
+++ b/SRC/dormql.f
@@ -1,10 +1,172 @@
+*> \brief \b DORMQL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMQL overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by DGEQLF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DGEQLF in the last k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEQLF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DORMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,88 +176,6 @@
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DORMQL overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by DGEQLF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DGEQLF in the last k columns of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEQLF.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dormqr.f b/SRC/dormqr.f
index 2ada955b..70f0710b 100644
--- a/SRC/dormqr.f
+++ b/SRC/dormqr.f
@@ -1,10 +1,172 @@
+*> \brief \b DORMQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMQR overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DGEQRF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DGEQRF in the first k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGEQRF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,88 +176,6 @@
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DORMQR overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DGEQRF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DGEQRF in the first k columns of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGEQRF.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dormr2.f b/SRC/dormr2.f
index 945aeca6..15fb9dd5 100644
--- a/SRC/dormr2.f
+++ b/SRC/dormr2.f
@@ -1,92 +1,168 @@
- SUBROUTINE DORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DORMR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORMR2 overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T* C if SIDE = 'L' and TRANS = 'T', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'T',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DGERQF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMR2 overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T* C if SIDE = 'L' and TRANS = 'T', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'T',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DGERQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q' (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DGERQF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q' (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DGERQF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGERQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGERQF.
+*> \date November 2011
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup doubleOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE DORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dormr3.f b/SRC/dormr3.f
index 0a66cd02..8ff1846e 100644
--- a/SRC/dormr3.f
+++ b/SRC/dormr3.f
@@ -1,103 +1,187 @@
- SUBROUTINE DORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, L, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DORMR3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, L, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORMR3 overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DTZRZF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMR3 overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DTZRZF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q**T (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing
-* the meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DTZRZF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DTZRZF.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing
+*> the meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DTZRZF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DTZRZF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, L, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dormrq.f b/SRC/dormrq.f
index 0edce668..fd0e3ce9 100644
--- a/SRC/dormrq.f
+++ b/SRC/dormrq.f
@@ -1,10 +1,172 @@
+*> \brief \b DORMRQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMRQ overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DGERQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DGERQF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DGERQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DORMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,88 +176,6 @@
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DORMRQ overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by DGERQF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DGERQF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DGERQF.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dormrz.f b/SRC/dormrz.f
index f40d8582..9faa6b4c 100644
--- a/SRC/dormrz.f
+++ b/SRC/dormrz.f
@@ -1,111 +1,199 @@
- SUBROUTINE DORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
- $ WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b DORMRZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORMRZ overwrites the general real M-by-N matrix C with
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMRZ overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by DTZRZF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
+* Arguments
+* =========
*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing
+*> the meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> DTZRZF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DTZRZF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Q = H(1) H(2) . . . H(k)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* as returned by DTZRZF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup doubleOTHERcomputational
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing
-* the meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* DTZRZF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DTZRZF.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+ $ WORK, LWORK, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dormtr.f b/SRC/dormtr.f
index 54f85990..4fa6c745 100644
--- a/SRC/dormtr.f
+++ b/SRC/dormtr.f
@@ -1,10 +1,173 @@
+*> \brief \b DORMTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, UPLO
+* INTEGER INFO, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORMTR overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by DSYTRD:
+*>
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A contains elementary reflectors
+*> from DSYTRD;
+*> = 'L': Lower triangle of A contains elementary reflectors
+*> from DSYTRD.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA,M) if SIDE = 'L'
+*> (LDA,N) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by DSYTRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by DSYTRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DORMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS, UPLO
@@ -14,89 +177,6 @@
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DORMTR overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* nq-1 elementary reflectors, as returned by DSYTRD:
-*
-* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A contains elementary reflectors
-* from DSYTRD;
-* = 'L': Lower triangle of A contains elementary reflectors
-* from DSYTRD.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension
-* (LDA,M) if SIDE = 'L'
-* (LDA,N) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by DSYTRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*
-* TAU (input) DOUBLE PRECISION array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by DSYTRD.
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dpbcon.f b/SRC/dpbcon.f
index 31141868..9d3036db 100644
--- a/SRC/dpbcon.f
+++ b/SRC/dpbcon.f
@@ -1,12 +1,133 @@
+*> \brief \b DPBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric positive definite band matrix using the
+*> Cholesky factorization A = U**T*U or A = L*L**T computed by DPBTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor stored in AB;
+*> = 'L': Lower triangular factor stored in AB.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T of the band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of U or L is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm (or infinity-norm) of the symmetric band matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,57 +139,6 @@
DOUBLE PRECISION AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DPBCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric positive definite band matrix using the
-* Cholesky factorization A = U**T*U or A = L*L**T computed by DPBTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor stored in AB;
-* = 'L': Lower triangular factor stored in AB.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T of the band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of U or L is
-* stored in the j-th column of the array AB as follows:
-* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm (or infinity-norm) of the symmetric band matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpbequ.f b/SRC/dpbequ.f
index 3e0b39e2..8af9442b 100644
--- a/SRC/dpbequ.f
+++ b/SRC/dpbequ.f
@@ -1,72 +1,139 @@
- SUBROUTINE DPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
- DOUBLE PRECISION AMAX, SCOND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), S( * )
-* ..
-*
+*> \brief \b DPBEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* DPBEQU computes row and column scalings intended to equilibrate a
-* symmetric positive definite band matrix A and reduce its condition
-* number (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBEQU computes row and column scalings intended to equilibrate a
+*> symmetric positive definite band matrix A and reduce its condition
+*> number (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular of A is stored;
-* = 'L': Lower triangular of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular of A is stored;
+*> = 'L': Lower triangular of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KD+1.
+*> \date November 2011
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup doubleOTHERcomputational
*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE DPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+ DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpbrfs.f b/SRC/dpbrfs.f
index 91637b88..55cf462b 100644
--- a/SRC/dpbrfs.f
+++ b/SRC/dpbrfs.f
@@ -1,12 +1,190 @@
+*> \brief \b DPBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
+* LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive definite
+*> and banded, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T of the band matrix A as computed by
+*> DPBTRF, in the same storage format as A (see AB).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DPBTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
$ LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,91 +196,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPBRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive definite
-* and banded, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T of the band matrix A as computed by
-* DPBTRF, in the same storage format as A (see AB).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= KD+1.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DPBTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpbstf.f b/SRC/dpbstf.f
index af19cf66..a29d99dc 100644
--- a/SRC/dpbstf.f
+++ b/SRC/dpbstf.f
@@ -1,101 +1,156 @@
- SUBROUTINE DPBSTF( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * )
-* ..
-*
+*> \brief \b DPBSTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBSTF( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* DPBSTF computes a split Cholesky factorization of a real
-* symmetric positive definite band matrix A.
-*
-* This routine is designed to be used in conjunction with DSBGST.
-*
-* The factorization has the form A = S**T*S where S is a band matrix
-* of the same bandwidth as A and the following structure:
-*
-* S = ( U )
-* ( M L )
-*
-* where U is upper triangular of order m = (n+kd)/2, and L is lower
-* triangular of order n-m.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBSTF computes a split Cholesky factorization of a real
+*> symmetric positive definite band matrix A.
+*>
+*> This routine is designed to be used in conjunction with DSBGST.
+*>
+*> The factorization has the form A = S**T*S where S is a band matrix
+*> of the same bandwidth as A and the following structure:
+*>
+*> S = ( U )
+*> ( M L )
+*>
+*> where U is upper triangular of order m = (n+kd)/2, and L is lower
+*> triangular of order n-m.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first kd+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first kd+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the factor S from the split Cholesky
-* factorization A = S**T*S. See Further Details.
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the factorization could not be completed,
-* because the updated element a(i,i) was negative; the
-* matrix A is not positive definite.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* factorization A = S**T*S. See Further Details.
+*>
+*> LDAB (input) INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the factorization could not be completed,
+*> because the updated element a(i,i) was negative; the
+*> matrix A is not positive definite.
+*>
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 7, KD = 2:
+*>
+*> S = ( s11 s12 s13 )
+*> ( s22 s23 s24 )
+*> ( s33 s34 )
+*> ( s44 )
+*> ( s53 s54 s55 )
+*> ( s64 s65 s66 )
+*> ( s75 s76 s77 )
+*>
+*> If UPLO = 'U', the array AB holds:
+*>
+*> on entry: on exit:
+*>
+*> * * a13 a24 a35 a46 a57 * * s13 s24 s53 s64 s75
+*> * a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54 s65 s76
+*> a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
+*>
+*> If UPLO = 'L', the array AB holds:
+*>
+*> on entry: on exit:
+*>
+*> a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
+*> a21 a32 a43 a54 a65 a76 * s12 s23 s34 s54 s65 s76 *
+*> a31 a42 a53 a64 a64 * * s13 s24 s53 s64 s75 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPBSTF( UPLO, N, KD, AB, LDAB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 7, KD = 2:
-*
-* S = ( s11 s12 s13 )
-* ( s22 s23 s24 )
-* ( s33 s34 )
-* ( s44 )
-* ( s53 s54 s55 )
-* ( s64 s65 s66 )
-* ( s75 s76 s77 )
-*
-* If UPLO = 'U', the array AB holds:
-*
-* on entry: on exit:
-*
-* * * a13 a24 a35 a46 a57 * * s13 s24 s53 s64 s75
-* * a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54 s65 s76
-* a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
-*
-* If UPLO = 'L', the array AB holds:
-*
-* on entry: on exit:
-*
-* a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
-* a21 a32 a43 a54 a65 a76 * s12 s23 s34 s54 s65 s76 *
-* a31 a42 a53 a64 a64 * * s13 s24 s53 s64 s75 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpbsv.f b/SRC/dpbsv.f
index 466410d9..a8a80f71 100644
--- a/SRC/dpbsv.f
+++ b/SRC/dpbsv.f
@@ -1,104 +1,176 @@
- SUBROUTINE DPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
-* ..
-*
+*> \brief <b> DPBSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DPBSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite band matrix and X
-* and B are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular band matrix, and L is a lower
-* triangular band matrix, with the same number of superdiagonals or
-* subdiagonals as A. The factored form of A is then used to solve the
-* system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite band matrix and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular band matrix, and L is a lower
+*> triangular band matrix, with the same number of superdiagonals or
+*> subdiagonals as A. The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
-* See below for further details.
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T of the band
-* matrix A, in the same storage format as A.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup doubleOTHERsolve
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* On entry: On exit:
-*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* On entry: On exit:
-*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpbsvx.f b/SRC/dpbsvx.f
index c38cc387..2a26935e 100644
--- a/SRC/dpbsvx.f
+++ b/SRC/dpbsvx.f
@@ -1,11 +1,346 @@
+*> \brief <b> DPBSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
+* EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), S( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
+*> compute the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite band matrix and X
+*> and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular band matrix, and L is a lower
+*> triangular band matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFB contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. AB and AFB will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AFB and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFB and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array, except
+*> if FACT = 'F' and EQUED = 'Y', then A must contain the
+*> equilibrated matrix diag(S)*A*diag(S). The j-th column of A
+*> is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) DOUBLE PRECISION array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the band matrix
+*> A, in the same storage format as A (see AB). If EQUED = 'Y',
+*> then AFB is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFB is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFB is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13
+*> a22 a23 a24
+*> a33 a34 a35
+*> a44 a45 a46
+*> a55 a56
+*> (aij=conjg(aji)) a66
+*>
+*> Band storage of the upper triangle of A:
+*>
+*> * * a13 a24 a35 a46
+*> * a12 a23 a34 a45 a56
+*> a11 a22 a33 a44 a55 a66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> a11 a22 a33 a44 a55 a66
+*> a21 a32 a43 a54 a65 *
+*> a31 a42 a53 a64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
$ EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -19,225 +354,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPBSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
-* compute the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite band matrix and X
-* and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular band matrix, and L is a lower
-* triangular band matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFB contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. AB and AFB will not
-* be modified.
-* = 'N': The matrix A will be copied to AFB and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFB and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array, except
-* if FACT = 'F' and EQUED = 'Y', then A must contain the
-* equilibrated matrix diag(S)*A*diag(S). The j-th column of A
-* is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
-* See below for further details.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KD+1.
-*
-* AFB (input or output) DOUBLE PRECISION array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the band matrix
-* A, in the same storage format as A (see AB). If EQUED = 'Y',
-* then AFB is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFB is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* If FACT = 'E', then AFB is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= KD+1.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13
-* a22 a23 a24
-* a33 a34 a35
-* a44 a45 a46
-* a55 a56
-* (aij=conjg(aji)) a66
-*
-* Band storage of the upper triangle of A:
-*
-* * * a13 a24 a35 a46
-* * a12 a23 a34 a45 a56
-* a11 a22 a33 a44 a55 a66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* a11 a22 a33 a44 a55 a66
-* a21 a32 a43 a54 a65 *
-* a31 a42 a53 a64 * *
-*
-* Array elements marked * are not used by the routine.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpbtf2.f b/SRC/dpbtf2.f
index abd7b100..b807a5cb 100644
--- a/SRC/dpbtf2.f
+++ b/SRC/dpbtf2.f
@@ -1,91 +1,154 @@
- SUBROUTINE DPBTF2( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * )
-* ..
-*
+*> \brief \b DPBTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBTF2( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* DPBTF2 computes the Cholesky factorization of a real symmetric
-* positive definite band matrix A.
-*
-* The factorization has the form
-* A = U**T * U , if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix, U**T is the transpose of U, and
-* L is lower triangular.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBTF2 computes the Cholesky factorization of a real symmetric
+*> positive definite band matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U , if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix, U**T is the transpose of U, and
+*> L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite, and the factorization could not be
-* completed.
-*
-* Further Details
-* ===============
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On entry: On exit:
+*> \date November 2011
*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> \ingroup doubleOTHERcomputational
*
-* Similarly, if UPLO = 'L' the format of A is as follows:
*
-* On entry: On exit:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPBTF2( UPLO, N, KD, AB, LDAB, INFO )
*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpbtrf.f b/SRC/dpbtrf.f
index 8ca9a597..bcd65338 100644
--- a/SRC/dpbtrf.f
+++ b/SRC/dpbtrf.f
@@ -1,89 +1,152 @@
- SUBROUTINE DPBTRF( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * )
-* ..
-*
+*> \brief \b DPBTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBTRF( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* DPBTRF computes the Cholesky factorization of a real symmetric
-* positive definite band matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBTRF computes the Cholesky factorization of a real symmetric
+*> positive definite band matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T of the band
-* matrix A, in the same storage format as A.
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> Contributed by
+*> Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPBTRF( UPLO, N, KD, AB, LDAB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* On entry: On exit:
-*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* On entry: On exit:
-*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
-*
-* Array elements marked * are not used by the routine.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Contributed by
-* Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpbtrs.f b/SRC/dpbtrs.f
index 5f4c870d..80947b6e 100644
--- a/SRC/dpbtrs.f
+++ b/SRC/dpbtrs.f
@@ -1,64 +1,130 @@
- SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DPBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DPBTRS solves a system of linear equations A*X = B with a symmetric
-* positive definite band matrix A using the Cholesky factorization
-* A = U**T*U or A = L*L**T computed by DPBTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBTRS solves a system of linear equations A*X = B with a symmetric
+*> positive definite band matrix A using the Cholesky factorization
+*> A = U**T*U or A = L*L**T computed by DPBTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor stored in AB;
-* = 'L': Lower triangular factor stored in AB.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor stored in AB;
+*> = 'L': Lower triangular factor stored in AB.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T of the band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of U or L is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T of the band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of U or L is
-* stored in the j-th column of the array AB as follows:
-* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup doubleOTHERcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpftrf.f b/SRC/dpftrf.f
index 81328214..23c63e70 100644
--- a/SRC/dpftrf.f
+++ b/SRC/dpftrf.f
@@ -1,154 +1,209 @@
- SUBROUTINE DPFTRF( TRANSR, UPLO, N, A, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b DPFTRF
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER N, INFO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( 0: * )
+* Definition
+* ==========
*
+* SUBROUTINE DPFTRF( TRANSR, UPLO, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( 0: * )
+*
* Purpose
* =======
*
-* DPFTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the block version of the algorithm, calling Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPFTRF computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the block version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'T': The Transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of RFP A is stored;
-* = 'L': Lower triangle of RFP A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension ( N*(N+1)/2 );
-* On entry, the symmetric matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
-* the transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the NT elements of
-* upper packed A. If UPLO = 'L' the RFP A contains the elements
-* of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
-* 'T'. When TRANSR is 'N' the LDA is N+1 when N is even and N
-* is odd. See the Note below for more details.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization RFP A = U**T*U or RFP A = L*L**T.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
-* Further Details
-* ===============
-*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'T': The Transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of RFP A is stored;
+*> = 'L': Lower triangle of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension ( N*(N+1)/2 );
+*> On entry, the symmetric matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
+*> the transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the NT elements of
+*> upper packed A. If UPLO = 'L' the RFP A contains the elements
+*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
+*> 'T'. When TRANSR is 'N' the LDA is N+1 when N is even and N
+*> is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization RFP A = U**T*U or RFP A = L*L**T.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
+*> \date November 2011
*
-* RFP A RFP A
+*> \ingroup doubleOTHERcomputational
*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPFTRF( TRANSR, UPLO, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( 0: * )
*
* =====================================================================
*
diff --git a/SRC/dpftri.f b/SRC/dpftri.f
index 0748300d..2d5724a5 100644
--- a/SRC/dpftri.f
+++ b/SRC/dpftri.f
@@ -1,146 +1,202 @@
- SUBROUTINE DPFTRI( TRANSR, UPLO, N, A, INFO )
+*> \brief \b DPFTRI
*
-* -- LAPACK routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* .. Array Arguments ..
- DOUBLE PRECISION A( 0: * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DPFTRI( TRANSR, UPLO, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* .. Array Arguments ..
+* DOUBLE PRECISION A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* DPFTRI computes the inverse of a (real) symmetric positive definite
-* matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
-* computed by DPFTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPFTRI computes the inverse of a (real) symmetric positive definite
+*> matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
+*> computed by DPFTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'T': The Transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension ( N*(N+1)/2 )
-* On entry, the symmetric matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
-* the transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A. If UPLO = 'L' the RFP A contains the elements
-* of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
-* 'T'. When TRANSR is 'N' the LDA is N+1 when N is even and N
-* is odd. See the Note below for more details.
-*
-* On exit, the symmetric inverse of the original matrix, in the
-* same storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
-* Further Details
-* ===============
-*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'T': The Transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension ( N*(N+1)/2 )
+*> On entry, the symmetric matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
+*> the transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A. If UPLO = 'L' the RFP A contains the elements
+*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
+*> 'T'. When TRANSR is 'N' the LDA is N+1 when N is even and N
+*> is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the symmetric inverse of the original matrix, in the
+*> same storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
+*> \date November 2011
*
-* RFP A RFP A
+*> \ingroup doubleOTHERcomputational
*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPFTRI( TRANSR, UPLO, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* .. Array Arguments ..
+ DOUBLE PRECISION A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpftrs.f b/SRC/dpftrs.f
index aab5728d..ccab71dd 100644
--- a/SRC/dpftrs.f
+++ b/SRC/dpftrs.f
@@ -1,145 +1,210 @@
- SUBROUTINE DPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( 0: * ), B( LDB, * )
-* ..
-*
+*> \brief \b DPFTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( 0: * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DPFTRS solves a system of linear equations A*X = B with a symmetric
-* positive definite matrix A using the Cholesky factorization
-* A = U**T*U or A = L*L**T computed by DPFTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPFTRS solves a system of linear equations A*X = B with a symmetric
+*> positive definite matrix A using the Cholesky factorization
+*> A = U**T*U or A = L*L**T computed by DPFTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'T': The Transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of RFP A is stored;
-* = 'L': Lower triangle of RFP A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'T': The Transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of RFP A is stored;
+*> = 'L': Lower triangle of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension ( N*(N+1)/2 ).
+*> The triangular factor U or L from the Cholesky factorization
+*> of RFP A = U**T*U or RFP A = L*L**T, as computed by DPFTRF.
+*> See note below for more details about RFP A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension ( N*(N+1)/2 ).
-* The triangular factor U or L from the Cholesky factorization
-* of RFP A = U**T*U or RFP A = L*L**T, as computed by DPFTRF.
-* See note below for more details about RFP A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( 0: * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpocon.f b/SRC/dpocon.f
index c51792e0..a4846c45 100644
--- a/SRC/dpocon.f
+++ b/SRC/dpocon.f
@@ -1,12 +1,122 @@
+*> \brief \b DPOCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric positive definite matrix using the
+*> Cholesky factorization A = U**T*U or A = L*L**T computed by DPOTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm (or infinity-norm) of the symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOcomputational
+*
+* =====================================================================
SUBROUTINE DPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,49 +128,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DPOCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric positive definite matrix using the
-* Cholesky factorization A = U**T*U or A = L*L**T computed by DPOTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPOTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm (or infinity-norm) of the symmetric matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpoequ.f b/SRC/dpoequ.f
index b6d20307..4c4c9563 100644
--- a/SRC/dpoequ.f
+++ b/SRC/dpoequ.f
@@ -1,61 +1,121 @@
- SUBROUTINE DPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- DOUBLE PRECISION AMAX, SCOND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), S( * )
-* ..
-*
+*> \brief \b DPOEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* DPOEQU computes row and column scalings intended to equilibrate a
-* symmetric positive definite matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOEQU computes row and column scalings intended to equilibrate a
+*> symmetric positive definite matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The N-by-N symmetric positive definite matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The N-by-N symmetric positive definite matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup doublePOcomputational
*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE DPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpoequb.f b/SRC/dpoequb.f
index 81086e31..038c3fe2 100644
--- a/SRC/dpoequb.f
+++ b/SRC/dpoequb.f
@@ -1,66 +1,121 @@
- SUBROUTINE DPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- DOUBLE PRECISION AMAX, SCOND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), S( * )
-* ..
-*
+*> \brief \b DPOEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* DPOEQU computes row and column scalings intended to equilibrate a
-* symmetric positive definite matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOEQU computes row and column scalings intended to equilibrate a
+*> symmetric positive definite matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The N-by-N symmetric positive definite matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The N-by-N symmetric positive definite matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup doublePOcomputational
*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE DPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dporfs.f b/SRC/dporfs.f
index de8df341..e8cbfae5 100644
--- a/SRC/dporfs.f
+++ b/SRC/dporfs.f
@@ -1,12 +1,184 @@
+*> \brief \b DPORFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
+* LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPORFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive definite,
+*> and provides error bounds and backward error estimates for the
+*> solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DPOTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOcomputational
+*
+* =====================================================================
SUBROUTINE DPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
$ LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,88 +190,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPORFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive definite,
-* and provides error bounds and backward error estimates for the
-* solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DPOTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dporfsx.f b/SRC/dporfsx.f
index db55c18e..ce0d1ba7 100644
--- a/SRC/dporfsx.f
+++ b/SRC/dporfsx.f
@@ -1,18 +1,415 @@
+*> \brief \b DPORFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, S, B,
+* LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DPORFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive
+*> definite, and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension (NPARAMS)
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOcomputational
+*
+* =====================================================================
SUBROUTINE DPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, S, B,
$ LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,269 +425,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DPORFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive
-* definite, and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension (NPARAMS)
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/dposv.f b/SRC/dposv.f
index 336ef864..3298bf59 100644
--- a/SRC/dposv.f
+++ b/SRC/dposv.f
@@ -1,9 +1,132 @@
+*> \brief <b> DPOSV computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix. The factored form of A is then used to solve the system of
+*> equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOsolve
+*
+* =====================================================================
SUBROUTINE DPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,65 +136,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix. The factored form of A is then used to solve the system of
-* equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
-*
* =====================================================================
*
* .. External Functions ..
diff --git a/SRC/dposvx.f b/SRC/dposvx.f
index b0a5da2b..c9cef90c 100644
--- a/SRC/dposvx.f
+++ b/SRC/dposvx.f
@@ -1,11 +1,308 @@
+*> \brief <b> DPOSVX computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
+* S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), S( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
+*> compute the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. A and AF will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A, except if FACT = 'F' and
+*> EQUED = 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced. A is not modified if
+*> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) DOUBLE PRECISION array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A. If EQUED .ne. 'N', then AF is the factored form
+*> of the equilibrated matrix diag(S)*A*diag(S).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOsolve
+*
+* =====================================================================
SUBROUTINE DPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
$ IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -19,195 +316,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
-* compute the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. A and AF will not
-* be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A, except if FACT = 'F' and
-* EQUED = 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced. A is not modified if
-* FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) DOUBLE PRECISION array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A. If EQUED .ne. 'N', then AF is the factored form
-* of the equilibrated matrix diag(S)*A*diag(S).
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the original
-* matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dposvxx.f b/SRC/dposvxx.f
index 6dbbabc5..288f3ccd 100644
--- a/SRC/dposvxx.f
+++ b/SRC/dposvxx.f
@@ -1,18 +1,515 @@
+*> \brief <b> DPOSVXX computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
+* S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T
+*> to compute the solution to a double precision system of linear equations
+*> A * X = B, where A is an N-by-N symmetric positive definite matrix
+*> and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. DPOSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> DPOSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> DPOSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what DPOSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A (see argument RCOND). If the reciprocal of the condition number
+*> is less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF contains the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A and AF are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A, except if FACT = 'F' and EQUED =
+*> 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper
+*> triangular part of A contains the upper triangular part of the
+*> matrix A, and the strictly lower triangular part of A is not
+*> referenced. If UPLO = 'L', the leading N-by-N lower triangular
+*> part of A contains the lower triangular part of the matrix A, and
+*> the strictly upper triangular part of A is not referenced. A is
+*> not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
+*> 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) DOUBLE PRECISION array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A. If EQUED .ne. 'N', then AF is the factored
+*> form of the equilibrated matrix diag(S)*A*diag(S).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOsolve
+*
+* =====================================================================
SUBROUTINE DPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,360 +525,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T
-* to compute the solution to a double precision system of linear equations
-* A * X = B, where A is an N-by-N symmetric positive definite matrix
-* and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. DPOSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* DPOSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* DPOSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what DPOSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A (see argument RCOND). If the reciprocal of the condition number
-* is less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF contains the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A and AF are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A, except if FACT = 'F' and EQUED =
-* 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper
-* triangular part of A contains the upper triangular part of the
-* matrix A, and the strictly lower triangular part of A is not
-* referenced. If UPLO = 'L', the leading N-by-N lower triangular
-* part of A contains the lower triangular part of the matrix A, and
-* the strictly upper triangular part of A is not referenced. A is
-* not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
-* 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) DOUBLE PRECISION array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A. If EQUED .ne. 'N', then AF is the factored
-* form of the equilibrated matrix diag(S)*A*diag(S).
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the original
-* matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/dpotf2.f b/SRC/dpotf2.f
index 996d3ac0..4ab21f64 100644
--- a/SRC/dpotf2.f
+++ b/SRC/dpotf2.f
@@ -1,9 +1,111 @@
+*> \brief \b DPOTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOTF2( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOTF2 computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U , if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**T *U or A = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOcomputational
+*
+* =====================================================================
SUBROUTINE DPOTF2( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,53 +115,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOTF2 computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U , if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T *U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpotrf.f b/SRC/dpotrf.f
index e9553b61..1bdaa19b 100644
--- a/SRC/dpotrf.f
+++ b/SRC/dpotrf.f
@@ -1,9 +1,109 @@
+*> \brief \b DPOTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOTRF( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOTRF computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the block version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOcomputational
+*
+* =====================================================================
SUBROUTINE DPOTRF( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,51 +113,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpotri.f b/SRC/dpotri.f
index 73659c94..d9c29b11 100644
--- a/SRC/dpotri.f
+++ b/SRC/dpotri.f
@@ -1,9 +1,96 @@
+*> \brief \b DPOTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOTRI( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOTRI computes the inverse of a real symmetric positive definite
+*> matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
+*> computed by DPOTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, as computed by
+*> DPOTRF.
+*> On exit, the upper or lower triangle of the (symmetric)
+*> inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOcomputational
+*
+* =====================================================================
SUBROUTINE DPOTRI( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,39 +100,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOTRI computes the inverse of a real symmetric positive definite
-* matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
-* computed by DPOTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, as computed by
-* DPOTRF.
-* On exit, the upper or lower triangle of the (symmetric)
-* inverse of A, overwriting the input factor U or L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
* =====================================================================
*
* .. External Functions ..
diff --git a/SRC/dpotrs.f b/SRC/dpotrs.f
index 0f755a06..a7b7c36f 100644
--- a/SRC/dpotrs.f
+++ b/SRC/dpotrs.f
@@ -1,56 +1,119 @@
- SUBROUTINE DPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DPOTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DPOTRS solves a system of linear equations A*X = B with a symmetric
-* positive definite matrix A using the Cholesky factorization
-* A = U**T*U or A = L*L**T computed by DPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOTRS solves a system of linear equations A*X = B with a symmetric
+*> positive definite matrix A using the Cholesky factorization
+*> A = U**T*U or A = L*L**T computed by DPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup doublePOcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE DPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dppcon.f b/SRC/dppcon.f
index 3af794f7..4fb530ae 100644
--- a/SRC/dppcon.f
+++ b/SRC/dppcon.f
@@ -1,11 +1,119 @@
+*> \brief \b DPPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPCON( UPLO, N, AP, ANORM, RCOND, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric positive definite packed matrix using
+*> the Cholesky factorization A = U**T*U or A = L*L**T computed by
+*> DPPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, packed columnwise in a linear
+*> array. The j-th column of U or L is stored in the array AP
+*> as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm (or infinity-norm) of the symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPPCON( UPLO, N, AP, ANORM, RCOND, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,51 +125,6 @@
DOUBLE PRECISION AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DPPCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric positive definite packed matrix using
-* the Cholesky factorization A = U**T*U or A = L*L**T computed by
-* DPPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, packed columnwise in a linear
-* array. The j-th column of U or L is stored in the array AP
-* as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm (or infinity-norm) of the symmetric matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dppequ.f b/SRC/dppequ.f
index 1ed3862e..647e5a1c 100644
--- a/SRC/dppequ.f
+++ b/SRC/dppequ.f
@@ -1,9 +1,117 @@
+*> \brief \b DPPEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), S( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPEQU computes row and column scalings intended to equilibrate a
+*> symmetric positive definite matrix A in packed storage and reduce
+*> its condition number (with respect to the two-norm). S contains the
+*> scale factors, S(i)=1/sqrt(A(i,i)), chosen so that the scaled matrix
+*> B with elements B(i,j)=S(i)*A(i,j)*S(j) has ones on the diagonal.
+*> This choice of S puts the condition number of B within a factor N of
+*> the smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,53 +122,6 @@
DOUBLE PRECISION AP( * ), S( * )
* ..
*
-* Purpose
-* =======
-*
-* DPPEQU computes row and column scalings intended to equilibrate a
-* symmetric positive definite matrix A in packed storage and reduce
-* its condition number (with respect to the two-norm). S contains the
-* scale factors, S(i)=1/sqrt(A(i,i)), chosen so that the scaled matrix
-* B with elements B(i,j)=S(i)*A(i,j)*S(j) has ones on the diagonal.
-* This choice of S puts the condition number of B within a factor N of
-* the smallest possible condition number over all possible diagonal
-* scalings.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
-*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
-*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpprfs.f b/SRC/dpprfs.f
index 9efb55c9..1a1a164b 100644
--- a/SRC/dpprfs.f
+++ b/SRC/dpprfs.f
@@ -1,12 +1,172 @@
+*> \brief \b DPPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
+* BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive definite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPPTRF/ZPPTRF,
+*> packed columnwise in a linear array in the same format as A
+*> (see AP).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DPPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
$ BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,82 +178,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive definite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPPTRF/ZPPTRF,
-* packed columnwise in a linear array in the same format as A
-* (see AP).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DPPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dppsv.f b/SRC/dppsv.f
index d83cb0bb..d0a8e257 100644
--- a/SRC/dppsv.f
+++ b/SRC/dppsv.f
@@ -1,90 +1,156 @@
- SUBROUTINE DPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> DPPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DPPSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix stored in
-* packed format and X and B are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix. The factored form of A is then used to solve the system of
-* equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix stored in
+*> packed format and X and B are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix. The factored form of A is then used to solve the system of
+*> equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup doubleOTHERsolve
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dppsvx.f b/SRC/dppsvx.f
index 96b62f41..216eb4ac 100644
--- a/SRC/dppsvx.f
+++ b/SRC/dppsvx.f
@@ -1,10 +1,315 @@
+*> \brief <b> DPPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
+* X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), S( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
+*> compute the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix stored in
+*> packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFP contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. AP and AFP will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array, except if FACT = 'F'
+*> and EQUED = 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). The j-th column of A is stored in the
+*> array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details. A is not modified if
+*> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) DOUBLE PRECISION array, dimension
+*> (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A. If EQUED .ne. 'N', then AFP is the factored
+*> form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T * U or A = L * L**T of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFP is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T * U or A = L * L**T of the equilibrated
+*> matrix A (see the description of AP for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
$ X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -17,206 +322,6 @@
$ FERR( * ), S( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPPSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
-* compute the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix stored in
-* packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFP contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. AP and AFP will not
-* be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array, except if FACT = 'F'
-* and EQUED = 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). The j-th column of A is stored in the
-* array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details. A is not modified if
-* FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* AFP (input or output) DOUBLE PRECISION array, dimension
-* (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A. If EQUED .ne. 'N', then AFP is the factored
-* form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T * U or A = L * L**T of the original
-* matrix A.
-*
-* If FACT = 'E', then AFP is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T * U or A = L * L**T of the equilibrated
-* matrix A (see the description of AP for the form of the
-* equilibrated matrix).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpptrf.f b/SRC/dpptrf.f
index 62ae3363..e89ed95f 100644
--- a/SRC/dpptrf.f
+++ b/SRC/dpptrf.f
@@ -1,74 +1,133 @@
- SUBROUTINE DPPTRF( UPLO, N, AP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * )
-* ..
-*
+*> \brief \b DPPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPTRF( UPLO, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * )
+* ..
+*
* Purpose
* =======
*
-* DPPTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A stored in packed format.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPTRF computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A stored in packed format.
+*>
+*> The factorization has the form
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T, in the same
+*> storage format as A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
+*> \date November 2011
*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T, in the same
-* storage format as A.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
*
* Further Details
-* ======= =======
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPPTRF( UPLO, N, AP, INFO )
*
-* Packed storage of the upper triangle of A:
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpptri.f b/SRC/dpptri.f
index 7b7c0cba..08a8f623 100644
--- a/SRC/dpptri.f
+++ b/SRC/dpptri.f
@@ -1,9 +1,95 @@
+*> \brief \b DPPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPTRI( UPLO, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPTRI computes the inverse of a real symmetric positive definite
+*> matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
+*> computed by DPPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor is stored in AP;
+*> = 'L': Lower triangular factor is stored in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, packed columnwise as
+*> a linear array. The j-th column of U or L is stored in the
+*> array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the upper or lower triangle of the (symmetric)
+*> inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPPTRI( UPLO, N, AP, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,40 +99,6 @@
DOUBLE PRECISION AP( * )
* ..
*
-* Purpose
-* =======
-*
-* DPPTRI computes the inverse of a real symmetric positive definite
-* matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
-* computed by DPPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor is stored in AP;
-* = 'L': Lower triangular factor is stored in AP.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, packed columnwise as
-* a linear array. The j-th column of U or L is stored in the
-* array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
-*
-* On exit, the upper or lower triangle of the (symmetric)
-* inverse of A, overwriting the input factor U or L.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpptrs.f b/SRC/dpptrs.f
index 5f05d030..92a17f1c 100644
--- a/SRC/dpptrs.f
+++ b/SRC/dpptrs.f
@@ -1,57 +1,117 @@
- SUBROUTINE DPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b DPPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DPPTRS solves a system of linear equations A*X = B with a symmetric
-* positive definite matrix A in packed storage using the Cholesky
-* factorization A = U**T*U or A = L*L**T computed by DPPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPTRS solves a system of linear equations A*X = B with a symmetric
+*> positive definite matrix A in packed storage using the Cholesky
+*> factorization A = U**T*U or A = L*L**T computed by DPPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, packed columnwise in a linear
+*> array. The j-th column of U or L is stored in the array AP
+*> as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \date November 2011
*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, packed columnwise in a linear
-* array. The j-th column of U or L is stored in the array AP
-* as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \ingroup doubleOTHERcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE DPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpstf2.f b/SRC/dpstf2.f
index 8d184b65..ba4a1739 100644
--- a/SRC/dpstf2.f
+++ b/SRC/dpstf2.f
@@ -1,8 +1,142 @@
+*> \brief \b DPSTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION TOL
+* INTEGER INFO, LDA, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), WORK( 2*N )
+* INTEGER PIV( N )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPSTF2 computes the Cholesky factorization with complete
+*> pivoting of a real symmetric positive semidefinite matrix A.
+*>
+*> The factorization has the form
+*> P**T * A * P = U**T * U , if UPLO = 'U',
+*> P**T * A * P = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular, and
+*> P is stored as vector PIV.
+*>
+*> This algorithm does not attempt to check that A is positive
+*> semidefinite. This version of the algorithm calls level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization as above.
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of A given by the number of steps the algorithm
+*> completed.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> User defined tolerance. If TOL < 0, then N*U*MAX( A( K,K ) )
+*> will be used. The algorithm terminates at the (K-1)st step
+*> if the pivot <= TOL.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> Work space.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0: If INFO = -K, the K-th argument had an illegal value,
+*> = 0: algorithm completed successfully, and
+*> > 0: the matrix A is either rank deficient with computed rank
+*> as returned in RANK, or is indefinite. See Section 7 of
+*> LAPACK Working Note #161 for further information.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
*
-* -- LAPACK PROTOTYPE routine (version 3.2.2) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION TOL
@@ -14,70 +148,6 @@
INTEGER PIV( N )
* ..
*
-* Purpose
-* =======
-*
-* DPSTF2 computes the Cholesky factorization with complete
-* pivoting of a real symmetric positive semidefinite matrix A.
-*
-* The factorization has the form
-* P**T * A * P = U**T * U , if UPLO = 'U',
-* P**T * A * P = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular, and
-* P is stored as vector PIV.
-*
-* This algorithm does not attempt to check that A is positive
-* semidefinite. This version of the algorithm calls level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization as above.
-*
-* PIV (output) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
-*
-* RANK (output) INTEGER
-* The rank of A given by the number of steps the algorithm
-* completed.
-*
-* TOL (input) DOUBLE PRECISION
-* User defined tolerance. If TOL < 0, then N*U*MAX( A( K,K ) )
-* will be used. The algorithm terminates at the (K-1)st step
-* if the pivot <= TOL.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-* Work space.
-*
-* INFO (output) INTEGER
-* < 0: If INFO = -K, the K-th argument had an illegal value,
-* = 0: algorithm completed successfully, and
-* > 0: the matrix A is either rank deficient with computed rank
-* as returned in RANK, or is indefinite. See Section 7 of
-* LAPACK Working Note #161 for further information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpstrf.f b/SRC/dpstrf.f
index 24da7f9a..ced66c05 100644
--- a/SRC/dpstrf.f
+++ b/SRC/dpstrf.f
@@ -1,8 +1,142 @@
+*> \brief \b DPSTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION TOL
+* INTEGER INFO, LDA, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), WORK( 2*N )
+* INTEGER PIV( N )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPSTRF computes the Cholesky factorization with complete
+*> pivoting of a real symmetric positive semidefinite matrix A.
+*>
+*> The factorization has the form
+*> P**T * A * P = U**T * U , if UPLO = 'U',
+*> P**T * A * P = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular, and
+*> P is stored as vector PIV.
+*>
+*> This algorithm does not attempt to check that A is positive
+*> semidefinite. This version of the algorithm calls level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization as above.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of A given by the number of steps the algorithm
+*> completed.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> User defined tolerance. If TOL < 0, then N*U*MAX( A(K,K) )
+*> will be used. The algorithm terminates at the (K-1)st step
+*> if the pivot <= TOL.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> Work space.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0: If INFO = -K, the K-th argument had an illegal value,
+*> = 0: algorithm completed successfully, and
+*> > 0: the matrix A is either rank deficient with computed rank
+*> as returned in RANK, or is indefinite. See Section 7 of
+*> LAPACK Working Note #161 for further information.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION TOL
@@ -14,70 +148,6 @@
INTEGER PIV( N )
* ..
*
-* Purpose
-* =======
-*
-* DPSTRF computes the Cholesky factorization with complete
-* pivoting of a real symmetric positive semidefinite matrix A.
-*
-* The factorization has the form
-* P**T * A * P = U**T * U , if UPLO = 'U',
-* P**T * A * P = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular, and
-* P is stored as vector PIV.
-*
-* This algorithm does not attempt to check that A is positive
-* semidefinite. This version of the algorithm calls level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization as above.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* PIV (output) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
-*
-* RANK (output) INTEGER
-* The rank of A given by the number of steps the algorithm
-* completed.
-*
-* TOL (input) DOUBLE PRECISION
-* User defined tolerance. If TOL < 0, then N*U*MAX( A(K,K) )
-* will be used. The algorithm terminates at the (K-1)st step
-* if the pivot <= TOL.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-* Work space.
-*
-* INFO (output) INTEGER
-* < 0: If INFO = -K, the K-th argument had an illegal value,
-* = 0: algorithm completed successfully, and
-* > 0: the matrix A is either rank deficient with computed rank
-* as returned in RANK, or is indefinite. See Section 7 of
-* LAPACK Working Note #161 for further information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dptcon.f b/SRC/dptcon.f
index 15404af2..6ca5ec65 100644
--- a/SRC/dptcon.f
+++ b/SRC/dptcon.f
@@ -1,64 +1,129 @@
- SUBROUTINE DPTCON( N, D, E, ANORM, RCOND, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- DOUBLE PRECISION ANORM, RCOND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * ), WORK( * )
-* ..
-*
+*> \brief \b DPTCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTCON( N, D, E, ANORM, RCOND, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DPTCON computes the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric positive definite tridiagonal matrix
-* using the factorization A = L*D*L**T or A = U**T*D*U computed by
-* DPTTRF.
-*
-* Norm(inv(A)) is computed by a direct method, and the reciprocal of
-* the condition number is computed as
-* RCOND = 1 / (ANORM * norm(inv(A))).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTCON computes the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric positive definite tridiagonal matrix
+*> using the factorization A = L*D*L**T or A = U**T*D*U computed by
+*> DPTTRF.
+*>
+*> Norm(inv(A)) is computed by a direct method, and the reciprocal of
+*> the condition number is computed as
+*> RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization of A, as computed by DPTTRF.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) off-diagonal elements of the unit bidiagonal factor
-* U or L from the factorization of A, as computed by DPTTRF.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization of A, as computed by DPTTRF.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the unit bidiagonal factor
+*> U or L from the factorization of A, as computed by DPTTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the
+*> 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm of the original matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the
-* 1-norm of inv(A) computed in this routine.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The method used is described in Nicholas J. Higham, "Efficient
+*> Algorithms for Computing the Condition Number of a Tridiagonal
+*> Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DPTCON( N, D, E, ANORM, RCOND, WORK, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* The method used is described in Nicholas J. Higham, "Efficient
-* Algorithms for Computing the Condition Number of a Tridiagonal
-* Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dpteqr.f b/SRC/dpteqr.f
index 99f31b00..fd16a9b1 100644
--- a/SRC/dpteqr.f
+++ b/SRC/dpteqr.f
@@ -1,9 +1,146 @@
+*> \brief \b DPTEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric positive definite tridiagonal matrix by first factoring the
+*> matrix using DPTTRF, and then calling DBDSQR to compute the singular
+*> values of the bidiagonal factor.
+*>
+*> This routine computes the eigenvalues of the positive definite
+*> tridiagonal matrix to high relative accuracy. This means that if the
+*> eigenvalues range over many orders of magnitude in size, then the
+*> small eigenvalues and corresponding eigenvectors will be computed
+*> more accurately than, for example, with the standard QR method.
+*>
+*> The eigenvectors of a full or band symmetric positive definite matrix
+*> can also be found if DSYTRD, DSPTRD, or DSBTRD has been used to
+*> reduce this matrix to tridiagonal form. (The reduction to tridiagonal
+*> form, however, may preclude the possibility of obtaining high
+*> relative accuracy in the small eigenvalues of the original matrix, if
+*> these eigenvalues range over many orders of magnitude.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'V': Compute eigenvectors of original symmetric
+*> matrix also. Array Z contains the orthogonal
+*> matrix used to reduce the original matrix to
+*> tridiagonal form.
+*> = 'I': Compute eigenvectors of tridiagonal matrix also.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal
+*> matrix.
+*> On normal exit, D contains the eigenvalues, in descending
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the orthogonal matrix used in the
+*> reduction to tridiagonal form.
+*> On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
+*> original symmetric matrix;
+*> if COMPZ = 'I', the orthonormal eigenvectors of the
+*> tridiagonal matrix.
+*> If INFO > 0 on exit, Z contains the eigenvectors associated
+*> with only the stored eigenvalues.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> COMPZ = 'V' or 'I', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is:
+*> <= N the Cholesky factorization of the matrix could
+*> not be performed because the i-th principal minor
+*> was not positive definite.
+*> > N the SVD algorithm failed to converge;
+*> if INFO = N+i, i off-diagonal elements of the
+*> bidiagonal factor did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -13,80 +150,6 @@
DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DPTEQR computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric positive definite tridiagonal matrix by first factoring the
-* matrix using DPTTRF, and then calling DBDSQR to compute the singular
-* values of the bidiagonal factor.
-*
-* This routine computes the eigenvalues of the positive definite
-* tridiagonal matrix to high relative accuracy. This means that if the
-* eigenvalues range over many orders of magnitude in size, then the
-* small eigenvalues and corresponding eigenvectors will be computed
-* more accurately than, for example, with the standard QR method.
-*
-* The eigenvectors of a full or band symmetric positive definite matrix
-* can also be found if DSYTRD, DSPTRD, or DSBTRD has been used to
-* reduce this matrix to tridiagonal form. (The reduction to tridiagonal
-* form, however, may preclude the possibility of obtaining high
-* relative accuracy in the small eigenvalues of the original matrix, if
-* these eigenvalues range over many orders of magnitude.)
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'V': Compute eigenvectors of original symmetric
-* matrix also. Array Z contains the orthogonal
-* matrix used to reduce the original matrix to
-* tridiagonal form.
-* = 'I': Compute eigenvectors of tridiagonal matrix also.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal
-* matrix.
-* On normal exit, D contains the eigenvalues, in descending
-* order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the orthogonal matrix used in the
-* reduction to tridiagonal form.
-* On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
-* original symmetric matrix;
-* if COMPZ = 'I', the orthonormal eigenvectors of the
-* tridiagonal matrix.
-* If INFO > 0 on exit, Z contains the eigenvectors associated
-* with only the stored eigenvalues.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* COMPZ = 'V' or 'I', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is:
-* <= N the Cholesky factorization of the matrix could
-* not be performed because the i-th principal minor
-* was not positive definite.
-* > N the SVD algorithm failed to converge;
-* if INFO = N+i, i off-diagonal elements of the
-* bidiagonal factor did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dptrfs.f b/SRC/dptrfs.f
index 4bd65e99..24e3315b 100644
--- a/SRC/dptrfs.f
+++ b/SRC/dptrfs.f
@@ -1,10 +1,164 @@
+*> \brief \b DPTRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTRFS( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR,
+* BERR, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), DF( * ),
+* $ E( * ), EF( * ), FERR( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive definite
+*> and tridiagonal, and provides error bounds and backward error
+*> estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization computed by DPTTRF.
+*> \endverbatim
+*>
+*> \param[in] EF
+*> \verbatim
+*> EF is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal factor
+*> L from the factorization computed by DPTTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DPTTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPTRFS( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR,
$ BERR, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDB, LDX, N, NRHS
@@ -15,75 +169,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPTRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive definite
-* and tridiagonal, and provides error bounds and backward error
-* estimates for the solution.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* DF (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization computed by DPTTRF.
-*
-* EF (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal factor
-* L from the factorization computed by DPTTRF.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DPTTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dptsv.f b/SRC/dptsv.f
index a58f33ae..06615c64 100644
--- a/SRC/dptsv.f
+++ b/SRC/dptsv.f
@@ -1,9 +1,115 @@
+*> \brief \b DPTSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTSV( N, NRHS, D, E, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTSV computes the solution to a real system of linear equations
+*> A*X = B, where A is an N-by-N symmetric positive definite tridiagonal
+*> matrix, and X and B are N-by-NRHS matrices.
+*>
+*> A is factored as A = L*D*L**T, and the factored form of A is then
+*> used to solve the system of equations.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A. On exit, the n diagonal elements of the diagonal matrix
+*> D from the factorization A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A. On exit, the (n-1) subdiagonal elements of the
+*> unit bidiagonal factor L from the L*D*L**T factorization of
+*> A. (E can also be regarded as the superdiagonal of the unit
+*> bidiagonal factor U from the U**T*D*U factorization of A.)
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the solution has not been
+*> computed. The factorization has not been completed
+*> unless i = N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPTSV( N, NRHS, D, E, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDB, N, NRHS
@@ -12,53 +118,6 @@
DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* DPTSV computes the solution to a real system of linear equations
-* A*X = B, where A is an N-by-N symmetric positive definite tridiagonal
-* matrix, and X and B are N-by-NRHS matrices.
-*
-* A is factored as A = L*D*L**T, and the factored form of A is then
-* used to solve the system of equations.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A. On exit, the n diagonal elements of the diagonal matrix
-* D from the factorization A = L*D*L**T.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A. On exit, the (n-1) subdiagonal elements of the
-* unit bidiagonal factor L from the L*D*L**T factorization of
-* A. (E can also be regarded as the superdiagonal of the unit
-* bidiagonal factor U from the U**T*D*U factorization of A.)
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the solution has not been
-* computed. The factorization has not been completed
-* unless i = N.
-*
* =====================================================================
*
* .. External Subroutines ..
diff --git a/SRC/dptsvx.f b/SRC/dptsvx.f
index 54666784..3ae5589f 100644
--- a/SRC/dptsvx.f
+++ b/SRC/dptsvx.f
@@ -1,10 +1,226 @@
+*> \brief \b DPTSVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
+* RCOND, FERR, BERR, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), DF( * ),
+* $ E( * ), EF( * ), FERR( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTSVX uses the factorization A = L*D*L**T to compute the solution
+*> to a real system of linear equations A*X = B, where A is an N-by-N
+*> symmetric positive definite tridiagonal matrix and X and B are
+*> N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the matrix A is factored as A = L*D*L**T, where L
+*> is a unit lower bidiagonal matrix and D is diagonal. The
+*> factorization can also be regarded as having the form
+*> A = U**T*D*U.
+*>
+*> 2. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, DF and EF contain the factored form of A.
+*> D, E, DF, and EF will not be modified.
+*> = 'N': The matrix A will be copied to DF and EF and
+*> factored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] DF
+*> \verbatim
+*> DF is or output) DOUBLE PRECISION array, dimension (N)
+*> If FACT = 'F', then DF is an input argument and on entry
+*> contains the n diagonal elements of the diagonal matrix D
+*> from the L*D*L**T factorization of A.
+*> If FACT = 'N', then DF is an output argument and on exit
+*> contains the n diagonal elements of the diagonal matrix D
+*> from the L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] EF
+*> \verbatim
+*> EF is or output) DOUBLE PRECISION array, dimension (N-1)
+*> If FACT = 'F', then EF is an input argument and on entry
+*> contains the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the L*D*L**T factorization of A.
+*> If FACT = 'N', then EF is an output argument and on exit
+*> contains the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 of INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal condition number of the matrix A. If RCOND
+*> is less than the machine precision (in particular, if
+*> RCOND = 0), the matrix is singular to working precision.
+*> This condition is indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in any
+*> element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
$ RCOND, FERR, BERR, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT
@@ -17,131 +233,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPTSVX uses the factorization A = L*D*L**T to compute the solution
-* to a real system of linear equations A*X = B, where A is an N-by-N
-* symmetric positive definite tridiagonal matrix and X and B are
-* N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the matrix A is factored as A = L*D*L**T, where L
-* is a unit lower bidiagonal matrix and D is diagonal. The
-* factorization can also be regarded as having the form
-* A = U**T*D*U.
-*
-* 2. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, DF and EF contain the factored form of A.
-* D, E, DF, and EF will not be modified.
-* = 'N': The matrix A will be copied to DF and EF and
-* factored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* DF (input or output) DOUBLE PRECISION array, dimension (N)
-* If FACT = 'F', then DF is an input argument and on entry
-* contains the n diagonal elements of the diagonal matrix D
-* from the L*D*L**T factorization of A.
-* If FACT = 'N', then DF is an output argument and on exit
-* contains the n diagonal elements of the diagonal matrix D
-* from the L*D*L**T factorization of A.
-*
-* EF (input or output) DOUBLE PRECISION array, dimension (N-1)
-* If FACT = 'F', then EF is an input argument and on entry
-* contains the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the L*D*L**T factorization of A.
-* If FACT = 'N', then EF is an output argument and on exit
-* contains the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the L*D*L**T factorization of A.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 of INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal condition number of the matrix A. If RCOND
-* is less than the machine precision (in particular, if
-* RCOND = 0), the matrix is singular to working precision.
-* This condition is indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in any
-* element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpttrf.f b/SRC/dpttrf.f
index e30a7b76..4403df7c 100644
--- a/SRC/dpttrf.f
+++ b/SRC/dpttrf.f
@@ -1,9 +1,92 @@
+*> \brief \b DPTTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTTRF( N, D, E, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTTRF computes the L*D*L**T factorization of a real symmetric
+*> positive definite tridiagonal matrix A. The factorization may also
+*> be regarded as having the form A = U**T*D*U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A. On exit, the n diagonal elements of the diagonal matrix
+*> D from the L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A. On exit, the (n-1) subdiagonal elements of the
+*> unit bidiagonal factor L from the L*D*L**T factorization of A.
+*> E can also be regarded as the superdiagonal of the unit
+*> bidiagonal factor U from the U**T*D*U factorization of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite; if k < N, the factorization could not
+*> be completed, while if k = N, the factorization was
+*> completed, but D(N) <= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DPTTRF( N, D, E, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, N
@@ -12,39 +95,6 @@
DOUBLE PRECISION D( * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* DPTTRF computes the L*D*L**T factorization of a real symmetric
-* positive definite tridiagonal matrix A. The factorization may also
-* be regarded as having the form A = U**T*D*U.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A. On exit, the n diagonal elements of the diagonal matrix
-* D from the L*D*L**T factorization of A.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A. On exit, the (n-1) subdiagonal elements of the
-* unit bidiagonal factor L from the L*D*L**T factorization of A.
-* E can also be regarded as the superdiagonal of the unit
-* bidiagonal factor U from the U**T*D*U factorization of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite; if k < N, the factorization could not
-* be completed, while if k = N, the factorization was
-* completed, but D(N) <= 0.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dpttrs.f b/SRC/dpttrs.f
index e581f5e0..c0339785 100644
--- a/SRC/dpttrs.f
+++ b/SRC/dpttrs.f
@@ -1,58 +1,117 @@
- SUBROUTINE DPTTRS( N, NRHS, D, E, B, LDB, INFO )
+*> \brief \b DPTTRS
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTTRS( N, NRHS, D, E, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
+* ..
+*
* Purpose
* =======
*
-* DPTTRS solves a tridiagonal system of the form
-* A * X = B
-* using the L*D*L**T factorization of A computed by DPTTRF. D is a
-* diagonal matrix specified in the vector D, L is a unit bidiagonal
-* matrix whose subdiagonal is specified in the vector E, and X and B
-* are N by NRHS matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTTRS solves a tridiagonal system of the form
+*> A * X = B
+*> using the L*D*L**T factorization of A computed by DPTTRF. D is a
+*> diagonal matrix specified in the vector D, L is a unit bidiagonal
+*> matrix whose subdiagonal is specified in the vector E, and X and B
+*> are N by NRHS matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the tridiagonal matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal factor
+*> L from the L*D*L**T factorization of A. E can also be regarded
+*> as the superdiagonal of the unit bidiagonal factor U from the
+*> factorization A = U**T*D*U.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors B for the system of
+*> linear equations.
+*> On exit, the solution vectors, X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* L*D*L**T factorization of A.
+*> \date November 2011
*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal factor
-* L from the L*D*L**T factorization of A. E can also be regarded
-* as the superdiagonal of the unit bidiagonal factor U from the
-* factorization A = U**T*D*U.
+*> \ingroup doubleOTHERcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors B for the system of
-* linear equations.
-* On exit, the solution vectors, X.
+* =====================================================================
+ SUBROUTINE DPTTRS( N, NRHS, D, E, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dptts2.f b/SRC/dptts2.f
index cf77d1e2..2c0f80ef 100644
--- a/SRC/dptts2.f
+++ b/SRC/dptts2.f
@@ -1,54 +1,110 @@
- SUBROUTINE DPTTS2( N, NRHS, D, E, B, LDB )
+*> \brief \b DPTTS2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTTS2( N, NRHS, D, E, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
+* ..
+*
* Purpose
* =======
*
-* DPTTS2 solves a tridiagonal system of the form
-* A * X = B
-* using the L*D*L**T factorization of A computed by DPTTRF. D is a
-* diagonal matrix specified in the vector D, L is a unit bidiagonal
-* matrix whose subdiagonal is specified in the vector E, and X and B
-* are N by NRHS matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTTS2 solves a tridiagonal system of the form
+*> A * X = B
+*> using the L*D*L**T factorization of A computed by DPTTRF. D is a
+*> diagonal matrix specified in the vector D, L is a unit bidiagonal
+*> matrix whose subdiagonal is specified in the vector E, and X and B
+*> are N by NRHS matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the tridiagonal matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal factor
+*> L from the L*D*L**T factorization of A. E can also be regarded
+*> as the superdiagonal of the unit bidiagonal factor U from the
+*> factorization A = U**T*D*U.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors B for the system of
+*> linear equations.
+*> On exit, the solution vectors, X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \date November 2011
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* L*D*L**T factorization of A.
+*> \ingroup doubleOTHERcomputational
*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal factor
-* L from the L*D*L**T factorization of A. E can also be regarded
-* as the superdiagonal of the unit bidiagonal factor U from the
-* factorization A = U**T*D*U.
+* =====================================================================
+ SUBROUTINE DPTTS2( N, NRHS, D, E, B, LDB )
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors B for the system of
-* linear equations.
-* On exit, the solution vectors, X.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION B( LDB, * ), D( * ), E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/drscl.f b/SRC/drscl.f
index 5a9ed008..e24b3bee 100644
--- a/SRC/drscl.f
+++ b/SRC/drscl.f
@@ -1,9 +1,85 @@
+*> \brief \b DRSCL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DRSCL( N, SA, SX, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* DOUBLE PRECISION SA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION SX( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DRSCL multiplies an n-element real vector x by the real scalar 1/a.
+*> This is done without overflow or underflow as long as
+*> the final result x/a does not overflow or underflow.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of components of the vector x.
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*> SA is DOUBLE PRECISION
+*> The scalar a which is used to divide each component of x.
+*> SA must be >= 0, or the subroutine will divide by zero.
+*> \endverbatim
+*>
+*> \param[in,out] SX
+*> \verbatim
+*> SX is DOUBLE PRECISION array, dimension
+*> (1+(N-1)*abs(INCX))
+*> The n-element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of the vector SX.
+*> > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE DRSCL( N, SA, SX, INCX )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,31 +89,6 @@
DOUBLE PRECISION SX( * )
* ..
*
-* Purpose
-* =======
-*
-* DRSCL multiplies an n-element real vector x by the real scalar 1/a.
-* This is done without overflow or underflow as long as
-* the final result x/a does not overflow or underflow.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of components of the vector x.
-*
-* SA (input) DOUBLE PRECISION
-* The scalar a which is used to divide each component of x.
-* SA must be >= 0, or the subroutine will divide by zero.
-*
-* SX (input/output) DOUBLE PRECISION array, dimension
-* (1+(N-1)*abs(INCX))
-* The n-element vector x.
-*
-* INCX (input) INTEGER
-* The increment between successive values of the vector SX.
-* > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsbev.f b/SRC/dsbev.f
index 5375149b..5921acee 100644
--- a/SRC/dsbev.f
+++ b/SRC/dsbev.f
@@ -1,10 +1,148 @@
+*> \brief <b> DSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KD, LDAB, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBEV computes all the eigenvalues and, optionally, eigenvectors of
+*> a real symmetric band matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (max(1,3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -14,70 +152,6 @@
DOUBLE PRECISION AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSBEV computes all the eigenvalues and, optionally, eigenvectors of
-* a real symmetric band matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsbevd.f b/SRC/dsbevd.f
index 009d3ffb..e84120b1 100644
--- a/SRC/dsbevd.f
+++ b/SRC/dsbevd.f
@@ -1,10 +1,197 @@
+*> \brief <b> DSBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
+* LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KD, LDAB, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBEVD computes all the eigenvalues and, optionally, eigenvectors of
+*> a real symmetric band matrix A. If eigenvectors are desired, it uses
+*> a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> IF N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 2, LWORK must be at least 2*N.
+*> If JOBZ = 'V' and N > 2, LWORK must be at least
+*> ( 1 + 5*N + 2*N**2 ).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array LIWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 2, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
$ LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,107 +202,6 @@
DOUBLE PRECISION AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSBEVD computes all the eigenvalues and, optionally, eigenvectors of
-* a real symmetric band matrix A. If eigenvectors are desired, it uses
-* a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* IF N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 2, LWORK must be at least 2*N.
-* If JOBZ = 'V' and N > 2, LWORK must be at least
-* ( 1 + 5*N + 2*N**2 ).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array LIWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 2, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsbevx.f b/SRC/dsbevx.f
index 8aa1f1fb..dde28896 100644
--- a/SRC/dsbevx.f
+++ b/SRC/dsbevx.f
@@ -1,11 +1,264 @@
+*> \brief <b> DSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
+* VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
+* IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), Q( LDQ, * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric band matrix A. Eigenvalues and eigenvectors can
+*> be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, N)
+*> If JOBZ = 'V', the N-by-N orthogonal matrix used in the
+*> reduction to tridiagonal form.
+*> If JOBZ = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If JOBZ = 'V', then
+*> LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AB to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
$ VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
$ IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,144 +271,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSBEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric band matrix A. Eigenvalues and eigenvectors can
-* be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDQ, N)
-* If JOBZ = 'V', the N-by-N orthogonal matrix used in the
-* reduction to tridiagonal form.
-* If JOBZ = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If JOBZ = 'V', then
-* LDQ >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AB to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsbgst.f b/SRC/dsbgst.f
index 235b6b5e..53f76976 100644
--- a/SRC/dsbgst.f
+++ b/SRC/dsbgst.f
@@ -1,10 +1,161 @@
+*> \brief \b DSBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
+* LDX, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, VECT
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDX, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBGST reduces a real symmetric-definite banded generalized
+*> eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y,
+*> such that C has the same bandwidth as A.
+*>
+*> B must have been previously factorized as S**T*S by DPBSTF, using a
+*> split Cholesky factorization. A is overwritten by C = X**T*A*X, where
+*> X = S**(-1)*Q and Q is an orthogonal matrix chosen to preserve the
+*> bandwidth of A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'N': do not form the transformation matrix X;
+*> = 'V': form X.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the transformed matrix X**T*A*X, stored in the same
+*> format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in] BB
+*> \verbatim
+*> BB is DOUBLE PRECISION array, dimension (LDBB,N)
+*> The banded factor S from the split Cholesky factorization of
+*> B, as returned by DPBSTF, stored in the first KB+1 rows of
+*> the array.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,N)
+*> If VECT = 'V', the n-by-n matrix X.
+*> If VECT = 'N', the array X is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> LDX >= max(1,N) if VECT = 'V'; LDX >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DSBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
$ LDX, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO, VECT
@@ -15,76 +166,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DSBGST reduces a real symmetric-definite banded generalized
-* eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y,
-* such that C has the same bandwidth as A.
-*
-* B must have been previously factorized as S**T*S by DPBSTF, using a
-* split Cholesky factorization. A is overwritten by C = X**T*A*X, where
-* X = S**(-1)*Q and Q is an orthogonal matrix chosen to preserve the
-* bandwidth of A.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'N': do not form the transformation matrix X;
-* = 'V': form X.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= KB >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the transformed matrix X**T*A*X, stored in the same
-* format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input) DOUBLE PRECISION array, dimension (LDBB,N)
-* The banded factor S from the split Cholesky factorization of
-* B, as returned by DPBSTF, stored in the first KB+1 rows of
-* the array.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,N)
-* If VECT = 'V', the n-by-n matrix X.
-* If VECT = 'N', the array X is not referenced.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
-* LDX >= max(1,N) if VECT = 'V'; LDX >= 1 otherwise.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsbgv.f b/SRC/dsbgv.f
index 01c97e81..6a6235f6 100644
--- a/SRC/dsbgv.f
+++ b/SRC/dsbgv.f
@@ -1,10 +1,180 @@
+*> \brief \b DSBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
+* LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), BB( LDBB, * ), W( * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBGV computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
+*> and banded, and B is also positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is DOUBLE PRECISION array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**T*S, as returned by DPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so that Z**T*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: the algorithm failed to converge:
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then DPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
$ LDZ, WORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,91 +185,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSBGV computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
-* and banded, and B is also positive definite.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) DOUBLE PRECISION array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**T*S, as returned by DPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so that Z**T*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= N.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: the algorithm failed to converge:
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then DPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dsbgvd.f b/SRC/dsbgvd.f
index 8b7cb00b..ebeb94d6 100644
--- a/SRC/dsbgvd.f
+++ b/SRC/dsbgvd.f
@@ -1,10 +1,238 @@
+*> \brief \b DSBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
+* Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), BB( LDBB, * ), W( * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite banded eigenproblem, of the
+*> form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric and
+*> banded, and B is also positive definite. If eigenvectors are
+*> desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is DOUBLE PRECISION array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**T*S, as returned by DPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so Z**T*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= 3*N.
+*> If JOBZ = 'V' and N > 1, LWORK >= 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if LIWORK > 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: the algorithm failed to converge:
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then DPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
$ Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,132 +244,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSBGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite banded eigenproblem, of the
-* form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric and
-* banded, and B is also positive definite. If eigenvectors are
-* desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) DOUBLE PRECISION array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**T*S, as returned by DPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so Z**T*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= 3*N.
-* If JOBZ = 'V' and N > 1, LWORK >= 1 + 5*N + 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if LIWORK > 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: the algorithm failed to converge:
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then DPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsbgvx.f b/SRC/dsbgvx.f
index 07b3f745..0d010bb9 100644
--- a/SRC/dsbgvx.f
+++ b/SRC/dsbgvx.f
@@ -1,11 +1,293 @@
+*> \brief \b DSBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
+* LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
+* LDZ, WORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, KA, KB, LDAB, LDBB, LDQ, LDZ, M,
+* $ N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), BB( LDBB, * ), Q( LDQ, * ),
+* $ W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBGVX computes selected eigenvalues, and optionally, eigenvectors
+*> of a real generalized symmetric-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
+*> and banded, and B is also positive definite. Eigenvalues and
+*> eigenvectors can be selected by specifying either all eigenvalues,
+*> a range of values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is DOUBLE PRECISION array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**T*S, as returned by DPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, N)
+*> If JOBZ = 'V', the n-by-n matrix used in the reduction of
+*> A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x,
+*> and consequently C to tridiagonal form.
+*> If JOBZ = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If JOBZ = 'N',
+*> LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so Z**T*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (M)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvalues that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> < 0 : if INFO = -i, the i-th argument had an illegal value
+*> <= N: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in IFAIL.
+*> > N : DPBSTF returned an error code; i.e.,
+*> if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
$ LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
$ LDZ, WORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,158 +301,6 @@
$ W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSBGVX computes selected eigenvalues, and optionally, eigenvectors
-* of a real generalized symmetric-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
-* and banded, and B is also positive definite. Eigenvalues and
-* eigenvectors can be selected by specifying either all eigenvalues,
-* a range of values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) DOUBLE PRECISION array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**T*S, as returned by DPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDQ, N)
-* If JOBZ = 'V', the n-by-n matrix used in the reduction of
-* A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x,
-* and consequently C to tridiagonal form.
-* If JOBZ = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If JOBZ = 'N',
-* LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so Z**T*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (7*N)
-*
-* IWORK (workspace/output) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (M)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvalues that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* < 0 : if INFO = -i, the i-th argument had an illegal value
-* <= N: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in IFAIL.
-* > N : DPBSTF returned an error code; i.e.,
-* if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsbtrd.f b/SRC/dsbtrd.f
index e7a3a53d..853682e8 100644
--- a/SRC/dsbtrd.f
+++ b/SRC/dsbtrd.f
@@ -1,10 +1,167 @@
+*> \brief \b DSBTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, VECT
+* INTEGER INFO, KD, LDAB, LDQ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), D( * ), E( * ), Q( LDQ, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBTRD reduces a real symmetric band matrix A to symmetric
+*> tridiagonal form T by an orthogonal similarity transformation:
+*> Q**T * A * Q = T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'N': do not form Q;
+*> = 'V': form Q;
+*> = 'U': update a matrix X, by forming X*Q.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> On exit, the diagonal elements of AB are overwritten by the
+*> diagonal elements of the tridiagonal matrix T; if KD > 0, the
+*> elements on the first superdiagonal (if UPLO = 'U') or the
+*> first subdiagonal (if UPLO = 'L') are overwritten by the
+*> off-diagonal elements of T; the rest of AB is overwritten by
+*> values generated during the reduction.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, if VECT = 'U', then Q must contain an N-by-N
+*> matrix X; if VECT = 'N' or 'V', then Q need not be set.
+*> \endverbatim
+*> \verbatim
+*> On exit:
+*> if VECT = 'V', Q contains the N-by-N orthogonal matrix Q;
+*> if VECT = 'U', Q contains the product X*Q;
+*> if VECT = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by Linda Kaufman, Bell Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
$ WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO, VECT
@@ -15,80 +172,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSBTRD reduces a real symmetric band matrix A to symmetric
-* tridiagonal form T by an orthogonal similarity transformation:
-* Q**T * A * Q = T.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'N': do not form Q;
-* = 'V': form Q;
-* = 'U': update a matrix X, by forming X*Q.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* On exit, the diagonal elements of AB are overwritten by the
-* diagonal elements of the tridiagonal matrix T; if KD > 0, the
-* elements on the first superdiagonal (if UPLO = 'U') or the
-* first subdiagonal (if UPLO = 'L') are overwritten by the
-* off-diagonal elements of T; the rest of AB is overwritten by
-* values generated during the reduction.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T.
-*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, if VECT = 'U', then Q must contain an N-by-N
-* matrix X; if VECT = 'N' or 'V', then Q need not be set.
-*
-* On exit:
-* if VECT = 'V', Q contains the N-by-N orthogonal matrix Q;
-* if VECT = 'U', Q contains the product X*Q;
-* if VECT = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* Modified by Linda Kaufman, Bell Labs.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsfrk.f b/SRC/dsfrk.f
index d44bdc62..82900eef 100644
--- a/SRC/dsfrk.f
+++ b/SRC/dsfrk.f
@@ -1,110 +1,182 @@
- SUBROUTINE DSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
- $ C )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b DSFRK
*
-* -- Contributed by Julien Langou of the Univ. of Colorado Denver --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER K, LDA, N
- CHARACTER TRANS, TRANSR, UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), C( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
+* C )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER K, LDA, N
+* CHARACTER TRANS, TRANSR, UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), C( * )
+* ..
+*
* Purpose
* =======
*
-* Level 3 BLAS like routine for C in RFP Format.
-*
-* DSFRK performs one of the symmetric rank--k operations
-*
-* C := alpha*A*A**T + beta*C,
-*
-* or
-*
-* C := alpha*A**T*A + beta*C,
-*
-* where alpha and beta are real scalars, C is an n--by--n symmetric
-* matrix and A is an n--by--k matrix in the first case and a k--by--n
-* matrix in the second case.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Level 3 BLAS like routine for C in RFP Format.
+*>
+*> DSFRK performs one of the symmetric rank--k operations
+*>
+*> C := alpha*A*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*A + beta*C,
+*>
+*> where alpha and beta are real scalars, C is an n--by--n symmetric
+*> matrix and A is an n--by--k matrix in the first case and a k--by--n
+*> matrix in the second case.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal Form of RFP A is stored;
-* = 'T': The Transpose Form of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS (input) CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K (input) INTEGER
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with TRANS = 'T'
-* or 't', K specifies the number of rows of the matrix A. K
-* must be at least zero.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal Form of RFP A is stored;
+*> = 'T': The Transpose Form of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with TRANS = 'T'
+*> or 't', K specifies the number of rows of the matrix A. K
+*> must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,ka)
+*> where KA
+*> is K when TRANS = 'N' or 'n', and is N otherwise. Before
+*> entry with TRANS = 'N' or 'n', the leading N--by--K part of
+*> the array A must contain the matrix A, otherwise the leading
+*> K--by--N part of the array A must contain the matrix A.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> On entry, BETA specifies the scalar beta.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (NT)
+*> NT = N*(N+1)/2. On entry, the symmetric matrix C in RFP
+*> Format. RFP Format is described by TRANSR, UPLO and N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) DOUBLE PRECISION
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,ka)
-* where KA
-* is K when TRANS = 'N' or 'n', and is N otherwise. Before
-* entry with TRANS = 'N' or 'n', the leading N--by--K part of
-* the array A must contain the matrix A, otherwise the leading
-* K--by--N part of the array A must contain the matrix A.
-* Unchanged on exit.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
+*> \ingroup doubleOTHERcomputational
*
-* BETA (input) DOUBLE PRECISION
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
+* =====================================================================
+ SUBROUTINE DSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
+ $ C )
*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* C (input/output) DOUBLE PRECISION array, dimension (NT)
-* NT = N*(N+1)/2. On entry, the symmetric matrix C in RFP
-* Format. RFP Format is described by TRANSR, UPLO and N.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER K, LDA, N
+ CHARACTER TRANS, TRANSR, UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsgesv.f b/SRC/dsgesv.f
index a61c9344..f5b8c377 100644
--- a/SRC/dsgesv.f
+++ b/SRC/dsgesv.f
@@ -1,12 +1,197 @@
+*> \brief <b> DSGESV computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK,
+* SWORK, ITER, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, ITER, LDA, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL SWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( N, * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSGESV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> DSGESV first attempts to factorize the matrix in SINGLE PRECISION
+*> and use this factorization within an iterative refinement procedure
+*> to produce a solution with DOUBLE PRECISION normwise backward error
+*> quality (see below). If the approach fails the method switches to a
+*> DOUBLE PRECISION factorization and solve.
+*>
+*> The iterative refinement is not going to be a winning strategy if
+*> the ratio SINGLE PRECISION performance over DOUBLE PRECISION
+*> performance is too small. A reasonable strategy should take the
+*> number of right-hand sides and the size of the matrix into account.
+*> This might be done with a call to ILAENV in the future. Up to now, we
+*> always try iterative refinement.
+*>
+*> The iterative refinement process is stopped if
+*> ITER > ITERMAX
+*> or for all the RHS we have:
+*> RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
+*> where
+*> o ITER is the number of the current iteration in the iterative
+*> refinement process
+*> o RNRM is the infinity-norm of the residual
+*> o XNRM is the infinity-norm of the solution
+*> o ANRM is the infinity-operator-norm of the matrix A
+*> o EPS is the machine epsilon returned by DLAMCH('Epsilon')
+*> The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
+*> respectively.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array,
+*> dimension (LDA,N)
+*> On entry, the N-by-N coefficient matrix A.
+*> On exit, if iterative refinement has been successfully used
+*> (INFO.EQ.0 and ITER.GE.0, see description below), then A is
+*> unchanged, if double precision factorization has been used
+*> (INFO.EQ.0 and ITER.LT.0, see description below), then the
+*> array A contains the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> Corresponds either to the single precision factorization
+*> (if INFO.EQ.0 and ITER.GE.0) or the double precision
+*> factorization (if INFO.EQ.0 and ITER.LT.0).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N,NRHS)
+*> This array is used to hold the residual vectors.
+*> \endverbatim
+*>
+*> \param[out] SWORK
+*> \verbatim
+*> SWORK is REAL array, dimension (N*(N+NRHS))
+*> This array is used to use the single precision matrix and the
+*> right-hand sides or solutions in single precision.
+*> \endverbatim
+*>
+*> \param[out] ITER
+*> \verbatim
+*> ITER is INTEGER
+*> < 0: iterative refinement has failed, double precision
+*> factorization has been performed
+*> -1 : the routine fell back to full precision for
+*> implementation- or machine-specific reasons
+*> -2 : narrowing the precision induced an overflow,
+*> the routine fell back to full precision
+*> -3 : failure of SGETRF
+*> -31: stop the iterative refinement after the 30th
+*> iterations
+*> > 0: iterative refinement has been sucessfully used.
+*> Returns the number of iterations
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) computed in DOUBLE PRECISION is
+*> exactly zero. The factorization has been completed,
+*> but the factor U is exactly singular, so the solution
+*> could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleGEsolve
+*
+* =====================================================================
SUBROUTINE DSGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK,
$ SWORK, ITER, INFO )
*
-* -- LAPACK PROTOTYPE driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
-* ..
* .. Scalar Arguments ..
INTEGER INFO, ITER, LDA, LDB, LDX, N, NRHS
* ..
@@ -17,111 +202,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DSGESV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* DSGESV first attempts to factorize the matrix in SINGLE PRECISION
-* and use this factorization within an iterative refinement procedure
-* to produce a solution with DOUBLE PRECISION normwise backward error
-* quality (see below). If the approach fails the method switches to a
-* DOUBLE PRECISION factorization and solve.
-*
-* The iterative refinement is not going to be a winning strategy if
-* the ratio SINGLE PRECISION performance over DOUBLE PRECISION
-* performance is too small. A reasonable strategy should take the
-* number of right-hand sides and the size of the matrix into account.
-* This might be done with a call to ILAENV in the future. Up to now, we
-* always try iterative refinement.
-*
-* The iterative refinement process is stopped if
-* ITER > ITERMAX
-* or for all the RHS we have:
-* RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
-* where
-* o ITER is the number of the current iteration in the iterative
-* refinement process
-* o RNRM is the infinity-norm of the residual
-* o XNRM is the infinity-norm of the solution
-* o ANRM is the infinity-operator-norm of the matrix A
-* o EPS is the machine epsilon returned by DLAMCH('Epsilon')
-* The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
-* respectively.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array,
-* dimension (LDA,N)
-* On entry, the N-by-N coefficient matrix A.
-* On exit, if iterative refinement has been successfully used
-* (INFO.EQ.0 and ITER.GE.0, see description below), then A is
-* unchanged, if double precision factorization has been used
-* (INFO.EQ.0 and ITER.LT.0, see description below), then the
-* array A contains the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
-* Corresponds either to the single precision factorization
-* (if INFO.EQ.0 and ITER.GE.0) or the double precision
-* factorization (if INFO.EQ.0 and ITER.LT.0).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N,NRHS)
-* This array is used to hold the residual vectors.
-*
-* SWORK (workspace) REAL array, dimension (N*(N+NRHS))
-* This array is used to use the single precision matrix and the
-* right-hand sides or solutions in single precision.
-*
-* ITER (output) INTEGER
-* < 0: iterative refinement has failed, double precision
-* factorization has been performed
-* -1 : the routine fell back to full precision for
-* implementation- or machine-specific reasons
-* -2 : narrowing the precision induced an overflow,
-* the routine fell back to full precision
-* -3 : failure of SGETRF
-* -31: stop the iterative refinement after the 30th
-* iterations
-* > 0: iterative refinement has been sucessfully used.
-* Returns the number of iterations
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) computed in DOUBLE PRECISION is
-* exactly zero. The factorization has been completed,
-* but the factor U is exactly singular, so the solution
-* could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dspcon.f b/SRC/dspcon.f
index 1fab988e..61f5825b 100644
--- a/SRC/dspcon.f
+++ b/SRC/dspcon.f
@@ -1,12 +1,126 @@
+*> \brief \b DSPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric packed matrix A using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by DSPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSPTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,53 +132,6 @@
DOUBLE PRECISION AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSPCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric packed matrix A using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by DSPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSPTRF, stored as a
-* packed triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSPTRF.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dspev.f b/SRC/dspev.f
index 00c7e4b1..561068ea 100644
--- a/SRC/dspev.f
+++ b/SRC/dspev.f
@@ -1,9 +1,132 @@
+*> \brief <b> DSPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPEV computes all the eigenvalues and, optionally, eigenvectors of a
+*> real symmetric matrix A in packed storage.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -13,62 +136,6 @@
DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPEV computes all the eigenvalues and, optionally, eigenvectors of a
-* real symmetric matrix A in packed storage.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dspevd.f b/SRC/dspevd.f
index af7bfc9f..5640d69c 100644
--- a/SRC/dspevd.f
+++ b/SRC/dspevd.f
@@ -1,10 +1,183 @@
+*> \brief <b> DSPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
+* IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPEVD computes all the eigenvalues and, optionally, eigenvectors
+*> of a real symmetric matrix A in packed storage. If eigenvectors are
+*> desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the required LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least 2*N.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least
+*> 1 + 6*N + N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the required sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
$ IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,99 +188,6 @@
DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPEVD computes all the eigenvalues and, optionally, eigenvectors
-* of a real symmetric matrix A in packed storage. If eigenvectors are
-* desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the required LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least 2*N.
-* If JOBZ = 'V' and N > 1, LWORK must be at least
-* 1 + 6*N + N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the required sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dspevx.f b/SRC/dspevx.f
index ffe2d470..2903343c 100644
--- a/SRC/dspevx.f
+++ b/SRC/dspevx.f
@@ -1,11 +1,233 @@
+*> \brief <b> DSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDZ, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric matrix A in packed storage. Eigenvalues/vectors
+*> can be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AP to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the selected eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -17,126 +239,6 @@
DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric matrix A in packed storage. Eigenvalues/vectors
-* can be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AP to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the selected eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (8*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dspgst.f b/SRC/dspgst.f
index 6f9baa60..b3852991 100644
--- a/SRC/dspgst.f
+++ b/SRC/dspgst.f
@@ -1,65 +1,123 @@
- SUBROUTINE DSPGST( ITYPE, UPLO, N, AP, BP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), BP( * )
-* ..
-*
+*> \brief \b DSPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPGST( ITYPE, UPLO, N, AP, BP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), BP( * )
+* ..
+*
* Purpose
* =======
*
-* DSPGST reduces a real symmetric-definite generalized eigenproblem
-* to standard form, using packed storage.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
-*
-* B must have been previously factorized as U**T*U or L*L**T by DPPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPGST reduces a real symmetric-definite generalized eigenproblem
+*> to standard form, using packed storage.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
+*>
+*> B must have been previously factorized as U**T*U or L*L**T by DPPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
-* = 2 or 3: compute U*A*U**T or L**T*A*L.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
+*> = 2 or 3: compute U*A*U**T or L**T*A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored and B is factored as
+*> U**T*U;
+*> = 'L': Lower triangle of A is stored and B is factored as
+*> L*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] BP
+*> \verbatim
+*> BP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The triangular factor from the Cholesky factorization of B,
+*> stored in the same format as A, as returned by DPPTRF.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored and B is factored as
-* U**T*U;
-* = 'L': Lower triangle of A is stored and B is factored as
-* L*L**T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \date November 2011
*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \ingroup doubleOTHERcomputational
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+* =====================================================================
+ SUBROUTINE DSPGST( ITYPE, UPLO, N, AP, BP, INFO )
*
-* BP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The triangular factor from the Cholesky factorization of B,
-* stored in the same format as A, as returned by DPPTRF.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), BP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dspgv.f b/SRC/dspgv.f
index 4ac82b59..e64779dc 100644
--- a/SRC/dspgv.f
+++ b/SRC/dspgv.f
@@ -1,10 +1,164 @@
+*> \brief \b DSPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), BP( * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPGV computes all the eigenvalues and, optionally, the eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
+*> Here A and B are assumed to be symmetric, stored in packed format,
+*> and B is also positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension
+*> (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors. The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: DPPTRF or DSPEV returned an error code:
+*> <= N: if INFO = i, DSPEV failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero.
+*> > N: if INFO = n + i, for 1 <= i <= n, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,84 +169,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPGV computes all the eigenvalues and, optionally, the eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
-* Here A and B are assumed to be symmetric, stored in packed format,
-* and B is also positive definite.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension
-* (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T, in the same storage
-* format as B.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors. The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: DPPTRF or DSPEV returned an error code:
-* <= N: if INFO = i, DSPEV failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero.
-* > N: if INFO = n + i, for 1 <= i <= n, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dspgvd.f b/SRC/dspgvd.f
index b80255a9..b0f0abd9 100644
--- a/SRC/dspgvd.f
+++ b/SRC/dspgvd.f
@@ -1,10 +1,221 @@
+*> \brief \b DSPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
+* LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AP( * ), BP( * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be symmetric, stored in packed format, and B is also
+*> positive definite.
+*> If eigenvectors are desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors. The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the required LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= 2*N.
+*> If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the required sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: DPPTRF or DSPEVD returned an error code:
+*> <= N: if INFO = i, DSPEVD failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
$ LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,124 +227,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be symmetric, stored in packed format, and B is also
-* positive definite.
-* If eigenvectors are desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T, in the same storage
-* format as B.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors. The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the required LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= 2*N.
-* If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the required sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: DPPTRF or DSPEVD returned an error code:
-* <= N: if INFO = i, DSPEVD failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dspgvx.f b/SRC/dspgvx.f
index f30bd0dd..fca29089 100644
--- a/SRC/dspgvx.f
+++ b/SRC/dspgvx.f
@@ -1,11 +1,272 @@
+*> \brief \b DSPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
+* IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
+* IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, ITYPE, IU, LDZ, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION AP( * ), BP( * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPGVX computes selected eigenvalues, and optionally, eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A
+*> and B are assumed to be symmetric, stored in packed storage, and B
+*> is also positive definite. Eigenvalues and eigenvectors can be
+*> selected by specifying either a range of values or a range of indices
+*> for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A and B are stored;
+*> = 'L': Lower triangle of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix pencil (A,B). N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'N', then Z is not referenced.
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> \endverbatim
+*> \verbatim
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: DPPTRF or DSPEVX returned an error code:
+*> <= N: if INFO = i, DSPEVX failed to converge;
+*> i eigenvectors failed to converge. Their indices
+*> are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
$ IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
$ IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,152 +279,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPGVX computes selected eigenvalues, and optionally, eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A
-* and B are assumed to be symmetric, stored in packed storage, and B
-* is also positive definite. Eigenvalues and eigenvectors can be
-* selected by specifying either a range of values or a range of indices
-* for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A and B are stored;
-* = 'L': Lower triangle of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrix pencil (A,B). N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T, in the same storage
-* format as B.
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M))
-* If JOBZ = 'N', then Z is not referenced.
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-*
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (8*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: DPPTRF or DSPEVX returned an error code:
-* <= N: if INFO = i, DSPEVX failed to converge;
-* i eigenvectors failed to converge. Their indices
-* are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dsposv.f b/SRC/dsposv.f
index e3fe2b7d..1efc91fc 100644
--- a/SRC/dsposv.f
+++ b/SRC/dsposv.f
@@ -1,11 +1,201 @@
+*> \brief <b> DSPOSV computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK,
+* SWORK, ITER, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITER, LDA, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL SWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( N, * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPOSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> DSPOSV first attempts to factorize the matrix in SINGLE PRECISION
+*> and use this factorization within an iterative refinement procedure
+*> to produce a solution with DOUBLE PRECISION normwise backward error
+*> quality (see below). If the approach fails the method switches to a
+*> DOUBLE PRECISION factorization and solve.
+*>
+*> The iterative refinement is not going to be a winning strategy if
+*> the ratio SINGLE PRECISION performance over DOUBLE PRECISION
+*> performance is too small. A reasonable strategy should take the
+*> number of right-hand sides and the size of the matrix into account.
+*> This might be done with a call to ILAENV in the future. Up to now, we
+*> always try iterative refinement.
+*>
+*> The iterative refinement process is stopped if
+*> ITER > ITERMAX
+*> or for all the RHS we have:
+*> RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
+*> where
+*> o ITER is the number of the current iteration in the iterative
+*> refinement process
+*> o RNRM is the infinity-norm of the residual
+*> o XNRM is the infinity-norm of the solution
+*> o ANRM is the infinity-operator-norm of the matrix A
+*> o EPS is the machine epsilon returned by DLAMCH('Epsilon')
+*> The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
+*> respectively.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array,
+*> dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> On exit, if iterative refinement has been successfully used
+*> (INFO.EQ.0 and ITER.GE.0, see description below), then A is
+*> unchanged, if double precision factorization has been used
+*> (INFO.EQ.0 and ITER.LT.0, see description below), then the
+*> array A contains the factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N,NRHS)
+*> This array is used to hold the residual vectors.
+*> \endverbatim
+*>
+*> \param[out] SWORK
+*> \verbatim
+*> SWORK is REAL array, dimension (N*(N+NRHS))
+*> This array is used to use the single precision matrix and the
+*> right-hand sides or solutions in single precision.
+*> \endverbatim
+*>
+*> \param[out] ITER
+*> \verbatim
+*> ITER is INTEGER
+*> < 0: iterative refinement has failed, double precision
+*> factorization has been performed
+*> -1 : the routine fell back to full precision for
+*> implementation- or machine-specific reasons
+*> -2 : narrowing the precision induced an overflow,
+*> the routine fell back to full precision
+*> -3 : failure of SPOTRF
+*> -31: stop the iterative refinement after the 30th
+*> iterations
+*> > 0: iterative refinement has been sucessfully used.
+*> Returns the number of iterations
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of (DOUBLE
+*> PRECISION) A is not positive definite, so the
+*> factorization could not be completed, and the solution
+*> has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doublePOsolve
+*
+* =====================================================================
SUBROUTINE DSPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK,
$ SWORK, ITER, INFO )
*
-* -- LAPACK PROTOTYPE driver routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER INFO, ITER, LDA, LDB, LDX, N, NRHS
@@ -16,116 +206,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPOSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* DSPOSV first attempts to factorize the matrix in SINGLE PRECISION
-* and use this factorization within an iterative refinement procedure
-* to produce a solution with DOUBLE PRECISION normwise backward error
-* quality (see below). If the approach fails the method switches to a
-* DOUBLE PRECISION factorization and solve.
-*
-* The iterative refinement is not going to be a winning strategy if
-* the ratio SINGLE PRECISION performance over DOUBLE PRECISION
-* performance is too small. A reasonable strategy should take the
-* number of right-hand sides and the size of the matrix into account.
-* This might be done with a call to ILAENV in the future. Up to now, we
-* always try iterative refinement.
-*
-* The iterative refinement process is stopped if
-* ITER > ITERMAX
-* or for all the RHS we have:
-* RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
-* where
-* o ITER is the number of the current iteration in the iterative
-* refinement process
-* o RNRM is the infinity-norm of the residual
-* o XNRM is the infinity-norm of the solution
-* o ANRM is the infinity-operator-norm of the matrix A
-* o EPS is the machine epsilon returned by DLAMCH('Epsilon')
-* The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
-* respectively.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array,
-* dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if iterative refinement has been successfully used
-* (INFO.EQ.0 and ITER.GE.0, see description below), then A is
-* unchanged, if double precision factorization has been used
-* (INFO.EQ.0 and ITER.LT.0, see description below), then the
-* array A contains the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N,NRHS)
-* This array is used to hold the residual vectors.
-*
-* SWORK (workspace) REAL array, dimension (N*(N+NRHS))
-* This array is used to use the single precision matrix and the
-* right-hand sides or solutions in single precision.
-*
-* ITER (output) INTEGER
-* < 0: iterative refinement has failed, double precision
-* factorization has been performed
-* -1 : the routine fell back to full precision for
-* implementation- or machine-specific reasons
-* -2 : narrowing the precision induced an overflow,
-* the routine fell back to full precision
-* -3 : failure of SPOTRF
-* -31: stop the iterative refinement after the 30th
-* iterations
-* > 0: iterative refinement has been sucessfully used.
-* Returns the number of iterations
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of (DOUBLE
-* PRECISION) A is not positive definite, so the
-* factorization could not be completed, and the solution
-* has not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsprfs.f b/SRC/dsprfs.f
index 1eefde58..8eec5a23 100644
--- a/SRC/dsprfs.f
+++ b/SRC/dsprfs.f
@@ -1,12 +1,180 @@
+*> \brief \b DSPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
+* FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A. AFP contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or
+*> A = L*D*L**T as computed by DSPTRF, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DSPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
$ FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,87 +186,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The factored form of the matrix A. AFP contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or
-* A = L*D*L**T as computed by DSPTRF, stored as a packed
-* triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSPTRF.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DSPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dspsv.f b/SRC/dspsv.f
index 69f642c1..8ef11004 100644
--- a/SRC/dspsv.f
+++ b/SRC/dspsv.f
@@ -1,105 +1,175 @@
- SUBROUTINE DSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> DSPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DSPSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric matrix stored in packed format and X
-* and B are N-by-NRHS matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, D is symmetric and block diagonal with 1-by-1
-* and 2-by-2 diagonal blocks. The factored form of A is then used to
-* solve the system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric matrix stored in packed format and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, D is symmetric and block diagonal with 1-by-1
+*> and 2-by-2 diagonal blocks. The factored form of A is then used to
+*> solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by DSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by DSPTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be
-* computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by DSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by DSPTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Further Details
-* ===============
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
+*> \ingroup doubleOTHERsolve
*
-* Two-dimensional storage of the symmetric matrix A:
*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dspsvx.f b/SRC/dspsvx.f
index 413e486a..bcc8da8f 100644
--- a/SRC/dspsvx.f
+++ b/SRC/dspsvx.f
@@ -1,10 +1,279 @@
+*> \brief <b> DSPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
+* LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPSVX uses the diagonal pivoting factorization A = U*D*U**T or
+*> A = L*D*L**T to compute the solution to a real system of linear
+*> equations A * X = B, where A is an N-by-N symmetric matrix stored
+*> in packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AFP and IPIV contain the factored form of
+*> A. AP, AFP and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) DOUBLE PRECISION array, dimension
+*> (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by DSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by DSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by DSPTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by DSPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
$ LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -17,174 +286,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DSPSVX uses the diagonal pivoting factorization A = U*D*U**T or
-* A = L*D*L**T to compute the solution to a real system of linear
-* equations A * X = B, where A is an N-by-N symmetric matrix stored
-* in packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AFP and IPIV contain the factored form of
-* A. AP, AFP and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* AFP (input or output) DOUBLE PRECISION array, dimension
-* (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by DSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by DSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by DSPTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by DSPTRF.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsptrd.f b/SRC/dsptrd.f
index 8fcceedc..33189f9c 100644
--- a/SRC/dsptrd.f
+++ b/SRC/dsptrd.f
@@ -1,96 +1,131 @@
- SUBROUTINE DSPTRD( UPLO, N, AP, D, E, TAU, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), D( * ), E( * ), TAU( * )
-* ..
-*
+*> \brief \b DSPTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPTRD( UPLO, N, AP, D, E, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), D( * ), E( * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* DSPTRD reduces a real symmetric matrix A stored in packed form to
-* symmetric tridiagonal form T by an orthogonal similarity
-* transformation: Q**T * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPTRD reduces a real symmetric matrix A stored in packed form to
+*> symmetric tridiagonal form T by an orthogonal similarity
+*> transformation: Q**T * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the orthogonal
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the orthogonal matrix Q as a product
-* of elementary reflectors. See Further Details.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \date November 2011
*
-* TAU (output) DOUBLE PRECISION array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> D (output) DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
+*> overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
+*> overwriting A(i+2:n,i), and tau is stored in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSPTRD( UPLO, N, AP, D, E, TAU, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
-* overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
-* overwriting A(i+2:n,i), and tau is stored in TAU(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), D( * ), E( * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsptrf.f b/SRC/dsptrf.f
index 85493f46..c26701a7 100644
--- a/SRC/dsptrf.f
+++ b/SRC/dsptrf.f
@@ -1,9 +1,161 @@
+*> \brief \b DSPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPTRF( UPLO, N, AP, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPTRF computes the factorization of a real symmetric matrix A stored
+*> in packed format using the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L, stored as a packed triangular
+*> matrix overwriting A (see below for further details).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSPTRF( UPLO, N, AP, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,97 +166,6 @@
DOUBLE PRECISION AP( * )
* ..
*
-* Purpose
-* =======
-*
-* DSPTRF computes the factorization of a real symmetric matrix A stored
-* in packed format using the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L, stored as a packed triangular
-* matrix overwriting A (see below for further details).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsptri.f b/SRC/dsptri.f
index 8ce906ca..6c20c87c 100644
--- a/SRC/dsptri.f
+++ b/SRC/dsptri.f
@@ -1,9 +1,111 @@
+*> \brief \b DSPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPTRI computes the inverse of a real symmetric indefinite matrix
+*> A in packed storage using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by DSPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by DSPTRF,
+*> stored as a packed triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix, stored as a packed triangular matrix. The j-th column
+*> of inv(A) is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSPTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,49 +116,6 @@
DOUBLE PRECISION AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSPTRI computes the inverse of a real symmetric indefinite matrix
-* A in packed storage using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by DSPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by DSPTRF,
-* stored as a packed triangular matrix.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix, stored as a packed triangular matrix. The j-th column
-* of inv(A) is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSPTRF.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsptrs.f b/SRC/dsptrs.f
index 49dfa5a9..a36efaeb 100644
--- a/SRC/dsptrs.f
+++ b/SRC/dsptrs.f
@@ -1,61 +1,125 @@
- SUBROUTINE DSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b DSPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DSPTRS solves a system of linear equations A*X = B with a real
-* symmetric matrix A stored in packed format using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by DSPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPTRS solves a system of linear equations A*X = B with a real
+*> symmetric matrix A stored in packed format using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by DSPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSPTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSPTRF, stored as a
-* packed triangular matrix.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSPTRF.
+*> \ingroup doubleOTHERcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE DSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dstebz.f b/SRC/dstebz.f
index 6b8e059b..4de7be05 100644
--- a/SRC/dstebz.f
+++ b/SRC/dstebz.f
@@ -1,12 +1,262 @@
+*> \brief \b DSTEBZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEBZ( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E,
+* M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER ORDER, RANGE
+* INTEGER IL, INFO, IU, M, N, NSPLIT
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEBZ computes the eigenvalues of a symmetric tridiagonal
+*> matrix T. The user may ask for all eigenvalues, all eigenvalues
+*> in the half-open interval (VL, VU], or the IL-th through IU-th
+*> eigenvalues.
+*>
+*> To avoid overflow, the matrix must be scaled so that its
+*> largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest
+*> accuracy, it should not be much smaller than that.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': ("All") all eigenvalues will be found.
+*> = 'V': ("Value") all eigenvalues in the half-open interval
+*> (VL, VU] will be found.
+*> = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
+*> entire matrix) will be found.
+*> \endverbatim
+*>
+*> \param[in] ORDER
+*> \verbatim
+*> ORDER is CHARACTER*1
+*> = 'B': ("By Block") the eigenvalues will be grouped by
+*> split-off block (see IBLOCK, ISPLIT) and
+*> ordered from smallest to largest within
+*> the block.
+*> = 'E': ("Entire matrix")
+*> the eigenvalues for the entire matrix
+*> will be ordered from smallest to
+*> largest.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. Eigenvalues less than or equal
+*> to VL, or greater than VU, will not be returned. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute tolerance for the eigenvalues. An eigenvalue
+*> (or cluster) is considered to be located if it has been
+*> determined to lie in an interval whose width is ABSTOL or
+*> less. If ABSTOL is less than or equal to zero, then ULP*|T|
+*> will be used, where |T| means the 1-norm of T.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The actual number of eigenvalues found. 0 <= M <= N.
+*> (See also the description of INFO=2,3.)
+*> \endverbatim
+*>
+*> \param[out] NSPLIT
+*> \verbatim
+*> NSPLIT is INTEGER
+*> The number of diagonal blocks in the matrix T.
+*> 1 <= NSPLIT <= N.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On exit, the first M elements of W will contain the
+*> eigenvalues. (DSTEBZ may use the remaining N-M elements as
+*> workspace.)
+*> \endverbatim
+*>
+*> \param[out] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> At each row/column j where E(j) is zero or small, the
+*> matrix T is considered to split into a block diagonal
+*> matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which
+*> block (from 1 to the number of blocks) the eigenvalue W(i)
+*> belongs. (DSTEBZ may use the remaining N-M elements as
+*> workspace.)
+*> \endverbatim
+*>
+*> \param[out] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into submatrices.
+*> The first submatrix consists of rows/columns 1 to ISPLIT(1),
+*> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
+*> etc., and the NSPLIT-th consists of rows/columns
+*> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> (Only the first NSPLIT elements will actually be used, but
+*> since the user cannot know a priori what value NSPLIT will
+*> have, N words must be reserved for ISPLIT.)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: some or all of the eigenvalues failed to converge or
+*> were not computed:
+*> =1 or 3: Bisection failed to converge for some
+*> eigenvalues; these eigenvalues are flagged by a
+*> negative block number. The effect is that the
+*> eigenvalues may not be as accurate as the
+*> absolute and relative tolerances. This is
+*> generally caused by unexpectedly inaccurate
+*> arithmetic.
+*> =2 or 3: RANGE='I' only: Not all of the eigenvalues
+*> IL:IU were found.
+*> Effect: M < IU+1-IL
+*> Cause: non-monotonic arithmetic, causing the
+*> Sturm sequence to be non-monotonic.
+*> Cure: recalculate, using RANGE='A', and pick
+*> out eigenvalues IL:IU. In some cases,
+*> increasing the PARAMETER "FUDGE" may
+*> make things work.
+*> = 4: RANGE='I', and the Gershgorin interval
+*> initially used was too small. No eigenvalues
+*> were computed.
+*> Probable cause: your machine has sloppy
+*> floating-point arithmetic.
+*> Cure: Increase the PARAMETER "FUDGE",
+*> recompile, and try again.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> RELFAC DOUBLE PRECISION, default = 2.0e0
+*> The relative tolerance. An interval (a,b] lies within
+*> "relative tolerance" if b-a < RELFAC*ulp*max(|a|,|b|),
+*> where "ulp" is the machine precision (distance from 1 to
+*> the next larger floating point number.)
+*> \endverbatim
+*> \verbatim
+*> FUDGE DOUBLE PRECISION, default = 2
+*> A "fudge factor" to widen the Gershgorin intervals. Ideally,
+*> a value of 1 should work, but on machines with sloppy
+*> arithmetic, this needs to be larger. The default for
+*> publicly released versions should be large enough to handle
+*> the worst machine around. Note that this has no effect
+*> on accuracy of the solution.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DSTEBZ( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E,
$ M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* 8-18-00: Increase FUDGE factor for T3E (eca)
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER ORDER, RANGE
@@ -18,157 +268,6 @@
DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEBZ computes the eigenvalues of a symmetric tridiagonal
-* matrix T. The user may ask for all eigenvalues, all eigenvalues
-* in the half-open interval (VL, VU], or the IL-th through IU-th
-* eigenvalues.
-*
-* To avoid overflow, the matrix must be scaled so that its
-* largest element is no greater than overflow**(1/2) *
-* underflow**(1/4) in absolute value, and for greatest
-* accuracy, it should not be much smaller than that.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966.
-*
-* Arguments
-* =========
-*
-* RANGE (input) CHARACTER*1
-* = 'A': ("All") all eigenvalues will be found.
-* = 'V': ("Value") all eigenvalues in the half-open interval
-* (VL, VU] will be found.
-* = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
-* entire matrix) will be found.
-*
-* ORDER (input) CHARACTER*1
-* = 'B': ("By Block") the eigenvalues will be grouped by
-* split-off block (see IBLOCK, ISPLIT) and
-* ordered from smallest to largest within
-* the block.
-* = 'E': ("Entire matrix")
-* the eigenvalues for the entire matrix
-* will be ordered from smallest to
-* largest.
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix T. N >= 0.
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. Eigenvalues less than or equal
-* to VL, or greater than VU, will not be returned. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute tolerance for the eigenvalues. An eigenvalue
-* (or cluster) is considered to be located if it has been
-* determined to lie in an interval whose width is ABSTOL or
-* less. If ABSTOL is less than or equal to zero, then ULP*|T|
-* will be used, where |T| means the 1-norm of T.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) off-diagonal elements of the tridiagonal matrix T.
-*
-* M (output) INTEGER
-* The actual number of eigenvalues found. 0 <= M <= N.
-* (See also the description of INFO=2,3.)
-*
-* NSPLIT (output) INTEGER
-* The number of diagonal blocks in the matrix T.
-* 1 <= NSPLIT <= N.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* On exit, the first M elements of W will contain the
-* eigenvalues. (DSTEBZ may use the remaining N-M elements as
-* workspace.)
-*
-* IBLOCK (output) INTEGER array, dimension (N)
-* At each row/column j where E(j) is zero or small, the
-* matrix T is considered to split into a block diagonal
-* matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which
-* block (from 1 to the number of blocks) the eigenvalue W(i)
-* belongs. (DSTEBZ may use the remaining N-M elements as
-* workspace.)
-*
-* ISPLIT (output) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into submatrices.
-* The first submatrix consists of rows/columns 1 to ISPLIT(1),
-* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
-* etc., and the NSPLIT-th consists of rows/columns
-* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
-* (Only the first NSPLIT elements will actually be used, but
-* since the user cannot know a priori what value NSPLIT will
-* have, N words must be reserved for ISPLIT.)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: some or all of the eigenvalues failed to converge or
-* were not computed:
-* =1 or 3: Bisection failed to converge for some
-* eigenvalues; these eigenvalues are flagged by a
-* negative block number. The effect is that the
-* eigenvalues may not be as accurate as the
-* absolute and relative tolerances. This is
-* generally caused by unexpectedly inaccurate
-* arithmetic.
-* =2 or 3: RANGE='I' only: Not all of the eigenvalues
-* IL:IU were found.
-* Effect: M < IU+1-IL
-* Cause: non-monotonic arithmetic, causing the
-* Sturm sequence to be non-monotonic.
-* Cure: recalculate, using RANGE='A', and pick
-* out eigenvalues IL:IU. In some cases,
-* increasing the PARAMETER "FUDGE" may
-* make things work.
-* = 4: RANGE='I', and the Gershgorin interval
-* initially used was too small. No eigenvalues
-* were computed.
-* Probable cause: your machine has sloppy
-* floating-point arithmetic.
-* Cure: Increase the PARAMETER "FUDGE",
-* recompile, and try again.
-*
-* Internal Parameters
-* ===================
-*
-* RELFAC DOUBLE PRECISION, default = 2.0e0
-* The relative tolerance. An interval (a,b] lies within
-* "relative tolerance" if b-a < RELFAC*ulp*max(|a|,|b|),
-* where "ulp" is the machine precision (distance from 1 to
-* the next larger floating point number.)
-*
-* FUDGE DOUBLE PRECISION, default = 2
-* A "fudge factor" to widen the Gershgorin intervals. Ideally,
-* a value of 1 should work, but on machines with sloppy
-* arithmetic, this needs to be larger. The default for
-* publicly released versions should be large enough to handle
-* the worst machine around. Note that this has no effect
-* on accuracy of the solution.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dstedc.f b/SRC/dstedc.f
index d46c9980..52707d4f 100644
--- a/SRC/dstedc.f
+++ b/SRC/dstedc.f
@@ -1,10 +1,198 @@
+*> \brief \b DSTEBZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEDC computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the divide and conquer method.
+*> The eigenvectors of a full or band real symmetric matrix can also be
+*> found if DSYTRD or DSPTRD or DSBTRD has been used to reduce this
+*> matrix to tridiagonal form.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none. See DLAED3 for details.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'I': Compute eigenvectors of tridiagonal matrix also.
+*> = 'V': Compute eigenvectors of original dense symmetric
+*> matrix also. On entry, Z contains the orthogonal
+*> matrix used to reduce the original matrix to
+*> tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the subdiagonal elements of the tridiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,N)
+*> On entry, if COMPZ = 'V', then Z contains the orthogonal
+*> matrix used in the reduction to tridiagonal form.
+*> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*> orthonormal eigenvectors of the original symmetric matrix,
+*> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*> of the symmetric tridiagonal matrix.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If COMPZ = 'N' or N <= 1 then LWORK must be at least 1.
+*> If COMPZ = 'V' and N > 1 then LWORK must be at least
+*> ( 1 + 3*N + 2*N*lg N + 4*N**2 ),
+*> where lg( N ) = smallest integer k such
+*> that 2**k >= N.
+*> If COMPZ = 'I' and N > 1 then LWORK must be at least
+*> ( 1 + 4*N + N**2 ).
+*> Note that for COMPZ = 'I' or 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LWORK need
+*> only be max(1,2*(N-1)).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If COMPZ = 'N' or N <= 1 then LIWORK must be at least 1.
+*> If COMPZ = 'V' and N > 1 then LIWORK must be at least
+*> ( 6 + 6*N + 5*N*lg N ).
+*> If COMPZ = 'I' and N > 1 then LIWORK must be at least
+*> ( 3 + 5*N ).
+*> Note that for COMPZ = 'I' or 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LIWORK
+*> need only be 1.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute an eigenvalue while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -15,113 +203,6 @@
DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEDC computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric tridiagonal matrix using the divide and conquer method.
-* The eigenvectors of a full or band real symmetric matrix can also be
-* found if DSYTRD or DSPTRD or DSBTRD has been used to reduce this
-* matrix to tridiagonal form.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none. See DLAED3 for details.
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'I': Compute eigenvectors of tridiagonal matrix also.
-* = 'V': Compute eigenvectors of original dense symmetric
-* matrix also. On entry, Z contains the orthogonal
-* matrix used to reduce the original matrix to
-* tridiagonal form.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the subdiagonal elements of the tridiagonal matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
-* On entry, if COMPZ = 'V', then Z contains the orthogonal
-* matrix used in the reduction to tridiagonal form.
-* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-* orthonormal eigenvectors of the original symmetric matrix,
-* and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-* of the symmetric tridiagonal matrix.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If eigenvectors are desired, then LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If COMPZ = 'N' or N <= 1 then LWORK must be at least 1.
-* If COMPZ = 'V' and N > 1 then LWORK must be at least
-* ( 1 + 3*N + 2*N*lg N + 4*N**2 ),
-* where lg( N ) = smallest integer k such
-* that 2**k >= N.
-* If COMPZ = 'I' and N > 1 then LWORK must be at least
-* ( 1 + 4*N + N**2 ).
-* Note that for COMPZ = 'I' or 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LWORK need
-* only be max(1,2*(N-1)).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If COMPZ = 'N' or N <= 1 then LIWORK must be at least 1.
-* If COMPZ = 'V' and N > 1 then LIWORK must be at least
-* ( 6 + 6*N + 5*N*lg N ).
-* If COMPZ = 'I' and N > 1 then LIWORK must be at least
-* ( 3 + 5*N ).
-* Note that for COMPZ = 'I' or 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LIWORK
-* need only be 1.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute an eigenvalue while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dstegr.f b/SRC/dstegr.f
index c5173971..7b15c98e 100644
--- a/SRC/dstegr.f
+++ b/SRC/dstegr.f
@@ -1,14 +1,259 @@
+*> \brief \b DSTEGR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
+* DOUBLE PRECISION Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEGR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
+*> a well defined set of pairwise different real eigenvalues, the corresponding
+*> real eigenvectors are pairwise orthogonal.
+*>
+*> The spectrum may be computed either completely or partially by specifying
+*> either an interval (VL,VU] or a range of indices IL:IU for the desired
+*> eigenvalues.
+*>
+*> DSTEGR is a compatability wrapper around the improved DSTEMR routine.
+*> See DSTEMR for further details.
+*>
+*> One important change is that the ABSTOL parameter no longer provides any
+*> benefit and hence is no longer used.
+*>
+*> Note : DSTEGR and DSTEMR work only on machines which follow
+*> IEEE-754 floating-point standard in their handling of infinities and
+*> NaNs. Normal execution may create these exceptiona values and hence
+*> may abort due to a floating point exception in environments which
+*> do not conform to the IEEE-754 standard.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal matrix
+*> T. On exit, D is overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the tridiagonal
+*> matrix T in elements 1 to N-1 of E. E(N) need not be set on
+*> input, but is used internally as workspace.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> Unused. Was the absolute error tolerance for the
+*> eigenvalues/eigenvectors in previous versions.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix T
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> Supplying N columns is always safe.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th computed eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ). This is relevant in the case when the matrix
+*> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal
+*> (and minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,18*N)
+*> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N)
+*> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
+*> if only the eigenvalues are to be computed.
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = 1X, internal error in DLARRE,
+*> if INFO = 2X, internal error in DLARRV.
+*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
+*> the nonzero error code returned by DLARRE or
+*> DLARRV, respectively.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
-
- IMPLICIT NONE
-*
*
* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -21,145 +266,6 @@
DOUBLE PRECISION Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEGR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
-* a well defined set of pairwise different real eigenvalues, the corresponding
-* real eigenvectors are pairwise orthogonal.
-*
-* The spectrum may be computed either completely or partially by specifying
-* either an interval (VL,VU] or a range of indices IL:IU for the desired
-* eigenvalues.
-*
-* DSTEGR is a compatability wrapper around the improved DSTEMR routine.
-* See DSTEMR for further details.
-*
-* One important change is that the ABSTOL parameter no longer provides any
-* benefit and hence is no longer used.
-*
-* Note : DSTEGR and DSTEMR work only on machines which follow
-* IEEE-754 floating-point standard in their handling of infinities and
-* NaNs. Normal execution may create these exceptiona values and hence
-* may abort due to a floating point exception in environments which
-* do not conform to the IEEE-754 standard.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal matrix
-* T. On exit, D is overwritten.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the tridiagonal
-* matrix T in elements 1 to N-1 of E. E(N) need not be set on
-* input, but is used internally as workspace.
-* On exit, E is overwritten.
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* Unused. Was the absolute error tolerance for the
-* eigenvalues/eigenvectors in previous versions.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix T
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-* Supplying N columns is always safe.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', then LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th computed eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ). This is relevant in the case when the matrix
-* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal
-* (and minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,18*N)
-* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (LIWORK)
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N)
-* if the eigenvectors are desired, and LIWORK >= max(1,8*N)
-* if only the eigenvalues are to be computed.
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* On exit, INFO
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = 1X, internal error in DLARRE,
-* if INFO = 2X, internal error in DLARRV.
-* Here, the digit X = ABS( IINFO ) < 10, where IINFO is
-* the nonzero error code returned by DLARRE or
-* DLARRV, respectively.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dstein.f b/SRC/dstein.f
index d342f66f..2c7cf8ea 100644
--- a/SRC/dstein.f
+++ b/SRC/dstein.f
@@ -1,10 +1,176 @@
+*> \brief \b DSTEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), IFAIL( * ), ISPLIT( * ),
+* $ IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEIN computes the eigenvectors of a real symmetric tridiagonal
+*> matrix T corresponding to specified eigenvalues, using inverse
+*> iteration.
+*>
+*> The maximum number of iterations allowed for each eigenvector is
+*> specified by an internal parameter MAXITS (currently set to 5).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix
+*> T, in elements 1 to N-1.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenvectors to be found. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements of W contain the eigenvalues for
+*> which eigenvectors are to be computed. The eigenvalues
+*> should be grouped by split-off block and ordered from
+*> smallest to largest within the block. ( The output array
+*> W from DSTEBZ with ORDER = 'B' is expected here. )
+*> \endverbatim
+*>
+*> \param[in] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The submatrix indices associated with the corresponding
+*> eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to
+*> the first submatrix from the top, =2 if W(i) belongs to
+*> the second submatrix, etc. ( The output array IBLOCK
+*> from DSTEBZ is expected here. )
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into submatrices.
+*> The first submatrix consists of rows/columns 1 to
+*> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
+*> through ISPLIT( 2 ), etc.
+*> ( The output array ISPLIT from DSTEBZ is expected here. )
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, M)
+*> The computed eigenvectors. The eigenvector associated
+*> with the eigenvalue W(i) is stored in the i-th column of
+*> Z. Any vector which fails to converge is set to its current
+*> iterate after MAXITS iterations.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (M)
+*> On normal exit, all elements of IFAIL are zero.
+*> If one or more eigenvectors fail to converge after
+*> MAXITS iterations, then their indices are stored in
+*> array IFAIL.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge
+*> in MAXITS iterations. Their indices are stored in
+*> array IFAIL.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> MAXITS INTEGER, default = 5
+*> The maximum number of iterations performed.
+*> \endverbatim
+*> \verbatim
+*> EXTRA INTEGER, default = 2
+*> The number of iterations performed after norm growth
+*> criterion is satisfied, should be at least 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDZ, M, N
@@ -15,89 +181,6 @@
DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEIN computes the eigenvectors of a real symmetric tridiagonal
-* matrix T corresponding to specified eigenvalues, using inverse
-* iteration.
-*
-* The maximum number of iterations allowed for each eigenvector is
-* specified by an internal parameter MAXITS (currently set to 5).
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix
-* T, in elements 1 to N-1.
-*
-* M (input) INTEGER
-* The number of eigenvectors to be found. 0 <= M <= N.
-*
-* W (input) DOUBLE PRECISION array, dimension (N)
-* The first M elements of W contain the eigenvalues for
-* which eigenvectors are to be computed. The eigenvalues
-* should be grouped by split-off block and ordered from
-* smallest to largest within the block. ( The output array
-* W from DSTEBZ with ORDER = 'B' is expected here. )
-*
-* IBLOCK (input) INTEGER array, dimension (N)
-* The submatrix indices associated with the corresponding
-* eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to
-* the first submatrix from the top, =2 if W(i) belongs to
-* the second submatrix, etc. ( The output array IBLOCK
-* from DSTEBZ is expected here. )
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into submatrices.
-* The first submatrix consists of rows/columns 1 to
-* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
-* through ISPLIT( 2 ), etc.
-* ( The output array ISPLIT from DSTEBZ is expected here. )
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, M)
-* The computed eigenvectors. The eigenvector associated
-* with the eigenvalue W(i) is stored in the i-th column of
-* Z. Any vector which fails to converge is set to its current
-* iterate after MAXITS iterations.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (5*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* IFAIL (output) INTEGER array, dimension (M)
-* On normal exit, all elements of IFAIL are zero.
-* If one or more eigenvectors fail to converge after
-* MAXITS iterations, then their indices are stored in
-* array IFAIL.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge
-* in MAXITS iterations. Their indices are stored in
-* array IFAIL.
-*
-* Internal Parameters
-* ===================
-*
-* MAXITS INTEGER, default = 5
-* The maximum number of iterations performed.
-*
-* EXTRA INTEGER, default = 2
-* The number of iterations performed after norm growth
-* criterion is satisfied, should be at least 1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dstemr.f b/SRC/dstemr.f
index 73309921..38fb43a3 100644
--- a/SRC/dstemr.f
+++ b/SRC/dstemr.f
@@ -1,12 +1,315 @@
+*> \brief \b DSTEMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
+* M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
+* IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* LOGICAL TRYRAC
+* INTEGER IL, INFO, IU, LDZ, NZC, LIWORK, LWORK, M, N
+* DOUBLE PRECISION VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
+* DOUBLE PRECISION Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEMR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
+*> a well defined set of pairwise different real eigenvalues, the corresponding
+*> real eigenvectors are pairwise orthogonal.
+*>
+*> The spectrum may be computed either completely or partially by specifying
+*> either an interval (VL,VU] or a range of indices IL:IU for the desired
+*> eigenvalues.
+*>
+*> Depending on the number of desired eigenvalues, these are computed either
+*> by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
+*> computed by the use of various suitable L D L^T factorizations near clusters
+*> of close eigenvalues (referred to as RRRs, Relatively Robust
+*> Representations). An informal sketch of the algorithm follows.
+*>
+*> For each unreduced block (submatrix) of T,
+*> (a) Compute T - sigma I = L D L^T, so that L and D
+*> define all the wanted eigenvalues to high relative accuracy.
+*> This means that small relative changes in the entries of D and L
+*> cause only small relative changes in the eigenvalues and
+*> eigenvectors. The standard (unfactored) representation of the
+*> tridiagonal matrix T does not have this property in general.
+*> (b) Compute the eigenvalues to suitable accuracy.
+*> If the eigenvectors are desired, the algorithm attains full
+*> accuracy of the computed eigenvalues only right before
+*> the corresponding vectors have to be computed, see steps c) and d).
+*> (c) For each cluster of close eigenvalues, select a new
+*> shift close to the cluster, find a new factorization, and refine
+*> the shifted eigenvalues to suitable accuracy.
+*> (d) For each eigenvalue with a large enough relative separation compute
+*> the corresponding eigenvector by forming a rank revealing twisted
+*> factorization. Go back to (c) for any clusters that remain.
+*>
+*> For more details, see:
+*> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
+*> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
+*> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
+*> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
+*> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
+*> 2004. Also LAPACK Working Note 154.
+*> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem",
+*> Computer Science Division Technical Report No. UCB/CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*> Further Details
+*> 1.DSTEMR works only on machines which follow IEEE-754
+*> floating-point standard in their handling of infinities and NaNs.
+*> This permits the use of efficient inner loops avoiding a check for
+*> zero divisors.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal matrix
+*> T. On exit, D is overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the tridiagonal
+*> matrix T in elements 1 to N-1 of E. E(N) need not be set on
+*> input, but is used internally as workspace.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix T
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and can be computed with a workspace
+*> query by setting NZC = -1, see below.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] NZC
+*> \verbatim
+*> NZC is INTEGER
+*> The number of eigenvectors to be held in the array Z.
+*> If RANGE = 'A', then NZC >= max(1,N).
+*> If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
+*> If RANGE = 'I', then NZC >= IU-IL+1.
+*> If NZC = -1, then a workspace query is assumed; the
+*> routine calculates the number of columns of the array Z that
+*> are needed to hold the eigenvectors.
+*> This value is returned as the first entry of the Z array, and
+*> no error message related to NZC is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th computed eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ). This is relevant in the case when the matrix
+*> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
+*> \endverbatim
+*>
+*> \param[in,out] TRYRAC
+*> \verbatim
+*> TRYRAC is LOGICAL
+*> If TRYRAC.EQ..TRUE., indicates that the code should check whether
+*> the tridiagonal matrix defines its eigenvalues to high relative
+*> accuracy. If so, the code uses relative-accuracy preserving
+*> algorithms that might be (a bit) slower depending on the matrix.
+*> If the matrix does not define its eigenvalues to high relative
+*> accuracy, the code can uses possibly faster algorithms.
+*> If TRYRAC.EQ..FALSE., the code is not required to guarantee
+*> relatively accurate eigenvalues and can use the fastest possible
+*> techniques.
+*> On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
+*> does not define its eigenvalues to high relative accuracy.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal
+*> (and minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,18*N)
+*> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N)
+*> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
+*> if only the eigenvalues are to be computed.
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = 1X, internal error in DLARRE,
+*> if INFO = 2X, internal error in DLARRV.
+*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
+*> the nonzero error code returned by DLARRE or
+*> DLARRV, respectively.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
$ IWORK, LIWORK, INFO )
- IMPLICIT NONE
*
-* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- June 2010 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -20,198 +323,6 @@
DOUBLE PRECISION Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEMR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
-* a well defined set of pairwise different real eigenvalues, the corresponding
-* real eigenvectors are pairwise orthogonal.
-*
-* The spectrum may be computed either completely or partially by specifying
-* either an interval (VL,VU] or a range of indices IL:IU for the desired
-* eigenvalues.
-*
-* Depending on the number of desired eigenvalues, these are computed either
-* by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
-* computed by the use of various suitable L D L^T factorizations near clusters
-* of close eigenvalues (referred to as RRRs, Relatively Robust
-* Representations). An informal sketch of the algorithm follows.
-*
-* For each unreduced block (submatrix) of T,
-* (a) Compute T - sigma I = L D L^T, so that L and D
-* define all the wanted eigenvalues to high relative accuracy.
-* This means that small relative changes in the entries of D and L
-* cause only small relative changes in the eigenvalues and
-* eigenvectors. The standard (unfactored) representation of the
-* tridiagonal matrix T does not have this property in general.
-* (b) Compute the eigenvalues to suitable accuracy.
-* If the eigenvectors are desired, the algorithm attains full
-* accuracy of the computed eigenvalues only right before
-* the corresponding vectors have to be computed, see steps c) and d).
-* (c) For each cluster of close eigenvalues, select a new
-* shift close to the cluster, find a new factorization, and refine
-* the shifted eigenvalues to suitable accuracy.
-* (d) For each eigenvalue with a large enough relative separation compute
-* the corresponding eigenvector by forming a rank revealing twisted
-* factorization. Go back to (c) for any clusters that remain.
-*
-* For more details, see:
-* - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
-* to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
-* Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
-* - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
-* Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
-* 2004. Also LAPACK Working Note 154.
-* - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem",
-* Computer Science Division Technical Report No. UCB/CSD-97-971,
-* UC Berkeley, May 1997.
-*
-* Further Details
-* 1.DSTEMR works only on machines which follow IEEE-754
-* floating-point standard in their handling of infinities and NaNs.
-* This permits the use of efficient inner loops avoiding a check for
-* zero divisors.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal matrix
-* T. On exit, D is overwritten.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the tridiagonal
-* matrix T in elements 1 to N-1 of E. E(N) need not be set on
-* input, but is used internally as workspace.
-* On exit, E is overwritten.
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix T
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and can be computed with a workspace
-* query by setting NZC = -1, see below.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', then LDZ >= max(1,N).
-*
-* NZC (input) INTEGER
-* The number of eigenvectors to be held in the array Z.
-* If RANGE = 'A', then NZC >= max(1,N).
-* If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
-* If RANGE = 'I', then NZC >= IU-IL+1.
-* If NZC = -1, then a workspace query is assumed; the
-* routine calculates the number of columns of the array Z that
-* are needed to hold the eigenvectors.
-* This value is returned as the first entry of the Z array, and
-* no error message related to NZC is issued by XERBLA.
-*
-* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th computed eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ). This is relevant in the case when the matrix
-* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
-*
-* TRYRAC (input/output) LOGICAL
-* If TRYRAC.EQ..TRUE., indicates that the code should check whether
-* the tridiagonal matrix defines its eigenvalues to high relative
-* accuracy. If so, the code uses relative-accuracy preserving
-* algorithms that might be (a bit) slower depending on the matrix.
-* If the matrix does not define its eigenvalues to high relative
-* accuracy, the code can uses possibly faster algorithms.
-* If TRYRAC.EQ..FALSE., the code is not required to guarantee
-* relatively accurate eigenvalues and can use the fastest possible
-* techniques.
-* On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
-* does not define its eigenvalues to high relative accuracy.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal
-* (and minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,18*N)
-* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (LIWORK)
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N)
-* if the eigenvectors are desired, and LIWORK >= max(1,8*N)
-* if only the eigenvalues are to be computed.
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* On exit, INFO
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = 1X, internal error in DLARRE,
-* if INFO = 2X, internal error in DLARRV.
-* Here, the digit X = ABS( IINFO ) < 10, where IINFO is
-* the nonzero error code returned by DLARRE or
-* DLARRV, respectively.
-*
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsteqr.f b/SRC/dsteqr.f
index 2b364884..d2facec7 100644
--- a/SRC/dsteqr.f
+++ b/SRC/dsteqr.f
@@ -1,9 +1,132 @@
+*> \brief \b DSTEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the implicit QL or QR method.
+*> The eigenvectors of a full or band symmetric matrix can also be found
+*> if DSYTRD or DSPTRD or DSBTRD has been used to reduce this matrix to
+*> tridiagonal form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'V': Compute eigenvalues and eigenvectors of the original
+*> symmetric matrix. On entry, Z must contain the
+*> orthogonal matrix used to reduce the original matrix
+*> to tridiagonal form.
+*> = 'I': Compute eigenvalues and eigenvectors of the
+*> tridiagonal matrix. Z is initialized to the identity
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', then Z contains the orthogonal
+*> matrix used in the reduction to tridiagonal form.
+*> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*> orthonormal eigenvectors of the original symmetric matrix,
+*> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*> of the symmetric tridiagonal matrix.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (max(1,2*N-2))
+*> If COMPZ = 'N', then WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm has failed to find all the eigenvalues in
+*> a total of 30*N iterations; if INFO = i, then i
+*> elements of E have not converged to zero; on exit, D
+*> and E contain the elements of a symmetric tridiagonal
+*> matrix which is orthogonally similar to the original
+*> matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -13,66 +136,6 @@
DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEQR computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric tridiagonal matrix using the implicit QL or QR method.
-* The eigenvectors of a full or band symmetric matrix can also be found
-* if DSYTRD or DSPTRD or DSBTRD has been used to reduce this matrix to
-* tridiagonal form.
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'V': Compute eigenvalues and eigenvectors of the original
-* symmetric matrix. On entry, Z must contain the
-* orthogonal matrix used to reduce the original matrix
-* to tridiagonal form.
-* = 'I': Compute eigenvalues and eigenvectors of the
-* tridiagonal matrix. Z is initialized to the identity
-* matrix.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', then Z contains the orthogonal
-* matrix used in the reduction to tridiagonal form.
-* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-* orthonormal eigenvectors of the original symmetric matrix,
-* and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-* of the symmetric tridiagonal matrix.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* eigenvectors are desired, then LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2))
-* If COMPZ = 'N', then WORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm has failed to find all the eigenvalues in
-* a total of 30*N iterations; if INFO = i, then i
-* elements of E have not converged to zero; on exit, D
-* and E contain the elements of a symmetric tridiagonal
-* matrix which is orthogonally similar to the original
-* matrix.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsterf.f b/SRC/dsterf.f
index c7ea81d1..1b3f7b11 100644
--- a/SRC/dsterf.f
+++ b/SRC/dsterf.f
@@ -1,44 +1,94 @@
- SUBROUTINE DSTERF( N, D, E, INFO )
+*> \brief \b DSTERF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTERF( N, D, E, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* ..
+*
* Purpose
* =======
*
-* DSTERF computes all eigenvalues of a symmetric tridiagonal matrix
-* using the Pal-Walker-Kahan variant of the QL or QR algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTERF computes all eigenvalues of a symmetric tridiagonal matrix
+*> using the Pal-Walker-Kahan variant of the QL or QR algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm failed to find all of the eigenvalues in
+*> a total of 30*N iterations; if INFO = i, then i
+*> elements of E have not converged to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \date November 2011
*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm failed to find all of the eigenvalues in
-* a total of 30*N iterations; if INFO = i, then i
-* elements of E have not converged to zero.
+* =====================================================================
+ SUBROUTINE DSTERF( N, D, E, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dstev.f b/SRC/dstev.f
index 3354167a..d039b933 100644
--- a/SRC/dstev.f
+++ b/SRC/dstev.f
@@ -1,9 +1,117 @@
+*> \brief <b> DSTEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEV( JOBZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEV computes all eigenvalues and, optionally, eigenvectors of a
+*> real symmetric tridiagonal matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A, stored in elements 1 to N-1 of E.
+*> On exit, the contents of E are destroyed.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with D(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (max(1,2*N-2))
+*> If JOBZ = 'N', WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of E did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSTEV( JOBZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ
@@ -13,51 +121,6 @@
DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEV computes all eigenvalues and, optionally, eigenvectors of a
-* real symmetric tridiagonal matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A, stored in elements 1 to N-1 of E.
-* On exit, the contents of E are destroyed.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with D(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2))
-* If JOBZ = 'N', WORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of E did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dstevd.f b/SRC/dstevd.f
index b90f7383..5a864d4a 100644
--- a/SRC/dstevd.f
+++ b/SRC/dstevd.f
@@ -1,10 +1,166 @@
+*> \brief <b> DSTEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEVD( JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ
+* INTEGER INFO, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEVD computes all eigenvalues and, optionally, eigenvectors of a
+*> real symmetric tridiagonal matrix. If eigenvectors are desired, it
+*> uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A, stored in elements 1 to N-1 of E.
+*> On exit, the contents of E are destroyed.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with D(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If JOBZ = 'N' or N <= 1 then LWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1 then LWORK must be at least
+*> ( 1 + 4*N + N**2 ).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOBZ = 'N' or N <= 1 then LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1 then LIWORK must be at least 3+5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of E did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSTEVD( JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ
@@ -15,86 +171,6 @@
DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEVD computes all eigenvalues and, optionally, eigenvectors of a
-* real symmetric tridiagonal matrix. If eigenvectors are desired, it
-* uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A, stored in elements 1 to N-1 of E.
-* On exit, the contents of E are destroyed.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with D(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If JOBZ = 'N' or N <= 1 then LWORK must be at least 1.
-* If JOBZ = 'V' and N > 1 then LWORK must be at least
-* ( 1 + 4*N + N**2 ).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOBZ = 'N' or N <= 1 then LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1 then LIWORK must be at least 3+5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of E did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dstevr.f b/SRC/dstevr.f
index db1ac375..42917632 100644
--- a/SRC/dstevr.f
+++ b/SRC/dstevr.f
@@ -1,11 +1,310 @@
+*> \brief <b> DSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEVR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
+* M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEVR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Eigenvalues and
+*> eigenvectors can be selected by specifying either a range of values
+*> or a range of indices for the desired eigenvalues.
+*>
+*> Whenever possible, DSTEVR calls DSTEMR to compute the
+*> eigenspectrum using Relatively Robust Representations. DSTEMR
+*> computes eigenvalues by the dqds algorithm, while orthogonal
+*> eigenvectors are computed from various "good" L D L^T representations
+*> (also known as Relatively Robust Representations). Gram-Schmidt
+*> orthogonalization is avoided as far as possible. More specifically,
+*> the various steps of the algorithm are as follows. For the i-th
+*> unreduced block of T,
+*> (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T
+*> is a relatively robust representation,
+*> (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high
+*> relative accuracy by the dqds algorithm,
+*> (c) If there is a cluster of close eigenvalues, "choose" sigma_i
+*> close to the cluster, and go to step (a),
+*> (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T,
+*> compute the corresponding eigenvector by forming a
+*> rank-revealing twisted factorization.
+*> The desired accuracy of the output can be specified by the input
+*> parameter ABSTOL.
+*>
+*> For more details, see "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem", by Inderjit Dhillon,
+*> Computer Science Division Technical Report No. UCB//CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*>
+*> Note 1 : DSTEVR calls DSTEMR when the full spectrum is requested
+*> on machines which conform to the ieee-754 floating point standard.
+*> DSTEVR calls DSTEBZ and DSTEIN on non-ieee machines and
+*> when partial spectrum requests are made.
+*>
+*> Normal execution of DSTEMR may create NaNs and infinities and
+*> hence may abort due to a floating point exception in environments
+*> which do not handle NaNs and infinities in the ieee standard default
+*> manner.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> For RANGE = 'V' or 'I' and IU - IL < N - 1, DSTEBZ and
+*> DSTEIN are called
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A.
+*> On exit, D may be multiplied by a constant factor chosen
+*> to avoid over/underflow in computing the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (max(1,N-1))
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A in elements 1 to N-1 of E.
+*> On exit, E may be multiplied by a constant factor chosen
+*> to avoid over/underflow in computing the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*> \verbatim
+*> If high relative accuracy is important, set ABSTOL to
+*> DLAMCH( 'Safe minimum' ). Doing so will guarantee that
+*> eigenvalues are computed to high relative accuracy when
+*> possible in future releases. The current code does not
+*> make any guarantees about high relative accuracy, but
+*> future releases will. See J. Barlow and J. Demmel,
+*> "Computing Accurate Eigensystems of Scaled Diagonally
+*> Dominant Matrices", LAPACK Working Note #7, for a discussion
+*> of which matrices define their eigenvalues to high relative
+*> accuracy.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ).
+*> Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal (and
+*> minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,20*N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal (and
+*> minimal) LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: Internal error
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Ken Stanley, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSTEVR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
$ M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -17,191 +316,6 @@
DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEVR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Eigenvalues and
-* eigenvectors can be selected by specifying either a range of values
-* or a range of indices for the desired eigenvalues.
-*
-* Whenever possible, DSTEVR calls DSTEMR to compute the
-* eigenspectrum using Relatively Robust Representations. DSTEMR
-* computes eigenvalues by the dqds algorithm, while orthogonal
-* eigenvectors are computed from various "good" L D L^T representations
-* (also known as Relatively Robust Representations). Gram-Schmidt
-* orthogonalization is avoided as far as possible. More specifically,
-* the various steps of the algorithm are as follows. For the i-th
-* unreduced block of T,
-* (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T
-* is a relatively robust representation,
-* (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high
-* relative accuracy by the dqds algorithm,
-* (c) If there is a cluster of close eigenvalues, "choose" sigma_i
-* close to the cluster, and go to step (a),
-* (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T,
-* compute the corresponding eigenvector by forming a
-* rank-revealing twisted factorization.
-* The desired accuracy of the output can be specified by the input
-* parameter ABSTOL.
-*
-* For more details, see "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem", by Inderjit Dhillon,
-* Computer Science Division Technical Report No. UCB//CSD-97-971,
-* UC Berkeley, May 1997.
-*
-*
-* Note 1 : DSTEVR calls DSTEMR when the full spectrum is requested
-* on machines which conform to the ieee-754 floating point standard.
-* DSTEVR calls DSTEBZ and DSTEIN on non-ieee machines and
-* when partial spectrum requests are made.
-*
-* Normal execution of DSTEMR may create NaNs and infinities and
-* hence may abort due to a floating point exception in environments
-* which do not handle NaNs and infinities in the ieee standard default
-* manner.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-* For RANGE = 'V' or 'I' and IU - IL < N - 1, DSTEBZ and
-* DSTEIN are called
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A.
-* On exit, D may be multiplied by a constant factor chosen
-* to avoid over/underflow in computing the eigenvalues.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (max(1,N-1))
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A in elements 1 to N-1 of E.
-* On exit, E may be multiplied by a constant factor chosen
-* to avoid over/underflow in computing the eigenvalues.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* If high relative accuracy is important, set ABSTOL to
-* DLAMCH( 'Safe minimum' ). Doing so will guarantee that
-* eigenvalues are computed to high relative accuracy when
-* possible in future releases. The current code does not
-* make any guarantees about high relative accuracy, but
-* future releases will. See J. Barlow and J. Demmel,
-* "Computing Accurate Eigensystems of Scaled Diagonally
-* Dominant Matrices", LAPACK Working Note #7, for a discussion
-* of which matrices define their eigenvalues to high relative
-* accuracy.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ).
-* Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal (and
-* minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,20*N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal (and
-* minimal) LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: Internal error
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Ken Stanley, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dstevx.f b/SRC/dstevx.f
index 29cd7526..28873bee 100644
--- a/SRC/dstevx.f
+++ b/SRC/dstevx.f
@@ -1,10 +1,225 @@
+*> \brief <b> DSTEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTEVX( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
+* M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* INTEGER IL, INFO, IU, LDZ, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix A. Eigenvalues and
+*> eigenvectors can be selected by specifying either a range of values
+*> or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A.
+*> On exit, D may be multiplied by a constant factor chosen
+*> to avoid over/underflow in computing the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (max(1,N-1))
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A in elements 1 to N-1 of E.
+*> On exit, E may be multiplied by a constant factor chosen
+*> to avoid over/underflow in computing the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less
+*> than or equal to zero, then EPS*|T| will be used in
+*> its place, where |T| is the 1-norm of the tridiagonal
+*> matrix.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge (INFO > 0), then that
+*> column of Z contains the latest approximation to the
+*> eigenvector, and the index of the eigenvector is returned
+*> in IFAIL. If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHEReigen
+*
+* =====================================================================
SUBROUTINE DSTEVX( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
$ M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -16,121 +231,6 @@
DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSTEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix A. Eigenvalues and
-* eigenvectors can be selected by specifying either a range of values
-* or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A.
-* On exit, D may be multiplied by a constant factor chosen
-* to avoid over/underflow in computing the eigenvalues.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (max(1,N-1))
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A in elements 1 to N-1 of E.
-* On exit, E may be multiplied by a constant factor chosen
-* to avoid over/underflow in computing the eigenvalues.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less
-* than or equal to zero, then EPS*|T| will be used in
-* its place, where |T| is the 1-norm of the tridiagonal
-* matrix.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge (INFO > 0), then that
-* column of Z contains the latest approximation to the
-* eigenvector, and the index of the eigenvector is returned
-* in IFAIL. If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (5*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsycon.f b/SRC/dsycon.f
index 33e8949e..dc314b69 100644
--- a/SRC/dsycon.f
+++ b/SRC/dsycon.f
@@ -1,12 +1,131 @@
+*> \brief \b DSYCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric matrix A using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by DSYTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+* =====================================================================
SUBROUTINE DSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,55 +137,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric matrix A using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by DSYTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSYTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsyconv.f b/SRC/dsyconv.f
index 00622401..b316afa2 100644
--- a/SRC/dsyconv.f
+++ b/SRC/dsyconv.f
@@ -1,69 +1,135 @@
- SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK PROTOTYPE routine (version 3.3.0) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
-*
-* -- Written by Julie Langou of the Univ. of TN --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO, WAY
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b DSYCONV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, WAY
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DSYCONV convert A given by TRF into L and D and vice-versa.
-* Get Non-diag elements of D (returned in workspace) and
-* apply or reverse permutation done in TRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYCONV convert A given by TRF into L and D and vice-versa.
+*> Get Non-diag elements of D (returned in workspace) and
+*> apply or reverse permutation done in TRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* WAY (input) CHARACTER*1
-* = 'C': Convert
-* = 'R': Revert
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] WAY
+*> \verbatim
+*> WAY is CHARACTER*1
+*> = 'C': Convert
+*> = 'R': Revert
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1.
+*> LWORK = N
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+*> \ingroup doubleSYcomputational
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1.
-* LWORK = N
+* =====================================================================
+ SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO, WAY
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsyequb.f b/SRC/dsyequb.f
index 42924dcd..ac00a167 100644
--- a/SRC/dsyequb.f
+++ b/SRC/dsyequb.f
@@ -1,83 +1,152 @@
- SUBROUTINE DSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*> \brief \b DSYEQUB
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- DOUBLE PRECISION AMAX, SCOND
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), S( * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), S( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DSYEQUB computes row and column scalings intended to equilibrate a
-* symmetric matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYEQUB computes row and column scalings intended to equilibrate a
+*> symmetric matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The N-by-N symmetric matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The N-by-N symmetric matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+* Authors
+* =======
*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
+*> \ingroup doubleSYcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
+*> Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
+*> DOI 10.1023/B:NUMA.0000016606.32820.69
+*> Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
*
-* Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
-* Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
-* DOI 10.1023/B:NUMA.0000016606.32820.69
-* Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ DOUBLE PRECISION AMAX, SCOND
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), S( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsyev.f b/SRC/dsyev.f
index da208fb2..97290fc1 100644
--- a/SRC/dsyev.f
+++ b/SRC/dsyev.f
@@ -1,9 +1,134 @@
+*> \brief <b> DSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYEV computes all eigenvalues and, optionally, eigenvectors of a
+*> real symmetric matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> orthonormal eigenvectors of the matrix A.
+*> If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*> or the upper triangle (if UPLO='U') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,3*N-1).
+*> For optimal efficiency, LWORK >= (NB+2)*N,
+*> where NB is the blocksize for DSYTRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYeigen
+*
+* =====================================================================
SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -13,64 +138,6 @@
DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYEV computes all eigenvalues and, optionally, eigenvectors of a
-* real symmetric matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* orthonormal eigenvectors of the matrix A.
-* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-* or the upper triangle (if UPLO='U') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,3*N-1).
-* For optimal efficiency, LWORK >= (NB+2)*N,
-* where NB is the blocksize for DSYTRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsyevd.f b/SRC/dsyevd.f
index 02f0ac7d..4b26388c 100644
--- a/SRC/dsyevd.f
+++ b/SRC/dsyevd.f
@@ -1,10 +1,192 @@
+*> \brief <b> DSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDA, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYEVD computes all eigenvalues and, optionally, eigenvectors of a
+*> real symmetric matrix A. If eigenvectors are desired, it uses a
+*> divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*> Because of large use of BLAS of level 3, DSYEVD needs N**2 more
+*> workspace than DSYEVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> orthonormal eigenvectors of the matrix A.
+*> If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*> or the upper triangle (if UPLO='U') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least 2*N+1.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least
+*> 1 + 6*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i and JOBZ = 'N', then the algorithm failed
+*> to converge; i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> if INFO = i and JOBZ = 'V', then the algorithm failed
+*> to compute an eigenvalue while working on the submatrix
+*> lying in rows and columns INFO/(N+1) through
+*> mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> Modified description of INFO. Sven, 16 Feb 05.
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSYEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,107 +197,6 @@
DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYEVD computes all eigenvalues and, optionally, eigenvectors of a
-* real symmetric matrix A. If eigenvectors are desired, it uses a
-* divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Because of large use of BLAS of level 3, DSYEVD needs N**2 more
-* workspace than DSYEVX.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* orthonormal eigenvectors of the matrix A.
-* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-* or the upper triangle (if UPLO='U') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least 2*N+1.
-* If JOBZ = 'V' and N > 1, LWORK must be at least
-* 1 + 6*N + 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i and JOBZ = 'N', then the algorithm failed
-* to converge; i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* if INFO = i and JOBZ = 'V', then the algorithm failed
-* to compute an eigenvalue while working on the submatrix
-* lying in rows and columns INFO/(N+1) through
-* mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
-*
-* Modified description of INFO. Sven, 16 Feb 05.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsyevr.f b/SRC/dsyevr.f
index b47caf13..0af7ac67 100644
--- a/SRC/dsyevr.f
+++ b/SRC/dsyevr.f
@@ -1,11 +1,338 @@
+*> \brief <b> DSYEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
+* IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDA, LDZ, LIWORK, LWORK, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYEVR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric matrix A. Eigenvalues and eigenvectors can be
+*> selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*> DSYEVR first reduces the matrix A to tridiagonal form T with a call
+*> to DSYTRD. Then, whenever possible, DSYEVR calls DSTEMR to compute
+*> the eigenspectrum using Relatively Robust Representations. DSTEMR
+*> computes eigenvalues by the dqds algorithm, while orthogonal
+*> eigenvectors are computed from various "good" L D L^T representations
+*> (also known as Relatively Robust Representations). Gram-Schmidt
+*> orthogonalization is avoided as far as possible. More specifically,
+*> the various steps of the algorithm are as follows.
+*>
+*> For each unreduced block (submatrix) of T,
+*> (a) Compute T - sigma I = L D L^T, so that L and D
+*> define all the wanted eigenvalues to high relative accuracy.
+*> This means that small relative changes in the entries of D and L
+*> cause only small relative changes in the eigenvalues and
+*> eigenvectors. The standard (unfactored) representation of the
+*> tridiagonal matrix T does not have this property in general.
+*> (b) Compute the eigenvalues to suitable accuracy.
+*> If the eigenvectors are desired, the algorithm attains full
+*> accuracy of the computed eigenvalues only right before
+*> the corresponding vectors have to be computed, see steps c) and d).
+*> (c) For each cluster of close eigenvalues, select a new
+*> shift close to the cluster, find a new factorization, and refine
+*> the shifted eigenvalues to suitable accuracy.
+*> (d) For each eigenvalue with a large enough relative separation compute
+*> the corresponding eigenvector by forming a rank revealing twisted
+*> factorization. Go back to (c) for any clusters that remain.
+*>
+*> The desired accuracy of the output can be specified by the input
+*> parameter ABSTOL.
+*>
+*> For more details, see DSTEMR's documentation and:
+*> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
+*> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
+*> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
+*> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
+*> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
+*> 2004. Also LAPACK Working Note 154.
+*> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem",
+*> Computer Science Division Technical Report No. UCB/CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*>
+*> Note 1 : DSYEVR calls DSTEMR when the full spectrum is requested
+*> on machines which conform to the ieee-754 floating point standard.
+*> DSYEVR calls DSTEBZ and SSTEIN on non-ieee machines and
+*> when partial spectrum requests are made.
+*>
+*> Normal execution of DSTEMR may create NaNs and infinities and
+*> hence may abort due to a floating point exception in environments
+*> which do not handle NaNs and infinities in the ieee standard default
+*> manner.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> For RANGE = 'V' or 'I' and IU - IL < N - 1, DSTEBZ and
+*> DSTEIN are called
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*> \verbatim
+*> If high relative accuracy is important, set ABSTOL to
+*> DLAMCH( 'Safe minimum' ). Doing so will guarantee that
+*> eigenvalues are computed to high relative accuracy when
+*> possible in future releases. The current code does not
+*> make any guarantees about high relative accuracy, but
+*> future releases will. See J. Barlow and J. Demmel,
+*> "Computing Accurate Eigensystems of Scaled Diagonally
+*> Dominant Matrices", LAPACK Working Note #7, for a discussion
+*> of which matrices define their eigenvalues to high relative
+*> accuracy.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> Supplying N columns is always safe.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ).
+*> Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,26*N).
+*> For optimal efficiency, LWORK >= (NB+6)*N,
+*> where NB is the max of the blocksize for DSYTRD and DORMTR
+*> returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: Internal error
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Ken Stanley, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Jason Riedy, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSYEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
$ IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK eigen routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -17,216 +344,6 @@
DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSYEVR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric matrix A. Eigenvalues and eigenvectors can be
-* selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* DSYEVR first reduces the matrix A to tridiagonal form T with a call
-* to DSYTRD. Then, whenever possible, DSYEVR calls DSTEMR to compute
-* the eigenspectrum using Relatively Robust Representations. DSTEMR
-* computes eigenvalues by the dqds algorithm, while orthogonal
-* eigenvectors are computed from various "good" L D L^T representations
-* (also known as Relatively Robust Representations). Gram-Schmidt
-* orthogonalization is avoided as far as possible. More specifically,
-* the various steps of the algorithm are as follows.
-*
-* For each unreduced block (submatrix) of T,
-* (a) Compute T - sigma I = L D L^T, so that L and D
-* define all the wanted eigenvalues to high relative accuracy.
-* This means that small relative changes in the entries of D and L
-* cause only small relative changes in the eigenvalues and
-* eigenvectors. The standard (unfactored) representation of the
-* tridiagonal matrix T does not have this property in general.
-* (b) Compute the eigenvalues to suitable accuracy.
-* If the eigenvectors are desired, the algorithm attains full
-* accuracy of the computed eigenvalues only right before
-* the corresponding vectors have to be computed, see steps c) and d).
-* (c) For each cluster of close eigenvalues, select a new
-* shift close to the cluster, find a new factorization, and refine
-* the shifted eigenvalues to suitable accuracy.
-* (d) For each eigenvalue with a large enough relative separation compute
-* the corresponding eigenvector by forming a rank revealing twisted
-* factorization. Go back to (c) for any clusters that remain.
-*
-* The desired accuracy of the output can be specified by the input
-* parameter ABSTOL.
-*
-* For more details, see DSTEMR's documentation and:
-* - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
-* to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
-* Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
-* - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
-* Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
-* 2004. Also LAPACK Working Note 154.
-* - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem",
-* Computer Science Division Technical Report No. UCB/CSD-97-971,
-* UC Berkeley, May 1997.
-*
-*
-* Note 1 : DSYEVR calls DSTEMR when the full spectrum is requested
-* on machines which conform to the ieee-754 floating point standard.
-* DSYEVR calls DSTEBZ and SSTEIN on non-ieee machines and
-* when partial spectrum requests are made.
-*
-* Normal execution of DSTEMR may create NaNs and infinities and
-* hence may abort due to a floating point exception in environments
-* which do not handle NaNs and infinities in the ieee standard default
-* manner.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-* For RANGE = 'V' or 'I' and IU - IL < N - 1, DSTEBZ and
-* DSTEIN are called
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* If high relative accuracy is important, set ABSTOL to
-* DLAMCH( 'Safe minimum' ). Doing so will guarantee that
-* eigenvalues are computed to high relative accuracy when
-* possible in future releases. The current code does not
-* make any guarantees about high relative accuracy, but
-* future releases will. See J. Barlow and J. Demmel,
-* "Computing Accurate Eigensystems of Scaled Diagonally
-* Dominant Matrices", LAPACK Working Note #7, for a discussion
-* of which matrices define their eigenvalues to high relative
-* accuracy.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-* Supplying N columns is always safe.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ).
-* Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,26*N).
-* For optimal efficiency, LWORK >= (NB+6)*N,
-* where NB is the max of the blocksize for DSYTRD and DORMTR
-* returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: Internal error
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Ken Stanley, Computer Science Division, University of
-* California at Berkeley, USA
-* Jason Riedy, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsyevx.f b/SRC/dsyevx.f
index 994a8ebc..bfc9a254 100644
--- a/SRC/dsyevx.f
+++ b/SRC/dsyevx.f
@@ -1,11 +1,252 @@
+*> \brief <b> DSYEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK,
+* IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDA, LDZ, LWORK, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric matrix A. Eigenvalues and eigenvectors can be
+*> selected by specifying either a range of values or a range of indices
+*> for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= 1, when N <= 1;
+*> otherwise 8*N.
+*> For optimal efficiency, LWORK >= (NB+3)*N,
+*> where NB is the max of the blocksize for DSYTRD and DORMTR
+*> returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYeigen
+*
+* =====================================================================
SUBROUTINE DSYEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK,
$ IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -17,139 +258,6 @@
DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSYEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric matrix A. Eigenvalues and eigenvectors can be
-* selected by specifying either a range of values or a range of indices
-* for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= 1, when N <= 1;
-* otherwise 8*N.
-* For optimal efficiency, LWORK >= (NB+3)*N,
-* where NB is the max of the blocksize for DSYTRD and DORMTR
-* returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsygs2.f b/SRC/dsygs2.f
index 0d8f4c45..8002c0ea 100644
--- a/SRC/dsygs2.f
+++ b/SRC/dsygs2.f
@@ -1,73 +1,137 @@
- SUBROUTINE DSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, LDA, LDB, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DSYGS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DSYGS2 reduces a real symmetric-definite generalized eigenproblem
-* to standard form.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T *A*L.
-*
-* B must have been previously factorized as U**T *U or L*L**T by DPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYGS2 reduces a real symmetric-definite generalized eigenproblem
+*> to standard form.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T *A*L.
+*>
+*> B must have been previously factorized as U**T *U or L*L**T by DPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
-* = 2 or 3: compute U*A*U**T or L**T *A*L.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored, and how B has been factorized.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
+*> = 2 or 3: compute U*A*U**T or L**T *A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored, and how B has been factorized.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> The triangular factor from the Cholesky factorization of B,
+*> as returned by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup doubleSYcomputational
*
-* B (input) DOUBLE PRECISION array, dimension (LDB,N)
-* The triangular factor from the Cholesky factorization of B,
-* as returned by DPOTRF.
+* =====================================================================
+ SUBROUTINE DSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsygst.f b/SRC/dsygst.f
index 2d290e47..3c5b573e 100644
--- a/SRC/dsygst.f
+++ b/SRC/dsygst.f
@@ -1,73 +1,137 @@
- SUBROUTINE DSYGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, LDA, LDB, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DSYGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DSYGST reduces a real symmetric-definite generalized eigenproblem
-* to standard form.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
-*
-* B must have been previously factorized as U**T*U or L*L**T by DPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYGST reduces a real symmetric-definite generalized eigenproblem
+*> to standard form.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
+*>
+*> B must have been previously factorized as U**T*U or L*L**T by DPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
-* = 2 or 3: compute U*A*U**T or L**T*A*L.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored and B is factored as
-* U**T*U;
-* = 'L': Lower triangle of A is stored and B is factored as
-* L*L**T.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
+*> = 2 or 3: compute U*A*U**T or L**T*A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored and B is factored as
+*> U**T*U;
+*> = 'L': Lower triangle of A is stored and B is factored as
+*> L*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> The triangular factor from the Cholesky factorization of B,
+*> as returned by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup doubleSYcomputational
*
-* B (input) DOUBLE PRECISION array, dimension (LDB,N)
-* The triangular factor from the Cholesky factorization of B,
-* as returned by DPOTRF.
+* =====================================================================
+ SUBROUTINE DSYGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsygv.f b/SRC/dsygv.f
index 29020dcb..779e8027 100644
--- a/SRC/dsygv.f
+++ b/SRC/dsygv.f
@@ -1,10 +1,179 @@
+*> \brief \b DSYGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYGV computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
+*> Here A and B are assumed to be symmetric and B is also
+*> positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> matrix Z of eigenvectors. The eigenvectors are normalized
+*> as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+*> or the lower triangle (if UPLO='L') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the symmetric positive definite matrix B.
+*> If UPLO = 'U', the leading N-by-N upper triangular part of B
+*> contains the upper triangular part of the matrix B.
+*> If UPLO = 'L', the leading N-by-N lower triangular part of B
+*> contains the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,3*N-1).
+*> For optimal efficiency, LWORK >= (NB+2)*N,
+*> where NB is the blocksize for DSYTRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: DPOTRF or DSYEV returned an error code:
+*> <= N: if INFO = i, DSYEV failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYeigen
+*
+* =====================================================================
SUBROUTINE DSYGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -14,96 +183,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYGV computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
-* Here A and B are assumed to be symmetric and B is also
-* positive definite.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* matrix Z of eigenvectors. The eigenvectors are normalized
-* as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-* If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
-* or the lower triangle (if UPLO='L') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the symmetric positive definite matrix B.
-* If UPLO = 'U', the leading N-by-N upper triangular part of B
-* contains the upper triangular part of the matrix B.
-* If UPLO = 'L', the leading N-by-N lower triangular part of B
-* contains the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,3*N-1).
-* For optimal efficiency, LWORK >= (NB+2)*N,
-* where NB is the blocksize for DSYTRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: DPOTRF or DSYEV returned an error code:
-* <= N: if INFO = i, DSYEV failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsygvd.f b/SRC/dsygvd.f
index efd1aa7b..2bb5069a 100644
--- a/SRC/dsygvd.f
+++ b/SRC/dsygvd.f
@@ -1,10 +1,231 @@
+*> \brief \b DSYGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
+* LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be symmetric and B is also positive definite.
+*> If eigenvectors are desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> matrix Z of eigenvectors. The eigenvectors are normalized
+*> as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+*> or the lower triangle (if UPLO='L') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the symmetric matrix B. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of B contains the
+*> upper triangular part of the matrix B. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of B contains
+*> the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= 2*N+1.
+*> If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If N <= 1, LIWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: DPOTRF or DSYEVD returned an error code:
+*> <= N: if INFO = i and JOBZ = 'N', then the algorithm
+*> failed to converge; i off-diagonal elements of an
+*> intermediate tridiagonal form did not converge to
+*> zero;
+*> if INFO = i and JOBZ = 'V', then the algorithm
+*> failed to compute an eigenvalue while working on
+*> the submatrix lying in rows and columns INFO/(N+1)
+*> through mod(INFO,N+1);
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> Modified so that no backsubstitution is performed if DSYEVD fails to
+*> converge (NEIG in old code could be greater than N causing out of
+*> bounds reference to A - reported by Ralf Meyer). Also corrected the
+*> description of INFO and the test on ITYPE. Sven, 16 Feb 05.
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
$ LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,135 +236,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be symmetric and B is also positive definite.
-* If eigenvectors are desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* matrix Z of eigenvectors. The eigenvectors are normalized
-* as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-* If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
-* or the lower triangle (if UPLO='L') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the symmetric matrix B. If UPLO = 'U', the
-* leading N-by-N upper triangular part of B contains the
-* upper triangular part of the matrix B. If UPLO = 'L',
-* the leading N-by-N lower triangular part of B contains
-* the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= 2*N+1.
-* If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If N <= 1, LIWORK >= 1.
-* If JOBZ = 'N' and N > 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: DPOTRF or DSYEVD returned an error code:
-* <= N: if INFO = i and JOBZ = 'N', then the algorithm
-* failed to converge; i off-diagonal elements of an
-* intermediate tridiagonal form did not converge to
-* zero;
-* if INFO = i and JOBZ = 'V', then the algorithm
-* failed to compute an eigenvalue while working on
-* the submatrix lying in rows and columns INFO/(N+1)
-* through mod(INFO,N+1);
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
-* Modified so that no backsubstitution is performed if DSYEVD fails to
-* converge (NEIG in old code could be greater than N causing out of
-* bounds reference to A - reported by Ralf Meyer). Also corrected the
-* description of INFO and the test on ITYPE. Sven, 16 Feb 05.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsygvx.f b/SRC/dsygvx.f
index 52688975..c27eff66 100644
--- a/SRC/dsygvx.f
+++ b/SRC/dsygvx.f
@@ -1,11 +1,304 @@
+*> \brief \b DSYGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
+* VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
+* LWORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYGVX computes selected eigenvalues, and optionally, eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A
+*> and B are assumed to be symmetric and B is also positive definite.
+*> Eigenvalues and eigenvectors can be selected by specifying either a
+*> range of values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A and B are stored;
+*> = 'L': Lower triangle of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix pencil (A,B). N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, the symmetric matrix B. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of B contains the
+*> upper triangular part of the matrix B. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of B contains
+*> the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing C to tridiagonal form, where C is the symmetric
+*> matrix of the standard symmetric problem to which the
+*> generalized problem is transformed.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'N', then Z is not referenced.
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> \endverbatim
+*> \verbatim
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,8*N).
+*> For optimal efficiency, LWORK >= (NB+3)*N,
+*> where NB is the blocksize for DSYTRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: DPOTRF or DSYEVX returned an error code:
+*> <= N: if INFO = i, DSYEVX failed to converge;
+*> i eigenvectors failed to converge. Their indices
+*> are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSYGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
$ VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
$ LWORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,174 +311,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DSYGVX computes selected eigenvalues, and optionally, eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A
-* and B are assumed to be symmetric and B is also positive definite.
-* Eigenvalues and eigenvectors can be selected by specifying either a
-* range of values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A and B are stored;
-* = 'L': Lower triangle of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrix pencil (A,B). N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, the symmetric matrix B. If UPLO = 'U', the
-* leading N-by-N upper triangular part of B contains the
-* upper triangular part of the matrix B. If UPLO = 'L',
-* the leading N-by-N lower triangular part of B contains
-* the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing C to tridiagonal form, where C is the symmetric
-* matrix of the standard symmetric problem to which the
-* generalized problem is transformed.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M))
-* If JOBZ = 'N', then Z is not referenced.
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-*
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,8*N).
-* For optimal efficiency, LWORK >= (NB+3)*N,
-* where NB is the blocksize for DSYTRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: DPOTRF or DSYEVX returned an error code:
-* <= N: if INFO = i, DSYEVX failed to converge;
-* i eigenvectors failed to converge. Their indices
-* are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsyrfs.f b/SRC/dsyrfs.f
index 59ad546b..439b0a69 100644
--- a/SRC/dsyrfs.f
+++ b/SRC/dsyrfs.f
@@ -1,12 +1,192 @@
+*> \brief \b DSYRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite, and
+*> provides error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or
+*> A = L*D*L**T as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DSYTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+* =====================================================================
SUBROUTINE DSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,93 +198,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DSYRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite, and
-* provides error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or
-* A = L*D*L**T as computed by DSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DSYTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsyrfsx.f b/SRC/dsyrfsx.f
index 2d6fc6fa..9f780a8a 100644
--- a/SRC/dsyrfsx.f
+++ b/SRC/dsyrfsx.f
@@ -1,18 +1,423 @@
+*> \brief \b DSYRFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYRFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DSYRFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite, and
+*> provides error bounds and backward error estimates for the
+*> solution. In addition to normwise error bound, the code provides
+*> maximum componentwise error bound if possible. See comments for
+*> ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or A =
+*> L*D*L**T as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension (NPARAMS)
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+* =====================================================================
SUBROUTINE DSYRFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,274 +433,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DSYRFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite, and
-* provides error bounds and backward error estimates for the
-* solution. In addition to normwise error bound, the code provides
-* maximum componentwise error bound if possible. See comments for
-* ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or A =
-* L*D*L**T as computed by DSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension (NPARAMS)
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/dsysv.f b/SRC/dsysv.f
index ce166738..52bd5acb 100644
--- a/SRC/dsysv.f
+++ b/SRC/dsysv.f
@@ -1,11 +1,174 @@
+*> \brief <b> DSYSV computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, LWORK, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
+*> used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the block diagonal matrix D and the
+*> multipliers used to obtain the factor U or L from the
+*> factorization A = U*D*U**T or A = L*D*L**T as computed by
+*> DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by DSYTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= 1, and for best performance
+*> LWORK >= max(1,N*NB), where NB is the optimal blocksize for
+*> DSYTRF.
+*> for LWORK < N, TRS will be done with Level BLAS 2
+*> for LWORK >= N, TRS will be done with Level BLAS 3
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYsolve
+*
+* =====================================================================
SUBROUTINE DSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated d
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,94 +179,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
-* used to solve the system of equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the block diagonal matrix D and the
-* multipliers used to obtain the factor U or L from the
-* factorization A = U*D*U**T or A = L*D*L**T as computed by
-* DSYTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by DSYTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= 1, and for best performance
-* LWORK >= max(1,N*NB), where NB is the optimal blocksize for
-* DSYTRF.
-* for LWORK < N, TRS will be done with Level BLAS 2
-* for LWORK >= N, TRS will be done with Level BLAS 3
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dsysvx.f b/SRC/dsysvx.f
index 59b17eaa..1ac4a027 100644
--- a/SRC/dsysvx.f
+++ b/SRC/dsysvx.f
@@ -1,11 +1,285 @@
+*> \brief <b> DSYSVX computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
+* LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYSVX uses the diagonal pivoting factorization to compute the
+*> solution to a real system of linear equations A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
+*> The form of the factorization is
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AF and IPIV contain the factored form of
+*> A. AF and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) DOUBLE PRECISION array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by DSYTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= max(1,3*N), and for best
+*> performance, when FACT = 'N', LWORK >= max(1,3*N,N*NB), where
+*> NB is the optimal blocksize for DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYsolve
+*
+* =====================================================================
SUBROUTINE DSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
$ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
$ IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -18,173 +292,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DSYSVX uses the diagonal pivoting factorization to compute the
-* solution to a real system of linear equations A * X = B,
-* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
-* The form of the factorization is
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AF and IPIV contain the factored form of
-* A. AF and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) DOUBLE PRECISION array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by DSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by DSYTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by DSYTRF.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= max(1,3*N), and for best
-* performance, when FACT = 'N', LWORK >= max(1,3*N,N*NB), where
-* NB is the optimal blocksize for DSYTRF.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsysvxx.f b/SRC/dsysvxx.f
index a41de434..cd2f5237 100644
--- a/SRC/dsysvxx.f
+++ b/SRC/dsysvxx.f
@@ -1,18 +1,526 @@
+*> \brief \b DSYSVXX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> DSYSVXX uses the diagonal pivoting factorization to compute the
+*> solution to a double precision system of linear equations A * X = B, where A
+*> is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. DSYSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> DSYSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> DSYSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what DSYSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 3. If some D(i,i)=0, so that D is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is
+*> less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(R) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) DOUBLE PRECISION array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T as computed by DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block
+*> structure of D, as determined by DSYTRF. If IPIV(k) > 0,
+*> then rows and columns k and IPIV(k) were interchanged and
+*> D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
+*> IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
+*> -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
+*> diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
+*> then rows and columns k+1 and -IPIV(k) were interchanged
+*> and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block
+*> structure of D, as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension (NPARAMS)
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+* =====================================================================
SUBROUTINE DSYSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,368 +536,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* DSYSVXX uses the diagonal pivoting factorization to compute the
-* solution to a double precision system of linear equations A * X = B, where A
-* is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. DSYSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* DSYSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* DSYSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what DSYSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 3. If some D(i,i)=0, so that D is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is
-* less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(R) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) DOUBLE PRECISION array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T as computed by DSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block
-* structure of D, as determined by DSYTRF. If IPIV(k) > 0,
-* then rows and columns k and IPIV(k) were interchanged and
-* D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
-* IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
-* -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
-* diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
-* then rows and columns k+1 and -IPIV(k) were interchanged
-* and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block
-* structure of D, as determined by DSYTRF.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension (NPARAMS)
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/dsyswapr.f b/SRC/dsyswapr.f
index 59e545f7..02d0b125 100644
--- a/SRC/dsyswapr.f
+++ b/SRC/dsyswapr.f
@@ -1,54 +1,111 @@
- SUBROUTINE DSYSWAPR( UPLO, N, A, LDA, I1, I2)
+*> \brief \b DSYSWAPR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER I1, I2, LDA, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, N )
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DSYSWAPR( UPLO, N, A, LDA, I1, I2)
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, N )
+*
* Purpose
* =======
*
-* DSYSWAPR applies an elementary permutation on the rows and the columns of
-* a symmetric matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYSWAPR applies an elementary permutation on the rows and the columns of
+*> a symmetric matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] I1
+*> \verbatim
+*> I1 is INTEGER
+*> Index of the first row to swap
+*> \endverbatim
+*>
+*> \param[in] I2
+*> \verbatim
+*> I2 is INTEGER
+*> Index of the second row to swap
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by DSYTRF.
+*> \date November 2011
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \ingroup doubleSYauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ SUBROUTINE DSYSWAPR( UPLO, N, A, LDA, I1, I2)
*
-* I1 (input) INTEGER
-* Index of the first row to swap
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* I2 (input) INTEGER
-* Index of the second row to swap
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, N )
*
* =====================================================================
*
diff --git a/SRC/dsytd2.f b/SRC/dsytd2.f
index a2485489..d4079703 100644
--- a/SRC/dsytd2.f
+++ b/SRC/dsytd2.f
@@ -1,116 +1,149 @@
- SUBROUTINE DSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * )
-* ..
-*
+*> \brief \b DSYTD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* DSYTD2 reduces a real symmetric matrix A to symmetric tridiagonal
-* form T by an orthogonal similarity transformation: Q**T * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTD2 reduces a real symmetric matrix A to symmetric tridiagonal
+*> form T by an orthogonal similarity transformation: Q**T * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the orthogonal
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the orthogonal matrix Q as a product
-* of elementary reflectors. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \date November 2011
*
-* TAU (output) DOUBLE PRECISION array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \ingroup doubleSYcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*> A(1:i-1,i+1), and tau in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*> and tau in TAU(i).
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( d e v2 v3 v4 ) ( d )
+*> ( d e v3 v4 ) ( e d )
+*> ( d e v4 ) ( v1 e d )
+*> ( d e ) ( v1 v2 e d )
+*> ( d ) ( v1 v2 v3 e d )
+*>
+*> where d and e denote diagonal and off-diagonal elements of T, and vi
+*> denotes an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-* A(1:i-1,i+1), and tau in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-* and tau in TAU(i).
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( d e v2 v3 v4 ) ( d )
-* ( d e v3 v4 ) ( e d )
-* ( d e v4 ) ( v1 e d )
-* ( d e ) ( v1 v2 e d )
-* ( d ) ( v1 v2 v3 e d )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of T, and vi
-* denotes an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsytf2.f b/SRC/dsytf2.f
index 53839181..768f1752 100644
--- a/SRC/dsytf2.f
+++ b/SRC/dsytf2.f
@@ -1,9 +1,183 @@
+*> \brief \b DSYTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYTF2( UPLO, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTF2 computes the factorization of a real symmetric matrix A using
+*> the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U**T is the transpose of U, and D is symmetric and
+*> block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 09-29-06 - patch from
+*> Bobby Cheng, MathWorks
+*>
+*> Replace l.204 and l.372
+*> IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*> by
+*> IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN
+*>
+*> 01-01-96 - Based on modifications by
+*> J. Lewis, Boeing Computer Services Company
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*> 1-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSYTF2( UPLO, N, A, LDA, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,116 +188,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DSYTF2 computes the factorization of a real symmetric matrix A using
-* the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U**T is the transpose of U, and D is symmetric and
-* block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 09-29-06 - patch from
-* Bobby Cheng, MathWorks
-*
-* Replace l.204 and l.372
-* IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
-* by
-* IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN
-*
-* 01-01-96 - Based on modifications by
-* J. Lewis, Boeing Computer Services Company
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-* 1-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dsytrd.f b/SRC/dsytrd.f
index 53bbab73..b53e61da 100644
--- a/SRC/dsytrd.f
+++ b/SRC/dsytrd.f
@@ -1,129 +1,163 @@
- SUBROUTINE DSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b DSYTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DSYTRD reduces a real symmetric matrix A to real symmetric
-* tridiagonal form T by an orthogonal similarity transformation:
-* Q**T * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTRD reduces a real symmetric matrix A to real symmetric
+*> tridiagonal form T by an orthogonal similarity transformation:
+*> Q**T * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the orthogonal
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the orthogonal matrix Q as a product
-* of elementary reflectors. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
-*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
-*
-* TAU (output) DOUBLE PRECISION array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1.
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleSYcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) DOUBLE PRECISION array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= 1.
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*> A(1:i-1,i+1), and tau in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*> and tau in TAU(i).
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( d e v2 v3 v4 ) ( d )
+*> ( d e v3 v4 ) ( e d )
+*> ( d e v4 ) ( v1 e d )
+*> ( d e ) ( v1 v2 e d )
+*> ( d ) ( v1 v2 v3 e d )
+*>
+*> where d and e denote diagonal and off-diagonal elements of T, and vi
+*> denotes an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-* A(1:i-1,i+1), and tau in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-* and tau in TAU(i).
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( d e v2 v3 v4 ) ( d )
-* ( d e v3 v4 ) ( e d )
-* ( d e v4 ) ( v1 e d )
-* ( d e ) ( v1 v2 e d )
-* ( d ) ( v1 v2 v3 e d )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of T, and vi
-* denotes an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsytrf.f b/SRC/dsytrf.f
index 1f0ad3c3..21be2e6c 100644
--- a/SRC/dsytrf.f
+++ b/SRC/dsytrf.f
@@ -1,9 +1,187 @@
+*> \brief \b DSYTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTRF computes the factorization of a real symmetric matrix A using
+*> the Bunch-Kaufman diagonal pivoting method. The form of the
+*> factorization is
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1. For best performance
+*> LWORK >= N*NB, where NB is the block size returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,113 +192,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYTRF computes the factorization of a real symmetric matrix A using
-* the Bunch-Kaufman diagonal pivoting method. The form of the
-* factorization is
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1. For best performance
-* LWORK >= N*NB, where NB is the block size returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dsytri.f b/SRC/dsytri.f
index 9b3ba6c0..c55ebe9c 100644
--- a/SRC/dsytri.f
+++ b/SRC/dsytri.f
@@ -1,63 +1,125 @@
- SUBROUTINE DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b DSYTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DSYTRI computes the inverse of a real symmetric indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* DSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTRI computes the inverse of a real symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> DSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by DSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup doubleSYcomputational
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
+* =====================================================================
+ SUBROUTINE DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsytri2.f b/SRC/dsytri2.f
index b13b1c81..012973aa 100644
--- a/SRC/dsytri2.f
+++ b/SRC/dsytri2.f
@@ -1,13 +1,130 @@
+*> \brief \b DSYTRI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTRI2 computes the inverse of a DOUBLE PRECISION hermitian indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> DSYTRF. DSYTRI2 sets the LEADING DIMENSION of the workspace
+*> before calling DSYTRI2X that actually computes the inverse.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NB structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N+NB+1)*(NB+3)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> WORK is size >= (N+NB+1)*(NB+3)
+*> If LDWORK = -1, then a workspace query is assumed; the routine
+*> calculates:
+*> - the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array,
+*> - and no error message related to LDWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+* =====================================================================
SUBROUTINE DSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* -- Written by Julie Langou of the Univ. of TN --
+* November 2011
*
-* @generated d
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER INFO, LDA, LWORK, N
@@ -17,61 +134,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYTRI2 computes the inverse of a DOUBLE PRECISION hermitian indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* DSYTRF. DSYTRI2 sets the LEADING DIMENSION of the workspace
-* before calling DSYTRI2X that actually computes the inverse.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by DSYTRF.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NB structure of D
-* as determined by DSYTRF.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N+NB+1)*(NB+3)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* WORK is size >= (N+NB+1)*(NB+3)
-* If LDWORK = -1, then a workspace query is assumed; the routine
-* calculates:
-* - the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array,
-* - and no error message related to LDWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/dsytri2x.f b/SRC/dsytri2x.f
index 2eb42710..ad01f4cb 100644
--- a/SRC/dsytri2x.f
+++ b/SRC/dsytri2x.f
@@ -1,68 +1,131 @@
- SUBROUTINE DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*> \brief \b DSYTRI2X
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N, NB
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), WORK( N+NB+1,* )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( N+NB+1,* )
+* ..
+*
* Purpose
* =======
*
-* DSYTRI2X computes the inverse of a real symmetric indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* DSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTRI2X computes the inverse of a real symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> DSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the NNB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by DSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the NNB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NNB structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N+NNB+1,NNB+3)
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NNB structure of D
-* as determined by DSYTRF.
+*> \ingroup doubleSYcomputational
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N+NNB+1,NNB+3)
+* =====================================================================
+ SUBROUTINE DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
*
-* NB (input) INTEGER
-* Block size
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), WORK( N+NB+1,* )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsytrs.f b/SRC/dsytrs.f
index c32b8e84..d7a5d683 100644
--- a/SRC/dsytrs.f
+++ b/SRC/dsytrs.f
@@ -1,63 +1,130 @@
- SUBROUTINE DSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DSYTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DSYTRS solves a system of linear equations A*X = B with a real
-* symmetric matrix A using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by DSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTRS solves a system of linear equations A*X = B with a real
+*> symmetric matrix A using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by DSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
+*> \ingroup doubleSYcomputational
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE DSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dsytrs2.f b/SRC/dsytrs2.f
index 2de7d999..400f6bf7 100644
--- a/SRC/dsytrs2.f
+++ b/SRC/dsytrs2.f
@@ -1,68 +1,137 @@
- SUBROUTINE DSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
- $ WORK, INFO )
+*> \brief \b DSYTRS2
*
-* -- LAPACK PROTOTYPE routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DSYTRS2 solves a system of linear equations A*X = B with a real
-* symmetric matrix A using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by DSYTRF and converted by DSYCONV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYTRS2 solves a system of linear equations A*X = B with a real
+*> symmetric matrix A using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by DSYTRF and converted by DSYCONV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
+*> \date November 2011
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \ingroup doubleSYcomputational
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE DSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+ $ WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtbcon.f b/SRC/dtbcon.f
index 88237cea..ea924354 100644
--- a/SRC/dtbcon.f
+++ b/SRC/dtbcon.f
@@ -1,12 +1,144 @@
+*> \brief \b DTBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, KD, LDAB, N
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBCON estimates the reciprocal of the condition number of a
+*> triangular band matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,65 +150,6 @@
DOUBLE PRECISION AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTBCON estimates the reciprocal of the condition number of a
-* triangular band matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtbrfs.f b/SRC/dtbrfs.f
index aa493144..878dee91 100644
--- a/SRC/dtbrfs.f
+++ b/SRC/dtbrfs.f
@@ -1,12 +1,189 @@
+*> \brief \b DTBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular band
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by DTBTRS or some other
+*> means before entering this routine. DTBRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,92 +195,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DTBRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular band
-* coefficient matrix.
-*
-* The solution matrix X must be computed by DTBTRS or some other
-* means before entering this routine. DTBRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtbtrs.f b/SRC/dtbtrs.f
index d79a193e..7f5d522d 100644
--- a/SRC/dtbtrs.f
+++ b/SRC/dtbtrs.f
@@ -1,10 +1,147 @@
+*> \brief \b DTBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBTRS solves a triangular system of the form
+*>
+*> A * X = B or A**T * X = B,
+*>
+*> where A is a triangular band matrix of order N, and B is an
+*> N-by NRHS matrix. A check is made to verify that A is nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of AB. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the
+*> solutions X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,70 +151,6 @@
DOUBLE PRECISION AB( LDAB, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DTBTRS solves a triangular system of the form
-*
-* A * X = B or A**T * X = B,
-*
-* where A is a triangular band matrix of order N, and B is an
-* N-by NRHS matrix. A check is made to verify that A is nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of AB. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the
-* solutions X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtfsm.f b/SRC/dtfsm.f
index 7ce92e45..9781ba28 100644
--- a/SRC/dtfsm.f
+++ b/SRC/dtfsm.f
@@ -1,217 +1,302 @@
- SUBROUTINE DTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
- $ B, LDB )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b DTFSM
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
- INTEGER LDB, M, N
- DOUBLE PRECISION ALPHA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( 0: * ), B( 0: LDB-1, 0: * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
+* B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
+* INTEGER LDB, M, N
+* DOUBLE PRECISION ALPHA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( 0: * ), B( 0: LDB-1, 0: * )
+* ..
+*
* Purpose
* =======
*
-* Level 3 BLAS like routine for A in RFP Format.
-*
-* DTFSM solves the matrix equation
-*
-* op( A )*X = alpha*B or X*op( A ) = alpha*B
-*
-* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T.
-*
-* A is in Rectangular Full Packed (RFP) Format.
-*
-* The matrix X is overwritten on B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Level 3 BLAS like routine for A in RFP Format.
+*>
+*> DTFSM solves the matrix equation
+*>
+*> op( A )*X = alpha*B or X*op( A ) = alpha*B
+*>
+*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T.
+*>
+*> A is in Rectangular Full Packed (RFP) Format.
+*>
+*> The matrix X is overwritten on B.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal Form of RFP A is stored;
-* = 'T': The Transpose Form of RFP A is stored.
-*
-* SIDE (input) CHARACTER*1
-* On entry, SIDE specifies whether op( A ) appears on the left
-* or right of X as follows:
-*
-* SIDE = 'L' or 'l' op( A )*X = alpha*B.
-*
-* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
-*
-* Unchanged on exit.
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the RFP matrix A came from
-* an upper or lower triangular matrix as follows:
-* UPLO = 'U' or 'u' RFP A came from an upper triangular matrix
-* UPLO = 'L' or 'l' RFP A came from a lower triangular matrix
-*
-* Unchanged on exit.
-*
-* TRANS (input) CHARACTER*1
-* On entry, TRANS specifies the form of op( A ) to be used
-* in the matrix multiplication as follows:
-*
-* TRANS = 'N' or 'n' op( A ) = A.
-*
-* TRANS = 'T' or 't' op( A ) = A'.
-*
-* Unchanged on exit.
-*
-* DIAG (input) CHARACTER*1
-* On entry, DIAG specifies whether or not RFP A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* =========
*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal Form of RFP A is stored;
+*> = 'T': The Transpose Form of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) appears on the left
+*> or right of X as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the RFP matrix A came from
+*> an upper or lower triangular matrix as follows:
+*> UPLO = 'U' or 'u' RFP A came from an upper triangular matrix
+*> UPLO = 'L' or 'l' RFP A came from a lower triangular matrix
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the form of op( A ) to be used
+*> in the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' op( A ) = A'.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not RFP A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NT)
+*> NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
+*> RFP Format is described by TRANSR, UPLO and N as follows:
+*> If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
+*> K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
+*> TRANSR = 'T' then RFP is the transpose of RFP A as
+*> defined when TRANSR = 'N'. The contents of RFP A are defined
+*> by UPLO as follows: If UPLO = 'U' the RFP A contains the NT
+*> elements of upper packed A either in normal or
+*> transpose Format. If UPLO = 'L' the RFP A contains
+*> the NT elements of lower packed A either in normal or
+*> transpose Format. The LDA of RFP A is (N+1)/2 when
+*> TRANSR = 'T'. When TRANSR is 'N' the LDA is N+1 when N is
+*> even and is N when is odd.
+*> See the Note below for more details. Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> Before entry, the leading m by n part of the array B must
+*> contain the right-hand side matrix B, and on exit is
+*> overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) DOUBLE PRECISION
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (NT)
-* NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
-* RFP Format is described by TRANSR, UPLO and N as follows:
-* If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
-* K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
-* TRANSR = 'T' then RFP is the transpose of RFP A as
-* defined when TRANSR = 'N'. The contents of RFP A are defined
-* by UPLO as follows: If UPLO = 'U' the RFP A contains the NT
-* elements of upper packed A either in normal or
-* transpose Format. If UPLO = 'L' the RFP A contains
-* the NT elements of lower packed A either in normal or
-* transpose Format. The LDA of RFP A is (N+1)/2 when
-* TRANSR = 'T'. When TRANSR is 'N' the LDA is N+1 when N is
-* even and is N when is odd.
-* See the Note below for more details. Unchanged on exit.
+*> \date November 2011
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* Before entry, the leading m by n part of the array B must
-* contain the right-hand side matrix B, and on exit is
-* overwritten by the solution matrix X.
+*> \ingroup doubleOTHERcomputational
*
-* LDB (input) INTEGER
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> Reference
+*> =========
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
+ $ B, LDB )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
-*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference
-* =========
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
+ INTEGER LDB, M, N
+ DOUBLE PRECISION ALPHA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( 0: * ), B( 0: LDB-1, 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtftri.f b/SRC/dtftri.f
index 74e7008f..e1a9b6a3 100644
--- a/SRC/dtftri.f
+++ b/SRC/dtftri.f
@@ -1,153 +1,213 @@
- SUBROUTINE DTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 ----
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO, DIAG
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( 0: * )
-* ..
-*
+*> \brief \b DTFTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO, DIAG
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* DTFTRI computes the inverse of a triangular matrix A stored in RFP
-* format.
-*
-* This is a Level 3 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTFTRI computes the inverse of a triangular matrix A stored in RFP
+*> format.
+*>
+*> This is a Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'T': The Transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (0:nt-1);
-* nt=N*(N+1)/2. On entry, the triangular factor of a Hermitian
-* Positive Definite matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
-* the transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A; If UPLO = 'L' the RFP A contains the nt
-* elements of lower packed A. The LDA of RFP A is (N+1)/2 when
-* TRANSR = 'T'. When TRANSR is 'N' the LDA is N+1 when N is
-* even and N is odd. See the Note below for more details.
-*
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
-*
-* Further Details
-* ===============
-*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'T': The Transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (0:nt-1);
+*> nt=N*(N+1)/2. On entry, the triangular factor of a Hermitian
+*> Positive Definite matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
+*> the transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A; If UPLO = 'L' the RFP A contains the nt
+*> elements of lower packed A. The LDA of RFP A is (N+1)/2 when
+*> TRANSR = 'T'. When TRANSR is 'N' the LDA is N+1 when N is
+*> even and N is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
+*> \date November 2011
*
-* RFP A RFP A
+*> \ingroup doubleOTHERcomputational
*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO, DIAG
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtfttp.f b/SRC/dtfttp.f
index 8c5164fc..07b08e96 100644
--- a/SRC/dtfttp.f
+++ b/SRC/dtfttp.f
@@ -1,140 +1,198 @@
- SUBROUTINE DTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b DTFTTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* DTFTTP copies a triangular matrix A from rectangular full packed
-* format (TF) to standard packed format (TP).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTFTTP copies a triangular matrix A from rectangular full packed
+*> format (TF) to standard packed format (TP).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF is in Normal format;
-* = 'T': ARF is in Transpose format;
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF is in Normal format;
+*> = 'T': ARF is in Transpose format;
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ARF
+*> \verbatim
+*> ARF is DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ARF (input) DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \date November 2011
*
-* AP (output) DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtfttr.f b/SRC/dtfttr.f
index 8589af44..1f33c300 100644
--- a/SRC/dtfttr.f
+++ b/SRC/dtfttr.f
@@ -1,148 +1,210 @@
- SUBROUTINE DTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N, LDA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( 0: LDA-1, 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b DTFTTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* DTFTTR copies a triangular matrix A from rectangular full packed
-* format (TF) to standard full format (TR).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTFTTR copies a triangular matrix A from rectangular full packed
+*> format (TF) to standard full format (TR).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF is in Normal format;
-* = 'T': ARF is in Transpose format.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrices ARF and A. N >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF is in Normal format;
+*> = 'T': ARF is in Transpose format.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices ARF and A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ARF
+*> \verbatim
+*> ARF is DOUBLE PRECISION array, dimension (N*(N+1)/2).
+*> On entry, the upper (if UPLO = 'U') or lower (if UPLO = 'L')
+*> matrix A in RFP format. See the "Notes" below for more
+*> details.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On exit, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ARF (input) DOUBLE PRECISION array, dimension (N*(N+1)/2).
-* On entry, the upper (if UPLO = 'U') or lower (if UPLO = 'L')
-* matrix A in RFP format. See the "Notes" below for more
-* details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) DOUBLE PRECISION array, dimension (LDA,N)
-* On exit, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> Reference
+*> =========
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
-*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference
-* =========
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtgevc.f b/SRC/dtgevc.f
index cf8bff8e..a375f0d7 100644
--- a/SRC/dtgevc.f
+++ b/SRC/dtgevc.f
@@ -1,212 +1,312 @@
- SUBROUTINE DTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
- $ LDVL, VR, LDVR, MM, M, WORK, INFO )
+*> \brief \b DTGEVC
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER HOWMNY, SIDE
- INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N
-* ..
-* .. Array Arguments ..
- LOGICAL SELECT( * )
- DOUBLE PRECISION P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
- $ VR( LDVR, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
*
+* SUBROUTINE DTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
+* LDVL, VR, LDVR, MM, M, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, SIDE
+* INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* DOUBLE PRECISION P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+*
* Purpose
* =======
*
-* DTGEVC computes some or all of the right and/or left eigenvectors of
-* a pair of real matrices (S,P), where S is a quasi-triangular matrix
-* and P is upper triangular. Matrix pairs of this type are produced by
-* the generalized Schur factorization of a matrix pair (A,B):
-*
-* A = Q*S*Z**T, B = Q*P*Z**T
-*
-* as computed by DGGHRD + DHGEQZ.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTGEVC computes some or all of the right and/or left eigenvectors of
+*> a pair of real matrices (S,P), where S is a quasi-triangular matrix
+*> and P is upper triangular. Matrix pairs of this type are produced by
+*> the generalized Schur factorization of a matrix pair (A,B):
+*>
+*> A = Q*S*Z**T, B = Q*P*Z**T
+*>
+*> as computed by DGGHRD + DHGEQZ.
+*>
+*> The right eigenvector x and the left eigenvector y of (S,P)
+*> corresponding to an eigenvalue w are defined by:
+*>
+*> S*x = w*P*x, (y**H)*S = w*(y**H)*P,
+*>
+*> where y**H denotes the conjugate tranpose of y.
+*> The eigenvalues are not input to this routine, but are computed
+*> directly from the diagonal blocks of S and P.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of (S,P), or the products Z*X and/or Q*Y,
+*> where Z and Q are input matrices.
+*> If Q and Z are the orthogonal factors from the generalized Schur
+*> factorization of a matrix pair (A,B), then Z*X and Q*Y
+*> are the matrices of right and left eigenvectors of (A,B).
+*>
+*>\endverbatim
*
-* The right eigenvector x and the left eigenvector y of (S,P)
-* corresponding to an eigenvalue w are defined by:
-*
-* S*x = w*P*x, (y**H)*S = w*(y**H)*P,
-*
-* where y**H denotes the conjugate tranpose of y.
-* The eigenvalues are not input to this routine, but are computed
-* directly from the diagonal blocks of S and P.
-*
-* This routine returns the matrices X and/or Y of right and left
-* eigenvectors of (S,P), or the products Z*X and/or Q*Y,
-* where Z and Q are input matrices.
-* If Q and Z are the orthogonal factors from the generalized Schur
-* factorization of a matrix pair (A,B), then Z*X and Q*Y
-* are the matrices of right and left eigenvectors of (A,B).
-*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute all right and/or left eigenvectors;
-* = 'B': compute all right and/or left eigenvectors,
-* backtransformed by the matrices in VR and/or VL;
-* = 'S': compute selected right and/or left eigenvectors,
-* specified by the logical array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY='S', SELECT specifies the eigenvectors to be
-* computed. If w(j) is a real eigenvalue, the corresponding
-* real eigenvector is computed if SELECT(j) is .TRUE..
-* If w(j) and w(j+1) are the real and imaginary parts of a
-* complex eigenvalue, the corresponding complex eigenvector
-* is computed if either SELECT(j) or SELECT(j+1) is .TRUE.,
-* and on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is
-* set to .FALSE..
-* Not referenced if HOWMNY = 'A' or 'B'.
-*
-* N (input) INTEGER
-* The order of the matrices S and P. N >= 0.
-*
-* S (input) DOUBLE PRECISION array, dimension (LDS,N)
-* The upper quasi-triangular matrix S from a generalized Schur
-* factorization, as computed by DHGEQZ.
-*
-* LDS (input) INTEGER
-* The leading dimension of array S. LDS >= max(1,N).
-*
-* P (input) DOUBLE PRECISION array, dimension (LDP,N)
-* The upper triangular matrix P from a generalized Schur
-* factorization, as computed by DHGEQZ.
-* 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks
-* of S must be in positive diagonal form.
-*
-* LDP (input) INTEGER
-* The leading dimension of array P. LDP >= max(1,N).
-*
-* VL (input/output) DOUBLE PRECISION array, dimension (LDVL,MM)
-* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-* contain an N-by-N matrix Q (usually the orthogonal matrix Q
-* of left Schur vectors returned by DHGEQZ).
-* On exit, if SIDE = 'L' or 'B', VL contains:
-* if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
-* if HOWMNY = 'B', the matrix Q*Y;
-* if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
-* SELECT, stored consecutively in the columns of
-* VL, in the same order as their eigenvalues.
-*
-* A complex eigenvector corresponding to a complex eigenvalue
-* is stored in two consecutive columns, the first holding the
-* real part, and the second the imaginary part.
-*
-* Not referenced if SIDE = 'R'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of array VL. LDVL >= 1, and if
-* SIDE = 'L' or 'B', LDVL >= N.
-*
-* VR (input/output) DOUBLE PRECISION array, dimension (LDVR,MM)
-* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-* contain an N-by-N matrix Z (usually the orthogonal matrix Z
-* of right Schur vectors returned by DHGEQZ).
-*
-* On exit, if SIDE = 'R' or 'B', VR contains:
-* if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
-* if HOWMNY = 'B' or 'b', the matrix Z*X;
-* if HOWMNY = 'S' or 's', the right eigenvectors of (S,P)
-* specified by SELECT, stored consecutively in the
-* columns of VR, in the same order as their
-* eigenvalues.
-*
-* A complex eigenvector corresponding to a complex eigenvalue
-* is stored in two consecutive columns, the first holding the
-* real part and the second the imaginary part.
-*
-* Not referenced if SIDE = 'L'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* SIDE = 'R' or 'B', LDVR >= N.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR actually
-* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
-* is set to N. Each selected real eigenvector occupies one
-* column and each selected complex eigenvector occupies two
-* columns.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (6*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the 2-by-2 block (INFO:INFO+1) does not have a complex
-* eigenvalue.
-*
-* Further Details
-* ===============
-*
-* Allocation of workspace:
-* ---------- -- ---------
-*
-* WORK( j ) = 1-norm of j-th column of A, above the diagonal
-* WORK( N+j ) = 1-norm of j-th column of B, above the diagonal
-* WORK( 2*N+1:3*N ) = real part of eigenvector
-* WORK( 3*N+1:4*N ) = imaginary part of eigenvector
-* WORK( 4*N+1:5*N ) = real part of back-transformed eigenvector
-* WORK( 5*N+1:6*N ) = imaginary part of back-transformed eigenvector
-*
-* Rowwise vs. columnwise solution methods:
-* ------- -- ---------- -------- -------
-*
-* Finding a generalized eigenvector consists basically of solving the
-* singular triangular system
-*
-* (A - w B) x = 0 (for right) or: (A - w B)**H y = 0 (for left)
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute all right and/or left eigenvectors;
+*> = 'B': compute all right and/or left eigenvectors,
+*> backtransformed by the matrices in VR and/or VL;
+*> = 'S': compute selected right and/or left eigenvectors,
+*> specified by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY='S', SELECT specifies the eigenvectors to be
+*> computed. If w(j) is a real eigenvalue, the corresponding
+*> real eigenvector is computed if SELECT(j) is .TRUE..
+*> If w(j) and w(j+1) are the real and imaginary parts of a
+*> complex eigenvalue, the corresponding complex eigenvector
+*> is computed if either SELECT(j) or SELECT(j+1) is .TRUE.,
+*> and on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is
+*> set to .FALSE..
+*> Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices S and P. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (LDS,N)
+*> The upper quasi-triangular matrix S from a generalized Schur
+*> factorization, as computed by DHGEQZ.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of array S. LDS >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is DOUBLE PRECISION array, dimension (LDP,N)
+*> The upper triangular matrix P from a generalized Schur
+*> factorization, as computed by DHGEQZ.
+*> 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks
+*> of S must be in positive diagonal form.
+*> \endverbatim
+*>
+*> \param[in] LDP
+*> \verbatim
+*> LDP is INTEGER
+*> The leading dimension of array P. LDP >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,MM)
+*> On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*> contain an N-by-N matrix Q (usually the orthogonal matrix Q
+*> of left Schur vectors returned by DHGEQZ).
+*> On exit, if SIDE = 'L' or 'B', VL contains:
+*> if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
+*> if HOWMNY = 'B', the matrix Q*Y;
+*> if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
+*> SELECT, stored consecutively in the columns of
+*> VL, in the same order as their eigenvalues.
+*> \endverbatim
+*> \verbatim
+*> A complex eigenvector corresponding to a complex eigenvalue
+*> is stored in two consecutive columns, the first holding the
+*> real part, and the second the imaginary part.
+*> \endverbatim
+*> \verbatim
+*> Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of array VL. LDVL >= 1, and if
+*> SIDE = 'L' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,MM)
+*> On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*> contain an N-by-N matrix Z (usually the orthogonal matrix Z
+*> of right Schur vectors returned by DHGEQZ).
+*> \endverbatim
+*> \verbatim
+*> On exit, if SIDE = 'R' or 'B', VR contains:
+*> if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
+*> if HOWMNY = 'B' or 'b', the matrix Z*X;
+*> if HOWMNY = 'S' or 's', the right eigenvectors of (S,P)
+*> specified by SELECT, stored consecutively in the
+*> columns of VR, in the same order as their
+*> eigenvalues.
+*> \endverbatim
+*> \verbatim
+*> A complex eigenvector corresponding to a complex eigenvalue
+*> is stored in two consecutive columns, the first holding the
+*> real part and the second the imaginary part.
+*>
+*> Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> SIDE = 'R' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR actually
+*> used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
+*> is set to N. Each selected real eigenvector occupies one
+*> column and each selected complex eigenvector occupies two
+*> columns.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (6*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the 2-by-2 block (INFO:INFO+1) does not have a complex
+*> eigenvalue.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Consider finding the i-th right eigenvector (assume all eigenvalues
-* are real). The equation to be solved is:
-* n i
-* 0 = sum C(j,k) v(k) = sum C(j,k) v(k) for j = i,. . .,1
-* k=j k=j
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where C = (A - w B) (The components v(i+1:n) are 0.)
+*> \date November 2011
*
-* The "rowwise" method is:
+*> \ingroup doubleGEcomputational
*
-* (1) v(i) := 1
-* for j = i-1,. . .,1:
-* i
-* (2) compute s = - sum C(j,k) v(k) and
-* k=j+1
*
-* (3) v(j) := s / C(j,j)
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Allocation of workspace:
+*> ---------- -- ---------
+*>
+*> WORK( j ) = 1-norm of j-th column of A, above the diagonal
+*> WORK( N+j ) = 1-norm of j-th column of B, above the diagonal
+*> WORK( 2*N+1:3*N ) = real part of eigenvector
+*> WORK( 3*N+1:4*N ) = imaginary part of eigenvector
+*> WORK( 4*N+1:5*N ) = real part of back-transformed eigenvector
+*> WORK( 5*N+1:6*N ) = imaginary part of back-transformed eigenvector
+*>
+*> Rowwise vs. columnwise solution methods:
+*> ------- -- ---------- -------- -------
+*>
+*> Finding a generalized eigenvector consists basically of solving the
+*> singular triangular system
+*>
+*> (A - w B) x = 0 (for right) or: (A - w B)**H y = 0 (for left)
+*>
+*> Consider finding the i-th right eigenvector (assume all eigenvalues
+*> are real). The equation to be solved is:
+*> n i
+*> 0 = sum C(j,k) v(k) = sum C(j,k) v(k) for j = i,. . .,1
+*> k=j k=j
+*>
+*> where C = (A - w B) (The components v(i+1:n) are 0.)
+*>
+*> The "rowwise" method is:
+*>
+*> (1) v(i) := 1
+*> for j = i-1,. . .,1:
+*> i
+*> (2) compute s = - sum C(j,k) v(k) and
+*> k=j+1
+*>
+*> (3) v(j) := s / C(j,j)
+*>
+*> Step 2 is sometimes called the "dot product" step, since it is an
+*> inner product between the j-th row and the portion of the eigenvector
+*> that has been computed so far.
+*>
+*> The "columnwise" method consists basically in doing the sums
+*> for all the rows in parallel. As each v(j) is computed, the
+*> contribution of v(j) times the j-th column of C is added to the
+*> partial sums. Since FORTRAN arrays are stored columnwise, this has
+*> the advantage that at each step, the elements of C that are accessed
+*> are adjacent to one another, whereas with the rowwise method, the
+*> elements accessed at a step are spaced LDS (and LDP) words apart.
+*>
+*> When finding left eigenvectors, the matrix in question is the
+*> transpose of the one in storage, so the rowwise method then
+*> actually accesses columns of A and B at each step, and so is the
+*> preferred method.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
+ $ LDVL, VR, LDVR, MM, M, WORK, INFO )
*
-* Step 2 is sometimes called the "dot product" step, since it is an
-* inner product between the j-th row and the portion of the eigenvector
-* that has been computed so far.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* The "columnwise" method consists basically in doing the sums
-* for all the rows in parallel. As each v(j) is computed, the
-* contribution of v(j) times the j-th column of C is added to the
-* partial sums. Since FORTRAN arrays are stored columnwise, this has
-* the advantage that at each step, the elements of C that are accessed
-* are adjacent to one another, whereas with the rowwise method, the
-* elements accessed at a step are spaced LDS (and LDP) words apart.
+* .. Scalar Arguments ..
+ CHARACTER HOWMNY, SIDE
+ INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+ LOGICAL SELECT( * )
+ DOUBLE PRECISION P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
+ $ VR( LDVR, * ), WORK( * )
+* ..
*
-* When finding left eigenvectors, the matrix in question is the
-* transpose of the one in storage, so the rowwise method then
-* actually accesses columns of A and B at each step, and so is the
-* preferred method.
*
* =====================================================================
*
diff --git a/SRC/dtgex2.f b/SRC/dtgex2.f
index ae743a91..c226dbf9 100644
--- a/SRC/dtgex2.f
+++ b/SRC/dtgex2.f
@@ -1,131 +1,228 @@
- SUBROUTINE DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
- $ LDZ, J1, N1, N2, WORK, LWORK, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- LOGICAL WANTQ, WANTZ
- INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
- $ WORK( * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b DTGEX2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+* LDZ, J1, N1, N2, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* DTGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22)
-* of size 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair
-* (A, B) by an orthogonal equivalence transformation.
-*
-* (A, B) must be in generalized real Schur canonical form (as returned
-* by DGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2
-* diagonal blocks. B is upper triangular.
-*
-* Optionally, the matrices Q and Z of generalized Schur vectors are
-* updated.
-*
-* Q(in) * A(in) * Z(in)**T = Q(out) * A(out) * Z(out)**T
-* Q(in) * B(in) * Z(in)**T = Q(out) * B(out) * Z(out)**T
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22)
+*> of size 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair
+*> (A, B) by an orthogonal equivalence transformation.
+*>
+*> (A, B) must be in generalized real Schur canonical form (as returned
+*> by DGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2
+*> diagonal blocks. B is upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*> Q(in) * A(in) * Z(in)**T = Q(out) * A(out) * Z(out)**T
+*> Q(in) * B(in) * Z(in)**T = Q(out) * B(out) * Z(out)**T
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimensions (LDA,N)
-* On entry, the matrix A in the pair (A, B).
-* On exit, the updated matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimensions (LDB,N)
-* On entry, the matrix B in the pair (A, B).
-* On exit, the updated matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
-* On exit, the updated matrix Q.
-* Not referenced if WANTQ = .FALSE..
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
-* On entry, if WANTZ =.TRUE., the orthogonal matrix Z.
-* On exit, the updated matrix Z.
-* Not referenced if WANTZ = .FALSE..
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If WANTZ = .TRUE., LDZ >= N.
-*
-* J1 (input) INTEGER
-* The index to the first block (A11, B11). 1 <= J1 <= N.
-*
-* N1 (input) INTEGER
-* The order of the first block (A11, B11). N1 = 0, 1 or 2.
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimensions (LDA,N)
+*> On entry, the matrix A in the pair (A, B).
+*> On exit, the updated matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimensions (LDB,N)
+*> On entry, the matrix B in the pair (A, B).
+*> On exit, the updated matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
+*> On exit, the updated matrix Q.
+*> Not referenced if WANTQ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,N)
+*> On entry, if WANTZ =.TRUE., the orthogonal matrix Z.
+*> On exit, the updated matrix Z.
+*> Not referenced if WANTZ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in] J1
+*> \verbatim
+*> J1 is INTEGER
+*> The index to the first block (A11, B11). 1 <= J1 <= N.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The order of the first block (A11, B11). N1 = 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> The order of the second block (A22, B22). N2 = 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)).
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX( 1, N*(N2+N1), (N2+N1)*(N2+N1)*2 )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit
+*> >0: If INFO = 1, the transformed matrix (A, B) would be
+*> too far from generalized Schur form; the blocks are
+*> not swapped and (A, B) and (Q, Z) are unchanged.
+*> The problem of swapping is too ill-conditioned.
+*> <0: If INFO = -16: LWORK is too small. Appropriate value
+*> for LWORK is returned in WORK(1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N2 (input) INTEGER
-* The order of the second block (A22, B22). N2 = 0, 1 or 2.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)).
+*> \date November 2011
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX( 1, N*(N2+N1), (N2+N1)*(N2+N1)*2 )
+*> \ingroup doubleGEauxiliary
*
-* INFO (output) INTEGER
-* =0: Successful exit
-* >0: If INFO = 1, the transformed matrix (A, B) would be
-* too far from generalized Schur form; the blocks are
-* not swapped and (A, B) and (Q, Z) are unchanged.
-* The problem of swapping is too ill-conditioned.
-* <0: If INFO = -16: LWORK is too small. Appropriate value
-* for LWORK is returned in WORK(1).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> In the current code both weak and strong stability tests are
+*> performed. The user can omit the strong stability test by changing
+*> the internal logical parameter WANDS to .FALSE.. See ref. [2] for
+*> details.
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software,
+*> Report UMINF - 94.04, Department of Computing Science, Umea
+*> University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
+*> Note 87. To appear in Numerical Algorithms, 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+ $ LDZ, J1, N1, N2, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* In the current code both weak and strong stability tests are
-* performed. The user can omit the strong stability test by changing
-* the internal logical parameter WANDS to .FALSE.. See ref. [2] for
-* details.
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software,
-* Report UMINF - 94.04, Department of Computing Science, Umea
-* University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
-* Note 87. To appear in Numerical Algorithms, 1996.
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL WANTQ, WANTZ
+ INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+ $ WORK( * ), Z( LDZ, * )
+* ..
*
* =====================================================================
* Replaced various illegal calls to DCOPY by calls to DLASET, or by DO
diff --git a/SRC/dtgexc.f b/SRC/dtgexc.f
index b9ed91e8..c2b61817 100644
--- a/SRC/dtgexc.f
+++ b/SRC/dtgexc.f
@@ -1,136 +1,231 @@
- SUBROUTINE DTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
- $ LDZ, IFST, ILST, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- LOGICAL WANTQ, WANTZ
- INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
- $ WORK( * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b DTGEXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+* LDZ, IFST, ILST, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* DTGEXC reorders the generalized real Schur decomposition of a real
-* matrix pair (A,B) using an orthogonal equivalence transformation
-*
-* (A, B) = Q * (A, B) * Z**T,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTGEXC reorders the generalized real Schur decomposition of a real
+*> matrix pair (A,B) using an orthogonal equivalence transformation
+*>
+*> (A, B) = Q * (A, B) * Z**T,
+*>
+*> so that the diagonal block of (A, B) with row index IFST is moved
+*> to row ILST.
+*>
+*> (A, B) must be in generalized real Schur canonical form (as returned
+*> by DGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2
+*> diagonal blocks. B is upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*> Q(in) * A(in) * Z(in)**T = Q(out) * A(out) * Z(out)**T
+*> Q(in) * B(in) * Z(in)**T = Q(out) * B(out) * Z(out)**T
+*>
+*>
+*>\endverbatim
*
-* so that the diagonal block of (A, B) with row index IFST is moved
-* to row ILST.
-*
-* (A, B) must be in generalized real Schur canonical form (as returned
-* by DGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2
-* diagonal blocks. B is upper triangular.
+* Arguments
+* =========
*
-* Optionally, the matrices Q and Z of generalized Schur vectors are
-* updated.
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the matrix A in generalized real Schur canonical
+*> form.
+*> On exit, the updated matrix A, again in generalized
+*> real Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the matrix B in generalized real Schur canonical
+*> form (A,B).
+*> On exit, the updated matrix B, again in generalized
+*> real Schur canonical form (A,B).
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
+*> On exit, the updated matrix Q.
+*> If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,N)
+*> On entry, if WANTZ = .TRUE., the orthogonal matrix Z.
+*> On exit, the updated matrix Z.
+*> If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] IFST
+*> \verbatim
+*> IFST is INTEGER
+*> \endverbatim
+*>
+*> \param[in,out] ILST
+*> \verbatim
+*> ILST is INTEGER
+*> Specify the reordering of the diagonal blocks of (A, B).
+*> The block with row index IFST is moved to row ILST, by a
+*> sequence of swapping between adjacent blocks.
+*> On exit, if IFST pointed on entry to the second row of
+*> a 2-by-2 block, it is changed to point to the first row;
+*> ILST always points to the first row of the block in its
+*> final position (which may differ from its input value by
+*> +1 or -1). 1 <= IFST, ILST <= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= 1 when N <= 1, otherwise LWORK >= 4*N + 16.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: successful exit.
+*> <0: if INFO = -i, the i-th argument had an illegal value.
+*> =1: The transformed matrix pair (A, B) would be too far
+*> from generalized Schur form; the problem is ill-
+*> conditioned. (A, B) may have been partially reordered,
+*> and ILST points to the first row of the current
+*> position of the block being moved.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Q(in) * A(in) * Z(in)**T = Q(out) * A(out) * Z(out)**T
-* Q(in) * B(in) * Z(in)**T = Q(out) * B(out) * Z(out)**T
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup doubleGEcomputational
*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the matrix A in generalized real Schur canonical
-* form.
-* On exit, the updated matrix A, again in generalized
-* real Schur canonical form.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the matrix B in generalized real Schur canonical
-* form (A,B).
-* On exit, the updated matrix B, again in generalized
-* real Schur canonical form (A,B).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
-* On exit, the updated matrix Q.
-* If WANTQ = .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
-* On entry, if WANTZ = .TRUE., the orthogonal matrix Z.
-* On exit, the updated matrix Z.
-* If WANTZ = .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If WANTZ = .TRUE., LDZ >= N.
-*
-* IFST (input/output) INTEGER
-*
-* ILST (input/output) INTEGER
-* Specify the reordering of the diagonal blocks of (A, B).
-* The block with row index IFST is moved to row ILST, by a
-* sequence of swapping between adjacent blocks.
-* On exit, if IFST pointed on entry to the second row of
-* a 2-by-2 block, it is changed to point to the first row;
-* ILST always points to the first row of the block in its
-* final position (which may differ from its input value by
-* +1 or -1). 1 <= IFST, ILST <= N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= 1 when N <= 1, otherwise LWORK >= 4*N + 16.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* =0: successful exit.
-* <0: if INFO = -i, the i-th argument had an illegal value.
-* =1: The transformed matrix pair (A, B) would be too far
-* from generalized Schur form; the problem is ill-
-* conditioned. (A, B) may have been partially reordered,
-* and ILST points to the first row of the current
-* position of the block being moved.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+ $ LDZ, IFST, ILST, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+* .. Scalar Arguments ..
+ LOGICAL WANTQ, WANTZ
+ INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+ $ WORK( * ), Z( LDZ, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtgsen.f b/SRC/dtgsen.f
index cf04b06f..51513454 100644
--- a/SRC/dtgsen.f
+++ b/SRC/dtgsen.f
@@ -1,13 +1,447 @@
+*> \brief \b DTGSEN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
+* ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL,
+* PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK,
+* $ M, N
+* DOUBLE PRECISION PL, PR
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), DIF( * ), Q( LDQ, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTGSEN reorders the generalized real Schur decomposition of a real
+*> matrix pair (A, B) (in terms of an orthonormal equivalence trans-
+*> formation Q**T * (A, B) * Z), so that a selected cluster of eigenvalues
+*> appears in the leading diagonal blocks of the upper quasi-triangular
+*> matrix A and the upper triangular B. The leading columns of Q and
+*> Z form orthonormal bases of the corresponding left and right eigen-
+*> spaces (deflating subspaces). (A, B) must be in generalized real
+*> Schur canonical form (as returned by DGGES), i.e. A is block upper
+*> triangular with 1-by-1 and 2-by-2 diagonal blocks. B is upper
+*> triangular.
+*>
+*> DTGSEN also computes the generalized eigenvalues
+*>
+*> w(j) = (ALPHAR(j) + i*ALPHAI(j))/BETA(j)
+*>
+*> of the reordered matrix pair (A, B).
+*>
+*> Optionally, DTGSEN computes the estimates of reciprocal condition
+*> numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
+*> (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
+*> between the matrix pairs (A11, B11) and (A22,B22) that correspond to
+*> the selected cluster and the eigenvalues outside the cluster, resp.,
+*> and norms of "projections" onto left and right eigenspaces w.r.t.
+*> the selected cluster in the (1,1)-block.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies whether condition numbers are required for the
+*> cluster of eigenvalues (PL and PR) or the deflating subspaces
+*> (Difu and Difl):
+*> =0: Only reorder w.r.t. SELECT. No extras.
+*> =1: Reciprocal of norms of "projections" onto left and right
+*> eigenspaces w.r.t. the selected cluster (PL and PR).
+*> =2: Upper bounds on Difu and Difl. F-norm-based estimate
+*> (DIF(1:2)).
+*> =3: Estimate of Difu and Difl. 1-norm-based estimate
+*> (DIF(1:2)).
+*> About 5 times as expensive as IJOB = 2.
+*> =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
+*> version to get it all.
+*> =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
+*> \endverbatim
+*>
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> SELECT specifies the eigenvalues in the selected cluster.
+*> To select a real eigenvalue w(j), SELECT(j) must be set to
+*> .TRUE.. To select a complex conjugate pair of eigenvalues
+*> w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
+*> either SELECT(j) or SELECT(j+1) or both must be set to
+*> .TRUE.; a complex conjugate pair of eigenvalues must be
+*> either both included in the cluster or both excluded.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension(LDA,N)
+*> On entry, the upper quasi-triangular matrix A, with (A, B) in
+*> generalized real Schur canonical form.
+*> On exit, A is overwritten by the reordered matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension(LDB,N)
+*> On entry, the upper triangular matrix B, with (A, B) in
+*> generalized real Schur canonical form.
+*> On exit, B is overwritten by the reordered matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
+*> and BETA(j),j=1,...,N are the diagonals of the complex Schur
+*> form (S,T) that would result if the 2-by-2 diagonal blocks of
+*> the real generalized Schur form of (A,B) were further reduced
+*> to triangular form using complex unitary transformations.
+*> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
+*> positive, then the j-th and (j+1)-st eigenvalues are a
+*> complex conjugate pair, with ALPHAI(j+1) negative.
+*> \endverbatim
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
+*> On exit, Q has been postmultiplied by the left orthogonal
+*> transformation matrix which reorder (A, B); The leading M
+*> columns of Q form orthonormal bases for the specified pair of
+*> left eigenspaces (deflating subspaces).
+*> If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1;
+*> and if WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ,N)
+*> On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
+*> On exit, Z has been postmultiplied by the left orthogonal
+*> transformation matrix which reorder (A, B); The leading M
+*> columns of Z form orthonormal bases for the specified pair of
+*> left eigenspaces (deflating subspaces).
+*> If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1;
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The dimension of the specified pair of left and right eigen-
+*> spaces (deflating subspaces). 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[out] PL
+*> \verbatim
+*> PL is DOUBLE PRECISION
+*> \param[out] PR
+*> \verbatim
+*> PR is DOUBLE PRECISION
+*> If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
+*> reciprocal of the norm of "projections" onto left and right
+*> eigenspaces with respect to the selected cluster.
+*> 0 < PL, PR <= 1.
+*> If M = 0 or M = N, PL = PR = 1.
+*> If IJOB = 0, 2 or 3, PL and PR are not referenced.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION array, dimension (2).
+*> If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
+*> If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
+*> Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
+*> estimates of Difu and Difl.
+*> If M = 0 or N, DIF(1:2) = F-norm([A, B]).
+*> If IJOB = 0 or 1, DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 4*N+16.
+*> If IJOB = 1, 2 or 4, LWORK >= MAX(4*N+16, 2*M*(N-M)).
+*> If IJOB = 3 or 5, LWORK >= MAX(4*N+16, 4*M*(N-M)).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= 1.
+*> If IJOB = 1, 2 or 4, LIWORK >= N+6.
+*> If IJOB = 3 or 5, LIWORK >= MAX(2*M*(N-M), N+6).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit.
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> =1: Reordering of (A, B) failed because the transformed
+*> matrix pair (A, B) would be too far from generalized
+*> Schur form; the problem is very ill-conditioned.
+*> (A, B) may have been partially reordered.
+*> If requested, 0 is returned in DIF(*), PL and PR.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> DTGSEN first collects the selected eigenvalues by computing
+*> orthogonal U and W that move them to the top left corner of (A, B).
+*> In other words, the selected eigenvalues are the eigenvalues of
+*> (A11, B11) in:
+*>
+*> U**T*(A, B)*W = (A11 A12) (B11 B12) n1
+*> ( 0 A22),( 0 B22) n2
+*> n1 n2 n1 n2
+*>
+*> where N = n1+n2 and U**T means the transpose of U. The first n1 columns
+*> of U and W span the specified pair of left and right eigenspaces
+*> (deflating subspaces) of (A, B).
+*>
+*> If (A, B) has been obtained from the generalized real Schur
+*> decomposition of a matrix pair (C, D) = Q*(A, B)*Z**T, then the
+*> reordered generalized real Schur form of (C, D) is given by
+*>
+*> (C, D) = (Q*U)*(U**T*(A, B)*W)*(Z*W)**T,
+*>
+*> and the first n1 columns of Q*U and Z*W span the corresponding
+*> deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
+*>
+*> Note that if the selected eigenvalue is sufficiently ill-conditioned,
+*> then its value may differ significantly from its value before
+*> reordering.
+*>
+*> The reciprocal condition numbers of the left and right eigenspaces
+*> spanned by the first n1 columns of U and W (or Q*U and Z*W) may
+*> be returned in DIF(1:2), corresponding to Difu and Difl, resp.
+*>
+*> The Difu and Difl are defined as:
+*>
+*> Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
+*> and
+*> Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
+*>
+*> where sigma-min(Zu) is the smallest singular value of the
+*> (2*n1*n2)-by-(2*n1*n2) matrix
+*>
+*> Zu = [ kron(In2, A11) -kron(A22**T, In1) ]
+*> [ kron(In2, B11) -kron(B22**T, In1) ].
+*>
+*> Here, Inx is the identity matrix of size nx and A22**T is the
+*> transpose of A22. kron(X, Y) is the Kronecker product between
+*> the matrices X and Y.
+*>
+*> When DIF(2) is small, small changes in (A, B) can cause large changes
+*> in the deflating subspace. An approximate (asymptotic) bound on the
+*> maximum angular error in the computed deflating subspaces is
+*>
+*> EPS * norm((A, B)) / DIF(2),
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal norm of the projectors on the left and right
+*> eigenspaces associated with (A11, B11) may be returned in PL and PR.
+*> They are computed as follows. First we compute L and R so that
+*> P*(A, B)*Q is block diagonal, where
+*>
+*> P = ( I -L ) n1 Q = ( I R ) n1
+*> ( 0 I ) n2 and ( 0 I ) n2
+*> n1 n2 n1 n2
+*>
+*> and (L, R) is the solution to the generalized Sylvester equation
+*>
+*> A11*R - L*A22 = -A12
+*> B11*R - L*B22 = -B12
+*>
+*> Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
+*> An approximate (asymptotic) bound on the average absolute error of
+*> the selected eigenvalues is
+*>
+*> EPS * norm((A, B)) / PL.
+*>
+*> There are also global error bounds which valid for perturbations up
+*> to a certain restriction: A lower bound (x) on the smallest
+*> F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
+*> coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
+*> (i.e. (A + E, B + F), is
+*>
+*> x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
+*>
+*> An approximate bound on x can be computed from DIF(1:2), PL and PR.
+*>
+*> If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
+*> (L', R') and unperturbed (L, R) left and right deflating subspaces
+*> associated with the selected cluster in the (1,1)-blocks can be
+*> bounded as
+*>
+*> max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
+*> max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
+*>
+*> See LAPACK User's Guide section 4.11 or the following references
+*> for more information.
+*>
+*> Note that if the default method for computing the Frobenius-norm-
+*> based estimate DIF is not wanted (see DLATDF), then the parameter
+*> IDIFJB (see below) should be changed from 3 to 4 (routine DLATDF
+*> (IJOB = 2 will be used)). See DTGSYL for more details.
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> References
+*> ==========
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software,
+*> Report UMINF - 94.04, Department of Computing Science, Umea
+*> University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
+*> Note 87. To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
+*> 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
$ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL,
$ PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTQ, WANTZ
@@ -23,313 +457,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DTGSEN reorders the generalized real Schur decomposition of a real
-* matrix pair (A, B) (in terms of an orthonormal equivalence trans-
-* formation Q**T * (A, B) * Z), so that a selected cluster of eigenvalues
-* appears in the leading diagonal blocks of the upper quasi-triangular
-* matrix A and the upper triangular B. The leading columns of Q and
-* Z form orthonormal bases of the corresponding left and right eigen-
-* spaces (deflating subspaces). (A, B) must be in generalized real
-* Schur canonical form (as returned by DGGES), i.e. A is block upper
-* triangular with 1-by-1 and 2-by-2 diagonal blocks. B is upper
-* triangular.
-*
-* DTGSEN also computes the generalized eigenvalues
-*
-* w(j) = (ALPHAR(j) + i*ALPHAI(j))/BETA(j)
-*
-* of the reordered matrix pair (A, B).
-*
-* Optionally, DTGSEN computes the estimates of reciprocal condition
-* numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
-* (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
-* between the matrix pairs (A11, B11) and (A22,B22) that correspond to
-* the selected cluster and the eigenvalues outside the cluster, resp.,
-* and norms of "projections" onto left and right eigenspaces w.r.t.
-* the selected cluster in the (1,1)-block.
-*
-* Arguments
-* =========
-*
-* IJOB (input) INTEGER
-* Specifies whether condition numbers are required for the
-* cluster of eigenvalues (PL and PR) or the deflating subspaces
-* (Difu and Difl):
-* =0: Only reorder w.r.t. SELECT. No extras.
-* =1: Reciprocal of norms of "projections" onto left and right
-* eigenspaces w.r.t. the selected cluster (PL and PR).
-* =2: Upper bounds on Difu and Difl. F-norm-based estimate
-* (DIF(1:2)).
-* =3: Estimate of Difu and Difl. 1-norm-based estimate
-* (DIF(1:2)).
-* About 5 times as expensive as IJOB = 2.
-* =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
-* version to get it all.
-* =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
-*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* SELECT specifies the eigenvalues in the selected cluster.
-* To select a real eigenvalue w(j), SELECT(j) must be set to
-* .TRUE.. To select a complex conjugate pair of eigenvalues
-* w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
-* either SELECT(j) or SELECT(j+1) or both must be set to
-* .TRUE.; a complex conjugate pair of eigenvalues must be
-* either both included in the cluster or both excluded.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension(LDA,N)
-* On entry, the upper quasi-triangular matrix A, with (A, B) in
-* generalized real Schur canonical form.
-* On exit, A is overwritten by the reordered matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension(LDB,N)
-* On entry, the upper triangular matrix B, with (A, B) in
-* generalized real Schur canonical form.
-* On exit, B is overwritten by the reordered matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* ALPHAR (output) DOUBLE PRECISION array, dimension (N)
-* ALPHAI (output) DOUBLE PRECISION array, dimension (N)
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
-* and BETA(j),j=1,...,N are the diagonals of the complex Schur
-* form (S,T) that would result if the 2-by-2 diagonal blocks of
-* the real generalized Schur form of (A,B) were further reduced
-* to triangular form using complex unitary transformations.
-* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
-* positive, then the j-th and (j+1)-st eigenvalues are a
-* complex conjugate pair, with ALPHAI(j+1) negative.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
-* On exit, Q has been postmultiplied by the left orthogonal
-* transformation matrix which reorder (A, B); The leading M
-* columns of Q form orthonormal bases for the specified pair of
-* left eigenspaces (deflating subspaces).
-* If WANTQ = .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1;
-* and if WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
-* On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
-* On exit, Z has been postmultiplied by the left orthogonal
-* transformation matrix which reorder (A, B); The leading M
-* columns of Z form orthonormal bases for the specified pair of
-* left eigenspaces (deflating subspaces).
-* If WANTZ = .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1;
-* If WANTZ = .TRUE., LDZ >= N.
-*
-* M (output) INTEGER
-* The dimension of the specified pair of left and right eigen-
-* spaces (deflating subspaces). 0 <= M <= N.
-*
-* PL (output) DOUBLE PRECISION
-* PR (output) DOUBLE PRECISION
-* If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
-* reciprocal of the norm of "projections" onto left and right
-* eigenspaces with respect to the selected cluster.
-* 0 < PL, PR <= 1.
-* If M = 0 or M = N, PL = PR = 1.
-* If IJOB = 0, 2 or 3, PL and PR are not referenced.
-*
-* DIF (output) DOUBLE PRECISION array, dimension (2).
-* If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
-* If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
-* Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
-* estimates of Difu and Difl.
-* If M = 0 or N, DIF(1:2) = F-norm([A, B]).
-* If IJOB = 0 or 1, DIF is not referenced.
-*
-* WORK (workspace/output) DOUBLE PRECISION array,
-* dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 4*N+16.
-* If IJOB = 1, 2 or 4, LWORK >= MAX(4*N+16, 2*M*(N-M)).
-* If IJOB = 3 or 5, LWORK >= MAX(4*N+16, 4*M*(N-M)).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= 1.
-* If IJOB = 1, 2 or 4, LIWORK >= N+6.
-* If IJOB = 3 or 5, LIWORK >= MAX(2*M*(N-M), N+6).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* =0: Successful exit.
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* =1: Reordering of (A, B) failed because the transformed
-* matrix pair (A, B) would be too far from generalized
-* Schur form; the problem is very ill-conditioned.
-* (A, B) may have been partially reordered.
-* If requested, 0 is returned in DIF(*), PL and PR.
-*
-* Further Details
-* ===============
-*
-* DTGSEN first collects the selected eigenvalues by computing
-* orthogonal U and W that move them to the top left corner of (A, B).
-* In other words, the selected eigenvalues are the eigenvalues of
-* (A11, B11) in:
-*
-* U**T*(A, B)*W = (A11 A12) (B11 B12) n1
-* ( 0 A22),( 0 B22) n2
-* n1 n2 n1 n2
-*
-* where N = n1+n2 and U**T means the transpose of U. The first n1 columns
-* of U and W span the specified pair of left and right eigenspaces
-* (deflating subspaces) of (A, B).
-*
-* If (A, B) has been obtained from the generalized real Schur
-* decomposition of a matrix pair (C, D) = Q*(A, B)*Z**T, then the
-* reordered generalized real Schur form of (C, D) is given by
-*
-* (C, D) = (Q*U)*(U**T*(A, B)*W)*(Z*W)**T,
-*
-* and the first n1 columns of Q*U and Z*W span the corresponding
-* deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
-*
-* Note that if the selected eigenvalue is sufficiently ill-conditioned,
-* then its value may differ significantly from its value before
-* reordering.
-*
-* The reciprocal condition numbers of the left and right eigenspaces
-* spanned by the first n1 columns of U and W (or Q*U and Z*W) may
-* be returned in DIF(1:2), corresponding to Difu and Difl, resp.
-*
-* The Difu and Difl are defined as:
-*
-* Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
-* and
-* Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
-*
-* where sigma-min(Zu) is the smallest singular value of the
-* (2*n1*n2)-by-(2*n1*n2) matrix
-*
-* Zu = [ kron(In2, A11) -kron(A22**T, In1) ]
-* [ kron(In2, B11) -kron(B22**T, In1) ].
-*
-* Here, Inx is the identity matrix of size nx and A22**T is the
-* transpose of A22. kron(X, Y) is the Kronecker product between
-* the matrices X and Y.
-*
-* When DIF(2) is small, small changes in (A, B) can cause large changes
-* in the deflating subspace. An approximate (asymptotic) bound on the
-* maximum angular error in the computed deflating subspaces is
-*
-* EPS * norm((A, B)) / DIF(2),
-*
-* where EPS is the machine precision.
-*
-* The reciprocal norm of the projectors on the left and right
-* eigenspaces associated with (A11, B11) may be returned in PL and PR.
-* They are computed as follows. First we compute L and R so that
-* P*(A, B)*Q is block diagonal, where
-*
-* P = ( I -L ) n1 Q = ( I R ) n1
-* ( 0 I ) n2 and ( 0 I ) n2
-* n1 n2 n1 n2
-*
-* and (L, R) is the solution to the generalized Sylvester equation
-*
-* A11*R - L*A22 = -A12
-* B11*R - L*B22 = -B12
-*
-* Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
-* An approximate (asymptotic) bound on the average absolute error of
-* the selected eigenvalues is
-*
-* EPS * norm((A, B)) / PL.
-*
-* There are also global error bounds which valid for perturbations up
-* to a certain restriction: A lower bound (x) on the smallest
-* F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
-* coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
-* (i.e. (A + E, B + F), is
-*
-* x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
-*
-* An approximate bound on x can be computed from DIF(1:2), PL and PR.
-*
-* If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
-* (L', R') and unperturbed (L, R) left and right deflating subspaces
-* associated with the selected cluster in the (1,1)-blocks can be
-* bounded as
-*
-* max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
-* max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
-*
-* See LAPACK User's Guide section 4.11 or the following references
-* for more information.
-*
-* Note that if the default method for computing the Frobenius-norm-
-* based estimate DIF is not wanted (see DLATDF), then the parameter
-* IDIFJB (see below) should be changed from 3 to 4 (routine DLATDF
-* (IJOB = 2 will be used)). See DTGSYL for more details.
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* References
-* ==========
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software,
-* Report UMINF - 94.04, Department of Computing Science, Umea
-* University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
-* Note 87. To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
-* 1996.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtgsja.f b/SRC/dtgsja.f
index 84226b35..0c4607b9 100644
--- a/SRC/dtgsja.f
+++ b/SRC/dtgsja.f
@@ -1,11 +1,311 @@
+*> \brief \b DTGSJA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
+* LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
+* Q, LDQ, WORK, NCYCLE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N,
+* $ NCYCLE, P
+* DOUBLE PRECISION TOLA, TOLB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), Q( LDQ, * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTGSJA computes the generalized singular value decomposition (GSVD)
+*> of two real upper triangular (or trapezoidal) matrices A and B.
+*>
+*> On entry, it is assumed that matrices A and B have the following
+*> forms, which may be obtained by the preprocessing subroutine DGGSVP
+*> from a general M-by-N matrix A and P-by-N matrix B:
+*>
+*> N-K-L K L
+*> A = K ( 0 A12 A13 ) if M-K-L >= 0;
+*> L ( 0 0 A23 )
+*> M-K-L ( 0 0 0 )
+*>
+*> N-K-L K L
+*> A = K ( 0 A12 A13 ) if M-K-L < 0;
+*> M-K ( 0 0 A23 )
+*>
+*> N-K-L K L
+*> B = L ( 0 0 B13 )
+*> P-L ( 0 0 0 )
+*>
+*> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
+*> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
+*> otherwise A23 is (M-K)-by-L upper trapezoidal.
+*>
+*> On exit,
+*>
+*> U**T *A*Q = D1*( 0 R ), V**T *B*Q = D2*( 0 R ),
+*>
+*> where U, V and Q are orthogonal matrices.
+*> R is a nonsingular upper triangular matrix, and D1 and D2 are
+*> ``diagonal'' matrices, which are of the following structures:
+*>
+*> If M-K-L >= 0,
+*>
+*> K L
+*> D1 = K ( I 0 )
+*> L ( 0 C )
+*> M-K-L ( 0 0 )
+*>
+*> K L
+*> D2 = L ( 0 S )
+*> P-L ( 0 0 )
+*>
+*> N-K-L K L
+*> ( 0 R ) = K ( 0 R11 R12 ) K
+*> L ( 0 0 R22 ) L
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
+*> S = diag( BETA(K+1), ... , BETA(K+L) ),
+*> C**2 + S**2 = I.
+*>
+*> R is stored in A(1:K+L,N-K-L+1:N) on exit.
+*>
+*> If M-K-L < 0,
+*>
+*> K M-K K+L-M
+*> D1 = K ( I 0 0 )
+*> M-K ( 0 C 0 )
+*>
+*> K M-K K+L-M
+*> D2 = M-K ( 0 S 0 )
+*> K+L-M ( 0 0 I )
+*> P-L ( 0 0 0 )
+*>
+*> N-K-L K M-K K+L-M
+*> ( 0 R ) = K ( 0 R11 R12 R13 )
+*> M-K ( 0 0 R22 R23 )
+*> K+L-M ( 0 0 0 R33 )
+*>
+*> where
+*> C = diag( ALPHA(K+1), ... , ALPHA(M) ),
+*> S = diag( BETA(K+1), ... , BETA(M) ),
+*> C**2 + S**2 = I.
+*>
+*> R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
+*> ( 0 R22 R23 )
+*> in B(M-K+1:L,N+M-K-L+1:N) on exit.
+*>
+*> The computation of the orthogonal transformation matrices U, V or Q
+*> is optional. These matrices may either be formed explicitly, or they
+*> may be postmultiplied into input matrices U1, V1, or Q1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': U must contain an orthogonal matrix U1 on entry, and
+*> the product U1*U is returned;
+*> = 'I': U is initialized to the unit matrix, and the
+*> orthogonal matrix U is returned;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': V must contain an orthogonal matrix V1 on entry, and
+*> the product V1*V is returned;
+*> = 'I': V is initialized to the unit matrix, and the
+*> orthogonal matrix V is returned;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Q must contain an orthogonal matrix Q1 on entry, and
+*> the product Q1*Q is returned;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> orthogonal matrix Q is returned;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
+*> matrix R or part of R. See Purpose for details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
+*> a part of R. See Purpose for details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*>
+*> TOLA (input) DOUBLE PRECISION
+*> TOLB (input) DOUBLE PRECISION
+*> TOLA and TOLB are the convergence criteria for the Jacobi-
+*> Kogbetliantz iteration procedure. Generally, they are the
+*> same as used in the preprocessing step, say
+*> TOLA = max(M,N)*norm(A)*MAZHEPS,
+*> TOLB = max(P,N)*norm(B)*MAZHEPS.
+*>
+*> ALPHA (output) DOUBLE PRECISION array, dimension (N)
+*> BETA (output) DOUBLE PRECISION array, dimension (N)
+*> On exit, ALPHA and BETA contain the generalized singular
+*> value pairs of A and B;
+*> ALPHA(1:K) = 1,
+*> BETA(1:K) = 0,
+*> and if M-K-L >= 0,
+*> ALPHA(K+1:K+L) = diag(C),
+*> BETA(K+1:K+L) = diag(S),
+*> or if M-K-L < 0,
+*> ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
+*> BETA(K+1:M) = S, BETA(M+1:K+L) = 1.
+*> Furthermore, if K+L < N,
+*> ALPHA(K+L+1:N) = 0 and
+*> BETA(K+L+1:N) = 0.
+*>
+*> U (input/output) DOUBLE PRECISION array, dimension (LDU,M)
+*> On entry, if JOBU = 'U', U must contain a matrix U1 (usually
+*> the orthogonal matrix returned by DGGSVP).
+*> On exit,
+*> if JOBU = 'I', U contains the orthogonal matrix U;
+*> if JOBU = 'U', U contains the product U1*U.
+*> If JOBU = 'N', U is not referenced.
+*>
+*> LDU (input) INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*>
+*> V (input/output) DOUBLE PRECISION array, dimension (LDV,P)
+*> On entry, if JOBV = 'V', V must contain a matrix V1 (usually
+*> the orthogonal matrix returned by DGGSVP).
+*> On exit,
+*> if JOBV = 'I', V contains the orthogonal matrix V;
+*> if JOBV = 'V', V contains the product V1*V.
+*> If JOBV = 'N', V is not referenced.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*>
+*> Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, if JOBQ = 'Q', Q must contain a matrix Q1 (usually
+*> the orthogonal matrix returned by DGGSVP).
+*> On exit,
+*> if JOBQ = 'I', Q contains the orthogonal matrix Q;
+*> if JOBQ = 'Q', Q contains the product Q1*Q.
+*> If JOBQ = 'N', Q is not referenced.
+*>
+*> LDQ (input) INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+*>
+*> NCYCLE (output) INTEGER
+*> The number of cycles required for convergence.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the procedure does not converge after MAXIT cycles.
+*>
+*> Internal Parameters
+*> ===================
+*>
+*> MAXIT INTEGER
+*> MAXIT specifies the total loops that the iterative procedure
+*> may take. If after MAXIT cycles, the routine fails to
+*> converge, we return INFO = 1.
+*>
+*>
+*> DTGSJA essentially uses a variant of Kogbetliantz algorithm to reduce
+*> min(L,M-K)-by-L triangular (or trapezoidal) matrix A23 and L-by-L
+*> matrix B13 to the form:
+*>
+*> U1**T *A13*Q1 = C1*R1; V1**T *B13*Q1 = S1*R1,
+*>
+*> where U1, V1 and Q1 are orthogonal matrix, and Z**T is the transpose
+*> of Z. C1 and S1 are diagonal matrices satisfying
+*>
+*> C1**2 + S1**2 = I,
+*>
+*> and R1 is an L-by-L nonsingular upper triangular matrix.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DTGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
$ LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
$ Q, LDQ, WORK, NCYCLE, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -19,243 +319,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTGSJA computes the generalized singular value decomposition (GSVD)
-* of two real upper triangular (or trapezoidal) matrices A and B.
-*
-* On entry, it is assumed that matrices A and B have the following
-* forms, which may be obtained by the preprocessing subroutine DGGSVP
-* from a general M-by-N matrix A and P-by-N matrix B:
-*
-* N-K-L K L
-* A = K ( 0 A12 A13 ) if M-K-L >= 0;
-* L ( 0 0 A23 )
-* M-K-L ( 0 0 0 )
-*
-* N-K-L K L
-* A = K ( 0 A12 A13 ) if M-K-L < 0;
-* M-K ( 0 0 A23 )
-*
-* N-K-L K L
-* B = L ( 0 0 B13 )
-* P-L ( 0 0 0 )
-*
-* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
-* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
-* otherwise A23 is (M-K)-by-L upper trapezoidal.
-*
-* On exit,
-*
-* U**T *A*Q = D1*( 0 R ), V**T *B*Q = D2*( 0 R ),
-*
-* where U, V and Q are orthogonal matrices.
-* R is a nonsingular upper triangular matrix, and D1 and D2 are
-* ``diagonal'' matrices, which are of the following structures:
-*
-* If M-K-L >= 0,
-*
-* K L
-* D1 = K ( I 0 )
-* L ( 0 C )
-* M-K-L ( 0 0 )
-*
-* K L
-* D2 = L ( 0 S )
-* P-L ( 0 0 )
-*
-* N-K-L K L
-* ( 0 R ) = K ( 0 R11 R12 ) K
-* L ( 0 0 R22 ) L
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
-* S = diag( BETA(K+1), ... , BETA(K+L) ),
-* C**2 + S**2 = I.
-*
-* R is stored in A(1:K+L,N-K-L+1:N) on exit.
-*
-* If M-K-L < 0,
-*
-* K M-K K+L-M
-* D1 = K ( I 0 0 )
-* M-K ( 0 C 0 )
-*
-* K M-K K+L-M
-* D2 = M-K ( 0 S 0 )
-* K+L-M ( 0 0 I )
-* P-L ( 0 0 0 )
-*
-* N-K-L K M-K K+L-M
-* ( 0 R ) = K ( 0 R11 R12 R13 )
-* M-K ( 0 0 R22 R23 )
-* K+L-M ( 0 0 0 R33 )
-*
-* where
-* C = diag( ALPHA(K+1), ... , ALPHA(M) ),
-* S = diag( BETA(K+1), ... , BETA(M) ),
-* C**2 + S**2 = I.
-*
-* R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
-* ( 0 R22 R23 )
-* in B(M-K+1:L,N+M-K-L+1:N) on exit.
-*
-* The computation of the orthogonal transformation matrices U, V or Q
-* is optional. These matrices may either be formed explicitly, or they
-* may be postmultiplied into input matrices U1, V1, or Q1.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': U must contain an orthogonal matrix U1 on entry, and
-* the product U1*U is returned;
-* = 'I': U is initialized to the unit matrix, and the
-* orthogonal matrix U is returned;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': V must contain an orthogonal matrix V1 on entry, and
-* the product V1*V is returned;
-* = 'I': V is initialized to the unit matrix, and the
-* orthogonal matrix V is returned;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Q must contain an orthogonal matrix Q1 on entry, and
-* the product Q1*Q is returned;
-* = 'I': Q is initialized to the unit matrix, and the
-* orthogonal matrix Q is returned;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* K (input) INTEGER
-* L (input) INTEGER
-* K and L specify the subblocks in the input matrices A and B:
-* A23 = A(K+1:MIN(K+L,M),N-L+1:N) and B13 = B(1:L,N-L+1:N)
-* of A and B, whose GSVD is going to be computed by DTGSJA.
-* See Further Details.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
-* matrix R or part of R. See Purpose for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
-* a part of R. See Purpose for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TOLA (input) DOUBLE PRECISION
-* TOLB (input) DOUBLE PRECISION
-* TOLA and TOLB are the convergence criteria for the Jacobi-
-* Kogbetliantz iteration procedure. Generally, they are the
-* same as used in the preprocessing step, say
-* TOLA = max(M,N)*norm(A)*MAZHEPS,
-* TOLB = max(P,N)*norm(B)*MAZHEPS.
-*
-* ALPHA (output) DOUBLE PRECISION array, dimension (N)
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, ALPHA and BETA contain the generalized singular
-* value pairs of A and B;
-* ALPHA(1:K) = 1,
-* BETA(1:K) = 0,
-* and if M-K-L >= 0,
-* ALPHA(K+1:K+L) = diag(C),
-* BETA(K+1:K+L) = diag(S),
-* or if M-K-L < 0,
-* ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
-* BETA(K+1:M) = S, BETA(M+1:K+L) = 1.
-* Furthermore, if K+L < N,
-* ALPHA(K+L+1:N) = 0 and
-* BETA(K+L+1:N) = 0.
-*
-* U (input/output) DOUBLE PRECISION array, dimension (LDU,M)
-* On entry, if JOBU = 'U', U must contain a matrix U1 (usually
-* the orthogonal matrix returned by DGGSVP).
-* On exit,
-* if JOBU = 'I', U contains the orthogonal matrix U;
-* if JOBU = 'U', U contains the product U1*U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (input/output) DOUBLE PRECISION array, dimension (LDV,P)
-* On entry, if JOBV = 'V', V must contain a matrix V1 (usually
-* the orthogonal matrix returned by DGGSVP).
-* On exit,
-* if JOBV = 'I', V contains the orthogonal matrix V;
-* if JOBV = 'V', V contains the product V1*V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, if JOBQ = 'Q', Q must contain a matrix Q1 (usually
-* the orthogonal matrix returned by DGGSVP).
-* On exit,
-* if JOBQ = 'I', Q contains the orthogonal matrix Q;
-* if JOBQ = 'Q', Q contains the product Q1*Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* NCYCLE (output) INTEGER
-* The number of cycles required for convergence.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the procedure does not converge after MAXIT cycles.
-*
-* Internal Parameters
-* ===================
-*
-* MAXIT INTEGER
-* MAXIT specifies the total loops that the iterative procedure
-* may take. If after MAXIT cycles, the routine fails to
-* converge, we return INFO = 1.
-*
-* Further Details
-* ===============
-*
-* DTGSJA essentially uses a variant of Kogbetliantz algorithm to reduce
-* min(L,M-K)-by-L triangular (or trapezoidal) matrix A23 and L-by-L
-* matrix B13 to the form:
-*
-* U1**T *A13*Q1 = C1*R1; V1**T *B13*Q1 = S1*R1,
-*
-* where U1, V1 and Q1 are orthogonal matrix, and Z**T is the transpose
-* of Z. C1 and S1 are diagonal matrices satisfying
-*
-* C1**2 + S1**2 = I,
-*
-* and R1 is an L-by-L nonsingular upper triangular matrix.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtgsna.f b/SRC/dtgsna.f
index ebf7f7af..7fe37731 100644
--- a/SRC/dtgsna.f
+++ b/SRC/dtgsna.f
@@ -1,282 +1,391 @@
- SUBROUTINE DTGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
- $ LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
- $ IWORK, INFO )
+*> \brief \b DTGSNA
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER HOWMNY, JOB
- INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
-* ..
-* .. Array Arguments ..
- LOGICAL SELECT( * )
- INTEGER IWORK( * )
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), DIF( * ), S( * ),
- $ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DTGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
+* LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, JOB
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), DIF( * ), S( * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DTGSNA estimates reciprocal condition numbers for specified
-* eigenvalues and/or eigenvectors of a matrix pair (A, B) in
-* generalized real Schur canonical form (or of any matrix pair
-* (Q*A*Z**T, Q*B*Z**T) with orthogonal matrices Q and Z, where
-* Z**T denotes the transpose of Z.
-*
-* (A, B) must be in generalized real Schur form (as returned by DGGES),
-* i.e. A is block upper triangular with 1-by-1 and 2-by-2 diagonal
-* blocks. B is upper triangular.
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTGSNA estimates reciprocal condition numbers for specified
+*> eigenvalues and/or eigenvectors of a matrix pair (A, B) in
+*> generalized real Schur canonical form (or of any matrix pair
+*> (Q*A*Z**T, Q*B*Z**T) with orthogonal matrices Q and Z, where
+*> Z**T denotes the transpose of Z.
+*>
+*> (A, B) must be in generalized real Schur form (as returned by DGGES),
+*> i.e. A is block upper triangular with 1-by-1 and 2-by-2 diagonal
+*> blocks. B is upper triangular.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for
-* eigenvalues (S) or eigenvectors (DIF):
-* = 'E': for eigenvalues only (S);
-* = 'V': for eigenvectors only (DIF);
-* = 'B': for both eigenvalues and eigenvectors (S and DIF).
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute condition numbers for all eigenpairs;
-* = 'S': compute condition numbers for selected eigenpairs
-* specified by the array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenpairs for which
-* condition numbers are required. To select condition numbers
-* for the eigenpair corresponding to a real eigenvalue w(j),
-* SELECT(j) must be set to .TRUE.. To select condition numbers
-* corresponding to a complex conjugate pair of eigenvalues w(j)
-* and w(j+1), either SELECT(j) or SELECT(j+1) or both, must be
-* set to .TRUE..
-* If HOWMNY = 'A', SELECT is not referenced.
-*
-* N (input) INTEGER
-* The order of the square matrix pair (A, B). N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The upper quasi-triangular matrix A in the pair (A,B).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,N)
-* The upper triangular matrix B in the pair (A,B).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION array, dimension (LDVL,M)
-* If JOB = 'E' or 'B', VL must contain left eigenvectors of
-* (A, B), corresponding to the eigenpairs specified by HOWMNY
-* and SELECT. The eigenvectors must be stored in consecutive
-* columns of VL, as returned by DTGEVC.
-* If JOB = 'V', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1.
-* If JOB = 'E' or 'B', LDVL >= N.
-*
-* VR (input) DOUBLE PRECISION array, dimension (LDVR,M)
-* If JOB = 'E' or 'B', VR must contain right eigenvectors of
-* (A, B), corresponding to the eigenpairs specified by HOWMNY
-* and SELECT. The eigenvectors must be stored in consecutive
-* columns ov VR, as returned by DTGEVC.
-* If JOB = 'V', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1.
-* If JOB = 'E' or 'B', LDVR >= N.
-*
-* S (output) DOUBLE PRECISION array, dimension (MM)
-* If JOB = 'E' or 'B', the reciprocal condition numbers of the
-* selected eigenvalues, stored in consecutive elements of the
-* array. For a complex conjugate pair of eigenvalues two
-* consecutive elements of S are set to the same value. Thus
-* S(j), DIF(j), and the j-th columns of VL and VR all
-* correspond to the same eigenpair (but not in general the
-* j-th eigenpair, unless all eigenpairs are selected).
-* If JOB = 'V', S is not referenced.
-*
-* DIF (output) DOUBLE PRECISION array, dimension (MM)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the selected eigenvectors, stored in consecutive
-* elements of the array. For a complex eigenvector two
-* consecutive elements of DIF are set to the same value. If
-* the eigenvalues cannot be reordered to compute DIF(j), DIF(j)
-* is set to 0; this can only occur when the true value would be
-* very small anyway.
-* If JOB = 'E', DIF is not referenced.
-*
-* MM (input) INTEGER
-* The number of elements in the arrays S and DIF. MM >= M.
-*
-* M (output) INTEGER
-* The number of elements of the arrays S and DIF used to store
-* the specified condition numbers; for each selected real
-* eigenvalue one element is used, and for each selected complex
-* conjugate pair of eigenvalues, two elements are used.
-* If HOWMNY = 'A', M is set to N.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* If JOB = 'V' or 'B' LWORK >= 2*N*(N+2)+16.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (N + 6)
-* If JOB = 'E', IWORK is not referenced.
-*
-* INFO (output) INTEGER
-* =0: Successful exit
-* <0: If INFO = -i, the i-th argument had an illegal value
-*
-*
-* Further Details
-* ===============
-*
-* The reciprocal of the condition number of a generalized eigenvalue
-* w = (a, b) is defined as
-*
-* S(w) = (|u**TAv|**2 + |u**TBv|**2)**(1/2) / (norm(u)*norm(v))
-*
-* where u and v are the left and right eigenvectors of (A, B)
-* corresponding to w; |z| denotes the absolute value of the complex
-* number, and norm(u) denotes the 2-norm of the vector u.
-* The pair (a, b) corresponds to an eigenvalue w = a/b (= u**TAv/u**TBv)
-* of the matrix pair (A, B). If both a and b equal zero, then (A B) is
-* singular and S(I) = -1 is returned.
-*
-* An approximate error bound on the chordal distance between the i-th
-* computed generalized eigenvalue w and the corresponding exact
-* eigenvalue lambda is
-*
-* chord(w, lambda) <= EPS * norm(A, B) / S(I)
-*
-* where EPS is the machine precision.
-*
-* The reciprocal of the condition number DIF(i) of right eigenvector u
-* and left eigenvector v corresponding to the generalized eigenvalue w
-* is defined as follows:
-*
-* a) If the i-th eigenvalue w = (a,b) is real
-*
-* Suppose U and V are orthogonal transformations such that
-*
-* U**T*(A, B)*V = (S, T) = ( a * ) ( b * ) 1
-* ( 0 S22 ),( 0 T22 ) n-1
-* 1 n-1 1 n-1
-*
-* Then the reciprocal condition number DIF(i) is
-*
-* Difl((a, b), (S22, T22)) = sigma-min( Zl ),
-*
-* where sigma-min(Zl) denotes the smallest singular value of the
-* 2(n-1)-by-2(n-1) matrix
-*
-* Zl = [ kron(a, In-1) -kron(1, S22) ]
-* [ kron(b, In-1) -kron(1, T22) ] .
-*
-* Here In-1 is the identity matrix of size n-1. kron(X, Y) is the
-* Kronecker product between the matrices X and Y.
-*
-* Note that if the default method for computing DIF(i) is wanted
-* (see DLATDF), then the parameter DIFDRI (see below) should be
-* changed from 3 to 4 (routine DLATDF(IJOB = 2 will be used)).
-* See DTGSYL for more details.
-*
-* b) If the i-th and (i+1)-th eigenvalues are complex conjugate pair,
-*
-* Suppose U and V are orthogonal transformations such that
-*
-* U**T*(A, B)*V = (S, T) = ( S11 * ) ( T11 * ) 2
-* ( 0 S22 ),( 0 T22) n-2
-* 2 n-2 2 n-2
-*
-* and (S11, T11) corresponds to the complex conjugate eigenvalue
-* pair (w, conjg(w)). There exist unitary matrices U1 and V1 such
-* that
-*
-* U1**T*S11*V1 = ( s11 s12 ) and U1**T*T11*V1 = ( t11 t12 )
-* ( 0 s22 ) ( 0 t22 )
-*
-* where the generalized eigenvalues w = s11/t11 and
-* conjg(w) = s22/t22.
-*
-* Then the reciprocal condition number DIF(i) is bounded by
-*
-* min( d1, max( 1, |real(s11)/real(s22)| )*d2 )
-*
-* where, d1 = Difl((s11, t11), (s22, t22)) = sigma-min(Z1), where
-* Z1 is the complex 2-by-2 matrix
-*
-* Z1 = [ s11 -s22 ]
-* [ t11 -t22 ],
-*
-* This is done by computing (using real arithmetic) the
-* roots of the characteristical polynomial det(Z1**T * Z1 - lambda I),
-* where Z1**T denotes the transpose of Z1 and det(X) denotes
-* the determinant of X.
-*
-* and d2 is an upper bound on Difl((S11, T11), (S22, T22)), i.e. an
-* upper bound on sigma-min(Z2), where Z2 is (2n-2)-by-(2n-2)
-*
-* Z2 = [ kron(S11**T, In-2) -kron(I2, S22) ]
-* [ kron(T11**T, In-2) -kron(I2, T22) ]
-*
-* Note that if the default method for computing DIF is wanted (see
-* DLATDF), then the parameter DIFDRI (see below) should be changed
-* from 3 to 4 (routine DLATDF(IJOB = 2 will be used)). See DTGSYL
-* for more details.
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for
+*> eigenvalues (S) or eigenvectors (DIF):
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for eigenvectors only (DIF);
+*> = 'B': for both eigenvalues and eigenvectors (S and DIF).
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute condition numbers for all eigenpairs;
+*> = 'S': compute condition numbers for selected eigenpairs
+*> specified by the array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenpairs for which
+*> condition numbers are required. To select condition numbers
+*> for the eigenpair corresponding to a real eigenvalue w(j),
+*> SELECT(j) must be set to .TRUE.. To select condition numbers
+*> corresponding to a complex conjugate pair of eigenvalues w(j)
+*> and w(j+1), either SELECT(j) or SELECT(j+1) or both, must be
+*> set to .TRUE..
+*> If HOWMNY = 'A', SELECT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the square matrix pair (A, B). N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The upper quasi-triangular matrix A in the pair (A,B).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> The upper triangular matrix B in the pair (A,B).
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,M)
+*> If JOB = 'E' or 'B', VL must contain left eigenvectors of
+*> (A, B), corresponding to the eigenpairs specified by HOWMNY
+*> and SELECT. The eigenvectors must be stored in consecutive
+*> columns of VL, as returned by DTGEVC.
+*> If JOB = 'V', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1.
+*> If JOB = 'E' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,M)
+*> If JOB = 'E' or 'B', VR must contain right eigenvectors of
+*> (A, B), corresponding to the eigenpairs specified by HOWMNY
+*> and SELECT. The eigenvectors must be stored in consecutive
+*> columns ov VR, as returned by DTGEVC.
+*> If JOB = 'V', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1.
+*> If JOB = 'E' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (MM)
+*> If JOB = 'E' or 'B', the reciprocal condition numbers of the
+*> selected eigenvalues, stored in consecutive elements of the
+*> array. For a complex conjugate pair of eigenvalues two
+*> consecutive elements of S are set to the same value. Thus
+*> S(j), DIF(j), and the j-th columns of VL and VR all
+*> correspond to the same eigenpair (but not in general the
+*> j-th eigenpair, unless all eigenpairs are selected).
+*> If JOB = 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION array, dimension (MM)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the selected eigenvectors, stored in consecutive
+*> elements of the array. For a complex eigenvector two
+*> consecutive elements of DIF are set to the same value. If
+*> the eigenvalues cannot be reordered to compute DIF(j), DIF(j)
+*> is set to 0; this can only occur when the true value would be
+*> very small anyway.
+*> If JOB = 'E', DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of elements in the arrays S and DIF. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of elements of the arrays S and DIF used to store
+*> the specified condition numbers; for each selected real
+*> eigenvalue one element is used, and for each selected complex
+*> conjugate pair of eigenvalues, two elements are used.
+*> If HOWMNY = 'A', M is set to N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> If JOB = 'V' or 'B' LWORK >= 2*N*(N+2)+16.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N + 6)
+*> If JOB = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit
+*> <0: If INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* For each eigenvalue/vector specified by SELECT, DIF stores a
-* Frobenius norm-based estimate of Difl.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* An approximate error bound for the i-th computed eigenvector VL(i) or
-* VR(i) is given by
+*> \date November 2011
*
-* EPS * norm(A, B) / DIF(i).
+*> \ingroup doubleOTHERcomputational
*
-* See ref. [2-3] for more details and further references.
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The reciprocal of the condition number of a generalized eigenvalue
+*> w = (a, b) is defined as
+*>
+*> S(w) = (|u**TAv|**2 + |u**TBv|**2)**(1/2) / (norm(u)*norm(v))
+*>
+*> where u and v are the left and right eigenvectors of (A, B)
+*> corresponding to w; |z| denotes the absolute value of the complex
+*> number, and norm(u) denotes the 2-norm of the vector u.
+*> The pair (a, b) corresponds to an eigenvalue w = a/b (= u**TAv/u**TBv)
+*> of the matrix pair (A, B). If both a and b equal zero, then (A B) is
+*> singular and S(I) = -1 is returned.
+*>
+*> An approximate error bound on the chordal distance between the i-th
+*> computed generalized eigenvalue w and the corresponding exact
+*> eigenvalue lambda is
+*>
+*> chord(w, lambda) <= EPS * norm(A, B) / S(I)
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal of the condition number DIF(i) of right eigenvector u
+*> and left eigenvector v corresponding to the generalized eigenvalue w
+*> is defined as follows:
+*>
+*> a) If the i-th eigenvalue w = (a,b) is real
+*>
+*> Suppose U and V are orthogonal transformations such that
+*>
+*> U**T*(A, B)*V = (S, T) = ( a * ) ( b * ) 1
+*> ( 0 S22 ),( 0 T22 ) n-1
+*> 1 n-1 1 n-1
+*>
+*> Then the reciprocal condition number DIF(i) is
+*>
+*> Difl((a, b), (S22, T22)) = sigma-min( Zl ),
+*>
+*> where sigma-min(Zl) denotes the smallest singular value of the
+*> 2(n-1)-by-2(n-1) matrix
+*>
+*> Zl = [ kron(a, In-1) -kron(1, S22) ]
+*> [ kron(b, In-1) -kron(1, T22) ] .
+*>
+*> Here In-1 is the identity matrix of size n-1. kron(X, Y) is the
+*> Kronecker product between the matrices X and Y.
+*>
+*> Note that if the default method for computing DIF(i) is wanted
+*> (see DLATDF), then the parameter DIFDRI (see below) should be
+*> changed from 3 to 4 (routine DLATDF(IJOB = 2 will be used)).
+*> See DTGSYL for more details.
+*>
+*> b) If the i-th and (i+1)-th eigenvalues are complex conjugate pair,
+*>
+*> Suppose U and V are orthogonal transformations such that
+*>
+*> U**T*(A, B)*V = (S, T) = ( S11 * ) ( T11 * ) 2
+*> ( 0 S22 ),( 0 T22) n-2
+*> 2 n-2 2 n-2
+*>
+*> and (S11, T11) corresponds to the complex conjugate eigenvalue
+*> pair (w, conjg(w)). There exist unitary matrices U1 and V1 such
+*> that
+*>
+*> U1**T*S11*V1 = ( s11 s12 ) and U1**T*T11*V1 = ( t11 t12 )
+*> ( 0 s22 ) ( 0 t22 )
+*>
+*> where the generalized eigenvalues w = s11/t11 and
+*> conjg(w) = s22/t22.
+*>
+*> Then the reciprocal condition number DIF(i) is bounded by
+*>
+*> min( d1, max( 1, |real(s11)/real(s22)| )*d2 )
+*>
+*> where, d1 = Difl((s11, t11), (s22, t22)) = sigma-min(Z1), where
+*> Z1 is the complex 2-by-2 matrix
+*>
+*> Z1 = [ s11 -s22 ]
+*> [ t11 -t22 ],
+*>
+*> This is done by computing (using real arithmetic) the
+*> roots of the characteristical polynomial det(Z1**T * Z1 - lambda I),
+*> where Z1**T denotes the transpose of Z1 and det(X) denotes
+*> the determinant of X.
+*>
+*> and d2 is an upper bound on Difl((S11, T11), (S22, T22)), i.e. an
+*> upper bound on sigma-min(Z2), where Z2 is (2n-2)-by-(2n-2)
+*>
+*> Z2 = [ kron(S11**T, In-2) -kron(I2, S22) ]
+*> [ kron(T11**T, In-2) -kron(I2, T22) ]
+*>
+*> Note that if the default method for computing DIF is wanted (see
+*> DLATDF), then the parameter DIFDRI (see below) should be changed
+*> from 3 to 4 (routine DLATDF(IJOB = 2 will be used)). See DTGSYL
+*> for more details.
+*>
+*> For each eigenvalue/vector specified by SELECT, DIF stores a
+*> Frobenius norm-based estimate of Difl.
+*>
+*> An approximate error bound for the i-th computed eigenvector VL(i) or
+*> VR(i) is given by
+*>
+*> EPS * norm(A, B) / DIF(i).
+*>
+*> See ref. [2-3] for more details and further references.
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> References
+*> ==========
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software,
+*> Report UMINF - 94.04, Department of Computing Science, Umea
+*> University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
+*> Note 87. To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
+*> No 1, 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
+ $ LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
+ $ IWORK, INFO )
*
-* References
-* ==========
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software,
-* Report UMINF - 94.04, Department of Computing Science, Umea
-* University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
-* Note 87. To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
-* No 1, 1996.
+* .. Scalar Arguments ..
+ CHARACTER HOWMNY, JOB
+ INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+ LOGICAL SELECT( * )
+ INTEGER IWORK( * )
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), DIF( * ), S( * ),
+ $ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtgsy2.f b/SRC/dtgsy2.f
index bddc38e8..12d4efc0 100644
--- a/SRC/dtgsy2.f
+++ b/SRC/dtgsy2.f
@@ -1,3 +1,273 @@
+*> \brief \b DTGSY2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+* LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
+* IWORK, PQ, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N,
+* $ PQ
+* DOUBLE PRECISION RDSCAL, RDSUM, SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTGSY2 solves the generalized Sylvester equation:
+*>
+*> A * R - L * B = scale * C (1)
+*> D * R - L * E = scale * F,
+*>
+*> using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices,
+*> (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
+*> N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E)
+*> must be in generalized Schur canonical form, i.e. A, B are upper
+*> quasi triangular and D, E are upper triangular. The solution (R, L)
+*> overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor
+*> chosen to avoid overflow.
+*>
+*> In matrix notation solving equation (1) corresponds to solve
+*> Z*x = scale*b, where Z is defined as
+*>
+*> Z = [ kron(In, A) -kron(B**T, Im) ] (2)
+*> [ kron(In, D) -kron(E**T, Im) ],
+*>
+*> Ik is the identity matrix of size k and X**T is the transpose of X.
+*> kron(X, Y) is the Kronecker product between the matrices X and Y.
+*> In the process of solving (1), we solve a number of such systems
+*> where Dim(In), Dim(In) = 1 or 2.
+*>
+*> If TRANS = 'T', solve the transposed system Z**T*y = scale*b for y,
+*> which is equivalent to solve for R and L in
+*>
+*> A**T * R + D**T * L = scale * C (3)
+*> R * B**T + L * E**T = scale * -F
+*>
+*> This case is used to compute an estimate of Dif[(A, D), (B, E)] =
+*> sigma_min(Z) using reverse communicaton with DLACON.
+*>
+*> DTGSY2 also (IJOB >= 1) contributes to the computation in DTGSYL
+*> of an upper bound on the separation between to matrix pairs. Then
+*> the input (A, D), (B, E) are sub-pencils of the matrix pair in
+*> DTGSYL. See DTGSYL for details.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N', solve the generalized Sylvester equation (1).
+*> = 'T': solve the 'transposed' system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what kind of functionality to be performed.
+*> = 0: solve (1) only.
+*> = 1: A contribution from this subsystem to a Frobenius
+*> norm-based estimate of the separation between two matrix
+*> pairs is computed. (look ahead strategy is used).
+*> = 2: A contribution from this subsystem to a Frobenius
+*> norm-based estimate of the separation between two matrix
+*> pairs is computed. (DGECON on sub-systems is used.)
+*> Not referenced if TRANS = 'T'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the order of A and D, and the row
+*> dimension of C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of B and E, and the column
+*> dimension of C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, M)
+*> On entry, A contains an upper quasi triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the matrix A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> On entry, B contains an upper quasi triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the matrix B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC, N)
+*> On entry, C contains the right-hand-side of the first matrix
+*> equation in (1).
+*> On exit, if IJOB = 0, C has been overwritten by the
+*> solution R.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the matrix C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (LDD, M)
+*> On entry, D contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of the matrix D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (LDE, N)
+*> On entry, E contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the matrix E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is DOUBLE PRECISION array, dimension (LDF, N)
+*> On entry, F contains the right-hand-side of the second matrix
+*> equation in (1).
+*> On exit, if IJOB = 0, F has been overwritten by the
+*> solution L.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the matrix F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
+*> R and L (C and F on entry) will hold the solutions to a
+*> slightly perturbed system but the input matrices A, B, D and
+*> E have not been changed. If SCALE = 0, R and L will hold the
+*> solutions to the homogeneous system with C = F = 0. Normally,
+*> SCALE = 1.
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*> RDSUM is DOUBLE PRECISION
+*> On entry, the sum of squares of computed contributions to
+*> the Dif-estimate under computation by DTGSYL, where the
+*> scaling factor RDSCAL (see below) has been factored out.
+*> On exit, the corresponding sum of squares updated with the
+*> contributions from the current sub-system.
+*> If TRANS = 'T' RDSUM is not touched.
+*> NOTE: RDSUM only makes sense when DTGSY2 is called by DTGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*> RDSCAL is DOUBLE PRECISION
+*> On entry, scaling factor used to prevent overflow in RDSUM.
+*> On exit, RDSCAL is updated w.r.t. the current contributions
+*> in RDSUM.
+*> If TRANS = 'T', RDSCAL is not touched.
+*> NOTE: RDSCAL only makes sense when DTGSY2 is called by
+*> DTGSYL.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M+N+2)
+*> \endverbatim
+*>
+*> \param[out] PQ
+*> \verbatim
+*> PQ is INTEGER
+*> On exit, the number of subsystems (of size 2-by-2, 4-by-4 and
+*> 8-by-8) solved by this routine.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, if INFO is set to
+*> =0: Successful exit
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> >0: The matrix pairs (A, D) and (B, E) have common or very
+*> close eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
$ IWORK, PQ, INFO )
@@ -5,7 +275,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -19,160 +289,6 @@
$ D( LDD, * ), E( LDE, * ), F( LDF, * )
* ..
*
-* Purpose
-* =======
-*
-* DTGSY2 solves the generalized Sylvester equation:
-*
-* A * R - L * B = scale * C (1)
-* D * R - L * E = scale * F,
-*
-* using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices,
-* (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
-* N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E)
-* must be in generalized Schur canonical form, i.e. A, B are upper
-* quasi triangular and D, E are upper triangular. The solution (R, L)
-* overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor
-* chosen to avoid overflow.
-*
-* In matrix notation solving equation (1) corresponds to solve
-* Z*x = scale*b, where Z is defined as
-*
-* Z = [ kron(In, A) -kron(B**T, Im) ] (2)
-* [ kron(In, D) -kron(E**T, Im) ],
-*
-* Ik is the identity matrix of size k and X**T is the transpose of X.
-* kron(X, Y) is the Kronecker product between the matrices X and Y.
-* In the process of solving (1), we solve a number of such systems
-* where Dim(In), Dim(In) = 1 or 2.
-*
-* If TRANS = 'T', solve the transposed system Z**T*y = scale*b for y,
-* which is equivalent to solve for R and L in
-*
-* A**T * R + D**T * L = scale * C (3)
-* R * B**T + L * E**T = scale * -F
-*
-* This case is used to compute an estimate of Dif[(A, D), (B, E)] =
-* sigma_min(Z) using reverse communicaton with DLACON.
-*
-* DTGSY2 also (IJOB >= 1) contributes to the computation in DTGSYL
-* of an upper bound on the separation between to matrix pairs. Then
-* the input (A, D), (B, E) are sub-pencils of the matrix pair in
-* DTGSYL. See DTGSYL for details.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N', solve the generalized Sylvester equation (1).
-* = 'T': solve the 'transposed' system (3).
-*
-* IJOB (input) INTEGER
-* Specifies what kind of functionality to be performed.
-* = 0: solve (1) only.
-* = 1: A contribution from this subsystem to a Frobenius
-* norm-based estimate of the separation between two matrix
-* pairs is computed. (look ahead strategy is used).
-* = 2: A contribution from this subsystem to a Frobenius
-* norm-based estimate of the separation between two matrix
-* pairs is computed. (DGECON on sub-systems is used.)
-* Not referenced if TRANS = 'T'.
-*
-* M (input) INTEGER
-* On entry, M specifies the order of A and D, and the row
-* dimension of C, F, R and L.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of B and E, and the column
-* dimension of C, F, R and L.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, M)
-* On entry, A contains an upper quasi triangular matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the matrix A. LDA >= max(1, M).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* On entry, B contains an upper quasi triangular matrix.
-*
-* LDB (input) INTEGER
-* The leading dimension of the matrix B. LDB >= max(1, N).
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC, N)
-* On entry, C contains the right-hand-side of the first matrix
-* equation in (1).
-* On exit, if IJOB = 0, C has been overwritten by the
-* solution R.
-*
-* LDC (input) INTEGER
-* The leading dimension of the matrix C. LDC >= max(1, M).
-*
-* D (input) DOUBLE PRECISION array, dimension (LDD, M)
-* On entry, D contains an upper triangular matrix.
-*
-* LDD (input) INTEGER
-* The leading dimension of the matrix D. LDD >= max(1, M).
-*
-* E (input) DOUBLE PRECISION array, dimension (LDE, N)
-* On entry, E contains an upper triangular matrix.
-*
-* LDE (input) INTEGER
-* The leading dimension of the matrix E. LDE >= max(1, N).
-*
-* F (input/output) DOUBLE PRECISION array, dimension (LDF, N)
-* On entry, F contains the right-hand-side of the second matrix
-* equation in (1).
-* On exit, if IJOB = 0, F has been overwritten by the
-* solution L.
-*
-* LDF (input) INTEGER
-* The leading dimension of the matrix F. LDF >= max(1, M).
-*
-* SCALE (output) DOUBLE PRECISION
-* On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
-* R and L (C and F on entry) will hold the solutions to a
-* slightly perturbed system but the input matrices A, B, D and
-* E have not been changed. If SCALE = 0, R and L will hold the
-* solutions to the homogeneous system with C = F = 0. Normally,
-* SCALE = 1.
-*
-* RDSUM (input/output) DOUBLE PRECISION
-* On entry, the sum of squares of computed contributions to
-* the Dif-estimate under computation by DTGSYL, where the
-* scaling factor RDSCAL (see below) has been factored out.
-* On exit, the corresponding sum of squares updated with the
-* contributions from the current sub-system.
-* If TRANS = 'T' RDSUM is not touched.
-* NOTE: RDSUM only makes sense when DTGSY2 is called by DTGSYL.
-*
-* RDSCAL (input/output) DOUBLE PRECISION
-* On entry, scaling factor used to prevent overflow in RDSUM.
-* On exit, RDSCAL is updated w.r.t. the current contributions
-* in RDSUM.
-* If TRANS = 'T', RDSCAL is not touched.
-* NOTE: RDSCAL only makes sense when DTGSY2 is called by
-* DTGSYL.
-*
-* IWORK (workspace) INTEGER array, dimension (M+N+2)
-*
-* PQ (output) INTEGER
-* On exit, the number of subsystems (of size 2-by-2, 4-by-4 and
-* 8-by-8) solved by this routine.
-*
-* INFO (output) INTEGER
-* On exit, if INFO is set to
-* =0: Successful exit
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* >0: The matrix pairs (A, D) and (B, E) have common or very
-* close eigenvalues.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
* =====================================================================
* Replaced various illegal calls to DCOPY by calls to DLASET.
* Sven Hammarling, 27/5/02.
diff --git a/SRC/dtgsyl.f b/SRC/dtgsyl.f
index f91059a6..53e53c46 100644
--- a/SRC/dtgsyl.f
+++ b/SRC/dtgsyl.f
@@ -1,11 +1,301 @@
+*> \brief \b DTGSYL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+* LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF,
+* $ LWORK, M, N
+* DOUBLE PRECISION DIF, SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTGSYL solves the generalized Sylvester equation:
+*>
+*> A * R - L * B = scale * C (1)
+*> D * R - L * E = scale * F
+*>
+*> where R and L are unknown m-by-n matrices, (A, D), (B, E) and
+*> (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
+*> respectively, with real entries. (A, D) and (B, E) must be in
+*> generalized (real) Schur canonical form, i.e. A, B are upper quasi
+*> triangular and D, E are upper triangular.
+*>
+*> The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
+*> scaling factor chosen to avoid overflow.
+*>
+*> In matrix notation (1) is equivalent to solve Zx = scale b, where
+*> Z is defined as
+*>
+*> Z = [ kron(In, A) -kron(B**T, Im) ] (2)
+*> [ kron(In, D) -kron(E**T, Im) ].
+*>
+*> Here Ik is the identity matrix of size k and X**T is the transpose of
+*> X. kron(X, Y) is the Kronecker product between the matrices X and Y.
+*>
+*> If TRANS = 'T', DTGSYL solves the transposed system Z**T*y = scale*b,
+*> which is equivalent to solve for R and L in
+*>
+*> A**T * R + D**T * L = scale * C (3)
+*> R * B**T + L * E**T = scale * -F
+*>
+*> This case (TRANS = 'T') is used to compute an one-norm-based estimate
+*> of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
+*> and (B,E), using DLACON.
+*>
+*> If IJOB >= 1, DTGSYL computes a Frobenius norm-based estimate
+*> of Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
+*> reciprocal of the smallest singular value of Z. See [1-2] for more
+*> information.
+*>
+*> This is a level 3 BLAS algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N', solve the generalized Sylvester equation (1).
+*> = 'T', solve the 'transposed' system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what kind of functionality to be performed.
+*> =0: solve (1) only.
+*> =1: The functionality of 0 and 3.
+*> =2: The functionality of 0 and 4.
+*> =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*> (look ahead strategy IJOB = 1 is used).
+*> =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*> ( DGECON on sub-systems is used ).
+*> Not referenced if TRANS = 'T'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the matrices A and D, and the row dimension of
+*> the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices B and E, and the column dimension
+*> of the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, M)
+*> The upper quasi triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> The upper quasi triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC, N)
+*> On entry, C contains the right-hand-side of the first matrix
+*> equation in (1) or (3).
+*> On exit, if IJOB = 0, 1 or 2, C has been overwritten by
+*> the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
+*> the solution achieved during the computation of the
+*> Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (LDD, M)
+*> The upper triangular matrix D.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of the array D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (LDE, N)
+*> The upper triangular matrix E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the array E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is DOUBLE PRECISION array, dimension (LDF, N)
+*> On entry, F contains the right-hand-side of the second matrix
+*> equation in (1) or (3).
+*> On exit, if IJOB = 0, 1 or 2, F has been overwritten by
+*> the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
+*> the solution achieved during the computation of the
+*> Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the array F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION
+*> On exit DIF is the reciprocal of a lower bound of the
+*> reciprocal of the Dif-function, i.e. DIF is an upper bound of
+*> Dif[(A,D), (B,E)] = sigma_min(Z), where Z as in (2).
+*> IF IJOB = 0 or TRANS = 'T', DIF is not touched.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On exit SCALE is the scaling factor in (1) or (3).
+*> If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
+*> to a slightly perturbed system but the input matrices A, B, D
+*> and E have not been changed. If SCALE = 0, C and F hold the
+*> solutions R and L, respectively, to the homogeneous system
+*> with C = F = 0. Normally, SCALE = 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK > = 1.
+*> If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M+N+6)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: successful exit
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> >0: (A, D) and (B, E) have common or close eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
+*> No 1, 1996.
+*>
+*> [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
+*> Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
+*> Appl., 15(4):1045-1060, 1994
+*>
+*> [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
+*> Condition Estimators for Solving the Generalized Sylvester
+*> Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
+*> July 1989, pp 745-751.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -20,178 +310,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTGSYL solves the generalized Sylvester equation:
-*
-* A * R - L * B = scale * C (1)
-* D * R - L * E = scale * F
-*
-* where R and L are unknown m-by-n matrices, (A, D), (B, E) and
-* (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
-* respectively, with real entries. (A, D) and (B, E) must be in
-* generalized (real) Schur canonical form, i.e. A, B are upper quasi
-* triangular and D, E are upper triangular.
-*
-* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
-* scaling factor chosen to avoid overflow.
-*
-* In matrix notation (1) is equivalent to solve Zx = scale b, where
-* Z is defined as
-*
-* Z = [ kron(In, A) -kron(B**T, Im) ] (2)
-* [ kron(In, D) -kron(E**T, Im) ].
-*
-* Here Ik is the identity matrix of size k and X**T is the transpose of
-* X. kron(X, Y) is the Kronecker product between the matrices X and Y.
-*
-* If TRANS = 'T', DTGSYL solves the transposed system Z**T*y = scale*b,
-* which is equivalent to solve for R and L in
-*
-* A**T * R + D**T * L = scale * C (3)
-* R * B**T + L * E**T = scale * -F
-*
-* This case (TRANS = 'T') is used to compute an one-norm-based estimate
-* of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
-* and (B,E), using DLACON.
-*
-* If IJOB >= 1, DTGSYL computes a Frobenius norm-based estimate
-* of Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
-* reciprocal of the smallest singular value of Z. See [1-2] for more
-* information.
-*
-* This is a level 3 BLAS algorithm.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N', solve the generalized Sylvester equation (1).
-* = 'T', solve the 'transposed' system (3).
-*
-* IJOB (input) INTEGER
-* Specifies what kind of functionality to be performed.
-* =0: solve (1) only.
-* =1: The functionality of 0 and 3.
-* =2: The functionality of 0 and 4.
-* =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
-* (look ahead strategy IJOB = 1 is used).
-* =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
-* ( DGECON on sub-systems is used ).
-* Not referenced if TRANS = 'T'.
-*
-* M (input) INTEGER
-* The order of the matrices A and D, and the row dimension of
-* the matrices C, F, R and L.
-*
-* N (input) INTEGER
-* The order of the matrices B and E, and the column dimension
-* of the matrices C, F, R and L.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, M)
-* The upper quasi triangular matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, M).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* The upper quasi triangular matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1, N).
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC, N)
-* On entry, C contains the right-hand-side of the first matrix
-* equation in (1) or (3).
-* On exit, if IJOB = 0, 1 or 2, C has been overwritten by
-* the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
-* the solution achieved during the computation of the
-* Dif-estimate.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1, M).
-*
-* D (input) DOUBLE PRECISION array, dimension (LDD, M)
-* The upper triangular matrix D.
-*
-* LDD (input) INTEGER
-* The leading dimension of the array D. LDD >= max(1, M).
-*
-* E (input) DOUBLE PRECISION array, dimension (LDE, N)
-* The upper triangular matrix E.
-*
-* LDE (input) INTEGER
-* The leading dimension of the array E. LDE >= max(1, N).
-*
-* F (input/output) DOUBLE PRECISION array, dimension (LDF, N)
-* On entry, F contains the right-hand-side of the second matrix
-* equation in (1) or (3).
-* On exit, if IJOB = 0, 1 or 2, F has been overwritten by
-* the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
-* the solution achieved during the computation of the
-* Dif-estimate.
-*
-* LDF (input) INTEGER
-* The leading dimension of the array F. LDF >= max(1, M).
-*
-* DIF (output) DOUBLE PRECISION
-* On exit DIF is the reciprocal of a lower bound of the
-* reciprocal of the Dif-function, i.e. DIF is an upper bound of
-* Dif[(A,D), (B,E)] = sigma_min(Z), where Z as in (2).
-* IF IJOB = 0 or TRANS = 'T', DIF is not touched.
-*
-* SCALE (output) DOUBLE PRECISION
-* On exit SCALE is the scaling factor in (1) or (3).
-* If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
-* to a slightly perturbed system but the input matrices A, B, D
-* and E have not been changed. If SCALE = 0, C and F hold the
-* solutions R and L, respectively, to the homogeneous system
-* with C = F = 0. Normally, SCALE = 1.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK > = 1.
-* If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (M+N+6)
-*
-* INFO (output) INTEGER
-* =0: successful exit
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* >0: (A, D) and (B, E) have common or close eigenvalues.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
-* No 1, 1996.
-*
-* [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
-* Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
-* Appl., 15(4):1045-1060, 1994
-*
-* [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
-* Condition Estimators for Solving the Generalized Sylvester
-* Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
-* July 1989, pp 745-751.
-*
* =====================================================================
* Replaced various illegal calls to DCOPY by calls to DLASET.
* Sven Hammarling, 1/5/02.
diff --git a/SRC/dtpcon.f b/SRC/dtpcon.f
index 8405dfaa..ec9e730c 100644
--- a/SRC/dtpcon.f
+++ b/SRC/dtpcon.f
@@ -1,12 +1,131 @@
+*> \brief \b DTPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPCON estimates the reciprocal of the condition number of a packed
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,58 +137,6 @@
DOUBLE PRECISION AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTPCON estimates the reciprocal of the condition number of a packed
-* triangular matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtpmqrt.f b/SRC/dtpmqrt.f
index 73b257a4..02f952a1 100644
--- a/SRC/dtpmqrt.f
+++ b/SRC/dtpmqrt.f
@@ -1,132 +1,190 @@
- SUBROUTINE DTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
- $ A, LDA, B, LDB, WORK, INFO )
- IMPLICIT NONE
+*> \brief \b DTPMQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION V( LDV, * ), A( LDA, * ), B( LDB, * ),
- $ T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
+* A, LDA, B, LDB, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION V( LDV, * ), A( LDA, * ), B( LDB, * ),
+* $ T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DTPMQRT applies a real orthogonal matrix Q obtained from a
-* "triangular-pentagonal" real block reflector H to a general
-* real matrix C, which consists of two blocks A and B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPMQRT applies a real orthogonal matrix Q obtained from a
+*> "triangular-pentagonal" real block reflector H to a general
+*> real matrix C, which consists of two blocks A and B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix B. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-*
-* L (input) INTEGER
-* The order of the trapezoidal part of V.
-* K >= L >= 0. See Further Details.
-*
-* NB (input) INTEGER
-* The block size used for the storage of T. K >= NB >= 1.
-* This must be the same value of NB used to generate T
-* in CTPQRT.
-*
-* V (input) DOUBLE PRECISION array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CTPQRT in B. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* T (input) DOUBLE PRECISION array, dimension (LDT,K)
-* The upper triangular factors of the block reflectors
-* as returned by CTPQRT, stored as a NB-by-K matrix.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
-*
-* A (input/output) DOUBLE PRECISION array, dimension
-* (LDA,N) if SIDE = 'L' or
-* (LDA,K) if SIDE = 'R'
-* On entry, the K-by-N or M-by-K matrix A.
-* On exit, A is overwritten by the corresponding block of
-* Q*C or Q**T*C or C*Q or C*Q**T. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDC >= max(1,K);
-* If SIDE = 'R', LDC >= max(1,M).
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B. N >= 0.
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the M-by-N matrix B.
-* On exit, B is overwritten by the corresponding block of
-* Q*C or Q**T*C or C*Q or C*Q**T. See Further Details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* LDB >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace/output) DOUBLE PRECISION array. The dimension of WORK is
-* N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* K >= L >= 0. See Further Details.
+*>
+*> NB (input) INTEGER
+*> The block size used for the storage of T. K >= NB >= 1.
+*> This must be the same value of NB used to generate T
+*> in CTPQRT.
+*>
+*> V (input) DOUBLE PRECISION array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CTPQRT in B. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*>
+*> T (input) DOUBLE PRECISION array, dimension (LDT,K)
+*> The upper triangular factors of the block reflectors
+*> as returned by CTPQRT, stored as a NB-by-K matrix.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> A (input/output) DOUBLE PRECISION array, dimension
+*> (LDA,N) if SIDE = 'L' or
+*> (LDA,K) if SIDE = 'R'
+*> On entry, the K-by-N or M-by-K matrix A.
+*> On exit, A is overwritten by the corresponding block of
+*> Q*C or Q**T*C or C*Q or C*Q**T. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDC >= max(1,K);
+*> If SIDE = 'R', LDC >= max(1,M).
+*>
+*> B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the M-by-N matrix B.
+*> On exit, B is overwritten by the corresponding block of
+*> Q*C or Q**T*C or C*Q or C*Q**T. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B.
+*> LDB >= max(1,M).
+*>
+*> WORK (workspace/output) DOUBLE PRECISION array. The dimension of WORK is
+*> N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The columns of the pentagonal matrix V contain the elementary reflectors
+*> H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
+*> trapezoidal block V2:
+*>
+*> V = [V1]
+*> [V2].
+*>
+*> The size of the trapezoidal block V2 is determined by the parameter L,
+*> where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
+*> rows of a K-by-K upper triangular matrix. If L=K, V2 is upper triangular;
+*> if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
+*>
+*> If SIDE = 'L': C = [A] where A is K-by-N, B is M-by-N and V is M-by-K.
+*> [B]
+*>
+*> If SIDE = 'R': C = [A B] where A is M-by-K, B is M-by-N and V is N-by-K.
+*>
+*> The real orthogonal matrix Q is formed from V and T.
+*>
+*> If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
+*>
+*> If TRANS='T' and SIDE='L', C is on exit replaced with Q**T * C.
+*>
+*> If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
+*>
+*> If TRANS='T' and SIDE='R', C is on exit replaced with C * Q**T.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
+ $ A, LDA, B, LDB, WORK, INFO )
*
-* The columns of the pentagonal matrix V contain the elementary reflectors
-* H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
-* trapezoidal block V2:
-*
-* V = [V1]
-* [V2].
-*
-* The size of the trapezoidal block V2 is determined by the parameter L,
-* where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
-* rows of a K-by-K upper triangular matrix. If L=K, V2 is upper triangular;
-* if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
-*
-* If SIDE = 'L': C = [A] where A is K-by-N, B is M-by-N and V is M-by-K.
-* [B]
-*
-* If SIDE = 'R': C = [A B] where A is M-by-K, B is M-by-N and V is N-by-K.
-*
-* The real orthogonal matrix Q is formed from V and T.
-*
-* If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
-*
-* If TRANS='T' and SIDE='L', C is on exit replaced with Q**T * C.
-*
-* If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* If TRANS='T' and SIDE='R', C is on exit replaced with C * Q**T.
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION V( LDV, * ), A( LDA, * ), B( LDB, * ),
+ $ T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtpqrt.f b/SRC/dtpqrt.f
index bf1aabb6..9df082c3 100644
--- a/SRC/dtpqrt.f
+++ b/SRC/dtpqrt.f
@@ -1,120 +1,167 @@
- SUBROUTINE DTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
- $ INFO )
- IMPLICIT NONE
+*> \brief \b DTPQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DTPQRT computes a blocked QR factorization of a real
-* "triangular-pentagonal" matrix C, which is composed of a
-* triangular block A and pentagonal block B, using the compact
-* WY representation for Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPQRT computes a blocked QR factorization of a real
+*> "triangular-pentagonal" matrix C, which is composed of a
+*> triangular block A and pentagonal block B, using the compact
+*> WY representation for Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B, and the order of the
-* triangular matrix A.
-* N >= 0.
-*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part of B.
-* MIN(M,N) >= L >= 0. See Further Details.
-*
-* NB (input) INTEGER
-* The block size to be used in the blocked QR. N >= NB >= 1.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the upper triangular N-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the pentagonal M-by-N matrix B. The first M-L rows
-* are rectangular, and the last L rows are upper trapezoidal.
-* On exit, B contains the pentagonal matrix V. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B, and the order of the
+*> triangular matrix A.
+*> N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,N)
-* The upper triangular block reflectors stored in compact form
-* as a sequence of upper triangular blocks. See Further Details.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NB*N)
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
-*
-* The input matrix C is a (N+M)-by-N matrix
-*
-* C = [ A ]
-* [ B ]
-*
-* where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
-* matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
-* upper trapezoidal matrix B2:
-*
-* B = [ B1 ] <- (M-L)-by-N rectangular
-* [ B2 ] <- L-by-N upper trapezoidal.
-*
-* The upper trapezoidal matrix B2 consists of the first L rows of a
-* N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
-* B is rectangular M-by-N; if M=L=N, B is upper triangular.
-*
-* The matrix W stores the elementary reflectors H(i) in the i-th column
-* below the diagonal (of A) in the (N+M)-by-N input matrix C
-*
-* C = [ A ] <- upper triangular N-by-N
-* [ B ] <- M-by-N pentagonal
-*
-* so that W can be represented as
-*
-* W = [ I ] <- identity, N-by-N
-* [ V ] <- M-by-N, same form as B.
-*
-* Thus, all of information needed for W is contained on exit in B, which
-* we call V above. Note that V has the same form as B; that is,
-*
-* V = [ V1 ] <- (M-L)-by-N rectangular
-* [ V2 ] <- L-by-N upper trapezoidal.
-*
-* The columns of V represent the vectors which define the H(i)'s.
+*>\details \b Further \b Details
+*> \verbatim
+* MIN(M,N) >= L >= 0. See Further Details.
+*>
+*> NB (input) INTEGER
+*> The block size to be used in the blocked QR. N >= NB >= 1.
+*>
+*> A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the upper triangular N-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the upper triangular matrix R.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the pentagonal M-by-N matrix B. The first M-L rows
+*> are rectangular, and the last L rows are upper trapezoidal.
+*> On exit, B contains the pentagonal matrix V. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*>
+*> T (output) DOUBLE PRECISION array, dimension (LDT,N)
+*> The upper triangular block reflectors stored in compact form
+*> as a sequence of upper triangular blocks. See Further Details.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension (NB*N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The input matrix C is a (N+M)-by-N matrix
+*>
+*> C = [ A ]
+*> [ B ]
+*>
+*> where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
+*> matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
+*> upper trapezoidal matrix B2:
+*>
+*> B = [ B1 ] <- (M-L)-by-N rectangular
+*> [ B2 ] <- L-by-N upper trapezoidal.
+*>
+*> The upper trapezoidal matrix B2 consists of the first L rows of a
+*> N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
+*> B is rectangular M-by-N; if M=L=N, B is upper triangular.
+*>
+*> The matrix W stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal (of A) in the (N+M)-by-N input matrix C
+*>
+*> C = [ A ] <- upper triangular N-by-N
+*> [ B ] <- M-by-N pentagonal
+*>
+*> so that W can be represented as
+*>
+*> W = [ I ] <- identity, N-by-N
+*> [ V ] <- M-by-N, same form as B.
+*>
+*> Thus, all of information needed for W is contained on exit in B, which
+*> we call V above. Note that V has the same form as B; that is,
+*>
+*> V = [ V1 ] <- (M-L)-by-N rectangular
+*> [ V2 ] <- L-by-N upper trapezoidal.
+*>
+*> The columns of V represent the vectors which define the H(i)'s.
+*>
+*> The number of blocks is B = ceiling(N/NB), where each
+*> block is of order NB except for the last block, which is of order
+*> IB = N - (B-1)*NB. For each of the B blocks, a upper triangular block
+*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
+*> for the last block) T's are stored in the NB-by-N matrix T as
+*>
+*> T = [T1 T2 ... TB].
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
+ $ INFO )
*
-* The number of blocks is B = ceiling(N/NB), where each
-* block is of order NB except for the last block, which is of order
-* IB = N - (B-1)*NB. For each of the B blocks, a upper triangular block
-* reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
-* for the last block) T's are stored in the NB-by-N matrix T as
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* T = [T1 T2 ... TB].
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtpqrt2.f b/SRC/dtpqrt2.f
index a6fd36b3..984bf2d6 100644
--- a/SRC/dtpqrt2.f
+++ b/SRC/dtpqrt2.f
@@ -1,111 +1,157 @@
- SUBROUTINE DTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
- IMPLICIT NONE
+*> \brief \b DTPQRT2
*
-* -- LAPACK routine (version 3.x) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LDT, N, M, L
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), T( LDT, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDT, N, M, L
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* DTPQRT2 computes a QR factorization of a real "triangular-pentagonal"
-* matrix C, which is composed of a triangular block A and pentagonal block B,
-* using the compact WY representation for Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPQRT2 computes a QR factorization of a real "triangular-pentagonal"
+*> matrix C, which is composed of a triangular block A and pentagonal block B,
+*> using the compact WY representation for Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The total number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B, and the order of
-* the triangular matrix A.
-* N >= 0.
-*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part of B.
-* MIN(M,N) >= L >= 0. See Further Details.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the upper triangular N-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the pentagonal M-by-N matrix B. The first M-L rows
-* are rectangular, and the last L rows are upper trapezoidal.
-* On exit, B contains the pentagonal matrix V. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B, and the order of
+*> the triangular matrix A.
+*> N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) DOUBLE PRECISION array, dimension (LDT,N)
-* The N-by-N upper triangular factor T of the block reflector.
-* See Further Details.
+*> \date November 2011
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N)
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* MIN(M,N) >= L >= 0. See Further Details.
+*>
+*> A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the upper triangular N-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the upper triangular matrix R.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the pentagonal M-by-N matrix B. The first M-L rows
+*> are rectangular, and the last L rows are upper trapezoidal.
+*> On exit, B contains the pentagonal matrix V. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*>
+*> T (output) DOUBLE PRECISION array, dimension (LDT,N)
+*> The N-by-N upper triangular factor T of the block reflector.
+*> See Further Details.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The input matrix C is a (N+M)-by-N matrix
+*>
+*> C = [ A ]
+*> [ B ]
+*>
+*> where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
+*> matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
+*> upper trapezoidal matrix B2:
+*>
+*> B = [ B1 ] <- (M-L)-by-N rectangular
+*> [ B2 ] <- L-by-N upper trapezoidal.
+*>
+*> The upper trapezoidal matrix B2 consists of the first L rows of a
+*> N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
+*> B is rectangular M-by-N; if M=L=N, B is upper triangular.
+*>
+*> The matrix W stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal (of A) in the (N+M)-by-N input matrix C
+*>
+*> C = [ A ] <- upper triangular N-by-N
+*> [ B ] <- M-by-N pentagonal
+*>
+*> so that W can be represented as
+*>
+*> W = [ I ] <- identity, N-by-N
+*> [ V ] <- M-by-N, same form as B.
+*>
+*> Thus, all of information needed for W is contained on exit in B, which
+*> we call V above. Note that V has the same form as B; that is,
+*>
+*> V = [ V1 ] <- (M-L)-by-N rectangular
+*> [ V2 ] <- L-by-N upper trapezoidal.
+*>
+*> The columns of V represent the vectors which define the H(i)'s.
+*> The (M+N)-by-(M+N) block reflector H is then given by
+*>
+*> H = I - W * T * W**T
+*>
+*> where W^H is the conjugate transpose of W and T is the upper triangular
+*> factor of the block reflector.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
*
-* The input matrix C is a (N+M)-by-N matrix
-*
-* C = [ A ]
-* [ B ]
-*
-* where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
-* matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
-* upper trapezoidal matrix B2:
-*
-* B = [ B1 ] <- (M-L)-by-N rectangular
-* [ B2 ] <- L-by-N upper trapezoidal.
-*
-* The upper trapezoidal matrix B2 consists of the first L rows of a
-* N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
-* B is rectangular M-by-N; if M=L=N, B is upper triangular.
-*
-* The matrix W stores the elementary reflectors H(i) in the i-th column
-* below the diagonal (of A) in the (N+M)-by-N input matrix C
-*
-* C = [ A ] <- upper triangular N-by-N
-* [ B ] <- M-by-N pentagonal
-*
-* so that W can be represented as
-*
-* W = [ I ] <- identity, N-by-N
-* [ V ] <- M-by-N, same form as B.
-*
-* Thus, all of information needed for W is contained on exit in B, which
-* we call V above. Note that V has the same form as B; that is,
-*
-* V = [ V1 ] <- (M-L)-by-N rectangular
-* [ V2 ] <- L-by-N upper trapezoidal.
-*
-* The columns of V represent the vectors which define the H(i)'s.
-* The (M+N)-by-(M+N) block reflector H is then given by
-*
-* H = I - W * T * W**T
+* -- LAPACK computational routine (version 3.x) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where W^H is the conjugate transpose of W and T is the upper triangular
-* factor of the block reflector.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LDT, N, M, L
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtprfb.f b/SRC/dtprfb.f
index c7b4d58a..eb59ca2f 100644
--- a/SRC/dtprfb.f
+++ b/SRC/dtprfb.f
@@ -1,11 +1,218 @@
+*> \brief \b DTPRFB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
+* V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, L, LDA, LDB, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), T( LDT, * ),
+* $ V( LDV, * ), WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPRFB applies a real "triangular-pentagonal" block reflector H or its
+*> transpose H**T to a real matrix C, which is composed of two
+*> blocks A and B, either from the left or right.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**T from the Left
+*> = 'R': apply H or H**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'T': apply H**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columns
+*> = 'R': Rows
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B.
+*> N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T, i.e. the number of elementary
+*> reflectors whose product defines the block reflector.
+*> K >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* K >= L >= 0. See Further Details.
+*>
+*> V (input) DOUBLE PRECISION array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,M) if STOREV = 'R' and SIDE = 'L'
+*> (LDV,N) if STOREV = 'R' and SIDE = 'R'
+*> The pentagonal matrix V, which contains the elementary reflectors
+*> H(1), H(2), ..., H(K). See Further Details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*> if STOREV = 'R', LDV >= K.
+*>
+*> T (input) DOUBLE PRECISION array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T.
+*> LDT >= K.
+*>
+*> A (input/output) DOUBLE PRECISION array, dimension
+*> (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
+*> On entry, the K-by-N or M-by-K matrix A.
+*> On exit, A is overwritten by the corresponding block of
+*> H*C or H**T*C or C*H or C*H**T. See Futher Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDC >= max(1,K);
+*> If SIDE = 'R', LDC >= max(1,M).
+*>
+*> B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the M-by-N matrix B.
+*> On exit, B is overwritten by the corresponding block of
+*> H*C or H**T*C or C*H or C*H**T. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B.
+*> LDB >= max(1,M).
+*>
+*> WORK (workspace) DOUBLE PRECISION array, dimension
+*> (LDWORK,N) if SIDE = 'L',
+*> (LDWORK,K) if SIDE = 'R'.
+*>
+*> LDWORK (input) INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= K;
+*> if SIDE = 'R', LDWORK >= M.
+*>
+*>
+*> The matrix C is a composite matrix formed from blocks A and B.
+*> The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
+*> and if SIDE = 'L', A is of size K-by-N.
+*>
+*> If SIDE = 'R' and DIRECT = 'F', C = [A B].
+*>
+*> If SIDE = 'L' and DIRECT = 'F', C = [A]
+*> [B].
+*>
+*> If SIDE = 'R' and DIRECT = 'B', C = [B A].
+*>
+*> If SIDE = 'L' and DIRECT = 'B', C = [B]
+*> [A].
+*>
+*> The pentagonal matrix V is composed of a rectangular block V1 and a
+*> trapezoidal block V2. The size of the trapezoidal block is determined by
+*> the parameter L, where 0<=L<=K. If L=K, the V2 block of V is triangular;
+*> if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
+*>
+*> If DIRECT = 'F' and STOREV = 'C': V = [V1]
+*> [V2]
+*> - V2 is upper trapezoidal (first L rows of K-by-K upper triangular)
+*>
+*> If DIRECT = 'F' and STOREV = 'R': V = [V1 V2]
+*>
+*> - V2 is lower trapezoidal (first L columns of K-by-K lower triangular)
+*>
+*> If DIRECT = 'B' and STOREV = 'C': V = [V2]
+*> [V1]
+*> - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
+*>
+*> If DIRECT = 'B' and STOREV = 'R': V = [V2 V1]
+*>
+*> - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
+*>
+*> If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
+*>
+*> If STOREV = 'C' and SIDE = 'R', V is N-by-K with V2 L-by-K.
+*>
+*> If STOREV = 'R' and SIDE = 'L', V is K-by-M with V2 K-by-L.
+*>
+*> If STOREV = 'R' and SIDE = 'R', V is K-by-N with V2 K-by-L.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
$ V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.x) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIRECT, SIDE, STOREV, TRANS
@@ -16,149 +223,6 @@
$ V( LDV, * ), WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* DTPRFB applies a real "triangular-pentagonal" block reflector H or its
-* transpose H**T to a real matrix C, which is composed of two
-* blocks A and B, either from the left or right.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**T from the Left
-* = 'R': apply H or H**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'T': apply H**T (Transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columns
-* = 'R': Rows
-*
-* M (input) INTEGER
-* The number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B.
-* N >= 0.
-*
-* K (input) INTEGER
-* The order of the matrix T, i.e. the number of elementary
-* reflectors whose product defines the block reflector.
-* K >= 0.
-*
-* L (input) INTEGER
-* The order of the trapezoidal part of V.
-* K >= L >= 0. See Further Details.
-*
-* V (input) DOUBLE PRECISION array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,M) if STOREV = 'R' and SIDE = 'L'
-* (LDV,N) if STOREV = 'R' and SIDE = 'R'
-* The pentagonal matrix V, which contains the elementary reflectors
-* H(1), H(2), ..., H(K). See Further Details.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-* if STOREV = 'R', LDV >= K.
-*
-* T (input) DOUBLE PRECISION array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T.
-* LDT >= K.
-*
-* A (input/output) DOUBLE PRECISION array, dimension
-* (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
-* On entry, the K-by-N or M-by-K matrix A.
-* On exit, A is overwritten by the corresponding block of
-* H*C or H**T*C or C*H or C*H**T. See Futher Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDC >= max(1,K);
-* If SIDE = 'R', LDC >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the M-by-N matrix B.
-* On exit, B is overwritten by the corresponding block of
-* H*C or H**T*C or C*H or C*H**T. See Further Details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* LDB >= max(1,M).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (LDWORK,N) if SIDE = 'L',
-* (LDWORK,K) if SIDE = 'R'.
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= K;
-* if SIDE = 'R', LDWORK >= M.
-*
-* Further Details
-* ===============
-*
-* The matrix C is a composite matrix formed from blocks A and B.
-* The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
-* and if SIDE = 'L', A is of size K-by-N.
-*
-* If SIDE = 'R' and DIRECT = 'F', C = [A B].
-*
-* If SIDE = 'L' and DIRECT = 'F', C = [A]
-* [B].
-*
-* If SIDE = 'R' and DIRECT = 'B', C = [B A].
-*
-* If SIDE = 'L' and DIRECT = 'B', C = [B]
-* [A].
-*
-* The pentagonal matrix V is composed of a rectangular block V1 and a
-* trapezoidal block V2. The size of the trapezoidal block is determined by
-* the parameter L, where 0<=L<=K. If L=K, the V2 block of V is triangular;
-* if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
-*
-* If DIRECT = 'F' and STOREV = 'C': V = [V1]
-* [V2]
-* - V2 is upper trapezoidal (first L rows of K-by-K upper triangular)
-*
-* If DIRECT = 'F' and STOREV = 'R': V = [V1 V2]
-*
-* - V2 is lower trapezoidal (first L columns of K-by-K lower triangular)
-*
-* If DIRECT = 'B' and STOREV = 'C': V = [V2]
-* [V1]
-* - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
-*
-* If DIRECT = 'B' and STOREV = 'R': V = [V2 V1]
-*
-* - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
-*
-* If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
-*
-* If STOREV = 'C' and SIDE = 'R', V is N-by-K with V2 L-by-K.
-*
-* If STOREV = 'R' and SIDE = 'L', V is K-by-M with V2 K-by-L.
-*
-* If STOREV = 'R' and SIDE = 'R', V is K-by-N with V2 K-by-L.
-*
* ==========================================================================
*
* .. Parameters ..
diff --git a/SRC/dtprfs.f b/SRC/dtprfs.f
index 30b7fba0..23bd613d 100644
--- a/SRC/dtprfs.f
+++ b/SRC/dtprfs.f
@@ -1,12 +1,176 @@
+*> \brief \b DTPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
+* FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular packed
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by DTPTRS or some other
+*> means before entering this routine. DTPRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
$ FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,85 +182,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DTPRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular packed
-* coefficient matrix.
-*
-* The solution matrix X must be computed by DTPTRS or some other
-* means before entering this routine. DTPRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtptri.f b/SRC/dtptri.f
index 091d61c1..91ba2a88 100644
--- a/SRC/dtptri.f
+++ b/SRC/dtptri.f
@@ -1,69 +1,128 @@
- SUBROUTINE DTPTRI( UPLO, DIAG, N, AP, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * )
-* ..
-*
+*> \brief \b DTPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPTRI( UPLO, DIAG, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * )
+* ..
+*
* Purpose
* =======
*
-* DTPTRI computes the inverse of a real upper or lower triangular
-* matrix A stored in packed format.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPTRI computes the inverse of a real upper or lower triangular
+*> matrix A stored in packed format.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangular matrix A, stored
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-* On exit, the (triangular) inverse of the original matrix, in
-* the same packed storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangular matrix A, stored
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same packed storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A triangular matrix A can be transferred to packed storage using one
+*> of the following program segments:
+*>
+*> UPLO = 'U': UPLO = 'L':
+*>
+*> JC = 1 JC = 1
+*> DO 2 J = 1, N DO 2 J = 1, N
+*> DO 1 I = 1, J DO 1 I = J, N
+*> AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
+*> 1 CONTINUE 1 CONTINUE
+*> JC = JC + J JC = JC + N - J + 1
+*> 2 CONTINUE 2 CONTINUE
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTPTRI( UPLO, DIAG, N, AP, INFO )
*
-* A triangular matrix A can be transferred to packed storage using one
-* of the following program segments:
-*
-* UPLO = 'U': UPLO = 'L':
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* JC = 1 JC = 1
-* DO 2 J = 1, N DO 2 J = 1, N
-* DO 1 I = 1, J DO 1 I = J, N
-* AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
-* 1 CONTINUE 1 CONTINUE
-* JC = JC + J JC = JC + N - J + 1
-* 2 CONTINUE 2 CONTINUE
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtptrs.f b/SRC/dtptrs.f
index 2a350671..3e0a43ba 100644
--- a/SRC/dtptrs.f
+++ b/SRC/dtptrs.f
@@ -1,9 +1,131 @@
+*> \brief \b DTPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPTRS solves a triangular system of the form
+*>
+*> A * X = B or A**T * X = B,
+*>
+*> where A is a triangular matrix of order N stored in packed format,
+*> and B is an N-by-NRHS matrix. A check is made to verify that A is
+*> nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the
+*> solutions X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -13,62 +135,6 @@
DOUBLE PRECISION AP( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DTPTRS solves a triangular system of the form
-*
-* A * X = B or A**T * X = B,
-*
-* where A is a triangular matrix of order N stored in packed format,
-* and B is an N-by-NRHS matrix. A check is made to verify that A is
-* nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the
-* solutions X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtpttf.f b/SRC/dtpttf.f
index c00ee36c..f428a5e5 100644
--- a/SRC/dtpttf.f
+++ b/SRC/dtpttf.f
@@ -1,139 +1,196 @@
- SUBROUTINE DTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b DTPTTF
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( 0: * ), ARF( 0: * )
+* Definition
+* ==========
*
+* SUBROUTINE DTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( 0: * ), ARF( 0: * )
+*
* Purpose
* =======
*
-* DTPTTF copies a triangular matrix A from standard packed format (TP)
-* to rectangular full packed format (TF).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPTTF copies a triangular matrix A from standard packed format (TP)
+*> to rectangular full packed format (TF).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF in Normal format is wanted;
-* = 'T': ARF in Conjugate-transpose format is wanted.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF in Normal format is wanted;
+*> = 'T': ARF in Conjugate-transpose format is wanted.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \date November 2011
*
-* ARF (output) DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( 0: * ), ARF( 0: * )
*
* =====================================================================
*
diff --git a/SRC/dtpttr.f b/SRC/dtpttr.f
index ad452075..d8a581b4 100644
--- a/SRC/dtpttr.f
+++ b/SRC/dtpttr.f
@@ -1,12 +1,105 @@
- SUBROUTINE DTPTTR( UPLO, N, AP, A, LDA, INFO )
+*> \brief \b DTPTTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPTTR( UPLO, N, AP, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AP( * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.3.0) --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPTTR copies a triangular matrix A from standard packed format (TP)
+*> to standard full format (TR).
+*>
+*>\endverbatim
*
-* -- Contributed by Julien Langou of the Univ. of Colorado Denver --
-* November 2010 --
+* Arguments
+* =========
*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular.
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension ( LDA, N )
+*> On exit, the triangular matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE DTPTTR( UPLO, N, AP, A, LDA, INFO )
+*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,45 +109,6 @@
DOUBLE PRECISION A( LDA, * ), AP( * )
* ..
*
-* Purpose
-* =======
-*
-* DTPTTR copies a triangular matrix A from standard packed format (TP)
-* to standard full format (TR).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular.
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* A (output) DOUBLE PRECISION array, dimension ( LDA, N )
-* On exit, the triangular matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrcon.f b/SRC/dtrcon.f
index bb522de3..ecf81ba1 100644
--- a/SRC/dtrcon.f
+++ b/SRC/dtrcon.f
@@ -1,12 +1,138 @@
+*> \brief \b DTRCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRCON estimates the reciprocal of the condition number of a
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,62 +144,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTRCON estimates the reciprocal of the condition number of a
-* triangular matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrevc.f b/SRC/dtrevc.f
index e7cbc5dc..4334b3a0 100644
--- a/SRC/dtrevc.f
+++ b/SRC/dtrevc.f
@@ -1,10 +1,225 @@
+*> \brief \b DTREVC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+* LDVR, MM, M, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, SIDE
+* INTEGER INFO, LDT, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* DOUBLE PRECISION T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTREVC computes some or all of the right and/or left eigenvectors of
+*> a real upper quasi-triangular matrix T.
+*> Matrices of this type are produced by the Schur factorization of
+*> a real general matrix: A = Q*T*Q**T, as computed by DHSEQR.
+*>
+*> The right eigenvector x and the left eigenvector y of T corresponding
+*> to an eigenvalue w are defined by:
+*>
+*> T*x = w*x, (y**T)*T = w*(y**T)
+*>
+*> where y**T denotes the transpose of y.
+*> The eigenvalues are not input to this routine, but are read directly
+*> from the diagonal blocks of T.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
+*> input matrix. If Q is the orthogonal factor that reduces a matrix
+*> A to Schur form T, then Q*X and Q*Y are the matrices of right and
+*> left eigenvectors of A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute all right and/or left eigenvectors;
+*> = 'B': compute all right and/or left eigenvectors,
+*> backtransformed by the matrices in VR and/or VL;
+*> = 'S': compute selected right and/or left eigenvectors,
+*> as indicated by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in,out] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenvectors to be
+*> computed.
+*> If w(j) is a real eigenvalue, the corresponding real
+*> eigenvector is computed if SELECT(j) is .TRUE..
+*> If w(j) and w(j+1) are the real and imaginary parts of a
+*> complex eigenvalue, the corresponding complex eigenvector is
+*> computed if either SELECT(j) or SELECT(j+1) is .TRUE., and
+*> on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is set to
+*> .FALSE..
+*> Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,N)
+*> The upper quasi-triangular matrix T in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,MM)
+*> On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*> contain an N-by-N matrix Q (usually the orthogonal matrix Q
+*> of Schur vectors returned by DHSEQR).
+*> On exit, if SIDE = 'L' or 'B', VL contains:
+*> if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
+*> if HOWMNY = 'B', the matrix Q*Y;
+*> if HOWMNY = 'S', the left eigenvectors of T specified by
+*> SELECT, stored consecutively in the columns
+*> of VL, in the same order as their
+*> eigenvalues.
+*> A complex eigenvector corresponding to a complex eigenvalue
+*> is stored in two consecutive columns, the first holding the
+*> real part, and the second the imaginary part.
+*> Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1, and if
+*> SIDE = 'L' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,MM)
+*> On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*> contain an N-by-N matrix Q (usually the orthogonal matrix Q
+*> of Schur vectors returned by DHSEQR).
+*> On exit, if SIDE = 'R' or 'B', VR contains:
+*> if HOWMNY = 'A', the matrix X of right eigenvectors of T;
+*> if HOWMNY = 'B', the matrix Q*X;
+*> if HOWMNY = 'S', the right eigenvectors of T specified by
+*> SELECT, stored consecutively in the columns
+*> of VR, in the same order as their
+*> eigenvalues.
+*> A complex eigenvector corresponding to a complex eigenvalue
+*> is stored in two consecutive columns, the first holding the
+*> real part and the second the imaginary part.
+*> Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> SIDE = 'R' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR actually
+*> used to store the eigenvectors.
+*> If HOWMNY = 'A' or 'B', M is set to N.
+*> Each selected real eigenvector occupies one column and each
+*> selected complex eigenvector occupies two columns.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The algorithm used in this program is basically backward (forward)
+*> substitution, with scaling to make the the code robust against
+*> possible overflow.
+*>
+*> Each eigenvector is normalized so that the element of largest
+*> magnitude has magnitude 1; here the magnitude of a complex number
+*> (x,y) is taken to be |x| + |y|.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
$ LDVR, MM, M, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, SIDE
@@ -16,132 +231,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTREVC computes some or all of the right and/or left eigenvectors of
-* a real upper quasi-triangular matrix T.
-* Matrices of this type are produced by the Schur factorization of
-* a real general matrix: A = Q*T*Q**T, as computed by DHSEQR.
-*
-* The right eigenvector x and the left eigenvector y of T corresponding
-* to an eigenvalue w are defined by:
-*
-* T*x = w*x, (y**T)*T = w*(y**T)
-*
-* where y**T denotes the transpose of y.
-* The eigenvalues are not input to this routine, but are read directly
-* from the diagonal blocks of T.
-*
-* This routine returns the matrices X and/or Y of right and left
-* eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
-* input matrix. If Q is the orthogonal factor that reduces a matrix
-* A to Schur form T, then Q*X and Q*Y are the matrices of right and
-* left eigenvectors of A.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute all right and/or left eigenvectors;
-* = 'B': compute all right and/or left eigenvectors,
-* backtransformed by the matrices in VR and/or VL;
-* = 'S': compute selected right and/or left eigenvectors,
-* as indicated by the logical array SELECT.
-*
-* SELECT (input/output) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenvectors to be
-* computed.
-* If w(j) is a real eigenvalue, the corresponding real
-* eigenvector is computed if SELECT(j) is .TRUE..
-* If w(j) and w(j+1) are the real and imaginary parts of a
-* complex eigenvalue, the corresponding complex eigenvector is
-* computed if either SELECT(j) or SELECT(j+1) is .TRUE., and
-* on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is set to
-* .FALSE..
-* Not referenced if HOWMNY = 'A' or 'B'.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input) DOUBLE PRECISION array, dimension (LDT,N)
-* The upper quasi-triangular matrix T in Schur canonical form.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* VL (input/output) DOUBLE PRECISION array, dimension (LDVL,MM)
-* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-* contain an N-by-N matrix Q (usually the orthogonal matrix Q
-* of Schur vectors returned by DHSEQR).
-* On exit, if SIDE = 'L' or 'B', VL contains:
-* if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
-* if HOWMNY = 'B', the matrix Q*Y;
-* if HOWMNY = 'S', the left eigenvectors of T specified by
-* SELECT, stored consecutively in the columns
-* of VL, in the same order as their
-* eigenvalues.
-* A complex eigenvector corresponding to a complex eigenvalue
-* is stored in two consecutive columns, the first holding the
-* real part, and the second the imaginary part.
-* Not referenced if SIDE = 'R'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1, and if
-* SIDE = 'L' or 'B', LDVL >= N.
-*
-* VR (input/output) DOUBLE PRECISION array, dimension (LDVR,MM)
-* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-* contain an N-by-N matrix Q (usually the orthogonal matrix Q
-* of Schur vectors returned by DHSEQR).
-* On exit, if SIDE = 'R' or 'B', VR contains:
-* if HOWMNY = 'A', the matrix X of right eigenvectors of T;
-* if HOWMNY = 'B', the matrix Q*X;
-* if HOWMNY = 'S', the right eigenvectors of T specified by
-* SELECT, stored consecutively in the columns
-* of VR, in the same order as their
-* eigenvalues.
-* A complex eigenvector corresponding to a complex eigenvalue
-* is stored in two consecutive columns, the first holding the
-* real part and the second the imaginary part.
-* Not referenced if SIDE = 'L'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* SIDE = 'R' or 'B', LDVR >= N.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR actually
-* used to store the eigenvectors.
-* If HOWMNY = 'A' or 'B', M is set to N.
-* Each selected real eigenvector occupies one column and each
-* selected complex eigenvector occupies two columns.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The algorithm used in this program is basically backward (forward)
-* substitution, with scaling to make the the code robust against
-* possible overflow.
-*
-* Each eigenvector is normalized so that the element of largest
-* magnitude has magnitude 1; here the magnitude of a complex number
-* (x,y) is taken to be |x| + |y|.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrexc.f b/SRC/dtrexc.f
index 6a7c0bf4..3ed7f8bf 100644
--- a/SRC/dtrexc.f
+++ b/SRC/dtrexc.f
@@ -1,10 +1,145 @@
+*> \brief \b DTREXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ
+* INTEGER IFST, ILST, INFO, LDQ, LDT, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTREXC reorders the real Schur factorization of a real matrix
+*> A = Q*T*Q**T, so that the diagonal block of T with row index IFST is
+*> moved to row ILST.
+*>
+*> The real Schur form T is reordered by an orthogonal similarity
+*> transformation Z**T*T*Z, and optionally the matrix Q of Schur vectors
+*> is updated by postmultiplying it with Z.
+*>
+*> T must be in Schur canonical form (as returned by DHSEQR), that is,
+*> block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
+*> 2-by-2 diagonal block has its diagonal elements equal and its
+*> off-diagonal elements of opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'V': update the matrix Q of Schur vectors;
+*> = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,N)
+*> On entry, the upper quasi-triangular matrix T, in Schur
+*> Schur canonical form.
+*> On exit, the reordered upper quasi-triangular matrix, again
+*> in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*> On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*> orthogonal transformation matrix Z which reorders T.
+*> If COMPQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IFST
+*> \verbatim
+*> IFST is INTEGER
+*> \param[in,out] ILST
+*> \verbatim
+*> ILST is INTEGER
+*> Specify the reordering of the diagonal blocks of T.
+*> The block with row index IFST is moved to row ILST, by a
+*> sequence of transpositions between adjacent blocks.
+*> On exit, if IFST pointed on entry to the second row of a
+*> 2-by-2 block, it is changed to point to the first row; ILST
+*> always points to the first row of the block in its final
+*> position (which may differ from its input value by +1 or -1).
+*> 1 <= IFST <= N; 1 <= ILST <= N.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1: two adjacent blocks were too close to swap (the problem
+*> is very ill-conditioned); T may have been partially
+*> reordered, and ILST points to the first row of the
+*> current position of the block being moved.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ
@@ -14,71 +149,6 @@
DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTREXC reorders the real Schur factorization of a real matrix
-* A = Q*T*Q**T, so that the diagonal block of T with row index IFST is
-* moved to row ILST.
-*
-* The real Schur form T is reordered by an orthogonal similarity
-* transformation Z**T*T*Z, and optionally the matrix Q of Schur vectors
-* is updated by postmultiplying it with Z.
-*
-* T must be in Schur canonical form (as returned by DHSEQR), that is,
-* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
-* 2-by-2 diagonal block has its diagonal elements equal and its
-* off-diagonal elements of opposite sign.
-*
-* Arguments
-* =========
-*
-* COMPQ (input) CHARACTER*1
-* = 'V': update the matrix Q of Schur vectors;
-* = 'N': do not update Q.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) DOUBLE PRECISION array, dimension (LDT,N)
-* On entry, the upper quasi-triangular matrix T, in Schur
-* Schur canonical form.
-* On exit, the reordered upper quasi-triangular matrix, again
-* in Schur canonical form.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-* On exit, if COMPQ = 'V', Q has been postmultiplied by the
-* orthogonal transformation matrix Z which reorders T.
-* If COMPQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* IFST (input/output) INTEGER
-* ILST (input/output) INTEGER
-* Specify the reordering of the diagonal blocks of T.
-* The block with row index IFST is moved to row ILST, by a
-* sequence of transpositions between adjacent blocks.
-* On exit, if IFST pointed on entry to the second row of a
-* 2-by-2 block, it is changed to point to the first row; ILST
-* always points to the first row of the block in its final
-* position (which may differ from its input value by +1 or -1).
-* 1 <= IFST <= N; 1 <= ILST <= N.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1: two adjacent blocks were too close to swap (the problem
-* is very ill-conditioned); T may have been partially
-* reordered, and ILST points to the first row of the
-* current position of the block being moved.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrrfs.f b/SRC/dtrrfs.f
index 441863d8..43709af3 100644
--- a/SRC/dtrrfs.f
+++ b/SRC/dtrrfs.f
@@ -1,12 +1,183 @@
+*> \brief \b DTRRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
+* LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by DTRTRS or some other
+*> means before entering this routine. DTRRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
$ LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,89 +189,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular
-* coefficient matrix.
-*
-* The solution matrix X must be computed by DTRTRS or some other
-* means before entering this routine. DTRRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrsen.f b/SRC/dtrsen.f
index 58900e06..48f47216 100644
--- a/SRC/dtrsen.f
+++ b/SRC/dtrsen.f
@@ -1,10 +1,317 @@
+*> \brief \b DTRSEN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI,
+* M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, JOB
+* INTEGER INFO, LDQ, LDT, LIWORK, LWORK, M, N
+* DOUBLE PRECISION S, SEP
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WI( * ), WORK( * ),
+* $ WR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRSEN reorders the real Schur factorization of a real matrix
+*> A = Q*T*Q**T, so that a selected cluster of eigenvalues appears in
+*> the leading diagonal blocks of the upper quasi-triangular matrix T,
+*> and the leading columns of Q form an orthonormal basis of the
+*> corresponding right invariant subspace.
+*>
+*> Optionally the routine computes the reciprocal condition numbers of
+*> the cluster of eigenvalues and/or the invariant subspace.
+*>
+*> T must be in Schur canonical form (as returned by DHSEQR), that is,
+*> block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
+*> 2-by-2 diagonal block has its diagonal elemnts equal and its
+*> off-diagonal elements of opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for the
+*> cluster of eigenvalues (S) or the invariant subspace (SEP):
+*> = 'N': none;
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for invariant subspace only (SEP);
+*> = 'B': for both eigenvalues and invariant subspace (S and
+*> SEP).
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'V': update the matrix Q of Schur vectors;
+*> = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> SELECT specifies the eigenvalues in the selected cluster. To
+*> select a real eigenvalue w(j), SELECT(j) must be set to
+*> .TRUE.. To select a complex conjugate pair of eigenvalues
+*> w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
+*> either SELECT(j) or SELECT(j+1) or both must be set to
+*> .TRUE.; a complex conjugate pair of eigenvalues must be
+*> either both included in the cluster or both excluded.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,N)
+*> On entry, the upper quasi-triangular matrix T, in Schur
+*> canonical form.
+*> On exit, T is overwritten by the reordered matrix T, again in
+*> Schur canonical form, with the selected eigenvalues in the
+*> leading diagonal blocks.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*> On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*> orthogonal transformation matrix which reorders T; the
+*> leading M columns of Q form an orthonormal basis for the
+*> specified invariant subspace.
+*> If COMPQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> The real and imaginary parts, respectively, of the reordered
+*> eigenvalues of T. The eigenvalues are stored in the same
+*> order as on the diagonal of T, with WR(i) = T(i,i) and, if
+*> T(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) > 0 and
+*> WI(i+1) = -WI(i). Note that if a complex eigenvalue is
+*> sufficiently ill-conditioned, then its value may differ
+*> significantly from its value before reordering.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The dimension of the specified invariant subspace.
+*> 0 < = M <= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION
+*> If JOB = 'E' or 'B', S is a lower bound on the reciprocal
+*> condition number for the selected cluster of eigenvalues.
+*> S cannot underestimate the true reciprocal condition number
+*> by more than a factor of sqrt(N). If M = 0 or N, S = 1.
+*> If JOB = 'N' or 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is DOUBLE PRECISION
+*> If JOB = 'V' or 'B', SEP is the estimated reciprocal
+*> condition number of the specified invariant subspace. If
+*> M = 0 or N, SEP = norm(T).
+*> If JOB = 'N' or 'E', SEP is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If JOB = 'N', LWORK >= max(1,N);
+*> if JOB = 'E', LWORK >= max(1,M*(N-M));
+*> if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOB = 'N' or 'E', LIWORK >= 1;
+*> if JOB = 'V' or 'B', LIWORK >= max(1,M*(N-M)).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1: reordering of T failed because some eigenvalues are too
+*> close to separate (the problem is very ill-conditioned);
+*> T may have been partially reordered, and WR and WI
+*> contain the eigenvalues in the same order as in T; S and
+*> SEP (if requested) are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> DTRSEN first collects the selected eigenvalues by computing an
+*> orthogonal transformation Z to move them to the top left corner of T.
+*> In other words, the selected eigenvalues are the eigenvalues of T11
+*> in:
+*>
+*> Z**T * T * Z = ( T11 T12 ) n1
+*> ( 0 T22 ) n2
+*> n1 n2
+*>
+*> where N = n1+n2 and Z**T means the transpose of Z. The first n1 columns
+*> of Z span the specified invariant subspace of T.
+*>
+*> If T has been obtained from the real Schur factorization of a matrix
+*> A = Q*T*Q**T, then the reordered real Schur factorization of A is given
+*> by A = (Q*Z)*(Z**T*T*Z)*(Q*Z)**T, and the first n1 columns of Q*Z span
+*> the corresponding invariant subspace of A.
+*>
+*> The reciprocal condition number of the average of the eigenvalues of
+*> T11 may be returned in S. S lies between 0 (very badly conditioned)
+*> and 1 (very well conditioned). It is computed as follows. First we
+*> compute R so that
+*>
+*> P = ( I R ) n1
+*> ( 0 0 ) n2
+*> n1 n2
+*>
+*> is the projector on the invariant subspace associated with T11.
+*> R is the solution of the Sylvester equation:
+*>
+*> T11*R - R*T22 = T12.
+*>
+*> Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
+*> the two-norm of M. Then S is computed as the lower bound
+*>
+*> (1 + F-norm(R)**2)**(-1/2)
+*>
+*> on the reciprocal of 2-norm(P), the true reciprocal condition number.
+*> S cannot underestimate 1 / 2-norm(P) by more than a factor of
+*> sqrt(N).
+*>
+*> An approximate error bound for the computed average of the
+*> eigenvalues of T11 is
+*>
+*> EPS * norm(T) / S
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal condition number of the right invariant subspace
+*> spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
+*> SEP is defined as the separation of T11 and T22:
+*>
+*> sep( T11, T22 ) = sigma-min( C )
+*>
+*> where sigma-min(C) is the smallest singular value of the
+*> n1*n2-by-n1*n2 matrix
+*>
+*> C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
+*>
+*> I(m) is an m by m identity matrix, and kprod denotes the Kronecker
+*> product. We estimate sigma-min(C) by the reciprocal of an estimate of
+*> the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
+*> cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
+*>
+*> When SEP is small, small changes in T can cause large changes in
+*> the invariant subspace. An approximate bound on the maximum angular
+*> error in the computed right invariant subspace is
+*>
+*> EPS * norm(T) / SEP
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI,
$ M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, JOB
@@ -18,208 +325,6 @@
$ WR( * )
* ..
*
-* Purpose
-* =======
-*
-* DTRSEN reorders the real Schur factorization of a real matrix
-* A = Q*T*Q**T, so that a selected cluster of eigenvalues appears in
-* the leading diagonal blocks of the upper quasi-triangular matrix T,
-* and the leading columns of Q form an orthonormal basis of the
-* corresponding right invariant subspace.
-*
-* Optionally the routine computes the reciprocal condition numbers of
-* the cluster of eigenvalues and/or the invariant subspace.
-*
-* T must be in Schur canonical form (as returned by DHSEQR), that is,
-* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
-* 2-by-2 diagonal block has its diagonal elemnts equal and its
-* off-diagonal elements of opposite sign.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for the
-* cluster of eigenvalues (S) or the invariant subspace (SEP):
-* = 'N': none;
-* = 'E': for eigenvalues only (S);
-* = 'V': for invariant subspace only (SEP);
-* = 'B': for both eigenvalues and invariant subspace (S and
-* SEP).
-*
-* COMPQ (input) CHARACTER*1
-* = 'V': update the matrix Q of Schur vectors;
-* = 'N': do not update Q.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* SELECT specifies the eigenvalues in the selected cluster. To
-* select a real eigenvalue w(j), SELECT(j) must be set to
-* .TRUE.. To select a complex conjugate pair of eigenvalues
-* w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
-* either SELECT(j) or SELECT(j+1) or both must be set to
-* .TRUE.; a complex conjugate pair of eigenvalues must be
-* either both included in the cluster or both excluded.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) DOUBLE PRECISION array, dimension (LDT,N)
-* On entry, the upper quasi-triangular matrix T, in Schur
-* canonical form.
-* On exit, T is overwritten by the reordered matrix T, again in
-* Schur canonical form, with the selected eigenvalues in the
-* leading diagonal blocks.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N)
-* On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-* On exit, if COMPQ = 'V', Q has been postmultiplied by the
-* orthogonal transformation matrix which reorders T; the
-* leading M columns of Q form an orthonormal basis for the
-* specified invariant subspace.
-* If COMPQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
-*
-* WR (output) DOUBLE PRECISION array, dimension (N)
-* WI (output) DOUBLE PRECISION array, dimension (N)
-* The real and imaginary parts, respectively, of the reordered
-* eigenvalues of T. The eigenvalues are stored in the same
-* order as on the diagonal of T, with WR(i) = T(i,i) and, if
-* T(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) > 0 and
-* WI(i+1) = -WI(i). Note that if a complex eigenvalue is
-* sufficiently ill-conditioned, then its value may differ
-* significantly from its value before reordering.
-*
-* M (output) INTEGER
-* The dimension of the specified invariant subspace.
-* 0 < = M <= N.
-*
-* S (output) DOUBLE PRECISION
-* If JOB = 'E' or 'B', S is a lower bound on the reciprocal
-* condition number for the selected cluster of eigenvalues.
-* S cannot underestimate the true reciprocal condition number
-* by more than a factor of sqrt(N). If M = 0 or N, S = 1.
-* If JOB = 'N' or 'V', S is not referenced.
-*
-* SEP (output) DOUBLE PRECISION
-* If JOB = 'V' or 'B', SEP is the estimated reciprocal
-* condition number of the specified invariant subspace. If
-* M = 0 or N, SEP = norm(T).
-* If JOB = 'N' or 'E', SEP is not referenced.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If JOB = 'N', LWORK >= max(1,N);
-* if JOB = 'E', LWORK >= max(1,M*(N-M));
-* if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOB = 'N' or 'E', LIWORK >= 1;
-* if JOB = 'V' or 'B', LIWORK >= max(1,M*(N-M)).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1: reordering of T failed because some eigenvalues are too
-* close to separate (the problem is very ill-conditioned);
-* T may have been partially reordered, and WR and WI
-* contain the eigenvalues in the same order as in T; S and
-* SEP (if requested) are set to zero.
-*
-* Further Details
-* ===============
-*
-* DTRSEN first collects the selected eigenvalues by computing an
-* orthogonal transformation Z to move them to the top left corner of T.
-* In other words, the selected eigenvalues are the eigenvalues of T11
-* in:
-*
-* Z**T * T * Z = ( T11 T12 ) n1
-* ( 0 T22 ) n2
-* n1 n2
-*
-* where N = n1+n2 and Z**T means the transpose of Z. The first n1 columns
-* of Z span the specified invariant subspace of T.
-*
-* If T has been obtained from the real Schur factorization of a matrix
-* A = Q*T*Q**T, then the reordered real Schur factorization of A is given
-* by A = (Q*Z)*(Z**T*T*Z)*(Q*Z)**T, and the first n1 columns of Q*Z span
-* the corresponding invariant subspace of A.
-*
-* The reciprocal condition number of the average of the eigenvalues of
-* T11 may be returned in S. S lies between 0 (very badly conditioned)
-* and 1 (very well conditioned). It is computed as follows. First we
-* compute R so that
-*
-* P = ( I R ) n1
-* ( 0 0 ) n2
-* n1 n2
-*
-* is the projector on the invariant subspace associated with T11.
-* R is the solution of the Sylvester equation:
-*
-* T11*R - R*T22 = T12.
-*
-* Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
-* the two-norm of M. Then S is computed as the lower bound
-*
-* (1 + F-norm(R)**2)**(-1/2)
-*
-* on the reciprocal of 2-norm(P), the true reciprocal condition number.
-* S cannot underestimate 1 / 2-norm(P) by more than a factor of
-* sqrt(N).
-*
-* An approximate error bound for the computed average of the
-* eigenvalues of T11 is
-*
-* EPS * norm(T) / S
-*
-* where EPS is the machine precision.
-*
-* The reciprocal condition number of the right invariant subspace
-* spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
-* SEP is defined as the separation of T11 and T22:
-*
-* sep( T11, T22 ) = sigma-min( C )
-*
-* where sigma-min(C) is the smallest singular value of the
-* n1*n2-by-n1*n2 matrix
-*
-* C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
-*
-* I(m) is an m by m identity matrix, and kprod denotes the Kronecker
-* product. We estimate sigma-min(C) by the reciprocal of an estimate of
-* the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
-* cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
-*
-* When SEP is small, small changes in T can cause large changes in
-* the invariant subspace. An approximate bound on the maximum angular
-* error in the computed right invariant subspace is
-*
-* EPS * norm(T) / SEP
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrsna.f b/SRC/dtrsna.f
index a71b4a95..76cc2611 100644
--- a/SRC/dtrsna.f
+++ b/SRC/dtrsna.f
@@ -1,13 +1,268 @@
+*> \brief \b DTRSNA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+* LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, JOB
+* INTEGER INFO, LDT, LDVL, LDVR, LDWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION S( * ), SEP( * ), T( LDT, * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRSNA estimates reciprocal condition numbers for specified
+*> eigenvalues and/or right eigenvectors of a real upper
+*> quasi-triangular matrix T (or of any matrix Q*T*Q**T with Q
+*> orthogonal).
+*>
+*> T must be in Schur canonical form (as returned by DHSEQR), that is,
+*> block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
+*> 2-by-2 diagonal block has its diagonal elements equal and its
+*> off-diagonal elements of opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for
+*> eigenvalues (S) or eigenvectors (SEP):
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for eigenvectors only (SEP);
+*> = 'B': for both eigenvalues and eigenvectors (S and SEP).
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute condition numbers for all eigenpairs;
+*> = 'S': compute condition numbers for selected eigenpairs
+*> specified by the array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenpairs for which
+*> condition numbers are required. To select condition numbers
+*> for the eigenpair corresponding to a real eigenvalue w(j),
+*> SELECT(j) must be set to .TRUE.. To select condition numbers
+*> corresponding to a complex conjugate pair of eigenvalues w(j)
+*> and w(j+1), either SELECT(j) or SELECT(j+1) or both, must be
+*> set to .TRUE..
+*> If HOWMNY = 'A', SELECT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT,N)
+*> The upper quasi-triangular matrix T, in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,M)
+*> If JOB = 'E' or 'B', VL must contain left eigenvectors of T
+*> (or of any Q*T*Q**T with Q orthogonal), corresponding to the
+*> eigenpairs specified by HOWMNY and SELECT. The eigenvectors
+*> must be stored in consecutive columns of VL, as returned by
+*> DHSEIN or DTREVC.
+*> If JOB = 'V', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL.
+*> LDVL >= 1; and if JOB = 'E' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,M)
+*> If JOB = 'E' or 'B', VR must contain right eigenvectors of T
+*> (or of any Q*T*Q**T with Q orthogonal), corresponding to the
+*> eigenpairs specified by HOWMNY and SELECT. The eigenvectors
+*> must be stored in consecutive columns of VR, as returned by
+*> DHSEIN or DTREVC.
+*> If JOB = 'V', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR.
+*> LDVR >= 1; and if JOB = 'E' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (MM)
+*> If JOB = 'E' or 'B', the reciprocal condition numbers of the
+*> selected eigenvalues, stored in consecutive elements of the
+*> array. For a complex conjugate pair of eigenvalues two
+*> consecutive elements of S are set to the same value. Thus
+*> S(j), SEP(j), and the j-th columns of VL and VR all
+*> correspond to the same eigenpair (but not in general the
+*> j-th eigenpair, unless all eigenpairs are selected).
+*> If JOB = 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is DOUBLE PRECISION array, dimension (MM)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the selected eigenvectors, stored in consecutive
+*> elements of the array. For a complex eigenvector two
+*> consecutive elements of SEP are set to the same value. If
+*> the eigenvalues cannot be reordered to compute SEP(j), SEP(j)
+*> is set to 0; this can only occur when the true value would be
+*> very small anyway.
+*> If JOB = 'E', SEP is not referenced.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of elements in the arrays S (if JOB = 'E' or 'B')
+*> and/or SEP (if JOB = 'V' or 'B'). MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of elements of the arrays S and/or SEP actually
+*> used to store the estimated condition numbers.
+*> If HOWMNY = 'A', M is set to N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LDWORK,N+6)
+*> If JOB = 'E', WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK.
+*> LDWORK >= 1; and if JOB = 'V' or 'B', LDWORK >= N.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*(N-1))
+*> If JOB = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The reciprocal of the condition number of an eigenvalue lambda is
+*> defined as
+*>
+*> S(lambda) = |v**T*u| / (norm(u)*norm(v))
+*>
+*> where u and v are the right and left eigenvectors of T corresponding
+*> to lambda; v**T denotes the transpose of v, and norm(u)
+*> denotes the Euclidean norm. These reciprocal condition numbers always
+*> lie between zero (very badly conditioned) and one (very well
+*> conditioned). If n = 1, S(lambda) is defined to be 1.
+*>
+*> An approximate error bound for a computed eigenvalue W(i) is given by
+*>
+*> EPS * norm(T) / S(i)
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal of the condition number of the right eigenvector u
+*> corresponding to lambda is defined as follows. Suppose
+*>
+*> T = ( lambda c )
+*> ( 0 T22 )
+*>
+*> Then the reciprocal condition number is
+*>
+*> SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
+*>
+*> where sigma-min denotes the smallest singular value. We approximate
+*> the smallest singular value by the reciprocal of an estimate of the
+*> one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is
+*> defined to be abs(T(1,1)).
+*>
+*> An approximate error bound for a computed right eigenvector VR(i)
+*> is given by
+*>
+*> EPS * norm(T) / SEP(i)
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE DTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
$ LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, JOB
@@ -20,160 +275,6 @@
$ VR( LDVR, * ), WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRSNA estimates reciprocal condition numbers for specified
-* eigenvalues and/or right eigenvectors of a real upper
-* quasi-triangular matrix T (or of any matrix Q*T*Q**T with Q
-* orthogonal).
-*
-* T must be in Schur canonical form (as returned by DHSEQR), that is,
-* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
-* 2-by-2 diagonal block has its diagonal elements equal and its
-* off-diagonal elements of opposite sign.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for
-* eigenvalues (S) or eigenvectors (SEP):
-* = 'E': for eigenvalues only (S);
-* = 'V': for eigenvectors only (SEP);
-* = 'B': for both eigenvalues and eigenvectors (S and SEP).
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute condition numbers for all eigenpairs;
-* = 'S': compute condition numbers for selected eigenpairs
-* specified by the array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenpairs for which
-* condition numbers are required. To select condition numbers
-* for the eigenpair corresponding to a real eigenvalue w(j),
-* SELECT(j) must be set to .TRUE.. To select condition numbers
-* corresponding to a complex conjugate pair of eigenvalues w(j)
-* and w(j+1), either SELECT(j) or SELECT(j+1) or both, must be
-* set to .TRUE..
-* If HOWMNY = 'A', SELECT is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input) DOUBLE PRECISION array, dimension (LDT,N)
-* The upper quasi-triangular matrix T, in Schur canonical form.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION array, dimension (LDVL,M)
-* If JOB = 'E' or 'B', VL must contain left eigenvectors of T
-* (or of any Q*T*Q**T with Q orthogonal), corresponding to the
-* eigenpairs specified by HOWMNY and SELECT. The eigenvectors
-* must be stored in consecutive columns of VL, as returned by
-* DHSEIN or DTREVC.
-* If JOB = 'V', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL.
-* LDVL >= 1; and if JOB = 'E' or 'B', LDVL >= N.
-*
-* VR (input) DOUBLE PRECISION array, dimension (LDVR,M)
-* If JOB = 'E' or 'B', VR must contain right eigenvectors of T
-* (or of any Q*T*Q**T with Q orthogonal), corresponding to the
-* eigenpairs specified by HOWMNY and SELECT. The eigenvectors
-* must be stored in consecutive columns of VR, as returned by
-* DHSEIN or DTREVC.
-* If JOB = 'V', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR.
-* LDVR >= 1; and if JOB = 'E' or 'B', LDVR >= N.
-*
-* S (output) DOUBLE PRECISION array, dimension (MM)
-* If JOB = 'E' or 'B', the reciprocal condition numbers of the
-* selected eigenvalues, stored in consecutive elements of the
-* array. For a complex conjugate pair of eigenvalues two
-* consecutive elements of S are set to the same value. Thus
-* S(j), SEP(j), and the j-th columns of VL and VR all
-* correspond to the same eigenpair (but not in general the
-* j-th eigenpair, unless all eigenpairs are selected).
-* If JOB = 'V', S is not referenced.
-*
-* SEP (output) DOUBLE PRECISION array, dimension (MM)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the selected eigenvectors, stored in consecutive
-* elements of the array. For a complex eigenvector two
-* consecutive elements of SEP are set to the same value. If
-* the eigenvalues cannot be reordered to compute SEP(j), SEP(j)
-* is set to 0; this can only occur when the true value would be
-* very small anyway.
-* If JOB = 'E', SEP is not referenced.
-*
-* MM (input) INTEGER
-* The number of elements in the arrays S (if JOB = 'E' or 'B')
-* and/or SEP (if JOB = 'V' or 'B'). MM >= M.
-*
-* M (output) INTEGER
-* The number of elements of the arrays S and/or SEP actually
-* used to store the estimated condition numbers.
-* If HOWMNY = 'A', M is set to N.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,N+6)
-* If JOB = 'E', WORK is not referenced.
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* LDWORK >= 1; and if JOB = 'V' or 'B', LDWORK >= N.
-*
-* IWORK (workspace) INTEGER array, dimension (2*(N-1))
-* If JOB = 'E', IWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The reciprocal of the condition number of an eigenvalue lambda is
-* defined as
-*
-* S(lambda) = |v**T*u| / (norm(u)*norm(v))
-*
-* where u and v are the right and left eigenvectors of T corresponding
-* to lambda; v**T denotes the transpose of v, and norm(u)
-* denotes the Euclidean norm. These reciprocal condition numbers always
-* lie between zero (very badly conditioned) and one (very well
-* conditioned). If n = 1, S(lambda) is defined to be 1.
-*
-* An approximate error bound for a computed eigenvalue W(i) is given by
-*
-* EPS * norm(T) / S(i)
-*
-* where EPS is the machine precision.
-*
-* The reciprocal of the condition number of the right eigenvector u
-* corresponding to lambda is defined as follows. Suppose
-*
-* T = ( lambda c )
-* ( 0 T22 )
-*
-* Then the reciprocal condition number is
-*
-* SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
-*
-* where sigma-min denotes the smallest singular value. We approximate
-* the smallest singular value by the reciprocal of an estimate of the
-* one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is
-* defined to be abs(T(1,1)).
-*
-* An approximate error bound for a computed right eigenvector VR(i)
-* is given by
-*
-* EPS * norm(T) / SEP(i)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrsyl.f b/SRC/dtrsyl.f
index faffed15..3d23bce8 100644
--- a/SRC/dtrsyl.f
+++ b/SRC/dtrsyl.f
@@ -1,10 +1,165 @@
+*> \brief \b DTRSYL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
+* LDC, SCALE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANA, TRANB
+* INTEGER INFO, ISGN, LDA, LDB, LDC, M, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRSYL solves the real Sylvester matrix equation:
+*>
+*> op(A)*X + X*op(B) = scale*C or
+*> op(A)*X - X*op(B) = scale*C,
+*>
+*> where op(A) = A or A**T, and A and B are both upper quasi-
+*> triangular. A is M-by-M and B is N-by-N; the right hand side C and
+*> the solution X are M-by-N; and scale is an output scale factor, set
+*> <= 1 to avoid overflow in X.
+*>
+*> A and B must be in Schur canonical form (as returned by DHSEQR), that
+*> is, block upper triangular with 1-by-1 and 2-by-2 diagonal blocks;
+*> each 2-by-2 diagonal block has its diagonal elements equal and its
+*> off-diagonal elements of opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANA
+*> \verbatim
+*> TRANA is CHARACTER*1
+*> Specifies the option op(A):
+*> = 'N': op(A) = A (No transpose)
+*> = 'T': op(A) = A**T (Transpose)
+*> = 'C': op(A) = A**H (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANB
+*> \verbatim
+*> TRANB is CHARACTER*1
+*> Specifies the option op(B):
+*> = 'N': op(B) = B (No transpose)
+*> = 'T': op(B) = B**T (Transpose)
+*> = 'C': op(B) = B**H (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] ISGN
+*> \verbatim
+*> ISGN is INTEGER
+*> Specifies the sign in the equation:
+*> = +1: solve op(A)*X + X*op(B) = scale*C
+*> = -1: solve op(A)*X - X*op(B) = scale*C
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the matrix A, and the number of rows in the
+*> matrices X and C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B, and the number of columns in the
+*> matrices X and C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,M)
+*> The upper quasi-triangular matrix A, in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> The upper quasi-triangular matrix B, in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> On entry, the M-by-N right hand side matrix C.
+*> On exit, C is overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M)
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scale factor, scale, set <= 1 to avoid overflow in X.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1: A and B have common or very close eigenvalues; perturbed
+*> values were used to solve the equation (but the matrices
+*> A and B are unchanged).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleSYcomputational
+*
+* =====================================================================
SUBROUTINE DTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
$ LDC, SCALE, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANA, TRANB
@@ -15,81 +170,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRSYL solves the real Sylvester matrix equation:
-*
-* op(A)*X + X*op(B) = scale*C or
-* op(A)*X - X*op(B) = scale*C,
-*
-* where op(A) = A or A**T, and A and B are both upper quasi-
-* triangular. A is M-by-M and B is N-by-N; the right hand side C and
-* the solution X are M-by-N; and scale is an output scale factor, set
-* <= 1 to avoid overflow in X.
-*
-* A and B must be in Schur canonical form (as returned by DHSEQR), that
-* is, block upper triangular with 1-by-1 and 2-by-2 diagonal blocks;
-* each 2-by-2 diagonal block has its diagonal elements equal and its
-* off-diagonal elements of opposite sign.
-*
-* Arguments
-* =========
-*
-* TRANA (input) CHARACTER*1
-* Specifies the option op(A):
-* = 'N': op(A) = A (No transpose)
-* = 'T': op(A) = A**T (Transpose)
-* = 'C': op(A) = A**H (Conjugate transpose = Transpose)
-*
-* TRANB (input) CHARACTER*1
-* Specifies the option op(B):
-* = 'N': op(B) = B (No transpose)
-* = 'T': op(B) = B**T (Transpose)
-* = 'C': op(B) = B**H (Conjugate transpose = Transpose)
-*
-* ISGN (input) INTEGER
-* Specifies the sign in the equation:
-* = +1: solve op(A)*X + X*op(B) = scale*C
-* = -1: solve op(A)*X - X*op(B) = scale*C
-*
-* M (input) INTEGER
-* The order of the matrix A, and the number of rows in the
-* matrices X and C. M >= 0.
-*
-* N (input) INTEGER
-* The order of the matrix B, and the number of columns in the
-* matrices X and C. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,M)
-* The upper quasi-triangular matrix A, in Schur canonical form.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,N)
-* The upper quasi-triangular matrix B, in Schur canonical form.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
-* On entry, the M-by-N right hand side matrix C.
-* On exit, C is overwritten by the solution matrix X.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M)
-*
-* SCALE (output) DOUBLE PRECISION
-* The scale factor, scale, set <= 1 to avoid overflow in X.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1: A and B have common or very close eigenvalues; perturbed
-* values were used to solve the equation (but the matrices
-* A and B are unchanged).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrti2.f b/SRC/dtrti2.f
index 2091b693..3cf43b33 100644
--- a/SRC/dtrti2.f
+++ b/SRC/dtrti2.f
@@ -1,9 +1,112 @@
+*> \brief \b DTRTI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRTI2( UPLO, DIAG, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRTI2 computes the inverse of a real upper or lower triangular
+*> matrix.
+*>
+*> This is the Level 2 BLAS version of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading n by n upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced. If DIAG = 'U', the
+*> diagonal elements of A are also not referenced and are
+*> assumed to be 1.
+*> \endverbatim
+*> \verbatim
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTRTI2( UPLO, DIAG, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,51 +116,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRTI2 computes the inverse of a real upper or lower triangular
-* matrix.
-*
-* This is the Level 2 BLAS version of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading n by n upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced. If DIAG = 'U', the
-* diagonal elements of A are also not referenced and are
-* assumed to be 1.
-*
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrtri.f b/SRC/dtrtri.f
index 6a04cdf1..11056ad6 100644
--- a/SRC/dtrtri.f
+++ b/SRC/dtrtri.f
@@ -1,9 +1,110 @@
+*> \brief \b DTRTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRTRI( UPLO, DIAG, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRTRI computes the inverse of a real upper or lower triangular
+*> matrix A.
+*>
+*> This is the Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced. If DIAG = 'U', the
+*> diagonal elements of A are also not referenced and are
+*> assumed to be 1.
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTRTRI( UPLO, DIAG, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,50 +114,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRTRI computes the inverse of a real upper or lower triangular
-* matrix A.
-*
-* This is the Level 3 BLAS version of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced. If DIAG = 'U', the
-* diagonal elements of A are also not referenced and are
-* assumed to be 1.
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrtrs.f b/SRC/dtrtrs.f
index c83d9c64..ff3c2857 100644
--- a/SRC/dtrtrs.f
+++ b/SRC/dtrtrs.f
@@ -1,10 +1,141 @@
+*> \brief \b DTRTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRTRS solves a triangular system of the form
+*>
+*> A * X = B or A**T * X = B,
+*>
+*> where A is a triangular matrix of order N, and B is an N-by-NRHS
+*> matrix. A check is made to verify that A is nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the solutions
+*> X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup doubleOTHERcomputational
+*
+* =====================================================================
SUBROUTINE DTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,67 +145,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRTRS solves a triangular system of the form
-*
-* A * X = B or A**T * X = B,
-*
-* where A is a triangular matrix of order N, and B is an N-by-NRHS
-* matrix. A check is made to verify that A is nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the solutions
-* X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtrttf.f b/SRC/dtrttf.f
index f1d0966a..fa1f9bd4 100644
--- a/SRC/dtrttf.f
+++ b/SRC/dtrttf.f
@@ -1,146 +1,208 @@
- SUBROUTINE DTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N, LDA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( 0: LDA-1, 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b DTRTTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* DTRTTF copies a triangular matrix A from standard full format (TR)
-* to rectangular full packed format (TF) .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRTTF copies a triangular matrix A from standard full format (TR)
+*> to rectangular full packed format (TF) .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF in Normal form is wanted;
-* = 'T': ARF in Transpose form is wanted.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF in Normal form is wanted;
+*> = 'T': ARF in Transpose form is wanted.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N).
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the matrix A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is DOUBLE PRECISION array, dimension (NT).
+*> NT=N*(N+1)/2. On exit, the triangular matrix A in RFP format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N).
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the matrix A. LDA >= max(1,N).
+*> \date November 2011
*
-* ARF (output) DOUBLE PRECISION array, dimension (NT).
-* NT=N*(N+1)/2. On exit, the triangular matrix A in RFP format.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> Reference
+*> =========
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
-*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference
-* =========
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtrttp.f b/SRC/dtrttp.f
index 05684456..8631bb13 100644
--- a/SRC/dtrttp.f
+++ b/SRC/dtrttp.f
@@ -1,12 +1,105 @@
- SUBROUTINE DTRTTP( UPLO, N, A, LDA, AP, INFO )
+*> \brief \b DTRTTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRTTP( UPLO, N, A, LDA, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRTTP copies a triangular matrix A from full format (TR) to standard
+*> packed format (TP).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular.
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices AP and A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On exit, the triangular matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2
+*> On exit, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* -- LAPACK routine (version 3.3.0) --
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- and Julien Langou of the Univ. of Colorado Denver --
-* November 2010
+*> \ingroup doubleOTHERcomputational
*
+* =====================================================================
+ SUBROUTINE DTRTTP( UPLO, N, A, LDA, AP, INFO )
+*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,45 +109,6 @@
DOUBLE PRECISION A( LDA, * ), AP( * )
* ..
*
-* Purpose
-* =======
-*
-* DTRTTP copies a triangular matrix A from full format (TR) to standard
-* packed format (TP).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular.
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrices AP and A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On exit, the triangular matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AP (output) DOUBLE PRECISION array, dimension (N*(N+1)/2
-* On exit, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/dtzrqf.f b/SRC/dtzrqf.f
index 395daffd..e45efaca 100644
--- a/SRC/dtzrqf.f
+++ b/SRC/dtzrqf.f
@@ -1,87 +1,148 @@
- SUBROUTINE DTZRQF( M, N, A, LDA, TAU, INFO )
+*> \brief \b DTZRQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DTZRQF( M, N, A, LDA, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine DTZRZF.
-*
-* DTZRQF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A
-* to upper triangular form by means of orthogonal transformations.
-*
-* The upper trapezoidal matrix A is factored as
-*
-* A = ( R 0 ) * Z,
-*
-* where Z is an N-by-N orthogonal matrix and R is an M-by-M upper
-* triangular matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine DTZRZF.
+*>
+*> DTZRQF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A
+*> to upper triangular form by means of orthogonal transformations.
+*>
+*> The upper trapezoidal matrix A is factored as
+*>
+*> A = ( R 0 ) * Z,
+*>
+*> where Z is an N-by-N orthogonal matrix and R is an M-by-M upper
+*> triangular matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements M+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> orthogonal matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements M+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* orthogonal matrix Z as a product of M elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAU (output) DOUBLE PRECISION array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an ( n - m ) element vector.
+*> tau and z( k ) are chosen to annihilate the elements of the kth row
+*> of X.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A, such that the elements of z( k ) are
+*> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTZRQF( M, N, A, LDA, TAU, INFO )
*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an ( n - m ) element vector.
-* tau and z( k ) are chosen to annihilate the elements of the kth row
-* of X.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A, such that the elements of z( k ) are
-* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dtzrzf.f b/SRC/dtzrzf.f
index 4f0b8af1..b54c25a4 100644
--- a/SRC/dtzrzf.f
+++ b/SRC/dtzrzf.f
@@ -1,102 +1,169 @@
- SUBROUTINE DTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b DTZRZF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated d
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DTZRZF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A
-* to upper triangular form by means of orthogonal transformations.
-*
-* The upper trapezoidal matrix A is factored as
-*
-* A = ( R 0 ) * Z,
-*
-* where Z is an N-by-N orthogonal matrix and R is an M-by-M upper
-* triangular matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTZRZF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A
+*> to upper triangular form by means of orthogonal transformations.
+*>
+*> The upper trapezoidal matrix A is factored as
+*>
+*> A = ( R 0 ) * Z,
+*>
+*> where Z is an N-by-N orthogonal matrix and R is an M-by-M upper
+*> triangular matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements M+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* orthogonal matrix Z as a product of M elementary reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) DOUBLE PRECISION array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements M+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> orthogonal matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup doubleOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an ( n - m ) element vector.
+*> tau and z( k ) are chosen to annihilate the elements of the kth row
+*> of X.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A, such that the elements of z( k ) are
+*> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an ( n - m ) element vector.
-* tau and z( k ) are chosen to annihilate the elements of the kth row
-* of X.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A, such that the elements of z( k ) are
-* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/dzsum1.f b/SRC/dzsum1.f
index 5acaca8c..6cb5d226 100644
--- a/SRC/dzsum1.f
+++ b/SRC/dzsum1.f
@@ -1,39 +1,86 @@
- DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
+*> \brief \b DZSUM1
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCX, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 CX( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 CX( * )
+* ..
+*
* Purpose
* =======
*
-* DZSUM1 takes the sum of the absolute values of a complex
-* vector and returns a double precision result.
-*
-* Based on DZASUM from the Level 1 BLAS.
-* The change is to use the 'genuine' absolute value.
-*
-* Contributed by Nick Higham for use with ZLACON.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DZSUM1 takes the sum of the absolute values of a complex
+*> vector and returns a double precision result.
+*>
+*> Based on DZASUM from the Level 1 BLAS.
+*> The change is to use the 'genuine' absolute value.
+*>
+*> Contributed by Nick Higham for use with ZLACON.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of elements in the vector CX.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements in the vector CX.
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*> CX is COMPLEX*16 array, dimension (N)
+*> The vector whose elements will be summed.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between successive values of CX. INCX > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CX (input) COMPLEX*16 array, dimension (N)
-* The vector whose elements will be summed.
+*> \date November 2011
*
-* INCX (input) INTEGER
-* The spacing between successive values of CX. INCX > 0.
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 CX( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/icmax1.f b/SRC/icmax1.f
index a4b99c26..10297fce 100644
--- a/SRC/icmax1.f
+++ b/SRC/icmax1.f
@@ -1,39 +1,86 @@
- INTEGER FUNCTION ICMAX1( N, CX, INCX )
+*> \brief \b ICMAX1
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCX, N
-* ..
-* .. Array Arguments ..
- COMPLEX CX( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* INTEGER FUNCTION ICMAX1( N, CX, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX( * )
+* ..
+*
* Purpose
* =======
*
-* ICMAX1 finds the index of the element whose real part has maximum
-* absolute value.
-*
-* Based on ICAMAX from Level 1 BLAS.
-* The change is to use the 'genuine' absolute value.
-*
-* Contributed by Nick Higham for use with CLACON.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ICMAX1 finds the index of the element whose real part has maximum
+*> absolute value.
+*>
+*> Based on ICAMAX from Level 1 BLAS.
+*> The change is to use the 'genuine' absolute value.
+*>
+*> Contributed by Nick Higham for use with CLACON.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of elements in the vector CX.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements in the vector CX.
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*> CX is COMPLEX array, dimension (N)
+*> The vector whose elements will be summed.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between successive values of CX. INCX >= 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* CX (input) COMPLEX array, dimension (N)
-* The vector whose elements will be summed.
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
+ INTEGER FUNCTION ICMAX1( N, CX, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCX (input) INTEGER
-* The spacing between successive values of CX. INCX >= 1.
+* .. Scalar Arguments ..
+ INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ieeeck.f b/SRC/ieeeck.f
index ba917428..4809b4e1 100644
--- a/SRC/ieeeck.f
+++ b/SRC/ieeeck.f
@@ -1,43 +1,89 @@
- INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE )
+*> \brief \b IEEECK
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER ISPEC
- REAL ONE, ZERO
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE )
+*
+* .. Scalar Arguments ..
+* INTEGER ISPEC
+* REAL ONE, ZERO
+* ..
+*
* Purpose
* =======
*
-* IEEECK is called from the ILAENV to verify that Infinity and
-* possibly NaN arithmetic is safe (i.e. will not trap).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> IEEECK is called from the ILAENV to verify that Infinity and
+*> possibly NaN arithmetic is safe (i.e. will not trap).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISPEC (input) INTEGER
-* Specifies whether to test just for inifinity arithmetic
-* or whether to test for infinity and NaN arithmetic.
-* = 0: Verify infinity arithmetic only.
-* = 1: Verify infinity and NaN arithmetic.
-*
-* ZERO (input) REAL
-* Must contain the value 0.0
-* This is passed to prevent the compiler from optimizing
-* away this code.
-*
-* ONE (input) REAL
-* Must contain the value 1.0
-* This is passed to prevent the compiler from optimizing
-* away this code.
-*
-* RETURN VALUE: INTEGER
-* = 0: Arithmetic failed to produce the correct answers
-* = 1: Arithmetic produced the correct answers
+*> \param[in] ISPEC
+*> \verbatim
+*> ISPEC is INTEGER
+*> Specifies whether to test just for inifinity arithmetic
+*> or whether to test for infinity and NaN arithmetic.
+*> = 0: Verify infinity arithmetic only.
+*> = 1: Verify infinity and NaN arithmetic.
+*> \endverbatim
+*>
+*> \param[in] ZERO
+*> \verbatim
+*> ZERO is REAL
+*> Must contain the value 0.0
+*> This is passed to prevent the compiler from optimizing
+*> away this code.
+*> \endverbatim
+*>
+*> \param[in] ONE
+*> \verbatim
+*> ONE is REAL
+*> Must contain the value 1.0
+*> This is passed to prevent the compiler from optimizing
+*> away this code.
+*> \endverbatim
+*> \verbatim
+*> RETURN VALUE: INTEGER
+*> = 0: Arithmetic failed to produce the correct answers
+*> = 1: Arithmetic produced the correct answers
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER ISPEC
+ REAL ONE, ZERO
+* ..
*
* =====================================================================
*
diff --git a/SRC/ilaclc.f b/SRC/ilaclc.f
index 3d17c1d3..7e1e9258 100644
--- a/SRC/ilaclc.f
+++ b/SRC/ilaclc.f
@@ -1,39 +1,86 @@
- INTEGER FUNCTION ILACLC( M, N, A, LDA )
- IMPLICIT NONE
+*> \brief \b ILACLC
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
+* =========== DOCUMENTATION ===========
*
-* -- June 2010 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * )
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILACLC( M, N, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ILACLC scans A for its last non-zero column.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILACLC scans A for its last non-zero column.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \date November 2011
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m by n matrix A.
+*> \ingroup complexOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ INTEGER FUNCTION ILACLC( M, N, A, LDA )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ilaclr.f b/SRC/ilaclr.f
index 836ee738..914d3965 100644
--- a/SRC/ilaclr.f
+++ b/SRC/ilaclr.f
@@ -1,37 +1,86 @@
- INTEGER FUNCTION ILACLR( M, N, A, LDA )
- IMPLICIT NONE
+*> \brief \b ILACLR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILACLR( M, N, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ILACLR scans A for its last non-zero row.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILACLR scans A for its last non-zero row.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \date November 2011
*
-* A (input)COMPLEX array, dimension (LDA,N)
-* The m by n matrix A.
+*> \ingroup complexOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ INTEGER FUNCTION ILACLR( M, N, A, LDA )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/iladiag.f b/SRC/iladiag.f
index dfa1f125..18447864 100644
--- a/SRC/iladiag.f
+++ b/SRC/iladiag.f
@@ -1,33 +1,63 @@
- INTEGER FUNCTION ILADIAG( DIAG )
-*
-* -- LAPACK routine (version 3.2.1) --
+*> \brief \b ILADIAG
*
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER DIAG
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILADIAG( DIAG )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG
+* ..
+*
* Purpose
* =======
*
-* This subroutine translated from a character string specifying if a
-* matrix has unit diagonal or not to the relevant BLAST-specified
-* integer constant.
-*
-* ILADIAG returns an INTEGER. If ILADIAG < 0, then the input is not a
-* character indicating a unit or non-unit diagonal. Otherwise ILADIAG
-* returns the constant value corresponding to DIAG.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine translated from a character string specifying if a
+*> matrix has unit diagonal or not to the relevant BLAST-specified
+*> integer constant.
+*>
+*> ILADIAG returns an INTEGER. If ILADIAG < 0, then the input is not a
+*> character indicating a unit or non-unit diagonal. Otherwise ILADIAG
+*> returns the constant value corresponding to DIAG.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ INTEGER FUNCTION ILADIAG( DIAG )
+*
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIAG
+* ..
+*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/iladlc.f b/SRC/iladlc.f
index d1344b6e..8a9f1a02 100644
--- a/SRC/iladlc.f
+++ b/SRC/iladlc.f
@@ -1,39 +1,86 @@
- INTEGER FUNCTION ILADLC( M, N, A, LDA )
- IMPLICIT NONE
+*> \brief \b ILADLC
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
+* =========== DOCUMENTATION ===========
*
-* -- June 2010 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * )
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILADLC( M, N, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ILADLC scans A for its last non-zero column.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILADLC scans A for its last non-zero column.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \date November 2011
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m by n matrix A.
+*> \ingroup auxOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ INTEGER FUNCTION ILADLC( M, N, A, LDA )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/iladlr.f b/SRC/iladlr.f
index f42bcf17..ba43b6fb 100644
--- a/SRC/iladlr.f
+++ b/SRC/iladlr.f
@@ -1,37 +1,86 @@
- INTEGER FUNCTION ILADLR( M, N, A, LDA )
- IMPLICIT NONE
+*> \brief \b ILADLR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILADLR( M, N, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ILADLR scans A for its last non-zero row.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILADLR scans A for its last non-zero row.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \date November 2011
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m by n matrix A.
+*> \ingroup auxOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ INTEGER FUNCTION ILADLR( M, N, A, LDA )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ilaenv.f b/SRC/ilaenv.f
index e32fb209..a09eef58 100644
--- a/SRC/ilaenv.f
+++ b/SRC/ilaenv.f
@@ -1,110 +1,170 @@
- INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
-*
-* -- LAPACK auxiliary routine (version 3.2.1) --
+*> \brief \b ILAENV
*
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER*( * ) NAME, OPTS
- INTEGER ISPEC, N1, N2, N3, N4
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
+*
+* .. Scalar Arguments ..
+* CHARACTER*( * ) NAME, OPTS
+* INTEGER ISPEC, N1, N2, N3, N4
+* ..
+*
* Purpose
* =======
*
-* ILAENV is called from the LAPACK routines to choose problem-dependent
-* parameters for the local environment. See ISPEC for a description of
-* the parameters.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILAENV is called from the LAPACK routines to choose problem-dependent
+*> parameters for the local environment. See ISPEC for a description of
+*> the parameters.
+*>
+*> ILAENV returns an INTEGER
+*> if ILAENV >= 0: ILAENV returns the value of the parameter specified by ISPEC
+*> if ILAENV < 0: if ILAENV = -k, the k-th argument had an illegal value.
+*>
+*> This version provides a set of parameters which should give good,
+*> but not optimal, performance on many of the currently available
+*> computers. Users are encouraged to modify this subroutine to set
+*> the tuning parameters for their particular machine using the option
+*> and problem size information in the arguments.
+*>
+*> This routine will not function correctly if it is converted to all
+*> lower case. Converting it to all upper case is allowed.
+*>
+*>\endverbatim
*
-* ILAENV returns an INTEGER
-* if ILAENV >= 0: ILAENV returns the value of the parameter specified by ISPEC
-* if ILAENV < 0: if ILAENV = -k, the k-th argument had an illegal value.
+* Arguments
+* =========
*
-* This version provides a set of parameters which should give good,
-* but not optimal, performance on many of the currently available
-* computers. Users are encouraged to modify this subroutine to set
-* the tuning parameters for their particular machine using the option
-* and problem size information in the arguments.
+*> \param[in] ISPEC
+*> \verbatim
+*> ISPEC is INTEGER
+*> Specifies the parameter to be returned as the value of
+*> ILAENV.
+*> = 1: the optimal blocksize; if this value is 1, an unblocked
+*> algorithm will give the best performance.
+*> = 2: the minimum block size for which the block routine
+*> should be used; if the usable block size is less than
+*> this value, an unblocked routine should be used.
+*> = 3: the crossover point (in a block routine, for N less
+*> than this value, an unblocked routine should be used)
+*> = 4: the number of shifts, used in the nonsymmetric
+*> eigenvalue routines (DEPRECATED)
+*> = 5: the minimum column dimension for blocking to be used;
+*> rectangular blocks must have dimension at least k by m,
+*> where k is given by ILAENV(2,...) and m by ILAENV(5,...)
+*> = 6: the crossover point for the SVD (when reducing an m by n
+*> matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
+*> this value, a QR factorization is used first to reduce
+*> the matrix to a triangular form.)
+*> = 7: the number of processors
+*> = 8: the crossover point for the multishift QR method
+*> for nonsymmetric eigenvalue problems (DEPRECATED)
+*> = 9: maximum size of the subproblems at the bottom of the
+*> computation tree in the divide-and-conquer algorithm
+*> (used by xGELSD and xGESDD)
+*> =10: ieee NaN arithmetic can be trusted not to trap
+*> =11: infinity arithmetic can be trusted not to trap
+*> 12 <= ISPEC <= 16:
+*> xHSEQR or one of its subroutines,
+*> see IPARMQ for detailed explanation
+*> \endverbatim
+*>
+*> \param[in] NAME
+*> \verbatim
+*> NAME is CHARACTER*(*)
+*> The name of the calling subroutine, in either upper case or
+*> lower case.
+*> \endverbatim
+*>
+*> \param[in] OPTS
+*> \verbatim
+*> OPTS is CHARACTER*(*)
+*> The character options to the subroutine NAME, concatenated
+*> into a single character string. For example, UPLO = 'U',
+*> TRANS = 'T', and DIAG = 'N' for a triangular routine would
+*> be specified as OPTS = 'UTN'.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N3
+*> \verbatim
+*> N3 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N4
+*> \verbatim
+*> N4 is INTEGER
+*> Problem dimensions for the subroutine NAME; these may not all
+*> be required.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* This routine will not function correctly if it is converted to all
-* lower case. Converting it to all upper case is allowed.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* =========
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
*
-* ISPEC (input) INTEGER
-* Specifies the parameter to be returned as the value of
-* ILAENV.
-* = 1: the optimal blocksize; if this value is 1, an unblocked
-* algorithm will give the best performance.
-* = 2: the minimum block size for which the block routine
-* should be used; if the usable block size is less than
-* this value, an unblocked routine should be used.
-* = 3: the crossover point (in a block routine, for N less
-* than this value, an unblocked routine should be used)
-* = 4: the number of shifts, used in the nonsymmetric
-* eigenvalue routines (DEPRECATED)
-* = 5: the minimum column dimension for blocking to be used;
-* rectangular blocks must have dimension at least k by m,
-* where k is given by ILAENV(2,...) and m by ILAENV(5,...)
-* = 6: the crossover point for the SVD (when reducing an m by n
-* matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
-* this value, a QR factorization is used first to reduce
-* the matrix to a triangular form.)
-* = 7: the number of processors
-* = 8: the crossover point for the multishift QR method
-* for nonsymmetric eigenvalue problems (DEPRECATED)
-* = 9: maximum size of the subproblems at the bottom of the
-* computation tree in the divide-and-conquer algorithm
-* (used by xGELSD and xGESDD)
-* =10: ieee NaN arithmetic can be trusted not to trap
-* =11: infinity arithmetic can be trusted not to trap
-* 12 <= ISPEC <= 16:
-* xHSEQR or one of its subroutines,
-* see IPARMQ for detailed explanation
-*
-* NAME (input) CHARACTER*(*)
-* The name of the calling subroutine, in either upper case or
-* lower case.
-*
-* OPTS (input) CHARACTER*(*)
-* The character options to the subroutine NAME, concatenated
-* into a single character string. For example, UPLO = 'U',
-* TRANS = 'T', and DIAG = 'N' for a triangular routine would
-* be specified as OPTS = 'UTN'.
-*
-* N1 (input) INTEGER
-*
-* N2 (input) INTEGER
-*
-* N3 (input) INTEGER
-*
-* N4 (input) INTEGER
-* Problem dimensions for the subroutine NAME; these may not all
-* be required.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The following conventions have been used when calling ILAENV from the
+*> LAPACK routines:
+*> 1) OPTS is a concatenation of all of the character options to
+*> subroutine NAME, in the same order that they appear in the
+*> argument list for NAME, even if they are not used in determining
+*> the value of the parameter specified by ISPEC.
+*> 2) The problem dimensions N1, N2, N3, N4 are specified in the order
+*> that they appear in the argument list for NAME. N1 is used
+*> first, N2 second, and so on, and unused problem dimensions are
+*> passed a value of -1.
+*> 3) The parameter value returned by ILAENV is checked for validity in
+*> the calling subroutine. For example, ILAENV is used to retrieve
+*> the optimal blocksize for STRTRI as follows:
+*>
+*> NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
+*> IF( NB.LE.1 ) NB = MAX( 1, N )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
*
-* The following conventions have been used when calling ILAENV from the
-* LAPACK routines:
-* 1) OPTS is a concatenation of all of the character options to
-* subroutine NAME, in the same order that they appear in the
-* argument list for NAME, even if they are not used in determining
-* the value of the parameter specified by ISPEC.
-* 2) The problem dimensions N1, N2, N3, N4 are specified in the order
-* that they appear in the argument list for NAME. N1 is used
-* first, N2 second, and so on, and unused problem dimensions are
-* passed a value of -1.
-* 3) The parameter value returned by ILAENV is checked for validity in
-* the calling subroutine. For example, ILAENV is used to retrieve
-* the optimal blocksize for STRTRI as follows:
-*
-* NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
-* IF( NB.LE.1 ) NB = MAX( 1, N )
+* -- LAPACK auxiliary routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*( * ) NAME, OPTS
+ INTEGER ISPEC, N1, N2, N3, N4
+* ..
*
* =====================================================================
*
diff --git a/SRC/ilaprec.f b/SRC/ilaprec.f
index 9dd943ca..d91335b5 100644
--- a/SRC/ilaprec.f
+++ b/SRC/ilaprec.f
@@ -1,36 +1,63 @@
- INTEGER FUNCTION ILAPREC( PREC )
-*
-* -- LAPACK routine (version 3.2.2) --
+*> \brief \b ILAPREC
*
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER PREC
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILAPREC( PREC )
+*
+* .. Scalar Arguments ..
+* CHARACTER PREC
+* ..
+*
* Purpose
* =======
*
-* This subroutine translated from a character string specifying an
-* intermediate precision to the relevant BLAST-specified integer
-* constant.
-*
-* ILAPREC returns an INTEGER. If ILAPREC < 0, then the input is not a
-* character indicating a supported intermediate precision. Otherwise
-* ILAPREC returns the constant value corresponding to PREC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine translated from a character string specifying an
+*> intermediate precision to the relevant BLAST-specified integer
+*> constant.
+*>
+*> ILAPREC returns an INTEGER. If ILAPREC < 0, then the input is not a
+*> character indicating a supported intermediate precision. Otherwise
+*> ILAPREC returns the constant value corresponding to PREC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PREC (input) CHARACTER
-* Specifies the form of the system of equations:
-* = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ INTEGER FUNCTION ILAPREC( PREC )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER PREC
+* ..
+*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ilaslc.f b/SRC/ilaslc.f
index b3485fb0..a9a0c049 100644
--- a/SRC/ilaslc.f
+++ b/SRC/ilaslc.f
@@ -1,39 +1,86 @@
- INTEGER FUNCTION ILASLC( M, N, A, LDA )
- IMPLICIT NONE
+*> \brief \b ILASLC
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
+* =========== DOCUMENTATION ===========
*
-* -- June 2010 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * )
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILASLC( M, N, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ILASLC scans A for its last non-zero column.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILASLC scans A for its last non-zero column.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \date November 2011
*
-* A (input) REAL array, dimension (LDA,N)
-* The m by n matrix A.
+*> \ingroup realOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ INTEGER FUNCTION ILASLC( M, N, A, LDA )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ilaslr.f b/SRC/ilaslr.f
index 9579efa1..8858631f 100644
--- a/SRC/ilaslr.f
+++ b/SRC/ilaslr.f
@@ -1,37 +1,86 @@
- INTEGER FUNCTION ILASLR( M, N, A, LDA )
- IMPLICIT NONE
+*> \brief \b ILASLR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILASLR( M, N, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ILASLR scans A for its last non-zero row.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILASLR scans A for its last non-zero row.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \date November 2011
*
-* A (input) REAL array, dimension (LDA,N)
-* The m by n matrix A.
+*> \ingroup realOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ INTEGER FUNCTION ILASLR( M, N, A, LDA )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ilatrans.f b/SRC/ilatrans.f
index 60ee0dc7..56e1538a 100644
--- a/SRC/ilatrans.f
+++ b/SRC/ilatrans.f
@@ -1,35 +1,63 @@
- INTEGER FUNCTION ILATRANS( TRANS )
-*
-* -- LAPACK routine (version 3.2) --
+*> \brief \b ILATRANS
*
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER TRANS
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILATRANS( TRANS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* ..
+*
* Purpose
* =======
*
-* This subroutine translates from a character string specifying a
-* transposition operation to the relevant BLAST-specified integer
-* constant.
-*
-* ILATRANS returns an INTEGER. If ILATRANS < 0, then the input is not
-* a character indicating a transposition operator. Otherwise ILATRANS
-* returns the constant value corresponding to TRANS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine translates from a character string specifying a
+*> transposition operation to the relevant BLAST-specified integer
+*> constant.
+*>
+*> ILATRANS returns an INTEGER. If ILATRANS < 0, then the input is not
+*> a character indicating a transposition operator. Otherwise ILATRANS
+*> returns the constant value corresponding to TRANS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ INTEGER FUNCTION ILATRANS( TRANS )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+* ..
+*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ilauplo.f b/SRC/ilauplo.f
index 99f1352a..98d32b64 100644
--- a/SRC/ilauplo.f
+++ b/SRC/ilauplo.f
@@ -1,33 +1,63 @@
- INTEGER FUNCTION ILAUPLO( UPLO )
-*
-* -- LAPACK routine (version 3.2) --
+*> \brief \b ILAUPLO
*
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILAUPLO( UPLO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* ..
+*
* Purpose
* =======
*
-* This subroutine translated from a character string specifying a
-* upper- or lower-triangular matrix to the relevant BLAST-specified
-* integer constant.
-*
-* ILAUPLO returns an INTEGER. If ILAUPLO < 0, then the input is not
-* a character indicating an upper- or lower-triangular matrix.
-* Otherwise ILAUPLO returns the constant value corresponding to UPLO.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine translated from a character string specifying a
+*> upper- or lower-triangular matrix to the relevant BLAST-specified
+*> integer constant.
+*>
+*> ILAUPLO returns an INTEGER. If ILAUPLO < 0, then the input is not
+*> a character indicating an upper- or lower-triangular matrix.
+*> Otherwise ILAUPLO returns the constant value corresponding to UPLO.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ INTEGER FUNCTION ILAUPLO( UPLO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+* ..
+*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ilaver.f b/SRC/ilaver.f
index 02361a86..8fe99d18 100644
--- a/SRC/ilaver.f
+++ b/SRC/ilaver.f
@@ -1,38 +1,40 @@
+*> \brief \b ILAVER returns the LAPACK version.
+*>\details
+*> \b Purpose:
+*>\verbatim
+*>
+*> This subroutine returns the LAPACK version.
+*>
+*>\endverbatim
+*>
+*> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
+*> \date November 2011
+*> \ingroup auxOTHERcomputational
+*>
+*> \param[out] VERS_MAJOR
+*> return the lapack major version
+*>
+*> \param[out] VERS_MINOR
+*> return the lapack minor version from the major version
+*>
+*> \param[out] VERS_PATCH
+*> return the lapack patch version from the minor version
+*>
SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* April 2011
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* ..
-*
-* Purpose
-* =======
-*
-* This subroutine return the Lapack version.
-*
-* Arguments
-* =========
-*
-* VERS_MAJOR (output) INTEGER
-* return the lapack major version
-*
-* VERS_MINOR (output) INTEGER
-* return the lapack minor version from the major version
-*
-* VERS_PATCH (output) INTEGER
-* return the lapack patch version from the minor version
-*
-* =====================================================================
-*
+C
+C -- LAPACK computational routine (version 3.3.1) --
+C -- LAPACK is a software package provided by Univ. of Tennessee, --
+C -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+C November 2011
+C
+C =====================================================================
+C
INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
-* =====================================================================
+C =====================================================================
VERS_MAJOR = 3
VERS_MINOR = 3
VERS_PATCH = 1
-* =====================================================================
-*
+C =====================================================================
+C
RETURN
END
diff --git a/SRC/ilazlc.f b/SRC/ilazlc.f
index 2eb661e0..7c899f98 100644
--- a/SRC/ilazlc.f
+++ b/SRC/ilazlc.f
@@ -1,39 +1,86 @@
- INTEGER FUNCTION ILAZLC( M, N, A, LDA )
- IMPLICIT NONE
+*> \brief \b ILAZLC
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
+* =========== DOCUMENTATION ===========
*
-* -- June 2010 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * )
-* ..
+* Definition
+* ==========
*
+* INTEGER FUNCTION ILAZLC( M, N, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ILAZLC scans A for its last non-zero column.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILAZLC scans A for its last non-zero column.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \date November 2011
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m by n matrix A.
+*> \ingroup complex16OTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ INTEGER FUNCTION ILAZLC( M, N, A, LDA )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ilazlr.f b/SRC/ilazlr.f
index 0634b04a..e37559ac 100644
--- a/SRC/ilazlr.f
+++ b/SRC/ilazlr.f
@@ -1,36 +1,86 @@
- INTEGER FUNCTION ILAZLR( M, N, A, LDA )
- IMPLICIT NONE
+*> \brief \b ILAZLR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * )
-* ..
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION ILAZLR( M, N, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ILAZLR scans A for its last non-zero row.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILAZLR scans A for its last non-zero row.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \ingroup complex16OTHERauxiliary
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m by n matrix A.
+* =====================================================================
+ INTEGER FUNCTION ILAZLR( M, N, A, LDA )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/iparmq.f b/SRC/iparmq.f
index 9ecca5d1..5b302e69 100644
--- a/SRC/iparmq.f
+++ b/SRC/iparmq.f
@@ -1,160 +1,226 @@
- INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK )
+*> \brief \b IPARMQ
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, ISPEC, LWORK, N
- CHARACTER NAME*( * ), OPTS*( * )
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, ISPEC, LWORK, N
+* CHARACTER NAME*( * ), OPTS*( * )
+*
* Purpose
* =======
*
-* This program sets problem and machine dependent parameters
-* useful for xHSEQR and its subroutines. It is called whenever
-* ILAENV is called with 12 <= ISPEC <= 16
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This program sets problem and machine dependent parameters
+*> useful for xHSEQR and its subroutines. It is called whenever
+*> ILAENV is called with 12 <= ISPEC <= 16
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISPEC (input) integer scalar
-* ISPEC specifies which tunable parameter IPARMQ should
-* return.
-*
-* ISPEC=12: (INMIN) Matrices of order nmin or less
-* are sent directly to xLAHQR, the implicit
-* double shift QR algorithm. NMIN must be
-* at least 11.
-*
-* ISPEC=13: (INWIN) Size of the deflation window.
-* This is best set greater than or equal to
-* the number of simultaneous shifts NS.
-* Larger matrices benefit from larger deflation
-* windows.
-*
-* ISPEC=14: (INIBL) Determines when to stop nibbling and
-* invest in an (expensive) multi-shift QR sweep.
-* If the aggressive early deflation subroutine
-* finds LD converged eigenvalues from an order
-* NW deflation window and LD.GT.(NW*NIBBLE)/100,
-* then the next QR sweep is skipped and early
-* deflation is applied immediately to the
-* remaining active diagonal block. Setting
-* IPARMQ(ISPEC=14) = 0 causes TTQRE to skip a
-* multi-shift QR sweep whenever early deflation
-* finds a converged eigenvalue. Setting
-* IPARMQ(ISPEC=14) greater than or equal to 100
-* prevents TTQRE from skipping a multi-shift
-* QR sweep.
-*
-* ISPEC=15: (NSHFTS) The number of simultaneous shifts in
-* a multi-shift QR iteration.
-*
-* ISPEC=16: (IACC22) IPARMQ is set to 0, 1 or 2 with the
-* following meanings.
-* 0: During the multi-shift QR sweep,
-* xLAQR5 does not accumulate reflections and
-* does not use matrix-matrix multiply to
-* update the far-from-diagonal matrix
-* entries.
-* 1: During the multi-shift QR sweep,
-* xLAQR5 and/or xLAQRaccumulates reflections and uses
-* matrix-matrix multiply to update the
-* far-from-diagonal matrix entries.
-* 2: During the multi-shift QR sweep.
-* xLAQR5 accumulates reflections and takes
-* advantage of 2-by-2 block structure during
-* matrix-matrix multiplies.
-* (If xTRMM is slower than xGEMM, then
-* IPARMQ(ISPEC=16)=1 may be more efficient than
-* IPARMQ(ISPEC=16)=2 despite the greater level of
-* arithmetic work implied by the latter choice.)
-*
-* NAME (input) character string
-* Name of the calling subroutine
-*
-* OPTS (input) character string
-* This is a concatenation of the string arguments to
-* TTQRE.
-*
-* N (input) integer scalar
-* N is the order of the Hessenberg matrix H.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular
-* in rows and columns 1:ILO-1 and IHI+1:N.
-*
-* LWORK (input) integer scalar
-* The amount of workspace available.
-*
-* Further Details
-* ===============
-*
-* Little is known about how best to choose these parameters.
-* It is possible to use different values of the parameters
-* for each of CHSEQR, DHSEQR, SHSEQR and ZHSEQR.
-*
-* It is probably best to choose different parameters for
-* different matrices and different parameters at different
-* times during the iteration, but this has not been
-* implemented --- yet.
-*
-*
-* The best choices of most of the parameters depend
-* in an ill-understood way on the relative execution
-* rate of xLAQR3 and xLAQR5 and on the nature of each
-* particular eigenvalue problem. Experiment may be the
-* only practical way to determine which choices are most
-* effective.
-*
-* Following is a list of default values supplied by IPARMQ.
-* These defaults may be adjusted in order to attain better
-* performance in any particular computational environment.
-*
-* IPARMQ(ISPEC=12) The xLAHQR vs xLAQR0 crossover point.
-* Default: 75. (Must be at least 11.)
-*
-* IPARMQ(ISPEC=13) Recommended deflation window size.
-* This depends on ILO, IHI and NS, the
-* number of simultaneous shifts returned
-* by IPARMQ(ISPEC=15). The default for
-* (IHI-ILO+1).LE.500 is NS. The default
-* for (IHI-ILO+1).GT.500 is 3*NS/2.
-*
-* IPARMQ(ISPEC=14) Nibble crossover point. Default: 14.
+*> \param[in] ISPEC
+*> \verbatim
+*> ISPEC is integer scalar
+*> ISPEC specifies which tunable parameter IPARMQ should
+*> return.
+*> \endverbatim
+*> \verbatim
+*> ISPEC=12: (INMIN) Matrices of order nmin or less
+*> are sent directly to xLAHQR, the implicit
+*> double shift QR algorithm. NMIN must be
+*> at least 11.
+*> \endverbatim
+*> \verbatim
+*> ISPEC=13: (INWIN) Size of the deflation window.
+*> This is best set greater than or equal to
+*> the number of simultaneous shifts NS.
+*> Larger matrices benefit from larger deflation
+*> windows.
+*> \endverbatim
+*> \verbatim
+*> ISPEC=14: (INIBL) Determines when to stop nibbling and
+*> invest in an (expensive) multi-shift QR sweep.
+*> If the aggressive early deflation subroutine
+*> finds LD converged eigenvalues from an order
+*> NW deflation window and LD.GT.(NW*NIBBLE)/100,
+*> then the next QR sweep is skipped and early
+*> deflation is applied immediately to the
+*> remaining active diagonal block. Setting
+*> IPARMQ(ISPEC=14) = 0 causes TTQRE to skip a
+*> multi-shift QR sweep whenever early deflation
+*> finds a converged eigenvalue. Setting
+*> IPARMQ(ISPEC=14) greater than or equal to 100
+*> prevents TTQRE from skipping a multi-shift
+*> QR sweep.
+*> \endverbatim
+*> \verbatim
+*> ISPEC=15: (NSHFTS) The number of simultaneous shifts in
+*> a multi-shift QR iteration.
+*> \endverbatim
+*> \verbatim
+*> ISPEC=16: (IACC22) IPARMQ is set to 0, 1 or 2 with the
+*> following meanings.
+*> 0: During the multi-shift QR sweep,
+*> xLAQR5 does not accumulate reflections and
+*> does not use matrix-matrix multiply to
+*> update the far-from-diagonal matrix
+*> entries.
+*> 1: During the multi-shift QR sweep,
+*> xLAQR5 and/or xLAQRaccumulates reflections and uses
+*> matrix-matrix multiply to update the
+*> far-from-diagonal matrix entries.
+*> 2: During the multi-shift QR sweep.
+*> xLAQR5 accumulates reflections and takes
+*> advantage of 2-by-2 block structure during
+*> matrix-matrix multiplies.
+*> (If xTRMM is slower than xGEMM, then
+*> IPARMQ(ISPEC=16)=1 may be more efficient than
+*> IPARMQ(ISPEC=16)=2 despite the greater level of
+*> arithmetic work implied by the latter choice.)
+*> \endverbatim
+*>
+*> \param[in] NAME
+*> \verbatim
+*> NAME is character string
+*> Name of the calling subroutine
+*> \endverbatim
+*>
+*> \param[in] OPTS
+*> \verbatim
+*> OPTS is character string
+*> This is a concatenation of the string arguments to
+*> TTQRE.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is integer scalar
+*> N is the order of the Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular
+*> in rows and columns 1:ILO-1 and IHI+1:N.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer scalar
+*> The amount of workspace available.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IPARMQ(ISPEC=15) Number of simultaneous shifts, NS.
-* a multi-shift QR iteration.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* If IHI-ILO+1 is ...
+*> \date November 2011
*
-* greater than ...but less ... the
-* or equal to ... than default is
+*> \ingroup auxOTHERauxiliary
*
-* 0 30 NS = 2+
-* 30 60 NS = 4+
-* 60 150 NS = 10
-* 150 590 NS = **
-* 590 3000 NS = 64
-* 3000 6000 NS = 128
-* 6000 infinity NS = 256
*
-* (+) By default matrices of this order are
-* passed to the implicit double shift routine
-* xLAHQR. See IPARMQ(ISPEC=12) above. These
-* values of NS are used only in case of a rare
-* xLAHQR failure.
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Little is known about how best to choose these parameters.
+*> It is possible to use different values of the parameters
+*> for each of CHSEQR, DHSEQR, SHSEQR and ZHSEQR.
+*>
+*> It is probably best to choose different parameters for
+*> different matrices and different parameters at different
+*> times during the iteration, but this has not been
+*> implemented --- yet.
+*>
+*>
+*> The best choices of most of the parameters depend
+*> in an ill-understood way on the relative execution
+*> rate of xLAQR3 and xLAQR5 and on the nature of each
+*> particular eigenvalue problem. Experiment may be the
+*> only practical way to determine which choices are most
+*> effective.
+*>
+*> Following is a list of default values supplied by IPARMQ.
+*> These defaults may be adjusted in order to attain better
+*> performance in any particular computational environment.
+*>
+*> IPARMQ(ISPEC=12) The xLAHQR vs xLAQR0 crossover point.
+*> Default: 75. (Must be at least 11.)
+*>
+*> IPARMQ(ISPEC=13) Recommended deflation window size.
+*> This depends on ILO, IHI and NS, the
+*> number of simultaneous shifts returned
+*> by IPARMQ(ISPEC=15). The default for
+*> (IHI-ILO+1).LE.500 is NS. The default
+*> for (IHI-ILO+1).GT.500 is 3*NS/2.
+*>
+*> IPARMQ(ISPEC=14) Nibble crossover point. Default: 14.
+*>
+*> IPARMQ(ISPEC=15) Number of simultaneous shifts, NS.
+*> a multi-shift QR iteration.
+*>
+*> If IHI-ILO+1 is ...
+*>
+*> greater than ...but less ... the
+*> or equal to ... than default is
+*>
+*> 0 30 NS = 2+
+*> 30 60 NS = 4+
+*> 60 150 NS = 10
+*> 150 590 NS = **
+*> 590 3000 NS = 64
+*> 3000 6000 NS = 128
+*> 6000 infinity NS = 256
+*>
+*> (+) By default matrices of this order are
+*> passed to the implicit double shift routine
+*> xLAHQR. See IPARMQ(ISPEC=12) above. These
+*> values of NS are used only in case of a rare
+*> xLAHQR failure.
+*>
+*> (**) The asterisks (**) indicate an ad-hoc
+*> function increasing from 10 to 64.
+*>
+*> IPARMQ(ISPEC=16) Select structured matrix multiply.
+*> (See ISPEC=16 above for details.)
+*> Default: 3.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK )
*
-* (**) The asterisks (**) indicate an ad-hoc
-* function increasing from 10 to 64.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* IPARMQ(ISPEC=16) Select structured matrix multiply.
-* (See ISPEC=16 above for details.)
-* Default: 3.
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, ISPEC, LWORK, N
+ CHARACTER NAME*( * ), OPTS*( * )
*
* ================================================================
* .. Parameters ..
diff --git a/SRC/izmax1.f b/SRC/izmax1.f
index 22bb8b12..3854af5c 100644
--- a/SRC/izmax1.f
+++ b/SRC/izmax1.f
@@ -1,39 +1,86 @@
- INTEGER FUNCTION IZMAX1( N, CX, INCX )
+*> \brief \b IZMAX1
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCX, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 CX( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* INTEGER FUNCTION IZMAX1( N, CX, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 CX( * )
+* ..
+*
* Purpose
* =======
*
-* IZMAX1 finds the index of the element whose real part has maximum
-* absolute value.
-*
-* Based on IZAMAX from Level 1 BLAS.
-* The change is to use the 'genuine' absolute value.
-*
-* Contributed by Nick Higham for use with ZLACON.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> IZMAX1 finds the index of the element whose real part has maximum
+*> absolute value.
+*>
+*> Based on IZAMAX from Level 1 BLAS.
+*> The change is to use the 'genuine' absolute value.
+*>
+*> Contributed by Nick Higham for use with ZLACON.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of elements in the vector CX.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements in the vector CX.
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*> CX is COMPLEX*16 array, dimension (N)
+*> The vector whose elements will be summed.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between successive values of CX. INCX >= 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* CX (input) COMPLEX*16 array, dimension (N)
-* The vector whose elements will be summed.
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
+ INTEGER FUNCTION IZMAX1( N, CX, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCX (input) INTEGER
-* The spacing between successive values of CX. INCX >= 1.
+* .. Scalar Arguments ..
+ INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 CX( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/lsamen.f b/SRC/lsamen.f
index fb85a1da..81417437 100644
--- a/SRC/lsamen.f
+++ b/SRC/lsamen.f
@@ -1,35 +1,80 @@
- LOGICAL FUNCTION LSAMEN( N, CA, CB )
+*> \brief \b LSAMEN
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*( * ) CA, CB
- INTEGER N
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION LSAMEN( N, CA, CB )
+*
+* .. Scalar Arguments ..
+* CHARACTER*( * ) CA, CB
+* INTEGER N
+* ..
+*
* Purpose
* =======
*
-* LSAMEN tests if the first N letters of CA are the same as the
-* first N letters of CB, regardless of case.
-* LSAMEN returns .TRUE. if CA and CB are equivalent except for case
-* and .FALSE. otherwise. LSAMEN also returns .FALSE. if LEN( CA )
-* or LEN( CB ) is less than N.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> LSAMEN tests if the first N letters of CA are the same as the
+*> first N letters of CB, regardless of case.
+*> LSAMEN returns .TRUE. if CA and CB are equivalent except for case
+*> and .FALSE. otherwise. LSAMEN also returns .FALSE. if LEN( CA )
+*> or LEN( CB ) is less than N.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of characters in CA and CB to be compared.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of characters in CA and CB to be compared.
+*> \endverbatim
+*>
+*> \param[in] CA
+*> \verbatim
+*> CA is CHARACTER*(*)
+*> \endverbatim
+*>
+*> \param[in] CB
+*> \verbatim
+*> CB is CHARACTER*(*)
+*> CA and CB specify two character strings of length at least N.
+*> Only the first N characters of each string will be accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CA (input) CHARACTER*(*)
+*> \date November 2011
*
-* CB (input) CHARACTER*(*)
-* CA and CB specify two character strings of length at least N.
-* Only the first N characters of each string will be accessed.
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ LOGICAL FUNCTION LSAMEN( N, CA, CB )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*( * ) CA, CB
+ INTEGER N
+* ..
*
* =====================================================================
*
diff --git a/SRC/sbbcsd.f b/SRC/sbbcsd.f
index ed5a7f74..929c7454 100644
--- a/SRC/sbbcsd.f
+++ b/SRC/sbbcsd.f
@@ -1,16 +1,302 @@
+*> \brief \b SBBCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
+* THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
+* V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
+* B22D, B22E, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
+* INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* REAL B11D( * ), B11E( * ), B12D( * ), B12E( * ),
+* $ B21D( * ), B21E( * ), B22D( * ), B22E( * ),
+* $ PHI( * ), THETA( * ), WORK( * )
+* REAL U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SBBCSD computes the CS decomposition of an orthogonal matrix in
+*> bidiagonal-block form,
+*>
+*>
+*> [ B11 | B12 0 0 ]
+*> [ 0 | 0 -I 0 ]
+*> X = [----------------]
+*> [ B21 | B22 0 0 ]
+*> [ 0 | 0 0 I ]
+*>
+*> [ C | -S 0 0 ]
+*> [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**T
+*> = [---------] [---------------] [---------] .
+*> [ | U2 ] [ S | C 0 0 ] [ | V2 ]
+*> [ 0 | 0 0 I ]
+*>
+*> X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
+*> than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
+*> transposed and/or permuted. This can be done in constant time using
+*> the TRANS and SIGNS options. See SORCSD for details.)
+*>
+*> The bidiagonal matrices B11, B12, B21, and B22 are represented
+*> implicitly by angles THETA(1:Q) and PHI(1:Q-1).
+*>
+*> The orthogonal matrices U1, U2, V1T, and V2T are input/output.
+*> The input matrices are pre- or post-multiplied by the appropriate
+*> singular vector matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU1
+*> \verbatim
+*> JOBU1 is CHARACTER
+*> = 'Y': U1 is updated;
+*> otherwise: U1 is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBU2
+*> \verbatim
+*> JOBU2 is CHARACTER
+*> = 'Y': U2 is updated;
+*> otherwise: U2 is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBV1T
+*> \verbatim
+*> JOBV1T is CHARACTER
+*> = 'Y': V1T is updated;
+*> otherwise: V1T is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBV2T
+*> \verbatim
+*> JOBV2T is CHARACTER
+*> = 'Y': V2T is updated;
+*> otherwise: V2T is not updated.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X, the orthogonal matrix in
+*> bidiagonal-block form.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in the top-left block of X. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in the top-left block of X.
+*> 0 <= Q <= MIN(P,M-P,M-Q).
+*> \endverbatim
+*>
+*> \param[in,out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension (Q)
+*> On entry, the angles THETA(1),...,THETA(Q) that, along with
+*> PHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block
+*> form. On exit, the angles whose cosines and sines define the
+*> diagonal blocks in the CS decomposition.
+*> \endverbatim
+*>
+*> \param[in,out] PHI
+*> \verbatim
+*> PHI is REAL array, dimension (Q-1)
+*> The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),...,
+*> THETA(Q), define the matrix in bidiagonal-block form.
+*> \endverbatim
+*>
+*> \param[in,out] U1
+*> \verbatim
+*> U1 is REAL array, dimension (LDU1,P)
+*> On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
+*> by the left singular vector matrix common to [ B11 ; 0 ] and
+*> [ B12 0 0 ; 0 -I 0 0 ].
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of the array U1.
+*> \endverbatim
+*>
+*> \param[in,out] U2
+*> \verbatim
+*> U2 is REAL array, dimension (LDU2,M-P)
+*> On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
+*> postmultiplied by the left singular vector matrix common to
+*> [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2.
+*> \endverbatim
+*>
+*> \param[in,out] V1T
+*> \verbatim
+*> V1T is REAL array, dimension (LDV1T,Q)
+*> On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
+*> by the transpose of the right singular vector
+*> matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of the array V1T.
+*> \endverbatim
+*>
+*> \param[in,out] V2T
+*> \verbatim
+*> V2T is REAL array, dimenison (LDV2T,M-Q)
+*> On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
+*> premultiplied by the transpose of the right
+*> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
+*> [ B22 0 0 ; 0 0 I ].
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of the array V2T.
+*> \endverbatim
+*>
+*> \param[out] B11D
+*> \verbatim
+*> B11D is REAL array, dimension (Q)
+*> When SBBCSD converges, B11D contains the cosines of THETA(1),
+*> ..., THETA(Q). If SBBCSD fails to converge, then B11D
+*> contains the diagonal of the partially reduced top-left
+*> block.
+*> \endverbatim
+*>
+*> \param[out] B11E
+*> \verbatim
+*> B11E is REAL array, dimension (Q-1)
+*> When SBBCSD converges, B11E contains zeros. If SBBCSD fails
+*> to converge, then B11E contains the superdiagonal of the
+*> partially reduced top-left block.
+*> \endverbatim
+*>
+*> \param[out] B12D
+*> \verbatim
+*> B12D is REAL array, dimension (Q)
+*> When SBBCSD converges, B12D contains the negative sines of
+*> THETA(1), ..., THETA(Q). If SBBCSD fails to converge, then
+*> B12D contains the diagonal of the partially reduced top-right
+*> block.
+*> \endverbatim
+*>
+*> \param[out] B12E
+*> \verbatim
+*> B12E is REAL array, dimension (Q-1)
+*> When SBBCSD converges, B12E contains zeros. If SBBCSD fails
+*> to converge, then B12E contains the subdiagonal of the
+*> partially reduced top-right block.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= MAX(1,8*Q).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the WORK array,
+*> returns this value as the first entry of the work array, and
+*> no error message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if SBBCSD did not converge, INFO specifies the number
+*> of nonzero entries in PHI, and B11D, B11E, etc.,
+*> contain the partially reduced matrix.
+*> \endverbatim
+*> \verbatim
+*> Reference
+*> =========
+*> \endverbatim
+*> \verbatim
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLMUL REAL, default = MAX(10,MIN(100,EPS**(-1/8)))
+*> TOLMUL controls the convergence criterion of the QR loop.
+*> Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
+*> are within TOLMUL*EPS of either bound.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
$ THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
$ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
$ B22D, B22E, WORK, LWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.0) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
@@ -24,170 +310,6 @@
$ V2T( LDV2T, * )
* ..
*
-* Purpose
-* =======
-*
-* SBBCSD computes the CS decomposition of an orthogonal matrix in
-* bidiagonal-block form,
-*
-*
-* [ B11 | B12 0 0 ]
-* [ 0 | 0 -I 0 ]
-* X = [----------------]
-* [ B21 | B22 0 0 ]
-* [ 0 | 0 0 I ]
-*
-* [ C | -S 0 0 ]
-* [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**T
-* = [---------] [---------------] [---------] .
-* [ | U2 ] [ S | C 0 0 ] [ | V2 ]
-* [ 0 | 0 0 I ]
-*
-* X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
-* than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
-* transposed and/or permuted. This can be done in constant time using
-* the TRANS and SIGNS options. See SORCSD for details.)
-*
-* The bidiagonal matrices B11, B12, B21, and B22 are represented
-* implicitly by angles THETA(1:Q) and PHI(1:Q-1).
-*
-* The orthogonal matrices U1, U2, V1T, and V2T are input/output.
-* The input matrices are pre- or post-multiplied by the appropriate
-* singular vector matrices.
-*
-* Arguments
-* =========
-*
-* JOBU1 (input) CHARACTER
-* = 'Y': U1 is updated;
-* otherwise: U1 is not updated.
-*
-* JOBU2 (input) CHARACTER
-* = 'Y': U2 is updated;
-* otherwise: U2 is not updated.
-*
-* JOBV1T (input) CHARACTER
-* = 'Y': V1T is updated;
-* otherwise: V1T is not updated.
-*
-* JOBV2T (input) CHARACTER
-* = 'Y': V2T is updated;
-* otherwise: V2T is not updated.
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* M (input) INTEGER
-* The number of rows and columns in X, the orthogonal matrix in
-* bidiagonal-block form.
-*
-* P (input) INTEGER
-* The number of rows in the top-left block of X. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in the top-left block of X.
-* 0 <= Q <= MIN(P,M-P,M-Q).
-*
-* THETA (input/output) REAL array, dimension (Q)
-* On entry, the angles THETA(1),...,THETA(Q) that, along with
-* PHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block
-* form. On exit, the angles whose cosines and sines define the
-* diagonal blocks in the CS decomposition.
-*
-* PHI (input/workspace) REAL array, dimension (Q-1)
-* The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),...,
-* THETA(Q), define the matrix in bidiagonal-block form.
-*
-* U1 (input/output) REAL array, dimension (LDU1,P)
-* On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
-* by the left singular vector matrix common to [ B11 ; 0 ] and
-* [ B12 0 0 ; 0 -I 0 0 ].
-*
-* LDU1 (input) INTEGER
-* The leading dimension of the array U1.
-*
-* U2 (input/output) REAL array, dimension (LDU2,M-P)
-* On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
-* postmultiplied by the left singular vector matrix common to
-* [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2.
-*
-* V1T (input/output) REAL array, dimension (LDV1T,Q)
-* On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
-* by the transpose of the right singular vector
-* matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
-*
-* LDV1T (input) INTEGER
-* The leading dimension of the array V1T.
-*
-* V2T (input/output) REAL array, dimenison (LDV2T,M-Q)
-* On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
-* premultiplied by the transpose of the right
-* singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
-* [ B22 0 0 ; 0 0 I ].
-*
-* LDV2T (input) INTEGER
-* The leading dimension of the array V2T.
-*
-* B11D (output) REAL array, dimension (Q)
-* When SBBCSD converges, B11D contains the cosines of THETA(1),
-* ..., THETA(Q). If SBBCSD fails to converge, then B11D
-* contains the diagonal of the partially reduced top-left
-* block.
-*
-* B11E (output) REAL array, dimension (Q-1)
-* When SBBCSD converges, B11E contains zeros. If SBBCSD fails
-* to converge, then B11E contains the superdiagonal of the
-* partially reduced top-left block.
-*
-* B12D (output) REAL array, dimension (Q)
-* When SBBCSD converges, B12D contains the negative sines of
-* THETA(1), ..., THETA(Q). If SBBCSD fails to converge, then
-* B12D contains the diagonal of the partially reduced top-right
-* block.
-*
-* B12E (output) REAL array, dimension (Q-1)
-* When SBBCSD converges, B12E contains zeros. If SBBCSD fails
-* to converge, then B12E contains the subdiagonal of the
-* partially reduced top-right block.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= MAX(1,8*Q).
-*
-* If LWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the WORK array,
-* returns this value as the first entry of the work array, and
-* no error message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if SBBCSD did not converge, INFO specifies the number
-* of nonzero entries in PHI, and B11D, B11E, etc.,
-* contain the partially reduced matrix.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
-* Internal Parameters
-* ===================
-*
-* TOLMUL REAL, default = MAX(10,MIN(100,EPS**(-1/8)))
-* TOLMUL controls the convergence criterion of the QR loop.
-* Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
-* are within TOLMUL*EPS of either bound.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/sbdsdc.f b/SRC/sbdsdc.f
index 883d90a2..d1a009e3 100644
--- a/SRC/sbdsdc.f
+++ b/SRC/sbdsdc.f
@@ -1,10 +1,211 @@
+*> \brief \b SBDSDC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, UPLO
+* INTEGER INFO, LDU, LDVT, N
+* ..
+* .. Array Arguments ..
+* INTEGER IQ( * ), IWORK( * )
+* REAL D( * ), E( * ), Q( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SBDSDC computes the singular value decomposition (SVD) of a real
+*> N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT,
+*> using a divide and conquer method, where S is a diagonal matrix
+*> with non-negative diagonal elements (the singular values of B), and
+*> U and VT are orthogonal matrices of left and right singular vectors,
+*> respectively. SBDSDC can be used to compute all singular values,
+*> and optionally, singular vectors or singular vectors in compact form.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none. See SLASD3 for details.
+*>
+*> The code currently calls SLASDQ if singular values only are desired.
+*> However, it can be slightly modified to compute singular values
+*> using the divide and conquer method.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': B is upper bidiagonal.
+*> = 'L': B is lower bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> Specifies whether singular vectors are to be computed
+*> as follows:
+*> = 'N': Compute singular values only;
+*> = 'P': Compute singular values and compute singular
+*> vectors in compact form;
+*> = 'I': Compute singular values and singular vectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the bidiagonal matrix B.
+*> On exit, if INFO=0, the singular values of B.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the elements of E contain the offdiagonal
+*> elements of the bidiagonal matrix whose SVD is desired.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,N)
+*> If COMPQ = 'I', then:
+*> On exit, if INFO = 0, U contains the left singular vectors
+*> of the bidiagonal matrix.
+*> For other values of COMPQ, U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1.
+*> If singular vectors are desired, then LDU >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT,N)
+*> If COMPQ = 'I', then:
+*> On exit, if INFO = 0, VT**T contains the right singular
+*> vectors of the bidiagonal matrix.
+*> For other values of COMPQ, VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1.
+*> If singular vectors are desired, then LDVT >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ)
+*> If COMPQ = 'P', then:
+*> On exit, if INFO = 0, Q and IQ contain the left
+*> and right singular vectors in a compact form,
+*> requiring O(N log N) space instead of 2*N**2.
+*> In particular, Q contains all the REAL data in
+*> LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1))))
+*> words of memory, where SMLSIZ is returned by ILAENV and
+*> is equal to the maximum size of the subproblems at the
+*> bottom of the computation tree (usually about 25).
+*> For other values of COMPQ, Q is not referenced.
+*> \endverbatim
+*>
+*> \param[out] IQ
+*> \verbatim
+*> IQ is INTEGER array, dimension (LDIQ)
+*> If COMPQ = 'P', then:
+*> On exit, if INFO = 0, Q and IQ contain the left
+*> and right singular vectors in a compact form,
+*> requiring O(N log N) space instead of 2*N**2.
+*> In particular, IQ contains all INTEGER data in
+*> LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1))))
+*> words of memory, where SMLSIZ is returned by ILAENV and
+*> is equal to the maximum size of the subproblems at the
+*> bottom of the computation tree (usually about 25).
+*> For other values of COMPQ, IQ is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> If COMPQ = 'N' then LWORK >= (4 * N).
+*> If COMPQ = 'P' then LWORK >= (6 * N).
+*> If COMPQ = 'I' then LWORK >= (3 * N**2 + 4 * N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute a singular value.
+*> The update process of divide and conquer failed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, UPLO
@@ -16,118 +217,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SBDSDC computes the singular value decomposition (SVD) of a real
-* N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT,
-* using a divide and conquer method, where S is a diagonal matrix
-* with non-negative diagonal elements (the singular values of B), and
-* U and VT are orthogonal matrices of left and right singular vectors,
-* respectively. SBDSDC can be used to compute all singular values,
-* and optionally, singular vectors or singular vectors in compact form.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none. See SLASD3 for details.
-*
-* The code currently calls SLASDQ if singular values only are desired.
-* However, it can be slightly modified to compute singular values
-* using the divide and conquer method.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': B is upper bidiagonal.
-* = 'L': B is lower bidiagonal.
-*
-* COMPQ (input) CHARACTER*1
-* Specifies whether singular vectors are to be computed
-* as follows:
-* = 'N': Compute singular values only;
-* = 'P': Compute singular values and compute singular
-* vectors in compact form;
-* = 'I': Compute singular values and singular vectors.
-*
-* N (input) INTEGER
-* The order of the matrix B. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the bidiagonal matrix B.
-* On exit, if INFO=0, the singular values of B.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the elements of E contain the offdiagonal
-* elements of the bidiagonal matrix whose SVD is desired.
-* On exit, E has been destroyed.
-*
-* U (output) REAL array, dimension (LDU,N)
-* If COMPQ = 'I', then:
-* On exit, if INFO = 0, U contains the left singular vectors
-* of the bidiagonal matrix.
-* For other values of COMPQ, U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1.
-* If singular vectors are desired, then LDU >= max( 1, N ).
-*
-* VT (output) REAL array, dimension (LDVT,N)
-* If COMPQ = 'I', then:
-* On exit, if INFO = 0, VT**T contains the right singular
-* vectors of the bidiagonal matrix.
-* For other values of COMPQ, VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1.
-* If singular vectors are desired, then LDVT >= max( 1, N ).
-*
-* Q (output) REAL array, dimension (LDQ)
-* If COMPQ = 'P', then:
-* On exit, if INFO = 0, Q and IQ contain the left
-* and right singular vectors in a compact form,
-* requiring O(N log N) space instead of 2*N**2.
-* In particular, Q contains all the REAL data in
-* LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1))))
-* words of memory, where SMLSIZ is returned by ILAENV and
-* is equal to the maximum size of the subproblems at the
-* bottom of the computation tree (usually about 25).
-* For other values of COMPQ, Q is not referenced.
-*
-* IQ (output) INTEGER array, dimension (LDIQ)
-* If COMPQ = 'P', then:
-* On exit, if INFO = 0, Q and IQ contain the left
-* and right singular vectors in a compact form,
-* requiring O(N log N) space instead of 2*N**2.
-* In particular, IQ contains all INTEGER data in
-* LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1))))
-* words of memory, where SMLSIZ is returned by ILAENV and
-* is equal to the maximum size of the subproblems at the
-* bottom of the computation tree (usually about 25).
-* For other values of COMPQ, IQ is not referenced.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK))
-* If COMPQ = 'N' then LWORK >= (4 * N).
-* If COMPQ = 'P' then LWORK >= (6 * N).
-* If COMPQ = 'I' then LWORK >= (3 * N**2 + 4 * N).
-*
-* IWORK (workspace) INTEGER array, dimension (8*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute a singular value.
-* The update process of divide and conquer failed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
* =====================================================================
* Changed dimension statement in comment describing E from (N) to
* (N-1). Sven, 17 Feb 05.
diff --git a/SRC/sbdsqr.f b/SRC/sbdsqr.f
index eb3b6a89..8569b55a 100644
--- a/SRC/sbdsqr.f
+++ b/SRC/sbdsqr.f
@@ -1,10 +1,232 @@
+*> \brief \b SBDSQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
+* LDU, C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU
+* ..
+* .. Array Arguments ..
+* REAL C( LDC, * ), D( * ), E( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SBDSQR computes the singular values and, optionally, the right and/or
+*> left singular vectors from the singular value decomposition (SVD) of
+*> a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
+*> zero-shift QR algorithm. The SVD of B has the form
+*>
+*> B = Q * S * P**T
+*>
+*> where S is the diagonal matrix of singular values, Q is an orthogonal
+*> matrix of left singular vectors, and P is an orthogonal matrix of
+*> right singular vectors. If left singular vectors are requested, this
+*> subroutine actually returns U*Q instead of Q, and, if right singular
+*> vectors are requested, this subroutine returns P**T*VT instead of
+*> P**T, for given real input matrices U and VT. When U and VT are the
+*> orthogonal matrices that reduce a general matrix A to bidiagonal
+*> form: A = U*B*VT, as computed by SGEBRD, then
+*>
+*> A = (U*Q) * S * (P**T*VT)
+*>
+*> is the SVD of A. Optionally, the subroutine may also compute Q**T*C
+*> for a given real input matrix C.
+*>
+*> See "Computing Small Singular Values of Bidiagonal Matrices With
+*> Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
+*> LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
+*> no. 5, pp. 873-912, Sept 1990) and
+*> "Accurate singular values and differential qd algorithms," by
+*> B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
+*> Department, University of California at Berkeley, July 1992
+*> for a detailed description of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': B is upper bidiagonal;
+*> = 'L': B is lower bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCVT
+*> \verbatim
+*> NCVT is INTEGER
+*> The number of columns of the matrix VT. NCVT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRU
+*> \verbatim
+*> NRU is INTEGER
+*> The number of rows of the matrix U. NRU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> The number of columns of the matrix C. NCC >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the bidiagonal matrix B.
+*> On exit, if INFO=0, the singular values of B in decreasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the N-1 offdiagonal elements of the bidiagonal
+*> matrix B.
+*> On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
+*> will contain the diagonal and superdiagonal elements of a
+*> bidiagonal matrix orthogonally equivalent to the one given
+*> as input.
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT, NCVT)
+*> On entry, an N-by-NCVT matrix VT.
+*> On exit, VT is overwritten by P**T * VT.
+*> Not referenced if NCVT = 0.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT.
+*> LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> On entry, an NRU-by-N matrix U.
+*> On exit, U is overwritten by U * Q.
+*> Not referenced if NRU = 0.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,NRU).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC, NCC)
+*> On entry, an N-by-NCC matrix C.
+*> On exit, C is overwritten by Q**T * C.
+*> Not referenced if NCC = 0.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C.
+*> LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0:
+*> if NCVT = NRU = NCC = 0,
+*> = 1, a split was marked by a positive value in E
+*> = 2, current block of Z not diagonalized after 30*N
+*> iterations (in inner while loop)
+*> = 3, termination criterion of outer while loop not met
+*> (program created more than N unreduced blocks)
+*> else NCVT = NRU = NCC = 0,
+*> the algorithm did not converge; D and E contain the
+*> elements of a bidiagonal matrix which is orthogonally
+*> similar to the input matrix B; if INFO = i, i
+*> elements of E have not converged to zero.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLMUL REAL, default = max(10,min(100,EPS**(-1/8)))
+*> TOLMUL controls the convergence criterion of the QR loop.
+*> If it is positive, TOLMUL*EPS is the desired relative
+*> precision in the computed singular values.
+*> If it is negative, abs(TOLMUL*EPS*sigma_max) is the
+*> desired absolute accuracy in the computed singular
+*> values (corresponds to relative accuracy
+*> abs(TOLMUL*EPS) in the largest singular value.
+*> abs(TOLMUL) should be between 1 and 1/EPS, and preferably
+*> between 10 (for fast convergence) and .1/EPS
+*> (for there to be some accuracy in the results).
+*> Default is to lose at either one eighth or 2 of the
+*> available decimal digits in each computed singular value
+*> (whichever is smaller).
+*> \endverbatim
+*> \verbatim
+*> MAXITR INTEGER, default = 6
+*> MAXITR controls the maximum number of passes of the
+*> algorithm through its inner loop. The algorithms stops
+*> (and so fails to converge) if the number of passes
+*> through the inner loop exceeds MAXITR*N**2.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
$ LDU, C, LDC, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* January 2007
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,139 +237,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SBDSQR computes the singular values and, optionally, the right and/or
-* left singular vectors from the singular value decomposition (SVD) of
-* a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
-* zero-shift QR algorithm. The SVD of B has the form
-*
-* B = Q * S * P**T
-*
-* where S is the diagonal matrix of singular values, Q is an orthogonal
-* matrix of left singular vectors, and P is an orthogonal matrix of
-* right singular vectors. If left singular vectors are requested, this
-* subroutine actually returns U*Q instead of Q, and, if right singular
-* vectors are requested, this subroutine returns P**T*VT instead of
-* P**T, for given real input matrices U and VT. When U and VT are the
-* orthogonal matrices that reduce a general matrix A to bidiagonal
-* form: A = U*B*VT, as computed by SGEBRD, then
-*
-* A = (U*Q) * S * (P**T*VT)
-*
-* is the SVD of A. Optionally, the subroutine may also compute Q**T*C
-* for a given real input matrix C.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices With
-* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
-* LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
-* no. 5, pp. 873-912, Sept 1990) and
-* "Accurate singular values and differential qd algorithms," by
-* B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
-* Department, University of California at Berkeley, July 1992
-* for a detailed description of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': B is upper bidiagonal;
-* = 'L': B is lower bidiagonal.
-*
-* N (input) INTEGER
-* The order of the matrix B. N >= 0.
-*
-* NCVT (input) INTEGER
-* The number of columns of the matrix VT. NCVT >= 0.
-*
-* NRU (input) INTEGER
-* The number of rows of the matrix U. NRU >= 0.
-*
-* NCC (input) INTEGER
-* The number of columns of the matrix C. NCC >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the bidiagonal matrix B.
-* On exit, if INFO=0, the singular values of B in decreasing
-* order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the N-1 offdiagonal elements of the bidiagonal
-* matrix B.
-* On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
-* will contain the diagonal and superdiagonal elements of a
-* bidiagonal matrix orthogonally equivalent to the one given
-* as input.
-*
-* VT (input/output) REAL array, dimension (LDVT, NCVT)
-* On entry, an N-by-NCVT matrix VT.
-* On exit, VT is overwritten by P**T * VT.
-* Not referenced if NCVT = 0.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT.
-* LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
-*
-* U (input/output) REAL array, dimension (LDU, N)
-* On entry, an NRU-by-N matrix U.
-* On exit, U is overwritten by U * Q.
-* Not referenced if NRU = 0.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,NRU).
-*
-* C (input/output) REAL array, dimension (LDC, NCC)
-* On entry, an N-by-NCC matrix C.
-* On exit, C is overwritten by Q**T * C.
-* Not referenced if NCC = 0.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C.
-* LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0:
-* if NCVT = NRU = NCC = 0,
-* = 1, a split was marked by a positive value in E
-* = 2, current block of Z not diagonalized after 30*N
-* iterations (in inner while loop)
-* = 3, termination criterion of outer while loop not met
-* (program created more than N unreduced blocks)
-* else NCVT = NRU = NCC = 0,
-* the algorithm did not converge; D and E contain the
-* elements of a bidiagonal matrix which is orthogonally
-* similar to the input matrix B; if INFO = i, i
-* elements of E have not converged to zero.
-*
-* Internal Parameters
-* ===================
-*
-* TOLMUL REAL, default = max(10,min(100,EPS**(-1/8)))
-* TOLMUL controls the convergence criterion of the QR loop.
-* If it is positive, TOLMUL*EPS is the desired relative
-* precision in the computed singular values.
-* If it is negative, abs(TOLMUL*EPS*sigma_max) is the
-* desired absolute accuracy in the computed singular
-* values (corresponds to relative accuracy
-* abs(TOLMUL*EPS) in the largest singular value.
-* abs(TOLMUL) should be between 1 and 1/EPS, and preferably
-* between 10 (for fast convergence) and .1/EPS
-* (for there to be some accuracy in the results).
-* Default is to lose at either one eighth or 2 of the
-* available decimal digits in each computed singular value
-* (whichever is smaller).
-*
-* MAXITR INTEGER, default = 6
-* MAXITR controls the maximum number of passes of the
-* algorithm through its inner loop. The algorithms stops
-* (and so fails to converge) if the number of passes
-* through the inner loop exceeds MAXITR*N**2.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/scsum1.f b/SRC/scsum1.f
index bc7207ac..a5c88ae3 100644
--- a/SRC/scsum1.f
+++ b/SRC/scsum1.f
@@ -1,39 +1,86 @@
- REAL FUNCTION SCSUM1( N, CX, INCX )
+*> \brief \b SCSUM1
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCX, N
-* ..
-* .. Array Arguments ..
- COMPLEX CX( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION SCSUM1( N, CX, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+* COMPLEX CX( * )
+* ..
+*
* Purpose
* =======
*
-* SCSUM1 takes the sum of the absolute values of a complex
-* vector and returns a single precision result.
-*
-* Based on SCASUM from the Level 1 BLAS.
-* The change is to use the 'genuine' absolute value.
-*
-* Contributed by Nick Higham for use with CLACON.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCSUM1 takes the sum of the absolute values of a complex
+*> vector and returns a single precision result.
+*>
+*> Based on SCASUM from the Level 1 BLAS.
+*> The change is to use the 'genuine' absolute value.
+*>
+*> Contributed by Nick Higham for use with CLACON.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of elements in the vector CX.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements in the vector CX.
+*> \endverbatim
+*>
+*> \param[in] CX
+*> \verbatim
+*> CX is COMPLEX array, dimension (N)
+*> The vector whose elements will be summed.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between successive values of CX. INCX > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CX (input) COMPLEX array, dimension (N)
-* The vector whose elements will be summed.
+*> \date November 2011
*
-* INCX (input) INTEGER
-* The spacing between successive values of CX. INCX > 0.
+*> \ingroup complexOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SCSUM1( N, CX, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+ COMPLEX CX( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sdisna.f b/SRC/sdisna.f
index 639c9fb8..26235fcd 100644
--- a/SRC/sdisna.f
+++ b/SRC/sdisna.f
@@ -1,9 +1,118 @@
+*> \brief \b SDISNA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDISNA( JOB, M, N, D, SEP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER INFO, M, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), SEP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDISNA computes the reciprocal condition numbers for the eigenvectors
+*> of a real symmetric or complex Hermitian matrix or for the left or
+*> right singular vectors of a general m-by-n matrix. The reciprocal
+*> condition number is the 'gap' between the corresponding eigenvalue or
+*> singular value and the nearest other one.
+*>
+*> The bound on the error, measured by angle in radians, in the I-th
+*> computed vector is given by
+*>
+*> SLAMCH( 'E' ) * ( ANORM / SEP( I ) )
+*>
+*> where ANORM = 2-norm(A) = max( abs( D(j) ) ). SEP(I) is not allowed
+*> to be smaller than SLAMCH( 'E' )*ANORM in order to limit the size of
+*> the error bound.
+*>
+*> SDISNA may also be used to compute error bounds for eigenvectors of
+*> the generalized symmetric definite eigenproblem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies for which problem the reciprocal condition numbers
+*> should be computed:
+*> = 'E': the eigenvectors of a symmetric/Hermitian matrix;
+*> = 'L': the left singular vectors of a general matrix;
+*> = 'R': the right singular vectors of a general matrix.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> If JOB = 'L' or 'R', the number of columns of the matrix,
+*> in which case N >= 0. Ignored if JOB = 'E'.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (M) if JOB = 'E'
+*> dimension (min(M,N)) if JOB = 'L' or 'R'
+*> The eigenvalues (if JOB = 'E') or singular values (if JOB =
+*> 'L' or 'R') of the matrix, in either increasing or decreasing
+*> order. If singular values, they must be non-negative.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is REAL array, dimension (M) if JOB = 'E'
+*> dimension (min(M,N)) if JOB = 'L' or 'R'
+*> The reciprocal condition numbers of the vectors.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SDISNA( JOB, M, N, D, SEP, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOB
@@ -13,58 +122,6 @@
REAL D( * ), SEP( * )
* ..
*
-* Purpose
-* =======
-*
-* SDISNA computes the reciprocal condition numbers for the eigenvectors
-* of a real symmetric or complex Hermitian matrix or for the left or
-* right singular vectors of a general m-by-n matrix. The reciprocal
-* condition number is the 'gap' between the corresponding eigenvalue or
-* singular value and the nearest other one.
-*
-* The bound on the error, measured by angle in radians, in the I-th
-* computed vector is given by
-*
-* SLAMCH( 'E' ) * ( ANORM / SEP( I ) )
-*
-* where ANORM = 2-norm(A) = max( abs( D(j) ) ). SEP(I) is not allowed
-* to be smaller than SLAMCH( 'E' )*ANORM in order to limit the size of
-* the error bound.
-*
-* SDISNA may also be used to compute error bounds for eigenvectors of
-* the generalized symmetric definite eigenproblem.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies for which problem the reciprocal condition numbers
-* should be computed:
-* = 'E': the eigenvectors of a symmetric/Hermitian matrix;
-* = 'L': the left singular vectors of a general matrix;
-* = 'R': the right singular vectors of a general matrix.
-*
-* M (input) INTEGER
-* The number of rows of the matrix. M >= 0.
-*
-* N (input) INTEGER
-* If JOB = 'L' or 'R', the number of columns of the matrix,
-* in which case N >= 0. Ignored if JOB = 'E'.
-*
-* D (input) REAL array, dimension (M) if JOB = 'E'
-* dimension (min(M,N)) if JOB = 'L' or 'R'
-* The eigenvalues (if JOB = 'E') or singular values (if JOB =
-* 'L' or 'R') of the matrix, in either increasing or decreasing
-* order. If singular values, they must be non-negative.
-*
-* SEP (output) REAL array, dimension (M) if JOB = 'E'
-* dimension (min(M,N)) if JOB = 'L' or 'R'
-* The reciprocal condition numbers of the vectors.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgbbrd.f b/SRC/sgbbrd.f
index 666e2324..e5b29bfe 100644
--- a/SRC/sgbbrd.f
+++ b/SRC/sgbbrd.f
@@ -1,10 +1,188 @@
+*> \brief \b SGBBRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
+* LDQ, PT, LDPT, C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER VECT
+* INTEGER INFO, KL, KU, LDAB, LDC, LDPT, LDQ, M, N, NCC
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), C( LDC, * ), D( * ), E( * ),
+* $ PT( LDPT, * ), Q( LDQ, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBBRD reduces a real general m-by-n band matrix A to upper
+*> bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
+*>
+*> The routine computes B, and optionally forms Q or P**T, or computes
+*> Q**T*C for a given matrix C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> Specifies whether or not the matrices Q and P**T are to be
+*> formed.
+*> = 'N': do not form Q or P**T;
+*> = 'Q': form Q only;
+*> = 'P': form P**T only;
+*> = 'B': form both.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> The number of columns of the matrix C. NCC >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals of the matrix A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals of the matrix A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the m-by-n band matrix A, stored in rows 1 to
+*> KL+KU+1. The j-th column of A is stored in the j-th column of
+*> the array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
+*> On exit, A is overwritten by values generated during the
+*> reduction.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension (min(M,N)-1)
+*> The superdiagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,M)
+*> If VECT = 'Q' or 'B', the m-by-m orthogonal matrix Q.
+*> If VECT = 'N' or 'P', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] PT
+*> \verbatim
+*> PT is REAL array, dimension (LDPT,N)
+*> If VECT = 'P' or 'B', the n-by-n orthogonal matrix P'.
+*> If VECT = 'N' or 'Q', the array PT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the array PT.
+*> LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,NCC)
+*> On entry, an m-by-ncc matrix C.
+*> On exit, C is overwritten by Q**T*C.
+*> C is not referenced if NCC = 0.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C.
+*> LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*max(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBcomputational
+*
+* =====================================================================
SUBROUTINE SGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
$ LDQ, PT, LDPT, C, LDC, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER VECT
@@ -15,89 +193,6 @@
$ PT( LDPT, * ), Q( LDQ, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGBBRD reduces a real general m-by-n band matrix A to upper
-* bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
-*
-* The routine computes B, and optionally forms Q or P**T, or computes
-* Q**T*C for a given matrix C.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* Specifies whether or not the matrices Q and P**T are to be
-* formed.
-* = 'N': do not form Q or P**T;
-* = 'Q': form Q only;
-* = 'P': form P**T only;
-* = 'B': form both.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NCC (input) INTEGER
-* The number of columns of the matrix C. NCC >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals of the matrix A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals of the matrix A. KU >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the m-by-n band matrix A, stored in rows 1 to
-* KL+KU+1. The j-th column of A is stored in the j-th column of
-* the array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
-* On exit, A is overwritten by values generated during the
-* reduction.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KL+KU+1.
-*
-* D (output) REAL array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B.
-*
-* E (output) REAL array, dimension (min(M,N)-1)
-* The superdiagonal elements of the bidiagonal matrix B.
-*
-* Q (output) REAL array, dimension (LDQ,M)
-* If VECT = 'Q' or 'B', the m-by-m orthogonal matrix Q.
-* If VECT = 'N' or 'P', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
-*
-* PT (output) REAL array, dimension (LDPT,N)
-* If VECT = 'P' or 'B', the n-by-n orthogonal matrix P'.
-* If VECT = 'N' or 'Q', the array PT is not referenced.
-*
-* LDPT (input) INTEGER
-* The leading dimension of the array PT.
-* LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
-*
-* C (input/output) REAL array, dimension (LDC,NCC)
-* On entry, an m-by-ncc matrix C.
-* On exit, C is overwritten by Q**T*C.
-* C is not referenced if NCC = 0.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C.
-* LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
-*
-* WORK (workspace) REAL array, dimension (2*max(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgbcon.f b/SRC/sgbcon.f
index 664431ed..cda62938 100644
--- a/SRC/sgbcon.f
+++ b/SRC/sgbcon.f
@@ -1,12 +1,147 @@
+*> \brief \b SGBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, KL, KU, LDAB, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBCON estimates the reciprocal of the condition number of a real
+*> general band matrix A, in either the 1-norm or the infinity-norm,
+*> using the LU factorization computed by SGBTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by SGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= N, row i of the matrix was
+*> interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBcomputational
+*
+* =====================================================================
SUBROUTINE SGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,65 +153,6 @@
REAL AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGBCON estimates the reciprocal of the condition number of a real
-* general band matrix A, in either the 1-norm or the infinity-norm,
-* using the LU factorization computed by SGBTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by SGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= N, row i of the matrix was
-* interchanged with row IPIV(i).
-*
-* ANORM (input) REAL
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgbequ.f b/SRC/sgbequ.f
index 43c71c1f..914d49da 100644
--- a/SRC/sgbequ.f
+++ b/SRC/sgbequ.f
@@ -1,86 +1,162 @@
- SUBROUTINE SGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
- REAL AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), C( * ), R( * )
-* ..
-*
+*> \brief \b SGBEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), C( * ), R( * )
+* ..
+*
* Purpose
* =======
*
-* SGBEQU computes row and column scalings intended to equilibrate an
-* M-by-N band matrix A and reduce its condition number. R returns the
-* row scale factors and C the column scale factors, chosen to try to
-* make the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
-*
-* R(i) and C(j) are restricted to be between SMLNUM = smallest safe
-* number and BIGNUM = largest safe number. Use of these scaling
-* factors is not guaranteed to reduce the condition number of A but
-* works well in practice.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBEQU computes row and column scalings intended to equilibrate an
+*> M-by-N band matrix A and reduce its condition number. R returns the
+*> row scale factors and C the column scale factors, chosen to try to
+*> make the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number. Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The band matrix A, stored in rows 1 to KL+KU+1. The j-th
-* column of A is stored in the j-th column of the array AB as
-* follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
+*> column of A is stored in the j-th column of the array AB as
+*> follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> If INFO = 0, or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) REAL array, dimension (M)
-* If INFO = 0, or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) REAL array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) REAL
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup realGBcomputational
*
-* COLCND (output) REAL
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE SGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+ $ AMAX, INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+ REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), C( * ), R( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgbequb.f b/SRC/sgbequb.f
index 2ea3ae8c..d9188dc8 100644
--- a/SRC/sgbequb.f
+++ b/SRC/sgbequb.f
@@ -1,98 +1,169 @@
- SUBROUTINE SGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
- REAL AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), C( * ), R( * )
-* ..
-*
+*> \brief \b SGBEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), C( * ), R( * )
+* ..
+*
* Purpose
* =======
*
-* SGBEQUB computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
-* the radix.
-*
-* R(i) and C(j) are restricted to be a power of the radix between
-* SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
-* of these scaling factors is not guaranteed to reduce the condition
-* number of A but works well in practice.
-*
-* This routine differs from SGEEQU by restricting the scaling factors
-* to a power of the radix. Baring over- and underflow, scaling by
-* these factors introduces no additional rounding errors. However, the
-* scaled entries' magnitured are no longer approximately 1 but lie
-* between sqrt(radix) and 1/sqrt(radix).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBEQUB computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
+*> the radix.
+*>
+*> R(i) and C(j) are restricted to be a power of the radix between
+*> SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
+*> of these scaling factors is not guaranteed to reduce the condition
+*> number of A but works well in practice.
+*>
+*> This routine differs from SGEEQU by restricting the scaling factors
+*> to a power of the radix. Baring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors. However, the
+*> scaled entries' magnitured are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) REAL array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) REAL array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) REAL
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup realGBcomputational
*
-* COLCND (output) REAL
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE SGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+ $ AMAX, INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+ REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), C( * ), R( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgbrfs.f b/SRC/sgbrfs.f
index 18d4c6a3..94b61fda 100644
--- a/SRC/sgbrfs.f
+++ b/SRC/sgbrfs.f
@@ -1,13 +1,206 @@
+*> \brief \b SGBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
+* IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is banded, and provides
+*> error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is REAL array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by SGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SGBTRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGBTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBcomputational
+*
+* =====================================================================
SUBROUTINE SGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
$ IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -19,99 +212,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGBRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is banded, and provides
-* error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) REAL array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by SGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SGBTRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGBTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgbrfsx.f b/SRC/sgbrfsx.f
index ce387ef5..ba2f5035 100644
--- a/SRC/sgbrfsx.f
+++ b/SRC/sgbrfsx.f
@@ -1,19 +1,461 @@
+*> \brief \b SGBRFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBRFSX( TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND,
+* BERR, N_ERR_BNDS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, EQUED
+* INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, KL, KU, NRHS,
+* $ NPARAMS, N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SGBRFSX improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED, R
+*> and C below. In this case, the solution and error bounds returned
+*> are for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBcomputational
+*
+* =====================================================================
SUBROUTINE SGBRFSX( TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND,
$ BERR, N_ERR_BNDS, ERR_BNDS_NORM,
$ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS, EQUED
INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, KL, KU, NRHS,
@@ -29,301 +471,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SGBRFSX improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED, R
-* and C below. In this case, the solution and error bounds returned
-* are for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/sgbsv.f b/SRC/sgbsv.f
index 4bda55b5..104afac7 100644
--- a/SRC/sgbsv.f
+++ b/SRC/sgbsv.f
@@ -1,99 +1,173 @@
- SUBROUTINE SGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
+*> \brief <b> SGBSV computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK driver routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBSV computes the solution to a real system of linear equations
+*> A * X = B, where A is a band matrix of order N with KL subdiagonals
+*> and KU superdiagonals, and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as A = L * U, where L is a product of permutation
+*> and unit lower triangular matrices with KL subdiagonals, and U is
+*> upper triangular with KL+KU superdiagonals. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL AB( LDAB, * ), B( LDB, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KL+KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+KL)
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* SGBSV computes the solution to a real system of linear equations
-* A * X = B, where A is a band matrix of order N with KL subdiagonals
-* and KU superdiagonals, and X and B are N-by-NRHS matrices.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* The LU decomposition with partial pivoting and row interchanges is
-* used to factor A as A = L * U, where L is a product of permutation
-* and unit lower triangular matrices with KL subdiagonals, and U is
-* upper triangular with KL+KU superdiagonals. The factored form of A
-* is then used to solve the system of equations A * X = B.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup realGBsolve
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KL+KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+KL)
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U because of fill-in resulting from the row interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U because of fill-in resulting from the row interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgbsvx.f b/SRC/sgbsvx.f
index af5da5bc..cf65662f 100644
--- a/SRC/sgbsvx.f
+++ b/SRC/sgbsvx.f
@@ -1,11 +1,372 @@
+*> \brief <b> SGBSVX computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
+* RCOND, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ BERR( * ), C( * ), FERR( * ), R( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBSVX uses the LU factorization to compute the solution to a real
+*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
+*> where A is a band matrix of order N with KL subdiagonals and KU
+*> superdiagonals, and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed by this subroutine:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*> matrix A (after equilibration if FACT = 'E') as
+*> A = L * U,
+*> where L is a product of permutation and unit lower triangular
+*> matrices with KL subdiagonals, and U is upper triangular with
+*> KL+KU superdiagonals.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFB and IPIV contain the factored form of
+*> A. If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> AB, AFB, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AFB and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFB and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'F' and EQUED is not 'N', then A must have been
+*> equilibrated by the scaling factors in R and/or C. AB is not
+*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
+*> EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) REAL array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains details of the LU factorization of the band matrix
+*> A, as computed by SGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
+*> the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFB is an output argument and on exit
+*> returns details of the LU factorization of A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFB is an output argument and on exit
+*> returns details of the LU factorization of the equilibrated
+*> matrix A (see the description of AB for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = L*U
+*> as computed by SGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*> to the original system of equations. Note that A and B are
+*> modified on exit if EQUED .ne. 'N', and the solution to the
+*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*> and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> On exit, WORK(1) contains the reciprocal pivot growth
+*> factor norm(A)/norm(U). The "max absolute element" norm is
+*> used. If WORK(1) is much less than 1, then the stability
+*> of the LU factorization of the (equilibrated) matrix A
+*> could be poor. This also means that the solution X, condition
+*> estimator RCOND, and forward error bound FERR could be
+*> unreliable. If factorization fails with 0<INFO<=N, then
+*> WORK(1) contains the reciprocal pivot growth factor for the
+*> leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, so the solution and error bounds
+*> could not be computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBsolve
+*
+* =====================================================================
SUBROUTINE SGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
$ RCOND, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
@@ -19,245 +380,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGBSVX uses the LU factorization to compute the solution to a real
-* system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-* where A is a band matrix of order N with KL subdiagonals and KU
-* superdiagonals, and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed by this subroutine:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-* matrix A (after equilibration if FACT = 'E') as
-* A = L * U,
-* where L is a product of permutation and unit lower triangular
-* matrices with KL subdiagonals, and U is upper triangular with
-* KL+KU superdiagonals.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFB and IPIV contain the factored form of
-* A. If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* AB, AFB, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AFB and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFB and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* If FACT = 'F' and EQUED is not 'N', then A must have been
-* equilibrated by the scaling factors in R and/or C. AB is not
-* modified if FACT = 'F' or 'N', or if FACT = 'E' and
-* EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input or output) REAL array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains details of the LU factorization of the band matrix
-* A, as computed by SGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-* the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFB is an output argument and on exit
-* returns details of the LU factorization of A.
-*
-* If FACT = 'E', then AFB is an output argument and on exit
-* returns details of the LU factorization of the equilibrated
-* matrix A (see the description of AB for the form of the
-* equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = L*U
-* as computed by SGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-* to the original system of equations. Note that A and B are
-* modified on exit if EQUED .ne. 'N', and the solution to the
-* equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-* and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) REAL array, dimension (3*N)
-* On exit, WORK(1) contains the reciprocal pivot growth
-* factor norm(A)/norm(U). The "max absolute element" norm is
-* used. If WORK(1) is much less than 1, then the stability
-* of the LU factorization of the (equilibrated) matrix A
-* could be poor. This also means that the solution X, condition
-* estimator RCOND, and forward error bound FERR could be
-* unreliable. If factorization fails with 0<INFO<=N, then
-* WORK(1) contains the reciprocal pivot growth factor for the
-* leading INFO columns of A.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, so the solution and error bounds
-* could not be computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-*
-* value of RCOND would suggest.
* =====================================================================
* Moved setting of INFO = N+1 so INFO does not subsequently get
* overwritten. Sven, 17 Mar 05.
diff --git a/SRC/sgbsvxx.f b/SRC/sgbsvxx.f
index 4d73239d..66bad0a5 100644
--- a/SRC/sgbsvxx.f
+++ b/SRC/sgbsvxx.f
@@ -1,19 +1,587 @@
+*> \brief <b> SGBSVXX computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBSVXX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
+* RCOND, RPVGRW, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SGBSVXX uses the LU factorization to compute the solution to a
+*> real system of linear equations A * X = B, where A is an
+*> N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. SGBSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> SGBSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> SGBSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what SGBSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = P * L * U,
+*>
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is less
+*> than machine precision, the routine still goes on to solve for X
+*> and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'F' and EQUED is not 'N', then AB must have been
+*> equilibrated by the scaling factors in R and/or C. AB is not
+*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
+*> EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) REAL array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains details of the LU factorization of the band matrix
+*> A, as computed by SGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
+*> the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by SGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit
+*> if EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
+*> inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A. In SGESVX, this quantity is
+*> returned in WORK(1).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBsolve
+*
+* =====================================================================
SUBROUTINE SGBSVXX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
$ RCOND, RPVGRW, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
@@ -29,415 +597,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SGBSVXX uses the LU factorization to compute the solution to a
-* real system of linear equations A * X = B, where A is an
-* N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. SGBSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* SGBSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* SGBSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what SGBSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = P * L * U,
-*
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is less
-* than machine precision, the routine still goes on to solve for X
-* and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* If FACT = 'F' and EQUED is not 'N', then AB must have been
-* equilibrated by the scaling factors in R and/or C. AB is not
-* modified if FACT = 'F' or 'N', or if FACT = 'E' and
-* EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input or output) REAL array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains details of the LU factorization of the band matrix
-* A, as computed by SGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-* the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by SGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit
-* if EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
-* inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A. In SGESVX, this quantity is
-* returned in WORK(1).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/sgbtf2.f b/SRC/sgbtf2.f
index 79b0d963..94d725c6 100644
--- a/SRC/sgbtf2.f
+++ b/SRC/sgbtf2.f
@@ -1,88 +1,157 @@
- SUBROUTINE SGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL AB( LDAB, * )
-* ..
-*
+*> \brief \b SGBTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* SGBTF2 computes an LU factorization of a real m-by-n band matrix A
-* using partial pivoting with row interchanges.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBTF2 computes an LU factorization of a real m-by-n band matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup realGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U, because of fill-in resulting from the row
+*> interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U, because of fill-in resulting from the row
-* interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgbtrf.f b/SRC/sgbtrf.f
index e675f50c..05442f97 100644
--- a/SRC/sgbtrf.f
+++ b/SRC/sgbtrf.f
@@ -1,87 +1,156 @@
- SUBROUTINE SGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL AB( LDAB, * )
-* ..
-*
+*> \brief \b SGBTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* SGBTRF computes an LU factorization of a real m-by-n band matrix A
-* using partial pivoting with row interchanges.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBTRF computes an LU factorization of a real m-by-n band matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup realGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U because of fill-in resulting from the row interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U because of fill-in resulting from the row interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgbtrs.f b/SRC/sgbtrs.f
index ef988340..1ece6405 100644
--- a/SRC/sgbtrs.f
+++ b/SRC/sgbtrs.f
@@ -1,10 +1,139 @@
+*> \brief \b SGBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBTRS solves a system of linear equations
+*> A * X = B or A**T * X = B
+*> with a general band matrix A using the LU factorization computed
+*> by SGBTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T* X = B (Transpose)
+*> = 'C': A**T* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by SGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= N, row i of the matrix was
+*> interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBcomputational
+*
+* =====================================================================
SUBROUTINE SGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,61 +144,6 @@
REAL AB( LDAB, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* SGBTRS solves a system of linear equations
-* A * X = B or A**T * X = B
-* with a general band matrix A using the LU factorization computed
-* by SGBTRF.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T* X = B (Transpose)
-* = 'C': A**T* X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by SGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= N, row i of the matrix was
-* interchanged with row IPIV(i).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgebak.f b/SRC/sgebak.f
index da006bb4..f1bc13da 100644
--- a/SRC/sgebak.f
+++ b/SRC/sgebak.f
@@ -1,69 +1,139 @@
- SUBROUTINE SGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOB, SIDE
- INTEGER IHI, ILO, INFO, LDV, M, N
-* ..
-* .. Array Arguments ..
- REAL V( LDV, * ), SCALE( * )
-* ..
-*
+*> \brief \b SGEBAK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB, SIDE
+* INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+* REAL V( LDV, * ), SCALE( * )
+* ..
+*
* Purpose
* =======
*
-* SGEBAK forms the right or left eigenvectors of a real general matrix
-* by backward transformation on the computed eigenvectors of the
-* balanced matrix output by SGEBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEBAK forms the right or left eigenvectors of a real general matrix
+*> by backward transformation on the computed eigenvectors of the
+*> balanced matrix output by SGEBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the type of backward transformation required:
-* = 'N', do nothing, return immediately;
-* = 'P', do backward transformation for permutation only;
-* = 'S', do backward transformation for scaling only;
-* = 'B', do backward transformations for both permutation and
-* scaling.
-* JOB must be the same as the argument JOB supplied to SGEBAL.
-*
-* SIDE (input) CHARACTER*1
-* = 'R': V contains right eigenvectors;
-* = 'L': V contains left eigenvectors.
-*
-* N (input) INTEGER
-* The number of rows of the matrix V. N >= 0.
-*
-* ILO (input) INTEGER
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the type of backward transformation required:
+*> = 'N', do nothing, return immediately;
+*> = 'P', do backward transformation for permutation only;
+*> = 'S', do backward transformation for scaling only;
+*> = 'B', do backward transformations for both permutation and
+*> scaling.
+*> JOB must be the same as the argument JOB supplied to SGEBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': V contains right eigenvectors;
+*> = 'L': V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrix V. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> The integers ILO and IHI determined by SGEBAL.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL array, dimension (N)
+*> Details of the permutation and scaling factors, as returned
+*> by SGEBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix V. M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,M)
+*> On entry, the matrix of right or left eigenvectors to be
+*> transformed, as returned by SHSEIN or STREVC.
+*> On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IHI (input) INTEGER
-* The integers ILO and IHI determined by SGEBAL.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SCALE (input) REAL array, dimension (N)
-* Details of the permutation and scaling factors, as returned
-* by SGEBAL.
+*> \date November 2011
*
-* M (input) INTEGER
-* The number of columns of the matrix V. M >= 0.
+*> \ingroup realGEcomputational
*
-* V (input/output) REAL array, dimension (LDV,M)
-* On entry, the matrix of right or left eigenvectors to be
-* transformed, as returned by SHSEIN or STREVC.
-* On exit, V is overwritten by the transformed eigenvectors.
+* =====================================================================
+ SUBROUTINE SGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
+ $ INFO )
*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,N).
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
+* .. Scalar Arguments ..
+ CHARACTER JOB, SIDE
+ INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+ REAL V( LDV, * ), SCALE( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgebal.f b/SRC/sgebal.f
index 7094c86d..f31bb6ea 100644
--- a/SRC/sgebal.f
+++ b/SRC/sgebal.f
@@ -1,104 +1,150 @@
- SUBROUTINE SGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- CHARACTER JOB
- INTEGER IHI, ILO, INFO, LDA, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), SCALE( * )
-* ..
-*
+*> \brief \b SGEBAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), SCALE( * )
+* ..
+*
* Purpose
* =======
*
-* SGEBAL balances a general real matrix A. This involves, first,
-* permuting A by a similarity transformation to isolate eigenvalues
-* in the first 1 to ILO-1 and last IHI+1 to N elements on the
-* diagonal; and second, applying a diagonal similarity transformation
-* to rows and columns ILO to IHI to make the rows and columns as
-* close in norm as possible. Both steps are optional.
-*
-* Balancing may reduce the 1-norm of the matrix, and improve the
-* accuracy of the computed eigenvalues and/or eigenvectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEBAL balances a general real matrix A. This involves, first,
+*> permuting A by a similarity transformation to isolate eigenvalues
+*> in the first 1 to ILO-1 and last IHI+1 to N elements on the
+*> diagonal; and second, applying a diagonal similarity transformation
+*> to rows and columns ILO to IHI to make the rows and columns as
+*> close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrix, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the operations to be performed on A:
-* = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0
-* for i = 1,...,N;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the input matrix A.
-* On exit, A is overwritten by the balanced matrix.
-* If JOB = 'N', A is not referenced.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the operations to be performed on A:
+*> = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0
+*> for i = 1,...,N;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ILO (output) INTEGER
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IHI (output) INTEGER
-* ILO and IHI are set to integers such that on exit
-* A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
-* If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \date November 2011
*
-* SCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied to
-* A. If P(j) is the index of the row and column interchanged
-* with row and column j and D(j) is the scaling factor
-* applied to row and column j, then
-* SCALE(j) = P(j) for j = 1,...,ILO-1
-* = D(j) for j = ILO,...,IHI
-* = P(j) for j = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> ILO (output) INTEGER
+*>
+*> IHI (output) INTEGER
+*> ILO and IHI are set to integers such that on exit
+*> A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
+*> If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*>
+*> SCALE (output) REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied to
+*> A. If P(j) is the index of the row and column interchanged
+*> with row and column j and D(j) is the scaling factor
+*> applied to row and column j, then
+*> SCALE(j) = P(j) for j = 1,...,ILO-1
+*> = D(j) for j = ILO,...,IHI
+*> = P(j) for j = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The permutations consist of row and column interchanges which put
+*> the matrix in the form
+*>
+*> ( T1 X Y )
+*> P A P = ( 0 B Z )
+*> ( 0 0 T2 )
+*>
+*> where T1 and T2 are upper triangular matrices whose eigenvalues lie
+*> along the diagonal. The column indices ILO and IHI mark the starting
+*> and ending columns of the submatrix B. Balancing consists of applying
+*> a diagonal similarity transformation inv(D) * B * D to make the
+*> 1-norms of each row of B and its corresponding column nearly equal.
+*> The output matrix is
+*>
+*> ( T1 X*D Y )
+*> ( 0 inv(D)*B*D inv(D)*Z ).
+*> ( 0 0 T2 )
+*>
+*> Information about the permutations P and the diagonal matrix D is
+*> returned in the vector SCALE.
+*>
+*> This subroutine is based on the EISPACK routine BALANC.
+*>
+*> Modified by Tzu-Yi Chen, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
*
-* The permutations consist of row and column interchanges which put
-* the matrix in the form
-*
-* ( T1 X Y )
-* P A P = ( 0 B Z )
-* ( 0 0 T2 )
-*
-* where T1 and T2 are upper triangular matrices whose eigenvalues lie
-* along the diagonal. The column indices ILO and IHI mark the starting
-* and ending columns of the submatrix B. Balancing consists of applying
-* a diagonal similarity transformation inv(D) * B * D to make the
-* 1-norms of each row of B and its corresponding column nearly equal.
-* The output matrix is
-*
-* ( T1 X*D Y )
-* ( 0 inv(D)*B*D inv(D)*Z ).
-* ( 0 0 T2 )
-*
-* Information about the permutations P and the diagonal matrix D is
-* returned in the vector SCALE.
-*
-* This subroutine is based on the EISPACK routine BALANC.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by Tzu-Yi Chen, Computer Science Division, University of
-* California at Berkeley, USA
+* .. Scalar Arguments ..
+ CHARACTER JOB
+ INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), SCALE( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgebd2.f b/SRC/sgebd2.f
index 95cee538..89753caa 100644
--- a/SRC/sgebd2.f
+++ b/SRC/sgebd2.f
@@ -1,126 +1,159 @@
- SUBROUTINE SGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
- $ TAUQ( * ), WORK( * )
-* ..
-*
+*> \brief \b SGEBD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
+* $ TAUQ( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEBD2 reduces a real general m by n matrix A to upper or lower
-* bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
-*
-* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEBD2 reduces a real general m by n matrix A to upper or lower
+*> bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
+*>
+*> If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the m by n general matrix to be reduced.
-* On exit,
-* if m >= n, the diagonal and the first superdiagonal are
-* overwritten with the upper bidiagonal matrix B; the
-* elements below the diagonal, with the array TAUQ, represent
-* the orthogonal matrix Q as a product of elementary
-* reflectors, and the elements above the first superdiagonal,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors;
-* if m < n, the diagonal and the first subdiagonal are
-* overwritten with the lower bidiagonal matrix B; the
-* elements below the first subdiagonal, with the array TAUQ,
-* represent the orthogonal matrix Q as a product of
-* elementary reflectors, and the elements above the diagonal,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) REAL array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B:
-* D(i) = A(i,i).
-*
-* E (output) REAL array, dimension (min(M,N)-1)
-* The off-diagonal elements of the bidiagonal matrix B:
-* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
-* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAUQ (output) REAL array dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q. See Further Details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAUP (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix P. See Further Details.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (max(M,N))
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) REAL array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (min(M,N)-1)
+*> The off-diagonal elements of the bidiagonal matrix B:
+*> if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
+*> if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*>
+*> TAUQ (output) REAL array dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Q. See Further Details.
+*>
+*> TAUP (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix P. See Further Details.
+*>
+*> WORK (workspace) REAL array, dimension (max(M,N))
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> If m >= n,
+*>
+*> Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors;
+*> v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i);
+*> u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n,
+*>
+*> Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors;
+*> v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
+*> u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The contents of A on exit are illustrated by the following examples:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
+*> ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
+*> ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
+*> ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
+*> ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
+*> ( v1 v2 v3 v4 v5 )
+*>
+*> where d and e denote diagonal and off-diagonal elements of B, vi
+*> denotes an element of the vector defining H(i), and ui an element of
+*> the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* If m >= n,
-*
-* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors;
-* v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i);
-* u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n,
-*
-* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors;
-* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
-* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The contents of A on exit are illustrated by the following examples:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
-* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
-* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
-* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
-* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
-* ( v1 v2 v3 v4 v5 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of B, vi
-* denotes an element of the vector defining H(i), and ui an element of
-* the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
+ $ TAUQ( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgebrd.f b/SRC/sgebrd.f
index c0105629..2f4ed801 100644
--- a/SRC/sgebrd.f
+++ b/SRC/sgebrd.f
@@ -1,138 +1,172 @@
- SUBROUTINE SGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
- $ TAUQ( * ), WORK( * )
-* ..
-*
+*> \brief \b SGEBRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
+* $ TAUQ( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEBRD reduces a general real M-by-N matrix A to upper or lower
-* bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
-*
-* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEBRD reduces a general real M-by-N matrix A to upper or lower
+*> bidiagonal form B by an orthogonal transformation: Q**T * A * P = B.
+*>
+*> If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N general matrix to be reduced.
-* On exit,
-* if m >= n, the diagonal and the first superdiagonal are
-* overwritten with the upper bidiagonal matrix B; the
-* elements below the diagonal, with the array TAUQ, represent
-* the orthogonal matrix Q as a product of elementary
-* reflectors, and the elements above the first superdiagonal,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors;
-* if m < n, the diagonal and the first subdiagonal are
-* overwritten with the lower bidiagonal matrix B; the
-* elements below the first subdiagonal, with the array TAUQ,
-* represent the orthogonal matrix Q as a product of
-* elementary reflectors, and the elements above the diagonal,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) REAL array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B:
-* D(i) = A(i,i).
-*
-* E (output) REAL array, dimension (min(M,N)-1)
-* The off-diagonal elements of the bidiagonal matrix B:
-* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
-* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
-*
-* TAUQ (output) REAL array dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q. See Further Details.
-*
-* TAUP (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix P. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,M,N).
-* For optimum performance LWORK >= (M+N)*NB, where NB
-* is the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) REAL array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (min(M,N)-1)
+*> The off-diagonal elements of the bidiagonal matrix B:
+*> if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
+*> if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*>
+*> TAUQ (output) REAL array dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Q. See Further Details.
+*>
+*> TAUP (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix P. See Further Details.
+*>
+*> WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The length of the array WORK. LWORK >= max(1,M,N).
+*> For optimum performance LWORK >= (M+N)*NB, where NB
+*> is the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> If m >= n,
+*>
+*> Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors;
+*> v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i);
+*> u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n,
+*>
+*> Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors;
+*> v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
+*> u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The contents of A on exit are illustrated by the following examples:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
+*> ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
+*> ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
+*> ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
+*> ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
+*> ( v1 v2 v3 v4 v5 )
+*>
+*> where d and e denote diagonal and off-diagonal elements of B, vi
+*> denotes an element of the vector defining H(i), and ui an element of
+*> the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
+ $ INFO )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* If m >= n,
-*
-* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors;
-* v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i);
-* u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n,
-*
-* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors;
-* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
-* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The contents of A on exit are illustrated by the following examples:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
-* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
-* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
-* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
-* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
-* ( v1 v2 v3 v4 v5 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of B, vi
-* denotes an element of the vector defining H(i), and ui an element of
-* the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
+ $ TAUQ( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgecon.f b/SRC/sgecon.f
index e5ea03a4..95d2a723 100644
--- a/SRC/sgecon.f
+++ b/SRC/sgecon.f
@@ -1,12 +1,125 @@
+*> \brief \b SGECON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, LDA, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGECON estimates the reciprocal of the condition number of a general
+*> real matrix A, in either the 1-norm or the infinity-norm, using
+*> the LU factorization computed by SGETRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by SGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEcomputational
+*
+* =====================================================================
SUBROUTINE SGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,52 +131,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGECON estimates the reciprocal of the condition number of a general
-* real matrix A, in either the 1-norm or the infinity-norm, using
-* the LU factorization computed by SGETRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by SGETRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* ANORM (input) REAL
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgeequ.f b/SRC/sgeequ.f
index 8a57a45b..03b4bf3c 100644
--- a/SRC/sgeequ.f
+++ b/SRC/sgeequ.f
@@ -1,78 +1,148 @@
- SUBROUTINE SGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
- REAL AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( * ), R( * )
-* ..
-*
+*> \brief \b SGEEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( * ), R( * )
+* ..
+*
* Purpose
* =======
*
-* SGEEQU computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
-*
-* R(i) and C(j) are restricted to be between SMLNUM = smallest safe
-* number and BIGNUM = largest safe number. Use of these scaling
-* factors is not guaranteed to reduce the condition number of A but
-* works well in practice.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEEQU computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number. Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The M-by-N matrix whose equilibration factors are
-* to be computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix whose equilibration factors are
+*> to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) REAL array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) REAL array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) REAL
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup realGEcomputational
*
-* COLCND (output) REAL
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE SGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+ $ INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+ REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( * ), R( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeequb.f b/SRC/sgeequb.f
index b311da59..626ffac4 100644
--- a/SRC/sgeequb.f
+++ b/SRC/sgeequb.f
@@ -1,90 +1,155 @@
- SUBROUTINE SGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
- REAL AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( * ), R( * )
-* ..
-*
+*> \brief \b SGEEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( * ), R( * )
+* ..
+*
* Purpose
* =======
*
-* SGEEQUB computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
-* the radix.
-*
-* R(i) and C(j) are restricted to be a power of the radix between
-* SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
-* of these scaling factors is not guaranteed to reduce the condition
-* number of A but works well in practice.
-*
-* This routine differs from SGEEQU by restricting the scaling factors
-* to a power of the radix. Baring over- and underflow, scaling by
-* these factors introduces no additional rounding errors. However, the
-* scaled entries' magnitured are no longer approximately 1 but lie
-* between sqrt(radix) and 1/sqrt(radix).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEEQUB computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
+*> the radix.
+*>
+*> R(i) and C(j) are restricted to be a power of the radix between
+*> SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
+*> of these scaling factors is not guaranteed to reduce the condition
+*> number of A but works well in practice.
+*>
+*> This routine differs from SGEEQU by restricting the scaling factors
+*> to a power of the radix. Baring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors. However, the
+*> scaled entries' magnitured are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The M-by-N matrix whose equilibration factors are
-* to be computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix whose equilibration factors are
+*> to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) REAL array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) REAL array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) REAL
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup realGEcomputational
*
-* COLCND (output) REAL
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE SGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+ $ INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+ REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( * ), R( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgees.f b/SRC/sgees.f
index 188e75d5..2448640c 100644
--- a/SRC/sgees.f
+++ b/SRC/sgees.f
@@ -1,10 +1,218 @@
+*> \brief <b> SGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI,
+* VS, LDVS, WORK, LWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVS, SORT
+* INTEGER INFO, LDA, LDVS, LWORK, N, SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* REAL A( LDA, * ), VS( LDVS, * ), WI( * ), WORK( * ),
+* $ WR( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELECT
+* EXTERNAL SELECT
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEES computes for an N-by-N real nonsymmetric matrix A, the
+*> eigenvalues, the real Schur form T, and, optionally, the matrix of
+*> Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
+*>
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> real Schur form so that selected eigenvalues are at the top left.
+*> The leading columns of Z then form an orthonormal basis for the
+*> invariant subspace corresponding to the selected eigenvalues.
+*>
+*> A matrix is in real Schur form if it is upper quasi-triangular with
+*> 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in the
+*> form
+*> [ a b ]
+*> [ c a ]
+*>
+*> where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVS
+*> \verbatim
+*> JOBVS is CHARACTER*1
+*> = 'N': Schur vectors are not computed;
+*> = 'V': Schur vectors are computed.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is procedure) LOGICAL FUNCTION of two REAL arguments
+*> SELECT must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'S', SELECT is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> If SORT = 'N', SELECT is not referenced.
+*> An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
+*> SELECT(WR(j),WI(j)) is true; i.e., if either one of a complex
+*> conjugate pair of eigenvalues is selected, then both complex
+*> eigenvalues are selected.
+*> Note that a selected complex eigenvalue may no longer
+*> satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
+*> ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned); in this
+*> case INFO is set to N+2 (see INFO below).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten by its real Schur form T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELECT is true. (Complex conjugate
+*> pairs for which SELECT is true for either
+*> eigenvalue count as 2.)
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> WR and WI contain the real and imaginary parts,
+*> respectively, of the computed eigenvalues in the same order
+*> that they appear on the diagonal of the output Schur form T.
+*> Complex conjugate pairs of eigenvalues will appear
+*> consecutively with the eigenvalue having the positive
+*> imaginary part first.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is REAL array, dimension (LDVS,N)
+*> If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
+*> vectors.
+*> If JOBVS = 'N', VS is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> The leading dimension of the array VS. LDVS >= 1; if
+*> JOBVS = 'V', LDVS >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) contains the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,3*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is
+*> <= N: the QR algorithm failed to compute all the
+*> eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
+*> contain those eigenvalues which have converged; if
+*> JOBVS = 'V', VS contains the matrix which reduces A
+*> to its partially converged Schur form.
+*> = N+1: the eigenvalues could not be reordered because some
+*> eigenvalues were too close to separate (the problem
+*> is very ill-conditioned);
+*> = N+2: after reordering, roundoff changed values of some
+*> complex eigenvalues so that leading eigenvalues in
+*> the Schur form no longer satisfy SELECT=.TRUE. This
+*> could also be caused by underflow due to scaling.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+* =====================================================================
SUBROUTINE SGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI,
$ VS, LDVS, WORK, LWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVS, SORT
@@ -20,122 +228,6 @@
EXTERNAL SELECT
* ..
*
-* Purpose
-* =======
-*
-* SGEES computes for an N-by-N real nonsymmetric matrix A, the
-* eigenvalues, the real Schur form T, and, optionally, the matrix of
-* Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
-*
-* Optionally, it also orders the eigenvalues on the diagonal of the
-* real Schur form so that selected eigenvalues are at the top left.
-* The leading columns of Z then form an orthonormal basis for the
-* invariant subspace corresponding to the selected eigenvalues.
-*
-* A matrix is in real Schur form if it is upper quasi-triangular with
-* 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in the
-* form
-* [ a b ]
-* [ c a ]
-*
-* where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
-*
-* Arguments
-* =========
-*
-* JOBVS (input) CHARACTER*1
-* = 'N': Schur vectors are not computed;
-* = 'V': Schur vectors are computed.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELECT).
-*
-* SELECT (external procedure) LOGICAL FUNCTION of two REAL arguments
-* SELECT must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'S', SELECT is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* If SORT = 'N', SELECT is not referenced.
-* An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
-* SELECT(WR(j),WI(j)) is true; i.e., if either one of a complex
-* conjugate pair of eigenvalues is selected, then both complex
-* eigenvalues are selected.
-* Note that a selected complex eigenvalue may no longer
-* satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
-* ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned); in this
-* case INFO is set to N+2 (see INFO below).
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten by its real Schur form T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELECT is true. (Complex conjugate
-* pairs for which SELECT is true for either
-* eigenvalue count as 2.)
-*
-* WR (output) REAL array, dimension (N)
-*
-* WI (output) REAL array, dimension (N)
-* WR and WI contain the real and imaginary parts,
-* respectively, of the computed eigenvalues in the same order
-* that they appear on the diagonal of the output Schur form T.
-* Complex conjugate pairs of eigenvalues will appear
-* consecutively with the eigenvalue having the positive
-* imaginary part first.
-*
-* VS (output) REAL array, dimension (LDVS,N)
-* If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
-* vectors.
-* If JOBVS = 'N', VS is not referenced.
-*
-* LDVS (input) INTEGER
-* The leading dimension of the array VS. LDVS >= 1; if
-* JOBVS = 'V', LDVS >= N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) contains the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,3*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is
-* <= N: the QR algorithm failed to compute all the
-* eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
-* contain those eigenvalues which have converged; if
-* JOBVS = 'V', VS contains the matrix which reduces A
-* to its partially converged Schur form.
-* = N+1: the eigenvalues could not be reordered because some
-* eigenvalues were too close to separate (the problem
-* is very ill-conditioned);
-* = N+2: after reordering, roundoff changed values of some
-* complex eigenvalues so that leading eigenvalues in
-* the Schur form no longer satisfy SELECT=.TRUE. This
-* could also be caused by underflow due to scaling.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgeesx.f b/SRC/sgeesx.f
index 0f173cb1..c76bced6 100644
--- a/SRC/sgeesx.f
+++ b/SRC/sgeesx.f
@@ -1,11 +1,284 @@
+*> \brief <b> SGEESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM,
+* WR, WI, VS, LDVS, RCONDE, RCONDV, WORK, LWORK,
+* IWORK, LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVS, SENSE, SORT
+* INTEGER INFO, LDA, LDVS, LIWORK, LWORK, N, SDIM
+* REAL RCONDE, RCONDV
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), VS( LDVS, * ), WI( * ), WORK( * ),
+* $ WR( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELECT
+* EXTERNAL SELECT
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEESX computes for an N-by-N real nonsymmetric matrix A, the
+*> eigenvalues, the real Schur form T, and, optionally, the matrix of
+*> Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
+*>
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> real Schur form so that selected eigenvalues are at the top left;
+*> computes a reciprocal condition number for the average of the
+*> selected eigenvalues (RCONDE); and computes a reciprocal condition
+*> number for the right invariant subspace corresponding to the
+*> selected eigenvalues (RCONDV). The leading columns of Z form an
+*> orthonormal basis for this invariant subspace.
+*>
+*> For further explanation of the reciprocal condition numbers RCONDE
+*> and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
+*> these quantities are called s and sep respectively).
+*>
+*> A real matrix is in real Schur form if it is upper quasi-triangular
+*> with 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in
+*> the form
+*> [ a b ]
+*> [ c a ]
+*>
+*> where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVS
+*> \verbatim
+*> JOBVS is CHARACTER*1
+*> = 'N': Schur vectors are not computed;
+*> = 'V': Schur vectors are computed.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is procedure) LOGICAL FUNCTION of two REAL arguments
+*> SELECT must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'S', SELECT is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> If SORT = 'N', SELECT is not referenced.
+*> An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
+*> SELECT(WR(j),WI(j)) is true; i.e., if either one of a
+*> complex conjugate pair of eigenvalues is selected, then both
+*> are. Note that a selected complex eigenvalue may no longer
+*> satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
+*> ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned); in this
+*> case INFO may be set to N+3 (see INFO below).
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': None are computed;
+*> = 'E': Computed for average of selected eigenvalues only;
+*> = 'V': Computed for selected right invariant subspace only;
+*> = 'B': Computed for both.
+*> If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A is overwritten by its real Schur form T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELECT is true. (Complex conjugate
+*> pairs for which SELECT is true for either
+*> eigenvalue count as 2.)
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> WR and WI contain the real and imaginary parts, respectively,
+*> of the computed eigenvalues, in the same order that they
+*> appear on the diagonal of the output Schur form T. Complex
+*> conjugate pairs of eigenvalues appear consecutively with the
+*> eigenvalue having the positive imaginary part first.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is REAL array, dimension (LDVS,N)
+*> If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
+*> vectors.
+*> If JOBVS = 'N', VS is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> The leading dimension of the array VS. LDVS >= 1, and if
+*> JOBVS = 'V', LDVS >= N.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL
+*> If SENSE = 'E' or 'B', RCONDE contains the reciprocal
+*> condition number for the average of the selected eigenvalues.
+*> Not referenced if SENSE = 'N' or 'V'.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL
+*> If SENSE = 'V' or 'B', RCONDV contains the reciprocal
+*> condition number for the selected right invariant subspace.
+*> Not referenced if SENSE = 'N' or 'E'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,3*N).
+*> Also, if SENSE = 'E' or 'V' or 'B',
+*> LWORK >= N+2*SDIM*(N-SDIM), where SDIM is the number of
+*> selected eigenvalues computed by this routine. Note that
+*> N+2*SDIM*(N-SDIM) <= N+N*N/2. Note also that an error is only
+*> returned if LWORK < max(1,3*N), but if SENSE = 'E' or 'V' or
+*> 'B' this may not be large enough.
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates upper bounds on the optimal sizes of the
+*> arrays WORK and IWORK, returns these values as the first
+*> entries of the WORK and IWORK arrays, and no error messages
+*> related to LWORK or LIWORK are issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> LIWORK >= 1; if SENSE = 'V' or 'B', LIWORK >= SDIM*(N-SDIM).
+*> Note that SDIM*(N-SDIM) <= N*N/4. Note also that an error is
+*> only returned if LIWORK < 1, but if SENSE = 'V' or 'B' this
+*> may not be large enough.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates upper bounds on the optimal sizes of
+*> the arrays WORK and IWORK, returns these values as the first
+*> entries of the WORK and IWORK arrays, and no error messages
+*> related to LWORK or LIWORK are issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is
+*> <= N: the QR algorithm failed to compute all the
+*> eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
+*> contain those eigenvalues which have converged; if
+*> JOBVS = 'V', VS contains the transformation which
+*> reduces A to its partially converged Schur form.
+*> = N+1: the eigenvalues could not be reordered because some
+*> eigenvalues were too close to separate (the problem
+*> is very ill-conditioned);
+*> = N+2: after reordering, roundoff changed values of some
+*> complex eigenvalues so that leading eigenvalues in
+*> the Schur form no longer satisfy SELECT=.TRUE. This
+*> could also be caused by underflow due to scaling.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+* =====================================================================
SUBROUTINE SGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM,
$ WR, WI, VS, LDVS, RCONDE, RCONDV, WORK, LWORK,
$ IWORK, LIWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK eigen routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVS, SENSE, SORT
@@ -23,168 +296,6 @@
EXTERNAL SELECT
* ..
*
-* Purpose
-* =======
-*
-* SGEESX computes for an N-by-N real nonsymmetric matrix A, the
-* eigenvalues, the real Schur form T, and, optionally, the matrix of
-* Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
-*
-* Optionally, it also orders the eigenvalues on the diagonal of the
-* real Schur form so that selected eigenvalues are at the top left;
-* computes a reciprocal condition number for the average of the
-* selected eigenvalues (RCONDE); and computes a reciprocal condition
-* number for the right invariant subspace corresponding to the
-* selected eigenvalues (RCONDV). The leading columns of Z form an
-* orthonormal basis for this invariant subspace.
-*
-* For further explanation of the reciprocal condition numbers RCONDE
-* and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
-* these quantities are called s and sep respectively).
-*
-* A real matrix is in real Schur form if it is upper quasi-triangular
-* with 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in
-* the form
-* [ a b ]
-* [ c a ]
-*
-* where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
-*
-* Arguments
-* =========
-*
-* JOBVS (input) CHARACTER*1
-* = 'N': Schur vectors are not computed;
-* = 'V': Schur vectors are computed.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELECT).
-*
-* SELECT (external procedure) LOGICAL FUNCTION of two REAL arguments
-* SELECT must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'S', SELECT is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* If SORT = 'N', SELECT is not referenced.
-* An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
-* SELECT(WR(j),WI(j)) is true; i.e., if either one of a
-* complex conjugate pair of eigenvalues is selected, then both
-* are. Note that a selected complex eigenvalue may no longer
-* satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
-* ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned); in this
-* case INFO may be set to N+3 (see INFO below).
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': None are computed;
-* = 'E': Computed for average of selected eigenvalues only;
-* = 'V': Computed for selected right invariant subspace only;
-* = 'B': Computed for both.
-* If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the N-by-N matrix A.
-* On exit, A is overwritten by its real Schur form T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELECT is true. (Complex conjugate
-* pairs for which SELECT is true for either
-* eigenvalue count as 2.)
-*
-* WR (output) REAL array, dimension (N)
-*
-* WI (output) REAL array, dimension (N)
-* WR and WI contain the real and imaginary parts, respectively,
-* of the computed eigenvalues, in the same order that they
-* appear on the diagonal of the output Schur form T. Complex
-* conjugate pairs of eigenvalues appear consecutively with the
-* eigenvalue having the positive imaginary part first.
-*
-* VS (output) REAL array, dimension (LDVS,N)
-* If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
-* vectors.
-* If JOBVS = 'N', VS is not referenced.
-*
-* LDVS (input) INTEGER
-* The leading dimension of the array VS. LDVS >= 1, and if
-* JOBVS = 'V', LDVS >= N.
-*
-* RCONDE (output) REAL
-* If SENSE = 'E' or 'B', RCONDE contains the reciprocal
-* condition number for the average of the selected eigenvalues.
-* Not referenced if SENSE = 'N' or 'V'.
-*
-* RCONDV (output) REAL
-* If SENSE = 'V' or 'B', RCONDV contains the reciprocal
-* condition number for the selected right invariant subspace.
-* Not referenced if SENSE = 'N' or 'E'.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,3*N).
-* Also, if SENSE = 'E' or 'V' or 'B',
-* LWORK >= N+2*SDIM*(N-SDIM), where SDIM is the number of
-* selected eigenvalues computed by this routine. Note that
-* N+2*SDIM*(N-SDIM) <= N+N*N/2. Note also that an error is only
-* returned if LWORK < max(1,3*N), but if SENSE = 'E' or 'V' or
-* 'B' this may not be large enough.
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates upper bounds on the optimal sizes of the
-* arrays WORK and IWORK, returns these values as the first
-* entries of the WORK and IWORK arrays, and no error messages
-* related to LWORK or LIWORK are issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* LIWORK >= 1; if SENSE = 'V' or 'B', LIWORK >= SDIM*(N-SDIM).
-* Note that SDIM*(N-SDIM) <= N*N/4. Note also that an error is
-* only returned if LIWORK < 1, but if SENSE = 'V' or 'B' this
-* may not be large enough.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates upper bounds on the optimal sizes of
-* the arrays WORK and IWORK, returns these values as the first
-* entries of the WORK and IWORK arrays, and no error messages
-* related to LWORK or LIWORK are issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is
-* <= N: the QR algorithm failed to compute all the
-* eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
-* contain those eigenvalues which have converged; if
-* JOBVS = 'V', VS contains the transformation which
-* reduces A to its partially converged Schur form.
-* = N+1: the eigenvalues could not be reordered because some
-* eigenvalues were too close to separate (the problem
-* is very ill-conditioned);
-* = N+2: after reordering, roundoff changed values of some
-* complex eigenvalues so that leading eigenvalues in
-* the Schur form no longer satisfy SELECT=.TRUE. This
-* could also be caused by underflow due to scaling.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgeev.f b/SRC/sgeev.f
index 8c915a77..0ae92465 100644
--- a/SRC/sgeev.f
+++ b/SRC/sgeev.f
@@ -1,10 +1,191 @@
+*> \brief <b> SGEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR,
+* LDVR, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WI( * ), WORK( * ), WR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEEV computes for an N-by-N real nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> The right eigenvector v(j) of A satisfies
+*> A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*> u(j)**T * A = lambda(j) * u(j)**T
+*> where u(j)**T denotes the transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': left eigenvectors of A are not computed;
+*> = 'V': left eigenvectors of A are computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': right eigenvectors of A are not computed;
+*> = 'V': right eigenvectors of A are computed.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> WR and WI contain the real and imaginary parts,
+*> respectively, of the computed eigenvalues. Complex
+*> conjugate pairs of eigenvalues appear consecutively
+*> with the eigenvalue having the positive imaginary part
+*> first.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order
+*> as their eigenvalues.
+*> If JOBVL = 'N', VL is not referenced.
+*> If the j-th eigenvalue is real, then u(j) = VL(:,j),
+*> the j-th column of VL.
+*> If the j-th and (j+1)-st eigenvalues form a complex
+*> conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
+*> u(j+1) = VL(:,j) - i*VL(:,j+1).
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; if
+*> JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order
+*> as their eigenvalues.
+*> If JOBVR = 'N', VR is not referenced.
+*> If the j-th eigenvalue is real, then v(j) = VR(:,j),
+*> the j-th column of VR.
+*> If the j-th and (j+1)-st eigenvalues form a complex
+*> conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
+*> v(j+1) = VR(:,j) - i*VR(:,j+1).
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1; if
+*> JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,3*N), and
+*> if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good
+*> performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the QR algorithm failed to compute all the
+*> eigenvalues, and no eigenvectors have been computed;
+*> elements i+1:N of WR and WI contain eigenvalues which
+*> have converged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+* =====================================================================
SUBROUTINE SGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR,
$ LDVR, WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -15,103 +196,6 @@
$ WI( * ), WORK( * ), WR( * )
* ..
*
-* Purpose
-* =======
-*
-* SGEEV computes for an N-by-N real nonsymmetric matrix A, the
-* eigenvalues and, optionally, the left and/or right eigenvectors.
-*
-* The right eigenvector v(j) of A satisfies
-* A * v(j) = lambda(j) * v(j)
-* where lambda(j) is its eigenvalue.
-* The left eigenvector u(j) of A satisfies
-* u(j)**T * A = lambda(j) * u(j)**T
-* where u(j)**T denotes the transpose of u(j).
-*
-* The computed eigenvectors are normalized to have Euclidean norm
-* equal to 1 and largest component real.
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': left eigenvectors of A are not computed;
-* = 'V': left eigenvectors of A are computed.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': right eigenvectors of A are not computed;
-* = 'V': right eigenvectors of A are computed.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WR (output) REAL array, dimension (N)
-*
-* WI (output) REAL array, dimension (N)
-* WR and WI contain the real and imaginary parts,
-* respectively, of the computed eigenvalues. Complex
-* conjugate pairs of eigenvalues appear consecutively
-* with the eigenvalue having the positive imaginary part
-* first.
-*
-* VL (output) REAL array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order
-* as their eigenvalues.
-* If JOBVL = 'N', VL is not referenced.
-* If the j-th eigenvalue is real, then u(j) = VL(:,j),
-* the j-th column of VL.
-* If the j-th and (j+1)-st eigenvalues form a complex
-* conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
-* u(j+1) = VL(:,j) - i*VL(:,j+1).
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; if
-* JOBVL = 'V', LDVL >= N.
-*
-* VR (output) REAL array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order
-* as their eigenvalues.
-* If JOBVR = 'N', VR is not referenced.
-* If the j-th eigenvalue is real, then v(j) = VR(:,j),
-* the j-th column of VR.
-* If the j-th and (j+1)-st eigenvalues form a complex
-* conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
-* v(j+1) = VR(:,j) - i*VR(:,j+1).
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1; if
-* JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,3*N), and
-* if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good
-* performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the QR algorithm failed to compute all the
-* eigenvalues, and no eigenvectors have been computed;
-* elements i+1:N of WR and WI contain eigenvalues which
-* have converged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgeevx.f b/SRC/sgeevx.f
index 53f642d2..7839869c 100644
--- a/SRC/sgeevx.f
+++ b/SRC/sgeevx.f
@@ -1,11 +1,307 @@
+*> \brief <b> SGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, WR, WI,
+* VL, LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM,
+* RCONDE, RCONDV, WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER BALANC, JOBVL, JOBVR, SENSE
+* INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
+* REAL ABNRM
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), RCONDE( * ), RCONDV( * ),
+* $ SCALE( * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WI( * ), WORK( * ), WR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEEVX computes for an N-by-N real nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> Optionally also, it computes a balancing transformation to improve
+*> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
+*> SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
+*> (RCONDE), and reciprocal condition numbers for the right
+*> eigenvectors (RCONDV).
+*>
+*> The right eigenvector v(j) of A satisfies
+*> A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*> u(j)**T * A = lambda(j) * u(j)**T
+*> where u(j)**T denotes the transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*>
+*> Balancing a matrix means permuting the rows and columns to make it
+*> more nearly upper triangular, and applying a diagonal similarity
+*> transformation D * A * D**(-1), where D is a diagonal matrix, to
+*> make its rows and columns closer in norm and the condition numbers
+*> of its eigenvalues and eigenvectors smaller. The computed
+*> reciprocal condition numbers correspond to the balanced matrix.
+*> Permuting rows and columns will not change the condition numbers
+*> (in exact arithmetic) but diagonal scaling will. For further
+*> explanation of balancing, see section 4.10.2 of the LAPACK
+*> Users' Guide.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER*1
+*> Indicates how the input matrix should be diagonally scaled
+*> and/or permuted to improve the conditioning of its
+*> eigenvalues.
+*> = 'N': Do not diagonally scale or permute;
+*> = 'P': Perform permutations to make the matrix more nearly
+*> upper triangular. Do not diagonally scale;
+*> = 'S': Diagonally scale the matrix, i.e. replace A by
+*> D*A*D**(-1), where D is a diagonal matrix chosen
+*> to make the rows and columns of A more equal in
+*> norm. Do not permute;
+*> = 'B': Both diagonally scale and permute A.
+*> \endverbatim
+*> \verbatim
+*> Computed reciprocal condition numbers will be for the matrix
+*> after balancing and/or permuting. Permuting does not change
+*> condition numbers (in exact arithmetic), but balancing does.
+*> \endverbatim
+*>
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': left eigenvectors of A are not computed;
+*> = 'V': left eigenvectors of A are computed.
+*> If SENSE = 'E' or 'B', JOBVL must = 'V'.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': right eigenvectors of A are not computed;
+*> = 'V': right eigenvectors of A are computed.
+*> If SENSE = 'E' or 'B', JOBVR must = 'V'.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': None are computed;
+*> = 'E': Computed for eigenvalues only;
+*> = 'V': Computed for right eigenvectors only;
+*> = 'B': Computed for eigenvalues and right eigenvectors.
+*> \endverbatim
+*> \verbatim
+*> If SENSE = 'E' or 'B', both left and right eigenvectors
+*> must also be computed (JOBVL = 'V' and JOBVR = 'V').
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten. If JOBVL = 'V' or
+*> JOBVR = 'V', A contains the real Schur form of the balanced
+*> version of the input matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> WR and WI contain the real and imaginary parts,
+*> respectively, of the computed eigenvalues. Complex
+*> conjugate pairs of eigenvalues will appear consecutively
+*> with the eigenvalue having the positive imaginary part
+*> first.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order
+*> as their eigenvalues.
+*> If JOBVL = 'N', VL is not referenced.
+*> If the j-th eigenvalue is real, then u(j) = VL(:,j),
+*> the j-th column of VL.
+*> If the j-th and (j+1)-st eigenvalues form a complex
+*> conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
+*> u(j+1) = VL(:,j) - i*VL(:,j+1).
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; if
+*> JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order
+*> as their eigenvalues.
+*> If JOBVR = 'N', VR is not referenced.
+*> If the j-th eigenvalue is real, then v(j) = VR(:,j),
+*> the j-th column of VR.
+*> If the j-th and (j+1)-st eigenvalues form a complex
+*> conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
+*> v(j+1) = VR(:,j) - i*VR(:,j+1).
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are integer values determined when A was
+*> balanced. The balanced A(i,j) = 0 if I > J and
+*> J = 1,...,ILO-1 or I = IHI+1,...,N.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> when balancing A. If P(j) is the index of the row and column
+*> interchanged with row and column j, and D(j) is the scaling
+*> factor applied to row and column j, then
+*> SCALE(J) = P(J), for J = 1,...,ILO-1
+*> = D(J), for J = ILO,...,IHI
+*> = P(J) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] ABNRM
+*> \verbatim
+*> ABNRM is REAL
+*> The one-norm of the balanced matrix (the maximum
+*> of the sum of absolute values of elements of any column).
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension (N)
+*> RCONDE(j) is the reciprocal condition number of the j-th
+*> eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension (N)
+*> RCONDV(j) is the reciprocal condition number of the j-th
+*> right eigenvector.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. If SENSE = 'N' or 'E',
+*> LWORK >= max(1,2*N), and if JOBVL = 'V' or JOBVR = 'V',
+*> LWORK >= 3*N. If SENSE = 'V' or 'B', LWORK >= N*(N+6).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*N-2)
+*> If SENSE = 'N' or 'E', not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the QR algorithm failed to compute all the
+*> eigenvalues, and no eigenvectors or condition numbers
+*> have been computed; elements 1:ILO-1 and i+1:N of WR
+*> and WI contain eigenvalues which have converged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+* =====================================================================
SUBROUTINE SGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, WR, WI,
$ VL, LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM,
$ RCONDE, RCONDV, WORK, LWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER BALANC, JOBVL, JOBVR, SENSE
@@ -19,185 +315,6 @@
$ WI( * ), WORK( * ), WR( * )
* ..
*
-* Purpose
-* =======
-*
-* SGEEVX computes for an N-by-N real nonsymmetric matrix A, the
-* eigenvalues and, optionally, the left and/or right eigenvectors.
-*
-* Optionally also, it computes a balancing transformation to improve
-* the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
-* SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
-* (RCONDE), and reciprocal condition numbers for the right
-* eigenvectors (RCONDV).
-*
-* The right eigenvector v(j) of A satisfies
-* A * v(j) = lambda(j) * v(j)
-* where lambda(j) is its eigenvalue.
-* The left eigenvector u(j) of A satisfies
-* u(j)**T * A = lambda(j) * u(j)**T
-* where u(j)**T denotes the transpose of u(j).
-*
-* The computed eigenvectors are normalized to have Euclidean norm
-* equal to 1 and largest component real.
-*
-* Balancing a matrix means permuting the rows and columns to make it
-* more nearly upper triangular, and applying a diagonal similarity
-* transformation D * A * D**(-1), where D is a diagonal matrix, to
-* make its rows and columns closer in norm and the condition numbers
-* of its eigenvalues and eigenvectors smaller. The computed
-* reciprocal condition numbers correspond to the balanced matrix.
-* Permuting rows and columns will not change the condition numbers
-* (in exact arithmetic) but diagonal scaling will. For further
-* explanation of balancing, see section 4.10.2 of the LAPACK
-* Users' Guide.
-*
-* Arguments
-* =========
-*
-* BALANC (input) CHARACTER*1
-* Indicates how the input matrix should be diagonally scaled
-* and/or permuted to improve the conditioning of its
-* eigenvalues.
-* = 'N': Do not diagonally scale or permute;
-* = 'P': Perform permutations to make the matrix more nearly
-* upper triangular. Do not diagonally scale;
-* = 'S': Diagonally scale the matrix, i.e. replace A by
-* D*A*D**(-1), where D is a diagonal matrix chosen
-* to make the rows and columns of A more equal in
-* norm. Do not permute;
-* = 'B': Both diagonally scale and permute A.
-*
-* Computed reciprocal condition numbers will be for the matrix
-* after balancing and/or permuting. Permuting does not change
-* condition numbers (in exact arithmetic), but balancing does.
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': left eigenvectors of A are not computed;
-* = 'V': left eigenvectors of A are computed.
-* If SENSE = 'E' or 'B', JOBVL must = 'V'.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': right eigenvectors of A are not computed;
-* = 'V': right eigenvectors of A are computed.
-* If SENSE = 'E' or 'B', JOBVR must = 'V'.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': None are computed;
-* = 'E': Computed for eigenvalues only;
-* = 'V': Computed for right eigenvectors only;
-* = 'B': Computed for eigenvalues and right eigenvectors.
-*
-* If SENSE = 'E' or 'B', both left and right eigenvectors
-* must also be computed (JOBVL = 'V' and JOBVR = 'V').
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten. If JOBVL = 'V' or
-* JOBVR = 'V', A contains the real Schur form of the balanced
-* version of the input matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WR (output) REAL array, dimension (N)
-*
-* WI (output) REAL array, dimension (N)
-* WR and WI contain the real and imaginary parts,
-* respectively, of the computed eigenvalues. Complex
-* conjugate pairs of eigenvalues will appear consecutively
-* with the eigenvalue having the positive imaginary part
-* first.
-*
-* VL (output) REAL array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order
-* as their eigenvalues.
-* If JOBVL = 'N', VL is not referenced.
-* If the j-th eigenvalue is real, then u(j) = VL(:,j),
-* the j-th column of VL.
-* If the j-th and (j+1)-st eigenvalues form a complex
-* conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
-* u(j+1) = VL(:,j) - i*VL(:,j+1).
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; if
-* JOBVL = 'V', LDVL >= N.
-*
-* VR (output) REAL array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order
-* as their eigenvalues.
-* If JOBVR = 'N', VR is not referenced.
-* If the j-th eigenvalue is real, then v(j) = VR(:,j),
-* the j-th column of VR.
-* If the j-th and (j+1)-st eigenvalues form a complex
-* conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
-* v(j+1) = VR(:,j) - i*VR(:,j+1).
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* JOBVR = 'V', LDVR >= N.
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are integer values determined when A was
-* balanced. The balanced A(i,j) = 0 if I > J and
-* J = 1,...,ILO-1 or I = IHI+1,...,N.
-*
-* SCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* when balancing A. If P(j) is the index of the row and column
-* interchanged with row and column j, and D(j) is the scaling
-* factor applied to row and column j, then
-* SCALE(J) = P(J), for J = 1,...,ILO-1
-* = D(J), for J = ILO,...,IHI
-* = P(J) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* ABNRM (output) REAL
-* The one-norm of the balanced matrix (the maximum
-* of the sum of absolute values of elements of any column).
-*
-* RCONDE (output) REAL array, dimension (N)
-* RCONDE(j) is the reciprocal condition number of the j-th
-* eigenvalue.
-*
-* RCONDV (output) REAL array, dimension (N)
-* RCONDV(j) is the reciprocal condition number of the j-th
-* right eigenvector.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. If SENSE = 'N' or 'E',
-* LWORK >= max(1,2*N), and if JOBVL = 'V' or JOBVR = 'V',
-* LWORK >= 3*N. If SENSE = 'V' or 'B', LWORK >= N*(N+6).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (2*N-2)
-* If SENSE = 'N' or 'E', not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the QR algorithm failed to compute all the
-* eigenvalues, and no eigenvectors or condition numbers
-* have been computed; elements 1:ILO-1 and i+1:N of WR
-* and WI contain eigenvalues which have converged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgegs.f b/SRC/sgegs.f
index 85519cb3..98dfee2c 100644
--- a/SRC/sgegs.f
+++ b/SRC/sgegs.f
@@ -1,11 +1,229 @@
+*> \brief <b> SGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHAR,
+* ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), VSL( LDVSL, * ),
+* $ VSR( LDVSR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine SGGES.
+*>
+*> SGEGS computes the eigenvalues, real Schur form, and, optionally,
+*> left and or/right Schur vectors of a real matrix pair (A,B).
+*> Given two square matrices A and B, the generalized real Schur
+*> factorization has the form
+*>
+*> A = Q*S*Z**T, B = Q*T*Z**T
+*>
+*> where Q and Z are orthogonal matrices, T is upper triangular, and S
+*> is an upper quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal
+*> blocks, the 2-by-2 blocks corresponding to complex conjugate pairs
+*> of eigenvalues of (A,B). The columns of Q are the left Schur vectors
+*> and the columns of Z are the right Schur vectors.
+*>
+*> If only the eigenvalues of (A,B) are needed, the driver routine
+*> SGEGV should be used instead. See SGEGV for a description of the
+*> eigenvalues of the generalized nonsymmetric eigenvalue problem
+*> (GNEP).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors (returned in VSL).
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors (returned in VSR).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the matrix A.
+*> On exit, the upper quasi-triangular matrix S from the
+*> generalized real Schur factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the matrix B.
+*> On exit, the upper triangular matrix T from the generalized
+*> real Schur factorization.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> The real parts of each scalar alpha defining an eigenvalue
+*> of GNEP.
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> The imaginary parts of each scalar alpha defining an
+*> eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th
+*> eigenvalue is real; if positive, then the j-th and (j+1)-st
+*> eigenvalues are a complex conjugate pair, with
+*> ALPHAI(j+1) = -ALPHAI(j).
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> The scalars beta that define the eigenvalues of GNEP.
+*> Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
+*> beta = BETA(j) represent the j-th eigenvalue of the matrix
+*> pair (A,B), in one of the forms lambda = alpha/beta or
+*> mu = beta/alpha. Since either lambda or mu may overflow,
+*> they should not, in general, be computed.
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is REAL array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', the matrix of left Schur vectors Q.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >=1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is REAL array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', the matrix of right Schur vectors Z.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,4*N).
+*> For good performance, LWORK must generally be larger.
+*> To compute the optimal value of LWORK, call ILAENV to get
+*> blocksizes (for SGEQRF, SORMQR, and SORGQR.) Then compute:
+*> NB -- MAX of the blocksizes for SGEQRF, SORMQR, and SORGQR
+*> The optimal LWORK is 2*N + N*(NB+1).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
+*> be correct for j=INFO+1,...,N.
+*> > N: errors that usually indicate LAPACK problems:
+*> =N+1: error return from SGGBAL
+*> =N+2: error return from SGEQRF
+*> =N+3: error return from SORMQR
+*> =N+4: error return from SORGQR
+*> =N+5: error return from SGGHRD
+*> =N+6: error return from SHGEQZ (other than failed
+*> iteration)
+*> =N+7: error return from SGGBAK (computing VSL)
+*> =N+8: error return from SGGBAK (computing VSR)
+*> =N+9: error return from SLASCL (various places)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+* =====================================================================
SUBROUTINE SGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHAR,
$ ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR
@@ -17,129 +235,6 @@
$ VSR( LDVSR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine SGGES.
-*
-* SGEGS computes the eigenvalues, real Schur form, and, optionally,
-* left and or/right Schur vectors of a real matrix pair (A,B).
-* Given two square matrices A and B, the generalized real Schur
-* factorization has the form
-*
-* A = Q*S*Z**T, B = Q*T*Z**T
-*
-* where Q and Z are orthogonal matrices, T is upper triangular, and S
-* is an upper quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal
-* blocks, the 2-by-2 blocks corresponding to complex conjugate pairs
-* of eigenvalues of (A,B). The columns of Q are the left Schur vectors
-* and the columns of Z are the right Schur vectors.
-*
-* If only the eigenvalues of (A,B) are needed, the driver routine
-* SGEGV should be used instead. See SGEGV for a description of the
-* eigenvalues of the generalized nonsymmetric eigenvalue problem
-* (GNEP).
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors (returned in VSL).
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors (returned in VSR).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the matrix A.
-* On exit, the upper quasi-triangular matrix S from the
-* generalized real Schur factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the matrix B.
-* On exit, the upper triangular matrix T from the generalized
-* real Schur factorization.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHAR (output) REAL array, dimension (N)
-* The real parts of each scalar alpha defining an eigenvalue
-* of GNEP.
-*
-* ALPHAI (output) REAL array, dimension (N)
-* The imaginary parts of each scalar alpha defining an
-* eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th
-* eigenvalue is real; if positive, then the j-th and (j+1)-st
-* eigenvalues are a complex conjugate pair, with
-* ALPHAI(j+1) = -ALPHAI(j).
-*
-* BETA (output) REAL array, dimension (N)
-* The scalars beta that define the eigenvalues of GNEP.
-* Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
-* beta = BETA(j) represent the j-th eigenvalue of the matrix
-* pair (A,B), in one of the forms lambda = alpha/beta or
-* mu = beta/alpha. Since either lambda or mu may overflow,
-* they should not, in general, be computed.
-*
-* VSL (output) REAL array, dimension (LDVSL,N)
-* If JOBVSL = 'V', the matrix of left Schur vectors Q.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >=1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) REAL array, dimension (LDVSR,N)
-* If JOBVSR = 'V', the matrix of right Schur vectors Z.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,4*N).
-* For good performance, LWORK must generally be larger.
-* To compute the optimal value of LWORK, call ILAENV to get
-* blocksizes (for SGEQRF, SORMQR, and SORGQR.) Then compute:
-* NB -- MAX of the blocksizes for SGEQRF, SORMQR, and SORGQR
-* The optimal LWORK is 2*N + N*(NB+1).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
-* be correct for j=INFO+1,...,N.
-* > N: errors that usually indicate LAPACK problems:
-* =N+1: error return from SGGBAL
-* =N+2: error return from SGEQRF
-* =N+3: error return from SORMQR
-* =N+4: error return from SORGQR
-* =N+5: error return from SGGHRD
-* =N+6: error return from SHGEQZ (other than failed
-* iteration)
-* =N+7: error return from SGGBAK (computing VSL)
-* =N+8: error return from SGGBAK (computing VSR)
-* =N+9: error return from SLASCL (various places)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgegv.f b/SRC/sgegv.f
index d1f9c10d..0fafb855 100644
--- a/SRC/sgegv.f
+++ b/SRC/sgegv.f
@@ -1,10 +1,312 @@
+*> \brief <b> SGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
+* BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine SGGEV.
+*>
+*> SGEGV computes the eigenvalues and, optionally, the left and/or right
+*> eigenvectors of a real matrix pair (A,B).
+*> Given two square matrices A and B,
+*> the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
+*> eigenvalues lambda and corresponding (non-zero) eigenvectors x such
+*> that
+*>
+*> A*x = lambda*B*x.
+*>
+*> An alternate form is to find the eigenvalues mu and corresponding
+*> eigenvectors y such that
+*>
+*> mu*A*y = B*y.
+*>
+*> These two forms are equivalent with mu = 1/lambda and x = y if
+*> neither lambda nor mu is zero. In order to deal with the case that
+*> lambda or mu is zero or small, two values alpha and beta are returned
+*> for each eigenvalue, such that lambda = alpha/beta and
+*> mu = beta/alpha.
+*>
+*> The vectors x and y in the above equations are right eigenvectors of
+*> the matrix pair (A,B). Vectors u and v satisfying
+*>
+*> u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
+*>
+*> are left eigenvectors of (A,B).
+*>
+*> Note: this routine performs "full balancing" on A and B
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors (returned
+*> in VL).
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors (returned
+*> in VR).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the matrix A.
+*> If JOBVL = 'V' or JOBVR = 'V', then on exit A
+*> contains the real Schur form of A from the generalized Schur
+*> factorization of the pair (A,B) after balancing.
+*> If no eigenvectors were computed, then only the diagonal
+*> blocks from the Schur form will be correct. See SGGHRD and
+*> SHGEQZ for details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the matrix B.
+*> If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
+*> upper triangular matrix obtained from B in the generalized
+*> Schur factorization of the pair (A,B) after balancing.
+*> If no eigenvectors were computed, then only those elements of
+*> B corresponding to the diagonal blocks from the Schur form of
+*> A will be correct. See SGGHRD and SHGEQZ for details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> The real parts of each scalar alpha defining an eigenvalue of
+*> GNEP.
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> The imaginary parts of each scalar alpha defining an
+*> eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th
+*> eigenvalue is real; if positive, then the j-th and
+*> (j+1)-st eigenvalues are a complex conjugate pair, with
+*> ALPHAI(j+1) = -ALPHAI(j).
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> The scalars beta that define the eigenvalues of GNEP.
+*>
+*> Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
+*> beta = BETA(j) represent the j-th eigenvalue of the matrix
+*> pair (A,B), in one of the forms lambda = alpha/beta or
+*> mu = beta/alpha. Since either lambda or mu may overflow,
+*> they should not, in general, be computed.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored
+*> in the columns of VL, in the same order as their eigenvalues.
+*> If the j-th eigenvalue is real, then u(j) = VL(:,j).
+*> If the j-th and (j+1)-st eigenvalues form a complex conjugate
+*> pair, then
+*> u(j) = VL(:,j) + i*VL(:,j+1)
+*> and
+*> u(j+1) = VL(:,j) - i*VL(:,j+1).
+*> \endverbatim
+*> \verbatim
+*> Each eigenvector is scaled so that its largest component has
+*> abs(real part) + abs(imag. part) = 1, except for eigenvectors
+*> corresponding to an eigenvalue with alpha = beta = 0, which
+*> are set to zero.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors x(j) are stored
+*> in the columns of VR, in the same order as their eigenvalues.
+*> If the j-th eigenvalue is real, then x(j) = VR(:,j).
+*> If the j-th and (j+1)-st eigenvalues form a complex conjugate
+*> pair, then
+*> x(j) = VR(:,j) + i*VR(:,j+1)
+*> and
+*> x(j+1) = VR(:,j) - i*VR(:,j+1).
+*> \endverbatim
+*> \verbatim
+*> Each eigenvector is scaled so that its largest component has
+*> abs(real part) + abs(imag. part) = 1, except for eigenvalues
+*> corresponding to an eigenvalue with alpha = beta = 0, which
+*> are set to zero.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,8*N).
+*> For good performance, LWORK must generally be larger.
+*> To compute the optimal value of LWORK, call ILAENV to get
+*> blocksizes (for SGEQRF, SORMQR, and SORGQR.) Then compute:
+*> NB -- MAX of the blocksizes for SGEQRF, SORMQR, and SORGQR;
+*> The optimal LWORK is:
+*> 2*N + MAX( 6*N, N*(NB+1) ).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
+*> should be correct for j=INFO+1,...,N.
+*> > N: errors that usually indicate LAPACK problems:
+*> =N+1: error return from SGGBAL
+*> =N+2: error return from SGEQRF
+*> =N+3: error return from SORMQR
+*> =N+4: error return from SORGQR
+*> =N+5: error return from SGGHRD
+*> =N+6: error return from SHGEQZ (other than failed
+*> iteration)
+*> =N+7: error return from STGEVC
+*> =N+8: error return from SGGBAK (computing VL)
+*> =N+9: error return from SGGBAK (computing VR)
+*> =N+10: error return from SLASCL (various calls)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Balancing
+*> ---------
+*>
+*> This driver calls SGGBAL to both permute and scale rows and columns
+*> of A and B. The permutations PL and PR are chosen so that PL*A*PR
+*> and PL*B*R will be upper triangular except for the diagonal blocks
+*> A(i:j,i:j) and B(i:j,i:j), with i and j as close together as
+*> possible. The diagonal scaling matrices DL and DR are chosen so
+*> that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to
+*> one (except for the elements that start out zero.)
+*>
+*> After the eigenvalues and eigenvectors of the balanced matrices
+*> have been computed, SGGBAK transforms the eigenvectors back to what
+*> they would have been (in perfect arithmetic) if they had not been
+*> balanced.
+*>
+*> Contents of A and B on Exit
+*> -------- -- - --- - -- ----
+*>
+*> If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
+*> both), then on exit the arrays A and B will contain the real Schur
+*> form[*] of the "balanced" versions of A and B. If no eigenvectors
+*> are computed, then only the diagonal blocks will be correct.
+*>
+*> [*] See SHGEQZ, SGEGS, or read the book "Matrix Computations",
+*> by Golub & van Loan, pub. by Johns Hopkins U. Press.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
$ BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -16,207 +318,6 @@
$ VR( LDVR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine SGGEV.
-*
-* SGEGV computes the eigenvalues and, optionally, the left and/or right
-* eigenvectors of a real matrix pair (A,B).
-* Given two square matrices A and B,
-* the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
-* eigenvalues lambda and corresponding (non-zero) eigenvectors x such
-* that
-*
-* A*x = lambda*B*x.
-*
-* An alternate form is to find the eigenvalues mu and corresponding
-* eigenvectors y such that
-*
-* mu*A*y = B*y.
-*
-* These two forms are equivalent with mu = 1/lambda and x = y if
-* neither lambda nor mu is zero. In order to deal with the case that
-* lambda or mu is zero or small, two values alpha and beta are returned
-* for each eigenvalue, such that lambda = alpha/beta and
-* mu = beta/alpha.
-*
-* The vectors x and y in the above equations are right eigenvectors of
-* the matrix pair (A,B). Vectors u and v satisfying
-*
-* u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
-*
-* are left eigenvectors of (A,B).
-*
-* Note: this routine performs "full balancing" on A and B
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors (returned
-* in VL).
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors (returned
-* in VR).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the matrix A.
-* If JOBVL = 'V' or JOBVR = 'V', then on exit A
-* contains the real Schur form of A from the generalized Schur
-* factorization of the pair (A,B) after balancing.
-* If no eigenvectors were computed, then only the diagonal
-* blocks from the Schur form will be correct. See SGGHRD and
-* SHGEQZ for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the matrix B.
-* If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
-* upper triangular matrix obtained from B in the generalized
-* Schur factorization of the pair (A,B) after balancing.
-* If no eigenvectors were computed, then only those elements of
-* B corresponding to the diagonal blocks from the Schur form of
-* A will be correct. See SGGHRD and SHGEQZ for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHAR (output) REAL array, dimension (N)
-* The real parts of each scalar alpha defining an eigenvalue of
-* GNEP.
-*
-* ALPHAI (output) REAL array, dimension (N)
-* The imaginary parts of each scalar alpha defining an
-* eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th
-* eigenvalue is real; if positive, then the j-th and
-* (j+1)-st eigenvalues are a complex conjugate pair, with
-* ALPHAI(j+1) = -ALPHAI(j).
-*
-* BETA (output) REAL array, dimension (N)
-* The scalars beta that define the eigenvalues of GNEP.
-*
-* Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
-* beta = BETA(j) represent the j-th eigenvalue of the matrix
-* pair (A,B), in one of the forms lambda = alpha/beta or
-* mu = beta/alpha. Since either lambda or mu may overflow,
-* they should not, in general, be computed.
-*
-* VL (output) REAL array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored
-* in the columns of VL, in the same order as their eigenvalues.
-* If the j-th eigenvalue is real, then u(j) = VL(:,j).
-* If the j-th and (j+1)-st eigenvalues form a complex conjugate
-* pair, then
-* u(j) = VL(:,j) + i*VL(:,j+1)
-* and
-* u(j+1) = VL(:,j) - i*VL(:,j+1).
-*
-* Each eigenvector is scaled so that its largest component has
-* abs(real part) + abs(imag. part) = 1, except for eigenvectors
-* corresponding to an eigenvalue with alpha = beta = 0, which
-* are set to zero.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) REAL array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors x(j) are stored
-* in the columns of VR, in the same order as their eigenvalues.
-* If the j-th eigenvalue is real, then x(j) = VR(:,j).
-* If the j-th and (j+1)-st eigenvalues form a complex conjugate
-* pair, then
-* x(j) = VR(:,j) + i*VR(:,j+1)
-* and
-* x(j+1) = VR(:,j) - i*VR(:,j+1).
-*
-* Each eigenvector is scaled so that its largest component has
-* abs(real part) + abs(imag. part) = 1, except for eigenvalues
-* corresponding to an eigenvalue with alpha = beta = 0, which
-* are set to zero.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,8*N).
-* For good performance, LWORK must generally be larger.
-* To compute the optimal value of LWORK, call ILAENV to get
-* blocksizes (for SGEQRF, SORMQR, and SORGQR.) Then compute:
-* NB -- MAX of the blocksizes for SGEQRF, SORMQR, and SORGQR;
-* The optimal LWORK is:
-* 2*N + MAX( 6*N, N*(NB+1) ).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
-* should be correct for j=INFO+1,...,N.
-* > N: errors that usually indicate LAPACK problems:
-* =N+1: error return from SGGBAL
-* =N+2: error return from SGEQRF
-* =N+3: error return from SORMQR
-* =N+4: error return from SORGQR
-* =N+5: error return from SGGHRD
-* =N+6: error return from SHGEQZ (other than failed
-* iteration)
-* =N+7: error return from STGEVC
-* =N+8: error return from SGGBAK (computing VL)
-* =N+9: error return from SGGBAK (computing VR)
-* =N+10: error return from SLASCL (various calls)
-*
-* Further Details
-* ===============
-*
-* Balancing
-* ---------
-*
-* This driver calls SGGBAL to both permute and scale rows and columns
-* of A and B. The permutations PL and PR are chosen so that PL*A*PR
-* and PL*B*R will be upper triangular except for the diagonal blocks
-* A(i:j,i:j) and B(i:j,i:j), with i and j as close together as
-* possible. The diagonal scaling matrices DL and DR are chosen so
-* that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to
-* one (except for the elements that start out zero.)
-*
-* After the eigenvalues and eigenvectors of the balanced matrices
-* have been computed, SGGBAK transforms the eigenvectors back to what
-* they would have been (in perfect arithmetic) if they had not been
-* balanced.
-*
-* Contents of A and B on Exit
-* -------- -- - --- - -- ----
-*
-* If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
-* both), then on exit the arrays A and B will contain the real Schur
-* form[*] of the "balanced" versions of A and B. If no eigenvectors
-* are computed, then only the diagonal blocks will be correct.
-*
-* [*] See SHGEQZ, SGEGS, or read the book "Matrix Computations",
-* by Golub & van Loan, pub. by Johns Hopkins U. Press.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgehd2.f b/SRC/sgehd2.f
index b361d696..f1255060 100644
--- a/SRC/sgehd2.f
+++ b/SRC/sgehd2.f
@@ -1,90 +1,131 @@
- SUBROUTINE SGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
+*> \brief \b SGEHD2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEHD2 reduces a real general matrix A to upper Hessenberg form H by
-* an orthogonal similarity transformation: Q**T * A * Q = H .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEHD2 reduces a real general matrix A to upper Hessenberg form H by
+*> an orthogonal similarity transformation: Q**T * A * Q = H .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that A is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to SGEBAL; otherwise they should be
-* set to 1 and N respectively. See Further Details.
-* 1 <= ILO <= IHI <= max(1,N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the n by n general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* elements below the first subdiagonal, with the array TAU,
-* represent the orthogonal matrix Q as a product of elementary
-* reflectors. See Further Details.
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (N)
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* set to 1 and N respectively. See Further Details.
+*> 1 <= ILO <= IHI <= max(1,N).
+*>
+*> A (input/output) REAL array, dimension (LDA,N)
+*> On entry, the n by n general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> elements below the first subdiagonal, with the array TAU,
+*> represent the orthogonal matrix Q as a product of elementary
+*> reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) REAL array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) REAL array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of (ihi-ilo) elementary
+*> reflectors
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
+*> exit in A(i+2:ihi,i), and tau in TAU(i).
+*>
+*> The contents of A are illustrated by the following example, with
+*> n = 7, ilo = 2 and ihi = 6:
+*>
+*> on entry, on exit,
+*>
+*> ( a a a a a a a ) ( a a h h h h a )
+*> ( a a a a a a ) ( a h h h h a )
+*> ( a a a a a a ) ( h h h h h h )
+*> ( a a a a a a ) ( v2 h h h h h )
+*> ( a a a a a a ) ( v2 v3 h h h h )
+*> ( a a a a a a ) ( v2 v3 v4 h h h )
+*> ( a ) ( a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of (ihi-ilo) elementary
-* reflectors
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
-* exit in A(i+2:ihi,i), and tau in TAU(i).
-*
-* The contents of A are illustrated by the following example, with
-* n = 7, ilo = 2 and ihi = 6:
-*
-* on entry, on exit,
-*
-* ( a a a a a a a ) ( a a h h h h a )
-* ( a a a a a a ) ( a h h h h a )
-* ( a a a a a a ) ( h h h h h h )
-* ( a a a a a a ) ( v2 h h h h h )
-* ( a a a a a a ) ( v2 v3 h h h h )
-* ( a a a a a a ) ( v2 v3 v4 h h h )
-* ( a ) ( a )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgehrd.f b/SRC/sgehrd.f
index 2d3a8cc0..b1a8bf61 100644
--- a/SRC/sgehrd.f
+++ b/SRC/sgehrd.f
@@ -1,106 +1,147 @@
- SUBROUTINE SGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SGEHRD
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEHRD reduces a real general matrix A to upper Hessenberg form H by
-* an orthogonal similarity transformation: Q**T * A * Q = H .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEHRD reduces a real general matrix A to upper Hessenberg form H by
+*> an orthogonal similarity transformation: Q**T * A * Q = H .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that A is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to SGEBAL; otherwise they should be
-* set to 1 and N respectively. See Further Details.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the N-by-N general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* elements below the first subdiagonal, with the array TAU,
-* represent the orthogonal matrix Q as a product of elementary
-* reflectors. See Further Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) REAL array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to
-* zero.
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* set to 1 and N respectively. See Further Details.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*>
+*> A (input/output) REAL array, dimension (LDA,N)
+*> On entry, the N-by-N general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> elements below the first subdiagonal, with the array TAU,
+*> represent the orthogonal matrix Q as a product of elementary
+*> reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) REAL array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to
+*> zero.
+*>
+*> WORK (workspace/output) REAL array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The length of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of (ihi-ilo) elementary
+*> reflectors
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
+*> exit in A(i+2:ihi,i), and tau in TAU(i).
+*>
+*> The contents of A are illustrated by the following example, with
+*> n = 7, ilo = 2 and ihi = 6:
+*>
+*> on entry, on exit,
+*>
+*> ( a a a a a a a ) ( a a h h h h a )
+*> ( a a a a a a ) ( a h h h h a )
+*> ( a a a a a a ) ( h h h h h h )
+*> ( a a a a a a ) ( v2 h h h h h )
+*> ( a a a a a a ) ( v2 v3 h h h h )
+*> ( a a a a a a ) ( v2 v3 v4 h h h )
+*> ( a ) ( a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> This file is a slight modification of LAPACK-3.0's DGEHRD
+*> subroutine incorporating improvements proposed by Quintana-Orti and
+*> Van de Geijn (2006). (See DLAHR2.)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of (ihi-ilo) elementary
-* reflectors
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
-* exit in A(i+2:ihi,i), and tau in TAU(i).
-*
-* The contents of A are illustrated by the following example, with
-* n = 7, ilo = 2 and ihi = 6:
-*
-* on entry, on exit,
-*
-* ( a a a a a a a ) ( a a h h h h a )
-* ( a a a a a a ) ( a h h h h a )
-* ( a a a a a a ) ( h h h h h h )
-* ( a a a a a a ) ( v2 h h h h h )
-* ( a a a a a a ) ( v2 v3 h h h h )
-* ( a a a a a a ) ( v2 v3 v4 h h h )
-* ( a ) ( a )
-*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This file is a slight modification of LAPACK-3.0's DGEHRD
-* subroutine incorporating improvements proposed by Quintana-Orti and
-* Van de Geijn (2006). (See DLAHR2.)
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgejsv.f b/SRC/sgejsv.f
index 57bce24c..73939b97 100644
--- a/SRC/sgejsv.f
+++ b/SRC/sgejsv.f
@@ -1,20 +1,477 @@
+*> \brief \b SGEJSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
+* M, N, A, LDA, SVA, U, LDU, V, LDV,
+* WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* IMPLICIT NONE
+* INTEGER INFO, LDA, LDU, LDV, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), SVA( N ), U( LDU, * ), V( LDV, * ),
+* $ WORK( LWORK )
+* INTEGER IWORK( * )
+* CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEJSV computes the singular value decomposition (SVD) of a real M-by-N
+*> matrix [A], where M >= N. The SVD of [A] is written as
+*>
+*> [A] = [U] * [SIGMA] * [V]^t,
+*>
+*> where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
+*> diagonal elements, [U] is an M-by-N (or M-by-M) orthonormal matrix, and
+*> [V] is an N-by-N orthogonal matrix. The diagonal elements of [SIGMA] are
+*> the singular values of [A]. The columns of [U] and [V] are the left and
+*> the right singular vectors of [A], respectively. The matrices [U] and [V]
+*> are computed and stored in the arrays U and V, respectively. The diagonal
+*> of [SIGMA] is computed and stored in the array SVA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBA
+*> \verbatim
+*> JOBA is CHARACTER*1
+*> Specifies the level of accuracy:
+*> = 'C': This option works well (high relative accuracy) if A = B * D,
+*> with well-conditioned B and arbitrary diagonal matrix D.
+*> The accuracy cannot be spoiled by COLUMN scaling. The
+*> accuracy of the computed output depends on the condition of
+*> B, and the procedure aims at the best theoretical accuracy.
+*> The relative error max_{i=1:N}|d sigma_i| / sigma_i is
+*> bounded by f(M,N)*epsilon* cond(B), independent of D.
+*> The input matrix is preprocessed with the QRF with column
+*> pivoting. This initial preprocessing and preconditioning by
+*> a rank revealing QR factorization is common for all values of
+*> JOBA. Additional actions are specified as follows:
+*> = 'E': Computation as with 'C' with an additional estimate of the
+*> condition number of B. It provides a realistic error bound.
+*> = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
+*> D1, D2, and well-conditioned matrix C, this option gives
+*> higher accuracy than the 'C' option. If the structure of the
+*> input matrix is not known, and relative accuracy is
+*> desirable, then this option is advisable. The input matrix A
+*> is preprocessed with QR factorization with FULL (row and
+*> column) pivoting.
+*> = 'G' Computation as with 'F' with an additional estimate of the
+*> condition number of B, where A=D*B. If A has heavily weighted
+*> rows, then using this condition number gives too pessimistic
+*> error bound.
+*> = 'A': Small singular values are the noise and the matrix is treated
+*> as numerically rank defficient. The error in the computed
+*> singular values is bounded by f(m,n)*epsilon*||A||.
+*> The computed SVD A = U * S * V^t restores A up to
+*> f(m,n)*epsilon*||A||.
+*> This gives the procedure the licence to discard (set to zero)
+*> all singular values below N*epsilon*||A||.
+*> = 'R': Similar as in 'A'. Rank revealing property of the initial
+*> QR factorization is used do reveal (using triangular factor)
+*> a gap sigma_{r+1} < epsilon * sigma_r in which case the
+*> numerical RANK is declared to be r. The SVD is computed with
+*> absolute error bounds, but more accurately than with 'A'.
+*>
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> Specifies whether to compute the columns of U:
+*> = 'U': N columns of U are returned in the array U.
+*> = 'F': full set of M left sing. vectors is returned in the array U.
+*> = 'W': U may be used as workspace of length M*N. See the description
+*> of U.
+*> = 'N': U is not computed.
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> Specifies whether to compute the matrix V:
+*> = 'V': N columns of V are returned in the array V; Jacobi rotations
+*> are not explicitly accumulated.
+*> = 'J': N columns of V are returned in the array V, but they are
+*> computed as the product of Jacobi rotations. This option is
+*> allowed only if JOBU .NE. 'N', i.e. in computing the full SVD.
+*> = 'W': V may be used as workspace of length N*N. See the description
+*> of V.
+*> = 'N': V is not computed.
+*>
+*> \param[in] JOBR
+*> \verbatim
+*> JOBR is CHARACTER*1
+*> Specifies the RANGE for the singular values. Issues the licence to
+*> set to zero small positive singular values if they are outside
+*> specified range. If A .NE. 0 is scaled so that the largest singular
+*> value of c*A is around SQRT(BIG), BIG=SLAMCH('O'), then JOBR issues
+*> the licence to kill columns of A whose norm in c*A is less than
+*> SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN,
+*> where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E').
+*> = 'N': Do not kill small columns of c*A. This option assumes that
+*> BLAS and QR factorizations and triangular solvers are
+*> implemented to work in that range. If the condition of A
+*> is greater than BIG, use SGESVJ.
+*> = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)]
+*> (roughly, as described above). This option is recommended.
+*> ===========================
+*> For computing the singular values in the FULL range [SFMIN,BIG]
+*> use SGESVJ.
+*>
+*> \param[in] JOBT
+*> \verbatim
+*> JOBT is CHARACTER*1
+*> If the matrix is square then the procedure may determine to use
+*> transposed A if A^t seems to be better with respect to convergence.
+*> If the matrix is not square, JOBT is ignored. This is subject to
+*> changes in the future.
+*> The decision is based on two values of entropy over the adjoint
+*> orbit of A^t * A. See the descriptions of WORK(6) and WORK(7).
+*> = 'T': transpose if entropy test indicates possibly faster
+*> convergence of Jacobi process if A^t is taken as input. If A is
+*> replaced with A^t, then the row pivoting is included automatically.
+*> = 'N': do not speculate.
+*> This option can be used to compute only the singular values, or the
+*> full SVD (U, SIGMA and V). For only one set of singular vectors
+*> (U or V), the caller should provide both U and V, as one of the
+*> matrices is used as workspace if the matrix A is transposed.
+*> The implementer can easily remove this constraint and make the
+*> code more complicated. See the descriptions of U and V.
+*>
+*> \param[in] JOBP
+*> \verbatim
+*> JOBP is CHARACTER*1
+*> Issues the licence to introduce structured perturbations to drown
+*> denormalized numbers. This licence should be active if the
+*> denormals are poorly implemented, causing slow computation,
+*> especially in cases of fast convergence (!). For details see [1,2].
+*> For the sake of simplicity, this perturbations are included only
+*> when the full SVD or only the singular values are requested. The
+*> implementer/user can easily add the perturbation for the cases of
+*> computing one set of singular vectors.
+*> = 'P': introduce perturbation
+*> = 'N': do not perturb
+*> \endverbatim
+*> \endverbatim
+*> \endverbatim
+*> \endverbatim
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] SVA
+*> \verbatim
+*> SVA is REAL array, dimension (N)
+*> On exit,
+*> - For WORK(1)/WORK(2) = ONE: The singular values of A. During the
+*> computation SVA contains Euclidean column norms of the
+*> iterated matrices in the array A.
+*> - For WORK(1) .NE. WORK(2): The singular values of A are
+*> (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if
+*> sigma_max(A) overflows or if small singular values have been
+*> saved from underflow by scaling the input matrix A.
+*> - If JOBR='R' then some of the singular values may be returned
+*> as exact zeros obtained by "set to zero" because they are
+*> below the numerical rank threshold or are denormalized numbers.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension ( LDU, N )
+*> If JOBU = 'U', then U contains on exit the M-by-N matrix of
+*> the left singular vectors.
+*> If JOBU = 'F', then U contains on exit the M-by-M matrix of
+*> the left singular vectors, including an ONB
+*> of the orthogonal complement of the Range(A).
+*> If JOBU = 'W' .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N),
+*> then U is used as workspace if the procedure
+*> replaces A with A^t. In that case, [V] is computed
+*> in U as left singular vectors of A^t and then
+*> copied back to the V array. This 'W' option is just
+*> a reminder to the caller that in this case U is
+*> reserved as workspace of length N*N.
+*> If JOBU = 'N' U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U, LDU >= 1.
+*> IF JOBU = 'U' or 'F' or 'W', then LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension ( LDV, N )
+*> If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
+*> the right singular vectors;
+*> If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N),
+*> then V is used as workspace if the pprocedure
+*> replaces A with A^t. In that case, [U] is computed
+*> in V as right singular vectors of A^t and then
+*> copied back to the U array. This 'W' option is just
+*> a reminder to the caller that in this case V is
+*> reserved as workspace of length N*N.
+*> If JOBV = 'N' V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V, LDV >= 1.
+*> If JOBV = 'V' or 'J' or 'W', then LDV >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension at least LWORK.
+*> On exit,
+*> WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such
+*> that SCALE*SVA(1:N) are the computed singular values
+*> of A. (See the description of SVA().)
+*> WORK(2) = See the description of WORK(1).
+*> WORK(3) = SCONDA is an estimate for the condition number of
+*> column equilibrated A. (If JOBA .EQ. 'E' or 'G')
+*> SCONDA is an estimate of SQRT(||(R^t * R)^(-1)||_1).
+*> It is computed using SPOCON. It holds
+*> N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
+*> where R is the triangular factor from the QRF of A.
+*> However, if R is truncated and the numerical rank is
+*> determined to be strictly smaller than N, SCONDA is
+*> returned as -1, thus indicating that the smallest
+*> singular values might be lost.
+*> \endverbatim
+*> \verbatim
+*> If full SVD is needed, the following two condition numbers are
+*> useful for the analysis of the algorithm. They are provied for
+*> a developer/implementer who is familiar with the details of
+*> the method.
+*> \endverbatim
+*> \verbatim
+*> WORK(4) = an estimate of the scaled condition number of the
+*> triangular factor in the first QR factorization.
+*> WORK(5) = an estimate of the scaled condition number of the
+*> triangular factor in the second QR factorization.
+*> The following two parameters are computed if JOBT .EQ. 'T'.
+*> They are provided for a developer/implementer who is familiar
+*> with the details of the method.
+*> \endverbatim
+*> \verbatim
+*> WORK(6) = the entropy of A^t*A :: this is the Shannon entropy
+*> of diag(A^t*A) / Trace(A^t*A) taken as point in the
+*> probability simplex.
+*> WORK(7) = the entropy of A*A^t.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> Length of WORK to confirm proper allocation of work space.
+*> LWORK depends on the job:
+*> \endverbatim
+*> \verbatim
+*> If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and
+*> -> .. no scaled condition estimate required (JOBE.EQ.'N'):
+*> LWORK >= max(2*M+N,4*N+1,7). This is the minimal requirement.
+*> ->> For optimal performance (blocked code) the optimal value
+*> is LWORK >= max(2*M+N,3*N+(N+1)*NB,7). Here NB is the optimal
+*> block size for DGEQP3 and DGEQRF.
+*> In general, optimal LWORK is computed as
+*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF), 7).
+*> -> .. an estimate of the scaled condition number of A is
+*> required (JOBA='E', 'G'). In this case, LWORK is the maximum
+*> of the above and N*N+4*N, i.e. LWORK >= max(2*M+N,N*N+4*N,7).
+*> ->> For optimal performance (blocked code) the optimal value
+*> is LWORK >= max(2*M+N,3*N+(N+1)*NB, N*N+4*N, 7).
+*> In general, the optimal length LWORK is computed as
+*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF),
+*> N+N*N+LWORK(DPOCON),7).
+*> \endverbatim
+*> \verbatim
+*> If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),
+*> -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
+*> -> For optimal performance, LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
+*> where NB is the optimal block size for DGEQP3, DGEQRF, DGELQ,
+*> DORMLQ. In general, the optimal length LWORK is computed as
+*> LWORK >= max(2*M+N,N+LWORK(DGEQP3), N+LWORK(DPOCON),
+*> N+LWORK(DGELQ), 2*N+LWORK(DGEQRF), N+LWORK(DORMLQ)).
+*> \endverbatim
+*> \verbatim
+*> If SIGMA and the left singular vectors are needed
+*> -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
+*> -> For optimal performance:
+*> if JOBU.EQ.'U' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
+*> if JOBU.EQ.'F' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,N+M*NB,7),
+*> where NB is the optimal block size for DGEQP3, DGEQRF, DORMQR.
+*> In general, the optimal length LWORK is computed as
+*> LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DPOCON),
+*> 2*N+LWORK(DGEQRF), N+LWORK(DORMQR)).
+*> Here LWORK(DORMQR) equals N*NB (for JOBU.EQ.'U') or
+*> M*NB (for JOBU.EQ.'F').
+*>
+*> If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and
+*> -> if JOBV.EQ.'V'
+*> the minimal requirement is LWORK >= max(2*M+N,6*N+2*N*N).
+*> -> if JOBV.EQ.'J' the minimal requirement is
+*> LWORK >= max(2*M+N, 4*N+N*N,2*N+N*N+6).
+*> -> For optimal performance, LWORK should be additionally
+*> larger than N+M*NB, where NB is the optimal block size
+*> for DORMQR.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension M+3*N.
+*> On exit,
+*> IWORK(1) = the numerical rank determined after the initial
+*> QR factorization with pivoting. See the descriptions
+*> of JOBA and JOBR.
+*> IWORK(2) = the number of the computed nonzero singular values
+*> IWORK(3) = if nonzero, a warning message:
+*> If IWORK(3).EQ.1 then some of the column norms of A
+*> were denormalized floats. The requested high accuracy
+*> is not warranted by the data.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0 : if INFO = -i, then the i-th argument had an illegal value.
+*> = 0 : successfull exit;
+*> > 0 : SGEJSV did not converge in the maximal allowed number
+*> of sweeps. The computed values may be inaccurate.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> SGEJSV implements a preconditioned Jacobi SVD algorithm. It uses SGEQP3,
+*> SGEQRF, and SGELQF as preprocessors and preconditioners. Optionally, an
+*> additional row pivoting can be used as a preprocessor, which in some
+*> cases results in much higher accuracy. An example is matrix A with the
+*> structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
+*> diagonal matrices and C is well-conditioned matrix. In that case, complete
+*> pivoting in the first QR factorizations provides accuracy dependent on the
+*> condition number of C, and independent of D1, D2. Such higher accuracy is
+*> not completely understood theoretically, but it works well in practice.
+*> Further, if A can be written as A = B*D, with well-conditioned B and some
+*> diagonal D, then the high accuracy is guaranteed, both theoretically and
+*> in software, independent of D. For more details see [1], [2].
+*> The computational range for the singular values can be the full range
+*> ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
+*> & LAPACK routines called by SGEJSV are implemented to work in that range.
+*> If that is not the case, then the restriction for safe computation with
+*> the singular values in the range of normalized IEEE numbers is that the
+*> spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
+*> overflow. This code (SGEJSV) is best used in this restricted range,
+*> meaning that singular values of magnitude below ||A||_2 / SLAMCH('O') are
+*> returned as zeros. See JOBR for details on this.
+*> Further, this implementation is somewhat slower than the one described
+*> in [1,2] due to replacement of some non-LAPACK components, and because
+*> the choice of some tuning parameters in the iterative part (SGESVJ) is
+*> left to the implementer on a particular machine.
+*> The rank revealing QR factorization (in this code: SGEQP3) should be
+*> implemented as in [3]. We have a new version of SGEQP3 under development
+*> that is more robust than the current one in LAPACK, with a cleaner cut in
+*> rank defficient cases. It will be available in the SIGMA library [4].
+*> If M is much larger than N, it is obvious that the inital QRF with
+*> column pivoting can be preprocessed by the QRF without pivoting. That
+*> well known trick is not used in SGEJSV because in some cases heavy row
+*> weighting can be treated with complete pivoting. The overhead in cases
+*> M much larger than N is then only due to pivoting, but the benefits in
+*> terms of accuracy have prevailed. The implementer/user can incorporate
+*> this extra QRF step easily. The implementer can also improve data movement
+*> (matrix transpose, matrix copy, matrix transposed copy) - this
+*> implementation of SGEJSV uses only the simplest, naive data movement.
+*>
+*> Contributors
+*>
+*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
+*>
+*> References
+*>
+*> [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
+*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
+*> LAPACK Working note 169.
+*> [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
+*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
+*> LAPACK Working note 170.
+*> [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
+*> factorization software - a case study.
+*> ACM Trans. math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
+*> LAPACK Working note 176.
+*> [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
+*> QSVD, (H,K)-SVD computations.
+*> Department of Mathematics, University of Zagreb, 2008.
+*>
+*> Bugs, examples and comments
+*>
+*> Please report all bugs and send interesting examples and/or comments to
+*> drmac@math.hr. Thank you.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
$ M, N, A, LDA, SVA, U, LDU, V, LDV,
$ WORK, LWORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Zlatko Drmac of the University of Zagreb and --
-* -- Kresimir Veselic of the Fernuniversitaet Hagen --
-* -- April 2011 --
-*
+* -- LAPACK computational routine (version 1.23, October 23. 2008.) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* This routine is also part of SIGMA (version 1.23, October 23. 2008.)
-* SIGMA is a library of algorithms for highly accurate algorithms for
-* computation of SVD, PSVD, QSVD, (H,K)-SVD, and for solution of the
-* eigenvalue problems Hx = lambda M x, H M x = lambda x with H, M > 0.
+* November 2011
*
* .. Scalar Arguments ..
IMPLICIT NONE
@@ -27,360 +484,6 @@
CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
* ..
*
-* Purpose
-* =======
-*
-* SGEJSV computes the singular value decomposition (SVD) of a real M-by-N
-* matrix [A], where M >= N. The SVD of [A] is written as
-*
-* [A] = [U] * [SIGMA] * [V]^t,
-*
-* where [SIGMA] is an N-by-N (M-by-N) matrix which is zero except for its N
-* diagonal elements, [U] is an M-by-N (or M-by-M) orthonormal matrix, and
-* [V] is an N-by-N orthogonal matrix. The diagonal elements of [SIGMA] are
-* the singular values of [A]. The columns of [U] and [V] are the left and
-* the right singular vectors of [A], respectively. The matrices [U] and [V]
-* are computed and stored in the arrays U and V, respectively. The diagonal
-* of [SIGMA] is computed and stored in the array SVA.
-*
-* Arguments
-* =========
-*
-* JOBA (input) CHARACTER*1
-* Specifies the level of accuracy:
-* = 'C': This option works well (high relative accuracy) if A = B * D,
-* with well-conditioned B and arbitrary diagonal matrix D.
-* The accuracy cannot be spoiled by COLUMN scaling. The
-* accuracy of the computed output depends on the condition of
-* B, and the procedure aims at the best theoretical accuracy.
-* The relative error max_{i=1:N}|d sigma_i| / sigma_i is
-* bounded by f(M,N)*epsilon* cond(B), independent of D.
-* The input matrix is preprocessed with the QRF with column
-* pivoting. This initial preprocessing and preconditioning by
-* a rank revealing QR factorization is common for all values of
-* JOBA. Additional actions are specified as follows:
-* = 'E': Computation as with 'C' with an additional estimate of the
-* condition number of B. It provides a realistic error bound.
-* = 'F': If A = D1 * C * D2 with ill-conditioned diagonal scalings
-* D1, D2, and well-conditioned matrix C, this option gives
-* higher accuracy than the 'C' option. If the structure of the
-* input matrix is not known, and relative accuracy is
-* desirable, then this option is advisable. The input matrix A
-* is preprocessed with QR factorization with FULL (row and
-* column) pivoting.
-* = 'G' Computation as with 'F' with an additional estimate of the
-* condition number of B, where A=D*B. If A has heavily weighted
-* rows, then using this condition number gives too pessimistic
-* error bound.
-* = 'A': Small singular values are the noise and the matrix is treated
-* as numerically rank defficient. The error in the computed
-* singular values is bounded by f(m,n)*epsilon*||A||.
-* The computed SVD A = U * S * V^t restores A up to
-* f(m,n)*epsilon*||A||.
-* This gives the procedure the licence to discard (set to zero)
-* all singular values below N*epsilon*||A||.
-* = 'R': Similar as in 'A'. Rank revealing property of the initial
-* QR factorization is used do reveal (using triangular factor)
-* a gap sigma_{r+1} < epsilon * sigma_r in which case the
-* numerical RANK is declared to be r. The SVD is computed with
-* absolute error bounds, but more accurately than with 'A'.
-*
-* JOBU (input) CHARACTER*1
-* Specifies whether to compute the columns of U:
-* = 'U': N columns of U are returned in the array U.
-* = 'F': full set of M left sing. vectors is returned in the array U.
-* = 'W': U may be used as workspace of length M*N. See the description
-* of U.
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* Specifies whether to compute the matrix V:
-* = 'V': N columns of V are returned in the array V; Jacobi rotations
-* are not explicitly accumulated.
-* = 'J': N columns of V are returned in the array V, but they are
-* computed as the product of Jacobi rotations. This option is
-* allowed only if JOBU .NE. 'N', i.e. in computing the full SVD.
-* = 'W': V may be used as workspace of length N*N. See the description
-* of V.
-* = 'N': V is not computed.
-*
-* JOBR (input) CHARACTER*1
-* Specifies the RANGE for the singular values. Issues the licence to
-* set to zero small positive singular values if they are outside
-* specified range. If A .NE. 0 is scaled so that the largest singular
-* value of c*A is around SQRT(BIG), BIG=SLAMCH('O'), then JOBR issues
-* the licence to kill columns of A whose norm in c*A is less than
-* SQRT(SFMIN) (for JOBR.EQ.'R'), or less than SMALL=SFMIN/EPSLN,
-* where SFMIN=SLAMCH('S'), EPSLN=SLAMCH('E').
-* = 'N': Do not kill small columns of c*A. This option assumes that
-* BLAS and QR factorizations and triangular solvers are
-* implemented to work in that range. If the condition of A
-* is greater than BIG, use SGESVJ.
-* = 'R': RESTRICTED range for sigma(c*A) is [SQRT(SFMIN), SQRT(BIG)]
-* (roughly, as described above). This option is recommended.
-* ===========================
-* For computing the singular values in the FULL range [SFMIN,BIG]
-* use SGESVJ.
-*
-* JOBT (input) CHARACTER*1
-* If the matrix is square then the procedure may determine to use
-* transposed A if A^t seems to be better with respect to convergence.
-* If the matrix is not square, JOBT is ignored. This is subject to
-* changes in the future.
-* The decision is based on two values of entropy over the adjoint
-* orbit of A^t * A. See the descriptions of WORK(6) and WORK(7).
-* = 'T': transpose if entropy test indicates possibly faster
-* convergence of Jacobi process if A^t is taken as input. If A is
-* replaced with A^t, then the row pivoting is included automatically.
-* = 'N': do not speculate.
-* This option can be used to compute only the singular values, or the
-* full SVD (U, SIGMA and V). For only one set of singular vectors
-* (U or V), the caller should provide both U and V, as one of the
-* matrices is used as workspace if the matrix A is transposed.
-* The implementer can easily remove this constraint and make the
-* code more complicated. See the descriptions of U and V.
-*
-* JOBP (input) CHARACTER*1
-* Issues the licence to introduce structured perturbations to drown
-* denormalized numbers. This licence should be active if the
-* denormals are poorly implemented, causing slow computation,
-* especially in cases of fast convergence (!). For details see [1,2].
-* For the sake of simplicity, this perturbations are included only
-* when the full SVD or only the singular values are requested. The
-* implementer/user can easily add the perturbation for the cases of
-* computing one set of singular vectors.
-* = 'P': introduce perturbation
-* = 'N': do not perturb
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. M >= N >= 0.
-*
-* A (input/workspace) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* SVA (workspace/output) REAL array, dimension (N)
-* On exit,
-* - For WORK(1)/WORK(2) = ONE: The singular values of A. During the
-* computation SVA contains Euclidean column norms of the
-* iterated matrices in the array A.
-* - For WORK(1) .NE. WORK(2): The singular values of A are
-* (WORK(1)/WORK(2)) * SVA(1:N). This factored form is used if
-* sigma_max(A) overflows or if small singular values have been
-* saved from underflow by scaling the input matrix A.
-* - If JOBR='R' then some of the singular values may be returned
-* as exact zeros obtained by "set to zero" because they are
-* below the numerical rank threshold or are denormalized numbers.
-*
-* U (workspace/output) REAL array, dimension ( LDU, N )
-* If JOBU = 'U', then U contains on exit the M-by-N matrix of
-* the left singular vectors.
-* If JOBU = 'F', then U contains on exit the M-by-M matrix of
-* the left singular vectors, including an ONB
-* of the orthogonal complement of the Range(A).
-* If JOBU = 'W' .AND. (JOBV.EQ.'V' .AND. JOBT.EQ.'T' .AND. M.EQ.N),
-* then U is used as workspace if the procedure
-* replaces A with A^t. In that case, [V] is computed
-* in U as left singular vectors of A^t and then
-* copied back to the V array. This 'W' option is just
-* a reminder to the caller that in this case U is
-* reserved as workspace of length N*N.
-* If JOBU = 'N' U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U, LDU >= 1.
-* IF JOBU = 'U' or 'F' or 'W', then LDU >= M.
-*
-* V (workspace/output) REAL array, dimension ( LDV, N )
-* If JOBV = 'V', 'J' then V contains on exit the N-by-N matrix of
-* the right singular vectors;
-* If JOBV = 'W', AND (JOBU.EQ.'U' AND JOBT.EQ.'T' AND M.EQ.N),
-* then V is used as workspace if the pprocedure
-* replaces A with A^t. In that case, [U] is computed
-* in V as right singular vectors of A^t and then
-* copied back to the U array. This 'W' option is just
-* a reminder to the caller that in this case V is
-* reserved as workspace of length N*N.
-* If JOBV = 'N' V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V, LDV >= 1.
-* If JOBV = 'V' or 'J' or 'W', then LDV >= N.
-*
-* WORK (workspace/output) REAL array, dimension at least LWORK.
-* On exit,
-* WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such
-* that SCALE*SVA(1:N) are the computed singular values
-* of A. (See the description of SVA().)
-* WORK(2) = See the description of WORK(1).
-* WORK(3) = SCONDA is an estimate for the condition number of
-* column equilibrated A. (If JOBA .EQ. 'E' or 'G')
-* SCONDA is an estimate of SQRT(||(R^t * R)^(-1)||_1).
-* It is computed using SPOCON. It holds
-* N^(-1/4) * SCONDA <= ||R^(-1)||_2 <= N^(1/4) * SCONDA
-* where R is the triangular factor from the QRF of A.
-* However, if R is truncated and the numerical rank is
-* determined to be strictly smaller than N, SCONDA is
-* returned as -1, thus indicating that the smallest
-* singular values might be lost.
-*
-* If full SVD is needed, the following two condition numbers are
-* useful for the analysis of the algorithm. They are provied for
-* a developer/implementer who is familiar with the details of
-* the method.
-*
-* WORK(4) = an estimate of the scaled condition number of the
-* triangular factor in the first QR factorization.
-* WORK(5) = an estimate of the scaled condition number of the
-* triangular factor in the second QR factorization.
-* The following two parameters are computed if JOBT .EQ. 'T'.
-* They are provided for a developer/implementer who is familiar
-* with the details of the method.
-*
-* WORK(6) = the entropy of A^t*A :: this is the Shannon entropy
-* of diag(A^t*A) / Trace(A^t*A) taken as point in the
-* probability simplex.
-* WORK(7) = the entropy of A*A^t.
-*
-* LWORK (input) INTEGER
-* Length of WORK to confirm proper allocation of work space.
-* LWORK depends on the job:
-*
-* If only SIGMA is needed ( JOBU.EQ.'N', JOBV.EQ.'N' ) and
-* -> .. no scaled condition estimate required (JOBE.EQ.'N'):
-* LWORK >= max(2*M+N,4*N+1,7). This is the minimal requirement.
-* ->> For optimal performance (blocked code) the optimal value
-* is LWORK >= max(2*M+N,3*N+(N+1)*NB,7). Here NB is the optimal
-* block size for DGEQP3 and DGEQRF.
-* In general, optimal LWORK is computed as
-* LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF), 7).
-* -> .. an estimate of the scaled condition number of A is
-* required (JOBA='E', 'G'). In this case, LWORK is the maximum
-* of the above and N*N+4*N, i.e. LWORK >= max(2*M+N,N*N+4*N,7).
-* ->> For optimal performance (blocked code) the optimal value
-* is LWORK >= max(2*M+N,3*N+(N+1)*NB, N*N+4*N, 7).
-* In general, the optimal length LWORK is computed as
-* LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF),
-* N+N*N+LWORK(DPOCON),7).
-*
-* If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),
-* -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
-* -> For optimal performance, LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
-* where NB is the optimal block size for DGEQP3, DGEQRF, DGELQ,
-* DORMLQ. In general, the optimal length LWORK is computed as
-* LWORK >= max(2*M+N,N+LWORK(DGEQP3), N+LWORK(DPOCON),
-* N+LWORK(DGELQ), 2*N+LWORK(DGEQRF), N+LWORK(DORMLQ)).
-*
-* If SIGMA and the left singular vectors are needed
-* -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
-* -> For optimal performance:
-* if JOBU.EQ.'U' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
-* if JOBU.EQ.'F' :: LWORK >= max(2*M+N,3*N+(N+1)*NB,N+M*NB,7),
-* where NB is the optimal block size for DGEQP3, DGEQRF, DORMQR.
-* In general, the optimal length LWORK is computed as
-* LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DPOCON),
-* 2*N+LWORK(DGEQRF), N+LWORK(DORMQR)).
-* Here LWORK(DORMQR) equals N*NB (for JOBU.EQ.'U') or
-* M*NB (for JOBU.EQ.'F').
-*
-* If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and
-* -> if JOBV.EQ.'V'
-* the minimal requirement is LWORK >= max(2*M+N,6*N+2*N*N).
-* -> if JOBV.EQ.'J' the minimal requirement is
-* LWORK >= max(2*M+N, 4*N+N*N,2*N+N*N+6).
-* -> For optimal performance, LWORK should be additionally
-* larger than N+M*NB, where NB is the optimal block size
-* for DORMQR.
-*
-* IWORK (workspace/output) INTEGER array, dimension M+3*N.
-* On exit,
-* IWORK(1) = the numerical rank determined after the initial
-* QR factorization with pivoting. See the descriptions
-* of JOBA and JOBR.
-* IWORK(2) = the number of the computed nonzero singular values
-* IWORK(3) = if nonzero, a warning message:
-* If IWORK(3).EQ.1 then some of the column norms of A
-* were denormalized floats. The requested high accuracy
-* is not warranted by the data.
-*
-* INFO (output) INTEGER
-* < 0 : if INFO = -i, then the i-th argument had an illegal value.
-* = 0 : successfull exit;
-* > 0 : SGEJSV did not converge in the maximal allowed number
-* of sweeps. The computed values may be inaccurate.
-*
-* Further Details
-* ===============
-*
-* SGEJSV implements a preconditioned Jacobi SVD algorithm. It uses SGEQP3,
-* SGEQRF, and SGELQF as preprocessors and preconditioners. Optionally, an
-* additional row pivoting can be used as a preprocessor, which in some
-* cases results in much higher accuracy. An example is matrix A with the
-* structure A = D1 * C * D2, where D1, D2 are arbitrarily ill-conditioned
-* diagonal matrices and C is well-conditioned matrix. In that case, complete
-* pivoting in the first QR factorizations provides accuracy dependent on the
-* condition number of C, and independent of D1, D2. Such higher accuracy is
-* not completely understood theoretically, but it works well in practice.
-* Further, if A can be written as A = B*D, with well-conditioned B and some
-* diagonal D, then the high accuracy is guaranteed, both theoretically and
-* in software, independent of D. For more details see [1], [2].
-* The computational range for the singular values can be the full range
-* ( UNDERFLOW,OVERFLOW ), provided that the machine arithmetic and the BLAS
-* & LAPACK routines called by SGEJSV are implemented to work in that range.
-* If that is not the case, then the restriction for safe computation with
-* the singular values in the range of normalized IEEE numbers is that the
-* spectral condition number kappa(A)=sigma_max(A)/sigma_min(A) does not
-* overflow. This code (SGEJSV) is best used in this restricted range,
-* meaning that singular values of magnitude below ||A||_2 / SLAMCH('O') are
-* returned as zeros. See JOBR for details on this.
-* Further, this implementation is somewhat slower than the one described
-* in [1,2] due to replacement of some non-LAPACK components, and because
-* the choice of some tuning parameters in the iterative part (SGESVJ) is
-* left to the implementer on a particular machine.
-* The rank revealing QR factorization (in this code: SGEQP3) should be
-* implemented as in [3]. We have a new version of SGEQP3 under development
-* that is more robust than the current one in LAPACK, with a cleaner cut in
-* rank defficient cases. It will be available in the SIGMA library [4].
-* If M is much larger than N, it is obvious that the inital QRF with
-* column pivoting can be preprocessed by the QRF without pivoting. That
-* well known trick is not used in SGEJSV because in some cases heavy row
-* weighting can be treated with complete pivoting. The overhead in cases
-* M much larger than N is then only due to pivoting, but the benefits in
-* terms of accuracy have prevailed. The implementer/user can incorporate
-* this extra QRF step easily. The implementer can also improve data movement
-* (matrix transpose, matrix copy, matrix transposed copy) - this
-* implementation of SGEJSV uses only the simplest, naive data movement.
-*
-* Contributors
-*
-* Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-* References
-*
-* [1] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
-* SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
-* LAPACK Working note 169.
-* [2] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
-* SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
-* LAPACK Working note 170.
-* [3] Z. Drmac and Z. Bujanovic: On the failure of rank-revealing QR
-* factorization software - a case study.
-* ACM Trans. math. Softw. Vol. 35, No 2 (2008), pp. 1-28.
-* LAPACK Working note 176.
-* [4] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
-* QSVD, (H,K)-SVD computations.
-* Department of Mathematics, University of Zagreb, 2008.
-*
-* Bugs, examples and comments
-*
-* Please report all bugs and send interesting examples and/or comments to
-* drmac@math.hr. Thank you.
-*
* ===========================================================================
*
* .. Local Parameters ..
diff --git a/SRC/sgelq2.f b/SRC/sgelq2.f
index cf227861..1327b465 100644
--- a/SRC/sgelq2.f
+++ b/SRC/sgelq2.f
@@ -1,67 +1,110 @@
- SUBROUTINE SGELQ2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b SGELQ2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGELQ2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGELQ2 computes an LQ factorization of a real m by n matrix A:
-* A = L * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGELQ2 computes an LQ factorization of a real m by n matrix A:
+*> A = L * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and below the diagonal of the array
-* contain the m by min(m,n) lower trapezoidal matrix L (L is
-* lower triangular if m <= n); the elements above the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (M)
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) REAL array, dimension (M)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGELQ2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgelqf.f b/SRC/sgelqf.f
index 0a6f3928..8bad2859 100644
--- a/SRC/sgelqf.f
+++ b/SRC/sgelqf.f
@@ -1,78 +1,121 @@
- SUBROUTINE SGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SGELQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGELQF computes an LQ factorization of a real M-by-N matrix A:
-* A = L * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGELQF computes an LQ factorization of a real M-by-N matrix A:
+*> A = L * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and below the diagonal of the array
-* contain the m-by-min(m,n) lower trapezoidal matrix L (L is
-* lower triangular if m <= n); the elements above the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgels.f b/SRC/sgels.f
index 4aaeea63..46b3dbd0 100644
--- a/SRC/sgels.f
+++ b/SRC/sgels.f
@@ -1,10 +1,185 @@
+*> \brief <b> SGELS solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGELS solves overdetermined or underdetermined real linear systems
+*> involving an M-by-N matrix A, or its transpose, using a QR or LQ
+*> factorization of A. It is assumed that A has full rank.
+*>
+*> The following options are provided:
+*>
+*> 1. If TRANS = 'N' and m >= n: find the least squares solution of
+*> an overdetermined system, i.e., solve the least squares problem
+*> minimize || B - A*X ||.
+*>
+*> 2. If TRANS = 'N' and m < n: find the minimum norm solution of
+*> an underdetermined system A * X = B.
+*>
+*> 3. If TRANS = 'T' and m >= n: find the minimum norm solution of
+*> an undetermined system A**T * X = B.
+*>
+*> 4. If TRANS = 'T' and m < n: find the least squares solution of
+*> an overdetermined system, i.e., solve the least squares problem
+*> minimize || B - A**T * X ||.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': the linear system involves A;
+*> = 'T': the linear system involves A**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of the matrices B and X. NRHS >=0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if M >= N, A is overwritten by details of its QR
+*> factorization as returned by SGEQRF;
+*> if M < N, A is overwritten by details of its LQ
+*> factorization as returned by SGELQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the matrix B of right hand side vectors, stored
+*> columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
+*> if TRANS = 'T'.
+*> On exit, if INFO = 0, B is overwritten by the solution
+*> vectors, stored columnwise:
+*> if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
+*> squares solution vectors; the residual sum of squares for the
+*> solution in each column is given by the sum of squares of
+*> elements N+1 to M in that column;
+*> if TRANS = 'N' and m < n, rows 1 to N of B contain the
+*> minimum norm solution vectors;
+*> if TRANS = 'T' and m >= n, rows 1 to M of B contain the
+*> minimum norm solution vectors;
+*> if TRANS = 'T' and m < n, rows 1 to M of B contain the
+*> least squares solution vectors; the residual sum of squares
+*> for the solution in each column is given by the sum of
+*> squares of elements M+1 to N in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= MAX(1,M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= max( 1, MN + max( MN, NRHS ) ).
+*> For optimal performance,
+*> LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
+*> where MN = min(M,N) and NB is the optimum block size.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of the
+*> triangular factor of A is zero, so that A does not have
+*> full rank; the least squares solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsolve
+*
+* =====================================================================
SUBROUTINE SGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -14,107 +189,6 @@
REAL A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGELS solves overdetermined or underdetermined real linear systems
-* involving an M-by-N matrix A, or its transpose, using a QR or LQ
-* factorization of A. It is assumed that A has full rank.
-*
-* The following options are provided:
-*
-* 1. If TRANS = 'N' and m >= n: find the least squares solution of
-* an overdetermined system, i.e., solve the least squares problem
-* minimize || B - A*X ||.
-*
-* 2. If TRANS = 'N' and m < n: find the minimum norm solution of
-* an underdetermined system A * X = B.
-*
-* 3. If TRANS = 'T' and m >= n: find the minimum norm solution of
-* an undetermined system A**T * X = B.
-*
-* 4. If TRANS = 'T' and m < n: find the least squares solution of
-* an overdetermined system, i.e., solve the least squares problem
-* minimize || B - A**T * X ||.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N': the linear system involves A;
-* = 'T': the linear system involves A**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of the matrices B and X. NRHS >=0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if M >= N, A is overwritten by details of its QR
-* factorization as returned by SGEQRF;
-* if M < N, A is overwritten by details of its LQ
-* factorization as returned by SGELQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the matrix B of right hand side vectors, stored
-* columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
-* if TRANS = 'T'.
-* On exit, if INFO = 0, B is overwritten by the solution
-* vectors, stored columnwise:
-* if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
-* squares solution vectors; the residual sum of squares for the
-* solution in each column is given by the sum of squares of
-* elements N+1 to M in that column;
-* if TRANS = 'N' and m < n, rows 1 to N of B contain the
-* minimum norm solution vectors;
-* if TRANS = 'T' and m >= n, rows 1 to M of B contain the
-* minimum norm solution vectors;
-* if TRANS = 'T' and m < n, rows 1 to M of B contain the
-* least squares solution vectors; the residual sum of squares
-* for the solution in each column is given by the sum of
-* squares of elements M+1 to N in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= MAX(1,M,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= max( 1, MN + max( MN, NRHS ) ).
-* For optimal performance,
-* LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
-* where MN = min(M,N) and NB is the optimum block size.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of the
-* triangular factor of A is zero, so that A does not have
-* full rank; the least squares solution could not be
-* computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgelsd.f b/SRC/sgelsd.f
index 4c166ee0..f609f206 100644
--- a/SRC/sgelsd.f
+++ b/SRC/sgelsd.f
@@ -1,10 +1,218 @@
+*> \brief <b> SGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND,
+* RANK, WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGELSD computes the minimum-norm solution to a real linear least
+*> squares problem:
+*> minimize 2-norm(| b - A*x |)
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The problem is solved in three steps:
+*> (1) Reduce the coefficient matrix A to bidiagonal form with
+*> Householder transformations, reducing the original problem
+*> into a "bidiagonal least squares problem" (BLS)
+*> (2) Solve the BLS using a divide and conquer approach.
+*> (3) Apply back all the Householder tranformations to solve
+*> the original least squares problem.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, B is overwritten by the N-by-NRHS solution
+*> matrix X. If m >= n and RANK = n, the residual
+*> sum-of-squares for the solution in the i-th column is given
+*> by the sum of squares of elements n+1:m in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,max(M,N)).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of A in decreasing order.
+*> The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> RCOND is used to determine the effective rank of A.
+*> Singular values S(i) <= RCOND*S(1) are treated as zero.
+*> If RCOND < 0, machine precision is used instead.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the number of singular values
+*> which are greater than RCOND*S(1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK must be at least 1.
+*> The exact minimum amount of workspace needed depends on M,
+*> N and NRHS. As long as LWORK is at least
+*> 12*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2,
+*> if M is greater than or equal to N or
+*> 12*M + 2*M*SMLSIZ + 8*M*NLVL + M*NRHS + (SMLSIZ+1)**2,
+*> if M is less than N, the code will execute correctly.
+*> SMLSIZ is returned by ILAENV and is equal to the maximum
+*> size of the subproblems at the bottom of the computation
+*> tree (usually about 25), and
+*> NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the array WORK and the
+*> minimum size of the array IWORK, and returns these values as
+*> the first entries of the WORK and IWORK arrays, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),
+*> where MINMN = MIN( M,N ).
+*> On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the algorithm for computing the SVD failed to converge;
+*> if INFO = i, i off-diagonal elements of an intermediate
+*> bidiagonal form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND,
$ RANK, WORK, LWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -15,125 +223,6 @@
REAL A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGELSD computes the minimum-norm solution to a real linear least
-* squares problem:
-* minimize 2-norm(| b - A*x |)
-* using the singular value decomposition (SVD) of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The problem is solved in three steps:
-* (1) Reduce the coefficient matrix A to bidiagonal form with
-* Householder transformations, reducing the original problem
-* into a "bidiagonal least squares problem" (BLS)
-* (2) Solve the BLS using a divide and conquer approach.
-* (3) Apply back all the Householder tranformations to solve
-* the original least squares problem.
-*
-* The effective rank of A is determined by treating as zero those
-* singular values which are less than RCOND times the largest singular
-* value.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, B is overwritten by the N-by-NRHS solution
-* matrix X. If m >= n and RANK = n, the residual
-* sum-of-squares for the solution in the i-th column is given
-* by the sum of squares of elements n+1:m in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,max(M,N)).
-*
-* S (output) REAL array, dimension (min(M,N))
-* The singular values of A in decreasing order.
-* The condition number of A in the 2-norm = S(1)/S(min(m,n)).
-*
-* RCOND (input) REAL
-* RCOND is used to determine the effective rank of A.
-* Singular values S(i) <= RCOND*S(1) are treated as zero.
-* If RCOND < 0, machine precision is used instead.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the number of singular values
-* which are greater than RCOND*S(1).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK must be at least 1.
-* The exact minimum amount of workspace needed depends on M,
-* N and NRHS. As long as LWORK is at least
-* 12*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2,
-* if M is greater than or equal to N or
-* 12*M + 2*M*SMLSIZ + 8*M*NLVL + M*NRHS + (SMLSIZ+1)**2,
-* if M is less than N, the code will execute correctly.
-* SMLSIZ is returned by ILAENV and is equal to the maximum
-* size of the subproblems at the bottom of the computation
-* tree (usually about 25), and
-* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the array WORK and the
-* minimum size of the array IWORK, and returns these values as
-* the first entries of the WORK and IWORK arrays, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
-* LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),
-* where MINMN = MIN( M,N ).
-* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the algorithm for computing the SVD failed to converge;
-* if INFO = i, i off-diagonal elements of an intermediate
-* bidiagonal form did not converge to zero.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgelss.f b/SRC/sgelss.f
index 4a753cf5..69e4dc95 100644
--- a/SRC/sgelss.f
+++ b/SRC/sgelss.f
@@ -1,10 +1,174 @@
+*> \brief <b> SGELSS solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGELSS computes the minimum norm solution to a real linear least
+*> squares problem:
+*>
+*> Minimize 2-norm(| b - A*x |).
+*>
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix
+*> X.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the first min(m,n) rows of A are overwritten with
+*> its right singular vectors, stored rowwise.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, B is overwritten by the N-by-NRHS solution
+*> matrix X. If m >= n and RANK = n, the residual
+*> sum-of-squares for the solution in the i-th column is given
+*> by the sum of squares of elements n+1:m in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,max(M,N)).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of A in decreasing order.
+*> The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> RCOND is used to determine the effective rank of A.
+*> Singular values S(i) <= RCOND*S(1) are treated as zero.
+*> If RCOND < 0, machine precision is used instead.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the number of singular values
+*> which are greater than RCOND*S(1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1, and also:
+*> LWORK >= 3*min(M,N) + max( 2*min(M,N), max(M,N), NRHS )
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the algorithm for computing the SVD failed to converge;
+*> if INFO = i, i off-diagonal elements of an intermediate
+*> bidiagonal form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsolve
+*
+* =====================================================================
SUBROUTINE SGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -14,90 +178,6 @@
REAL A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGELSS computes the minimum norm solution to a real linear least
-* squares problem:
-*
-* Minimize 2-norm(| b - A*x |).
-*
-* using the singular value decomposition (SVD) of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix
-* X.
-*
-* The effective rank of A is determined by treating as zero those
-* singular values which are less than RCOND times the largest singular
-* value.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the first min(m,n) rows of A are overwritten with
-* its right singular vectors, stored rowwise.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, B is overwritten by the N-by-NRHS solution
-* matrix X. If m >= n and RANK = n, the residual
-* sum-of-squares for the solution in the i-th column is given
-* by the sum of squares of elements n+1:m in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,max(M,N)).
-*
-* S (output) REAL array, dimension (min(M,N))
-* The singular values of A in decreasing order.
-* The condition number of A in the 2-norm = S(1)/S(min(m,n)).
-*
-* RCOND (input) REAL
-* RCOND is used to determine the effective rank of A.
-* Singular values S(i) <= RCOND*S(1) are treated as zero.
-* If RCOND < 0, machine precision is used instead.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the number of singular values
-* which are greater than RCOND*S(1).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1, and also:
-* LWORK >= 3*min(M,N) + max( 2*min(M,N), max(M,N), NRHS )
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the algorithm for computing the SVD failed to converge;
-* if INFO = i, i off-diagonal elements of an intermediate
-* bidiagonal form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgelsx.f b/SRC/sgelsx.f
index b0a18c0a..6d887434 100644
--- a/SRC/sgelsx.f
+++ b/SRC/sgelsx.f
@@ -1,10 +1,179 @@
+*> \brief <b> SGELSX solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine SGELSY.
+*>
+*> SGELSX computes the minimum-norm solution to a real linear least
+*> squares problem:
+*> minimize || A * X - B ||
+*> using a complete orthogonal factorization of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The routine first computes a QR factorization with column pivoting:
+*> A * P = Q * [ R11 R12 ]
+*> [ 0 R22 ]
+*> with R11 defined as the largest leading submatrix whose estimated
+*> condition number is less than 1/RCOND. The order of R11, RANK,
+*> is the effective rank of A.
+*>
+*> Then, R22 is considered to be negligible, and R12 is annihilated
+*> by orthogonal transformations from the right, arriving at the
+*> complete orthogonal factorization:
+*> A * P = Q * [ T11 0 ] * Z
+*> [ 0 0 ]
+*> The minimum-norm solution is then
+*> X = P * Z**T [ inv(T11)*Q1**T*B ]
+*> [ 0 ]
+*> where Q1 consists of the first RANK columns of Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been overwritten by details of its
+*> complete orthogonal factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, the N-by-NRHS solution matrix X.
+*> If m >= n and RANK = n, the residual sum-of-squares for
+*> the solution in the i-th column is given by the sum of
+*> squares of elements N+1:M in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is an
+*> initial column, otherwise it is a free column. Before
+*> the QR factorization of A, all initial columns are
+*> permuted to the leading positions; only the remaining
+*> free columns are moved as a result of column pivoting
+*> during the factorization.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> RCOND is used to determine the effective rank of A, which
+*> is defined as the order of the largest leading triangular
+*> submatrix R11 in the QR factorization with pivoting of A,
+*> whose estimated condition number < 1/RCOND.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the order of the submatrix
+*> R11. This is the same as the order of the submatrix T11
+*> in the complete orthogonal factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (max( min(M,N)+3*N, 2*min(M,N)+NRHS )),
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsolve
+*
+* =====================================================================
SUBROUTINE SGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
@@ -15,98 +184,6 @@
REAL A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine SGELSY.
-*
-* SGELSX computes the minimum-norm solution to a real linear least
-* squares problem:
-* minimize || A * X - B ||
-* using a complete orthogonal factorization of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The routine first computes a QR factorization with column pivoting:
-* A * P = Q * [ R11 R12 ]
-* [ 0 R22 ]
-* with R11 defined as the largest leading submatrix whose estimated
-* condition number is less than 1/RCOND. The order of R11, RANK,
-* is the effective rank of A.
-*
-* Then, R22 is considered to be negligible, and R12 is annihilated
-* by orthogonal transformations from the right, arriving at the
-* complete orthogonal factorization:
-* A * P = Q * [ T11 0 ] * Z
-* [ 0 0 ]
-* The minimum-norm solution is then
-* X = P * Z**T [ inv(T11)*Q1**T*B ]
-* [ 0 ]
-* where Q1 consists of the first RANK columns of Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of matrices B and X. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been overwritten by details of its
-* complete orthogonal factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, the N-by-NRHS solution matrix X.
-* If m >= n and RANK = n, the residual sum-of-squares for
-* the solution in the i-th column is given by the sum of
-* squares of elements N+1:M in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is an
-* initial column, otherwise it is a free column. Before
-* the QR factorization of A, all initial columns are
-* permuted to the leading positions; only the remaining
-* free columns are moved as a result of column pivoting
-* during the factorization.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
-*
-* RCOND (input) REAL
-* RCOND is used to determine the effective rank of A, which
-* is defined as the order of the largest leading triangular
-* submatrix R11 in the QR factorization with pivoting of A,
-* whose estimated condition number < 1/RCOND.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the order of the submatrix
-* R11. This is the same as the order of the submatrix T11
-* in the complete orthogonal factorization of A.
-*
-* WORK (workspace) REAL array, dimension
-* (max( min(M,N)+3*N, 2*min(M,N)+NRHS )),
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgelsy.f b/SRC/sgelsy.f
index 0158ad88..75203fd6 100644
--- a/SRC/sgelsy.f
+++ b/SRC/sgelsy.f
@@ -1,10 +1,212 @@
+*> \brief <b> SGELSY solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGELSY computes the minimum-norm solution to a real linear least
+*> squares problem:
+*> minimize || A * X - B ||
+*> using a complete orthogonal factorization of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The routine first computes a QR factorization with column pivoting:
+*> A * P = Q * [ R11 R12 ]
+*> [ 0 R22 ]
+*> with R11 defined as the largest leading submatrix whose estimated
+*> condition number is less than 1/RCOND. The order of R11, RANK,
+*> is the effective rank of A.
+*>
+*> Then, R22 is considered to be negligible, and R12 is annihilated
+*> by orthogonal transformations from the right, arriving at the
+*> complete orthogonal factorization:
+*> A * P = Q * [ T11 0 ] * Z
+*> [ 0 0 ]
+*> The minimum-norm solution is then
+*> X = P * Z**T [ inv(T11)*Q1**T*B ]
+*> [ 0 ]
+*> where Q1 consists of the first RANK columns of Q.
+*>
+*> This routine is basically identical to the original xGELSX except
+*> three differences:
+*> o The call to the subroutine xGEQPF has been substituted by the
+*> the call to the subroutine xGEQP3. This subroutine is a Blas-3
+*> version of the QR factorization with column pivoting.
+*> o Matrix B (the right hand side) is updated with Blas-3.
+*> o The permutation of matrix B (the right hand side) is faster and
+*> more simple.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been overwritten by details of its
+*> complete orthogonal factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of AP, otherwise column i is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of AP
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> RCOND is used to determine the effective rank of A, which
+*> is defined as the order of the largest leading triangular
+*> submatrix R11 in the QR factorization with pivoting of A,
+*> whose estimated condition number < 1/RCOND.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the order of the submatrix
+*> R11. This is the same as the order of the submatrix T11
+*> in the complete orthogonal factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> The unblocked strategy requires that:
+*> LWORK >= MAX( MN+3*N+1, 2*MN+NRHS ),
+*> where MN = min( M, N ).
+*> The block algorithm requires that:
+*> LWORK >= MAX( MN+2*N+NB*(N+1), 2*MN+NB*NRHS ),
+*> where NB is an upper bound on the blocksize returned
+*> by ILAENV for the routines SGEQP3, STZRZF, STZRQF, SORMQR,
+*> and SORMRZ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: If INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*> E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -15,122 +217,6 @@
REAL A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGELSY computes the minimum-norm solution to a real linear least
-* squares problem:
-* minimize || A * X - B ||
-* using a complete orthogonal factorization of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The routine first computes a QR factorization with column pivoting:
-* A * P = Q * [ R11 R12 ]
-* [ 0 R22 ]
-* with R11 defined as the largest leading submatrix whose estimated
-* condition number is less than 1/RCOND. The order of R11, RANK,
-* is the effective rank of A.
-*
-* Then, R22 is considered to be negligible, and R12 is annihilated
-* by orthogonal transformations from the right, arriving at the
-* complete orthogonal factorization:
-* A * P = Q * [ T11 0 ] * Z
-* [ 0 0 ]
-* The minimum-norm solution is then
-* X = P * Z**T [ inv(T11)*Q1**T*B ]
-* [ 0 ]
-* where Q1 consists of the first RANK columns of Q.
-*
-* This routine is basically identical to the original xGELSX except
-* three differences:
-* o The call to the subroutine xGEQPF has been substituted by the
-* the call to the subroutine xGEQP3. This subroutine is a Blas-3
-* version of the QR factorization with column pivoting.
-* o Matrix B (the right hand side) is updated with Blas-3.
-* o The permutation of matrix B (the right hand side) is faster and
-* more simple.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of matrices B and X. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been overwritten by details of its
-* complete orthogonal factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of AP, otherwise column i is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of AP
-* was the k-th column of A.
-*
-* RCOND (input) REAL
-* RCOND is used to determine the effective rank of A, which
-* is defined as the order of the largest leading triangular
-* submatrix R11 in the QR factorization with pivoting of A,
-* whose estimated condition number < 1/RCOND.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the order of the submatrix
-* R11. This is the same as the order of the submatrix T11
-* in the complete orthogonal factorization of A.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* The unblocked strategy requires that:
-* LWORK >= MAX( MN+3*N+1, 2*MN+NRHS ),
-* where MN = min( M, N ).
-* The block algorithm requires that:
-* LWORK >= MAX( MN+2*N+NB*(N+1), 2*MN+NB*NRHS ),
-* where NB is an upper bound on the blocksize returned
-* by ILAENV for the routines SGEQP3, STZRZF, STZRQF, SORMQR,
-* and SORMRZ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: If INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-* E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgemqrt.f b/SRC/sgemqrt.f
index dd90d988..58622fda 100644
--- a/SRC/sgemqrt.f
+++ b/SRC/sgemqrt.f
@@ -1,96 +1,177 @@
- SUBROUTINE SGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
- $ C, LDC, WORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
-* ..
-* .. Array Arguments ..
- REAL V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
-* ..
-*
+*> \brief \b SGEMQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
+* C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
+* ..
+* .. Array Arguments ..
+* REAL V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEMQRT overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q C C Q
-* TRANS = 'T': Q**T C C Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of K
-* elementary reflectors:
-*
-* Q = H(1) H(2) . . . H(K) = I - V T V**T
-*
-* generated using the compact WY representation as returned by SGEQRT.
-*
-* Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEMQRT overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q C C Q
+*> TRANS = 'T': Q**T C C Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of K
+*> elementary reflectors:
+*>
+*> Q = H(1) H(2) . . . H(K) = I - V T V**T
+*>
+*> generated using the compact WY representation as returned by SGEQRT.
+*>
+*> Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* NB (input) INTEGER
-* The block size used for the storage of T. K >= NB >= 1.
-* This must be the same value of NB used to generate T
-* in CGEQRT.
-*
-* V (input) REAL array, dimension (LDV,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGEQRT in the first K columns of its array argument A.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The block size used for the storage of T. K >= NB >= 1.
+*> This must be the same value of NB used to generate T
+*> in CGEQRT.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGEQRT in the first K columns of its array argument A.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,K)
+*> The upper triangular factors of the block reflectors
+*> as returned by CGEQRT, stored as a NB-by-N matrix.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q C, Q**T C, C Q**T or C Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array. The dimension of WORK is
+*> N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (input) REAL array, dimension (LDT,K)
-* The upper triangular factors of the block reflectors
-* as returned by CGEQRT, stored as a NB-by-N matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q C, Q**T C, C Q**T or C Q.
+*> \ingroup realGEcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE SGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
+ $ C, LDC, WORK, INFO )
*
-* WORK (workspace/output) REAL array. The dimension of WORK is
-* N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
+* ..
+* .. Array Arguments ..
+ REAL V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeql2.f b/SRC/sgeql2.f
index e3d67cdc..854422a5 100644
--- a/SRC/sgeql2.f
+++ b/SRC/sgeql2.f
@@ -1,69 +1,110 @@
- SUBROUTINE SGEQL2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b SGEQL2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQL2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQL2 computes a QL factorization of a real m by n matrix A:
-* A = Q * L.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQL2 computes a QL factorization of a real m by n matrix A:
+*> A = Q * L.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, if m >= n, the lower triangle of the subarray
-* A(m-n+1:m,1:n) contains the n by n lower triangular matrix L;
-* if m <= n, the elements on and below the (n-m)-th
-* superdiagonal contain the m by n lower trapezoidal matrix L;
-* the remaining elements, with the array TAU, represent the
-* orthogonal matrix Q as a product of elementary reflectors
-* (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (N)
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) REAL array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
+*> A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQL2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
-* A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqlf.f b/SRC/sgeqlf.f
index b4d481b9..1a78e82e 100644
--- a/SRC/sgeqlf.f
+++ b/SRC/sgeqlf.f
@@ -1,81 +1,121 @@
- SUBROUTINE SGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SGEQLF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQLF computes a QL factorization of a real M-by-N matrix A:
-* A = Q * L.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQLF computes a QL factorization of a real M-by-N matrix A:
+*> A = Q * L.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if m >= n, the lower triangle of the subarray
-* A(m-n+1:m,1:n) contains the N-by-N lower triangular matrix L;
-* if m <= n, the elements on and below the (n-m)-th
-* superdiagonal contain the M-by-N lower trapezoidal matrix L;
-* the remaining elements, with the array TAU, represent the
-* orthogonal matrix Q as a product of elementary reflectors
-* (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
+*> A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
-* A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqp3.f b/SRC/sgeqp3.f
index c07a2c38..aec474b1 100644
--- a/SRC/sgeqp3.f
+++ b/SRC/sgeqp3.f
@@ -1,89 +1,161 @@
- SUBROUTINE SGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SGEQP3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQP3 computes a QR factorization with column pivoting of a
-* matrix A: A*P = Q*R using Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQP3 computes a QR factorization with column pivoting of a
+*> matrix A: A*P = Q*R using Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of the array contains the
-* min(M,N)-by-N upper trapezoidal matrix R; the elements below
-* the diagonal, together with the array TAU, represent the
-* orthogonal matrix Q as a product of min(M,N) elementary
-* reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(J).ne.0, the J-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(J)=0,
-* the J-th column of A is a free column.
-* On exit, if JPVT(J)=K, then the J-th column of A*P was the
-* the K-th column of A.
-*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of the array contains the
+*> min(M,N)-by-N upper trapezoidal matrix R; the elements below
+*> the diagonal, together with the array TAU, represent the
+*> orthogonal matrix Q as a product of min(M,N) elementary
+*> reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(J).ne.0, the J-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(J)=0,
+*> the J-th column of A is a free column.
+*> On exit, if JPVT(J)=K, then the J-th column of A*P was the
+*> the K-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 3*N+1.
+*> For optimal performance LWORK >= 2*N+( N+1 )*NB, where NB
+*> is the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 3*N+1.
-* For optimal performance LWORK >= 2*N+( N+1 )*NB, where NB
-* is the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real/complex scalar, and v is a real/complex vector
+*> with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
+*> A(i+1:m,i), and tau in TAU(i).
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real/complex scalar, and v is a real/complex vector
-* with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
-* A(i+1:m,i), and tau in TAU(i).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqpf.f b/SRC/sgeqpf.f
index 5fca2d0d..a8d89394 100644
--- a/SRC/sgeqpf.f
+++ b/SRC/sgeqpf.f
@@ -1,85 +1,153 @@
- SUBROUTINE SGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO )
-*
-* -- LAPACK deprecated computational routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SGEQPF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine SGEQP3.
-*
-* SGEQPF computes a QR factorization with column pivoting of a
-* real M-by-N matrix A: A*P = Q*R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine SGEQP3.
+*>
+*> SGEQPF computes a QR factorization with column pivoting of a
+*> real M-by-N matrix A: A*P = Q*R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of the array contains the
-* min(M,N)-by-N upper triangular matrix R; the elements
-* below the diagonal, together with the array TAU,
-* represent the orthogonal matrix Q as a product of
-* min(m,n) elementary reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of the array contains the
+*> min(M,N)-by-N upper triangular matrix R; the elements
+*> below the diagonal, together with the array TAU,
+*> represent the orthogonal matrix Q as a product of
+*> min(m,n) elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(i) = 0,
+*> the i-th column of A is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(i) = 0,
-* the i-th column of A is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (3*N)
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(n)
+*>
+*> Each H(i) has the form
+*>
+*> H = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
+*>
+*> The matrix P is represented in jpvt as follows: If
+*> jpvt(j) = i
+*> then the jth column of P is the ith canonical unit vector.
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(n)
-*
-* Each H(i) has the form
-*
-* H = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
-*
-* The matrix P is represented in jpvt as follows: If
-* jpvt(j) = i
-* then the jth column of P is the ith canonical unit vector.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqr2.f b/SRC/sgeqr2.f
index 4eb385ae..0120e816 100644
--- a/SRC/sgeqr2.f
+++ b/SRC/sgeqr2.f
@@ -1,67 +1,110 @@
- SUBROUTINE SGEQR2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b SGEQR2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQR2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQR2 computes a QR factorization of a real m by n matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQR2 computes a QR factorization of a real m by n matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(m,n) by n upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (N)
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) REAL array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQR2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqr2p.f b/SRC/sgeqr2p.f
index b81f7d2b..77b74b18 100644
--- a/SRC/sgeqr2p.f
+++ b/SRC/sgeqr2p.f
@@ -1,67 +1,110 @@
- SUBROUTINE SGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b SGEQR2P
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQR2P computes a QR factorization of a real m by n matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQR2P computes a QR factorization of a real m by n matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(m,n) by n upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (N)
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) REAL array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqrf.f b/SRC/sgeqrf.f
index d6d8cd1b..942938fe 100644
--- a/SRC/sgeqrf.f
+++ b/SRC/sgeqrf.f
@@ -1,79 +1,147 @@
- SUBROUTINE SGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SGEQRF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQRF computes a QR factorization of a real M-by-N matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQRF computes a QR factorization of a real M-by-N matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if m >= n); the elements below the diagonal,
+*> with the array TAU, represent the orthogonal matrix Q as a
+*> product of min(m,n) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqrfp.f b/SRC/sgeqrfp.f
index d9c7e434..37b19f1b 100644
--- a/SRC/sgeqrfp.f
+++ b/SRC/sgeqrfp.f
@@ -1,79 +1,147 @@
- SUBROUTINE SGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SGEQRFP
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQRFP computes a QR factorization of a real M-by-N matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQRFP computes a QR factorization of a real M-by-N matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if m >= n); the elements below the diagonal,
+*> with the array TAU, represent the orthogonal matrix Q as a
+*> product of min(m,n) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqrt.f b/SRC/sgeqrt.f
index f03e0ec4..75bbc1ac 100644
--- a/SRC/sgeqrt.f
+++ b/SRC/sgeqrt.f
@@ -1,82 +1,151 @@
- SUBROUTINE SGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
- IMPLICIT NONE
+*> \brief \b SGEQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDT, M, N, NB
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDT, M, N, NB
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGEQRT computes a blocked QR factorization of a real M-by-N matrix A
-* using the compact WY representation of Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQRT computes a blocked QR factorization of a real M-by-N matrix A
+*> using the compact WY representation of Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The block size to be used in the blocked QR. MIN(M,N) >= NB >= 1.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if M >= N); the elements below the diagonal
-* are the columns of V.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The block size to be used in the blocked QR. MIN(M,N) >= NB >= 1.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if M >= N); the elements below the diagonal
+*> are the columns of V.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,MIN(M,N))
+*> The upper triangular block reflectors stored in compact form
+*> as a sequence of upper triangular blocks. See below
+*> for further details.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NB*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) REAL array, dimension (LDT,MIN(M,N))
-* The upper triangular block reflectors stored in compact form
-* as a sequence of upper triangular blocks. See below
-* for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (NB*N)
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A.
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A.
+*>
+*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each
+*> block is of order NB except for the last block, which is of order
+*> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block
+*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
+*> for the last block) T's are stored in the NB-by-N matrix T as
+*>
+*> T = (T1 T2 ... TB).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
*
-* Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each
-* block is of order NB except for the last block, which is of order
-* IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block
-* reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
-* for the last block) T's are stored in the NB-by-N matrix T as
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* T = (T1 T2 ... TB).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDT, M, N, NB
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqrt2.f b/SRC/sgeqrt2.f
index 75086e47..e72cb72c 100644
--- a/SRC/sgeqrt2.f
+++ b/SRC/sgeqrt2.f
@@ -1,73 +1,135 @@
- SUBROUTINE SGEQRT2( M, N, A, LDA, T, LDT, INFO )
+*> \brief \b SGEQRT2
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDT, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), T( LDT, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGEQRT2( M, N, A, LDA, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDT, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* SGEQRT2 computes a QR factorization of a real M-by-N matrix A,
-* using the compact WY representation of Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQRT2 computes a QR factorization of a real M-by-N matrix A,
+*> using the compact WY representation of Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= N.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the real M-by-N matrix A. On exit, the elements on and
-* above the diagonal contain the N-by-N upper triangular matrix R; the
-* elements below the diagonal are the columns of V. See below for
-* further details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the real M-by-N matrix A. On exit, the elements on and
+*> above the diagonal contain the N-by-N upper triangular matrix R; the
+*> elements below the diagonal are the columns of V. See below for
+*> further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,N)
+*> The N-by-N upper triangular factor of the block reflector.
+*> The elements on and above the diagonal contain the block
+*> reflector T; the elements below the diagonal are not used.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> LDT (intput) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) REAL array, dimension (LDT,N)
-* The N-by-N upper triangular factor of the block reflector.
-* The elements on and above the diagonal contain the block
-* reflector T; the elements below the diagonal are not used.
-* See below for further details.
+*> \date November 2011
*
-* LDT (intput) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A. The
+*> block reflector H is then given by
+*>
+*> H = I - V * T * V**T
+*>
+*> where V**T is the transpose of V.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGEQRT2( M, N, A, LDA, T, LDT, INFO )
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A. The
-* block reflector H is then given by
-*
-* H = I - V * T * V**T
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where V**T is the transpose of V.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDT, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgeqrt3.f b/SRC/sgeqrt3.f
index 75757ddd..d05b5005 100644
--- a/SRC/sgeqrt3.f
+++ b/SRC/sgeqrt3.f
@@ -1,79 +1,140 @@
- RECURSIVE SUBROUTINE SGEQRT3( M, N, A, LDA, T, LDT, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
+*> \brief \b SGEQRT3
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N, LDT
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), T( LDT, * )
-* ..
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* RECURSIVE SUBROUTINE SGEQRT3( M, N, A, LDA, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N, LDT
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* SGEQRT3 recursively computes a QR factorization of a real M-by-N
-* matrix A, using the compact WY representation of Q.
-*
-* Based on the algorithm of Elmroth and Gustavson,
-* IBM J. Res. Develop. Vol 44 No. 4 July 2000.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGEQRT3 recursively computes a QR factorization of a real M-by-N
+*> matrix A, using the compact WY representation of Q.
+*>
+*> Based on the algorithm of Elmroth and Gustavson,
+*> IBM J. Res. Develop. Vol 44 No. 4 July 2000.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= N.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the real M-by-N matrix A. On exit, the elements on and
-* above the diagonal contain the N-by-N upper triangular matrix R; the
-* elements below the diagonal are the columns of V. See below for
-* further details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the real M-by-N matrix A. On exit, the elements on and
+*> above the diagonal contain the N-by-N upper triangular matrix R; the
+*> elements below the diagonal are the columns of V. See below for
+*> further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,N)
+*> The N-by-N upper triangular factor of the block reflector.
+*> The elements on and above the diagonal contain the block
+*> reflector T; the elements below the diagonal are not used.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> LDT (intput) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) REAL array, dimension (LDT,N)
-* The N-by-N upper triangular factor of the block reflector.
-* The elements on and above the diagonal contain the block
-* reflector T; the elements below the diagonal are not used.
-* See below for further details.
+*> \date November 2011
*
-* LDT (intput) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A. The
+*> block reflector H is then given by
+*>
+*> H = I - V * T * V**T
+*>
+*> where V**T is the transpose of V.
+*>
+*> For details of the algorithm, see Elmroth and Gustavson (cited above).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ RECURSIVE SUBROUTINE SGEQRT3( M, N, A, LDA, T, LDT, INFO )
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A. The
-* block reflector H is then given by
-*
-* H = I - V * T * V**T
-*
-* where V**T is the transpose of V.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* For details of the algorithm, see Elmroth and Gustavson (cited above).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N, LDT
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgerfs.f b/SRC/sgerfs.f
index 22df41b3..235fc73c 100644
--- a/SRC/sgerfs.f
+++ b/SRC/sgerfs.f
@@ -1,12 +1,186 @@
+*> \brief \b SGERFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGERFS improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates for
+*> the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by SGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEcomputational
+*
+* =====================================================================
SUBROUTINE SGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -18,87 +192,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGERFS improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates for
-* the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by SGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgerfsx.f b/SRC/sgerfsx.f
index e1312dec..76b930e8 100644
--- a/SRC/sgerfsx.f
+++ b/SRC/sgerfsx.f
@@ -1,18 +1,435 @@
+*> \brief \b SGERFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGERFSX( TRANS, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX , * ), WORK( * )
+* REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SGERFSX improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED, R
+*> and C below. In this case, the solution and error bounds returned
+*> are for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by SGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed.
+*> If R is accessed, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed.
+*> If C is accessed, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEcomputational
+*
+* =====================================================================
SUBROUTINE SGERFSX( TRANS, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,283 +445,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SGERFSX improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED, R
-* and C below. In this case, the solution and error bounds returned
-* are for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by SGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* R (input) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed.
-* If R is accessed, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed.
-* If C is accessed, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/sgerq2.f b/SRC/sgerq2.f
index 2783cbea..0ca2676b 100644
--- a/SRC/sgerq2.f
+++ b/SRC/sgerq2.f
@@ -1,69 +1,133 @@
- SUBROUTINE SGERQ2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b SGERQ2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGERQ2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGERQ2 computes an RQ factorization of a real m by n matrix A:
-* A = R * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGERQ2 computes an RQ factorization of a real m by n matrix A:
+*> A = R * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, if m <= n, the upper triangle of the subarray
-* A(1:m,n-m+1:n) contains the m by m upper triangular matrix R;
-* if m >= n, the elements on and above the (m-n)-th subdiagonal
-* contain the m by n upper trapezoidal matrix R; the remaining
-* elements, with the array TAU, represent the orthogonal matrix
-* Q as a product of elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the m by n matrix A.
+*> On exit, if m <= n, the upper triangle of the subarray
+*> A(1:m,n-m+1:n) contains the m by m upper triangular matrix R;
+*> if m >= n, the elements on and above the (m-n)-th subdiagonal
+*> contain the m by n upper trapezoidal matrix R; the remaining
+*> elements, with the array TAU, represent the orthogonal matrix
+*> Q as a product of elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (M)
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
+*> A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGERQ2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
-* A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgerqf.f b/SRC/sgerqf.f
index 875c557f..c1216828 100644
--- a/SRC/sgerqf.f
+++ b/SRC/sgerqf.f
@@ -1,81 +1,121 @@
- SUBROUTINE SGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SGERQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGERQF computes an RQ factorization of a real M-by-N matrix A:
-* A = R * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGERQF computes an RQ factorization of a real M-by-N matrix A:
+*> A = R * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if m <= n, the upper triangle of the subarray
-* A(1:m,n-m+1:n) contains the M-by-M upper triangular matrix R;
-* if m >= n, the elements on and above the (m-n)-th subdiagonal
-* contain the M-by-N upper trapezoidal matrix R;
-* the remaining elements, with the array TAU, represent the
-* orthogonal matrix Q as a product of min(m,n) elementary
-* reflectors (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
+*> A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
-* A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgesc2.f b/SRC/sgesc2.f
index d0a7cd94..d96db1ad 100644
--- a/SRC/sgesc2.f
+++ b/SRC/sgesc2.f
@@ -1,64 +1,130 @@
- SUBROUTINE SGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, N
- REAL SCALE
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), JPIV( * )
- REAL A( LDA, * ), RHS( * )
-* ..
-*
+*> \brief \b SGESC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* REAL A( LDA, * ), RHS( * )
+* ..
+*
* Purpose
* =======
*
-* SGESC2 solves a system of linear equations
-*
-* A * X = scale* RHS
-*
-* with a general N-by-N matrix A using the LU factorization with
-* complete pivoting computed by SGETC2.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGESC2 solves a system of linear equations
+*>
+*> A * X = scale* RHS
+*>
+*> with a general N-by-N matrix A using the LU factorization with
+*> complete pivoting computed by SGETC2.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the LU part of the factorization of the n-by-n
-* matrix A computed by SGETC2: A = P * L * U * Q
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the LU part of the factorization of the n-by-n
+*> matrix A computed by SGETC2: A = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*> RHS is REAL array, dimension (N).
+*> On entry, the right hand side vector b.
+*> On exit, the solution vector X.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On exit, SCALE contains the scale factor. SCALE is chosen
+*> 0 <= SCALE <= 1 to prevent owerflow in the solution.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RHS (input/output) REAL array, dimension (N).
-* On entry, the right hand side vector b.
-* On exit, the solution vector X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
+*> \date November 2011
*
-* JPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
+*> \ingroup realGEauxiliary
*
-* SCALE (output) REAL
-* On exit, SCALE contains the scale factor. SCALE is chosen
-* 0 <= SCALE <= 1 to prevent owerflow in the solution.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* .. Scalar Arguments ..
+ INTEGER LDA, N
+ REAL SCALE
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), JPIV( * )
+ REAL A( LDA, * ), RHS( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgesdd.f b/SRC/sgesdd.f
index 74b20c36..fe870597 100644
--- a/SRC/sgesdd.f
+++ b/SRC/sgesdd.f
@@ -1,10 +1,224 @@
+*> \brief \b SGESC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
+* LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), S( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGESDD computes the singular value decomposition (SVD) of a real
+*> M-by-N matrix A, optionally computing the left and right singular
+*> vectors. If singular vectors are desired, it uses a
+*> divide-and-conquer algorithm.
+*>
+*> The SVD is written
+*>
+*> A = U * SIGMA * transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
+*> V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order. The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns VT = V**T, not V.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> Specifies options for computing all or part of the matrix U:
+*> = 'A': all M columns of U and all N rows of V**T are
+*> returned in the arrays U and VT;
+*> = 'S': the first min(M,N) columns of U and the first
+*> min(M,N) rows of V**T are returned in the arrays U
+*> and VT;
+*> = 'O': If M >= N, the first N columns of U are overwritten
+*> on the array A and all rows of V**T are returned in
+*> the array VT;
+*> otherwise, all columns of U are returned in the
+*> array U and the first M rows of V**T are overwritten
+*> in the array A;
+*> = 'N': no columns of U or rows of V**T are computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if JOBZ = 'O', A is overwritten with the first N columns
+*> of U (the left singular vectors, stored
+*> columnwise) if M >= N;
+*> A is overwritten with the first M rows
+*> of V**T (the right singular vectors, stored
+*> rowwise) otherwise.
+*> if JOBZ .ne. 'O', the contents of A are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,UCOL)
+*> UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
+*> UCOL = min(M,N) if JOBZ = 'S'.
+*> If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
+*> orthogonal matrix U;
+*> if JOBZ = 'S', U contains the first min(M,N) columns of U
+*> (the left singular vectors, stored columnwise);
+*> if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1; if
+*> JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT,N)
+*> If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
+*> N-by-N orthogonal matrix V**T;
+*> if JOBZ = 'S', VT contains the first min(M,N) rows of
+*> V**T (the right singular vectors, stored rowwise);
+*> if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1; if
+*> JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
+*> if JOBZ = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1.
+*> If JOBZ = 'N',
+*> LWORK >= 3*min(M,N) + max(max(M,N),6*min(M,N)).
+*> If JOBZ = 'O',
+*> LWORK >= 3*min(M,N) +
+*> max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).
+*> If JOBZ = 'S' or 'A'
+*> LWORK >= 3*min(M,N) +
+*> max(max(M,N),4*min(M,N)*min(M,N)+4*min(M,N)).
+*> For good performance, LWORK should generally be larger.
+*> If LWORK = -1 but other input arguments are legal, WORK(1)
+*> returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (8*min(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: SBDSDC did not converge, updating process failed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsing
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
$ LWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.1) --
+* -- LAPACK sing routine (version 3.2.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* March 2009
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ
@@ -16,131 +230,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGESDD computes the singular value decomposition (SVD) of a real
-* M-by-N matrix A, optionally computing the left and right singular
-* vectors. If singular vectors are desired, it uses a
-* divide-and-conquer algorithm.
-*
-* The SVD is written
-*
-* A = U * SIGMA * transpose(V)
-*
-* where SIGMA is an M-by-N matrix which is zero except for its
-* min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
-* V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
-* are the singular values of A; they are real and non-negative, and
-* are returned in descending order. The first min(m,n) columns of
-* U and V are the left and right singular vectors of A.
-*
-* Note that the routine returns VT = V**T, not V.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix U:
-* = 'A': all M columns of U and all N rows of V**T are
-* returned in the arrays U and VT;
-* = 'S': the first min(M,N) columns of U and the first
-* min(M,N) rows of V**T are returned in the arrays U
-* and VT;
-* = 'O': If M >= N, the first N columns of U are overwritten
-* on the array A and all rows of V**T are returned in
-* the array VT;
-* otherwise, all columns of U are returned in the
-* array U and the first M rows of V**T are overwritten
-* in the array A;
-* = 'N': no columns of U or rows of V**T are computed.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if JOBZ = 'O', A is overwritten with the first N columns
-* of U (the left singular vectors, stored
-* columnwise) if M >= N;
-* A is overwritten with the first M rows
-* of V**T (the right singular vectors, stored
-* rowwise) otherwise.
-* if JOBZ .ne. 'O', the contents of A are destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* S (output) REAL array, dimension (min(M,N))
-* The singular values of A, sorted so that S(i) >= S(i+1).
-*
-* U (output) REAL array, dimension (LDU,UCOL)
-* UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
-* UCOL = min(M,N) if JOBZ = 'S'.
-* If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
-* orthogonal matrix U;
-* if JOBZ = 'S', U contains the first min(M,N) columns of U
-* (the left singular vectors, stored columnwise);
-* if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1; if
-* JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
-*
-* VT (output) REAL array, dimension (LDVT,N)
-* If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
-* N-by-N orthogonal matrix V**T;
-* if JOBZ = 'S', VT contains the first min(M,N) rows of
-* V**T (the right singular vectors, stored rowwise);
-* if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1; if
-* JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
-* if JOBZ = 'S', LDVT >= min(M,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1.
-* If JOBZ = 'N',
-* LWORK >= 3*min(M,N) + max(max(M,N),6*min(M,N)).
-* If JOBZ = 'O',
-* LWORK >= 3*min(M,N) +
-* max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).
-* If JOBZ = 'S' or 'A'
-* LWORK >= 3*min(M,N) +
-* max(max(M,N),4*min(M,N)*min(M,N)+4*min(M,N)).
-* For good performance, LWORK should generally be larger.
-* If LWORK = -1 but other input arguments are legal, WORK(1)
-* returns the optimal LWORK.
-*
-* IWORK (workspace) INTEGER array, dimension (8*min(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: SBDSDC did not converge, updating process failed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgesv.f b/SRC/sgesv.f
index c2c01a86..c8da2a2a 100644
--- a/SRC/sgesv.f
+++ b/SRC/sgesv.f
@@ -1,68 +1,131 @@
- SUBROUTINE SGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief <b> SGESV computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SGESV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* The LU decomposition with partial pivoting and row interchanges is
-* used to factor A as
-* A = P * L * U,
-* where P is a permutation matrix, L is unit lower triangular, and U is
-* upper triangular. The factored form of A is then used to solve the
-* system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGESV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as
+*> A = P * L * U,
+*> where P is a permutation matrix, L is unit lower triangular, and U is
+*> upper triangular. The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N coefficient matrix A.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS matrix of right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the N-by-N coefficient matrix A.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
+*> \ingroup realGEsolve
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS matrix of right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+* =====================================================================
+ SUBROUTINE SGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, so the solution could not be computed.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgesvd.f b/SRC/sgesvd.f
index 1f0f0537..8b2ad01f 100644
--- a/SRC/sgesvd.f
+++ b/SRC/sgesvd.f
@@ -1,10 +1,214 @@
+*> \brief <b> SGESVD computes the singular value decomposition (SVD) for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU, JOBVT
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), S( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGESVD computes the singular value decomposition (SVD) of a real
+*> M-by-N matrix A, optionally computing the left and/or right singular
+*> vectors. The SVD is written
+*>
+*> A = U * SIGMA * transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
+*> V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order. The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns V**T, not V.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> Specifies options for computing all or part of the matrix U:
+*> = 'A': all M columns of U are returned in array U:
+*> = 'S': the first min(m,n) columns of U (the left singular
+*> vectors) are returned in the array U;
+*> = 'O': the first min(m,n) columns of U (the left singular
+*> vectors) are overwritten on the array A;
+*> = 'N': no columns of U (no left singular vectors) are
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVT
+*> \verbatim
+*> JOBVT is CHARACTER*1
+*> Specifies options for computing all or part of the matrix
+*> V**T:
+*> = 'A': all N rows of V**T are returned in the array VT;
+*> = 'S': the first min(m,n) rows of V**T (the right singular
+*> vectors) are returned in the array VT;
+*> = 'O': the first min(m,n) rows of V**T (the right singular
+*> vectors) are overwritten on the array A;
+*> = 'N': no rows of V**T (no right singular vectors) are
+*> computed.
+*> \endverbatim
+*> \verbatim
+*> JOBVT and JOBU cannot both be 'O'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if JOBU = 'O', A is overwritten with the first min(m,n)
+*> columns of U (the left singular vectors,
+*> stored columnwise);
+*> if JOBVT = 'O', A is overwritten with the first min(m,n)
+*> rows of V**T (the right singular vectors,
+*> stored rowwise);
+*> if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
+*> are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,UCOL)
+*> (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
+*> If JOBU = 'A', U contains the M-by-M orthogonal matrix U;
+*> if JOBU = 'S', U contains the first min(m,n) columns of U
+*> (the left singular vectors, stored columnwise);
+*> if JOBU = 'N' or 'O', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1; if
+*> JOBU = 'S' or 'A', LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT,N)
+*> If JOBVT = 'A', VT contains the N-by-N orthogonal matrix
+*> V**T;
+*> if JOBVT = 'S', VT contains the first min(m,n) rows of
+*> V**T (the right singular vectors, stored rowwise);
+*> if JOBVT = 'N' or 'O', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1; if
+*> JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
+*> if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged
+*> superdiagonal elements of an upper bidiagonal matrix B
+*> whose diagonal is in S (not necessarily sorted). B
+*> satisfies A = U * B * VT, so it has the same singular values
+*> as A, and singular vectors related by U and VT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
+*> - PATH 1 (M much larger than N, JOBU='N')
+*> - PATH 1t (N much larger than M, JOBVT='N')
+*> LWORK >= MAX(1,3*MIN(M,N)+MAX(M,N),5*MIN(M,N)) for the other paths
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if SBDSQR did not converge, INFO specifies how many
+*> superdiagonals of an intermediate bidiagonal form B
+*> did not converge to zero. See the description of WORK
+*> above for details.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsing
+*
+* =====================================================================
SUBROUTINE SGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
$ WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK sing routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU, JOBVT
@@ -15,125 +219,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGESVD computes the singular value decomposition (SVD) of a real
-* M-by-N matrix A, optionally computing the left and/or right singular
-* vectors. The SVD is written
-*
-* A = U * SIGMA * transpose(V)
-*
-* where SIGMA is an M-by-N matrix which is zero except for its
-* min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
-* V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
-* are the singular values of A; they are real and non-negative, and
-* are returned in descending order. The first min(m,n) columns of
-* U and V are the left and right singular vectors of A.
-*
-* Note that the routine returns V**T, not V.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix U:
-* = 'A': all M columns of U are returned in array U:
-* = 'S': the first min(m,n) columns of U (the left singular
-* vectors) are returned in the array U;
-* = 'O': the first min(m,n) columns of U (the left singular
-* vectors) are overwritten on the array A;
-* = 'N': no columns of U (no left singular vectors) are
-* computed.
-*
-* JOBVT (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix
-* V**T:
-* = 'A': all N rows of V**T are returned in the array VT;
-* = 'S': the first min(m,n) rows of V**T (the right singular
-* vectors) are returned in the array VT;
-* = 'O': the first min(m,n) rows of V**T (the right singular
-* vectors) are overwritten on the array A;
-* = 'N': no rows of V**T (no right singular vectors) are
-* computed.
-*
-* JOBVT and JOBU cannot both be 'O'.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if JOBU = 'O', A is overwritten with the first min(m,n)
-* columns of U (the left singular vectors,
-* stored columnwise);
-* if JOBVT = 'O', A is overwritten with the first min(m,n)
-* rows of V**T (the right singular vectors,
-* stored rowwise);
-* if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
-* are destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* S (output) REAL array, dimension (min(M,N))
-* The singular values of A, sorted so that S(i) >= S(i+1).
-*
-* U (output) REAL array, dimension (LDU,UCOL)
-* (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
-* If JOBU = 'A', U contains the M-by-M orthogonal matrix U;
-* if JOBU = 'S', U contains the first min(m,n) columns of U
-* (the left singular vectors, stored columnwise);
-* if JOBU = 'N' or 'O', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1; if
-* JOBU = 'S' or 'A', LDU >= M.
-*
-* VT (output) REAL array, dimension (LDVT,N)
-* If JOBVT = 'A', VT contains the N-by-N orthogonal matrix
-* V**T;
-* if JOBVT = 'S', VT contains the first min(m,n) rows of
-* V**T (the right singular vectors, stored rowwise);
-* if JOBVT = 'N' or 'O', VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1; if
-* JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
-* if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged
-* superdiagonal elements of an upper bidiagonal matrix B
-* whose diagonal is in S (not necessarily sorted). B
-* satisfies A = U * B * VT, so it has the same singular values
-* as A, and singular vectors related by U and VT.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
-* - PATH 1 (M much larger than N, JOBU='N')
-* - PATH 1t (N much larger than M, JOBVT='N')
-* LWORK >= MAX(1,3*MIN(M,N)+MAX(M,N),5*MIN(M,N)) for the other paths
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if SBDSQR did not converge, INFO specifies how many
-* superdiagonals of an intermediate bidiagonal form B
-* did not converge to zero. See the description of WORK
-* above for details.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgesvj.f b/SRC/sgesvj.f
index 4e2ffc9f..884700ff 100644
--- a/SRC/sgesvj.f
+++ b/SRC/sgesvj.f
@@ -1,22 +1,320 @@
- SUBROUTINE SGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
- $ LDV, WORK, LWORK, INFO )
+*> \brief \b SGESVJ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
+* LDV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDV, LWORK, M, MV, N
+* CHARACTER*1 JOBA, JOBU, JOBV
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), SVA( N ), V( LDV, * ),
+* $ WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.3.1) --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGESVJ computes the singular value decomposition (SVD) of a real
+*> M-by-N matrix A, where M >= N. The SVD of A is written as
+*> [++] [xx] [x0] [xx]
+*> A = U * SIGMA * V^t, [++] = [xx] * [ox] * [xx]
+*> [++] [xx]
+*> where SIGMA is an N-by-N diagonal matrix, U is an M-by-N orthonormal
+*> matrix, and V is an N-by-N orthogonal matrix. The diagonal elements
+*> of SIGMA are the singular values of A. The columns of U and V are the
+*> left and the right singular vectors of A, respectively.
+*>
+*> Further Details
+*> ~~~~~~~~~~~~~~~
+*> The orthogonal N-by-N matrix V is obtained as a product of Jacobi plane
+*> rotations. The rotations are implemented as fast scaled rotations of
+*> Anda and Park [1]. In the case of underflow of the Jacobi angle, a
+*> modified Jacobi transformation of Drmac [4] is used. Pivot strategy uses
+*> column interchanges of de Rijk [2]. The relative accuracy of the computed
+*> singular values and the accuracy of the computed singular vectors (in
+*> angle metric) is as guaranteed by the theory of Demmel and Veselic [3].
+*> The condition number that determines the accuracy in the full rank case
+*> is essentially min_{D=diag} kappa(A*D), where kappa(.) is the
+*> spectral condition number. The best performance of this Jacobi SVD
+*> procedure is achieved if used in an accelerated version of Drmac and
+*> Veselic [5,6], and it is the kernel routine in the SIGMA library [7].
+*> Some tunning parameters (marked with [TP]) are available for the
+*> implementer.
+*> The computational range for the nonzero singular values is the machine
+*> number interval ( UNDERFLOW , OVERFLOW ). In extreme cases, even
+*> denormalized singular values can be computed with the corresponding
+*> gradual loss of accurate digits.
+*>
+*> Contributors
+*> ~~~~~~~~~~~~
+*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
+*>
+*> References
+*> ~~~~~~~~~~
+*> [1] A. A. Anda and H. Park: Fast plane rotations with dynamic scaling.
+*> SIAM J. matrix Anal. Appl., Vol. 15 (1994), pp. 162-174.
+*> [2] P. P. M. De Rijk: A one-sided Jacobi algorithm for computing the
+*> singular value decomposition on a vector computer.
+*> SIAM J. Sci. Stat. Comp., Vol. 10 (1998), pp. 359-371.
+*> [3] J. Demmel and K. Veselic: Jacobi method is more accurate than QR.
+*> [4] Z. Drmac: Implementation of Jacobi rotations for accurate singular
+*> value computation in floating point arithmetic.
+*> SIAM J. Sci. Comp., Vol. 18 (1997), pp. 1200-1222.
+*> [5] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
+*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
+*> LAPACK Working note 169.
+*> [6] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
+*> SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
+*> LAPACK Working note 170.
+*> [7] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
+*> QSVD, (H,K)-SVD computations.
+*> Department of Mathematics, University of Zagreb, 2008.
+*>
+*> Bugs, Examples and Comments
+*> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*> Please report all bugs and send interesting test examples and comments to
+*> drmac@math.hr. Thank you.
+*>
+*>\endverbatim
*
-* -- Contributed by Zlatko Drmac of the University of Zagreb and --
-* -- Kresimir Veselic of the Fernuniversitaet Hagen --
-* -- April 2011 --
+* Arguments
+* =========
*
+*> \param[in] JOBA
+*> \verbatim
+*> JOBA is CHARACTER* 1
+*> Specifies the structure of A.
+*> = 'L': The input matrix A is lower triangular;
+*> = 'U': The input matrix A is upper triangular;
+*> = 'G': The input matrix A is general M-by-N matrix, M >= N.
+*> \endverbatim
+*>
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> Specifies whether to compute the left singular vectors
+*> (columns of U):
+*> = 'U': The left singular vectors corresponding to the nonzero
+*> singular values are computed and returned in the leading
+*> columns of A. See more details in the description of A.
+*> The default numerical orthogonality threshold is set to
+*> approximately TOL=CTOL*EPS, CTOL=SQRT(M), EPS=SLAMCH('E').
+*> = 'C': Analogous to JOBU='U', except that user can control the
+*> level of numerical orthogonality of the computed left
+*> singular vectors. TOL can be set to TOL = CTOL*EPS, where
+*> CTOL is given on input in the array WORK.
+*> No CTOL smaller than ONE is allowed. CTOL greater
+*> than 1 / EPS is meaningless. The option 'C'
+*> can be used if M*EPS is satisfactory orthogonality
+*> of the computed left singular vectors, so CTOL=M could
+*> save few sweeps of Jacobi rotations.
+*> See the descriptions of A and WORK(1).
+*> = 'N': The matrix U is not computed. However, see the
+*> description of A.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> Specifies whether to compute the right singular vectors, that
+*> is, the matrix V:
+*> = 'V' : the matrix V is computed and returned in the array V
+*> = 'A' : the Jacobi rotations are applied to the MV-by-N
+*> array V. In other words, the right singular vector
+*> matrix V is not computed explicitly; instead it is
+*> applied to an MV-by-N matrix initially stored in the
+*> first MV rows of V.
+*> = 'N' : the matrix V is not computed and the array V is not
+*> referenced
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. 1/SLAMCH('E') > M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> If JOBU .EQ. 'U' .OR. JOBU .EQ. 'C':
+*> If INFO .EQ. 0 :
+*> RANKA orthonormal columns of U are returned in the
+*> leading RANKA columns of the array A. Here RANKA <= N
+*> is the number of computed singular values of A that are
+*> above the underflow threshold SLAMCH('S'). The singular
+*> vectors corresponding to underflowed or zero singular
+*> values are not computed. The value of RANKA is returned
+*> in the array WORK as RANKA=NINT(WORK(2)). Also see the
+*> descriptions of SVA and WORK. The computed columns of U
+*> are mutually numerically orthogonal up to approximately
+*> TOL=SQRT(M)*EPS (default); or TOL=CTOL*EPS (JOBU.EQ.'C'),
+*> see the description of JOBU.
+*> If INFO .GT. 0,
+*> the procedure SGESVJ did not converge in the given number
+*> of iterations (sweeps). In that case, the computed
+*> columns of U may not be orthogonal up to TOL. The output
+*> U (stored in A), SIGMA (given by the computed singular
+*> values in SVA(1:N)) and V is still a decomposition of the
+*> input matrix A in the sense that the residual
+*> ||A-SCALE*U*SIGMA*V^T||_2 / ||A||_2 is small.
+*> If JOBU .EQ. 'N':
+*> If INFO .EQ. 0 :
+*> Note that the left singular vectors are 'for free' in the
+*> one-sided Jacobi SVD algorithm. However, if only the
+*> singular values are needed, the level of numerical
+*> orthogonality of U is not an issue and iterations are
+*> stopped when the columns of the iterated matrix are
+*> numerically orthogonal up to approximately M*EPS. Thus,
+*> on exit, A contains the columns of U scaled with the
+*> corresponding singular values.
+*> If INFO .GT. 0 :
+*> the procedure SGESVJ did not converge in the given number
+*> of iterations (sweeps).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] SVA
+*> \verbatim
+*> SVA is REAL array, dimension (N)
+*> On exit,
+*> If INFO .EQ. 0 :
+*> depending on the value SCALE = WORK(1), we have:
+*> If SCALE .EQ. ONE:
+*> SVA(1:N) contains the computed singular values of A.
+*> During the computation SVA contains the Euclidean column
+*> norms of the iterated matrices in the array A.
+*> If SCALE .NE. ONE:
+*> The singular values of A are SCALE*SVA(1:N), and this
+*> factored representation is due to the fact that some of the
+*> singular values of A might underflow or overflow.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 :
+*> the procedure SGESVJ did not converge in the given number of
+*> iterations (sweeps) and SCALE*SVA(1:N) may not be accurate.
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> If JOBV .EQ. 'A', then the product of Jacobi rotations in SGESVJ
+*> is applied to the first MV rows of V. See the description of JOBV.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,N)
+*> If JOBV = 'V', then V contains on exit the N-by-N matrix of
+*> the right singular vectors;
+*> If JOBV = 'A', then V contains the product of the computed right
+*> singular vector matrix and the initial matrix in
+*> the array V.
+*> If JOBV = 'N', then V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V, LDV .GE. 1.
+*> If JOBV .EQ. 'V', then LDV .GE. max(1,N).
+*> If JOBV .EQ. 'A', then LDV .GE. max(1,MV) .
+*> \endverbatim
+*>
+*> \param[in,out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension max(4,M+N).
+*> On entry,
+*> If JOBU .EQ. 'C' :
+*> WORK(1) = CTOL, where CTOL defines the threshold for convergence.
+*> The process stops if all columns of A are mutually
+*> orthogonal up to CTOL*EPS, EPS=SLAMCH('E').
+*> It is required that CTOL >= ONE, i.e. it is not
+*> allowed to force the routine to obtain orthogonality
+*> below EPSILON.
+*> On exit,
+*> WORK(1) = SCALE is the scaling factor such that SCALE*SVA(1:N)
+*> are the computed singular vcalues of A.
+*> (See description of SVA().)
+*> WORK(2) = NINT(WORK(2)) is the number of the computed nonzero
+*> singular values.
+*> WORK(3) = NINT(WORK(3)) is the number of the computed singular
+*> values that are larger than the underflow threshold.
+*> WORK(4) = NINT(WORK(4)) is the number of sweeps of Jacobi
+*> rotations needed for numerical convergence.
+*> WORK(5) = max_{i.NE.j} |COS(A(:,i),A(:,j))| in the last sweep.
+*> This is useful information in cases when SGESVJ did
+*> not converge, as it can be used to estimate whether
+*> the output is stil useful and for post festum analysis.
+*> WORK(6) = the largest absolute value over all sines of the
+*> Jacobi rotation angles in the last sweep. It can be
+*> useful for a post festum analysis.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of WORK, WORK >= MAX(6,M+N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit.
+*> < 0 : if INFO = -i, then the i-th argument had an illegal value
+*> > 0 : SGESVJ did not converge in the maximal allowed number (30)
+*> of sweeps. The output may still be useful. See the
+*> description of WORK.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEcomputational
+*
+* =====================================================================
+ SUBROUTINE SGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
+ $ LDV, WORK, LWORK, INFO )
+*
+* -- LAPACK computational routine (version 1.23, October 23. 2008.) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine is also part of SIGMA (version 1.23, October 23. 2008.)
-* SIGMA is a library of algorithms for highly accurate algorithms for
-* computation of SVD, PSVD, QSVD, (H,K)-SVD, and for solution of the
-* eigenvalue problems Hx = lambda M x, H M x = lambda x with H, M > 0.
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDV, LWORK, M, MV, N
CHARACTER*1 JOBA, JOBU, JOBV
@@ -26,231 +324,6 @@
$ WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* SGESVJ computes the singular value decomposition (SVD) of a real
-* M-by-N matrix A, where M >= N. The SVD of A is written as
-* [++] [xx] [x0] [xx]
-* A = U * SIGMA * V^t, [++] = [xx] * [ox] * [xx]
-* [++] [xx]
-* where SIGMA is an N-by-N diagonal matrix, U is an M-by-N orthonormal
-* matrix, and V is an N-by-N orthogonal matrix. The diagonal elements
-* of SIGMA are the singular values of A. The columns of U and V are the
-* left and the right singular vectors of A, respectively.
-*
-* Further Details
-* ~~~~~~~~~~~~~~~
-* The orthogonal N-by-N matrix V is obtained as a product of Jacobi plane
-* rotations. The rotations are implemented as fast scaled rotations of
-* Anda and Park [1]. In the case of underflow of the Jacobi angle, a
-* modified Jacobi transformation of Drmac [4] is used. Pivot strategy uses
-* column interchanges of de Rijk [2]. The relative accuracy of the computed
-* singular values and the accuracy of the computed singular vectors (in
-* angle metric) is as guaranteed by the theory of Demmel and Veselic [3].
-* The condition number that determines the accuracy in the full rank case
-* is essentially min_{D=diag} kappa(A*D), where kappa(.) is the
-* spectral condition number. The best performance of this Jacobi SVD
-* procedure is achieved if used in an accelerated version of Drmac and
-* Veselic [5,6], and it is the kernel routine in the SIGMA library [7].
-* Some tunning parameters (marked with [TP]) are available for the
-* implementer.
-* The computational range for the nonzero singular values is the machine
-* number interval ( UNDERFLOW , OVERFLOW ). In extreme cases, even
-* denormalized singular values can be computed with the corresponding
-* gradual loss of accurate digits.
-*
-* Contributors
-* ~~~~~~~~~~~~
-* Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-* References
-* ~~~~~~~~~~
-* [1] A. A. Anda and H. Park: Fast plane rotations with dynamic scaling.
-* SIAM J. matrix Anal. Appl., Vol. 15 (1994), pp. 162-174.
-* [2] P. P. M. De Rijk: A one-sided Jacobi algorithm for computing the
-* singular value decomposition on a vector computer.
-* SIAM J. Sci. Stat. Comp., Vol. 10 (1998), pp. 359-371.
-* [3] J. Demmel and K. Veselic: Jacobi method is more accurate than QR.
-* [4] Z. Drmac: Implementation of Jacobi rotations for accurate singular
-* value computation in floating point arithmetic.
-* SIAM J. Sci. Comp., Vol. 18 (1997), pp. 1200-1222.
-* [5] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm I.
-* SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1322-1342.
-* LAPACK Working note 169.
-* [6] Z. Drmac and K. Veselic: New fast and accurate Jacobi SVD algorithm II.
-* SIAM J. Matrix Anal. Appl. Vol. 35, No. 2 (2008), pp. 1343-1362.
-* LAPACK Working note 170.
-* [7] Z. Drmac: SIGMA - mathematical software library for accurate SVD, PSV,
-* QSVD, (H,K)-SVD computations.
-* Department of Mathematics, University of Zagreb, 2008.
-*
-* Bugs, Examples and Comments
-* ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* Please report all bugs and send interesting test examples and comments to
-* drmac@math.hr. Thank you.
-*
-* Arguments
-* =========
-*
-* JOBA (input) CHARACTER* 1
-* Specifies the structure of A.
-* = 'L': The input matrix A is lower triangular;
-* = 'U': The input matrix A is upper triangular;
-* = 'G': The input matrix A is general M-by-N matrix, M >= N.
-*
-* JOBU (input) CHARACTER*1
-* Specifies whether to compute the left singular vectors
-* (columns of U):
-* = 'U': The left singular vectors corresponding to the nonzero
-* singular values are computed and returned in the leading
-* columns of A. See more details in the description of A.
-* The default numerical orthogonality threshold is set to
-* approximately TOL=CTOL*EPS, CTOL=SQRT(M), EPS=SLAMCH('E').
-* = 'C': Analogous to JOBU='U', except that user can control the
-* level of numerical orthogonality of the computed left
-* singular vectors. TOL can be set to TOL = CTOL*EPS, where
-* CTOL is given on input in the array WORK.
-* No CTOL smaller than ONE is allowed. CTOL greater
-* than 1 / EPS is meaningless. The option 'C'
-* can be used if M*EPS is satisfactory orthogonality
-* of the computed left singular vectors, so CTOL=M could
-* save few sweeps of Jacobi rotations.
-* See the descriptions of A and WORK(1).
-* = 'N': The matrix U is not computed. However, see the
-* description of A.
-*
-* JOBV (input) CHARACTER*1
-* Specifies whether to compute the right singular vectors, that
-* is, the matrix V:
-* = 'V' : the matrix V is computed and returned in the array V
-* = 'A' : the Jacobi rotations are applied to the MV-by-N
-* array V. In other words, the right singular vector
-* matrix V is not computed explicitly; instead it is
-* applied to an MV-by-N matrix initially stored in the
-* first MV rows of V.
-* = 'N' : the matrix V is not computed and the array V is not
-* referenced
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. 1/SLAMCH('E') > M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A.
-* M >= N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* If JOBU .EQ. 'U' .OR. JOBU .EQ. 'C':
-* If INFO .EQ. 0 :
-* RANKA orthonormal columns of U are returned in the
-* leading RANKA columns of the array A. Here RANKA <= N
-* is the number of computed singular values of A that are
-* above the underflow threshold SLAMCH('S'). The singular
-* vectors corresponding to underflowed or zero singular
-* values are not computed. The value of RANKA is returned
-* in the array WORK as RANKA=NINT(WORK(2)). Also see the
-* descriptions of SVA and WORK. The computed columns of U
-* are mutually numerically orthogonal up to approximately
-* TOL=SQRT(M)*EPS (default); or TOL=CTOL*EPS (JOBU.EQ.'C'),
-* see the description of JOBU.
-* If INFO .GT. 0,
-* the procedure SGESVJ did not converge in the given number
-* of iterations (sweeps). In that case, the computed
-* columns of U may not be orthogonal up to TOL. The output
-* U (stored in A), SIGMA (given by the computed singular
-* values in SVA(1:N)) and V is still a decomposition of the
-* input matrix A in the sense that the residual
-* ||A-SCALE*U*SIGMA*V^T||_2 / ||A||_2 is small.
-* If JOBU .EQ. 'N':
-* If INFO .EQ. 0 :
-* Note that the left singular vectors are 'for free' in the
-* one-sided Jacobi SVD algorithm. However, if only the
-* singular values are needed, the level of numerical
-* orthogonality of U is not an issue and iterations are
-* stopped when the columns of the iterated matrix are
-* numerically orthogonal up to approximately M*EPS. Thus,
-* on exit, A contains the columns of U scaled with the
-* corresponding singular values.
-* If INFO .GT. 0 :
-* the procedure SGESVJ did not converge in the given number
-* of iterations (sweeps).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* SVA (workspace/output) REAL array, dimension (N)
-* On exit,
-* If INFO .EQ. 0 :
-* depending on the value SCALE = WORK(1), we have:
-* If SCALE .EQ. ONE:
-* SVA(1:N) contains the computed singular values of A.
-* During the computation SVA contains the Euclidean column
-* norms of the iterated matrices in the array A.
-* If SCALE .NE. ONE:
-* The singular values of A are SCALE*SVA(1:N), and this
-* factored representation is due to the fact that some of the
-* singular values of A might underflow or overflow.
-*
-* If INFO .GT. 0 :
-* the procedure SGESVJ did not converge in the given number of
-* iterations (sweeps) and SCALE*SVA(1:N) may not be accurate.
-*
-* MV (input) INTEGER
-* If JOBV .EQ. 'A', then the product of Jacobi rotations in SGESVJ
-* is applied to the first MV rows of V. See the description of JOBV.
-*
-* V (input/output) REAL array, dimension (LDV,N)
-* If JOBV = 'V', then V contains on exit the N-by-N matrix of
-* the right singular vectors;
-* If JOBV = 'A', then V contains the product of the computed right
-* singular vector matrix and the initial matrix in
-* the array V.
-* If JOBV = 'N', then V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V, LDV .GE. 1.
-* If JOBV .EQ. 'V', then LDV .GE. max(1,N).
-* If JOBV .EQ. 'A', then LDV .GE. max(1,MV) .
-*
-* WORK (input/workspace/output) REAL array, dimension max(4,M+N).
-* On entry,
-* If JOBU .EQ. 'C' :
-* WORK(1) = CTOL, where CTOL defines the threshold for convergence.
-* The process stops if all columns of A are mutually
-* orthogonal up to CTOL*EPS, EPS=SLAMCH('E').
-* It is required that CTOL >= ONE, i.e. it is not
-* allowed to force the routine to obtain orthogonality
-* below EPSILON.
-* On exit,
-* WORK(1) = SCALE is the scaling factor such that SCALE*SVA(1:N)
-* are the computed singular vcalues of A.
-* (See description of SVA().)
-* WORK(2) = NINT(WORK(2)) is the number of the computed nonzero
-* singular values.
-* WORK(3) = NINT(WORK(3)) is the number of the computed singular
-* values that are larger than the underflow threshold.
-* WORK(4) = NINT(WORK(4)) is the number of sweeps of Jacobi
-* rotations needed for numerical convergence.
-* WORK(5) = max_{i.NE.j} |COS(A(:,i),A(:,j))| in the last sweep.
-* This is useful information in cases when SGESVJ did
-* not converge, as it can be used to estimate whether
-* the output is stil useful and for post festum analysis.
-* WORK(6) = the largest absolute value over all sines of the
-* Jacobi rotation angles in the last sweep. It can be
-* useful for a post festum analysis.
-*
-* LWORK (input) INTEGER
-* length of WORK, WORK >= MAX(6,M+N)
-*
-* INFO (output) INTEGER
-* = 0 : successful exit.
-* < 0 : if INFO = -i, then the i-th argument had an illegal value
-* > 0 : SGESVJ did not converge in the maximal allowed number (30)
-* of sweeps. The output may still be useful. See the
-* description of WORK.
-*
* =====================================================================
*
* .. Local Parameters ..
diff --git a/SRC/sgesvx.f b/SRC/sgesvx.f
index a94a6dd0..12104bf6 100644
--- a/SRC/sgesvx.f
+++ b/SRC/sgesvx.f
@@ -1,11 +1,352 @@
+*> \brief <b> SGESVX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), C( * ), FERR( * ), R( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGESVX uses the LU factorization to compute the solution to a real
+*> system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*> matrix A (after equilibration if FACT = 'E') as
+*> A = P * L * U,
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
+*> not 'N', then A must have been equilibrated by the scaling
+*> factors in R and/or C. A is not modified if FACT = 'F' or
+*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) REAL array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the factors L and U from the factorization
+*> A = P*L*U as computed by SGETRF. If EQUED .ne. 'N', then
+*> AF is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by SGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*> to the original system of equations. Note that A and B are
+*> modified on exit if EQUED .ne. 'N', and the solution to the
+*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*> and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> On exit, WORK(1) contains the reciprocal pivot growth
+*> factor norm(A)/norm(U). The "max absolute element" norm is
+*> used. If WORK(1) is much less than 1, then the stability
+*> of the LU factorization of the (equilibrated) matrix A
+*> could be poor. This also means that the solution X, condition
+*> estimator RCOND, and forward error bound FERR could be
+*> unreliable. If factorization fails with 0<INFO<=N, then
+*> WORK(1) contains the reciprocal pivot growth factor for the
+*> leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization has
+*> been completed, but the factor U is exactly
+*> singular, so the solution and error bounds
+*> could not be computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsolve
+*
+* =====================================================================
SUBROUTINE SGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
@@ -19,231 +360,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGESVX uses the LU factorization to compute the solution to a real
-* system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-* matrix A (after equilibration if FACT = 'E') as
-* A = P * L * U,
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-* not 'N', then A must have been equilibrated by the scaling
-* factors in R and/or C. A is not modified if FACT = 'F' or
-* 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) REAL array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the factors L and U from the factorization
-* A = P*L*U as computed by SGETRF. If EQUED .ne. 'N', then
-* AF is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by SGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-* to the original system of equations. Note that A and B are
-* modified on exit if EQUED .ne. 'N', and the solution to the
-* equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-* and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) REAL array, dimension (4*N)
-* On exit, WORK(1) contains the reciprocal pivot growth
-* factor norm(A)/norm(U). The "max absolute element" norm is
-* used. If WORK(1) is much less than 1, then the stability
-* of the LU factorization of the (equilibrated) matrix A
-* could be poor. This also means that the solution X, condition
-* estimator RCOND, and forward error bound FERR could be
-* unreliable. If factorization fails with 0<INFO<=N, then
-* WORK(1) contains the reciprocal pivot growth factor for the
-* leading INFO columns of A.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization has
-* been completed, but the factor U is exactly
-* singular, so the solution and error bounds
-* could not be computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgesvxx.f b/SRC/sgesvxx.f
index 5bb9bc51..735ec596 100644
--- a/SRC/sgesvxx.f
+++ b/SRC/sgesvxx.f
@@ -1,19 +1,566 @@
+*> \brief <b> SGESVXX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGESVXX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW,
+* BERR, N_ERR_BNDS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SGESVXX uses the LU factorization to compute the solution to a
+*> real system of linear equations A * X = B, where A is an
+*> N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. SGESVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> SGESVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> SGESVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what SGESVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = P * L * U,
+*>
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is less
+*> than machine precision, the routine still goes on to solve for X
+*> and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
+*> not 'N', then A must have been equilibrated by the scaling
+*> factors in R and/or C. A is not modified if FACT = 'F' or
+*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) REAL array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the factors L and U from the factorization
+*> A = P*L*U as computed by SGETRF. If EQUED .ne. 'N', then
+*> AF is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by SGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) REAL array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit
+*> if EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
+*> inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A. In SGESVX, this quantity is
+*> returned in WORK(1).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEsolve
+*
+* =====================================================================
SUBROUTINE SGESVXX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW,
$ BERR, N_ERR_BNDS, ERR_BNDS_NORM,
$ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -29,401 +576,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SGESVXX uses the LU factorization to compute the solution to a
-* real system of linear equations A * X = B, where A is an
-* N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. SGESVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* SGESVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* SGESVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what SGESVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = P * L * U,
-*
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is less
-* than machine precision, the routine still goes on to solve for X
-* and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-* not 'N', then A must have been equilibrated by the scaling
-* factors in R and/or C. A is not modified if FACT = 'F' or
-* 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) REAL array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the factors L and U from the factorization
-* A = P*L*U as computed by SGETRF. If EQUED .ne. 'N', then
-* AF is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by SGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) REAL array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit
-* if EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
-* inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A. In SGESVX, this quantity is
-* returned in WORK(1).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/sgetc2.f b/SRC/sgetc2.f
index 740bad4f..370f63c6 100644
--- a/SRC/sgetc2.f
+++ b/SRC/sgetc2.f
@@ -1,64 +1,126 @@
- SUBROUTINE SGETC2( N, A, LDA, IPIV, JPIV, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), JPIV( * )
- REAL A( LDA, * )
-* ..
-*
+*> \brief \b SGETC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SGETC2 computes an LU factorization with complete pivoting of the
-* n-by-n matrix A. The factorization has the form A = P * L * U * Q,
-* where P and Q are permutation matrices, L is lower triangular with
-* unit diagonal elements and U is upper triangular.
-*
-* This is the Level 2 BLAS algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGETC2 computes an LU factorization with complete pivoting of the
+*> n-by-n matrix A. The factorization has the form A = P * L * U * Q,
+*> where P and Q are permutation matrices, L is lower triangular with
+*> unit diagonal elements and U is upper triangular.
+*>
+*> This is the Level 2 BLAS algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the n-by-n matrix A to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U*Q; the unit diagonal elements of L are not stored.
-* If U(k, k) appears to be less than SMIN, U(k, k) is given the
-* value of SMIN, i.e., giving a nonsingular perturbed system.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the n-by-n matrix A to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U*Q; the unit diagonal elements of L are not stored.
+*> If U(k, k) appears to be less than SMIN, U(k, k) is given the
+*> value of SMIN, i.e., giving a nonsingular perturbed system.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension(N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension(N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, U(k, k) is likely to produce owerflow if
+*> we try to solve for x in Ax = b. So U is perturbed to
+*> avoid the overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (output) INTEGER array, dimension(N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
+*> \date November 2011
*
-* JPIV (output) INTEGER array, dimension(N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
+*> \ingroup realGEauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, U(k, k) is likely to produce owerflow if
-* we try to solve for x in Ax = b. So U is perturbed to
-* avoid the overflow.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), JPIV( * )
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgetf2.f b/SRC/sgetf2.f
index 5cf4def3..3a8e8d95 100644
--- a/SRC/sgetf2.f
+++ b/SRC/sgetf2.f
@@ -1,60 +1,117 @@
- SUBROUTINE SGETF2( M, N, A, LDA, IPIV, INFO )
+*> \brief \b SGETF2
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGETF2( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SGETF2 computes an LU factorization of a general m-by-n matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the right-looking Level 2 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGETF2 computes an LU factorization of a general m-by-n matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*> A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 2 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the m by n matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the m by n matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup realGEcomputational
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* =====================================================================
+ SUBROUTINE SGETF2( M, N, A, LDA, IPIV, INFO )
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgetrf.f b/SRC/sgetrf.f
index 414c6d90..347a191f 100644
--- a/SRC/sgetrf.f
+++ b/SRC/sgetrf.f
@@ -1,60 +1,117 @@
- SUBROUTINE SGETRF( M, N, A, LDA, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * )
-* ..
-*
+*> \brief \b SGETRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the right-looking Level 3 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGETRF computes an LU factorization of a general M-by-N matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*> A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup realGEcomputational
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* =====================================================================
+ SUBROUTINE SGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgetri.f b/SRC/sgetri.f
index 04a5b196..1d55010c 100644
--- a/SRC/sgetri.f
+++ b/SRC/sgetri.f
@@ -1,63 +1,124 @@
- SUBROUTINE SGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b SGETRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGETRI computes the inverse of a matrix using the LU factorization
-* computed by SGETRF.
-*
-* This method inverts U and then computes inv(A) by solving the system
-* inv(A)*L = inv(U) for inv(A).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGETRI computes the inverse of a matrix using the LU factorization
+*> computed by SGETRF.
+*>
+*> This method inverts U and then computes inv(A) by solving the system
+*> inv(A)*L = inv(U) for inv(A).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the factors L and U from the factorization
-* A = P*L*U as computed by SGETRF.
-* On exit, if INFO = 0, the inverse of the original matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the factors L and U from the factorization
+*> A = P*L*U as computed by SGETRF.
+*> On exit, if INFO = 0, the inverse of the original matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimal performance LWORK >= N*NB, where NB is
+*> the optimal blocksize returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero; the matrix is
+*> singular and its inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
+*> \date November 2011
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \ingroup realGEcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimal performance LWORK >= N*NB, where NB is
-* the optimal blocksize returned by ILAENV.
+* =====================================================================
+ SUBROUTINE SGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is
-* singular and its inverse could not be computed.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgetrs.f b/SRC/sgetrs.f
index b35021ce..3a3e6b51 100644
--- a/SRC/sgetrs.f
+++ b/SRC/sgetrs.f
@@ -1,64 +1,131 @@
- SUBROUTINE SGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SGETRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SGETRS solves a system of linear equations
-* A * X = B or A**T * X = B
-* with a general N-by-N matrix A using the LU factorization computed
-* by SGETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGETRS solves a system of linear equations
+*> A * X = B or A**T * X = B
+*> with a general N-by-N matrix A using the LU factorization computed
+*> by SGETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T* X = B (Transpose)
-* = 'C': A**T* X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T* X = B (Transpose)
+*> = 'C': A**T* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by SGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by SGETRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup realGEcomputational
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE SGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sggbak.f b/SRC/sggbak.f
index 509a1cae..ca5e3061 100644
--- a/SRC/sggbak.f
+++ b/SRC/sggbak.f
@@ -1,80 +1,158 @@
- SUBROUTINE SGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
- $ LDV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOB, SIDE
- INTEGER IHI, ILO, INFO, LDV, M, N
-* ..
-* .. Array Arguments ..
- REAL LSCALE( * ), RSCALE( * ), V( LDV, * )
-* ..
-*
+*> \brief \b SGGBAK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+* LDV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB, SIDE
+* INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+* REAL LSCALE( * ), RSCALE( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* SGGBAK forms the right or left eigenvectors of a real generalized
-* eigenvalue problem A*x = lambda*B*x, by backward transformation on
-* the computed eigenvectors of the balanced pair of matrices output by
-* SGGBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGBAK forms the right or left eigenvectors of a real generalized
+*> eigenvalue problem A*x = lambda*B*x, by backward transformation on
+*> the computed eigenvectors of the balanced pair of matrices output by
+*> SGGBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the type of backward transformation required:
-* = 'N': do nothing, return immediately;
-* = 'P': do backward transformation for permutation only;
-* = 'S': do backward transformation for scaling only;
-* = 'B': do backward transformations for both permutation and
-* scaling.
-* JOB must be the same as the argument JOB supplied to SGGBAL.
-*
-* SIDE (input) CHARACTER*1
-* = 'R': V contains right eigenvectors;
-* = 'L': V contains left eigenvectors.
-*
-* N (input) INTEGER
-* The number of rows of the matrix V. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* The integers ILO and IHI determined by SGGBAL.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* LSCALE (input) REAL array, dimension (N)
-* Details of the permutations and/or scaling factors applied
-* to the left side of A and B, as returned by SGGBAL.
-*
-* RSCALE (input) REAL array, dimension (N)
-* Details of the permutations and/or scaling factors applied
-* to the right side of A and B, as returned by SGGBAL.
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the type of backward transformation required:
+*> = 'N': do nothing, return immediately;
+*> = 'P': do backward transformation for permutation only;
+*> = 'S': do backward transformation for scaling only;
+*> = 'B': do backward transformations for both permutation and
+*> scaling.
+*> JOB must be the same as the argument JOB supplied to SGGBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': V contains right eigenvectors;
+*> = 'L': V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrix V. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> The integers ILO and IHI determined by SGGBAL.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] LSCALE
+*> \verbatim
+*> LSCALE is REAL array, dimension (N)
+*> Details of the permutations and/or scaling factors applied
+*> to the left side of A and B, as returned by SGGBAL.
+*> \endverbatim
+*>
+*> \param[in] RSCALE
+*> \verbatim
+*> RSCALE is REAL array, dimension (N)
+*> Details of the permutations and/or scaling factors applied
+*> to the right side of A and B, as returned by SGGBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix V. M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,M)
+*> On entry, the matrix of right or left eigenvectors to be
+*> transformed, as returned by STGEVC.
+*> On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the matrix V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of columns of the matrix V. M >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* V (input/output) REAL array, dimension (LDV,M)
-* On entry, the matrix of right or left eigenvectors to be
-* transformed, as returned by STGEVC.
-* On exit, V is overwritten by the transformed eigenvectors.
+*> \date November 2011
*
-* LDV (input) INTEGER
-* The leading dimension of the matrix V. LDV >= max(1,N).
+*> \ingroup realGBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> See R.C. Ward, Balancing the generalized eigenvalue problem,
+*> SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+ $ LDV, INFO )
*
-* See R.C. Ward, Balancing the generalized eigenvalue problem,
-* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER JOB, SIDE
+ INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+ REAL LSCALE( * ), RSCALE( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sggbal.f b/SRC/sggbal.f
index a66548bc..64f843cf 100644
--- a/SRC/sggbal.f
+++ b/SRC/sggbal.f
@@ -1,10 +1,180 @@
+*> \brief \b SGGBAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
+* RSCALE, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER IHI, ILO, INFO, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), LSCALE( * ),
+* $ RSCALE( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGBAL balances a pair of general real matrices (A,B). This
+*> involves, first, permuting A and B by similarity transformations to
+*> isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
+*> elements on the diagonal; and second, applying a diagonal similarity
+*> transformation to rows and columns ILO to IHI to make the rows
+*> and columns as close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrices, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors in the
+*> generalized eigenvalue problem A*x = lambda*B*x.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the operations to be performed on A and B:
+*> = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
+*> and RSCALE(I) = 1.0 for i = 1,...,N.
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the input matrix A.
+*> On exit, A is overwritten by the balanced matrix.
+*> If JOB = 'N', A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> On entry, the input matrix B.
+*> On exit, B is overwritten by the balanced matrix.
+*> If JOB = 'N', B is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are set to integers such that on exit
+*> A(i,j) = 0 and B(i,j) = 0 if i > j and
+*> j = 1,...,ILO-1 or i = IHI+1,...,N.
+*> If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the left side of A and B. If P(j) is the index of the
+*> row interchanged with row j, and D(j)
+*> is the scaling factor applied to row j, then
+*> LSCALE(j) = P(j) for J = 1,...,ILO-1
+*> = D(j) for J = ILO,...,IHI
+*> = P(j) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the right side of A and B. If P(j) is the index of the
+*> column interchanged with column j, and D(j)
+*> is the scaling factor applied to column j, then
+*> LSCALE(j) = P(j) for J = 1,...,ILO-1
+*> = D(j) for J = ILO,...,IHI
+*> = P(j) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (lwork)
+*> lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
+*> at least 1 when JOB = 'N' or 'P'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> See R.C. WARD, Balancing the generalized eigenvalue problem,
+*> SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
$ RSCALE, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOB
@@ -15,94 +185,6 @@
$ RSCALE( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGGBAL balances a pair of general real matrices (A,B). This
-* involves, first, permuting A and B by similarity transformations to
-* isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
-* elements on the diagonal; and second, applying a diagonal similarity
-* transformation to rows and columns ILO to IHI to make the rows
-* and columns as close in norm as possible. Both steps are optional.
-*
-* Balancing may reduce the 1-norm of the matrices, and improve the
-* accuracy of the computed eigenvalues and/or eigenvectors in the
-* generalized eigenvalue problem A*x = lambda*B*x.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies the operations to be performed on A and B:
-* = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
-* and RSCALE(I) = 1.0 for i = 1,...,N.
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the input matrix A.
-* On exit, A is overwritten by the balanced matrix.
-* If JOB = 'N', A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the input matrix B.
-* On exit, B is overwritten by the balanced matrix.
-* If JOB = 'N', B is not referenced.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are set to integers such that on exit
-* A(i,j) = 0 and B(i,j) = 0 if i > j and
-* j = 1,...,ILO-1 or i = IHI+1,...,N.
-* If JOB = 'N' or 'S', ILO = 1 and IHI = N.
-*
-* LSCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the left side of A and B. If P(j) is the index of the
-* row interchanged with row j, and D(j)
-* is the scaling factor applied to row j, then
-* LSCALE(j) = P(j) for J = 1,...,ILO-1
-* = D(j) for J = ILO,...,IHI
-* = P(j) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* RSCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the right side of A and B. If P(j) is the index of the
-* column interchanged with column j, and D(j)
-* is the scaling factor applied to column j, then
-* LSCALE(j) = P(j) for J = 1,...,ILO-1
-* = D(j) for J = ILO,...,IHI
-* = P(j) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* WORK (workspace) REAL array, dimension (lwork)
-* lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
-* at least 1 when JOB = 'N' or 'P'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* See R.C. WARD, Balancing the generalized eigenvalue problem,
-* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgges.f b/SRC/sgges.f
index fb8de1b5..240651ff 100644
--- a/SRC/sgges.f
+++ b/SRC/sgges.f
@@ -1,11 +1,288 @@
+*> \brief <b> SGGES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
+* SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR,
+* LDVSR, WORK, LWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR, SORT
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), VSL( LDVSL, * ),
+* $ VSR( LDVSR, * ), WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELCTG
+* EXTERNAL SELCTG
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGES computes for a pair of N-by-N real nonsymmetric matrices (A,B),
+*> the generalized eigenvalues, the generalized real Schur form (S,T),
+*> optionally, the left and/or right matrices of Schur vectors (VSL and
+*> VSR). This gives the generalized Schur factorization
+*>
+*> (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T )
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> quasi-triangular matrix S and the upper triangular matrix T.The
+*> leading columns of VSL and VSR then form an orthonormal basis for the
+*> corresponding left and right eigenspaces (deflating subspaces).
+*>
+*> (If only the generalized eigenvalues are needed, use the driver
+*> SGGEV instead, which is faster.)
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0 or both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized real Schur form if T is
+*> upper triangular with non-negative diagonal and S is block upper
+*> triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond
+*> to real generalized eigenvalues, while 2-by-2 blocks of S will be
+*> "standardized" by making the corresponding elements of T have the
+*> form:
+*> [ a 0 ]
+*> [ 0 b ]
+*>
+*> and the pair of corresponding 2-by-2 blocks in S and T will have a
+*> complex conjugate pair of generalized eigenvalues.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the generalized Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELCTG);
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*> SELCTG is procedure) LOGICAL FUNCTION of three REAL arguments
+*> SELCTG must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'N', SELCTG is not referenced.
+*> If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if
+*> SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
+*> one of a complex conjugate pair of eigenvalues is selected,
+*> then both complex eigenvalues are selected.
+*> \endverbatim
+*> \verbatim
+*> Note that in the ill-conditioned case, a selected complex
+*> eigenvalue may no longer satisfy SELCTG(ALPHAR(j),ALPHAI(j),
+*> BETA(j)) = .TRUE. after ordering. INFO is to be set to N+2
+*> in this case.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the first of the pair of matrices.
+*> On exit, A has been overwritten by its generalized Schur
+*> form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the second of the pair of matrices.
+*> On exit, B has been overwritten by its generalized Schur
+*> form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELCTG is true. (Complex conjugate pairs for which
+*> SELCTG is true for either eigenvalue count as 2.)
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i,
+*> and BETA(j),j=1,...,N are the diagonals of the complex Schur
+*> form (S,T) that would result if the 2-by-2 diagonal blocks of
+*> the real Schur form of (A,B) were further reduced to
+*> triangular form using 2-by-2 complex unitary transformations.
+*> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
+*> positive, then the j-th and (j+1)-st eigenvalues are a
+*> complex conjugate pair, with ALPHAI(j+1) negative.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
+*> may easily over- or underflow, and BETA(j) may even be zero.
+*> Thus, the user should avoid naively computing the ratio.
+*> However, ALPHAR and ALPHAI will be always less than and
+*> usually comparable with norm(A) in magnitude, and BETA always
+*> less than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is REAL array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >=1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is REAL array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N = 0, LWORK >= 1, else LWORK >= max(8*N,6*N+16).
+*> For good performance , LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
+*> be correct for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in SHGEQZ.
+*> =N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Generalized Schur form no
+*> longer satisfy SELCTG=.TRUE. This could also
+*> be caused due to scaling.
+*> =N+3: reordering failed in STGSEN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+* =====================================================================
SUBROUTINE SGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
$ SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR,
$ LDVSR, WORK, LWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR, SORT
@@ -22,169 +299,6 @@
EXTERNAL SELCTG
* ..
*
-* Purpose
-* =======
-*
-* SGGES computes for a pair of N-by-N real nonsymmetric matrices (A,B),
-* the generalized eigenvalues, the generalized real Schur form (S,T),
-* optionally, the left and/or right matrices of Schur vectors (VSL and
-* VSR). This gives the generalized Schur factorization
-*
-* (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T )
-*
-* Optionally, it also orders the eigenvalues so that a selected cluster
-* of eigenvalues appears in the leading diagonal blocks of the upper
-* quasi-triangular matrix S and the upper triangular matrix T.The
-* leading columns of VSL and VSR then form an orthonormal basis for the
-* corresponding left and right eigenspaces (deflating subspaces).
-*
-* (If only the generalized eigenvalues are needed, use the driver
-* SGGEV instead, which is faster.)
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is a
-* reasonable interpretation for beta=0 or both being zero.
-*
-* A pair of matrices (S,T) is in generalized real Schur form if T is
-* upper triangular with non-negative diagonal and S is block upper
-* triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond
-* to real generalized eigenvalues, while 2-by-2 blocks of S will be
-* "standardized" by making the corresponding elements of T have the
-* form:
-* [ a 0 ]
-* [ 0 b ]
-*
-* and the pair of corresponding 2-by-2 blocks in S and T will have a
-* complex conjugate pair of generalized eigenvalues.
-*
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors.
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the generalized Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELCTG);
-*
-* SELCTG (external procedure) LOGICAL FUNCTION of three REAL arguments
-* SELCTG must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'N', SELCTG is not referenced.
-* If SORT = 'S', SELCTG is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if
-* SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
-* one of a complex conjugate pair of eigenvalues is selected,
-* then both complex eigenvalues are selected.
-*
-* Note that in the ill-conditioned case, a selected complex
-* eigenvalue may no longer satisfy SELCTG(ALPHAR(j),ALPHAI(j),
-* BETA(j)) = .TRUE. after ordering. INFO is to be set to N+2
-* in this case.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the first of the pair of matrices.
-* On exit, A has been overwritten by its generalized Schur
-* form S.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the second of the pair of matrices.
-* On exit, B has been overwritten by its generalized Schur
-* form T.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELCTG is true. (Complex conjugate pairs for which
-* SELCTG is true for either eigenvalue count as 2.)
-*
-* ALPHAR (output) REAL array, dimension (N)
-*
-* ALPHAI (output) REAL array, dimension (N)
-*
-* BETA (output) REAL array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i,
-* and BETA(j),j=1,...,N are the diagonals of the complex Schur
-* form (S,T) that would result if the 2-by-2 diagonal blocks of
-* the real Schur form of (A,B) were further reduced to
-* triangular form using 2-by-2 complex unitary transformations.
-* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
-* positive, then the j-th and (j+1)-st eigenvalues are a
-* complex conjugate pair, with ALPHAI(j+1) negative.
-*
-* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
-* may easily over- or underflow, and BETA(j) may even be zero.
-* Thus, the user should avoid naively computing the ratio.
-* However, ALPHAR and ALPHAI will be always less than and
-* usually comparable with norm(A) in magnitude, and BETA always
-* less than and usually comparable with norm(B).
-*
-* VSL (output) REAL array, dimension (LDVSL,N)
-* If JOBVSL = 'V', VSL will contain the left Schur vectors.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >=1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) REAL array, dimension (LDVSR,N)
-* If JOBVSR = 'V', VSR will contain the right Schur vectors.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N = 0, LWORK >= 1, else LWORK >= max(8*N,6*N+16).
-* For good performance , LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
-* be correct for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in SHGEQZ.
-* =N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Generalized Schur form no
-* longer satisfy SELCTG=.TRUE. This could also
-* be caused due to scaling.
-* =N+3: reordering failed in STGSEN.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sggesx.f b/SRC/sggesx.f
index 09776ffa..d033e984 100644
--- a/SRC/sggesx.f
+++ b/SRC/sggesx.f
@@ -1,12 +1,371 @@
+*> \brief <b> SGGESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA,
+* B, LDB, SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL,
+* VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK,
+* LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR, SENSE, SORT
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LIWORK, LWORK, N,
+* $ SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), RCONDE( 2 ),
+* $ RCONDV( 2 ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+* $ WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELCTG
+* EXTERNAL SELCTG
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGESX computes for a pair of N-by-N real nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, the real Schur form (S,T), and,
+*> optionally, the left and/or right matrices of Schur vectors (VSL and
+*> VSR). This gives the generalized Schur factorization
+*>
+*> (A,B) = ( (VSL) S (VSR)**T, (VSL) T (VSR)**T )
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> quasi-triangular matrix S and the upper triangular matrix T; computes
+*> a reciprocal condition number for the average of the selected
+*> eigenvalues (RCONDE); and computes a reciprocal condition number for
+*> the right and left deflating subspaces corresponding to the selected
+*> eigenvalues (RCONDV). The leading columns of VSL and VSR then form
+*> an orthonormal basis for the corresponding left and right eigenspaces
+*> (deflating subspaces).
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0 or for both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized real Schur form if T is
+*> upper triangular with non-negative diagonal and S is block upper
+*> triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond
+*> to real generalized eigenvalues, while 2-by-2 blocks of S will be
+*> "standardized" by making the corresponding elements of T have the
+*> form:
+*> [ a 0 ]
+*> [ 0 b ]
+*>
+*> and the pair of corresponding 2-by-2 blocks in S and T will have a
+*> complex conjugate pair of generalized eigenvalues.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the generalized Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELCTG).
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*> SELCTG is procedure) LOGICAL FUNCTION of three REAL arguments
+*> SELCTG must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'N', SELCTG is not referenced.
+*> If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if
+*> SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
+*> one of a complex conjugate pair of eigenvalues is selected,
+*> then both complex eigenvalues are selected.
+*> Note that a selected complex eigenvalue may no longer satisfy
+*> SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) = .TRUE. after ordering,
+*> since ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned), in this
+*> case INFO is set to N+3.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N' : None are computed;
+*> = 'E' : Computed for average of selected eigenvalues only;
+*> = 'V' : Computed for selected deflating subspaces only;
+*> = 'B' : Computed for both.
+*> If SENSE = 'E', 'V', or 'B', SORT must equal 'S'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the first of the pair of matrices.
+*> On exit, A has been overwritten by its generalized Schur
+*> form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the second of the pair of matrices.
+*> On exit, B has been overwritten by its generalized Schur
+*> form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELCTG is true. (Complex conjugate pairs for which
+*> SELCTG is true for either eigenvalue count as 2.)
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
+*> and BETA(j),j=1,...,N are the diagonals of the complex Schur
+*> form (S,T) that would result if the 2-by-2 diagonal blocks of
+*> the real Schur form of (A,B) were further reduced to
+*> triangular form using 2-by-2 complex unitary transformations.
+*> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
+*> positive, then the j-th and (j+1)-st eigenvalues are a
+*> complex conjugate pair, with ALPHAI(j+1) negative.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
+*> may easily over- or underflow, and BETA(j) may even be zero.
+*> Thus, the user should avoid naively computing the ratio.
+*> However, ALPHAR and ALPHAI will be always less than and
+*> usually comparable with norm(A) in magnitude, and BETA always
+*> less than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is REAL array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >=1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is REAL array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension ( 2 )
+*> If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
+*> reciprocal condition numbers for the average of the selected
+*> eigenvalues.
+*> Not referenced if SENSE = 'N' or 'V'.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension ( 2 )
+*> If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
+*> reciprocal condition numbers for the selected deflating
+*> subspaces.
+*> Not referenced if SENSE = 'N' or 'E'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N = 0, LWORK >= 1, else if SENSE = 'E', 'V', or 'B',
+*> LWORK >= max( 8*N, 6*N+16, 2*SDIM*(N-SDIM) ), else
+*> LWORK >= max( 8*N, 6*N+16 ).
+*> Note that 2*SDIM*(N-SDIM) <= N*N/2.
+*> Note also that an error is only returned if
+*> LWORK < max( 8*N, 6*N+16), but if SENSE = 'E' or 'V' or 'B'
+*> this may not be large enough.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the bound on the optimal size of the WORK
+*> array and the minimum size of the IWORK array, returns these
+*> values as the first entries of the WORK and IWORK arrays, and
+*> no error message related to LWORK or LIWORK is issued by
+*> XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If SENSE = 'N' or N = 0, LIWORK >= 1, otherwise
+*> LIWORK >= N+6.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the bound on the optimal size of the
+*> WORK array and the minimum size of the IWORK array, returns
+*> these values as the first entries of the WORK and IWORK
+*> arrays, and no error message related to LWORK or LIWORK is
+*> issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
+*> be correct for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in SHGEQZ
+*> =N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Generalized Schur form no
+*> longer satisfy SELCTG=.TRUE. This could also
+*> be caused due to scaling.
+*> =N+3: reordering failed in STGSEN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> An approximate (asymptotic) bound on the average absolute error of
+*> the selected eigenvalues is
+*>
+*> EPS * norm((A, B)) / RCONDE( 1 ).
+*>
+*> An approximate (asymptotic) bound on the maximum angular error in
+*> the computed deflating subspaces is
+*>
+*> EPS * norm((A, B)) / RCONDV( 2 ).
+*>
+*> See LAPACK User's Guide, section 4.11 for more information.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA,
$ B, LDB, SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL,
$ VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK,
$ LIWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.1) --
+* -- LAPACK eigen routine (version 3.2.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR, SENSE, SORT
@@ -26,227 +385,6 @@
EXTERNAL SELCTG
* ..
*
-* Purpose
-* =======
-*
-* SGGESX computes for a pair of N-by-N real nonsymmetric matrices
-* (A,B), the generalized eigenvalues, the real Schur form (S,T), and,
-* optionally, the left and/or right matrices of Schur vectors (VSL and
-* VSR). This gives the generalized Schur factorization
-*
-* (A,B) = ( (VSL) S (VSR)**T, (VSL) T (VSR)**T )
-*
-* Optionally, it also orders the eigenvalues so that a selected cluster
-* of eigenvalues appears in the leading diagonal blocks of the upper
-* quasi-triangular matrix S and the upper triangular matrix T; computes
-* a reciprocal condition number for the average of the selected
-* eigenvalues (RCONDE); and computes a reciprocal condition number for
-* the right and left deflating subspaces corresponding to the selected
-* eigenvalues (RCONDV). The leading columns of VSL and VSR then form
-* an orthonormal basis for the corresponding left and right eigenspaces
-* (deflating subspaces).
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is a
-* reasonable interpretation for beta=0 or for both being zero.
-*
-* A pair of matrices (S,T) is in generalized real Schur form if T is
-* upper triangular with non-negative diagonal and S is block upper
-* triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond
-* to real generalized eigenvalues, while 2-by-2 blocks of S will be
-* "standardized" by making the corresponding elements of T have the
-* form:
-* [ a 0 ]
-* [ 0 b ]
-*
-* and the pair of corresponding 2-by-2 blocks in S and T will have a
-* complex conjugate pair of generalized eigenvalues.
-*
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors.
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the generalized Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELCTG).
-*
-* SELCTG (external procedure) LOGICAL FUNCTION of three REAL arguments
-* SELCTG must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'N', SELCTG is not referenced.
-* If SORT = 'S', SELCTG is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if
-* SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either
-* one of a complex conjugate pair of eigenvalues is selected,
-* then both complex eigenvalues are selected.
-* Note that a selected complex eigenvalue may no longer satisfy
-* SELCTG(ALPHAR(j),ALPHAI(j),BETA(j)) = .TRUE. after ordering,
-* since ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned), in this
-* case INFO is set to N+3.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N' : None are computed;
-* = 'E' : Computed for average of selected eigenvalues only;
-* = 'V' : Computed for selected deflating subspaces only;
-* = 'B' : Computed for both.
-* If SENSE = 'E', 'V', or 'B', SORT must equal 'S'.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the first of the pair of matrices.
-* On exit, A has been overwritten by its generalized Schur
-* form S.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the second of the pair of matrices.
-* On exit, B has been overwritten by its generalized Schur
-* form T.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELCTG is true. (Complex conjugate pairs for which
-* SELCTG is true for either eigenvalue count as 2.)
-*
-* ALPHAR (output) REAL array, dimension (N)
-*
-* ALPHAI (output) REAL array, dimension (N)
-*
-* BETA (output) REAL array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
-* and BETA(j),j=1,...,N are the diagonals of the complex Schur
-* form (S,T) that would result if the 2-by-2 diagonal blocks of
-* the real Schur form of (A,B) were further reduced to
-* triangular form using 2-by-2 complex unitary transformations.
-* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
-* positive, then the j-th and (j+1)-st eigenvalues are a
-* complex conjugate pair, with ALPHAI(j+1) negative.
-*
-* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
-* may easily over- or underflow, and BETA(j) may even be zero.
-* Thus, the user should avoid naively computing the ratio.
-* However, ALPHAR and ALPHAI will be always less than and
-* usually comparable with norm(A) in magnitude, and BETA always
-* less than and usually comparable with norm(B).
-*
-* VSL (output) REAL array, dimension (LDVSL,N)
-* If JOBVSL = 'V', VSL will contain the left Schur vectors.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >=1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) REAL array, dimension (LDVSR,N)
-* If JOBVSR = 'V', VSR will contain the right Schur vectors.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* RCONDE (output) REAL array, dimension ( 2 )
-* If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
-* reciprocal condition numbers for the average of the selected
-* eigenvalues.
-* Not referenced if SENSE = 'N' or 'V'.
-*
-* RCONDV (output) REAL array, dimension ( 2 )
-* If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
-* reciprocal condition numbers for the selected deflating
-* subspaces.
-* Not referenced if SENSE = 'N' or 'E'.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N = 0, LWORK >= 1, else if SENSE = 'E', 'V', or 'B',
-* LWORK >= max( 8*N, 6*N+16, 2*SDIM*(N-SDIM) ), else
-* LWORK >= max( 8*N, 6*N+16 ).
-* Note that 2*SDIM*(N-SDIM) <= N*N/2.
-* Note also that an error is only returned if
-* LWORK < max( 8*N, 6*N+16), but if SENSE = 'E' or 'V' or 'B'
-* this may not be large enough.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the bound on the optimal size of the WORK
-* array and the minimum size of the IWORK array, returns these
-* values as the first entries of the WORK and IWORK arrays, and
-* no error message related to LWORK or LIWORK is issued by
-* XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If SENSE = 'N' or N = 0, LIWORK >= 1, otherwise
-* LIWORK >= N+6.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the bound on the optimal size of the
-* WORK array and the minimum size of the IWORK array, returns
-* these values as the first entries of the WORK and IWORK
-* arrays, and no error message related to LWORK or LIWORK is
-* issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
-* be correct for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in SHGEQZ
-* =N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Generalized Schur form no
-* longer satisfy SELCTG=.TRUE. This could also
-* be caused due to scaling.
-* =N+3: reordering failed in STGSEN.
-*
-* Further Details
-* ===============
-*
-* An approximate (asymptotic) bound on the average absolute error of
-* the selected eigenvalues is
-*
-* EPS * norm((A, B)) / RCONDE( 1 ).
-*
-* An approximate (asymptotic) bound on the maximum angular error in
-* the computed deflating subspaces is
-*
-* EPS * norm((A, B)) / RCONDV( 2 ).
-*
-* See LAPACK User's Guide, section 4.11 for more information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sggev.f b/SRC/sggev.f
index 4f5d1409..4a0698fd 100644
--- a/SRC/sggev.f
+++ b/SRC/sggev.f
@@ -1,10 +1,229 @@
+*> \brief <b> SGGEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
+* BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B)
+*> the generalized eigenvalues, and optionally, the left and/or right
+*> generalized eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*>
+*> A * v(j) = lambda(j) * B * v(j).
+*>
+*> The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*>
+*> u(j)**H * A = lambda(j) * u(j)**H * B .
+*>
+*> where u(j)**H is the conjugate-transpose of u(j).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the matrix A in the pair (A,B).
+*> On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the matrix B in the pair (A,B).
+*> On exit, B has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. If ALPHAI(j) is zero, then
+*> the j-th eigenvalue is real; if positive, then the j-th and
+*> (j+1)-st eigenvalues are a complex conjugate pair, with
+*> ALPHAI(j+1) negative.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
+*> may easily over- or underflow, and BETA(j) may even be zero.
+*> Thus, the user should avoid naively computing the ratio
+*> alpha/beta. However, ALPHAR and ALPHAI will be always less
+*> than and usually comparable with norm(A) in magnitude, and
+*> BETA always less than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order as
+*> their eigenvalues. If the j-th eigenvalue is real, then
+*> u(j) = VL(:,j), the j-th column of VL. If the j-th and
+*> (j+1)-th eigenvalues form a complex conjugate pair, then
+*> u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
+*> Each eigenvector is scaled so the largest component has
+*> abs(real part)+abs(imag. part)=1.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order as
+*> their eigenvalues. If the j-th eigenvalue is real, then
+*> v(j) = VR(:,j), the j-th column of VR. If the j-th and
+*> (j+1)-th eigenvalues form a complex conjugate pair, then
+*> v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
+*> Each eigenvector is scaled so the largest component has
+*> abs(real part)+abs(imag. part)=1.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,8*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
+*> should be correct for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in SHGEQZ.
+*> =N+2: error return from STGEVC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+* =====================================================================
SUBROUTINE SGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
$ BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -16,130 +235,6 @@
$ VR( LDVR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B)
-* the generalized eigenvalues, and optionally, the left and/or right
-* generalized eigenvectors.
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar
-* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
-* singular. It is usually represented as the pair (alpha,beta), as
-* there is a reasonable interpretation for beta=0, and even for both
-* being zero.
-*
-* The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-*
-* A * v(j) = lambda(j) * B * v(j).
-*
-* The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-*
-* u(j)**H * A = lambda(j) * u(j)**H * B .
-*
-* where u(j)**H is the conjugate-transpose of u(j).
-*
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the matrix A in the pair (A,B).
-* On exit, A has been overwritten.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the matrix B in the pair (A,B).
-* On exit, B has been overwritten.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHAR (output) REAL array, dimension (N)
-*
-* ALPHAI (output) REAL array, dimension (N)
-*
-* BETA (output) REAL array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. If ALPHAI(j) is zero, then
-* the j-th eigenvalue is real; if positive, then the j-th and
-* (j+1)-st eigenvalues are a complex conjugate pair, with
-* ALPHAI(j+1) negative.
-*
-* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
-* may easily over- or underflow, and BETA(j) may even be zero.
-* Thus, the user should avoid naively computing the ratio
-* alpha/beta. However, ALPHAR and ALPHAI will be always less
-* than and usually comparable with norm(A) in magnitude, and
-* BETA always less than and usually comparable with norm(B).
-*
-* VL (output) REAL array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order as
-* their eigenvalues. If the j-th eigenvalue is real, then
-* u(j) = VL(:,j), the j-th column of VL. If the j-th and
-* (j+1)-th eigenvalues form a complex conjugate pair, then
-* u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
-* Each eigenvector is scaled so the largest component has
-* abs(real part)+abs(imag. part)=1.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) REAL array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order as
-* their eigenvalues. If the j-th eigenvalue is real, then
-* v(j) = VR(:,j), the j-th column of VR. If the j-th and
-* (j+1)-th eigenvalues form a complex conjugate pair, then
-* v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
-* Each eigenvector is scaled so the largest component has
-* abs(real part)+abs(imag. part)=1.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,8*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
-* should be correct for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in SHGEQZ.
-* =N+2: error return from STGEVC.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sggevx.f b/SRC/sggevx.f
index e1807793..4dc0f4d6 100644
--- a/SRC/sggevx.f
+++ b/SRC/sggevx.f
@@ -1,12 +1,396 @@
+*> \brief <b> SGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
+* ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, ILO,
+* IHI, LSCALE, RSCALE, ABNRM, BBNRM, RCONDE,
+* RCONDV, WORK, LWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER BALANC, JOBVL, JOBVR, SENSE
+* INTEGER IHI, ILO, INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* REAL ABNRM, BBNRM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), LSCALE( * ),
+* $ RCONDE( * ), RCONDV( * ), RSCALE( * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGEVX computes for a pair of N-by-N real nonsymmetric matrices (A,B)
+*> the generalized eigenvalues, and optionally, the left and/or right
+*> generalized eigenvectors.
+*>
+*> Optionally also, it computes a balancing transformation to improve
+*> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
+*> LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
+*> the eigenvalues (RCONDE), and reciprocal condition numbers for the
+*> right eigenvectors (RCONDV).
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*>
+*> A * v(j) = lambda(j) * B * v(j) .
+*>
+*> The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*>
+*> u(j)**H * A = lambda(j) * u(j)**H * B.
+*>
+*> where u(j)**H is the conjugate-transpose of u(j).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER*1
+*> Specifies the balance option to be performed.
+*> = 'N': do not diagonally scale or permute;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> Computed reciprocal condition numbers will be for the
+*> matrices after permuting and/or balancing. Permuting does
+*> not change condition numbers (in exact arithmetic), but
+*> balancing does.
+*> \endverbatim
+*>
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': none are computed;
+*> = 'E': computed for eigenvalues only;
+*> = 'V': computed for eigenvectors only;
+*> = 'B': computed for eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the matrix A in the pair (A,B).
+*> On exit, A has been overwritten. If JOBVL='V' or JOBVR='V'
+*> or both, then A contains the first part of the real Schur
+*> form of the "balanced" versions of the input A and B.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the matrix B in the pair (A,B).
+*> On exit, B has been overwritten. If JOBVL='V' or JOBVR='V'
+*> or both, then B contains the second part of the real Schur
+*> form of the "balanced" versions of the input A and B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. If ALPHAI(j) is zero, then
+*> the j-th eigenvalue is real; if positive, then the j-th and
+*> (j+1)-st eigenvalues are a complex conjugate pair, with
+*> ALPHAI(j+1) negative.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
+*> may easily over- or underflow, and BETA(j) may even be zero.
+*> Thus, the user should avoid naively computing the ratio
+*> ALPHA/BETA. However, ALPHAR and ALPHAI will be always less
+*> than and usually comparable with norm(A) in magnitude, and
+*> BETA always less than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order as
+*> their eigenvalues. If the j-th eigenvalue is real, then
+*> u(j) = VL(:,j), the j-th column of VL. If the j-th and
+*> (j+1)-th eigenvalues form a complex conjugate pair, then
+*> u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
+*> Each eigenvector will be scaled so the largest component have
+*> abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order as
+*> their eigenvalues. If the j-th eigenvalue is real, then
+*> v(j) = VR(:,j), the j-th column of VR. If the j-th and
+*> (j+1)-th eigenvalues form a complex conjugate pair, then
+*> v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
+*> Each eigenvector will be scaled so the largest component have
+*> abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are integer values such that on exit
+*> A(i,j) = 0 and B(i,j) = 0 if i > j and
+*> j = 1,...,ILO-1 or i = IHI+1,...,N.
+*> If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the left side of A and B. If PL(j) is the index of the
+*> row interchanged with row j, and DL(j) is the scaling
+*> factor applied to row j, then
+*> LSCALE(j) = PL(j) for j = 1,...,ILO-1
+*> = DL(j) for j = ILO,...,IHI
+*> = PL(j) for j = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is REAL array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the right side of A and B. If PR(j) is the index of the
+*> column interchanged with column j, and DR(j) is the scaling
+*> factor applied to column j, then
+*> RSCALE(j) = PR(j) for j = 1,...,ILO-1
+*> = DR(j) for j = ILO,...,IHI
+*> = PR(j) for j = IHI+1,...,N
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] ABNRM
+*> \verbatim
+*> ABNRM is REAL
+*> The one-norm of the balanced matrix A.
+*> \endverbatim
+*>
+*> \param[out] BBNRM
+*> \verbatim
+*> BBNRM is REAL
+*> The one-norm of the balanced matrix B.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension (N)
+*> If SENSE = 'E' or 'B', the reciprocal condition numbers of
+*> the eigenvalues, stored in consecutive elements of the array.
+*> For a complex conjugate pair of eigenvalues two consecutive
+*> elements of RCONDE are set to the same value. Thus RCONDE(j),
+*> RCONDV(j), and the j-th columns of VL and VR all correspond
+*> to the j-th eigenpair.
+*> If SENSE = 'N' or 'V', RCONDE is not referenced.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension (N)
+*> If SENSE = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the eigenvectors, stored in consecutive elements
+*> of the array. For a complex eigenvector two consecutive
+*> elements of RCONDV are set to the same value. If the
+*> eigenvalues cannot be reordered to compute RCONDV(j),
+*> RCONDV(j) is set to 0; this can only occur when the true
+*> value would be very small anyway.
+*> If SENSE = 'N' or 'E', RCONDV is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> If BALANC = 'S' or 'B', or JOBVL = 'V', or JOBVR = 'V',
+*> LWORK >= max(1,6*N).
+*> If SENSE = 'E', LWORK >= max(1,10*N).
+*> If SENSE = 'V' or 'B', LWORK >= 2*N*N+8*N+16.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N+6)
+*> If SENSE = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> If SENSE = 'N', BWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
+*> should be correct for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in SHGEQZ.
+*> =N+2: error return from STGEVC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Balancing a matrix pair (A,B) includes, first, permuting rows and
+*> columns to isolate eigenvalues, second, applying diagonal similarity
+*> transformation to the rows and columns to make the rows and columns
+*> as close in norm as possible. The computed reciprocal condition
+*> numbers correspond to the balanced matrix. Permuting rows and columns
+*> will not change the condition numbers (in exact arithmetic) but
+*> diagonal scaling will. For further explanation of balancing, see
+*> section 4.11.1.2 of LAPACK Users' Guide.
+*>
+*> An approximate error bound on the chordal distance between the i-th
+*> computed generalized eigenvalue w and the corresponding exact
+*> eigenvalue lambda is
+*>
+*> chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
+*>
+*> An approximate error bound for the angle between the i-th computed
+*> eigenvector VL(i) or VR(i) is given by
+*>
+*> EPS * norm(ABNRM, BBNRM) / DIF(i).
+*>
+*> For further explanation of the reciprocal condition numbers RCONDE
+*> and RCONDV, see section 4.11 of LAPACK User's Guide.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
$ ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, ILO,
$ IHI, LSCALE, RSCALE, ABNRM, BBNRM, RCONDE,
$ RCONDV, WORK, LWORK, IWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER BALANC, JOBVL, JOBVR, SENSE
@@ -22,248 +406,6 @@
$ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGGEVX computes for a pair of N-by-N real nonsymmetric matrices (A,B)
-* the generalized eigenvalues, and optionally, the left and/or right
-* generalized eigenvectors.
-*
-* Optionally also, it computes a balancing transformation to improve
-* the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
-* LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
-* the eigenvalues (RCONDE), and reciprocal condition numbers for the
-* right eigenvectors (RCONDV).
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar
-* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
-* singular. It is usually represented as the pair (alpha,beta), as
-* there is a reasonable interpretation for beta=0, and even for both
-* being zero.
-*
-* The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-*
-* A * v(j) = lambda(j) * B * v(j) .
-*
-* The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-*
-* u(j)**H * A = lambda(j) * u(j)**H * B.
-*
-* where u(j)**H is the conjugate-transpose of u(j).
-*
-*
-* Arguments
-* =========
-*
-* BALANC (input) CHARACTER*1
-* Specifies the balance option to be performed.
-* = 'N': do not diagonally scale or permute;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-* Computed reciprocal condition numbers will be for the
-* matrices after permuting and/or balancing. Permuting does
-* not change condition numbers (in exact arithmetic), but
-* balancing does.
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': none are computed;
-* = 'E': computed for eigenvalues only;
-* = 'V': computed for eigenvectors only;
-* = 'B': computed for eigenvalues and eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the matrix A in the pair (A,B).
-* On exit, A has been overwritten. If JOBVL='V' or JOBVR='V'
-* or both, then A contains the first part of the real Schur
-* form of the "balanced" versions of the input A and B.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the matrix B in the pair (A,B).
-* On exit, B has been overwritten. If JOBVL='V' or JOBVR='V'
-* or both, then B contains the second part of the real Schur
-* form of the "balanced" versions of the input A and B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHAR (output) REAL array, dimension (N)
-*
-* ALPHAI (output) REAL array, dimension (N)
-*
-* BETA (output) REAL array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. If ALPHAI(j) is zero, then
-* the j-th eigenvalue is real; if positive, then the j-th and
-* (j+1)-st eigenvalues are a complex conjugate pair, with
-* ALPHAI(j+1) negative.
-*
-* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
-* may easily over- or underflow, and BETA(j) may even be zero.
-* Thus, the user should avoid naively computing the ratio
-* ALPHA/BETA. However, ALPHAR and ALPHAI will be always less
-* than and usually comparable with norm(A) in magnitude, and
-* BETA always less than and usually comparable with norm(B).
-*
-* VL (output) REAL array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order as
-* their eigenvalues. If the j-th eigenvalue is real, then
-* u(j) = VL(:,j), the j-th column of VL. If the j-th and
-* (j+1)-th eigenvalues form a complex conjugate pair, then
-* u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
-* Each eigenvector will be scaled so the largest component have
-* abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) REAL array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order as
-* their eigenvalues. If the j-th eigenvalue is real, then
-* v(j) = VR(:,j), the j-th column of VR. If the j-th and
-* (j+1)-th eigenvalues form a complex conjugate pair, then
-* v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
-* Each eigenvector will be scaled so the largest component have
-* abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are integer values such that on exit
-* A(i,j) = 0 and B(i,j) = 0 if i > j and
-* j = 1,...,ILO-1 or i = IHI+1,...,N.
-* If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
-*
-* LSCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the left side of A and B. If PL(j) is the index of the
-* row interchanged with row j, and DL(j) is the scaling
-* factor applied to row j, then
-* LSCALE(j) = PL(j) for j = 1,...,ILO-1
-* = DL(j) for j = ILO,...,IHI
-* = PL(j) for j = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* RSCALE (output) REAL array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the right side of A and B. If PR(j) is the index of the
-* column interchanged with column j, and DR(j) is the scaling
-* factor applied to column j, then
-* RSCALE(j) = PR(j) for j = 1,...,ILO-1
-* = DR(j) for j = ILO,...,IHI
-* = PR(j) for j = IHI+1,...,N
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* ABNRM (output) REAL
-* The one-norm of the balanced matrix A.
-*
-* BBNRM (output) REAL
-* The one-norm of the balanced matrix B.
-*
-* RCONDE (output) REAL array, dimension (N)
-* If SENSE = 'E' or 'B', the reciprocal condition numbers of
-* the eigenvalues, stored in consecutive elements of the array.
-* For a complex conjugate pair of eigenvalues two consecutive
-* elements of RCONDE are set to the same value. Thus RCONDE(j),
-* RCONDV(j), and the j-th columns of VL and VR all correspond
-* to the j-th eigenpair.
-* If SENSE = 'N' or 'V', RCONDE is not referenced.
-*
-* RCONDV (output) REAL array, dimension (N)
-* If SENSE = 'V' or 'B', the estimated reciprocal condition
-* numbers of the eigenvectors, stored in consecutive elements
-* of the array. For a complex eigenvector two consecutive
-* elements of RCONDV are set to the same value. If the
-* eigenvalues cannot be reordered to compute RCONDV(j),
-* RCONDV(j) is set to 0; this can only occur when the true
-* value would be very small anyway.
-* If SENSE = 'N' or 'E', RCONDV is not referenced.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* If BALANC = 'S' or 'B', or JOBVL = 'V', or JOBVR = 'V',
-* LWORK >= max(1,6*N).
-* If SENSE = 'E', LWORK >= max(1,10*N).
-* If SENSE = 'V' or 'B', LWORK >= 2*N*N+8*N+16.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (N+6)
-* If SENSE = 'E', IWORK is not referenced.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* If SENSE = 'N', BWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHAR(j), ALPHAI(j), and BETA(j)
-* should be correct for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in SHGEQZ.
-* =N+2: error return from STGEVC.
-*
-* Further Details
-* ===============
-*
-* Balancing a matrix pair (A,B) includes, first, permuting rows and
-* columns to isolate eigenvalues, second, applying diagonal similarity
-* transformation to the rows and columns to make the rows and columns
-* as close in norm as possible. The computed reciprocal condition
-* numbers correspond to the balanced matrix. Permuting rows and columns
-* will not change the condition numbers (in exact arithmetic) but
-* diagonal scaling will. For further explanation of balancing, see
-* section 4.11.1.2 of LAPACK Users' Guide.
-*
-* An approximate error bound on the chordal distance between the i-th
-* computed generalized eigenvalue w and the corresponding exact
-* eigenvalue lambda is
-*
-* chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
-*
-* An approximate error bound for the angle between the i-th computed
-* eigenvector VL(i) or VR(i) is given by
-*
-* EPS * norm(ABNRM, BBNRM) / DIF(i).
-*
-* For further explanation of the reciprocal condition numbers RCONDE
-* and RCONDV, see section 4.11 of LAPACK User's Guide.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sggglm.f b/SRC/sggglm.f
index 833dea90..3f483759 100644
--- a/SRC/sggglm.f
+++ b/SRC/sggglm.f
@@ -1,10 +1,185 @@
+*> \brief <b> SGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), D( * ), WORK( * ),
+* $ X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGGLM solves a general Gauss-Markov linear model (GLM) problem:
+*>
+*> minimize || y ||_2 subject to d = A*x + B*y
+*> x
+*>
+*> where A is an N-by-M matrix, B is an N-by-P matrix, and d is a
+*> given N-vector. It is assumed that M <= N <= M+P, and
+*>
+*> rank(A) = M and rank( A B ) = N.
+*>
+*> Under these assumptions, the constrained equation is always
+*> consistent, and there is a unique solution x and a minimal 2-norm
+*> solution y, which is obtained using a generalized QR factorization
+*> of the matrices (A, B) given by
+*>
+*> A = Q*(R), B = Q*T*Z.
+*> (0)
+*>
+*> In particular, if matrix B is square nonsingular, then the problem
+*> GLM is equivalent to the following weighted linear least squares
+*> problem
+*>
+*> minimize || inv(B)*(d-A*x) ||_2
+*> x
+*>
+*> where inv(B) denotes the inverse of B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= N-M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,M)
+*> On entry, the N-by-M matrix A.
+*> On exit, the upper triangular part of the array A contains
+*> the M-by-M upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,P)
+*> On entry, the N-by-P matrix B.
+*> On exit, if N <= P, the upper triangle of the subarray
+*> B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
+*> if N > P, the elements on and above the (N-P)th subdiagonal
+*> contain the N-by-P upper trapezoidal matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, D is the left hand side of the GLM equation.
+*> On exit, D is destroyed.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (M)
+*> \param[out] Y
+*> \verbatim
+*> Y is REAL array, dimension (P)
+*> On exit, X and Y are the solutions of the GLM problem.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N+M+P).
+*> For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB,
+*> where NB is an upper bound for the optimal blocksizes for
+*> SGEQRF, SGERQF, SORMQR and SORMRQ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the upper triangular factor R associated with A in the
+*> generalized QR factorization of the pair (A, B) is
+*> singular, so that rank(A) < M; the least squares
+*> solution could not be computed.
+*> = 2: the bottom (N-M) by (N-M) part of the upper trapezoidal
+*> factor T associated with B in the generalized QR
+*> factorization of the pair (A, B) is singular, so that
+*> rank( A B ) < N; the least squares solution could not
+*> be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, P
@@ -14,101 +189,6 @@
$ X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* SGGGLM solves a general Gauss-Markov linear model (GLM) problem:
-*
-* minimize || y ||_2 subject to d = A*x + B*y
-* x
-*
-* where A is an N-by-M matrix, B is an N-by-P matrix, and d is a
-* given N-vector. It is assumed that M <= N <= M+P, and
-*
-* rank(A) = M and rank( A B ) = N.
-*
-* Under these assumptions, the constrained equation is always
-* consistent, and there is a unique solution x and a minimal 2-norm
-* solution y, which is obtained using a generalized QR factorization
-* of the matrices (A, B) given by
-*
-* A = Q*(R), B = Q*T*Z.
-* (0)
-*
-* In particular, if matrix B is square nonsingular, then the problem
-* GLM is equivalent to the following weighted linear least squares
-* problem
-*
-* minimize || inv(B)*(d-A*x) ||_2
-* x
-*
-* where inv(B) denotes the inverse of B.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. 0 <= M <= N.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= N-M.
-*
-* A (input/output) REAL array, dimension (LDA,M)
-* On entry, the N-by-M matrix A.
-* On exit, the upper triangular part of the array A contains
-* the M-by-M upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,P)
-* On entry, the N-by-P matrix B.
-* On exit, if N <= P, the upper triangle of the subarray
-* B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
-* if N > P, the elements on and above the (N-P)th subdiagonal
-* contain the N-by-P upper trapezoidal matrix T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, D is the left hand side of the GLM equation.
-* On exit, D is destroyed.
-*
-* X (output) REAL array, dimension (M)
-* Y (output) REAL array, dimension (P)
-* On exit, X and Y are the solutions of the GLM problem.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N+M+P).
-* For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB,
-* where NB is an upper bound for the optimal blocksizes for
-* SGEQRF, SGERQF, SORMQR and SORMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the upper triangular factor R associated with A in the
-* generalized QR factorization of the pair (A, B) is
-* singular, so that rank(A) < M; the least squares
-* solution could not be computed.
-* = 2: the bottom (N-M) by (N-M) part of the upper trapezoidal
-* factor T associated with B in the generalized QR
-* factorization of the pair (A, B) is singular, so that
-* rank( A B ) < N; the least squares solution could not
-* be computed.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/sgghrd.f b/SRC/sgghrd.f
index 765aa3ab..fef49c04 100644
--- a/SRC/sgghrd.f
+++ b/SRC/sgghrd.f
@@ -1,10 +1,208 @@
+*> \brief \b SGGHRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
+* LDQ, Z, LDZ, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, COMPZ
+* INTEGER IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGHRD reduces a pair of real matrices (A,B) to generalized upper
+*> Hessenberg form using orthogonal transformations, where A is a
+*> general matrix and B is upper triangular. The form of the
+*> generalized eigenvalue problem is
+*> A*x = lambda*B*x,
+*> and B is typically made upper triangular by computing its QR
+*> factorization and moving the orthogonal matrix Q to the left side
+*> of the equation.
+*>
+*> This subroutine simultaneously reduces A to a Hessenberg matrix H:
+*> Q**T*A*Z = H
+*> and transforms B to another upper triangular matrix T:
+*> Q**T*B*Z = T
+*> in order to reduce the problem to its standard form
+*> H*y = lambda*T*y
+*> where y = Z**T*x.
+*>
+*> The orthogonal matrices Q and Z are determined as products of Givens
+*> rotations. They may either be formed explicitly, or they may be
+*> postmultiplied into input matrices Q1 and Z1, so that
+*>
+*> Q1 * A * Z1**T = (Q1*Q) * H * (Z1*Z)**T
+*>
+*> Q1 * B * Z1**T = (Q1*Q) * T * (Z1*Z)**T
+*>
+*> If Q1 is the orthogonal matrix from the QR factorization of B in the
+*> original equation A*x = lambda*B*x, then SGGHRD reduces the original
+*> problem to generalized Hessenberg form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'N': do not compute Q;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> orthogonal matrix Q is returned;
+*> = 'V': Q must contain an orthogonal matrix Q1 on entry,
+*> and the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': do not compute Z;
+*> = 'I': Z is initialized to the unit matrix, and the
+*> orthogonal matrix Z is returned;
+*> = 'V': Z must contain an orthogonal matrix Z1 on entry,
+*> and the product Z1*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI mark the rows and columns of A which are to be
+*> reduced. It is assumed that A is already upper triangular
+*> in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
+*> normally set by a previous call to SGGBAL; otherwise they
+*> should be set to 1 and N respectively.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the N-by-N general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> rest is set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the N-by-N upper triangular matrix B.
+*> On exit, the upper triangular matrix T = Q**T B Z. The
+*> elements below the diagonal are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, N)
+*> On entry, if COMPQ = 'V', the orthogonal matrix Q1,
+*> typically from the QR factorization of B.
+*> On exit, if COMPQ='I', the orthogonal matrix Q, and if
+*> COMPQ = 'V', the product Q1*Q.
+*> Not referenced if COMPQ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the orthogonal matrix Z1.
+*> On exit, if COMPZ='I', the orthogonal matrix Z, and if
+*> COMPZ = 'V', the product Z1*Z.
+*> Not referenced if COMPZ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z.
+*> LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine reduces A to Hessenberg and B to triangular form by
+*> an unblocked reduction, as described in _Matrix_Computations_,
+*> by Golub and Van Loan (Johns Hopkins Press.)
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
$ LDQ, Z, LDZ, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, COMPZ
@@ -15,116 +213,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SGGHRD reduces a pair of real matrices (A,B) to generalized upper
-* Hessenberg form using orthogonal transformations, where A is a
-* general matrix and B is upper triangular. The form of the
-* generalized eigenvalue problem is
-* A*x = lambda*B*x,
-* and B is typically made upper triangular by computing its QR
-* factorization and moving the orthogonal matrix Q to the left side
-* of the equation.
-*
-* This subroutine simultaneously reduces A to a Hessenberg matrix H:
-* Q**T*A*Z = H
-* and transforms B to another upper triangular matrix T:
-* Q**T*B*Z = T
-* in order to reduce the problem to its standard form
-* H*y = lambda*T*y
-* where y = Z**T*x.
-*
-* The orthogonal matrices Q and Z are determined as products of Givens
-* rotations. They may either be formed explicitly, or they may be
-* postmultiplied into input matrices Q1 and Z1, so that
-*
-* Q1 * A * Z1**T = (Q1*Q) * H * (Z1*Z)**T
-*
-* Q1 * B * Z1**T = (Q1*Q) * T * (Z1*Z)**T
-*
-* If Q1 is the orthogonal matrix from the QR factorization of B in the
-* original equation A*x = lambda*B*x, then SGGHRD reduces the original
-* problem to generalized Hessenberg form.
-*
-* Arguments
-* =========
-*
-* COMPQ (input) CHARACTER*1
-* = 'N': do not compute Q;
-* = 'I': Q is initialized to the unit matrix, and the
-* orthogonal matrix Q is returned;
-* = 'V': Q must contain an orthogonal matrix Q1 on entry,
-* and the product Q1*Q is returned.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': do not compute Z;
-* = 'I': Z is initialized to the unit matrix, and the
-* orthogonal matrix Z is returned;
-* = 'V': Z must contain an orthogonal matrix Z1 on entry,
-* and the product Z1*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI mark the rows and columns of A which are to be
-* reduced. It is assumed that A is already upper triangular
-* in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
-* normally set by a previous call to SGGBAL; otherwise they
-* should be set to 1 and N respectively.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the N-by-N general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* rest is set to zero.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the N-by-N upper triangular matrix B.
-* On exit, the upper triangular matrix T = Q**T B Z. The
-* elements below the diagonal are set to zero.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) REAL array, dimension (LDQ, N)
-* On entry, if COMPQ = 'V', the orthogonal matrix Q1,
-* typically from the QR factorization of B.
-* On exit, if COMPQ='I', the orthogonal matrix Q, and if
-* COMPQ = 'V', the product Q1*Q.
-* Not referenced if COMPQ='N'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
-*
-* Z (input/output) REAL array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the orthogonal matrix Z1.
-* On exit, if COMPZ='I', the orthogonal matrix Z, and if
-* COMPZ = 'V', the product Z1*Z.
-* Not referenced if COMPZ='N'.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z.
-* LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* This routine reduces A to Hessenberg and B to triangular form by
-* an unblocked reduction, as described in _Matrix_Computations_,
-* by Golub and Van Loan (Johns Hopkins Press.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgglse.f b/SRC/sgglse.f
index fffc3f83..67bd68b2 100644
--- a/SRC/sgglse.f
+++ b/SRC/sgglse.f
@@ -1,10 +1,182 @@
+*> \brief <b> SGGLSE solves overdetermined or underdetermined systems for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), C( * ), D( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGLSE solves the linear equality-constrained least squares (LSE)
+*> problem:
+*>
+*> minimize || c - A*x ||_2 subject to B*x = d
+*>
+*> where A is an M-by-N matrix, B is a P-by-N matrix, c is a given
+*> M-vector, and d is a given P-vector. It is assumed that
+*> P <= N <= M+P, and
+*>
+*> rank(B) = P and rank( (A) ) = N.
+*> ( (B) )
+*>
+*> These conditions ensure that the LSE problem has a unique solution,
+*> which is obtained using a generalized RQ factorization of the
+*> matrices (B, A) given by
+*>
+*> B = (0 R)*Q, A = Z*T*Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. 0 <= P <= N <= M+P.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, the upper triangle of the subarray B(1:P,N-P+1:N)
+*> contains the P-by-P upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (M)
+*> On entry, C contains the right hand side vector for the
+*> least squares part of the LSE problem.
+*> On exit, the residual sum of squares for the solution
+*> is given by the sum of squares of elements N-P+1 to M of
+*> vector C.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (P)
+*> On entry, D contains the right hand side vector for the
+*> constrained equation.
+*> On exit, D is destroyed.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> On exit, X is the solution of the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M+N+P).
+*> For optimum performance LWORK >= P+min(M,N)+max(M,N)*NB,
+*> where NB is an upper bound for the optimal blocksizes for
+*> SGEQRF, SGERQF, SORMQR and SORMRQ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the upper triangular factor R associated with B in the
+*> generalized RQ factorization of the pair (B, A) is
+*> singular, so that rank(B) < P; the least squares
+*> solution could not be computed.
+*> = 2: the (N-P) by (N-P) part of the upper trapezoidal factor
+*> T associated with A in the generalized RQ factorization
+*> of the pair (B, A) is singular, so that
+*> rank( (A) ) < N; the least squares solution could not
+*> ( (B) )
+*> be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERsolve
+*
+* =====================================================================
SUBROUTINE SGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, P
@@ -14,98 +186,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* SGGLSE solves the linear equality-constrained least squares (LSE)
-* problem:
-*
-* minimize || c - A*x ||_2 subject to B*x = d
-*
-* where A is an M-by-N matrix, B is a P-by-N matrix, c is a given
-* M-vector, and d is a given P-vector. It is assumed that
-* P <= N <= M+P, and
-*
-* rank(B) = P and rank( (A) ) = N.
-* ( (B) )
-*
-* These conditions ensure that the LSE problem has a unique solution,
-* which is obtained using a generalized RQ factorization of the
-* matrices (B, A) given by
-*
-* B = (0 R)*Q, A = Z*T*Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. 0 <= P <= N <= M+P.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, the upper triangle of the subarray B(1:P,N-P+1:N)
-* contains the P-by-P upper triangular matrix R.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* C (input/output) REAL array, dimension (M)
-* On entry, C contains the right hand side vector for the
-* least squares part of the LSE problem.
-* On exit, the residual sum of squares for the solution
-* is given by the sum of squares of elements N-P+1 to M of
-* vector C.
-*
-* D (input/output) REAL array, dimension (P)
-* On entry, D contains the right hand side vector for the
-* constrained equation.
-* On exit, D is destroyed.
-*
-* X (output) REAL array, dimension (N)
-* On exit, X is the solution of the LSE problem.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M+N+P).
-* For optimum performance LWORK >= P+min(M,N)+max(M,N)*NB,
-* where NB is an upper bound for the optimal blocksizes for
-* SGEQRF, SGERQF, SORMQR and SORMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the upper triangular factor R associated with B in the
-* generalized RQ factorization of the pair (B, A) is
-* singular, so that rank(B) < P; the least squares
-* solution could not be computed.
-* = 2: the (N-P) by (N-P) part of the upper trapezoidal factor
-* T associated with A in the generalized RQ factorization
-* of the pair (B, A) is singular, so that
-* rank( (A) ) < N; the least squares solution could not
-* ( (B) )
-* be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sggqrf.f b/SRC/sggqrf.f
index 634fb440..387021b3 100644
--- a/SRC/sggqrf.f
+++ b/SRC/sggqrf.f
@@ -1,145 +1,203 @@
- SUBROUTINE SGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
- $ LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b SGGQRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGGQRF computes a generalized QR factorization of an N-by-M matrix A
-* and an N-by-P matrix B:
-*
-* A = Q*R, B = Q*T*Z,
-*
-* where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal
-* matrix, and R and T assume one of the forms:
-*
-* if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N,
-* ( 0 ) N-M N M-N
-* M
-*
-* where R11 is upper triangular, and
-*
-* if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P,
-* P-N N ( T21 ) P
-* P
-*
-* where T12 or T21 is upper triangular.
-*
-* In particular, if B is square and nonsingular, the GQR factorization
-* of A and B implicitly gives the QR factorization of inv(B)*A:
-*
-* inv(B)*A = Z**T*(inv(T)*R)
-*
-* where inv(B) denotes the inverse of the matrix B, and Z**T denotes the
-* transpose of the matrix Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGQRF computes a generalized QR factorization of an N-by-M matrix A
+*> and an N-by-P matrix B:
+*>
+*> A = Q*R, B = Q*T*Z,
+*>
+*> where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal
+*> matrix, and R and T assume one of the forms:
+*>
+*> if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N,
+*> ( 0 ) N-M N M-N
+*> M
+*>
+*> where R11 is upper triangular, and
+*>
+*> if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P,
+*> P-N N ( T21 ) P
+*> P
+*>
+*> where T12 or T21 is upper triangular.
+*>
+*> In particular, if B is square and nonsingular, the GQR factorization
+*> of A and B implicitly gives the QR factorization of inv(B)*A:
+*>
+*> inv(B)*A = Z**T*(inv(T)*R)
+*>
+*> where inv(B) denotes the inverse of the matrix B, and Z**T denotes the
+*> transpose of the matrix Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,M)
+*> On entry, the N-by-M matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(N,M)-by-M upper trapezoidal matrix R (R is
+*> upper triangular if N >= M); the elements below the diagonal,
+*> with the array TAUA, represent the orthogonal matrix Q as a
+*> product of min(N,M) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,M)
-* On entry, the N-by-M matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(N,M)-by-M upper trapezoidal matrix R (R is
-* upper triangular if N >= M); the elements below the diagonal,
-* with the array TAUA, represent the orthogonal matrix Q as a
-* product of min(N,M) elementary reflectors (see Further
-* Details).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* TAUA (output) REAL array, dimension (min(N,M))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q (see Further Details).
+*> \ingroup realOTHERcomputational
*
-* B (input/output) REAL array, dimension (LDB,P)
-* On entry, the N-by-P matrix B.
-* On exit, if N <= P, the upper triangle of the subarray
-* B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
-* if N > P, the elements on and above the (N-P)-th subdiagonal
-* contain the N-by-P upper trapezoidal matrix T; the remaining
-* elements, with the array TAUB, represent the orthogonal
-* matrix Z as a product of elementary reflectors (see Further
-* Details).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* TAUB (output) REAL array, dimension (min(N,P))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Z (see Further Details).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N,M,P).
-* For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
-* where NB1 is the optimal blocksize for the QR factorization
-* of an N-by-M matrix, NB2 is the optimal blocksize for the
-* RQ factorization of an N-by-P matrix, and NB3 is the optimal
-* blocksize for a call of SORMQR.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* represent the orthogonal matrix Q (see Further Details).
+*>
+*> B (input/output) REAL array, dimension (LDB,P)
+*> On entry, the N-by-P matrix B.
+*> On exit, if N <= P, the upper triangle of the subarray
+*> B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
+*> if N > P, the elements on and above the (N-P)-th subdiagonal
+*> contain the N-by-P upper trapezoidal matrix T; the remaining
+*> elements, with the array TAUB, represent the orthogonal
+*> matrix Z as a product of elementary reflectors (see Further
+*> Details).
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*>
+*> TAUB (output) REAL array, dimension (min(N,P))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Z (see Further Details).
+*>
+*> WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N,M,P).
+*> For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
+*> where NB1 is the optimal blocksize for the QR factorization
+*> of an N-by-M matrix, NB2 is the optimal blocksize for the
+*> RQ factorization of an N-by-P matrix, and NB3 is the optimal
+*> blocksize for a call of SORMQR.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(n,m).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taua * v * v**T
+*>
+*> where taua is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*> and taua in TAUA(i).
+*> To form Q explicitly, use LAPACK subroutine SORGQR.
+*> To use Q to update another matrix, use LAPACK subroutine SORMQR.
+*>
+*> The matrix Z is represented as a product of elementary reflectors
+*>
+*> Z = H(1) H(2) . . . H(k), where k = min(n,p).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taub * v * v**T
+*>
+*> where taub is a real scalar, and v is a real vector with
+*> v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
+*> B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
+*> To form Z explicitly, use LAPACK subroutine SORGRQ.
+*> To use Z to update another matrix, use LAPACK subroutine SORMRQ.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
+ $ LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(n,m).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taua * v * v**T
-*
-* where taua is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-* and taua in TAUA(i).
-* To form Q explicitly, use LAPACK subroutine SORGQR.
-* To use Q to update another matrix, use LAPACK subroutine SORMQR.
-*
-* The matrix Z is represented as a product of elementary reflectors
-*
-* Z = H(1) H(2) . . . H(k), where k = min(n,p).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taub * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where taub is a real scalar, and v is a real vector with
-* v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
-* B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
-* To form Z explicitly, use LAPACK subroutine SORGRQ.
-* To use Z to update another matrix, use LAPACK subroutine SORMRQ.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sggrqf.f b/SRC/sggrqf.f
index 4dde32c1..c97ddd01 100644
--- a/SRC/sggrqf.f
+++ b/SRC/sggrqf.f
@@ -1,144 +1,202 @@
- SUBROUTINE SGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
- $ LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b SGGRQF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGGRQF computes a generalized RQ factorization of an M-by-N matrix A
-* and a P-by-N matrix B:
-*
-* A = R*Q, B = Z*T*Q,
-*
-* where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal
-* matrix, and R and T assume one of the forms:
-*
-* if M <= N, R = ( 0 R12 ) M, or if M > N, R = ( R11 ) M-N,
-* N-M M ( R21 ) N
-* N
-*
-* where R12 or R21 is upper triangular, and
-*
-* if P >= N, T = ( T11 ) N , or if P < N, T = ( T11 T12 ) P,
-* ( 0 ) P-N P N-P
-* N
-*
-* where T11 is upper triangular.
-*
-* In particular, if B is square and nonsingular, the GRQ factorization
-* of A and B implicitly gives the RQ factorization of A*inv(B):
-*
-* A*inv(B) = (R*inv(T))*Z**T
-*
-* where inv(B) denotes the inverse of the matrix B, and Z**T denotes the
-* transpose of the matrix Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGRQF computes a generalized RQ factorization of an M-by-N matrix A
+*> and a P-by-N matrix B:
+*>
+*> A = R*Q, B = Z*T*Q,
+*>
+*> where Q is an N-by-N orthogonal matrix, Z is a P-by-P orthogonal
+*> matrix, and R and T assume one of the forms:
+*>
+*> if M <= N, R = ( 0 R12 ) M, or if M > N, R = ( R11 ) M-N,
+*> N-M M ( R21 ) N
+*> N
+*>
+*> where R12 or R21 is upper triangular, and
+*>
+*> if P >= N, T = ( T11 ) N , or if P < N, T = ( T11 T12 ) P,
+*> ( 0 ) P-N P N-P
+*> N
+*>
+*> where T11 is upper triangular.
+*>
+*> In particular, if B is square and nonsingular, the GRQ factorization
+*> of A and B implicitly gives the RQ factorization of A*inv(B):
+*>
+*> A*inv(B) = (R*inv(T))*Z**T
+*>
+*> where inv(B) denotes the inverse of the matrix B, and Z**T denotes the
+*> transpose of the matrix Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, if M <= N, the upper triangle of the subarray
+*> A(1:M,N-M+1:N) contains the M-by-M upper triangular matrix R;
+*> if M > N, the elements on and above the (M-N)-th subdiagonal
+*> contain the M-by-N upper trapezoidal matrix R; the remaining
+*> elements, with the array TAUA, represent the orthogonal
+*> matrix Q as a product of elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, if M <= N, the upper triangle of the subarray
-* A(1:M,N-M+1:N) contains the M-by-M upper triangular matrix R;
-* if M > N, the elements on and above the (M-N)-th subdiagonal
-* contain the M-by-N upper trapezoidal matrix R; the remaining
-* elements, with the array TAUA, represent the orthogonal
-* matrix Q as a product of elementary reflectors (see Further
-* Details).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAUA (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q (see Further Details).
+*> \ingroup realOTHERcomputational
*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(P,N)-by-N upper trapezoidal matrix T (T is
-* upper triangular if P >= N); the elements below the diagonal,
-* with the array TAUB, represent the orthogonal matrix Z as a
-* product of elementary reflectors (see Further Details).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TAUB (output) REAL array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Z (see Further Details).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N,M,P).
-* For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
-* where NB1 is the optimal blocksize for the RQ factorization
-* of an M-by-N matrix, NB2 is the optimal blocksize for the
-* QR factorization of a P-by-N matrix, and NB3 is the optimal
-* blocksize for a call of SORMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INF0= -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* represent the orthogonal matrix Q (see Further Details).
+*>
+*> B (input/output) REAL array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(P,N)-by-N upper trapezoidal matrix T (T is
+*> upper triangular if P >= N); the elements below the diagonal,
+*> with the array TAUB, represent the orthogonal matrix Z as a
+*> product of elementary reflectors (see Further Details).
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*>
+*> TAUB (output) REAL array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Z (see Further Details).
+*>
+*> WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N,M,P).
+*> For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
+*> where NB1 is the optimal blocksize for the RQ factorization
+*> of an M-by-N matrix, NB2 is the optimal blocksize for the
+*> QR factorization of a P-by-N matrix, and NB3 is the optimal
+*> blocksize for a call of SORMRQ.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INF0= -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taua * v * v**T
+*>
+*> where taua is a real scalar, and v is a real vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
+*> A(m-k+i,1:n-k+i-1), and taua in TAUA(i).
+*> To form Q explicitly, use LAPACK subroutine SORGRQ.
+*> To use Q to update another matrix, use LAPACK subroutine SORMRQ.
+*>
+*> The matrix Z is represented as a product of elementary reflectors
+*>
+*> Z = H(1) H(2) . . . H(k), where k = min(p,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taub * v * v**T
+*>
+*> where taub is a real scalar, and v is a real vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:p) is stored on exit in B(i+1:p,i),
+*> and taub in TAUB(i).
+*> To form Z explicitly, use LAPACK subroutine SORGQR.
+*> To use Z to update another matrix, use LAPACK subroutine SORMQR.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
+ $ LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taua * v * v**T
-*
-* where taua is a real scalar, and v is a real vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
-* A(m-k+i,1:n-k+i-1), and taua in TAUA(i).
-* To form Q explicitly, use LAPACK subroutine SORGRQ.
-* To use Q to update another matrix, use LAPACK subroutine SORMRQ.
-*
-* The matrix Z is represented as a product of elementary reflectors
-*
-* Z = H(1) H(2) . . . H(k), where k = min(p,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taub * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where taub is a real scalar, and v is a real vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:p) is stored on exit in B(i+1:p,i),
-* and taub in TAUB(i).
-* To form Z explicitly, use LAPACK subroutine SORGQR.
-* To use Z to update another matrix, use LAPACK subroutine SORMQR.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sggsvd.f b/SRC/sggsvd.f
index 15e7805c..273074d0 100644
--- a/SRC/sggsvd.f
+++ b/SRC/sggsvd.f
@@ -1,11 +1,335 @@
+*> \brief <b> SGGSVD computes the singular value decomposition (SVD) for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
+* LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), Q( LDQ, * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGSVD computes the generalized singular value decomposition (GSVD)
+*> of an M-by-N real matrix A and P-by-N real matrix B:
+*>
+*> U**T*A*Q = D1*( 0 R ), V**T*B*Q = D2*( 0 R )
+*>
+*> where U, V and Q are orthogonal matrices.
+*> Let K+L = the effective numerical rank of the matrix (A**T,B**T)**T,
+*> then R is a K+L-by-K+L nonsingular upper triangular matrix, D1 and
+*> D2 are M-by-(K+L) and P-by-(K+L) "diagonal" matrices and of the
+*> following structures, respectively:
+*>
+*> If M-K-L >= 0,
+*>
+*> K L
+*> D1 = K ( I 0 )
+*> L ( 0 C )
+*> M-K-L ( 0 0 )
+*>
+*> K L
+*> D2 = L ( 0 S )
+*> P-L ( 0 0 )
+*>
+*> N-K-L K L
+*> ( 0 R ) = K ( 0 R11 R12 )
+*> L ( 0 0 R22 )
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
+*> S = diag( BETA(K+1), ... , BETA(K+L) ),
+*> C**2 + S**2 = I.
+*>
+*> R is stored in A(1:K+L,N-K-L+1:N) on exit.
+*>
+*> If M-K-L < 0,
+*>
+*> K M-K K+L-M
+*> D1 = K ( I 0 0 )
+*> M-K ( 0 C 0 )
+*>
+*> K M-K K+L-M
+*> D2 = M-K ( 0 S 0 )
+*> K+L-M ( 0 0 I )
+*> P-L ( 0 0 0 )
+*>
+*> N-K-L K M-K K+L-M
+*> ( 0 R ) = K ( 0 R11 R12 R13 )
+*> M-K ( 0 0 R22 R23 )
+*> K+L-M ( 0 0 0 R33 )
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(M) ),
+*> S = diag( BETA(K+1), ... , BETA(M) ),
+*> C**2 + S**2 = I.
+*>
+*> (R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N), and R33 is stored
+*> ( 0 R22 R23 )
+*> in B(M-K+1:L,N+M-K-L+1:N) on exit.
+*>
+*> The routine computes C, S, R, and optionally the orthogonal
+*> transformation matrices U, V and Q.
+*>
+*> In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
+*> A and B implicitly gives the SVD of A*inv(B):
+*> A*inv(B) = U*(D1*inv(D2))*V**T.
+*> If ( A**T,B**T)**T has orthonormal columns, then the GSVD of A and B is
+*> also equal to the CS decomposition of A and B. Furthermore, the GSVD
+*> can be used to derive the solution of the eigenvalue problem:
+*> A**T*A x = lambda* B**T*B x.
+*> In some literature, the GSVD of A and B is presented in the form
+*> U**T*A*X = ( 0 D1 ), V**T*B*X = ( 0 D2 )
+*> where U and V are orthogonal and X is nonsingular, D1 and D2 are
+*> ``diagonal''. The former GSVD form can be converted to the latter
+*> form by taking the nonsingular matrix X as
+*>
+*> X = Q*( I 0 )
+*> ( 0 inv(R) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': Orthogonal matrix U is computed;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': Orthogonal matrix V is computed;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Orthogonal matrix Q is computed;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> \param[out] L
+*> \verbatim
+*> L is INTEGER
+*> On exit, K and L specify the dimension of the subblocks
+*> described in the Purpose section.
+*> K + L = effective numerical rank of (A**T,B**T)**T.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A contains the triangular matrix R, or part of R.
+*> See Purpose for details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, B contains the triangular matrix R if M-K-L < 0.
+*> See Purpose for details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is REAL array, dimension (N)
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> On exit, ALPHA and BETA contain the generalized singular
+*> value pairs of A and B;
+*> ALPHA(1:K) = 1,
+*> BETA(1:K) = 0,
+*> and if M-K-L >= 0,
+*> ALPHA(K+1:K+L) = C,
+*> BETA(K+1:K+L) = S,
+*> or if M-K-L < 0,
+*> ALPHA(K+1:M)=C, ALPHA(M+1:K+L)=0
+*> BETA(K+1:M) =S, BETA(M+1:K+L) =1
+*> and
+*> ALPHA(K+L+1:N) = 0
+*> BETA(K+L+1:N) = 0
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,M)
+*> If JOBU = 'U', U contains the M-by-M orthogonal matrix U.
+*> If JOBU = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,P)
+*> If JOBV = 'V', V contains the P-by-P orthogonal matrix V.
+*> If JOBV = 'N', V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> If JOBQ = 'Q', Q contains the N-by-N orthogonal matrix Q.
+*> If JOBQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array,
+*> dimension (max(3*N,M,P)+N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> On exit, IWORK stores the sorting information. More
+*> precisely, the following loop will sort ALPHA
+*> for I = K+1, min(M,K+L)
+*> swap ALPHA(I) and ALPHA(IWORK(I))
+*> endfor
+*> such that ALPHA(1) >= ALPHA(2) >= ... >= ALPHA(N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, the Jacobi-type procedure failed to
+*> converge. For further details, see subroutine STGSJA.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLA REAL
+*> TOLB REAL
+*> TOLA and TOLB are the thresholds to determine the effective
+*> rank of (A**T,B**T)**T. Generally, they are set to
+*> TOLA = MAX(M,N)*norm(A)*MACHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MACHEPS.
+*> The size of TOLA and TOLB may affect the size of backward
+*> errors of the decomposition.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERsing
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 2-96 Based on modifications by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
$ LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
$ IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK sing routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -18,210 +342,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGGSVD computes the generalized singular value decomposition (GSVD)
-* of an M-by-N real matrix A and P-by-N real matrix B:
-*
-* U**T*A*Q = D1*( 0 R ), V**T*B*Q = D2*( 0 R )
-*
-* where U, V and Q are orthogonal matrices.
-* Let K+L = the effective numerical rank of the matrix (A**T,B**T)**T,
-* then R is a K+L-by-K+L nonsingular upper triangular matrix, D1 and
-* D2 are M-by-(K+L) and P-by-(K+L) "diagonal" matrices and of the
-* following structures, respectively:
-*
-* If M-K-L >= 0,
-*
-* K L
-* D1 = K ( I 0 )
-* L ( 0 C )
-* M-K-L ( 0 0 )
-*
-* K L
-* D2 = L ( 0 S )
-* P-L ( 0 0 )
-*
-* N-K-L K L
-* ( 0 R ) = K ( 0 R11 R12 )
-* L ( 0 0 R22 )
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
-* S = diag( BETA(K+1), ... , BETA(K+L) ),
-* C**2 + S**2 = I.
-*
-* R is stored in A(1:K+L,N-K-L+1:N) on exit.
-*
-* If M-K-L < 0,
-*
-* K M-K K+L-M
-* D1 = K ( I 0 0 )
-* M-K ( 0 C 0 )
-*
-* K M-K K+L-M
-* D2 = M-K ( 0 S 0 )
-* K+L-M ( 0 0 I )
-* P-L ( 0 0 0 )
-*
-* N-K-L K M-K K+L-M
-* ( 0 R ) = K ( 0 R11 R12 R13 )
-* M-K ( 0 0 R22 R23 )
-* K+L-M ( 0 0 0 R33 )
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(M) ),
-* S = diag( BETA(K+1), ... , BETA(M) ),
-* C**2 + S**2 = I.
-*
-* (R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N), and R33 is stored
-* ( 0 R22 R23 )
-* in B(M-K+1:L,N+M-K-L+1:N) on exit.
-*
-* The routine computes C, S, R, and optionally the orthogonal
-* transformation matrices U, V and Q.
-*
-* In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
-* A and B implicitly gives the SVD of A*inv(B):
-* A*inv(B) = U*(D1*inv(D2))*V**T.
-* If ( A**T,B**T)**T has orthonormal columns, then the GSVD of A and B is
-* also equal to the CS decomposition of A and B. Furthermore, the GSVD
-* can be used to derive the solution of the eigenvalue problem:
-* A**T*A x = lambda* B**T*B x.
-* In some literature, the GSVD of A and B is presented in the form
-* U**T*A*X = ( 0 D1 ), V**T*B*X = ( 0 D2 )
-* where U and V are orthogonal and X is nonsingular, D1 and D2 are
-* ``diagonal''. The former GSVD form can be converted to the latter
-* form by taking the nonsingular matrix X as
-*
-* X = Q*( I 0 )
-* ( 0 inv(R) ).
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': Orthogonal matrix U is computed;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': Orthogonal matrix V is computed;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Orthogonal matrix Q is computed;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* K (output) INTEGER
-* L (output) INTEGER
-* On exit, K and L specify the dimension of the subblocks
-* described in the Purpose section.
-* K + L = effective numerical rank of (A**T,B**T)**T.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A contains the triangular matrix R, or part of R.
-* See Purpose for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, B contains the triangular matrix R if M-K-L < 0.
-* See Purpose for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* ALPHA (output) REAL array, dimension (N)
-* BETA (output) REAL array, dimension (N)
-* On exit, ALPHA and BETA contain the generalized singular
-* value pairs of A and B;
-* ALPHA(1:K) = 1,
-* BETA(1:K) = 0,
-* and if M-K-L >= 0,
-* ALPHA(K+1:K+L) = C,
-* BETA(K+1:K+L) = S,
-* or if M-K-L < 0,
-* ALPHA(K+1:M)=C, ALPHA(M+1:K+L)=0
-* BETA(K+1:M) =S, BETA(M+1:K+L) =1
-* and
-* ALPHA(K+L+1:N) = 0
-* BETA(K+L+1:N) = 0
-*
-* U (output) REAL array, dimension (LDU,M)
-* If JOBU = 'U', U contains the M-by-M orthogonal matrix U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (output) REAL array, dimension (LDV,P)
-* If JOBV = 'V', V contains the P-by-P orthogonal matrix V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (output) REAL array, dimension (LDQ,N)
-* If JOBQ = 'Q', Q contains the N-by-N orthogonal matrix Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* WORK (workspace) REAL array,
-* dimension (max(3*N,M,P)+N)
-*
-* IWORK (workspace/output) INTEGER array, dimension (N)
-* On exit, IWORK stores the sorting information. More
-* precisely, the following loop will sort ALPHA
-* for I = K+1, min(M,K+L)
-* swap ALPHA(I) and ALPHA(IWORK(I))
-* endfor
-* such that ALPHA(1) >= ALPHA(2) >= ... >= ALPHA(N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, the Jacobi-type procedure failed to
-* converge. For further details, see subroutine STGSJA.
-*
-* Internal Parameters
-* ===================
-*
-* TOLA REAL
-* TOLB REAL
-* TOLA and TOLB are the thresholds to determine the effective
-* rank of (A**T,B**T)**T. Generally, they are set to
-* TOLA = MAX(M,N)*norm(A)*MACHEPS,
-* TOLB = MAX(P,N)*norm(B)*MACHEPS.
-* The size of TOLA and TOLB may affect the size of backward
-* errors of the decomposition.
-*
-* Further Details
-* ===============
-*
-* 2-96 Based on modifications by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sggsvp.f b/SRC/sggsvp.f
index 18b1aa98..1a738c8b 100644
--- a/SRC/sggsvp.f
+++ b/SRC/sggsvp.f
@@ -1,11 +1,256 @@
+*> \brief \b SGGSVP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
+* TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
+* IWORK, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
+* REAL TOLA, TOLB
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGGSVP computes orthogonal matrices U, V and Q such that
+*>
+*> N-K-L K L
+*> U**T*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;
+*> L ( 0 0 A23 )
+*> M-K-L ( 0 0 0 )
+*>
+*> N-K-L K L
+*> = K ( 0 A12 A13 ) if M-K-L < 0;
+*> M-K ( 0 0 A23 )
+*>
+*> N-K-L K L
+*> V**T*B*Q = L ( 0 0 B13 )
+*> P-L ( 0 0 0 )
+*>
+*> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
+*> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
+*> otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective
+*> numerical rank of the (M+P)-by-N matrix (A**T,B**T)**T.
+*>
+*> This decomposition is the preprocessing step for computing the
+*> Generalized Singular Value Decomposition (GSVD), see subroutine
+*> SGGSVD.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': Orthogonal matrix U is computed;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': Orthogonal matrix V is computed;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Orthogonal matrix Q is computed;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A contains the triangular (or trapezoidal) matrix
+*> described in the Purpose section.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, B contains the triangular matrix described in
+*> the Purpose section.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[in] TOLA
+*> \verbatim
+*> TOLA is REAL
+*> \param[in] TOLB
+*> \verbatim
+*> TOLB is REAL
+*> TOLA and TOLB are the thresholds to determine the effective
+*> numerical rank of matrix B and a subblock of A. Generally,
+*> they are set to
+*> TOLA = MAX(M,N)*norm(A)*MACHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MACHEPS.
+*> The size of TOLA and TOLB may affect the size of backward
+*> errors of the decomposition.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> \param[out] L
+*> \verbatim
+*> L is INTEGER
+*> On exit, K and L specify the dimension of the subblocks
+*> described in Purpose section.
+*> K + L = effective numerical rank of (A**T,B**T)**T.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,M)
+*> If JOBU = 'U', U contains the orthogonal matrix U.
+*> If JOBU = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,P)
+*> If JOBV = 'V', V contains the orthogonal matrix V.
+*> If JOBV = 'N', V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> If JOBQ = 'Q', Q contains the orthogonal matrix Q.
+*> If JOBQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (max(3*N,M,P))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The subroutine uses LAPACK subroutine SGEQPF for the QR factorization
+*> with column pivoting to detect the effective numerical rank of the
+*> a matrix. It may be replaced by a better rank determination strategy.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
$ TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
$ IWORK, TAU, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -18,131 +263,6 @@
$ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGGSVP computes orthogonal matrices U, V and Q such that
-*
-* N-K-L K L
-* U**T*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;
-* L ( 0 0 A23 )
-* M-K-L ( 0 0 0 )
-*
-* N-K-L K L
-* = K ( 0 A12 A13 ) if M-K-L < 0;
-* M-K ( 0 0 A23 )
-*
-* N-K-L K L
-* V**T*B*Q = L ( 0 0 B13 )
-* P-L ( 0 0 0 )
-*
-* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
-* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
-* otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective
-* numerical rank of the (M+P)-by-N matrix (A**T,B**T)**T.
-*
-* This decomposition is the preprocessing step for computing the
-* Generalized Singular Value Decomposition (GSVD), see subroutine
-* SGGSVD.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': Orthogonal matrix U is computed;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': Orthogonal matrix V is computed;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Orthogonal matrix Q is computed;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A contains the triangular (or trapezoidal) matrix
-* described in the Purpose section.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, B contains the triangular matrix described in
-* the Purpose section.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TOLA (input) REAL
-* TOLB (input) REAL
-* TOLA and TOLB are the thresholds to determine the effective
-* numerical rank of matrix B and a subblock of A. Generally,
-* they are set to
-* TOLA = MAX(M,N)*norm(A)*MACHEPS,
-* TOLB = MAX(P,N)*norm(B)*MACHEPS.
-* The size of TOLA and TOLB may affect the size of backward
-* errors of the decomposition.
-*
-* K (output) INTEGER
-* L (output) INTEGER
-* On exit, K and L specify the dimension of the subblocks
-* described in Purpose section.
-* K + L = effective numerical rank of (A**T,B**T)**T.
-*
-* U (output) REAL array, dimension (LDU,M)
-* If JOBU = 'U', U contains the orthogonal matrix U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (output) REAL array, dimension (LDV,P)
-* If JOBV = 'V', V contains the orthogonal matrix V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (output) REAL array, dimension (LDQ,N)
-* If JOBQ = 'Q', Q contains the orthogonal matrix Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* TAU (workspace) REAL array, dimension (N)
-*
-* WORK (workspace) REAL array, dimension (max(3*N,M,P))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-*
-* Further Details
-* ===============
-*
-* The subroutine uses LAPACK subroutine SGEQPF for the QR factorization
-* with column pivoting to detect the effective numerical rank of the
-* a matrix. It may be replaced by a better rank determination strategy.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgsvj0.f b/SRC/sgsvj0.f
index 58f389b2..5de1f6dd 100644
--- a/SRC/sgsvj0.f
+++ b/SRC/sgsvj0.f
@@ -1,22 +1,217 @@
- SUBROUTINE SGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
- $ SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*> \brief \b SGSVJ0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
+* SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP
+* REAL EPS, SFMIN, TOL
+* CHARACTER*1 JOBV
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), SVA( N ), D( N ), V( LDV, * ),
+* $ WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGSVJ0 is called from SGESVJ as a pre-processor and that is its main
+*> purpose. It applies Jacobi rotations in the same way as SGESVJ does, but
+*> it does not check convergence (stopping criterion). Few tuning
+*> parameters (marked by [TP]) are available for the implementer.
+*>
+*> Further Details
+*> ~~~~~~~~~~~~~~~
+*> SGSVJ0 is used just to enable SGESVJ to call a simplified version of
+*> itself to work on a submatrix of the original matrix.
+*>
+*> Contributors
+*> ~~~~~~~~~~~~
+*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
+*>
+*> Bugs, Examples and Comments
+*> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+*> Please report all bugs and send interesting test examples and comments to
+*> drmac@math.hr. Thank you.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> Specifies whether the output from this procedure is used
+*> to compute the matrix V:
+*> = 'V': the product of the Jacobi rotations is accumulated
+*> by postmulyiplying the N-by-N array V.
+*> (See the description of V.)
+*> = 'A': the product of the Jacobi rotations is accumulated
+*> by postmulyiplying the MV-by-N array V.
+*> (See the descriptions of MV and V.)
+*> = 'N': the Jacobi rotations are not accumulated.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, M-by-N matrix A, such that A*diag(D) represents
+*> the input matrix.
+*> On exit,
+*> A_onexit * D_onexit represents the input matrix A*diag(D)
+*> post-multiplied by a sequence of Jacobi rotations, where the
+*> rotation threshold and the total number of sweeps are given in
+*> TOL and NSWEEP, respectively.
+*> (See the descriptions of D, TOL and NSWEEP.)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The array D accumulates the scaling factors from the fast scaled
+*> Jacobi rotations.
+*> On entry, A*diag(D) represents the input matrix.
+*> On exit, A_onexit*diag(D_onexit) represents the input matrix
+*> post-multiplied by a sequence of Jacobi rotations, where the
+*> rotation threshold and the total number of sweeps are given in
+*> TOL and NSWEEP, respectively.
+*> (See the descriptions of A, TOL and NSWEEP.)
+*> \endverbatim
+*>
+*> \param[in,out] SVA
+*> \verbatim
+*> SVA is REAL array, dimension (N)
+*> On entry, SVA contains the Euclidean norms of the columns of
+*> the matrix A*diag(D).
+*> On exit, SVA contains the Euclidean norms of the columns of
+*> the matrix onexit*diag(D_onexit).
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> If JOBV .EQ. 'A', then MV rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV = 'N', then MV is not referenced.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,N)
+*> If JOBV .EQ. 'V' then N rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV .EQ. 'A' then MV rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV = 'N', then V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V, LDV >= 1.
+*> If JOBV = 'V', LDV .GE. N.
+*> If JOBV = 'A', LDV .GE. MV.
+*> \endverbatim
+*>
+*> \param[in] EPS
+*> \verbatim
+*> EPS is INTEGER
+*> EPS = SLAMCH('Epsilon')
+*> \endverbatim
+*>
+*> \param[in] SFMIN
+*> \verbatim
+*> SFMIN is INTEGER
+*> SFMIN = SLAMCH('Safe Minimum')
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> TOL is the threshold for Jacobi rotations. For a pair
+*> A(:,p), A(:,q) of pivot columns, the Jacobi rotation is
+*> applied only if ABS(COS(angle(A(:,p),A(:,q)))) .GT. TOL.
+*> \endverbatim
+*>
+*> \param[in] NSWEEP
+*> \verbatim
+*> NSWEEP is INTEGER
+*> NSWEEP is the number of sweeps of Jacobi rotations to be
+*> performed.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> LWORK is the dimension of WORK. LWORK .GE. M.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit.
+*> < 0 : if INFO = -i, then the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- LAPACK routine (version 3.3.1) --
+*> \date November 2011
*
-* -- Contributed by Zlatko Drmac of the University of Zagreb and --
-* -- Kresimir Veselic of the Fernuniversitaet Hagen --
-* -- April 2011 --
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE SGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
+ $ SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
*
+* -- LAPACK computational routine (version 1.23, October 23. 2008.) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine is also part of SIGMA (version 1.23, October 23. 2008.)
-* SIGMA is a library of algorithms for highly accurate algorithms for
-* computation of SVD, PSVD, QSVD, (H,K)-SVD, and for solution of the
-* eigenvalue problems Hx = lambda M x, H M x = lambda x with H, M > 0.
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP
REAL EPS, SFMIN, TOL
@@ -27,119 +222,6 @@
$ WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* SGSVJ0 is called from SGESVJ as a pre-processor and that is its main
-* purpose. It applies Jacobi rotations in the same way as SGESVJ does, but
-* it does not check convergence (stopping criterion). Few tuning
-* parameters (marked by [TP]) are available for the implementer.
-*
-* Further Details
-* ~~~~~~~~~~~~~~~
-* SGSVJ0 is used just to enable SGESVJ to call a simplified version of
-* itself to work on a submatrix of the original matrix.
-*
-* Contributors
-* ~~~~~~~~~~~~
-* Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-* Bugs, Examples and Comments
-* ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* Please report all bugs and send interesting test examples and comments to
-* drmac@math.hr. Thank you.
-*
-* Arguments
-* =========
-*
-* JOBV (input) CHARACTER*1
-* Specifies whether the output from this procedure is used
-* to compute the matrix V:
-* = 'V': the product of the Jacobi rotations is accumulated
-* by postmulyiplying the N-by-N array V.
-* (See the description of V.)
-* = 'A': the product of the Jacobi rotations is accumulated
-* by postmulyiplying the MV-by-N array V.
-* (See the descriptions of MV and V.)
-* = 'N': the Jacobi rotations are not accumulated.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A.
-* M >= N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, M-by-N matrix A, such that A*diag(D) represents
-* the input matrix.
-* On exit,
-* A_onexit * D_onexit represents the input matrix A*diag(D)
-* post-multiplied by a sequence of Jacobi rotations, where the
-* rotation threshold and the total number of sweeps are given in
-* TOL and NSWEEP, respectively.
-* (See the descriptions of D, TOL and NSWEEP.)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (input/workspace/output) REAL array, dimension (N)
-* The array D accumulates the scaling factors from the fast scaled
-* Jacobi rotations.
-* On entry, A*diag(D) represents the input matrix.
-* On exit, A_onexit*diag(D_onexit) represents the input matrix
-* post-multiplied by a sequence of Jacobi rotations, where the
-* rotation threshold and the total number of sweeps are given in
-* TOL and NSWEEP, respectively.
-* (See the descriptions of A, TOL and NSWEEP.)
-*
-* SVA (input/workspace/output) REAL array, dimension (N)
-* On entry, SVA contains the Euclidean norms of the columns of
-* the matrix A*diag(D).
-* On exit, SVA contains the Euclidean norms of the columns of
-* the matrix onexit*diag(D_onexit).
-*
-* MV (input) INTEGER
-* If JOBV .EQ. 'A', then MV rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV = 'N', then MV is not referenced.
-*
-* V (input/output) REAL array, dimension (LDV,N)
-* If JOBV .EQ. 'V' then N rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV .EQ. 'A' then MV rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV = 'N', then V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V, LDV >= 1.
-* If JOBV = 'V', LDV .GE. N.
-* If JOBV = 'A', LDV .GE. MV.
-*
-* EPS (input) INTEGER
-* EPS = SLAMCH('Epsilon')
-*
-* SFMIN (input) INTEGER
-* SFMIN = SLAMCH('Safe Minimum')
-*
-* TOL (input) REAL
-* TOL is the threshold for Jacobi rotations. For a pair
-* A(:,p), A(:,q) of pivot columns, the Jacobi rotation is
-* applied only if ABS(COS(angle(A(:,p),A(:,q)))) .GT. TOL.
-*
-* NSWEEP (input) INTEGER
-* NSWEEP is the number of sweeps of Jacobi rotations to be
-* performed.
-*
-* WORK (workspace) REAL array, dimension LWORK.
-*
-* LWORK (input) INTEGER
-* LWORK is the dimension of WORK. LWORK .GE. M.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit.
-* < 0 : if INFO = -i, then the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Parameters ..
diff --git a/SRC/sgsvj1.f b/SRC/sgsvj1.f
index c1e25a7d..406f5ebf 100644
--- a/SRC/sgsvj1.f
+++ b/SRC/sgsvj1.f
@@ -1,22 +1,237 @@
- SUBROUTINE SGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
- $ EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*> \brief \b SGSVJ1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
+* EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* REAL EPS, SFMIN, TOL
+* INTEGER INFO, LDA, LDV, LWORK, M, MV, N, N1, NSWEEP
+* CHARACTER*1 JOBV
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( N ), SVA( N ), V( LDV, * ),
+* $ WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGSVJ1 is called from SGESVJ as a pre-processor and that is its main
+*> purpose. It applies Jacobi rotations in the same way as SGESVJ does, but
+*> it targets only particular pivots and it does not check convergence
+*> (stopping criterion). Few tunning parameters (marked by [TP]) are
+*> available for the implementer.
+*>
+*> Further Details
+*> ~~~~~~~~~~~~~~~
+*> SGSVJ1 applies few sweeps of Jacobi rotations in the column space of
+*> the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
+*> off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The
+*> block-entries (tiles) of the (1,2) off-diagonal block are marked by the
+*> [x]'s in the following scheme:
+*>
+*> | * * * [x] [x] [x]|
+*> | * * * [x] [x] [x]| Row-cycling in the nblr-by-nblc [x] blocks.
+*> | * * * [x] [x] [x]| Row-cyclic pivoting inside each [x] block.
+*> |[x] [x] [x] * * * |
+*> |[x] [x] [x] * * * |
+*> |[x] [x] [x] * * * |
+*>
+*> In terms of the columns of A, the first N1 columns are rotated 'against'
+*> the remaining N-N1 columns, trying to increase the angle between the
+*> corresponding subspaces. The off-diagonal block is N1-by(N-N1) and it is
+*> tiled using quadratic tiles of side KBL. Here, KBL is a tunning parmeter.
+*> The number of sweeps is given in NSWEEP and the orthogonality threshold
+*> is given in TOL.
+*>
+*> Contributors
+*> ~~~~~~~~~~~~
+*> Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> Specifies whether the output from this procedure is used
+*> to compute the matrix V:
+*> = 'V': the product of the Jacobi rotations is accumulated
+*> by postmulyiplying the N-by-N array V.
+*> (See the description of V.)
+*> = 'A': the product of the Jacobi rotations is accumulated
+*> by postmulyiplying the MV-by-N array V.
+*> (See the descriptions of MV and V.)
+*> = 'N': the Jacobi rotations are not accumulated.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> N1 specifies the 2 x 2 block partition, the first N1 columns are
+*> rotated 'against' the remaining N-N1 columns of A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, M-by-N matrix A, such that A*diag(D) represents
+*> the input matrix.
+*> On exit,
+*> A_onexit * D_onexit represents the input matrix A*diag(D)
+*> post-multiplied by a sequence of Jacobi rotations, where the
+*> rotation threshold and the total number of sweeps are given in
+*> TOL and NSWEEP, respectively.
+*> (See the descriptions of N1, D, TOL and NSWEEP.)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The array D accumulates the scaling factors from the fast scaled
+*> Jacobi rotations.
+*> On entry, A*diag(D) represents the input matrix.
+*> On exit, A_onexit*diag(D_onexit) represents the input matrix
+*> post-multiplied by a sequence of Jacobi rotations, where the
+*> rotation threshold and the total number of sweeps are given in
+*> TOL and NSWEEP, respectively.
+*> (See the descriptions of N1, A, TOL and NSWEEP.)
+*> \endverbatim
+*>
+*> \param[in,out] SVA
+*> \verbatim
+*> SVA is REAL array, dimension (N)
+*> On entry, SVA contains the Euclidean norms of the columns of
+*> the matrix A*diag(D).
+*> On exit, SVA contains the Euclidean norms of the columns of
+*> the matrix onexit*diag(D_onexit).
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> If JOBV .EQ. 'A', then MV rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV = 'N', then MV is not referenced.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,N)
+*> If JOBV .EQ. 'V' then N rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV .EQ. 'A' then MV rows of V are post-multipled by a
+*> sequence of Jacobi rotations.
+*> If JOBV = 'N', then V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V, LDV >= 1.
+*> If JOBV = 'V', LDV .GE. N.
+*> If JOBV = 'A', LDV .GE. MV.
+*> \endverbatim
+*>
+*> \param[in] EPS
+*> \verbatim
+*> EPS is INTEGER
+*> EPS = SLAMCH('Epsilon')
+*> \endverbatim
+*>
+*> \param[in] SFMIN
+*> \verbatim
+*> SFMIN is INTEGER
+*> SFMIN = SLAMCH('Safe Minimum')
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> TOL is the threshold for Jacobi rotations. For a pair
+*> A(:,p), A(:,q) of pivot columns, the Jacobi rotation is
+*> applied only if ABS(COS(angle(A(:,p),A(:,q)))) .GT. TOL.
+*> \endverbatim
+*>
+*> \param[in] NSWEEP
+*> \verbatim
+*> NSWEEP is INTEGER
+*> NSWEEP is the number of sweeps of Jacobi rotations to be
+*> performed.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> LWORK is the dimension of WORK. LWORK .GE. M.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit.
+*> < 0 : if INFO = -i, then the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- LAPACK routine (version 3.3.1) --
+*> \date November 2011
*
-* -- Contributed by Zlatko Drmac of the University of Zagreb and --
-* -- Kresimir Veselic of the Fernuniversitaet Hagen --
-* -- April 2011 --
+*> \ingroup realOTHERcomputational
*
+* =====================================================================
+ SUBROUTINE SGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
+ $ EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
+*
+* -- LAPACK computational routine (version 1.23, October 23. 2008.) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine is also part of SIGMA (version 1.23, October 23. 2008.)
-* SIGMA is a library of algorithms for highly accurate algorithms for
-* computation of SVD, PSVD, QSVD, (H,K)-SVD, and for solution of the
-* eigenvalue problems Hx = lambda M x, H M x = lambda x with H, M > 0.
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
REAL EPS, SFMIN, TOL
INTEGER INFO, LDA, LDV, LWORK, M, MV, N, N1, NSWEEP
@@ -27,136 +242,6 @@
$ WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* SGSVJ1 is called from SGESVJ as a pre-processor and that is its main
-* purpose. It applies Jacobi rotations in the same way as SGESVJ does, but
-* it targets only particular pivots and it does not check convergence
-* (stopping criterion). Few tunning parameters (marked by [TP]) are
-* available for the implementer.
-*
-* Further Details
-* ~~~~~~~~~~~~~~~
-* SGSVJ1 applies few sweeps of Jacobi rotations in the column space of
-* the input M-by-N matrix A. The pivot pairs are taken from the (1,2)
-* off-diagonal block in the corresponding N-by-N Gram matrix A^T * A. The
-* block-entries (tiles) of the (1,2) off-diagonal block are marked by the
-* [x]'s in the following scheme:
-*
-* | * * * [x] [x] [x]|
-* | * * * [x] [x] [x]| Row-cycling in the nblr-by-nblc [x] blocks.
-* | * * * [x] [x] [x]| Row-cyclic pivoting inside each [x] block.
-* |[x] [x] [x] * * * |
-* |[x] [x] [x] * * * |
-* |[x] [x] [x] * * * |
-*
-* In terms of the columns of A, the first N1 columns are rotated 'against'
-* the remaining N-N1 columns, trying to increase the angle between the
-* corresponding subspaces. The off-diagonal block is N1-by(N-N1) and it is
-* tiled using quadratic tiles of side KBL. Here, KBL is a tunning parmeter.
-* The number of sweeps is given in NSWEEP and the orthogonality threshold
-* is given in TOL.
-*
-* Contributors
-* ~~~~~~~~~~~~
-* Zlatko Drmac (Zagreb, Croatia) and Kresimir Veselic (Hagen, Germany)
-*
-* Arguments
-* =========
-*
-* JOBV (input) CHARACTER*1
-* Specifies whether the output from this procedure is used
-* to compute the matrix V:
-* = 'V': the product of the Jacobi rotations is accumulated
-* by postmulyiplying the N-by-N array V.
-* (See the description of V.)
-* = 'A': the product of the Jacobi rotations is accumulated
-* by postmulyiplying the MV-by-N array V.
-* (See the descriptions of MV and V.)
-* = 'N': the Jacobi rotations are not accumulated.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A.
-* M >= N >= 0.
-*
-* N1 (input) INTEGER
-* N1 specifies the 2 x 2 block partition, the first N1 columns are
-* rotated 'against' the remaining N-N1 columns of A.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, M-by-N matrix A, such that A*diag(D) represents
-* the input matrix.
-* On exit,
-* A_onexit * D_onexit represents the input matrix A*diag(D)
-* post-multiplied by a sequence of Jacobi rotations, where the
-* rotation threshold and the total number of sweeps are given in
-* TOL and NSWEEP, respectively.
-* (See the descriptions of N1, D, TOL and NSWEEP.)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (input/workspace/output) REAL array, dimension (N)
-* The array D accumulates the scaling factors from the fast scaled
-* Jacobi rotations.
-* On entry, A*diag(D) represents the input matrix.
-* On exit, A_onexit*diag(D_onexit) represents the input matrix
-* post-multiplied by a sequence of Jacobi rotations, where the
-* rotation threshold and the total number of sweeps are given in
-* TOL and NSWEEP, respectively.
-* (See the descriptions of N1, A, TOL and NSWEEP.)
-*
-* SVA (input/workspace/output) REAL array, dimension (N)
-* On entry, SVA contains the Euclidean norms of the columns of
-* the matrix A*diag(D).
-* On exit, SVA contains the Euclidean norms of the columns of
-* the matrix onexit*diag(D_onexit).
-*
-* MV (input) INTEGER
-* If JOBV .EQ. 'A', then MV rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV = 'N', then MV is not referenced.
-*
-* V (input/output) REAL array, dimension (LDV,N)
-* If JOBV .EQ. 'V' then N rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV .EQ. 'A' then MV rows of V are post-multipled by a
-* sequence of Jacobi rotations.
-* If JOBV = 'N', then V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V, LDV >= 1.
-* If JOBV = 'V', LDV .GE. N.
-* If JOBV = 'A', LDV .GE. MV.
-*
-* EPS (input) INTEGER
-* EPS = SLAMCH('Epsilon')
-*
-* SFMIN (input) INTEGER
-* SFMIN = SLAMCH('Safe Minimum')
-*
-* TOL (input) REAL
-* TOL is the threshold for Jacobi rotations. For a pair
-* A(:,p), A(:,q) of pivot columns, the Jacobi rotation is
-* applied only if ABS(COS(angle(A(:,p),A(:,q)))) .GT. TOL.
-*
-* NSWEEP (input) INTEGER
-* NSWEEP is the number of sweeps of Jacobi rotations to be
-* performed.
-*
-* WORK (workspace) REAL array, dimension LWORK.
-*
-* LWORK (input) INTEGER
-* LWORK is the dimension of WORK. LWORK .GE. M.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit.
-* < 0 : if INFO = -i, then the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Parameters ..
diff --git a/SRC/sgtcon.f b/SRC/sgtcon.f
index 316b842a..a6790d56 100644
--- a/SRC/sgtcon.f
+++ b/SRC/sgtcon.f
@@ -1,12 +1,147 @@
+*> \brief \b SGTCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTCON estimates the reciprocal of the condition number of a real
+*> tridiagonal matrix A using the LU factorization as computed by
+*> SGTTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A as computed by SGTTRF.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is REAL array, dimension (N-2)
+*> The (n-2) elements of the second superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,65 +153,6 @@
REAL D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGTCON estimates the reciprocal of the condition number of a real
-* tridiagonal matrix A using the LU factorization as computed by
-* SGTTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A as computed by SGTTRF.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input) REAL array, dimension (N-2)
-* The (n-2) elements of the second superdiagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* ANORM (input) REAL
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgtrfs.f b/SRC/sgtrfs.f
index d56dc518..e9c12885 100644
--- a/SRC/sgtrfs.f
+++ b/SRC/sgtrfs.f
@@ -1,13 +1,210 @@
+*> \brief \b SGTRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
+* IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL B( LDB, * ), BERR( * ), D( * ), DF( * ),
+* $ DL( * ), DLF( * ), DU( * ), DU2( * ), DUF( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is tridiagonal, and provides
+*> error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DLF
+*> \verbatim
+*> DLF is REAL array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A as computed by SGTTRF.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is REAL array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DUF
+*> \verbatim
+*> DUF is REAL array, dimension (N-1)
+*> The (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is REAL array, dimension (N-2)
+*> The (n-2) elements of the second superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGTTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
$ IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -20,99 +217,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGTRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is tridiagonal, and provides
-* error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of A.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) superdiagonal elements of A.
-*
-* DLF (input) REAL array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A as computed by SGTTRF.
-*
-* DF (input) REAL array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DUF (input) REAL array, dimension (N-1)
-* The (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input) REAL array, dimension (N-2)
-* The (n-2) elements of the second superdiagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGTTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgtsv.f b/SRC/sgtsv.f
index d31b90d3..4506b0d6 100644
--- a/SRC/sgtsv.f
+++ b/SRC/sgtsv.f
@@ -1,73 +1,138 @@
- SUBROUTINE SGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*> \brief \b SGTSV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL B( LDB, * ), D( * ), DL( * ), DU( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), D( * ), DL( * ), DU( * )
+* ..
+*
* Purpose
* =======
*
-* SGTSV solves the equation
-*
-* A*X = B,
-*
-* where A is an n by n tridiagonal matrix, by Gaussian elimination with
-* partial pivoting.
-*
-* Note that the equation A**T*X = B may be solved by interchanging the
-* order of the arguments DU and DL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTSV solves the equation
+*>
+*> A*X = B,
+*>
+*> where A is an n by n tridiagonal matrix, by Gaussian elimination with
+*> partial pivoting.
+*>
+*> Note that the equation A**T*X = B may be solved by interchanging the
+*> order of the arguments DU and DL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input/output) REAL array, dimension (N-1)
-* On entry, DL must contain the (n-1) sub-diagonal elements of
-* A.
-*
-* On exit, DL is overwritten by the (n-2) elements of the
-* second super-diagonal of the upper triangular matrix U from
-* the LU factorization of A, in DL(1), ..., DL(n-2).
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, D must contain the diagonal elements of A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> On entry, DL must contain the (n-1) sub-diagonal elements of
+*> A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DL is overwritten by the (n-2) elements of the
+*> second super-diagonal of the upper triangular matrix U from
+*> the LU factorization of A, in DL(1), ..., DL(n-2).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, D must contain the diagonal elements of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, D is overwritten by the n diagonal elements of U.
+*> \endverbatim
+*>
+*> \param[in,out] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> On entry, DU must contain the (n-1) super-diagonal elements
+*> of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DU is overwritten by the (n-1) elements of the first
+*> super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix of right hand side matrix B.
+*> On exit, if INFO = 0, the N by NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero, and the solution
+*> has not been computed. The factorization has not been
+*> completed unless i = N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, D is overwritten by the n diagonal elements of U.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input/output) REAL array, dimension (N-1)
-* On entry, DU must contain the (n-1) super-diagonal elements
-* of A.
+*> \date November 2011
*
-* On exit, DU is overwritten by the (n-1) elements of the first
-* super-diagonal of U.
+*> \ingroup realOTHERcomputational
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix of right hand side matrix B.
-* On exit, if INFO = 0, the N by NRHS solution matrix X.
+* =====================================================================
+ SUBROUTINE SGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero, and the solution
-* has not been computed. The factorization has not been
-* completed unless i = N.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL B( LDB, * ), D( * ), DL( * ), DU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgtsvx.f b/SRC/sgtsvx.f
index 7187474e..882e3e53 100644
--- a/SRC/sgtsvx.f
+++ b/SRC/sgtsvx.f
@@ -1,11 +1,296 @@
+*> \brief \b SGTSVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
+* DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, TRANS
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL B( LDB, * ), BERR( * ), D( * ), DF( * ),
+* $ DL( * ), DLF( * ), DU( * ), DU2( * ), DUF( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTSVX uses the LU factorization to compute the solution to a real
+*> system of linear equations A * X = B or A**T * X = B,
+*> where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
+*> as A = L * U, where L is a product of permutation and unit lower
+*> bidiagonal matrices and U is upper triangular with nonzeros in
+*> only the main diagonal and first two superdiagonals.
+*>
+*> 2. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': DLF, DF, DUF, DU2, and IPIV contain the factored
+*> form of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV
+*> will not be modified.
+*> = 'N': The matrix will be copied to DLF, DF, and DUF
+*> and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in,out] DLF
+*> \verbatim
+*> DLF is or output) REAL array, dimension (N-1)
+*> If FACT = 'F', then DLF is an input argument and on entry
+*> contains the (n-1) multipliers that define the matrix L from
+*> the LU factorization of A as computed by SGTTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DLF is an output argument and on exit
+*> contains the (n-1) multipliers that define the matrix L from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DF
+*> \verbatim
+*> DF is or output) REAL array, dimension (N)
+*> If FACT = 'F', then DF is an input argument and on entry
+*> contains the n diagonal elements of the upper triangular
+*> matrix U from the LU factorization of A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DF is an output argument and on exit
+*> contains the n diagonal elements of the upper triangular
+*> matrix U from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DUF
+*> \verbatim
+*> DUF is or output) REAL array, dimension (N-1)
+*> If FACT = 'F', then DUF is an input argument and on entry
+*> contains the (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DUF is an output argument and on exit
+*> contains the (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in,out] DU2
+*> \verbatim
+*> DU2 is or output) REAL array, dimension (N-2)
+*> If FACT = 'F', then DU2 is an input argument and on entry
+*> contains the (n-2) elements of the second superdiagonal of
+*> U.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DU2 is an output argument and on exit
+*> contains the (n-2) elements of the second superdiagonal of
+*> U.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the LU factorization of A as
+*> computed by SGTTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the LU factorization of A;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
+*> a row interchange was not required.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization
+*> has not been completed unless i = N, but the
+*> factor U is exactly singular, so the solution
+*> and error bounds could not be computed.
+*> RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
$ DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, TRANS
@@ -19,175 +304,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGTSVX uses the LU factorization to compute the solution to a real
-* system of linear equations A * X = B or A**T * X = B,
-* where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
-* as A = L * U, where L is a product of permutation and unit lower
-* bidiagonal matrices and U is upper triangular with nonzeros in
-* only the main diagonal and first two superdiagonals.
-*
-* 2. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': DLF, DF, DUF, DU2, and IPIV contain the factored
-* form of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV
-* will not be modified.
-* = 'N': The matrix will be copied to DLF, DF, and DUF
-* and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of A.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of A.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) superdiagonal elements of A.
-*
-* DLF (input or output) REAL array, dimension (N-1)
-* If FACT = 'F', then DLF is an input argument and on entry
-* contains the (n-1) multipliers that define the matrix L from
-* the LU factorization of A as computed by SGTTRF.
-*
-* If FACT = 'N', then DLF is an output argument and on exit
-* contains the (n-1) multipliers that define the matrix L from
-* the LU factorization of A.
-*
-* DF (input or output) REAL array, dimension (N)
-* If FACT = 'F', then DF is an input argument and on entry
-* contains the n diagonal elements of the upper triangular
-* matrix U from the LU factorization of A.
-*
-* If FACT = 'N', then DF is an output argument and on exit
-* contains the n diagonal elements of the upper triangular
-* matrix U from the LU factorization of A.
-*
-* DUF (input or output) REAL array, dimension (N-1)
-* If FACT = 'F', then DUF is an input argument and on entry
-* contains the (n-1) elements of the first superdiagonal of U.
-*
-* If FACT = 'N', then DUF is an output argument and on exit
-* contains the (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input or output) REAL array, dimension (N-2)
-* If FACT = 'F', then DU2 is an input argument and on entry
-* contains the (n-2) elements of the second superdiagonal of
-* U.
-*
-* If FACT = 'N', then DU2 is an output argument and on exit
-* contains the (n-2) elements of the second superdiagonal of
-* U.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the LU factorization of A as
-* computed by SGTTRF.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the LU factorization of A;
-* row i of the matrix was interchanged with row IPIV(i).
-* IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
-* a row interchange was not required.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization
-* has not been completed unless i = N, but the
-* factor U is exactly singular, so the solution
-* and error bounds could not be computed.
-* RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sgttrf.f b/SRC/sgttrf.f
index be994532..e23445ef 100644
--- a/SRC/sgttrf.f
+++ b/SRC/sgttrf.f
@@ -1,73 +1,136 @@
- SUBROUTINE SGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL D( * ), DL( * ), DU( * ), DU2( * )
-* ..
-*
+*> \brief \b SGTTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
* Purpose
* =======
*
-* SGTTRF computes an LU factorization of a real tridiagonal matrix A
-* using elimination with partial pivoting and row interchanges.
-*
-* The factorization has the form
-* A = L * U
-* where L is a product of permutation and unit lower bidiagonal
-* matrices and U is upper triangular with nonzeros in only the main
-* diagonal and first two superdiagonals.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTTRF computes an LU factorization of a real tridiagonal matrix A
+*> using elimination with partial pivoting and row interchanges.
+*>
+*> The factorization has the form
+*> A = L * U
+*> where L is a product of permutation and unit lower bidiagonal
+*> matrices and U is upper triangular with nonzeros in only the main
+*> diagonal and first two superdiagonals.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* DL (input/output) REAL array, dimension (N-1)
-* On entry, DL must contain the (n-1) sub-diagonal elements of
-* A.
-*
-* On exit, DL is overwritten by the (n-1) multipliers that
-* define the matrix L from the LU factorization of A.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, D must contain the diagonal elements of A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> On entry, DL must contain the (n-1) sub-diagonal elements of
+*> A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DL is overwritten by the (n-1) multipliers that
+*> define the matrix L from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, D must contain the diagonal elements of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, D is overwritten by the n diagonal elements of the
+*> upper triangular matrix U from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> On entry, DU must contain the (n-1) super-diagonal elements
+*> of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DU is overwritten by the (n-1) elements of the first
+*> super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[out] DU2
+*> \verbatim
+*> DU2 is REAL array, dimension (N-2)
+*> On exit, DU2 is overwritten by the (n-2) elements of the
+*> second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, D is overwritten by the n diagonal elements of the
-* upper triangular matrix U from the LU factorization of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input/output) REAL array, dimension (N-1)
-* On entry, DU must contain the (n-1) super-diagonal elements
-* of A.
+*> \date November 2011
*
-* On exit, DU is overwritten by the (n-1) elements of the first
-* super-diagonal of U.
+*> \ingroup realOTHERcomputational
*
-* DU2 (output) REAL array, dimension (N-2)
-* On exit, DU2 is overwritten by the (n-2) elements of the
-* second super-diagonal of U.
+* =====================================================================
+ SUBROUTINE SGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL D( * ), DL( * ), DU( * ), DU2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sgttrs.f b/SRC/sgttrs.f
index 9e05e924..9285c300 100644
--- a/SRC/sgttrs.f
+++ b/SRC/sgttrs.f
@@ -1,10 +1,139 @@
+*> \brief \b SGTTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTTRS solves one of the systems of equations
+*> A*X = B or A**T*X = B,
+*> with a tridiagonal matrix A using the LU factorization computed
+*> by SGTTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T* X = B (Transpose)
+*> = 'C': A**T* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is REAL array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the matrix of right hand side vectors B.
+*> On exit, B is overwritten by the solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,61 +144,6 @@
REAL B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
* ..
*
-* Purpose
-* =======
-*
-* SGTTRS solves one of the systems of equations
-* A*X = B or A**T*X = B,
-* with a tridiagonal matrix A using the LU factorization computed
-* by SGTTRF.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T* X = B (Transpose)
-* = 'C': A**T* X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
-*
-* DU2 (input) REAL array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the matrix of right hand side vectors B.
-* On exit, B is overwritten by the solution vectors X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sgtts2.f b/SRC/sgtts2.f
index 293d3f04..344ef335 100644
--- a/SRC/sgtts2.f
+++ b/SRC/sgtts2.f
@@ -1,68 +1,137 @@
- SUBROUTINE SGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER ITRANS, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
-* ..
-*
+*> \brief \b SGTTS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER ITRANS, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
* Purpose
* =======
*
-* SGTTS2 solves one of the systems of equations
-* A*X = B or A**T*X = B,
-* with a tridiagonal matrix A using the LU factorization computed
-* by SGTTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTTS2 solves one of the systems of equations
+*> A*X = B or A**T*X = B,
+*> with a tridiagonal matrix A using the LU factorization computed
+*> by SGTTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITRANS (input) INTEGER
-* Specifies the form of the system of equations.
-* = 0: A * X = B (No transpose)
-* = 1: A**T* X = B (Transpose)
-* = 2: A**T* X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
+*> \param[in] ITRANS
+*> \verbatim
+*> ITRANS is INTEGER
+*> Specifies the form of the system of equations.
+*> = 0: A * X = B (No transpose)
+*> = 1: A**T* X = B (Transpose)
+*> = 2: A**T* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is REAL array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the matrix of right hand side vectors B.
+*> On exit, B is overwritten by the solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
+*> \date November 2011
*
-* DU2 (input) REAL array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
+*> \ingroup realOTHERauxiliary
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
+* =====================================================================
+ SUBROUTINE SGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the matrix of right hand side vectors B.
-* On exit, B is overwritten by the solution vectors X.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER ITRANS, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/shgeqz.f b/SRC/shgeqz.f
index 3145e79d..c588023b 100644
--- a/SRC/shgeqz.f
+++ b/SRC/shgeqz.f
@@ -1,11 +1,308 @@
+*> \brief \b SHGEQZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
+* ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, COMPZ, JOB
+* INTEGER IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL ALPHAI( * ), ALPHAR( * ), BETA( * ),
+* $ H( LDH, * ), Q( LDQ, * ), T( LDT, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SHGEQZ computes the eigenvalues of a real matrix pair (H,T),
+*> where H is an upper Hessenberg matrix and T is upper triangular,
+*> using the double-shift QZ method.
+*> Matrix pairs of this type are produced by the reduction to
+*> generalized upper Hessenberg form of a real matrix pair (A,B):
+*>
+*> A = Q1*H*Z1**T, B = Q1*T*Z1**T,
+*>
+*> as computed by SGGHRD.
+*>
+*> If JOB='S', then the Hessenberg-triangular pair (H,T) is
+*> also reduced to generalized Schur form,
+*>
+*> H = Q*S*Z**T, T = Q*P*Z**T,
+*>
+*> where Q and Z are orthogonal matrices, P is an upper triangular
+*> matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2
+*> diagonal blocks.
+*>
+*> The 1-by-1 blocks correspond to real eigenvalues of the matrix pair
+*> (H,T) and the 2-by-2 blocks correspond to complex conjugate pairs of
+*> eigenvalues.
+*>
+*> Additionally, the 2-by-2 upper triangular diagonal blocks of P
+*> corresponding to 2-by-2 blocks of S are reduced to positive diagonal
+*> form, i.e., if S(j+1,j) is non-zero, then P(j+1,j) = P(j,j+1) = 0,
+*> P(j,j) > 0, and P(j+1,j+1) > 0.
+*>
+*> Optionally, the orthogonal matrix Q from the generalized Schur
+*> factorization may be postmultiplied into an input matrix Q1, and the
+*> orthogonal matrix Z may be postmultiplied into an input matrix Z1.
+*> If Q1 and Z1 are the orthogonal matrices from SGGHRD that reduced
+*> the matrix pair (A,B) to generalized upper Hessenberg form, then the
+*> output matrices Q1*Q and Z1*Z are the orthogonal factors from the
+*> generalized Schur factorization of (A,B):
+*>
+*> A = (Q1*Q)*S*(Z1*Z)**T, B = (Q1*Q)*P*(Z1*Z)**T.
+*>
+*> To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently,
+*> of (A,B)) are computed as a pair of values (alpha,beta), where alpha is
+*> complex and beta real.
+*> If beta is nonzero, lambda = alpha / beta is an eigenvalue of the
+*> generalized nonsymmetric eigenvalue problem (GNEP)
+*> A*x = lambda*B*x
+*> and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
+*> alternate form of the GNEP
+*> mu*A*y = B*y.
+*> Real eigenvalues can be read directly from the generalized Schur
+*> form:
+*> alpha = S(i,i), beta = P(i,i).
+*>
+*> Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
+*> Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
+*> pp. 241--256.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> = 'E': Compute eigenvalues only;
+*> = 'S': Compute eigenvalues and the Schur form.
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'N': Left Schur vectors (Q) are not computed;
+*> = 'I': Q is initialized to the unit matrix and the matrix Q
+*> of left Schur vectors of (H,T) is returned;
+*> = 'V': Q must contain an orthogonal matrix Q1 on entry and
+*> the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Right Schur vectors (Z) are not computed;
+*> = 'I': Z is initialized to the unit matrix and the matrix Z
+*> of right Schur vectors of (H,T) is returned;
+*> = 'V': Z must contain an orthogonal matrix Z1 on entry and
+*> the product Z1*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices H, T, Q, and Z. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI mark the rows and columns of H which are in
+*> Hessenberg form. It is assumed that A is already upper
+*> triangular in rows and columns 1:ILO-1 and IHI+1:N.
+*> If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is REAL array, dimension (LDH, N)
+*> On entry, the N-by-N upper Hessenberg matrix H.
+*> On exit, if JOB = 'S', H contains the upper quasi-triangular
+*> matrix S from the generalized Schur factorization.
+*> If JOB = 'E', the diagonal blocks of H match those of S, but
+*> the rest of H is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT, N)
+*> On entry, the N-by-N upper triangular matrix T.
+*> On exit, if JOB = 'S', T contains the upper triangular
+*> matrix P from the generalized Schur factorization;
+*> 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks of S
+*> are reduced to positive diagonal form, i.e., if H(j+1,j) is
+*> non-zero, then T(j+1,j) = T(j,j+1) = 0, T(j,j) > 0, and
+*> T(j+1,j+1) > 0.
+*> If JOB = 'E', the diagonal blocks of T match those of P, but
+*> the rest of T is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> The real parts of each scalar alpha defining an eigenvalue
+*> of GNEP.
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> The imaginary parts of each scalar alpha defining an
+*> eigenvalue of GNEP.
+*> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
+*> positive, then the j-th and (j+1)-st eigenvalues are a
+*> complex conjugate pair, with ALPHAI(j+1) = -ALPHAI(j).
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> The scalars beta that define the eigenvalues of GNEP.
+*> Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
+*> beta = BETA(j) represent the j-th eigenvalue of the matrix
+*> pair (A,B), in one of the forms lambda = alpha/beta or
+*> mu = beta/alpha. Since either lambda or mu may overflow,
+*> they should not, in general, be computed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, N)
+*> On entry, if COMPZ = 'V', the orthogonal matrix Q1 used in
+*> the reduction of (A,B) to generalized Hessenberg form.
+*> On exit, if COMPZ = 'I', the orthogonal matrix of left Schur
+*> vectors of (H,T), and if COMPZ = 'V', the orthogonal matrix
+*> of left Schur vectors of (A,B).
+*> Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If COMPQ='V' or 'I', then LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the orthogonal matrix Z1 used in
+*> the reduction of (A,B) to generalized Hessenberg form.
+*> On exit, if COMPZ = 'I', the orthogonal matrix of
+*> right Schur vectors of (H,T), and if COMPZ = 'V', the
+*> orthogonal matrix of right Schur vectors of (A,B).
+*> Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If COMPZ='V' or 'I', then LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1,...,N: the QZ iteration did not converge. (H,T) is not
+*> in Schur form, but ALPHAR(i), ALPHAI(i), and
+*> BETA(i), i=INFO+1,...,N should be correct.
+*> = N+1,...,2*N: the shift calculation failed. (H,T) is not
+*> in Schur form, but ALPHAR(i), ALPHAI(i), and
+*> BETA(i), i=INFO-N+1,...,N should be correct.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Iteration counters:
+*>
+*> JITER -- counts iterations.
+*> IITER -- counts iterations run since ILAST was last
+*> changed. This is therefore reset only when a 1-by-1 or
+*> 2-by-2 block deflates off the bottom.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
$ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK,
$ LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, COMPZ, JOB
@@ -17,194 +314,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SHGEQZ computes the eigenvalues of a real matrix pair (H,T),
-* where H is an upper Hessenberg matrix and T is upper triangular,
-* using the double-shift QZ method.
-* Matrix pairs of this type are produced by the reduction to
-* generalized upper Hessenberg form of a real matrix pair (A,B):
-*
-* A = Q1*H*Z1**T, B = Q1*T*Z1**T,
-*
-* as computed by SGGHRD.
-*
-* If JOB='S', then the Hessenberg-triangular pair (H,T) is
-* also reduced to generalized Schur form,
-*
-* H = Q*S*Z**T, T = Q*P*Z**T,
-*
-* where Q and Z are orthogonal matrices, P is an upper triangular
-* matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2
-* diagonal blocks.
-*
-* The 1-by-1 blocks correspond to real eigenvalues of the matrix pair
-* (H,T) and the 2-by-2 blocks correspond to complex conjugate pairs of
-* eigenvalues.
-*
-* Additionally, the 2-by-2 upper triangular diagonal blocks of P
-* corresponding to 2-by-2 blocks of S are reduced to positive diagonal
-* form, i.e., if S(j+1,j) is non-zero, then P(j+1,j) = P(j,j+1) = 0,
-* P(j,j) > 0, and P(j+1,j+1) > 0.
-*
-* Optionally, the orthogonal matrix Q from the generalized Schur
-* factorization may be postmultiplied into an input matrix Q1, and the
-* orthogonal matrix Z may be postmultiplied into an input matrix Z1.
-* If Q1 and Z1 are the orthogonal matrices from SGGHRD that reduced
-* the matrix pair (A,B) to generalized upper Hessenberg form, then the
-* output matrices Q1*Q and Z1*Z are the orthogonal factors from the
-* generalized Schur factorization of (A,B):
-*
-* A = (Q1*Q)*S*(Z1*Z)**T, B = (Q1*Q)*P*(Z1*Z)**T.
-*
-* To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently,
-* of (A,B)) are computed as a pair of values (alpha,beta), where alpha is
-* complex and beta real.
-* If beta is nonzero, lambda = alpha / beta is an eigenvalue of the
-* generalized nonsymmetric eigenvalue problem (GNEP)
-* A*x = lambda*B*x
-* and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
-* alternate form of the GNEP
-* mu*A*y = B*y.
-* Real eigenvalues can be read directly from the generalized Schur
-* form:
-* alpha = S(i,i), beta = P(i,i).
-*
-* Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
-* Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
-* pp. 241--256.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* = 'E': Compute eigenvalues only;
-* = 'S': Compute eigenvalues and the Schur form.
-*
-* COMPQ (input) CHARACTER*1
-* = 'N': Left Schur vectors (Q) are not computed;
-* = 'I': Q is initialized to the unit matrix and the matrix Q
-* of left Schur vectors of (H,T) is returned;
-* = 'V': Q must contain an orthogonal matrix Q1 on entry and
-* the product Q1*Q is returned.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Right Schur vectors (Z) are not computed;
-* = 'I': Z is initialized to the unit matrix and the matrix Z
-* of right Schur vectors of (H,T) is returned;
-* = 'V': Z must contain an orthogonal matrix Z1 on entry and
-* the product Z1*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrices H, T, Q, and Z. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* ILO and IHI mark the rows and columns of H which are in
-* Hessenberg form. It is assumed that A is already upper
-* triangular in rows and columns 1:ILO-1 and IHI+1:N.
-* If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
-*
-* H (input/output) REAL array, dimension (LDH, N)
-* On entry, the N-by-N upper Hessenberg matrix H.
-* On exit, if JOB = 'S', H contains the upper quasi-triangular
-* matrix S from the generalized Schur factorization.
-* If JOB = 'E', the diagonal blocks of H match those of S, but
-* the rest of H is unspecified.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max( 1, N ).
-*
-* T (input/output) REAL array, dimension (LDT, N)
-* On entry, the N-by-N upper triangular matrix T.
-* On exit, if JOB = 'S', T contains the upper triangular
-* matrix P from the generalized Schur factorization;
-* 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks of S
-* are reduced to positive diagonal form, i.e., if H(j+1,j) is
-* non-zero, then T(j+1,j) = T(j,j+1) = 0, T(j,j) > 0, and
-* T(j+1,j+1) > 0.
-* If JOB = 'E', the diagonal blocks of T match those of P, but
-* the rest of T is unspecified.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max( 1, N ).
-*
-* ALPHAR (output) REAL array, dimension (N)
-* The real parts of each scalar alpha defining an eigenvalue
-* of GNEP.
-*
-* ALPHAI (output) REAL array, dimension (N)
-* The imaginary parts of each scalar alpha defining an
-* eigenvalue of GNEP.
-* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
-* positive, then the j-th and (j+1)-st eigenvalues are a
-* complex conjugate pair, with ALPHAI(j+1) = -ALPHAI(j).
-*
-* BETA (output) REAL array, dimension (N)
-* The scalars beta that define the eigenvalues of GNEP.
-* Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
-* beta = BETA(j) represent the j-th eigenvalue of the matrix
-* pair (A,B), in one of the forms lambda = alpha/beta or
-* mu = beta/alpha. Since either lambda or mu may overflow,
-* they should not, in general, be computed.
-*
-* Q (input/output) REAL array, dimension (LDQ, N)
-* On entry, if COMPZ = 'V', the orthogonal matrix Q1 used in
-* the reduction of (A,B) to generalized Hessenberg form.
-* On exit, if COMPZ = 'I', the orthogonal matrix of left Schur
-* vectors of (H,T), and if COMPZ = 'V', the orthogonal matrix
-* of left Schur vectors of (A,B).
-* Not referenced if COMPZ = 'N'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If COMPQ='V' or 'I', then LDQ >= N.
-*
-* Z (input/output) REAL array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the orthogonal matrix Z1 used in
-* the reduction of (A,B) to generalized Hessenberg form.
-* On exit, if COMPZ = 'I', the orthogonal matrix of
-* right Schur vectors of (H,T), and if COMPZ = 'V', the
-* orthogonal matrix of right Schur vectors of (A,B).
-* Not referenced if COMPZ = 'N'.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If COMPZ='V' or 'I', then LDZ >= N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1,...,N: the QZ iteration did not converge. (H,T) is not
-* in Schur form, but ALPHAR(i), ALPHAI(i), and
-* BETA(i), i=INFO+1,...,N should be correct.
-* = N+1,...,2*N: the shift calculation failed. (H,T) is not
-* in Schur form, but ALPHAR(i), ALPHAI(i), and
-* BETA(i), i=INFO-N+1,...,N should be correct.
-*
-* Further Details
-* ===============
-*
-* Iteration counters:
-*
-* JITER -- counts iterations.
-* IITER -- counts iterations run since ILAST was last
-* changed. This is therefore reset only when a 1-by-1 or
-* 2-by-2 block deflates off the bottom.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/shsein.f b/SRC/shsein.f
index 11aabdc8..462e309a 100644
--- a/SRC/shsein.f
+++ b/SRC/shsein.f
@@ -1,11 +1,263 @@
+*> \brief \b SHSEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, WR, WI,
+* VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL,
+* IFAILR, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EIGSRC, INITV, SIDE
+* INTEGER INFO, LDH, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IFAILL( * ), IFAILR( * )
+* REAL H( LDH, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WI( * ), WORK( * ), WR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SHSEIN uses inverse iteration to find specified right and/or left
+*> eigenvectors of a real upper Hessenberg matrix H.
+*>
+*> The right eigenvector x and the left eigenvector y of the matrix H
+*> corresponding to an eigenvalue w are defined by:
+*>
+*> H * x = w * x, y**h * H = w * y**h
+*>
+*> where y**h denotes the conjugate transpose of the vector y.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] EIGSRC
+*> \verbatim
+*> EIGSRC is CHARACTER*1
+*> Specifies the source of eigenvalues supplied in (WR,WI):
+*> = 'Q': the eigenvalues were found using SHSEQR; thus, if
+*> H has zero subdiagonal elements, and so is
+*> block-triangular, then the j-th eigenvalue can be
+*> assumed to be an eigenvalue of the block containing
+*> the j-th row/column. This property allows SHSEIN to
+*> perform inverse iteration on just one diagonal block.
+*> = 'N': no assumptions are made on the correspondence
+*> between eigenvalues and diagonal blocks. In this
+*> case, SHSEIN must always perform inverse iteration
+*> using the whole matrix H.
+*> \endverbatim
+*>
+*> \param[in] INITV
+*> \verbatim
+*> INITV is CHARACTER*1
+*> = 'N': no initial vectors are supplied;
+*> = 'U': user-supplied initial vectors are stored in the arrays
+*> VL and/or VR.
+*> \endverbatim
+*>
+*> \param[in,out] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> Specifies the eigenvectors to be computed. To select the
+*> real eigenvector corresponding to a real eigenvalue WR(j),
+*> SELECT(j) must be set to .TRUE.. To select the complex
+*> eigenvector corresponding to a complex eigenvalue
+*> (WR(j),WI(j)), with complex conjugate (WR(j+1),WI(j+1)),
+*> either SELECT(j) or SELECT(j+1) or both must be set to
+*> .TRUE.; then on exit SELECT(j) is .TRUE. and SELECT(j+1) is
+*> .FALSE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> The upper Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \param[in] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> On entry, the real and imaginary parts of the eigenvalues of
+*> H; a complex conjugate pair of eigenvalues must be stored in
+*> consecutive elements of WR and WI.
+*> On exit, WR may have been altered since close eigenvalues
+*> are perturbed slightly in searching for independent
+*> eigenvectors.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,MM)
+*> On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must
+*> contain starting vectors for the inverse iteration for the
+*> left eigenvectors; the starting vector for each eigenvector
+*> must be in the same column(s) in which the eigenvector will
+*> be stored.
+*> On exit, if SIDE = 'L' or 'B', the left eigenvectors
+*> specified by SELECT will be stored consecutively in the
+*> columns of VL, in the same order as their eigenvalues. A
+*> complex eigenvector corresponding to a complex eigenvalue is
+*> stored in two consecutive columns, the first holding the real
+*> part and the second the imaginary part.
+*> If SIDE = 'R', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL.
+*> LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,MM)
+*> On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must
+*> contain starting vectors for the inverse iteration for the
+*> right eigenvectors; the starting vector for each eigenvector
+*> must be in the same column(s) in which the eigenvector will
+*> be stored.
+*> On exit, if SIDE = 'R' or 'B', the right eigenvectors
+*> specified by SELECT will be stored consecutively in the
+*> columns of VR, in the same order as their eigenvalues. A
+*> complex eigenvector corresponding to a complex eigenvalue is
+*> stored in two consecutive columns, the first holding the real
+*> part and the second the imaginary part.
+*> If SIDE = 'L', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR.
+*> LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR required to
+*> store the eigenvectors; each selected real eigenvector
+*> occupies one column and each selected complex eigenvector
+*> occupies two columns.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension ((N+2)*N)
+*> \endverbatim
+*>
+*> \param[out] IFAILL
+*> \verbatim
+*> IFAILL is INTEGER array, dimension (MM)
+*> If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left
+*> eigenvector in the i-th column of VL (corresponding to the
+*> eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the
+*> eigenvector converged satisfactorily. If the i-th and (i+1)th
+*> columns of VL hold a complex eigenvector, then IFAILL(i) and
+*> IFAILL(i+1) are set to the same value.
+*> If SIDE = 'R', IFAILL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] IFAILR
+*> \verbatim
+*> IFAILR is INTEGER array, dimension (MM)
+*> If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right
+*> eigenvector in the i-th column of VR (corresponding to the
+*> eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the
+*> eigenvector converged satisfactorily. If the i-th and (i+1)th
+*> columns of VR hold a complex eigenvector, then IFAILR(i) and
+*> IFAILR(i+1) are set to the same value.
+*> If SIDE = 'L', IFAILR is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, i is the number of eigenvectors which
+*> failed to converge; see IFAILL and IFAILR for further
+*> details.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Each eigenvector is normalized so that the element of largest
+*> magnitude has magnitude 1; here the magnitude of a complex number
+*> (x,y) is taken to be |x|+|y|.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, WR, WI,
$ VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL,
$ IFAILR, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EIGSRC, INITV, SIDE
@@ -18,152 +270,6 @@
$ WI( * ), WORK( * ), WR( * )
* ..
*
-* Purpose
-* =======
-*
-* SHSEIN uses inverse iteration to find specified right and/or left
-* eigenvectors of a real upper Hessenberg matrix H.
-*
-* The right eigenvector x and the left eigenvector y of the matrix H
-* corresponding to an eigenvalue w are defined by:
-*
-* H * x = w * x, y**h * H = w * y**h
-*
-* where y**h denotes the conjugate transpose of the vector y.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* EIGSRC (input) CHARACTER*1
-* Specifies the source of eigenvalues supplied in (WR,WI):
-* = 'Q': the eigenvalues were found using SHSEQR; thus, if
-* H has zero subdiagonal elements, and so is
-* block-triangular, then the j-th eigenvalue can be
-* assumed to be an eigenvalue of the block containing
-* the j-th row/column. This property allows SHSEIN to
-* perform inverse iteration on just one diagonal block.
-* = 'N': no assumptions are made on the correspondence
-* between eigenvalues and diagonal blocks. In this
-* case, SHSEIN must always perform inverse iteration
-* using the whole matrix H.
-*
-* INITV (input) CHARACTER*1
-* = 'N': no initial vectors are supplied;
-* = 'U': user-supplied initial vectors are stored in the arrays
-* VL and/or VR.
-*
-* SELECT (input/output) LOGICAL array, dimension (N)
-* Specifies the eigenvectors to be computed. To select the
-* real eigenvector corresponding to a real eigenvalue WR(j),
-* SELECT(j) must be set to .TRUE.. To select the complex
-* eigenvector corresponding to a complex eigenvalue
-* (WR(j),WI(j)), with complex conjugate (WR(j+1),WI(j+1)),
-* either SELECT(j) or SELECT(j+1) or both must be set to
-* .TRUE.; then on exit SELECT(j) is .TRUE. and SELECT(j+1) is
-* .FALSE..
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* H (input) REAL array, dimension (LDH,N)
-* The upper Hessenberg matrix H.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* WR (input/output) REAL array, dimension (N)
-* WI (input) REAL array, dimension (N)
-* On entry, the real and imaginary parts of the eigenvalues of
-* H; a complex conjugate pair of eigenvalues must be stored in
-* consecutive elements of WR and WI.
-* On exit, WR may have been altered since close eigenvalues
-* are perturbed slightly in searching for independent
-* eigenvectors.
-*
-* VL (input/output) REAL array, dimension (LDVL,MM)
-* On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must
-* contain starting vectors for the inverse iteration for the
-* left eigenvectors; the starting vector for each eigenvector
-* must be in the same column(s) in which the eigenvector will
-* be stored.
-* On exit, if SIDE = 'L' or 'B', the left eigenvectors
-* specified by SELECT will be stored consecutively in the
-* columns of VL, in the same order as their eigenvalues. A
-* complex eigenvector corresponding to a complex eigenvalue is
-* stored in two consecutive columns, the first holding the real
-* part and the second the imaginary part.
-* If SIDE = 'R', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL.
-* LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.
-*
-* VR (input/output) REAL array, dimension (LDVR,MM)
-* On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must
-* contain starting vectors for the inverse iteration for the
-* right eigenvectors; the starting vector for each eigenvector
-* must be in the same column(s) in which the eigenvector will
-* be stored.
-* On exit, if SIDE = 'R' or 'B', the right eigenvectors
-* specified by SELECT will be stored consecutively in the
-* columns of VR, in the same order as their eigenvalues. A
-* complex eigenvector corresponding to a complex eigenvalue is
-* stored in two consecutive columns, the first holding the real
-* part and the second the imaginary part.
-* If SIDE = 'L', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR.
-* LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR required to
-* store the eigenvectors; each selected real eigenvector
-* occupies one column and each selected complex eigenvector
-* occupies two columns.
-*
-* WORK (workspace) REAL array, dimension ((N+2)*N)
-*
-* IFAILL (output) INTEGER array, dimension (MM)
-* If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left
-* eigenvector in the i-th column of VL (corresponding to the
-* eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the
-* eigenvector converged satisfactorily. If the i-th and (i+1)th
-* columns of VL hold a complex eigenvector, then IFAILL(i) and
-* IFAILL(i+1) are set to the same value.
-* If SIDE = 'R', IFAILL is not referenced.
-*
-* IFAILR (output) INTEGER array, dimension (MM)
-* If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right
-* eigenvector in the i-th column of VR (corresponding to the
-* eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the
-* eigenvector converged satisfactorily. If the i-th and (i+1)th
-* columns of VR hold a complex eigenvector, then IFAILR(i) and
-* IFAILR(i+1) are set to the same value.
-* If SIDE = 'L', IFAILR is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, i is the number of eigenvectors which
-* failed to converge; see IFAILL and IFAILR for further
-* details.
-*
-* Further Details
-* ===============
-*
-* Each eigenvector is normalized so that the element of largest
-* magnitude has magnitude 1; here the magnitude of a complex number
-* (x,y) is taken to be |x|+|y|.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/shseqr.f b/SRC/shseqr.f
index f40ce009..5818a818 100644
--- a/SRC/shseqr.f
+++ b/SRC/shseqr.f
@@ -1,9 +1,250 @@
+*> \brief \b SHSEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z,
+* LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
+* CHARACTER COMPZ, JOB
+* ..
+* .. Array Arguments ..
+* REAL H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+* $ Z( LDZ, * )
+* ..
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SHSEQR computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**T, where T is an upper quasi-triangular matrix (the
+*> Schur form), and Z is the orthogonal matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input orthogonal
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> = 'E': compute eigenvalues only;
+*> = 'S': compute eigenvalues and the Schur form T.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': no Schur vectors are computed;
+*> = 'I': Z is initialized to the unit matrix and the matrix Z
+*> of Schur vectors of H is returned;
+*> = 'V': Z must contain an orthogonal matrix Q on entry, and
+*> the product Q*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
+*> set by a previous call to SGEBAL, and then passed to SGEHRD
+*> when the matrix output by SGEBAL is reduced to Hessenberg
+*> form. Otherwise ILO and IHI should be set to 1 and N
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and JOB = 'S', then H contains the
+*> upper quasi-triangular matrix T from the Schur decomposition
+*> (the Schur form); 2-by-2 diagonal blocks (corresponding to
+*> complex conjugate pairs of eigenvalues) are returned in
+*> standard form, with H(i,i) = H(i+1,i+1) and
+*> H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and JOB = 'E', the
+*> contents of H are unspecified on exit. (The output value of
+*> H when INFO.GT.0 is given under the description of INFO
+*> below.)
+*> \endverbatim
+*> \verbatim
+*> Unlike earlier versions of SHSEQR, this subroutine may
+*> explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
+*> or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> The real and imaginary parts, respectively, of the computed
+*> eigenvalues. If two eigenvalues are computed as a complex
+*> conjugate pair, they are stored in consecutive elements of
+*> WR and WI, say the i-th and (i+1)th, with WI(i) .GT. 0 and
+*> WI(i+1) .LT. 0. If JOB = 'S', the eigenvalues are stored in
+*> the same order as on the diagonal of the Schur form returned
+*> in H, with WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2
+*> diagonal block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
+*> WI(i+1) = -WI(i).
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,N)
+*> If COMPZ = 'N', Z is not referenced.
+*> If COMPZ = 'I', on entry Z need not be set and on exit,
+*> if INFO = 0, Z contains the orthogonal matrix Z of the Schur
+*> vectors of H. If COMPZ = 'V', on entry Z must contain an
+*> N-by-N matrix Q, which is assumed to be equal to the unit
+*> matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
+*> if INFO = 0, Z contains Q*Z.
+*> Normally Q is the orthogonal matrix generated by SORGHR
+*> after the call to SGEHRD which formed the Hessenberg matrix
+*> H. (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if COMPZ = 'I' or
+*> COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient and delivers very good and sometimes
+*> optimal performance. However, LWORK as large as 11*N
+*> may be required for optimal performance. A workspace
+*> query is recommended to determine the optimal workspace
+*> size.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then SHSEQR does a workspace query.
+*> In this case, SHSEQR checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .LT. 0: if INFO = -i, the i-th argument had an illegal
+*> value
+*> .GT. 0: if INFO = i, SHSEQR failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and JOB = 'E', then on exit, the
+*> remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and JOB = 'S', then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is an orthogonal matrix. The final
+*> value of H is upper Hessenberg and quasi-triangular
+*> in rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'V', then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z) = (initial value of Z)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the orthogonal matrix in (*) (regard-
+*> less of the value of JOB.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'I', then on exit
+*> (final value of Z) = U
+*> where U is the orthogonal matrix in (*) (regard-
+*> less of the value of JOB.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'N', then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z,
$ LDZ, WORK, LWORK, INFO )
*
* -- LAPACK computational routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
@@ -13,152 +254,6 @@
REAL H( LDH, * ), WI( * ), WORK( * ), WR( * ),
$ Z( LDZ, * )
* ..
-* Purpose
-* =======
-*
-* SHSEQR computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**T, where T is an upper quasi-triangular matrix (the
-* Schur form), and Z is the orthogonal matrix of Schur vectors.
-*
-* Optionally Z may be postmultiplied into an input orthogonal
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* = 'E': compute eigenvalues only;
-* = 'S': compute eigenvalues and the Schur form T.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': no Schur vectors are computed;
-* = 'I': Z is initialized to the unit matrix and the matrix Z
-* of Schur vectors of H is returned;
-* = 'V': Z must contain an orthogonal matrix Q on entry, and
-* the product Q*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to SGEBAL, and then passed to SGEHRD
-* when the matrix output by SGEBAL is reduced to Hessenberg
-* form. Otherwise ILO and IHI should be set to 1 and N
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) REAL array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and JOB = 'S', then H contains the
-* upper quasi-triangular matrix T from the Schur decomposition
-* (the Schur form); 2-by-2 diagonal blocks (corresponding to
-* complex conjugate pairs of eigenvalues) are returned in
-* standard form, with H(i,i) = H(i+1,i+1) and
-* H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and JOB = 'E', the
-* contents of H are unspecified on exit. (The output value of
-* H when INFO.GT.0 is given under the description of INFO
-* below.)
-*
-* Unlike earlier versions of SHSEQR, this subroutine may
-* explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
-* or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* WR (output) REAL array, dimension (N)
-* WI (output) REAL array, dimension (N)
-* The real and imaginary parts, respectively, of the computed
-* eigenvalues. If two eigenvalues are computed as a complex
-* conjugate pair, they are stored in consecutive elements of
-* WR and WI, say the i-th and (i+1)th, with WI(i) .GT. 0 and
-* WI(i+1) .LT. 0. If JOB = 'S', the eigenvalues are stored in
-* the same order as on the diagonal of the Schur form returned
-* in H, with WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2
-* diagonal block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
-* WI(i+1) = -WI(i).
-*
-* Z (input/output) REAL array, dimension (LDZ,N)
-* If COMPZ = 'N', Z is not referenced.
-* If COMPZ = 'I', on entry Z need not be set and on exit,
-* if INFO = 0, Z contains the orthogonal matrix Z of the Schur
-* vectors of H. If COMPZ = 'V', on entry Z must contain an
-* N-by-N matrix Q, which is assumed to be equal to the unit
-* matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
-* if INFO = 0, Z contains Q*Z.
-* Normally Q is the orthogonal matrix generated by SORGHR
-* after the call to SGEHRD which formed the Hessenberg matrix
-* H. (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if COMPZ = 'I' or
-* COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) REAL array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient and delivers very good and sometimes
-* optimal performance. However, LWORK as large as 11*N
-* may be required for optimal performance. A workspace
-* query is recommended to determine the optimal workspace
-* size.
-*
-* If LWORK = -1, then SHSEQR does a workspace query.
-* In this case, SHSEQR checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .LT. 0: if INFO = -i, the i-th argument had an illegal
-* value
-* .GT. 0: if INFO = i, SHSEQR failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and JOB = 'E', then on exit, the
-* remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and JOB = 'S', then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is an orthogonal matrix. The final
-* value of H is upper Hessenberg and quasi-triangular
-* in rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and COMPZ = 'V', then on exit
-*
-* (final value of Z) = (initial value of Z)*U
-*
-* where U is the orthogonal matrix in (*) (regard-
-* less of the value of JOB.)
-*
-* If INFO .GT. 0 and COMPZ = 'I', then on exit
-* (final value of Z) = U
-* where U is the orthogonal matrix in (*) (regard-
-* less of the value of JOB.)
-*
-* If INFO .GT. 0 and COMPZ = 'N', then Z is not
-* accessed.
-*
* ================================================================
* Default values supplied by
* ILAENV(ISPEC,'SHSEQR',JOB(:1)//COMPZ(:1),N,ILO,IHI,LWORK).
diff --git a/SRC/sisnan.f b/SRC/sisnan.f
index 6b2e7e64..c6b8b03f 100644
--- a/SRC/sisnan.f
+++ b/SRC/sisnan.f
@@ -1,26 +1,64 @@
- LOGICAL FUNCTION SISNAN( SIN )
+*> \brief \b SISNAN
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL SIN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION SISNAN( SIN )
+*
+* .. Scalar Arguments ..
+* REAL SIN
+* ..
+*
* Purpose
* =======
*
-* SISNAN returns .TRUE. if its argument is NaN, and .FALSE.
-* otherwise. To be replaced by the Fortran 2003 intrinsic in the
-* future.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SISNAN returns .TRUE. if its argument is NaN, and .FALSE.
+*> otherwise. To be replaced by the Fortran 2003 intrinsic in the
+*> future.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIN (input) REAL
-* Input to test for NaN.
+*> \param[in] SIN
+*> \verbatim
+*> SIN is REAL
+*> Input to test for NaN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ LOGICAL FUNCTION SISNAN( SIN )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL SIN
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_gbamv.f b/SRC/sla_gbamv.f
index 6499bf6a..c4768e09 100644
--- a/SRC/sla_gbamv.f
+++ b/SRC/sla_gbamv.f
@@ -1,121 +1,197 @@
- SUBROUTINE SLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
- $ INCX, BETA, Y, INCY )
+*> \brief \b SLA_GBAMV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), X( * ), Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
+* INCX, BETA, Y, INCY )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* SLA_GBAMV performs one of the matrix-vector operations
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-* or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_GBAMV performs one of the matrix-vector operations
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) INTEGER
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
-* BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-* BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* ALPHA (input) REAL
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AB (input) REAL array of DIMENSION ( LDAB, n )
-* Before entry, the leading m by n part of the array AB must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDAB (input) INTEGER
-* On entry, LDA specifies the first dimension of AB as declared
-* in the calling (sub) program. LDAB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X (input) REAL array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is INTEGER
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
+*> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array of DIMENSION ( LDAB, n )
+*> Before entry, the leading m by n part of the array AB must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> On entry, LDA specifies the first dimension of AB as declared
+*> in the calling (sub) program. LDAB must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) REAL
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) REAL array, dimension
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup realGBcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
+* =====================================================================
+ SUBROUTINE SLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
+ $ INCX, BETA, Y, INCY )
*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Level 2 Blas routine.
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), X( * ), Y( * )
+* ..
*
* =====================================================================
diff --git a/SRC/sla_gbrcond.f b/SRC/sla_gbrcond.f
index 936cb5cc..91ca15e4 100644
--- a/SRC/sla_gbrcond.f
+++ b/SRC/sla_gbrcond.f
@@ -1,100 +1,179 @@
- REAL FUNCTION SLA_GBRCOND( TRANS, N, KL, KU, AB, LDAB, AFB, LDAFB,
- $ IPIV, CMODE, C, INFO, WORK, IWORK )
+*> \brief \b SLA_GBRCOND
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER N, LDAB, LDAFB, INFO, KL, KU, CMODE
-* ..
-* .. Array Arguments ..
- INTEGER IWORK( * ), IPIV( * )
- REAL AB( LDAB, * ), AFB( LDAFB, * ), WORK( * ),
- $ C( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION SLA_GBRCOND( TRANS, N, KL, KU, AB, LDAB, AFB, LDAFB,
+* IPIV, CMODE, C, INFO, WORK, IWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER N, LDAB, LDAFB, INFO, KL, KU, CMODE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * ), IPIV( * )
+* REAL AB( LDAB, * ), AFB( LDAFB, * ), WORK( * ),
+* $ C( * )
+* ..
+*
* Purpose
* =======
*
-* SLA_GBRCOND Estimates the Skeel condition number of op(A) * op2(C)
-* where op2 is determined by CMODE as follows
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-* The Skeel condition number cond(A) = norminf( |inv(A)||A| )
-* is computed by computing scaling factors R such that
-* diag(R)*A*op2(C) is row equilibrated and computing the standard
-* infinity-norm condition number.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_GBRCOND Estimates the Skeel condition number of op(A) * op2(C)
+*> where op2 is determined by CMODE as follows
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> The Skeel condition number cond(A) = norminf( |inv(A)||A| )
+*> is computed by computing scaling factors R such that
+*> diag(R)*A*op2(C) is row equilibrated and computing the standard
+*> infinity-norm condition number.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) REAL array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by SGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is REAL array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by SGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by SGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] CMODE
+*> \verbatim
+*> CMODE is INTEGER
+*> Determines op2(C) in the formula op(A) * op2(C) as follows:
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * op2(C).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (5*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by SGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CMODE (input) INTEGER
-* Determines op2(C) in the formula op(A) * op2(C) as follows:
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
+*> \date November 2011
*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * op2(C).
+*> \ingroup realGBcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION SLA_GBRCOND( TRANS, N, KL, KU, AB, LDAB, AFB, LDAFB,
+ $ IPIV, CMODE, C, INFO, WORK, IWORK )
*
-* WORK (input) REAL array, dimension (5*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* IWORK (input) INTEGER array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER N, LDAB, LDAFB, INFO, KL, KU, CMODE
+* ..
+* .. Array Arguments ..
+ INTEGER IWORK( * ), IPIV( * )
+ REAL AB( LDAB, * ), AFB( LDAFB, * ), WORK( * ),
+ $ C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_gbrfsx_extended.f b/SRC/sla_gbrfsx_extended.f
index e9fb28d6..e76ba813 100644
--- a/SRC/sla_gbrfsx_extended.f
+++ b/SRC/sla_gbrfsx_extended.f
@@ -1,3 +1,415 @@
+*> \brief \b SLA_GBRFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLA_GBRFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, KL, KU,
+* NRHS, AB, LDAB, AFB, LDAFB, IPIV,
+* COLEQU, C, B, LDB, Y, LDY,
+* BERR_OUT, N_NORMS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, RES, AYB, DY,
+* Y_TAIL, RCOND, ITHRESH, RTHRESH,
+* DZ_UB, IGNORE_CWISE, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
+* $ PREC_TYPE, TRANS_TYPE, N_NORMS, ITHRESH
+* LOGICAL COLEQU, IGNORE_CWISE
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES(*), DY(*), Y_TAIL(*)
+* REAL C( * ), AYB(*), RCOND, BERR_OUT(*),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_GBRFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by SGBRFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] TRANS_TYPE
+*> \verbatim
+*> TRANS_TYPE is INTEGER
+*> Specifies the transposition operation on A.
+*> The value is defined by ILATRANS(T) where T is a CHARACTER and
+*> T = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by SGBTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by SGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by SGBTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by SLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is REAL array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace. This can be the same workspace passed for Y_TAIL.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is REAL array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is REAL array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to SGBTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBcomputational
+*
+* =====================================================================
SUBROUTINE SLA_GBRFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, KL, KU,
$ NRHS, AB, LDAB, AFB, LDAFB, IPIV,
$ COLEQU, C, B, LDB, Y, LDY,
@@ -6,16 +418,11 @@
$ Y_TAIL, RCOND, ITHRESH, RTHRESH,
$ DZ_UB, IGNORE_CWISE, INFO )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
$ PREC_TYPE, TRANS_TYPE, N_NORMS, ITHRESH
@@ -31,259 +438,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SLA_GBRFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by SGBRFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* TRANS_TYPE (input) INTEGER
-* Specifies the transposition operation on A.
-* The value is defined by ILATRANS(T) where T is a CHARACTER and
-* T = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by SGBTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by SGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) REAL array, dimension (LDY,NRHS)
-* On entry, the solution matrix X, as computed by SGBTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by SLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) REAL array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace. This can be the same workspace passed for Y_TAIL.
-*
-* DY (input) REAL array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) REAL array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to SGBTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sla_gbrpvgrw.f b/SRC/sla_gbrpvgrw.f
index 10cfe47f..85c7f224 100644
--- a/SRC/sla_gbrpvgrw.f
+++ b/SRC/sla_gbrpvgrw.f
@@ -1,67 +1,125 @@
- REAL FUNCTION SLA_GBRPVGRW( N, KL, KU, NCOLS, AB, LDAB, AFB,
- $ LDAFB )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), AFB( LDAFB, * )
-* ..
-*
+*> \brief \b SLA_GBRPVGRW
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLA_GBRPVGRW( N, KL, KU, NCOLS, AB, LDAB, AFB,
+* LDAFB )
+*
+* .. Scalar Arguments ..
+* INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), AFB( LDAFB, * )
+* ..
+*
* Purpose
* =======
*
-* SLA_GBRPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_GBRPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is REAL array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by SGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+*> \date November 2011
*
-* AB (input) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \ingroup realGBcomputational
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
+* =====================================================================
+ REAL FUNCTION SLA_GBRPVGRW( N, KL, KU, NCOLS, AB, LDAB, AFB,
+ $ LDAFB )
*
-* AFB (input) REAL array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by SGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+* .. Scalar Arguments ..
+ INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), AFB( LDAFB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_geamv.f b/SRC/sla_geamv.f
index f58122d3..4854ebe6 100644
--- a/SRC/sla_geamv.f
+++ b/SRC/sla_geamv.f
@@ -1,115 +1,186 @@
- SUBROUTINE SLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
- $ Y, INCY )
+*> \brief \b SLA_GEAMV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER INCX, INCY, LDA, M, N, TRANS
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), X( * ), Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
+* Y, INCY )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER INCX, INCY, LDA, M, N, TRANS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* SLA_GEAMV performs one of the matrix-vector operations
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-* or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_GEAMV performs one of the matrix-vector operations
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) INTEGER
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
-* BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-* BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) REAL
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) REAL array of DIMENSION ( LDA, n )
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is INTEGER
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
+*> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n )
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL
+*> Array of DIMENSION at least
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) REAL array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \date November 2011
*
-* BETA (input) REAL
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \ingroup realGEcomputational
*
-* Y (input/output) REAL
-* Array of DIMENSION at least
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+* =====================================================================
+ SUBROUTINE SLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
+ $ Y, INCY )
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Level 2 Blas routine.
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER INCX, INCY, LDA, M, N, TRANS
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_gercond.f b/SRC/sla_gercond.f
index acf8fbcc..0d37a6b5 100644
--- a/SRC/sla_gercond.f
+++ b/SRC/sla_gercond.f
@@ -1,88 +1,161 @@
- REAL FUNCTION SLA_GERCOND ( TRANS, N, A, LDA, AF, LDAF, IPIV,
- $ CMODE, C, INFO, WORK, IWORK )
+*> \brief \b SLA_GERCOND
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER N, LDA, LDAF, INFO, CMODE
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), IWORK( * )
- REAL A( LDA, * ), AF( LDAF, * ), WORK( * ),
- $ C( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION SLA_GERCOND ( TRANS, N, A, LDA, AF, LDAF, IPIV,
+* CMODE, C, INFO, WORK, IWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER N, LDA, LDAF, INFO, CMODE
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), WORK( * ),
+* $ C( * )
+* ..
+*
* Purpose
* =======
*
-* SLA_GERCOND estimates the Skeel condition number of op(A) * op2(C)
-* where op2 is determined by CMODE as follows
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-* The Skeel condition number cond(A) = norminf( |inv(A)||A| )
-* is computed by computing scaling factors R such that
-* diag(R)*A*op2(C) is row equilibrated and computing the standard
-* infinity-norm condition number.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_GERCOND estimates the Skeel condition number of op(A) * op2(C)
+*> where op2 is determined by CMODE as follows
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> The Skeel condition number cond(A) = norminf( |inv(A)||A| )
+*> is computed by computing scaling factors R such that
+*> diag(R)*A*op2(C) is row equilibrated and computing the standard
+*> infinity-norm condition number.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by SGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by SGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by SGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] CMODE
+*> \verbatim
+*> CMODE is INTEGER
+*> Determines op2(C) in the formula op(A) * op2(C) as follows:
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * op2(C).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N).
+*> Workspace.2
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by SGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CMODE (input) INTEGER
-* Determines op2(C) in the formula op(A) * op2(C) as follows:
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
+*> \date November 2011
*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * op2(C).
+*> \ingroup realGEcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION SLA_GERCOND ( TRANS, N, A, LDA, AF, LDAF, IPIV,
+ $ CMODE, C, INFO, WORK, IWORK )
*
-* WORK (input) REAL array, dimension (3*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* IWORK (input) INTEGER array, dimension (N).
-* Workspace.2
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER N, LDA, LDAF, INFO, CMODE
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), IWORK( * )
+ REAL A( LDA, * ), AF( LDAF, * ), WORK( * ),
+ $ C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_gerfsx_extended.f b/SRC/sla_gerfsx_extended.f
index 23c49ec6..72b111c6 100644
--- a/SRC/sla_gerfsx_extended.f
+++ b/SRC/sla_gerfsx_extended.f
@@ -1,3 +1,401 @@
+*> \brief \b SLA_GERFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLA_GERFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, NRHS, A,
+* LDA, AF, LDAF, IPIV, COLEQU, C, B,
+* LDB, Y, LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ TRANS_TYPE, N_NORMS, ITHRESH
+* LOGICAL COLEQU, IGNORE_CWISE
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* REAL C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_GERFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by SGERFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] TRANS_TYPE
+*> \verbatim
+*> TRANS_TYPE is INTEGER
+*> Specifies the transposition operation on A.
+*> The value is defined by ILATRANS(T) where T is a CHARACTER and
+*> T = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by SGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by SGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by SLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is REAL array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace. This can be the same workspace passed for Y_TAIL.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is REAL array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is REAL array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to SGETRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEcomputational
+*
+* =====================================================================
SUBROUTINE SLA_GERFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, NRHS, A,
$ LDA, AF, LDAF, IPIV, COLEQU, C, B,
$ LDB, Y, LDY, BERR_OUT, N_NORMS,
@@ -6,16 +404,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ TRANS_TYPE, N_NORMS, ITHRESH
@@ -31,251 +424,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SLA_GERFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by SGERFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* TRANS_TYPE (input) INTEGER
-* Specifies the transposition operation on A.
-* The value is defined by ILATRANS(T) where T is a CHARACTER and
-* T = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by SGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by SGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) REAL array, dimension (LDY,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by SLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) REAL array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace. This can be the same workspace passed for Y_TAIL.
-*
-* DY (input) REAL array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) REAL array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to SGETRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sla_gerpvgrw.f b/SRC/sla_gerpvgrw.f
index 3547caac..6d2b086d 100644
--- a/SRC/sla_gerpvgrw.f
+++ b/SRC/sla_gerpvgrw.f
@@ -1,54 +1,105 @@
- REAL FUNCTION SLA_GERPVGRW( N, NCOLS, A, LDA, AF, LDAF )
+*> \brief \b SLA_GERPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N, NCOLS, LDA, LDAF
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDAF, * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION SLA_GERPVGRW( N, NCOLS, A, LDA, AF, LDAF )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDAF, * )
+* ..
+*
* Purpose
* =======
*
-* SLA_GERPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_GERPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by SGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* AF (input) REAL array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by SGETRF.
+*> \ingroup realGEcomputational
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =====================================================================
+ REAL FUNCTION SLA_GERPVGRW( N, NCOLS, A, LDA, AF, LDAF )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N, NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDAF, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_lin_berr.f b/SRC/sla_lin_berr.f
index 95d84f21..93a09eaa 100644
--- a/SRC/sla_lin_berr.f
+++ b/SRC/sla_lin_berr.f
@@ -1,15 +1,103 @@
- SUBROUTINE SLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*> \brief \b SLA_LIN_BERR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NZ, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AYB( N, NRHS ), BERR( NRHS )
+* REAL RES( N, NRHS )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_LIN_BERR computes componentwise relative backward error from
+*> the formula
+*> max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z.
+*>
+*>\endverbatim
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NZ
+*> \verbatim
+*> NZ is INTEGER
+*> We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
+*> guard against spuriously zero residuals. Default value is N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices AYB, RES, and BERR. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is REAL array, dimension (N,NRHS)
+*> The residual matrix, i.e., the matrix R in the relative backward
+*> error formula above.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N, NRHS)
+*> The denominator in the relative backward error formula above, i.e.,
+*> the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
+*> are from iterative refinement (see sla_gerfsx_extended.f).
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error from the formula above.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE SLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER N, NZ, NRHS
* ..
@@ -18,42 +106,6 @@
REAL RES( N, NRHS )
* ..
*
-* Purpose
-* =======
-*
-* SLA_LIN_BERR computes componentwise relative backward error from
-* the formula
-* max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NZ (input) INTEGER
-* We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
-* guard against spuriously zero residuals. Default value is N.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices AYB, RES, and BERR. NRHS >= 0.
-*
-* RES (input) REAL array, dimension (N,NRHS)
-* The residual matrix, i.e., the matrix R in the relative backward
-* error formula above.
-*
-* AYB (input) REAL array, dimension (N, NRHS)
-* The denominator in the relative backward error formula above, i.e.,
-* the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
-* are from iterative refinement (see sla_gerfsx_extended.f).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error from the formula above.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sla_porcond.f b/SRC/sla_porcond.f
index 8b9b1bf5..722521a5 100644
--- a/SRC/sla_porcond.f
+++ b/SRC/sla_porcond.f
@@ -1,81 +1,151 @@
- REAL FUNCTION SLA_PORCOND( UPLO, N, A, LDA, AF, LDAF, CMODE, C,
- $ INFO, WORK, IWORK )
+*> \brief \b SLA_PORCOND
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N, LDA, LDAF, INFO, CMODE
- REAL A( LDA, * ), AF( LDAF, * ), WORK( * ),
- $ C( * )
-* ..
-* .. Array Arguments ..
- INTEGER IWORK( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION SLA_PORCOND( UPLO, N, A, LDA, AF, LDAF, CMODE, C,
+* INFO, WORK, IWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO, CMODE
+* REAL A( LDA, * ), AF( LDAF, * ), WORK( * ),
+* $ C( * )
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLA_PORCOND Estimates the Skeel condition number of op(A) * op2(C)
-* where op2 is determined by CMODE as follows
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-* The Skeel condition number cond(A) = norminf( |inv(A)||A| )
-* is computed by computing scaling factors R such that
-* diag(R)*A*op2(C) is row equilibrated and computing the standard
-* infinity-norm condition number.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_PORCOND Estimates the Skeel condition number of op(A) * op2(C)
+*> where op2 is determined by CMODE as follows
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> The Skeel condition number cond(A) = norminf( |inv(A)||A| )
+*> is computed by computing scaling factors R such that
+*> diag(R)*A*op2(C) is row equilibrated and computing the standard
+*> infinity-norm condition number.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPOTRF.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] CMODE
+*> \verbatim
+*> CMODE is INTEGER
+*> Determines op2(C) in the formula op(A) * op2(C) as follows:
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * op2(C).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CMODE (input) INTEGER
-* Determines op2(C) in the formula op(A) * op2(C) as follows:
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
+*> \date November 2011
*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * op2(C).
+*> \ingroup realPOcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION SLA_PORCOND( UPLO, N, A, LDA, AF, LDAF, CMODE, C,
+ $ INFO, WORK, IWORK )
*
-* WORK (input) REAL array, dimension (3*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* IWORK (input) INTEGER array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N, LDA, LDAF, INFO, CMODE
+ REAL A( LDA, * ), AF( LDAF, * ), WORK( * ),
+ $ C( * )
+* ..
+* .. Array Arguments ..
+ INTEGER IWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_porfsx_extended.f b/SRC/sla_porfsx_extended.f
index 1b434a8e..587a814c 100644
--- a/SRC/sla_porfsx_extended.f
+++ b/SRC/sla_porfsx_extended.f
@@ -1,3 +1,390 @@
+*> \brief \b SLA_PORFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLA_PORFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, COLEQU, C, B, LDB, Y,
+* LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* REAL C( * ), AYB(*), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_PORFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by SPORFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by SPOTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by SLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is REAL array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace. This can be the same workspace passed for Y_TAIL.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is REAL array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is REAL array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to SPOTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOcomputational
+*
+* =====================================================================
SUBROUTINE SLA_PORFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, COLEQU, C, B, LDB, Y,
$ LDY, BERR_OUT, N_NORMS,
@@ -6,16 +393,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -31,243 +413,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SLA_PORFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by SPORFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) REAL array, dimension (LDY,NRHS)
-* On entry, the solution matrix X, as computed by SPOTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by SLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) REAL array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace. This can be the same workspace passed for Y_TAIL.
-*
-* DY (input) REAL array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) REAL array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to SPOTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sla_porpvgrw.f b/SRC/sla_porpvgrw.f
index a89f624d..b7d9fb59 100644
--- a/SRC/sla_porpvgrw.f
+++ b/SRC/sla_porpvgrw.f
@@ -1,57 +1,112 @@
- REAL FUNCTION SLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF, LDAF, WORK )
+*> \brief \b SLA_PORPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER NCOLS, LDA, LDAF
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDAF, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION SLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF, LDAF, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDAF, * ), WORK( * )
+* ..
+*
* Purpose
* =======
-*
-* SLA_PORPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_PORPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup realPOcomputational
*
-* AF (input) REAL array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPOTRF.
+* =====================================================================
+ REAL FUNCTION SLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF, LDAF, WORK )
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) REAL array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDAF, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_syamv.f b/SRC/sla_syamv.f
index ded91681..82cbf3ea 100644
--- a/SRC/sla_syamv.f
+++ b/SRC/sla_syamv.f
@@ -1,118 +1,191 @@
- SUBROUTINE SLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
- $ INCY )
+*> \brief \b SLA_SYAMV
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER INCX, INCY, LDA, N, UPLO
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), X( * ), Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER INCX, INCY, LDA, N, UPLO
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* SLA_SYAMV performs the matrix-vector operation
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* n by n symmetric matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_SYAMV performs the matrix-vector operation
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> n by n symmetric matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) INTEGER
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = BLAS_UPPER Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = BLAS_LOWER Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) REAL .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) REAL array of DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X (input) REAL array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) )
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is INTEGER
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_UPPER Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_LOWER Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL .
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) )
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL .
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension
+*> ( 1 + ( n - 1 )*abs( INCY ) )
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) REAL .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) REAL array, dimension
-* ( 1 + ( n - 1 )*abs( INCY ) )
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup realSYcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*> -- Modified for the absolute-value product, April 2006
+*> Jason Riedy, UC Berkeley
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+ $ INCY )
*
-* Level 2 Blas routine.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
-* -- Modified for the absolute-value product, April 2006
-* Jason Riedy, UC Berkeley
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER INCX, INCY, LDA, N, UPLO
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_syrcond.f b/SRC/sla_syrcond.f
index 2f941889..1f4802aa 100644
--- a/SRC/sla_syrcond.f
+++ b/SRC/sla_syrcond.f
@@ -1,84 +1,156 @@
- REAL FUNCTION SLA_SYRCOND( UPLO, N, A, LDA, AF, LDAF, IPIV, CMODE,
- $ C, INFO, WORK, IWORK )
+*> \brief \b SLA_SYRCOND
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N, LDA, LDAF, INFO, CMODE
-* ..
-* .. Array Arguments
- INTEGER IWORK( * ), IPIV( * )
- REAL A( LDA, * ), AF( LDAF, * ), WORK( * ), C( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION SLA_SYRCOND( UPLO, N, A, LDA, AF, LDAF, IPIV, CMODE,
+* C, INFO, WORK, IWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO, CMODE
+* ..
+* .. Array Arguments
+* INTEGER IWORK( * ), IPIV( * )
+* REAL A( LDA, * ), AF( LDAF, * ), WORK( * ), C( * )
+* ..
+*
* Purpose
* =======
*
-* SLA_SYRCOND estimates the Skeel condition number of op(A) * op2(C)
-* where op2 is determined by CMODE as follows
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
-* The Skeel condition number cond(A) = norminf( |inv(A)||A| )
-* is computed by computing scaling factors R such that
-* diag(R)*A*op2(C) is row equilibrated and computing the standard
-* infinity-norm condition number.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_SYRCOND estimates the Skeel condition number of op(A) * op2(C)
+*> where op2 is determined by CMODE as follows
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> The Skeel condition number cond(A) = norminf( |inv(A)||A| )
+*> is computed by computing scaling factors R such that
+*> diag(R)*A*op2(C) is row equilibrated and computing the standard
+*> infinity-norm condition number.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] CMODE
+*> \verbatim
+*> CMODE is INTEGER
+*> Determines op2(C) in the formula op(A) * op2(C) as follows:
+*> CMODE = 1 op2(C) = C
+*> CMODE = 0 op2(C) = I
+*> CMODE = -1 op2(C) = inv(C)
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The vector C in the formula op(A) * op2(C).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CMODE (input) INTEGER
-* Determines op2(C) in the formula op(A) * op2(C) as follows:
-* CMODE = 1 op2(C) = C
-* CMODE = 0 op2(C) = I
-* CMODE = -1 op2(C) = inv(C)
+*> \date November 2011
*
-* C (input) REAL array, dimension (N)
-* The vector C in the formula op(A) * op2(C).
+*> \ingroup realSYcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ REAL FUNCTION SLA_SYRCOND( UPLO, N, A, LDA, AF, LDAF, IPIV, CMODE,
+ $ C, INFO, WORK, IWORK )
*
-* WORK (input) REAL array, dimension (3*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* IWORK (input) INTEGER array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N, LDA, LDAF, INFO, CMODE
+* ..
+* .. Array Arguments
+ INTEGER IWORK( * ), IPIV( * )
+ REAL A( LDA, * ), AF( LDAF, * ), WORK( * ), C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_syrfsx_extended.f b/SRC/sla_syrfsx_extended.f
index 97756053..bb735980 100644
--- a/SRC/sla_syrfsx_extended.f
+++ b/SRC/sla_syrfsx_extended.f
@@ -1,3 +1,398 @@
+*> \brief \b SLA_SYRFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLA_SYRFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, IPIV, COLEQU, C, B, LDB,
+* Y, LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* REAL RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* REAL C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_SYRFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by SSYRFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by SSYTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is REAL array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by SLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is REAL array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is REAL array, dimension (N)
+*> Workspace. This can be the same workspace passed for Y_TAIL.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is REAL array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is REAL array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is REAL
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is REAL
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to SSYTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+* =====================================================================
SUBROUTINE SLA_SYRFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, IPIV, COLEQU, C, B, LDB,
$ Y, LDY, BERR_OUT, N_NORMS,
@@ -6,16 +401,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -32,247 +422,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SLA_SYRFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by SSYRFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) REAL array, dimension (LDY,NRHS)
-* On entry, the solution matrix X, as computed by SSYTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) REAL array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by SLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) REAL array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) REAL array, dimension (N)
-* Workspace. This can be the same workspace passed for Y_TAIL.
-*
-* DY (input) REAL array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) REAL array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) REAL
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) REAL
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to SSYTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sla_syrpvgrw.f b/SRC/sla_syrpvgrw.f
index 90edfcab..ead1e3d6 100644
--- a/SRC/sla_syrpvgrw.f
+++ b/SRC/sla_syrpvgrw.f
@@ -1,71 +1,137 @@
- REAL FUNCTION SLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
- $ WORK )
+*> \brief \b SLA_SYRPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER N, INFO, LDA, LDAF
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), AF( LDAF, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* REAL FUNCTION SLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), AF( LDAF, * ), WORK( * )
+* ..
+*
* Purpose
* =======
-*
-* SLA_SYRPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLA_SYRPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The value of INFO returned from SSYTRF, .i.e., the pivot in
+*> column INFO is exactly 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* INFO (input) INTEGER
-* The value of INFO returned from SSYTRF, .i.e., the pivot in
-* column INFO is exactly 0.
-*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* AF (input) REAL array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSYTRF.
+*> \ingroup realSYcomputational
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =====================================================================
+ REAL FUNCTION SLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF, LDAF, IPIV,
+ $ WORK )
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) REAL array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), AF( LDAF, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sla_wwaddw.f b/SRC/sla_wwaddw.f
index 359238d9..7b67f5d3 100644
--- a/SRC/sla_wwaddw.f
+++ b/SRC/sla_wwaddw.f
@@ -1,44 +1,91 @@
- SUBROUTINE SLA_WWADDW( N, X, Y, W )
+*> \brief \b SLA_WWADDW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N
-* ..
-* .. Array Arguments ..
- REAL X( * ), Y( * ), W( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLA_WWADDW( N, X, Y, W )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL X( * ), Y( * ), W( * )
+* ..
+*
* Purpose
-* =======
-*
-* SLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
+* =======
*
-* This works for all extant IBM's hex and binary floating point
-* arithmetics, but not for decimal.
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
+*>
+*> This works for all extant IBM's hex and binary floating point
+*> arithmetics, but not for decimal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of vectors X, Y, and W.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of vectors X, Y, and W.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> The first part of the doubled-single accumulation vector.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension (N)
+*> The second part of the doubled-single accumulation vector.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The vector to be added.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input/output) REAL array, dimension (N)
-* The first part of the doubled-single accumulation vector.
+*> \date November 2011
*
-* Y (input/output) REAL array, dimension (N)
-* The second part of the doubled-single accumulation vector.
+*> \ingroup realOTHERcomputational
*
-* W (input) REAL array, dimension (N)
-* The vector to be added.
+* =====================================================================
+ SUBROUTINE SLA_WWADDW( N, X, Y, W )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ REAL X( * ), Y( * ), W( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slabad.f b/SRC/slabad.f
index 2904e787..b83215e3 100644
--- a/SRC/slabad.f
+++ b/SRC/slabad.f
@@ -1,38 +1,79 @@
- SUBROUTINE SLABAD( SMALL, LARGE )
+*> \brief \b SLABAD
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL LARGE, SMALL
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLABAD( SMALL, LARGE )
+*
+* .. Scalar Arguments ..
+* REAL LARGE, SMALL
+* ..
+*
* Purpose
* =======
*
-* SLABAD takes as input the values computed by SLAMCH for underflow and
-* overflow, and returns the square root of each of these values if the
-* log of LARGE is sufficiently large. This subroutine is intended to
-* identify machines with a large exponent range, such as the Crays, and
-* redefine the underflow and overflow limits to be the square roots of
-* the values computed by SLAMCH. This subroutine is needed because
-* SLAMCH does not compensate for poor arithmetic in the upper half of
-* the exponent range, as is found on a Cray.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLABAD takes as input the values computed by SLAMCH for underflow and
+*> overflow, and returns the square root of each of these values if the
+*> log of LARGE is sufficiently large. This subroutine is intended to
+*> identify machines with a large exponent range, such as the Crays, and
+*> redefine the underflow and overflow limits to be the square roots of
+*> the values computed by SLAMCH. This subroutine is needed because
+*> SLAMCH does not compensate for poor arithmetic in the upper half of
+*> the exponent range, as is found on a Cray.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SMALL (input/output) REAL
-* On entry, the underflow threshold as computed by SLAMCH.
-* On exit, if LOG10(LARGE) is sufficiently large, the square
-* root of SMALL, otherwise unchanged.
+*> \param[in,out] SMALL
+*> \verbatim
+*> SMALL is REAL
+*> On entry, the underflow threshold as computed by SLAMCH.
+*> On exit, if LOG10(LARGE) is sufficiently large, the square
+*> root of SMALL, otherwise unchanged.
+*> \endverbatim
+*>
+*> \param[in,out] LARGE
+*> \verbatim
+*> LARGE is REAL
+*> On entry, the overflow threshold as computed by SLAMCH.
+*> On exit, if LOG10(LARGE) is sufficiently large, the square
+*> root of LARGE, otherwise unchanged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* LARGE (input/output) REAL
-* On entry, the overflow threshold as computed by SLAMCH.
-* On exit, if LOG10(LARGE) is sufficiently large, the square
-* root of LARGE, otherwise unchanged.
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ SUBROUTINE SLABAD( SMALL, LARGE )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL LARGE, SMALL
+* ..
*
* =====================================================================
*
diff --git a/SRC/slabrd.f b/SRC/slabrd.f
index 433c6cb2..73a62562 100644
--- a/SRC/slabrd.f
+++ b/SRC/slabrd.f
@@ -1,137 +1,175 @@
- SUBROUTINE SLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
- $ LDY )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDX, LDY, M, N, NB
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
- $ TAUQ( * ), X( LDX, * ), Y( LDY, * )
-* ..
-*
+*> \brief \b SLABRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+* LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDX, LDY, M, N, NB
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
+* $ TAUQ( * ), X( LDX, * ), Y( LDY, * )
+* ..
+*
* Purpose
* =======
*
-* SLABRD reduces the first NB rows and columns of a real general
-* m by n matrix A to upper or lower bidiagonal form by an orthogonal
-* transformation Q**T * A * P, and returns the matrices X and Y which
-* are needed to apply the transformation to the unreduced part of A.
-*
-* If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
-* bidiagonal form.
-*
-* This is an auxiliary routine called by SGEBRD
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLABRD reduces the first NB rows and columns of a real general
+*> m by n matrix A to upper or lower bidiagonal form by an orthogonal
+*> transformation Q**T * A * P, and returns the matrices X and Y which
+*> are needed to apply the transformation to the unreduced part of A.
+*>
+*> If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
+*> bidiagonal form.
+*>
+*> This is an auxiliary routine called by SGEBRD
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A.
-*
-* NB (input) INTEGER
-* The number of leading rows and columns of A to be reduced.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the m by n general matrix to be reduced.
-* On exit, the first NB rows and columns of the matrix are
-* overwritten; the rest of the array is unchanged.
-* If m >= n, elements on and below the diagonal in the first NB
-* columns, with the array TAUQ, represent the orthogonal
-* matrix Q as a product of elementary reflectors; and
-* elements above the diagonal in the first NB rows, with the
-* array TAUP, represent the orthogonal matrix P as a product
-* of elementary reflectors.
-* If m < n, elements below the diagonal in the first NB
-* columns, with the array TAUQ, represent the orthogonal
-* matrix Q as a product of elementary reflectors, and
-* elements on and above the diagonal in the first NB rows,
-* with the array TAUP, represent the orthogonal matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) REAL array, dimension (NB)
-* The diagonal elements of the first NB rows and columns of
-* the reduced matrix. D(i) = A(i,i).
-*
-* E (output) REAL array, dimension (NB)
-* The off-diagonal elements of the first NB rows and columns of
-* the reduced matrix.
-*
-* TAUQ (output) REAL array dimension (NB)
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix Q. See Further Details.
-*
-* TAUP (output) REAL array, dimension (NB)
-* The scalar factors of the elementary reflectors which
-* represent the orthogonal matrix P. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of leading rows and columns of A to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (output) REAL array, dimension (LDX,NB)
-* The m-by-nb matrix X required to update the unreduced part
-* of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,M).
+*> \date November 2011
*
-* Y (output) REAL array, dimension (LDY,NB)
-* The n-by-nb matrix Y required to update the unreduced part
-* of A.
+*> \ingroup realOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) REAL array, dimension (NB)
+*> The diagonal elements of the first NB rows and columns of
+*> the reduced matrix. D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (NB)
+*> The off-diagonal elements of the first NB rows and columns of
+*> the reduced matrix.
+*>
+*> TAUQ (output) REAL array dimension (NB)
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix Q. See Further Details.
+*>
+*> TAUP (output) REAL array, dimension (NB)
+*> The scalar factors of the elementary reflectors which
+*> represent the orthogonal matrix P. See Further Details.
+*>
+*> X (output) REAL array, dimension (LDX,NB)
+*> The m-by-nb matrix X required to update the unreduced part
+*> of A.
+*>
+*> LDX (input) INTEGER
+*> The leading dimension of the array X. LDX >= max(1,M).
+*>
+*> Y (output) REAL array, dimension (LDY,NB)
+*> The n-by-nb matrix Y required to update the unreduced part
+*> of A.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
+*>
+*> where tauq and taup are real scalars, and v and u are real vectors.
+*>
+*> If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
+*> A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
+*> A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The elements of the vectors v and u together form the m-by-nb matrix
+*> V and the nb-by-n matrix U**T which are needed, with X and Y, to apply
+*> the transformation to the unreduced part of the matrix, using a block
+*> update of the form: A := A - V*Y**T - X*U**T.
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with nb = 2:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
+*> ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
+*> ( v1 v2 a a a ) ( v1 1 a a a a )
+*> ( v1 v2 a a a ) ( v1 v2 a a a a )
+*> ( v1 v2 a a a ) ( v1 v2 a a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix which is unchanged,
+*> vi denotes an element of the vector defining H(i), and ui an element
+*> of the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+ $ LDY )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**T and G(i) = I - taup * u * u**T
-*
-* where tauq and taup are real scalars, and v and u are real vectors.
-*
-* If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
-* A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
-* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The elements of the vectors v and u together form the m-by-nb matrix
-* V and the nb-by-n matrix U**T which are needed, with X and Y, to apply
-* the transformation to the unreduced part of the matrix, using a block
-* update of the form: A := A - V*Y**T - X*U**T.
-*
-* The contents of A on exit are illustrated by the following examples
-* with nb = 2:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
-* ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
-* ( v1 v2 a a a ) ( v1 1 a a a a )
-* ( v1 v2 a a a ) ( v1 v2 a a a a )
-* ( v1 v2 a a a ) ( v1 v2 a a a a )
-* ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix which is unchanged,
-* vi denotes an element of the vector defining H(i), and ui an element
-* of the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER LDA, LDX, LDY, M, N, NB
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), D( * ), E( * ), TAUP( * ),
+ $ TAUQ( * ), X( LDX, * ), Y( LDY, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slacn2.f b/SRC/slacn2.f
index 316a502d..3668bdfe 100644
--- a/SRC/slacn2.f
+++ b/SRC/slacn2.f
@@ -1,75 +1,141 @@
- SUBROUTINE SLACN2( N, V, X, ISGN, EST, KASE, ISAVE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KASE, N
- REAL EST
-* ..
-* .. Array Arguments ..
- INTEGER ISGN( * ), ISAVE( 3 )
- REAL V( * ), X( * )
-* ..
-*
+*> \brief \b SLACN2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLACN2( N, V, X, ISGN, EST, KASE, ISAVE )
+*
+* .. Scalar Arguments ..
+* INTEGER KASE, N
+* REAL EST
+* ..
+* .. Array Arguments ..
+* INTEGER ISGN( * ), ISAVE( 3 )
+* REAL V( * ), X( * )
+* ..
+*
* Purpose
* =======
*
-* SLACN2 estimates the 1-norm of a square, real matrix A.
-* Reverse communication is used for evaluating matrix-vector products.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLACN2 estimates the 1-norm of a square, real matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 1.
-*
-* V (workspace) REAL array, dimension (N)
-* On the final return, V = A*W, where EST = norm(V)/norm(W)
-* (W is not returned).
-*
-* X (input/output) REAL array, dimension (N)
-* On an intermediate return, X should be overwritten by
-* A * X, if KASE=1,
-* A**T * X, if KASE=2,
-* and SLACN2 must be re-called with all the other parameters
-* unchanged.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension (N)
+*> On the final return, V = A*W, where EST = norm(V)/norm(W)
+*> (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> On an intermediate return, X should be overwritten by
+*> A * X, if KASE=1,
+*> A**T * X, if KASE=2,
+*> and SLACN2 must be re-called with all the other parameters
+*> unchanged.
+*> \endverbatim
+*>
+*> \param[out] ISGN
+*> \verbatim
+*> ISGN is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*> EST is REAL
+*> On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
+*> unchanged from the previous call to SLACN2.
+*> On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*> KASE is INTEGER
+*> On the initial call to SLACN2, KASE should be 0.
+*> On an intermediate return, KASE will be 1 or 2, indicating
+*> whether X should be overwritten by A * X or A**T * X.
+*> On the final return from SLACN2, KASE will again be 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISAVE
+*> \verbatim
+*> ISAVE is INTEGER array, dimension (3)
+*> ISAVE is used to save variables between calls to SLACN2
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ISGN (workspace) INTEGER array, dimension (N)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* EST (input/output) REAL
-* On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
-* unchanged from the previous call to SLACN2.
-* On exit, EST is an estimate (a lower bound) for norm(A).
+*> \date November 2011
*
-* KASE (input/output) INTEGER
-* On the initial call to SLACN2, KASE should be 0.
-* On an intermediate return, KASE will be 1 or 2, indicating
-* whether X should be overwritten by A * X or A**T * X.
-* On the final return from SLACN2, KASE will again be 0.
+*> \ingroup realOTHERauxiliary
*
-* ISAVE (input/output) INTEGER array, dimension (3)
-* ISAVE is used to save variables between calls to SLACN2
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Contributed by Nick Higham, University of Manchester.
+*> Originally named SONEST, dated March 16, 1988.
+*>
+*> Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*> a real or complex matrix, with applications to condition estimation",
+*> ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*> This is a thread safe version of SLACON, which uses the array ISAVE
+*> in place of a SAVE statement, as follows:
+*>
+*> SLACON SLACN2
+*> JUMP ISAVE(1)
+*> J ISAVE(2)
+*> ITER ISAVE(3)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLACN2( N, V, X, ISGN, EST, KASE, ISAVE )
*
-* Contributed by Nick Higham, University of Manchester.
-* Originally named SONEST, dated March 16, 1988.
-*
-* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
-* a real or complex matrix, with applications to condition estimation",
-* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
-*
-* This is a thread safe version of SLACON, which uses the array ISAVE
-* in place of a SAVE statement, as follows:
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SLACON SLACN2
-* JUMP ISAVE(1)
-* J ISAVE(2)
-* ITER ISAVE(3)
+* .. Scalar Arguments ..
+ INTEGER KASE, N
+ REAL EST
+* ..
+* .. Array Arguments ..
+ INTEGER ISGN( * ), ISAVE( 3 )
+ REAL V( * ), X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slacon.f b/SRC/slacon.f
index 9f2fd02c..5de06bc4 100644
--- a/SRC/slacon.f
+++ b/SRC/slacon.f
@@ -1,64 +1,129 @@
- SUBROUTINE SLACON( N, V, X, ISGN, EST, KASE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KASE, N
- REAL EST
-* ..
-* .. Array Arguments ..
- INTEGER ISGN( * )
- REAL V( * ), X( * )
-* ..
-*
+*> \brief \b SLACON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLACON( N, V, X, ISGN, EST, KASE )
+*
+* .. Scalar Arguments ..
+* INTEGER KASE, N
+* REAL EST
+* ..
+* .. Array Arguments ..
+* INTEGER ISGN( * )
+* REAL V( * ), X( * )
+* ..
+*
* Purpose
* =======
*
-* SLACON estimates the 1-norm of a square, real matrix A.
-* Reverse communication is used for evaluating matrix-vector products.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLACON estimates the 1-norm of a square, real matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 1.
-*
-* V (workspace) REAL array, dimension (N)
-* On the final return, V = A*W, where EST = norm(V)/norm(W)
-* (W is not returned).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension (N)
+*> On the final return, V = A*W, where EST = norm(V)/norm(W)
+*> (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> On an intermediate return, X should be overwritten by
+*> A * X, if KASE=1,
+*> A**T * X, if KASE=2,
+*> and SLACON must be re-called with all the other parameters
+*> unchanged.
+*> \endverbatim
+*>
+*> \param[out] ISGN
+*> \verbatim
+*> ISGN is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*> EST is REAL
+*> On entry with KASE = 1 or 2 and JUMP = 3, EST should be
+*> unchanged from the previous call to SLACON.
+*> On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*> KASE is INTEGER
+*> On the initial call to SLACON, KASE should be 0.
+*> On an intermediate return, KASE will be 1 or 2, indicating
+*> whether X should be overwritten by A * X or A**T * X.
+*> On the final return from SLACON, KASE will again be 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input/output) REAL array, dimension (N)
-* On an intermediate return, X should be overwritten by
-* A * X, if KASE=1,
-* A**T * X, if KASE=2,
-* and SLACON must be re-called with all the other parameters
-* unchanged.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ISGN (workspace) INTEGER array, dimension (N)
+*> \date November 2011
*
-* EST (input/output) REAL
-* On entry with KASE = 1 or 2 and JUMP = 3, EST should be
-* unchanged from the previous call to SLACON.
-* On exit, EST is an estimate (a lower bound) for norm(A).
+*> \ingroup realOTHERauxiliary
*
-* KASE (input/output) INTEGER
-* On the initial call to SLACON, KASE should be 0.
-* On an intermediate return, KASE will be 1 or 2, indicating
-* whether X should be overwritten by A * X or A**T * X.
-* On the final return from SLACON, KASE will again be 0.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> Contributed by Nick Higham, University of Manchester.
+*> Originally named SONEST, dated March 16, 1988.
+*>
+*> Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*> a real or complex matrix, with applications to condition estimation",
+*> ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLACON( N, V, X, ISGN, EST, KASE )
*
-* Contributed by Nick Higham, University of Manchester.
-* Originally named SONEST, dated March 16, 1988.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
-* a real or complex matrix, with applications to condition estimation",
-* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+* .. Scalar Arguments ..
+ INTEGER KASE, N
+ REAL EST
+* ..
+* .. Array Arguments ..
+ INTEGER ISGN( * )
+ REAL V( * ), X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slacpy.f b/SRC/slacpy.f
index e77a59c7..e8aba9c0 100644
--- a/SRC/slacpy.f
+++ b/SRC/slacpy.f
@@ -1,52 +1,112 @@
- SUBROUTINE SLACPY( UPLO, M, N, A, LDA, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDB, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SLACPY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLACPY( UPLO, M, N, A, LDA, B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SLACPY copies all or part of a two-dimensional matrix A to another
-* matrix B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLACPY copies all or part of a two-dimensional matrix A to another
+*> matrix B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be copied to B.
-* = 'U': Upper triangular part
-* = 'L': Lower triangular part
-* Otherwise: All of the matrix A
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be copied to B.
+*> = 'U': Upper triangular part
+*> = 'L': Lower triangular part
+*> Otherwise: All of the matrix A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m by n matrix A. If UPLO = 'U', only the upper triangle
+*> or trapezoid is accessed; if UPLO = 'L', only the lower
+*> triangle or trapezoid is accessed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> On exit, B = A in the locations specified by UPLO.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \date November 2011
*
-* A (input) REAL array, dimension (LDA,N)
-* The m by n matrix A. If UPLO = 'U', only the upper triangle
-* or trapezoid is accessed; if UPLO = 'L', only the lower
-* triangle or trapezoid is accessed.
+*> \ingroup auxOTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE SLACPY( UPLO, M, N, A, LDA, B, LDB )
*
-* B (output) REAL array, dimension (LDB,N)
-* On exit, B = A in the locations specified by UPLO.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sladiv.f b/SRC/sladiv.f
index 5747dc35..5d4d50b4 100644
--- a/SRC/sladiv.f
+++ b/SRC/sladiv.f
@@ -1,42 +1,95 @@
- SUBROUTINE SLADIV( A, B, C, D, P, Q )
+*> \brief \b SLADIV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL A, B, C, D, P, Q
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLADIV( A, B, C, D, P, Q )
+*
+* .. Scalar Arguments ..
+* REAL A, B, C, D, P, Q
+* ..
+*
* Purpose
* =======
*
-* SLADIV performs complex division in real arithmetic
-*
-* a + i*b
-* p + i*q = ---------
-* c + i*d
-*
-* The algorithm is due to Robert L. Smith and can be found
-* in D. Knuth, The art of Computer Programming, Vol.2, p.195
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLADIV performs complex division in real arithmetic
+*>
+*> a + i*b
+*> p + i*q = ---------
+*> c + i*d
+*>
+*> The algorithm is due to Robert L. Smith and can be found
+*> in D. Knuth, The art of Computer Programming, Vol.2, p.195
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) REAL
+*> \param[in] A
+*> \verbatim
+*> A is REAL
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL
+*> The scalars a, b, c, and d in the above expression.
+*> \endverbatim
+*>
+*> \param[out] P
+*> \verbatim
+*> P is REAL
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL
+*> The scalars p and q in the above expression.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* B (input) REAL
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input) REAL
+*> \date November 2011
*
-* D (input) REAL
-* The scalars a, b, c, and d in the above expression.
+*> \ingroup auxOTHERauxiliary
*
-* P (output) REAL
+* =====================================================================
+ SUBROUTINE SLADIV( A, B, C, D, P, Q )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Q (output) REAL
-* The scalars p and q in the above expression.
+* .. Scalar Arguments ..
+ REAL A, B, C, D, P, Q
+* ..
*
* =====================================================================
*
diff --git a/SRC/slae2.f b/SRC/slae2.f
index 2415af51..9e7d8260 100644
--- a/SRC/slae2.f
+++ b/SRC/slae2.f
@@ -1,54 +1,109 @@
- SUBROUTINE SLAE2( A, B, C, RT1, RT2 )
+*> \brief \b SLAE2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL A, B, C, RT1, RT2
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAE2( A, B, C, RT1, RT2 )
+*
+* .. Scalar Arguments ..
+* REAL A, B, C, RT1, RT2
+* ..
+*
* Purpose
* =======
*
-* SLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix
-* [ A B ]
-* [ B C ].
-* On return, RT1 is the eigenvalue of larger absolute value, and RT2
-* is the eigenvalue of smaller absolute value.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix
+*> [ A B ]
+*> [ B C ].
+*> On return, RT1 is the eigenvalue of larger absolute value, and RT2
+*> is the eigenvalue of smaller absolute value.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) REAL
-* The (1,1) element of the 2-by-2 matrix.
+*> \param[in] A
+*> \verbatim
+*> A is REAL
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL
+*> The (1,2) and (2,1) elements of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] RT1
+*> \verbatim
+*> RT1 is REAL
+*> The eigenvalue of larger absolute value.
+*> \endverbatim
+*>
+*> \param[out] RT2
+*> \verbatim
+*> RT2 is REAL
+*> The eigenvalue of smaller absolute value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* B (input) REAL
-* The (1,2) and (2,1) elements of the 2-by-2 matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input) REAL
-* The (2,2) element of the 2-by-2 matrix.
+*> \date November 2011
*
-* RT1 (output) REAL
-* The eigenvalue of larger absolute value.
+*> \ingroup auxOTHERauxiliary
*
-* RT2 (output) REAL
-* The eigenvalue of smaller absolute value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> RT1 is accurate to a few ulps barring over/underflow.
+*>
+*> RT2 may be inaccurate if there is massive cancellation in the
+*> determinant A*C-B*B; higher precision or correctly rounded or
+*> correctly truncated arithmetic would be needed to compute RT2
+*> accurately in all cases.
+*>
+*> Overflow is possible only if RT1 is within a factor of 5 of overflow.
+*> Underflow is harmless if the input data is 0 or exceeds
+*> underflow_threshold / macheps.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAE2( A, B, C, RT1, RT2 )
*
-* RT1 is accurate to a few ulps barring over/underflow.
-*
-* RT2 may be inaccurate if there is massive cancellation in the
-* determinant A*C-B*B; higher precision or correctly rounded or
-* correctly truncated arithmetic would be needed to compute RT2
-* accurately in all cases.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Overflow is possible only if RT1 is within a factor of 5 of overflow.
-* Underflow is harmless if the input data is 0 or exceeds
-* underflow_threshold / macheps.
+* .. Scalar Arguments ..
+ REAL A, B, C, RT1, RT2
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaebz.f b/SRC/slaebz.f
index ec684ce3..33bce96c 100644
--- a/SRC/slaebz.f
+++ b/SRC/slaebz.f
@@ -1,3 +1,314 @@
+*> \brief \b SLAEBZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAEBZ( IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL,
+* RELTOL, PIVMIN, D, E, E2, NVAL, AB, C, MOUT,
+* NAB, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IJOB, INFO, MINP, MMAX, MOUT, N, NBMIN, NITMAX
+* REAL ABSTOL, PIVMIN, RELTOL
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * ), NAB( MMAX, * ), NVAL( * )
+* REAL AB( MMAX, * ), C( * ), D( * ), E( * ), E2( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAEBZ contains the iteration loops which compute and use the
+*> function N(w), which is the count of eigenvalues of a symmetric
+*> tridiagonal matrix T less than or equal to its argument w. It
+*> performs a choice of two types of loops:
+*>
+*> IJOB=1, followed by
+*> IJOB=2: It takes as input a list of intervals and returns a list of
+*> sufficiently small intervals whose union contains the same
+*> eigenvalues as the union of the original intervals.
+*> The input intervals are (AB(j,1),AB(j,2)], j=1,...,MINP.
+*> The output interval (AB(j,1),AB(j,2)] will contain
+*> eigenvalues NAB(j,1)+1,...,NAB(j,2), where 1 <= j <= MOUT.
+*>
+*> IJOB=3: It performs a binary search in each input interval
+*> (AB(j,1),AB(j,2)] for a point w(j) such that
+*> N(w(j))=NVAL(j), and uses C(j) as the starting point of
+*> the search. If such a w(j) is found, then on output
+*> AB(j,1)=AB(j,2)=w. If no such w(j) is found, then on output
+*> (AB(j,1),AB(j,2)] will be a small interval containing the
+*> point where N(w) jumps through NVAL(j), unless that point
+*> lies outside the initial interval.
+*>
+*> Note that the intervals are in all cases half-open intervals,
+*> i.e., of the form (a,b] , which includes b but not a .
+*>
+*> To avoid underflow, the matrix should be scaled so that its largest
+*> element is no greater than overflow**(1/2) * underflow**(1/4)
+*> in absolute value. To assure the most accurate computation
+*> of small eigenvalues, the matrix should be scaled to be
+*> not much smaller than that, either.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966
+*>
+*> Note: the arguments are, in general, *not* checked for unreasonable
+*> values.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what is to be done:
+*> = 1: Compute NAB for the initial intervals.
+*> = 2: Perform bisection iteration to find eigenvalues of T.
+*> = 3: Perform bisection iteration to invert N(w), i.e.,
+*> to find a point which has a specified number of
+*> eigenvalues of T to its left.
+*> Other values will cause SLAEBZ to return with INFO=-1.
+*> \endverbatim
+*>
+*> \param[in] NITMAX
+*> \verbatim
+*> NITMAX is INTEGER
+*> The maximum number of "levels" of bisection to be
+*> performed, i.e., an interval of width W will not be made
+*> smaller than 2^(-NITMAX) * W. If not all intervals
+*> have converged after NITMAX iterations, then INFO is set
+*> to the number of non-converged intervals.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension n of the tridiagonal matrix T. It must be at
+*> least 1.
+*> \endverbatim
+*>
+*> \param[in] MMAX
+*> \verbatim
+*> MMAX is INTEGER
+*> The maximum number of intervals. If more than MMAX intervals
+*> are generated, then SLAEBZ will quit with INFO=MMAX+1.
+*> \endverbatim
+*>
+*> \param[in] MINP
+*> \verbatim
+*> MINP is INTEGER
+*> The initial number of intervals. It may not be greater than
+*> MMAX.
+*> \endverbatim
+*>
+*> \param[in] NBMIN
+*> \verbatim
+*> NBMIN is INTEGER
+*> The smallest number of intervals that should be processed
+*> using a vector loop. If zero, then only the scalar loop
+*> will be used.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The minimum (absolute) width of an interval. When an
+*> interval is narrower than ABSTOL, or than RELTOL times the
+*> larger (in magnitude) endpoint, then it is considered to be
+*> sufficiently small, i.e., converged. This must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] RELTOL
+*> \verbatim
+*> RELTOL is REAL
+*> The minimum relative width of an interval. When an interval
+*> is narrower than ABSTOL, or than RELTOL times the larger (in
+*> magnitude) endpoint, then it is considered to be
+*> sufficiently small, i.e., converged. Note: this should
+*> always be at least radix*machine epsilon.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum absolute value of a "pivot" in the Sturm
+*> sequence loop.
+*> This must be at least max |e(j)**2|*safe_min and at
+*> least safe_min, where safe_min is at least
+*> the smallest number that can divide one without overflow.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> The offdiagonal elements of the tridiagonal matrix T in
+*> positions 1 through N-1. E(N) is arbitrary.
+*> \endverbatim
+*>
+*> \param[in] E2
+*> \verbatim
+*> E2 is REAL array, dimension (N)
+*> The squares of the offdiagonal elements of the tridiagonal
+*> matrix T. E2(N) is ignored.
+*> \endverbatim
+*>
+*> \param[in,out] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (MINP)
+*> If IJOB=1 or 2, not referenced.
+*> If IJOB=3, the desired values of N(w). The elements of NVAL
+*> will be reordered to correspond with the intervals in AB.
+*> Thus, NVAL(j) on output will not, in general be the same as
+*> NVAL(j) on input, but it will correspond with the interval
+*> (AB(j,1),AB(j,2)] on output.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (MMAX,2)
+*> The endpoints of the intervals. AB(j,1) is a(j), the left
+*> endpoint of the j-th interval, and AB(j,2) is b(j), the
+*> right endpoint of the j-th interval. The input intervals
+*> will, in general, be modified, split, and reordered by the
+*> calculation.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (MMAX)
+*> If IJOB=1, ignored.
+*> If IJOB=2, workspace.
+*> If IJOB=3, then on input C(j) should be initialized to the
+*> first search point in the binary search.
+*> \endverbatim
+*>
+*> \param[out] MOUT
+*> \verbatim
+*> MOUT is INTEGER
+*> If IJOB=1, the number of eigenvalues in the intervals.
+*> If IJOB=2 or 3, the number of intervals output.
+*> If IJOB=3, MOUT will equal MINP.
+*> \endverbatim
+*>
+*> \param[in,out] NAB
+*> \verbatim
+*> NAB is INTEGER array, dimension (MMAX,2)
+*> If IJOB=1, then on output NAB(i,j) will be set to N(AB(i,j)).
+*> If IJOB=2, then on input, NAB(i,j) should be set. It must
+*> satisfy the condition:
+*> N(AB(i,1)) <= NAB(i,1) <= NAB(i,2) <= N(AB(i,2)),
+*> which means that in interval i only eigenvalues
+*> NAB(i,1)+1,...,NAB(i,2) will be considered. Usually,
+*> NAB(i,j)=N(AB(i,j)), from a previous call to SLAEBZ with
+*> IJOB=1.
+*> On output, NAB(i,j) will contain
+*> max(na(k),min(nb(k),N(AB(i,j)))), where k is the index of
+*> the input interval that the output interval
+*> (AB(j,1),AB(j,2)] came from, and na(k) and nb(k) are the
+*> the input values of NAB(k,1) and NAB(k,2).
+*> If IJOB=3, then on output, NAB(i,j) contains N(AB(i,j)),
+*> unless N(w) > NVAL(i) for all search points w , in which
+*> case NAB(i,1) will not be modified, i.e., the output
+*> value will be the same as the input value (modulo
+*> reorderings -- see NVAL and AB), or unless N(w) < NVAL(i)
+*> for all search points w , in which case NAB(i,2) will
+*> not be modified. Normally, NAB should be set to some
+*> distinctive value(s) before SLAEBZ is called.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MMAX)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MMAX)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: All intervals converged.
+*> = 1--MMAX: The last INFO intervals did not converge.
+*> = MMAX+1: More than MMAX intervals were generated.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine is intended to be called only by other LAPACK
+*> routines, thus the interface is less user-friendly. It is intended
+*> for two purposes:
+*>
+*> (a) finding eigenvalues. In this case, SLAEBZ should have one or
+*> more initial intervals set up in AB, and SLAEBZ should be called
+*> with IJOB=1. This sets up NAB, and also counts the eigenvalues.
+*> Intervals with no eigenvalues would usually be thrown out at
+*> this point. Also, if not all the eigenvalues in an interval i
+*> are desired, NAB(i,1) can be increased or NAB(i,2) decreased.
+*> For example, set NAB(i,1)=NAB(i,2)-1 to get the largest
+*> eigenvalue. SLAEBZ is then called with IJOB=2 and MMAX
+*> no smaller than the value of MOUT returned by the call with
+*> IJOB=1. After this (IJOB=2) call, eigenvalues NAB(i,1)+1
+*> through NAB(i,2) are approximately AB(i,1) (or AB(i,2)) to the
+*> tolerance specified by ABSTOL and RELTOL.
+*>
+*> (b) finding an interval (a',b'] containing eigenvalues w(f),...,w(l).
+*> In this case, start with a Gershgorin interval (a,b). Set up
+*> AB to contain 2 search intervals, both initially (a,b). One
+*> NVAL element should contain f-1 and the other should contain l
+*> , while C should contain a and b, resp. NAB(i,1) should be -1
+*> and NAB(i,2) should be N+1, to flag an error if the desired
+*> interval does not lie in (a,b). SLAEBZ is then called with
+*> IJOB=3. On exit, if w(f-1) < w(f), then one of the intervals --
+*> j -- will have AB(j,1)=AB(j,2) and NAB(j,1)=NAB(j,2)=f-1, while
+*> if, to the specified tolerance, w(f-k)=...=w(f+r), k > 0 and r
+*> >= 0, then the interval will have N(AB(j,1))=NAB(j,1)=f-k and
+*> N(AB(j,2))=NAB(j,2)=f+r. The cases w(l) < w(l+1) and
+*> w(l-r)=...=w(l+k) are handled similarly.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAEBZ( IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL,
$ RELTOL, PIVMIN, D, E, E2, NVAL, AB, C, MOUT,
$ NAB, WORK, IWORK, INFO )
@@ -5,7 +316,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IJOB, INFO, MINP, MMAX, MOUT, N, NBMIN, NITMAX
@@ -17,209 +328,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAEBZ contains the iteration loops which compute and use the
-* function N(w), which is the count of eigenvalues of a symmetric
-* tridiagonal matrix T less than or equal to its argument w. It
-* performs a choice of two types of loops:
-*
-* IJOB=1, followed by
-* IJOB=2: It takes as input a list of intervals and returns a list of
-* sufficiently small intervals whose union contains the same
-* eigenvalues as the union of the original intervals.
-* The input intervals are (AB(j,1),AB(j,2)], j=1,...,MINP.
-* The output interval (AB(j,1),AB(j,2)] will contain
-* eigenvalues NAB(j,1)+1,...,NAB(j,2), where 1 <= j <= MOUT.
-*
-* IJOB=3: It performs a binary search in each input interval
-* (AB(j,1),AB(j,2)] for a point w(j) such that
-* N(w(j))=NVAL(j), and uses C(j) as the starting point of
-* the search. If such a w(j) is found, then on output
-* AB(j,1)=AB(j,2)=w. If no such w(j) is found, then on output
-* (AB(j,1),AB(j,2)] will be a small interval containing the
-* point where N(w) jumps through NVAL(j), unless that point
-* lies outside the initial interval.
-*
-* Note that the intervals are in all cases half-open intervals,
-* i.e., of the form (a,b] , which includes b but not a .
-*
-* To avoid underflow, the matrix should be scaled so that its largest
-* element is no greater than overflow**(1/2) * underflow**(1/4)
-* in absolute value. To assure the most accurate computation
-* of small eigenvalues, the matrix should be scaled to be
-* not much smaller than that, either.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966
-*
-* Note: the arguments are, in general, *not* checked for unreasonable
-* values.
-*
-* Arguments
-* =========
-*
-* IJOB (input) INTEGER
-* Specifies what is to be done:
-* = 1: Compute NAB for the initial intervals.
-* = 2: Perform bisection iteration to find eigenvalues of T.
-* = 3: Perform bisection iteration to invert N(w), i.e.,
-* to find a point which has a specified number of
-* eigenvalues of T to its left.
-* Other values will cause SLAEBZ to return with INFO=-1.
-*
-* NITMAX (input) INTEGER
-* The maximum number of "levels" of bisection to be
-* performed, i.e., an interval of width W will not be made
-* smaller than 2^(-NITMAX) * W. If not all intervals
-* have converged after NITMAX iterations, then INFO is set
-* to the number of non-converged intervals.
-*
-* N (input) INTEGER
-* The dimension n of the tridiagonal matrix T. It must be at
-* least 1.
-*
-* MMAX (input) INTEGER
-* The maximum number of intervals. If more than MMAX intervals
-* are generated, then SLAEBZ will quit with INFO=MMAX+1.
-*
-* MINP (input) INTEGER
-* The initial number of intervals. It may not be greater than
-* MMAX.
-*
-* NBMIN (input) INTEGER
-* The smallest number of intervals that should be processed
-* using a vector loop. If zero, then only the scalar loop
-* will be used.
-*
-* ABSTOL (input) REAL
-* The minimum (absolute) width of an interval. When an
-* interval is narrower than ABSTOL, or than RELTOL times the
-* larger (in magnitude) endpoint, then it is considered to be
-* sufficiently small, i.e., converged. This must be at least
-* zero.
-*
-* RELTOL (input) REAL
-* The minimum relative width of an interval. When an interval
-* is narrower than ABSTOL, or than RELTOL times the larger (in
-* magnitude) endpoint, then it is considered to be
-* sufficiently small, i.e., converged. Note: this should
-* always be at least radix*machine epsilon.
-*
-* PIVMIN (input) REAL
-* The minimum absolute value of a "pivot" in the Sturm
-* sequence loop.
-* This must be at least max |e(j)**2|*safe_min and at
-* least safe_min, where safe_min is at least
-* the smallest number that can divide one without overflow.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T.
-*
-* E (input) REAL array, dimension (N)
-* The offdiagonal elements of the tridiagonal matrix T in
-* positions 1 through N-1. E(N) is arbitrary.
-*
-* E2 (input) REAL array, dimension (N)
-* The squares of the offdiagonal elements of the tridiagonal
-* matrix T. E2(N) is ignored.
-*
-* NVAL (input/output) INTEGER array, dimension (MINP)
-* If IJOB=1 or 2, not referenced.
-* If IJOB=3, the desired values of N(w). The elements of NVAL
-* will be reordered to correspond with the intervals in AB.
-* Thus, NVAL(j) on output will not, in general be the same as
-* NVAL(j) on input, but it will correspond with the interval
-* (AB(j,1),AB(j,2)] on output.
-*
-* AB (input/output) REAL array, dimension (MMAX,2)
-* The endpoints of the intervals. AB(j,1) is a(j), the left
-* endpoint of the j-th interval, and AB(j,2) is b(j), the
-* right endpoint of the j-th interval. The input intervals
-* will, in general, be modified, split, and reordered by the
-* calculation.
-*
-* C (input/output) REAL array, dimension (MMAX)
-* If IJOB=1, ignored.
-* If IJOB=2, workspace.
-* If IJOB=3, then on input C(j) should be initialized to the
-* first search point in the binary search.
-*
-* MOUT (output) INTEGER
-* If IJOB=1, the number of eigenvalues in the intervals.
-* If IJOB=2 or 3, the number of intervals output.
-* If IJOB=3, MOUT will equal MINP.
-*
-* NAB (input/output) INTEGER array, dimension (MMAX,2)
-* If IJOB=1, then on output NAB(i,j) will be set to N(AB(i,j)).
-* If IJOB=2, then on input, NAB(i,j) should be set. It must
-* satisfy the condition:
-* N(AB(i,1)) <= NAB(i,1) <= NAB(i,2) <= N(AB(i,2)),
-* which means that in interval i only eigenvalues
-* NAB(i,1)+1,...,NAB(i,2) will be considered. Usually,
-* NAB(i,j)=N(AB(i,j)), from a previous call to SLAEBZ with
-* IJOB=1.
-* On output, NAB(i,j) will contain
-* max(na(k),min(nb(k),N(AB(i,j)))), where k is the index of
-* the input interval that the output interval
-* (AB(j,1),AB(j,2)] came from, and na(k) and nb(k) are the
-* the input values of NAB(k,1) and NAB(k,2).
-* If IJOB=3, then on output, NAB(i,j) contains N(AB(i,j)),
-* unless N(w) > NVAL(i) for all search points w , in which
-* case NAB(i,1) will not be modified, i.e., the output
-* value will be the same as the input value (modulo
-* reorderings -- see NVAL and AB), or unless N(w) < NVAL(i)
-* for all search points w , in which case NAB(i,2) will
-* not be modified. Normally, NAB should be set to some
-* distinctive value(s) before SLAEBZ is called.
-*
-* WORK (workspace) REAL array, dimension (MMAX)
-* Workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (MMAX)
-* Workspace.
-*
-* INFO (output) INTEGER
-* = 0: All intervals converged.
-* = 1--MMAX: The last INFO intervals did not converge.
-* = MMAX+1: More than MMAX intervals were generated.
-*
-* Further Details
-* ===============
-*
-* This routine is intended to be called only by other LAPACK
-* routines, thus the interface is less user-friendly. It is intended
-* for two purposes:
-*
-* (a) finding eigenvalues. In this case, SLAEBZ should have one or
-* more initial intervals set up in AB, and SLAEBZ should be called
-* with IJOB=1. This sets up NAB, and also counts the eigenvalues.
-* Intervals with no eigenvalues would usually be thrown out at
-* this point. Also, if not all the eigenvalues in an interval i
-* are desired, NAB(i,1) can be increased or NAB(i,2) decreased.
-* For example, set NAB(i,1)=NAB(i,2)-1 to get the largest
-* eigenvalue. SLAEBZ is then called with IJOB=2 and MMAX
-* no smaller than the value of MOUT returned by the call with
-* IJOB=1. After this (IJOB=2) call, eigenvalues NAB(i,1)+1
-* through NAB(i,2) are approximately AB(i,1) (or AB(i,2)) to the
-* tolerance specified by ABSTOL and RELTOL.
-*
-* (b) finding an interval (a',b'] containing eigenvalues w(f),...,w(l).
-* In this case, start with a Gershgorin interval (a,b). Set up
-* AB to contain 2 search intervals, both initially (a,b). One
-* NVAL element should contain f-1 and the other should contain l
-* , while C should contain a and b, resp. NAB(i,1) should be -1
-* and NAB(i,2) should be N+1, to flag an error if the desired
-* interval does not lie in (a,b). SLAEBZ is then called with
-* IJOB=3. On exit, if w(f-1) < w(f), then one of the intervals --
-* j -- will have AB(j,1)=AB(j,2) and NAB(j,1)=NAB(j,2)=f-1, while
-* if, to the specified tolerance, w(f-k)=...=w(f+r), k > 0 and r
-* >= 0, then the interval will have N(AB(j,1))=NAB(j,1)=f-k and
-* N(AB(j,2))=NAB(j,2)=f+r. The cases w(l) < w(l+1) and
-* w(l-r)=...=w(l+k) are handled similarly.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaed0.f b/SRC/slaed0.f
index 3cfa56fb..95d9c8c8 100644
--- a/SRC/slaed0.f
+++ b/SRC/slaed0.f
@@ -1,10 +1,179 @@
+*> \brief \b SLAED0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED0( ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, LDQ, LDQS, N, QSIZ
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), E( * ), Q( LDQ, * ), QSTORE( LDQS, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAED0 computes all eigenvalues and corresponding eigenvectors of a
+*> symmetric tridiagonal matrix using the divide and conquer method.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> = 0: Compute eigenvalues only.
+*> = 1: Compute eigenvectors of original dense symmetric matrix
+*> also. On entry, Q contains the orthogonal matrix used
+*> to reduce the original matrix to tridiagonal form.
+*> = 2: Compute eigenvalues and eigenvectors of tridiagonal
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the orthogonal matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the main diagonal of the tridiagonal matrix.
+*> On exit, its eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, N)
+*> On entry, Q must contain an N-by-N orthogonal matrix.
+*> If ICOMPQ = 0 Q is not referenced.
+*> If ICOMPQ = 1 On entry, Q is a subset of the columns of the
+*> orthogonal matrix used to reduce the full
+*> matrix to tridiagonal form corresponding to
+*> the subset of the full matrix which is being
+*> decomposed at this time.
+*> If ICOMPQ = 2 On entry, Q will be the identity matrix.
+*> On exit, Q contains the eigenvectors of the
+*> tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If eigenvectors are
+*> desired, then LDQ >= max(1,N). In any case, LDQ >= 1.
+*> \endverbatim
+*>
+*> \param[out] QSTORE
+*> \verbatim
+*> QSTORE is REAL array, dimension (LDQS, N)
+*> Referenced only when ICOMPQ = 1. Used to store parts of
+*> the eigenvector matrix when the updating matrix multiplies
+*> take place.
+*> \endverbatim
+*>
+*> \param[in] LDQS
+*> \verbatim
+*> LDQS is INTEGER
+*> The leading dimension of the array QSTORE. If ICOMPQ = 1,
+*> then LDQS >= max(1,N). In any case, LDQS >= 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array,
+*> If ICOMPQ = 0 or 1, the dimension of WORK must be at least
+*> 1 + 3*N + 2*N*lg N + 3*N**2
+*> ( lg( N ) = smallest integer k
+*> such that 2^k >= N )
+*> If ICOMPQ = 2, the dimension of WORK must be at least
+*> 4*N + N**2.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array,
+*> If ICOMPQ = 0 or 1, the dimension of IWORK must be at least
+*> 6 + 6*N + 5*N*lg N.
+*> ( lg( N ) = smallest integer k
+*> such that 2^k >= N )
+*> If ICOMPQ = 2, the dimension of IWORK must be at least
+*> 3 + 5*N.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute an eigenvalue while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAED0( ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, LDQ, LDQS, N, QSIZ
@@ -15,93 +184,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAED0 computes all eigenvalues and corresponding eigenvectors of a
-* symmetric tridiagonal matrix using the divide and conquer method.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* = 0: Compute eigenvalues only.
-* = 1: Compute eigenvectors of original dense symmetric matrix
-* also. On entry, Q contains the orthogonal matrix used
-* to reduce the original matrix to tridiagonal form.
-* = 2: Compute eigenvalues and eigenvectors of tridiagonal
-* matrix.
-*
-* QSIZ (input) INTEGER
-* The dimension of the orthogonal matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the main diagonal of the tridiagonal matrix.
-* On exit, its eigenvalues.
-*
-* E (input) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix.
-* On exit, E has been destroyed.
-*
-* Q (input/output) REAL array, dimension (LDQ, N)
-* On entry, Q must contain an N-by-N orthogonal matrix.
-* If ICOMPQ = 0 Q is not referenced.
-* If ICOMPQ = 1 On entry, Q is a subset of the columns of the
-* orthogonal matrix used to reduce the full
-* matrix to tridiagonal form corresponding to
-* the subset of the full matrix which is being
-* decomposed at this time.
-* If ICOMPQ = 2 On entry, Q will be the identity matrix.
-* On exit, Q contains the eigenvectors of the
-* tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If eigenvectors are
-* desired, then LDQ >= max(1,N). In any case, LDQ >= 1.
-*
-* QSTORE (workspace) REAL array, dimension (LDQS, N)
-* Referenced only when ICOMPQ = 1. Used to store parts of
-* the eigenvector matrix when the updating matrix multiplies
-* take place.
-*
-* LDQS (input) INTEGER
-* The leading dimension of the array QSTORE. If ICOMPQ = 1,
-* then LDQS >= max(1,N). In any case, LDQS >= 1.
-*
-* WORK (workspace) REAL array,
-* If ICOMPQ = 0 or 1, the dimension of WORK must be at least
-* 1 + 3*N + 2*N*lg N + 3*N**2
-* ( lg( N ) = smallest integer k
-* such that 2^k >= N )
-* If ICOMPQ = 2, the dimension of WORK must be at least
-* 4*N + N**2.
-*
-* IWORK (workspace) INTEGER array,
-* If ICOMPQ = 0 or 1, the dimension of IWORK must be at least
-* 6 + 6*N + 5*N*lg N.
-* ( lg( N ) = smallest integer k
-* such that 2^k >= N )
-* If ICOMPQ = 2, the dimension of IWORK must be at least
-* 3 + 5*N.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute an eigenvalue while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaed1.f b/SRC/slaed1.f
index 971c0bf3..cf07544a 100644
--- a/SRC/slaed1.f
+++ b/SRC/slaed1.f
@@ -1,103 +1,179 @@
- SUBROUTINE SLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER CUTPNT, INFO, LDQ, N
- REAL RHO
-* ..
-* .. Array Arguments ..
- INTEGER INDXQ( * ), IWORK( * )
- REAL D( * ), Q( LDQ, * ), WORK( * )
-* ..
-*
+*> \brief \b SLAED1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CUTPNT, INFO, LDQ, N
+* REAL RHO
+* ..
+* .. Array Arguments ..
+* INTEGER INDXQ( * ), IWORK( * )
+* REAL D( * ), Q( LDQ, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLAED1 computes the updated eigensystem of a diagonal
-* matrix after modification by a rank-one symmetric matrix. This
-* routine is used only for the eigenproblem which requires all
-* eigenvalues and eigenvectors of a tridiagonal matrix. SLAED7 handles
-* the case in which eigenvalues only or eigenvalues and eigenvectors
-* of a full symmetric matrix (which was reduced to tridiagonal form)
-* are desired.
-*
-* T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out)
-*
-* where Z = Q**T*u, u is a vector of length N with ones in the
-* CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
-*
-* The eigenvectors of the original matrix are stored in Q, and the
-* eigenvalues are in D. The algorithm consists of three stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple eigenvalues or if there is a zero in
-* the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine SLAED2.
-*
-* The second stage consists of calculating the updated
-* eigenvalues. This is done by finding the roots of the secular
-* equation via the routine SLAED4 (as called by SLAED3).
-* This routine also calculates the eigenvectors of the current
-* problem.
-*
-* The final stage consists of computing the updated eigenvectors
-* directly using the updated eigenvalues. The eigenvectors for
-* the current problem are multiplied with the eigenvectors from
-* the overall problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAED1 computes the updated eigensystem of a diagonal
+*> matrix after modification by a rank-one symmetric matrix. This
+*> routine is used only for the eigenproblem which requires all
+*> eigenvalues and eigenvectors of a tridiagonal matrix. SLAED7 handles
+*> the case in which eigenvalues only or eigenvalues and eigenvectors
+*> of a full symmetric matrix (which was reduced to tridiagonal form)
+*> are desired.
+*>
+*> T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out)
+*>
+*> where Z = Q**T*u, u is a vector of length N with ones in the
+*> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
+*>
+*> The eigenvectors of the original matrix are stored in Q, and the
+*> eigenvalues are in D. The algorithm consists of three stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple eigenvalues or if there is a zero in
+*> the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine SLAED2.
+*>
+*> The second stage consists of calculating the updated
+*> eigenvalues. This is done by finding the roots of the secular
+*> equation via the routine SLAED4 (as called by SLAED3).
+*> This routine also calculates the eigenvectors of the current
+*> problem.
+*>
+*> The final stage consists of computing the updated eigenvectors
+*> directly using the updated eigenvalues. The eigenvectors for
+*> the current problem are multiplied with the eigenvectors from
+*> the overall problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the eigenvalues of the rank-1-perturbed matrix.
-* On exit, the eigenvalues of the repaired matrix.
-*
-* Q (input/output) REAL array, dimension (LDQ,N)
-* On entry, the eigenvectors of the rank-1-perturbed matrix.
-* On exit, the eigenvectors of the repaired tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* INDXQ (input/output) INTEGER array, dimension (N)
-* On entry, the permutation which separately sorts the two
-* subproblems in D into ascending order.
-* On exit, the permutation which will reintegrate the
-* subproblems back into sorted order,
-* i.e. D( INDXQ( I = 1, N ) ) will be in ascending order.
-*
-* RHO (input) REAL
-* The subdiagonal entry used to create the rank-1 modification.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the eigenvalues of the rank-1-perturbed matrix.
+*> On exit, the eigenvalues of the repaired matrix.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> On entry, the eigenvectors of the rank-1-perturbed matrix.
+*> On exit, the eigenvectors of the repaired tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> On entry, the permutation which separately sorts the two
+*> subproblems in D into ascending order.
+*> On exit, the permutation which will reintegrate the
+*> subproblems back into sorted order,
+*> i.e. D( INDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> The subdiagonal entry used to create the rank-1 modification.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> The location of the last eigenvalue in the leading sub-matrix.
+*> min(1,N) <= CUTPNT <= N/2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N + N**2)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CUTPNT (input) INTEGER
-* The location of the last eigenvalue in the leading sub-matrix.
-* min(1,N) <= CUTPNT <= N/2.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) REAL array, dimension (4*N + N**2)
+*> \date November 2011
*
-* IWORK (workspace) INTEGER array, dimension (4*N)
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK,
+ $ INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
+* .. Scalar Arguments ..
+ INTEGER CUTPNT, INFO, LDQ, N
+ REAL RHO
+* ..
+* .. Array Arguments ..
+ INTEGER INDXQ( * ), IWORK( * )
+ REAL D( * ), Q( LDQ, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaed2.f b/SRC/slaed2.f
index d904d25d..2e5d2145 100644
--- a/SRC/slaed2.f
+++ b/SRC/slaed2.f
@@ -1,10 +1,219 @@
+*> \brief \b SLAED2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED2( K, N, N1, D, Q, LDQ, INDXQ, RHO, Z, DLAMDA, W,
+* Q2, INDX, INDXC, INDXP, COLTYP, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDQ, N, N1
+* REAL RHO
+* ..
+* .. Array Arguments ..
+* INTEGER COLTYP( * ), INDX( * ), INDXC( * ), INDXP( * ),
+* $ INDXQ( * )
+* REAL D( * ), DLAMDA( * ), Q( LDQ, * ), Q2( * ),
+* $ W( * ), Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAED2 merges the two sets of eigenvalues together into a single
+*> sorted set. Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur: when two or more
+*> eigenvalues are close together or if there is a tiny entry in the
+*> Z vector. For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> The number of non-deflated eigenvalues, and the order of the
+*> related secular equation. 0 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The location of the last eigenvalue in the leading sub-matrix.
+*> min(1,N) <= N1 <= N/2.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, D contains the eigenvalues of the two submatrices to
+*> be combined.
+*> On exit, D contains the trailing (N-K) updated eigenvalues
+*> (those which were deflated) sorted into increasing order.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, N)
+*> On entry, Q contains the eigenvectors of two submatrices in
+*> the two square blocks with corners at (1,1), (N1,N1)
+*> and (N1+1, N1+1), (N,N).
+*> On exit, Q contains the trailing (N-K) updated eigenvectors
+*> (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> The permutation which separately sorts the two sub-problems
+*> in D into ascending order. Note that elements in the second
+*> half of this permutation must first have N1 added to their
+*> values. Destroyed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] RHO
+*> \verbatim
+*> RHO is REAL
+*> On entry, the off-diagonal element associated with the rank-1
+*> cut which originally split the two submatrices which are now
+*> being recombined.
+*> On exit, RHO has been modified to the value required by
+*> SLAED3.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (N)
+*> On entry, Z contains the updating vector (the last
+*> row of the first sub-eigenvector matrix and the first row of
+*> the second sub-eigenvector matrix).
+*> On exit, the contents of Z have been destroyed by the updating
+*> process.
+*> \endverbatim
+*>
+*> \param[out] DLAMDA
+*> \verbatim
+*> DLAMDA is REAL array, dimension (N)
+*> A copy of the first K eigenvalues which will be used by
+*> SLAED3 to form the secular equation.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first k values of the final deflation-altered z-vector
+*> which will be passed to SLAED3.
+*> \endverbatim
+*>
+*> \param[out] Q2
+*> \verbatim
+*> Q2 is REAL array, dimension (N1**2+(N-N1)**2)
+*> A copy of the first K eigenvectors which will be used by
+*> SLAED3 in a matrix multiply (SGEMM) to solve for the new
+*> eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] INDX
+*> \verbatim
+*> INDX is INTEGER array, dimension (N)
+*> The permutation used to sort the contents of DLAMDA into
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] INDXC
+*> \verbatim
+*> INDXC is INTEGER array, dimension (N)
+*> The permutation used to arrange the columns of the deflated
+*> Q matrix into three groups: the first group contains non-zero
+*> elements only at and above N1, the second contains
+*> non-zero elements only below N1, and the third is dense.
+*> \endverbatim
+*>
+*> \param[out] INDXP
+*> \verbatim
+*> INDXP is INTEGER array, dimension (N)
+*> The permutation used to place deflated values of D at the end
+*> of the array. INDXP(1:K) points to the nondeflated D-values
+*> and INDXP(K+1:N) points to the deflated eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] COLTYP
+*> \verbatim
+*> COLTYP is INTEGER array, dimension (N)
+*> During execution, a label which will indicate which of the
+*> following types a column in the Q2 matrix is:
+*> 1 : non-zero in the upper half only;
+*> 2 : dense;
+*> 3 : non-zero in the lower half only;
+*> 4 : deflated.
+*> On exit, COLTYP(i) is the number of columns of type i,
+*> for i=1 to 4 only.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAED2( K, N, N1, D, Q, LDQ, INDXQ, RHO, Z, DLAMDA, W,
$ Q2, INDX, INDXC, INDXP, COLTYP, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, K, LDQ, N, N1
@@ -17,116 +226,6 @@
$ W( * ), Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAED2 merges the two sets of eigenvalues together into a single
-* sorted set. Then it tries to deflate the size of the problem.
-* There are two ways in which deflation can occur: when two or more
-* eigenvalues are close together or if there is a tiny entry in the
-* Z vector. For each such occurrence the order of the related secular
-* equation problem is reduced by one.
-*
-* Arguments
-* =========
-*
-* K (output) INTEGER
-* The number of non-deflated eigenvalues, and the order of the
-* related secular equation. 0 <= K <=N.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* N1 (input) INTEGER
-* The location of the last eigenvalue in the leading sub-matrix.
-* min(1,N) <= N1 <= N/2.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, D contains the eigenvalues of the two submatrices to
-* be combined.
-* On exit, D contains the trailing (N-K) updated eigenvalues
-* (those which were deflated) sorted into increasing order.
-*
-* Q (input/output) REAL array, dimension (LDQ, N)
-* On entry, Q contains the eigenvectors of two submatrices in
-* the two square blocks with corners at (1,1), (N1,N1)
-* and (N1+1, N1+1), (N,N).
-* On exit, Q contains the trailing (N-K) updated eigenvectors
-* (those which were deflated) in its last N-K columns.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* INDXQ (input/output) INTEGER array, dimension (N)
-* The permutation which separately sorts the two sub-problems
-* in D into ascending order. Note that elements in the second
-* half of this permutation must first have N1 added to their
-* values. Destroyed on exit.
-*
-* RHO (input/output) REAL
-* On entry, the off-diagonal element associated with the rank-1
-* cut which originally split the two submatrices which are now
-* being recombined.
-* On exit, RHO has been modified to the value required by
-* SLAED3.
-*
-* Z (input) REAL array, dimension (N)
-* On entry, Z contains the updating vector (the last
-* row of the first sub-eigenvector matrix and the first row of
-* the second sub-eigenvector matrix).
-* On exit, the contents of Z have been destroyed by the updating
-* process.
-*
-* DLAMDA (output) REAL array, dimension (N)
-* A copy of the first K eigenvalues which will be used by
-* SLAED3 to form the secular equation.
-*
-* W (output) REAL array, dimension (N)
-* The first k values of the final deflation-altered z-vector
-* which will be passed to SLAED3.
-*
-* Q2 (output) REAL array, dimension (N1**2+(N-N1)**2)
-* A copy of the first K eigenvectors which will be used by
-* SLAED3 in a matrix multiply (SGEMM) to solve for the new
-* eigenvectors.
-*
-* INDX (workspace) INTEGER array, dimension (N)
-* The permutation used to sort the contents of DLAMDA into
-* ascending order.
-*
-* INDXC (output) INTEGER array, dimension (N)
-* The permutation used to arrange the columns of the deflated
-* Q matrix into three groups: the first group contains non-zero
-* elements only at and above N1, the second contains
-* non-zero elements only below N1, and the third is dense.
-*
-* INDXP (workspace) INTEGER array, dimension (N)
-* The permutation used to place deflated values of D at the end
-* of the array. INDXP(1:K) points to the nondeflated D-values
-* and INDXP(K+1:N) points to the deflated eigenvalues.
-*
-* COLTYP (workspace/output) INTEGER array, dimension (N)
-* During execution, a label which will indicate which of the
-* following types a column in the Q2 matrix is:
-* 1 : non-zero in the upper half only;
-* 2 : dense;
-* 3 : non-zero in the lower half only;
-* 4 : deflated.
-* On exit, COLTYP(i) is the number of columns of type i,
-* for i=1 to 4 only.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaed3.f b/SRC/slaed3.f
index f77cff92..3af84850 100644
--- a/SRC/slaed3.f
+++ b/SRC/slaed3.f
@@ -1,10 +1,198 @@
+*> \brief \b SLAED3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
+* CTOT, W, S, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDQ, N, N1
+* REAL RHO
+* ..
+* .. Array Arguments ..
+* INTEGER CTOT( * ), INDX( * )
+* REAL D( * ), DLAMDA( * ), Q( LDQ, * ), Q2( * ),
+* $ S( * ), W( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAED3 finds the roots of the secular equation, as defined by the
+*> values in D, W, and RHO, between 1 and K. It makes the
+*> appropriate calls to SLAED4 and then updates the eigenvectors by
+*> multiplying the matrix of eigenvectors of the pair of eigensystems
+*> being combined by the matrix of eigenvectors of the K-by-K system
+*> which is solved here.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of terms in the rational function to be solved by
+*> SLAED4. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the Q matrix.
+*> N >= K (deflation may result in N>K).
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The location of the last eigenvalue in the leading submatrix.
+*> min(1,N) <= N1 <= N/2.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> D(I) contains the updated eigenvalues for
+*> 1 <= I <= K.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> Initially the first K columns are used as workspace.
+*> On output the columns 1 to K contain
+*> the updated eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> The value of the parameter in the rank one update equation.
+*> RHO >= 0 required.
+*> \endverbatim
+*>
+*> \param[in,out] DLAMDA
+*> \verbatim
+*> DLAMDA is REAL array, dimension (K)
+*> The first K elements of this array contain the old roots
+*> of the deflated updating problem. These are the poles
+*> of the secular equation. May be changed on output by
+*> having lowest order bit set to zero on Cray X-MP, Cray Y-MP,
+*> Cray-2, or Cray C-90, as described above.
+*> \endverbatim
+*>
+*> \param[in] Q2
+*> \verbatim
+*> Q2 is REAL array, dimension (LDQ2, N)
+*> The first K columns of this matrix contain the non-deflated
+*> eigenvectors for the split problem.
+*> \endverbatim
+*>
+*> \param[in] INDX
+*> \verbatim
+*> INDX is INTEGER array, dimension (N)
+*> The permutation used to arrange the columns of the deflated
+*> Q matrix into three groups (see SLAED2).
+*> The rows of the eigenvectors found by SLAED4 must be likewise
+*> permuted before the matrix multiply can take place.
+*> \endverbatim
+*>
+*> \param[in] CTOT
+*> \verbatim
+*> CTOT is INTEGER array, dimension (4)
+*> A count of the total number of the various types of columns
+*> in Q, as described in INDX. The fourth column type is any
+*> column which has been deflated.
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is REAL array, dimension (K)
+*> The first K elements of this array contain the components
+*> of the deflation-adjusted updating vector. Destroyed on
+*> output.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N1 + 1)*K
+*> Will contain the eigenvectors of the repaired matrix which
+*> will be multiplied by the previously accumulated eigenvectors
+*> to update the system.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of S. LDS >= max(1,K).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
$ CTOT, W, S, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, K, LDQ, N, N1
@@ -16,102 +204,6 @@
$ S( * ), W( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAED3 finds the roots of the secular equation, as defined by the
-* values in D, W, and RHO, between 1 and K. It makes the
-* appropriate calls to SLAED4 and then updates the eigenvectors by
-* multiplying the matrix of eigenvectors of the pair of eigensystems
-* being combined by the matrix of eigenvectors of the K-by-K system
-* which is solved here.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* K (input) INTEGER
-* The number of terms in the rational function to be solved by
-* SLAED4. K >= 0.
-*
-* N (input) INTEGER
-* The number of rows and columns in the Q matrix.
-* N >= K (deflation may result in N>K).
-*
-* N1 (input) INTEGER
-* The location of the last eigenvalue in the leading submatrix.
-* min(1,N) <= N1 <= N/2.
-*
-* D (output) REAL array, dimension (N)
-* D(I) contains the updated eigenvalues for
-* 1 <= I <= K.
-*
-* Q (output) REAL array, dimension (LDQ,N)
-* Initially the first K columns are used as workspace.
-* On output the columns 1 to K contain
-* the updated eigenvectors.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* RHO (input) REAL
-* The value of the parameter in the rank one update equation.
-* RHO >= 0 required.
-*
-* DLAMDA (input/output) REAL array, dimension (K)
-* The first K elements of this array contain the old roots
-* of the deflated updating problem. These are the poles
-* of the secular equation. May be changed on output by
-* having lowest order bit set to zero on Cray X-MP, Cray Y-MP,
-* Cray-2, or Cray C-90, as described above.
-*
-* Q2 (input) REAL array, dimension (LDQ2, N)
-* The first K columns of this matrix contain the non-deflated
-* eigenvectors for the split problem.
-*
-* INDX (input) INTEGER array, dimension (N)
-* The permutation used to arrange the columns of the deflated
-* Q matrix into three groups (see SLAED2).
-* The rows of the eigenvectors found by SLAED4 must be likewise
-* permuted before the matrix multiply can take place.
-*
-* CTOT (input) INTEGER array, dimension (4)
-* A count of the total number of the various types of columns
-* in Q, as described in INDX. The fourth column type is any
-* column which has been deflated.
-*
-* W (input/output) REAL array, dimension (K)
-* The first K elements of this array contain the components
-* of the deflation-adjusted updating vector. Destroyed on
-* output.
-*
-* S (workspace) REAL array, dimension (N1 + 1)*K
-* Will contain the eigenvectors of the repaired matrix which
-* will be multiplied by the previously accumulated eigenvectors
-* to update the system.
-*
-* LDS (input) INTEGER
-* The leading dimension of S. LDS >= max(1,K).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaed4.f b/SRC/slaed4.f
index fd8636c2..ec62ef38 100644
--- a/SRC/slaed4.f
+++ b/SRC/slaed4.f
@@ -1,90 +1,163 @@
- SUBROUTINE SLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER I, INFO, N
- REAL DLAM, RHO
-* ..
-* .. Array Arguments ..
- REAL D( * ), DELTA( * ), Z( * )
-* ..
-*
+*> \brief \b SLAED4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER I, INFO, N
+* REAL DLAM, RHO
+* ..
+* .. Array Arguments ..
+* REAL D( * ), DELTA( * ), Z( * )
+* ..
+*
* Purpose
* =======
*
-* This subroutine computes the I-th updated eigenvalue of a symmetric
-* rank-one modification to a diagonal matrix whose elements are
-* given in the array d, and that
-*
-* D(i) < D(j) for i < j
-*
-* and that RHO > 0. This is arranged by the calling routine, and is
-* no loss in generality. The rank-one modified system is thus
-*
-* diag( D ) + RHO * Z * Z_transpose.
-*
-* where we assume the Euclidean norm of Z is 1.
-*
-* The method consists of approximating the rational functions in the
-* secular equation by simpler interpolating rational functions.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine computes the I-th updated eigenvalue of a symmetric
+*> rank-one modification to a diagonal matrix whose elements are
+*> given in the array d, and that
+*>
+*> D(i) < D(j) for i < j
+*>
+*> and that RHO > 0. This is arranged by the calling routine, and is
+*> no loss in generality. The rank-one modified system is thus
+*>
+*> diag( D ) + RHO * Z * Z_transpose.
+*>
+*> where we assume the Euclidean norm of Z is 1.
+*>
+*> The method consists of approximating the rational functions in the
+*> secular equation by simpler interpolating rational functions.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of all arrays.
-*
-* I (input) INTEGER
-* The index of the eigenvalue to be computed. 1 <= I <= N.
-*
-* D (input) REAL array, dimension (N)
-* The original eigenvalues. It is assumed that they are in
-* order, D(I) < D(J) for I < J.
-*
-* Z (input) REAL array, dimension (N)
-* The components of the updating vector.
-*
-* DELTA (output) REAL array, dimension (N)
-* If N .GT. 2, DELTA contains (D(j) - lambda_I) in its j-th
-* component. If N = 1, then DELTA(1) = 1. If N = 2, see SLAED5
-* for detail. The vector DELTA contains the information necessary
-* to construct the eigenvectors by SLAED3 and SLAED9.
-*
-* RHO (input) REAL
-* The scalar in the symmetric updating formula.
-*
-* DLAM (output) REAL
-* The computed lambda_I, the I-th updated eigenvalue.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = 1, the updating process failed.
-*
-* Internal Parameters
-* ===================
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of all arrays.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> The index of the eigenvalue to be computed. 1 <= I <= N.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The original eigenvalues. It is assumed that they are in
+*> order, D(I) < D(J) for I < J.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (N)
+*> The components of the updating vector.
+*> \endverbatim
+*>
+*> \param[out] DELTA
+*> \verbatim
+*> DELTA is REAL array, dimension (N)
+*> If N .GT. 2, DELTA contains (D(j) - lambda_I) in its j-th
+*> component. If N = 1, then DELTA(1) = 1. If N = 2, see SLAED5
+*> for detail. The vector DELTA contains the information necessary
+*> to construct the eigenvectors by SLAED3 and SLAED9.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> The scalar in the symmetric updating formula.
+*> \endverbatim
+*>
+*> \param[out] DLAM
+*> \verbatim
+*> DLAM is REAL
+*> The computed lambda_I, the I-th updated eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = 1, the updating process failed.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> Logical variable ORGATI (origin-at-i?) is used for distinguishing
+*> whether D(i) or D(i+1) is treated as the origin.
+*> \endverbatim
+*> \verbatim
+*> ORGATI = .true. origin at i
+*> ORGATI = .false. origin at i+1
+*> \endverbatim
+*> \verbatim
+*> Logical variable SWTCH3 (switch-for-3-poles?) is for noting
+*> if we are working with THREE poles!
+*> \endverbatim
+*> \verbatim
+*> MAXIT is the maximum number of iterations allowed for each
+*> eigenvalue.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Logical variable ORGATI (origin-at-i?) is used for distinguishing
-* whether D(i) or D(i+1) is treated as the origin.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ORGATI = .true. origin at i
-* ORGATI = .false. origin at i+1
+*> \date November 2011
*
-* Logical variable SWTCH3 (switch-for-3-poles?) is for noting
-* if we are working with THREE poles!
+*> \ingroup auxOTHERcomputational
*
-* MAXIT is the maximum number of iterations allowed for each
-* eigenvalue.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
*
-* Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER I, INFO, N
+ REAL DLAM, RHO
+* ..
+* .. Array Arguments ..
+ REAL D( * ), DELTA( * ), Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaed5.f b/SRC/slaed5.f
index b08ef1fd..44e0c658 100644
--- a/SRC/slaed5.f
+++ b/SRC/slaed5.f
@@ -1,61 +1,123 @@
- SUBROUTINE SLAED5( I, D, Z, DELTA, RHO, DLAM )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER I
- REAL DLAM, RHO
-* ..
-* .. Array Arguments ..
- REAL D( 2 ), DELTA( 2 ), Z( 2 )
-* ..
-*
+*> \brief \b SLAED5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED5( I, D, Z, DELTA, RHO, DLAM )
+*
+* .. Scalar Arguments ..
+* INTEGER I
+* REAL DLAM, RHO
+* ..
+* .. Array Arguments ..
+* REAL D( 2 ), DELTA( 2 ), Z( 2 )
+* ..
+*
* Purpose
* =======
*
-* This subroutine computes the I-th eigenvalue of a symmetric rank-one
-* modification of a 2-by-2 diagonal matrix
-*
-* diag( D ) + RHO * Z * transpose(Z) .
-*
-* The diagonal elements in the array D are assumed to satisfy
-*
-* D(i) < D(j) for i < j .
-*
-* We also assume RHO > 0 and that the Euclidean norm of the vector
-* Z is one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine computes the I-th eigenvalue of a symmetric rank-one
+*> modification of a 2-by-2 diagonal matrix
+*>
+*> diag( D ) + RHO * Z * transpose(Z) .
+*>
+*> The diagonal elements in the array D are assumed to satisfy
+*>
+*> D(i) < D(j) for i < j .
+*>
+*> We also assume RHO > 0 and that the Euclidean norm of the vector
+*> Z is one.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* I (input) INTEGER
-* The index of the eigenvalue to be computed. I = 1 or I = 2.
-*
-* D (input) REAL array, dimension (2)
-* The original eigenvalues. We assume D(1) < D(2).
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> The index of the eigenvalue to be computed. I = 1 or I = 2.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (2)
+*> The original eigenvalues. We assume D(1) < D(2).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (2)
+*> The components of the updating vector.
+*> \endverbatim
+*>
+*> \param[out] DELTA
+*> \verbatim
+*> DELTA is REAL array, dimension (2)
+*> The vector DELTA contains the information necessary
+*> to construct the eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> The scalar in the symmetric updating formula.
+*> \endverbatim
+*>
+*> \param[out] DLAM
+*> \verbatim
+*> DLAM is REAL
+*> The computed lambda_I, the I-th updated eigenvalue.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Z (input) REAL array, dimension (2)
-* The components of the updating vector.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DELTA (output) REAL array, dimension (2)
-* The vector DELTA contains the information necessary
-* to construct the eigenvectors.
+*> \date November 2011
*
-* RHO (input) REAL
-* The scalar in the symmetric updating formula.
+*> \ingroup auxOTHERcomputational
*
-* DLAM (output) REAL
-* The computed lambda_I, the I-th updated eigenvalue.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAED5( I, D, Z, DELTA, RHO, DLAM )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER I
+ REAL DLAM, RHO
+* ..
+* .. Array Arguments ..
+ REAL D( 2 ), DELTA( 2 ), Z( 2 )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaed6.f b/SRC/slaed6.f
index 2f0c043c..72f8f207 100644
--- a/SRC/slaed6.f
+++ b/SRC/slaed6.f
@@ -1,81 +1,150 @@
- SUBROUTINE SLAED6( KNITER, ORGATI, RHO, D, Z, FINIT, TAU, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* February 2007
-*
-* .. Scalar Arguments ..
- LOGICAL ORGATI
- INTEGER INFO, KNITER
- REAL FINIT, RHO, TAU
-* ..
-* .. Array Arguments ..
- REAL D( 3 ), Z( 3 )
-* ..
-*
+*> \brief \b SLAED6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED6( KNITER, ORGATI, RHO, D, Z, FINIT, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL ORGATI
+* INTEGER INFO, KNITER
+* REAL FINIT, RHO, TAU
+* ..
+* .. Array Arguments ..
+* REAL D( 3 ), Z( 3 )
+* ..
+*
* Purpose
* =======
*
-* SLAED6 computes the positive or negative root (closest to the origin)
-* of
-* z(1) z(2) z(3)
-* f(x) = rho + --------- + ---------- + ---------
-* d(1)-x d(2)-x d(3)-x
-*
-* It is assumed that
-*
-* if ORGATI = .true. the root is between d(2) and d(3);
-* otherwise it is between d(1) and d(2)
-*
-* This routine will be called by SLAED4 when necessary. In most cases,
-* the root sought is the smallest in magnitude, though it might not be
-* in some extremely rare situations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAED6 computes the positive or negative root (closest to the origin)
+*> of
+*> z(1) z(2) z(3)
+*> f(x) = rho + --------- + ---------- + ---------
+*> d(1)-x d(2)-x d(3)-x
+*>
+*> It is assumed that
+*>
+*> if ORGATI = .true. the root is between d(2) and d(3);
+*> otherwise it is between d(1) and d(2)
+*>
+*> This routine will be called by SLAED4 when necessary. In most cases,
+*> the root sought is the smallest in magnitude, though it might not be
+*> in some extremely rare situations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* KNITER (input) INTEGER
-* Refer to SLAED4 for its significance.
-*
-* ORGATI (input) LOGICAL
-* If ORGATI is true, the needed root is between d(2) and
-* d(3); otherwise it is between d(1) and d(2). See
-* SLAED4 for further details.
-*
-* RHO (input) REAL
-* Refer to the equation f(x) above.
-*
-* D (input) REAL array, dimension (3)
-* D satisfies d(1) < d(2) < d(3).
+*> \param[in] KNITER
+*> \verbatim
+*> KNITER is INTEGER
+*> Refer to SLAED4 for its significance.
+*> \endverbatim
+*>
+*> \param[in] ORGATI
+*> \verbatim
+*> ORGATI is LOGICAL
+*> If ORGATI is true, the needed root is between d(2) and
+*> d(3); otherwise it is between d(1) and d(2). See
+*> SLAED4 for further details.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> Refer to the equation f(x) above.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (3)
+*> D satisfies d(1) < d(2) < d(3).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (3)
+*> Each of the elements in z must be positive.
+*> \endverbatim
+*>
+*> \param[in] FINIT
+*> \verbatim
+*> FINIT is REAL
+*> The value of f at 0. It is more accurate than the one
+*> evaluated inside this routine (if someone wants to do
+*> so).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL
+*> The root of the equation f(x).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = 1, failure to converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Z (input) REAL array, dimension (3)
-* Each of the elements in z must be positive.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* FINIT (input) REAL
-* The value of f at 0. It is more accurate than the one
-* evaluated inside this routine (if someone wants to do
-* so).
+*> \date November 2011
*
-* TAU (output) REAL
-* The root of the equation f(x).
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = 1, failure to converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 30/06/99: Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> 10/02/03: This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). SJH.
+*>
+*> 05/10/06: Modified from a new version of Ren-Cang Li, use
+*> Gragg-Thornton-Warner cubic convergent scheme for better stability.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAED6( KNITER, ORGATI, RHO, D, Z, FINIT, TAU, INFO )
*
-* 30/06/99: Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
-*
-* 10/02/03: This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). SJH.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 05/10/06: Modified from a new version of Ren-Cang Li, use
-* Gragg-Thornton-Warner cubic convergent scheme for better stability.
+* .. Scalar Arguments ..
+ LOGICAL ORGATI
+ INTEGER INFO, KNITER
+ REAL FINIT, RHO, TAU
+* ..
+* .. Array Arguments ..
+ REAL D( 3 ), Z( 3 )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaed7.f b/SRC/slaed7.f
index 2ea91c32..dd628884 100644
--- a/SRC/slaed7.f
+++ b/SRC/slaed7.f
@@ -1,12 +1,267 @@
+*> \brief \b SLAED7
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED7( ICOMPQ, N, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
+* LDQ, INDXQ, RHO, CUTPNT, QSTORE, QPTR, PRMPTR,
+* PERM, GIVPTR, GIVCOL, GIVNUM, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CURLVL, CURPBM, CUTPNT, ICOMPQ, INFO, LDQ, N,
+* $ QSIZ, TLVLS
+* REAL RHO
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), GIVPTR( * ), INDXQ( * ),
+* $ IWORK( * ), PERM( * ), PRMPTR( * ), QPTR( * )
+* REAL D( * ), GIVNUM( 2, * ), Q( LDQ, * ),
+* $ QSTORE( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAED7 computes the updated eigensystem of a diagonal
+*> matrix after modification by a rank-one symmetric matrix. This
+*> routine is used only for the eigenproblem which requires all
+*> eigenvalues and optionally eigenvectors of a dense symmetric matrix
+*> that has been reduced to tridiagonal form. SLAED1 handles
+*> the case in which all eigenvalues and eigenvectors of a symmetric
+*> tridiagonal matrix are desired.
+*>
+*> T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out)
+*>
+*> where Z = Q**Tu, u is a vector of length N with ones in the
+*> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
+*>
+*> The eigenvectors of the original matrix are stored in Q, and the
+*> eigenvalues are in D. The algorithm consists of three stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple eigenvalues or if there is a zero in
+*> the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine SLAED8.
+*>
+*> The second stage consists of calculating the updated
+*> eigenvalues. This is done by finding the roots of the secular
+*> equation via the routine SLAED4 (as called by SLAED9).
+*> This routine also calculates the eigenvectors of the current
+*> problem.
+*>
+*> The final stage consists of computing the updated eigenvectors
+*> directly using the updated eigenvalues. The eigenvectors for
+*> the current problem are multiplied with the eigenvectors from
+*> the overall problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> = 0: Compute eigenvalues only.
+*> = 1: Compute eigenvectors of original dense symmetric matrix
+*> also. On entry, Q contains the orthogonal matrix used
+*> to reduce the original matrix to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the orthogonal matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in] TLVLS
+*> \verbatim
+*> TLVLS is INTEGER
+*> The total number of merging levels in the overall divide and
+*> conquer tree.
+*> \endverbatim
+*>
+*> \param[in] CURLVL
+*> \verbatim
+*> CURLVL is INTEGER
+*> The current level in the overall merge routine,
+*> 0 <= CURLVL <= TLVLS.
+*> \endverbatim
+*>
+*> \param[in] CURPBM
+*> \verbatim
+*> CURPBM is INTEGER
+*> The current problem in the current level in the overall
+*> merge routine (counting from upper left to lower right).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the eigenvalues of the rank-1-perturbed matrix.
+*> On exit, the eigenvalues of the repaired matrix.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, N)
+*> On entry, the eigenvectors of the rank-1-perturbed matrix.
+*> On exit, the eigenvectors of the repaired tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> The permutation which will reintegrate the subproblem just
+*> solved back into sorted order, i.e., D( INDXQ( I = 1, N ) )
+*> will be in ascending order.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> The subdiagonal element used to create the rank-1
+*> modification.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> Contains the location of the last eigenvalue in the leading
+*> sub-matrix. min(1,N) <= CUTPNT <= N.
+*> \endverbatim
+*>
+*> \param[in,out] QSTORE
+*> \verbatim
+*> QSTORE is REAL array, dimension (N**2+1)
+*> Stores eigenvectors of submatrices encountered during
+*> divide and conquer, packed together. QPTR points to
+*> beginning of the submatrices.
+*> \endverbatim
+*>
+*> \param[in,out] QPTR
+*> \verbatim
+*> QPTR is INTEGER array, dimension (N+2)
+*> List of indices pointing to beginning of submatrices stored
+*> in QSTORE. The submatrices are numbered starting at the
+*> bottom left of the divide and conquer tree, from left to
+*> right and bottom to top.
+*> \endverbatim
+*>
+*> \param[in] PRMPTR
+*> \verbatim
+*> PRMPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in PERM a
+*> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
+*> indicates the size of the permutation and also the size of
+*> the full, non-deflated problem.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N lg N)
+*> Contains the permutations (from deflation and sorting) to be
+*> applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in GIVCOL a
+*> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
+*> indicates the number of Givens rotations.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N lg N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension (2, N lg N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N+2*QSIZ*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAED7( ICOMPQ, N, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
$ LDQ, INDXQ, RHO, CUTPNT, QSTORE, QPTR, PRMPTR,
$ PERM, GIVPTR, GIVCOL, GIVNUM, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER CURLVL, CURPBM, CUTPNT, ICOMPQ, INFO, LDQ, N,
@@ -20,144 +275,6 @@
$ QSTORE( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAED7 computes the updated eigensystem of a diagonal
-* matrix after modification by a rank-one symmetric matrix. This
-* routine is used only for the eigenproblem which requires all
-* eigenvalues and optionally eigenvectors of a dense symmetric matrix
-* that has been reduced to tridiagonal form. SLAED1 handles
-* the case in which all eigenvalues and eigenvectors of a symmetric
-* tridiagonal matrix are desired.
-*
-* T = Q(in) ( D(in) + RHO * Z*Z**T ) Q**T(in) = Q(out) * D(out) * Q**T(out)
-*
-* where Z = Q**Tu, u is a vector of length N with ones in the
-* CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
-*
-* The eigenvectors of the original matrix are stored in Q, and the
-* eigenvalues are in D. The algorithm consists of three stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple eigenvalues or if there is a zero in
-* the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine SLAED8.
-*
-* The second stage consists of calculating the updated
-* eigenvalues. This is done by finding the roots of the secular
-* equation via the routine SLAED4 (as called by SLAED9).
-* This routine also calculates the eigenvectors of the current
-* problem.
-*
-* The final stage consists of computing the updated eigenvectors
-* directly using the updated eigenvalues. The eigenvectors for
-* the current problem are multiplied with the eigenvectors from
-* the overall problem.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* = 0: Compute eigenvalues only.
-* = 1: Compute eigenvectors of original dense symmetric matrix
-* also. On entry, Q contains the orthogonal matrix used
-* to reduce the original matrix to tridiagonal form.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* QSIZ (input) INTEGER
-* The dimension of the orthogonal matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
-*
-* TLVLS (input) INTEGER
-* The total number of merging levels in the overall divide and
-* conquer tree.
-*
-* CURLVL (input) INTEGER
-* The current level in the overall merge routine,
-* 0 <= CURLVL <= TLVLS.
-*
-* CURPBM (input) INTEGER
-* The current problem in the current level in the overall
-* merge routine (counting from upper left to lower right).
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the eigenvalues of the rank-1-perturbed matrix.
-* On exit, the eigenvalues of the repaired matrix.
-*
-* Q (input/output) REAL array, dimension (LDQ, N)
-* On entry, the eigenvectors of the rank-1-perturbed matrix.
-* On exit, the eigenvectors of the repaired tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* INDXQ (output) INTEGER array, dimension (N)
-* The permutation which will reintegrate the subproblem just
-* solved back into sorted order, i.e., D( INDXQ( I = 1, N ) )
-* will be in ascending order.
-*
-* RHO (input) REAL
-* The subdiagonal element used to create the rank-1
-* modification.
-*
-* CUTPNT (input) INTEGER
-* Contains the location of the last eigenvalue in the leading
-* sub-matrix. min(1,N) <= CUTPNT <= N.
-*
-* QSTORE (input/output) REAL array, dimension (N**2+1)
-* Stores eigenvectors of submatrices encountered during
-* divide and conquer, packed together. QPTR points to
-* beginning of the submatrices.
-*
-* QPTR (input/output) INTEGER array, dimension (N+2)
-* List of indices pointing to beginning of submatrices stored
-* in QSTORE. The submatrices are numbered starting at the
-* bottom left of the divide and conquer tree, from left to
-* right and bottom to top.
-*
-* PRMPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in PERM a
-* level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
-* indicates the size of the permutation and also the size of
-* the full, non-deflated problem.
-*
-* PERM (input) INTEGER array, dimension (N lg N)
-* Contains the permutations (from deflation and sorting) to be
-* applied to each eigenblock.
-*
-* GIVPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in GIVCOL a
-* level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
-* indicates the number of Givens rotations.
-*
-* GIVCOL (input) INTEGER array, dimension (2, N lg N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (input) REAL array, dimension (2, N lg N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* WORK (workspace) REAL array, dimension (3*N+2*QSIZ*N)
-*
-* IWORK (workspace) INTEGER array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaed8.f b/SRC/slaed8.f
index e04e0c35..4c5699e7 100644
--- a/SRC/slaed8.f
+++ b/SRC/slaed8.f
@@ -1,11 +1,250 @@
+*> \brief \b SLAED8
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED8( ICOMPQ, K, N, QSIZ, D, Q, LDQ, INDXQ, RHO,
+* CUTPNT, Z, DLAMDA, Q2, LDQ2, W, PERM, GIVPTR,
+* GIVCOL, GIVNUM, INDXP, INDX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CUTPNT, GIVPTR, ICOMPQ, INFO, K, LDQ, LDQ2, N,
+* $ QSIZ
+* REAL RHO
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), INDX( * ), INDXP( * ),
+* $ INDXQ( * ), PERM( * )
+* REAL D( * ), DLAMDA( * ), GIVNUM( 2, * ),
+* $ Q( LDQ, * ), Q2( LDQ2, * ), W( * ), Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAED8 merges the two sets of eigenvalues together into a single
+*> sorted set. Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur: when two or more
+*> eigenvalues are close together or if there is a tiny element in the
+*> Z vector. For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> = 0: Compute eigenvalues only.
+*> = 1: Compute eigenvectors of original dense symmetric matrix
+*> also. On entry, Q contains the orthogonal matrix used
+*> to reduce the original matrix to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> The number of non-deflated eigenvalues, and the order of the
+*> related secular equation.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the orthogonal matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the eigenvalues of the two submatrices to be
+*> combined. On exit, the trailing (N-K) updated eigenvalues
+*> (those which were deflated) sorted into increasing order.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> If ICOMPQ = 0, Q is not referenced. Otherwise,
+*> on entry, Q contains the eigenvectors of the partially solved
+*> system which has been previously updated in matrix
+*> multiplies with other partially solved eigensystems.
+*> On exit, Q contains the trailing (N-K) updated eigenvectors
+*> (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> The permutation which separately sorts the two sub-problems
+*> in D into ascending order. Note that elements in the second
+*> half of this permutation must first have CUTPNT added to
+*> their values in order to be accurate.
+*> \endverbatim
+*>
+*> \param[in,out] RHO
+*> \verbatim
+*> RHO is REAL
+*> On entry, the off-diagonal element associated with the rank-1
+*> cut which originally split the two submatrices which are now
+*> being recombined.
+*> On exit, RHO has been modified to the value required by
+*> SLAED3.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> The location of the last eigenvalue in the leading
+*> sub-matrix. min(1,N) <= CUTPNT <= N.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (N)
+*> On entry, Z contains the updating vector (the last row of
+*> the first sub-eigenvector matrix and the first row of the
+*> second sub-eigenvector matrix).
+*> On exit, the contents of Z are destroyed by the updating
+*> process.
+*> \endverbatim
+*>
+*> \param[out] DLAMDA
+*> \verbatim
+*> DLAMDA is REAL array, dimension (N)
+*> A copy of the first K eigenvalues which will be used by
+*> SLAED3 to form the secular equation.
+*> \endverbatim
+*>
+*> \param[out] Q2
+*> \verbatim
+*> Q2 is REAL array, dimension (LDQ2,N)
+*> If ICOMPQ = 0, Q2 is not referenced. Otherwise,
+*> a copy of the first K eigenvectors which will be used by
+*> SLAED7 in a matrix multiply (SGEMM) to update the new
+*> eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQ2
+*> \verbatim
+*> LDQ2 is INTEGER
+*> The leading dimension of the array Q2. LDQ2 >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first k values of the final deflation-altered z-vector and
+*> will be passed to SLAED3.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N)
+*> The permutations (from deflation and sorting) to be applied
+*> to each eigenblock.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension (2, N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] INDXP
+*> \verbatim
+*> INDXP is INTEGER array, dimension (N)
+*> The permutation used to place deflated values of D at the end
+*> of the array. INDXP(1:K) points to the nondeflated D-values
+*> and INDXP(K+1:N) points to the deflated eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] INDX
+*> \verbatim
+*> INDX is INTEGER array, dimension (N)
+*> The permutation used to sort the contents of D into ascending
+*> order.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAED8( ICOMPQ, K, N, QSIZ, D, Q, LDQ, INDXQ, RHO,
$ CUTPNT, Z, DLAMDA, Q2, LDQ2, W, PERM, GIVPTR,
$ GIVCOL, GIVNUM, INDXP, INDX, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER CUTPNT, GIVPTR, ICOMPQ, INFO, K, LDQ, LDQ2, N,
@@ -19,129 +258,6 @@
$ Q( LDQ, * ), Q2( LDQ2, * ), W( * ), Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAED8 merges the two sets of eigenvalues together into a single
-* sorted set. Then it tries to deflate the size of the problem.
-* There are two ways in which deflation can occur: when two or more
-* eigenvalues are close together or if there is a tiny element in the
-* Z vector. For each such occurrence the order of the related secular
-* equation problem is reduced by one.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* = 0: Compute eigenvalues only.
-* = 1: Compute eigenvectors of original dense symmetric matrix
-* also. On entry, Q contains the orthogonal matrix used
-* to reduce the original matrix to tridiagonal form.
-*
-* K (output) INTEGER
-* The number of non-deflated eigenvalues, and the order of the
-* related secular equation.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* QSIZ (input) INTEGER
-* The dimension of the orthogonal matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the eigenvalues of the two submatrices to be
-* combined. On exit, the trailing (N-K) updated eigenvalues
-* (those which were deflated) sorted into increasing order.
-*
-* Q (input/output) REAL array, dimension (LDQ,N)
-* If ICOMPQ = 0, Q is not referenced. Otherwise,
-* on entry, Q contains the eigenvectors of the partially solved
-* system which has been previously updated in matrix
-* multiplies with other partially solved eigensystems.
-* On exit, Q contains the trailing (N-K) updated eigenvectors
-* (those which were deflated) in its last N-K columns.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* INDXQ (input) INTEGER array, dimension (N)
-* The permutation which separately sorts the two sub-problems
-* in D into ascending order. Note that elements in the second
-* half of this permutation must first have CUTPNT added to
-* their values in order to be accurate.
-*
-* RHO (input/output) REAL
-* On entry, the off-diagonal element associated with the rank-1
-* cut which originally split the two submatrices which are now
-* being recombined.
-* On exit, RHO has been modified to the value required by
-* SLAED3.
-*
-* CUTPNT (input) INTEGER
-* The location of the last eigenvalue in the leading
-* sub-matrix. min(1,N) <= CUTPNT <= N.
-*
-* Z (input) REAL array, dimension (N)
-* On entry, Z contains the updating vector (the last row of
-* the first sub-eigenvector matrix and the first row of the
-* second sub-eigenvector matrix).
-* On exit, the contents of Z are destroyed by the updating
-* process.
-*
-* DLAMDA (output) REAL array, dimension (N)
-* A copy of the first K eigenvalues which will be used by
-* SLAED3 to form the secular equation.
-*
-* Q2 (output) REAL array, dimension (LDQ2,N)
-* If ICOMPQ = 0, Q2 is not referenced. Otherwise,
-* a copy of the first K eigenvectors which will be used by
-* SLAED7 in a matrix multiply (SGEMM) to update the new
-* eigenvectors.
-*
-* LDQ2 (input) INTEGER
-* The leading dimension of the array Q2. LDQ2 >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* The first k values of the final deflation-altered z-vector and
-* will be passed to SLAED3.
-*
-* PERM (output) INTEGER array, dimension (N)
-* The permutations (from deflation and sorting) to be applied
-* to each eigenblock.
-*
-* GIVPTR (output) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem.
-*
-* GIVCOL (output) INTEGER array, dimension (2, N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (output) REAL array, dimension (2, N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* INDXP (workspace) INTEGER array, dimension (N)
-* The permutation used to place deflated values of D at the end
-* of the array. INDXP(1:K) points to the nondeflated D-values
-* and INDXP(K+1:N) points to the deflated eigenvalues.
-*
-* INDX (workspace) INTEGER array, dimension (N)
-* The permutation used to sort the contents of D into ascending
-* order.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaed9.f b/SRC/slaed9.f
index 4a34baea..5dee152c 100644
--- a/SRC/slaed9.f
+++ b/SRC/slaed9.f
@@ -1,87 +1,172 @@
- SUBROUTINE SLAED9( K, KSTART, KSTOP, N, D, Q, LDQ, RHO, DLAMDA, W,
- $ S, LDS, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, K, KSTART, KSTOP, LDQ, LDS, N
- REAL RHO
-* ..
-* .. Array Arguments ..
- REAL D( * ), DLAMDA( * ), Q( LDQ, * ), S( LDS, * ),
- $ W( * )
-* ..
-*
+*> \brief \b SLAED9
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAED9( K, KSTART, KSTOP, N, D, Q, LDQ, RHO, DLAMDA, W,
+* S, LDS, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, KSTART, KSTOP, LDQ, LDS, N
+* REAL RHO
+* ..
+* .. Array Arguments ..
+* REAL D( * ), DLAMDA( * ), Q( LDQ, * ), S( LDS, * ),
+* $ W( * )
+* ..
+*
* Purpose
* =======
*
-* SLAED9 finds the roots of the secular equation, as defined by the
-* values in D, Z, and RHO, between KSTART and KSTOP. It makes the
-* appropriate calls to SLAED4 and then stores the new matrix of
-* eigenvectors for use in calculating the next level of Z vectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAED9 finds the roots of the secular equation, as defined by the
+*> values in D, Z, and RHO, between KSTART and KSTOP. It makes the
+*> appropriate calls to SLAED4 and then stores the new matrix of
+*> eigenvectors for use in calculating the next level of Z vectors.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* K (input) INTEGER
-* The number of terms in the rational function to be solved by
-* SLAED4. K >= 0.
-*
-* KSTART (input) INTEGER
-*
-* KSTOP (input) INTEGER
-* The updated eigenvalues Lambda(I), KSTART <= I <= KSTOP
-* are to be computed. 1 <= KSTART <= KSTOP <= K.
-*
-* N (input) INTEGER
-* The number of rows and columns in the Q matrix.
-* N >= K (delation may result in N > K).
-*
-* D (output) REAL array, dimension (N)
-* D(I) contains the updated eigenvalues
-* for KSTART <= I <= KSTOP.
-*
-* Q (workspace) REAL array, dimension (LDQ,N)
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max( 1, N ).
-*
-* RHO (input) REAL
-* The value of the parameter in the rank one update equation.
-* RHO >= 0 required.
-*
-* DLAMDA (input) REAL array, dimension (K)
-* The first K elements of this array contain the old roots
-* of the deflated updating problem. These are the poles
-* of the secular equation.
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of terms in the rational function to be solved by
+*> SLAED4. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] KSTART
+*> \verbatim
+*> KSTART is INTEGER
+*> \endverbatim
+*>
+*> \param[in] KSTOP
+*> \verbatim
+*> KSTOP is INTEGER
+*> The updated eigenvalues Lambda(I), KSTART <= I <= KSTOP
+*> are to be computed. 1 <= KSTART <= KSTOP <= K.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the Q matrix.
+*> N >= K (delation may result in N > K).
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> D(I) contains the updated eigenvalues
+*> for KSTART <= I <= KSTOP.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> The value of the parameter in the rank one update equation.
+*> RHO >= 0 required.
+*> \endverbatim
+*>
+*> \param[in] DLAMDA
+*> \verbatim
+*> DLAMDA is REAL array, dimension (K)
+*> The first K elements of this array contain the old roots
+*> of the deflated updating problem. These are the poles
+*> of the secular equation.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is REAL array, dimension (K)
+*> The first K elements of this array contain the components
+*> of the deflation-adjusted updating vector.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (LDS, K)
+*> Will contain the eigenvectors of the repaired matrix which
+*> will be stored for subsequent Z vector calculation and
+*> multiplied by the previously accumulated eigenvectors
+*> to update the system.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of S. LDS >= max( 1, K ).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* W (input) REAL array, dimension (K)
-* The first K elements of this array contain the components
-* of the deflation-adjusted updating vector.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S (output) REAL array, dimension (LDS, K)
-* Will contain the eigenvectors of the repaired matrix which
-* will be stored for subsequent Z vector calculation and
-* multiplied by the previously accumulated eigenvectors
-* to update the system.
+*> \date November 2011
*
-* LDS (input) INTEGER
-* The leading dimension of S. LDS >= max( 1, K ).
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAED9( K, KSTART, KSTOP, N, D, Q, LDQ, RHO, DLAMDA, W,
+ $ S, LDS, INFO )
*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, K, KSTART, KSTOP, LDQ, LDS, N
+ REAL RHO
+* ..
+* .. Array Arguments ..
+ REAL D( * ), DLAMDA( * ), Q( LDQ, * ), S( LDS, * ),
+ $ W( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaeda.f b/SRC/slaeda.f
index 32041351..ca0ed247 100644
--- a/SRC/slaeda.f
+++ b/SRC/slaeda.f
@@ -1,94 +1,182 @@
- SUBROUTINE SLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
- $ GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER CURLVL, CURPBM, INFO, N, TLVLS
-* ..
-* .. Array Arguments ..
- INTEGER GIVCOL( 2, * ), GIVPTR( * ), PERM( * ),
- $ PRMPTR( * ), QPTR( * )
- REAL GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
-* ..
-*
+*> \brief \b SLAEDA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
+* GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CURLVL, CURPBM, INFO, N, TLVLS
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), GIVPTR( * ), PERM( * ),
+* $ PRMPTR( * ), QPTR( * )
+* REAL GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
+* ..
+*
* Purpose
* =======
*
-* SLAEDA computes the Z vector corresponding to the merge step in the
-* CURLVLth step of the merge process with TLVLS steps for the CURPBMth
-* problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAEDA computes the Z vector corresponding to the merge step in the
+*> CURLVLth step of the merge process with TLVLS steps for the CURPBMth
+*> problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* TLVLS (input) INTEGER
-* The total number of merging levels in the overall divide and
-* conquer tree.
-*
-* CURLVL (input) INTEGER
-* The current level in the overall merge routine,
-* 0 <= curlvl <= tlvls.
-*
-* CURPBM (input) INTEGER
-* The current problem in the current level in the overall
-* merge routine (counting from upper left to lower right).
-*
-* PRMPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in PERM a
-* level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
-* indicates the size of the permutation and incidentally the
-* size of the full, non-deflated problem.
-*
-* PERM (input) INTEGER array, dimension (N lg N)
-* Contains the permutations (from deflation and sorting) to be
-* applied to each eigenblock.
-*
-* GIVPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in GIVCOL a
-* level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
-* indicates the number of Givens rotations.
-*
-* GIVCOL (input) INTEGER array, dimension (2, N lg N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (input) REAL array, dimension (2, N lg N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* Q (input) REAL array, dimension (N**2)
-* Contains the square eigenblocks from previous levels, the
-* starting positions for blocks are given by QPTR.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] TLVLS
+*> \verbatim
+*> TLVLS is INTEGER
+*> The total number of merging levels in the overall divide and
+*> conquer tree.
+*> \endverbatim
+*>
+*> \param[in] CURLVL
+*> \verbatim
+*> CURLVL is INTEGER
+*> The current level in the overall merge routine,
+*> 0 <= curlvl <= tlvls.
+*> \endverbatim
+*>
+*> \param[in] CURPBM
+*> \verbatim
+*> CURPBM is INTEGER
+*> The current problem in the current level in the overall
+*> merge routine (counting from upper left to lower right).
+*> \endverbatim
+*>
+*> \param[in] PRMPTR
+*> \verbatim
+*> PRMPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in PERM a
+*> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
+*> indicates the size of the permutation and incidentally the
+*> size of the full, non-deflated problem.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N lg N)
+*> Contains the permutations (from deflation and sorting) to be
+*> applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in GIVCOL a
+*> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
+*> indicates the number of Givens rotations.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N lg N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension (2, N lg N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is REAL array, dimension (N**2)
+*> Contains the square eigenblocks from previous levels, the
+*> starting positions for blocks are given by QPTR.
+*> \endverbatim
+*>
+*> \param[in] QPTR
+*> \verbatim
+*> QPTR is INTEGER array, dimension (N+2)
+*> Contains a list of pointers which indicate where in Q an
+*> eigenblock is stored. SQRT( QPTR(i+1) - QPTR(i) ) indicates
+*> the size of the block.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (N)
+*> On output this vector contains the updating vector (the last
+*> row of the first sub-eigenvector matrix and the first row of
+*> the second sub-eigenvector matrix).
+*> \endverbatim
+*>
+*> \param[out] ZTEMP
+*> \verbatim
+*> ZTEMP is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* QPTR (input) INTEGER array, dimension (N+2)
-* Contains a list of pointers which indicate where in Q an
-* eigenblock is stored. SQRT( QPTR(i+1) - QPTR(i) ) indicates
-* the size of the block.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Z (output) REAL array, dimension (N)
-* On output this vector contains the updating vector (the last
-* row of the first sub-eigenvector matrix and the first row of
-* the second sub-eigenvector matrix).
+*> \date November 2011
*
-* ZTEMP (workspace) REAL array, dimension (N)
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
+ $ GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER CURLVL, CURPBM, INFO, N, TLVLS
+* ..
+* .. Array Arguments ..
+ INTEGER GIVCOL( 2, * ), GIVPTR( * ), PERM( * ),
+ $ PRMPTR( * ), QPTR( * )
+ REAL GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaein.f b/SRC/slaein.f
index bea2982b..e044ce05 100644
--- a/SRC/slaein.f
+++ b/SRC/slaein.f
@@ -1,10 +1,173 @@
+*> \brief \b SLAEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAEIN( RIGHTV, NOINIT, N, H, LDH, WR, WI, VR, VI, B,
+* LDB, WORK, EPS3, SMLNUM, BIGNUM, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL NOINIT, RIGHTV
+* INTEGER INFO, LDB, LDH, N
+* REAL BIGNUM, EPS3, SMLNUM, WI, WR
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), H( LDH, * ), VI( * ), VR( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAEIN uses inverse iteration to find a right or left eigenvector
+*> corresponding to the eigenvalue (WR,WI) of a real upper Hessenberg
+*> matrix H.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RIGHTV
+*> \verbatim
+*> RIGHTV is LOGICAL
+*> = .TRUE. : compute right eigenvector;
+*> = .FALSE.: compute left eigenvector.
+*> \endverbatim
+*>
+*> \param[in] NOINIT
+*> \verbatim
+*> NOINIT is LOGICAL
+*> = .TRUE. : no initial vector supplied in (VR,VI).
+*> = .FALSE.: initial vector supplied in (VR,VI).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> The upper Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] WR
+*> \verbatim
+*> WR is REAL
+*> \endverbatim
+*>
+*> \param[in] WI
+*> \verbatim
+*> WI is REAL
+*> The real and imaginary parts of the eigenvalue of H whose
+*> corresponding right or left eigenvector is to be computed.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in,out] VI
+*> \verbatim
+*> VI is REAL array, dimension (N)
+*> On entry, if NOINIT = .FALSE. and WI = 0.0, VR must contain
+*> a real starting vector for inverse iteration using the real
+*> eigenvalue WR; if NOINIT = .FALSE. and WI.ne.0.0, VR and VI
+*> must contain the real and imaginary parts of a complex
+*> starting vector for inverse iteration using the complex
+*> eigenvalue (WR,WI); otherwise VR and VI need not be set.
+*> On exit, if WI = 0.0 (real eigenvalue), VR contains the
+*> computed real eigenvector; if WI.ne.0.0 (complex eigenvalue),
+*> VR and VI contain the real and imaginary parts of the
+*> computed complex eigenvector. The eigenvector is normalized
+*> so that the component of largest magnitude has magnitude 1;
+*> here the magnitude of a complex number (x,y) is taken to be
+*> |x| + |y|.
+*> VI is not referenced if WI = 0.0.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] EPS3
+*> \verbatim
+*> EPS3 is REAL
+*> A small machine-dependent value which is used to perturb
+*> close eigenvalues, and to replace zero pivots.
+*> \endverbatim
+*>
+*> \param[in] SMLNUM
+*> \verbatim
+*> SMLNUM is REAL
+*> A machine-dependent value close to the underflow threshold.
+*> \endverbatim
+*>
+*> \param[in] BIGNUM
+*> \verbatim
+*> BIGNUM is REAL
+*> A machine-dependent value close to the overflow threshold.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: inverse iteration did not converge; VR is set to the
+*> last iterate, and so is VI if WI.ne.0.0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAEIN( RIGHTV, NOINIT, N, H, LDH, WR, WI, VR, VI, B,
$ LDB, WORK, EPS3, SMLNUM, BIGNUM, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL NOINIT, RIGHTV
@@ -16,79 +179,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAEIN uses inverse iteration to find a right or left eigenvector
-* corresponding to the eigenvalue (WR,WI) of a real upper Hessenberg
-* matrix H.
-*
-* Arguments
-* =========
-*
-* RIGHTV (input) LOGICAL
-* = .TRUE. : compute right eigenvector;
-* = .FALSE.: compute left eigenvector.
-*
-* NOINIT (input) LOGICAL
-* = .TRUE. : no initial vector supplied in (VR,VI).
-* = .FALSE.: initial vector supplied in (VR,VI).
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* H (input) REAL array, dimension (LDH,N)
-* The upper Hessenberg matrix H.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* WR (input) REAL
-*
-* WI (input) REAL
-* The real and imaginary parts of the eigenvalue of H whose
-* corresponding right or left eigenvector is to be computed.
-*
-* VR (input/output) REAL array, dimension (N)
-*
-* VI (input/output) REAL array, dimension (N)
-* On entry, if NOINIT = .FALSE. and WI = 0.0, VR must contain
-* a real starting vector for inverse iteration using the real
-* eigenvalue WR; if NOINIT = .FALSE. and WI.ne.0.0, VR and VI
-* must contain the real and imaginary parts of a complex
-* starting vector for inverse iteration using the complex
-* eigenvalue (WR,WI); otherwise VR and VI need not be set.
-* On exit, if WI = 0.0 (real eigenvalue), VR contains the
-* computed real eigenvector; if WI.ne.0.0 (complex eigenvalue),
-* VR and VI contain the real and imaginary parts of the
-* computed complex eigenvector. The eigenvector is normalized
-* so that the component of largest magnitude has magnitude 1;
-* here the magnitude of a complex number (x,y) is taken to be
-* |x| + |y|.
-* VI is not referenced if WI = 0.0.
-*
-* B (workspace) REAL array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= N+1.
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* EPS3 (input) REAL
-* A small machine-dependent value which is used to perturb
-* close eigenvalues, and to replace zero pivots.
-*
-* SMLNUM (input) REAL
-* A machine-dependent value close to the underflow threshold.
-*
-* BIGNUM (input) REAL
-* A machine-dependent value close to the overflow threshold.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* = 1: inverse iteration did not converge; VR is set to the
-* last iterate, and so is VI if WI.ne.0.0.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaev2.f b/SRC/slaev2.f
index 868c326e..3909a052 100644
--- a/SRC/slaev2.f
+++ b/SRC/slaev2.f
@@ -1,66 +1,127 @@
- SUBROUTINE SLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
+*> \brief \b SLAEV2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL A, B, C, CS1, RT1, RT2, SN1
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
+*
+* .. Scalar Arguments ..
+* REAL A, B, C, CS1, RT1, RT2, SN1
+* ..
+*
* Purpose
* =======
*
-* SLAEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix
-* [ A B ]
-* [ B C ].
-* On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
-* eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
-* eigenvector for RT1, giving the decomposition
-*
-* [ CS1 SN1 ] [ A B ] [ CS1 -SN1 ] = [ RT1 0 ]
-* [-SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ].
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix
+*> [ A B ]
+*> [ B C ].
+*> On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
+*> eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
+*> eigenvector for RT1, giving the decomposition
+*>
+*> [ CS1 SN1 ] [ A B ] [ CS1 -SN1 ] = [ RT1 0 ]
+*> [-SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ].
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) REAL
-* The (1,1) element of the 2-by-2 matrix.
-*
-* B (input) REAL
-* The (1,2) element and the conjugate of the (2,1) element of
-* the 2-by-2 matrix.
-*
-* C (input) REAL
-* The (2,2) element of the 2-by-2 matrix.
+*> \param[in] A
+*> \verbatim
+*> A is REAL
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL
+*> The (1,2) element and the conjugate of the (2,1) element of
+*> the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] RT1
+*> \verbatim
+*> RT1 is REAL
+*> The eigenvalue of larger absolute value.
+*> \endverbatim
+*>
+*> \param[out] RT2
+*> \verbatim
+*> RT2 is REAL
+*> The eigenvalue of smaller absolute value.
+*> \endverbatim
+*>
+*> \param[out] CS1
+*> \verbatim
+*> CS1 is REAL
+*> \endverbatim
+*>
+*> \param[out] SN1
+*> \verbatim
+*> SN1 is REAL
+*> The vector (CS1, SN1) is a unit right eigenvector for RT1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RT1 (output) REAL
-* The eigenvalue of larger absolute value.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RT2 (output) REAL
-* The eigenvalue of smaller absolute value.
+*> \date November 2011
*
-* CS1 (output) REAL
+*> \ingroup auxOTHERauxiliary
*
-* SN1 (output) REAL
-* The vector (CS1, SN1) is a unit right eigenvector for RT1.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> RT1 is accurate to a few ulps barring over/underflow.
+*>
+*> RT2 may be inaccurate if there is massive cancellation in the
+*> determinant A*C-B*B; higher precision or correctly rounded or
+*> correctly truncated arithmetic would be needed to compute RT2
+*> accurately in all cases.
+*>
+*> CS1 and SN1 are accurate to a few ulps barring over/underflow.
+*>
+*> Overflow is possible only if RT1 is within a factor of 5 of overflow.
+*> Underflow is harmless if the input data is 0 or exceeds
+*> underflow_threshold / macheps.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
*
-* RT1 is accurate to a few ulps barring over/underflow.
-*
-* RT2 may be inaccurate if there is massive cancellation in the
-* determinant A*C-B*B; higher precision or correctly rounded or
-* correctly truncated arithmetic would be needed to compute RT2
-* accurately in all cases.
-*
-* CS1 and SN1 are accurate to a few ulps barring over/underflow.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Overflow is possible only if RT1 is within a factor of 5 of overflow.
-* Underflow is harmless if the input data is 0 or exceeds
-* underflow_threshold / macheps.
+* .. Scalar Arguments ..
+ REAL A, B, C, CS1, RT1, RT2, SN1
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaexc.f b/SRC/slaexc.f
index 380f40cf..9238cfc8 100644
--- a/SRC/slaexc.f
+++ b/SRC/slaexc.f
@@ -1,10 +1,139 @@
+*> \brief \b SLAEXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAEXC( WANTQ, N, T, LDT, Q, LDQ, J1, N1, N2, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ
+* INTEGER INFO, J1, LDQ, LDT, N, N1, N2
+* ..
+* .. Array Arguments ..
+* REAL Q( LDQ, * ), T( LDT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAEXC swaps adjacent diagonal blocks T11 and T22 of order 1 or 2 in
+*> an upper quasi-triangular matrix T by an orthogonal similarity
+*> transformation.
+*>
+*> T must be in Schur canonical form, that is, block upper triangular
+*> with 1-by-1 and 2-by-2 diagonal blocks; each 2-by-2 diagonal block
+*> has its diagonal elemnts equal and its off-diagonal elements of
+*> opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> = .TRUE. : accumulate the transformation in the matrix Q;
+*> = .FALSE.: do not accumulate the transformation.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,N)
+*> On entry, the upper quasi-triangular matrix T, in Schur
+*> canonical form.
+*> On exit, the updated matrix T, again in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> On entry, if WANTQ is .TRUE., the orthogonal matrix Q.
+*> On exit, if WANTQ is .TRUE., the updated matrix Q.
+*> If WANTQ is .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1; and if WANTQ is .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in] J1
+*> \verbatim
+*> J1 is INTEGER
+*> The index of the first row of the first block T11.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The order of the first block T11. N1 = 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> The order of the second block T22. N2 = 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: the transformed matrix T would be too far from Schur
+*> form; the blocks are not swapped and T and Q are
+*> unchanged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAEXC( WANTQ, N, T, LDT, Q, LDQ, J1, N1, N2, WORK,
$ INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTQ
@@ -14,62 +143,6 @@
REAL Q( LDQ, * ), T( LDT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAEXC swaps adjacent diagonal blocks T11 and T22 of order 1 or 2 in
-* an upper quasi-triangular matrix T by an orthogonal similarity
-* transformation.
-*
-* T must be in Schur canonical form, that is, block upper triangular
-* with 1-by-1 and 2-by-2 diagonal blocks; each 2-by-2 diagonal block
-* has its diagonal elemnts equal and its off-diagonal elements of
-* opposite sign.
-*
-* Arguments
-* =========
-*
-* WANTQ (input) LOGICAL
-* = .TRUE. : accumulate the transformation in the matrix Q;
-* = .FALSE.: do not accumulate the transformation.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) REAL array, dimension (LDT,N)
-* On entry, the upper quasi-triangular matrix T, in Schur
-* canonical form.
-* On exit, the updated matrix T, again in Schur canonical form.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* Q (input/output) REAL array, dimension (LDQ,N)
-* On entry, if WANTQ is .TRUE., the orthogonal matrix Q.
-* On exit, if WANTQ is .TRUE., the updated matrix Q.
-* If WANTQ is .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1; and if WANTQ is .TRUE., LDQ >= N.
-*
-* J1 (input) INTEGER
-* The index of the first row of the first block T11.
-*
-* N1 (input) INTEGER
-* The order of the first block T11. N1 = 0, 1 or 2.
-*
-* N2 (input) INTEGER
-* The order of the second block T22. N2 = 0, 1 or 2.
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* = 1: the transformed matrix T would be too far from Schur
-* form; the blocks are not swapped and T and Q are
-* unchanged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slag2.f b/SRC/slag2.f
index 751cdb54..fba5f425 100644
--- a/SRC/slag2.f
+++ b/SRC/slag2.f
@@ -1,10 +1,157 @@
+*> \brief \b SLAG2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1,
+* WR2, WI )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB
+* REAL SAFMIN, SCALE1, SCALE2, WI, WR1, WR2
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue
+*> problem A - w B, with scaling as necessary to avoid over-/underflow.
+*>
+*> The scaling factor "s" results in a modified eigenvalue equation
+*>
+*> s A - w B
+*>
+*> where s is a non-negative scaling factor chosen so that w, w B,
+*> and s A do not overflow and, if possible, do not underflow, either.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, 2)
+*> On entry, the 2 x 2 matrix A. It is assumed that its 1-norm
+*> is less than 1/SAFMIN. Entries less than
+*> sqrt(SAFMIN)*norm(A) are subject to being treated as zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= 2.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, 2)
+*> On entry, the 2 x 2 upper triangular matrix B. It is
+*> assumed that the one-norm of B is less than 1/SAFMIN. The
+*> diagonals should be at least sqrt(SAFMIN) times the largest
+*> element of B (in absolute value); if a diagonal is smaller
+*> than that, then +/- sqrt(SAFMIN) will be used instead of
+*> that diagonal.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= 2.
+*> \endverbatim
+*>
+*> \param[in] SAFMIN
+*> \verbatim
+*> SAFMIN is REAL
+*> The smallest positive number s.t. 1/SAFMIN does not
+*> overflow. (This should always be SLAMCH('S') -- it is an
+*> argument in order to avoid having to call SLAMCH frequently.)
+*> \endverbatim
+*>
+*> \param[out] SCALE1
+*> \verbatim
+*> SCALE1 is REAL
+*> A scaling factor used to avoid over-/underflow in the
+*> eigenvalue equation which defines the first eigenvalue. If
+*> the eigenvalues are complex, then the eigenvalues are
+*> ( WR1 +/- WI i ) / SCALE1 (which may lie outside the
+*> exponent range of the machine), SCALE1=SCALE2, and SCALE1
+*> will always be positive. If the eigenvalues are real, then
+*> the first (real) eigenvalue is WR1 / SCALE1 , but this may
+*> overflow or underflow, and in fact, SCALE1 may be zero or
+*> less than the underflow threshhold if the exact eigenvalue
+*> is sufficiently large.
+*> \endverbatim
+*>
+*> \param[out] SCALE2
+*> \verbatim
+*> SCALE2 is REAL
+*> A scaling factor used to avoid over-/underflow in the
+*> eigenvalue equation which defines the second eigenvalue. If
+*> the eigenvalues are complex, then SCALE2=SCALE1. If the
+*> eigenvalues are real, then the second (real) eigenvalue is
+*> WR2 / SCALE2 , but this may overflow or underflow, and in
+*> fact, SCALE2 may be zero or less than the underflow
+*> threshhold if the exact eigenvalue is sufficiently large.
+*> \endverbatim
+*>
+*> \param[out] WR1
+*> \verbatim
+*> WR1 is REAL
+*> If the eigenvalue is real, then WR1 is SCALE1 times the
+*> eigenvalue closest to the (2,2) element of A B**(-1). If the
+*> eigenvalue is complex, then WR1=WR2 is SCALE1 times the real
+*> part of the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] WR2
+*> \verbatim
+*> WR2 is REAL
+*> If the eigenvalue is real, then WR2 is SCALE2 times the
+*> other eigenvalue. If the eigenvalue is complex, then
+*> WR1=WR2 is SCALE1 times the real part of the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL
+*> If the eigenvalue is real, then WI is zero. If the
+*> eigenvalue is complex, then WI is SCALE1 times the imaginary
+*> part of the eigenvalues. WI will always be non-negative.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1,
$ WR2, WI )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB
@@ -14,83 +161,6 @@
REAL A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue
-* problem A - w B, with scaling as necessary to avoid over-/underflow.
-*
-* The scaling factor "s" results in a modified eigenvalue equation
-*
-* s A - w B
-*
-* where s is a non-negative scaling factor chosen so that w, w B,
-* and s A do not overflow and, if possible, do not underflow, either.
-*
-* Arguments
-* =========
-*
-* A (input) REAL array, dimension (LDA, 2)
-* On entry, the 2 x 2 matrix A. It is assumed that its 1-norm
-* is less than 1/SAFMIN. Entries less than
-* sqrt(SAFMIN)*norm(A) are subject to being treated as zero.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= 2.
-*
-* B (input) REAL array, dimension (LDB, 2)
-* On entry, the 2 x 2 upper triangular matrix B. It is
-* assumed that the one-norm of B is less than 1/SAFMIN. The
-* diagonals should be at least sqrt(SAFMIN) times the largest
-* element of B (in absolute value); if a diagonal is smaller
-* than that, then +/- sqrt(SAFMIN) will be used instead of
-* that diagonal.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= 2.
-*
-* SAFMIN (input) REAL
-* The smallest positive number s.t. 1/SAFMIN does not
-* overflow. (This should always be SLAMCH('S') -- it is an
-* argument in order to avoid having to call SLAMCH frequently.)
-*
-* SCALE1 (output) REAL
-* A scaling factor used to avoid over-/underflow in the
-* eigenvalue equation which defines the first eigenvalue. If
-* the eigenvalues are complex, then the eigenvalues are
-* ( WR1 +/- WI i ) / SCALE1 (which may lie outside the
-* exponent range of the machine), SCALE1=SCALE2, and SCALE1
-* will always be positive. If the eigenvalues are real, then
-* the first (real) eigenvalue is WR1 / SCALE1 , but this may
-* overflow or underflow, and in fact, SCALE1 may be zero or
-* less than the underflow threshhold if the exact eigenvalue
-* is sufficiently large.
-*
-* SCALE2 (output) REAL
-* A scaling factor used to avoid over-/underflow in the
-* eigenvalue equation which defines the second eigenvalue. If
-* the eigenvalues are complex, then SCALE2=SCALE1. If the
-* eigenvalues are real, then the second (real) eigenvalue is
-* WR2 / SCALE2 , but this may overflow or underflow, and in
-* fact, SCALE2 may be zero or less than the underflow
-* threshhold if the exact eigenvalue is sufficiently large.
-*
-* WR1 (output) REAL
-* If the eigenvalue is real, then WR1 is SCALE1 times the
-* eigenvalue closest to the (2,2) element of A B**(-1). If the
-* eigenvalue is complex, then WR1=WR2 is SCALE1 times the real
-* part of the eigenvalues.
-*
-* WR2 (output) REAL
-* If the eigenvalue is real, then WR2 is SCALE2 times the
-* other eigenvalue. If the eigenvalue is complex, then
-* WR1=WR2 is SCALE1 times the real part of the eigenvalues.
-*
-* WI (output) REAL
-* If the eigenvalue is real, then WI is zero. If the
-* eigenvalue is complex, then WI is SCALE1 times the imaginary
-* part of the eigenvalues. WI will always be non-negative.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slag2d.f b/SRC/slag2d.f
index 1a3aedfa..fa06391a 100644
--- a/SRC/slag2d.f
+++ b/SRC/slag2d.f
@@ -1,54 +1,113 @@
- SUBROUTINE SLAG2D( M, N, SA, LDSA, A, LDA, INFO )
-*
-* -- LAPACK PROTOTYPE auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDSA, M, N
-* ..
-* .. Array Arguments ..
- REAL SA( LDSA, * )
- DOUBLE PRECISION A( LDA, * )
-* ..
-*
+*> \brief \b SLAG2D
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAG2D( M, N, SA, LDSA, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDSA, M, N
+* ..
+* .. Array Arguments ..
+* REAL SA( LDSA, * )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SLAG2D converts a SINGLE PRECISION matrix, SA, to a DOUBLE
-* PRECISION matrix, A.
-*
-* Note that while it is possible to overflow while converting
-* from double to single, it is not possible to overflow when
-* converting from single to double.
-*
-* This is an auxiliary routine so there is no argument checking.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAG2D converts a SINGLE PRECISION matrix, SA, to a DOUBLE
+*> PRECISION matrix, A.
+*>
+*> Note that while it is possible to overflow while converting
+*> from double to single, it is not possible to overflow when
+*> converting from single to double.
+*>
+*> This is an auxiliary routine so there is no argument checking.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of lines of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of lines of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*> SA is REAL array, dimension (LDSA,N)
+*> On entry, the M-by-N coefficient matrix SA.
+*> \endverbatim
+*>
+*> \param[in] LDSA
+*> \verbatim
+*> LDSA is INTEGER
+*> The leading dimension of the array SA. LDSA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On exit, the M-by-N coefficient matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SA (input) REAL array, dimension (LDSA,N)
-* On entry, the M-by-N coefficient matrix SA.
+*> \date November 2011
*
-* LDSA (input) INTEGER
-* The leading dimension of the array SA. LDSA >= max(1,M).
+*> \ingroup auxOTHERauxiliary
*
-* A (output) DOUBLE PRECISION array, dimension (LDA,N)
-* On exit, the M-by-N coefficient matrix A.
+* =====================================================================
+ SUBROUTINE SLAG2D( M, N, SA, LDSA, A, LDA, INFO )
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDSA, M, N
+* ..
+* .. Array Arguments ..
+ REAL SA( LDSA, * )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slags2.f b/SRC/slags2.f
index d6533072..cc8696e1 100644
--- a/SRC/slags2.f
+++ b/SRC/slags2.f
@@ -1,82 +1,159 @@
- SUBROUTINE SLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
- $ SNV, CSQ, SNQ )
+*> \brief \b SLAGS2
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL UPPER
- REAL A1, A2, A3, B1, B2, B3, CSQ, CSU, CSV, SNQ,
- $ SNU, SNV
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
+* SNV, CSQ, SNQ )
+*
+* .. Scalar Arguments ..
+* LOGICAL UPPER
+* REAL A1, A2, A3, B1, B2, B3, CSQ, CSU, CSV, SNQ,
+* $ SNU, SNV
+* ..
+*
* Purpose
* =======
*
-* SLAGS2 computes 2-by-2 orthogonal matrices U, V and Q, such
-* that if ( UPPER ) then
-*
-* U**T *A*Q = U**T *( A1 A2 )*Q = ( x 0 )
-* ( 0 A3 ) ( x x )
-* and
-* V**T*B*Q = V**T *( B1 B2 )*Q = ( x 0 )
-* ( 0 B3 ) ( x x )
-*
-* or if ( .NOT.UPPER ) then
-*
-* U**T *A*Q = U**T *( A1 0 )*Q = ( x x )
-* ( A2 A3 ) ( 0 x )
-* and
-* V**T*B*Q = V**T*( B1 0 )*Q = ( x x )
-* ( B2 B3 ) ( 0 x )
-*
-* The rows of the transformed A and B are parallel, where
-*
-* U = ( CSU SNU ), V = ( CSV SNV ), Q = ( CSQ SNQ )
-* ( -SNU CSU ) ( -SNV CSV ) ( -SNQ CSQ )
-*
-* Z**T denotes the transpose of Z.
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAGS2 computes 2-by-2 orthogonal matrices U, V and Q, such
+*> that if ( UPPER ) then
+*>
+*> U**T *A*Q = U**T *( A1 A2 )*Q = ( x 0 )
+*> ( 0 A3 ) ( x x )
+*> and
+*> V**T*B*Q = V**T *( B1 B2 )*Q = ( x 0 )
+*> ( 0 B3 ) ( x x )
+*>
+*> or if ( .NOT.UPPER ) then
+*>
+*> U**T *A*Q = U**T *( A1 0 )*Q = ( x x )
+*> ( A2 A3 ) ( 0 x )
+*> and
+*> V**T*B*Q = V**T*( B1 0 )*Q = ( x x )
+*> ( B2 B3 ) ( 0 x )
+*>
+*> The rows of the transformed A and B are parallel, where
+*>
+*> U = ( CSU SNU ), V = ( CSV SNV ), Q = ( CSQ SNQ )
+*> ( -SNU CSU ) ( -SNV CSV ) ( -SNQ CSQ )
+*>
+*> Z**T denotes the transpose of Z.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPPER (input) LOGICAL
-* = .TRUE.: the input matrices A and B are upper triangular.
-* = .FALSE.: the input matrices A and B are lower triangular.
-*
-* A1 (input) REAL
-*
-* A2 (input) REAL
-*
-* A3 (input) REAL
-* On entry, A1, A2 and A3 are elements of the input 2-by-2
-* upper (lower) triangular matrix A.
-*
-* B1 (input) REAL
-*
-* B2 (input) REAL
-*
-* B3 (input) REAL
-* On entry, B1, B2 and B3 are elements of the input 2-by-2
-* upper (lower) triangular matrix B.
+*> \param[in] UPPER
+*> \verbatim
+*> UPPER is LOGICAL
+*> = .TRUE.: the input matrices A and B are upper triangular.
+*> = .FALSE.: the input matrices A and B are lower triangular.
+*> \endverbatim
+*>
+*> \param[in] A1
+*> \verbatim
+*> A1 is REAL
+*> \endverbatim
+*>
+*> \param[in] A2
+*> \verbatim
+*> A2 is REAL
+*> \endverbatim
+*>
+*> \param[in] A3
+*> \verbatim
+*> A3 is REAL
+*> On entry, A1, A2 and A3 are elements of the input 2-by-2
+*> upper (lower) triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] B1
+*> \verbatim
+*> B1 is REAL
+*> \endverbatim
+*>
+*> \param[in] B2
+*> \verbatim
+*> B2 is REAL
+*> \endverbatim
+*>
+*> \param[in] B3
+*> \verbatim
+*> B3 is REAL
+*> On entry, B1, B2 and B3 are elements of the input 2-by-2
+*> upper (lower) triangular matrix B.
+*> \endverbatim
+*>
+*> \param[out] CSU
+*> \verbatim
+*> CSU is REAL
+*> \endverbatim
+*>
+*> \param[out] SNU
+*> \verbatim
+*> SNU is REAL
+*> The desired orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[out] CSV
+*> \verbatim
+*> CSV is REAL
+*> \endverbatim
+*>
+*> \param[out] SNV
+*> \verbatim
+*> SNV is REAL
+*> The desired orthogonal matrix V.
+*> \endverbatim
+*>
+*> \param[out] CSQ
+*> \verbatim
+*> CSQ is REAL
+*> \endverbatim
+*>
+*> \param[out] SNQ
+*> \verbatim
+*> SNQ is REAL
+*> The desired orthogonal matrix Q.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CSU (output) REAL
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SNU (output) REAL
-* The desired orthogonal matrix U.
+*> \date November 2011
*
-* CSV (output) REAL
+*> \ingroup realOTHERauxiliary
*
-* SNV (output) REAL
-* The desired orthogonal matrix V.
+* =====================================================================
+ SUBROUTINE SLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
+ $ SNV, CSQ, SNQ )
*
-* CSQ (output) REAL
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SNQ (output) REAL
-* The desired orthogonal matrix Q.
+* .. Scalar Arguments ..
+ LOGICAL UPPER
+ REAL A1, A2, A3, B1, B2, B3, CSQ, CSU, CSV, SNQ,
+ $ SNU, SNV
+* ..
*
* =====================================================================
*
diff --git a/SRC/slagtf.f b/SRC/slagtf.f
index b9468b22..97383926 100644
--- a/SRC/slagtf.f
+++ b/SRC/slagtf.f
@@ -1,99 +1,171 @@
- SUBROUTINE SLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- REAL LAMBDA, TOL
-* ..
-* .. Array Arguments ..
- INTEGER IN( * )
- REAL A( * ), B( * ), C( * ), D( * )
-* ..
-*
+*> \brief \b SLAGTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* REAL LAMBDA, TOL
+* ..
+* .. Array Arguments ..
+* INTEGER IN( * )
+* REAL A( * ), B( * ), C( * ), D( * )
+* ..
+*
* Purpose
* =======
*
-* SLAGTF factorizes the matrix (T - lambda*I), where T is an n by n
-* tridiagonal matrix and lambda is a scalar, as
-*
-* T - lambda*I = PLU,
-*
-* where P is a permutation matrix, L is a unit lower tridiagonal matrix
-* with at most one non-zero sub-diagonal elements per column and U is
-* an upper triangular matrix with at most two non-zero super-diagonal
-* elements per column.
-*
-* The factorization is obtained by Gaussian elimination with partial
-* pivoting and implicit row scaling.
-*
-* The parameter LAMBDA is included in the routine so that SLAGTF may
-* be used, in conjunction with SLAGTS, to obtain eigenvectors of T by
-* inverse iteration.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAGTF factorizes the matrix (T - lambda*I), where T is an n by n
+*> tridiagonal matrix and lambda is a scalar, as
+*>
+*> T - lambda*I = PLU,
+*>
+*> where P is a permutation matrix, L is a unit lower tridiagonal matrix
+*> with at most one non-zero sub-diagonal elements per column and U is
+*> an upper triangular matrix with at most two non-zero super-diagonal
+*> elements per column.
+*>
+*> The factorization is obtained by Gaussian elimination with partial
+*> pivoting and implicit row scaling.
+*>
+*> The parameter LAMBDA is included in the routine so that SLAGTF may
+*> be used, in conjunction with SLAGTS, to obtain eigenvectors of T by
+*> inverse iteration.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix T.
-*
-* A (input/output) REAL array, dimension (N)
-* On entry, A must contain the diagonal elements of T.
-*
-* On exit, A is overwritten by the n diagonal elements of the
-* upper triangular matrix U of the factorization of T.
-*
-* LAMBDA (input) REAL
-* On entry, the scalar lambda.
-*
-* B (input/output) REAL array, dimension (N-1)
-* On entry, B must contain the (n-1) super-diagonal elements of
-* T.
-*
-* On exit, B is overwritten by the (n-1) super-diagonal
-* elements of the matrix U of the factorization of T.
-*
-* C (input/output) REAL array, dimension (N-1)
-* On entry, C must contain the (n-1) sub-diagonal elements of
-* T.
-*
-* On exit, C is overwritten by the (n-1) sub-diagonal elements
-* of the matrix L of the factorization of T.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (N)
+*> On entry, A must contain the diagonal elements of T.
+*> \endverbatim
+*> \verbatim
+*> On exit, A is overwritten by the n diagonal elements of the
+*> upper triangular matrix U of the factorization of T.
+*> \endverbatim
+*>
+*> \param[in] LAMBDA
+*> \verbatim
+*> LAMBDA is REAL
+*> On entry, the scalar lambda.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (N-1)
+*> On entry, B must contain the (n-1) super-diagonal elements of
+*> T.
+*> \endverbatim
+*> \verbatim
+*> On exit, B is overwritten by the (n-1) super-diagonal
+*> elements of the matrix U of the factorization of T.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (N-1)
+*> On entry, C must contain the (n-1) sub-diagonal elements of
+*> T.
+*> \endverbatim
+*> \verbatim
+*> On exit, C is overwritten by the (n-1) sub-diagonal elements
+*> of the matrix L of the factorization of T.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> On entry, a relative tolerance used to indicate whether or
+*> not the matrix (T - lambda*I) is nearly singular. TOL should
+*> normally be chose as approximately the largest relative error
+*> in the elements of T. For example, if the elements of T are
+*> correct to about 4 significant figures, then TOL should be
+*> set to about 5*10**(-4). If TOL is supplied as less than eps,
+*> where eps is the relative machine precision, then the value
+*> eps is used in place of TOL.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (N-2)
+*> On exit, D is overwritten by the (n-2) second super-diagonal
+*> elements of the matrix U of the factorization of T.
+*> \endverbatim
+*>
+*> \param[out] IN
+*> \verbatim
+*> IN is INTEGER array, dimension (N)
+*> On exit, IN contains details of the permutation matrix P. If
+*> an interchange occurred at the kth step of the elimination,
+*> then IN(k) = 1, otherwise IN(k) = 0. The element IN(n)
+*> returns the smallest positive integer j such that
+*> \endverbatim
+*> \verbatim
+*> abs( u(j,j) ).le. norm( (T - lambda*I)(j) )*TOL,
+*> \endverbatim
+*> \verbatim
+*> where norm( A(j) ) denotes the sum of the absolute values of
+*> the jth row of the matrix A. If no such j exists then IN(n)
+*> is returned as zero. If IN(n) is returned as positive, then a
+*> diagonal element of U is small, indicating that
+*> (T - lambda*I) is singular or nearly singular,
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> .lt. 0: if INFO = -k, the kth argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TOL (input) REAL
-* On entry, a relative tolerance used to indicate whether or
-* not the matrix (T - lambda*I) is nearly singular. TOL should
-* normally be chose as approximately the largest relative error
-* in the elements of T. For example, if the elements of T are
-* correct to about 4 significant figures, then TOL should be
-* set to about 5*10**(-4). If TOL is supplied as less than eps,
-* where eps is the relative machine precision, then the value
-* eps is used in place of TOL.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (output) REAL array, dimension (N-2)
-* On exit, D is overwritten by the (n-2) second super-diagonal
-* elements of the matrix U of the factorization of T.
+*> \date November 2011
*
-* IN (output) INTEGER array, dimension (N)
-* On exit, IN contains details of the permutation matrix P. If
-* an interchange occurred at the kth step of the elimination,
-* then IN(k) = 1, otherwise IN(k) = 0. The element IN(n)
-* returns the smallest positive integer j such that
+*> \ingroup auxOTHERcomputational
*
-* abs( u(j,j) ).le. norm( (T - lambda*I)(j) )*TOL,
+* =====================================================================
+ SUBROUTINE SLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
*
-* where norm( A(j) ) denotes the sum of the absolute values of
-* the jth row of the matrix A. If no such j exists then IN(n)
-* is returned as zero. If IN(n) is returned as positive, then a
-* diagonal element of U is small, indicating that
-* (T - lambda*I) is singular or nearly singular,
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* .lt. 0: if INFO = -k, the kth argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ REAL LAMBDA, TOL
+* ..
+* .. Array Arguments ..
+ INTEGER IN( * )
+ REAL A( * ), B( * ), C( * ), D( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slagtm.f b/SRC/slagtm.f
index 80e9f80b..3517abe5 100644
--- a/SRC/slagtm.f
+++ b/SRC/slagtm.f
@@ -1,10 +1,145 @@
+*> \brief \b SLAGTM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
+* B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, N, NRHS
+* REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAGTM performs a matrix-vector product of the form
+*>
+*> B := alpha * A * X + beta * B
+*>
+*> where A is a tridiagonal matrix of order N, B and X are N by NRHS
+*> matrices, and alpha and beta are real scalars, each of which may be
+*> 0., 1., or -1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': No transpose, B := alpha * A * X + beta * B
+*> = 'T': Transpose, B := alpha * A'* X + beta * B
+*> = 'C': Conjugate transpose = Transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) super-diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The N by NRHS matrix X.
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(N,1).
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> The scalar beta. BETA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix B.
+*> On exit, B is overwritten by the matrix expression
+*> B := alpha * A * X + beta * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(N,1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
$ B, LDB )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -16,63 +151,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAGTM performs a matrix-vector product of the form
-*
-* B := alpha * A * X + beta * B
-*
-* where A is a tridiagonal matrix of order N, B and X are N by NRHS
-* matrices, and alpha and beta are real scalars, each of which may be
-* 0., 1., or -1.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': No transpose, B := alpha * A * X + beta * B
-* = 'T': Transpose, B := alpha * A'* X + beta * B
-* = 'C': Conjugate transpose = Transpose
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B.
-*
-* ALPHA (input) REAL
-* The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) sub-diagonal elements of T.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of T.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) super-diagonal elements of T.
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The N by NRHS matrix X.
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(N,1).
-*
-* BETA (input) REAL
-* The scalar beta. BETA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 1.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix B.
-* On exit, B is overwritten by the matrix expression
-* B := alpha * A * X + beta * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(N,1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slagts.f b/SRC/slagts.f
index 35461528..b8b29743 100644
--- a/SRC/slagts.f
+++ b/SRC/slagts.f
@@ -1,9 +1,163 @@
+*> \brief \b SLAGTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAGTS( JOB, N, A, B, C, D, IN, Y, TOL, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, JOB, N
+* REAL TOL
+* ..
+* .. Array Arguments ..
+* INTEGER IN( * )
+* REAL A( * ), B( * ), C( * ), D( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAGTS may be used to solve one of the systems of equations
+*>
+*> (T - lambda*I)*x = y or (T - lambda*I)**T*x = y,
+*>
+*> where T is an n by n tridiagonal matrix, for x, following the
+*> factorization of (T - lambda*I) as
+*>
+*> (T - lambda*I) = P*L*U ,
+*>
+*> by routine SLAGTF. The choice of equation to be solved is
+*> controlled by the argument JOB, and in each case there is an option
+*> to perturb zero or very small diagonal elements of U, this option
+*> being intended for use in applications such as inverse iteration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is INTEGER
+*> Specifies the job to be performed by SLAGTS as follows:
+*> = 1: The equations (T - lambda*I)x = y are to be solved,
+*> but diagonal elements of U are not to be perturbed.
+*> = -1: The equations (T - lambda*I)x = y are to be solved
+*> and, if overflow would otherwise occur, the diagonal
+*> elements of U are to be perturbed. See argument TOL
+*> below.
+*> = 2: The equations (T - lambda*I)**Tx = y are to be solved,
+*> but diagonal elements of U are not to be perturbed.
+*> = -2: The equations (T - lambda*I)**Tx = y are to be solved
+*> and, if overflow would otherwise occur, the diagonal
+*> elements of U are to be perturbed. See argument TOL
+*> below.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N)
+*> On entry, A must contain the diagonal elements of U as
+*> returned from SLAGTF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (N-1)
+*> On entry, B must contain the first super-diagonal elements of
+*> U as returned from SLAGTF.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N-1)
+*> On entry, C must contain the sub-diagonal elements of L as
+*> returned from SLAGTF.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N-2)
+*> On entry, D must contain the second super-diagonal elements
+*> of U as returned from SLAGTF.
+*> \endverbatim
+*>
+*> \param[in] IN
+*> \verbatim
+*> IN is INTEGER array, dimension (N)
+*> On entry, IN must contain details of the matrix P as returned
+*> from SLAGTF.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array, dimension (N)
+*> On entry, the right hand side vector y.
+*> On exit, Y is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[in,out] TOL
+*> \verbatim
+*> TOL is REAL
+*> On entry, with JOB .lt. 0, TOL should be the minimum
+*> perturbation to be made to very small diagonal elements of U.
+*> TOL should normally be chosen as about eps*norm(U), where eps
+*> is the relative machine precision, but if TOL is supplied as
+*> non-positive, then it is reset to eps*max( abs( u(i,j) ) ).
+*> If JOB .gt. 0 then TOL is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, TOL is changed as described above, only if TOL is
+*> non-positive on entry. Otherwise TOL is unchanged.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> .lt. 0: if INFO = -i, the i-th argument had an illegal value
+*> .gt. 0: overflow would occur when computing the INFO(th)
+*> element of the solution vector x. This can only occur
+*> when JOB is supplied as positive and either means
+*> that a diagonal element of U is very small, or that
+*> the elements of the right-hand side vector y are very
+*> large.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAGTS( JOB, N, A, B, C, D, IN, Y, TOL, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, JOB, N
@@ -14,89 +168,6 @@
REAL A( * ), B( * ), C( * ), D( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAGTS may be used to solve one of the systems of equations
-*
-* (T - lambda*I)*x = y or (T - lambda*I)**T*x = y,
-*
-* where T is an n by n tridiagonal matrix, for x, following the
-* factorization of (T - lambda*I) as
-*
-* (T - lambda*I) = P*L*U ,
-*
-* by routine SLAGTF. The choice of equation to be solved is
-* controlled by the argument JOB, and in each case there is an option
-* to perturb zero or very small diagonal elements of U, this option
-* being intended for use in applications such as inverse iteration.
-*
-* Arguments
-* =========
-*
-* JOB (input) INTEGER
-* Specifies the job to be performed by SLAGTS as follows:
-* = 1: The equations (T - lambda*I)x = y are to be solved,
-* but diagonal elements of U are not to be perturbed.
-* = -1: The equations (T - lambda*I)x = y are to be solved
-* and, if overflow would otherwise occur, the diagonal
-* elements of U are to be perturbed. See argument TOL
-* below.
-* = 2: The equations (T - lambda*I)**Tx = y are to be solved,
-* but diagonal elements of U are not to be perturbed.
-* = -2: The equations (T - lambda*I)**Tx = y are to be solved
-* and, if overflow would otherwise occur, the diagonal
-* elements of U are to be perturbed. See argument TOL
-* below.
-*
-* N (input) INTEGER
-* The order of the matrix T.
-*
-* A (input) REAL array, dimension (N)
-* On entry, A must contain the diagonal elements of U as
-* returned from SLAGTF.
-*
-* B (input) REAL array, dimension (N-1)
-* On entry, B must contain the first super-diagonal elements of
-* U as returned from SLAGTF.
-*
-* C (input) REAL array, dimension (N-1)
-* On entry, C must contain the sub-diagonal elements of L as
-* returned from SLAGTF.
-*
-* D (input) REAL array, dimension (N-2)
-* On entry, D must contain the second super-diagonal elements
-* of U as returned from SLAGTF.
-*
-* IN (input) INTEGER array, dimension (N)
-* On entry, IN must contain details of the matrix P as returned
-* from SLAGTF.
-*
-* Y (input/output) REAL array, dimension (N)
-* On entry, the right hand side vector y.
-* On exit, Y is overwritten by the solution vector x.
-*
-* TOL (input/output) REAL
-* On entry, with JOB .lt. 0, TOL should be the minimum
-* perturbation to be made to very small diagonal elements of U.
-* TOL should normally be chosen as about eps*norm(U), where eps
-* is the relative machine precision, but if TOL is supplied as
-* non-positive, then it is reset to eps*max( abs( u(i,j) ) ).
-* If JOB .gt. 0 then TOL is not referenced.
-*
-* On exit, TOL is changed as described above, only if TOL is
-* non-positive on entry. Otherwise TOL is unchanged.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* .lt. 0: if INFO = -i, the i-th argument had an illegal value
-* .gt. 0: overflow would occur when computing the INFO(th)
-* element of the solution vector x. This can only occur
-* when JOB is supplied as positive and either means
-* that a diagonal element of U is very small, or that
-* the elements of the right-hand side vector y are very
-* large.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slagv2.f b/SRC/slagv2.f
index b58f27e0..8df4eb08 100644
--- a/SRC/slagv2.f
+++ b/SRC/slagv2.f
@@ -1,94 +1,173 @@
- SUBROUTINE SLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL,
- $ CSR, SNR )
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB
- REAL CSL, CSR, SNL, SNR
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), ALPHAI( 2 ), ALPHAR( 2 ),
- $ B( LDB, * ), BETA( 2 )
-* ..
-*
+*> \brief \b SLAGV2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL,
+* CSR, SNR )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB
+* REAL CSL, CSR, SNL, SNR
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), ALPHAI( 2 ), ALPHAR( 2 ),
+* $ B( LDB, * ), BETA( 2 )
+* ..
+*
* Purpose
* =======
*
-* SLAGV2 computes the Generalized Schur factorization of a real 2-by-2
-* matrix pencil (A,B) where B is upper triangular. This routine
-* computes orthogonal (rotation) matrices given by CSL, SNL and CSR,
-* SNR such that
-*
-* 1) if the pencil (A,B) has two real eigenvalues (include 0/0 or 1/0
-* types), then
-*
-* [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
-* [ 0 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
-*
-* [ b11 b12 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
-* [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ],
-*
-* 2) if the pencil (A,B) has a pair of complex conjugate eigenvalues,
-* then
-*
-* [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
-* [ a21 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
-*
-* [ b11 0 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
-* [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ]
-*
-* where b11 >= b22 > 0.
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAGV2 computes the Generalized Schur factorization of a real 2-by-2
+*> matrix pencil (A,B) where B is upper triangular. This routine
+*> computes orthogonal (rotation) matrices given by CSL, SNL and CSR,
+*> SNR such that
+*>
+*> 1) if the pencil (A,B) has two real eigenvalues (include 0/0 or 1/0
+*> types), then
+*>
+*> [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
+*> [ 0 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
+*>
+*> [ b11 b12 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
+*> [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ],
+*>
+*> 2) if the pencil (A,B) has a pair of complex conjugate eigenvalues,
+*> then
+*>
+*> [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ]
+*> [ a21 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ]
+*>
+*> [ b11 0 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ]
+*> [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ]
+*>
+*> where b11 >= b22 > 0.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input/output) REAL array, dimension (LDA, 2)
-* On entry, the 2 x 2 matrix A.
-* On exit, A is overwritten by the ``A-part'' of the
-* generalized Schur form.
-*
-* LDA (input) INTEGER
-* THe leading dimension of the array A. LDA >= 2.
-*
-* B (input/output) REAL array, dimension (LDB, 2)
-* On entry, the upper triangular 2 x 2 matrix B.
-* On exit, B is overwritten by the ``B-part'' of the
-* generalized Schur form.
-*
-* LDB (input) INTEGER
-* THe leading dimension of the array B. LDB >= 2.
-*
-* ALPHAR (output) REAL array, dimension (2)
-*
-* ALPHAI (output) REAL array, dimension (2)
-*
-* BETA (output) REAL array, dimension (2)
-* (ALPHAR(k)+i*ALPHAI(k))/BETA(k) are the eigenvalues of the
-* pencil (A,B), k=1,2, i = sqrt(-1). Note that BETA(k) may
-* be zero.
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, 2)
+*> On entry, the 2 x 2 matrix A.
+*> On exit, A is overwritten by the ``A-part'' of the
+*> generalized Schur form.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> THe leading dimension of the array A. LDA >= 2.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, 2)
+*> On entry, the upper triangular 2 x 2 matrix B.
+*> On exit, B is overwritten by the ``B-part'' of the
+*> generalized Schur form.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> THe leading dimension of the array B. LDB >= 2.
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (2)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (2)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (2)
+*> (ALPHAR(k)+i*ALPHAI(k))/BETA(k) are the eigenvalues of the
+*> pencil (A,B), k=1,2, i = sqrt(-1). Note that BETA(k) may
+*> be zero.
+*> \endverbatim
+*>
+*> \param[out] CSL
+*> \verbatim
+*> CSL is REAL
+*> The cosine of the left rotation matrix.
+*> \endverbatim
+*>
+*> \param[out] SNL
+*> \verbatim
+*> SNL is REAL
+*> The sine of the left rotation matrix.
+*> \endverbatim
+*>
+*> \param[out] CSR
+*> \verbatim
+*> CSR is REAL
+*> The cosine of the right rotation matrix.
+*> \endverbatim
+*>
+*> \param[out] SNR
+*> \verbatim
+*> SNR is REAL
+*> The sine of the right rotation matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CSL (output) REAL
-* The cosine of the left rotation matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SNL (output) REAL
-* The sine of the left rotation matrix.
+*> \date November 2011
*
-* CSR (output) REAL
-* The cosine of the right rotation matrix.
+*> \ingroup realOTHERauxiliary
*
-* SNR (output) REAL
-* The sine of the right rotation matrix.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL,
+ $ CSR, SNR )
*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB
+ REAL CSL, CSR, SNL, SNR
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), ALPHAI( 2 ), ALPHAR( 2 ),
+ $ B( LDB, * ), BETA( 2 )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slahqr.f b/SRC/slahqr.f
index f2517d7c..eb0286a6 100644
--- a/SRC/slahqr.f
+++ b/SRC/slahqr.f
@@ -1,9 +1,215 @@
+*> \brief \b SLAHQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+* ILOZ, IHIZ, Z, LDZ, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* REAL H( LDH, * ), WI( * ), WR( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SLAHQR is an auxiliary routine called by SHSEQR to update the
+*> eigenvalues and Schur decomposition already computed by SHSEQR, by
+*> dealing with the Hessenberg submatrix in rows and columns ILO to
+*> IHI.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper quasi-triangular in
+*> rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless
+*> ILO = 1). SLAHQR works primarily with the Hessenberg
+*> submatrix in rows and columns ILO to IHI, but applies
+*> transformations to all of H if WANTT is .TRUE..
+*> 1 <= ILO <= max(1,IHI); IHI <= N.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO is zero and if WANTT is .TRUE., H is upper
+*> quasi-triangular in rows and columns ILO:IHI, with any
+*> 2-by-2 diagonal blocks in standard form. If INFO is zero
+*> and WANTT is .FALSE., the contents of H are unspecified on
+*> exit. The output state of H if INFO is nonzero is given
+*> below under the description of INFO.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> The real and imaginary parts, respectively, of the computed
+*> eigenvalues ILO to IHI are stored in the corresponding
+*> elements of WR and WI. If two eigenvalues are computed as a
+*> complex conjugate pair, they are stored in consecutive
+*> elements of WR and WI, say the i-th and (i+1)th, with
+*> WI(i) > 0 and WI(i+1) < 0. If WANTT is .TRUE., the
+*> eigenvalues are stored in the same order as on the diagonal
+*> of the Schur form returned in H, with WR(i) = H(i,i), and, if
+*> H(i:i+1,i:i+1) is a 2-by-2 diagonal block,
+*> WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE..
+*> 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,N)
+*> If WANTZ is .TRUE., on entry Z must contain the current
+*> matrix Z of transformations accumulated by SHSEQR, and on
+*> exit Z has been updated; transformations are applied only to
+*> the submatrix Z(ILOZ:IHIZ,ILO:IHI).
+*> If WANTZ is .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: If INFO = i, SLAHQR failed to compute all the
+*> eigenvalues ILO to IHI in a total of 30 iterations
+*> per eigenvalue; elements i+1:ihi of WR and WI
+*> contain those eigenvalues which have been
+*> successfully computed.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the
+*> eigenvalues of the upper Hessenberg matrix rows
+*> and columns ILO thorugh INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> (*) (initial value of H)*U = U*(final value of H)
+*> where U is an orthognal matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> (final value of Z) = (initial value of Z)*U
+*> where U is the orthogonal matrix in (*)
+*> (regardless of the value of WANTT.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 02-96 Based on modifications by
+*> David Day, Sandia National Laboratory, USA
+*>
+*> 12-04 Further modifications by
+*> Ralph Byers, University of Kansas, USA
+*> This is a modified version of SLAHQR from LAPACK version 3.0.
+*> It is (1) more robust against overflow and underflow and
+*> (2) adopts the more conservative Ahues & Tisseur stopping
+*> criterion (LAWN 122, 1997).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
$ ILOZ, IHIZ, Z, LDZ, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
@@ -13,119 +219,6 @@
REAL H( LDH, * ), WI( * ), WR( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAHQR is an auxiliary routine called by SHSEQR to update the
-* eigenvalues and Schur decomposition already computed by SHSEQR, by
-* dealing with the Hessenberg submatrix in rows and columns ILO to
-* IHI.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper quasi-triangular in
-* rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless
-* ILO = 1). SLAHQR works primarily with the Hessenberg
-* submatrix in rows and columns ILO to IHI, but applies
-* transformations to all of H if WANTT is .TRUE..
-* 1 <= ILO <= max(1,IHI); IHI <= N.
-*
-* H (input/output) REAL array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO is zero and if WANTT is .TRUE., H is upper
-* quasi-triangular in rows and columns ILO:IHI, with any
-* 2-by-2 diagonal blocks in standard form. If INFO is zero
-* and WANTT is .FALSE., the contents of H are unspecified on
-* exit. The output state of H if INFO is nonzero is given
-* below under the description of INFO.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* WR (output) REAL array, dimension (N)
-*
-* WI (output) REAL array, dimension (N)
-* The real and imaginary parts, respectively, of the computed
-* eigenvalues ILO to IHI are stored in the corresponding
-* elements of WR and WI. If two eigenvalues are computed as a
-* complex conjugate pair, they are stored in consecutive
-* elements of WR and WI, say the i-th and (i+1)th, with
-* WI(i) > 0 and WI(i+1) < 0. If WANTT is .TRUE., the
-* eigenvalues are stored in the same order as on the diagonal
-* of the Schur form returned in H, with WR(i) = H(i,i), and, if
-* H(i:i+1,i:i+1) is a 2-by-2 diagonal block,
-* WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE..
-* 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
-*
-* Z (input/output) REAL array, dimension (LDZ,N)
-* If WANTZ is .TRUE., on entry Z must contain the current
-* matrix Z of transformations accumulated by SHSEQR, and on
-* exit Z has been updated; transformations are applied only to
-* the submatrix Z(ILOZ:IHIZ,ILO:IHI).
-* If WANTZ is .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: If INFO = i, SLAHQR failed to compute all the
-* eigenvalues ILO to IHI in a total of 30 iterations
-* per eigenvalue; elements i+1:ihi of WR and WI
-* contain those eigenvalues which have been
-* successfully computed.
-*
-* If INFO .GT. 0 and WANTT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the
-* eigenvalues of the upper Hessenberg matrix rows
-* and columns ILO thorugh INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-* (*) (initial value of H)*U = U*(final value of H)
-* where U is an orthognal matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-* (final value of Z) = (initial value of Z)*U
-* where U is the orthogonal matrix in (*)
-* (regardless of the value of WANTT.)
-*
-* Further Details
-* ===============
-*
-* 02-96 Based on modifications by
-* David Day, Sandia National Laboratory, USA
-*
-* 12-04 Further modifications by
-* Ralph Byers, University of Kansas, USA
-* This is a modified version of SLAHQR from LAPACK version 3.0.
-* It is (1) more robust against overflow and underflow and
-* (2) adopts the more conservative Ahues & Tisseur stopping
-* criterion (LAWN 122, 1997).
-*
* =========================================================
*
* .. Parameters ..
diff --git a/SRC/slahr2.f b/SRC/slahr2.f
index d54087cc..f2341eb0 100644
--- a/SRC/slahr2.f
+++ b/SRC/slahr2.f
@@ -1,118 +1,164 @@
- SUBROUTINE SLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*> \brief \b SLAHR2
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LDT, LDY, N, NB
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), T( LDT, NB ), TAU( NB ),
- $ Y( LDY, NB )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), T( LDT, NB ), TAU( NB ),
+* $ Y( LDY, NB )
+* ..
+*
* Purpose
* =======
*
-* SLAHR2 reduces the first NB columns of A real general n-BY-(n-k+1)
-* matrix A so that elements below the k-th subdiagonal are zero. The
-* reduction is performed by an orthogonal similarity transformation
-* Q**T * A * Q. The routine returns the matrices V and T which determine
-* Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
-*
-* This is an auxiliary routine called by SGEHRD.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAHR2 reduces the first NB columns of A real general n-BY-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by an orthogonal similarity transformation
+*> Q**T * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
+*>
+*> This is an auxiliary routine called by SGEHRD.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* K (input) INTEGER
-* The offset for the reduction. Elements below the k-th
-* subdiagonal in the first NB columns are reduced to zero.
-* K < N.
-*
-* NB (input) INTEGER
-* The number of columns to be reduced.
-*
-* A (input/output) REAL array, dimension (LDA,N-K+1)
-* On entry, the n-by-(n-k+1) general matrix A.
-* On exit, the elements on and above the k-th subdiagonal in
-* the first NB columns are overwritten with the corresponding
-* elements of the reduced matrix; the elements below the k-th
-* subdiagonal, with the array TAU, represent the matrix Q as a
-* product of elementary reflectors. The other columns of A are
-* unchanged. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) REAL array, dimension (NB)
-* The scalar factors of the elementary reflectors. See Further
-* Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The offset for the reduction. Elements below the k-th
+*> subdiagonal in the first NB columns are reduced to zero.
+*> K < N.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) REAL array, dimension (LDT,NB)
-* The upper triangular matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* Y (output) REAL array, dimension (LDY,NB)
-* The n-by-nb matrix Y.
+*> \ingroup realOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= N.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* unchanged. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) REAL array, dimension (NB)
+*> The scalar factors of the elementary reflectors. See Further
+*> Details.
+*>
+*> T (output) REAL array, dimension (LDT,NB)
+*> The upper triangular matrix T.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> Y (output) REAL array, dimension (LDY,NB)
+*> The n-by-nb matrix Y.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= N.
+*>
+*>
+*> The matrix Q is represented as a product of nb elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*> A(i+k+1:n,i), and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*> V which is needed, with T and Y, to apply the transformation to the
+*> unreduced part of the matrix, using an update of the form:
+*> A := (I - V*T*V**T) * (A - Y*V**T).
+*>
+*> The contents of A on exit are illustrated by the following example
+*> with n = 7, k = 3 and nb = 2:
+*>
+*> ( a a a a a )
+*> ( a a a a a )
+*> ( a a a a a )
+*> ( h h a a a )
+*> ( v1 h a a a )
+*> ( v1 v2 a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> This subroutine is a slight modification of LAPACK-3.0's DLAHRD
+*> incorporating improvements proposed by Quintana-Orti and Van de
+*> Gejin. Note that the entries of A(1:K,2:NB) differ from those
+*> returned by the original LAPACK-3.0's DLAHRD routine. (This
+*> subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
+*>
+*> References
+*> ==========
+*>
+*> Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
+*> performance of reduction to Hessenberg form," ACM Transactions on
+*> Mathematical Software, 32(2):180-194, June 2006.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
*
-* The matrix Q is represented as a product of nb elementary reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-* A(i+k+1:n,i), and tau in TAU(i).
-*
-* The elements of the vectors v together form the (n-k+1)-by-nb matrix
-* V which is needed, with T and Y, to apply the transformation to the
-* unreduced part of the matrix, using an update of the form:
-* A := (I - V*T*V**T) * (A - Y*V**T).
-*
-* The contents of A on exit are illustrated by the following example
-* with n = 7, k = 3 and nb = 2:
-*
-* ( a a a a a )
-* ( a a a a a )
-* ( a a a a a )
-* ( h h a a a )
-* ( v1 h a a a )
-* ( v1 v2 a a a )
-* ( v1 v2 a a a )
-*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
-*
-* This subroutine is a slight modification of LAPACK-3.0's DLAHRD
-* incorporating improvements proposed by Quintana-Orti and Van de
-* Gejin. Note that the entries of A(1:K,2:NB) differ from those
-* returned by the original LAPACK-3.0's DLAHRD routine. (This
-* subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
-*
-* References
-* ==========
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
-* performance of reduction to Hessenberg form," ACM Transactions on
-* Mathematical Software, 32(2):180-194, June 2006.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), T( LDT, NB ), TAU( NB ),
+ $ Y( LDY, NB )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slahrd.f b/SRC/slahrd.f
index 09bf6eba..2e06fde9 100644
--- a/SRC/slahrd.f
+++ b/SRC/slahrd.f
@@ -1,106 +1,152 @@
- SUBROUTINE SLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LDT, LDY, N, NB
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), T( LDT, NB ), TAU( NB ),
- $ Y( LDY, NB )
-* ..
-*
+*> \brief \b SLAHRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), T( LDT, NB ), TAU( NB ),
+* $ Y( LDY, NB )
+* ..
+*
* Purpose
* =======
*
-* SLAHRD reduces the first NB columns of a real general n-by-(n-k+1)
-* matrix A so that elements below the k-th subdiagonal are zero. The
-* reduction is performed by an orthogonal similarity transformation
-* Q**T * A * Q. The routine returns the matrices V and T which determine
-* Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
-*
-* This is an OBSOLETE auxiliary routine.
-* This routine will be 'deprecated' in a future release.
-* Please use the new routine SLAHR2 instead.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAHRD reduces the first NB columns of a real general n-by-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by an orthogonal similarity transformation
+*> Q**T * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
+*>
+*> This is an OBSOLETE auxiliary routine.
+*> This routine will be 'deprecated' in a future release.
+*> Please use the new routine SLAHR2 instead.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* K (input) INTEGER
-* The offset for the reduction. Elements below the k-th
-* subdiagonal in the first NB columns are reduced to zero.
-*
-* NB (input) INTEGER
-* The number of columns to be reduced.
-*
-* A (input/output) REAL array, dimension (LDA,N-K+1)
-* On entry, the n-by-(n-k+1) general matrix A.
-* On exit, the elements on and above the k-th subdiagonal in
-* the first NB columns are overwritten with the corresponding
-* elements of the reduced matrix; the elements below the k-th
-* subdiagonal, with the array TAU, represent the matrix Q as a
-* product of elementary reflectors. The other columns of A are
-* unchanged. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) REAL array, dimension (NB)
-* The scalar factors of the elementary reflectors. See Further
-* Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The offset for the reduction. Elements below the k-th
+*> subdiagonal in the first NB columns are reduced to zero.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) REAL array, dimension (LDT,NB)
-* The upper triangular matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* Y (output) REAL array, dimension (LDY,NB)
-* The n-by-nb matrix Y.
+*> \ingroup realOTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= N.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* unchanged. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) REAL array, dimension (NB)
+*> The scalar factors of the elementary reflectors. See Further
+*> Details.
+*>
+*> T (output) REAL array, dimension (LDT,NB)
+*> The upper triangular matrix T.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> Y (output) REAL array, dimension (LDY,NB)
+*> The n-by-nb matrix Y.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= N.
+*>
+*>
+*> The matrix Q is represented as a product of nb elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*> A(i+k+1:n,i), and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*> V which is needed, with T and Y, to apply the transformation to the
+*> unreduced part of the matrix, using an update of the form:
+*> A := (I - V*T*V**T) * (A - Y*V**T).
+*>
+*> The contents of A on exit are illustrated by the following example
+*> with n = 7, k = 3 and nb = 2:
+*>
+*> ( a h a a a )
+*> ( a h a a a )
+*> ( a h a a a )
+*> ( h h a a a )
+*> ( v1 h a a a )
+*> ( v1 v2 a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
*
-* The matrix Q is represented as a product of nb elementary reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-* A(i+k+1:n,i), and tau in TAU(i).
-*
-* The elements of the vectors v together form the (n-k+1)-by-nb matrix
-* V which is needed, with T and Y, to apply the transformation to the
-* unreduced part of the matrix, using an update of the form:
-* A := (I - V*T*V**T) * (A - Y*V**T).
-*
-* The contents of A on exit are illustrated by the following example
-* with n = 7, k = 3 and nb = 2:
-*
-* ( a h a a a )
-* ( a h a a a )
-* ( a h a a a )
-* ( h h a a a )
-* ( v1 h a a a )
-* ( v1 v2 a a a )
-* ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), T( LDT, NB ), TAU( NB ),
+ $ Y( LDY, NB )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaic1.f b/SRC/slaic1.f
index fdd54a91..7097a811 100644
--- a/SRC/slaic1.f
+++ b/SRC/slaic1.f
@@ -1,77 +1,143 @@
- SUBROUTINE SLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER J, JOB
- REAL C, GAMMA, S, SEST, SESTPR
-* ..
-* .. Array Arguments ..
- REAL W( J ), X( J )
-* ..
-*
+*> \brief \b SLAIC1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
+*
+* .. Scalar Arguments ..
+* INTEGER J, JOB
+* REAL C, GAMMA, S, SEST, SESTPR
+* ..
+* .. Array Arguments ..
+* REAL W( J ), X( J )
+* ..
+*
* Purpose
* =======
*
-* SLAIC1 applies one step of incremental condition estimation in
-* its simplest version:
-*
-* Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j
-* lower triangular matrix L, such that
-* twonorm(L*x) = sest
-* Then SLAIC1 computes sestpr, s, c such that
-* the vector
-* [ s*x ]
-* xhat = [ c ]
-* is an approximate singular vector of
-* [ L 0 ]
-* Lhat = [ w**T gamma ]
-* in the sense that
-* twonorm(Lhat*xhat) = sestpr.
-*
-* Depending on JOB, an estimate for the largest or smallest singular
-* value is computed.
-*
-* Note that [s c]**T and sestpr**2 is an eigenpair of the system
-*
-* diag(sest*sest, 0) + [alpha gamma] * [ alpha ]
-* [ gamma ]
-*
-* where alpha = x**T*w.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAIC1 applies one step of incremental condition estimation in
+*> its simplest version:
+*>
+*> Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j
+*> lower triangular matrix L, such that
+*> twonorm(L*x) = sest
+*> Then SLAIC1 computes sestpr, s, c such that
+*> the vector
+*> [ s*x ]
+*> xhat = [ c ]
+*> is an approximate singular vector of
+*> [ L 0 ]
+*> Lhat = [ w**T gamma ]
+*> in the sense that
+*> twonorm(Lhat*xhat) = sestpr.
+*>
+*> Depending on JOB, an estimate for the largest or smallest singular
+*> value is computed.
+*>
+*> Note that [s c]**T and sestpr**2 is an eigenpair of the system
+*>
+*> diag(sest*sest, 0) + [alpha gamma] * [ alpha ]
+*> [ gamma ]
+*>
+*> where alpha = x**T*w.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) INTEGER
-* = 1: an estimate for the largest singular value is computed.
-* = 2: an estimate for the smallest singular value is computed.
-*
-* J (input) INTEGER
-* Length of X and W
-*
-* X (input) REAL array, dimension (J)
-* The j-vector x.
+*> \param[in] JOB
+*> \verbatim
+*> JOB is INTEGER
+*> = 1: an estimate for the largest singular value is computed.
+*> = 2: an estimate for the smallest singular value is computed.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Length of X and W
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (J)
+*> The j-vector x.
+*> \endverbatim
+*>
+*> \param[in] SEST
+*> \verbatim
+*> SEST is REAL
+*> Estimated singular value of j by j matrix L
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is REAL array, dimension (J)
+*> The j-vector w.
+*> \endverbatim
+*>
+*> \param[in] GAMMA
+*> \verbatim
+*> GAMMA is REAL
+*> The diagonal element gamma.
+*> \endverbatim
+*>
+*> \param[out] SESTPR
+*> \verbatim
+*> SESTPR is REAL
+*> Estimated singular value of (j+1) by (j+1) matrix Lhat.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL
+*> Sine needed in forming xhat.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL
+*> Cosine needed in forming xhat.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SEST (input) REAL
-* Estimated singular value of j by j matrix L
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* W (input) REAL array, dimension (J)
-* The j-vector w.
+*> \date November 2011
*
-* GAMMA (input) REAL
-* The diagonal element gamma.
+*> \ingroup realOTHERauxiliary
*
-* SESTPR (output) REAL
-* Estimated singular value of (j+1) by (j+1) matrix Lhat.
+* =====================================================================
+ SUBROUTINE SLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
*
-* S (output) REAL
-* Sine needed in forming xhat.
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* C (output) REAL
-* Cosine needed in forming xhat.
+* .. Scalar Arguments ..
+ INTEGER J, JOB
+ REAL C, GAMMA, S, SEST, SESTPR
+* ..
+* .. Array Arguments ..
+ REAL W( J ), X( J )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaisnan.f b/SRC/slaisnan.f
index 49d309fc..1f0c36c8 100644
--- a/SRC/slaisnan.f
+++ b/SRC/slaisnan.f
@@ -1,38 +1,79 @@
- LOGICAL FUNCTION SLAISNAN( SIN1, SIN2 )
+*> \brief \b SLAISNAN
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL SIN1, SIN2
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION SLAISNAN( SIN1, SIN2 )
+*
+* .. Scalar Arguments ..
+* REAL SIN1, SIN2
+* ..
+*
* Purpose
* =======
*
-* This routine is not for general use. It exists solely to avoid
-* over-optimization in SISNAN.
-*
-* SLAISNAN checks for NaNs by comparing its two arguments for
-* inequality. NaN is the only floating-point value where NaN != NaN
-* returns .TRUE. To check for NaNs, pass the same variable as both
-* arguments.
-*
-* A compiler must assume that the two arguments are
-* not the same variable, and the test will not be optimized away.
-* Interprocedural or whole-program optimization may delete this
-* test. The ISNAN functions will be replaced by the correct
-* Fortran 03 intrinsic once the intrinsic is widely available.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is not for general use. It exists solely to avoid
+*> over-optimization in SISNAN.
+*>
+*> SLAISNAN checks for NaNs by comparing its two arguments for
+*> inequality. NaN is the only floating-point value where NaN != NaN
+*> returns .TRUE. To check for NaNs, pass the same variable as both
+*> arguments.
+*>
+*> A compiler must assume that the two arguments are
+*> not the same variable, and the test will not be optimized away.
+*> Interprocedural or whole-program optimization may delete this
+*> test. The ISNAN functions will be replaced by the correct
+*> Fortran 03 intrinsic once the intrinsic is widely available.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIN1 (input) REAL
+*> \param[in] SIN1
+*> \verbatim
+*> SIN1 is REAL
+*> \endverbatim
+*>
+*> \param[in] SIN2
+*> \verbatim
+*> SIN2 is REAL
+*> Two numbers to compare for inequality.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SIN2 (input) REAL
-* Two numbers to compare for inequality.
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ LOGICAL FUNCTION SLAISNAN( SIN1, SIN2 )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL SIN1, SIN2
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaln2.f b/SRC/slaln2.f
index 21afed48..fa6d1406 100644
--- a/SRC/slaln2.f
+++ b/SRC/slaln2.f
@@ -1,10 +1,219 @@
+*> \brief \b SLALN2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B,
+* LDB, WR, WI, X, LDX, SCALE, XNORM, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL LTRANS
+* INTEGER INFO, LDA, LDB, LDX, NA, NW
+* REAL CA, D1, D2, SCALE, SMIN, WI, WR, XNORM
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLALN2 solves a system of the form (ca A - w D ) X = s B
+*> or (ca A**T - w D) X = s B with possible scaling ("s") and
+*> perturbation of A. (A**T means A-transpose.)
+*>
+*> A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA
+*> real diagonal matrix, w is a real or complex value, and X and B are
+*> NA x 1 matrices -- real if w is real, complex if w is complex. NA
+*> may be 1 or 2.
+*>
+*> If w is complex, X and B are represented as NA x 2 matrices,
+*> the first column of each being the real part and the second
+*> being the imaginary part.
+*>
+*> "s" is a scaling factor (.LE. 1), computed by SLALN2, which is
+*> so chosen that X can be computed without overflow. X is further
+*> scaled if necessary to assure that norm(ca A - w D)*norm(X) is less
+*> than overflow.
+*>
+*> If both singular values of (ca A - w D) are less than SMIN,
+*> SMIN*identity will be used instead of (ca A - w D). If only one
+*> singular value is less than SMIN, one element of (ca A - w D) will be
+*> perturbed enough to make the smallest singular value roughly SMIN.
+*> If both singular values are at least SMIN, (ca A - w D) will not be
+*> perturbed. In any case, the perturbation will be at most some small
+*> multiple of max( SMIN, ulp*norm(ca A - w D) ). The singular values
+*> are computed by infinity-norm approximations, and thus will only be
+*> correct to a factor of 2 or so.
+*>
+*> Note: all input quantities are assumed to be smaller than overflow
+*> by a reasonable factor. (See BIGNUM.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LTRANS
+*> \verbatim
+*> LTRANS is LOGICAL
+*> =.TRUE.: A-transpose will be used.
+*> =.FALSE.: A will be used (not transposed.)
+*> \endverbatim
+*>
+*> \param[in] NA
+*> \verbatim
+*> NA is INTEGER
+*> The size of the matrix A. It may (only) be 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> 1 if "w" is real, 2 if "w" is complex. It may only be 1
+*> or 2.
+*> \endverbatim
+*>
+*> \param[in] SMIN
+*> \verbatim
+*> SMIN is REAL
+*> The desired lower bound on the singular values of A. This
+*> should be a safe distance away from underflow or overflow,
+*> say, between (underflow/machine precision) and (machine
+*> precision * overflow ). (See BIGNUM and ULP.)
+*> \endverbatim
+*>
+*> \param[in] CA
+*> \verbatim
+*> CA is REAL
+*> The coefficient c, which A is multiplied by.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,NA)
+*> The NA x NA matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least NA.
+*> \endverbatim
+*>
+*> \param[in] D1
+*> \verbatim
+*> D1 is REAL
+*> The 1,1 element in the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] D2
+*> \verbatim
+*> D2 is REAL
+*> The 2,2 element in the diagonal matrix D. Not used if NW=1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NW)
+*> The NA x NW matrix B (right-hand side). If NW=2 ("w" is
+*> complex), column 1 contains the real part of B and column 2
+*> contains the imaginary part.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least NA.
+*> \endverbatim
+*>
+*> \param[in] WR
+*> \verbatim
+*> WR is REAL
+*> The real part of the scalar "w".
+*> \endverbatim
+*>
+*> \param[in] WI
+*> \verbatim
+*> WI is REAL
+*> The imaginary part of the scalar "w". Not used if NW=1.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NW)
+*> The NA x NW matrix X (unknowns), as computed by SLALN2.
+*> If NW=2 ("w" is complex), on exit, column 1 will contain
+*> the real part of X and column 2 will contain the imaginary
+*> part.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X. It must be at least NA.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scale factor that B must be multiplied by to insure
+*> that overflow does not occur when computing X. Thus,
+*> (ca A - w D) X will be SCALE*B, not B (ignoring
+*> perturbations of A.) It will be at most 1.
+*> \endverbatim
+*>
+*> \param[out] XNORM
+*> \verbatim
+*> XNORM is REAL
+*> The infinity-norm of X, when X is regarded as an NA x NW
+*> real matrix.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> An error flag. It will be set to zero if no error occurs,
+*> a negative number if an argument is in error, or a positive
+*> number if ca A - w D had to be perturbed.
+*> The possible values are:
+*> = 0: No error occurred, and (ca A - w D) did not have to be
+*> perturbed.
+*> = 1: (ca A - w D) had to be perturbed to make its smallest
+*> (or only) singular value greater than SMIN.
+*> NOTE: In the interests of speed, this routine does not
+*> check the inputs for errors.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B,
$ LDB, WR, WI, X, LDX, SCALE, XNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LTRANS
@@ -15,120 +224,6 @@
REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SLALN2 solves a system of the form (ca A - w D ) X = s B
-* or (ca A**T - w D) X = s B with possible scaling ("s") and
-* perturbation of A. (A**T means A-transpose.)
-*
-* A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA
-* real diagonal matrix, w is a real or complex value, and X and B are
-* NA x 1 matrices -- real if w is real, complex if w is complex. NA
-* may be 1 or 2.
-*
-* If w is complex, X and B are represented as NA x 2 matrices,
-* the first column of each being the real part and the second
-* being the imaginary part.
-*
-* "s" is a scaling factor (.LE. 1), computed by SLALN2, which is
-* so chosen that X can be computed without overflow. X is further
-* scaled if necessary to assure that norm(ca A - w D)*norm(X) is less
-* than overflow.
-*
-* If both singular values of (ca A - w D) are less than SMIN,
-* SMIN*identity will be used instead of (ca A - w D). If only one
-* singular value is less than SMIN, one element of (ca A - w D) will be
-* perturbed enough to make the smallest singular value roughly SMIN.
-* If both singular values are at least SMIN, (ca A - w D) will not be
-* perturbed. In any case, the perturbation will be at most some small
-* multiple of max( SMIN, ulp*norm(ca A - w D) ). The singular values
-* are computed by infinity-norm approximations, and thus will only be
-* correct to a factor of 2 or so.
-*
-* Note: all input quantities are assumed to be smaller than overflow
-* by a reasonable factor. (See BIGNUM.)
-*
-* Arguments
-* ==========
-*
-* LTRANS (input) LOGICAL
-* =.TRUE.: A-transpose will be used.
-* =.FALSE.: A will be used (not transposed.)
-*
-* NA (input) INTEGER
-* The size of the matrix A. It may (only) be 1 or 2.
-*
-* NW (input) INTEGER
-* 1 if "w" is real, 2 if "w" is complex. It may only be 1
-* or 2.
-*
-* SMIN (input) REAL
-* The desired lower bound on the singular values of A. This
-* should be a safe distance away from underflow or overflow,
-* say, between (underflow/machine precision) and (machine
-* precision * overflow ). (See BIGNUM and ULP.)
-*
-* CA (input) REAL
-* The coefficient c, which A is multiplied by.
-*
-* A (input) REAL array, dimension (LDA,NA)
-* The NA x NA matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least NA.
-*
-* D1 (input) REAL
-* The 1,1 element in the diagonal matrix D.
-*
-* D2 (input) REAL
-* The 2,2 element in the diagonal matrix D. Not used if NW=1.
-*
-* B (input) REAL array, dimension (LDB,NW)
-* The NA x NW matrix B (right-hand side). If NW=2 ("w" is
-* complex), column 1 contains the real part of B and column 2
-* contains the imaginary part.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least NA.
-*
-* WR (input) REAL
-* The real part of the scalar "w".
-*
-* WI (input) REAL
-* The imaginary part of the scalar "w". Not used if NW=1.
-*
-* X (output) REAL array, dimension (LDX,NW)
-* The NA x NW matrix X (unknowns), as computed by SLALN2.
-* If NW=2 ("w" is complex), on exit, column 1 will contain
-* the real part of X and column 2 will contain the imaginary
-* part.
-*
-* LDX (input) INTEGER
-* The leading dimension of X. It must be at least NA.
-*
-* SCALE (output) REAL
-* The scale factor that B must be multiplied by to insure
-* that overflow does not occur when computing X. Thus,
-* (ca A - w D) X will be SCALE*B, not B (ignoring
-* perturbations of A.) It will be at most 1.
-*
-* XNORM (output) REAL
-* The infinity-norm of X, when X is regarded as an NA x NW
-* real matrix.
-*
-* INFO (output) INTEGER
-* An error flag. It will be set to zero if no error occurs,
-* a negative number if an argument is in error, or a positive
-* number if ca A - w D had to be perturbed.
-* The possible values are:
-* = 0: No error occurred, and (ca A - w D) did not have to be
-* perturbed.
-* = 1: (ca A - w D) had to be perturbed to make its smallest
-* (or only) singular value greater than SMIN.
-* NOTE: In the interests of speed, this routine does not
-* check the inputs for errors.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slals0.f b/SRC/slals0.f
index 4eff0947..7b5ad72d 100644
--- a/SRC/slals0.f
+++ b/SRC/slals0.f
@@ -1,11 +1,276 @@
+*> \brief \b SLALS0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
+* PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
+* POLES, DIFL, DIFR, Z, K, C, S, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
+* $ LDGNUM, NL, NR, NRHS, SQRE
+* REAL C, S
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), PERM( * )
+* REAL B( LDB, * ), BX( LDBX, * ), DIFL( * ),
+* $ DIFR( LDGNUM, * ), GIVNUM( LDGNUM, * ),
+* $ POLES( LDGNUM, * ), WORK( * ), Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLALS0 applies back the multiplying factors of either the left or the
+*> right singular vector matrix of a diagonal matrix appended by a row
+*> to the right hand side matrix B in solving the least squares problem
+*> using the divide-and-conquer SVD approach.
+*>
+*> For the left singular vector matrix, three types of orthogonal
+*> matrices are involved:
+*>
+*> (1L) Givens rotations: the number of such rotations is GIVPTR; the
+*> pairs of columns/rows they were applied to are stored in GIVCOL;
+*> and the C- and S-values of these rotations are stored in GIVNUM.
+*>
+*> (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
+*> row, and for J=2:N, PERM(J)-th row of B is to be moved to the
+*> J-th row.
+*>
+*> (3L) The left singular vector matrix of the remaining matrix.
+*>
+*> For the right singular vector matrix, four types of orthogonal
+*> matrices are involved:
+*>
+*> (1R) The right singular vector matrix of the remaining matrix.
+*>
+*> (2R) If SQRE = 1, one extra Givens rotation to generate the right
+*> null space.
+*>
+*> (3R) The inverse transformation of (2L).
+*>
+*> (4R) The inverse transformation of (1L).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed in
+*> factored form:
+*> = 0: Left singular vector matrix.
+*> = 1: Right singular vector matrix.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has row dimension N = NL + NR + 1,
+*> and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension ( LDB, NRHS )
+*> On input, B contains the right hand sides of the least
+*> squares problem in rows 1 through M. On output, B contains
+*> the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB must be at least
+*> max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*> BX is REAL array, dimension ( LDBX, NRHS )
+*> \endverbatim
+*>
+*> \param[in] LDBX
+*> \verbatim
+*> LDBX is INTEGER
+*> The leading dimension of BX.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( N )
+*> The permutations (from deflation and sorting) applied
+*> to the two blocks.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*> Each pair of numbers indicates a pair of rows/columns
+*> involved in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER
+*> The leading dimension of GIVCOL, must be at least N.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension ( LDGNUM, 2 )
+*> Each number indicates the C or S value used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] LDGNUM
+*> \verbatim
+*> LDGNUM is INTEGER
+*> The leading dimension of arrays DIFR, POLES and
+*> GIVNUM, must be at least K.
+*> \endverbatim
+*>
+*> \param[in] POLES
+*> \verbatim
+*> POLES is REAL array, dimension ( LDGNUM, 2 )
+*> On entry, POLES(1:K, 1) contains the new singular
+*> values obtained from solving the secular equation, and
+*> POLES(1:K, 2) is an array containing the poles in the secular
+*> equation.
+*> \endverbatim
+*>
+*> \param[in] DIFL
+*> \verbatim
+*> DIFL is REAL array, dimension ( K ).
+*> On entry, DIFL(I) is the distance between I-th updated
+*> (undeflated) singular value and the I-th (undeflated) old
+*> singular value.
+*> \endverbatim
+*>
+*> \param[in] DIFR
+*> \verbatim
+*> DIFR is REAL array, dimension ( LDGNUM, 2 ).
+*> On entry, DIFR(I, 1) contains the distances between I-th
+*> updated (undeflated) singular value and the I+1-th
+*> (undeflated) old singular value. And DIFR(I, 2) is the
+*> normalizing factor for the I-th right singular vector.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension ( K )
+*> Contain the components of the deflation-adjusted updating row
+*> vector.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix,
+*> This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL
+*> C contains garbage if SQRE =0 and the C-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL
+*> S contains garbage if SQRE =0 and the S-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension ( K )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
$ PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
$ POLES, DIFL, DIFR, Z, K, C, S, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
@@ -19,148 +284,6 @@
$ POLES( LDGNUM, * ), WORK( * ), Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLALS0 applies back the multiplying factors of either the left or the
-* right singular vector matrix of a diagonal matrix appended by a row
-* to the right hand side matrix B in solving the least squares problem
-* using the divide-and-conquer SVD approach.
-*
-* For the left singular vector matrix, three types of orthogonal
-* matrices are involved:
-*
-* (1L) Givens rotations: the number of such rotations is GIVPTR; the
-* pairs of columns/rows they were applied to are stored in GIVCOL;
-* and the C- and S-values of these rotations are stored in GIVNUM.
-*
-* (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
-* row, and for J=2:N, PERM(J)-th row of B is to be moved to the
-* J-th row.
-*
-* (3L) The left singular vector matrix of the remaining matrix.
-*
-* For the right singular vector matrix, four types of orthogonal
-* matrices are involved:
-*
-* (1R) The right singular vector matrix of the remaining matrix.
-*
-* (2R) If SQRE = 1, one extra Givens rotation to generate the right
-* null space.
-*
-* (3R) The inverse transformation of (2L).
-*
-* (4R) The inverse transformation of (1L).
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed in
-* factored form:
-* = 0: Left singular vector matrix.
-* = 1: Right singular vector matrix.
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has row dimension N = NL + NR + 1,
-* and column dimension M = N + SQRE.
-*
-* NRHS (input) INTEGER
-* The number of columns of B and BX. NRHS must be at least 1.
-*
-* B (input/output) REAL array, dimension ( LDB, NRHS )
-* On input, B contains the right hand sides of the least
-* squares problem in rows 1 through M. On output, B contains
-* the solution X in rows 1 through N.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB must be at least
-* max(1,MAX( M, N ) ).
-*
-* BX (workspace) REAL array, dimension ( LDBX, NRHS )
-*
-* LDBX (input) INTEGER
-* The leading dimension of BX.
-*
-* PERM (input) INTEGER array, dimension ( N )
-* The permutations (from deflation and sorting) applied
-* to the two blocks.
-*
-* GIVPTR (input) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem.
-*
-* GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 )
-* Each pair of numbers indicates a pair of rows/columns
-* involved in a Givens rotation.
-*
-* LDGCOL (input) INTEGER
-* The leading dimension of GIVCOL, must be at least N.
-*
-* GIVNUM (input) REAL array, dimension ( LDGNUM, 2 )
-* Each number indicates the C or S value used in the
-* corresponding Givens rotation.
-*
-* LDGNUM (input) INTEGER
-* The leading dimension of arrays DIFR, POLES and
-* GIVNUM, must be at least K.
-*
-* POLES (input) REAL array, dimension ( LDGNUM, 2 )
-* On entry, POLES(1:K, 1) contains the new singular
-* values obtained from solving the secular equation, and
-* POLES(1:K, 2) is an array containing the poles in the secular
-* equation.
-*
-* DIFL (input) REAL array, dimension ( K ).
-* On entry, DIFL(I) is the distance between I-th updated
-* (undeflated) singular value and the I-th (undeflated) old
-* singular value.
-*
-* DIFR (input) REAL array, dimension ( LDGNUM, 2 ).
-* On entry, DIFR(I, 1) contains the distances between I-th
-* updated (undeflated) singular value and the I+1-th
-* (undeflated) old singular value. And DIFR(I, 2) is the
-* normalizing factor for the I-th right singular vector.
-*
-* Z (input) REAL array, dimension ( K )
-* Contain the components of the deflation-adjusted updating row
-* vector.
-*
-* K (input) INTEGER
-* Contains the dimension of the non-deflated matrix,
-* This is the order of the related secular equation. 1 <= K <=N.
-*
-* C (input) REAL
-* C contains garbage if SQRE =0 and the C-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* S (input) REAL
-* S contains garbage if SQRE =0 and the S-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* WORK (workspace) REAL array, dimension ( K )
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slalsa.f b/SRC/slalsa.f
index dd8d5e92..23216857 100644
--- a/SRC/slalsa.f
+++ b/SRC/slalsa.f
@@ -1,12 +1,276 @@
+*> \brief \b SLALSA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
+* LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
+* GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
+* $ SMLSIZ
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
+* $ K( * ), PERM( LDGCOL, * )
+* REAL B( LDB, * ), BX( LDBX, * ), C( * ),
+* $ DIFL( LDU, * ), DIFR( LDU, * ),
+* $ GIVNUM( LDU, * ), POLES( LDU, * ), S( * ),
+* $ U( LDU, * ), VT( LDU, * ), WORK( * ),
+* $ Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLALSA is an itermediate step in solving the least squares problem
+*> by computing the SVD of the coefficient matrix in compact form (The
+*> singular vectors are computed as products of simple orthorgonal
+*> matrices.).
+*>
+*> If ICOMPQ = 0, SLALSA applies the inverse of the left singular vector
+*> matrix of an upper bidiagonal matrix to the right hand side; and if
+*> ICOMPQ = 1, SLALSA applies the right singular vector matrix to the
+*> right hand side. The singular vector matrices were generated in
+*> compact form by SLALSA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether the left or the right singular vector
+*> matrix is involved.
+*> = 0: Left singular vector matrix
+*> = 1: Right singular vector matrix
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The row and column dimensions of the upper bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension ( LDB, NRHS )
+*> On input, B contains the right hand sides of the least
+*> squares problem in rows 1 through M.
+*> On output, B contains the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B in the calling subprogram.
+*> LDB must be at least max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*> BX is REAL array, dimension ( LDBX, NRHS )
+*> On exit, the result of applying the left or right singular
+*> vector matrix to B.
+*> \endverbatim
+*>
+*> \param[in] LDBX
+*> \verbatim
+*> LDBX is INTEGER
+*> The leading dimension of BX.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension ( LDU, SMLSIZ ).
+*> On entry, U contains the left singular vector matrices of all
+*> subproblems at the bottom level.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER, LDU = > N.
+*> The leading dimension of arrays U, VT, DIFL, DIFR,
+*> POLES, GIVNUM, and Z.
+*> \endverbatim
+*>
+*> \param[in] VT
+*> \verbatim
+*> VT is REAL array, dimension ( LDU, SMLSIZ+1 ).
+*> On entry, VT**T contains the right singular vector matrices of
+*> all subproblems at the bottom level.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER array, dimension ( N ).
+*> \endverbatim
+*>
+*> \param[in] DIFL
+*> \verbatim
+*> DIFL is REAL array, dimension ( LDU, NLVL ).
+*> where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
+*> \endverbatim
+*>
+*> \param[in] DIFR
+*> \verbatim
+*> DIFR is REAL array, dimension ( LDU, 2 * NLVL ).
+*> On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
+*> distances between singular values on the I-th level and
+*> singular values on the (I -1)-th level, and DIFR(*, 2 * I)
+*> record the normalizing factors of the right singular vectors
+*> matrices of subproblems on I-th level.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension ( LDU, NLVL ).
+*> On entry, Z(1, I) contains the components of the deflation-
+*> adjusted updating row vector for subproblems on the I-th
+*> level.
+*> \endverbatim
+*>
+*> \param[in] POLES
+*> \verbatim
+*> POLES is REAL array, dimension ( LDU, 2 * NLVL ).
+*> On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
+*> singular values involved in the secular equations on the I-th
+*> level.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension ( N ).
+*> On entry, GIVPTR( I ) records the number of Givens
+*> rotations performed on the I-th problem on the computation
+*> tree.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
+*> On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
+*> locations of Givens rotations performed on the I-th level on
+*> the computation tree.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER, LDGCOL = > N.
+*> The leading dimension of arrays GIVCOL and PERM.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( LDGCOL, NLVL ).
+*> On entry, PERM(*, I) records permutations done on the I-th
+*> level of the computation tree.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension ( LDU, 2 * NLVL ).
+*> On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
+*> values of Givens rotations performed on the I-th level on the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension ( N ).
+*> On entry, if the I-th subproblem is not square,
+*> C( I ) contains the C-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension ( N ).
+*> On entry, if the I-th subproblem is not square,
+*> S( I ) contains the S-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array.
+*> The dimension must be at least N.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array.
+*> The dimension must be at least 3 * N
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
$ LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
$ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
@@ -22,140 +286,6 @@
$ Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* SLALSA is an itermediate step in solving the least squares problem
-* by computing the SVD of the coefficient matrix in compact form (The
-* singular vectors are computed as products of simple orthorgonal
-* matrices.).
-*
-* If ICOMPQ = 0, SLALSA applies the inverse of the left singular vector
-* matrix of an upper bidiagonal matrix to the right hand side; and if
-* ICOMPQ = 1, SLALSA applies the right singular vector matrix to the
-* right hand side. The singular vector matrices were generated in
-* compact form by SLALSA.
-*
-* Arguments
-* =========
-*
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether the left or the right singular vector
-* matrix is involved.
-* = 0: Left singular vector matrix
-* = 1: Right singular vector matrix
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The row and column dimensions of the upper bidiagonal matrix.
-*
-* NRHS (input) INTEGER
-* The number of columns of B and BX. NRHS must be at least 1.
-*
-* B (input/output) REAL array, dimension ( LDB, NRHS )
-* On input, B contains the right hand sides of the least
-* squares problem in rows 1 through M.
-* On output, B contains the solution X in rows 1 through N.
-*
-* LDB (input) INTEGER
-* The leading dimension of B in the calling subprogram.
-* LDB must be at least max(1,MAX( M, N ) ).
-*
-* BX (output) REAL array, dimension ( LDBX, NRHS )
-* On exit, the result of applying the left or right singular
-* vector matrix to B.
-*
-* LDBX (input) INTEGER
-* The leading dimension of BX.
-*
-* U (input) REAL array, dimension ( LDU, SMLSIZ ).
-* On entry, U contains the left singular vector matrices of all
-* subproblems at the bottom level.
-*
-* LDU (input) INTEGER, LDU = > N.
-* The leading dimension of arrays U, VT, DIFL, DIFR,
-* POLES, GIVNUM, and Z.
-*
-* VT (input) REAL array, dimension ( LDU, SMLSIZ+1 ).
-* On entry, VT**T contains the right singular vector matrices of
-* all subproblems at the bottom level.
-*
-* K (input) INTEGER array, dimension ( N ).
-*
-* DIFL (input) REAL array, dimension ( LDU, NLVL ).
-* where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
-*
-* DIFR (input) REAL array, dimension ( LDU, 2 * NLVL ).
-* On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
-* distances between singular values on the I-th level and
-* singular values on the (I -1)-th level, and DIFR(*, 2 * I)
-* record the normalizing factors of the right singular vectors
-* matrices of subproblems on I-th level.
-*
-* Z (input) REAL array, dimension ( LDU, NLVL ).
-* On entry, Z(1, I) contains the components of the deflation-
-* adjusted updating row vector for subproblems on the I-th
-* level.
-*
-* POLES (input) REAL array, dimension ( LDU, 2 * NLVL ).
-* On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
-* singular values involved in the secular equations on the I-th
-* level.
-*
-* GIVPTR (input) INTEGER array, dimension ( N ).
-* On entry, GIVPTR( I ) records the number of Givens
-* rotations performed on the I-th problem on the computation
-* tree.
-*
-* GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
-* On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
-* locations of Givens rotations performed on the I-th level on
-* the computation tree.
-*
-* LDGCOL (input) INTEGER, LDGCOL = > N.
-* The leading dimension of arrays GIVCOL and PERM.
-*
-* PERM (input) INTEGER array, dimension ( LDGCOL, NLVL ).
-* On entry, PERM(*, I) records permutations done on the I-th
-* level of the computation tree.
-*
-* GIVNUM (input) REAL array, dimension ( LDU, 2 * NLVL ).
-* On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
-* values of Givens rotations performed on the I-th level on the
-* computation tree.
-*
-* C (input) REAL array, dimension ( N ).
-* On entry, if the I-th subproblem is not square,
-* C( I ) contains the C-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* S (input) REAL array, dimension ( N ).
-* On entry, if the I-th subproblem is not square,
-* S( I ) contains the S-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* WORK (workspace) REAL array.
-* The dimension must be at least N.
-*
-* IWORK (workspace) INTEGER array.
-* The dimension must be at least 3 * N
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slalsd.f b/SRC/slalsd.f
index b4175b1a..3e2477a8 100644
--- a/SRC/slalsd.f
+++ b/SRC/slalsd.f
@@ -1,10 +1,186 @@
+*> \brief \b SLALSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
+* RANK, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS, RANK, SMLSIZ
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL B( LDB, * ), D( * ), E( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLALSD uses the singular value decomposition of A to solve the least
+*> squares problem of finding X to minimize the Euclidean norm of each
+*> column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
+*> are N-by-NRHS. The solution X overwrites B.
+*>
+*> The singular values of A smaller than RCOND times the largest
+*> singular value are treated as zero in solving the least squares
+*> problem; in this case a minimum norm solution is returned.
+*> The actual singular values are returned in D in ascending order.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': D and E define an upper bidiagonal matrix.
+*> = 'L': D and E define a lower bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the bidiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry D contains the main diagonal of the bidiagonal
+*> matrix. On exit, if INFO = 0, D contains its singular values.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> Contains the super-diagonal entries of the bidiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On input, B contains the right hand sides of the least
+*> squares problem. On output, B contains the solution X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B in the calling subprogram.
+*> LDB must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The singular values of A less than or equal to RCOND times
+*> the largest singular value are treated as zero in solving
+*> the least squares problem. If RCOND is negative,
+*> machine precision is used instead.
+*> For example, if diag(S)*X=B were the least squares problem,
+*> where diag(S) is a diagonal matrix of singular values, the
+*> solution would be X(i) = B(i) / S(i) if S(i) is greater than
+*> RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
+*> RCOND*max(S).
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The number of singular values of A greater than RCOND times
+*> the largest singular value.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension at least
+*> (9*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2),
+*> where NLVL = max(0, INT(log_2 (N/(SMLSIZ+1))) + 1).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least
+*> (3*N*NLVL + 11*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute a singular value while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through MOD(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
$ RANK, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,96 +192,6 @@
REAL B( LDB, * ), D( * ), E( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLALSD uses the singular value decomposition of A to solve the least
-* squares problem of finding X to minimize the Euclidean norm of each
-* column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
-* are N-by-NRHS. The solution X overwrites B.
-*
-* The singular values of A smaller than RCOND times the largest
-* singular value are treated as zero in solving the least squares
-* problem; in this case a minimum norm solution is returned.
-* The actual singular values are returned in D in ascending order.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': D and E define an upper bidiagonal matrix.
-* = 'L': D and E define a lower bidiagonal matrix.
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The dimension of the bidiagonal matrix. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS must be at least 1.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry D contains the main diagonal of the bidiagonal
-* matrix. On exit, if INFO = 0, D contains its singular values.
-*
-* E (input/output) REAL array, dimension (N-1)
-* Contains the super-diagonal entries of the bidiagonal matrix.
-* On exit, E has been destroyed.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On input, B contains the right hand sides of the least
-* squares problem. On output, B contains the solution X.
-*
-* LDB (input) INTEGER
-* The leading dimension of B in the calling subprogram.
-* LDB must be at least max(1,N).
-*
-* RCOND (input) REAL
-* The singular values of A less than or equal to RCOND times
-* the largest singular value are treated as zero in solving
-* the least squares problem. If RCOND is negative,
-* machine precision is used instead.
-* For example, if diag(S)*X=B were the least squares problem,
-* where diag(S) is a diagonal matrix of singular values, the
-* solution would be X(i) = B(i) / S(i) if S(i) is greater than
-* RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
-* RCOND*max(S).
-*
-* RANK (output) INTEGER
-* The number of singular values of A greater than RCOND times
-* the largest singular value.
-*
-* WORK (workspace) REAL array, dimension at least
-* (9*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2),
-* where NLVL = max(0, INT(log_2 (N/(SMLSIZ+1))) + 1).
-*
-* IWORK (workspace) INTEGER array, dimension at least
-* (3*N*NLVL + 11*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute a singular value while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through MOD(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slamrg.f b/SRC/slamrg.f
index a6bfa336..93c120b8 100644
--- a/SRC/slamrg.f
+++ b/SRC/slamrg.f
@@ -1,51 +1,108 @@
- SUBROUTINE SLAMRG( N1, N2, A, STRD1, STRD2, INDEX )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N1, N2, STRD1, STRD2
-* ..
-* .. Array Arguments ..
- INTEGER INDEX( * )
- REAL A( * )
-* ..
-*
+*> \brief \b SLAMRG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAMRG( N1, N2, A, STRD1, STRD2, INDEX )
+*
+* .. Scalar Arguments ..
+* INTEGER N1, N2, STRD1, STRD2
+* ..
+* .. Array Arguments ..
+* INTEGER INDEX( * )
+* REAL A( * )
+* ..
+*
* Purpose
* =======
*
-* SLAMRG will create a permutation list which will merge the elements
-* of A (which is composed of two independently sorted sets) into a
-* single set which is sorted in ascending order.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAMRG will create a permutation list which will merge the elements
+*> of A (which is composed of two independently sorted sets) into a
+*> single set which is sorted in ascending order.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N1 (input) INTEGER
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> These arguements contain the respective lengths of the two
+*> sorted lists to be merged.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N1+N2)
+*> The first N1 elements of A contain a list of numbers which
+*> are sorted in either ascending or descending order. Likewise
+*> for the final N2 elements.
+*> \endverbatim
+*>
+*> \param[in] STRD1
+*> \verbatim
+*> STRD1 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] STRD2
+*> \verbatim
+*> STRD2 is INTEGER
+*> These are the strides to be taken through the array A.
+*> Allowable strides are 1 and -1. They indicate whether a
+*> subset of A is sorted in ascending (STRDx = 1) or descending
+*> (STRDx = -1) order.
+*> \endverbatim
+*>
+*> \param[out] INDEX
+*> \verbatim
+*> INDEX is INTEGER array, dimension (N1+N2)
+*> On exit this array will contain a permutation such that
+*> if B( I ) = A( INDEX( I ) ) for I=1,N1+N2, then B will be
+*> sorted in ascending order.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N2 (input) INTEGER
-* These arguements contain the respective lengths of the two
-* sorted lists to be merged.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) REAL array, dimension (N1+N2)
-* The first N1 elements of A contain a list of numbers which
-* are sorted in either ascending or descending order. Likewise
-* for the final N2 elements.
+*> \date November 2011
*
-* STRD1 (input) INTEGER
+*> \ingroup auxOTHERcomputational
*
-* STRD2 (input) INTEGER
-* These are the strides to be taken through the array A.
-* Allowable strides are 1 and -1. They indicate whether a
-* subset of A is sorted in ascending (STRDx = 1) or descending
-* (STRDx = -1) order.
+* =====================================================================
+ SUBROUTINE SLAMRG( N1, N2, A, STRD1, STRD2, INDEX )
*
-* INDEX (output) INTEGER array, dimension (N1+N2)
-* On exit this array will contain a permutation such that
-* if B( I ) = A( INDEX( I ) ) for I=1,N1+N2, then B will be
-* sorted in ascending order.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N1, N2, STRD1, STRD2
+* ..
+* .. Array Arguments ..
+ INTEGER INDEX( * )
+ REAL A( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaneg.f b/SRC/slaneg.f
index 441a6c9a..55036d2f 100644
--- a/SRC/slaneg.f
+++ b/SRC/slaneg.f
@@ -1,72 +1,133 @@
- INTEGER FUNCTION SLANEG( N, D, LLD, SIGMA, PIVMIN, R )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER N, R
- REAL PIVMIN, SIGMA
-* ..
-* .. Array Arguments ..
- REAL D( * ), LLD( * )
-* ..
-*
+*> \brief \b SLANEG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION SLANEG( N, D, LLD, SIGMA, PIVMIN, R )
+*
+* .. Scalar Arguments ..
+* INTEGER N, R
+* REAL PIVMIN, SIGMA
+* ..
+* .. Array Arguments ..
+* REAL D( * ), LLD( * )
+* ..
+*
* Purpose
* =======
*
-* SLANEG computes the Sturm count, the number of negative pivots
-* encountered while factoring tridiagonal T - sigma I = L D L^T.
-* This implementation works directly on the factors without forming
-* the tridiagonal matrix T. The Sturm count is also the number of
-* eigenvalues of T less than sigma.
-*
-* This routine is called from SLARRB.
-*
-* The current routine does not use the PIVMIN parameter but rather
-* requires IEEE-754 propagation of Infinities and NaNs. This
-* routine also has no input range restrictions but does require
-* default exception handling such that x/0 produces Inf when x is
-* non-zero, and Inf/Inf produces NaN. For more information, see:
-*
-* Marques, Riedy, and Voemel, "Benefits of IEEE-754 Features in
-* Modern Symmetric Tridiagonal Eigensolvers," SIAM Journal on
-* Scientific Computing, v28, n5, 2006. DOI 10.1137/050641624
-* (Tech report version in LAWN 172 with the same title.)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANEG computes the Sturm count, the number of negative pivots
+*> encountered while factoring tridiagonal T - sigma I = L D L^T.
+*> This implementation works directly on the factors without forming
+*> the tridiagonal matrix T. The Sturm count is also the number of
+*> eigenvalues of T less than sigma.
+*>
+*> This routine is called from SLARRB.
+*>
+*> The current routine does not use the PIVMIN parameter but rather
+*> requires IEEE-754 propagation of Infinities and NaNs. This
+*> routine also has no input range restrictions but does require
+*> default exception handling such that x/0 produces Inf when x is
+*> non-zero, and Inf/Inf produces NaN. For more information, see:
+*>
+*> Marques, Riedy, and Voemel, "Benefits of IEEE-754 Features in
+*> Modern Symmetric Tridiagonal Eigensolvers," SIAM Journal on
+*> Scientific Computing, v28, n5, 2006. DOI 10.1137/050641624
+*> (Tech report version in LAWN 172 with the same title.)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* D (input) REAL array, dimension (N)
-* The N diagonal elements of the diagonal matrix D.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The N diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] LLD
+*> \verbatim
+*> LLD is REAL array, dimension (N-1)
+*> The (N-1) elements L(i)*L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] SIGMA
+*> \verbatim
+*> SIGMA is REAL
+*> Shift amount in T - sigma I = L D L^T.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot in the Sturm sequence. May be used
+*> when zero pivots are encountered on non-IEEE-754
+*> architectures.
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is INTEGER
+*> The twist index for the twisted factorization that is used
+*> for the negcount.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LLD (input) REAL array, dimension (N-1)
-* The (N-1) elements L(i)*L(i)*D(i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SIGMA (input) REAL
-* Shift amount in T - sigma I = L D L^T.
+*> \date November 2011
*
-* PIVMIN (input) REAL
-* The minimum pivot in the Sturm sequence. May be used
-* when zero pivots are encountered on non-IEEE-754
-* architectures.
+*> \ingroup auxOTHERauxiliary
*
-* R (input) INTEGER
-* The twist index for the twisted factorization that is used
-* for the negcount.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*> Jason Riedy, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION SLANEG( N, D, LLD, SIGMA, PIVMIN, R )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-* Jason Riedy, University of California, Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER N, R
+ REAL PIVMIN, SIGMA
+* ..
+* .. Array Arguments ..
+ REAL D( * ), LLD( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slangb.f b/SRC/slangb.f
index 0dc80e51..7d885ea0 100644
--- a/SRC/slangb.f
+++ b/SRC/slangb.f
@@ -1,10 +1,126 @@
+*> \brief \b SLANGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANGB( NORM, N, KL, KU, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER KL, KU, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANGB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> SLANGB returns the value
+*>
+*> SLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANGB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANGB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of sub-diagonals of the matrix A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of super-diagonals of the matrix A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
+*> column of A is stored in the j-th column of the array AB as
+*> follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBauxiliary
+*
+* =====================================================================
REAL FUNCTION SLANGB( NORM, N, KL, KU, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -14,61 +130,6 @@
REAL AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLANGB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
-*
-* Description
-* ===========
-*
-* SLANGB returns the value
-*
-* SLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANGB as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANGB is
-* set to zero.
-*
-* KL (input) INTEGER
-* The number of sub-diagonals of the matrix A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of super-diagonals of the matrix A. KU >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The band matrix A, stored in rows 1 to KL+KU+1. The j-th
-* column of A is stored in the j-th column of the array AB as
-* follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
*
diff --git a/SRC/slange.f b/SRC/slange.f
index b7248fb7..beced06d 100644
--- a/SRC/slange.f
+++ b/SRC/slange.f
@@ -1,9 +1,116 @@
+*> \brief \b SLANGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANGE( NORM, M, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANGE returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> SLANGE returns the value
+*>
+*> SLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANGE as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0. When M = 0,
+*> SLANGE is set to zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0. When N = 0,
+*> SLANGE is set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEauxiliary
+*
+* =====================================================================
REAL FUNCTION SLANGE( NORM, M, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,56 +120,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLANGE returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real matrix A.
-*
-* Description
-* ===========
-*
-* SLANGE returns the value
-*
-* SLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANGE as described
-* above.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0. When M = 0,
-* SLANGE is set to zero.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0. When N = 0,
-* SLANGE is set to zero.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slangt.f b/SRC/slangt.f
index 9515201d..cd1397c9 100644
--- a/SRC/slangt.f
+++ b/SRC/slangt.f
@@ -1,9 +1,108 @@
+*> \brief \b SLANGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANGT( NORM, N, DL, D, DU )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), DL( * ), DU( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANGT returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real tridiagonal matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> SLANGT returns the value
+*>
+*> SLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANGT as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANGT is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION SLANGT( NORM, N, DL, D, DU )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,51 +112,6 @@
REAL D( * ), DL( * ), DU( * )
* ..
*
-* Purpose
-* =======
-*
-* SLANGT returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real tridiagonal matrix A.
-*
-* Description
-* ===========
-*
-* SLANGT returns the value
-*
-* SLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANGT as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANGT is
-* set to zero.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slanhs.f b/SRC/slanhs.f
index 5cf4c83c..8438f7c2 100644
--- a/SRC/slanhs.f
+++ b/SRC/slanhs.f
@@ -1,9 +1,110 @@
+*> \brief \b SLANHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANHS( NORM, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANHS returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> Hessenberg matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> SLANHS returns the value
+*>
+*> SLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANHS as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANHS is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The n by n upper Hessenberg matrix A; the part of A below the
+*> first sub-diagonal is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION SLANHS( NORM, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,53 +114,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLANHS returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* Hessenberg matrix A.
-*
-* Description
-* ===========
-*
-* SLANHS returns the value
-*
-* SLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANHS as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANHS is
-* set to zero.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The n by n upper Hessenberg matrix A; the part of A below the
-* first sub-diagonal is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slansb.f b/SRC/slansb.f
index 46955c98..2fd22979 100644
--- a/SRC/slansb.f
+++ b/SRC/slansb.f
@@ -1,10 +1,131 @@
+*> \brief \b SLANSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANSB( NORM, UPLO, N, K, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANSB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n symmetric band matrix A, with k super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> SLANSB returns the value
+*>
+*> SLANSB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANSB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> band matrix A is supplied.
+*> = 'U': Upper triangular part is supplied
+*> = 'L': Lower triangular part is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANSB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals or sub-diagonals of the
+*> band matrix A. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first K+1 rows of AB. The j-th column of A is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION SLANSB( NORM, UPLO, N, K, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,66 +135,6 @@
REAL AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLANSB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n symmetric band matrix A, with k super-diagonals.
-*
-* Description
-* ===========
-*
-* SLANSB returns the value
-*
-* SLANSB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANSB as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* band matrix A is supplied.
-* = 'U': Upper triangular part is supplied
-* = 'L': Lower triangular part is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANSB is
-* set to zero.
-*
-* K (input) INTEGER
-* The number of super-diagonals or sub-diagonals of the
-* band matrix A. K >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first K+1 rows of AB. The j-th column of A is
-* stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slansf.f b/SRC/slansf.f
index 298c154e..8c1d9eeb 100644
--- a/SRC/slansf.f
+++ b/SRC/slansf.f
@@ -1,165 +1,224 @@
- REAL FUNCTION SLANSF( NORM, TRANSR, UPLO, N, A, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER NORM, TRANSR, UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- REAL A( 0: * ), WORK( 0: * )
-* ..
-*
+*> \brief \b SLANSF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANSF( NORM, TRANSR, UPLO, N, A, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, TRANSR, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL A( 0: * ), WORK( 0: * )
+* ..
+*
* Purpose
* =======
*
-* SLANSF returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real symmetric matrix A in RFP format.
-*
-* Description
-* ===========
-*
-* SLANSF returns the value
-*
-* SLANSF = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANSF returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real symmetric matrix A in RFP format.
+*>
+*> Description
+*> ===========
+*>
+*> SLANSF returns the value
+*>
+*> SLANSF = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANSF as described
-* above.
-*
-* TRANSR (input) CHARACTER*1
-* Specifies whether the RFP format of A is normal or
-* transposed format.
-* = 'N': RFP format is Normal;
-* = 'T': RFP format is Transpose.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANSF as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> Specifies whether the RFP format of A is normal or
+*> transposed format.
+*> = 'N': RFP format is Normal;
+*> = 'T': RFP format is Transpose.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the RFP matrix A came from
+*> an upper or lower triangular matrix as follows:
+*> = 'U': RFP A came from an upper triangular matrix;
+*> = 'L': RFP A came from a lower triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANSF is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension ( N*(N+1)/2 );
+*> On entry, the upper (if UPLO = 'U') or lower (if UPLO = 'L')
+*> part of the symmetric matrix A stored in RFP format. See the
+*> "Notes" below for more details.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the RFP matrix A came from
-* an upper or lower triangular matrix as follows:
-* = 'U': RFP A came from an upper triangular matrix;
-* = 'L': RFP A came from a lower triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANSF is
-* set to zero.
+*> \date November 2011
*
-* A (input) REAL array, dimension ( N*(N+1)/2 );
-* On entry, the upper (if UPLO = 'U') or lower (if UPLO = 'L')
-* part of the symmetric matrix A stored in RFP format. See the
-* "Notes" below for more details.
-* Unchanged on exit.
+*> \ingroup realOTHERcomputational
*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> Reference
+*> =========
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION SLANSF( NORM, TRANSR, UPLO, N, A, WORK )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
-*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference
-* =========
+* .. Scalar Arguments ..
+ CHARACTER NORM, TRANSR, UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ REAL A( 0: * ), WORK( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slansp.f b/SRC/slansp.f
index 22f72a36..0da363f5 100644
--- a/SRC/slansp.f
+++ b/SRC/slansp.f
@@ -1,9 +1,116 @@
+*> \brief \b SLANSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANSP( NORM, UPLO, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANSP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real symmetric matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> SLANSP returns the value
+*>
+*> SLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANSP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is supplied.
+*> = 'U': Upper triangular part of A is supplied
+*> = 'L': Lower triangular part of A is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANSP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION SLANSP( NORM, UPLO, N, AP, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -13,59 +120,6 @@
REAL AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLANSP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real symmetric matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* SLANSP returns the value
-*
-* SLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANSP as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is supplied.
-* = 'U': Upper triangular part of A is supplied
-* = 'L': Lower triangular part of A is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANSP is
-* set to zero.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slanst.f b/SRC/slanst.f
index d4eb851a..c2cc1927 100644
--- a/SRC/slanst.f
+++ b/SRC/slanst.f
@@ -1,9 +1,102 @@
+*> \brief \b SLANST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANST( NORM, N, D, E )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANST returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real symmetric tridiagonal matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> SLANST returns the value
+*>
+*> SLANST = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANST as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANST is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) sub-diagonal or super-diagonal elements of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
REAL FUNCTION SLANST( NORM, N, D, E )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,48 +106,6 @@
REAL D( * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* SLANST returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real symmetric tridiagonal matrix A.
-*
-* Description
-* ===========
-*
-* SLANST returns the value
-*
-* SLANST = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANST as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANST is
-* set to zero.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of A.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) sub-diagonal or super-diagonal elements of A.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slansy.f b/SRC/slansy.f
index d4758060..0b8545f5 100644
--- a/SRC/slansy.f
+++ b/SRC/slansy.f
@@ -1,9 +1,124 @@
+*> \brief \b SLANSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANSY( NORM, UPLO, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANSY returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> real symmetric matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> SLANSY returns the value
+*>
+*> SLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANSY as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is to be referenced.
+*> = 'U': Upper triangular part of A is referenced
+*> = 'L': Lower triangular part of A is referenced
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANSY is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYauxiliary
+*
+* =====================================================================
REAL FUNCTION SLANSY( NORM, UPLO, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -13,64 +128,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLANSY returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* real symmetric matrix A.
-*
-* Description
-* ===========
-*
-* SLANSY returns the value
-*
-* SLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANSY as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is to be referenced.
-* = 'U': Upper triangular part of A is referenced
-* = 'L': Lower triangular part of A is referenced
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANSY is
-* set to zero.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slantb.f b/SRC/slantb.f
index 52ea7c72..40f8d55d 100644
--- a/SRC/slantb.f
+++ b/SRC/slantb.f
@@ -1,86 +1,150 @@
- REAL FUNCTION SLANTB( NORM, UPLO, DIAG, N, K, AB,
- $ LDAB, WORK )
+*> \brief \b SLANTB
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER K, LDAB, N
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANTB( NORM, UPLO, DIAG, N, K, AB,
+* LDAB, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLANTB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n triangular band matrix A, with ( k + 1 ) diagonals.
-*
-* Description
-* ===========
-*
-* SLANTB returns the value
-*
-* SLANTB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANTB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n triangular band matrix A, with ( k + 1 ) diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> SLANTB returns the value
+*>
+*> SLANTB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANTB as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANTB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANTB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals of the matrix A if UPLO = 'L'.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first k+1 rows of AB. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> Note that when DIAG = 'U', the elements of the array AB
+*> corresponding to the diagonal elements of the matrix A are
+*> not referenced, but are assumed to be one.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+* Authors
+* =======
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANTB is
-* set to zero.
+*> \date November 2011
*
-* K (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals of the matrix A if UPLO = 'L'.
-* K >= 0.
+*> \ingroup realOTHERauxiliary
*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first k+1 rows of AB. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-* Note that when DIAG = 'U', the elements of the array AB
-* corresponding to the diagonal elements of the matrix A are
-* not referenced, but are assumed to be one.
+* =====================================================================
+ REAL FUNCTION SLANTB( NORM, UPLO, DIAG, N, K, AB,
+ $ LDAB, WORK )
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slantp.f b/SRC/slantp.f
index e5a48ca4..97a35e69 100644
--- a/SRC/slantp.f
+++ b/SRC/slantp.f
@@ -1,77 +1,134 @@
- REAL FUNCTION SLANTP( NORM, UPLO, DIAG, N, AP, WORK )
+*> \brief \b SLANTP
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- REAL AP( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SLANTP( NORM, UPLO, DIAG, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLANTP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* triangular matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* SLANTP returns the value
-*
-* SLANTP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANTP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> triangular matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> SLANTP returns the value
+*>
+*> SLANTP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANTP as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANTP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, SLANTP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> Note that when DIAG = 'U', the elements of the array AP
+*> corresponding to the diagonal elements of the matrix A are
+*> not referenced, but are assumed to be one.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \date November 2011
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \ingroup realOTHERauxiliary
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, SLANTP is
-* set to zero.
+* =====================================================================
+ REAL FUNCTION SLANTP( NORM, UPLO, DIAG, N, AP, WORK )
*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* Note that when DIAG = 'U', the elements of the array AP
-* corresponding to the diagonal elements of the matrix A are
-* not referenced, but are assumed to be one.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slantr.f b/SRC/slantr.f
index 6c233ca1..485cebd5 100644
--- a/SRC/slantr.f
+++ b/SRC/slantr.f
@@ -1,87 +1,151 @@
- REAL FUNCTION SLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
- $ WORK )
+*> \brief \b SLANTR
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLANTR returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* trapezoidal or triangular matrix A.
-*
-* Description
-* ===========
-*
-* SLANTR returns the value
-*
-* SLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANTR returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> trapezoidal or triangular matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> SLANTR returns the value
+*>
+*> SLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in SLANTR as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in SLANTR as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower trapezoidal.
+*> = 'U': Upper trapezoidal
+*> = 'L': Lower trapezoidal
+*> Note that A is triangular instead of trapezoidal if M = N.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A has unit diagonal.
+*> = 'N': Non-unit diagonal
+*> = 'U': Unit diagonal
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0, and if
+*> UPLO = 'U', M <= N. When M = 0, SLANTR is set to zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0, and if
+*> UPLO = 'L', N <= M. When N = 0, SLANTR is set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The trapezoidal matrix A (A is triangular if M = N).
+*> If UPLO = 'U', the leading m by n upper trapezoidal part of
+*> the array A contains the upper trapezoidal matrix, and the
+*> strictly lower triangular part of A is not referenced.
+*> If UPLO = 'L', the leading m by n lower trapezoidal part of
+*> the array A contains the lower trapezoidal matrix, and the
+*> strictly upper triangular part of A is not referenced. Note
+*> that when DIAG = 'U', the diagonal elements of A are not
+*> referenced and are assumed to be one.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)),
+*> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower trapezoidal.
-* = 'U': Upper trapezoidal
-* = 'L': Lower trapezoidal
-* Note that A is triangular instead of trapezoidal if M = N.
+* Authors
+* =======
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A has unit diagonal.
-* = 'N': Non-unit diagonal
-* = 'U': Unit diagonal
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0, and if
-* UPLO = 'U', M <= N. When M = 0, SLANTR is set to zero.
+*> \date November 2011
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0, and if
-* UPLO = 'L', N <= M. When N = 0, SLANTR is set to zero.
+*> \ingroup realOTHERauxiliary
*
-* A (input) REAL array, dimension (LDA,N)
-* The trapezoidal matrix A (A is triangular if M = N).
-* If UPLO = 'U', the leading m by n upper trapezoidal part of
-* the array A contains the upper trapezoidal matrix, and the
-* strictly lower triangular part of A is not referenced.
-* If UPLO = 'L', the leading m by n lower trapezoidal part of
-* the array A contains the lower trapezoidal matrix, and the
-* strictly upper triangular part of A is not referenced. Note
-* that when DIAG = 'U', the diagonal elements of A are not
-* referenced and are assumed to be one.
+* =====================================================================
+ REAL FUNCTION SLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+ $ WORK )
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)),
-* where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slanv2.f b/SRC/slanv2.f
index 5c2199a5..9830ae17 100644
--- a/SRC/slanv2.f
+++ b/SRC/slanv2.f
@@ -1,64 +1,134 @@
- SUBROUTINE SLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
+*> \brief \b SLANV2
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
+*
+* .. Scalar Arguments ..
+* REAL A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
+* ..
+*
* Purpose
* =======
*
-* SLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric
-* matrix in standard form:
-*
-* [ A B ] = [ CS -SN ] [ AA BB ] [ CS SN ]
-* [ C D ] [ SN CS ] [ CC DD ] [-SN CS ]
-*
-* where either
-* 1) CC = 0 so that AA and DD are real eigenvalues of the matrix, or
-* 2) AA = DD and BB*CC < 0, so that AA + or - sqrt(BB*CC) are complex
-* conjugate eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric
+*> matrix in standard form:
+*>
+*> [ A B ] = [ CS -SN ] [ AA BB ] [ CS SN ]
+*> [ C D ] [ SN CS ] [ CC DD ] [-SN CS ]
+*>
+*> where either
+*> 1) CC = 0 so that AA and DD are real eigenvalues of the matrix, or
+*> 2) AA = DD and BB*CC < 0, so that AA + or - sqrt(BB*CC) are complex
+*> conjugate eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input/output) REAL
-*
-* B (input/output) REAL
-*
-* C (input/output) REAL
-*
-* D (input/output) REAL
-* On entry, the elements of the input matrix.
-* On exit, they are overwritten by the elements of the
-* standardised Schur form.
-*
-* RT1R (output) REAL
-*
-* RT1I (output) REAL
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL
+*> On entry, the elements of the input matrix.
+*> On exit, they are overwritten by the elements of the
+*> standardised Schur form.
+*> \endverbatim
+*>
+*> \param[out] RT1R
+*> \verbatim
+*> RT1R is REAL
+*> \endverbatim
+*>
+*> \param[out] RT1I
+*> \verbatim
+*> RT1I is REAL
+*> \endverbatim
+*>
+*> \param[out] RT2R
+*> \verbatim
+*> RT2R is REAL
+*> \endverbatim
+*>
+*> \param[out] RT2I
+*> \verbatim
+*> RT2I is REAL
+*> The real and imaginary parts of the eigenvalues. If the
+*> eigenvalues are a complex conjugate pair, RT1I > 0.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is REAL
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is REAL
+*> Parameters of the rotation matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RT2R (output) REAL
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RT2I (output) REAL
-* The real and imaginary parts of the eigenvalues. If the
-* eigenvalues are a complex conjugate pair, RT1I > 0.
+*> \date November 2011
*
-* CS (output) REAL
+*> \ingroup realOTHERauxiliary
*
-* SN (output) REAL
-* Parameters of the rotation matrix.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by V. Sima, Research Institute for Informatics, Bucharest,
+*> Romania, to reduce the risk of cancellation errors,
+*> when computing real eigenvalues, and to ensure, if possible, that
+*> abs(RT1R) >= abs(RT2R).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by V. Sima, Research Institute for Informatics, Bucharest,
-* Romania, to reduce the risk of cancellation errors,
-* when computing real eigenvalues, and to ensure, if possible, that
-* abs(RT1R) >= abs(RT2R).
+* .. Scalar Arguments ..
+ REAL A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
+* ..
*
* =====================================================================
*
diff --git a/SRC/slapll.f b/SRC/slapll.f
index bd435e53..292438ff 100644
--- a/SRC/slapll.f
+++ b/SRC/slapll.f
@@ -1,9 +1,103 @@
+*> \brief \b SLAPLL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAPLL( N, X, INCX, Y, INCY, SSMIN )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* REAL SSMIN
+* ..
+* .. Array Arguments ..
+* REAL X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given two column vectors X and Y, let
+*>
+*> A = ( X Y ).
+*>
+*> The subroutine first computes the QR factorization of A = Q*R,
+*> and then computes the SVD of the 2-by-2 upper triangular matrix R.
+*> The smaller singular value of R is returned in SSMIN, which is used
+*> as the measurement of the linear dependency of the vectors X and Y.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vectors X and Y.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array,
+*> dimension (1+(N-1)*INCX)
+*> On entry, X contains the N-vector X.
+*> On exit, X is overwritten.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array,
+*> dimension (1+(N-1)*INCY)
+*> On entry, Y contains the N-vector Y.
+*> On exit, Y is overwritten.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between successive elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[out] SSMIN
+*> \verbatim
+*> SSMIN is REAL
+*> The smallest singular value of the N-by-2 matrix A = ( X Y ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAPLL( N, X, INCX, Y, INCY, SSMIN )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
@@ -13,43 +107,6 @@
REAL X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* Given two column vectors X and Y, let
-*
-* A = ( X Y ).
-*
-* The subroutine first computes the QR factorization of A = Q*R,
-* and then computes the SVD of the 2-by-2 upper triangular matrix R.
-* The smaller singular value of R is returned in SSMIN, which is used
-* as the measurement of the linear dependency of the vectors X and Y.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The length of the vectors X and Y.
-*
-* X (input/output) REAL array,
-* dimension (1+(N-1)*INCX)
-* On entry, X contains the N-vector X.
-* On exit, X is overwritten.
-*
-* INCX (input) INTEGER
-* The increment between successive elements of X. INCX > 0.
-*
-* Y (input/output) REAL array,
-* dimension (1+(N-1)*INCY)
-* On entry, Y contains the N-vector Y.
-* On exit, Y is overwritten.
-*
-* INCY (input) INTEGER
-* The increment between successive elements of Y. INCY > 0.
-*
-* SSMIN (output) REAL
-* The smallest singular value of the N-by-2 matrix A = ( X Y ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slapmr.f b/SRC/slapmr.f
index 322edc5b..46bea744 100644
--- a/SRC/slapmr.f
+++ b/SRC/slapmr.f
@@ -1,14 +1,105 @@
+*> \brief \b SLAPMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAPMR( FORWRD, M, N, X, LDX, K )
+*
+* .. Scalar Arguments ..
+* LOGICAL FORWRD
+* INTEGER LDX, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER K( * )
+* REAL X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAPMR rearranges the rows of the M by N matrix X as specified
+*> by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
+*> If FORWRD = .TRUE., forward permutation:
+*>
+*> X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
+*>
+*> If FORWRD = .FALSE., backward permutation:
+*>
+*> X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FORWRD
+*> \verbatim
+*> FORWRD is LOGICAL
+*> = .TRUE., forward permutation
+*> = .FALSE., backward permutation
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,N)
+*> On entry, the M by N matrix X.
+*> On exit, X contains the permuted matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X, LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] K
+*> \verbatim
+*> K is INTEGER array, dimension (M)
+*> On entry, K contains the permutation vector. K is used as
+*> internal workspace, but reset to its original value on
+*> output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAPMR( FORWRD, M, N, X, LDX, K )
- IMPLICIT NONE
*
-* Originally SLAPMT
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Adapted to SLAPMR
-* July 2010
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL FORWRD
@@ -19,44 +110,6 @@
REAL X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAPMR rearranges the rows of the M by N matrix X as specified
-* by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
-* If FORWRD = .TRUE., forward permutation:
-*
-* X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
-*
-* If FORWRD = .FALSE., backward permutation:
-*
-* X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
-*
-* Arguments
-* =========
-*
-* FORWRD (input) LOGICAL
-* = .TRUE., forward permutation
-* = .FALSE., backward permutation
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix X. N >= 0.
-*
-* X (input/output) REAL array, dimension (LDX,N)
-* On entry, the M by N matrix X.
-* On exit, X contains the permuted matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X, LDX >= MAX(1,M).
-*
-* K (input/output) INTEGER array, dimension (M)
-* On entry, K contains the permutation vector. K is used as
-* internal workspace, but reset to its original value on
-* output.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/slapmt.f b/SRC/slapmt.f
index 6f328b2a..b3222e22 100644
--- a/SRC/slapmt.f
+++ b/SRC/slapmt.f
@@ -1,9 +1,105 @@
+*> \brief \b SLAPMT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAPMT( FORWRD, M, N, X, LDX, K )
+*
+* .. Scalar Arguments ..
+* LOGICAL FORWRD
+* INTEGER LDX, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER K( * )
+* REAL X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAPMT rearranges the columns of the M by N matrix X as specified
+*> by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
+*> If FORWRD = .TRUE., forward permutation:
+*>
+*> X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
+*>
+*> If FORWRD = .FALSE., backward permutation:
+*>
+*> X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FORWRD
+*> \verbatim
+*> FORWRD is LOGICAL
+*> = .TRUE., forward permutation
+*> = .FALSE., backward permutation
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,N)
+*> On entry, the M by N matrix X.
+*> On exit, X contains the permuted matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X, LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] K
+*> \verbatim
+*> K is INTEGER array, dimension (N)
+*> On entry, K contains the permutation vector. K is used as
+*> internal workspace, but reset to its original value on
+*> output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAPMT( FORWRD, M, N, X, LDX, K )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL FORWRD
@@ -14,44 +110,6 @@
REAL X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAPMT rearranges the columns of the M by N matrix X as specified
-* by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
-* If FORWRD = .TRUE., forward permutation:
-*
-* X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
-*
-* If FORWRD = .FALSE., backward permutation:
-*
-* X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
-*
-* Arguments
-* =========
-*
-* FORWRD (input) LOGICAL
-* = .TRUE., forward permutation
-* = .FALSE., backward permutation
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix X. N >= 0.
-*
-* X (input/output) REAL array, dimension (LDX,N)
-* On entry, the M by N matrix X.
-* On exit, X contains the permuted matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X, LDX >= MAX(1,M).
-*
-* K (input/output) INTEGER array, dimension (N)
-* On entry, K contains the permutation vector. K is used as
-* internal workspace, but reset to its original value on
-* output.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/slapy2.f b/SRC/slapy2.f
index d6b16e22..08b3ae23 100644
--- a/SRC/slapy2.f
+++ b/SRC/slapy2.f
@@ -1,27 +1,68 @@
- REAL FUNCTION SLAPY2( X, Y )
+*> \brief \b SLAPY2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL X, Y
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SLAPY2( X, Y )
+*
+* .. Scalar Arguments ..
+* REAL X, Y
+* ..
+*
* Purpose
* =======
*
-* SLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary
-* overflow.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary
+*> overflow.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* X (input) REAL
+*> \param[in] X
+*> \verbatim
+*> X is REAL
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is REAL
+*> X and Y specify the values x and y.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* Y (input) REAL
-* X and Y specify the values x and y.
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SLAPY2( X, Y )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL X, Y
+* ..
*
* =====================================================================
*
diff --git a/SRC/slapy3.f b/SRC/slapy3.f
index dceb0f00..77ca8f56 100644
--- a/SRC/slapy3.f
+++ b/SRC/slapy3.f
@@ -1,29 +1,73 @@
- REAL FUNCTION SLAPY3( X, Y, Z )
+*> \brief \b SLAPY3
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL X, Y, Z
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SLAPY3( X, Y, Z )
+*
+* .. Scalar Arguments ..
+* REAL X, Y, Z
+* ..
+*
* Purpose
* =======
*
-* SLAPY3 returns sqrt(x**2+y**2+z**2), taking care not to cause
-* unnecessary overflow.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAPY3 returns sqrt(x**2+y**2+z**2), taking care not to cause
+*> unnecessary overflow.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* X (input) REAL
+*> \param[in] X
+*> \verbatim
+*> X is REAL
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is REAL
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL
+*> X, Y and Z specify the values x, y and z.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Y (input) REAL
+*> \date November 2011
*
-* Z (input) REAL
-* X, Y and Z specify the values x, y and z.
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ REAL FUNCTION SLAPY3( X, Y, Z )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL X, Y, Z
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaqgb.f b/SRC/slaqgb.f
index e25ddac9..33c2bd29 100644
--- a/SRC/slaqgb.f
+++ b/SRC/slaqgb.f
@@ -1,10 +1,162 @@
+*> \brief \b SLAQGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED
+* INTEGER KL, KU, LDAB, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), C( * ), R( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQGB equilibrates a general M by N band matrix A with KL
+*> subdiagonals and KU superdiagonals using the row and scaling factors
+*> in the vectors R and C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix, in the same storage format
+*> as A. See EQUED for the form of the equilibrated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDA >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> The row scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> Ratio of the smallest R(i) to the largest R(i).
+*> \endverbatim
+*>
+*> \param[in] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> Ratio of the smallest C(i) to the largest C(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if row or column scaling
+*> should be done based on the ratio of the row or column scaling
+*> factors. If ROWCND < THRESH, row scaling is done, and if
+*> COLCND < THRESH, column scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if row scaling
+*> should be done based on the absolute size of the largest matrix
+*> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBauxiliary
+*
+* =====================================================================
SUBROUTINE SLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
$ AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED
@@ -15,77 +167,6 @@
REAL AB( LDAB, * ), C( * ), R( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAQGB equilibrates a general M by N band matrix A with KL
-* subdiagonals and KU superdiagonals using the row and scaling factors
-* in the vectors R and C.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
-*
-* On exit, the equilibrated matrix, in the same storage format
-* as A. See EQUED for the form of the equilibrated matrix.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDA >= KL+KU+1.
-*
-* R (input) REAL array, dimension (M)
-* The row scale factors for A.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A.
-*
-* ROWCND (input) REAL
-* Ratio of the smallest R(i) to the largest R(i).
-*
-* COLCND (input) REAL
-* Ratio of the smallest C(i) to the largest C(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if row or column scaling
-* should be done based on the ratio of the row or column scaling
-* factors. If ROWCND < THRESH, row scaling is done, and if
-* COLCND < THRESH, column scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if row scaling
-* should be done based on the absolute size of the largest matrix
-* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaqge.f b/SRC/slaqge.f
index 1e521bb0..878748bf 100644
--- a/SRC/slaqge.f
+++ b/SRC/slaqge.f
@@ -1,10 +1,144 @@
+*> \brief \b SLAQGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED
+* INTEGER LDA, M, N
+* REAL AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( * ), R( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQGE equilibrates a general M by N matrix A using the row and
+*> column scaling factors in the vectors R and C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M by N matrix A.
+*> On exit, the equilibrated matrix. See EQUED for the form of
+*> the equilibrated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is REAL array, dimension (M)
+*> The row scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (N)
+*> The column scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] ROWCND
+*> \verbatim
+*> ROWCND is REAL
+*> Ratio of the smallest R(i) to the largest R(i).
+*> \endverbatim
+*>
+*> \param[in] COLCND
+*> \verbatim
+*> COLCND is REAL
+*> Ratio of the smallest C(i) to the largest C(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if row or column scaling
+*> should be done based on the ratio of the row or column scaling
+*> factors. If ROWCND < THRESH, row scaling is done, and if
+*> COLCND < THRESH, column scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if row scaling
+*> should be done based on the absolute size of the largest matrix
+*> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGEauxiliary
+*
+* =====================================================================
SUBROUTINE SLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
$ EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED
@@ -15,66 +149,6 @@
REAL A( LDA, * ), C( * ), R( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAQGE equilibrates a general M by N matrix A using the row and
-* column scaling factors in the vectors R and C.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M by N matrix A.
-* On exit, the equilibrated matrix. See EQUED for the form of
-* the equilibrated matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
-*
-* R (input) REAL array, dimension (M)
-* The row scale factors for A.
-*
-* C (input) REAL array, dimension (N)
-* The column scale factors for A.
-*
-* ROWCND (input) REAL
-* Ratio of the smallest R(i) to the largest R(i).
-*
-* COLCND (input) REAL
-* Ratio of the smallest C(i) to the largest C(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if row or column scaling
-* should be done based on the ratio of the row or column scaling
-* factors. If ROWCND < THRESH, row scaling is done, and if
-* COLCND < THRESH, column scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if row scaling
-* should be done based on the absolute size of the largest matrix
-* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaqp2.f b/SRC/slaqp2.f
index 6e6ab885..c17ccaa5 100644
--- a/SRC/slaqp2.f
+++ b/SRC/slaqp2.f
@@ -1,82 +1,158 @@
- SUBROUTINE SLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
- $ WORK )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER LDA, M, N, OFFSET
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b SLAQP2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+* WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, M, N, OFFSET
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLAQP2 computes a QR factorization with column pivoting of
-* the block A(OFFSET+1:M,1:N).
-* The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQP2 computes a QR factorization with column pivoting of
+*> the block A(OFFSET+1:M,1:N).
+*> The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* OFFSET (input) INTEGER
-* The number of rows of the matrix A that must be pivoted
-* but no factorized. OFFSET >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
-* the triangular factor obtained; the elements in block
-* A(OFFSET+1:M,1:N) below the diagonal, together with the
-* array TAU, represent the orthogonal matrix Q as a product of
-* elementary reflectors. Block A(1:OFFSET,1:N) has been
-* accordingly pivoted, but no factorized.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(i) = 0,
-* the i-th column of A is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> The number of rows of the matrix A that must be pivoted
+*> but no factorized. OFFSET >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
+*> the triangular factor obtained; the elements in block
+*> A(OFFSET+1:M,1:N) below the diagonal, together with the
+*> array TAU, represent the orthogonal matrix Q as a product of
+*> elementary reflectors. Block A(1:OFFSET,1:N) has been
+*> accordingly pivoted, but no factorized.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(i) = 0,
+*> the i-th column of A is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*> VN1 is REAL array, dimension (N)
+*> The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*> VN2 is REAL array, dimension (N)
+*> The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* VN1 (input/output) REAL array, dimension (N)
-* The vector with the partial column norms.
+*> \date November 2011
*
-* VN2 (input/output) REAL array, dimension (N)
-* The vector with the exact column norms.
+*> \ingroup realOTHERauxiliary
*
-* WORK (workspace) REAL array, dimension (N)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+ $ WORK )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* .. Scalar Arguments ..
+ INTEGER LDA, M, N, OFFSET
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
+ $ WORK( * )
+* ..
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaqps.f b/SRC/slaqps.f
index 6c229cc2..193ff470 100644
--- a/SRC/slaqps.f
+++ b/SRC/slaqps.f
@@ -1,98 +1,186 @@
- SUBROUTINE SLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
- $ VN2, AUXV, F, LDF )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER KB, LDA, LDF, M, N, NB, OFFSET
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
- $ VN1( * ), VN2( * )
-* ..
-*
+*> \brief \b SLAQPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+* VN2, AUXV, F, LDF )
+*
+* .. Scalar Arguments ..
+* INTEGER KB, LDA, LDF, M, N, NB, OFFSET
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
+* $ VN1( * ), VN2( * )
+* ..
+*
* Purpose
* =======
*
-* SLAQPS computes a step of QR factorization with column pivoting
-* of a real M-by-N matrix A by using Blas-3. It tries to factorize
-* NB columns from A starting from the row OFFSET+1, and updates all
-* of the matrix with Blas-3 xGEMM.
-*
-* In some cases, due to catastrophic cancellations, it cannot
-* factorize NB columns. Hence, the actual number of factorized
-* columns is returned in KB.
-*
-* Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQPS computes a step of QR factorization with column pivoting
+*> of a real M-by-N matrix A by using Blas-3. It tries to factorize
+*> NB columns from A starting from the row OFFSET+1, and updates all
+*> of the matrix with Blas-3 xGEMM.
+*>
+*> In some cases, due to catastrophic cancellations, it cannot
+*> factorize NB columns. Hence, the actual number of factorized
+*> columns is returned in KB.
+*>
+*> Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0
-*
-* OFFSET (input) INTEGER
-* The number of rows of A that have been factorized in
-* previous steps.
-*
-* NB (input) INTEGER
-* The number of columns to factorize.
-*
-* KB (output) INTEGER
-* The number of columns actually factorized.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, block A(OFFSET+1:M,1:KB) is the triangular
-* factor obtained and block A(1:OFFSET,1:N) has been
-* accordingly pivoted, but no factorized.
-* The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
-* been updated.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* JPVT(I) = K <==> Column K of the full matrix A has been
-* permuted into position I in AP.
-*
-* TAU (output) REAL array, dimension (KB)
-* The scalar factors of the elementary reflectors.
-*
-* VN1 (input/output) REAL array, dimension (N)
-* The vector with the partial column norms.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> The number of rows of A that have been factorized in
+*> previous steps.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to factorize.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns actually factorized.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, block A(OFFSET+1:M,1:KB) is the triangular
+*> factor obtained and block A(1:OFFSET,1:N) has been
+*> accordingly pivoted, but no factorized.
+*> The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
+*> been updated.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> JPVT(I) = K <==> Column K of the full matrix A has been
+*> permuted into position I in AP.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (KB)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*> VN1 is REAL array, dimension (N)
+*> The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*> VN2 is REAL array, dimension (N)
+*> The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[in,out] AUXV
+*> \verbatim
+*> AUXV is REAL array, dimension (NB)
+*> Auxiliar vector.
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is REAL array, dimension (LDF,NB)
+*> Matrix F**T = L*Y**T*A.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the array F. LDF >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* VN2 (input/output) REAL array, dimension (N)
-* The vector with the exact column norms.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AUXV (input/output) REAL array, dimension (NB)
-* Auxiliar vector.
+*> \date November 2011
*
-* F (input/output) REAL array, dimension (LDF,NB)
-* Matrix F**T = L*Y**T*A.
+*> \ingroup realOTHERauxiliary
*
-* LDF (input) INTEGER
-* The leading dimension of the array F. LDF >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+ $ VN2, AUXV, F, LDF )
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER KB, LDA, LDF, M, N, NB, OFFSET
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
+ $ VN1( * ), VN2( * )
+* ..
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaqr0.f b/SRC/slaqr0.f
index c5b76367..6fe4c461 100644
--- a/SRC/slaqr0.f
+++ b/SRC/slaqr0.f
@@ -1,176 +1,280 @@
- SUBROUTINE SLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
- $ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*> \brief \b SLAQR0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+* ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* REAL H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQR0 computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**T, where T is an upper quasi-triangular matrix (the
+*> Schur form), and Z is the orthogonal matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input orthogonal
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
- LOGICAL WANTT, WANTZ
-* ..
-* .. Array Arguments ..
- REAL H( LDH, * ), WI( * ), WORK( * ), WR( * ),
- $ Z( LDZ, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*> H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*> previous call to SGEBAL, and then passed to SGEHRD when the
+*> matrix output by SGEBAL is reduced to Hessenberg form.
+*> Otherwise, ILO and IHI should be set to 1 and N,
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and WANTT is .TRUE., then H contains
+*> the upper quasi-triangular matrix T from the Schur
+*> decomposition (the Schur form); 2-by-2 diagonal blocks
+*> (corresponding to complex conjugate pairs of eigenvalues)
+*> are returned in standard form, with H(i,i) = H(i+1,i+1)
+*> and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is
+*> .FALSE., then the contents of H are unspecified on exit.
+*> (The output value of H when INFO.GT.0 is given under the
+*> description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*> j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (IHI)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (IHI)
+*> The real and imaginary parts, respectively, of the computed
+*> eigenvalues of H(ILO:IHI,ILO:IHI) are stored in WR(ILO:IHI)
+*> and WI(ILO:IHI). If two eigenvalues are computed as a
+*> complex conjugate pair, they are stored in consecutive
+*> elements of WR and WI, say the i-th and (i+1)th, with
+*> WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then
+*> the eigenvalues are stored in the same order as on the
+*> diagonal of the Schur form returned in H, with
+*> WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal
+*> block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
+*> WI(i+1) = -WI(i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE..
+*> 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,IHI)
+*> If WANTZ is .FALSE., then Z is not referenced.
+*> If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*> replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*> orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*> (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if WANTZ is .TRUE.
+*> then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension LWORK
+*> On exit, if LWORK = -1, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient, but LWORK typically as large as 6*N may
+*> be required for optimal performance. A workspace query
+*> to determine the optimal workspace size is recommended.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then SLAQR0 does a workspace query.
+*> In this case, SLAQR0 checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, SLAQR0 failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is an orthogonal matrix. The final
+*> value of H is upper Hessenberg and quasi-triangular
+*> in rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*> = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the orthogonal matrix in (*) (regard-
+*> less of the value of WANTT.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* SLAQR0 computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**T, where T is an upper quasi-triangular matrix (the
-* Schur form), and Z is the orthogonal matrix of Schur vectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Optionally Z may be postmultiplied into an input orthogonal
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup realOTHERauxiliary
*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-* previous call to SGEBAL, and then passed to SGEHRD when the
-* matrix output by SGEBAL is reduced to Hessenberg form.
-* Otherwise, ILO and IHI should be set to 1 and N,
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) REAL array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and WANTT is .TRUE., then H contains
-* the upper quasi-triangular matrix T from the Schur
-* decomposition (the Schur form); 2-by-2 diagonal blocks
-* (corresponding to complex conjugate pairs of eigenvalues)
-* are returned in standard form, with H(i,i) = H(i+1,i+1)
-* and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is
-* .FALSE., then the contents of H are unspecified on exit.
-* (The output value of H when INFO.GT.0 is given under the
-* description of INFO below.)
-*
-* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* WR (output) REAL array, dimension (IHI)
-*
-* WI (output) REAL array, dimension (IHI)
-* The real and imaginary parts, respectively, of the computed
-* eigenvalues of H(ILO:IHI,ILO:IHI) are stored in WR(ILO:IHI)
-* and WI(ILO:IHI). If two eigenvalues are computed as a
-* complex conjugate pair, they are stored in consecutive
-* elements of WR and WI, say the i-th and (i+1)th, with
-* WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then
-* the eigenvalues are stored in the same order as on the
-* diagonal of the Schur form returned in H, with
-* WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal
-* block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
-* WI(i+1) = -WI(i).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE..
-* 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
-*
-* Z (input/output) REAL array, dimension (LDZ,IHI)
-* If WANTZ is .FALSE., then Z is not referenced.
-* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-* orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-* (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if WANTZ is .TRUE.
-* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) REAL array, dimension LWORK
-* On exit, if LWORK = -1, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient, but LWORK typically as large as 6*N may
-* be required for optimal performance. A workspace query
-* to determine the optimal workspace size is recommended.
-*
-* If LWORK = -1, then SLAQR0 does a workspace query.
-* In this case, SLAQR0 checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, SLAQR0 failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and WANT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is an orthogonal matrix. The final
-* value of H is upper Hessenberg and quasi-triangular
-* in rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*
-* (final value of Z(ILO:IHI,ILOZ:IHIZ)
-* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
-*
-* where U is the orthogonal matrix in (*) (regard-
-* less of the value of WANTT.)
-*
-* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-* accessed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> References:
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*> Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*> 929--947, 2002.
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*> of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+ $ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* References:
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-* Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-* 929--947, 2002.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-* of Matrix Analysis, volume 23, pages 948--973, 2002.
+* .. Scalar Arguments ..
+ INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+ LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+ REAL H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+ $ Z( LDZ, * )
+* ..
*
* ================================================================
* .. Parameters ..
diff --git a/SRC/slaqr1.f b/SRC/slaqr1.f
index 31323059..b8be5849 100644
--- a/SRC/slaqr1.f
+++ b/SRC/slaqr1.f
@@ -1,67 +1,136 @@
- SUBROUTINE SLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- REAL SI1, SI2, SR1, SR2
- INTEGER LDH, N
-* ..
-* .. Array Arguments ..
- REAL H( LDH, * ), V( * )
-* ..
-*
+*> \brief \b SLAQR1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
+*
+* .. Scalar Arguments ..
+* REAL SI1, SI2, SR1, SR2
+* INTEGER LDH, N
+* ..
+* .. Array Arguments ..
+* REAL H( LDH, * ), V( * )
+* ..
+*
* Purpose
* =======
*
-* Given a 2-by-2 or 3-by-3 matrix H, SLAQR1 sets v to a
-* scalar multiple of the first column of the product
-*
-* (*) K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)
-*
-* scaling to avoid overflows and most underflows. It
-* is assumed that either
-*
-* 1) sr1 = sr2 and si1 = -si2
-* or
-* 2) si1 = si2 = 0.
-*
-* This is useful for starting double implicit shift bulges
-* in the QR algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given a 2-by-2 or 3-by-3 matrix H, SLAQR1 sets v to a
+*> scalar multiple of the first column of the product
+*>
+*> (*) K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I)
+*>
+*> scaling to avoid overflows and most underflows. It
+*> is assumed that either
+*>
+*> 1) sr1 = sr2 and si1 = -si2
+*> or
+*> 2) si1 = si2 = 0.
+*>
+*> This is useful for starting double implicit shift bulges
+*> in the QR algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) integer
-* Order of the matrix H. N must be either 2 or 3.
-*
-* H (input) REAL array of dimension (LDH,N)
-* The 2-by-2 or 3-by-3 matrix H in (*).
-*
-* LDH (input) integer
-* The leading dimension of H as declared in
-* the calling procedure. LDH.GE.N
-*
-* SR1 (input) REAL
+*> \param[in] N
+*> \verbatim
+*> N is integer
+*> Order of the matrix H. N must be either 2 or 3.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is REAL array of dimension (LDH,N)
+*> The 2-by-2 or 3-by-3 matrix H in (*).
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> The leading dimension of H as declared in
+*> the calling procedure. LDH.GE.N
+*> \endverbatim
+*>
+*> \param[in] SR1
+*> \verbatim
+*> SR1 is REAL
+*> \endverbatim
+*>
+*> \param[in] SI1
+*> \verbatim
+*> SI1 is REAL
+*> \endverbatim
+*>
+*> \param[in] SR2
+*> \verbatim
+*> SR2 is REAL
+*> \endverbatim
+*>
+*> \param[in] SI2
+*> \verbatim
+*> SI2 is REAL
+*> The shifts in (*).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array of dimension N
+*> A scalar multiple of the first column of the
+*> matrix K in (*).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SI1 (input) REAL
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SR2 (input) REAL
+*> \date November 2011
*
-* SI2 (input) REAL
-* The shifts in (*).
+*> \ingroup realOTHERauxiliary
*
-* V (output) REAL array of dimension N
-* A scalar multiple of the first column of the
-* matrix K in (*).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
+* .. Scalar Arguments ..
+ REAL SI1, SI2, SR1, SR2
+ INTEGER LDH, N
+* ..
+* .. Array Arguments ..
+ REAL H( LDH, * ), V( * )
+* ..
*
* ================================================================
*
diff --git a/SRC/slaqr2.f b/SRC/slaqr2.f
index be72e1ce..d8d4f734 100644
--- a/SRC/slaqr2.f
+++ b/SRC/slaqr2.f
@@ -1,10 +1,286 @@
+*> \brief \b SLAQR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+* IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
+* LDT, NV, WV, LDWV, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+* $ LDZ, LWORK, N, ND, NH, NS, NV, NW
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* REAL H( LDH, * ), SI( * ), SR( * ), T( LDT, * ),
+* $ V( LDV, * ), WORK( * ), WV( LDWV, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQR2 is identical to SLAQR3 except that it avoids
+*> recursion by calling SLAHQR instead of SLAQR4.
+*>
+*> Aggressive early deflation:
+*>
+*> This subroutine accepts as input an upper Hessenberg matrix
+*> H and performs an orthogonal similarity transformation
+*> designed to detect and deflate fully converged eigenvalues from
+*> a trailing principal submatrix. On output H has been over-
+*> written by a new Hessenberg matrix that is a perturbation of
+*> an orthogonal similarity transformation of H. It is to be
+*> hoped that the final version of H has many zero subdiagonal
+*> entries.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> If .TRUE., then the Hessenberg matrix H is fully updated
+*> so that the quasi-triangular Schur factor may be
+*> computed (in cooperation with the calling subroutine).
+*> If .FALSE., then only enough of H is updated to preserve
+*> the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> If .TRUE., then the orthogonal matrix Z is updated so
+*> so that the orthogonal Schur factor may be computed
+*> (in cooperation with the calling subroutine).
+*> If .FALSE., then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H and (if WANTZ is .TRUE.) the
+*> order of the orthogonal matrix Z.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is INTEGER
+*> It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*> KBOT and KTOP together determine an isolated block
+*> along the diagonal of the Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is INTEGER
+*> It is assumed without a check that either
+*> KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
+*> determine an isolated block along the diagonal of the
+*> Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> On input the initial N-by-N section of H stores the
+*> Hessenberg matrix undergoing aggressive early deflation.
+*> On output H has been transformed by an orthogonal
+*> similarity transformation, perturbed, and the returned
+*> to Hessenberg form that (it is to be hoped) has some
+*> zero subdiagonal entries.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> Leading dimension of H just as declared in the calling
+*> subroutine. N .LE. LDH
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,N)
+*> IF WANTZ is .TRUE., then on output, the orthogonal
+*> similarity transformation mentioned above has been
+*> accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer
+*> The leading dimension of Z just as declared in the
+*> calling subroutine. 1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*> NS is integer
+*> The number of unconverged (ie approximate) eigenvalues
+*> returned in SR and SI that may be used as shifts by the
+*> calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is integer
+*> The number of converged eigenvalues uncovered by this
+*> subroutine.
+*> \endverbatim
+*>
+*> \param[out] SR
+*> \verbatim
+*> SR is REAL array, dimension KBOT
+*> \endverbatim
+*>
+*> \param[out] SI
+*> \verbatim
+*> SI is REAL array, dimension KBOT
+*> On output, the real and imaginary parts of approximate
+*> eigenvalues that may be used for shifts are stored in
+*> SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
+*> SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively.
+*> The real and imaginary parts of converged eigenvalues
+*> are stored in SR(KBOT-ND+1) through SR(KBOT) and
+*> SI(KBOT-ND+1) through SI(KBOT), respectively.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,NW)
+*> An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> The leading dimension of V just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> The number of columns of T. NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is integer
+*> The leading dimension of T just as declared in the
+*> calling subroutine. NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer
+*> The number of rows of work array WV available for
+*> workspace. NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is REAL array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer
+*> The leading dimension of W just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension LWORK.
+*> On exit, WORK(1) is set to an estimate of the optimal value
+*> of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer
+*> The dimension of the work array WORK. LWORK = 2*NW
+*> suffices, but greater efficiency may result from larger
+*> values of LWORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; SLAQR2
+*> only estimates the optimal workspace size for the given
+*> values of N, NW, KTOP and KBOT. The estimate is returned
+*> in WORK(1). No error message related to LWORK is issued
+*> by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
$ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
$ LDT, NV, WV, LDWV, WORK, LWORK )
*
-* -- LAPACK auxiliary routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- April 2009 --
+* -- LAPACK auxiliary routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -17,153 +293,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAQR2 is identical to SLAQR3 except that it avoids
-* recursion by calling SLAHQR instead of SLAQR4.
-*
-* Aggressive early deflation:
-*
-* This subroutine accepts as input an upper Hessenberg matrix
-* H and performs an orthogonal similarity transformation
-* designed to detect and deflate fully converged eigenvalues from
-* a trailing principal submatrix. On output H has been over-
-* written by a new Hessenberg matrix that is a perturbation of
-* an orthogonal similarity transformation of H. It is to be
-* hoped that the final version of H has many zero subdiagonal
-* entries.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* If .TRUE., then the Hessenberg matrix H is fully updated
-* so that the quasi-triangular Schur factor may be
-* computed (in cooperation with the calling subroutine).
-* If .FALSE., then only enough of H is updated to preserve
-* the eigenvalues.
-*
-* WANTZ (input) LOGICAL
-* If .TRUE., then the orthogonal matrix Z is updated so
-* so that the orthogonal Schur factor may be computed
-* (in cooperation with the calling subroutine).
-* If .FALSE., then Z is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix H and (if WANTZ is .TRUE.) the
-* order of the orthogonal matrix Z.
-*
-* KTOP (input) INTEGER
-* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-* KBOT and KTOP together determine an isolated block
-* along the diagonal of the Hessenberg matrix.
-*
-* KBOT (input) INTEGER
-* It is assumed without a check that either
-* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
-* determine an isolated block along the diagonal of the
-* Hessenberg matrix.
-*
-* NW (input) INTEGER
-* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
-*
-* H (input/output) REAL array, dimension (LDH,N)
-* On input the initial N-by-N section of H stores the
-* Hessenberg matrix undergoing aggressive early deflation.
-* On output H has been transformed by an orthogonal
-* similarity transformation, perturbed, and the returned
-* to Hessenberg form that (it is to be hoped) has some
-* zero subdiagonal entries.
-*
-* LDH (input) integer
-* Leading dimension of H just as declared in the calling
-* subroutine. N .LE. LDH
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*
-* Z (input/output) REAL array, dimension (LDZ,N)
-* IF WANTZ is .TRUE., then on output, the orthogonal
-* similarity transformation mentioned above has been
-* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ is .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer
-* The leading dimension of Z just as declared in the
-* calling subroutine. 1 .LE. LDZ.
-*
-* NS (output) integer
-* The number of unconverged (ie approximate) eigenvalues
-* returned in SR and SI that may be used as shifts by the
-* calling subroutine.
-*
-* ND (output) integer
-* The number of converged eigenvalues uncovered by this
-* subroutine.
-*
-* SR (output) REAL array, dimension KBOT
-*
-* SI (output) REAL array, dimension KBOT
-* On output, the real and imaginary parts of approximate
-* eigenvalues that may be used for shifts are stored in
-* SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
-* SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively.
-* The real and imaginary parts of converged eigenvalues
-* are stored in SR(KBOT-ND+1) through SR(KBOT) and
-* SI(KBOT-ND+1) through SI(KBOT), respectively.
-*
-* V (workspace) REAL array, dimension (LDV,NW)
-* An NW-by-NW work array.
-*
-* LDV (input) integer scalar
-* The leading dimension of V just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* NH (input) integer scalar
-* The number of columns of T. NH.GE.NW.
-*
-* T (workspace) REAL array, dimension (LDT,NW)
-*
-* LDT (input) integer
-* The leading dimension of T just as declared in the
-* calling subroutine. NW .LE. LDT
-*
-* NV (input) integer
-* The number of rows of work array WV available for
-* workspace. NV.GE.NW.
-*
-* WV (workspace) REAL array, dimension (LDWV,NW)
-*
-* LDWV (input) integer
-* The leading dimension of W just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* WORK (workspace) REAL array, dimension LWORK.
-* On exit, WORK(1) is set to an estimate of the optimal value
-* of LWORK for the given values of N, NW, KTOP and KBOT.
-*
-* LWORK (input) integer
-* The dimension of the work array WORK. LWORK = 2*NW
-* suffices, but greater efficiency may result from larger
-* values of LWORK.
-*
-* If LWORK = -1, then a workspace query is assumed; SLAQR2
-* only estimates the optimal workspace size for the given
-* values of N, NW, KTOP and KBOT. The estimate is returned
-* in WORK(1). No error message related to LWORK is issued
-* by XERBLA. Neither H nor Z are accessed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
* ================================================================
* .. Parameters ..
REAL ZERO, ONE
diff --git a/SRC/slaqr3.f b/SRC/slaqr3.f
index 885eeece..0387f420 100644
--- a/SRC/slaqr3.f
+++ b/SRC/slaqr3.f
@@ -1,10 +1,283 @@
+*> \brief \b SLAQR3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+* IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
+* LDT, NV, WV, LDWV, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+* $ LDZ, LWORK, N, ND, NH, NS, NV, NW
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* REAL H( LDH, * ), SI( * ), SR( * ), T( LDT, * ),
+* $ V( LDV, * ), WORK( * ), WV( LDWV, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Aggressive early deflation:
+*>
+*> SLAQR3 accepts as input an upper Hessenberg matrix
+*> H and performs an orthogonal similarity transformation
+*> designed to detect and deflate fully converged eigenvalues from
+*> a trailing principal submatrix. On output H has been over-
+*> written by a new Hessenberg matrix that is a perturbation of
+*> an orthogonal similarity transformation of H. It is to be
+*> hoped that the final version of H has many zero subdiagonal
+*> entries.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> If .TRUE., then the Hessenberg matrix H is fully updated
+*> so that the quasi-triangular Schur factor may be
+*> computed (in cooperation with the calling subroutine).
+*> If .FALSE., then only enough of H is updated to preserve
+*> the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> If .TRUE., then the orthogonal matrix Z is updated so
+*> so that the orthogonal Schur factor may be computed
+*> (in cooperation with the calling subroutine).
+*> If .FALSE., then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H and (if WANTZ is .TRUE.) the
+*> order of the orthogonal matrix Z.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is INTEGER
+*> It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*> KBOT and KTOP together determine an isolated block
+*> along the diagonal of the Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is INTEGER
+*> It is assumed without a check that either
+*> KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
+*> determine an isolated block along the diagonal of the
+*> Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> On input the initial N-by-N section of H stores the
+*> Hessenberg matrix undergoing aggressive early deflation.
+*> On output H has been transformed by an orthogonal
+*> similarity transformation, perturbed, and the returned
+*> to Hessenberg form that (it is to be hoped) has some
+*> zero subdiagonal entries.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> Leading dimension of H just as declared in the calling
+*> subroutine. N .LE. LDH
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,N)
+*> IF WANTZ is .TRUE., then on output, the orthogonal
+*> similarity transformation mentioned above has been
+*> accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer
+*> The leading dimension of Z just as declared in the
+*> calling subroutine. 1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*> NS is integer
+*> The number of unconverged (ie approximate) eigenvalues
+*> returned in SR and SI that may be used as shifts by the
+*> calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is integer
+*> The number of converged eigenvalues uncovered by this
+*> subroutine.
+*> \endverbatim
+*>
+*> \param[out] SR
+*> \verbatim
+*> SR is REAL array, dimension KBOT
+*> \endverbatim
+*>
+*> \param[out] SI
+*> \verbatim
+*> SI is REAL array, dimension KBOT
+*> On output, the real and imaginary parts of approximate
+*> eigenvalues that may be used for shifts are stored in
+*> SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
+*> SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively.
+*> The real and imaginary parts of converged eigenvalues
+*> are stored in SR(KBOT-ND+1) through SR(KBOT) and
+*> SI(KBOT-ND+1) through SI(KBOT), respectively.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,NW)
+*> An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> The leading dimension of V just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> The number of columns of T. NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is integer
+*> The leading dimension of T just as declared in the
+*> calling subroutine. NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer
+*> The number of rows of work array WV available for
+*> workspace. NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is REAL array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer
+*> The leading dimension of W just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension LWORK.
+*> On exit, WORK(1) is set to an estimate of the optimal value
+*> of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer
+*> The dimension of the work array WORK. LWORK = 2*NW
+*> suffices, but greater efficiency may result from larger
+*> values of LWORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; SLAQR3
+*> only estimates the optimal workspace size for the given
+*> values of N, NW, KTOP and KBOT. The estimate is returned
+*> in WORK(1). No error message related to LWORK is issued
+*> by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
$ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
$ LDT, NV, WV, LDWV, WORK, LWORK )
*
-* -- LAPACK auxiliary routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- April 2009 --
+* -- LAPACK auxiliary routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -17,150 +290,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* Aggressive early deflation:
-*
-* SLAQR3 accepts as input an upper Hessenberg matrix
-* H and performs an orthogonal similarity transformation
-* designed to detect and deflate fully converged eigenvalues from
-* a trailing principal submatrix. On output H has been over-
-* written by a new Hessenberg matrix that is a perturbation of
-* an orthogonal similarity transformation of H. It is to be
-* hoped that the final version of H has many zero subdiagonal
-* entries.
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* If .TRUE., then the Hessenberg matrix H is fully updated
-* so that the quasi-triangular Schur factor may be
-* computed (in cooperation with the calling subroutine).
-* If .FALSE., then only enough of H is updated to preserve
-* the eigenvalues.
-*
-* WANTZ (input) LOGICAL
-* If .TRUE., then the orthogonal matrix Z is updated so
-* so that the orthogonal Schur factor may be computed
-* (in cooperation with the calling subroutine).
-* If .FALSE., then Z is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix H and (if WANTZ is .TRUE.) the
-* order of the orthogonal matrix Z.
-*
-* KTOP (input) INTEGER
-* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-* KBOT and KTOP together determine an isolated block
-* along the diagonal of the Hessenberg matrix.
-*
-* KBOT (input) INTEGER
-* It is assumed without a check that either
-* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
-* determine an isolated block along the diagonal of the
-* Hessenberg matrix.
-*
-* NW (input) INTEGER
-* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
-*
-* H (input/output) REAL array, dimension (LDH,N)
-* On input the initial N-by-N section of H stores the
-* Hessenberg matrix undergoing aggressive early deflation.
-* On output H has been transformed by an orthogonal
-* similarity transformation, perturbed, and the returned
-* to Hessenberg form that (it is to be hoped) has some
-* zero subdiagonal entries.
-*
-* LDH (input) integer
-* Leading dimension of H just as declared in the calling
-* subroutine. N .LE. LDH
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*
-* Z (input/output) REAL array, dimension (LDZ,N)
-* IF WANTZ is .TRUE., then on output, the orthogonal
-* similarity transformation mentioned above has been
-* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ is .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer
-* The leading dimension of Z just as declared in the
-* calling subroutine. 1 .LE. LDZ.
-*
-* NS (output) integer
-* The number of unconverged (ie approximate) eigenvalues
-* returned in SR and SI that may be used as shifts by the
-* calling subroutine.
-*
-* ND (output) integer
-* The number of converged eigenvalues uncovered by this
-* subroutine.
-*
-* SR (output) REAL array, dimension KBOT
-*
-* SI (output) REAL array, dimension KBOT
-* On output, the real and imaginary parts of approximate
-* eigenvalues that may be used for shifts are stored in
-* SR(KBOT-ND-NS+1) through SR(KBOT-ND) and
-* SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively.
-* The real and imaginary parts of converged eigenvalues
-* are stored in SR(KBOT-ND+1) through SR(KBOT) and
-* SI(KBOT-ND+1) through SI(KBOT), respectively.
-*
-* V (workspace) REAL array, dimension (LDV,NW)
-* An NW-by-NW work array.
-*
-* LDV (input) integer scalar
-* The leading dimension of V just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* NH (input) integer scalar
-* The number of columns of T. NH.GE.NW.
-*
-* T (workspace) REAL array, dimension (LDT,NW)
-*
-* LDT (input) integer
-* The leading dimension of T just as declared in the
-* calling subroutine. NW .LE. LDT
-*
-* NV (input) integer
-* The number of rows of work array WV available for
-* workspace. NV.GE.NW.
-*
-* WV (workspace) REAL array, dimension (LDWV,NW)
-*
-* LDWV (input) integer
-* The leading dimension of W just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* WORK (workspace) REAL array, dimension LWORK.
-* On exit, WORK(1) is set to an estimate of the optimal value
-* of LWORK for the given values of N, NW, KTOP and KBOT.
-*
-* LWORK (input) integer
-* The dimension of the work array WORK. LWORK = 2*NW
-* suffices, but greater efficiency may result from larger
-* values of LWORK.
-*
-* If LWORK = -1, then a workspace query is assumed; SLAQR3
-* only estimates the optimal workspace size for the given
-* values of N, NW, KTOP and KBOT. The estimate is returned
-* in WORK(1). No error message related to LWORK is issued
-* by XERBLA. Neither H nor Z are accessed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
* ================================================================
* .. Parameters ..
REAL ZERO, ONE
diff --git a/SRC/slaqr4.f b/SRC/slaqr4.f
index bd27750b..efd75a0b 100644
--- a/SRC/slaqr4.f
+++ b/SRC/slaqr4.f
@@ -1,183 +1,287 @@
- SUBROUTINE SLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
- $ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*> \brief \b SLAQR4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+* ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* REAL H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQR4 implements one level of recursion for SLAQR0.
+*> It is a complete implementation of the small bulge multi-shift
+*> QR algorithm. It may be called by SLAQR0 and, for large enough
+*> deflation window size, it may be called by SLAQR3. This
+*> subroutine is identical to SLAQR0 except that it calls SLAQR2
+*> instead of SLAQR3.
+*>
+*> SLAQR4 computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**T, where T is an upper quasi-triangular matrix (the
+*> Schur form), and Z is the orthogonal matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input orthogonal
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
- LOGICAL WANTT, WANTZ
-* ..
-* .. Array Arguments ..
- REAL H( LDH, * ), WI( * ), WORK( * ), WR( * ),
- $ Z( LDZ, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*> H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*> previous call to SGEBAL, and then passed to SGEHRD when the
+*> matrix output by SGEBAL is reduced to Hessenberg form.
+*> Otherwise, ILO and IHI should be set to 1 and N,
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and WANTT is .TRUE., then H contains
+*> the upper quasi-triangular matrix T from the Schur
+*> decomposition (the Schur form); 2-by-2 diagonal blocks
+*> (corresponding to complex conjugate pairs of eigenvalues)
+*> are returned in standard form, with H(i,i) = H(i+1,i+1)
+*> and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is
+*> .FALSE., then the contents of H are unspecified on exit.
+*> (The output value of H when INFO.GT.0 is given under the
+*> description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*> j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (IHI)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (IHI)
+*> The real and imaginary parts, respectively, of the computed
+*> eigenvalues of H(ILO:IHI,ILO:IHI) are stored in WR(ILO:IHI)
+*> and WI(ILO:IHI). If two eigenvalues are computed as a
+*> complex conjugate pair, they are stored in consecutive
+*> elements of WR and WI, say the i-th and (i+1)th, with
+*> WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then
+*> the eigenvalues are stored in the same order as on the
+*> diagonal of the Schur form returned in H, with
+*> WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal
+*> block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
+*> WI(i+1) = -WI(i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE..
+*> 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,IHI)
+*> If WANTZ is .FALSE., then Z is not referenced.
+*> If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*> replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*> orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*> (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if WANTZ is .TRUE.
+*> then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension LWORK
+*> On exit, if LWORK = -1, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient, but LWORK typically as large as 6*N may
+*> be required for optimal performance. A workspace query
+*> to determine the optimal workspace size is recommended.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then SLAQR4 does a workspace query.
+*> In this case, SLAQR4 checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, SLAQR4 failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is an orthogonal matrix. The final
+*> value of H is upper Hessenberg and quasi-triangular
+*> in rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*> = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the orthogonal matrix in (*) (regard-
+*> less of the value of WANTT.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* SLAQR4 implements one level of recursion for SLAQR0.
-* It is a complete implementation of the small bulge multi-shift
-* QR algorithm. It may be called by SLAQR0 and, for large enough
-* deflation window size, it may be called by SLAQR3. This
-* subroutine is identical to SLAQR0 except that it calls SLAQR2
-* instead of SLAQR3.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SLAQR4 computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**T, where T is an upper quasi-triangular matrix (the
-* Schur form), and Z is the orthogonal matrix of Schur vectors.
+*> \date November 2011
*
-* Optionally Z may be postmultiplied into an input orthogonal
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
+*> \ingroup realOTHERauxiliary
*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-* previous call to SGEBAL, and then passed to SGEHRD when the
-* matrix output by SGEBAL is reduced to Hessenberg form.
-* Otherwise, ILO and IHI should be set to 1 and N,
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) REAL array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and WANTT is .TRUE., then H contains
-* the upper quasi-triangular matrix T from the Schur
-* decomposition (the Schur form); 2-by-2 diagonal blocks
-* (corresponding to complex conjugate pairs of eigenvalues)
-* are returned in standard form, with H(i,i) = H(i+1,i+1)
-* and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is
-* .FALSE., then the contents of H are unspecified on exit.
-* (The output value of H when INFO.GT.0 is given under the
-* description of INFO below.)
-*
-* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* WR (output) REAL array, dimension (IHI)
-*
-* WI (output) REAL array, dimension (IHI)
-* The real and imaginary parts, respectively, of the computed
-* eigenvalues of H(ILO:IHI,ILO:IHI) are stored in WR(ILO:IHI)
-* and WI(ILO:IHI). If two eigenvalues are computed as a
-* complex conjugate pair, they are stored in consecutive
-* elements of WR and WI, say the i-th and (i+1)th, with
-* WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then
-* the eigenvalues are stored in the same order as on the
-* diagonal of the Schur form returned in H, with
-* WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal
-* block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
-* WI(i+1) = -WI(i).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE..
-* 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
-*
-* Z (input/output) REAL array, dimension (LDZ,IHI)
-* If WANTZ is .FALSE., then Z is not referenced.
-* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-* orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-* (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if WANTZ is .TRUE.
-* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) REAL array, dimension LWORK
-* On exit, if LWORK = -1, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient, but LWORK typically as large as 6*N may
-* be required for optimal performance. A workspace query
-* to determine the optimal workspace size is recommended.
-*
-* If LWORK = -1, then SLAQR4 does a workspace query.
-* In this case, SLAQR4 checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, SLAQR4 failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and WANT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is an orthogonal matrix. The final
-* value of H is upper Hessenberg and quasi-triangular
-* in rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*
-* (final value of Z(ILO:IHI,ILOZ:IHIZ)
-* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
-*
-* where U is the orthogonal matrix in (*) (regard-
-* less of the value of WANTT.)
-*
-* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-* accessed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> References:
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*> Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*> 929--947, 2002.
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*> of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
+ $ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* References:
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-* Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-* 929--947, 2002.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-* of Matrix Analysis, volume 23, pages 948--973, 2002.
+* .. Scalar Arguments ..
+ INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+ LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+ REAL H( LDH, * ), WI( * ), WORK( * ), WR( * ),
+ $ Z( LDZ, * )
+* ..
*
* ================================================================
*
diff --git a/SRC/slaqr5.f b/SRC/slaqr5.f
index c0d8bbaa..9569f9be 100644
--- a/SRC/slaqr5.f
+++ b/SRC/slaqr5.f
@@ -1,3 +1,257 @@
+*> \brief \b SLAQR5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS,
+* SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U,
+* LDU, NV, WV, LDWV, NH, WH, LDWH )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
+* $ LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* REAL H( LDH, * ), SI( * ), SR( * ), U( LDU, * ),
+* $ V( LDV, * ), WH( LDWH, * ), WV( LDWV, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQR5, called by SLAQR0, performs a
+*> single small-bulge multi-shift QR sweep.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is logical scalar
+*> WANTT = .true. if the quasi-triangular Schur factor
+*> is being computed. WANTT is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is logical scalar
+*> WANTZ = .true. if the orthogonal Schur factor is being
+*> computed. WANTZ is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] KACC22
+*> \verbatim
+*> KACC22 is integer with value 0, 1, or 2.
+*> Specifies the computation mode of far-from-diagonal
+*> orthogonal updates.
+*> = 0: SLAQR5 does not accumulate reflections and does not
+*> use matrix-matrix multiply to update far-from-diagonal
+*> matrix entries.
+*> = 1: SLAQR5 accumulates reflections and uses matrix-matrix
+*> multiply to update the far-from-diagonal matrix entries.
+*> = 2: SLAQR5 accumulates reflections, uses matrix-matrix
+*> multiply to update the far-from-diagonal matrix entries,
+*> and takes advantage of 2-by-2 block structure during
+*> matrix multiplies.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is integer scalar
+*> N is the order of the Hessenberg matrix H upon which this
+*> subroutine operates.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is integer scalar
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is integer scalar
+*> These are the first and last rows and columns of an
+*> isolated diagonal block upon which the QR sweep is to be
+*> applied. It is assumed without a check that
+*> either KTOP = 1 or H(KTOP,KTOP-1) = 0
+*> and
+*> either KBOT = N or H(KBOT+1,KBOT) = 0.
+*> \endverbatim
+*>
+*> \param[in] NSHFTS
+*> \verbatim
+*> NSHFTS is integer scalar
+*> NSHFTS gives the number of simultaneous shifts. NSHFTS
+*> must be positive and even.
+*> \endverbatim
+*>
+*> \param[in,out] SR
+*> \verbatim
+*> SR is REAL array of size (NSHFTS)
+*> \endverbatim
+*>
+*> \param[in,out] SI
+*> \verbatim
+*> SI is REAL array of size (NSHFTS)
+*> SR contains the real parts and SI contains the imaginary
+*> parts of the NSHFTS shifts of origin that define the
+*> multi-shift QR sweep. On output SR and SI may be
+*> reordered.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is REAL array of size (LDH,N)
+*> On input H contains a Hessenberg matrix. On output a
+*> multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
+*> to the isolated diagonal block in rows and columns KTOP
+*> through KBOT.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer scalar
+*> LDH is the leading dimension of H just as declared in the
+*> calling procedure. LDH.GE.MAX(1,N).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array of size (LDZ,IHI)
+*> If WANTZ = .TRUE., then the QR Sweep orthogonal
+*> similarity transformation is accumulated into
+*> Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ = .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer scalar
+*> LDA is the leading dimension of Z just as declared in
+*> the calling procedure. LDZ.GE.N.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array of size (LDV,NSHFTS/2)
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> LDV is the leading dimension of V as declared in the
+*> calling procedure. LDV.GE.3.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array of size
+*> (LDU,3*NSHFTS-3)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is integer scalar
+*> LDU is the leading dimension of U just as declared in the
+*> in the calling subroutine. LDU.GE.3*NSHFTS-3.
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> NH is the number of columns in array WH available for
+*> workspace. NH.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WH
+*> \verbatim
+*> WH is REAL array of size (LDWH,NH)
+*> \endverbatim
+*>
+*> \param[in] LDWH
+*> \verbatim
+*> LDWH is integer scalar
+*> Leading dimension of WH just as declared in the
+*> calling procedure. LDWH.GE.3*NSHFTS-3.
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer scalar
+*> NV is the number of rows in WV agailable for workspace.
+*> NV.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is REAL array of size
+*> (LDWV,3*NSHFTS-3)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer scalar
+*> LDWV is the leading dimension of WV as declared in the
+*> in the calling subroutine. LDWV.GE.NV.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> Reference:
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and
+*> Level 3 Performance, SIAM Journal of Matrix Analysis,
+*> volume 23, pages 929--947, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS,
$ SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U,
$ LDU, NV, WV, LDWV, NH, WH, LDWH )
@@ -5,7 +259,7 @@
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
@@ -18,136 +272,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAQR5, called by SLAQR0, performs a
-* single small-bulge multi-shift QR sweep.
-*
-* Arguments
-* =========
-*
-* WANTT (input) logical scalar
-* WANTT = .true. if the quasi-triangular Schur factor
-* is being computed. WANTT is set to .false. otherwise.
-*
-* WANTZ (input) logical scalar
-* WANTZ = .true. if the orthogonal Schur factor is being
-* computed. WANTZ is set to .false. otherwise.
-*
-* KACC22 (input) integer with value 0, 1, or 2.
-* Specifies the computation mode of far-from-diagonal
-* orthogonal updates.
-* = 0: SLAQR5 does not accumulate reflections and does not
-* use matrix-matrix multiply to update far-from-diagonal
-* matrix entries.
-* = 1: SLAQR5 accumulates reflections and uses matrix-matrix
-* multiply to update the far-from-diagonal matrix entries.
-* = 2: SLAQR5 accumulates reflections, uses matrix-matrix
-* multiply to update the far-from-diagonal matrix entries,
-* and takes advantage of 2-by-2 block structure during
-* matrix multiplies.
-*
-* N (input) integer scalar
-* N is the order of the Hessenberg matrix H upon which this
-* subroutine operates.
-*
-* KTOP (input) integer scalar
-*
-* KBOT (input) integer scalar
-* These are the first and last rows and columns of an
-* isolated diagonal block upon which the QR sweep is to be
-* applied. It is assumed without a check that
-* either KTOP = 1 or H(KTOP,KTOP-1) = 0
-* and
-* either KBOT = N or H(KBOT+1,KBOT) = 0.
-*
-* NSHFTS (input) integer scalar
-* NSHFTS gives the number of simultaneous shifts. NSHFTS
-* must be positive and even.
-*
-* SR (input/output) REAL array of size (NSHFTS)
-*
-* SI (input/output) REAL array of size (NSHFTS)
-* SR contains the real parts and SI contains the imaginary
-* parts of the NSHFTS shifts of origin that define the
-* multi-shift QR sweep. On output SR and SI may be
-* reordered.
-*
-* H (input/output) REAL array of size (LDH,N)
-* On input H contains a Hessenberg matrix. On output a
-* multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
-* to the isolated diagonal block in rows and columns KTOP
-* through KBOT.
-*
-* LDH (input) integer scalar
-* LDH is the leading dimension of H just as declared in the
-* calling procedure. LDH.GE.MAX(1,N).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
-*
-* Z (input/output) REAL array of size (LDZ,IHI)
-* If WANTZ = .TRUE., then the QR Sweep orthogonal
-* similarity transformation is accumulated into
-* Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ = .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer scalar
-* LDA is the leading dimension of Z just as declared in
-* the calling procedure. LDZ.GE.N.
-*
-* V (workspace) REAL array of size (LDV,NSHFTS/2)
-*
-* LDV (input) integer scalar
-* LDV is the leading dimension of V as declared in the
-* calling procedure. LDV.GE.3.
-*
-* U (workspace) REAL array of size
-* (LDU,3*NSHFTS-3)
-*
-* LDU (input) integer scalar
-* LDU is the leading dimension of U just as declared in the
-* in the calling subroutine. LDU.GE.3*NSHFTS-3.
-*
-* NH (input) integer scalar
-* NH is the number of columns in array WH available for
-* workspace. NH.GE.1.
-*
-* WH (workspace) REAL array of size (LDWH,NH)
-*
-* LDWH (input) integer scalar
-* Leading dimension of WH just as declared in the
-* calling procedure. LDWH.GE.3*NSHFTS-3.
-*
-* NV (input) integer scalar
-* NV is the number of rows in WV agailable for workspace.
-* NV.GE.1.
-*
-* WV (workspace) REAL array of size
-* (LDWV,3*NSHFTS-3)
-*
-* LDWV (input) integer scalar
-* LDWV is the leading dimension of WV as declared in the
-* in the calling subroutine. LDWV.GE.NV.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* Reference:
-*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and
-* Level 3 Performance, SIAM Journal of Matrix Analysis,
-* volume 23, pages 929--947, 2002.
-*
* ================================================================
* .. Parameters ..
REAL ZERO, ONE
diff --git a/SRC/slaqsb.f b/SRC/slaqsb.f
index e05d9d67..bb988d77 100644
--- a/SRC/slaqsb.f
+++ b/SRC/slaqsb.f
@@ -1,9 +1,143 @@
+*> \brief \b SLAQSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER KD, LDAB, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), S( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQSB equilibrates a symmetric band matrix A using the scaling
+*> factors in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -14,69 +148,6 @@
REAL AB( LDAB, * ), S( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAQSB equilibrates a symmetric band matrix A using the scaling
-* factors in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* S (input) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaqsp.f b/SRC/slaqsp.f
index e4c95350..9f8ffb87 100644
--- a/SRC/slaqsp.f
+++ b/SRC/slaqsp.f
@@ -1,9 +1,128 @@
+*> \brief \b SLAQSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), S( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQSP equilibrates a symmetric matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix: diag(S) * A * diag(S), in
+*> the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -14,60 +133,6 @@
REAL AP( * ), S( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAQSP equilibrates a symmetric matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the equilibrated matrix: diag(S) * A * diag(S), in
-* the same storage format as A.
-*
-* S (input) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaqsy.f b/SRC/slaqsy.f
index e05e0406..d40ea901 100644
--- a/SRC/slaqsy.f
+++ b/SRC/slaqsy.f
@@ -1,9 +1,136 @@
+*> \brief \b SLAQSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER LDA, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), S( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQSY equilibrates a symmetric matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED = 'Y', the equilibrated matrix:
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYauxiliary
+*
+* =====================================================================
SUBROUTINE SLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -14,65 +141,6 @@
REAL A( LDA, * ), S( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAQSY equilibrates a symmetric matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if EQUED = 'Y', the equilibrated matrix:
-* diag(S) * A * diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* S (input) REAL array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) REAL
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) REAL
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slaqtr.f b/SRC/slaqtr.f
index e0c39ea1..b512ecf5 100644
--- a/SRC/slaqtr.f
+++ b/SRC/slaqtr.f
@@ -1,10 +1,166 @@
+*> \brief \b SLAQTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAQTR( LTRAN, LREAL, N, T, LDT, B, W, SCALE, X, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL LREAL, LTRAN
+* INTEGER INFO, LDT, N
+* REAL SCALE, W
+* ..
+* .. Array Arguments ..
+* REAL B( * ), T( LDT, * ), WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAQTR solves the real quasi-triangular system
+*>
+*> op(T)*p = scale*c, if LREAL = .TRUE.
+*>
+*> or the complex quasi-triangular systems
+*>
+*> op(T + iB)*(p+iq) = scale*(c+id), if LREAL = .FALSE.
+*>
+*> in real arithmetic, where T is upper quasi-triangular.
+*> If LREAL = .FALSE., then the first diagonal block of T must be
+*> 1 by 1, B is the specially structured matrix
+*>
+*> B = [ b(1) b(2) ... b(n) ]
+*> [ w ]
+*> [ w ]
+*> [ . ]
+*> [ w ]
+*>
+*> op(A) = A or A**T, A**T denotes the transpose of
+*> matrix A.
+*>
+*> On input, X = [ c ]. On output, X = [ p ].
+*> [ d ] [ q ]
+*>
+*> This subroutine is designed for the condition number estimation
+*> in routine STRSNA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LTRAN
+*> \verbatim
+*> LTRAN is LOGICAL
+*> On entry, LTRAN specifies the option of conjugate transpose:
+*> = .FALSE., op(T+i*B) = T+i*B,
+*> = .TRUE., op(T+i*B) = (T+i*B)**T.
+*> \endverbatim
+*>
+*> \param[in] LREAL
+*> \verbatim
+*> LREAL is LOGICAL
+*> On entry, LREAL specifies the input matrix structure:
+*> = .FALSE., the input is complex
+*> = .TRUE., the input is real
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of T+i*B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,N)
+*> On entry, T contains a matrix in Schur canonical form.
+*> If LREAL = .FALSE., then the first diagonal block of T must
+*> be 1 by 1.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the matrix T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (N)
+*> On entry, B contains the elements to form the matrix
+*> B as described above.
+*> If LREAL = .TRUE., B is not referenced.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is REAL
+*> On entry, W is the diagonal element of the matrix B.
+*> If LREAL = .TRUE., W is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On exit, SCALE is the scale factor.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (2*N)
+*> On entry, X contains the right hand side of the system.
+*> On exit, X is overwritten by the solution.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO is set to
+*> 0: successful exit.
+*> 1: the some diagonal 1 by 1 block has been perturbed by
+*> a small number SMIN to keep nonsingularity.
+*> 2: the some diagonal 2 by 2 block has been perturbed by
+*> a small number in SLALN2 to keep nonsingularity.
+*> NOTE: In the interests of speed, this routine does not
+*> check the inputs for errors.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAQTR( LTRAN, LREAL, N, T, LDT, B, W, SCALE, X, WORK,
$ INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LREAL, LTRAN
@@ -15,88 +171,6 @@
REAL B( * ), T( LDT, * ), WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAQTR solves the real quasi-triangular system
-*
-* op(T)*p = scale*c, if LREAL = .TRUE.
-*
-* or the complex quasi-triangular systems
-*
-* op(T + iB)*(p+iq) = scale*(c+id), if LREAL = .FALSE.
-*
-* in real arithmetic, where T is upper quasi-triangular.
-* If LREAL = .FALSE., then the first diagonal block of T must be
-* 1 by 1, B is the specially structured matrix
-*
-* B = [ b(1) b(2) ... b(n) ]
-* [ w ]
-* [ w ]
-* [ . ]
-* [ w ]
-*
-* op(A) = A or A**T, A**T denotes the transpose of
-* matrix A.
-*
-* On input, X = [ c ]. On output, X = [ p ].
-* [ d ] [ q ]
-*
-* This subroutine is designed for the condition number estimation
-* in routine STRSNA.
-*
-* Arguments
-* =========
-*
-* LTRAN (input) LOGICAL
-* On entry, LTRAN specifies the option of conjugate transpose:
-* = .FALSE., op(T+i*B) = T+i*B,
-* = .TRUE., op(T+i*B) = (T+i*B)**T.
-*
-* LREAL (input) LOGICAL
-* On entry, LREAL specifies the input matrix structure:
-* = .FALSE., the input is complex
-* = .TRUE., the input is real
-*
-* N (input) INTEGER
-* On entry, N specifies the order of T+i*B. N >= 0.
-*
-* T (input) REAL array, dimension (LDT,N)
-* On entry, T contains a matrix in Schur canonical form.
-* If LREAL = .FALSE., then the first diagonal block of T must
-* be 1 by 1.
-*
-* LDT (input) INTEGER
-* The leading dimension of the matrix T. LDT >= max(1,N).
-*
-* B (input) REAL array, dimension (N)
-* On entry, B contains the elements to form the matrix
-* B as described above.
-* If LREAL = .TRUE., B is not referenced.
-*
-* W (input) REAL
-* On entry, W is the diagonal element of the matrix B.
-* If LREAL = .TRUE., W is not referenced.
-*
-* SCALE (output) REAL
-* On exit, SCALE is the scale factor.
-*
-* X (input/output) REAL array, dimension (2*N)
-* On entry, X contains the right hand side of the system.
-* On exit, X is overwritten by the solution.
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* On exit, INFO is set to
-* 0: successful exit.
-* 1: the some diagonal 1 by 1 block has been perturbed by
-* a small number SMIN to keep nonsingularity.
-* 2: the some diagonal 2 by 2 block has been perturbed by
-* a small number in SLALN2 to keep nonsingularity.
-* NOTE: In the interests of speed, this routine does not
-* check the inputs for errors.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slar1v.f b/SRC/slar1v.f
index 9ddd6d1d..b4eebe24 100644
--- a/SRC/slar1v.f
+++ b/SRC/slar1v.f
@@ -1,3 +1,229 @@
+*> \brief \b SLAR1V
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
+* PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
+* R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTNC
+* INTEGER B1, BN, N, NEGCNT, R
+* REAL GAPTOL, LAMBDA, MINGMA, NRMINV, PIVMIN, RESID,
+* $ RQCORR, ZTZ
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * )
+* REAL D( * ), L( * ), LD( * ), LLD( * ),
+* $ WORK( * )
+* REAL Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAR1V computes the (scaled) r-th column of the inverse of
+*> the sumbmatrix in rows B1 through BN of the tridiagonal matrix
+*> L D L**T - sigma I. When sigma is close to an eigenvalue, the
+*> computed vector is an accurate eigenvector. Usually, r corresponds
+*> to the index where the eigenvector is largest in magnitude.
+*> The following steps accomplish this computation :
+*> (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
+*> (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
+*> (c) Computation of the diagonal elements of the inverse of
+*> L D L**T - sigma I by combining the above transforms, and choosing
+*> r as the index where the diagonal of the inverse is (one of the)
+*> largest in magnitude.
+*> (d) Computation of the (scaled) r-th column of the inverse using the
+*> twisted factorization obtained by combining the top part of the
+*> the stationary and the bottom part of the progressive transform.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix L D L**T.
+*> \endverbatim
+*>
+*> \param[in] B1
+*> \verbatim
+*> B1 is INTEGER
+*> First index of the submatrix of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] BN
+*> \verbatim
+*> BN is INTEGER
+*> Last index of the submatrix of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] LAMBDA
+*> \verbatim
+*> LAMBDA is REAL
+*> The shift. In order to compute an accurate eigenvector,
+*> LAMBDA should be a good approximation to an eigenvalue
+*> of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal matrix
+*> L, in elements 1 to N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] LD
+*> \verbatim
+*> LD is REAL array, dimension (N-1)
+*> The n-1 elements L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] LLD
+*> \verbatim
+*> LLD is REAL array, dimension (N-1)
+*> The n-1 elements L(i)*L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] GAPTOL
+*> \verbatim
+*> GAPTOL is REAL
+*> Tolerance that indicates when eigenvector entries are negligible
+*> w.r.t. their contribution to the residual.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (N)
+*> On input, all entries of Z must be set to 0.
+*> On output, Z contains the (scaled) r-th column of the
+*> inverse. The scaling is such that Z(R) equals 1.
+*> \endverbatim
+*>
+*> \param[in] WANTNC
+*> \verbatim
+*> WANTNC is LOGICAL
+*> Specifies whether NEGCNT has to be computed.
+*> \endverbatim
+*>
+*> \param[out] NEGCNT
+*> \verbatim
+*> NEGCNT is INTEGER
+*> If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin
+*> in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] ZTZ
+*> \verbatim
+*> ZTZ is REAL
+*> The square of the 2-norm of Z.
+*> \endverbatim
+*>
+*> \param[out] MINGMA
+*> \verbatim
+*> MINGMA is REAL
+*> The reciprocal of the largest (in magnitude) diagonal
+*> element of the inverse of L D L**T - sigma I.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is INTEGER
+*> The twist index for the twisted factorization used to
+*> compute Z.
+*> On input, 0 <= R <= N. If R is input as 0, R is set to
+*> the index where (L D L**T - sigma I)^{-1} is largest
+*> in magnitude. If 1 <= R <= N, R is unchanged.
+*> On output, R contains the twist index used to compute Z.
+*> Ideally, R designates the position of the maximum entry in the
+*> eigenvector.
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension (2)
+*> The support of the vector in Z, i.e., the vector Z is
+*> nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).
+*> \endverbatim
+*>
+*> \param[out] NRMINV
+*> \verbatim
+*> NRMINV is REAL
+*> NRMINV = 1/SQRT( ZTZ )
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The residual of the FP vector.
+*> RESID = ABS( MINGMA )/SQRT( ZTZ )
+*> \endverbatim
+*>
+*> \param[out] RQCORR
+*> \verbatim
+*> RQCORR is REAL
+*> The Rayleigh Quotient correction to LAMBDA.
+*> RQCORR = MINGMA*TMP
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
$ PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
$ R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
@@ -5,7 +231,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTNC
@@ -20,118 +246,6 @@
REAL Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAR1V computes the (scaled) r-th column of the inverse of
-* the sumbmatrix in rows B1 through BN of the tridiagonal matrix
-* L D L**T - sigma I. When sigma is close to an eigenvalue, the
-* computed vector is an accurate eigenvector. Usually, r corresponds
-* to the index where the eigenvector is largest in magnitude.
-* The following steps accomplish this computation :
-* (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
-* (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
-* (c) Computation of the diagonal elements of the inverse of
-* L D L**T - sigma I by combining the above transforms, and choosing
-* r as the index where the diagonal of the inverse is (one of the)
-* largest in magnitude.
-* (d) Computation of the (scaled) r-th column of the inverse using the
-* twisted factorization obtained by combining the top part of the
-* the stationary and the bottom part of the progressive transform.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix L D L**T.
-*
-* B1 (input) INTEGER
-* First index of the submatrix of L D L**T.
-*
-* BN (input) INTEGER
-* Last index of the submatrix of L D L**T.
-*
-* LAMBDA (input) REAL
-* The shift. In order to compute an accurate eigenvector,
-* LAMBDA should be a good approximation to an eigenvalue
-* of L D L**T.
-*
-* L (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal matrix
-* L, in elements 1 to N-1.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D.
-*
-* LD (input) REAL array, dimension (N-1)
-* The n-1 elements L(i)*D(i).
-*
-* LLD (input) REAL array, dimension (N-1)
-* The n-1 elements L(i)*L(i)*D(i).
-*
-* PIVMIN (input) REAL
-* The minimum pivot in the Sturm sequence.
-*
-* GAPTOL (input) REAL
-* Tolerance that indicates when eigenvector entries are negligible
-* w.r.t. their contribution to the residual.
-*
-* Z (input/output) REAL array, dimension (N)
-* On input, all entries of Z must be set to 0.
-* On output, Z contains the (scaled) r-th column of the
-* inverse. The scaling is such that Z(R) equals 1.
-*
-* WANTNC (input) LOGICAL
-* Specifies whether NEGCNT has to be computed.
-*
-* NEGCNT (output) INTEGER
-* If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin
-* in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.
-*
-* ZTZ (output) REAL
-* The square of the 2-norm of Z.
-*
-* MINGMA (output) REAL
-* The reciprocal of the largest (in magnitude) diagonal
-* element of the inverse of L D L**T - sigma I.
-*
-* R (input/output) INTEGER
-* The twist index for the twisted factorization used to
-* compute Z.
-* On input, 0 <= R <= N. If R is input as 0, R is set to
-* the index where (L D L**T - sigma I)^{-1} is largest
-* in magnitude. If 1 <= R <= N, R is unchanged.
-* On output, R contains the twist index used to compute Z.
-* Ideally, R designates the position of the maximum entry in the
-* eigenvector.
-*
-* ISUPPZ (output) INTEGER array, dimension (2)
-* The support of the vector in Z, i.e., the vector Z is
-* nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).
-*
-* NRMINV (output) REAL
-* NRMINV = 1/SQRT( ZTZ )
-*
-* RESID (output) REAL
-* The residual of the FP vector.
-* RESID = ABS( MINGMA )/SQRT( ZTZ )
-*
-* RQCORR (output) REAL
-* The Rayleigh Quotient correction to LAMBDA.
-* RQCORR = MINGMA*TMP
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slar2v.f b/SRC/slar2v.f
index 0df0e749..249327ee 100644
--- a/SRC/slar2v.f
+++ b/SRC/slar2v.f
@@ -1,56 +1,118 @@
- SUBROUTINE SLAR2V( N, X, Y, Z, INCX, C, S, INCC )
+*> \brief \b SLAR2V
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, N
-* ..
-* .. Array Arguments ..
- REAL C( * ), S( * ), X( * ), Y( * ), Z( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAR2V( N, X, Y, Z, INCX, C, S, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, N
+* ..
+* .. Array Arguments ..
+* REAL C( * ), S( * ), X( * ), Y( * ), Z( * )
+* ..
+*
* Purpose
* =======
*
-* SLAR2V applies a vector of real plane rotations from both sides to
-* a sequence of 2-by-2 real symmetric matrices, defined by the elements
-* of the vectors x, y and z. For i = 1,2,...,n
-*
-* ( x(i) z(i) ) := ( c(i) s(i) ) ( x(i) z(i) ) ( c(i) -s(i) )
-* ( z(i) y(i) ) ( -s(i) c(i) ) ( z(i) y(i) ) ( s(i) c(i) )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAR2V applies a vector of real plane rotations from both sides to
+*> a sequence of 2-by-2 real symmetric matrices, defined by the elements
+*> of the vectors x, y and z. For i = 1,2,...,n
+*>
+*> ( x(i) z(i) ) := ( c(i) s(i) ) ( x(i) z(i) ) ( c(i) -s(i) )
+*> ( z(i) y(i) ) ( -s(i) c(i) ) ( z(i) y(i) ) ( s(i) c(i) )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be applied.
-*
-* X (input/output) REAL array,
-* dimension (1+(N-1)*INCX)
-* The vector x.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be applied.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array,
+*> dimension (1+(N-1)*INCX)
+*> The vector x.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array,
+*> dimension (1+(N-1)*INCX)
+*> The vector y.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array,
+*> dimension (1+(N-1)*INCX)
+*> The vector z.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X, Y and Z. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (1+(N-1)*INCC)
+*> The sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C and S. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Y (input/output) REAL array,
-* dimension (1+(N-1)*INCX)
-* The vector y.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Z (input/output) REAL array,
-* dimension (1+(N-1)*INCX)
-* The vector z.
+*> \date November 2011
*
-* INCX (input) INTEGER
-* The increment between elements of X, Y and Z. INCX > 0.
+*> \ingroup realOTHERauxiliary
*
-* C (input) REAL array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* =====================================================================
+ SUBROUTINE SLAR2V( N, X, Y, Z, INCX, C, S, INCC )
*
-* S (input) REAL array, dimension (1+(N-1)*INCC)
-* The sines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C and S. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, N
+* ..
+* .. Array Arguments ..
+ REAL C( * ), S( * ), X( * ), Y( * ), Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarf.f b/SRC/slarf.f
index 87b43325..481ac752 100644
--- a/SRC/slarf.f
+++ b/SRC/slarf.f
@@ -1,10 +1,125 @@
+*> \brief \b SLARF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, LDC, M, N
+* REAL TAU
+* ..
+* .. Array Arguments ..
+* REAL C( LDC, * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARF applies a real elementary reflector H to a real m by n matrix
+*> C, from either the left or the right. H is represented in the form
+*>
+*> H = I - tau * v * v**T
+*>
+*> where tau is a real scalar and v is a real vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension
+*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*> or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*> The vector v in the representation of H. V is not used if
+*> TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE
@@ -15,55 +130,6 @@
REAL C( LDC, * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLARF applies a real elementary reflector H to a real m by n matrix
-* C, from either the left or the right. H is represented in the form
-*
-* H = I - tau * v * v**T
-*
-* where tau is a real scalar and v is a real vector.
-*
-* If tau = 0, then H is taken to be the unit matrix.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) REAL array, dimension
-* (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-* or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-* The vector v in the representation of H. V is not used if
-* TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0.
-*
-* TAU (input) REAL
-* The value tau in the representation of H.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarfb.f b/SRC/slarfb.f
index a330ea46..5b710c96 100644
--- a/SRC/slarfb.f
+++ b/SRC/slarfb.f
@@ -1,117 +1,179 @@
- SUBROUTINE SLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
- $ T, LDT, C, LDC, WORK, LDWORK )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, SIDE, STOREV, TRANS
- INTEGER K, LDC, LDT, LDV, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL C( LDC, * ), T( LDT, * ), V( LDV, * ),
- $ WORK( LDWORK, * )
-* ..
-*
+*> \brief \b SLARFB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+* T, LDT, C, LDC, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL C( LDC, * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* SLARFB applies a real block reflector H or its transpose H**T to a
-* real m by n matrix C, from either the left or the right.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARFB applies a real block reflector H or its transpose H**T to a
+*> real m by n matrix C, from either the left or the right.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**T from the Left
-* = 'R': apply H or H**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'T': apply H**T (Transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columnwise
-* = 'R': Rowwise
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* K (input) INTEGER
-* The order of the matrix T (= the number of elementary
-* reflectors whose product defines the block reflector).
-*
-* V (input) REAL array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,M) if STOREV = 'R' and SIDE = 'L'
-* (LDV,N) if STOREV = 'R' and SIDE = 'R'
-* The matrix V. See Further Details.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-* if STOREV = 'R', LDV >= K.
-*
-* T (input) REAL array, dimension (LDT,K)
-* The triangular k by k matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**T from the Left
+*> = 'R': apply H or H**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'T': apply H**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columnwise
+*> = 'R': Rowwise
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T (= the number of elementary
+*> reflectors whose product defines the block reflector).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LDWORK,K)
+*> \ingroup realOTHERauxiliary
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= max(1,N);
-* if SIDE = 'R', LDWORK >= max(1,M).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* The matrix V. See Further Details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*> if STOREV = 'R', LDV >= K.
+*>
+*> T (input) REAL array, dimension (LDT,K)
+*> The triangular k by k matrix T in the representation of the
+*> block reflector.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*> C (input/output) REAL array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
+*>
+*> LDC (input) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*>
+*> WORK (workspace) REAL array, dimension (LDWORK,K)
+*>
+*> LDWORK (input) INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= max(1,N);
+*> if SIDE = 'R', LDWORK >= max(1,M).
+*>
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
+*> ( v1 1 ) ( 1 v2 v2 v2 )
+*> ( v1 v2 1 ) ( 1 v3 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
+*> ( v1 v2 v3 ) ( v2 v2 v2 1 )
+*> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
+*> ( 1 v3 )
+*> ( 1 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+ $ T, LDT, C, LDC, WORK, LDWORK )
*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
-* ( v1 1 ) ( 1 v2 v2 v2 )
-* ( v1 v2 1 ) ( 1 v3 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* V = ( v1 v2 v3 ) V = ( v1 v1 1 )
-* ( v1 v2 v3 ) ( v2 v2 v2 1 )
-* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
-* ( 1 v3 )
-* ( 1 )
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, SIDE, STOREV, TRANS
+ INTEGER K, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL C( LDC, * ), T( LDT, * ), V( LDV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarfg.f b/SRC/slarfg.f
index e0904b77..327ca44f 100644
--- a/SRC/slarfg.f
+++ b/SRC/slarfg.f
@@ -1,9 +1,107 @@
+*> \brief \b SLARFG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARFG( N, ALPHA, X, INCX, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* REAL ALPHA, TAU
+* ..
+* .. Array Arguments ..
+* REAL X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARFG generates a real elementary reflector H of order n, such
+*> that
+*>
+*> H * ( alpha ) = ( beta ), H**T * H = I.
+*> ( x ) ( 0 )
+*>
+*> where alpha and beta are scalars, and x is an (n-1)-element real
+*> vector. H is represented in the form
+*>
+*> H = I - tau * ( 1 ) * ( 1 v**T ) ,
+*> ( v )
+*>
+*> where tau is a real scalar and v is a real (n-1)-element
+*> vector.
+*>
+*> If the elements of x are all zero, then tau = 0 and H is taken to be
+*> the unit matrix.
+*>
+*> Otherwise 1 <= tau <= 2.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the elementary reflector.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, the value alpha.
+*> On exit, it is overwritten with the value beta.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension
+*> (1+(N-2)*abs(INCX))
+*> On entry, the vector x.
+*> On exit, it is overwritten with the vector v.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL
+*> The value tau.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLARFG( N, ALPHA, X, INCX, TAU )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,50 +111,6 @@
REAL X( * )
* ..
*
-* Purpose
-* =======
-*
-* SLARFG generates a real elementary reflector H of order n, such
-* that
-*
-* H * ( alpha ) = ( beta ), H**T * H = I.
-* ( x ) ( 0 )
-*
-* where alpha and beta are scalars, and x is an (n-1)-element real
-* vector. H is represented in the form
-*
-* H = I - tau * ( 1 ) * ( 1 v**T ) ,
-* ( v )
-*
-* where tau is a real scalar and v is a real (n-1)-element
-* vector.
-*
-* If the elements of x are all zero, then tau = 0 and H is taken to be
-* the unit matrix.
-*
-* Otherwise 1 <= tau <= 2.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the elementary reflector.
-*
-* ALPHA (input/output) REAL
-* On entry, the value alpha.
-* On exit, it is overwritten with the value beta.
-*
-* X (input/output) REAL array, dimension
-* (1+(N-2)*abs(INCX))
-* On entry, the vector x.
-* On exit, it is overwritten with the vector v.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
-*
-* TAU (output) REAL
-* The value tau.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarfgp.f b/SRC/slarfgp.f
index 000be58b..ab4cd499 100644
--- a/SRC/slarfgp.f
+++ b/SRC/slarfgp.f
@@ -1,9 +1,105 @@
+*> \brief \b SLARFGP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARFGP( N, ALPHA, X, INCX, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* REAL ALPHA, TAU
+* ..
+* .. Array Arguments ..
+* REAL X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARFGP generates a real elementary reflector H of order n, such
+*> that
+*>
+*> H * ( alpha ) = ( beta ), H**T * H = I.
+*> ( x ) ( 0 )
+*>
+*> where alpha and beta are scalars, beta is non-negative, and x is
+*> an (n-1)-element real vector. H is represented in the form
+*>
+*> H = I - tau * ( 1 ) * ( 1 v**T ) ,
+*> ( v )
+*>
+*> where tau is a real scalar and v is a real (n-1)-element
+*> vector.
+*>
+*> If the elements of x are all zero, then tau = 0 and H is taken to be
+*> the unit matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the elementary reflector.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, the value alpha.
+*> On exit, it is overwritten with the value beta.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension
+*> (1+(N-2)*abs(INCX))
+*> On entry, the vector x.
+*> On exit, it is overwritten with the vector v.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL
+*> The value tau.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLARFGP( N, ALPHA, X, INCX, TAU )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,48 +109,6 @@
REAL X( * )
* ..
*
-* Purpose
-* =======
-*
-* SLARFGP generates a real elementary reflector H of order n, such
-* that
-*
-* H * ( alpha ) = ( beta ), H**T * H = I.
-* ( x ) ( 0 )
-*
-* where alpha and beta are scalars, beta is non-negative, and x is
-* an (n-1)-element real vector. H is represented in the form
-*
-* H = I - tau * ( 1 ) * ( 1 v**T ) ,
-* ( v )
-*
-* where tau is a real scalar and v is a real (n-1)-element
-* vector.
-*
-* If the elements of x are all zero, then tau = 0 and H is taken to be
-* the unit matrix.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the elementary reflector.
-*
-* ALPHA (input/output) REAL
-* On entry, the value alpha.
-* On exit, it is overwritten with the value beta.
-*
-* X (input/output) REAL array, dimension
-* (1+(N-2)*abs(INCX))
-* On entry, the vector x.
-* On exit, it is overwritten with the vector v.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
-*
-* TAU (output) REAL
-* The value tau.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarft.f b/SRC/slarft.f
index 5738597c..5cabfbca 100644
--- a/SRC/slarft.f
+++ b/SRC/slarft.f
@@ -1,106 +1,150 @@
- SUBROUTINE SLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, STOREV
- INTEGER K, LDT, LDV, N
-* ..
-* .. Array Arguments ..
- REAL T( LDT, * ), TAU( * ), V( LDV, * )
-* ..
-*
+*> \brief \b SLARFT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, STOREV
+* INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+* REAL T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* SLARFT forms the triangular factor T of a real block reflector H
-* of order n, which is defined as a product of k elementary reflectors.
-*
-* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*
-* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
-*
-* If STOREV = 'C', the vector which defines the elementary reflector
-* H(i) is stored in the i-th column of the array V, and
-*
-* H = I - V * T * V**T
-*
-* If STOREV = 'R', the vector which defines the elementary reflector
-* H(i) is stored in the i-th row of the array V, and
-*
-* H = I - V**T * T * V
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARFT forms the triangular factor T of a real block reflector H
+*> of order n, which is defined as a product of k elementary reflectors.
+*>
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
+*>
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*>
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
+*>
+*> H = I - V * T * V**T
+*>
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
+*>
+*> H = I - V**T * T * V
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIRECT (input) CHARACTER*1
-* Specifies the order in which the elementary reflectors are
-* multiplied to form the block reflector:
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Specifies how the vectors which define the elementary
-* reflectors are stored (see also Further Details):
-* = 'C': columnwise
-* = 'R': rowwise
-*
-* N (input) INTEGER
-* The order of the block reflector H. N >= 0.
-*
-* K (input) INTEGER
-* The order of the triangular factor T (= the number of
-* elementary reflectors). K >= 1.
-*
-* V (input/output) REAL array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,N) if STOREV = 'R'
-* The matrix V. See further details.
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies the order in which the elementary reflectors are
+*> multiplied to form the block reflector:
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i).
+*> \date November 2011
*
-* T (output) REAL array, dimension (LDT,K)
-* The k by k triangular factor T of the block reflector.
-* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-* lower triangular. The rest of the array is not used.
+*> \ingroup realOTHERauxiliary
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors are stored (see also Further Details):
+*> = 'C': columnwise
+*> = 'R': rowwise
+*>
+*> N (input) INTEGER
+*> The order of the block reflector H. N >= 0.
+*>
+*> K (input) INTEGER
+*> The order of the triangular factor T (= the number of
+*> elementary reflectors). K >= 1.
+*>
+*> V (input/output) REAL array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,N) if STOREV = 'R'
+*> The matrix V. See further details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>
+*> TAU (input) REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i).
+*>
+*> T (output) REAL array, dimension (LDT,K)
+*> The k by k triangular factor T of the block reflector.
+*> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*> lower triangular. The rest of the array is not used.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
+*> ( v1 1 ) ( 1 v2 v2 v2 )
+*> ( v1 v2 1 ) ( 1 v3 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
+*> ( v1 v2 v3 ) ( v2 v2 v2 1 )
+*> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
+*> ( 1 v3 )
+*> ( 1 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
-* ( v1 1 ) ( 1 v2 v2 v2 )
-* ( v1 v2 1 ) ( 1 v3 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* V = ( v1 v2 v3 ) V = ( v1 v1 1 )
-* ( v1 v2 v3 ) ( v2 v2 v2 1 )
-* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
-* ( 1 v3 )
-* ( 1 )
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, STOREV
+ INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+ REAL T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarfx.f b/SRC/slarfx.f
index 9e179703..f32c90bd 100644
--- a/SRC/slarfx.f
+++ b/SRC/slarfx.f
@@ -1,9 +1,121 @@
+*> \brief \b SLARFX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER LDC, M, N
+* REAL TAU
+* ..
+* .. Array Arguments ..
+* REAL C( LDC, * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARFX applies a real elementary reflector H to a real m by n
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*> H = I - tau * v * v**T
+*>
+*> where tau is a real scalar and v is a real vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix
+*>
+*> This version uses inline code if H has order < 11.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension (M) if SIDE = 'L'
+*> or (N) if SIDE = 'R'
+*> The vector v in the representation of H.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDA >= (1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> WORK is not referenced if H has order < 11.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE
@@ -14,54 +126,6 @@
REAL C( LDC, * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLARFX applies a real elementary reflector H to a real m by n
-* matrix C, from either the left or the right. H is represented in the
-* form
-*
-* H = I - tau * v * v**T
-*
-* where tau is a real scalar and v is a real vector.
-*
-* If tau = 0, then H is taken to be the unit matrix
-*
-* This version uses inline code if H has order < 11.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) REAL array, dimension (M) if SIDE = 'L'
-* or (N) if SIDE = 'R'
-* The vector v in the representation of H.
-*
-* TAU (input) REAL
-* The value tau in the representation of H.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDA >= (1,M).
-*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
-* WORK is not referenced if H has order < 11.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slargv.f b/SRC/slargv.f
index e1b86413..249a3dd7 100644
--- a/SRC/slargv.f
+++ b/SRC/slargv.f
@@ -1,53 +1,112 @@
- SUBROUTINE SLARGV( N, X, INCX, Y, INCY, C, INCC )
+*> \brief \b SLARGV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, INCY, N
-* ..
-* .. Array Arguments ..
- REAL C( * ), X( * ), Y( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLARGV( N, X, INCX, Y, INCY, C, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* REAL C( * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* SLARGV generates a vector of real plane rotations, determined by
-* elements of the real vectors x and y. For i = 1,2,...,n
-*
-* ( c(i) s(i) ) ( x(i) ) = ( a(i) )
-* ( -s(i) c(i) ) ( y(i) ) = ( 0 )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARGV generates a vector of real plane rotations, determined by
+*> elements of the real vectors x and y. For i = 1,2,...,n
+*>
+*> ( c(i) s(i) ) ( x(i) ) = ( a(i) )
+*> ( -s(i) c(i) ) ( y(i) ) = ( 0 )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be generated.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be generated.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array,
+*> dimension (1+(N-1)*INCX)
+*> On entry, the vector x.
+*> On exit, x(i) is overwritten by a(i), for i = 1,...,n.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array,
+*> dimension (1+(N-1)*INCY)
+*> On entry, the vector y.
+*> On exit, the sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input/output) REAL array,
-* dimension (1+(N-1)*INCX)
-* On entry, the vector x.
-* On exit, x(i) is overwritten by a(i), for i = 1,...,n.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
+*> \date November 2011
*
-* Y (input/output) REAL array,
-* dimension (1+(N-1)*INCY)
-* On entry, the vector y.
-* On exit, the sines of the plane rotations.
+*> \ingroup realOTHERauxiliary
*
-* INCY (input) INTEGER
-* The increment between elements of Y. INCY > 0.
+* =====================================================================
+ SUBROUTINE SLARGV( N, X, INCX, Y, INCY, C, INCC )
*
-* C (output) REAL array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ REAL C( * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarnv.f b/SRC/slarnv.f
index 30e946a1..fee2be1c 100644
--- a/SRC/slarnv.f
+++ b/SRC/slarnv.f
@@ -1,52 +1,108 @@
- SUBROUTINE SLARNV( IDIST, ISEED, N, X )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IDIST, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL X( * )
-* ..
-*
+*> \brief \b SLARNV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARNV( IDIST, ISEED, N, X )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL X( * )
+* ..
+*
* Purpose
* =======
*
-* SLARNV returns a vector of n random real numbers from a uniform or
-* normal distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARNV returns a vector of n random real numbers from a uniform or
+*> normal distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IDIST (input) INTEGER
-* Specifies the distribution of the random numbers:
-* = 1: uniform (0,1)
-* = 2: uniform (-1,1)
-* = 3: normal (0,1)
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the distribution of the random numbers:
+*> = 1: uniform (0,1)
+*> = 2: uniform (-1,1)
+*> = 3: normal (0,1)
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of random numbers to be generated.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> The generated random numbers.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of random numbers to be generated.
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
*
-* X (output) REAL array, dimension (N)
-* The generated random numbers.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine calls the auxiliary routine SLARUV to generate random
+*> real numbers from a uniform (0,1) distribution, in batches of up to
+*> 128 using vectorisable code. The Box-Muller method is used to
+*> transform numbers from a uniform to a normal distribution.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARNV( IDIST, ISEED, N, X )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine calls the auxiliary routine SLARUV to generate random
-* real numbers from a uniform (0,1) distribution, in batches of up to
-* 128 using vectorisable code. The Box-Muller method is used to
-* transform numbers from a uniform to a normal distribution.
+* .. Scalar Arguments ..
+ INTEGER IDIST, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarra.f b/SRC/slarra.f
index e85c8151..7557d520 100644
--- a/SRC/slarra.f
+++ b/SRC/slarra.f
@@ -1,81 +1,152 @@
- SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM,
- $ NSPLIT, ISPLIT, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N, NSPLIT
- REAL SPLTOL, TNRM
-* ..
-* .. Array Arguments ..
- INTEGER ISPLIT( * )
- REAL D( * ), E( * ), E2( * )
-* ..
-*
+*> \brief \b SLARRA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM,
+* NSPLIT, ISPLIT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N, NSPLIT
+* REAL SPLTOL, TNRM
+* ..
+* .. Array Arguments ..
+* INTEGER ISPLIT( * )
+* REAL D( * ), E( * ), E2( * )
+* ..
+*
* Purpose
* =======
*
-* Compute the splitting points with threshold SPLTOL.
-* SLARRA sets any "small" off-diagonal elements to zero.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute the splitting points with threshold SPLTOL.
+*> SLARRA sets any "small" off-diagonal elements to zero.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N > 0.
-*
-* D (input) REAL array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal
-* matrix T.
-*
-* E (input/output) REAL array, dimension (N)
-* On entry, the first (N-1) entries contain the subdiagonal
-* elements of the tridiagonal matrix T; E(N) need not be set.
-* On exit, the entries E( ISPLIT( I ) ), 1 <= I <= NSPLIT,
-* are set to zero, the other entries of E are untouched.
-*
-* E2 (input/output) REAL array, dimension (N)
-* On entry, the first (N-1) entries contain the SQUARES of the
-* subdiagonal elements of the tridiagonal matrix T;
-* E2(N) need not be set.
-* On exit, the entries E2( ISPLIT( I ) ),
-* 1 <= I <= NSPLIT, have been set to zero
-*
-* SPLTOL (input) REAL
-* The threshold for splitting. Two criteria can be used:
-* SPLTOL<0 : criterion based on absolute off-diagonal value
-* SPLTOL>0 : criterion that preserves relative accuracy
-*
-* TNRM (input) REAL
-* The norm of the matrix.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N > 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal
+*> matrix T.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> On entry, the first (N-1) entries contain the subdiagonal
+*> elements of the tridiagonal matrix T; E(N) need not be set.
+*> On exit, the entries E( ISPLIT( I ) ), 1 <= I <= NSPLIT,
+*> are set to zero, the other entries of E are untouched.
+*> \endverbatim
+*>
+*> \param[in,out] E2
+*> \verbatim
+*> E2 is REAL array, dimension (N)
+*> On entry, the first (N-1) entries contain the SQUARES of the
+*> subdiagonal elements of the tridiagonal matrix T;
+*> E2(N) need not be set.
+*> On exit, the entries E2( ISPLIT( I ) ),
+*> 1 <= I <= NSPLIT, have been set to zero
+*> \endverbatim
+*>
+*> \param[in] SPLTOL
+*> \verbatim
+*> SPLTOL is REAL
+*> The threshold for splitting. Two criteria can be used:
+*> SPLTOL<0 : criterion based on absolute off-diagonal value
+*> SPLTOL>0 : criterion that preserves relative accuracy
+*> \endverbatim
+*>
+*> \param[in] TNRM
+*> \verbatim
+*> TNRM is REAL
+*> The norm of the matrix.
+*> \endverbatim
+*>
+*> \param[out] NSPLIT
+*> \verbatim
+*> NSPLIT is INTEGER
+*> The number of blocks T splits into. 1 <= NSPLIT <= N.
+*> \endverbatim
+*>
+*> \param[out] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into blocks.
+*> The first block consists of rows/columns 1 to ISPLIT(1),
+*> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
+*> etc., and the NSPLIT-th consists of rows/columns
+*> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NSPLIT (output) INTEGER
-* The number of blocks T splits into. 1 <= NSPLIT <= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ISPLIT (output) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into blocks.
-* The first block consists of rows/columns 1 to ISPLIT(1),
-* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
-* etc., and the NSPLIT-th consists of rows/columns
-* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> \date November 2011
*
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARRA( N, D, E, E2, SPLTOL, TNRM,
+ $ NSPLIT, ISPLIT, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER INFO, N, NSPLIT
+ REAL SPLTOL, TNRM
+* ..
+* .. Array Arguments ..
+ INTEGER ISPLIT( * )
+ REAL D( * ), E( * ), E2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarrb.f b/SRC/slarrb.f
index b6cacffb..924cfc19 100644
--- a/SRC/slarrb.f
+++ b/SRC/slarrb.f
@@ -1,3 +1,195 @@
+*> \brief \b SLARRB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
+* RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
+* PIVMIN, SPDIAM, TWIST, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IFIRST, ILAST, INFO, N, OFFSET, TWIST
+* REAL PIVMIN, RTOL1, RTOL2, SPDIAM
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), LLD( * ), W( * ),
+* $ WERR( * ), WGAP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given the relatively robust representation(RRR) L D L^T, SLARRB
+*> does "limited" bisection to refine the eigenvalues of L D L^T,
+*> W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial
+*> guesses for these eigenvalues are input in W, the corresponding estimate
+*> of the error in these guesses and their gaps are input in WERR
+*> and WGAP, respectively. During bisection, intervals
+*> [left, right] are maintained by storing their mid-points and
+*> semi-widths in the arrays W and WERR respectively.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The N diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] LLD
+*> \verbatim
+*> LLD is REAL array, dimension (N-1)
+*> The (N-1) elements L(i)*L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] IFIRST
+*> \verbatim
+*> IFIRST is INTEGER
+*> The index of the first eigenvalue to be computed.
+*> \endverbatim
+*>
+*> \param[in] ILAST
+*> \verbatim
+*> ILAST is INTEGER
+*> The index of the last eigenvalue to be computed.
+*> \endverbatim
+*>
+*> \param[in] RTOL1
+*> \verbatim
+*> RTOL1 is REAL
+*> \endverbatim
+*>
+*> \param[in] RTOL2
+*> \verbatim
+*> RTOL2 is REAL
+*> Tolerance for the convergence of the bisection intervals.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> where GAP is the (estimated) distance to the nearest
+*> eigenvalue.
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> Offset for the arrays W, WGAP and WERR, i.e., the IFIRST-OFFSET
+*> through ILAST-OFFSET elements of these arrays are to be used.
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
+*> estimates of the eigenvalues of L D L^T indexed IFIRST throug
+*> ILAST.
+*> On output, these estimates are refined.
+*> \endverbatim
+*>
+*> \param[in,out] WGAP
+*> \verbatim
+*> WGAP is REAL array, dimension (N-1)
+*> On input, the (estimated) gaps between consecutive
+*> eigenvalues of L D L^T, i.e., WGAP(I-OFFSET) is the gap between
+*> eigenvalues I and I+1. Note that if IFIRST.EQ.ILAST
+*> then WGAP(IFIRST-OFFSET) must be set to ZERO.
+*> On output, these gaps are refined.
+*> \endverbatim
+*>
+*> \param[in,out] WERR
+*> \verbatim
+*> WERR is REAL array, dimension (N)
+*> On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are
+*> the errors in the estimates of the corresponding elements in W.
+*> On output, these errors are refined.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] SPDIAM
+*> \verbatim
+*> SPDIAM is REAL
+*> The spectral diameter of the matrix.
+*> \endverbatim
+*>
+*> \param[in] TWIST
+*> \verbatim
+*> TWIST is INTEGER
+*> The twist index for the twisted factorization that is used
+*> for the negcount.
+*> TWIST = N: Compute negcount from L D L^T - LAMBDA I = L+ D+ L+^T
+*> TWIST = 1: Compute negcount from L D L^T - LAMBDA I = U- D- U-^T
+*> TWIST = R: Compute negcount from L D L^T - LAMBDA I = N(r) D(r) N(r)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error flag.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
$ RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
$ PIVMIN, SPDIAM, TWIST, INFO )
@@ -5,7 +197,7 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IFIRST, ILAST, INFO, N, OFFSET, TWIST
@@ -17,99 +209,6 @@
$ WERR( * ), WGAP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* Given the relatively robust representation(RRR) L D L^T, SLARRB
-* does "limited" bisection to refine the eigenvalues of L D L^T,
-* W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial
-* guesses for these eigenvalues are input in W, the corresponding estimate
-* of the error in these guesses and their gaps are input in WERR
-* and WGAP, respectively. During bisection, intervals
-* [left, right] are maintained by storing their mid-points and
-* semi-widths in the arrays W and WERR respectively.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* D (input) REAL array, dimension (N)
-* The N diagonal elements of the diagonal matrix D.
-*
-* LLD (input) REAL array, dimension (N-1)
-* The (N-1) elements L(i)*L(i)*D(i).
-*
-* IFIRST (input) INTEGER
-* The index of the first eigenvalue to be computed.
-*
-* ILAST (input) INTEGER
-* The index of the last eigenvalue to be computed.
-*
-* RTOL1 (input) REAL
-*
-* RTOL2 (input) REAL
-* Tolerance for the convergence of the bisection intervals.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
-* where GAP is the (estimated) distance to the nearest
-* eigenvalue.
-*
-* OFFSET (input) INTEGER
-* Offset for the arrays W, WGAP and WERR, i.e., the IFIRST-OFFSET
-* through ILAST-OFFSET elements of these arrays are to be used.
-*
-* W (input/output) REAL array, dimension (N)
-* On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
-* estimates of the eigenvalues of L D L^T indexed IFIRST throug
-* ILAST.
-* On output, these estimates are refined.
-*
-* WGAP (input/output) REAL array, dimension (N-1)
-* On input, the (estimated) gaps between consecutive
-* eigenvalues of L D L^T, i.e., WGAP(I-OFFSET) is the gap between
-* eigenvalues I and I+1. Note that if IFIRST.EQ.ILAST
-* then WGAP(IFIRST-OFFSET) must be set to ZERO.
-* On output, these gaps are refined.
-*
-* WERR (input/output) REAL array, dimension (N)
-* On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are
-* the errors in the estimates of the corresponding elements in W.
-* On output, these errors are refined.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-* Workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (2*N)
-* Workspace.
-*
-* PIVMIN (input) REAL
-* The minimum pivot in the Sturm sequence.
-*
-* SPDIAM (input) REAL
-* The spectral diameter of the matrix.
-*
-* TWIST (input) INTEGER
-* The twist index for the twisted factorization that is used
-* for the negcount.
-* TWIST = N: Compute negcount from L D L^T - LAMBDA I = L+ D+ L+^T
-* TWIST = 1: Compute negcount from L D L^T - LAMBDA I = U- D- U-^T
-* TWIST = R: Compute negcount from L D L^T - LAMBDA I = N(r) D(r) N(r)
-*
-* INFO (output) INTEGER
-* Error flag.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarrc.f b/SRC/slarrc.f
index 618bc5a6..92aeffe0 100644
--- a/SRC/slarrc.f
+++ b/SRC/slarrc.f
@@ -1,73 +1,152 @@
- SUBROUTINE SLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
- $ EIGCNT, LCNT, RCNT, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- CHARACTER JOBT
- INTEGER EIGCNT, INFO, LCNT, N, RCNT
- REAL PIVMIN, VL, VU
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
-* ..
-*
+*> \brief \b SLARRC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
+* EIGCNT, LCNT, RCNT, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBT
+* INTEGER EIGCNT, INFO, LCNT, N, RCNT
+* REAL PIVMIN, VL, VU
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* ..
+*
* Purpose
* =======
*
-* Find the number of eigenvalues of the symmetric tridiagonal matrix T
-* that are in the interval (VL,VU] if JOBT = 'T', and of L D L^T
-* if JOBT = 'L'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Find the number of eigenvalues of the symmetric tridiagonal matrix T
+*> that are in the interval (VL,VU] if JOBT = 'T', and of L D L^T
+*> if JOBT = 'L'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOBT (input) CHARACTER*1
-* = 'T': Compute Sturm count for matrix T.
-* = 'L': Compute Sturm count for matrix L D L^T.
-*
-* N (input) INTEGER
-* The order of the matrix. N > 0.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* The lower and upper bounds for the eigenvalues.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* JOBT = 'T': The N diagonal elements of the tridiagonal matrix T.
-* JOBT = 'L': The N diagonal elements of the diagonal matrix D.
-*
-* E (input) DOUBLE PRECISION array, dimension (N)
-* JOBT = 'T': The N-1 offdiagonal elements of the matrix T.
-* JOBT = 'L': The N-1 offdiagonal elements of the matrix L.
-*
-* PIVMIN (input) REAL
-* The minimum pivot in the Sturm sequence for T.
+*> \param[in] JOBT
+*> \verbatim
+*> JOBT is CHARACTER*1
+*> = 'T': Compute Sturm count for matrix T.
+*> = 'L': Compute Sturm count for matrix L D L^T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N > 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> The lower and upper bounds for the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> JOBT = 'T': The N diagonal elements of the tridiagonal matrix T.
+*> JOBT = 'L': The N diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> JOBT = 'T': The N-1 offdiagonal elements of the matrix T.
+*> JOBT = 'L': The N-1 offdiagonal elements of the matrix L.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[out] EIGCNT
+*> \verbatim
+*> EIGCNT is INTEGER
+*> The number of eigenvalues of the symmetric tridiagonal matrix T
+*> that are in the interval (VL,VU]
+*> \endverbatim
+*>
+*> \param[out] LCNT
+*> \verbatim
+*> LCNT is INTEGER
+*> \endverbatim
+*>
+*> \param[out] RCNT
+*> \verbatim
+*> RCNT is INTEGER
+*> The left and right negcounts of the interval.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* EIGCNT (output) INTEGER
-* The number of eigenvalues of the symmetric tridiagonal matrix T
-* that are in the interval (VL,VU]
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LCNT (output) INTEGER
+*> \date November 2011
*
-* RCNT (output) INTEGER
-* The left and right negcounts of the interval.
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
+ $ EIGCNT, LCNT, RCNT, INFO )
*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER JOBT
+ INTEGER EIGCNT, INFO, LCNT, N, RCNT
+ REAL PIVMIN, VL, VU
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarrd.f b/SRC/slarrd.f
index 1a56d6f8..d1c77a16 100644
--- a/SRC/slarrd.f
+++ b/SRC/slarrd.f
@@ -1,12 +1,321 @@
+*> \brief \b SLARRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
+* RELTOL, D, E, E2, PIVMIN, NSPLIT, ISPLIT,
+* M, W, WERR, WL, WU, IBLOCK, INDEXW,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER ORDER, RANGE
+* INTEGER IL, INFO, IU, M, N, NSPLIT
+* REAL PIVMIN, RELTOL, VL, VU, WL, WU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), INDEXW( * ),
+* $ ISPLIT( * ), IWORK( * )
+* REAL D( * ), E( * ), E2( * ),
+* $ GERS( * ), W( * ), WERR( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARRD computes the eigenvalues of a symmetric tridiagonal
+*> matrix T to suitable accuracy. This is an auxiliary code to be
+*> called from SSTEMR.
+*> The user may ask for all eigenvalues, all eigenvalues
+*> in the half-open interval (VL, VU], or the IL-th through IU-th
+*> eigenvalues.
+*>
+*> To avoid overflow, the matrix must be scaled so that its
+*> largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest
+*> accuracy, it should not be much smaller than that.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': ("All") all eigenvalues will be found.
+*> = 'V': ("Value") all eigenvalues in the half-open interval
+*> (VL, VU] will be found.
+*> = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
+*> entire matrix) will be found.
+*> \endverbatim
+*>
+*> \param[in] ORDER
+*> \verbatim
+*> ORDER is CHARACTER*1
+*> = 'B': ("By Block") the eigenvalues will be grouped by
+*> split-off block (see IBLOCK, ISPLIT) and
+*> ordered from smallest to largest within
+*> the block.
+*> = 'E': ("Entire matrix")
+*> the eigenvalues for the entire matrix
+*> will be ordered from smallest to
+*> largest.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. Eigenvalues less than or equal
+*> to VL, or greater than VU, will not be returned. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] GERS
+*> \verbatim
+*> GERS is REAL array, dimension (2*N)
+*> The N Gerschgorin intervals (the i-th Gerschgorin interval
+*> is (GERS(2*i-1), GERS(2*i)).
+*> \endverbatim
+*>
+*> \param[in] RELTOL
+*> \verbatim
+*> RELTOL is REAL
+*> The minimum relative width of an interval. When an interval
+*> is narrower than RELTOL times the larger (in
+*> magnitude) endpoint, then it is considered to be
+*> sufficiently small, i.e., converged. Note: this should
+*> always be at least radix*machine epsilon.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E2
+*> \verbatim
+*> E2 is REAL array, dimension (N-1)
+*> The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot allowed in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[in] NSPLIT
+*> \verbatim
+*> NSPLIT is INTEGER
+*> The number of diagonal blocks in the matrix T.
+*> 1 <= NSPLIT <= N.
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into submatrices.
+*> The first submatrix consists of rows/columns 1 to ISPLIT(1),
+*> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
+*> etc., and the NSPLIT-th consists of rows/columns
+*> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> (Only the first NSPLIT elements will actually be used, but
+*> since the user cannot know a priori what value NSPLIT will
+*> have, N words must be reserved for ISPLIT.)
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The actual number of eigenvalues found. 0 <= M <= N.
+*> (See also the description of INFO=2,3.)
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On exit, the first M elements of W will contain the
+*> eigenvalue approximations. SLARRD computes an interval
+*> I_j = (a_j, b_j] that includes eigenvalue j. The eigenvalue
+*> approximation is given as the interval midpoint
+*> W(j)= ( a_j + b_j)/2. The corresponding error is bounded by
+*> WERR(j) = abs( a_j - b_j)/2
+*> \endverbatim
+*>
+*> \param[out] WERR
+*> \verbatim
+*> WERR is REAL array, dimension (N)
+*> The error bound on the corresponding eigenvalue approximation
+*> in W.
+*> \endverbatim
+*>
+*> \param[out] WL
+*> \verbatim
+*> WL is REAL
+*> \endverbatim
+*>
+*> \param[out] WU
+*> \verbatim
+*> WU is REAL
+*> The interval (WL, WU] contains all the wanted eigenvalues.
+*> If RANGE='V', then WL=VL and WU=VU.
+*> If RANGE='A', then WL and WU are the global Gerschgorin bounds
+*> on the spectrum.
+*> If RANGE='I', then WL and WU are computed by SLAEBZ from the
+*> index range specified.
+*> \endverbatim
+*>
+*> \param[out] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> At each row/column j where E(j) is zero or small, the
+*> matrix T is considered to split into a block diagonal
+*> matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which
+*> block (from 1 to the number of blocks) the eigenvalue W(i)
+*> belongs. (SLARRD may use the remaining N-M elements as
+*> workspace.)
+*> \endverbatim
+*>
+*> \param[out] INDEXW
+*> \verbatim
+*> INDEXW is INTEGER array, dimension (N)
+*> The indices of the eigenvalues within each block (submatrix);
+*> for example, INDEXW(i)= j and IBLOCK(i)=k imply that the
+*> i-th eigenvalue W(i) is the j-th eigenvalue in block k.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: some or all of the eigenvalues failed to converge or
+*> were not computed:
+*> =1 or 3: Bisection failed to converge for some
+*> eigenvalues; these eigenvalues are flagged by a
+*> negative block number. The effect is that the
+*> eigenvalues may not be as accurate as the
+*> absolute and relative tolerances. This is
+*> generally caused by unexpectedly inaccurate
+*> arithmetic.
+*> =2 or 3: RANGE='I' only: Not all of the eigenvalues
+*> IL:IU were found.
+*> Effect: M < IU+1-IL
+*> Cause: non-monotonic arithmetic, causing the
+*> Sturm sequence to be non-monotonic.
+*> Cure: recalculate, using RANGE='A', and pick
+*> out eigenvalues IL:IU. In some cases,
+*> increasing the PARAMETER "FUDGE" may
+*> make things work.
+*> = 4: RANGE='I', and the Gershgorin interval
+*> initially used was too small. No eigenvalues
+*> were computed.
+*> Probable cause: your machine has sloppy
+*> floating-point arithmetic.
+*> Cure: Increase the PARAMETER "FUDGE",
+*> recompile, and try again.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> FUDGE REAL , default = 2
+*> A "fudge factor" to widen the Gershgorin intervals. Ideally,
+*> a value of 1 should work, but on machines with sloppy
+*> arithmetic, this needs to be larger. The default for
+*> publicly released versions should be large enough to handle
+*> the worst machine around. Note that this has no effect
+*> on accuracy of the solution.
+*> \endverbatim
+*> \verbatim
+*> Based on contributions by
+*> W. Kahan, University of California, Berkeley, USA
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
$ RELTOL, D, E, E2, PIVMIN, NSPLIT, ISPLIT,
$ M, W, WERR, WL, WU, IBLOCK, INDEXW,
$ WORK, IWORK, INFO )
*
-* -- LAPACK auxiliary routine (version 3.3.0) --
+* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER ORDER, RANGE
@@ -20,192 +329,6 @@
$ GERS( * ), W( * ), WERR( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLARRD computes the eigenvalues of a symmetric tridiagonal
-* matrix T to suitable accuracy. This is an auxiliary code to be
-* called from SSTEMR.
-* The user may ask for all eigenvalues, all eigenvalues
-* in the half-open interval (VL, VU], or the IL-th through IU-th
-* eigenvalues.
-*
-* To avoid overflow, the matrix must be scaled so that its
-* largest element is no greater than overflow**(1/2) *
-* underflow**(1/4) in absolute value, and for greatest
-* accuracy, it should not be much smaller than that.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966.
-*
-* Arguments
-* =========
-*
-* RANGE (input) CHARACTER*1
-* = 'A': ("All") all eigenvalues will be found.
-* = 'V': ("Value") all eigenvalues in the half-open interval
-* (VL, VU] will be found.
-* = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
-* entire matrix) will be found.
-*
-* ORDER (input) CHARACTER*1
-* = 'B': ("By Block") the eigenvalues will be grouped by
-* split-off block (see IBLOCK, ISPLIT) and
-* ordered from smallest to largest within
-* the block.
-* = 'E': ("Entire matrix")
-* the eigenvalues for the entire matrix
-* will be ordered from smallest to
-* largest.
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix T. N >= 0.
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. Eigenvalues less than or equal
-* to VL, or greater than VU, will not be returned. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* GERS (input) REAL array, dimension (2*N)
-* The N Gerschgorin intervals (the i-th Gerschgorin interval
-* is (GERS(2*i-1), GERS(2*i)).
-*
-* RELTOL (input) REAL
-* The minimum relative width of an interval. When an interval
-* is narrower than RELTOL times the larger (in
-* magnitude) endpoint, then it is considered to be
-* sufficiently small, i.e., converged. Note: this should
-* always be at least radix*machine epsilon.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) off-diagonal elements of the tridiagonal matrix T.
-*
-* E2 (input) REAL array, dimension (N-1)
-* The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
-*
-* PIVMIN (input) REAL
-* The minimum pivot allowed in the Sturm sequence for T.
-*
-* NSPLIT (input) INTEGER
-* The number of diagonal blocks in the matrix T.
-* 1 <= NSPLIT <= N.
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into submatrices.
-* The first submatrix consists of rows/columns 1 to ISPLIT(1),
-* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
-* etc., and the NSPLIT-th consists of rows/columns
-* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
-* (Only the first NSPLIT elements will actually be used, but
-* since the user cannot know a priori what value NSPLIT will
-* have, N words must be reserved for ISPLIT.)
-*
-* M (output) INTEGER
-* The actual number of eigenvalues found. 0 <= M <= N.
-* (See also the description of INFO=2,3.)
-*
-* W (output) REAL array, dimension (N)
-* On exit, the first M elements of W will contain the
-* eigenvalue approximations. SLARRD computes an interval
-* I_j = (a_j, b_j] that includes eigenvalue j. The eigenvalue
-* approximation is given as the interval midpoint
-* W(j)= ( a_j + b_j)/2. The corresponding error is bounded by
-* WERR(j) = abs( a_j - b_j)/2
-*
-* WERR (output) REAL array, dimension (N)
-* The error bound on the corresponding eigenvalue approximation
-* in W.
-*
-* WL (output) REAL
-*
-* WU (output) REAL
-* The interval (WL, WU] contains all the wanted eigenvalues.
-* If RANGE='V', then WL=VL and WU=VU.
-* If RANGE='A', then WL and WU are the global Gerschgorin bounds
-* on the spectrum.
-* If RANGE='I', then WL and WU are computed by SLAEBZ from the
-* index range specified.
-*
-* IBLOCK (output) INTEGER array, dimension (N)
-* At each row/column j where E(j) is zero or small, the
-* matrix T is considered to split into a block diagonal
-* matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which
-* block (from 1 to the number of blocks) the eigenvalue W(i)
-* belongs. (SLARRD may use the remaining N-M elements as
-* workspace.)
-*
-* INDEXW (output) INTEGER array, dimension (N)
-* The indices of the eigenvalues within each block (submatrix);
-* for example, INDEXW(i)= j and IBLOCK(i)=k imply that the
-* i-th eigenvalue W(i) is the j-th eigenvalue in block k.
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: some or all of the eigenvalues failed to converge or
-* were not computed:
-* =1 or 3: Bisection failed to converge for some
-* eigenvalues; these eigenvalues are flagged by a
-* negative block number. The effect is that the
-* eigenvalues may not be as accurate as the
-* absolute and relative tolerances. This is
-* generally caused by unexpectedly inaccurate
-* arithmetic.
-* =2 or 3: RANGE='I' only: Not all of the eigenvalues
-* IL:IU were found.
-* Effect: M < IU+1-IL
-* Cause: non-monotonic arithmetic, causing the
-* Sturm sequence to be non-monotonic.
-* Cure: recalculate, using RANGE='A', and pick
-* out eigenvalues IL:IU. In some cases,
-* increasing the PARAMETER "FUDGE" may
-* make things work.
-* = 4: RANGE='I', and the Gershgorin interval
-* initially used was too small. No eigenvalues
-* were computed.
-* Probable cause: your machine has sloppy
-* floating-point arithmetic.
-* Cure: Increase the PARAMETER "FUDGE",
-* recompile, and try again.
-*
-* Internal Parameters
-* ===================
-*
-* FUDGE REAL , default = 2
-* A "fudge factor" to widen the Gershgorin intervals. Ideally,
-* a value of 1 should work, but on machines with sloppy
-* arithmetic, this needs to be larger. The default for
-* publicly released versions should be large enough to handle
-* the worst machine around. Note that this has no effect
-* on accuracy of the solution.
-*
-* Based on contributions by
-* W. Kahan, University of California, Berkeley, USA
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarre.f b/SRC/slarre.f
index a0933cd0..8bec6161 100644
--- a/SRC/slarre.f
+++ b/SRC/slarre.f
@@ -1,13 +1,299 @@
+*> \brief \b SLARRE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2,
+* RTOL1, RTOL2, SPLTOL, NSPLIT, ISPLIT, M,
+* W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER RANGE
+* INTEGER IL, INFO, IU, M, N, NSPLIT
+* REAL PIVMIN, RTOL1, RTOL2, SPLTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * ),
+* $ INDEXW( * )
+* REAL D( * ), E( * ), E2( * ), GERS( * ),
+* $ W( * ),WERR( * ), WGAP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> To find the desired eigenvalues of a given real symmetric
+*> tridiagonal matrix T, SLARRE sets any "small" off-diagonal
+*> elements to zero, and for each unreduced block T_i, it finds
+*> (a) a suitable shift at one end of the block's spectrum,
+*> (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and
+*> (c) eigenvalues of each L_i D_i L_i^T.
+*> The representations and eigenvalues found are then used by
+*> SSTEMR to compute the eigenvectors of T.
+*> The accuracy varies depending on whether bisection is used to
+*> find a few eigenvalues or the dqds algorithm (subroutine SLASQ2) to
+*> conpute all and then discard any unwanted one.
+*> As an added benefit, SLARRE also outputs the n
+*> Gerschgorin intervals for the matrices L_i D_i L_i^T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': ("All") all eigenvalues will be found.
+*> = 'V': ("Value") all eigenvalues in the half-open interval
+*> (VL, VU] will be found.
+*> = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
+*> entire matrix) will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N > 0.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in,out] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds for the eigenvalues.
+*> Eigenvalues less than or equal to VL, or greater than VU,
+*> will not be returned. VL < VU.
+*> If RANGE='I' or ='A', SLARRE computes bounds on the desired
+*> part of the spectrum.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal
+*> matrix T.
+*> On exit, the N diagonal elements of the diagonal
+*> matrices D_i.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> On entry, the first (N-1) entries contain the subdiagonal
+*> elements of the tridiagonal matrix T; E(N) need not be set.
+*> On exit, E contains the subdiagonal elements of the unit
+*> bidiagonal matrices L_i. The entries E( ISPLIT( I ) ),
+*> 1 <= I <= NSPLIT, contain the base points sigma_i on output.
+*> \endverbatim
+*>
+*> \param[in,out] E2
+*> \verbatim
+*> E2 is REAL array, dimension (N)
+*> On entry, the first (N-1) entries contain the SQUARES of the
+*> subdiagonal elements of the tridiagonal matrix T;
+*> E2(N) need not be set.
+*> On exit, the entries E2( ISPLIT( I ) ),
+*> 1 <= I <= NSPLIT, have been set to zero
+*> \endverbatim
+*>
+*> \param[in] RTOL1
+*> \verbatim
+*> RTOL1 is REAL
+*> \endverbatim
+*>
+*> \param[in] RTOL2
+*> \verbatim
+*> RTOL2 is REAL
+*> Parameters for bisection.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> \endverbatim
+*>
+*> \param[in] SPLTOL
+*> \verbatim
+*> SPLTOL is REAL
+*> The threshold for splitting.
+*> \endverbatim
+*>
+*> \param[out] NSPLIT
+*> \verbatim
+*> NSPLIT is INTEGER
+*> The number of blocks T splits into. 1 <= NSPLIT <= N.
+*> \endverbatim
+*>
+*> \param[out] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into blocks.
+*> The first block consists of rows/columns 1 to ISPLIT(1),
+*> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
+*> etc., and the NSPLIT-th consists of rows/columns
+*> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues (of all L_i D_i L_i^T)
+*> found.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the eigenvalues. The
+*> eigenvalues of each of the blocks, L_i D_i L_i^T, are
+*> sorted in ascending order ( SLARRE may use the
+*> remaining N-M elements as workspace).
+*> \endverbatim
+*>
+*> \param[out] WERR
+*> \verbatim
+*> WERR is REAL array, dimension (N)
+*> The error bound on the corresponding eigenvalue in W.
+*> \endverbatim
+*>
+*> \param[out] WGAP
+*> \verbatim
+*> WGAP is REAL array, dimension (N)
+*> The separation from the right neighbor eigenvalue in W.
+*> The gap is only with respect to the eigenvalues of the same block
+*> as each block has its own representation tree.
+*> Exception: at the right end of a block we store the left gap
+*> \endverbatim
+*>
+*> \param[out] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The indices of the blocks (submatrices) associated with the
+*> corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
+*> W(i) belongs to the first block from the top, =2 if W(i)
+*> belongs to the second block, etc.
+*> \endverbatim
+*>
+*> \param[out] INDEXW
+*> \verbatim
+*> INDEXW is INTEGER array, dimension (N)
+*> The indices of the eigenvalues within each block (submatrix);
+*> for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
+*> i-th eigenvalue W(i) is the 10-th eigenvalue in block 2
+*> \endverbatim
+*>
+*> \param[out] GERS
+*> \verbatim
+*> GERS is REAL array, dimension (2*N)
+*> The N Gerschgorin intervals (the i-th Gerschgorin interval
+*> is (GERS(2*i-1), GERS(2*i)).
+*> \endverbatim
+*>
+*> \param[out] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (6*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: A problem occured in SLARRE.
+*> < 0: One of the called subroutines signaled an internal problem.
+*> Needs inspection of the corresponding parameter IINFO
+*> for further information.
+*> \endverbatim
+*> \verbatim
+*> =-1: Problem in SLARRD.
+*> = 2: No base representation could be found in MAXTRY iterations.
+*> Increasing MAXTRY and recompilation might be a remedy.
+*> =-3: Problem in SLARRB when computing the refined root
+*> representation for SLASQ2.
+*> =-4: Problem in SLARRB when preforming bisection on the
+*> desired part of the spectrum.
+*> =-5: Problem in SLASQ2.
+*> =-6: Problem in SLASQ2.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The base representations are required to suffer very little
+*> element growth and consequently define all their eigenvalues to
+*> high relative accuracy.
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2,
$ RTOL1, RTOL2, SPLTOL, NSPLIT, ISPLIT, M,
$ W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
$ WORK, IWORK, INFO )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER RANGE
@@ -21,166 +307,6 @@
$ W( * ),WERR( * ), WGAP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* To find the desired eigenvalues of a given real symmetric
-* tridiagonal matrix T, SLARRE sets any "small" off-diagonal
-* elements to zero, and for each unreduced block T_i, it finds
-* (a) a suitable shift at one end of the block's spectrum,
-* (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and
-* (c) eigenvalues of each L_i D_i L_i^T.
-* The representations and eigenvalues found are then used by
-* SSTEMR to compute the eigenvectors of T.
-* The accuracy varies depending on whether bisection is used to
-* find a few eigenvalues or the dqds algorithm (subroutine SLASQ2) to
-* conpute all and then discard any unwanted one.
-* As an added benefit, SLARRE also outputs the n
-* Gerschgorin intervals for the matrices L_i D_i L_i^T.
-*
-* Arguments
-* =========
-*
-* RANGE (input) CHARACTER*1
-* = 'A': ("All") all eigenvalues will be found.
-* = 'V': ("Value") all eigenvalues in the half-open interval
-* (VL, VU] will be found.
-* = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
-* entire matrix) will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N > 0.
-*
-* VL (input/output) REAL
-*
-* VU (input/output) REAL
-* If RANGE='V', the lower and upper bounds for the eigenvalues.
-* Eigenvalues less than or equal to VL, or greater than VU,
-* will not be returned. VL < VU.
-* If RANGE='I' or ='A', SLARRE computes bounds on the desired
-* part of the spectrum.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal
-* matrix T.
-* On exit, the N diagonal elements of the diagonal
-* matrices D_i.
-*
-* E (input/output) REAL array, dimension (N)
-* On entry, the first (N-1) entries contain the subdiagonal
-* elements of the tridiagonal matrix T; E(N) need not be set.
-* On exit, E contains the subdiagonal elements of the unit
-* bidiagonal matrices L_i. The entries E( ISPLIT( I ) ),
-* 1 <= I <= NSPLIT, contain the base points sigma_i on output.
-*
-* E2 (input/output) REAL array, dimension (N)
-* On entry, the first (N-1) entries contain the SQUARES of the
-* subdiagonal elements of the tridiagonal matrix T;
-* E2(N) need not be set.
-* On exit, the entries E2( ISPLIT( I ) ),
-* 1 <= I <= NSPLIT, have been set to zero
-*
-* RTOL1 (input) REAL
-*
-* RTOL2 (input) REAL
-* Parameters for bisection.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
-*
-* SPLTOL (input) REAL
-* The threshold for splitting.
-*
-* NSPLIT (output) INTEGER
-* The number of blocks T splits into. 1 <= NSPLIT <= N.
-*
-* ISPLIT (output) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into blocks.
-* The first block consists of rows/columns 1 to ISPLIT(1),
-* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
-* etc., and the NSPLIT-th consists of rows/columns
-* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
-*
-* M (output) INTEGER
-* The total number of eigenvalues (of all L_i D_i L_i^T)
-* found.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the eigenvalues. The
-* eigenvalues of each of the blocks, L_i D_i L_i^T, are
-* sorted in ascending order ( SLARRE may use the
-* remaining N-M elements as workspace).
-*
-* WERR (output) REAL array, dimension (N)
-* The error bound on the corresponding eigenvalue in W.
-*
-* WGAP (output) REAL array, dimension (N)
-* The separation from the right neighbor eigenvalue in W.
-* The gap is only with respect to the eigenvalues of the same block
-* as each block has its own representation tree.
-* Exception: at the right end of a block we store the left gap
-*
-* IBLOCK (output) INTEGER array, dimension (N)
-* The indices of the blocks (submatrices) associated with the
-* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
-* W(i) belongs to the first block from the top, =2 if W(i)
-* belongs to the second block, etc.
-*
-* INDEXW (output) INTEGER array, dimension (N)
-* The indices of the eigenvalues within each block (submatrix);
-* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
-* i-th eigenvalue W(i) is the 10-th eigenvalue in block 2
-*
-* GERS (output) REAL array, dimension (2*N)
-* The N Gerschgorin intervals (the i-th Gerschgorin interval
-* is (GERS(2*i-1), GERS(2*i)).
-*
-* PIVMIN (output) REAL
-* The minimum pivot in the Sturm sequence for T.
-*
-* WORK (workspace) REAL array, dimension (6*N)
-* Workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-* Workspace.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: A problem occured in SLARRE.
-* < 0: One of the called subroutines signaled an internal problem.
-* Needs inspection of the corresponding parameter IINFO
-* for further information.
-*
-* =-1: Problem in SLARRD.
-* = 2: No base representation could be found in MAXTRY iterations.
-* Increasing MAXTRY and recompilation might be a remedy.
-* =-3: Problem in SLARRB when computing the refined root
-* representation for SLASQ2.
-* =-4: Problem in SLARRB when preforming bisection on the
-* desired part of the spectrum.
-* =-5: Problem in SLASQ2.
-* =-6: Problem in SLASQ2.
-*
-* Further Details
-* ===============
-*
-* The base representations are required to suffer very little
-* element growth and consequently define all their eigenvalues to
-* high relative accuracy.
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarrf.f b/SRC/slarrf.f
index 53bbb955..e25efb1e 100644
--- a/SRC/slarrf.f
+++ b/SRC/slarrf.f
@@ -1,3 +1,185 @@
+*> \brief \b SLARRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRF( N, D, L, LD, CLSTRT, CLEND,
+* W, WGAP, WERR,
+* SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA,
+* DPLUS, LPLUS, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CLSTRT, CLEND, INFO, N
+* REAL CLGAPL, CLGAPR, PIVMIN, SIGMA, SPDIAM
+* ..
+* .. Array Arguments ..
+* REAL D( * ), DPLUS( * ), L( * ), LD( * ),
+* $ LPLUS( * ), W( * ), WGAP( * ), WERR( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given the initial representation L D L^T and its cluster of close
+*> eigenvalues (in a relative measure), W( CLSTRT ), W( CLSTRT+1 ), ...
+*> W( CLEND ), SLARRF finds a new relatively robust representation
+*> L D L^T - SIGMA I = L(+) D(+) L(+)^T such that at least one of the
+*> eigenvalues of L(+) D(+) L(+)^T is relatively isolated.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix (subblock, if the matrix splitted).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The N diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is REAL array, dimension (N-1)
+*> The (N-1) subdiagonal elements of the unit bidiagonal
+*> matrix L.
+*> \endverbatim
+*>
+*> \param[in] LD
+*> \verbatim
+*> LD is REAL array, dimension (N-1)
+*> The (N-1) elements L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] CLSTRT
+*> \verbatim
+*> CLSTRT is INTEGER
+*> The index of the first eigenvalue in the cluster.
+*> \endverbatim
+*>
+*> \param[in] CLEND
+*> \verbatim
+*> CLEND is INTEGER
+*> The index of the last eigenvalue in the cluster.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is REAL array, dimension
+*> dimension is >= (CLEND-CLSTRT+1)
+*> The eigenvalue APPROXIMATIONS of L D L^T in ascending order.
+*> W( CLSTRT ) through W( CLEND ) form the cluster of relatively
+*> close eigenalues.
+*> \endverbatim
+*>
+*> \param[in,out] WGAP
+*> \verbatim
+*> WGAP is REAL array, dimension
+*> dimension is >= (CLEND-CLSTRT+1)
+*> The separation from the right neighbor eigenvalue in W.
+*> \endverbatim
+*>
+*> \param[in] WERR
+*> \verbatim
+*> WERR is REAL array, dimension
+*> dimension is >= (CLEND-CLSTRT+1)
+*> WERR contain the semiwidth of the uncertainty
+*> interval of the corresponding eigenvalue APPROXIMATION in W
+*> \endverbatim
+*>
+*> \param[in] SPDIAM
+*> \verbatim
+*> SPDIAM is REAL
+*> estimate of the spectral diameter obtained from the
+*> Gerschgorin intervals
+*> \endverbatim
+*>
+*> \param[in] CLGAPL
+*> \verbatim
+*> CLGAPL is REAL
+*> \endverbatim
+*>
+*> \param[in] CLGAPR
+*> \verbatim
+*> CLGAPR is REAL
+*> absolute gap on each end of the cluster.
+*> Set by the calling routine to protect against shifts too close
+*> to eigenvalues outside the cluster.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot allowed in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[out] SIGMA
+*> \verbatim
+*> SIGMA is REAL
+*> The shift used to form L(+) D(+) L(+)^T.
+*> \endverbatim
+*>
+*> \param[out] DPLUS
+*> \verbatim
+*> DPLUS is REAL array, dimension (N)
+*> The N diagonal elements of the diagonal matrix D(+).
+*> \endverbatim
+*>
+*> \param[out] LPLUS
+*> \verbatim
+*> LPLUS is REAL array, dimension (N-1)
+*> The first (N-1) elements of LPLUS contain the subdiagonal
+*> elements of the unit bidiagonal matrix L(+).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLARRF( N, D, L, LD, CLSTRT, CLEND,
$ W, WGAP, WERR,
$ SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA,
@@ -6,8 +188,8 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-**
+* November 2011
+*
* .. Scalar Arguments ..
INTEGER CLSTRT, CLEND, INFO, N
REAL CLGAPL, CLGAPR, PIVMIN, SIGMA, SPDIAM
@@ -17,89 +199,6 @@
$ LPLUS( * ), W( * ), WGAP( * ), WERR( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* Given the initial representation L D L^T and its cluster of close
-* eigenvalues (in a relative measure), W( CLSTRT ), W( CLSTRT+1 ), ...
-* W( CLEND ), SLARRF finds a new relatively robust representation
-* L D L^T - SIGMA I = L(+) D(+) L(+)^T such that at least one of the
-* eigenvalues of L(+) D(+) L(+)^T is relatively isolated.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix (subblock, if the matrix splitted).
-*
-* D (input) REAL array, dimension (N)
-* The N diagonal elements of the diagonal matrix D.
-*
-* L (input) REAL array, dimension (N-1)
-* The (N-1) subdiagonal elements of the unit bidiagonal
-* matrix L.
-*
-* LD (input) REAL array, dimension (N-1)
-* The (N-1) elements L(i)*D(i).
-*
-* CLSTRT (input) INTEGER
-* The index of the first eigenvalue in the cluster.
-*
-* CLEND (input) INTEGER
-* The index of the last eigenvalue in the cluster.
-*
-* W (input) REAL array, dimension
-* dimension is >= (CLEND-CLSTRT+1)
-* The eigenvalue APPROXIMATIONS of L D L^T in ascending order.
-* W( CLSTRT ) through W( CLEND ) form the cluster of relatively
-* close eigenalues.
-*
-* WGAP (input/output) REAL array, dimension
-* dimension is >= (CLEND-CLSTRT+1)
-* The separation from the right neighbor eigenvalue in W.
-*
-* WERR (input) REAL array, dimension
-* dimension is >= (CLEND-CLSTRT+1)
-* WERR contain the semiwidth of the uncertainty
-* interval of the corresponding eigenvalue APPROXIMATION in W
-*
-* SPDIAM (input) REAL
-* estimate of the spectral diameter obtained from the
-* Gerschgorin intervals
-*
-* CLGAPL (input) REAL
-*
-* CLGAPR (input) REAL
-* absolute gap on each end of the cluster.
-* Set by the calling routine to protect against shifts too close
-* to eigenvalues outside the cluster.
-*
-* PIVMIN (input) REAL
-* The minimum pivot allowed in the Sturm sequence.
-*
-* SIGMA (output) REAL
-* The shift used to form L(+) D(+) L(+)^T.
-*
-* DPLUS (output) REAL array, dimension (N)
-* The N diagonal elements of the diagonal matrix D(+).
-*
-* LPLUS (output) REAL array, dimension (N-1)
-* The first (N-1) elements of LPLUS contain the subdiagonal
-* elements of the unit bidiagonal matrix L(+).
-*
-* WORK (workspace) REAL array, dimension (2*N)
-* Workspace.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarrj.f b/SRC/slarrj.f
index 3d6b30b5..5e604b7a 100644
--- a/SRC/slarrj.f
+++ b/SRC/slarrj.f
@@ -1,3 +1,167 @@
+*> \brief \b SLARRJ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRJ( N, D, E2, IFIRST, ILAST,
+* RTOL, OFFSET, W, WERR, WORK, IWORK,
+* PIVMIN, SPDIAM, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IFIRST, ILAST, INFO, N, OFFSET
+* REAL PIVMIN, RTOL, SPDIAM
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), E2( * ), W( * ),
+* $ WERR( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given the initial eigenvalue approximations of T, SLARRJ
+*> does bisection to refine the eigenvalues of T,
+*> W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial
+*> guesses for these eigenvalues are input in W, the corresponding estimate
+*> of the error in these guesses in WERR. During bisection, intervals
+*> [left, right] are maintained by storing their mid-points and
+*> semi-widths in the arrays W and WERR respectively.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The N diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] E2
+*> \verbatim
+*> E2 is REAL array, dimension (N-1)
+*> The Squares of the (N-1) subdiagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] IFIRST
+*> \verbatim
+*> IFIRST is INTEGER
+*> The index of the first eigenvalue to be computed.
+*> \endverbatim
+*>
+*> \param[in] ILAST
+*> \verbatim
+*> ILAST is INTEGER
+*> The index of the last eigenvalue to be computed.
+*> \endverbatim
+*>
+*> \param[in] RTOL
+*> \verbatim
+*> RTOL is REAL
+*> Tolerance for the convergence of the bisection intervals.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.RTOL*MAX(|LEFT|,|RIGHT|).
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET
+*> through ILAST-OFFSET elements of these arrays are to be used.
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
+*> estimates of the eigenvalues of L D L^T indexed IFIRST through
+*> ILAST.
+*> On output, these estimates are refined.
+*> \endverbatim
+*>
+*> \param[in,out] WERR
+*> \verbatim
+*> WERR is REAL array, dimension (N)
+*> On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are
+*> the errors in the estimates of the corresponding elements in W.
+*> On output, these errors are refined.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[in] SPDIAM
+*> \verbatim
+*> SPDIAM is REAL
+*> The spectral diameter of T.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error flag.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLARRJ( N, D, E2, IFIRST, ILAST,
$ RTOL, OFFSET, W, WERR, WORK, IWORK,
$ PIVMIN, SPDIAM, INFO )
@@ -5,7 +169,7 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IFIRST, ILAST, INFO, N, OFFSET
@@ -17,80 +181,6 @@
$ WERR( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* Given the initial eigenvalue approximations of T, SLARRJ
-* does bisection to refine the eigenvalues of T,
-* W( IFIRST-OFFSET ) through W( ILAST-OFFSET ), to more accuracy. Initial
-* guesses for these eigenvalues are input in W, the corresponding estimate
-* of the error in these guesses in WERR. During bisection, intervals
-* [left, right] are maintained by storing their mid-points and
-* semi-widths in the arrays W and WERR respectively.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* D (input) REAL array, dimension (N)
-* The N diagonal elements of T.
-*
-* E2 (input) REAL array, dimension (N-1)
-* The Squares of the (N-1) subdiagonal elements of T.
-*
-* IFIRST (input) INTEGER
-* The index of the first eigenvalue to be computed.
-*
-* ILAST (input) INTEGER
-* The index of the last eigenvalue to be computed.
-*
-* RTOL (input) REAL
-* Tolerance for the convergence of the bisection intervals.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.RTOL*MAX(|LEFT|,|RIGHT|).
-*
-* OFFSET (input) INTEGER
-* Offset for the arrays W and WERR, i.e., the IFIRST-OFFSET
-* through ILAST-OFFSET elements of these arrays are to be used.
-*
-* W (input/output) REAL array, dimension (N)
-* On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
-* estimates of the eigenvalues of L D L^T indexed IFIRST through
-* ILAST.
-* On output, these estimates are refined.
-*
-* WERR (input/output) REAL array, dimension (N)
-* On input, WERR( IFIRST-OFFSET ) through WERR( ILAST-OFFSET ) are
-* the errors in the estimates of the corresponding elements in W.
-* On output, these errors are refined.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-* Workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (2*N)
-* Workspace.
-*
-* PIVMIN (input) REAL
-* The minimum pivot in the Sturm sequence for T.
-*
-* SPDIAM (input) REAL
-* The spectral diameter of T.
-*
-* INFO (output) INTEGER
-* Error flag.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarrk.f b/SRC/slarrk.f
index fac58ee7..08b3be1b 100644
--- a/SRC/slarrk.f
+++ b/SRC/slarrk.f
@@ -1,11 +1,146 @@
+*> \brief \b SLARRK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRK( N, IW, GL, GU,
+* D, E2, PIVMIN, RELTOL, W, WERR, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, IW, N
+* REAL PIVMIN, RELTOL, GL, GU, W, WERR
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E2( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARRK computes one eigenvalue of a symmetric tridiagonal
+*> matrix T to suitable accuracy. This is an auxiliary code to be
+*> called from SSTEMR.
+*>
+*> To avoid overflow, the matrix must be scaled so that its
+*> largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest
+*> accuracy, it should not be much smaller than that.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] IW
+*> \verbatim
+*> IW is INTEGER
+*> The index of the eigenvalues to be returned.
+*> \endverbatim
+*>
+*> \param[in] GL
+*> \verbatim
+*> GL is REAL
+*> \endverbatim
+*>
+*> \param[in] GU
+*> \verbatim
+*> GU is REAL
+*> An upper and a lower bound on the eigenvalue.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E2
+*> \verbatim
+*> E2 is REAL array, dimension (N-1)
+*> The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot allowed in the Sturm sequence for T.
+*> \endverbatim
+*>
+*> \param[in] RELTOL
+*> \verbatim
+*> RELTOL is REAL
+*> The minimum relative width of an interval. When an interval
+*> is narrower than RELTOL times the larger (in
+*> magnitude) endpoint, then it is considered to be
+*> sufficiently small, i.e., converged. Note: this should
+*> always be at least radix*machine epsilon.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL
+*> \endverbatim
+*>
+*> \param[out] WERR
+*> \verbatim
+*> WERR is REAL
+*> The error bound on the corresponding eigenvalue approximation
+*> in W.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Eigenvalue converged
+*> = -1: Eigenvalue did NOT converge
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> FUDGE REAL , default = 2
+*> A "fudge factor" to widen the Gershgorin intervals.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLARRK( N, IW, GL, GU,
$ D, E2, PIVMIN, RELTOL, W, WERR, INFO)
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, IW, N
@@ -15,68 +150,6 @@
REAL D( * ), E2( * )
* ..
*
-* Purpose
-* =======
-*
-* SLARRK computes one eigenvalue of a symmetric tridiagonal
-* matrix T to suitable accuracy. This is an auxiliary code to be
-* called from SSTEMR.
-*
-* To avoid overflow, the matrix must be scaled so that its
-* largest element is no greater than overflow**(1/2) *
-* underflow**(1/4) in absolute value, and for greatest
-* accuracy, it should not be much smaller than that.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix T. N >= 0.
-*
-* IW (input) INTEGER
-* The index of the eigenvalues to be returned.
-*
-* GL (input) REAL
-*
-* GU (input) REAL
-* An upper and a lower bound on the eigenvalue.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E2 (input) REAL array, dimension (N-1)
-* The (n-1) squared off-diagonal elements of the tridiagonal matrix T.
-*
-* PIVMIN (input) REAL
-* The minimum pivot allowed in the Sturm sequence for T.
-*
-* RELTOL (input) REAL
-* The minimum relative width of an interval. When an interval
-* is narrower than RELTOL times the larger (in
-* magnitude) endpoint, then it is considered to be
-* sufficiently small, i.e., converged. Note: this should
-* always be at least radix*machine epsilon.
-*
-* W (output) REAL
-*
-* WERR (output) REAL
-* The error bound on the corresponding eigenvalue approximation
-* in W.
-*
-* INFO (output) INTEGER
-* = 0: Eigenvalue converged
-* = -1: Eigenvalue did NOT converge
-*
-* Internal Parameters
-* ===================
-*
-* FUDGE REAL , default = 2
-* A "fudge factor" to widen the Gershgorin intervals.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarrr.f b/SRC/slarrr.f
index e86e8c2d..9cd072d9 100644
--- a/SRC/slarrr.f
+++ b/SRC/slarrr.f
@@ -1,53 +1,109 @@
- SUBROUTINE SLARRR( N, D, E, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER N, INFO
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
-* ..
-*
-*
+*> \brief \b SLARRR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRR( N, D, E, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* ..
+*
+*
* Purpose
* =======
*
-* Perform tests to decide whether the symmetric tridiagonal matrix T
-* warrants expensive computations which guarantee high relative accuracy
-* in the eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Perform tests to decide whether the symmetric tridiagonal matrix T
+*> warrants expensive computations which guarantee high relative accuracy
+*> in the eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N > 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N > 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The N diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> On entry, the first (N-1) entries contain the subdiagonal
+*> elements of the tridiagonal matrix T; E(N) is set to ZERO.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> INFO = 0(default) : the matrix warrants computations preserving
+*> relative accuracy.
+*> INFO = 1 : the matrix warrants computations guaranteeing
+*> only absolute accuracy.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (N)
-* The N diagonal elements of the tridiagonal matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input/output) REAL array, dimension (N)
-* On entry, the first (N-1) entries contain the subdiagonal
-* elements of the tridiagonal matrix T; E(N) is set to ZERO.
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
-* INFO = 0(default) : the matrix warrants computations preserving
-* relative accuracy.
-* INFO = 1 : the matrix warrants computations guaranteeing
-* only absolute accuracy.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARRR( N, D, E, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+* ..
*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
*
* =====================================================================
*
diff --git a/SRC/slarrv.f b/SRC/slarrv.f
index 4afa7440..a1928ce9 100644
--- a/SRC/slarrv.f
+++ b/SRC/slarrv.f
@@ -1,3 +1,282 @@
+*> \brief \b SLARRV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARRV( N, VL, VU, D, L, PIVMIN,
+* ISPLIT, M, DOL, DOU, MINRGP,
+* RTOL1, RTOL2, W, WERR, WGAP,
+* IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER DOL, DOU, INFO, LDZ, M, N
+* REAL MINRGP, PIVMIN, RTOL1, RTOL2, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), INDEXW( * ), ISPLIT( * ),
+* $ ISUPPZ( * ), IWORK( * )
+* REAL D( * ), GERS( * ), L( * ), W( * ), WERR( * ),
+* $ WGAP( * ), WORK( * )
+* REAL Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARRV computes the eigenvectors of the tridiagonal matrix
+*> T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
+*> The input eigenvalues should have been computed by SLARRE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> Lower and upper bounds of the interval that contains the desired
+*> eigenvalues. VL < VU. Needed to compute gaps on the left or right
+*> end of the extremal eigenvalues in the desired RANGE.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the N diagonal elements of the diagonal matrix D.
+*> On exit, D may be overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] L
+*> \verbatim
+*> L is REAL array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the unit
+*> bidiagonal matrix L are in elements 1 to N-1 of L
+*> (if the matrix is not splitted.) At the end of each block
+*> is stored the corresponding shift as given by SLARRE.
+*> On exit, L is overwritten.
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is REAL
+*> The minimum pivot allowed in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into blocks.
+*> The first block consists of rows/columns 1 to
+*> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
+*> through ISPLIT( 2 ), etc.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of input eigenvalues. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] DOL
+*> \verbatim
+*> DOL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] DOU
+*> \verbatim
+*> DOU is INTEGER
+*> If the user wants to compute only selected eigenvectors from all
+*> the eigenvalues supplied, he can specify an index range DOL:DOU.
+*> Or else the setting DOL=1, DOU=M should be applied.
+*> Note that DOL and DOU refer to the order in which the eigenvalues
+*> are stored in W.
+*> If the user wants to compute only selected eigenpairs, then
+*> the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
+*> computed eigenvectors. All other columns of Z are set to zero.
+*> \endverbatim
+*>
+*> \param[in] MINRGP
+*> \verbatim
+*> MINRGP is REAL
+*> \endverbatim
+*>
+*> \param[in] RTOL1
+*> \verbatim
+*> RTOL1 is REAL
+*> \endverbatim
+*>
+*> \param[in] RTOL2
+*> \verbatim
+*> RTOL2 is REAL
+*> Parameters for bisection.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements of W contain the APPROXIMATE eigenvalues for
+*> which eigenvectors are to be computed. The eigenvalues
+*> should be grouped by split-off block and ordered from
+*> smallest to largest within the block ( The output array
+*> W from SLARRE is expected here ). Furthermore, they are with
+*> respect to the shift of the corresponding root representation
+*> for their block. On exit, W holds the eigenvalues of the
+*> UNshifted matrix.
+*> \endverbatim
+*>
+*> \param[in,out] WERR
+*> \verbatim
+*> WERR is REAL array, dimension (N)
+*> The first M elements contain the semiwidth of the uncertainty
+*> interval of the corresponding eigenvalue in W
+*> \endverbatim
+*>
+*> \param[in,out] WGAP
+*> \verbatim
+*> WGAP is REAL array, dimension (N)
+*> The separation from the right neighbor eigenvalue in W.
+*> \endverbatim
+*>
+*> \param[in] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The indices of the blocks (submatrices) associated with the
+*> corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
+*> W(i) belongs to the first block from the top, =2 if W(i)
+*> belongs to the second block, etc.
+*> \endverbatim
+*>
+*> \param[in] INDEXW
+*> \verbatim
+*> INDEXW is INTEGER array, dimension (N)
+*> The indices of the eigenvalues within each block (submatrix);
+*> for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
+*> i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
+*> \endverbatim
+*>
+*> \param[in] GERS
+*> \verbatim
+*> GERS is REAL array, dimension (2*N)
+*> The N Gerschgorin intervals (the i-th Gerschgorin interval
+*> is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
+*> be computed from the original UNshifted matrix.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M) )
+*> If INFO = 0, the first M columns of Z contain the
+*> orthonormal eigenvectors of the matrix T
+*> corresponding to the input eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The I-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*I-1 ) through
+*> ISUPPZ( 2*I ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (12*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> \endverbatim
+*> \verbatim
+*> > 0: A problem occured in SLARRV.
+*> < 0: One of the called subroutines signaled an internal problem.
+*> Needs inspection of the corresponding parameter IINFO
+*> for further information.
+*> \endverbatim
+*> \verbatim
+*> =-1: Problem in SLARRB when refining a child's eigenvalues.
+*> =-2: Problem in SLARRF when computing the RRR of a child.
+*> When a child is inside a tight cluster, it can be difficult
+*> to find an RRR. A partial remedy from the user's point of
+*> view is to make the parameter MINRGP smaller and recompile.
+*> However, as the orthogonality of the computed vectors is
+*> proportional to 1/MINRGP, the user should be aware that
+*> he might be trading in precision when he decreases MINRGP.
+*> =-3: Problem in SLARRB when refining a single eigenvalue
+*> after the Rayleigh correction was rejected.
+*> = 5: The Rayleigh Quotient Iteration failed to converge to
+*> full accuracy in MAXITR steps.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLARRV( N, VL, VU, D, L, PIVMIN,
$ ISPLIT, M, DOL, DOU, MINRGP,
$ RTOL1, RTOL2, W, WERR, WGAP,
@@ -7,7 +286,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER DOL, DOU, INFO, LDZ, M, N
@@ -21,156 +300,6 @@
REAL Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SLARRV computes the eigenvectors of the tridiagonal matrix
-* T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
-* The input eigenvalues should have been computed by SLARRE.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* Lower and upper bounds of the interval that contains the desired
-* eigenvalues. VL < VU. Needed to compute gaps on the left or right
-* end of the extremal eigenvalues in the desired RANGE.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the N diagonal elements of the diagonal matrix D.
-* On exit, D may be overwritten.
-*
-* L (input/output) REAL array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the unit
-* bidiagonal matrix L are in elements 1 to N-1 of L
-* (if the matrix is not splitted.) At the end of each block
-* is stored the corresponding shift as given by SLARRE.
-* On exit, L is overwritten.
-*
-* PIVMIN (input) REAL
-* The minimum pivot allowed in the Sturm sequence.
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into blocks.
-* The first block consists of rows/columns 1 to
-* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
-* through ISPLIT( 2 ), etc.
-*
-* M (input) INTEGER
-* The total number of input eigenvalues. 0 <= M <= N.
-*
-* DOL (input) INTEGER
-*
-* DOU (input) INTEGER
-* If the user wants to compute only selected eigenvectors from all
-* the eigenvalues supplied, he can specify an index range DOL:DOU.
-* Or else the setting DOL=1, DOU=M should be applied.
-* Note that DOL and DOU refer to the order in which the eigenvalues
-* are stored in W.
-* If the user wants to compute only selected eigenpairs, then
-* the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
-* computed eigenvectors. All other columns of Z are set to zero.
-*
-* MINRGP (input) REAL
-*
-* RTOL1 (input) REAL
-*
-* RTOL2 (input) REAL
-* Parameters for bisection.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
-*
-* W (input/output) REAL array, dimension (N)
-* The first M elements of W contain the APPROXIMATE eigenvalues for
-* which eigenvectors are to be computed. The eigenvalues
-* should be grouped by split-off block and ordered from
-* smallest to largest within the block ( The output array
-* W from SLARRE is expected here ). Furthermore, they are with
-* respect to the shift of the corresponding root representation
-* for their block. On exit, W holds the eigenvalues of the
-* UNshifted matrix.
-*
-* WERR (input/output) REAL array, dimension (N)
-* The first M elements contain the semiwidth of the uncertainty
-* interval of the corresponding eigenvalue in W
-*
-* WGAP (input/output) REAL array, dimension (N)
-* The separation from the right neighbor eigenvalue in W.
-*
-* IBLOCK (input) INTEGER array, dimension (N)
-* The indices of the blocks (submatrices) associated with the
-* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
-* W(i) belongs to the first block from the top, =2 if W(i)
-* belongs to the second block, etc.
-*
-* INDEXW (input) INTEGER array, dimension (N)
-* The indices of the eigenvalues within each block (submatrix);
-* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
-* i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
-*
-* GERS (input) REAL array, dimension (2*N)
-* The N Gerschgorin intervals (the i-th Gerschgorin interval
-* is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
-* be computed from the original UNshifted matrix.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M) )
-* If INFO = 0, the first M columns of Z contain the
-* orthonormal eigenvectors of the matrix T
-* corresponding to the input eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The I-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*I-1 ) through
-* ISUPPZ( 2*I ).
-*
-* WORK (workspace) REAL array, dimension (12*N)
-*
-* IWORK (workspace) INTEGER array, dimension (7*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-*
-* > 0: A problem occured in SLARRV.
-* < 0: One of the called subroutines signaled an internal problem.
-* Needs inspection of the corresponding parameter IINFO
-* for further information.
-*
-* =-1: Problem in SLARRB when refining a child's eigenvalues.
-* =-2: Problem in SLARRF when computing the RRR of a child.
-* When a child is inside a tight cluster, it can be difficult
-* to find an RRR. A partial remedy from the user's point of
-* view is to make the parameter MINRGP smaller and recompile.
-* However, as the orthogonality of the computed vectors is
-* proportional to 1/MINRGP, the user should be aware that
-* he might be trading in precision when he decreases MINRGP.
-* =-3: Problem in SLARRB when refining a single eigenvalue
-* after the Rayleigh correction was rejected.
-* = 5: The Rayleigh Quotient Iteration failed to converge to
-* full accuracy in MAXITR steps.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slarscl2.f b/SRC/slarscl2.f
index 77ead2cc..5b53ec55 100644
--- a/SRC/slarscl2.f
+++ b/SRC/slarscl2.f
@@ -1,50 +1,98 @@
- SUBROUTINE SLARSCL2 ( M, N, D, X, LDX )
+*> \brief \b SLARSCL2
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER M, N, LDX
-* ..
-* .. Array Arguments ..
- REAL D( * ), X( LDX, * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLARSCL2 ( M, N, D, X, LDX )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+* REAL D( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* SLARSCL2 performs a reciprocal diagonal scaling on an vector:
-* x <-- inv(D) * x
-* where the diagonal matrix D is stored as a vector.
-*
-* Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS
-* standard.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARSCL2 performs a reciprocal diagonal scaling on an vector:
+*> x <-- inv(D) * x
+*> where the diagonal matrix D is stored as a vector.
+*>
+*> Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS
+*> standard.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of D and X. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of D and X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of D and X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, length M
+*> Diagonal matrix D, stored as a vector of length M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,N)
+*> On entry, the vector X to be scaled by D.
+*> On exit, the scaled vector.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the vector X. LDX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of D and X. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) REAL array, length M
-* Diagonal matrix D, stored as a vector of length M.
+*> \date November 2011
*
-* X (input/output) REAL array, dimension (LDX,N)
-* On entry, the vector X to be scaled by D.
-* On exit, the scaled vector.
+*> \ingroup realOTHERcomputational
*
-* LDX (input) INTEGER
-* The leading dimension of the vector X. LDX >= 0.
+* =====================================================================
+ SUBROUTINE SLARSCL2 ( M, N, D, X, LDX )
+*
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+ REAL D( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slartg.f b/SRC/slartg.f
index 4a7aae19..b7e6c6fd 100644
--- a/SRC/slartg.f
+++ b/SRC/slartg.f
@@ -1,52 +1,103 @@
- SUBROUTINE SLARTG( F, G, CS, SN, R )
+*> \brief \b SLARTG
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL CS, F, G, R, SN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLARTG( F, G, CS, SN, R )
+*
+* .. Scalar Arguments ..
+* REAL CS, F, G, R, SN
+* ..
+*
* Purpose
* =======
*
-* SLARTG generate a plane rotation so that
-*
-* [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
-* [ -SN CS ] [ G ] [ 0 ]
-*
-* This is a slower, more accurate version of the BLAS1 routine SROTG,
-* with the following other differences:
-* F and G are unchanged on return.
-* If G=0, then CS=1 and SN=0.
-* If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
-* floating point operations (saves work in SBDSQR when
-* there are zeros on the diagonal).
-*
-* If F exceeds G in magnitude, CS will be positive.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARTG generate a plane rotation so that
+*>
+*> [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
+*> [ -SN CS ] [ G ] [ 0 ]
+*>
+*> This is a slower, more accurate version of the BLAS1 routine SROTG,
+*> with the following other differences:
+*> F and G are unchanged on return.
+*> If G=0, then CS=1 and SN=0.
+*> If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any
+*> floating point operations (saves work in SBDSQR when
+*> there are zeros on the diagonal).
+*>
+*> If F exceeds G in magnitude, CS will be positive.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) REAL
-* The first component of vector to be rotated.
+*> \param[in] F
+*> \verbatim
+*> F is REAL
+*> The first component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is REAL
+*> The second component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is REAL
+*> The cosine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is REAL
+*> The sine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL
+*> The nonzero component of the rotated vector.
+*> \endverbatim
+*> \verbatim
+*> This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). 10 feb 03, SJH.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* G (input) REAL
-* The second component of vector to be rotated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CS (output) REAL
-* The cosine of the rotation.
+*> \date November 2011
*
-* SN (output) REAL
-* The sine of the rotation.
+*> \ingroup auxOTHERauxiliary
*
-* R (output) REAL
-* The nonzero component of the rotated vector.
+* =====================================================================
+ SUBROUTINE SLARTG( F, G, CS, SN, R )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). 10 feb 03, SJH.
+* .. Scalar Arguments ..
+ REAL CS, F, G, R, SN
+* ..
*
* =====================================================================
*
diff --git a/SRC/slartgp.f b/SRC/slartgp.f
index c4f541be..5f67ef6a 100644
--- a/SRC/slartgp.f
+++ b/SRC/slartgp.f
@@ -1,54 +1,101 @@
- SUBROUTINE SLARTGP( F, G, CS, SN, R )
+*> \brief \b SLARTGP
*
-* Originally SLARTG
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* Adapted to SLARTGP
-* July 2010
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- REAL CS, F, G, R, SN
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLARTGP( F, G, CS, SN, R )
+*
+* .. Scalar Arguments ..
+* REAL CS, F, G, R, SN
+* ..
+*
* Purpose
* =======
*
-* SLARTGP generates a plane rotation so that
-*
-* [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
-* [ -SN CS ] [ G ] [ 0 ]
-*
-* This is a slower, more accurate version of the Level 1 BLAS routine SROTG,
-* with the following other differences:
-* F and G are unchanged on return.
-* If G=0, then CS=(+/-)1 and SN=0.
-* If F=0 and (G .ne. 0), then CS=0 and SN=(+/-)1.
-*
-* The sign is chosen so that R >= 0.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARTGP generates a plane rotation so that
+*>
+*> [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1.
+*> [ -SN CS ] [ G ] [ 0 ]
+*>
+*> This is a slower, more accurate version of the Level 1 BLAS routine SROTG,
+*> with the following other differences:
+*> F and G are unchanged on return.
+*> If G=0, then CS=(+/-)1 and SN=0.
+*> If F=0 and (G .ne. 0), then CS=0 and SN=(+/-)1.
+*>
+*> The sign is chosen so that R >= 0.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) REAL
-* The first component of vector to be rotated.
+*> \param[in] F
+*> \verbatim
+*> F is REAL
+*> The first component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is REAL
+*> The second component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is REAL
+*> The cosine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is REAL
+*> The sine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL
+*> The nonzero component of the rotated vector.
+*> \endverbatim
+*> \verbatim
+*> This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). 10 feb 03, SJH.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* G (input) REAL
-* The second component of vector to be rotated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CS (output) REAL
-* The cosine of the rotation.
+*> \date November 2011
*
-* SN (output) REAL
-* The sine of the rotation.
+*> \ingroup auxOTHERauxiliary
*
-* R (output) REAL
-* The nonzero component of the rotated vector.
+* =====================================================================
+ SUBROUTINE SLARTGP( F, G, CS, SN, R )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). 10 feb 03, SJH.
+* .. Scalar Arguments ..
+ REAL CS, F, G, R, SN
+* ..
*
* =====================================================================
*
diff --git a/SRC/slartgs.f b/SRC/slartgs.f
index d5fb7881..54e60ade 100644
--- a/SRC/slartgs.f
+++ b/SRC/slartgs.f
@@ -1,49 +1,95 @@
- SUBROUTINE SLARTGS( X, Y, SIGMA, CS, SN )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.0) --
+*> \brief \b SLARTGS
*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- REAL CS, SIGMA, SN, X, Y
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLARTGS( X, Y, SIGMA, CS, SN )
+*
+* .. Scalar Arguments ..
+* REAL CS, SIGMA, SN, X, Y
+* ..
+*
* Purpose
* =======
*
-* SLARTGS generates a plane rotation designed to introduce a bulge in
-* Golub-Reinsch-style implicit QR iteration for the bidiagonal SVD
-* problem. X and Y are the top-row entries, and SIGMA is the shift.
-* The computed CS and SN define a plane rotation satisfying
-*
-* [ CS SN ] . [ X^2 - SIGMA ] = [ R ],
-* [ -SN CS ] [ X * Y ] [ 0 ]
-*
-* with R nonnegative. If X^2 - SIGMA and X * Y are 0, then the
-* rotation is by PI/2.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARTGS generates a plane rotation designed to introduce a bulge in
+*> Golub-Reinsch-style implicit QR iteration for the bidiagonal SVD
+*> problem. X and Y are the top-row entries, and SIGMA is the shift.
+*> The computed CS and SN define a plane rotation satisfying
+*>
+*> [ CS SN ] . [ X^2 - SIGMA ] = [ R ],
+*> [ -SN CS ] [ X * Y ] [ 0 ]
+*>
+*> with R nonnegative. If X^2 - SIGMA and X * Y are 0, then the
+*> rotation is by PI/2.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* X (input) REAL
-* The (1,1) entry of an upper bidiagonal matrix.
+*> \param[in] X
+*> \verbatim
+*> X is REAL
+*> The (1,1) entry of an upper bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is REAL
+*> The (1,2) entry of an upper bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] SIGMA
+*> \verbatim
+*> SIGMA is REAL
+*> The shift.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is REAL
+*> The cosine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is REAL
+*> The sine of the rotation.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Y (input) REAL
-* The (1,2) entry of an upper bidiagonal matrix.
+*> \date November 2011
*
-* SIGMA (input) REAL
-* The shift.
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE SLARTGS( X, Y, SIGMA, CS, SN )
*
-* CS (output) REAL
-* The cosine of the rotation.
+* -- LAPACK computational routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SN (output) REAL
-* The sine of the rotation.
+* .. Scalar Arguments ..
+ REAL CS, SIGMA, SN, X, Y
+* ..
*
* ===================================================================
*
diff --git a/SRC/slartv.f b/SRC/slartv.f
index 27eba6a3..24b67679 100644
--- a/SRC/slartv.f
+++ b/SRC/slartv.f
@@ -1,54 +1,116 @@
- SUBROUTINE SLARTV( N, X, INCX, Y, INCY, C, S, INCC )
+*> \brief \b SLARTV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, INCY, N
-* ..
-* .. Array Arguments ..
- REAL C( * ), S( * ), X( * ), Y( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARTV( N, X, INCX, Y, INCY, C, S, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* REAL C( * ), S( * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* SLARTV applies a vector of real plane rotations to elements of the
-* real vectors x and y. For i = 1,2,...,n
-*
-* ( x(i) ) := ( c(i) s(i) ) ( x(i) )
-* ( y(i) ) ( -s(i) c(i) ) ( y(i) )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARTV applies a vector of real plane rotations to elements of the
+*> real vectors x and y. For i = 1,2,...,n
+*>
+*> ( x(i) ) := ( c(i) s(i) ) ( x(i) )
+*> ( y(i) ) ( -s(i) c(i) ) ( y(i) )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be applied.
-*
-* X (input/output) REAL array,
-* dimension (1+(N-1)*INCX)
-* The vector x.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be applied.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array,
+*> dimension (1+(N-1)*INCX)
+*> The vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is REAL array,
+*> dimension (1+(N-1)*INCY)
+*> The vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (1+(N-1)*INCC)
+*> The sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C and S. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Y (input/output) REAL array,
-* dimension (1+(N-1)*INCY)
-* The vector y.
+*> \date November 2011
*
-* INCY (input) INTEGER
-* The increment between elements of Y. INCY > 0.
+*> \ingroup realOTHERauxiliary
*
-* C (input) REAL array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* =====================================================================
+ SUBROUTINE SLARTV( N, X, INCX, Y, INCY, C, S, INCC )
*
-* S (input) REAL array, dimension (1+(N-1)*INCC)
-* The sines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C and S. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ REAL C( * ), S( * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaruv.f b/SRC/slaruv.f
index de6cc1fb..10093485 100644
--- a/SRC/slaruv.f
+++ b/SRC/slaruv.f
@@ -1,53 +1,106 @@
- SUBROUTINE SLARUV( ISEED, N, X )
+*> \brief \b SLARUV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL X( N )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLARUV( ISEED, N, X )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL X( N )
+* ..
+*
* Purpose
* =======
*
-* SLARUV returns a vector of n random real numbers from a uniform (0,1)
-* distribution (n <= 128).
-*
-* This is an auxiliary routine called by SLARNV and CLARNV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARUV returns a vector of n random real numbers from a uniform (0,1)
+*> distribution (n <= 128).
+*>
+*> This is an auxiliary routine called by SLARNV and CLARNV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of random numbers to be generated. N <= 128.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> The generated random numbers.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of random numbers to be generated. N <= 128.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
*
-* X (output) REAL array, dimension (N)
-* The generated random numbers.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine uses a multiplicative congruential method with modulus
+*> 2**48 and multiplier 33952834046453 (see G.S.Fishman,
+*> 'Multiplicative congruential random number generators with modulus
+*> 2**b: an exhaustive analysis for b = 32 and a partial analysis for
+*> b = 48', Math. Comp. 189, pp 331-344, 1990).
+*>
+*> 48-bit integers are stored in 4 integer array elements with 12 bits
+*> per element. Hence the routine is portable across machines with
+*> integers of 32 bits or more.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARUV( ISEED, N, X )
*
-* This routine uses a multiplicative congruential method with modulus
-* 2**48 and multiplier 33952834046453 (see G.S.Fishman,
-* 'Multiplicative congruential random number generators with modulus
-* 2**b: an exhaustive analysis for b = 32 and a partial analysis for
-* b = 48', Math. Comp. 189, pp 331-344, 1990).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 48-bit integers are stored in 4 integer array elements with 12 bits
-* per element. Hence the routine is portable across machines with
-* integers of 32 bits or more.
+* .. Scalar Arguments ..
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL X( N )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarz.f b/SRC/slarz.f
index ee0f633f..043c4254 100644
--- a/SRC/slarz.f
+++ b/SRC/slarz.f
@@ -1,80 +1,155 @@
- SUBROUTINE SLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE
- INTEGER INCV, L, LDC, M, N
- REAL TAU
-* ..
-* .. Array Arguments ..
- REAL C( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b SLARZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, L, LDC, M, N
+* REAL TAU
+* ..
+* .. Array Arguments ..
+* REAL C( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLARZ applies a real elementary reflector H to a real M-by-N
-* matrix C, from either the left or the right. H is represented in the
-* form
-*
-* H = I - tau * v * v**T
-*
-* where tau is a real scalar and v is a real vector.
-*
-* If tau = 0, then H is taken to be the unit matrix.
-*
-*
-* H is a product of k elementary reflectors as returned by STZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARZ applies a real elementary reflector H to a real M-by-N
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*> H = I - tau * v * v**T
+*>
+*> where tau is a real scalar and v is a real vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*>
+*> H is a product of k elementary reflectors as returned by STZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* L (input) INTEGER
-* The number of entries of the vector V containing
-* the meaningful part of the Householder vectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* V (input) REAL array, dimension (1+(L-1)*abs(INCV))
-* The vector v in the representation of H as returned by
-* STZRZF. V is not used if TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of entries of the vector V containing
+*> the meaningful part of the Householder vectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension (1+(L-1)*abs(INCV))
+*> The vector v in the representation of H as returned by
+*> STZRZF. V is not used if TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) REAL
-* The value tau in the representation of H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
+*> \date November 2011
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \ingroup realOTHERcomputational
*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER SIDE
+ INTEGER INCV, L, LDC, M, N
+ REAL TAU
+* ..
+* .. Array Arguments ..
+ REAL C( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarzb.f b/SRC/slarzb.f
index 5a8a0a80..1fc70643 100644
--- a/SRC/slarzb.f
+++ b/SRC/slarzb.f
@@ -1,99 +1,193 @@
- SUBROUTINE SLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
- $ LDV, T, LDT, C, LDC, WORK, LDWORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, SIDE, STOREV, TRANS
- INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL C( LDC, * ), T( LDT, * ), V( LDV, * ),
- $ WORK( LDWORK, * )
-* ..
-*
+*> \brief \b SLARZB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
+* LDV, T, LDT, C, LDC, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL C( LDC, * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* SLARZB applies a real block reflector H or its transpose H**T to
-* a real distributed M-by-N C from the left or the right.
-*
-* Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARZB applies a real block reflector H or its transpose H**T to
+*> a real distributed M-by-N C from the left or the right.
+*>
+*> Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**T from the Left
-* = 'R': apply H or H**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H**T (Transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columnwise (not supported yet)
-* = 'R': Rowwise
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* K (input) INTEGER
-* The order of the matrix T (= the number of elementary
-* reflectors whose product defines the block reflector).
-*
-* L (input) INTEGER
-* The number of columns of the matrix V containing the
-* meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* V (input) REAL array, dimension (LDV,NV).
-* If STOREV = 'C', NV = K; if STOREV = 'R', NV = L.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K.
-*
-* T (input) REAL array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**T from the Left
+*> = 'R': apply H or H**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columnwise (not supported yet)
+*> = 'R': Rowwise
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T (= the number of elementary
+*> reflectors whose product defines the block reflector).
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix V containing the
+*> meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,NV).
+*> If STOREV = 'C', NV = K; if STOREV = 'R', NV = L.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LDWORK,K)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= max(1,N);
+*> if SIDE = 'R', LDWORK >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by H*C or H**T*C or C*H or C*H**T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LDWORK,K)
+*> \ingroup realOTHERcomputational
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= max(1,N);
-* if SIDE = 'R', LDWORK >= max(1,M).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
+ $ LDV, T, LDT, C, LDC, WORK, LDWORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, SIDE, STOREV, TRANS
+ INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL C( LDC, * ), T( LDT, * ), V( LDV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slarzt.f b/SRC/slarzt.f
index db5f869a..f20f7795 100644
--- a/SRC/slarzt.f
+++ b/SRC/slarzt.f
@@ -1,123 +1,168 @@
- SUBROUTINE SLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, STOREV
- INTEGER K, LDT, LDV, N
-* ..
-* .. Array Arguments ..
- REAL T( LDT, * ), TAU( * ), V( LDV, * )
-* ..
-*
+*> \brief \b SLARZT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, STOREV
+* INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+* REAL T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* SLARZT forms the triangular factor T of a real block reflector
-* H of order > n, which is defined as a product of k elementary
-* reflectors.
-*
-* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*
-* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
-*
-* If STOREV = 'C', the vector which defines the elementary reflector
-* H(i) is stored in the i-th column of the array V, and
-*
-* H = I - V * T * V**T
-*
-* If STOREV = 'R', the vector which defines the elementary reflector
-* H(i) is stored in the i-th row of the array V, and
-*
-* H = I - V**T * T * V
-*
-* Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARZT forms the triangular factor T of a real block reflector
+*> H of order > n, which is defined as a product of k elementary
+*> reflectors.
+*>
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
+*>
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*>
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
+*>
+*> H = I - V * T * V**T
+*>
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
+*>
+*> H = I - V**T * T * V
+*>
+*> Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIRECT (input) CHARACTER*1
-* Specifies the order in which the elementary reflectors are
-* multiplied to form the block reflector:
-* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Specifies how the vectors which define the elementary
-* reflectors are stored (see also Further Details):
-* = 'C': columnwise (not supported yet)
-* = 'R': rowwise
-*
-* N (input) INTEGER
-* The order of the block reflector H. N >= 0.
-*
-* K (input) INTEGER
-* The order of the triangular factor T (= the number of
-* elementary reflectors). K >= 1.
-*
-* V (input/output) REAL array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,N) if STOREV = 'R'
-* The matrix V. See further details.
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies the order in which the elementary reflectors are
+*> multiplied to form the block reflector:
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i).
+*> \date November 2011
*
-* T (output) REAL array, dimension (LDT,K)
-* The k by k triangular factor T of the block reflector.
-* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-* lower triangular. The rest of the array is not used.
+*> \ingroup realOTHERcomputational
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors are stored (see also Further Details):
+*> = 'C': columnwise (not supported yet)
+*> = 'R': rowwise
+*>
+*> N (input) INTEGER
+*> The order of the block reflector H. N >= 0.
+*>
+*> K (input) INTEGER
+*> The order of the triangular factor T (= the number of
+*> elementary reflectors). K >= 1.
+*>
+*> V (input/output) REAL array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,N) if STOREV = 'R'
+*> The matrix V. See further details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>
+*> TAU (input) REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i).
+*>
+*> T (output) REAL array, dimension (LDT,K)
+*> The k by k triangular factor T of the block reflector.
+*> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*> lower triangular. The rest of the array is not used.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> ______V_____
+*> ( v1 v2 v3 ) / \
+*> ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 )
+*> V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 )
+*> ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 )
+*> ( v1 v2 v3 )
+*> . . .
+*> . . .
+*> 1 . .
+*> 1 .
+*> 1
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> ______V_____
+*> 1 / \
+*> . 1 ( 1 . . . . v1 v1 v1 v1 v1 )
+*> . . 1 ( . 1 . . . v2 v2 v2 v2 v2 )
+*> . . . ( . . 1 . . v3 v3 v3 v3 v3 )
+*> . . .
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*> V = ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* ______V_____
-* ( v1 v2 v3 ) / \
-* ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 )
-* V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 )
-* ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 )
-* ( v1 v2 v3 )
-* . . .
-* . . .
-* 1 . .
-* 1 .
-* 1
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
-*
-* ______V_____
-* 1 / \
-* . 1 ( 1 . . . . v1 v1 v1 v1 v1 )
-* . . 1 ( . 1 . . . v2 v2 v2 v2 v2 )
-* . . . ( . . 1 . . v3 v3 v3 v3 v3 )
-* . . .
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-* V = ( v1 v2 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, STOREV
+ INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+ REAL T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slas2.f b/SRC/slas2.f
index 8adf0359..595836e3 100644
--- a/SRC/slas2.f
+++ b/SRC/slas2.f
@@ -1,59 +1,114 @@
- SUBROUTINE SLAS2( F, G, H, SSMIN, SSMAX )
+*> \brief \b SLAS2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL F, G, H, SSMAX, SSMIN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAS2( F, G, H, SSMIN, SSMAX )
+*
+* .. Scalar Arguments ..
+* REAL F, G, H, SSMAX, SSMIN
+* ..
+*
* Purpose
* =======
*
-* SLAS2 computes the singular values of the 2-by-2 matrix
-* [ F G ]
-* [ 0 H ].
-* On return, SSMIN is the smaller singular value and SSMAX is the
-* larger singular value.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAS2 computes the singular values of the 2-by-2 matrix
+*> [ F G ]
+*> [ 0 H ].
+*> On return, SSMIN is the smaller singular value and SSMAX is the
+*> larger singular value.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) REAL
-* The (1,1) element of the 2-by-2 matrix.
+*> \param[in] F
+*> \verbatim
+*> F is REAL
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is REAL
+*> The (1,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is REAL
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] SSMIN
+*> \verbatim
+*> SSMIN is REAL
+*> The smaller singular value.
+*> \endverbatim
+*>
+*> \param[out] SSMAX
+*> \verbatim
+*> SSMAX is REAL
+*> The larger singular value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* G (input) REAL
-* The (1,2) element of the 2-by-2 matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* H (input) REAL
-* The (2,2) element of the 2-by-2 matrix.
+*> \date November 2011
*
-* SSMIN (output) REAL
-* The smaller singular value.
+*> \ingroup auxOTHERauxiliary
*
-* SSMAX (output) REAL
-* The larger singular value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Barring over/underflow, all output quantities are correct to within
+*> a few units in the last place (ulps), even in the absence of a guard
+*> digit in addition/subtraction.
+*>
+*> In IEEE arithmetic, the code works correctly if one matrix element is
+*> infinite.
+*>
+*> Overflow will not occur unless the largest singular value itself
+*> overflows, or is within a few ulps of overflow. (On machines with
+*> partial overflow, like the Cray, overflow may occur if the largest
+*> singular value is within a factor of 2 of overflow.)
+*>
+*> Underflow is harmless if underflow is gradual. Otherwise, results
+*> may correspond to a matrix modified by perturbations of size near
+*> the underflow threshold.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLAS2( F, G, H, SSMIN, SSMAX )
*
-* Barring over/underflow, all output quantities are correct to within
-* a few units in the last place (ulps), even in the absence of a guard
-* digit in addition/subtraction.
-*
-* In IEEE arithmetic, the code works correctly if one matrix element is
-* infinite.
-*
-* Overflow will not occur unless the largest singular value itself
-* overflows, or is within a few ulps of overflow. (On machines with
-* partial overflow, like the Cray, overflow may occur if the largest
-* singular value is within a factor of 2 of overflow.)
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Underflow is harmless if underflow is gradual. Otherwise, results
-* may correspond to a matrix modified by perturbations of size near
-* the underflow threshold.
+* .. Scalar Arguments ..
+ REAL F, G, H, SSMAX, SSMIN
+* ..
*
* ====================================================================
*
diff --git a/SRC/slascl.f b/SRC/slascl.f
index 824e34dd..83c3d0df 100644
--- a/SRC/slascl.f
+++ b/SRC/slascl.f
@@ -1,9 +1,139 @@
+*> \brief \b SLASCL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TYPE
+* INTEGER INFO, KL, KU, LDA, M, N
+* REAL CFROM, CTO
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASCL multiplies the M by N real matrix A by the real scalar
+*> CTO/CFROM. This is done without over/underflow as long as the final
+*> result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
+*> A may be full, upper triangular, lower triangular, upper Hessenberg,
+*> or banded.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> TYPE indices the storage type of the input matrix.
+*> = 'G': A is a full matrix.
+*> = 'L': A is a lower triangular matrix.
+*> = 'U': A is an upper triangular matrix.
+*> = 'H': A is an upper Hessenberg matrix.
+*> = 'B': A is a symmetric band matrix with lower bandwidth KL
+*> and upper bandwidth KU and with the only the lower
+*> half stored.
+*> = 'Q': A is a symmetric band matrix with lower bandwidth KL
+*> and upper bandwidth KU and with the only the upper
+*> half stored.
+*> = 'Z': A is a band matrix with lower bandwidth KL and upper
+*> bandwidth KU. See SGBTRF for storage details.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower bandwidth of A. Referenced only if TYPE = 'B',
+*> 'Q' or 'Z'.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper bandwidth of A. Referenced only if TYPE = 'B',
+*> 'Q' or 'Z'.
+*> \endverbatim
+*>
+*> \param[in] CFROM
+*> \verbatim
+*> CFROM is REAL
+*> \endverbatim
+*>
+*> \param[in] CTO
+*> \verbatim
+*> CTO is REAL
+*> The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
+*> without over/underflow if the final result CTO*A(I,J)/CFROM
+*> can be represented without over/underflow. CFROM must be
+*> nonzero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The matrix to be multiplied by CTO/CFROM. See TYPE for the
+*> storage type.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 - successful exit
+*> <0 - if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TYPE
@@ -14,66 +144,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SLASCL multiplies the M by N real matrix A by the real scalar
-* CTO/CFROM. This is done without over/underflow as long as the final
-* result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
-* A may be full, upper triangular, lower triangular, upper Hessenberg,
-* or banded.
-*
-* Arguments
-* =========
-*
-* TYPE (input) CHARACTER*1
-* TYPE indices the storage type of the input matrix.
-* = 'G': A is a full matrix.
-* = 'L': A is a lower triangular matrix.
-* = 'U': A is an upper triangular matrix.
-* = 'H': A is an upper Hessenberg matrix.
-* = 'B': A is a symmetric band matrix with lower bandwidth KL
-* and upper bandwidth KU and with the only the lower
-* half stored.
-* = 'Q': A is a symmetric band matrix with lower bandwidth KL
-* and upper bandwidth KU and with the only the upper
-* half stored.
-* = 'Z': A is a band matrix with lower bandwidth KL and upper
-* bandwidth KU. See SGBTRF for storage details.
-*
-* KL (input) INTEGER
-* The lower bandwidth of A. Referenced only if TYPE = 'B',
-* 'Q' or 'Z'.
-*
-* KU (input) INTEGER
-* The upper bandwidth of A. Referenced only if TYPE = 'B',
-* 'Q' or 'Z'.
-*
-* CFROM (input) REAL
-*
-* CTO (input) REAL
-* The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
-* without over/underflow if the final result CTO*A(I,J)/CFROM
-* can be represented without over/underflow. CFROM must be
-* nonzero.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* The matrix to be multiplied by CTO/CFROM. See TYPE for the
-* storage type.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* INFO (output) INTEGER
-* 0 - successful exit
-* <0 - if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slascl2.f b/SRC/slascl2.f
index 7633b36a..38a75aa3 100644
--- a/SRC/slascl2.f
+++ b/SRC/slascl2.f
@@ -1,50 +1,98 @@
- SUBROUTINE SLASCL2 ( M, N, D, X, LDX )
+*> \brief \b SLASCL2
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER M, N, LDX
-* ..
-* .. Array Arguments ..
- REAL D( * ), X( LDX, * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLASCL2 ( M, N, D, X, LDX )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+* REAL D( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* SLASCL2 performs a diagonal scaling on a vector:
-* x <-- D * x
-* where the diagonal matrix D is stored as a vector.
-*
-* Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS
-* standard.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASCL2 performs a diagonal scaling on a vector:
+*> x <-- D * x
+*> where the diagonal matrix D is stored as a vector.
+*>
+*> Eventually to be replaced by BLAS_sge_diag_scale in the new BLAS
+*> standard.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of D and X. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of D and X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of D and X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, length M
+*> Diagonal matrix D, stored as a vector of length M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,N)
+*> On entry, the vector X to be scaled by D.
+*> On exit, the scaled vector.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the vector X. LDX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of D and X. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) REAL array, length M
-* Diagonal matrix D, stored as a vector of length M.
+*> \date November 2011
*
-* X (input/output) REAL array, dimension (LDX,N)
-* On entry, the vector X to be scaled by D.
-* On exit, the scaled vector.
+*> \ingroup realOTHERcomputational
*
-* LDX (input) INTEGER
-* The leading dimension of the vector X. LDX >= 0.
+* =====================================================================
+ SUBROUTINE SLASCL2 ( M, N, D, X, LDX )
+*
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+ REAL D( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasd0.f b/SRC/slasd0.f
index af229b3b..ccbba244 100644
--- a/SRC/slasd0.f
+++ b/SRC/slasd0.f
@@ -1,84 +1,166 @@
- SUBROUTINE SLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
- $ WORK, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDU, LDVT, N, SMLSIZ, SQRE
-* ..
-* .. Array Arguments ..
- INTEGER IWORK( * )
- REAL D( * ), E( * ), U( LDU, * ), VT( LDVT, * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b SLASD0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDU, LDVT, N, SMLSIZ, SQRE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), E( * ), U( LDU, * ), VT( LDVT, * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* Using a divide and conquer approach, SLASD0 computes the singular
-* value decomposition (SVD) of a real upper bidiagonal N-by-M
-* matrix B with diagonal D and offdiagonal E, where M = N + SQRE.
-* The algorithm computes orthogonal matrices U and VT such that
-* B = U * S * VT. The singular values S are overwritten on D.
-*
-* A related subroutine, SLASDA, computes only the singular values,
-* and optionally, the singular vectors in compact form.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Using a divide and conquer approach, SLASD0 computes the singular
+*> value decomposition (SVD) of a real upper bidiagonal N-by-M
+*> matrix B with diagonal D and offdiagonal E, where M = N + SQRE.
+*> The algorithm computes orthogonal matrices U and VT such that
+*> B = U * S * VT. The singular values S are overwritten on D.
+*>
+*> A related subroutine, SLASDA, computes only the singular values,
+*> and optionally, the singular vectors in compact form.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* On entry, the row dimension of the upper bidiagonal matrix.
-* This is also the dimension of the main diagonal array D.
-*
-* SQRE (input) INTEGER
-* Specifies the column dimension of the bidiagonal matrix.
-* = 0: The bidiagonal matrix has column dimension M = N;
-* = 1: The bidiagonal matrix has column dimension M = N+1;
-*
-* D (input/output) REAL array, dimension (N)
-* On entry D contains the main diagonal of the bidiagonal
-* matrix.
-* On exit D, if INFO = 0, contains its singular values.
-*
-* E (input) REAL array, dimension (M-1)
-* Contains the subdiagonal entries of the bidiagonal matrix.
-* On exit, E has been destroyed.
-*
-* U (output) REAL array, dimension at least (LDQ, N)
-* On exit, U contains the left singular vectors.
-*
-* LDU (input) INTEGER
-* On entry, leading dimension of U.
-*
-* VT (output) REAL array, dimension at least (LDVT, M)
-* On exit, VT**T contains the right singular vectors.
-*
-* LDVT (input) INTEGER
-* On entry, leading dimension of VT.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, the row dimension of the upper bidiagonal matrix.
+*> This is also the dimension of the main diagonal array D.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> Specifies the column dimension of the bidiagonal matrix.
+*> = 0: The bidiagonal matrix has column dimension M = N;
+*> = 1: The bidiagonal matrix has column dimension M = N+1;
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry D contains the main diagonal of the bidiagonal
+*> matrix.
+*> On exit D, if INFO = 0, contains its singular values.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (M-1)
+*> Contains the subdiagonal entries of the bidiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension at least (LDQ, N)
+*> On exit, U contains the left singular vectors.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> On entry, leading dimension of U.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is REAL array, dimension at least (LDVT, M)
+*> On exit, VT**T contains the right singular vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> On entry, leading dimension of VT.
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> On entry, maximum size of the subproblems at the
+*> bottom of the computation tree.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*M**2+2*M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SMLSIZ (input) INTEGER
-* On entry, maximum size of the subproblems at the
-* bottom of the computation tree.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IWORK (workspace) INTEGER array, dimension (8*N)
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (3*M**2+2*M)
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
+ $ WORK, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER INFO, LDU, LDVT, N, SMLSIZ, SQRE
+* ..
+* .. Array Arguments ..
+ INTEGER IWORK( * )
+ REAL D( * ), E( * ), U( LDU, * ), VT( LDVT, * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasd1.f b/SRC/slasd1.f
index 6e3a2a67..e6e4172f 100644
--- a/SRC/slasd1.f
+++ b/SRC/slasd1.f
@@ -1,132 +1,221 @@
- SUBROUTINE SLASD1( NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT,
- $ IDXQ, IWORK, WORK, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDU, LDVT, NL, NR, SQRE
- REAL ALPHA, BETA
-* ..
-* .. Array Arguments ..
- INTEGER IDXQ( * ), IWORK( * )
- REAL D( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
-* ..
-*
+*> \brief \b SLASD1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD1( NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT,
+* IDXQ, IWORK, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDU, LDVT, NL, NR, SQRE
+* REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* INTEGER IDXQ( * ), IWORK( * )
+* REAL D( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLASD1 computes the SVD of an upper bidiagonal N-by-M matrix B,
-* where N = NL + NR + 1 and M = N + SQRE. SLASD1 is called from SLASD0.
-*
-* A related subroutine SLASD7 handles the case in which the singular
-* values (and the singular vectors in factored form) are desired.
-*
-* SLASD1 computes the SVD as follows:
-*
-* ( D1(in) 0 0 0 )
-* B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
-* ( 0 0 D2(in) 0 )
-*
-* = U(out) * ( D(out) 0) * VT(out)
-*
-* where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M
-* with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
-* elsewhere; and the entry b is empty if SQRE = 0.
-*
-* The left singular vectors of the original matrix are stored in U, and
-* the transpose of the right singular vectors are stored in VT, and the
-* singular values are in D. The algorithm consists of three stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple singular values or when there are zeros in
-* the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine SLASD2.
-*
-* The second stage consists of calculating the updated
-* singular values. This is done by finding the square roots of the
-* roots of the secular equation via the routine SLASD4 (as called
-* by SLASD3). This routine also calculates the singular vectors of
-* the current problem.
-*
-* The final stage consists of computing the updated singular vectors
-* directly using the updated singular values. The singular vectors
-* for the current problem are multiplied with the singular vectors
-* from the overall problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASD1 computes the SVD of an upper bidiagonal N-by-M matrix B,
+*> where N = NL + NR + 1 and M = N + SQRE. SLASD1 is called from SLASD0.
+*>
+*> A related subroutine SLASD7 handles the case in which the singular
+*> values (and the singular vectors in factored form) are desired.
+*>
+*> SLASD1 computes the SVD as follows:
+*>
+*> ( D1(in) 0 0 0 )
+*> B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
+*> ( 0 0 D2(in) 0 )
+*>
+*> = U(out) * ( D(out) 0) * VT(out)
+*>
+*> where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M
+*> with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
+*> elsewhere; and the entry b is empty if SQRE = 0.
+*>
+*> The left singular vectors of the original matrix are stored in U, and
+*> the transpose of the right singular vectors are stored in VT, and the
+*> singular values are in D. The algorithm consists of three stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple singular values or when there are zeros in
+*> the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine SLASD2.
+*>
+*> The second stage consists of calculating the updated
+*> singular values. This is done by finding the square roots of the
+*> roots of the secular equation via the routine SLASD4 (as called
+*> by SLASD3). This routine also calculates the singular vectors of
+*> the current problem.
+*>
+*> The final stage consists of computing the updated singular vectors
+*> directly using the updated singular values. The singular vectors
+*> for the current problem are multiplied with the singular vectors
+*> from the overall problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has row dimension N = NL + NR + 1,
-* and column dimension M = N + SQRE.
-*
-* D (input/output) REAL array, dimension (NL+NR+1).
-* N = NL+NR+1
-* On entry D(1:NL,1:NL) contains the singular values of the
-* upper block; and D(NL+2:N) contains the singular values of
-* the lower block. On exit D(1:N) contains the singular values
-* of the modified matrix.
-*
-* ALPHA (input/output) REAL
-* Contains the diagonal element associated with the added row.
-*
-* BETA (input/output) REAL
-* Contains the off-diagonal element associated with the added
-* row.
-*
-* U (input/output) REAL array, dimension (LDU,N)
-* On entry U(1:NL, 1:NL) contains the left singular vectors of
-* the upper block; U(NL+2:N, NL+2:N) contains the left singular
-* vectors of the lower block. On exit U contains the left
-* singular vectors of the bidiagonal matrix.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max( 1, N ).
-*
-* VT (input/output) REAL array, dimension (LDVT,M)
-* where M = N + SQRE.
-* On entry VT(1:NL+1, 1:NL+1)**T contains the right singular
-* vectors of the upper block; VT(NL+2:M, NL+2:M)**T contains
-* the right singular vectors of the lower block. On exit
-* VT**T contains the right singular vectors of the
-* bidiagonal matrix.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= max( 1, M ).
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has row dimension N = NL + NR + 1,
+*> and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (NL+NR+1).
+*> N = NL+NR+1
+*> On entry D(1:NL,1:NL) contains the singular values of the
+*> upper block; and D(NL+2:N) contains the singular values of
+*> the lower block. On exit D(1:N) contains the singular values
+*> of the modified matrix.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> Contains the diagonal element associated with the added row.
+*> \endverbatim
+*>
+*> \param[in,out] BETA
+*> \verbatim
+*> BETA is REAL
+*> Contains the off-diagonal element associated with the added
+*> row.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,N)
+*> On entry U(1:NL, 1:NL) contains the left singular vectors of
+*> the upper block; U(NL+2:N, NL+2:N) contains the left singular
+*> vectors of the lower block. On exit U contains the left
+*> singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT,M)
+*> where M = N + SQRE.
+*> On entry VT(1:NL+1, 1:NL+1)**T contains the right singular
+*> vectors of the upper block; VT(NL+2:M, NL+2:M)**T contains
+*> the right singular vectors of the lower block. On exit
+*> VT**T contains the right singular vectors of the
+*> bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= max( 1, M ).
+*> \endverbatim
+*>
+*> \param[out] IDXQ
+*> \verbatim
+*> IDXQ is INTEGER array, dimension (N)
+*> This contains the permutation which will reintegrate the
+*> subproblem just solved back into sorted order, i.e.
+*> D( IDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*M**2+2*M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IDXQ (output) INTEGER array, dimension (N)
-* This contains the permutation which will reintegrate the
-* subproblem just solved back into sorted order, i.e.
-* D( IDXQ( I = 1, N ) ) will be in ascending order.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IWORK (workspace) INTEGER array, dimension (4*N)
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (3*M**2+2*M)
+*> \ingroup auxOTHERauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASD1( NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT,
+ $ IDXQ, IWORK, WORK, INFO )
*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDU, LDVT, NL, NR, SQRE
+ REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+ INTEGER IDXQ( * ), IWORK( * )
+ REAL D( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasd2.f b/SRC/slasd2.f
index 0c4271e9..2b38503a 100644
--- a/SRC/slasd2.f
+++ b/SRC/slasd2.f
@@ -1,3 +1,270 @@
+*> \brief \b SLASD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD2( NL, NR, SQRE, K, D, Z, ALPHA, BETA, U, LDU, VT,
+* LDVT, DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX,
+* IDXC, IDXQ, COLTYP, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE
+* REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* INTEGER COLTYP( * ), IDX( * ), IDXC( * ), IDXP( * ),
+* $ IDXQ( * )
+* REAL D( * ), DSIGMA( * ), U( LDU, * ),
+* $ U2( LDU2, * ), VT( LDVT, * ), VT2( LDVT2, * ),
+* $ Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASD2 merges the two sets of singular values together into a single
+*> sorted set. Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur: when two or more
+*> singular values are close together or if there is a tiny entry in the
+*> Z vector. For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*>
+*> SLASD2 is called from SLASD1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has N = NL + NR + 1 rows and
+*> M = N + SQRE >= N columns.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix,
+*> This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry D contains the singular values of the two submatrices
+*> to be combined. On exit D contains the trailing (N-K) updated
+*> singular values (those which were deflated) sorted into
+*> increasing order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (N)
+*> On exit Z contains the updating row vector in the secular
+*> equation.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> Contains the diagonal element associated with the added row.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> Contains the off-diagonal element associated with the added
+*> row.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,N)
+*> On entry U contains the left singular vectors of two
+*> submatrices in the two square blocks with corners at (1,1),
+*> (NL, NL), and (NL+2, NL+2), (N,N).
+*> On exit U contains the trailing (N-K) updated left singular
+*> vectors (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT,M)
+*> On entry VT**T contains the right singular vectors of two
+*> submatrices in the two square blocks with corners at (1,1),
+*> (NL+1, NL+1), and (NL+2, NL+2), (M,M).
+*> On exit VT**T contains the trailing (N-K) updated right singular
+*> vectors (those which were deflated) in its last N-K columns.
+*> In case SQRE =1, the last row of VT spans the right null
+*> space.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= M.
+*> \endverbatim
+*>
+*> \param[out] DSIGMA
+*> \verbatim
+*> DSIGMA is REAL array, dimension (N)
+*> Contains a copy of the diagonal elements (K-1 singular values
+*> and one zero) in the secular equation.
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is REAL array, dimension (LDU2,N)
+*> Contains a copy of the first K-1 left singular vectors which
+*> will be used by SLASD3 in a matrix multiply (SGEMM) to solve
+*> for the new left singular vectors. U2 is arranged into four
+*> blocks. The first block contains a column with 1 at NL+1 and
+*> zero everywhere else; the second block contains non-zero
+*> entries only at and above NL; the third contains non-zero
+*> entries only below NL+1; and the fourth is dense.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2. LDU2 >= N.
+*> \endverbatim
+*>
+*> \param[out] VT2
+*> \verbatim
+*> VT2 is REAL array, dimension (LDVT2,N)
+*> VT2**T contains a copy of the first K right singular vectors
+*> which will be used by SLASD3 in a matrix multiply (SGEMM) to
+*> solve for the new right singular vectors. VT2 is arranged into
+*> three blocks. The first block contains a row that corresponds
+*> to the special 0 diagonal element in SIGMA; the second block
+*> contains non-zeros only at and before NL +1; the third block
+*> contains non-zeros only at and after NL +2.
+*> \endverbatim
+*>
+*> \param[in] LDVT2
+*> \verbatim
+*> LDVT2 is INTEGER
+*> The leading dimension of the array VT2. LDVT2 >= M.
+*> \endverbatim
+*>
+*> \param[out] IDXP
+*> \verbatim
+*> IDXP is INTEGER array, dimension (N)
+*> This will contain the permutation used to place deflated
+*> values of D at the end of the array. On output IDXP(2:K)
+*> points to the nondeflated D-values and IDXP(K+1:N)
+*> points to the deflated singular values.
+*> \endverbatim
+*>
+*> \param[out] IDX
+*> \verbatim
+*> IDX is INTEGER array, dimension (N)
+*> This will contain the permutation used to sort the contents of
+*> D into ascending order.
+*> \endverbatim
+*>
+*> \param[out] IDXC
+*> \verbatim
+*> IDXC is INTEGER array, dimension (N)
+*> This will contain the permutation used to arrange the columns
+*> of the deflated U matrix into three groups: the first group
+*> contains non-zero entries only at and above NL, the second
+*> contains non-zero entries only below NL+2, and the third is
+*> dense.
+*> \endverbatim
+*>
+*> \param[in,out] IDXQ
+*> \verbatim
+*> IDXQ is INTEGER array, dimension (N)
+*> This contains the permutation which separately sorts the two
+*> sub-problems in D into ascending order. Note that entries in
+*> the first hlaf of this permutation must first be moved one
+*> position backward; and entries in the second half
+*> must first have NL+1 added to their values.
+*> \endverbatim
+*>
+*> \param[out] COLTYP
+*> \verbatim
+*> COLTYP is INTEGER array, dimension (N)
+*> As workspace, this will contain a label which will indicate
+*> which of the following types a column in the U2 matrix or a
+*> row in the VT2 matrix is:
+*> 1 : non-zero in the upper half only
+*> 2 : non-zero in the lower half only
+*> 3 : dense
+*> 4 : deflated
+*> \endverbatim
+*> \verbatim
+*> On exit, it is an array of dimension 4, with COLTYP(I) being
+*> the dimension of the I-th type columns.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLASD2( NL, NR, SQRE, K, D, Z, ALPHA, BETA, U, LDU, VT,
$ LDVT, DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX,
$ IDXC, IDXQ, COLTYP, INFO )
@@ -5,7 +272,7 @@
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE
@@ -19,152 +286,6 @@
$ Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASD2 merges the two sets of singular values together into a single
-* sorted set. Then it tries to deflate the size of the problem.
-* There are two ways in which deflation can occur: when two or more
-* singular values are close together or if there is a tiny entry in the
-* Z vector. For each such occurrence the order of the related secular
-* equation problem is reduced by one.
-*
-* SLASD2 is called from SLASD1.
-*
-* Arguments
-* =========
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has N = NL + NR + 1 rows and
-* M = N + SQRE >= N columns.
-*
-* K (output) INTEGER
-* Contains the dimension of the non-deflated matrix,
-* This is the order of the related secular equation. 1 <= K <=N.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry D contains the singular values of the two submatrices
-* to be combined. On exit D contains the trailing (N-K) updated
-* singular values (those which were deflated) sorted into
-* increasing order.
-*
-* Z (output) REAL array, dimension (N)
-* On exit Z contains the updating row vector in the secular
-* equation.
-*
-* ALPHA (input) REAL
-* Contains the diagonal element associated with the added row.
-*
-* BETA (input) REAL
-* Contains the off-diagonal element associated with the added
-* row.
-*
-* U (input/output) REAL array, dimension (LDU,N)
-* On entry U contains the left singular vectors of two
-* submatrices in the two square blocks with corners at (1,1),
-* (NL, NL), and (NL+2, NL+2), (N,N).
-* On exit U contains the trailing (N-K) updated left singular
-* vectors (those which were deflated) in its last N-K columns.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= N.
-*
-* VT (input/output) REAL array, dimension (LDVT,M)
-* On entry VT**T contains the right singular vectors of two
-* submatrices in the two square blocks with corners at (1,1),
-* (NL+1, NL+1), and (NL+2, NL+2), (M,M).
-* On exit VT**T contains the trailing (N-K) updated right singular
-* vectors (those which were deflated) in its last N-K columns.
-* In case SQRE =1, the last row of VT spans the right null
-* space.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= M.
-*
-* DSIGMA (output) REAL array, dimension (N)
-* Contains a copy of the diagonal elements (K-1 singular values
-* and one zero) in the secular equation.
-*
-* U2 (output) REAL array, dimension (LDU2,N)
-* Contains a copy of the first K-1 left singular vectors which
-* will be used by SLASD3 in a matrix multiply (SGEMM) to solve
-* for the new left singular vectors. U2 is arranged into four
-* blocks. The first block contains a column with 1 at NL+1 and
-* zero everywhere else; the second block contains non-zero
-* entries only at and above NL; the third contains non-zero
-* entries only below NL+1; and the fourth is dense.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2. LDU2 >= N.
-*
-* VT2 (output) REAL array, dimension (LDVT2,N)
-* VT2**T contains a copy of the first K right singular vectors
-* which will be used by SLASD3 in a matrix multiply (SGEMM) to
-* solve for the new right singular vectors. VT2 is arranged into
-* three blocks. The first block contains a row that corresponds
-* to the special 0 diagonal element in SIGMA; the second block
-* contains non-zeros only at and before NL +1; the third block
-* contains non-zeros only at and after NL +2.
-*
-* LDVT2 (input) INTEGER
-* The leading dimension of the array VT2. LDVT2 >= M.
-*
-* IDXP (workspace) INTEGER array, dimension (N)
-* This will contain the permutation used to place deflated
-* values of D at the end of the array. On output IDXP(2:K)
-* points to the nondeflated D-values and IDXP(K+1:N)
-* points to the deflated singular values.
-*
-* IDX (workspace) INTEGER array, dimension (N)
-* This will contain the permutation used to sort the contents of
-* D into ascending order.
-*
-* IDXC (output) INTEGER array, dimension (N)
-* This will contain the permutation used to arrange the columns
-* of the deflated U matrix into three groups: the first group
-* contains non-zero entries only at and above NL, the second
-* contains non-zero entries only below NL+2, and the third is
-* dense.
-*
-* IDXQ (input/output) INTEGER array, dimension (N)
-* This contains the permutation which separately sorts the two
-* sub-problems in D into ascending order. Note that entries in
-* the first hlaf of this permutation must first be moved one
-* position backward; and entries in the second half
-* must first have NL+1 added to their values.
-*
-* COLTYP (workspace/output) INTEGER array, dimension (N)
-* As workspace, this will contain a label which will indicate
-* which of the following types a column in the U2 matrix or a
-* row in the VT2 matrix is:
-* 1 : non-zero in the upper half only
-* 2 : non-zero in the lower half only
-* 3 : dense
-* 4 : deflated
-*
-* On exit, it is an array of dimension 4, with COLTYP(I) being
-* the dimension of the I-th type columns.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasd3.f b/SRC/slasd3.f
index 62f0a232..3989554f 100644
--- a/SRC/slasd3.f
+++ b/SRC/slasd3.f
@@ -1,3 +1,226 @@
+*> \brief \b SLASD3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD3( NL, NR, SQRE, K, D, Q, LDQ, DSIGMA, U, LDU, U2,
+* LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR,
+* $ SQRE
+* ..
+* .. Array Arguments ..
+* INTEGER CTOT( * ), IDXC( * )
+* REAL D( * ), DSIGMA( * ), Q( LDQ, * ), U( LDU, * ),
+* $ U2( LDU2, * ), VT( LDVT, * ), VT2( LDVT2, * ),
+* $ Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASD3 finds all the square roots of the roots of the secular
+*> equation, as defined by the values in D and Z. It makes the
+*> appropriate calls to SLASD4 and then updates the singular
+*> vectors by matrix multiplication.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*> SLASD3 is called from SLASD1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has N = NL + NR + 1 rows and
+*> M = N + SQRE >= N columns.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The size of the secular equation, 1 =< K = < N.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension(K)
+*> On exit the square roots of the roots of the secular equation,
+*> in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array,
+*> dimension at least (LDQ,K).
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= K.
+*> \endverbatim
+*>
+*> \param[in,out] DSIGMA
+*> \verbatim
+*> DSIGMA is REAL array, dimension(K)
+*> The first K elements of this array contain the old roots
+*> of the deflated updating problem. These are the poles
+*> of the secular equation.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> The last N - K columns of this matrix contain the deflated
+*> left singular vectors.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= N.
+*> \endverbatim
+*>
+*> \param[in] U2
+*> \verbatim
+*> U2 is REAL array, dimension (LDU2, N)
+*> The first K columns of this matrix contain the non-deflated
+*> left singular vectors for the split problem.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2. LDU2 >= N.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT, M)
+*> The last M - K columns of VT**T contain the deflated
+*> right singular vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VT2
+*> \verbatim
+*> VT2 is REAL array, dimension (LDVT2, N)
+*> The first K columns of VT2**T contain the non-deflated
+*> right singular vectors for the split problem.
+*> \endverbatim
+*>
+*> \param[in] LDVT2
+*> \verbatim
+*> LDVT2 is INTEGER
+*> The leading dimension of the array VT2. LDVT2 >= N.
+*> \endverbatim
+*>
+*> \param[in] IDXC
+*> \verbatim
+*> IDXC is INTEGER array, dimension (N)
+*> The permutation used to arrange the columns of U (and rows of
+*> VT) into three groups: the first group contains non-zero
+*> entries only at and above (or before) NL +1; the second
+*> contains non-zero entries only at and below (or after) NL+2;
+*> and the third is dense. The first column of U and the row of
+*> VT are treated separately, however.
+*> \endverbatim
+*> \verbatim
+*> The rows of the singular vectors found by SLASD4
+*> must be likewise permuted before the matrix multiplies can
+*> take place.
+*> \endverbatim
+*>
+*> \param[in] CTOT
+*> \verbatim
+*> CTOT is INTEGER array, dimension (4)
+*> A count of the total number of the various types of columns
+*> in U (or rows in VT), as described in IDXC. The fourth column
+*> type is any column which has been deflated.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (K)
+*> The first K elements of this array contain the components
+*> of the deflation-adjusted updating row vector.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLASD3( NL, NR, SQRE, K, D, Q, LDQ, DSIGMA, U, LDU, U2,
$ LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z,
$ INFO )
@@ -5,7 +228,7 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR,
@@ -18,118 +241,6 @@
$ Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASD3 finds all the square roots of the roots of the secular
-* equation, as defined by the values in D and Z. It makes the
-* appropriate calls to SLASD4 and then updates the singular
-* vectors by matrix multiplication.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* SLASD3 is called from SLASD1.
-*
-* Arguments
-* =========
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has N = NL + NR + 1 rows and
-* M = N + SQRE >= N columns.
-*
-* K (input) INTEGER
-* The size of the secular equation, 1 =< K = < N.
-*
-* D (output) REAL array, dimension(K)
-* On exit the square roots of the roots of the secular equation,
-* in ascending order.
-*
-* Q (workspace) REAL array,
-* dimension at least (LDQ,K).
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= K.
-*
-* DSIGMA (input/output) REAL array, dimension(K)
-* The first K elements of this array contain the old roots
-* of the deflated updating problem. These are the poles
-* of the secular equation.
-*
-* U (output) REAL array, dimension (LDU, N)
-* The last N - K columns of this matrix contain the deflated
-* left singular vectors.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= N.
-*
-* U2 (input) REAL array, dimension (LDU2, N)
-* The first K columns of this matrix contain the non-deflated
-* left singular vectors for the split problem.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2. LDU2 >= N.
-*
-* VT (output) REAL array, dimension (LDVT, M)
-* The last M - K columns of VT**T contain the deflated
-* right singular vectors.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= N.
-*
-* VT2 (input/output) REAL array, dimension (LDVT2, N)
-* The first K columns of VT2**T contain the non-deflated
-* right singular vectors for the split problem.
-*
-* LDVT2 (input) INTEGER
-* The leading dimension of the array VT2. LDVT2 >= N.
-*
-* IDXC (input) INTEGER array, dimension (N)
-* The permutation used to arrange the columns of U (and rows of
-* VT) into three groups: the first group contains non-zero
-* entries only at and above (or before) NL +1; the second
-* contains non-zero entries only at and below (or after) NL+2;
-* and the third is dense. The first column of U and the row of
-* VT are treated separately, however.
-*
-* The rows of the singular vectors found by SLASD4
-* must be likewise permuted before the matrix multiplies can
-* take place.
-*
-* CTOT (input) INTEGER array, dimension (4)
-* A count of the total number of the various types of columns
-* in U (or rows in VT), as described in IDXC. The fourth column
-* type is any column which has been deflated.
-*
-* Z (input/output) REAL array, dimension (K)
-* The first K elements of this array contain the components
-* of the deflation-adjusted updating row vector.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasd4.f b/SRC/slasd4.f
index ed614458..c2ee73fc 100644
--- a/SRC/slasd4.f
+++ b/SRC/slasd4.f
@@ -1,95 +1,171 @@
- SUBROUTINE SLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER I, INFO, N
- REAL RHO, SIGMA
-* ..
-* .. Array Arguments ..
- REAL D( * ), DELTA( * ), WORK( * ), Z( * )
-* ..
-*
+*> \brief \b SLASD4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER I, INFO, N
+* REAL RHO, SIGMA
+* ..
+* .. Array Arguments ..
+* REAL D( * ), DELTA( * ), WORK( * ), Z( * )
+* ..
+*
* Purpose
* =======
*
-* This subroutine computes the square root of the I-th updated
-* eigenvalue of a positive symmetric rank-one modification to
-* a positive diagonal matrix whose entries are given as the squares
-* of the corresponding entries in the array d, and that
-*
-* 0 <= D(i) < D(j) for i < j
-*
-* and that RHO > 0. This is arranged by the calling routine, and is
-* no loss in generality. The rank-one modified system is thus
-*
-* diag( D ) * diag( D ) + RHO * Z * Z_transpose.
-*
-* where we assume the Euclidean norm of Z is 1.
-*
-* The method consists of approximating the rational functions in the
-* secular equation by simpler interpolating rational functions.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine computes the square root of the I-th updated
+*> eigenvalue of a positive symmetric rank-one modification to
+*> a positive diagonal matrix whose entries are given as the squares
+*> of the corresponding entries in the array d, and that
+*>
+*> 0 <= D(i) < D(j) for i < j
+*>
+*> and that RHO > 0. This is arranged by the calling routine, and is
+*> no loss in generality. The rank-one modified system is thus
+*>
+*> diag( D ) * diag( D ) + RHO * Z * Z_transpose.
+*>
+*> where we assume the Euclidean norm of Z is 1.
+*>
+*> The method consists of approximating the rational functions in the
+*> secular equation by simpler interpolating rational functions.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of all arrays.
-*
-* I (input) INTEGER
-* The index of the eigenvalue to be computed. 1 <= I <= N.
-*
-* D (input) REAL array, dimension ( N )
-* The original eigenvalues. It is assumed that they are in
-* order, 0 <= D(I) < D(J) for I < J.
-*
-* Z (input) REAL array, dimension (N)
-* The components of the updating vector.
-*
-* DELTA (output) REAL array, dimension (N)
-* If N .ne. 1, DELTA contains (D(j) - sigma_I) in its j-th
-* component. If N = 1, then DELTA(1) = 1. The vector DELTA
-* contains the information necessary to construct the
-* (singular) eigenvectors.
-*
-* RHO (input) REAL
-* The scalar in the symmetric updating formula.
-*
-* SIGMA (output) REAL
-* The computed sigma_I, the I-th updated eigenvalue.
-*
-* WORK (workspace) REAL array, dimension (N)
-* If N .ne. 1, WORK contains (D(j) + sigma_I) in its j-th
-* component. If N = 1, then WORK( 1 ) = 1.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = 1, the updating process failed.
-*
-* Internal Parameters
-* ===================
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of all arrays.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> The index of the eigenvalue to be computed. 1 <= I <= N.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension ( N )
+*> The original eigenvalues. It is assumed that they are in
+*> order, 0 <= D(I) < D(J) for I < J.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (N)
+*> The components of the updating vector.
+*> \endverbatim
+*>
+*> \param[out] DELTA
+*> \verbatim
+*> DELTA is REAL array, dimension (N)
+*> If N .ne. 1, DELTA contains (D(j) - sigma_I) in its j-th
+*> component. If N = 1, then DELTA(1) = 1. The vector DELTA
+*> contains the information necessary to construct the
+*> (singular) eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> The scalar in the symmetric updating formula.
+*> \endverbatim
+*>
+*> \param[out] SIGMA
+*> \verbatim
+*> SIGMA is REAL
+*> The computed sigma_I, the I-th updated eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> If N .ne. 1, WORK contains (D(j) + sigma_I) in its j-th
+*> component. If N = 1, then WORK( 1 ) = 1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = 1, the updating process failed.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> Logical variable ORGATI (origin-at-i?) is used for distinguishing
+*> whether D(i) or D(i+1) is treated as the origin.
+*> \endverbatim
+*> \verbatim
+*> ORGATI = .true. origin at i
+*> ORGATI = .false. origin at i+1
+*> \endverbatim
+*> \verbatim
+*> Logical variable SWTCH3 (switch-for-3-poles?) is for noting
+*> if we are working with THREE poles!
+*> \endverbatim
+*> \verbatim
+*> MAXIT is the maximum number of iterations allowed for each
+*> eigenvalue.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Logical variable ORGATI (origin-at-i?) is used for distinguishing
-* whether D(i) or D(i+1) is treated as the origin.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ORGATI = .true. origin at i
-* ORGATI = .false. origin at i+1
+*> \date November 2011
*
-* Logical variable SWTCH3 (switch-for-3-poles?) is for noting
-* if we are working with THREE poles!
+*> \ingroup auxOTHERauxiliary
*
-* MAXIT is the maximum number of iterations allowed for each
-* eigenvalue.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO )
*
-* Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER I, INFO, N
+ REAL RHO, SIGMA
+* ..
+* .. Array Arguments ..
+ REAL D( * ), DELTA( * ), WORK( * ), Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasd5.f b/SRC/slasd5.f
index d1b52b42..c683fc46 100644
--- a/SRC/slasd5.f
+++ b/SRC/slasd5.f
@@ -1,66 +1,131 @@
- SUBROUTINE SLASD5( I, D, Z, DELTA, RHO, DSIGMA, WORK )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER I
- REAL DSIGMA, RHO
-* ..
-* .. Array Arguments ..
- REAL D( 2 ), DELTA( 2 ), WORK( 2 ), Z( 2 )
-* ..
-*
+*> \brief \b SLASD5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD5( I, D, Z, DELTA, RHO, DSIGMA, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER I
+* REAL DSIGMA, RHO
+* ..
+* .. Array Arguments ..
+* REAL D( 2 ), DELTA( 2 ), WORK( 2 ), Z( 2 )
+* ..
+*
* Purpose
* =======
*
-* This subroutine computes the square root of the I-th eigenvalue
-* of a positive symmetric rank-one modification of a 2-by-2 diagonal
-* matrix
-*
-* diag( D ) * diag( D ) + RHO * Z * transpose(Z) .
-*
-* The diagonal entries in the array D are assumed to satisfy
-*
-* 0 <= D(i) < D(j) for i < j .
-*
-* We also assume RHO > 0 and that the Euclidean norm of the vector
-* Z is one.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This subroutine computes the square root of the I-th eigenvalue
+*> of a positive symmetric rank-one modification of a 2-by-2 diagonal
+*> matrix
+*>
+*> diag( D ) * diag( D ) + RHO * Z * transpose(Z) .
+*>
+*> The diagonal entries in the array D are assumed to satisfy
+*>
+*> 0 <= D(i) < D(j) for i < j .
+*>
+*> We also assume RHO > 0 and that the Euclidean norm of the vector
+*> Z is one.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* I (input) INTEGER
-* The index of the eigenvalue to be computed. I = 1 or I = 2.
-*
-* D (input) REAL array, dimension (2)
-* The original eigenvalues. We assume 0 <= D(1) < D(2).
-*
-* Z (input) REAL array, dimension (2)
-* The components of the updating vector.
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> The index of the eigenvalue to be computed. I = 1 or I = 2.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (2)
+*> The original eigenvalues. We assume 0 <= D(1) < D(2).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (2)
+*> The components of the updating vector.
+*> \endverbatim
+*>
+*> \param[out] DELTA
+*> \verbatim
+*> DELTA is REAL array, dimension (2)
+*> Contains (D(j) - sigma_I) in its j-th component.
+*> The vector DELTA contains the information necessary
+*> to construct the eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is REAL
+*> The scalar in the symmetric updating formula.
+*> \endverbatim
+*>
+*> \param[out] DSIGMA
+*> \verbatim
+*> DSIGMA is REAL
+*> The computed sigma_I, the I-th updated eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2)
+*> WORK contains (D(j) + sigma_I) in its j-th component.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DELTA (output) REAL array, dimension (2)
-* Contains (D(j) - sigma_I) in its j-th component.
-* The vector DELTA contains the information necessary
-* to construct the eigenvectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RHO (input) REAL
-* The scalar in the symmetric updating formula.
+*> \date November 2011
*
-* DSIGMA (output) REAL
-* The computed sigma_I, the I-th updated eigenvalue.
+*> \ingroup auxOTHERauxiliary
*
-* WORK (workspace) REAL array, dimension (2)
-* WORK contains (D(j) + sigma_I) in its j-th component.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ren-Cang Li, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASD5( I, D, Z, DELTA, RHO, DSIGMA, WORK )
*
-* Based on contributions by
-* Ren-Cang Li, Computer Science Division, University of California
-* at Berkeley, USA
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER I
+ REAL DSIGMA, RHO
+* ..
+* .. Array Arguments ..
+ REAL D( 2 ), DELTA( 2 ), WORK( 2 ), Z( 2 )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasd6.f b/SRC/slasd6.f
index 9bf0f1c8..d2da234d 100644
--- a/SRC/slasd6.f
+++ b/SRC/slasd6.f
@@ -1,3 +1,315 @@
+*> \brief \b SLASD6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD6( ICOMPQ, NL, NR, SQRE, D, VF, VL, ALPHA, BETA,
+* IDXQ, PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM,
+* LDGNUM, POLES, DIFL, DIFR, Z, K, C, S, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
+* $ NR, SQRE
+* REAL ALPHA, BETA, C, S
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), IDXQ( * ), IWORK( * ),
+* $ PERM( * )
+* REAL D( * ), DIFL( * ), DIFR( * ),
+* $ GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
+* $ VF( * ), VL( * ), WORK( * ), Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASD6 computes the SVD of an updated upper bidiagonal matrix B
+*> obtained by merging two smaller ones by appending a row. This
+*> routine is used only for the problem which requires all singular
+*> values and optionally singular vector matrices in factored form.
+*> B is an N-by-M matrix with N = NL + NR + 1 and M = N + SQRE.
+*> A related subroutine, SLASD1, handles the case in which all singular
+*> values and singular vectors of the bidiagonal matrix are desired.
+*>
+*> SLASD6 computes the SVD as follows:
+*>
+*> ( D1(in) 0 0 0 )
+*> B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
+*> ( 0 0 D2(in) 0 )
+*>
+*> = U(out) * ( D(out) 0) * VT(out)
+*>
+*> where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M
+*> with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
+*> elsewhere; and the entry b is empty if SQRE = 0.
+*>
+*> The singular values of B can be computed using D1, D2, the first
+*> components of all the right singular vectors of the lower block, and
+*> the last components of all the right singular vectors of the upper
+*> block. These components are stored and updated in VF and VL,
+*> respectively, in SLASD6. Hence U and VT are not explicitly
+*> referenced.
+*>
+*> The singular values are stored in D. The algorithm consists of two
+*> stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple singular values or if there is a zero
+*> in the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine SLASD7.
+*>
+*> The second stage consists of calculating the updated
+*> singular values. This is done by finding the roots of the
+*> secular equation via the routine SLASD4 (as called by SLASD8).
+*> This routine also updates VF and VL and computes the distances
+*> between the updated singular values and the old singular
+*> values.
+*>
+*> SLASD6 is called from SLASDA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed in
+*> factored form:
+*> = 0: Compute singular values only.
+*> = 1: Compute singular vectors in factored form as well.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has row dimension N = NL + NR + 1,
+*> and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (NL+NR+1).
+*> On entry D(1:NL,1:NL) contains the singular values of the
+*> upper block, and D(NL+2:N) contains the singular values
+*> of the lower block. On exit D(1:N) contains the singular
+*> values of the modified matrix.
+*> \endverbatim
+*>
+*> \param[in,out] VF
+*> \verbatim
+*> VF is REAL array, dimension (M)
+*> On entry, VF(1:NL+1) contains the first components of all
+*> right singular vectors of the upper block; and VF(NL+2:M)
+*> contains the first components of all right singular vectors
+*> of the lower block. On exit, VF contains the first components
+*> of all right singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is REAL array, dimension (M)
+*> On entry, VL(1:NL+1) contains the last components of all
+*> right singular vectors of the upper block; and VL(NL+2:M)
+*> contains the last components of all right singular vectors of
+*> the lower block. On exit, VL contains the last components of
+*> all right singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> Contains the diagonal element associated with the added row.
+*> \endverbatim
+*>
+*> \param[in,out] BETA
+*> \verbatim
+*> BETA is REAL
+*> Contains the off-diagonal element associated with the added
+*> row.
+*> \endverbatim
+*>
+*> \param[out] IDXQ
+*> \verbatim
+*> IDXQ is INTEGER array, dimension (N)
+*> This contains the permutation which will reintegrate the
+*> subproblem just solved back into sorted order, i.e.
+*> D( IDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( N )
+*> The permutations (from deflation and sorting) to be applied
+*> to each block. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER
+*> leading dimension of GIVCOL, must be at least N.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension ( LDGNUM, 2 )
+*> Each number indicates the C or S value to be used in the
+*> corresponding Givens rotation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[in] LDGNUM
+*> \verbatim
+*> LDGNUM is INTEGER
+*> The leading dimension of GIVNUM and POLES, must be at least N.
+*> \endverbatim
+*>
+*> \param[out] POLES
+*> \verbatim
+*> POLES is REAL array, dimension ( LDGNUM, 2 )
+*> On exit, POLES(1,*) is an array containing the new singular
+*> values obtained from solving the secular equation, and
+*> POLES(2,*) is an array containing the poles in the secular
+*> equation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] DIFL
+*> \verbatim
+*> DIFL is REAL array, dimension ( N )
+*> On exit, DIFL(I) is the distance between I-th updated
+*> (undeflated) singular value and the I-th (undeflated) old
+*> singular value.
+*> \endverbatim
+*>
+*> \param[out] DIFR
+*> \verbatim
+*> DIFR is REAL array,
+*> dimension ( LDGNUM, 2 ) if ICOMPQ = 1 and
+*> dimension ( N ) if ICOMPQ = 0.
+*> On exit, DIFR(I, 1) is the distance between I-th updated
+*> (undeflated) singular value and the I+1-th (undeflated) old
+*> singular value.
+*> \endverbatim
+*> \verbatim
+*> If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
+*> normalizing factors for the right singular vector matrix.
+*> \endverbatim
+*> \verbatim
+*> See SLASD8 for details on DIFL and DIFR.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension ( M )
+*> The first elements of this array contain the components
+*> of the deflation-adjusted updating row vector.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix,
+*> This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL
+*> C contains garbage if SQRE =0 and the C-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL
+*> S contains garbage if SQRE =0 and the S-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension ( 4 * M )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension ( 3 * N )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLASD6( ICOMPQ, NL, NR, SQRE, D, VF, VL, ALPHA, BETA,
$ IDXQ, PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM,
$ LDGNUM, POLES, DIFL, DIFR, Z, K, C, S, WORK,
@@ -6,7 +318,7 @@
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
@@ -21,185 +333,6 @@
$ VF( * ), VL( * ), WORK( * ), Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASD6 computes the SVD of an updated upper bidiagonal matrix B
-* obtained by merging two smaller ones by appending a row. This
-* routine is used only for the problem which requires all singular
-* values and optionally singular vector matrices in factored form.
-* B is an N-by-M matrix with N = NL + NR + 1 and M = N + SQRE.
-* A related subroutine, SLASD1, handles the case in which all singular
-* values and singular vectors of the bidiagonal matrix are desired.
-*
-* SLASD6 computes the SVD as follows:
-*
-* ( D1(in) 0 0 0 )
-* B = U(in) * ( Z1**T a Z2**T b ) * VT(in)
-* ( 0 0 D2(in) 0 )
-*
-* = U(out) * ( D(out) 0) * VT(out)
-*
-* where Z**T = (Z1**T a Z2**T b) = u**T VT**T, and u is a vector of dimension M
-* with ALPHA and BETA in the NL+1 and NL+2 th entries and zeros
-* elsewhere; and the entry b is empty if SQRE = 0.
-*
-* The singular values of B can be computed using D1, D2, the first
-* components of all the right singular vectors of the lower block, and
-* the last components of all the right singular vectors of the upper
-* block. These components are stored and updated in VF and VL,
-* respectively, in SLASD6. Hence U and VT are not explicitly
-* referenced.
-*
-* The singular values are stored in D. The algorithm consists of two
-* stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple singular values or if there is a zero
-* in the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine SLASD7.
-*
-* The second stage consists of calculating the updated
-* singular values. This is done by finding the roots of the
-* secular equation via the routine SLASD4 (as called by SLASD8).
-* This routine also updates VF and VL and computes the distances
-* between the updated singular values and the old singular
-* values.
-*
-* SLASD6 is called from SLASDA.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed in
-* factored form:
-* = 0: Compute singular values only.
-* = 1: Compute singular vectors in factored form as well.
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has row dimension N = NL + NR + 1,
-* and column dimension M = N + SQRE.
-*
-* D (input/output) REAL array, dimension (NL+NR+1).
-* On entry D(1:NL,1:NL) contains the singular values of the
-* upper block, and D(NL+2:N) contains the singular values
-* of the lower block. On exit D(1:N) contains the singular
-* values of the modified matrix.
-*
-* VF (input/output) REAL array, dimension (M)
-* On entry, VF(1:NL+1) contains the first components of all
-* right singular vectors of the upper block; and VF(NL+2:M)
-* contains the first components of all right singular vectors
-* of the lower block. On exit, VF contains the first components
-* of all right singular vectors of the bidiagonal matrix.
-*
-* VL (input/output) REAL array, dimension (M)
-* On entry, VL(1:NL+1) contains the last components of all
-* right singular vectors of the upper block; and VL(NL+2:M)
-* contains the last components of all right singular vectors of
-* the lower block. On exit, VL contains the last components of
-* all right singular vectors of the bidiagonal matrix.
-*
-* ALPHA (input/output) REAL
-* Contains the diagonal element associated with the added row.
-*
-* BETA (input/output) REAL
-* Contains the off-diagonal element associated with the added
-* row.
-*
-* IDXQ (output) INTEGER array, dimension (N)
-* This contains the permutation which will reintegrate the
-* subproblem just solved back into sorted order, i.e.
-* D( IDXQ( I = 1, N ) ) will be in ascending order.
-*
-* PERM (output) INTEGER array, dimension ( N )
-* The permutations (from deflation and sorting) to be applied
-* to each block. Not referenced if ICOMPQ = 0.
-*
-* GIVPTR (output) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem. Not referenced if ICOMPQ = 0.
-*
-* GIVCOL (output) INTEGER array, dimension ( LDGCOL, 2 )
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation. Not referenced if ICOMPQ = 0.
-*
-* LDGCOL (input) INTEGER
-* leading dimension of GIVCOL, must be at least N.
-*
-* GIVNUM (output) REAL array, dimension ( LDGNUM, 2 )
-* Each number indicates the C or S value to be used in the
-* corresponding Givens rotation. Not referenced if ICOMPQ = 0.
-*
-* LDGNUM (input) INTEGER
-* The leading dimension of GIVNUM and POLES, must be at least N.
-*
-* POLES (output) REAL array, dimension ( LDGNUM, 2 )
-* On exit, POLES(1,*) is an array containing the new singular
-* values obtained from solving the secular equation, and
-* POLES(2,*) is an array containing the poles in the secular
-* equation. Not referenced if ICOMPQ = 0.
-*
-* DIFL (output) REAL array, dimension ( N )
-* On exit, DIFL(I) is the distance between I-th updated
-* (undeflated) singular value and the I-th (undeflated) old
-* singular value.
-*
-* DIFR (output) REAL array,
-* dimension ( LDGNUM, 2 ) if ICOMPQ = 1 and
-* dimension ( N ) if ICOMPQ = 0.
-* On exit, DIFR(I, 1) is the distance between I-th updated
-* (undeflated) singular value and the I+1-th (undeflated) old
-* singular value.
-*
-* If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
-* normalizing factors for the right singular vector matrix.
-*
-* See SLASD8 for details on DIFL and DIFR.
-*
-* Z (output) REAL array, dimension ( M )
-* The first elements of this array contain the components
-* of the deflation-adjusted updating row vector.
-*
-* K (output) INTEGER
-* Contains the dimension of the non-deflated matrix,
-* This is the order of the related secular equation. 1 <= K <=N.
-*
-* C (output) REAL
-* C contains garbage if SQRE =0 and the C-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* S (output) REAL
-* S contains garbage if SQRE =0 and the S-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* WORK (workspace) REAL array, dimension ( 4 * M )
-*
-* IWORK (workspace) INTEGER array, dimension ( 3 * N )
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasd7.f b/SRC/slasd7.f
index eccb842b..ae8f050d 100644
--- a/SRC/slasd7.f
+++ b/SRC/slasd7.f
@@ -1,3 +1,279 @@
+*> \brief \b SLASD7
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD7( ICOMPQ, NL, NR, SQRE, K, D, Z, ZW, VF, VFW, VL,
+* VLW, ALPHA, BETA, DSIGMA, IDX, IDXP, IDXQ,
+* PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
+* C, S, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
+* $ NR, SQRE
+* REAL ALPHA, BETA, C, S
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), IDX( * ), IDXP( * ),
+* $ IDXQ( * ), PERM( * )
+* REAL D( * ), DSIGMA( * ), GIVNUM( LDGNUM, * ),
+* $ VF( * ), VFW( * ), VL( * ), VLW( * ), Z( * ),
+* $ ZW( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASD7 merges the two sets of singular values together into a single
+*> sorted set. Then it tries to deflate the size of the problem. There
+*> are two ways in which deflation can occur: when two or more singular
+*> values are close together or if there is a tiny entry in the Z
+*> vector. For each such occurrence the order of the related
+*> secular equation problem is reduced by one.
+*>
+*> SLASD7 is called from SLASD6.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed
+*> in compact form, as follows:
+*> = 0: Compute singular values only.
+*> = 1: Compute singular vectors of upper
+*> bidiagonal matrix in compact form.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has
+*> N = NL + NR + 1 rows and
+*> M = N + SQRE >= N columns.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix, this is
+*> the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension ( N )
+*> On entry D contains the singular values of the two submatrices
+*> to be combined. On exit D contains the trailing (N-K) updated
+*> singular values (those which were deflated) sorted into
+*> increasing order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension ( M )
+*> On exit Z contains the updating row vector in the secular
+*> equation.
+*> \endverbatim
+*>
+*> \param[out] ZW
+*> \verbatim
+*> ZW is REAL array, dimension ( M )
+*> Workspace for Z.
+*> \endverbatim
+*>
+*> \param[in,out] VF
+*> \verbatim
+*> VF is REAL array, dimension ( M )
+*> On entry, VF(1:NL+1) contains the first components of all
+*> right singular vectors of the upper block; and VF(NL+2:M)
+*> contains the first components of all right singular vectors
+*> of the lower block. On exit, VF contains the first components
+*> of all right singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[out] VFW
+*> \verbatim
+*> VFW is REAL array, dimension ( M )
+*> Workspace for VF.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is REAL array, dimension ( M )
+*> On entry, VL(1:NL+1) contains the last components of all
+*> right singular vectors of the upper block; and VL(NL+2:M)
+*> contains the last components of all right singular vectors
+*> of the lower block. On exit, VL contains the last components
+*> of all right singular vectors of the bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[out] VLW
+*> \verbatim
+*> VLW is REAL array, dimension ( M )
+*> Workspace for VL.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> Contains the diagonal element associated with the added row.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> Contains the off-diagonal element associated with the added
+*> row.
+*> \endverbatim
+*>
+*> \param[out] DSIGMA
+*> \verbatim
+*> DSIGMA is REAL array, dimension ( N )
+*> Contains a copy of the diagonal elements (K-1 singular values
+*> and one zero) in the secular equation.
+*> \endverbatim
+*>
+*> \param[out] IDX
+*> \verbatim
+*> IDX is INTEGER array, dimension ( N )
+*> This will contain the permutation used to sort the contents of
+*> D into ascending order.
+*> \endverbatim
+*>
+*> \param[out] IDXP
+*> \verbatim
+*> IDXP is INTEGER array, dimension ( N )
+*> This will contain the permutation used to place deflated
+*> values of D at the end of the array. On output IDXP(2:K)
+*> points to the nondeflated D-values and IDXP(K+1:N)
+*> points to the deflated singular values.
+*> \endverbatim
+*>
+*> \param[in] IDXQ
+*> \verbatim
+*> IDXQ is INTEGER array, dimension ( N )
+*> This contains the permutation which separately sorts the two
+*> sub-problems in D into ascending order. Note that entries in
+*> the first half of this permutation must first be moved one
+*> position backward; and entries in the second half
+*> must first have NL+1 added to their values.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( N )
+*> The permutations (from deflation and sorting) to be applied
+*> to each singular block. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER
+*> The leading dimension of GIVCOL, must be at least N.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array, dimension ( LDGNUM, 2 )
+*> Each number indicates the C or S value to be used in the
+*> corresponding Givens rotation. Not referenced if ICOMPQ = 0.
+*> \endverbatim
+*>
+*> \param[in] LDGNUM
+*> \verbatim
+*> LDGNUM is INTEGER
+*> The leading dimension of GIVNUM, must be at least N.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL
+*> C contains garbage if SQRE =0 and the C-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL
+*> S contains garbage if SQRE =0 and the S-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLASD7( ICOMPQ, NL, NR, SQRE, K, D, Z, ZW, VF, VFW, VL,
$ VLW, ALPHA, BETA, DSIGMA, IDX, IDXP, IDXQ,
$ PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
@@ -6,7 +282,7 @@
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
@@ -21,148 +297,6 @@
$ ZW( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASD7 merges the two sets of singular values together into a single
-* sorted set. Then it tries to deflate the size of the problem. There
-* are two ways in which deflation can occur: when two or more singular
-* values are close together or if there is a tiny entry in the Z
-* vector. For each such occurrence the order of the related
-* secular equation problem is reduced by one.
-*
-* SLASD7 is called from SLASD6.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed
-* in compact form, as follows:
-* = 0: Compute singular values only.
-* = 1: Compute singular vectors of upper
-* bidiagonal matrix in compact form.
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has
-* N = NL + NR + 1 rows and
-* M = N + SQRE >= N columns.
-*
-* K (output) INTEGER
-* Contains the dimension of the non-deflated matrix, this is
-* the order of the related secular equation. 1 <= K <=N.
-*
-* D (input/output) REAL array, dimension ( N )
-* On entry D contains the singular values of the two submatrices
-* to be combined. On exit D contains the trailing (N-K) updated
-* singular values (those which were deflated) sorted into
-* increasing order.
-*
-* Z (output) REAL array, dimension ( M )
-* On exit Z contains the updating row vector in the secular
-* equation.
-*
-* ZW (workspace) REAL array, dimension ( M )
-* Workspace for Z.
-*
-* VF (input/output) REAL array, dimension ( M )
-* On entry, VF(1:NL+1) contains the first components of all
-* right singular vectors of the upper block; and VF(NL+2:M)
-* contains the first components of all right singular vectors
-* of the lower block. On exit, VF contains the first components
-* of all right singular vectors of the bidiagonal matrix.
-*
-* VFW (workspace) REAL array, dimension ( M )
-* Workspace for VF.
-*
-* VL (input/output) REAL array, dimension ( M )
-* On entry, VL(1:NL+1) contains the last components of all
-* right singular vectors of the upper block; and VL(NL+2:M)
-* contains the last components of all right singular vectors
-* of the lower block. On exit, VL contains the last components
-* of all right singular vectors of the bidiagonal matrix.
-*
-* VLW (workspace) REAL array, dimension ( M )
-* Workspace for VL.
-*
-* ALPHA (input) REAL
-* Contains the diagonal element associated with the added row.
-*
-* BETA (input) REAL
-* Contains the off-diagonal element associated with the added
-* row.
-*
-* DSIGMA (output) REAL array, dimension ( N )
-* Contains a copy of the diagonal elements (K-1 singular values
-* and one zero) in the secular equation.
-*
-* IDX (workspace) INTEGER array, dimension ( N )
-* This will contain the permutation used to sort the contents of
-* D into ascending order.
-*
-* IDXP (workspace) INTEGER array, dimension ( N )
-* This will contain the permutation used to place deflated
-* values of D at the end of the array. On output IDXP(2:K)
-* points to the nondeflated D-values and IDXP(K+1:N)
-* points to the deflated singular values.
-*
-* IDXQ (input) INTEGER array, dimension ( N )
-* This contains the permutation which separately sorts the two
-* sub-problems in D into ascending order. Note that entries in
-* the first half of this permutation must first be moved one
-* position backward; and entries in the second half
-* must first have NL+1 added to their values.
-*
-* PERM (output) INTEGER array, dimension ( N )
-* The permutations (from deflation and sorting) to be applied
-* to each singular block. Not referenced if ICOMPQ = 0.
-*
-* GIVPTR (output) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem. Not referenced if ICOMPQ = 0.
-*
-* GIVCOL (output) INTEGER array, dimension ( LDGCOL, 2 )
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation. Not referenced if ICOMPQ = 0.
-*
-* LDGCOL (input) INTEGER
-* The leading dimension of GIVCOL, must be at least N.
-*
-* GIVNUM (output) REAL array, dimension ( LDGNUM, 2 )
-* Each number indicates the C or S value to be used in the
-* corresponding Givens rotation. Not referenced if ICOMPQ = 0.
-*
-* LDGNUM (input) INTEGER
-* The leading dimension of GIVNUM, must be at least N.
-*
-* C (output) REAL
-* C contains garbage if SQRE =0 and the C-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* S (output) REAL
-* S contains garbage if SQRE =0 and the S-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasd8.f b/SRC/slasd8.f
index 98e321fe..3633a4ca 100644
--- a/SRC/slasd8.f
+++ b/SRC/slasd8.f
@@ -1,10 +1,174 @@
+*> \brief \b SLASD8
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
+* DSIGMA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, K, LDDIFR
+* ..
+* .. Array Arguments ..
+* REAL D( * ), DIFL( * ), DIFR( LDDIFR, * ),
+* $ DSIGMA( * ), VF( * ), VL( * ), WORK( * ),
+* $ Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASD8 finds the square roots of the roots of the secular equation,
+*> as defined by the values in DSIGMA and Z. It makes the appropriate
+*> calls to SLASD4, and stores, for each element in D, the distance
+*> to its two nearest poles (elements in DSIGMA). It also updates
+*> the arrays VF and VL, the first and last components of all the
+*> right singular vectors of the original bidiagonal matrix.
+*>
+*> SLASD8 is called from SLASD6.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed in
+*> factored form in the calling routine:
+*> = 0: Compute singular values only.
+*> = 1: Compute singular vectors in factored form as well.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of terms in the rational function to be solved
+*> by SLASD4. K >= 1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension ( K )
+*> On output, D contains the updated singular values.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension ( K )
+*> On entry, the first K elements of this array contain the
+*> components of the deflation-adjusted updating row vector.
+*> On exit, Z is updated.
+*> \endverbatim
+*>
+*> \param[in,out] VF
+*> \verbatim
+*> VF is REAL array, dimension ( K )
+*> On entry, VF contains information passed through DBEDE8.
+*> On exit, VF contains the first K components of the first
+*> components of all right singular vectors of the bidiagonal
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is REAL array, dimension ( K )
+*> On entry, VL contains information passed through DBEDE8.
+*> On exit, VL contains the first K components of the last
+*> components of all right singular vectors of the bidiagonal
+*> matrix.
+*> \endverbatim
+*>
+*> \param[out] DIFL
+*> \verbatim
+*> DIFL is REAL array, dimension ( K )
+*> On exit, DIFL(I) = D(I) - DSIGMA(I).
+*> \endverbatim
+*>
+*> \param[out] DIFR
+*> \verbatim
+*> DIFR is REAL array,
+*> dimension ( LDDIFR, 2 ) if ICOMPQ = 1 and
+*> dimension ( K ) if ICOMPQ = 0.
+*> On exit, DIFR(I,1) = D(I) - DSIGMA(I+1), DIFR(K,1) is not
+*> defined and will not be referenced.
+*> \endverbatim
+*> \verbatim
+*> If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
+*> normalizing factors for the right singular vector matrix.
+*> \endverbatim
+*>
+*> \param[in] LDDIFR
+*> \verbatim
+*> LDDIFR is INTEGER
+*> The leading dimension of DIFR, must be at least K.
+*> \endverbatim
+*>
+*> \param[in,out] DSIGMA
+*> \verbatim
+*> DSIGMA is REAL array, dimension ( K )
+*> On entry, the first K elements of this array contain the old
+*> roots of the deflated updating problem. These are the poles
+*> of the secular equation.
+*> On exit, the elements of DSIGMA may be very slightly altered
+*> in value.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension at least 3 * K
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
$ DSIGMA, WORK, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, K, LDDIFR
@@ -15,87 +179,6 @@
$ Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASD8 finds the square roots of the roots of the secular equation,
-* as defined by the values in DSIGMA and Z. It makes the appropriate
-* calls to SLASD4, and stores, for each element in D, the distance
-* to its two nearest poles (elements in DSIGMA). It also updates
-* the arrays VF and VL, the first and last components of all the
-* right singular vectors of the original bidiagonal matrix.
-*
-* SLASD8 is called from SLASD6.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed in
-* factored form in the calling routine:
-* = 0: Compute singular values only.
-* = 1: Compute singular vectors in factored form as well.
-*
-* K (input) INTEGER
-* The number of terms in the rational function to be solved
-* by SLASD4. K >= 1.
-*
-* D (output) REAL array, dimension ( K )
-* On output, D contains the updated singular values.
-*
-* Z (input/output) REAL array, dimension ( K )
-* On entry, the first K elements of this array contain the
-* components of the deflation-adjusted updating row vector.
-* On exit, Z is updated.
-*
-* VF (input/output) REAL array, dimension ( K )
-* On entry, VF contains information passed through DBEDE8.
-* On exit, VF contains the first K components of the first
-* components of all right singular vectors of the bidiagonal
-* matrix.
-*
-* VL (input/output) REAL array, dimension ( K )
-* On entry, VL contains information passed through DBEDE8.
-* On exit, VL contains the first K components of the last
-* components of all right singular vectors of the bidiagonal
-* matrix.
-*
-* DIFL (output) REAL array, dimension ( K )
-* On exit, DIFL(I) = D(I) - DSIGMA(I).
-*
-* DIFR (output) REAL array,
-* dimension ( LDDIFR, 2 ) if ICOMPQ = 1 and
-* dimension ( K ) if ICOMPQ = 0.
-* On exit, DIFR(I,1) = D(I) - DSIGMA(I+1), DIFR(K,1) is not
-* defined and will not be referenced.
-*
-* If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
-* normalizing factors for the right singular vector matrix.
-*
-* LDDIFR (input) INTEGER
-* The leading dimension of DIFR, must be at least K.
-*
-* DSIGMA (input/output) REAL array, dimension ( K )
-* On entry, the first K elements of this array contain the old
-* roots of the deflated updating problem. These are the poles
-* of the secular equation.
-* On exit, the elements of DSIGMA may be very slightly altered
-* in value.
-*
-* WORK (workspace) REAL array, dimension at least 3 * K
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasda.f b/SRC/slasda.f
index 4a501c67..763ecf05 100644
--- a/SRC/slasda.f
+++ b/SRC/slasda.f
@@ -1,3 +1,272 @@
+*> \brief \b SLASDA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASDA( ICOMPQ, SMLSIZ, N, SQRE, D, E, U, LDU, VT, K,
+* DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL,
+* PERM, GIVNUM, C, S, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
+* $ K( * ), PERM( LDGCOL, * )
+* REAL C( * ), D( * ), DIFL( LDU, * ), DIFR( LDU, * ),
+* $ E( * ), GIVNUM( LDU, * ), POLES( LDU, * ),
+* $ S( * ), U( LDU, * ), VT( LDU, * ), WORK( * ),
+* $ Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Using a divide and conquer approach, SLASDA computes the singular
+*> value decomposition (SVD) of a real upper bidiagonal N-by-M matrix
+*> B with diagonal D and offdiagonal E, where M = N + SQRE. The
+*> algorithm computes the singular values in the SVD B = U * S * VT.
+*> The orthogonal matrices U and VT are optionally computed in
+*> compact form.
+*>
+*> A related subroutine, SLASD0, computes the singular values and
+*> the singular vectors in explicit form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed
+*> in compact form, as follows
+*> = 0: Compute singular values only.
+*> = 1: Compute singular vectors of upper bidiagonal
+*> matrix in compact form.
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The row dimension of the upper bidiagonal matrix. This is
+*> also the dimension of the main diagonal array D.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> Specifies the column dimension of the bidiagonal matrix.
+*> = 0: The bidiagonal matrix has column dimension M = N;
+*> = 1: The bidiagonal matrix has column dimension M = N + 1.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension ( N )
+*> On entry D contains the main diagonal of the bidiagonal
+*> matrix. On exit D, if INFO = 0, contains its singular values.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension ( M-1 )
+*> Contains the subdiagonal entries of the bidiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array,
+*> dimension ( LDU, SMLSIZ ) if ICOMPQ = 1, and not referenced
+*> if ICOMPQ = 0. If ICOMPQ = 1, on exit, U contains the left
+*> singular vector matrices of all subproblems at the bottom
+*> level.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER, LDU = > N.
+*> The leading dimension of arrays U, VT, DIFL, DIFR, POLES,
+*> GIVNUM, and Z.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is REAL array,
+*> dimension ( LDU, SMLSIZ+1 ) if ICOMPQ = 1, and not referenced
+*> if ICOMPQ = 0. If ICOMPQ = 1, on exit, VT**T contains the right
+*> singular vector matrices of all subproblems at the bottom
+*> level.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER array, dimension ( N )
+*> if ICOMPQ = 1 and dimension 1 if ICOMPQ = 0.
+*> If ICOMPQ = 1, on exit, K(I) is the dimension of the I-th
+*> secular equation on the computation tree.
+*> \endverbatim
+*>
+*> \param[out] DIFL
+*> \verbatim
+*> DIFL is REAL array, dimension ( LDU, NLVL ),
+*> where NLVL = floor(log_2 (N/SMLSIZ))).
+*> \endverbatim
+*>
+*> \param[out] DIFR
+*> \verbatim
+*> DIFR is REAL array,
+*> dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1 and
+*> dimension ( N ) if ICOMPQ = 0.
+*> If ICOMPQ = 1, on exit, DIFL(1:N, I) and DIFR(1:N, 2 * I - 1)
+*> record distances between singular values on the I-th
+*> level and singular values on the (I -1)-th level, and
+*> DIFR(1:N, 2 * I ) contains the normalizing factors for
+*> the right singular vector matrix. See SLASD8 for details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array,
+*> dimension ( LDU, NLVL ) if ICOMPQ = 1 and
+*> dimension ( N ) if ICOMPQ = 0.
+*> The first K elements of Z(1, I) contain the components of
+*> the deflation-adjusted updating row vector for subproblems
+*> on the I-th level.
+*> \endverbatim
+*>
+*> \param[out] POLES
+*> \verbatim
+*> POLES is REAL array,
+*> dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced
+*> if ICOMPQ = 0. If ICOMPQ = 1, on exit, POLES(1, 2*I - 1) and
+*> POLES(1, 2*I) contain the new and old singular values
+*> involved in the secular equations on the I-th level.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array,
+*> dimension ( N ) if ICOMPQ = 1, and not referenced if
+*> ICOMPQ = 0. If ICOMPQ = 1, on exit, GIVPTR( I ) records
+*> the number of Givens rotations performed on the I-th
+*> problem on the computation tree.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array,
+*> dimension ( LDGCOL, 2 * NLVL ) if ICOMPQ = 1, and not
+*> referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I,
+*> GIVCOL(1, 2 *I - 1) and GIVCOL(1, 2 *I) record the locations
+*> of Givens rotations performed on the I-th level on the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER, LDGCOL = > N.
+*> The leading dimension of arrays GIVCOL and PERM.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( LDGCOL, NLVL )
+*> if ICOMPQ = 1, and not referenced
+*> if ICOMPQ = 0. If ICOMPQ = 1, on exit, PERM(1, I) records
+*> permutations done on the I-th level of the computation tree.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is REAL array,
+*> dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not
+*> referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I,
+*> GIVNUM(1, 2 *I - 1) and GIVNUM(1, 2 *I) record the C- and S-
+*> values of Givens rotations performed on the I-th level on
+*> the computation tree.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array,
+*> dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0.
+*> If ICOMPQ = 1 and the I-th subproblem is not square, on exit,
+*> C( I ) contains the C-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension ( N ) if
+*> ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1
+*> and the I-th subproblem is not square, on exit, S( I )
+*> contains the S-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (6 * N + (SMLSIZ + 1)*(SMLSIZ + 1)).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (7*N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, a singular value did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLASDA( ICOMPQ, SMLSIZ, N, SQRE, D, E, U, LDU, VT, K,
$ DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL,
$ PERM, GIVNUM, C, S, WORK, IWORK, INFO )
@@ -5,7 +274,7 @@
* -- LAPACK auxiliary routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE
@@ -19,153 +288,6 @@
$ Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* Using a divide and conquer approach, SLASDA computes the singular
-* value decomposition (SVD) of a real upper bidiagonal N-by-M matrix
-* B with diagonal D and offdiagonal E, where M = N + SQRE. The
-* algorithm computes the singular values in the SVD B = U * S * VT.
-* The orthogonal matrices U and VT are optionally computed in
-* compact form.
-*
-* A related subroutine, SLASD0, computes the singular values and
-* the singular vectors in explicit form.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed
-* in compact form, as follows
-* = 0: Compute singular values only.
-* = 1: Compute singular vectors of upper bidiagonal
-* matrix in compact form.
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The row dimension of the upper bidiagonal matrix. This is
-* also the dimension of the main diagonal array D.
-*
-* SQRE (input) INTEGER
-* Specifies the column dimension of the bidiagonal matrix.
-* = 0: The bidiagonal matrix has column dimension M = N;
-* = 1: The bidiagonal matrix has column dimension M = N + 1.
-*
-* D (input/output) REAL array, dimension ( N )
-* On entry D contains the main diagonal of the bidiagonal
-* matrix. On exit D, if INFO = 0, contains its singular values.
-*
-* E (input) REAL array, dimension ( M-1 )
-* Contains the subdiagonal entries of the bidiagonal matrix.
-* On exit, E has been destroyed.
-*
-* U (output) REAL array,
-* dimension ( LDU, SMLSIZ ) if ICOMPQ = 1, and not referenced
-* if ICOMPQ = 0. If ICOMPQ = 1, on exit, U contains the left
-* singular vector matrices of all subproblems at the bottom
-* level.
-*
-* LDU (input) INTEGER, LDU = > N.
-* The leading dimension of arrays U, VT, DIFL, DIFR, POLES,
-* GIVNUM, and Z.
-*
-* VT (output) REAL array,
-* dimension ( LDU, SMLSIZ+1 ) if ICOMPQ = 1, and not referenced
-* if ICOMPQ = 0. If ICOMPQ = 1, on exit, VT**T contains the right
-* singular vector matrices of all subproblems at the bottom
-* level.
-*
-* K (output) INTEGER array, dimension ( N )
-* if ICOMPQ = 1 and dimension 1 if ICOMPQ = 0.
-* If ICOMPQ = 1, on exit, K(I) is the dimension of the I-th
-* secular equation on the computation tree.
-*
-* DIFL (output) REAL array, dimension ( LDU, NLVL ),
-* where NLVL = floor(log_2 (N/SMLSIZ))).
-*
-* DIFR (output) REAL array,
-* dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1 and
-* dimension ( N ) if ICOMPQ = 0.
-* If ICOMPQ = 1, on exit, DIFL(1:N, I) and DIFR(1:N, 2 * I - 1)
-* record distances between singular values on the I-th
-* level and singular values on the (I -1)-th level, and
-* DIFR(1:N, 2 * I ) contains the normalizing factors for
-* the right singular vector matrix. See SLASD8 for details.
-*
-* Z (output) REAL array,
-* dimension ( LDU, NLVL ) if ICOMPQ = 1 and
-* dimension ( N ) if ICOMPQ = 0.
-* The first K elements of Z(1, I) contain the components of
-* the deflation-adjusted updating row vector for subproblems
-* on the I-th level.
-*
-* POLES (output) REAL array,
-* dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced
-* if ICOMPQ = 0. If ICOMPQ = 1, on exit, POLES(1, 2*I - 1) and
-* POLES(1, 2*I) contain the new and old singular values
-* involved in the secular equations on the I-th level.
-*
-* GIVPTR (output) INTEGER array,
-* dimension ( N ) if ICOMPQ = 1, and not referenced if
-* ICOMPQ = 0. If ICOMPQ = 1, on exit, GIVPTR( I ) records
-* the number of Givens rotations performed on the I-th
-* problem on the computation tree.
-*
-* GIVCOL (output) INTEGER array,
-* dimension ( LDGCOL, 2 * NLVL ) if ICOMPQ = 1, and not
-* referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I,
-* GIVCOL(1, 2 *I - 1) and GIVCOL(1, 2 *I) record the locations
-* of Givens rotations performed on the I-th level on the
-* computation tree.
-*
-* LDGCOL (input) INTEGER, LDGCOL = > N.
-* The leading dimension of arrays GIVCOL and PERM.
-*
-* PERM (output) INTEGER array, dimension ( LDGCOL, NLVL )
-* if ICOMPQ = 1, and not referenced
-* if ICOMPQ = 0. If ICOMPQ = 1, on exit, PERM(1, I) records
-* permutations done on the I-th level of the computation tree.
-*
-* GIVNUM (output) REAL array,
-* dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not
-* referenced if ICOMPQ = 0. If ICOMPQ = 1, on exit, for each I,
-* GIVNUM(1, 2 *I - 1) and GIVNUM(1, 2 *I) record the C- and S-
-* values of Givens rotations performed on the I-th level on
-* the computation tree.
-*
-* C (output) REAL array,
-* dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0.
-* If ICOMPQ = 1 and the I-th subproblem is not square, on exit,
-* C( I ) contains the C-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* S (output) REAL array, dimension ( N ) if
-* ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1
-* and the I-th subproblem is not square, on exit, S( I )
-* contains the S-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* WORK (workspace) REAL array, dimension
-* (6 * N + (SMLSIZ + 1)*(SMLSIZ + 1)).
-*
-* IWORK (workspace) INTEGER array, dimension (7*N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, a singular value did not converge
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasdq.f b/SRC/slasdq.f
index eaf5296c..bb8baaf2 100644
--- a/SRC/slasdq.f
+++ b/SRC/slasdq.f
@@ -1,10 +1,219 @@
+*> \brief \b SLASDQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASDQ( UPLO, SQRE, N, NCVT, NRU, NCC, D, E, VT, LDVT,
+* U, LDU, C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU, SQRE
+* ..
+* .. Array Arguments ..
+* REAL C( LDC, * ), D( * ), E( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASDQ computes the singular value decomposition (SVD) of a real
+*> (upper or lower) bidiagonal matrix with diagonal D and offdiagonal
+*> E, accumulating the transformations if desired. Letting B denote
+*> the input bidiagonal matrix, the algorithm computes orthogonal
+*> matrices Q and P such that B = Q * S * P**T (P**T denotes the transpose
+*> of P). The singular values S are overwritten on D.
+*>
+*> The input matrix U is changed to U * Q if desired.
+*> The input matrix VT is changed to P**T * VT if desired.
+*> The input matrix C is changed to Q**T * C if desired.
+*>
+*> See "Computing Small Singular Values of Bidiagonal Matrices With
+*> Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
+*> LAPACK Working Note #3, for a detailed description of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the input bidiagonal matrix
+*> is upper or lower bidiagonal, and wether it is square are
+*> not.
+*> UPLO = 'U' or 'u' B is upper bidiagonal.
+*> UPLO = 'L' or 'l' B is lower bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: then the input matrix is N-by-N.
+*> = 1: then the input matrix is N-by-(N+1) if UPLU = 'U' and
+*> (N+1)-by-N if UPLU = 'L'.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has
+*> N = NL + NR + 1 rows and
+*> M = N + SQRE >= N columns.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of rows and columns
+*> in the matrix. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in] NCVT
+*> \verbatim
+*> NCVT is INTEGER
+*> On entry, NCVT specifies the number of columns of
+*> the matrix VT. NCVT must be at least 0.
+*> \endverbatim
+*>
+*> \param[in] NRU
+*> \verbatim
+*> NRU is INTEGER
+*> On entry, NRU specifies the number of rows of
+*> the matrix U. NRU must be at least 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> On entry, NCC specifies the number of columns of
+*> the matrix C. NCC must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, D contains the diagonal entries of the
+*> bidiagonal matrix whose SVD is desired. On normal exit,
+*> D contains the singular values in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array.
+*> dimension is (N-1) if SQRE = 0 and N if SQRE = 1.
+*> On entry, the entries of E contain the offdiagonal entries
+*> of the bidiagonal matrix whose SVD is desired. On normal
+*> exit, E will contain 0. If the algorithm does not converge,
+*> D and E will contain the diagonal and superdiagonal entries
+*> of a bidiagonal matrix orthogonally equivalent to the one
+*> given as input.
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT, NCVT)
+*> On entry, contains a matrix which on exit has been
+*> premultiplied by P**T, dimension N-by-NCVT if SQRE = 0
+*> and (N+1)-by-NCVT if SQRE = 1 (not referenced if NCVT=0).
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> On entry, LDVT specifies the leading dimension of VT as
+*> declared in the calling (sub) program. LDVT must be at
+*> least 1. If NCVT is nonzero LDVT must also be at least N.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> On entry, contains a matrix which on exit has been
+*> postmultiplied by Q, dimension NRU-by-N if SQRE = 0
+*> and NRU-by-(N+1) if SQRE = 1 (not referenced if NRU=0).
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> On entry, LDU specifies the leading dimension of U as
+*> declared in the calling (sub) program. LDU must be at
+*> least max( 1, NRU ) .
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC, NCC)
+*> On entry, contains an N-by-NCC matrix which on exit
+*> has been premultiplied by Q**T dimension N-by-NCC if SQRE = 0
+*> and (N+1)-by-NCC if SQRE = 1 (not referenced if NCC=0).
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> On entry, LDC specifies the leading dimension of C as
+*> declared in the calling (sub) program. LDC must be at
+*> least 1. If NCC is nonzero, LDC must also be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> Workspace. Only referenced if one of NCVT, NRU, or NCC is
+*> nonzero, and if N is at least 2.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, a value of 0 indicates a successful exit.
+*> If INFO < 0, argument number -INFO is illegal.
+*> If INFO > 0, the algorithm did not converge, and INFO
+*> specifies how many superdiagonals did not converge.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLASDQ( UPLO, SQRE, N, NCVT, NRU, NCC, D, E, VT, LDVT,
$ U, LDU, C, LDC, WORK, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,120 +224,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASDQ computes the singular value decomposition (SVD) of a real
-* (upper or lower) bidiagonal matrix with diagonal D and offdiagonal
-* E, accumulating the transformations if desired. Letting B denote
-* the input bidiagonal matrix, the algorithm computes orthogonal
-* matrices Q and P such that B = Q * S * P**T (P**T denotes the transpose
-* of P). The singular values S are overwritten on D.
-*
-* The input matrix U is changed to U * Q if desired.
-* The input matrix VT is changed to P**T * VT if desired.
-* The input matrix C is changed to Q**T * C if desired.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices With
-* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
-* LAPACK Working Note #3, for a detailed description of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the input bidiagonal matrix
-* is upper or lower bidiagonal, and wether it is square are
-* not.
-* UPLO = 'U' or 'u' B is upper bidiagonal.
-* UPLO = 'L' or 'l' B is lower bidiagonal.
-*
-* SQRE (input) INTEGER
-* = 0: then the input matrix is N-by-N.
-* = 1: then the input matrix is N-by-(N+1) if UPLU = 'U' and
-* (N+1)-by-N if UPLU = 'L'.
-*
-* The bidiagonal matrix has
-* N = NL + NR + 1 rows and
-* M = N + SQRE >= N columns.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of rows and columns
-* in the matrix. N must be at least 0.
-*
-* NCVT (input) INTEGER
-* On entry, NCVT specifies the number of columns of
-* the matrix VT. NCVT must be at least 0.
-*
-* NRU (input) INTEGER
-* On entry, NRU specifies the number of rows of
-* the matrix U. NRU must be at least 0.
-*
-* NCC (input) INTEGER
-* On entry, NCC specifies the number of columns of
-* the matrix C. NCC must be at least 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, D contains the diagonal entries of the
-* bidiagonal matrix whose SVD is desired. On normal exit,
-* D contains the singular values in ascending order.
-*
-* E (input/output) REAL array.
-* dimension is (N-1) if SQRE = 0 and N if SQRE = 1.
-* On entry, the entries of E contain the offdiagonal entries
-* of the bidiagonal matrix whose SVD is desired. On normal
-* exit, E will contain 0. If the algorithm does not converge,
-* D and E will contain the diagonal and superdiagonal entries
-* of a bidiagonal matrix orthogonally equivalent to the one
-* given as input.
-*
-* VT (input/output) REAL array, dimension (LDVT, NCVT)
-* On entry, contains a matrix which on exit has been
-* premultiplied by P**T, dimension N-by-NCVT if SQRE = 0
-* and (N+1)-by-NCVT if SQRE = 1 (not referenced if NCVT=0).
-*
-* LDVT (input) INTEGER
-* On entry, LDVT specifies the leading dimension of VT as
-* declared in the calling (sub) program. LDVT must be at
-* least 1. If NCVT is nonzero LDVT must also be at least N.
-*
-* U (input/output) REAL array, dimension (LDU, N)
-* On entry, contains a matrix which on exit has been
-* postmultiplied by Q, dimension NRU-by-N if SQRE = 0
-* and NRU-by-(N+1) if SQRE = 1 (not referenced if NRU=0).
-*
-* LDU (input) INTEGER
-* On entry, LDU specifies the leading dimension of U as
-* declared in the calling (sub) program. LDU must be at
-* least max( 1, NRU ) .
-*
-* C (input/output) REAL array, dimension (LDC, NCC)
-* On entry, contains an N-by-NCC matrix which on exit
-* has been premultiplied by Q**T dimension N-by-NCC if SQRE = 0
-* and (N+1)-by-NCC if SQRE = 1 (not referenced if NCC=0).
-*
-* LDC (input) INTEGER
-* On entry, LDC specifies the leading dimension of C as
-* declared in the calling (sub) program. LDC must be at
-* least 1. If NCC is nonzero, LDC must also be at least N.
-*
-* WORK (workspace) REAL array, dimension (4*N)
-* Workspace. Only referenced if one of NCVT, NRU, or NCC is
-* nonzero, and if N is at least 2.
-*
-* INFO (output) INTEGER
-* On exit, a value of 0 indicates a successful exit.
-* If INFO < 0, argument number -INFO is illegal.
-* If INFO > 0, the algorithm did not converge, and INFO
-* specifies how many superdiagonals did not converge.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasdt.f b/SRC/slasdt.f
index ed891f36..d2254e2b 100644
--- a/SRC/slasdt.f
+++ b/SRC/slasdt.f
@@ -1,55 +1,119 @@
- SUBROUTINE SLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
+*> \brief \b SLASDT
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LVL, MSUB, N, ND
-* ..
-* .. Array Arguments ..
- INTEGER INODE( * ), NDIML( * ), NDIMR( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
+*
+* .. Scalar Arguments ..
+* INTEGER LVL, MSUB, N, ND
+* ..
+* .. Array Arguments ..
+* INTEGER INODE( * ), NDIML( * ), NDIMR( * )
+* ..
+*
* Purpose
* =======
*
-* SLASDT creates a tree of subproblems for bidiagonal divide and
-* conquer.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASDT creates a tree of subproblems for bidiagonal divide and
+*> conquer.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* On entry, the number of diagonal elements of the
-* bidiagonal matrix.
-*
-* LVL (output) INTEGER
-* On exit, the number of levels on the computation tree.
-*
-* ND (output) INTEGER
-* On exit, the number of nodes on the tree.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, the number of diagonal elements of the
+*> bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[out] LVL
+*> \verbatim
+*> LVL is INTEGER
+*> On exit, the number of levels on the computation tree.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is INTEGER
+*> On exit, the number of nodes on the tree.
+*> \endverbatim
+*>
+*> \param[out] INODE
+*> \verbatim
+*> INODE is INTEGER array, dimension ( N )
+*> On exit, centers of subproblems.
+*> \endverbatim
+*>
+*> \param[out] NDIML
+*> \verbatim
+*> NDIML is INTEGER array, dimension ( N )
+*> On exit, row dimensions of left children.
+*> \endverbatim
+*>
+*> \param[out] NDIMR
+*> \verbatim
+*> NDIMR is INTEGER array, dimension ( N )
+*> On exit, row dimensions of right children.
+*> \endverbatim
+*>
+*> \param[in] MSUB
+*> \verbatim
+*> MSUB is INTEGER
+*> On entry, the maximum row dimension each subproblem at the
+*> bottom of the tree can be of.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INODE (output) INTEGER array, dimension ( N )
-* On exit, centers of subproblems.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NDIML (output) INTEGER array, dimension ( N )
-* On exit, row dimensions of left children.
+*> \date November 2011
*
-* NDIMR (output) INTEGER array, dimension ( N )
-* On exit, row dimensions of right children.
+*> \ingroup auxOTHERauxiliary
*
-* MSUB (input) INTEGER
-* On entry, the maximum row dimension each subproblem at the
-* bottom of the tree can be of.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
+* .. Scalar Arguments ..
+ INTEGER LVL, MSUB, N, ND
+* ..
+* .. Array Arguments ..
+ INTEGER INODE( * ), NDIML( * ), NDIMR( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaset.f b/SRC/slaset.f
index 8b1ba77e..29e65601 100644
--- a/SRC/slaset.f
+++ b/SRC/slaset.f
@@ -1,9 +1,113 @@
+*> \brief \b SLASET
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, M, N
+* REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASET initializes an m-by-n matrix A to BETA on the diagonal and
+*> ALPHA on the offdiagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be set.
+*> = 'U': Upper triangular part is set; the strictly lower
+*> triangular part of A is not changed.
+*> = 'L': Lower triangular part is set; the strictly upper
+*> triangular part of A is not changed.
+*> Otherwise: All of the matrix A is set.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> The constant to which the offdiagonal elements are to be set.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> The constant to which the diagonal elements are to be set.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On exit, the leading m-by-n submatrix of A is set as follows:
+*> \endverbatim
+*> \verbatim
+*> if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
+*> if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
+*> otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
+*> \endverbatim
+*> \verbatim
+*> and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,47 +118,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SLASET initializes an m-by-n matrix A to BETA on the diagonal and
-* ALPHA on the offdiagonals.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be set.
-* = 'U': Upper triangular part is set; the strictly lower
-* triangular part of A is not changed.
-* = 'L': Lower triangular part is set; the strictly upper
-* triangular part of A is not changed.
-* Otherwise: All of the matrix A is set.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* ALPHA (input) REAL
-* The constant to which the offdiagonal elements are to be set.
-*
-* BETA (input) REAL
-* The constant to which the diagonal elements are to be set.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On exit, the leading m-by-n submatrix of A is set as follows:
-*
-* if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n,
-* if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n,
-* otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j,
-*
-* and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/slasq1.f b/SRC/slasq1.f
index 56d85d02..98095f59 100644
--- a/SRC/slasq1.f
+++ b/SRC/slasq1.f
@@ -1,14 +1,109 @@
- SUBROUTINE SLASQ1( N, D, E, WORK, INFO )
+*> \brief \b SLASQ1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASQ1( N, D, E, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASQ1 computes the singular values of a real N-by-N bidiagonal
+*> matrix with diagonal D and off-diagonal E. The singular values
+*> are computed to high relative accuracy, in the absence of
+*> denormalization, underflow and overflow. The algorithm was first
+*> presented in
+*>
+*> "Accurate singular values and differential qd algorithms" by K. V.
+*> Fernando and B. N. Parlett, Numer. Math., Vol-67, No. 2, pp. 191-230,
+*> 1994,
+*>
+*> and the present implementation is described in "An implementation of
+*> the dqds Algorithm (Positive Case)", LAPACK Working Note.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, D contains the diagonal elements of the
+*> bidiagonal matrix whose SVD is desired. On normal exit,
+*> D contains the singular values in decreasing order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> On entry, elements E(1:N-1) contain the off-diagonal elements
+*> of the bidiagonal matrix whose SVD is desired.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm failed
+*> = 1, a split was marked by a positive value in E
+*> = 2, current block of Z not diagonalized after 100*N
+*> iterations (in inner while loop) On exit D and E
+*> represent a matrix with the same singular values
+*> which the calling subroutine could use to finish the
+*> computation, or even feed back into SLASQ1
+*> = 3, termination criterion of outer while loop not met
+*> (program created more than N unreduced blocks)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- LAPACK routine (version 3.2) --
+*> \date November 2011
*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
+*> \ingroup auxOTHERcomputational
*
+* =====================================================================
+ SUBROUTINE SLASQ1( N, D, E, WORK, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, N
@@ -17,53 +112,6 @@
REAL D( * ), E( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASQ1 computes the singular values of a real N-by-N bidiagonal
-* matrix with diagonal D and off-diagonal E. The singular values
-* are computed to high relative accuracy, in the absence of
-* denormalization, underflow and overflow. The algorithm was first
-* presented in
-*
-* "Accurate singular values and differential qd algorithms" by K. V.
-* Fernando and B. N. Parlett, Numer. Math., Vol-67, No. 2, pp. 191-230,
-* 1994,
-*
-* and the present implementation is described in "An implementation of
-* the dqds Algorithm (Positive Case)", LAPACK Working Note.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows and columns in the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, D contains the diagonal elements of the
-* bidiagonal matrix whose SVD is desired. On normal exit,
-* D contains the singular values in decreasing order.
-*
-* E (input/output) REAL array, dimension (N)
-* On entry, elements E(1:N-1) contain the off-diagonal elements
-* of the bidiagonal matrix whose SVD is desired.
-* On exit, E is overwritten.
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm failed
-* = 1, a split was marked by a positive value in E
-* = 2, current block of Z not diagonalized after 100*N
-* iterations (in inner while loop) On exit D and E
-* represent a matrix with the same singular values
-* which the calling subroutine could use to finish the
-* computation, or even feed back into SLASQ1
-* = 3, termination criterion of outer while loop not met
-* (program created more than N unreduced blocks)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasq2.f b/SRC/slasq2.f
index 47af6149..c3a75599 100644
--- a/SRC/slasq2.f
+++ b/SRC/slasq2.f
@@ -1,74 +1,121 @@
- SUBROUTINE SLASQ2( N, Z, INFO )
+*> \brief \b SLASQ2
*
-* -- LAPACK routine (version 3.2) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL Z( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SLASQ2( N, Z, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL Z( * )
+* ..
+*
* Purpose
* =======
*
-* SLASQ2 computes all the eigenvalues of the symmetric positive
-* definite tridiagonal matrix associated with the qd array Z to high
-* relative accuracy are computed to high relative accuracy, in the
-* absence of denormalization, underflow and overflow.
-*
-* To see the relation of Z to the tridiagonal matrix, let L be a
-* unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and
-* let U be an upper bidiagonal matrix with 1's above and diagonal
-* Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the
-* symmetric tridiagonal to which it is similar.
-*
-* Note : SLASQ2 defines a logical variable, IEEE, which is true
-* on machines which follow ieee-754 floating-point standard in their
-* handling of infinities and NaNs, and false otherwise. This variable
-* is passed to SLASQ3.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASQ2 computes all the eigenvalues of the symmetric positive
+*> definite tridiagonal matrix associated with the qd array Z to high
+*> relative accuracy are computed to high relative accuracy, in the
+*> absence of denormalization, underflow and overflow.
+*>
+*> To see the relation of Z to the tridiagonal matrix, let L be a
+*> unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and
+*> let U be an upper bidiagonal matrix with 1's above and diagonal
+*> Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the
+*> symmetric tridiagonal to which it is similar.
+*>
+*> Note : SLASQ2 defines a logical variable, IEEE, which is true
+*> on machines which follow ieee-754 floating-point standard in their
+*> handling of infinities and NaNs, and false otherwise. This variable
+*> is passed to SLASQ3.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows and columns in the matrix. N >= 0.
-*
-* Z (input/output) REAL array, dimension ( 4*N )
-* On entry Z holds the qd array. On exit, entries 1 to N hold
-* the eigenvalues in decreasing order, Z( 2*N+1 ) holds the
-* trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If
-* N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 )
-* holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of
-* shifts that failed.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if the i-th argument is a scalar and had an illegal
-* value, then INFO = -i, if the i-th argument is an
-* array and the j-entry had an illegal value, then
-* INFO = -(i*100+j)
-* > 0: the algorithm failed
-* = 1, a split was marked by a positive value in E
-* = 2, current block of Z not diagonalized after 100*N
-* iterations (in inner while loop). On exit Z holds
-* a qd array with the same eigenvalues as the given Z.
-* = 3, termination criterion of outer while loop not met
-* (program created more than N unreduced blocks)
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension ( 4*N )
+*> On entry Z holds the qd array. On exit, entries 1 to N hold
+*> the eigenvalues in decreasing order, Z( 2*N+1 ) holds the
+*> trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If
+*> N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 )
+*> holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of
+*> shifts that failed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if the i-th argument is a scalar and had an illegal
+*> value, then INFO = -i, if the i-th argument is an
+*> array and the j-entry had an illegal value, then
+*> INFO = -(i*100+j)
+*> > 0: the algorithm failed
+*> = 1, a split was marked by a positive value in E
+*> = 2, current block of Z not diagonalized after 100*N
+*> iterations (in inner while loop). On exit Z holds
+*> a qd array with the same eigenvalues as the given Z.
+*> = 3, termination criterion of outer while loop not met
+*> (program created more than N unreduced blocks)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
* Local Variables: I0:N0 defines a current unreduced segment of Z.
-* The shifts are accumulated in SIGMA. Iteration count is in ITER.
-* Ping-pong is controlled by PP (alternates between 0 and 1).
+*> The shifts are accumulated in SIGMA. Iteration count is in ITER.
+*> Ping-pong is controlled by PP (alternates between 0 and 1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASQ2( N, Z, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasq3.f b/SRC/slasq3.f
index f5dd0374..4a5e6fb4 100644
--- a/SRC/slasq3.f
+++ b/SRC/slasq3.f
@@ -1,16 +1,184 @@
+*> \brief \b SLASQ3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL,
+* ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1,
+* DN2, G, TAU )
+*
+* .. Scalar Arguments ..
+* LOGICAL IEEE
+* INTEGER I0, ITER, N0, NDIV, NFAIL, PP
+* REAL DESIG, DMIN, DMIN1, DMIN2, DN, DN1, DN2, G,
+* $ QMAX, SIGMA, TAU
+* ..
+* .. Array Arguments ..
+* REAL Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASQ3 checks for deflation, computes a shift (TAU) and calls dqds.
+*> In case of failure it changes shifts, and tries again until output
+*> is positive.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] I0
+*> \verbatim
+*> I0 is INTEGER
+*> First index.
+*> \endverbatim
+*>
+*> \param[in,out] N0
+*> \verbatim
+*> N0 is INTEGER
+*> Last index.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension ( 4*N )
+*> Z holds the qd array.
+*> \endverbatim
+*>
+*> \param[in,out] PP
+*> \verbatim
+*> PP is INTEGER
+*> PP=0 for ping, PP=1 for pong.
+*> PP=2 indicates that flipping was applied to the Z array
+*> and that the initial tests for deflation should not be
+*> performed.
+*> \endverbatim
+*>
+*> \param[out] DMIN
+*> \verbatim
+*> DMIN is REAL
+*> Minimum value of d.
+*> \endverbatim
+*>
+*> \param[out] SIGMA
+*> \verbatim
+*> SIGMA is REAL
+*> Sum of shifts used in current segment.
+*> \endverbatim
+*>
+*> \param[in,out] DESIG
+*> \verbatim
+*> DESIG is REAL
+*> Lower order part of SIGMA
+*> \endverbatim
+*>
+*> \param[in] QMAX
+*> \verbatim
+*> QMAX is REAL
+*> Maximum value of q.
+*> \endverbatim
+*>
+*> \param[out] NFAIL
+*> \verbatim
+*> NFAIL is INTEGER
+*> Number of times shift was too big.
+*> \endverbatim
+*>
+*> \param[out] ITER
+*> \verbatim
+*> ITER is INTEGER
+*> Number of iterations.
+*> \endverbatim
+*>
+*> \param[out] NDIV
+*> \verbatim
+*> NDIV is INTEGER
+*> Number of divisions.
+*> \endverbatim
+*>
+*> \param[in] IEEE
+*> \verbatim
+*> IEEE is LOGICAL
+*> Flag for IEEE or non IEEE arithmetic (passed to SLASQ5).
+*> \endverbatim
+*>
+*> \param[in,out] TTYPE
+*> \verbatim
+*> TTYPE is INTEGER
+*> Shift type.
+*> \endverbatim
+*>
+*> \param[in,out] DMIN1
+*> \verbatim
+*> DMIN1 is REAL
+*> \endverbatim
+*>
+*> \param[in,out] DMIN2
+*> \verbatim
+*> DMIN2 is REAL
+*> \endverbatim
+*>
+*> \param[in,out] DN
+*> \verbatim
+*> DN is REAL
+*> \endverbatim
+*>
+*> \param[in,out] DN1
+*> \verbatim
+*> DN1 is REAL
+*> \endverbatim
+*>
+*> \param[in,out] DN2
+*> \verbatim
+*> DN2 is REAL
+*> \endverbatim
+*>
+*> \param[in,out] G
+*> \verbatim
+*> G is REAL
+*> \endverbatim
+*>
+*> \param[in,out] TAU
+*> \verbatim
+*> TAU is REAL
+*> \endverbatim
+*> \verbatim
+*> These are passed as arguments in order to save their values
+*> between calls to SLASQ3.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL,
$ ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1,
$ DN2, G, TAU )
*
-* -- LAPACK routine (version 3.2.2) --
-*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- June 2010 --
-*
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL IEEE
@@ -22,75 +190,6 @@
REAL Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASQ3 checks for deflation, computes a shift (TAU) and calls dqds.
-* In case of failure it changes shifts, and tries again until output
-* is positive.
-*
-* Arguments
-* =========
-*
-* I0 (input) INTEGER
-* First index.
-*
-* N0 (input/output) INTEGER
-* Last index.
-*
-* Z (input) REAL array, dimension ( 4*N )
-* Z holds the qd array.
-*
-* PP (input/output) INTEGER
-* PP=0 for ping, PP=1 for pong.
-* PP=2 indicates that flipping was applied to the Z array
-* and that the initial tests for deflation should not be
-* performed.
-*
-* DMIN (output) REAL
-* Minimum value of d.
-*
-* SIGMA (output) REAL
-* Sum of shifts used in current segment.
-*
-* DESIG (input/output) REAL
-* Lower order part of SIGMA
-*
-* QMAX (input) REAL
-* Maximum value of q.
-*
-* NFAIL (output) INTEGER
-* Number of times shift was too big.
-*
-* ITER (output) INTEGER
-* Number of iterations.
-*
-* NDIV (output) INTEGER
-* Number of divisions.
-*
-* IEEE (input) LOGICAL
-* Flag for IEEE or non IEEE arithmetic (passed to SLASQ5).
-*
-* TTYPE (input/output) INTEGER
-* Shift type.
-*
-* DMIN1 (input/output) REAL
-*
-* DMIN2 (input/output) REAL
-*
-* DN (input/output) REAL
-*
-* DN1 (input/output) REAL
-*
-* DN2 (input/output) REAL
-*
-* G (input/output) REAL
-*
-* TAU (input/output) REAL
-*
-* These are passed as arguments in order to save their values
-* between calls to SLASQ3.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasq4.f b/SRC/slasq4.f
index 93505c59..556805de 100644
--- a/SRC/slasq4.f
+++ b/SRC/slasq4.f
@@ -1,79 +1,161 @@
- SUBROUTINE SLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
- $ DN1, DN2, TAU, TTYPE, G )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER I0, N0, N0IN, PP, TTYPE
- REAL DMIN, DMIN1, DMIN2, DN, DN1, DN2, G, TAU
-* ..
-* .. Array Arguments ..
- REAL Z( * )
-* ..
-*
+*> \brief \b SLASQ4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
+* DN1, DN2, TAU, TTYPE, G )
+*
+* .. Scalar Arguments ..
+* INTEGER I0, N0, N0IN, PP, TTYPE
+* REAL DMIN, DMIN1, DMIN2, DN, DN1, DN2, G, TAU
+* ..
+* .. Array Arguments ..
+* REAL Z( * )
+* ..
+*
* Purpose
* =======
*
-* SLASQ4 computes an approximation TAU to the smallest eigenvalue
-* using values of d from the previous transform.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASQ4 computes an approximation TAU to the smallest eigenvalue
+*> using values of d from the previous transform.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* I0 (input) INTEGER
-* First index.
-*
-* N0 (input) INTEGER
-* Last index.
-*
-* Z (input) REAL array, dimension ( 4*N )
-* Z holds the qd array.
-*
-* PP (input) INTEGER
-* PP=0 for ping, PP=1 for pong.
-*
-* NOIN (input) INTEGER
-* The value of N0 at start of EIGTEST.
-*
-* DMIN (input) REAL
-* Minimum value of d.
-*
-* DMIN1 (input) REAL
-* Minimum value of d, excluding D( N0 ).
-*
-* DMIN2 (input) REAL
-* Minimum value of d, excluding D( N0 ) and D( N0-1 ).
-*
-* DN (input) REAL
-* d(N)
-*
-* DN1 (input) REAL
-* d(N-1)
+*> \param[in] I0
+*> \verbatim
+*> I0 is INTEGER
+*> First index.
+*> \endverbatim
+*>
+*> \param[in] N0
+*> \verbatim
+*> N0 is INTEGER
+*> Last index.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension ( 4*N )
+*> Z holds the qd array.
+*> \endverbatim
+*>
+*> \param[in] PP
+*> \verbatim
+*> PP is INTEGER
+*> PP=0 for ping, PP=1 for pong.
+*> \endverbatim
+*>
+*> \param[in] NOIN
+*> \verbatim
+*> NOIN is INTEGER
+*> The value of N0 at start of EIGTEST.
+*> \endverbatim
+*>
+*> \param[in] DMIN
+*> \verbatim
+*> DMIN is REAL
+*> Minimum value of d.
+*> \endverbatim
+*>
+*> \param[in] DMIN1
+*> \verbatim
+*> DMIN1 is REAL
+*> Minimum value of d, excluding D( N0 ).
+*> \endverbatim
+*>
+*> \param[in] DMIN2
+*> \verbatim
+*> DMIN2 is REAL
+*> Minimum value of d, excluding D( N0 ) and D( N0-1 ).
+*> \endverbatim
+*>
+*> \param[in] DN
+*> \verbatim
+*> DN is REAL
+*> d(N)
+*> \endverbatim
+*>
+*> \param[in] DN1
+*> \verbatim
+*> DN1 is REAL
+*> d(N-1)
+*> \endverbatim
+*>
+*> \param[in] DN2
+*> \verbatim
+*> DN2 is REAL
+*> d(N-2)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL
+*> This is the shift.
+*> \endverbatim
+*>
+*> \param[out] TTYPE
+*> \verbatim
+*> TTYPE is INTEGER
+*> Shift type.
+*> \endverbatim
+*>
+*> \param[in,out] G
+*> \verbatim
+*> G is REAL
+*> G is passed as an argument in order to save its value between
+*> calls to SLASQ4.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DN2 (input) REAL
-* d(N-2)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL
-* This is the shift.
+*> \date November 2011
*
-* TTYPE (output) INTEGER
-* Shift type.
+*> \ingroup auxOTHERcomputational
*
-* G (input/output) REAL
-* G is passed as an argument in order to save its value between
-* calls to SLASQ4.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
* CNST1 = 9/16
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
+ $ DN1, DN2, TAU, TTYPE, G )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER I0, N0, N0IN, PP, TTYPE
+ REAL DMIN, DMIN1, DMIN2, DN, DN1, DN2, G, TAU
+* ..
+* .. Array Arguments ..
+ REAL Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasq5.f b/SRC/slasq5.f
index d785312a..8ded4d40 100644
--- a/SRC/slasq5.f
+++ b/SRC/slasq5.f
@@ -1,15 +1,133 @@
- SUBROUTINE SLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN,
- $ DNM1, DNM2, IEEE )
+*> \brief \b SLASQ5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN,
+* DNM1, DNM2, IEEE )
+*
+* .. Scalar Arguments ..
+* LOGICAL IEEE
+* INTEGER I0, N0, PP
+* REAL DMIN, DMIN1, DMIN2, DN, DNM1, DNM2, TAU
+* ..
+* .. Array Arguments ..
+* REAL Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASQ5 computes one dqds transform in ping-pong form, one
+*> version for IEEE machines another for non IEEE machines.
+*>
+*>\endverbatim
*
-* -- LAPACK routine (version 3.2) --
+* Arguments
+* =========
+*
+*> \param[in] I0
+*> \verbatim
+*> I0 is INTEGER
+*> First index.
+*> \endverbatim
+*>
+*> \param[in] N0
+*> \verbatim
+*> N0 is INTEGER
+*> Last index.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension ( 4*N )
+*> Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
+*> an extra argument.
+*> \endverbatim
+*>
+*> \param[in] PP
+*> \verbatim
+*> PP is INTEGER
+*> PP=0 for ping, PP=1 for pong.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL
+*> This is the shift.
+*> \endverbatim
+*>
+*> \param[out] DMIN
+*> \verbatim
+*> DMIN is REAL
+*> Minimum value of d.
+*> \endverbatim
+*>
+*> \param[out] DMIN1
+*> \verbatim
+*> DMIN1 is REAL
+*> Minimum value of d, excluding D( N0 ).
+*> \endverbatim
+*>
+*> \param[out] DMIN2
+*> \verbatim
+*> DMIN2 is REAL
+*> Minimum value of d, excluding D( N0 ) and D( N0-1 ).
+*> \endverbatim
+*>
+*> \param[out] DN
+*> \verbatim
+*> DN is REAL
+*> d(N0), the last value of d.
+*> \endverbatim
+*>
+*> \param[out] DNM1
+*> \verbatim
+*> DNM1 is REAL
+*> d(N0-1).
+*> \endverbatim
+*>
+*> \param[out] DNM2
+*> \verbatim
+*> DNM2 is REAL
+*> d(N0-2).
+*> \endverbatim
+*>
+*> \param[in] IEEE
+*> \verbatim
+*> IEEE is LOGICAL
+*> Flag for IEEE or non IEEE arithmetic.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE SLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN,
+ $ DNM1, DNM2, IEEE )
+*
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL IEEE
@@ -20,52 +138,6 @@
REAL Z( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASQ5 computes one dqds transform in ping-pong form, one
-* version for IEEE machines another for non IEEE machines.
-*
-* Arguments
-* =========
-*
-* I0 (input) INTEGER
-* First index.
-*
-* N0 (input) INTEGER
-* Last index.
-*
-* Z (input) REAL array, dimension ( 4*N )
-* Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
-* an extra argument.
-*
-* PP (input) INTEGER
-* PP=0 for ping, PP=1 for pong.
-*
-* TAU (input) REAL
-* This is the shift.
-*
-* DMIN (output) REAL
-* Minimum value of d.
-*
-* DMIN1 (output) REAL
-* Minimum value of d, excluding D( N0 ).
-*
-* DMIN2 (output) REAL
-* Minimum value of d, excluding D( N0 ) and D( N0-1 ).
-*
-* DN (output) REAL
-* d(N0), the last value of d.
-*
-* DNM1 (output) REAL
-* d(N0-1).
-*
-* DNM2 (output) REAL
-* d(N0-2).
-*
-* IEEE (input) LOGICAL
-* Flag for IEEE or non IEEE arithmetic.
-*
* =====================================================================
*
* .. Parameter ..
diff --git a/SRC/slasq6.f b/SRC/slasq6.f
index 109237f8..7e0d9194 100644
--- a/SRC/slasq6.f
+++ b/SRC/slasq6.f
@@ -1,63 +1,128 @@
- SUBROUTINE SLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN,
- $ DNM1, DNM2 )
-*
-* -- LAPACK routine (version 3.2) --
-*
-* -- Contributed by Osni Marques of the Lawrence Berkeley National --
-* -- Laboratory and Beresford Parlett of the Univ. of California at --
-* -- Berkeley --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- INTEGER I0, N0, PP
- REAL DMIN, DMIN1, DMIN2, DN, DNM1, DNM2
-* ..
-* .. Array Arguments ..
- REAL Z( * )
-* ..
-*
+*> \brief \b SLASQ6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN,
+* DNM1, DNM2 )
+*
+* .. Scalar Arguments ..
+* INTEGER I0, N0, PP
+* REAL DMIN, DMIN1, DMIN2, DN, DNM1, DNM2
+* ..
+* .. Array Arguments ..
+* REAL Z( * )
+* ..
+*
* Purpose
* =======
*
-* SLASQ6 computes one dqd (shift equal to zero) transform in
-* ping-pong form, with protection against underflow and overflow.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASQ6 computes one dqd (shift equal to zero) transform in
+*> ping-pong form, with protection against underflow and overflow.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* I0 (input) INTEGER
-* First index.
-*
-* N0 (input) INTEGER
-* Last index.
-*
-* Z (input) REAL array, dimension ( 4*N )
-* Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
-* an extra argument.
-*
-* PP (input) INTEGER
-* PP=0 for ping, PP=1 for pong.
+*> \param[in] I0
+*> \verbatim
+*> I0 is INTEGER
+*> First index.
+*> \endverbatim
+*>
+*> \param[in] N0
+*> \verbatim
+*> N0 is INTEGER
+*> Last index.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension ( 4*N )
+*> Z holds the qd array. EMIN is stored in Z(4*N0) to avoid
+*> an extra argument.
+*> \endverbatim
+*>
+*> \param[in] PP
+*> \verbatim
+*> PP is INTEGER
+*> PP=0 for ping, PP=1 for pong.
+*> \endverbatim
+*>
+*> \param[out] DMIN
+*> \verbatim
+*> DMIN is REAL
+*> Minimum value of d.
+*> \endverbatim
+*>
+*> \param[out] DMIN1
+*> \verbatim
+*> DMIN1 is REAL
+*> Minimum value of d, excluding D( N0 ).
+*> \endverbatim
+*>
+*> \param[out] DMIN2
+*> \verbatim
+*> DMIN2 is REAL
+*> Minimum value of d, excluding D( N0 ) and D( N0-1 ).
+*> \endverbatim
+*>
+*> \param[out] DN
+*> \verbatim
+*> DN is REAL
+*> d(N0), the last value of d.
+*> \endverbatim
+*>
+*> \param[out] DNM1
+*> \verbatim
+*> DNM1 is REAL
+*> d(N0-1).
+*> \endverbatim
+*>
+*> \param[out] DNM2
+*> \verbatim
+*> DNM2 is REAL
+*> d(N0-2).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DMIN (output) REAL
-* Minimum value of d.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DMIN1 (output) REAL
-* Minimum value of d, excluding D( N0 ).
+*> \date November 2011
*
-* DMIN2 (output) REAL
-* Minimum value of d, excluding D( N0 ) and D( N0-1 ).
+*> \ingroup auxOTHERcomputational
*
-* DN (output) REAL
-* d(N0), the last value of d.
+* =====================================================================
+ SUBROUTINE SLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN,
+ $ DNM1, DNM2 )
*
-* DNM1 (output) REAL
-* d(N0-1).
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DNM2 (output) REAL
-* d(N0-2).
+* .. Scalar Arguments ..
+ INTEGER I0, N0, PP
+ REAL DMIN, DMIN1, DMIN2, DN, DNM1, DNM2
+* ..
+* .. Array Arguments ..
+ REAL Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasr.f b/SRC/slasr.f
index 89a95434..14ce8dfb 100644
--- a/SRC/slasr.f
+++ b/SRC/slasr.f
@@ -1,142 +1,208 @@
- SUBROUTINE SLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
+*> \brief \b SLASR
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, PIVOT, SIDE
- INTEGER LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( * ), S( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, PIVOT, SIDE
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* SLASR applies a sequence of plane rotations to a real matrix A,
-* from either the left or the right.
-*
-* When SIDE = 'L', the transformation takes the form
-*
-* A := P*A
-*
-* and when SIDE = 'R', the transformation takes the form
-*
-* A := A*P**T
-*
-* where P is an orthogonal matrix consisting of a sequence of z plane
-* rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
-* and P**T is the transpose of P.
-*
-* When DIRECT = 'F' (Forward sequence), then
-*
-* P = P(z-1) * ... * P(2) * P(1)
-*
-* and when DIRECT = 'B' (Backward sequence), then
-*
-* P = P(1) * P(2) * ... * P(z-1)
-*
-* where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
-*
-* R(k) = ( c(k) s(k) )
-* = ( -s(k) c(k) ).
-*
-* When PIVOT = 'V' (Variable pivot), the rotation is performed
-* for the plane (k,k+1), i.e., P(k) has the form
-*
-* P(k) = ( 1 )
-* ( ... )
-* ( 1 )
-* ( c(k) s(k) )
-* ( -s(k) c(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-*
-* where R(k) appears as a rank-2 modification to the identity matrix in
-* rows and columns k and k+1.
-*
-* When PIVOT = 'T' (Top pivot), the rotation is performed for the
-* plane (1,k+1), so P(k) has the form
-*
-* P(k) = ( c(k) s(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-* ( -s(k) c(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-*
-* where R(k) appears in rows and columns 1 and k+1.
-*
-* Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
-* performed for the plane (k,z), giving P(k) the form
-*
-* P(k) = ( 1 )
-* ( ... )
-* ( 1 )
-* ( c(k) s(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-* ( -s(k) c(k) )
-*
-* where R(k) appears in rows and columns k and z. The rotations are
-* performed without ever forming P(k) explicitly.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASR applies a sequence of plane rotations to a real matrix A,
+*> from either the left or the right.
+*>
+*> When SIDE = 'L', the transformation takes the form
+*>
+*> A := P*A
+*>
+*> and when SIDE = 'R', the transformation takes the form
+*>
+*> A := A*P**T
+*>
+*> where P is an orthogonal matrix consisting of a sequence of z plane
+*> rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
+*> and P**T is the transpose of P.
+*>
+*> When DIRECT = 'F' (Forward sequence), then
+*>
+*> P = P(z-1) * ... * P(2) * P(1)
+*>
+*> and when DIRECT = 'B' (Backward sequence), then
+*>
+*> P = P(1) * P(2) * ... * P(z-1)
+*>
+*> where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
+*>
+*> R(k) = ( c(k) s(k) )
+*> = ( -s(k) c(k) ).
+*>
+*> When PIVOT = 'V' (Variable pivot), the rotation is performed
+*> for the plane (k,k+1), i.e., P(k) has the form
+*>
+*> P(k) = ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( c(k) s(k) )
+*> ( -s(k) c(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*>
+*> where R(k) appears as a rank-2 modification to the identity matrix in
+*> rows and columns k and k+1.
+*>
+*> When PIVOT = 'T' (Top pivot), the rotation is performed for the
+*> plane (1,k+1), so P(k) has the form
+*>
+*> P(k) = ( c(k) s(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( -s(k) c(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*>
+*> where R(k) appears in rows and columns 1 and k+1.
+*>
+*> Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
+*> performed for the plane (k,z), giving P(k) the form
+*>
+*> P(k) = ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( c(k) s(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( -s(k) c(k) )
+*>
+*> where R(k) appears in rows and columns k and z. The rotations are
+*> performed without ever forming P(k) explicitly.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* Specifies whether the plane rotation matrix P is applied to
-* A on the left or the right.
-* = 'L': Left, compute A := P*A
-* = 'R': Right, compute A:= A*P**T
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> Specifies whether the plane rotation matrix P is applied to
+*> A on the left or the right.
+*> = 'L': Left, compute A := P*A
+*> = 'R': Right, compute A:= A*P**T
+*> \endverbatim
+*>
+*> \param[in] PIVOT
+*> \verbatim
+*> PIVOT is CHARACTER*1
+*> Specifies the plane for which P(k) is a plane rotation
+*> matrix.
+*> = 'V': Variable pivot, the plane (k,k+1)
+*> = 'T': Top pivot, the plane (1,k+1)
+*> = 'B': Bottom pivot, the plane (k,z)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies whether P is a forward or backward sequence of
+*> plane rotations.
+*> = 'F': Forward, P = P(z-1)*...*P(2)*P(1)
+*> = 'B': Backward, P = P(1)*P(2)*...*P(z-1)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. If m <= 1, an immediate
+*> return is effected.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. If n <= 1, an
+*> immediate return is effected.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> The cosines c(k) of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> The sines s(k) of the plane rotations. The 2-by-2 plane
+*> rotation part of the matrix P(k), R(k), has the form
+*> R(k) = ( c(k) s(k) )
+*> ( -s(k) c(k) ).
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix A. On exit, A is overwritten by P*A if
+*> SIDE = 'R' or by A*P**T if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
*
-* PIVOT (input) CHARACTER*1
-* Specifies the plane for which P(k) is a plane rotation
-* matrix.
-* = 'V': Variable pivot, the plane (k,k+1)
-* = 'T': Top pivot, the plane (1,k+1)
-* = 'B': Bottom pivot, the plane (k,z)
-*
-* DIRECT (input) CHARACTER*1
-* Specifies whether P is a forward or backward sequence of
-* plane rotations.
-* = 'F': Forward, P = P(z-1)*...*P(2)*P(1)
-* = 'B': Backward, P = P(1)*P(2)*...*P(z-1)
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A. If m <= 1, an immediate
-* return is effected.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. If n <= 1, an
-* immediate return is effected.
+*> \date November 2011
*
-* C (input) REAL array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* The cosines c(k) of the plane rotations.
+*> \ingroup auxOTHERauxiliary
*
-* S (input) REAL array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* The sines s(k) of the plane rotations. The 2-by-2 plane
-* rotation part of the matrix P(k), R(k), has the form
-* R(k) = ( c(k) s(k) )
-* ( -s(k) c(k) ).
+* =====================================================================
+ SUBROUTINE SLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
*
-* A (input/output) REAL array, dimension (LDA,N)
-* The M-by-N matrix A. On exit, A is overwritten by P*A if
-* SIDE = 'R' or by A*P**T if SIDE = 'L'.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, PIVOT, SIDE
+ INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasrt.f b/SRC/slasrt.f
index f3f8ba89..57dc1442 100644
--- a/SRC/slasrt.f
+++ b/SRC/slasrt.f
@@ -1,9 +1,89 @@
+*> \brief \b SLASRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASRT( ID, N, D, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER ID
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Sort the numbers in D in increasing order (if ID = 'I') or
+*> in decreasing order (if ID = 'D' ).
+*>
+*> Use Quick Sort, reverting to Insertion sort on arrays of
+*> size <= 20. Dimension of STACK limits N to about 2**32.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ID
+*> \verbatim
+*> ID is CHARACTER*1
+*> = 'I': sort D in increasing order;
+*> = 'D': sort D in decreasing order.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the array D.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the array to be sorted.
+*> On exit, D has been sorted into increasing order
+*> (D(1) <= ... <= D(N) ) or into decreasing order
+*> (D(1) >= ... >= D(N) ), depending on ID.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SLASRT( ID, N, D, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER ID
@@ -13,35 +93,6 @@
REAL D( * )
* ..
*
-* Purpose
-* =======
-*
-* Sort the numbers in D in increasing order (if ID = 'I') or
-* in decreasing order (if ID = 'D' ).
-*
-* Use Quick Sort, reverting to Insertion sort on arrays of
-* size <= 20. Dimension of STACK limits N to about 2**32.
-*
-* Arguments
-* =========
-*
-* ID (input) CHARACTER*1
-* = 'I': sort D in increasing order;
-* = 'D': sort D in decreasing order.
-*
-* N (input) INTEGER
-* The length of the array D.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the array to be sorted.
-* On exit, D has been sorted into increasing order
-* (D(1) <= ... <= D(N) ) or into decreasing order
-* (D(1) >= ... >= D(N) ), depending on ID.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slassq.f b/SRC/slassq.f
index 0b58a972..c73aa91e 100644
--- a/SRC/slassq.f
+++ b/SRC/slassq.f
@@ -1,9 +1,104 @@
+*> \brief \b SLASSQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASSQ( N, X, INCX, SCALE, SUMSQ )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* REAL SCALE, SUMSQ
+* ..
+* .. Array Arguments ..
+* REAL X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASSQ returns the values scl and smsq such that
+*>
+*> ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
+*>
+*> where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is
+*> assumed to be non-negative and scl returns the value
+*>
+*> scl = max( scale, abs( x( i ) ) ).
+*>
+*> scale and sumsq must be supplied in SCALE and SUMSQ and
+*> scl and smsq are overwritten on SCALE and SUMSQ respectively.
+*>
+*> The routine makes only one pass through the vector x.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements to be used from the vector X.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> The vector for which a scaled sum of squares is computed.
+*> x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of the vector X.
+*> INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On entry, the value scale in the equation above.
+*> On exit, SCALE is overwritten with scl , the scaling factor
+*> for the sum of squares.
+*> \endverbatim
+*>
+*> \param[in,out] SUMSQ
+*> \verbatim
+*> SUMSQ is REAL
+*> On entry, the value sumsq in the equation above.
+*> On exit, SUMSQ is overwritten with smsq , the basic sum of
+*> squares from which scl has been factored out.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLASSQ( N, X, INCX, SCALE, SUMSQ )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,47 +108,6 @@
REAL X( * )
* ..
*
-* Purpose
-* =======
-*
-* SLASSQ returns the values scl and smsq such that
-*
-* ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
-*
-* where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is
-* assumed to be non-negative and scl returns the value
-*
-* scl = max( scale, abs( x( i ) ) ).
-*
-* scale and sumsq must be supplied in SCALE and SUMSQ and
-* scl and smsq are overwritten on SCALE and SUMSQ respectively.
-*
-* The routine makes only one pass through the vector x.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of elements to be used from the vector X.
-*
-* X (input) REAL array, dimension (N)
-* The vector for which a scaled sum of squares is computed.
-* x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
-*
-* INCX (input) INTEGER
-* The increment between successive values of the vector X.
-* INCX > 0.
-*
-* SCALE (input/output) REAL
-* On entry, the value scale in the equation above.
-* On exit, SCALE is overwritten with scl , the scaling factor
-* for the sum of squares.
-*
-* SUMSQ (input/output) REAL
-* On entry, the value sumsq in the equation above.
-* On exit, SUMSQ is overwritten with smsq , the basic sum of
-* squares from which scl has been factored out.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasv2.f b/SRC/slasv2.f
index ee4464c4..49bc4e06 100644
--- a/SRC/slasv2.f
+++ b/SRC/slasv2.f
@@ -1,78 +1,145 @@
- SUBROUTINE SLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
+*> \brief \b SLASV2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
+*
+* .. Scalar Arguments ..
+* REAL CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
+* ..
+*
* Purpose
* =======
*
-* SLASV2 computes the singular value decomposition of a 2-by-2
-* triangular matrix
-* [ F G ]
-* [ 0 H ].
-* On return, abs(SSMAX) is the larger singular value, abs(SSMIN) is the
-* smaller singular value, and (CSL,SNL) and (CSR,SNR) are the left and
-* right singular vectors for abs(SSMAX), giving the decomposition
-*
-* [ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ]
-* [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ].
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASV2 computes the singular value decomposition of a 2-by-2
+*> triangular matrix
+*> [ F G ]
+*> [ 0 H ].
+*> On return, abs(SSMAX) is the larger singular value, abs(SSMIN) is the
+*> smaller singular value, and (CSL,SNL) and (CSR,SNR) are the left and
+*> right singular vectors for abs(SSMAX), giving the decomposition
+*>
+*> [ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ]
+*> [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ].
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) REAL
-* The (1,1) element of the 2-by-2 matrix.
-*
-* G (input) REAL
-* The (1,2) element of the 2-by-2 matrix.
-*
-* H (input) REAL
-* The (2,2) element of the 2-by-2 matrix.
-*
-* SSMIN (output) REAL
-* abs(SSMIN) is the smaller singular value.
-*
-* SSMAX (output) REAL
-* abs(SSMAX) is the larger singular value.
+*> \param[in] F
+*> \verbatim
+*> F is REAL
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is REAL
+*> The (1,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is REAL
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] SSMIN
+*> \verbatim
+*> SSMIN is REAL
+*> abs(SSMIN) is the smaller singular value.
+*> \endverbatim
+*>
+*> \param[out] SSMAX
+*> \verbatim
+*> SSMAX is REAL
+*> abs(SSMAX) is the larger singular value.
+*> \endverbatim
+*>
+*> \param[out] SNL
+*> \verbatim
+*> SNL is REAL
+*> \endverbatim
+*>
+*> \param[out] CSL
+*> \verbatim
+*> CSL is REAL
+*> The vector (CSL, SNL) is a unit left singular vector for the
+*> singular value abs(SSMAX).
+*> \endverbatim
+*>
+*> \param[out] SNR
+*> \verbatim
+*> SNR is REAL
+*> \endverbatim
+*>
+*> \param[out] CSR
+*> \verbatim
+*> CSR is REAL
+*> The vector (CSR, SNR) is a unit right singular vector for the
+*> singular value abs(SSMAX).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SNL (output) REAL
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CSL (output) REAL
-* The vector (CSL, SNL) is a unit left singular vector for the
-* singular value abs(SSMAX).
+*> \date November 2011
*
-* SNR (output) REAL
+*> \ingroup auxOTHERauxiliary
*
-* CSR (output) REAL
-* The vector (CSR, SNR) is a unit right singular vector for the
-* singular value abs(SSMAX).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Any input parameter may be aliased with any output parameter.
+*>
+*> Barring over/underflow and assuming a guard digit in subtraction, all
+*> output quantities are correct to within a few units in the last
+*> place (ulps).
+*>
+*> In IEEE arithmetic, the code works correctly if one matrix element is
+*> infinite.
+*>
+*> Overflow will not occur unless the largest singular value itself
+*> overflows or is within a few ulps of overflow. (On machines with
+*> partial overflow, like the Cray, overflow may occur if the largest
+*> singular value is within a factor of 2 of overflow.)
+*>
+*> Underflow is harmless if underflow is gradual. Otherwise, results
+*> may correspond to a matrix modified by perturbations of size near
+*> the underflow threshold.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
*
-* Any input parameter may be aliased with any output parameter.
-*
-* Barring over/underflow and assuming a guard digit in subtraction, all
-* output quantities are correct to within a few units in the last
-* place (ulps).
-*
-* In IEEE arithmetic, the code works correctly if one matrix element is
-* infinite.
-*
-* Overflow will not occur unless the largest singular value itself
-* overflows or is within a few ulps of overflow. (On machines with
-* partial overflow, like the Cray, overflow may occur if the largest
-* singular value is within a factor of 2 of overflow.)
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Underflow is harmless if underflow is gradual. Otherwise, results
-* may correspond to a matrix modified by perturbations of size near
-* the underflow threshold.
+* .. Scalar Arguments ..
+ REAL CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
+* ..
*
* =====================================================================
*
diff --git a/SRC/slaswp.f b/SRC/slaswp.f
index e6c9cc92..6f5f46ee 100644
--- a/SRC/slaswp.f
+++ b/SRC/slaswp.f
@@ -1,60 +1,125 @@
- SUBROUTINE SLASWP( N, A, LDA, K1, K2, IPIV, INCX )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCX, K1, K2, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * )
-* ..
-*
+*> \brief \b SLASWP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, K1, K2, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SLASWP performs a series of row interchanges on the matrix A.
-* One row interchange is initiated for each of rows K1 through K2 of A.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASWP performs a series of row interchanges on the matrix A.
+*> One row interchange is initiated for each of rows K1 through K2 of A.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the matrix of column dimension N to which the row
-* interchanges will be applied.
-* On exit, the permuted matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the matrix of column dimension N to which the row
+*> interchanges will be applied.
+*> On exit, the permuted matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] K1
+*> \verbatim
+*> K1 is INTEGER
+*> The first element of IPIV for which a row interchange will
+*> be done.
+*> \endverbatim
+*>
+*> \param[in] K2
+*> \verbatim
+*> K2 is INTEGER
+*> The last element of IPIV for which a row interchange will
+*> be done.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (K2*abs(INCX))
+*> The vector of pivot indices. Only the elements in positions
+*> K1 through K2 of IPIV are accessed.
+*> IPIV(K) = L implies rows K and L are to be interchanged.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of IPIV. If IPIV
+*> is negative, the pivots are applied in reverse order.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K1 (input) INTEGER
-* The first element of IPIV for which a row interchange will
-* be done.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* K2 (input) INTEGER
-* The last element of IPIV for which a row interchange will
-* be done.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (K2*abs(INCX))
-* The vector of pivot indices. Only the elements in positions
-* K1 through K2 of IPIV are accessed.
-* IPIV(K) = L implies rows K and L are to be interchanged.
+*> \ingroup realOTHERauxiliary
*
-* INCX (input) INTEGER
-* The increment between successive values of IPIV. If IPIV
-* is negative, the pivots are applied in reverse order.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by
+*> R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by
-* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* .. Scalar Arguments ..
+ INTEGER INCX, K1, K2, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slasy2.f b/SRC/slasy2.f
index f58d8d83..aca47acf 100644
--- a/SRC/slasy2.f
+++ b/SRC/slasy2.f
@@ -1,10 +1,175 @@
+*> \brief \b SLASY2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASY2( LTRANL, LTRANR, ISGN, N1, N2, TL, LDTL, TR,
+* LDTR, B, LDB, SCALE, X, LDX, XNORM, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL LTRANL, LTRANR
+* INTEGER INFO, ISGN, LDB, LDTL, LDTR, LDX, N1, N2
+* REAL SCALE, XNORM
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), TL( LDTL, * ), TR( LDTR, * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASY2 solves for the N1 by N2 matrix X, 1 <= N1,N2 <= 2, in
+*>
+*> op(TL)*X + ISGN*X*op(TR) = SCALE*B,
+*>
+*> where TL is N1 by N1, TR is N2 by N2, B is N1 by N2, and ISGN = 1 or
+*> -1. op(T) = T or T**T, where T**T denotes the transpose of T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LTRANL
+*> \verbatim
+*> LTRANL is LOGICAL
+*> On entry, LTRANL specifies the op(TL):
+*> = .FALSE., op(TL) = TL,
+*> = .TRUE., op(TL) = TL**T.
+*> \endverbatim
+*>
+*> \param[in] LTRANR
+*> \verbatim
+*> LTRANR is LOGICAL
+*> On entry, LTRANR specifies the op(TR):
+*> = .FALSE., op(TR) = TR,
+*> = .TRUE., op(TR) = TR**T.
+*> \endverbatim
+*>
+*> \param[in] ISGN
+*> \verbatim
+*> ISGN is INTEGER
+*> On entry, ISGN specifies the sign of the equation
+*> as described before. ISGN may only be 1 or -1.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> On entry, N1 specifies the order of matrix TL.
+*> N1 may only be 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> On entry, N2 specifies the order of matrix TR.
+*> N2 may only be 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] TL
+*> \verbatim
+*> TL is REAL array, dimension (LDTL,2)
+*> On entry, TL contains an N1 by N1 matrix.
+*> \endverbatim
+*>
+*> \param[in] LDTL
+*> \verbatim
+*> LDTL is INTEGER
+*> The leading dimension of the matrix TL. LDTL >= max(1,N1).
+*> \endverbatim
+*>
+*> \param[in] TR
+*> \verbatim
+*> TR is REAL array, dimension (LDTR,2)
+*> On entry, TR contains an N2 by N2 matrix.
+*> \endverbatim
+*>
+*> \param[in] LDTR
+*> \verbatim
+*> LDTR is INTEGER
+*> The leading dimension of the matrix TR. LDTR >= max(1,N2).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,2)
+*> On entry, the N1 by N2 matrix B contains the right-hand
+*> side of the equation.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the matrix B. LDB >= max(1,N1).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On exit, SCALE contains the scale factor. SCALE is chosen
+*> less than or equal to 1 to prevent the solution overflowing.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,2)
+*> On exit, X contains the N1 by N2 solution.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the matrix X. LDX >= max(1,N1).
+*> \endverbatim
+*>
+*> \param[out] XNORM
+*> \verbatim
+*> XNORM is REAL
+*> On exit, XNORM is the infinity-norm of the solution.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO is set to
+*> 0: successful exit.
+*> 1: TL and TR have too close eigenvalues, so TL or
+*> TR is perturbed to get a nonsingular equation.
+*> NOTE: In the interests of speed, this routine does not
+*> check the inputs for errors.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYauxiliary
+*
+* =====================================================================
SUBROUTINE SLASY2( LTRANL, LTRANR, ISGN, N1, N2, TL, LDTL, TR,
$ LDTR, B, LDB, SCALE, X, LDX, XNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LTRANL, LTRANR
@@ -16,81 +181,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SLASY2 solves for the N1 by N2 matrix X, 1 <= N1,N2 <= 2, in
-*
-* op(TL)*X + ISGN*X*op(TR) = SCALE*B,
-*
-* where TL is N1 by N1, TR is N2 by N2, B is N1 by N2, and ISGN = 1 or
-* -1. op(T) = T or T**T, where T**T denotes the transpose of T.
-*
-* Arguments
-* =========
-*
-* LTRANL (input) LOGICAL
-* On entry, LTRANL specifies the op(TL):
-* = .FALSE., op(TL) = TL,
-* = .TRUE., op(TL) = TL**T.
-*
-* LTRANR (input) LOGICAL
-* On entry, LTRANR specifies the op(TR):
-* = .FALSE., op(TR) = TR,
-* = .TRUE., op(TR) = TR**T.
-*
-* ISGN (input) INTEGER
-* On entry, ISGN specifies the sign of the equation
-* as described before. ISGN may only be 1 or -1.
-*
-* N1 (input) INTEGER
-* On entry, N1 specifies the order of matrix TL.
-* N1 may only be 0, 1 or 2.
-*
-* N2 (input) INTEGER
-* On entry, N2 specifies the order of matrix TR.
-* N2 may only be 0, 1 or 2.
-*
-* TL (input) REAL array, dimension (LDTL,2)
-* On entry, TL contains an N1 by N1 matrix.
-*
-* LDTL (input) INTEGER
-* The leading dimension of the matrix TL. LDTL >= max(1,N1).
-*
-* TR (input) REAL array, dimension (LDTR,2)
-* On entry, TR contains an N2 by N2 matrix.
-*
-* LDTR (input) INTEGER
-* The leading dimension of the matrix TR. LDTR >= max(1,N2).
-*
-* B (input) REAL array, dimension (LDB,2)
-* On entry, the N1 by N2 matrix B contains the right-hand
-* side of the equation.
-*
-* LDB (input) INTEGER
-* The leading dimension of the matrix B. LDB >= max(1,N1).
-*
-* SCALE (output) REAL
-* On exit, SCALE contains the scale factor. SCALE is chosen
-* less than or equal to 1 to prevent the solution overflowing.
-*
-* X (output) REAL array, dimension (LDX,2)
-* On exit, X contains the N1 by N2 solution.
-*
-* LDX (input) INTEGER
-* The leading dimension of the matrix X. LDX >= max(1,N1).
-*
-* XNORM (output) REAL
-* On exit, XNORM is the infinity-norm of the solution.
-*
-* INFO (output) INTEGER
-* On exit, INFO is set to
-* 0: successful exit.
-* 1: TL and TR have too close eigenvalues, so TL or
-* TR is perturbed to get a nonsingular equation.
-* NOTE: In the interests of speed, this routine does not
-* check the inputs for errors.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slasyf.f b/SRC/slasyf.f
index 257c5da6..352442f6 100644
--- a/SRC/slasyf.f
+++ b/SRC/slasyf.f
@@ -1,9 +1,158 @@
+*> \brief \b SLASYF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KB, LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), W( LDW, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLASYF computes a partial factorization of a real symmetric matrix A
+*> using the Bunch-Kaufman diagonal pivoting method. The partial
+*> factorization has the form:
+*>
+*> A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
+*> ( 0 U22 ) ( 0 D ) ( U12**T U22**T )
+*>
+*> A = ( L11 0 ) ( D 0 ) ( L11**T L21**T ) if UPLO = 'L'
+*> ( L21 I ) ( 0 A22 ) ( 0 I )
+*>
+*> where the order of D is at most NB. The actual order is returned in
+*> the argument KB, and is either NB or NB-1, or N if N <= NB.
+*>
+*> SLASYF is an auxiliary routine called by SSYTRF. It uses blocked code
+*> (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
+*> A22 (if UPLO = 'L').
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The maximum number of columns of the matrix A that should be
+*> factored. NB should be at least 2 to allow for 2-by-2 pivot
+*> blocks.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns of A that were actually factored.
+*> KB is either NB-1 or NB, or N if N <= NB.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> On exit, A contains details of the partial factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If UPLO = 'U', only the last KB elements of IPIV are set;
+*> if UPLO = 'L', only the first KB elements are set.
+*> \endverbatim
+*> \verbatim
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (LDW,NB)
+*> \endverbatim
+*>
+*> \param[in] LDW
+*> \verbatim
+*> LDW is INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+* =====================================================================
SUBROUTINE SLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,84 +163,6 @@
REAL A( LDA, * ), W( LDW, * )
* ..
*
-* Purpose
-* =======
-*
-* SLASYF computes a partial factorization of a real symmetric matrix A
-* using the Bunch-Kaufman diagonal pivoting method. The partial
-* factorization has the form:
-*
-* A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
-* ( 0 U22 ) ( 0 D ) ( U12**T U22**T )
-*
-* A = ( L11 0 ) ( D 0 ) ( L11**T L21**T ) if UPLO = 'L'
-* ( L21 I ) ( 0 A22 ) ( 0 I )
-*
-* where the order of D is at most NB. The actual order is returned in
-* the argument KB, and is either NB or NB-1, or N if N <= NB.
-*
-* SLASYF is an auxiliary routine called by SSYTRF. It uses blocked code
-* (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
-* A22 (if UPLO = 'L').
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The maximum number of columns of the matrix A that should be
-* factored. NB should be at least 2 to allow for 2-by-2 pivot
-* blocks.
-*
-* KB (output) INTEGER
-* The number of columns of A that were actually factored.
-* KB is either NB-1 or NB, or N if N <= NB.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, A contains details of the partial factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If UPLO = 'U', only the last KB elements of IPIV are set;
-* if UPLO = 'L', only the first KB elements are set.
-*
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* W (workspace) REAL array, dimension (LDW,NB)
-*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slatbs.f b/SRC/slatbs.f
index 07bc2bdf..c377560b 100644
--- a/SRC/slatbs.f
+++ b/SRC/slatbs.f
@@ -1,10 +1,249 @@
+*> \brief \b SLATBS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
+* SCALE, CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), CNORM( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATBS solves one of the triangular systems
+*>
+*> A *x = s*b or A**T*x = s*b
+*>
+*> with scaling to prevent overflow, where A is an upper or lower
+*> triangular band matrix. Here A**T denotes the transpose of A, x and b
+*> are n-element vectors, and s is a scaling factor, usually less than
+*> or equal to 1, chosen so that the components of x will be less than
+*> the overflow threshold. If the unscaled problem will not cause
+*> overflow, the Level 2 BLAS routine STBSV is called. If the matrix A
+*> is singular (A(j,j) = 0 for some j), then s is set to 0 and a
+*> non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T* x = s*b (Transpose)
+*> = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of subdiagonals or superdiagonals in the
+*> triangular matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s for the triangular system
+*> A * x = s*b or A**T* x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> A rough bound on x is computed; if that is less than overflow, STBSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine STBSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
+*> algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call STBSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
$ SCALE, CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -15,159 +254,6 @@
REAL AB( LDAB, * ), CNORM( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATBS solves one of the triangular systems
-*
-* A *x = s*b or A**T*x = s*b
-*
-* with scaling to prevent overflow, where A is an upper or lower
-* triangular band matrix. Here A**T denotes the transpose of A, x and b
-* are n-element vectors, and s is a scaling factor, usually less than
-* or equal to 1, chosen so that the components of x will be less than
-* the overflow threshold. If the unscaled problem will not cause
-* overflow, the Level 2 BLAS routine STBSV is called. If the matrix A
-* is singular (A(j,j) = 0 for some j), then s is set to 0 and a
-* non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T* x = s*b (Transpose)
-* = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of subdiagonals or superdiagonals in the
-* triangular matrix A. KD >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* X (input/output) REAL array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) REAL
-* The scaling factor s for the triangular system
-* A * x = s*b or A**T* x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) REAL array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ======= =======
-*
-* A rough bound on x is computed; if that is less than overflow, STBSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine STBSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
-* algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call STBSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slatdf.f b/SRC/slatdf.f
index 1f9c0448..a7984d78 100644
--- a/SRC/slatdf.f
+++ b/SRC/slatdf.f
@@ -1,10 +1,168 @@
+*> \brief \b SLATDF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
+* JPIV )
+*
+* .. Scalar Arguments ..
+* INTEGER IJOB, LDZ, N
+* REAL RDSCAL, RDSUM
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* REAL RHS( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATDF uses the LU factorization of the n-by-n matrix Z computed by
+*> SGETC2 and computes a contribution to the reciprocal Dif-estimate
+*> by solving Z * x = b for x, and choosing the r.h.s. b such that
+*> the norm of x is as large as possible. On entry RHS = b holds the
+*> contribution from earlier solved sub-systems, and on return RHS = x.
+*>
+*> The factorization of Z returned by SGETC2 has the form Z = P*L*U*Q,
+*> where P and Q are permutation matrices. L is lower triangular with
+*> unit diagonal elements and U is upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> IJOB = 2: First compute an approximative null-vector e
+*> of Z using SGECON, e is normalized and solve for
+*> Zx = +-e - f with the sign giving the greater value
+*> of 2-norm(x). About 5 times as expensive as Default.
+*> IJOB .ne. 2: Local look ahead strategy where all entries of
+*> the r.h.s. b is choosen as either +1 or -1 (Default).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Z.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> On entry, the LU part of the factorization of the n-by-n
+*> matrix Z computed by SGETC2: Z = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*> RHS is REAL array, dimension N.
+*> On entry, RHS contains contributions from other subsystems.
+*> On exit, RHS contains the solution of the subsystem with
+*> entries acoording to the value of IJOB (see above).
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*> RDSUM is REAL
+*> On entry, the sum of squares of computed contributions to
+*> the Dif-estimate under computation by STGSYL, where the
+*> scaling factor RDSCAL (see below) has been factored out.
+*> On exit, the corresponding sum of squares updated with the
+*> contributions from the current sub-system.
+*> If TRANS = 'T' RDSUM is not touched.
+*> NOTE: RDSUM only makes sense when STGSY2 is called by STGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*> RDSCAL is REAL
+*> On entry, scaling factor used to prevent overflow in RDSUM.
+*> On exit, RDSCAL is updated w.r.t. the current contributions
+*> in RDSUM.
+*> If TRANS = 'T', RDSCAL is not touched.
+*> NOTE: RDSCAL only makes sense when STGSY2 is called by
+*> STGSYL.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> This routine is a further developed implementation of algorithm
+*> BSOLVE in [1] using complete pivoting in the LU factorization.
+*>
+*> [1] Bo Kagstrom and Lars Westin,
+*> Generalized Schur Methods with Condition Estimators for
+*> Solving the Generalized Sylvester Equation, IEEE Transactions
+*> on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
+*>
+*> [2] Peter Poromaa,
+*> On Efficient and Robust Estimators for the Separation
+*> between two Regular Matrix Pairs with Applications in
+*> Condition Estimation. Report IMINF-95.05, Departement of
+*> Computing Science, Umea University, S-901 87 Umea, Sweden, 1995.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
$ JPIV )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IJOB, LDZ, N
@@ -15,91 +173,6 @@
REAL RHS( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SLATDF uses the LU factorization of the n-by-n matrix Z computed by
-* SGETC2 and computes a contribution to the reciprocal Dif-estimate
-* by solving Z * x = b for x, and choosing the r.h.s. b such that
-* the norm of x is as large as possible. On entry RHS = b holds the
-* contribution from earlier solved sub-systems, and on return RHS = x.
-*
-* The factorization of Z returned by SGETC2 has the form Z = P*L*U*Q,
-* where P and Q are permutation matrices. L is lower triangular with
-* unit diagonal elements and U is upper triangular.
-*
-* Arguments
-* =========
-*
-* IJOB (input) INTEGER
-* IJOB = 2: First compute an approximative null-vector e
-* of Z using SGECON, e is normalized and solve for
-* Zx = +-e - f with the sign giving the greater value
-* of 2-norm(x). About 5 times as expensive as Default.
-* IJOB .ne. 2: Local look ahead strategy where all entries of
-* the r.h.s. b is choosen as either +1 or -1 (Default).
-*
-* N (input) INTEGER
-* The number of columns of the matrix Z.
-*
-* Z (input) REAL array, dimension (LDZ, N)
-* On entry, the LU part of the factorization of the n-by-n
-* matrix Z computed by SGETC2: Z = P * L * U * Q
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDA >= max(1, N).
-*
-* RHS (input/output) REAL array, dimension N.
-* On entry, RHS contains contributions from other subsystems.
-* On exit, RHS contains the solution of the subsystem with
-* entries acoording to the value of IJOB (see above).
-*
-* RDSUM (input/output) REAL
-* On entry, the sum of squares of computed contributions to
-* the Dif-estimate under computation by STGSYL, where the
-* scaling factor RDSCAL (see below) has been factored out.
-* On exit, the corresponding sum of squares updated with the
-* contributions from the current sub-system.
-* If TRANS = 'T' RDSUM is not touched.
-* NOTE: RDSUM only makes sense when STGSY2 is called by STGSYL.
-*
-* RDSCAL (input/output) REAL
-* On entry, scaling factor used to prevent overflow in RDSUM.
-* On exit, RDSCAL is updated w.r.t. the current contributions
-* in RDSUM.
-* If TRANS = 'T', RDSCAL is not touched.
-* NOTE: RDSCAL only makes sense when STGSY2 is called by
-* STGSYL.
-*
-* IPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
-*
-* JPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* This routine is a further developed implementation of algorithm
-* BSOLVE in [1] using complete pivoting in the LU factorization.
-*
-* [1] Bo Kagstrom and Lars Westin,
-* Generalized Schur Methods with Condition Estimators for
-* Solving the Generalized Sylvester Equation, IEEE Transactions
-* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
-*
-* [2] Peter Poromaa,
-* On Efficient and Robust Estimators for the Separation
-* between two Regular Matrix Pairs with Applications in
-* Condition Estimation. Report IMINF-95.05, Departement of
-* Computing Science, Umea University, S-901 87 Umea, Sweden, 1995.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slatps.f b/SRC/slatps.f
index 865ff4a1..d2ec3223 100644
--- a/SRC/slatps.f
+++ b/SRC/slatps.f
@@ -1,10 +1,236 @@
+*> \brief \b SLATPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
+* CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), CNORM( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATPS solves one of the triangular systems
+*>
+*> A *x = s*b or A**T*x = s*b
+*>
+*> with scaling to prevent overflow, where A is an upper or lower
+*> triangular matrix stored in packed form. Here A**T denotes the
+*> transpose of A, x and b are n-element vectors, and s is a scaling
+*> factor, usually less than or equal to 1, chosen so that the
+*> components of x will be less than the overflow threshold. If the
+*> unscaled problem will not cause overflow, the Level 2 BLAS routine
+*> STPSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
+*> then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T* x = s*b (Transpose)
+*> = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s for the triangular system
+*> A * x = s*b or A**T* x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> A rough bound on x is computed; if that is less than overflow, STPSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine STPSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
+*> algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call STPSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
$ CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -15,152 +241,6 @@
REAL AP( * ), CNORM( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATPS solves one of the triangular systems
-*
-* A *x = s*b or A**T*x = s*b
-*
-* with scaling to prevent overflow, where A is an upper or lower
-* triangular matrix stored in packed form. Here A**T denotes the
-* transpose of A, x and b are n-element vectors, and s is a scaling
-* factor, usually less than or equal to 1, chosen so that the
-* components of x will be less than the overflow threshold. If the
-* unscaled problem will not cause overflow, the Level 2 BLAS routine
-* STPSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
-* then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T* x = s*b (Transpose)
-* = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* X (input/output) REAL array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) REAL
-* The scaling factor s for the triangular system
-* A * x = s*b or A**T* x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) REAL array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ======= =======
-*
-* A rough bound on x is computed; if that is less than overflow, STPSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine STPSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
-* algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call STPSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slatrd.f b/SRC/slatrd.f
index 76116636..2d694237 100644
--- a/SRC/slatrd.f
+++ b/SRC/slatrd.f
@@ -1,138 +1,172 @@
- SUBROUTINE SLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDW, N, NB
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), E( * ), TAU( * ), W( LDW, * )
-* ..
-*
+*> \brief \b SLATRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), E( * ), TAU( * ), W( LDW, * )
+* ..
+*
* Purpose
* =======
*
-* SLATRD reduces NB rows and columns of a real symmetric matrix A to
-* symmetric tridiagonal form by an orthogonal similarity
-* transformation Q**T * A * Q, and returns the matrices V and W which are
-* needed to apply the transformation to the unreduced part of A.
-*
-* If UPLO = 'U', SLATRD reduces the last NB rows and columns of a
-* matrix, of which the upper triangle is supplied;
-* if UPLO = 'L', SLATRD reduces the first NB rows and columns of a
-* matrix, of which the lower triangle is supplied.
-*
-* This is an auxiliary routine called by SSYTRD.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATRD reduces NB rows and columns of a real symmetric matrix A to
+*> symmetric tridiagonal form by an orthogonal similarity
+*> transformation Q**T * A * Q, and returns the matrices V and W which are
+*> needed to apply the transformation to the unreduced part of A.
+*>
+*> If UPLO = 'U', SLATRD reduces the last NB rows and columns of a
+*> matrix, of which the upper triangle is supplied;
+*> if UPLO = 'L', SLATRD reduces the first NB rows and columns of a
+*> matrix, of which the lower triangle is supplied.
+*>
+*> This is an auxiliary routine called by SSYTRD.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NB (input) INTEGER
-* The number of rows and columns to be reduced.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit:
-* if UPLO = 'U', the last NB columns have been reduced to
-* tridiagonal form, with the diagonal elements overwriting
-* the diagonal elements of A; the elements above the diagonal
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors;
-* if UPLO = 'L', the first NB columns have been reduced to
-* tridiagonal form, with the diagonal elements overwriting
-* the diagonal elements of A; the elements below the diagonal
-* with the array TAU, represent the orthogonal matrix Q as a
-* product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= (1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of rows and columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (output) REAL array, dimension (N-1)
-* If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
-* elements of the last NB columns of the reduced matrix;
-* if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
-* the first NB columns of the reduced matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (N-1)
-* The scalar factors of the elementary reflectors, stored in
-* TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
-* See Further Details.
+*> \date November 2011
*
-* W (output) REAL array, dimension (LDW,NB)
-* The n-by-nb matrix W required to update the unreduced part
-* of A.
+*> \ingroup realOTHERauxiliary
*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= (1,N).
+*>
+*> E (output) REAL array, dimension (N-1)
+*> If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
+*> elements of the last NB columns of the reduced matrix;
+*> if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
+*> the first NB columns of the reduced matrix.
+*>
+*> TAU (output) REAL array, dimension (N-1)
+*> The scalar factors of the elementary reflectors, stored in
+*> TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
+*> See Further Details.
+*>
+*> W (output) REAL array, dimension (LDW,NB)
+*> The n-by-nb matrix W required to update the unreduced part
+*> of A.
+*>
+*> LDW (input) INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n) H(n-1) . . . H(n-nb+1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
+*> and tau in TAU(i-1).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*> and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the n-by-nb matrix V
+*> which is needed, with W, to apply the transformation to the unreduced
+*> part of the matrix, using a symmetric rank-2k update of the form:
+*> A := A - V*W**T - W*V**T.
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5 and nb = 2:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( a a a v4 v5 ) ( d )
+*> ( a a v4 v5 ) ( 1 d )
+*> ( a 1 v5 ) ( v1 1 a )
+*> ( d 1 ) ( v1 v2 a a )
+*> ( d ) ( v1 v2 a a a )
+*>
+*> where d denotes a diagonal element of the reduced matrix, a denotes
+*> an element of the original matrix that is unchanged, and vi denotes
+*> an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n) H(n-1) . . . H(n-nb+1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
-* and tau in TAU(i-1).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-* and tau in TAU(i).
-*
-* The elements of the vectors v together form the n-by-nb matrix V
-* which is needed, with W, to apply the transformation to the unreduced
-* part of the matrix, using a symmetric rank-2k update of the form:
-* A := A - V*W**T - W*V**T.
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5 and nb = 2:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( a a a v4 v5 ) ( d )
-* ( a a v4 v5 ) ( 1 d )
-* ( a 1 v5 ) ( v1 1 a )
-* ( d 1 ) ( v1 v2 a a )
-* ( d ) ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d denotes a diagonal element of the reduced matrix, a denotes
-* an element of the original matrix that is unchanged, and vi denotes
-* an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), E( * ), TAU( * ), W( LDW, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slatrs.f b/SRC/slatrs.f
index 63e5f099..9b1116e0 100644
--- a/SRC/slatrs.f
+++ b/SRC/slatrs.f
@@ -1,10 +1,245 @@
+*> \brief \b SLATRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
+* CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, LDA, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), CNORM( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATRS solves one of the triangular systems
+*>
+*> A *x = s*b or A**T*x = s*b
+*>
+*> with scaling to prevent overflow. Here A is an upper or lower
+*> triangular matrix, A**T denotes the transpose of A, x and b are
+*> n-element vectors, and s is a scaling factor, usually less than
+*> or equal to 1, chosen so that the components of x will be less than
+*> the overflow threshold. If the unscaled problem will not cause
+*> overflow, the Level 2 BLAS routine STRSV is called. If the matrix A
+*> is singular (A(j,j) = 0 for some j), then s is set to 0 and a
+*> non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T* x = s*b (Transpose)
+*> = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max (1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s for the triangular system
+*> A * x = s*b or A**T* x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> A rough bound on x is computed; if that is less than overflow, STRSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine STRSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
+*> algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call STRSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
$ CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -15,158 +250,6 @@
REAL A( LDA, * ), CNORM( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATRS solves one of the triangular systems
-*
-* A *x = s*b or A**T*x = s*b
-*
-* with scaling to prevent overflow. Here A is an upper or lower
-* triangular matrix, A**T denotes the transpose of A, x and b are
-* n-element vectors, and s is a scaling factor, usually less than
-* or equal to 1, chosen so that the components of x will be less than
-* the overflow threshold. If the unscaled problem will not cause
-* overflow, the Level 2 BLAS routine STRSV is called. If the matrix A
-* is singular (A(j,j) = 0 for some j), then s is set to 0 and a
-* non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T* x = s*b (Transpose)
-* = 'C': Solve A**T* x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max (1,N).
-*
-* X (input/output) REAL array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) REAL
-* The scaling factor s for the triangular system
-* A * x = s*b or A**T* x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) REAL array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ======= =======
-*
-* A rough bound on x is computed; if that is less than overflow, STRSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine STRSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T*x = b. The basic
-* algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]**T * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]**T * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call STRSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slatrz.f b/SRC/slatrz.f
index 375d845c..1777d2c6 100644
--- a/SRC/slatrz.f
+++ b/SRC/slatrz.f
@@ -1,84 +1,148 @@
- SUBROUTINE SLATRZ( M, N, L, A, LDA, TAU, WORK )
+*> \brief \b SLATRZ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER L, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLATRZ( M, N, L, A, LDA, TAU, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER L, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLATRZ factors the M-by-(M+L) real upper trapezoidal matrix
-* [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z, by means
-* of orthogonal transformations. Z is an (M+L)-by-(M+L) orthogonal
-* matrix and, R and A1 are M-by-M upper triangular matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATRZ factors the M-by-(M+L) real upper trapezoidal matrix
+*> [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z, by means
+*> of orthogonal transformations. Z is an (M+L)-by-(M+L) orthogonal
+*> matrix and, R and A1 are M-by-M upper triangular matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing the
-* meaningful part of the Householder vectors. N-M >= L >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing the
+*> meaningful part of the Householder vectors. N-M >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements N-L+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> orthogonal matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements N-L+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* orthogonal matrix Z as a product of M elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAU (output) REAL array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \ingroup realOTHERcomputational
*
-* WORK (workspace) REAL array, dimension (M)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an l element vector. tau and z( k )
+*> are chosen to annihilate the elements of the kth row of A2.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A2, such that the elements of z( k ) are
+*> in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A1.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLATRZ( M, N, L, A, LDA, TAU, WORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an l element vector. tau and z( k )
-* are chosen to annihilate the elements of the kth row of A2.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A2, such that the elements of z( k ) are
-* in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A1.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER L, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slatzm.f b/SRC/slatzm.f
index ce914cb5..2594e8ec 100644
--- a/SRC/slatzm.f
+++ b/SRC/slatzm.f
@@ -1,91 +1,163 @@
- SUBROUTINE SLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE
- INTEGER INCV, LDC, M, N
- REAL TAU
-* ..
-* .. Array Arguments ..
- REAL C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b SLATZM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, LDC, M, N
+* REAL TAU
+* ..
+* .. Array Arguments ..
+* REAL C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine SORMRZ.
-*
-* SLATZM applies a Householder matrix generated by STZRQF to a matrix.
-*
-* Let P = I - tau*u*u**T, u = ( 1 ),
-* ( v )
-* where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
-* SIDE = 'R'.
-*
-* If SIDE equals 'L', let
-* C = [ C1 ] 1
-* [ C2 ] m-1
-* n
-* Then C is overwritten by P*C.
-*
-* If SIDE equals 'R', let
-* C = [ C1, C2 ] m
-* 1 n-1
-* Then C is overwritten by C*P.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine SORMRZ.
+*>
+*> SLATZM applies a Householder matrix generated by STZRQF to a matrix.
+*>
+*> Let P = I - tau*u*u**T, u = ( 1 ),
+*> ( v )
+*> where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
+*> SIDE = 'R'.
+*>
+*> If SIDE equals 'L', let
+*> C = [ C1 ] 1
+*> [ C2 ] m-1
+*> n
+*> Then C is overwritten by P*C.
+*>
+*> If SIDE equals 'R', let
+*> C = [ C1, C2 ] m
+*> 1 n-1
+*> Then C is overwritten by C*P.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': form P * C
-* = 'R': form C * P
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) REAL array, dimension
-* (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-* (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-* The vector v in the representation of P. V is not used
-* if TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0
-*
-* TAU (input) REAL
-* The value tau in the representation of P.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form P * C
+*> = 'R': form C * P
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension
+*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*> (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*> The vector v in the representation of P. V is not used
+*> if TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL
+*> The value tau in the representation of P.
+*> \endverbatim
+*>
+*> \param[in,out] C1
+*> \verbatim
+*> C1 is REAL array, dimension
+*> (LDC,N) if SIDE = 'L'
+*> (M,1) if SIDE = 'R'
+*> On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
+*> if SIDE = 'R'.
+*> \endverbatim
+*> \verbatim
+*> On exit, the first row of P*C if SIDE = 'L', or the first
+*> column of C*P if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in,out] C2
+*> \verbatim
+*> C2 is REAL array, dimension
+*> (LDC, N) if SIDE = 'L'
+*> (LDC, N-1) if SIDE = 'R'
+*> On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
+*> m x (n - 1) matrix C2 if SIDE = 'R'.
+*> \endverbatim
+*> \verbatim
+*> On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
+*> if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the arrays C1 and C2. LDC >= (1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L'
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C1 (input/output) REAL array, dimension
-* (LDC,N) if SIDE = 'L'
-* (M,1) if SIDE = 'R'
-* On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
-* if SIDE = 'R'.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, the first row of P*C if SIDE = 'L', or the first
-* column of C*P if SIDE = 'R'.
+*> \date November 2011
*
-* C2 (input/output) REAL array, dimension
-* (LDC, N) if SIDE = 'L'
-* (LDC, N-1) if SIDE = 'R'
-* On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
-* m x (n - 1) matrix C2 if SIDE = 'R'.
+*> \ingroup realOTHERcomputational
*
-* On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
-* if SIDE = 'R'.
+* =====================================================================
+ SUBROUTINE SLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the arrays C1 and C2. LDC >= (1,M).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L'
-* (M) if SIDE = 'R'
+* .. Scalar Arguments ..
+ CHARACTER SIDE
+ INTEGER INCV, LDC, M, N
+ REAL TAU
+* ..
+* .. Array Arguments ..
+ REAL C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/slauu2.f b/SRC/slauu2.f
index f4252f6a..db11bc6c 100644
--- a/SRC/slauu2.f
+++ b/SRC/slauu2.f
@@ -1,9 +1,103 @@
+*> \brief \b SLAUU2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAUU2( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAUU2 computes the product U * U**T or L**T * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
+*>
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
+*>
+*> This is the unblocked form of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the triangular factor stored in the array A
+*> is upper or lower triangular:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the triangular factor U or L. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the triangular factor U or L.
+*> On exit, if UPLO = 'U', the upper triangle of A is
+*> overwritten with the upper triangle of the product U * U**T;
+*> if UPLO = 'L', the lower triangle of A is overwritten with
+*> the lower triangle of the product L**T * L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAUU2( UPLO, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,46 +107,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAUU2 computes the product U * U**T or L**T * L, where the triangular
-* factor U or L is stored in the upper or lower triangular part of
-* the array A.
-*
-* If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
-* overwriting the factor U in A.
-* If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
-* overwriting the factor L in A.
-*
-* This is the unblocked form of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the triangular factor stored in the array A
-* is upper or lower triangular:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the triangular factor U or L. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the triangular factor U or L.
-* On exit, if UPLO = 'U', the upper triangle of A is
-* overwritten with the upper triangle of the product U * U**T;
-* if UPLO = 'L', the lower triangle of A is overwritten with
-* the lower triangle of the product L**T * L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/slauum.f b/SRC/slauum.f
index b77c0276..f7f44a39 100644
--- a/SRC/slauum.f
+++ b/SRC/slauum.f
@@ -1,9 +1,103 @@
+*> \brief \b SLAUUM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAUUM( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAUUM computes the product U * U**T or L**T * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
+*>
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
+*>
+*> This is the blocked form of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the triangular factor stored in the array A
+*> is upper or lower triangular:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the triangular factor U or L. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the triangular factor U or L.
+*> On exit, if UPLO = 'U', the upper triangle of A is
+*> overwritten with the upper triangle of the product U * U**T;
+*> if UPLO = 'L', the lower triangle of A is overwritten with
+*> the lower triangle of the product L**T * L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SLAUUM( UPLO, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,46 +107,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAUUM computes the product U * U**T or L**T * L, where the triangular
-* factor U or L is stored in the upper or lower triangular part of
-* the array A.
-*
-* If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
-* overwriting the factor U in A.
-* If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
-* overwriting the factor L in A.
-*
-* This is the blocked form of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the triangular factor stored in the array A
-* is upper or lower triangular:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the triangular factor U or L. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the triangular factor U or L.
-* On exit, if UPLO = 'U', the upper triangle of A is
-* overwritten with the upper triangle of the product U * U**T;
-* if UPLO = 'L', the lower triangle of A is overwritten with
-* the lower triangle of the product L**T * L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sopgtr.f b/SRC/sopgtr.f
index 3a29ef78..84302e4f 100644
--- a/SRC/sopgtr.f
+++ b/SRC/sopgtr.f
@@ -1,60 +1,123 @@
- SUBROUTINE SOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDQ, N
-* ..
-* .. Array Arguments ..
- REAL AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SOPGTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDQ, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SOPGTR generates a real orthogonal matrix Q which is defined as the
-* product of n-1 elementary reflectors H(i) of order n, as returned by
-* SSPTRD using packed storage:
-*
-* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SOPGTR generates a real orthogonal matrix Q which is defined as the
+*> product of n-1 elementary reflectors H(i) of order n, as returned by
+*> SSPTRD using packed storage:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular packed storage used in previous
-* call to SSPTRD;
-* = 'L': Lower triangular packed storage used in previous
-* call to SSPTRD.
-*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular packed storage used in previous
+*> call to SSPTRD;
+*> = 'L': Lower triangular packed storage used in previous
+*> call to SSPTRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The vectors which define the elementary reflectors, as
+*> returned by SSPTRD.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SSPTRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> The N-by-N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N-1)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The vectors which define the elementary reflectors, as
-* returned by SSPTRD.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SSPTRD.
+*> \date November 2011
*
-* Q (output) REAL array, dimension (LDQ,N)
-* The N-by-N orthogonal matrix Q.
+*> \ingroup realOTHERcomputational
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+* =====================================================================
+ SUBROUTINE SOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N-1)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDQ, N
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sopmtr.f b/SRC/sopmtr.f
index 9f211782..dcab5790 100644
--- a/SRC/sopmtr.f
+++ b/SRC/sopmtr.f
@@ -1,86 +1,159 @@
- SUBROUTINE SOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS, UPLO
- INTEGER INFO, LDC, M, N
-* ..
-* .. Array Arguments ..
- REAL AP( * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SOPMTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, UPLO
+* INTEGER INFO, LDC, M, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SOPMTR overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* nq-1 elementary reflectors, as returned by SSPTRD using packed
-* storage:
-*
-* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SOPMTR overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by SSPTRD using packed
+*> storage:
+*>
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular packed storage used in previous
-* call to SSPTRD;
-* = 'L': Lower triangular packed storage used in previous
-* call to SSPTRD.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular packed storage used in previous
+*> call to SSPTRD;
+*> = 'L': Lower triangular packed storage used in previous
+*> call to SSPTRD.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension
+*> (M*(M+1)/2) if SIDE = 'L'
+*> (N*(N+1)/2) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by SSPTRD. AP is modified by the routine but
+*> restored on exit.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M-1) if SIDE = 'L'
+*> or (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SSPTRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L'
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AP (input) REAL array, dimension
-* (M*(M+1)/2) if SIDE = 'L'
-* (N*(N+1)/2) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by SSPTRD. AP is modified by the routine but
-* restored on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (M-1) if SIDE = 'L'
-* or (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SSPTRD.
+*> \date November 2011
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup realOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE SOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
+ $ INFO )
*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L'
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS, UPLO
+ INTEGER INFO, LDC, M, N
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorbdb.f b/SRC/sorbdb.f
index 2ea05c38..7dc0ebc0 100644
--- a/SRC/sorbdb.f
+++ b/SRC/sorbdb.f
@@ -1,15 +1,291 @@
+*> \brief \b SORBDB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
+* X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
+* TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIGNS, TRANS
+* INTEGER INFO, LDX11, LDX12, LDX21, LDX22, LWORK, M, P,
+* $ Q
+* ..
+* .. Array Arguments ..
+* REAL PHI( * ), THETA( * )
+* REAL TAUP1( * ), TAUP2( * ), TAUQ1( * ), TAUQ2( * ),
+* $ WORK( * ), X11( LDX11, * ), X12( LDX12, * ),
+* $ X21( LDX21, * ), X22( LDX22, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORBDB simultaneously bidiagonalizes the blocks of an M-by-M
+*> partitioned orthogonal matrix X:
+*>
+*> [ B11 | B12 0 0 ]
+*> [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**T
+*> X = [-----------] = [---------] [----------------] [---------] .
+*> [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
+*> [ 0 | 0 0 I ]
+*>
+*> X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
+*> not the case, then X must be transposed and/or permuted. This can be
+*> done in constant time using the TRANS and SIGNS options. See SORCSD
+*> for details.)
+*>
+*> The orthogonal matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
+*> (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
+*> represented implicitly by Householder vectors.
+*>
+*> B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
+*> implicitly by angles THETA, PHI.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] SIGNS
+*> \verbatim
+*> SIGNS is CHARACTER
+*> = 'O': The lower-left block is made nonpositive (the
+*> "other" convention);
+*> otherwise: The upper-right block is made nonpositive (the
+*> "default" convention).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in X11 and X12. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in X11 and X21. 0 <= Q <=
+*> MIN(P,M-P,M-Q).
+*> \endverbatim
+*>
+*> \param[in,out] X11
+*> \verbatim
+*> X11 is REAL array, dimension (LDX11,Q)
+*> On entry, the top-left block of the orthogonal matrix to be
+*> reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the columns of tril(X11) specify reflectors for P1,
+*> the rows of triu(X11,1) specify reflectors for Q1;
+*> else TRANS = 'T', and
+*> the rows of triu(X11) specify reflectors for P1,
+*> the columns of tril(X11,-1) specify reflectors for Q1.
+*> \endverbatim
+*>
+*> \param[in] LDX11
+*> \verbatim
+*> LDX11 is INTEGER
+*> The leading dimension of X11. If TRANS = 'N', then LDX11 >=
+*> P; else LDX11 >= Q.
+*> \endverbatim
+*>
+*> \param[in,out] X12
+*> \verbatim
+*> X12 is REAL array, dimension (LDX12,M-Q)
+*> On entry, the top-right block of the orthogonal matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the rows of triu(X12) specify the first P reflectors for
+*> Q2;
+*> else TRANS = 'T', and
+*> the columns of tril(X12) specify the first P reflectors
+*> for Q2.
+*> \endverbatim
+*>
+*> \param[in] LDX12
+*> \verbatim
+*> LDX12 is INTEGER
+*> The leading dimension of X12. If TRANS = 'N', then LDX12 >=
+*> P; else LDX11 >= M-Q.
+*> \endverbatim
+*>
+*> \param[in,out] X21
+*> \verbatim
+*> X21 is REAL array, dimension (LDX21,Q)
+*> On entry, the bottom-left block of the orthogonal matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the columns of tril(X21) specify reflectors for P2;
+*> else TRANS = 'T', and
+*> the rows of triu(X21) specify reflectors for P2.
+*> \endverbatim
+*>
+*> \param[in] LDX21
+*> \verbatim
+*> LDX21 is INTEGER
+*> The leading dimension of X21. If TRANS = 'N', then LDX21 >=
+*> M-P; else LDX21 >= Q.
+*> \endverbatim
+*>
+*> \param[in,out] X22
+*> \verbatim
+*> X22 is REAL array, dimension (LDX22,M-Q)
+*> On entry, the bottom-right block of the orthogonal matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
+*> M-P-Q reflectors for Q2,
+*> else TRANS = 'T', and
+*> the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
+*> M-P-Q reflectors for P2.
+*> \endverbatim
+*>
+*> \param[in] LDX22
+*> \verbatim
+*> LDX22 is INTEGER
+*> The leading dimension of X22. If TRANS = 'N', then LDX22 >=
+*> M-P; else LDX22 >= M-Q.
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension (Q)
+*> The entries of the bidiagonal blocks B11, B12, B21, B22 can
+*> be computed from the angles THETA and PHI. See Further
+*> Details.
+*> \endverbatim
+*>
+*> \param[out] PHI
+*> \verbatim
+*> PHI is REAL array, dimension (Q-1)
+*> The entries of the bidiagonal blocks B11, B12, B21, B22 can
+*> be computed from the angles THETA and PHI. See Further
+*> Details.
+*> \endverbatim
+*>
+*> \param[out] TAUP1
+*> \verbatim
+*> TAUP1 is REAL array, dimension (P)
+*> The scalar factors of the elementary reflectors that define
+*> P1.
+*> \endverbatim
+*>
+*> \param[out] TAUP2
+*> \verbatim
+*> TAUP2 is REAL array, dimension (M-P)
+*> The scalar factors of the elementary reflectors that define
+*> P2.
+*> \endverbatim
+*>
+*> \param[out] TAUQ1
+*> \verbatim
+*> TAUQ1 is REAL array, dimension (Q)
+*> The scalar factors of the elementary reflectors that define
+*> Q1.
+*> \endverbatim
+*>
+*> \param[out] TAUQ2
+*> \verbatim
+*> TAUQ2 is REAL array, dimension (M-Q)
+*> The scalar factors of the elementary reflectors that define
+*> Q2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= M-Q.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The bidiagonal blocks B11, B12, B21, and B22 are represented
+*> implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
+*> PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
+*> lower bidiagonal. Every entry in each bidiagonal band is a product
+*> of a sine or cosine of a THETA with a sine or cosine of a PHI. See
+*> [1] or SORCSD for details.
+*>
+*> P1, P2, Q1, and Q2 are represented as products of elementary
+*> reflectors. See SORCSD for details on generating P1, P2, Q1, and Q2
+*> using SORGQR and SORGLQ.
+*>
+*> Reference
+*> =========
+*>
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SORBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
$ X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
$ TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.0) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIGNS, TRANS
@@ -23,169 +299,6 @@
$ X21( LDX21, * ), X22( LDX22, * )
* ..
*
-* Purpose
-* =======
-*
-* SORBDB simultaneously bidiagonalizes the blocks of an M-by-M
-* partitioned orthogonal matrix X:
-*
-* [ B11 | B12 0 0 ]
-* [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**T
-* X = [-----------] = [---------] [----------------] [---------] .
-* [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
-* [ 0 | 0 0 I ]
-*
-* X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
-* not the case, then X must be transposed and/or permuted. This can be
-* done in constant time using the TRANS and SIGNS options. See SORCSD
-* for details.)
-*
-* The orthogonal matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
-* (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
-* represented implicitly by Householder vectors.
-*
-* B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
-* implicitly by angles THETA, PHI.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* SIGNS (input) CHARACTER
-* = 'O': The lower-left block is made nonpositive (the
-* "other" convention);
-* otherwise: The upper-right block is made nonpositive (the
-* "default" convention).
-*
-* M (input) INTEGER
-* The number of rows and columns in X.
-*
-* P (input) INTEGER
-* The number of rows in X11 and X12. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in X11 and X21. 0 <= Q <=
-* MIN(P,M-P,M-Q).
-*
-* X11 (input/output) REAL array, dimension (LDX11,Q)
-* On entry, the top-left block of the orthogonal matrix to be
-* reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the columns of tril(X11) specify reflectors for P1,
-* the rows of triu(X11,1) specify reflectors for Q1;
-* else TRANS = 'T', and
-* the rows of triu(X11) specify reflectors for P1,
-* the columns of tril(X11,-1) specify reflectors for Q1.
-*
-* LDX11 (input) INTEGER
-* The leading dimension of X11. If TRANS = 'N', then LDX11 >=
-* P; else LDX11 >= Q.
-*
-* X12 (input/output) REAL array, dimension (LDX12,M-Q)
-* On entry, the top-right block of the orthogonal matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the rows of triu(X12) specify the first P reflectors for
-* Q2;
-* else TRANS = 'T', and
-* the columns of tril(X12) specify the first P reflectors
-* for Q2.
-*
-* LDX12 (input) INTEGER
-* The leading dimension of X12. If TRANS = 'N', then LDX12 >=
-* P; else LDX11 >= M-Q.
-*
-* X21 (input/output) REAL array, dimension (LDX21,Q)
-* On entry, the bottom-left block of the orthogonal matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the columns of tril(X21) specify reflectors for P2;
-* else TRANS = 'T', and
-* the rows of triu(X21) specify reflectors for P2.
-*
-* LDX21 (input) INTEGER
-* The leading dimension of X21. If TRANS = 'N', then LDX21 >=
-* M-P; else LDX21 >= Q.
-*
-* X22 (input/output) REAL array, dimension (LDX22,M-Q)
-* On entry, the bottom-right block of the orthogonal matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
-* M-P-Q reflectors for Q2,
-* else TRANS = 'T', and
-* the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
-* M-P-Q reflectors for P2.
-*
-* LDX22 (input) INTEGER
-* The leading dimension of X22. If TRANS = 'N', then LDX22 >=
-* M-P; else LDX22 >= M-Q.
-*
-* THETA (output) REAL array, dimension (Q)
-* The entries of the bidiagonal blocks B11, B12, B21, B22 can
-* be computed from the angles THETA and PHI. See Further
-* Details.
-*
-* PHI (output) REAL array, dimension (Q-1)
-* The entries of the bidiagonal blocks B11, B12, B21, B22 can
-* be computed from the angles THETA and PHI. See Further
-* Details.
-*
-* TAUP1 (output) REAL array, dimension (P)
-* The scalar factors of the elementary reflectors that define
-* P1.
-*
-* TAUP2 (output) REAL array, dimension (M-P)
-* The scalar factors of the elementary reflectors that define
-* P2.
-*
-* TAUQ1 (output) REAL array, dimension (Q)
-* The scalar factors of the elementary reflectors that define
-* Q1.
-*
-* TAUQ2 (output) REAL array, dimension (M-Q)
-* The scalar factors of the elementary reflectors that define
-* Q2.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= M-Q.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* The bidiagonal blocks B11, B12, B21, and B22 are represented
-* implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
-* PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
-* lower bidiagonal. Every entry in each bidiagonal band is a product
-* of a sine or cosine of a THETA with a sine or cosine of a PHI. See
-* [1] or SORCSD for details.
-*
-* P1, P2, Q1, and Q2 are represented as products of elementary
-* reflectors. See SORCSD for details on generating P1, P2, Q1, and Q2
-* using SORGQR and SORGLQ.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/sorcsd.f b/SRC/sorcsd.f
index 306889eb..d9a0b340 100644
--- a/SRC/sorcsd.f
+++ b/SRC/sorcsd.f
@@ -1,19 +1,268 @@
+*> \brief \b SORCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* RECURSIVE SUBROUTINE SORCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS,
+* SIGNS, M, P, Q, X11, LDX11, X12,
+* LDX12, X21, LDX21, X22, LDX22, THETA,
+* U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
+* LDV2T, WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
+* INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LDX11, LDX12,
+* $ LDX21, LDX22, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL THETA( * )
+* REAL U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * ), WORK( * ), X11( LDX11, * ),
+* $ X12( LDX12, * ), X21( LDX21, * ), X22( LDX22,
+* $ * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORCSD computes the CS decomposition of an M-by-M partitioned
+*> orthogonal matrix X:
+*>
+*> [ I 0 0 | 0 0 0 ]
+*> [ 0 C 0 | 0 -S 0 ]
+*> [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**T
+*> X = [-----------] = [---------] [---------------------] [---------] .
+*> [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
+*> [ 0 S 0 | 0 C 0 ]
+*> [ 0 0 I | 0 0 0 ]
+*>
+*> X11 is P-by-Q. The orthogonal matrices U1, U2, V1, and V2 are P-by-P,
+*> (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
+*> R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
+*> which R = MIN(P,M-P,Q,M-Q).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU1
+*> \verbatim
+*> JOBU1 is CHARACTER
+*> = 'Y': U1 is computed;
+*> otherwise: U1 is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBU2
+*> \verbatim
+*> JOBU2 is CHARACTER
+*> = 'Y': U2 is computed;
+*> otherwise: U2 is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV1T
+*> \verbatim
+*> JOBV1T is CHARACTER
+*> = 'Y': V1T is computed;
+*> otherwise: V1T is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV2T
+*> \verbatim
+*> JOBV2T is CHARACTER
+*> = 'Y': V2T is computed;
+*> otherwise: V2T is not computed.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] SIGNS
+*> \verbatim
+*> SIGNS is CHARACTER
+*> = 'O': The lower-left block is made nonpositive (the
+*> "other" convention);
+*> otherwise: The upper-right block is made nonpositive (the
+*> "default" convention).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in X11 and X12. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in X11 and X21. 0 <= Q <= M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,M)
+*> On entry, the orthogonal matrix whose CSD is desired.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X. LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension (R), in which R =
+*> MIN(P,M-P,Q,M-Q).
+*> C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
+*> S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is REAL array, dimension (P)
+*> If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1.
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
+*> MAX(1,P).
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is REAL array, dimension (M-P)
+*> If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal
+*> matrix U2.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
+*> MAX(1,M-P).
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is REAL array, dimension (Q)
+*> If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal
+*> matrix V1**T.
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
+*> MAX(1,Q).
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is REAL array, dimension (M-Q)
+*> If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal
+*> matrix V2**T.
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
+*> MAX(1,M-Q).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> If INFO > 0 on exit, WORK(2:R) contains the values PHI(1),
+*> ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
+*> define the matrix in intermediate bidiagonal-block form
+*> remaining after nonconvergence. INFO specifies the number
+*> of nonzero PHI's.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the work array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M-MIN(P, M-P, Q, M-Q))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: SBBCSD did not converge. See the description of WORK
+*> above for details.
+*> \endverbatim
+*> \verbatim
+*> Reference
+*> =========
+*> \endverbatim
+*> \verbatim
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
RECURSIVE SUBROUTINE SORCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS,
$ SIGNS, M, P, Q, X11, LDX11, X12,
$ LDX12, X21, LDX21, X22, LDX22, THETA,
$ U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
$ LDV2T, WORK, LWORK, IWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* @generated s
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
@@ -29,137 +278,6 @@
$ * )
* ..
*
-* Purpose
-* =======
-*
-* SORCSD computes the CS decomposition of an M-by-M partitioned
-* orthogonal matrix X:
-*
-* [ I 0 0 | 0 0 0 ]
-* [ 0 C 0 | 0 -S 0 ]
-* [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**T
-* X = [-----------] = [---------] [---------------------] [---------] .
-* [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
-* [ 0 S 0 | 0 C 0 ]
-* [ 0 0 I | 0 0 0 ]
-*
-* X11 is P-by-Q. The orthogonal matrices U1, U2, V1, and V2 are P-by-P,
-* (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
-* R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
-* which R = MIN(P,M-P,Q,M-Q).
-*
-* Arguments
-* =========
-*
-* JOBU1 (input) CHARACTER
-* = 'Y': U1 is computed;
-* otherwise: U1 is not computed.
-*
-* JOBU2 (input) CHARACTER
-* = 'Y': U2 is computed;
-* otherwise: U2 is not computed.
-*
-* JOBV1T (input) CHARACTER
-* = 'Y': V1T is computed;
-* otherwise: V1T is not computed.
-*
-* JOBV2T (input) CHARACTER
-* = 'Y': V2T is computed;
-* otherwise: V2T is not computed.
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* SIGNS (input) CHARACTER
-* = 'O': The lower-left block is made nonpositive (the
-* "other" convention);
-* otherwise: The upper-right block is made nonpositive (the
-* "default" convention).
-*
-* M (input) INTEGER
-* The number of rows and columns in X.
-*
-* P (input) INTEGER
-* The number of rows in X11 and X12. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in X11 and X21. 0 <= Q <= M.
-*
-* X (input/workspace) REAL array, dimension (LDX,M)
-* On entry, the orthogonal matrix whose CSD is desired.
-*
-* LDX (input) INTEGER
-* The leading dimension of X. LDX >= MAX(1,M).
-*
-* THETA (output) REAL array, dimension (R), in which R =
-* MIN(P,M-P,Q,M-Q).
-* C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
-* S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
-*
-* U1 (output) REAL array, dimension (P)
-* If JOBU1 = 'Y', U1 contains the P-by-P orthogonal matrix U1.
-*
-* LDU1 (input) INTEGER
-* The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
-* MAX(1,P).
-*
-* U2 (output) REAL array, dimension (M-P)
-* If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) orthogonal
-* matrix U2.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
-* MAX(1,M-P).
-*
-* V1T (output) REAL array, dimension (Q)
-* If JOBV1T = 'Y', V1T contains the Q-by-Q matrix orthogonal
-* matrix V1**T.
-*
-* LDV1T (input) INTEGER
-* The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
-* MAX(1,Q).
-*
-* V2T (output) REAL array, dimension (M-Q)
-* If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) orthogonal
-* matrix V2**T.
-*
-* LDV2T (input) INTEGER
-* The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
-* MAX(1,M-Q).
-*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-* If INFO > 0 on exit, WORK(2:R) contains the values PHI(1),
-* ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
-* define the matrix in intermediate bidiagonal-block form
-* remaining after nonconvergence. INFO specifies the number
-* of nonzero PHI's.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the work array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (M-MIN(P, M-P, Q, M-Q))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: SBBCSD did not converge. See the description of WORK
-* above for details.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/sorg2l.f b/SRC/sorg2l.f
index b01942b3..a3779e2e 100644
--- a/SRC/sorg2l.f
+++ b/SRC/sorg2l.f
@@ -1,60 +1,122 @@
- SUBROUTINE SORG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b SORG2L
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SORG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORG2L generates an m by n real matrix Q with orthonormal columns,
-* which is defined as the last n columns of a product of k elementary
-* reflectors of order m
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by SGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORG2L generates an m by n real matrix Q with orthonormal columns,
+*> which is defined as the last n columns of a product of k elementary
+*> reflectors of order m
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by SGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the (n-k+i)-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by SGEQLF in the last k columns of its array
+*> argument A.
+*> On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the (n-k+i)-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by SGEQLF in the last k columns of its array
-* argument A.
-* On exit, the m by n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup realOTHERcomputational
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEQLF.
+* =====================================================================
+ SUBROUTINE SORG2L( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorg2r.f b/SRC/sorg2r.f
index 4fad636a..3350f129 100644
--- a/SRC/sorg2r.f
+++ b/SRC/sorg2r.f
@@ -1,60 +1,122 @@
- SUBROUTINE SORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b SORG2R
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORG2R generates an m by n real matrix Q with orthonormal columns,
-* which is defined as the first n columns of a product of k elementary
-* reflectors of order m
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by SGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORG2R generates an m by n real matrix Q with orthonormal columns,
+*> which is defined as the first n columns of a product of k elementary
+*> reflectors of order m
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by SGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the i-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by SGEQRF in the first k columns of its array
+*> argument A.
+*> On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the i-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by SGEQRF in the first k columns of its array
-* argument A.
-* On exit, the m-by-n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup realOTHERcomputational
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEQRF.
+* =====================================================================
+ SUBROUTINE SORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorgbr.f b/SRC/sorgbr.f
index 9e070710..bc20e16c 100644
--- a/SRC/sorgbr.f
+++ b/SRC/sorgbr.f
@@ -1,9 +1,159 @@
+*> \brief \b SORGBR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER VECT
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGBR generates one of the real orthogonal matrices Q or P**T
+*> determined by SGEBRD when reducing a real matrix A to bidiagonal
+*> form: A = Q * B * P**T. Q and P**T are defined as products of
+*> elementary reflectors H(i) or G(i) respectively.
+*>
+*> If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
+*> is of order M:
+*> if m >= k, Q = H(1) H(2) . . . H(k) and SORGBR returns the first n
+*> columns of Q, where m >= n >= k;
+*> if m < k, Q = H(1) H(2) . . . H(m-1) and SORGBR returns Q as an
+*> M-by-M matrix.
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**T
+*> is of order N:
+*> if k < n, P**T = G(k) . . . G(2) G(1) and SORGBR returns the first m
+*> rows of P**T, where n >= m >= k;
+*> if k >= n, P**T = G(n-1) . . . G(2) G(1) and SORGBR returns P**T as
+*> an N-by-N matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> Specifies whether the matrix Q or the matrix P**T is
+*> required, as defined in the transformation applied by SGEBRD:
+*> = 'Q': generate Q;
+*> = 'P': generate P**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q or P**T to be returned.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q or P**T to be returned.
+*> N >= 0.
+*> If VECT = 'Q', M >= N >= min(M,K);
+*> if VECT = 'P', N >= M >= min(N,K).
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> If VECT = 'Q', the number of columns in the original M-by-K
+*> matrix reduced by SGEBRD.
+*> If VECT = 'P', the number of rows in the original K-by-N
+*> matrix reduced by SGEBRD.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by SGEBRD.
+*> On exit, the M-by-N matrix Q or P**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension
+*> (min(M,K)) if VECT = 'Q'
+*> (min(N,K)) if VECT = 'P'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i) or G(i), which determines Q or P**T, as
+*> returned by SGEBRD in its array argument TAUQ or TAUP.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,min(M,N)).
+*> For optimum performance LWORK >= min(M,N)*NB, where NB
+*> is the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realGBcomputational
+*
+* =====================================================================
SUBROUTINE SORGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER VECT
@@ -13,86 +163,6 @@
REAL A( LDA, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SORGBR generates one of the real orthogonal matrices Q or P**T
-* determined by SGEBRD when reducing a real matrix A to bidiagonal
-* form: A = Q * B * P**T. Q and P**T are defined as products of
-* elementary reflectors H(i) or G(i) respectively.
-*
-* If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
-* is of order M:
-* if m >= k, Q = H(1) H(2) . . . H(k) and SORGBR returns the first n
-* columns of Q, where m >= n >= k;
-* if m < k, Q = H(1) H(2) . . . H(m-1) and SORGBR returns Q as an
-* M-by-M matrix.
-*
-* If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**T
-* is of order N:
-* if k < n, P**T = G(k) . . . G(2) G(1) and SORGBR returns the first m
-* rows of P**T, where n >= m >= k;
-* if k >= n, P**T = G(n-1) . . . G(2) G(1) and SORGBR returns P**T as
-* an N-by-N matrix.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* Specifies whether the matrix Q or the matrix P**T is
-* required, as defined in the transformation applied by SGEBRD:
-* = 'Q': generate Q;
-* = 'P': generate P**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix Q or P**T to be returned.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q or P**T to be returned.
-* N >= 0.
-* If VECT = 'Q', M >= N >= min(M,K);
-* if VECT = 'P', N >= M >= min(N,K).
-*
-* K (input) INTEGER
-* If VECT = 'Q', the number of columns in the original M-by-K
-* matrix reduced by SGEBRD.
-* If VECT = 'P', the number of rows in the original K-by-N
-* matrix reduced by SGEBRD.
-* K >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by SGEBRD.
-* On exit, the M-by-N matrix Q or P**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (input) REAL array, dimension
-* (min(M,K)) if VECT = 'Q'
-* (min(N,K)) if VECT = 'P'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i) or G(i), which determines Q or P**T, as
-* returned by SGEBRD in its array argument TAUQ or TAUP.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,min(M,N)).
-* For optimum performance LWORK >= min(M,N)*NB, where NB
-* is the optimal blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sorghr.f b/SRC/sorghr.f
index 6de59d0d..ea7c7dd4 100644
--- a/SRC/sorghr.f
+++ b/SRC/sorghr.f
@@ -1,67 +1,133 @@
- SUBROUTINE SORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SORGHR
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORGHR generates a real orthogonal matrix Q which is defined as the
-* product of IHI-ILO elementary reflectors of order N, as returned by
-* SGEHRD:
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGHR generates a real orthogonal matrix Q which is defined as the
+*> product of IHI-ILO elementary reflectors of order N, as returned by
+*> SGEHRD:
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI must have the same values as in the previous call
-* of SGEHRD. Q is equal to the unit matrix except in the
-* submatrix Q(ilo+1:ihi,ilo+1:ihi).
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by SGEHRD.
-* On exit, the N-by-N orthogonal matrix Q.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI must have the same values as in the previous call
+*> of SGEHRD. Q is equal to the unit matrix except in the
+*> submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by SGEHRD.
+*> On exit, the N-by-N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEHRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= IHI-ILO.
+*> For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEHRD.
+*> \date November 2011
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup realOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= IHI-ILO.
-* For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE SORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorgl2.f b/SRC/sorgl2.f
index a17a315c..4acd05d5 100644
--- a/SRC/sorgl2.f
+++ b/SRC/sorgl2.f
@@ -1,59 +1,121 @@
- SUBROUTINE SORGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b SORGL2
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SORGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORGL2 generates an m by n real matrix Q with orthonormal rows,
-* which is defined as the first m rows of a product of k elementary
-* reflectors of order n
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by SGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGL2 generates an m by n real matrix Q with orthonormal rows,
+*> which is defined as the first m rows of a product of k elementary
+*> reflectors of order n
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by SGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the i-th row must contain the vector which defines
+*> the elementary reflector H(i), for i = 1,2,...,k, as returned
+*> by SGELQF in the first k rows of its array argument A.
+*> On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the i-th row must contain the vector which defines
-* the elementary reflector H(i), for i = 1,2,...,k, as returned
-* by SGELQF in the first k rows of its array argument A.
-* On exit, the m-by-n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup realOTHERcomputational
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGELQF.
+* =====================================================================
+ SUBROUTINE SORGL2( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (M)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorglq.f b/SRC/sorglq.f
index c4fc7190..2db236de 100644
--- a/SRC/sorglq.f
+++ b/SRC/sorglq.f
@@ -1,70 +1,136 @@
- SUBROUTINE SORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SORGLQ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORGLQ generates an M-by-N real matrix Q with orthonormal rows,
-* which is defined as the first M rows of a product of K elementary
-* reflectors of order N
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by SGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGLQ generates an M-by-N real matrix Q with orthonormal rows,
+*> which is defined as the first M rows of a product of K elementary
+*> reflectors of order N
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by SGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the i-th row must contain the vector which defines
-* the elementary reflector H(i), for i = 1,2,...,k, as returned
-* by SGELQF in the first k rows of its array argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the i-th row must contain the vector which defines
+*> the elementary reflector H(i), for i = 1,2,...,k, as returned
+*> by SGELQF in the first k rows of its array argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGELQF.
+*> \date November 2011
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup realOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE SORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorgql.f b/SRC/sorgql.f
index ab1b64cf..5170047c 100644
--- a/SRC/sorgql.f
+++ b/SRC/sorgql.f
@@ -1,71 +1,137 @@
- SUBROUTINE SORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SORGQL
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORGQL generates an M-by-N real matrix Q with orthonormal columns,
-* which is defined as the last N columns of a product of K elementary
-* reflectors of order M
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by SGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGQL generates an M-by-N real matrix Q with orthonormal columns,
+*> which is defined as the last N columns of a product of K elementary
+*> reflectors of order M
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by SGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the (n-k+i)-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by SGEQLF in the last k columns of its array
-* argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the (n-k+i)-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by SGEQLF in the last k columns of its array
+*> argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEQLF.
+*> \date November 2011
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup realOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE SORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorgqr.f b/SRC/sorgqr.f
index e3d35367..e15a6b8c 100644
--- a/SRC/sorgqr.f
+++ b/SRC/sorgqr.f
@@ -1,71 +1,137 @@
- SUBROUTINE SORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SORGQR
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORGQR generates an M-by-N real matrix Q with orthonormal columns,
-* which is defined as the first N columns of a product of K elementary
-* reflectors of order M
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by SGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGQR generates an M-by-N real matrix Q with orthonormal columns,
+*> which is defined as the first N columns of a product of K elementary
+*> reflectors of order M
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by SGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the i-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by SGEQRF in the first k columns of its array
-* argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the i-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by SGEQRF in the first k columns of its array
+*> argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEQRF.
+*> \date November 2011
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup realOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE SORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorgr2.f b/SRC/sorgr2.f
index fed29431..6fa3c32a 100644
--- a/SRC/sorgr2.f
+++ b/SRC/sorgr2.f
@@ -1,60 +1,122 @@
- SUBROUTINE SORGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b SORGR2
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SORGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORGR2 generates an m by n real matrix Q with orthonormal rows,
-* which is defined as the last m rows of a product of k elementary
-* reflectors of order n
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by SGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGR2 generates an m by n real matrix Q with orthonormal rows,
+*> which is defined as the last m rows of a product of k elementary
+*> reflectors of order n
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by SGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the (m-k+i)-th row must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by SGERQF in the last k rows of its array argument
+*> A.
+*> On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the (m-k+i)-th row must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by SGERQF in the last k rows of its array argument
-* A.
-* On exit, the m by n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup realOTHERcomputational
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGERQF.
+* =====================================================================
+ SUBROUTINE SORGR2( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (M)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorgrq.f b/SRC/sorgrq.f
index 5c0e03af..f85036ce 100644
--- a/SRC/sorgrq.f
+++ b/SRC/sorgrq.f
@@ -1,71 +1,137 @@
- SUBROUTINE SORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b SORGRQ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORGRQ generates an M-by-N real matrix Q with orthonormal rows,
-* which is defined as the last M rows of a product of K elementary
-* reflectors of order N
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by SGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGRQ generates an M-by-N real matrix Q with orthonormal rows,
+*> which is defined as the last M rows of a product of K elementary
+*> reflectors of order N
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by SGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the (m-k+i)-th row must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by SGERQF in the last k rows of its array argument
-* A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the (m-k+i)-th row must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by SGERQF in the last k rows of its array argument
+*> A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGERQF.
+*> \date November 2011
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup realOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE SORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorgtr.f b/SRC/sorgtr.f
index e3641843..47989fff 100644
--- a/SRC/sorgtr.f
+++ b/SRC/sorgtr.f
@@ -1,69 +1,133 @@
- SUBROUTINE SORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SORGTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORGTR generates a real orthogonal matrix Q which is defined as the
-* product of n-1 elementary reflectors of order N, as returned by
-* SSYTRD:
-*
-* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORGTR generates a real orthogonal matrix Q which is defined as the
+*> product of n-1 elementary reflectors of order N, as returned by
+*> SSYTRD:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A contains elementary reflectors
-* from SSYTRD;
-* = 'L': Lower triangle of A contains elementary reflectors
-* from SSYTRD.
-*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by SSYTRD.
-* On exit, the N-by-N orthogonal matrix Q.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A contains elementary reflectors
+*> from SSYTRD;
+*> = 'L': Lower triangle of A contains elementary reflectors
+*> from SSYTRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by SSYTRD.
+*> On exit, the N-by-N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SSYTRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N-1).
+*> For optimum performance LWORK >= (N-1)*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SSYTRD.
+*> \date November 2011
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup realOTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N-1).
-* For optimum performance LWORK >= (N-1)*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE SORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorm2l.f b/SRC/sorm2l.f
index 8723969d..689bed3b 100644
--- a/SRC/sorm2l.f
+++ b/SRC/sorm2l.f
@@ -1,92 +1,168 @@
- SUBROUTINE SORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SORM2L
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORM2L overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T * C if SIDE = 'L' and TRANS = 'T', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'T',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by SGEQLF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORM2L overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T * C if SIDE = 'L' and TRANS = 'T', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'T',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by SGEQLF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q**T (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) REAL array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* SGEQLF in the last k columns of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> SGEQLF in the last k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEQLF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEQLF.
+*> \date November 2011
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup realOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE SORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sorm2r.f b/SRC/sorm2r.f
index 33d0be9a..67ee6dab 100644
--- a/SRC/sorm2r.f
+++ b/SRC/sorm2r.f
@@ -1,92 +1,168 @@
- SUBROUTINE SORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SORM2R
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORM2R overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T* C if SIDE = 'L' and TRANS = 'T', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'T',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by SGEQRF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORM2R overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T* C if SIDE = 'L' and TRANS = 'T', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'T',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by SGEQRF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q**T (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) REAL array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* SGEQRF in the first k columns of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> SGEQRF in the first k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEQRF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEQRF.
+*> \date November 2011
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup realOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE SORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sormbr.f b/SRC/sormbr.f
index 4aeb9694..231ee2d8 100644
--- a/SRC/sormbr.f
+++ b/SRC/sormbr.f
@@ -1,10 +1,198 @@
+*> \brief \b SORMBR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
+* LDC, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, VECT
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> If VECT = 'Q', SORMBR overwrites the general real M-by-N matrix C
+*> with
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> If VECT = 'P', SORMBR overwrites the general real M-by-N matrix C
+*> with
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': P * C C * P
+*> TRANS = 'T': P**T * C C * P**T
+*>
+*> Here Q and P**T are the orthogonal matrices determined by SGEBRD when
+*> reducing a real matrix A to bidiagonal form: A = Q * B * P**T. Q and
+*> P**T are defined as products of elementary reflectors H(i) and G(i)
+*> respectively.
+*>
+*> Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
+*> order of the orthogonal matrix Q or P**T that is applied.
+*>
+*> If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
+*> if nq >= k, Q = H(1) H(2) . . . H(k);
+*> if nq < k, Q = H(1) H(2) . . . H(nq-1).
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
+*> if k < nq, P = G(1) G(2) . . . G(k);
+*> if k >= nq, P = G(1) G(2) . . . G(nq-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'Q': apply Q or Q**T;
+*> = 'P': apply P or P**T.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q, Q**T, P or P**T from the Left;
+*> = 'R': apply Q, Q**T, P or P**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q or P;
+*> = 'T': Transpose, apply Q**T or P**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> If VECT = 'Q', the number of columns in the original
+*> matrix reduced by SGEBRD.
+*> If VECT = 'P', the number of rows in the original
+*> matrix reduced by SGEBRD.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,min(nq,K)) if VECT = 'Q'
+*> (LDA,nq) if VECT = 'P'
+*> The vectors which define the elementary reflectors H(i) and
+*> G(i), whose products determine the matrices Q and P, as
+*> returned by SGEBRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If VECT = 'Q', LDA >= max(1,nq);
+*> if VECT = 'P', LDA >= max(1,min(nq,K)).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(nq,K))
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i) or G(i) which determines Q or P, as returned
+*> by SGEBRD in the array argument TAUQ or TAUP.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q
+*> or P*C or P**T*C or C*P or C*P**T.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SORMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
$ LDC, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS, VECT
@@ -15,110 +203,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* If VECT = 'Q', SORMBR overwrites the general real M-by-N matrix C
-* with
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* If VECT = 'P', SORMBR overwrites the general real M-by-N matrix C
-* with
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': P * C C * P
-* TRANS = 'T': P**T * C C * P**T
-*
-* Here Q and P**T are the orthogonal matrices determined by SGEBRD when
-* reducing a real matrix A to bidiagonal form: A = Q * B * P**T. Q and
-* P**T are defined as products of elementary reflectors H(i) and G(i)
-* respectively.
-*
-* Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
-* order of the orthogonal matrix Q or P**T that is applied.
-*
-* If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
-* if nq >= k, Q = H(1) H(2) . . . H(k);
-* if nq < k, Q = H(1) H(2) . . . H(nq-1).
-*
-* If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
-* if k < nq, P = G(1) G(2) . . . G(k);
-* if k >= nq, P = G(1) G(2) . . . G(nq-1).
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'Q': apply Q or Q**T;
-* = 'P': apply P or P**T.
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q, Q**T, P or P**T from the Left;
-* = 'R': apply Q, Q**T, P or P**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q or P;
-* = 'T': Transpose, apply Q**T or P**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* If VECT = 'Q', the number of columns in the original
-* matrix reduced by SGEBRD.
-* If VECT = 'P', the number of rows in the original
-* matrix reduced by SGEBRD.
-* K >= 0.
-*
-* A (input) REAL array, dimension
-* (LDA,min(nq,K)) if VECT = 'Q'
-* (LDA,nq) if VECT = 'P'
-* The vectors which define the elementary reflectors H(i) and
-* G(i), whose products determine the matrices Q and P, as
-* returned by SGEBRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If VECT = 'Q', LDA >= max(1,nq);
-* if VECT = 'P', LDA >= max(1,min(nq,K)).
-*
-* TAU (input) REAL array, dimension (min(nq,K))
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i) or G(i) which determines Q or P, as returned
-* by SGEBRD in the array argument TAUQ or TAUP.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q
-* or P*C or P**T*C or C*P or C*P**T.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sormhr.f b/SRC/sormhr.f
index b0ca3f64..ec2eb14c 100644
--- a/SRC/sormhr.f
+++ b/SRC/sormhr.f
@@ -1,10 +1,179 @@
+*> \brief \b SORMHR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
+* LDC, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER IHI, ILO, INFO, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMHR overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> IHI-ILO elementary reflectors, as returned by SGEHRD:
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI must have the same values as in the previous call
+*> of SGEHRD. Q is equal to the unit matrix except in the
+*> submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*> If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
+*> ILO = 1 and IHI = 0, if M = 0;
+*> if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
+*> ILO = 1 and IHI = 0, if N = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,M) if SIDE = 'L'
+*> (LDA,N) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by SGEHRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEHRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
$ LDC, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,91 +184,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SORMHR overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* IHI-ILO elementary reflectors, as returned by SGEHRD:
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI must have the same values as in the previous call
-* of SGEHRD. Q is equal to the unit matrix except in the
-* submatrix Q(ilo+1:ihi,ilo+1:ihi).
-* If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
-* ILO = 1 and IHI = 0, if M = 0;
-* if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
-* ILO = 1 and IHI = 0, if N = 0.
-*
-* A (input) REAL array, dimension
-* (LDA,M) if SIDE = 'L'
-* (LDA,N) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by SGEHRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*
-* TAU (input) REAL array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEHRD.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sorml2.f b/SRC/sorml2.f
index 6d34b62f..723a6507 100644
--- a/SRC/sorml2.f
+++ b/SRC/sorml2.f
@@ -1,92 +1,168 @@
- SUBROUTINE SORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SORML2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORML2 overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T* C if SIDE = 'L' and TRANS = 'T', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'T',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by SGELQF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORML2 overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T* C if SIDE = 'L' and TRANS = 'T', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'T',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by SGELQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q**T (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) REAL array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* SGELQF in the first k rows of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> SGELQF in the first k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGELQF.
+*> \date November 2011
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup realOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE SORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sormlq.f b/SRC/sormlq.f
index 0bb06d2f..40931ed4 100644
--- a/SRC/sormlq.f
+++ b/SRC/sormlq.f
@@ -1,10 +1,173 @@
+*> \brief \b SORMLQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMLQ overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by SGELQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> SGELQF in the first k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,88 +178,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SORMLQ overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by SGELQF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) REAL array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* SGELQF in the first k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGELQF.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sormql.f b/SRC/sormql.f
index 9fc9d303..17bfde0a 100644
--- a/SRC/sormql.f
+++ b/SRC/sormql.f
@@ -1,10 +1,173 @@
+*> \brief \b SORMQL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMQL overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by SGEQLF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> SGEQLF in the last k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEQLF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SORMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,88 +178,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SORMQL overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by SGEQLF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) REAL array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* SGEQLF in the last k columns of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEQLF.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sormqr.f b/SRC/sormqr.f
index 7f12aec6..a858d54b 100644
--- a/SRC/sormqr.f
+++ b/SRC/sormqr.f
@@ -1,10 +1,173 @@
+*> \brief \b SORMQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMQR overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by SGEQRF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> SGEQRF in the first k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGEQRF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,88 +178,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SORMQR overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by SGEQRF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) REAL array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* SGEQRF in the first k columns of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGEQRF.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sormr2.f b/SRC/sormr2.f
index 83d1cd6a..16ee134c 100644
--- a/SRC/sormr2.f
+++ b/SRC/sormr2.f
@@ -1,92 +1,168 @@
- SUBROUTINE SORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SORMR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORMR2 overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T* C if SIDE = 'L' and TRANS = 'T', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'T',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by SGERQF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMR2 overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T* C if SIDE = 'L' and TRANS = 'T', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'T',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by SGERQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q' (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) REAL array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* SGERQF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q' (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> SGERQF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGERQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGERQF.
+*> \date November 2011
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \ingroup realOTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE SORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sormr3.f b/SRC/sormr3.f
index 6fb0b147..52834072 100644
--- a/SRC/sormr3.f
+++ b/SRC/sormr3.f
@@ -1,103 +1,187 @@
- SUBROUTINE SORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, L, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SORMR3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, L, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORMR3 overwrites the general real m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**T* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**T if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by STZRZF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMR3 overwrites the general real m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**T* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**T if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by STZRZF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left
-* = 'R': apply Q or Q**T from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'T': apply Q**T (Transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing
-* the meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* A (input) REAL array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* STZRZF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by STZRZF.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left
+*> = 'R': apply Q or Q**T from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'T': apply Q**T (Transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing
+*> the meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> STZRZF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by STZRZF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, L, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sormrq.f b/SRC/sormrq.f
index 5bd8eea2..9e3ae946 100644
--- a/SRC/sormrq.f
+++ b/SRC/sormrq.f
@@ -1,10 +1,173 @@
+*> \brief \b SORMRQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMRQ overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by SGERQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> SGERQF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SGERQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SORMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -15,88 +178,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SORMRQ overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by SGERQF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) REAL array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* SGERQF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SGERQF.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sormrz.f b/SRC/sormrz.f
index 00ba7af8..3298a4c4 100644
--- a/SRC/sormrz.f
+++ b/SRC/sormrz.f
@@ -1,111 +1,199 @@
- SUBROUTINE SORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
- $ WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b SORMRZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORMRZ overwrites the general real M-by-N matrix C with
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMRZ overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by STZRZF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
+* Arguments
+* =========
*
-* where Q is a real orthogonal matrix defined as the product of k
-* elementary reflectors
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing
+*> the meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> STZRZF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by STZRZF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Q = H(1) H(2) . . . H(k)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* as returned by STZRZF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup realOTHERcomputational
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing
-* the meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* A (input) REAL array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* STZRZF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) REAL array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by STZRZF.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+ $ WORK, LWORK, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sormtr.f b/SRC/sormtr.f
index 1ddcd013..6e00c3dc 100644
--- a/SRC/sormtr.f
+++ b/SRC/sormtr.f
@@ -1,10 +1,174 @@
+*> \brief \b SORMTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, UPLO
+* INTEGER INFO, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( LDC, * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORMTR overwrites the general real M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'T': Q**T * C C * Q**T
+*>
+*> where Q is a real orthogonal matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by SSYTRD:
+*>
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**T from the Left;
+*> = 'R': apply Q or Q**T from the Right.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A contains elementary reflectors
+*> from SSYTRD;
+*> = 'L': Lower triangle of A contains elementary reflectors
+*> from SSYTRD.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'T': Transpose, apply Q**T.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA,M) if SIDE = 'L'
+*> (LDA,N) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by SSYTRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by SSYTRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SORMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS, UPLO
@@ -15,89 +179,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SORMTR overwrites the general real M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'T': Q**T * C C * Q**T
-*
-* where Q is a real orthogonal matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* nq-1 elementary reflectors, as returned by SSYTRD:
-*
-* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**T from the Left;
-* = 'R': apply Q or Q**T from the Right.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A contains elementary reflectors
-* from SSYTRD;
-* = 'L': Lower triangle of A contains elementary reflectors
-* from SSYTRD.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'T': Transpose, apply Q**T.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* A (input) REAL array, dimension
-* (LDA,M) if SIDE = 'L'
-* (LDA,N) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by SSYTRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*
-* TAU (input) REAL array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by SSYTRD.
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/spbcon.f b/SRC/spbcon.f
index 1076e759..b09a2f34 100644
--- a/SRC/spbcon.f
+++ b/SRC/spbcon.f
@@ -1,12 +1,133 @@
+*> \brief \b SPBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric positive definite band matrix using the
+*> Cholesky factorization A = U**T*U or A = L*L**T computed by SPBTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor stored in AB;
+*> = 'L': Lower triangular factor stored in AB.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T of the band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of U or L is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm (or infinity-norm) of the symmetric band matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,57 +139,6 @@
REAL AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SPBCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric positive definite band matrix using the
-* Cholesky factorization A = U**T*U or A = L*L**T computed by SPBTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor stored in AB;
-* = 'L': Lower triangular factor stored in AB.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T of the band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of U or L is
-* stored in the j-th column of the array AB as follows:
-* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* ANORM (input) REAL
-* The 1-norm (or infinity-norm) of the symmetric band matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spbequ.f b/SRC/spbequ.f
index d1de95c4..580d85b9 100644
--- a/SRC/spbequ.f
+++ b/SRC/spbequ.f
@@ -1,72 +1,139 @@
- SUBROUTINE SPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
- REAL AMAX, SCOND
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), S( * )
-* ..
-*
+*> \brief \b SPBEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* SPBEQU computes row and column scalings intended to equilibrate a
-* symmetric positive definite band matrix A and reduce its condition
-* number (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBEQU computes row and column scalings intended to equilibrate a
+*> symmetric positive definite band matrix A and reduce its condition
+*> number (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular of A is stored;
-* = 'L': Lower triangular of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular of A is stored;
+*> = 'L': Lower triangular of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KD+1.
+*> \date November 2011
*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup realOTHERcomputational
*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE SPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+ REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spbrfs.f b/SRC/spbrfs.f
index 3f33b3f1..a775aada 100644
--- a/SRC/spbrfs.f
+++ b/SRC/spbrfs.f
@@ -1,12 +1,190 @@
+*> \brief \b SPBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
+* LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive definite
+*> and banded, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is REAL array, dimension (LDAFB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T of the band matrix A as computed by
+*> SPBTRF, in the same storage format as A (see AB).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SPBTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
$ LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,91 +196,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPBRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive definite
-* and banded, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* AFB (input) REAL array, dimension (LDAFB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T of the band matrix A as computed by
-* SPBTRF, in the same storage format as A (see AB).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= KD+1.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SPBTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spbstf.f b/SRC/spbstf.f
index a7cce421..27adff37 100644
--- a/SRC/spbstf.f
+++ b/SRC/spbstf.f
@@ -1,101 +1,156 @@
- SUBROUTINE SPBSTF( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * )
-* ..
-*
+*> \brief \b SPBSTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBSTF( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* SPBSTF computes a split Cholesky factorization of a real
-* symmetric positive definite band matrix A.
-*
-* This routine is designed to be used in conjunction with SSBGST.
-*
-* The factorization has the form A = S**T*S where S is a band matrix
-* of the same bandwidth as A and the following structure:
-*
-* S = ( U )
-* ( M L )
-*
-* where U is upper triangular of order m = (n+kd)/2, and L is lower
-* triangular of order n-m.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBSTF computes a split Cholesky factorization of a real
+*> symmetric positive definite band matrix A.
+*>
+*> This routine is designed to be used in conjunction with SSBGST.
+*>
+*> The factorization has the form A = S**T*S where S is a band matrix
+*> of the same bandwidth as A and the following structure:
+*>
+*> S = ( U )
+*> ( M L )
+*>
+*> where U is upper triangular of order m = (n+kd)/2, and L is lower
+*> triangular of order n-m.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first kd+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first kd+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the factor S from the split Cholesky
-* factorization A = S**T*S. See Further Details.
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the factorization could not be completed,
-* because the updated element a(i,i) was negative; the
-* matrix A is not positive definite.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* factorization A = S**T*S. See Further Details.
+*>
+*> LDAB (input) INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the factorization could not be completed,
+*> because the updated element a(i,i) was negative; the
+*> matrix A is not positive definite.
+*>
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 7, KD = 2:
+*>
+*> S = ( s11 s12 s13 )
+*> ( s22 s23 s24 )
+*> ( s33 s34 )
+*> ( s44 )
+*> ( s53 s54 s55 )
+*> ( s64 s65 s66 )
+*> ( s75 s76 s77 )
+*>
+*> If UPLO = 'U', the array AB holds:
+*>
+*> on entry: on exit:
+*>
+*> * * a13 a24 a35 a46 a57 * * s13 s24 s53 s64 s75
+*> * a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54 s65 s76
+*> a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
+*>
+*> If UPLO = 'L', the array AB holds:
+*>
+*> on entry: on exit:
+*>
+*> a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
+*> a21 a32 a43 a54 a65 a76 * s12 s23 s34 s54 s65 s76 *
+*> a31 a42 a53 a64 a64 * * s13 s24 s53 s64 s75 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPBSTF( UPLO, N, KD, AB, LDAB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 7, KD = 2:
-*
-* S = ( s11 s12 s13 )
-* ( s22 s23 s24 )
-* ( s33 s34 )
-* ( s44 )
-* ( s53 s54 s55 )
-* ( s64 s65 s66 )
-* ( s75 s76 s77 )
-*
-* If UPLO = 'U', the array AB holds:
-*
-* on entry: on exit:
-*
-* * * a13 a24 a35 a46 a57 * * s13 s24 s53 s64 s75
-* * a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54 s65 s76
-* a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
-*
-* If UPLO = 'L', the array AB holds:
-*
-* on entry: on exit:
-*
-* a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
-* a21 a32 a43 a54 a65 a76 * s12 s23 s34 s54 s65 s76 *
-* a31 a42 a53 a64 a64 * * s13 s24 s53 s64 s75 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spbsv.f b/SRC/spbsv.f
index 8c046420..cbc1794b 100644
--- a/SRC/spbsv.f
+++ b/SRC/spbsv.f
@@ -1,104 +1,176 @@
- SUBROUTINE SPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), B( LDB, * )
-* ..
-*
+*> \brief <b> SPBSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SPBSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite band matrix and X
-* and B are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular band matrix, and L is a lower
-* triangular band matrix, with the same number of superdiagonals or
-* subdiagonals as A. The factored form of A is then used to solve the
-* system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite band matrix and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular band matrix, and L is a lower
+*> triangular band matrix, with the same number of superdiagonals or
+*> subdiagonals as A. The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
-* See below for further details.
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T of the band
-* matrix A, in the same storage format as A.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup realOTHERsolve
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* On entry: On exit:
-*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* On entry: On exit:
-*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spbsvx.f b/SRC/spbsvx.f
index 672fa6f4..48551040 100644
--- a/SRC/spbsvx.f
+++ b/SRC/spbsvx.f
@@ -1,11 +1,346 @@
+*> \brief <b> SPBSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
+* EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), S( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
+*> compute the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite band matrix and X
+*> and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular band matrix, and L is a lower
+*> triangular band matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFB contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. AB and AFB will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AFB and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFB and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array, except
+*> if FACT = 'F' and EQUED = 'Y', then A must contain the
+*> equilibrated matrix diag(S)*A*diag(S). The j-th column of A
+*> is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) REAL array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the band matrix
+*> A, in the same storage format as A (see AB). If EQUED = 'Y',
+*> then AFB is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFB is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFB is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13
+*> a22 a23 a24
+*> a33 a34 a35
+*> a44 a45 a46
+*> a55 a56
+*> (aij=conjg(aji)) a66
+*>
+*> Band storage of the upper triangle of A:
+*>
+*> * * a13 a24 a35 a46
+*> * a12 a23 a34 a45 a56
+*> a11 a22 a33 a44 a55 a66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> a11 a22 a33 a44 a55 a66
+*> a21 a32 a43 a54 a65 *
+*> a31 a42 a53 a64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
$ EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -19,225 +354,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPBSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
-* compute the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite band matrix and X
-* and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular band matrix, and L is a lower
-* triangular band matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFB contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. AB and AFB will not
-* be modified.
-* = 'N': The matrix A will be copied to AFB and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFB and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array, except
-* if FACT = 'F' and EQUED = 'Y', then A must contain the
-* equilibrated matrix diag(S)*A*diag(S). The j-th column of A
-* is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
-* See below for further details.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KD+1.
-*
-* AFB (input or output) REAL array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the band matrix
-* A, in the same storage format as A (see AB). If EQUED = 'Y',
-* then AFB is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFB is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* If FACT = 'E', then AFB is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= KD+1.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13
-* a22 a23 a24
-* a33 a34 a35
-* a44 a45 a46
-* a55 a56
-* (aij=conjg(aji)) a66
-*
-* Band storage of the upper triangle of A:
-*
-* * * a13 a24 a35 a46
-* * a12 a23 a34 a45 a56
-* a11 a22 a33 a44 a55 a66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* a11 a22 a33 a44 a55 a66
-* a21 a32 a43 a54 a65 *
-* a31 a42 a53 a64 * *
-*
-* Array elements marked * are not used by the routine.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spbtf2.f b/SRC/spbtf2.f
index 0903783e..396c65bd 100644
--- a/SRC/spbtf2.f
+++ b/SRC/spbtf2.f
@@ -1,91 +1,154 @@
- SUBROUTINE SPBTF2( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * )
-* ..
-*
+*> \brief \b SPBTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBTF2( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* SPBTF2 computes the Cholesky factorization of a real symmetric
-* positive definite band matrix A.
-*
-* The factorization has the form
-* A = U**T * U , if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix, U**T is the transpose of U, and
-* L is lower triangular.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBTF2 computes the Cholesky factorization of a real symmetric
+*> positive definite band matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U , if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix, U**T is the transpose of U, and
+*> L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite, and the factorization could not be
-* completed.
-*
-* Further Details
-* ===============
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On entry: On exit:
+*> \date November 2011
*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> \ingroup realOTHERcomputational
*
-* Similarly, if UPLO = 'L' the format of A is as follows:
*
-* On entry: On exit:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPBTF2( UPLO, N, KD, AB, LDAB, INFO )
*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spbtrf.f b/SRC/spbtrf.f
index 70317413..f465bec4 100644
--- a/SRC/spbtrf.f
+++ b/SRC/spbtrf.f
@@ -1,89 +1,152 @@
- SUBROUTINE SPBTRF( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * )
-* ..
-*
+*> \brief \b SPBTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBTRF( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* SPBTRF computes the Cholesky factorization of a real symmetric
-* positive definite band matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBTRF computes the Cholesky factorization of a real symmetric
+*> positive definite band matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T of the band
-* matrix A, in the same storage format as A.
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> Contributed by
+*> Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPBTRF( UPLO, N, KD, AB, LDAB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* On entry: On exit:
-*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* On entry: On exit:
-*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
-*
-* Array elements marked * are not used by the routine.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Contributed by
-* Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spbtrs.f b/SRC/spbtrs.f
index 48569c6e..a8542c9c 100644
--- a/SRC/spbtrs.f
+++ b/SRC/spbtrs.f
@@ -1,64 +1,130 @@
- SUBROUTINE SPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SPBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SPBTRS solves a system of linear equations A*X = B with a symmetric
-* positive definite band matrix A using the Cholesky factorization
-* A = U**T*U or A = L*L**T computed by SPBTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBTRS solves a system of linear equations A*X = B with a symmetric
+*> positive definite band matrix A using the Cholesky factorization
+*> A = U**T*U or A = L*L**T computed by SPBTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor stored in AB;
-* = 'L': Lower triangular factor stored in AB.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor stored in AB;
+*> = 'L': Lower triangular factor stored in AB.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T of the band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of U or L is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AB (input) REAL array, dimension (LDAB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T of the band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of U or L is
-* stored in the j-th column of the array AB as follows:
-* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup realOTHERcomputational
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE SPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spftrf.f b/SRC/spftrf.f
index 62f89611..083de14e 100644
--- a/SRC/spftrf.f
+++ b/SRC/spftrf.f
@@ -1,154 +1,209 @@
- SUBROUTINE SPFTRF( TRANSR, UPLO, N, A, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b SPFTRF
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER N, INFO
-* ..
-* .. Array Arguments ..
- REAL A( 0: * )
+* Definition
+* ==========
*
+* SUBROUTINE SPFTRF( TRANSR, UPLO, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+* REAL A( 0: * )
+*
* Purpose
* =======
*
-* SPFTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the block version of the algorithm, calling Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPFTRF computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the block version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'T': The Transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of RFP A is stored;
-* = 'L': Lower triangle of RFP A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension ( N*(N+1)/2 );
-* On entry, the symmetric matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
-* the transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the NT elements of
-* upper packed A. If UPLO = 'L' the RFP A contains the elements
-* of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
-* 'T'. When TRANSR is 'N' the LDA is N+1 when N is even and N
-* is odd. See the Note below for more details.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization RFP A = U**T*U or RFP A = L*L**T.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
-* Further Details
-* ===============
-*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'T': The Transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of RFP A is stored;
+*> = 'L': Lower triangle of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension ( N*(N+1)/2 );
+*> On entry, the symmetric matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
+*> the transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the NT elements of
+*> upper packed A. If UPLO = 'L' the RFP A contains the elements
+*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
+*> 'T'. When TRANSR is 'N' the LDA is N+1 when N is even and N
+*> is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization RFP A = U**T*U or RFP A = L*L**T.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
+*> \date November 2011
*
-* RFP A RFP A
+*> \ingroup realOTHERcomputational
*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPFTRF( TRANSR, UPLO, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+ REAL A( 0: * )
*
* =====================================================================
*
diff --git a/SRC/spftri.f b/SRC/spftri.f
index e840e18e..10c595e2 100644
--- a/SRC/spftri.f
+++ b/SRC/spftri.f
@@ -1,146 +1,202 @@
- SUBROUTINE SPFTRI( TRANSR, UPLO, N, A, INFO )
+*> \brief \b SPFTRI
*
-* -- LAPACK routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* .. Array Arguments ..
- REAL A( 0: * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SPFTRI( TRANSR, UPLO, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* .. Array Arguments ..
+* REAL A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* SPFTRI computes the inverse of a real (symmetric) positive definite
-* matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
-* computed by SPFTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPFTRI computes the inverse of a real (symmetric) positive definite
+*> matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
+*> computed by SPFTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'T': The Transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension ( N*(N+1)/2 )
-* On entry, the symmetric matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
-* the transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A. If UPLO = 'L' the RFP A contains the elements
-* of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
-* 'T'. When TRANSR is 'N' the LDA is N+1 when N is even and N
-* is odd. See the Note below for more details.
-*
-* On exit, the symmetric inverse of the original matrix, in the
-* same storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
-* Further Details
-* ===============
-*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'T': The Transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension ( N*(N+1)/2 )
+*> On entry, the symmetric matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
+*> the transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A. If UPLO = 'L' the RFP A contains the elements
+*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
+*> 'T'. When TRANSR is 'N' the LDA is N+1 when N is even and N
+*> is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the symmetric inverse of the original matrix, in the
+*> same storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
+*> \date November 2011
*
-* RFP A RFP A
+*> \ingroup realOTHERcomputational
*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPFTRI( TRANSR, UPLO, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* .. Array Arguments ..
+ REAL A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spftrs.f b/SRC/spftrs.f
index 95bc45b5..c3fda963 100644
--- a/SRC/spftrs.f
+++ b/SRC/spftrs.f
@@ -1,145 +1,210 @@
- SUBROUTINE SPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL A( 0: * ), B( LDB, * )
-* ..
-*
+*> \brief \b SPFTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( 0: * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SPFTRS solves a system of linear equations A*X = B with a symmetric
-* positive definite matrix A using the Cholesky factorization
-* A = U**T*U or A = L*L**T computed by SPFTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPFTRS solves a system of linear equations A*X = B with a symmetric
+*> positive definite matrix A using the Cholesky factorization
+*> A = U**T*U or A = L*L**T computed by SPFTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'T': The Transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of RFP A is stored;
-* = 'L': Lower triangle of RFP A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'T': The Transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of RFP A is stored;
+*> = 'L': Lower triangle of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension ( N*(N+1)/2 )
+*> The triangular factor U or L from the Cholesky factorization
+*> of RFP A = U**H*U or RFP A = L*L**T, as computed by SPFTRF.
+*> See note below for more details about RFP A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension ( N*(N+1)/2 )
-* The triangular factor U or L from the Cholesky factorization
-* of RFP A = U**H*U or RFP A = L*L**T, as computed by SPFTRF.
-* See note below for more details about RFP A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL A( 0: * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spocon.f b/SRC/spocon.f
index 68bfd587..eae767b2 100644
--- a/SRC/spocon.f
+++ b/SRC/spocon.f
@@ -1,12 +1,122 @@
+*> \brief \b SPOCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric positive definite matrix using the
+*> Cholesky factorization A = U**T*U or A = L*L**T computed by SPOTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm (or infinity-norm) of the symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOcomputational
+*
+* =====================================================================
SUBROUTINE SPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,49 +128,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SPOCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric positive definite matrix using the
-* Cholesky factorization A = U**T*U or A = L*L**T computed by SPOTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPOTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* ANORM (input) REAL
-* The 1-norm (or infinity-norm) of the symmetric matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spoequ.f b/SRC/spoequ.f
index 4e378301..05904a59 100644
--- a/SRC/spoequ.f
+++ b/SRC/spoequ.f
@@ -1,61 +1,121 @@
- SUBROUTINE SPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- REAL AMAX, SCOND
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), S( * )
-* ..
-*
+*> \brief \b SPOEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* SPOEQU computes row and column scalings intended to equilibrate a
-* symmetric positive definite matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOEQU computes row and column scalings intended to equilibrate a
+*> symmetric positive definite matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The N-by-N symmetric positive definite matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The N-by-N symmetric positive definite matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup realPOcomputational
*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE SPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spoequb.f b/SRC/spoequb.f
index 13b13191..26dc9186 100644
--- a/SRC/spoequb.f
+++ b/SRC/spoequb.f
@@ -1,66 +1,121 @@
- SUBROUTINE SPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- REAL AMAX, SCOND
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), S( * )
-* ..
-*
+*> \brief \b SPOEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* SPOEQU computes row and column scalings intended to equilibrate a
-* symmetric positive definite matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOEQU computes row and column scalings intended to equilibrate a
+*> symmetric positive definite matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The N-by-N symmetric positive definite matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The N-by-N symmetric positive definite matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup realPOcomputational
*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE SPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sporfs.f b/SRC/sporfs.f
index a52ae17f..ec78b382 100644
--- a/SRC/sporfs.f
+++ b/SRC/sporfs.f
@@ -1,12 +1,184 @@
+*> \brief \b SPORFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
+* LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPORFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive definite,
+*> and provides error bounds and backward error estimates for the
+*> solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SPOTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOcomputational
+*
+* =====================================================================
SUBROUTINE SPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
$ LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,88 +190,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPORFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive definite,
-* and provides error bounds and backward error estimates for the
-* solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SPOTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sporfsx.f b/SRC/sporfsx.f
index 30071016..b367d6cd 100644
--- a/SRC/sporfsx.f
+++ b/SRC/sporfsx.f
@@ -1,18 +1,415 @@
+*> \brief \b SPORFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, S, B,
+* LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* REAL S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SPORFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive
+*> definite, and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOcomputational
+*
+* =====================================================================
SUBROUTINE SPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, S, B,
$ LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,269 +425,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SPORFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive
-* definite, and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* S (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/sposv.f b/SRC/sposv.f
index 01bb1bed..8354efa7 100644
--- a/SRC/sposv.f
+++ b/SRC/sposv.f
@@ -1,9 +1,132 @@
+*> \brief <b> SPOSV computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix. The factored form of A is then used to solve the system of
+*> equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOsolve
+*
+* =====================================================================
SUBROUTINE SPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,65 +136,6 @@
REAL A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix. The factored form of A is then used to solve the system of
-* equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
-*
* =====================================================================
*
* .. External Functions ..
diff --git a/SRC/sposvx.f b/SRC/sposvx.f
index 5efffce9..56994f26 100644
--- a/SRC/sposvx.f
+++ b/SRC/sposvx.f
@@ -1,11 +1,308 @@
+*> \brief <b> SPOSVX computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
+* S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), S( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
+*> compute the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. A and AF will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A, except if FACT = 'F' and
+*> EQUED = 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced. A is not modified if
+*> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) REAL array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A. If EQUED .ne. 'N', then AF is the factored form
+*> of the equilibrated matrix diag(S)*A*diag(S).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOsolve
+*
+* =====================================================================
SUBROUTINE SPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
$ IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -19,195 +316,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
-* compute the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. A and AF will not
-* be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A, except if FACT = 'F' and
-* EQUED = 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced. A is not modified if
-* FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) REAL array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A. If EQUED .ne. 'N', then AF is the factored form
-* of the equilibrated matrix diag(S)*A*diag(S).
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the original
-* matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sposvxx.f b/SRC/sposvxx.f
index adb845c8..47c729c4 100644
--- a/SRC/sposvxx.f
+++ b/SRC/sposvxx.f
@@ -1,18 +1,518 @@
+*> \brief <b> SPOSVXX computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
+* S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* REAL S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T
+*> to compute the solution to a real system of linear equations
+*> A * X = B, where A is an N-by-N symmetric positive definite matrix
+*> and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. SPOSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> SPOSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> SPOSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what SPOSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A (see argument RCOND). If the reciprocal of the condition number
+*> is less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF contains the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A and AF are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A, except if FACT = 'F' and EQUED =
+*> 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper
+*> triangular part of A contains the upper triangular part of the
+*> matrix A, and the strictly lower triangular part of A is not
+*> referenced. If UPLO = 'L', the leading N-by-N lower triangular
+*> part of A contains the lower triangular part of the matrix A, and
+*> the strictly upper triangular part of A is not referenced. A is
+*> not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
+*> 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) REAL array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A. If EQUED .ne. 'N', then AF is the factored
+*> form of the equilibrated matrix diag(S)*A*diag(S).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The row scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOsolve
+*
+* =====================================================================
SUBROUTINE SPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,363 +528,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T
-* to compute the solution to a real system of linear equations
-* A * X = B, where A is an N-by-N symmetric positive definite matrix
-* and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. SPOSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* SPOSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* SPOSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what SPOSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A (see argument RCOND). If the reciprocal of the condition number
-* is less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF contains the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A and AF are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A, except if FACT = 'F' and EQUED =
-* 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper
-* triangular part of A contains the upper triangular part of the
-* matrix A, and the strictly lower triangular part of A is not
-* referenced. If UPLO = 'L', the leading N-by-N lower triangular
-* part of A contains the lower triangular part of the matrix A, and
-* the strictly upper triangular part of A is not referenced. A is
-* not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
-* 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) REAL array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A. If EQUED .ne. 'N', then AF is the factored
-* form of the equilibrated matrix diag(S)*A*diag(S).
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the original
-* matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The row scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/spotf2.f b/SRC/spotf2.f
index 0792a90b..ea35e187 100644
--- a/SRC/spotf2.f
+++ b/SRC/spotf2.f
@@ -1,9 +1,111 @@
+*> \brief \b SPOTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOTF2( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOTF2 computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U , if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**T *U or A = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOcomputational
+*
+* =====================================================================
SUBROUTINE SPOTF2( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,53 +115,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOTF2 computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U , if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T *U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spotrf.f b/SRC/spotrf.f
index 6d5043bd..d29eb5dc 100644
--- a/SRC/spotrf.f
+++ b/SRC/spotrf.f
@@ -1,9 +1,109 @@
+*> \brief \b SPOTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOTRF( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOTRF computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the block version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOcomputational
+*
+* =====================================================================
SUBROUTINE SPOTRF( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,51 +113,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spotri.f b/SRC/spotri.f
index c8c5c51a..159277ee 100644
--- a/SRC/spotri.f
+++ b/SRC/spotri.f
@@ -1,9 +1,96 @@
+*> \brief \b SPOTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOTRI( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOTRI computes the inverse of a real symmetric positive definite
+*> matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
+*> computed by SPOTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, as computed by
+*> SPOTRF.
+*> On exit, the upper or lower triangle of the (symmetric)
+*> inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realPOcomputational
+*
+* =====================================================================
SUBROUTINE SPOTRI( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,39 +100,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOTRI computes the inverse of a real symmetric positive definite
-* matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
-* computed by SPOTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, as computed by
-* SPOTRF.
-* On exit, the upper or lower triangle of the (symmetric)
-* inverse of A, overwriting the input factor U or L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
* =====================================================================
*
* .. External Functions ..
diff --git a/SRC/spotrs.f b/SRC/spotrs.f
index cd18ca7e..910490c5 100644
--- a/SRC/spotrs.f
+++ b/SRC/spotrs.f
@@ -1,56 +1,119 @@
- SUBROUTINE SPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SPOTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SPOTRS solves a system of linear equations A*X = B with a symmetric
-* positive definite matrix A using the Cholesky factorization
-* A = U**T*U or A = L*L**T computed by SPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOTRS solves a system of linear equations A*X = B with a symmetric
+*> positive definite matrix A using the Cholesky factorization
+*> A = U**T*U or A = L*L**T computed by SPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPOTRF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup realPOcomputational
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE SPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sppcon.f b/SRC/sppcon.f
index 59ae0e1e..deedd0e1 100644
--- a/SRC/sppcon.f
+++ b/SRC/sppcon.f
@@ -1,11 +1,119 @@
+*> \brief \b SPPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPCON( UPLO, N, AP, ANORM, RCOND, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric positive definite packed matrix using
+*> the Cholesky factorization A = U**T*U or A = L*L**T computed by
+*> SPPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, packed columnwise in a linear
+*> array. The j-th column of U or L is stored in the array AP
+*> as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm (or infinity-norm) of the symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPPCON( UPLO, N, AP, ANORM, RCOND, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,51 +125,6 @@
REAL AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SPPCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric positive definite packed matrix using
-* the Cholesky factorization A = U**T*U or A = L*L**T computed by
-* SPPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, packed columnwise in a linear
-* array. The j-th column of U or L is stored in the array AP
-* as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
-*
-* ANORM (input) REAL
-* The 1-norm (or infinity-norm) of the symmetric matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sppequ.f b/SRC/sppequ.f
index 0fea6abe..a571d614 100644
--- a/SRC/sppequ.f
+++ b/SRC/sppequ.f
@@ -1,9 +1,117 @@
+*> \brief \b SPPEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* REAL AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), S( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPEQU computes row and column scalings intended to equilibrate a
+*> symmetric positive definite matrix A in packed storage and reduce
+*> its condition number (with respect to the two-norm). S contains the
+*> scale factors, S(i)=1/sqrt(A(i,i)), chosen so that the scaled matrix
+*> B with elements B(i,j)=S(i)*A(i,j)*S(j) has ones on the diagonal.
+*> This choice of S puts the condition number of B within a factor N of
+*> the smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,53 +122,6 @@
REAL AP( * ), S( * )
* ..
*
-* Purpose
-* =======
-*
-* SPPEQU computes row and column scalings intended to equilibrate a
-* symmetric positive definite matrix A in packed storage and reduce
-* its condition number (with respect to the two-norm). S contains the
-* scale factors, S(i)=1/sqrt(A(i,i)), chosen so that the scaled matrix
-* B with elements B(i,j)=S(i)*A(i,j)*S(j) has ones on the diagonal.
-* This choice of S puts the condition number of B within a factor N of
-* the smallest possible condition number over all possible diagonal
-* scalings.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
-*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
-*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spprfs.f b/SRC/spprfs.f
index ec29836f..47cc30e9 100644
--- a/SRC/spprfs.f
+++ b/SRC/spprfs.f
@@ -1,12 +1,172 @@
+*> \brief \b SPPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
+* BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive definite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is REAL array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by SPPTRF/CPPTRF,
+*> packed columnwise in a linear array in the same format as A
+*> (see AP).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SPPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
$ BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,82 +178,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive definite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) REAL array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by SPPTRF/CPPTRF,
-* packed columnwise in a linear array in the same format as A
-* (see AP).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SPPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sppsv.f b/SRC/sppsv.f
index a91b3357..4d3cd4ba 100644
--- a/SRC/sppsv.f
+++ b/SRC/sppsv.f
@@ -1,90 +1,156 @@
- SUBROUTINE SPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> SPPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SPPSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix stored in
-* packed format and X and B are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix. The factored form of A is then used to solve the system of
-* equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix stored in
+*> packed format and X and B are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix. The factored form of A is then used to solve the system of
+*> equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup realOTHERsolve
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sppsvx.f b/SRC/sppsvx.f
index 802150db..321d047c 100644
--- a/SRC/sppsvx.f
+++ b/SRC/sppsvx.f
@@ -1,10 +1,315 @@
+*> \brief <b> SPPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
+* X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), S( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
+*> compute the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric positive definite matrix stored in
+*> packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFP contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. AP and AFP will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array, except if FACT = 'F'
+*> and EQUED = 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). The j-th column of A is stored in the
+*> array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details. A is not modified if
+*> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) REAL array, dimension
+*> (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A. If EQUED .ne. 'N', then AFP is the factored
+*> form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T * U or A = L * L**T of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFP is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T * U or A = L * L**T of the equilibrated
+*> matrix A (see the description of AP for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
$ X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -17,206 +322,6 @@
$ FERR( * ), S( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPPSVX uses the Cholesky factorization A = U**T*U or A = L*L**T to
-* compute the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric positive definite matrix stored in
-* packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFP contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. AP and AFP will not
-* be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array, except if FACT = 'F'
-* and EQUED = 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). The j-th column of A is stored in the
-* array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details. A is not modified if
-* FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* AFP (input or output) REAL array, dimension
-* (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A. If EQUED .ne. 'N', then AFP is the factored
-* form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T * U or A = L * L**T of the original
-* matrix A.
-*
-* If FACT = 'E', then AFP is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T * U or A = L * L**T of the equilibrated
-* matrix A (see the description of AP for the form of the
-* equilibrated matrix).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spptrf.f b/SRC/spptrf.f
index 5ad6f971..64c71f6f 100644
--- a/SRC/spptrf.f
+++ b/SRC/spptrf.f
@@ -1,74 +1,133 @@
- SUBROUTINE SPPTRF( UPLO, N, AP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL AP( * )
-* ..
-*
+*> \brief \b SPPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPTRF( UPLO, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * )
+* ..
+*
* Purpose
* =======
*
-* SPPTRF computes the Cholesky factorization of a real symmetric
-* positive definite matrix A stored in packed format.
-*
-* The factorization has the form
-* A = U**T * U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPTRF computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A stored in packed format.
+*>
+*> The factorization has the form
+*> A = U**T * U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**T*U or A = L*L**T, in the same
+*> storage format as A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
+*> \date November 2011
*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**T*U or A = L*L**T, in the same
-* storage format as A.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
*
* Further Details
-* ======= =======
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPPTRF( UPLO, N, AP, INFO )
*
-* Packed storage of the upper triangle of A:
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spptri.f b/SRC/spptri.f
index f7987b5d..4c88ad49 100644
--- a/SRC/spptri.f
+++ b/SRC/spptri.f
@@ -1,9 +1,95 @@
+*> \brief \b SPPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPTRI( UPLO, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPTRI computes the inverse of a real symmetric positive definite
+*> matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
+*> computed by SPPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor is stored in AP;
+*> = 'L': Lower triangular factor is stored in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, packed columnwise as
+*> a linear array. The j-th column of U or L is stored in the
+*> array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the upper or lower triangle of the (symmetric)
+*> inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPPTRI( UPLO, N, AP, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,40 +99,6 @@
REAL AP( * )
* ..
*
-* Purpose
-* =======
-*
-* SPPTRI computes the inverse of a real symmetric positive definite
-* matrix A using the Cholesky factorization A = U**T*U or A = L*L**T
-* computed by SPPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor is stored in AP;
-* = 'L': Lower triangular factor is stored in AP.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, packed columnwise as
-* a linear array. The j-th column of U or L is stored in the
-* array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
-*
-* On exit, the upper or lower triangle of the (symmetric)
-* inverse of A, overwriting the input factor U or L.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spptrs.f b/SRC/spptrs.f
index ee5f3790..8c31b054 100644
--- a/SRC/spptrs.f
+++ b/SRC/spptrs.f
@@ -1,57 +1,117 @@
- SUBROUTINE SPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b SPPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SPPTRS solves a system of linear equations A*X = B with a symmetric
-* positive definite matrix A in packed storage using the Cholesky
-* factorization A = U**T*U or A = L*L**T computed by SPPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPTRS solves a system of linear equations A*X = B with a symmetric
+*> positive definite matrix A in packed storage using the Cholesky
+*> factorization A = U**T*U or A = L*L**T computed by SPPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, packed columnwise in a linear
+*> array. The j-th column of U or L is stored in the array AP
+*> as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \date November 2011
*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, packed columnwise in a linear
-* array. The j-th column of U or L is stored in the array AP
-* as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \ingroup realOTHERcomputational
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE SPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spstf2.f b/SRC/spstf2.f
index 851e4b60..ebcb2a21 100644
--- a/SRC/spstf2.f
+++ b/SRC/spstf2.f
@@ -1,8 +1,142 @@
+*> \brief \b SPSTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* REAL TOL
+* INTEGER INFO, LDA, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), WORK( 2*N )
+* INTEGER PIV( N )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPSTF2 computes the Cholesky factorization with complete
+*> pivoting of a real symmetric positive semidefinite matrix A.
+*>
+*> The factorization has the form
+*> P**T * A * P = U**T * U , if UPLO = 'U',
+*> P**T * A * P = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular, and
+*> P is stored as vector PIV.
+*>
+*> This algorithm does not attempt to check that A is positive
+*> semidefinite. This version of the algorithm calls level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization as above.
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of A given by the number of steps the algorithm
+*> completed.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> User defined tolerance. If TOL < 0, then N*U*MAX( A( K,K ) )
+*> will be used. The algorithm terminates at the (K-1)st step
+*> if the pivot <= TOL.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> Work space.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0: If INFO = -K, the K-th argument had an illegal value,
+*> = 0: algorithm completed successfully, and
+*> > 0: the matrix A is either rank deficient with computed rank
+*> as returned in RANK, or is indefinite. See Section 7 of
+*> LAPACK Working Note #161 for further information.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
*
-* -- LAPACK PROTOTYPE routine (version 3.2.2) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL TOL
@@ -14,70 +148,6 @@
INTEGER PIV( N )
* ..
*
-* Purpose
-* =======
-*
-* SPSTF2 computes the Cholesky factorization with complete
-* pivoting of a real symmetric positive semidefinite matrix A.
-*
-* The factorization has the form
-* P**T * A * P = U**T * U , if UPLO = 'U',
-* P**T * A * P = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular, and
-* P is stored as vector PIV.
-*
-* This algorithm does not attempt to check that A is positive
-* semidefinite. This version of the algorithm calls level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization as above.
-*
-* PIV (output) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
-*
-* RANK (output) INTEGER
-* The rank of A given by the number of steps the algorithm
-* completed.
-*
-* TOL (input) REAL
-* User defined tolerance. If TOL < 0, then N*U*MAX( A( K,K ) )
-* will be used. The algorithm terminates at the (K-1)st step
-* if the pivot <= TOL.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (2*N)
-* Work space.
-*
-* INFO (output) INTEGER
-* < 0: If INFO = -K, the K-th argument had an illegal value,
-* = 0: algorithm completed successfully, and
-* > 0: the matrix A is either rank deficient with computed rank
-* as returned in RANK, or is indefinite. See Section 7 of
-* LAPACK Working Note #161 for further information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spstrf.f b/SRC/spstrf.f
index 0b70e609..35fd47d5 100644
--- a/SRC/spstrf.f
+++ b/SRC/spstrf.f
@@ -1,8 +1,142 @@
+*> \brief \b SPSTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* REAL TOL
+* INTEGER INFO, LDA, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), WORK( 2*N )
+* INTEGER PIV( N )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPSTRF computes the Cholesky factorization with complete
+*> pivoting of a real symmetric positive semidefinite matrix A.
+*>
+*> The factorization has the form
+*> P**T * A * P = U**T * U , if UPLO = 'U',
+*> P**T * A * P = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular, and
+*> P is stored as vector PIV.
+*>
+*> This algorithm does not attempt to check that A is positive
+*> semidefinite. This version of the algorithm calls level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization as above.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of A given by the number of steps the algorithm
+*> completed.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> User defined tolerance. If TOL < 0, then N*U*MAX( A(K,K) )
+*> will be used. The algorithm terminates at the (K-1)st step
+*> if the pivot <= TOL.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> Work space.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0: If INFO = -K, the K-th argument had an illegal value,
+*> = 0: algorithm completed successfully, and
+*> > 0: the matrix A is either rank deficient with computed rank
+*> as returned in RANK, or is indefinite. See Section 7 of
+*> LAPACK Working Note #161 for further information.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL TOL
@@ -14,70 +148,6 @@
INTEGER PIV( N )
* ..
*
-* Purpose
-* =======
-*
-* SPSTRF computes the Cholesky factorization with complete
-* pivoting of a real symmetric positive semidefinite matrix A.
-*
-* The factorization has the form
-* P**T * A * P = U**T * U , if UPLO = 'U',
-* P**T * A * P = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular, and
-* P is stored as vector PIV.
-*
-* This algorithm does not attempt to check that A is positive
-* semidefinite. This version of the algorithm calls level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization as above.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* PIV (output) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
-*
-* RANK (output) INTEGER
-* The rank of A given by the number of steps the algorithm
-* completed.
-*
-* TOL (input) REAL
-* User defined tolerance. If TOL < 0, then N*U*MAX( A(K,K) )
-* will be used. The algorithm terminates at the (K-1)st step
-* if the pivot <= TOL.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-* Work space.
-*
-* INFO (output) INTEGER
-* < 0: If INFO = -K, the K-th argument had an illegal value,
-* = 0: algorithm completed successfully, and
-* > 0: the matrix A is either rank deficient with computed rank
-* as returned in RANK, or is indefinite. See Section 7 of
-* LAPACK Working Note #161 for further information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sptcon.f b/SRC/sptcon.f
index 05b88449..b871b796 100644
--- a/SRC/sptcon.f
+++ b/SRC/sptcon.f
@@ -1,64 +1,129 @@
- SUBROUTINE SPTCON( N, D, E, ANORM, RCOND, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- REAL ANORM, RCOND
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * ), WORK( * )
-* ..
-*
+*> \brief \b SPTCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTCON( N, D, E, ANORM, RCOND, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SPTCON computes the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric positive definite tridiagonal matrix
-* using the factorization A = L*D*L**T or A = U**T*D*U computed by
-* SPTTRF.
-*
-* Norm(inv(A)) is computed by a direct method, and the reciprocal of
-* the condition number is computed as
-* RCOND = 1 / (ANORM * norm(inv(A))).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTCON computes the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric positive definite tridiagonal matrix
+*> using the factorization A = L*D*L**T or A = U**T*D*U computed by
+*> SPTTRF.
+*>
+*> Norm(inv(A)) is computed by a direct method, and the reciprocal of
+*> the condition number is computed as
+*> RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization of A, as computed by SPTTRF.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) off-diagonal elements of the unit bidiagonal factor
-* U or L from the factorization of A, as computed by SPTTRF.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization of A, as computed by SPTTRF.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the unit bidiagonal factor
+*> U or L from the factorization of A, as computed by SPTTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the
+*> 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ANORM (input) REAL
-* The 1-norm of the original matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the
-* 1-norm of inv(A) computed in this routine.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (N)
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The method used is described in Nicholas J. Higham, "Efficient
+*> Algorithms for Computing the Condition Number of a Tridiagonal
+*> Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SPTCON( N, D, E, ANORM, RCOND, WORK, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* The method used is described in Nicholas J. Higham, "Efficient
-* Algorithms for Computing the Condition Number of a Tridiagonal
-* Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/spteqr.f b/SRC/spteqr.f
index 3407e44d..4f8fd565 100644
--- a/SRC/spteqr.f
+++ b/SRC/spteqr.f
@@ -1,9 +1,146 @@
+*> \brief \b SPTEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric positive definite tridiagonal matrix by first factoring the
+*> matrix using SPTTRF, and then calling SBDSQR to compute the singular
+*> values of the bidiagonal factor.
+*>
+*> This routine computes the eigenvalues of the positive definite
+*> tridiagonal matrix to high relative accuracy. This means that if the
+*> eigenvalues range over many orders of magnitude in size, then the
+*> small eigenvalues and corresponding eigenvectors will be computed
+*> more accurately than, for example, with the standard QR method.
+*>
+*> The eigenvectors of a full or band symmetric positive definite matrix
+*> can also be found if SSYTRD, SSPTRD, or SSBTRD has been used to
+*> reduce this matrix to tridiagonal form. (The reduction to tridiagonal
+*> form, however, may preclude the possibility of obtaining high
+*> relative accuracy in the small eigenvalues of the original matrix, if
+*> these eigenvalues range over many orders of magnitude.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'V': Compute eigenvectors of original symmetric
+*> matrix also. Array Z contains the orthogonal
+*> matrix used to reduce the original matrix to
+*> tridiagonal form.
+*> = 'I': Compute eigenvectors of tridiagonal matrix also.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal
+*> matrix.
+*> On normal exit, D contains the eigenvalues, in descending
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the orthogonal matrix used in the
+*> reduction to tridiagonal form.
+*> On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
+*> original symmetric matrix;
+*> if COMPZ = 'I', the orthonormal eigenvectors of the
+*> tridiagonal matrix.
+*> If INFO > 0 on exit, Z contains the eigenvectors associated
+*> with only the stored eigenvalues.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> COMPZ = 'V' or 'I', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is:
+*> <= N the Cholesky factorization of the matrix could
+*> not be performed because the i-th principal minor
+*> was not positive definite.
+*> > N the SVD algorithm failed to converge;
+*> if INFO = N+i, i off-diagonal elements of the
+*> bidiagonal factor did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -13,80 +150,6 @@
REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SPTEQR computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric positive definite tridiagonal matrix by first factoring the
-* matrix using SPTTRF, and then calling SBDSQR to compute the singular
-* values of the bidiagonal factor.
-*
-* This routine computes the eigenvalues of the positive definite
-* tridiagonal matrix to high relative accuracy. This means that if the
-* eigenvalues range over many orders of magnitude in size, then the
-* small eigenvalues and corresponding eigenvectors will be computed
-* more accurately than, for example, with the standard QR method.
-*
-* The eigenvectors of a full or band symmetric positive definite matrix
-* can also be found if SSYTRD, SSPTRD, or SSBTRD has been used to
-* reduce this matrix to tridiagonal form. (The reduction to tridiagonal
-* form, however, may preclude the possibility of obtaining high
-* relative accuracy in the small eigenvalues of the original matrix, if
-* these eigenvalues range over many orders of magnitude.)
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'V': Compute eigenvectors of original symmetric
-* matrix also. Array Z contains the orthogonal
-* matrix used to reduce the original matrix to
-* tridiagonal form.
-* = 'I': Compute eigenvectors of tridiagonal matrix also.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal
-* matrix.
-* On normal exit, D contains the eigenvalues, in descending
-* order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) REAL array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the orthogonal matrix used in the
-* reduction to tridiagonal form.
-* On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
-* original symmetric matrix;
-* if COMPZ = 'I', the orthonormal eigenvectors of the
-* tridiagonal matrix.
-* If INFO > 0 on exit, Z contains the eigenvectors associated
-* with only the stored eigenvalues.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* COMPZ = 'V' or 'I', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is:
-* <= N the Cholesky factorization of the matrix could
-* not be performed because the i-th principal minor
-* was not positive definite.
-* > N the SVD algorithm failed to converge;
-* if INFO = N+i, i off-diagonal elements of the
-* bidiagonal factor did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sptrfs.f b/SRC/sptrfs.f
index 062ae2d1..74a399fa 100644
--- a/SRC/sptrfs.f
+++ b/SRC/sptrfs.f
@@ -1,10 +1,164 @@
+*> \brief \b SPTRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTRFS( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR,
+* BERR, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), BERR( * ), D( * ), DF( * ),
+* $ E( * ), EF( * ), FERR( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive definite
+*> and tridiagonal, and provides error bounds and backward error
+*> estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization computed by SPTTRF.
+*> \endverbatim
+*>
+*> \param[in] EF
+*> \verbatim
+*> EF is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal factor
+*> L from the factorization computed by SPTTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SPTTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPTRFS( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR,
$ BERR, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDB, LDX, N, NRHS
@@ -15,75 +169,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPTRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive definite
-* and tridiagonal, and provides error bounds and backward error
-* estimates for the solution.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* DF (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization computed by SPTTRF.
-*
-* EF (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal factor
-* L from the factorization computed by SPTTRF.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SPTTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sptsv.f b/SRC/sptsv.f
index e4cbb38b..a5fdbec8 100644
--- a/SRC/sptsv.f
+++ b/SRC/sptsv.f
@@ -1,9 +1,115 @@
+*> \brief \b SPTSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTSV( N, NRHS, D, E, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), D( * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTSV computes the solution to a real system of linear equations
+*> A*X = B, where A is an N-by-N symmetric positive definite tridiagonal
+*> matrix, and X and B are N-by-NRHS matrices.
+*>
+*> A is factored as A = L*D*L**T, and the factored form of A is then
+*> used to solve the system of equations.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A. On exit, the n diagonal elements of the diagonal matrix
+*> D from the factorization A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A. On exit, the (n-1) subdiagonal elements of the
+*> unit bidiagonal factor L from the L*D*L**T factorization of
+*> A. (E can also be regarded as the superdiagonal of the unit
+*> bidiagonal factor U from the U**T*D*U factorization of A.)
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the solution has not been
+*> computed. The factorization has not been completed
+*> unless i = N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPTSV( N, NRHS, D, E, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDB, N, NRHS
@@ -12,53 +118,6 @@
REAL B( LDB, * ), D( * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* SPTSV computes the solution to a real system of linear equations
-* A*X = B, where A is an N-by-N symmetric positive definite tridiagonal
-* matrix, and X and B are N-by-NRHS matrices.
-*
-* A is factored as A = L*D*L**T, and the factored form of A is then
-* used to solve the system of equations.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A. On exit, the n diagonal elements of the diagonal matrix
-* D from the factorization A = L*D*L**T.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A. On exit, the (n-1) subdiagonal elements of the
-* unit bidiagonal factor L from the L*D*L**T factorization of
-* A. (E can also be regarded as the superdiagonal of the unit
-* bidiagonal factor U from the U**T*D*U factorization of A.)
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the solution has not been
-* computed. The factorization has not been completed
-* unless i = N.
-*
* =====================================================================
*
* .. External Subroutines ..
diff --git a/SRC/sptsvx.f b/SRC/sptsvx.f
index c81f77a4..0986e583 100644
--- a/SRC/sptsvx.f
+++ b/SRC/sptsvx.f
@@ -1,10 +1,226 @@
+*> \brief \b SPTSVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
+* RCOND, FERR, BERR, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), BERR( * ), D( * ), DF( * ),
+* $ E( * ), EF( * ), FERR( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTSVX uses the factorization A = L*D*L**T to compute the solution
+*> to a real system of linear equations A*X = B, where A is an N-by-N
+*> symmetric positive definite tridiagonal matrix and X and B are
+*> N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the matrix A is factored as A = L*D*L**T, where L
+*> is a unit lower bidiagonal matrix and D is diagonal. The
+*> factorization can also be regarded as having the form
+*> A = U**T*D*U.
+*>
+*> 2. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, DF and EF contain the factored form of A.
+*> D, E, DF, and EF will not be modified.
+*> = 'N': The matrix A will be copied to DF and EF and
+*> factored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] DF
+*> \verbatim
+*> DF is or output) REAL array, dimension (N)
+*> If FACT = 'F', then DF is an input argument and on entry
+*> contains the n diagonal elements of the diagonal matrix D
+*> from the L*D*L**T factorization of A.
+*> If FACT = 'N', then DF is an output argument and on exit
+*> contains the n diagonal elements of the diagonal matrix D
+*> from the L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] EF
+*> \verbatim
+*> EF is or output) REAL array, dimension (N-1)
+*> If FACT = 'F', then EF is an input argument and on entry
+*> contains the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the L*D*L**T factorization of A.
+*> If FACT = 'N', then EF is an output argument and on exit
+*> contains the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 of INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal condition number of the matrix A. If RCOND
+*> is less than the machine precision (in particular, if
+*> RCOND = 0), the matrix is singular to working precision.
+*> This condition is indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in any
+*> element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
$ RCOND, FERR, BERR, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT
@@ -17,131 +233,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPTSVX uses the factorization A = L*D*L**T to compute the solution
-* to a real system of linear equations A*X = B, where A is an N-by-N
-* symmetric positive definite tridiagonal matrix and X and B are
-* N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the matrix A is factored as A = L*D*L**T, where L
-* is a unit lower bidiagonal matrix and D is diagonal. The
-* factorization can also be regarded as having the form
-* A = U**T*D*U.
-*
-* 2. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, DF and EF contain the factored form of A.
-* D, E, DF, and EF will not be modified.
-* = 'N': The matrix A will be copied to DF and EF and
-* factored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* DF (input or output) REAL array, dimension (N)
-* If FACT = 'F', then DF is an input argument and on entry
-* contains the n diagonal elements of the diagonal matrix D
-* from the L*D*L**T factorization of A.
-* If FACT = 'N', then DF is an output argument and on exit
-* contains the n diagonal elements of the diagonal matrix D
-* from the L*D*L**T factorization of A.
-*
-* EF (input or output) REAL array, dimension (N-1)
-* If FACT = 'F', then EF is an input argument and on entry
-* contains the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the L*D*L**T factorization of A.
-* If FACT = 'N', then EF is an output argument and on exit
-* contains the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the L*D*L**T factorization of A.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 of INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The reciprocal condition number of the matrix A. If RCOND
-* is less than the machine precision (in particular, if
-* RCOND = 0), the matrix is singular to working precision.
-* This condition is indicated by a return code of INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j).
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in any
-* element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spttrf.f b/SRC/spttrf.f
index 180ab89d..f69655e3 100644
--- a/SRC/spttrf.f
+++ b/SRC/spttrf.f
@@ -1,9 +1,92 @@
+*> \brief \b SPTTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTTRF( N, D, E, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTTRF computes the L*D*L**T factorization of a real symmetric
+*> positive definite tridiagonal matrix A. The factorization may also
+*> be regarded as having the form A = U**T*D*U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A. On exit, the n diagonal elements of the diagonal matrix
+*> D from the L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A. On exit, the (n-1) subdiagonal elements of the
+*> unit bidiagonal factor L from the L*D*L**T factorization of A.
+*> E can also be regarded as the superdiagonal of the unit
+*> bidiagonal factor U from the U**T*D*U factorization of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite; if k < N, the factorization could not
+*> be completed, while if k = N, the factorization was
+*> completed, but D(N) <= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SPTTRF( N, D, E, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, N
@@ -12,39 +95,6 @@
REAL D( * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* SPTTRF computes the L*D*L**T factorization of a real symmetric
-* positive definite tridiagonal matrix A. The factorization may also
-* be regarded as having the form A = U**T*D*U.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A. On exit, the n diagonal elements of the diagonal matrix
-* D from the L*D*L**T factorization of A.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A. On exit, the (n-1) subdiagonal elements of the
-* unit bidiagonal factor L from the L*D*L**T factorization of A.
-* E can also be regarded as the superdiagonal of the unit
-* bidiagonal factor U from the U**T*D*U factorization of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite; if k < N, the factorization could not
-* be completed, while if k = N, the factorization was
-* completed, but D(N) <= 0.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/spttrs.f b/SRC/spttrs.f
index b71c1bfa..6faff0e1 100644
--- a/SRC/spttrs.f
+++ b/SRC/spttrs.f
@@ -1,58 +1,117 @@
- SUBROUTINE SPTTRS( N, NRHS, D, E, B, LDB, INFO )
+*> \brief \b SPTTRS
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL B( LDB, * ), D( * ), E( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTTRS( N, NRHS, D, E, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), D( * ), E( * )
+* ..
+*
* Purpose
* =======
*
-* SPTTRS solves a tridiagonal system of the form
-* A * X = B
-* using the L*D*L**T factorization of A computed by SPTTRF. D is a
-* diagonal matrix specified in the vector D, L is a unit bidiagonal
-* matrix whose subdiagonal is specified in the vector E, and X and B
-* are N by NRHS matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTTRS solves a tridiagonal system of the form
+*> A * X = B
+*> using the L*D*L**T factorization of A computed by SPTTRF. D is a
+*> diagonal matrix specified in the vector D, L is a unit bidiagonal
+*> matrix whose subdiagonal is specified in the vector E, and X and B
+*> are N by NRHS matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the tridiagonal matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal factor
+*> L from the L*D*L**T factorization of A. E can also be regarded
+*> as the superdiagonal of the unit bidiagonal factor U from the
+*> factorization A = U**T*D*U.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors B for the system of
+*> linear equations.
+*> On exit, the solution vectors, X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* L*D*L**T factorization of A.
+*> \date November 2011
*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal factor
-* L from the L*D*L**T factorization of A. E can also be regarded
-* as the superdiagonal of the unit bidiagonal factor U from the
-* factorization A = U**T*D*U.
+*> \ingroup realOTHERcomputational
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors B for the system of
-* linear equations.
-* On exit, the solution vectors, X.
+* =====================================================================
+ SUBROUTINE SPTTRS( N, NRHS, D, E, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL B( LDB, * ), D( * ), E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sptts2.f b/SRC/sptts2.f
index 4022c462..0e1d89d6 100644
--- a/SRC/sptts2.f
+++ b/SRC/sptts2.f
@@ -1,54 +1,110 @@
- SUBROUTINE SPTTS2( N, NRHS, D, E, B, LDB )
+*> \brief \b SPTTS2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL B( LDB, * ), D( * ), E( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTTS2( N, NRHS, D, E, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), D( * ), E( * )
+* ..
+*
* Purpose
* =======
*
-* SPTTS2 solves a tridiagonal system of the form
-* A * X = B
-* using the L*D*L**T factorization of A computed by SPTTRF. D is a
-* diagonal matrix specified in the vector D, L is a unit bidiagonal
-* matrix whose subdiagonal is specified in the vector E, and X and B
-* are N by NRHS matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTTS2 solves a tridiagonal system of the form
+*> A * X = B
+*> using the L*D*L**T factorization of A computed by SPTTRF. D is a
+*> diagonal matrix specified in the vector D, L is a unit bidiagonal
+*> matrix whose subdiagonal is specified in the vector E, and X and B
+*> are N by NRHS matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the tridiagonal matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> L*D*L**T factorization of A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal factor
+*> L from the L*D*L**T factorization of A. E can also be regarded
+*> as the superdiagonal of the unit bidiagonal factor U from the
+*> factorization A = U**T*D*U.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors B for the system of
+*> linear equations.
+*> On exit, the solution vectors, X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \date November 2011
*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* L*D*L**T factorization of A.
+*> \ingroup realOTHERcomputational
*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal factor
-* L from the L*D*L**T factorization of A. E can also be regarded
-* as the superdiagonal of the unit bidiagonal factor U from the
-* factorization A = U**T*D*U.
+* =====================================================================
+ SUBROUTINE SPTTS2( N, NRHS, D, E, B, LDB )
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors B for the system of
-* linear equations.
-* On exit, the solution vectors, X.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL B( LDB, * ), D( * ), E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/srscl.f b/SRC/srscl.f
index 272a5614..c023ce3c 100644
--- a/SRC/srscl.f
+++ b/SRC/srscl.f
@@ -1,9 +1,85 @@
+*> \brief \b SRSCL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SRSCL( N, SA, SX, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* REAL SA
+* ..
+* .. Array Arguments ..
+* REAL SX( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SRSCL multiplies an n-element real vector x by the real scalar 1/a.
+*> This is done without overflow or underflow as long as
+*> the final result x/a does not overflow or underflow.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of components of the vector x.
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*> SA is REAL
+*> The scalar a which is used to divide each component of x.
+*> SA must be >= 0, or the subroutine will divide by zero.
+*> \endverbatim
+*>
+*> \param[in,out] SX
+*> \verbatim
+*> SX is REAL array, dimension
+*> (1+(N-1)*abs(INCX))
+*> The n-element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of the vector SX.
+*> > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+* =====================================================================
SUBROUTINE SRSCL( N, SA, SX, INCX )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,31 +89,6 @@
REAL SX( * )
* ..
*
-* Purpose
-* =======
-*
-* SRSCL multiplies an n-element real vector x by the real scalar 1/a.
-* This is done without overflow or underflow as long as
-* the final result x/a does not overflow or underflow.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of components of the vector x.
-*
-* SA (input) REAL
-* The scalar a which is used to divide each component of x.
-* SA must be >= 0, or the subroutine will divide by zero.
-*
-* SX (input/output) REAL array, dimension
-* (1+(N-1)*abs(INCX))
-* The n-element vector x.
-*
-* INCX (input) INTEGER
-* The increment between successive values of the vector SX.
-* > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssbev.f b/SRC/ssbev.f
index 3fea8fb1..95a3309c 100644
--- a/SRC/ssbev.f
+++ b/SRC/ssbev.f
@@ -1,10 +1,148 @@
+*> \brief <b> SSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KD, LDAB, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBEV computes all the eigenvalues and, optionally, eigenvectors of
+*> a real symmetric band matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (max(1,3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -14,70 +152,6 @@
REAL AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSBEV computes all the eigenvalues and, optionally, eigenvectors of
-* a real symmetric band matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (max(1,3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssbevd.f b/SRC/ssbevd.f
index 0be71686..26632805 100644
--- a/SRC/ssbevd.f
+++ b/SRC/ssbevd.f
@@ -1,10 +1,197 @@
+*> \brief <b> SSBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
+* LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KD, LDAB, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBEVD computes all the eigenvalues and, optionally, eigenvectors of
+*> a real symmetric band matrix A. If eigenvectors are desired, it uses
+*> a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array,
+*> dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> IF N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 2, LWORK must be at least 2*N.
+*> If JOBZ = 'V' and N > 2, LWORK must be at least
+*> ( 1 + 5*N + 2*N**2 ).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array LIWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 2, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
$ LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,107 +202,6 @@
REAL AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSBEVD computes all the eigenvalues and, optionally, eigenvectors of
-* a real symmetric band matrix A. If eigenvectors are desired, it uses
-* a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array,
-* dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* IF N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 2, LWORK must be at least 2*N.
-* If JOBZ = 'V' and N > 2, LWORK must be at least
-* ( 1 + 5*N + 2*N**2 ).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array LIWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 2, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssbevx.f b/SRC/ssbevx.f
index 58130b52..a3fcd94f 100644
--- a/SRC/ssbevx.f
+++ b/SRC/ssbevx.f
@@ -1,11 +1,264 @@
+*> \brief <b> SSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
+* VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
+* IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL AB( LDAB, * ), Q( LDQ, * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric band matrix A. Eigenvalues and eigenvectors can
+*> be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, N)
+*> If JOBZ = 'V', the N-by-N orthogonal matrix used in the
+*> reduction to tridiagonal form.
+*> If JOBZ = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If JOBZ = 'V', then
+*> LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AB to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
$ VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
$ IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,144 +271,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSBEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric band matrix A. Eigenvalues and eigenvectors can
-* be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* Q (output) REAL array, dimension (LDQ, N)
-* If JOBZ = 'V', the N-by-N orthogonal matrix used in the
-* reduction to tridiagonal form.
-* If JOBZ = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If JOBZ = 'V', then
-* LDQ >= max(1,N).
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AB to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssbgst.f b/SRC/ssbgst.f
index b33522e3..9669720d 100644
--- a/SRC/ssbgst.f
+++ b/SRC/ssbgst.f
@@ -1,10 +1,161 @@
+*> \brief \b SSBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
+* LDX, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, VECT
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDX, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBGST reduces a real symmetric-definite banded generalized
+*> eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y,
+*> such that C has the same bandwidth as A.
+*>
+*> B must have been previously factorized as S**T*S by SPBSTF, using a
+*> split Cholesky factorization. A is overwritten by C = X**T*A*X, where
+*> X = S**(-1)*Q and Q is an orthogonal matrix chosen to preserve the
+*> bandwidth of A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'N': do not form the transformation matrix X;
+*> = 'V': form X.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the transformed matrix X**T*A*X, stored in the same
+*> format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in] BB
+*> \verbatim
+*> BB is REAL array, dimension (LDBB,N)
+*> The banded factor S from the split Cholesky factorization of
+*> B, as returned by SPBSTF, stored in the first KB+1 rows of
+*> the array.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,N)
+*> If VECT = 'V', the n-by-n matrix X.
+*> If VECT = 'N', the array X is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> LDX >= max(1,N) if VECT = 'V'; LDX >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SSBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
$ LDX, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO, VECT
@@ -15,76 +166,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SSBGST reduces a real symmetric-definite banded generalized
-* eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y,
-* such that C has the same bandwidth as A.
-*
-* B must have been previously factorized as S**T*S by SPBSTF, using a
-* split Cholesky factorization. A is overwritten by C = X**T*A*X, where
-* X = S**(-1)*Q and Q is an orthogonal matrix chosen to preserve the
-* bandwidth of A.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'N': do not form the transformation matrix X;
-* = 'V': form X.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= KB >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the transformed matrix X**T*A*X, stored in the same
-* format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input) REAL array, dimension (LDBB,N)
-* The banded factor S from the split Cholesky factorization of
-* B, as returned by SPBSTF, stored in the first KB+1 rows of
-* the array.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* X (output) REAL array, dimension (LDX,N)
-* If VECT = 'V', the n-by-n matrix X.
-* If VECT = 'N', the array X is not referenced.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
-* LDX >= max(1,N) if VECT = 'V'; LDX >= 1 otherwise.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssbgv.f b/SRC/ssbgv.f
index a2af0398..6f607fa3 100644
--- a/SRC/ssbgv.f
+++ b/SRC/ssbgv.f
@@ -1,10 +1,180 @@
+*> \brief \b SSBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
+* LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), BB( LDBB, * ), W( * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBGV computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
+*> and banded, and B is also positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is REAL array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**T*S, as returned by SPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so that Z**T*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: the algorithm failed to converge:
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then SPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
$ LDZ, WORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,91 +185,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSBGV computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
-* and banded, and B is also positive definite.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) REAL array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**T*S, as returned by SPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so that Z**T*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= N.
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: the algorithm failed to converge:
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then SPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/ssbgvd.f b/SRC/ssbgvd.f
index e0d83be2..c5f6784e 100644
--- a/SRC/ssbgvd.f
+++ b/SRC/ssbgvd.f
@@ -1,10 +1,238 @@
+*> \brief \b SSBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
+* Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AB( LDAB, * ), BB( LDBB, * ), W( * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite banded eigenproblem, of the
+*> form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric and
+*> banded, and B is also positive definite. If eigenvectors are
+*> desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is REAL array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**T*S, as returned by SPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so Z**T*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= 3*N.
+*> If JOBZ = 'V' and N > 1, LWORK >= 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if LIWORK > 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: the algorithm failed to converge:
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then SPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
$ Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,132 +244,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSBGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite banded eigenproblem, of the
-* form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric and
-* banded, and B is also positive definite. If eigenvectors are
-* desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) REAL array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**T*S, as returned by SPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so Z**T*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= 3*N.
-* If JOBZ = 'V' and N > 1, LWORK >= 1 + 5*N + 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if LIWORK > 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: the algorithm failed to converge:
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then SPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssbgvx.f b/SRC/ssbgvx.f
index 6faaf8e8..aeccceb5 100644
--- a/SRC/ssbgvx.f
+++ b/SRC/ssbgvx.f
@@ -1,11 +1,293 @@
+*> \brief \b SSBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
+* LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
+* LDZ, WORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, KA, KB, LDAB, LDBB, LDQ, LDZ, M,
+* $ N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL AB( LDAB, * ), BB( LDBB, * ), Q( LDQ, * ),
+* $ W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBGVX computes selected eigenvalues, and optionally, eigenvectors
+*> of a real generalized symmetric-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
+*> and banded, and B is also positive definite. Eigenvalues and
+*> eigenvectors can be selected by specifying either all eigenvalues,
+*> a range of values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is REAL array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**T*S, as returned by SPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, N)
+*> If JOBZ = 'V', the n-by-n matrix used in the reduction of
+*> A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x,
+*> and consequently C to tridiagonal form.
+*> If JOBZ = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If JOBZ = 'N',
+*> LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so Z**T*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (7N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (M)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvalues that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> < 0 : if INFO = -i, the i-th argument had an illegal value
+*> <= N: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in IFAIL.
+*> > N : SPBSTF returned an error code; i.e.,
+*> if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
$ LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
$ LDZ, WORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,158 +301,6 @@
$ W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSBGVX computes selected eigenvalues, and optionally, eigenvectors
-* of a real generalized symmetric-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric
-* and banded, and B is also positive definite. Eigenvalues and
-* eigenvectors can be selected by specifying either all eigenvalues,
-* a range of values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) REAL array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(ka+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**T*S, as returned by SPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* Q (output) REAL array, dimension (LDQ, N)
-* If JOBZ = 'V', the n-by-n matrix used in the reduction of
-* A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x,
-* and consequently C to tridiagonal form.
-* If JOBZ = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If JOBZ = 'N',
-* LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so Z**T*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array, dimension (7N)
-*
-* IWORK (workspace/output) INTEGER array, dimension (5N)
-*
-* IFAIL (output) INTEGER array, dimension (M)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvalues that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* < 0 : if INFO = -i, the i-th argument had an illegal value
-* <= N: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in IFAIL.
-* > N : SPBSTF returned an error code; i.e.,
-* if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssbtrd.f b/SRC/ssbtrd.f
index 7afccb98..93426804 100644
--- a/SRC/ssbtrd.f
+++ b/SRC/ssbtrd.f
@@ -1,10 +1,167 @@
+*> \brief \b SSBTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, VECT
+* INTEGER INFO, KD, LDAB, LDQ, N
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), D( * ), E( * ), Q( LDQ, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBTRD reduces a real symmetric band matrix A to symmetric
+*> tridiagonal form T by an orthogonal similarity transformation:
+*> Q**T * A * Q = T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'N': do not form Q;
+*> = 'V': form Q;
+*> = 'U': update a matrix X, by forming X*Q.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> On exit, the diagonal elements of AB are overwritten by the
+*> diagonal elements of the tridiagonal matrix T; if KD > 0, the
+*> elements on the first superdiagonal (if UPLO = 'U') or the
+*> first subdiagonal (if UPLO = 'L') are overwritten by the
+*> off-diagonal elements of T; the rest of AB is overwritten by
+*> values generated during the reduction.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> On entry, if VECT = 'U', then Q must contain an N-by-N
+*> matrix X; if VECT = 'N' or 'V', then Q need not be set.
+*> \endverbatim
+*> \verbatim
+*> On exit:
+*> if VECT = 'V', Q contains the N-by-N orthogonal matrix Q;
+*> if VECT = 'U', Q contains the product X*Q;
+*> if VECT = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by Linda Kaufman, Bell Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
$ WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO, VECT
@@ -15,80 +172,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSBTRD reduces a real symmetric band matrix A to symmetric
-* tridiagonal form T by an orthogonal similarity transformation:
-* Q**T * A * Q = T.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'N': do not form Q;
-* = 'V': form Q;
-* = 'U': update a matrix X, by forming X*Q.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) REAL array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* On exit, the diagonal elements of AB are overwritten by the
-* diagonal elements of the tridiagonal matrix T; if KD > 0, the
-* elements on the first superdiagonal (if UPLO = 'U') or the
-* first subdiagonal (if UPLO = 'L') are overwritten by the
-* off-diagonal elements of T; the rest of AB is overwritten by
-* values generated during the reduction.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* D (output) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T.
-*
-* E (output) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
-*
-* Q (input/output) REAL array, dimension (LDQ,N)
-* On entry, if VECT = 'U', then Q must contain an N-by-N
-* matrix X; if VECT = 'N' or 'V', then Q need not be set.
-*
-* On exit:
-* if VECT = 'V', Q contains the N-by-N orthogonal matrix Q;
-* if VECT = 'U', Q contains the product X*Q;
-* if VECT = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* Modified by Linda Kaufman, Bell Labs.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssfrk.f b/SRC/ssfrk.f
index 776b03b1..8350ad89 100644
--- a/SRC/ssfrk.f
+++ b/SRC/ssfrk.f
@@ -1,110 +1,182 @@
- SUBROUTINE SSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
- $ C )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b SSFRK
*
-* -- Contributed by Julien Langou of the Univ. of Colorado Denver --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- REAL ALPHA, BETA
- INTEGER K, LDA, N
- CHARACTER TRANS, TRANSR, UPLO
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), C( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
+* C )
+*
+* .. Scalar Arguments ..
+* REAL ALPHA, BETA
+* INTEGER K, LDA, N
+* CHARACTER TRANS, TRANSR, UPLO
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), C( * )
+* ..
+*
* Purpose
* =======
*
-* Level 3 BLAS like routine for C in RFP Format.
-*
-* SSFRK performs one of the symmetric rank--k operations
-*
-* C := alpha*A*A**T + beta*C,
-*
-* or
-*
-* C := alpha*A**T*A + beta*C,
-*
-* where alpha and beta are real scalars, C is an n--by--n symmetric
-* matrix and A is an n--by--k matrix in the first case and a k--by--n
-* matrix in the second case.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Level 3 BLAS like routine for C in RFP Format.
+*>
+*> SSFRK performs one of the symmetric rank--k operations
+*>
+*> C := alpha*A*A**T + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**T*A + beta*C,
+*>
+*> where alpha and beta are real scalars, C is an n--by--n symmetric
+*> matrix and A is an n--by--k matrix in the first case and a k--by--n
+*> matrix in the second case.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal Form of RFP A is stored;
-* = 'T': The Transpose Form of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS (input) CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
-*
-* TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K (input) INTEGER
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with TRANS = 'T'
-* or 't', K specifies the number of rows of the matrix A. K
-* must be at least zero.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal Form of RFP A is stored;
+*> = 'T': The Transpose Form of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**T + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' C := alpha*A**T*A + beta*C.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with TRANS = 'T'
+*> or 't', K specifies the number of rows of the matrix A. K
+*> must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array of DIMENSION (LDA,ka)
+*> where KA
+*> is K when TRANS = 'N' or 'n', and is N otherwise. Before
+*> entry with TRANS = 'N' or 'n', the leading N--by--K part of
+*> the array A must contain the matrix A, otherwise the leading
+*> K--by--N part of the array A must contain the matrix A.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> On entry, BETA specifies the scalar beta.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (NT)
+*> NT = N*(N+1)/2. On entry, the symmetric matrix C in RFP
+*> Format. RFP Format is described by TRANSR, UPLO and N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) REAL
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) REAL array of DIMENSION (LDA,ka)
-* where KA
-* is K when TRANS = 'N' or 'n', and is N otherwise. Before
-* entry with TRANS = 'N' or 'n', the leading N--by--K part of
-* the array A must contain the matrix A, otherwise the leading
-* K--by--N part of the array A must contain the matrix A.
-* Unchanged on exit.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
+*> \ingroup realOTHERcomputational
*
-* BETA (input) REAL
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
+* =====================================================================
+ SUBROUTINE SSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
+ $ C )
*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* C (input/output) REAL array, dimension (NT)
-* NT = N*(N+1)/2. On entry, the symmetric matrix C in RFP
-* Format. RFP Format is described by TRANSR, UPLO and N.
+* .. Scalar Arguments ..
+ REAL ALPHA, BETA
+ INTEGER K, LDA, N
+ CHARACTER TRANS, TRANSR, UPLO
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sspcon.f b/SRC/sspcon.f
index 179a5cb5..844df927 100644
--- a/SRC/sspcon.f
+++ b/SRC/sspcon.f
@@ -1,12 +1,126 @@
+*> \brief \b SSPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric packed matrix A using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by SSPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSPTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,53 +132,6 @@
REAL AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSPCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric packed matrix A using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by SSPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSPTRF, stored as a
-* packed triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSPTRF.
-*
-* ANORM (input) REAL
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sspev.f b/SRC/sspev.f
index 9179cf25..2d1a558f 100644
--- a/SRC/sspev.f
+++ b/SRC/sspev.f
@@ -1,9 +1,132 @@
+*> \brief <b> SSPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPEV computes all the eigenvalues and, optionally, eigenvectors of a
+*> real symmetric matrix A in packed storage.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -13,62 +136,6 @@
REAL AP( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSPEV computes all the eigenvalues and, optionally, eigenvectors of a
-* real symmetric matrix A in packed storage.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sspevd.f b/SRC/sspevd.f
index fd8ec1a9..4416bee3 100644
--- a/SRC/sspevd.f
+++ b/SRC/sspevd.f
@@ -1,10 +1,182 @@
+*> \brief <b> SSPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
+* IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AP( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPEVD computes all the eigenvalues and, optionally, eigenvectors
+*> of a real symmetric matrix A in packed storage. If eigenvectors are
+*> desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the required LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least 2*N.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least
+*> 1 + 6*N + N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the required sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
$ IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,98 +187,6 @@
REAL AP( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSPEVD computes all the eigenvalues and, optionally, eigenvectors
-* of a real symmetric matrix A in packed storage. If eigenvectors are
-* desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the required LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least 2*N.
-* If JOBZ = 'V' and N > 1, LWORK must be at least
-* 1 + 6*N + N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the required sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sspevx.f b/SRC/sspevx.f
index 1439a366..bc23da1f 100644
--- a/SRC/sspevx.f
+++ b/SRC/sspevx.f
@@ -1,11 +1,233 @@
+*> \brief <b> SSPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDZ, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL AP( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric matrix A in packed storage. Eigenvalues/vectors
+*> can be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AP to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the selected eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -17,126 +239,6 @@
REAL AP( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSPEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric matrix A in packed storage. Eigenvalues/vectors
-* can be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AP to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the selected eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (8*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sspgst.f b/SRC/sspgst.f
index e1d49b11..fbc7d933 100644
--- a/SRC/sspgst.f
+++ b/SRC/sspgst.f
@@ -1,65 +1,123 @@
- SUBROUTINE SSPGST( ITYPE, UPLO, N, AP, BP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, N
-* ..
-* .. Array Arguments ..
- REAL AP( * ), BP( * )
-* ..
-*
+*> \brief \b SSPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPGST( ITYPE, UPLO, N, AP, BP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), BP( * )
+* ..
+*
* Purpose
* =======
*
-* SSPGST reduces a real symmetric-definite generalized eigenproblem
-* to standard form, using packed storage.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
-*
-* B must have been previously factorized as U**T*U or L*L**T by SPPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPGST reduces a real symmetric-definite generalized eigenproblem
+*> to standard form, using packed storage.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
+*>
+*> B must have been previously factorized as U**T*U or L*L**T by SPPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
-* = 2 or 3: compute U*A*U**T or L**T*A*L.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
+*> = 2 or 3: compute U*A*U**T or L**T*A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored and B is factored as
+*> U**T*U;
+*> = 'L': Lower triangle of A is stored and B is factored as
+*> L*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] BP
+*> \verbatim
+*> BP is REAL array, dimension (N*(N+1)/2)
+*> The triangular factor from the Cholesky factorization of B,
+*> stored in the same format as A, as returned by SPPTRF.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored and B is factored as
-* U**T*U;
-* = 'L': Lower triangle of A is stored and B is factored as
-* L*L**T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \date November 2011
*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \ingroup realOTHERcomputational
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+* =====================================================================
+ SUBROUTINE SSPGST( ITYPE, UPLO, N, AP, BP, INFO )
*
-* BP (input) REAL array, dimension (N*(N+1)/2)
-* The triangular factor from the Cholesky factorization of B,
-* stored in the same format as A, as returned by SPPTRF.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, N
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), BP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sspgv.f b/SRC/sspgv.f
index 0a4e2aa7..26a44657 100644
--- a/SRC/sspgv.f
+++ b/SRC/sspgv.f
@@ -1,10 +1,164 @@
+*> \brief \b SSPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), BP( * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPGV computes all the eigenvalues and, optionally, the eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
+*> Here A and B are assumed to be symmetric, stored in packed format,
+*> and B is also positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension
+*> (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors. The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: SPPTRF or SSPEV returned an error code:
+*> <= N: if INFO = i, SSPEV failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero.
+*> > N: if INFO = n + i, for 1 <= i <= n, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,84 +169,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSPGV computes all the eigenvalues and, optionally, the eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
-* Here A and B are assumed to be symmetric, stored in packed format,
-* and B is also positive definite.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) REAL array, dimension
-* (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T, in the same storage
-* format as B.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors. The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: SPPTRF or SSPEV returned an error code:
-* <= N: if INFO = i, SSPEV failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero.
-* > N: if INFO = n + i, for 1 <= i <= n, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sspgvd.f b/SRC/sspgvd.f
index 52b7f679..d5c26c06 100644
--- a/SRC/sspgvd.f
+++ b/SRC/sspgvd.f
@@ -1,10 +1,221 @@
+*> \brief \b SSPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
+* LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AP( * ), BP( * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be symmetric, stored in packed format, and B is also
+*> positive definite.
+*> If eigenvectors are desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors. The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the required LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= 2*N.
+*> If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the required sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: SPPTRF or SSPEVD returned an error code:
+*> <= N: if INFO = i, SSPEVD failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
$ LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,124 +227,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSPGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be symmetric, stored in packed format, and B is also
-* positive definite.
-* If eigenvectors are desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T, in the same storage
-* format as B.
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors. The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the required LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= 2*N.
-* If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the required sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: SPPTRF or SSPEVD returned an error code:
-* <= N: if INFO = i, SSPEVD failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sspgvx.f b/SRC/sspgvx.f
index cfd565d2..17ccaca4 100644
--- a/SRC/sspgvx.f
+++ b/SRC/sspgvx.f
@@ -1,11 +1,272 @@
+*> \brief \b SSPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
+* IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
+* IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, ITYPE, IU, LDZ, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL AP( * ), BP( * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPGVX computes selected eigenvalues, and optionally, eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A
+*> and B are assumed to be symmetric, stored in packed storage, and B
+*> is also positive definite. Eigenvalues and eigenvectors can be
+*> selected by specifying either a range of values or a range of indices
+*> for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A and B are stored;
+*> = 'L': Lower triangle of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix pencil (A,B). N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'N', then Z is not referenced.
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> \endverbatim
+*> \verbatim
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: SPPTRF or SSPEVX returned an error code:
+*> <= N: if INFO = i, SSPEVX failed to converge;
+*> i eigenvectors failed to converge. Their indices
+*> are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
$ IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
$ IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,152 +279,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSPGVX computes selected eigenvalues, and optionally, eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A
-* and B are assumed to be symmetric, stored in packed storage, and B
-* is also positive definite. Eigenvalues and eigenvectors can be
-* selected by specifying either a range of values or a range of indices
-* for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A and B are stored;
-* = 'L': Lower triangle of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrix pencil (A,B). N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T, in the same storage
-* format as B.
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M))
-* If JOBZ = 'N', then Z is not referenced.
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-*
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (8*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: SPPTRF or SSPEVX returned an error code:
-* <= N: if INFO = i, SSPEVX failed to converge;
-* i eigenvectors failed to converge. Their indices
-* are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/ssprfs.f b/SRC/ssprfs.f
index f6b39d49..1e9f4bef 100644
--- a/SRC/ssprfs.f
+++ b/SRC/ssprfs.f
@@ -1,12 +1,180 @@
+*> \brief \b SSPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
+* FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is REAL array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A. AFP contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or
+*> A = L*D*L**T as computed by SSPTRF, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SSPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
$ FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 5 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,87 +186,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SSPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) REAL array, dimension (N*(N+1)/2)
-* The factored form of the matrix A. AFP contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or
-* A = L*D*L**T as computed by SSPTRF, stored as a packed
-* triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSPTRF.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SSPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sspsv.f b/SRC/sspsv.f
index c16c180e..54dc8f88 100644
--- a/SRC/sspsv.f
+++ b/SRC/sspsv.f
@@ -1,105 +1,175 @@
- SUBROUTINE SSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> SSPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SSPSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric matrix stored in packed format and X
-* and B are N-by-NRHS matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, D is symmetric and block diagonal with 1-by-1
-* and 2-by-2 diagonal blocks. The factored form of A is then used to
-* solve the system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric matrix stored in packed format and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, D is symmetric and block diagonal with 1-by-1
+*> and 2-by-2 diagonal blocks. The factored form of A is then used to
+*> solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by SSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by SSPTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be
-* computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by SSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by SSPTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Further Details
-* ===============
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
+*> \ingroup realOTHERsolve
*
-* Two-dimensional storage of the symmetric matrix A:
*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sspsvx.f b/SRC/sspsvx.f
index 17a8e4f0..e5642c33 100644
--- a/SRC/sspsvx.f
+++ b/SRC/sspsvx.f
@@ -1,10 +1,279 @@
+*> \brief <b> SSPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
+* LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPSVX uses the diagonal pivoting factorization A = U*D*U**T or
+*> A = L*D*L**T to compute the solution to a real system of linear
+*> equations A * X = B, where A is an N-by-N symmetric matrix stored
+*> in packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AFP and IPIV contain the factored form of
+*> A. AP, AFP and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) REAL array, dimension
+*> (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by SSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by SSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by SSPTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by SSPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
$ LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -17,174 +286,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SSPSVX uses the diagonal pivoting factorization A = U*D*U**T or
-* A = L*D*L**T to compute the solution to a real system of linear
-* equations A * X = B, where A is an N-by-N symmetric matrix stored
-* in packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AFP and IPIV contain the factored form of
-* A. AP, AFP and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* AFP (input or output) REAL array, dimension
-* (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by SSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by SSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by SSPTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by SSPTRF.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssptrd.f b/SRC/ssptrd.f
index db4d555f..867350f2 100644
--- a/SRC/ssptrd.f
+++ b/SRC/ssptrd.f
@@ -1,96 +1,131 @@
- SUBROUTINE SSPTRD( UPLO, N, AP, D, E, TAU, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL AP( * ), D( * ), E( * ), TAU( * )
-* ..
-*
+*> \brief \b SSPTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPTRD( UPLO, N, AP, D, E, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), D( * ), E( * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* SSPTRD reduces a real symmetric matrix A stored in packed form to
-* symmetric tridiagonal form T by an orthogonal similarity
-* transformation: Q**T * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPTRD reduces a real symmetric matrix A stored in packed form to
+*> symmetric tridiagonal form T by an orthogonal similarity
+*> transformation: Q**T * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the orthogonal
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the orthogonal matrix Q as a product
-* of elementary reflectors. See Further Details.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (output) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (output) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \date November 2011
*
-* TAU (output) REAL array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> D (output) REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) REAL array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
+*> overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
+*> overwriting A(i+2:n,i), and tau is stored in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSPTRD( UPLO, N, AP, D, E, TAU, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
-* overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
-* overwriting A(i+2:n,i), and tau is stored in TAU(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), D( * ), E( * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssptrf.f b/SRC/ssptrf.f
index c5b5ea15..4032b4da 100644
--- a/SRC/ssptrf.f
+++ b/SRC/ssptrf.f
@@ -1,9 +1,161 @@
+*> \brief \b SSPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPTRF( UPLO, N, AP, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPTRF computes the factorization of a real symmetric matrix A stored
+*> in packed format using the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L, stored as a packed triangular
+*> matrix overwriting A (see below for further details).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSPTRF( UPLO, N, AP, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,97 +166,6 @@
REAL AP( * )
* ..
*
-* Purpose
-* =======
-*
-* SSPTRF computes the factorization of a real symmetric matrix A stored
-* in packed format using the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L, stored as a packed triangular
-* matrix overwriting A (see below for further details).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssptri.f b/SRC/ssptri.f
index 562fbb3b..7c44f235 100644
--- a/SRC/ssptri.f
+++ b/SRC/ssptri.f
@@ -1,9 +1,111 @@
+*> \brief \b SSPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPTRI computes the inverse of a real symmetric indefinite matrix
+*> A in packed storage using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by SSPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by SSPTRF,
+*> stored as a packed triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix, stored as a packed triangular matrix. The j-th column
+*> of inv(A) is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSPTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,49 +116,6 @@
REAL AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSPTRI computes the inverse of a real symmetric indefinite matrix
-* A in packed storage using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by SSPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by SSPTRF,
-* stored as a packed triangular matrix.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix, stored as a packed triangular matrix. The j-th column
-* of inv(A) is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSPTRF.
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssptrs.f b/SRC/ssptrs.f
index 7a65528b..f67cee10 100644
--- a/SRC/ssptrs.f
+++ b/SRC/ssptrs.f
@@ -1,61 +1,125 @@
- SUBROUTINE SSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b SSPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SSPTRS solves a system of linear equations A*X = B with a real
-* symmetric matrix A stored in packed format using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by SSPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPTRS solves a system of linear equations A*X = B with a real
+*> symmetric matrix A stored in packed format using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by SSPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSPTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSPTRF, stored as a
-* packed triangular matrix.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSPTRF.
+*> \ingroup realOTHERcomputational
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE SSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sstebz.f b/SRC/sstebz.f
index 6b1598c8..b60b793d 100644
--- a/SRC/sstebz.f
+++ b/SRC/sstebz.f
@@ -1,12 +1,262 @@
+*> \brief \b SSTEBZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEBZ( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E,
+* M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER ORDER, RANGE
+* INTEGER IL, INFO, IU, M, N, NSPLIT
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEBZ computes the eigenvalues of a symmetric tridiagonal
+*> matrix T. The user may ask for all eigenvalues, all eigenvalues
+*> in the half-open interval (VL, VU], or the IL-th through IU-th
+*> eigenvalues.
+*>
+*> To avoid overflow, the matrix must be scaled so that its
+*> largest element is no greater than overflow**(1/2) * underflow**(1/4) in absolute value, and for greatest
+*> accuracy, it should not be much smaller than that.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': ("All") all eigenvalues will be found.
+*> = 'V': ("Value") all eigenvalues in the half-open interval
+*> (VL, VU] will be found.
+*> = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
+*> entire matrix) will be found.
+*> \endverbatim
+*>
+*> \param[in] ORDER
+*> \verbatim
+*> ORDER is CHARACTER*1
+*> = 'B': ("By Block") the eigenvalues will be grouped by
+*> split-off block (see IBLOCK, ISPLIT) and
+*> ordered from smallest to largest within
+*> the block.
+*> = 'E': ("Entire matrix")
+*> the eigenvalues for the entire matrix
+*> will be ordered from smallest to
+*> largest.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. Eigenvalues less than or equal
+*> to VL, or greater than VU, will not be returned. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute tolerance for the eigenvalues. An eigenvalue
+*> (or cluster) is considered to be located if it has been
+*> determined to lie in an interval whose width is ABSTOL or
+*> less. If ABSTOL is less than or equal to zero, then ULP*|T|
+*> will be used, where |T| means the 1-norm of T.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The actual number of eigenvalues found. 0 <= M <= N.
+*> (See also the description of INFO=2,3.)
+*> \endverbatim
+*>
+*> \param[out] NSPLIT
+*> \verbatim
+*> NSPLIT is INTEGER
+*> The number of diagonal blocks in the matrix T.
+*> 1 <= NSPLIT <= N.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On exit, the first M elements of W will contain the
+*> eigenvalues. (SSTEBZ may use the remaining N-M elements as
+*> workspace.)
+*> \endverbatim
+*>
+*> \param[out] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> At each row/column j where E(j) is zero or small, the
+*> matrix T is considered to split into a block diagonal
+*> matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which
+*> block (from 1 to the number of blocks) the eigenvalue W(i)
+*> belongs. (SSTEBZ may use the remaining N-M elements as
+*> workspace.)
+*> \endverbatim
+*>
+*> \param[out] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into submatrices.
+*> The first submatrix consists of rows/columns 1 to ISPLIT(1),
+*> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
+*> etc., and the NSPLIT-th consists of rows/columns
+*> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
+*> (Only the first NSPLIT elements will actually be used, but
+*> since the user cannot know a priori what value NSPLIT will
+*> have, N words must be reserved for ISPLIT.)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: some or all of the eigenvalues failed to converge or
+*> were not computed:
+*> =1 or 3: Bisection failed to converge for some
+*> eigenvalues; these eigenvalues are flagged by a
+*> negative block number. The effect is that the
+*> eigenvalues may not be as accurate as the
+*> absolute and relative tolerances. This is
+*> generally caused by unexpectedly inaccurate
+*> arithmetic.
+*> =2 or 3: RANGE='I' only: Not all of the eigenvalues
+*> IL:IU were found.
+*> Effect: M < IU+1-IL
+*> Cause: non-monotonic arithmetic, causing the
+*> Sturm sequence to be non-monotonic.
+*> Cure: recalculate, using RANGE='A', and pick
+*> out eigenvalues IL:IU. In some cases,
+*> increasing the PARAMETER "FUDGE" may
+*> make things work.
+*> = 4: RANGE='I', and the Gershgorin interval
+*> initially used was too small. No eigenvalues
+*> were computed.
+*> Probable cause: your machine has sloppy
+*> floating-point arithmetic.
+*> Cure: Increase the PARAMETER "FUDGE",
+*> recompile, and try again.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> RELFAC REAL, default = 2.0e0
+*> The relative tolerance. An interval (a,b] lies within
+*> "relative tolerance" if b-a < RELFAC*ulp*max(|a|,|b|),
+*> where "ulp" is the machine precision (distance from 1 to
+*> the next larger floating point number.)
+*> \endverbatim
+*> \verbatim
+*> FUDGE REAL, default = 2
+*> A "fudge factor" to widen the Gershgorin intervals. Ideally,
+*> a value of 1 should work, but on machines with sloppy
+*> arithmetic, this needs to be larger. The default for
+*> publicly released versions should be large enough to handle
+*> the worst machine around. Note that this has no effect
+*> on accuracy of the solution.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SSTEBZ( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E,
$ M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* 8-18-00: Increase FUDGE factor for T3E (eca)
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER ORDER, RANGE
@@ -18,157 +268,6 @@
REAL D( * ), E( * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEBZ computes the eigenvalues of a symmetric tridiagonal
-* matrix T. The user may ask for all eigenvalues, all eigenvalues
-* in the half-open interval (VL, VU], or the IL-th through IU-th
-* eigenvalues.
-*
-* To avoid overflow, the matrix must be scaled so that its
-* largest element is no greater than overflow**(1/2) *
-* underflow**(1/4) in absolute value, and for greatest
-* accuracy, it should not be much smaller than that.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966.
-*
-* Arguments
-* =========
-*
-* RANGE (input) CHARACTER*1
-* = 'A': ("All") all eigenvalues will be found.
-* = 'V': ("Value") all eigenvalues in the half-open interval
-* (VL, VU] will be found.
-* = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
-* entire matrix) will be found.
-*
-* ORDER (input) CHARACTER*1
-* = 'B': ("By Block") the eigenvalues will be grouped by
-* split-off block (see IBLOCK, ISPLIT) and
-* ordered from smallest to largest within
-* the block.
-* = 'E': ("Entire matrix")
-* the eigenvalues for the entire matrix
-* will be ordered from smallest to
-* largest.
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix T. N >= 0.
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. Eigenvalues less than or equal
-* to VL, or greater than VU, will not be returned. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute tolerance for the eigenvalues. An eigenvalue
-* (or cluster) is considered to be located if it has been
-* determined to lie in an interval whose width is ABSTOL or
-* less. If ABSTOL is less than or equal to zero, then ULP*|T|
-* will be used, where |T| means the 1-norm of T.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) off-diagonal elements of the tridiagonal matrix T.
-*
-* M (output) INTEGER
-* The actual number of eigenvalues found. 0 <= M <= N.
-* (See also the description of INFO=2,3.)
-*
-* NSPLIT (output) INTEGER
-* The number of diagonal blocks in the matrix T.
-* 1 <= NSPLIT <= N.
-*
-* W (output) REAL array, dimension (N)
-* On exit, the first M elements of W will contain the
-* eigenvalues. (SSTEBZ may use the remaining N-M elements as
-* workspace.)
-*
-* IBLOCK (output) INTEGER array, dimension (N)
-* At each row/column j where E(j) is zero or small, the
-* matrix T is considered to split into a block diagonal
-* matrix. On exit, if INFO = 0, IBLOCK(i) specifies to which
-* block (from 1 to the number of blocks) the eigenvalue W(i)
-* belongs. (SSTEBZ may use the remaining N-M elements as
-* workspace.)
-*
-* ISPLIT (output) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into submatrices.
-* The first submatrix consists of rows/columns 1 to ISPLIT(1),
-* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
-* etc., and the NSPLIT-th consists of rows/columns
-* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
-* (Only the first NSPLIT elements will actually be used, but
-* since the user cannot know a priori what value NSPLIT will
-* have, N words must be reserved for ISPLIT.)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: some or all of the eigenvalues failed to converge or
-* were not computed:
-* =1 or 3: Bisection failed to converge for some
-* eigenvalues; these eigenvalues are flagged by a
-* negative block number. The effect is that the
-* eigenvalues may not be as accurate as the
-* absolute and relative tolerances. This is
-* generally caused by unexpectedly inaccurate
-* arithmetic.
-* =2 or 3: RANGE='I' only: Not all of the eigenvalues
-* IL:IU were found.
-* Effect: M < IU+1-IL
-* Cause: non-monotonic arithmetic, causing the
-* Sturm sequence to be non-monotonic.
-* Cure: recalculate, using RANGE='A', and pick
-* out eigenvalues IL:IU. In some cases,
-* increasing the PARAMETER "FUDGE" may
-* make things work.
-* = 4: RANGE='I', and the Gershgorin interval
-* initially used was too small. No eigenvalues
-* were computed.
-* Probable cause: your machine has sloppy
-* floating-point arithmetic.
-* Cure: Increase the PARAMETER "FUDGE",
-* recompile, and try again.
-*
-* Internal Parameters
-* ===================
-*
-* RELFAC REAL, default = 2.0e0
-* The relative tolerance. An interval (a,b] lies within
-* "relative tolerance" if b-a < RELFAC*ulp*max(|a|,|b|),
-* where "ulp" is the machine precision (distance from 1 to
-* the next larger floating point number.)
-*
-* FUDGE REAL, default = 2
-* A "fudge factor" to widen the Gershgorin intervals. Ideally,
-* a value of 1 should work, but on machines with sloppy
-* arithmetic, this needs to be larger. The default for
-* publicly released versions should be large enough to handle
-* the worst machine around. Note that this has no effect
-* on accuracy of the solution.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sstedc.f b/SRC/sstedc.f
index 8b37b16a..e11dcf01 100644
--- a/SRC/sstedc.f
+++ b/SRC/sstedc.f
@@ -1,10 +1,197 @@
+*> \brief \b SSTEBZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEDC computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the divide and conquer method.
+*> The eigenvectors of a full or band real symmetric matrix can also be
+*> found if SSYTRD or SSPTRD or SSBTRD has been used to reduce this
+*> matrix to tridiagonal form.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none. See SLAED3 for details.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'I': Compute eigenvectors of tridiagonal matrix also.
+*> = 'V': Compute eigenvectors of original dense symmetric
+*> matrix also. On entry, Z contains the orthogonal
+*> matrix used to reduce the original matrix to
+*> tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the subdiagonal elements of the tridiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,N)
+*> On entry, if COMPZ = 'V', then Z contains the orthogonal
+*> matrix used in the reduction to tridiagonal form.
+*> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*> orthonormal eigenvectors of the original symmetric matrix,
+*> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*> of the symmetric tridiagonal matrix.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If COMPZ = 'N' or N <= 1 then LWORK must be at least 1.
+*> If COMPZ = 'V' and N > 1 then LWORK must be at least
+*> ( 1 + 3*N + 2*N*lg N + 4*N**2 ),
+*> where lg( N ) = smallest integer k such
+*> that 2**k >= N.
+*> If COMPZ = 'I' and N > 1 then LWORK must be at least
+*> ( 1 + 4*N + N**2 ).
+*> Note that for COMPZ = 'I' or 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LWORK need
+*> only be max(1,2*(N-1)).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If COMPZ = 'N' or N <= 1 then LIWORK must be at least 1.
+*> If COMPZ = 'V' and N > 1 then LIWORK must be at least
+*> ( 6 + 6*N + 5*N*lg N ).
+*> If COMPZ = 'I' and N > 1 then LIWORK must be at least
+*> ( 3 + 5*N ).
+*> Note that for COMPZ = 'I' or 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LIWORK
+*> need only be 1.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute an eigenvalue while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -15,112 +202,6 @@
REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEDC computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric tridiagonal matrix using the divide and conquer method.
-* The eigenvectors of a full or band real symmetric matrix can also be
-* found if SSYTRD or SSPTRD or SSBTRD has been used to reduce this
-* matrix to tridiagonal form.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none. See SLAED3 for details.
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'I': Compute eigenvectors of tridiagonal matrix also.
-* = 'V': Compute eigenvectors of original dense symmetric
-* matrix also. On entry, Z contains the orthogonal
-* matrix used to reduce the original matrix to
-* tridiagonal form.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the subdiagonal elements of the tridiagonal matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) REAL array, dimension (LDZ,N)
-* On entry, if COMPZ = 'V', then Z contains the orthogonal
-* matrix used in the reduction to tridiagonal form.
-* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-* orthonormal eigenvectors of the original symmetric matrix,
-* and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-* of the symmetric tridiagonal matrix.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If eigenvectors are desired, then LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If COMPZ = 'N' or N <= 1 then LWORK must be at least 1.
-* If COMPZ = 'V' and N > 1 then LWORK must be at least
-* ( 1 + 3*N + 2*N*lg N + 4*N**2 ),
-* where lg( N ) = smallest integer k such
-* that 2**k >= N.
-* If COMPZ = 'I' and N > 1 then LWORK must be at least
-* ( 1 + 4*N + N**2 ).
-* Note that for COMPZ = 'I' or 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LWORK need
-* only be max(1,2*(N-1)).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If COMPZ = 'N' or N <= 1 then LIWORK must be at least 1.
-* If COMPZ = 'V' and N > 1 then LIWORK must be at least
-* ( 6 + 6*N + 5*N*lg N ).
-* If COMPZ = 'I' and N > 1 then LIWORK must be at least
-* ( 3 + 5*N ).
-* Note that for COMPZ = 'I' or 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LIWORK
-* need only be 1.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute an eigenvalue while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sstegr.f b/SRC/sstegr.f
index 6ce90f75..02f2cdef 100644
--- a/SRC/sstegr.f
+++ b/SRC/sstegr.f
@@ -1,14 +1,259 @@
+*> \brief \b SSTEGR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * )
+* REAL Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEGR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
+*> a well defined set of pairwise different real eigenvalues, the corresponding
+*> real eigenvectors are pairwise orthogonal.
+*>
+*> The spectrum may be computed either completely or partially by specifying
+*> either an interval (VL,VU] or a range of indices IL:IU for the desired
+*> eigenvalues.
+*>
+*> SSTEGR is a compatability wrapper around the improved SSTEMR routine.
+*> See SSTEMR for further details.
+*>
+*> One important change is that the ABSTOL parameter no longer provides any
+*> benefit and hence is no longer used.
+*>
+*> Note : SSTEGR and SSTEMR work only on machines which follow
+*> IEEE-754 floating-point standard in their handling of infinities and
+*> NaNs. Normal execution may create these exceptiona values and hence
+*> may abort due to a floating point exception in environments which
+*> do not conform to the IEEE-754 standard.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal matrix
+*> T. On exit, D is overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the tridiagonal
+*> matrix T in elements 1 to N-1 of E. E(N) need not be set on
+*> input, but is used internally as workspace.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> Unused. Was the absolute error tolerance for the
+*> eigenvalues/eigenvectors in previous versions.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix T
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> Supplying N columns is always safe.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th computed eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ). This is relevant in the case when the matrix
+*> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal
+*> (and minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,18*N)
+*> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N)
+*> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
+*> if only the eigenvalues are to be computed.
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = 1X, internal error in SLARRE,
+*> if INFO = 2X, internal error in SLARRV.
+*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
+*> the nonzero error code returned by SLARRE or
+*> SLARRV, respectively.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
-
- IMPLICIT NONE
-*
*
* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -21,145 +266,6 @@
REAL Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEGR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
-* a well defined set of pairwise different real eigenvalues, the corresponding
-* real eigenvectors are pairwise orthogonal.
-*
-* The spectrum may be computed either completely or partially by specifying
-* either an interval (VL,VU] or a range of indices IL:IU for the desired
-* eigenvalues.
-*
-* SSTEGR is a compatability wrapper around the improved SSTEMR routine.
-* See SSTEMR for further details.
-*
-* One important change is that the ABSTOL parameter no longer provides any
-* benefit and hence is no longer used.
-*
-* Note : SSTEGR and SSTEMR work only on machines which follow
-* IEEE-754 floating-point standard in their handling of infinities and
-* NaNs. Normal execution may create these exceptiona values and hence
-* may abort due to a floating point exception in environments which
-* do not conform to the IEEE-754 standard.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal matrix
-* T. On exit, D is overwritten.
-*
-* E (input/output) REAL array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the tridiagonal
-* matrix T in elements 1 to N-1 of E. E(N) need not be set on
-* input, but is used internally as workspace.
-* On exit, E is overwritten.
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* Unused. Was the absolute error tolerance for the
-* eigenvalues/eigenvectors in previous versions.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix T
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-* Supplying N columns is always safe.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', then LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th computed eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ). This is relevant in the case when the matrix
-* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
-*
-* WORK (workspace/output) REAL array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal
-* (and minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,18*N)
-* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (LIWORK)
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N)
-* if the eigenvectors are desired, and LIWORK >= max(1,8*N)
-* if only the eigenvalues are to be computed.
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* On exit, INFO
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = 1X, internal error in SLARRE,
-* if INFO = 2X, internal error in SLARRV.
-* Here, the digit X = ABS( IINFO ) < 10, where IINFO is
-* the nonzero error code returned by SLARRE or
-* SLARRV, respectively.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/sstein.f b/SRC/sstein.f
index fa7e8014..76d63294 100644
--- a/SRC/sstein.f
+++ b/SRC/sstein.f
@@ -1,10 +1,176 @@
+*> \brief \b SSTEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), IFAIL( * ), ISPLIT( * ),
+* $ IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEIN computes the eigenvectors of a real symmetric tridiagonal
+*> matrix T corresponding to specified eigenvalues, using inverse
+*> iteration.
+*>
+*> The maximum number of iterations allowed for each eigenvector is
+*> specified by an internal parameter MAXITS (currently set to 5).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix
+*> T, in elements 1 to N-1.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenvectors to be found. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements of W contain the eigenvalues for
+*> which eigenvectors are to be computed. The eigenvalues
+*> should be grouped by split-off block and ordered from
+*> smallest to largest within the block. ( The output array
+*> W from SSTEBZ with ORDER = 'B' is expected here. )
+*> \endverbatim
+*>
+*> \param[in] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The submatrix indices associated with the corresponding
+*> eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to
+*> the first submatrix from the top, =2 if W(i) belongs to
+*> the second submatrix, etc. ( The output array IBLOCK
+*> from SSTEBZ is expected here. )
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into submatrices.
+*> The first submatrix consists of rows/columns 1 to
+*> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
+*> through ISPLIT( 2 ), etc.
+*> ( The output array ISPLIT from SSTEBZ is expected here. )
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, M)
+*> The computed eigenvectors. The eigenvector associated
+*> with the eigenvalue W(i) is stored in the i-th column of
+*> Z. Any vector which fails to converge is set to its current
+*> iterate after MAXITS iterations.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (M)
+*> On normal exit, all elements of IFAIL are zero.
+*> If one or more eigenvectors fail to converge after
+*> MAXITS iterations, then their indices are stored in
+*> array IFAIL.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge
+*> in MAXITS iterations. Their indices are stored in
+*> array IFAIL.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> MAXITS INTEGER, default = 5
+*> The maximum number of iterations performed.
+*> \endverbatim
+*> \verbatim
+*> EXTRA INTEGER, default = 2
+*> The number of iterations performed after norm growth
+*> criterion is satisfied, should be at least 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDZ, M, N
@@ -15,89 +181,6 @@
REAL D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEIN computes the eigenvectors of a real symmetric tridiagonal
-* matrix T corresponding to specified eigenvalues, using inverse
-* iteration.
-*
-* The maximum number of iterations allowed for each eigenvector is
-* specified by an internal parameter MAXITS (currently set to 5).
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix
-* T, in elements 1 to N-1.
-*
-* M (input) INTEGER
-* The number of eigenvectors to be found. 0 <= M <= N.
-*
-* W (input) REAL array, dimension (N)
-* The first M elements of W contain the eigenvalues for
-* which eigenvectors are to be computed. The eigenvalues
-* should be grouped by split-off block and ordered from
-* smallest to largest within the block. ( The output array
-* W from SSTEBZ with ORDER = 'B' is expected here. )
-*
-* IBLOCK (input) INTEGER array, dimension (N)
-* The submatrix indices associated with the corresponding
-* eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to
-* the first submatrix from the top, =2 if W(i) belongs to
-* the second submatrix, etc. ( The output array IBLOCK
-* from SSTEBZ is expected here. )
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into submatrices.
-* The first submatrix consists of rows/columns 1 to
-* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
-* through ISPLIT( 2 ), etc.
-* ( The output array ISPLIT from SSTEBZ is expected here. )
-*
-* Z (output) REAL array, dimension (LDZ, M)
-* The computed eigenvectors. The eigenvector associated
-* with the eigenvalue W(i) is stored in the i-th column of
-* Z. Any vector which fails to converge is set to its current
-* iterate after MAXITS iterations.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (5*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* IFAIL (output) INTEGER array, dimension (M)
-* On normal exit, all elements of IFAIL are zero.
-* If one or more eigenvectors fail to converge after
-* MAXITS iterations, then their indices are stored in
-* array IFAIL.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge
-* in MAXITS iterations. Their indices are stored in
-* array IFAIL.
-*
-* Internal Parameters
-* ===================
-*
-* MAXITS INTEGER, default = 5
-* The maximum number of iterations performed.
-*
-* EXTRA INTEGER, default = 2
-* The number of iterations performed after norm growth
-* criterion is satisfied, should be at least 1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sstemr.f b/SRC/sstemr.f
index 03892b77..91b45633 100644
--- a/SRC/sstemr.f
+++ b/SRC/sstemr.f
@@ -1,12 +1,315 @@
+*> \brief \b SSTEMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
+* M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
+* IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* LOGICAL TRYRAC
+* INTEGER IL, INFO, IU, LDZ, NZC, LIWORK, LWORK, M, N
+* REAL VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * )
+* REAL Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEMR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
+*> a well defined set of pairwise different real eigenvalues, the corresponding
+*> real eigenvectors are pairwise orthogonal.
+*>
+*> The spectrum may be computed either completely or partially by specifying
+*> either an interval (VL,VU] or a range of indices IL:IU for the desired
+*> eigenvalues.
+*>
+*> Depending on the number of desired eigenvalues, these are computed either
+*> by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
+*> computed by the use of various suitable L D L^T factorizations near clusters
+*> of close eigenvalues (referred to as RRRs, Relatively Robust
+*> Representations). An informal sketch of the algorithm follows.
+*>
+*> For each unreduced block (submatrix) of T,
+*> (a) Compute T - sigma I = L D L^T, so that L and D
+*> define all the wanted eigenvalues to high relative accuracy.
+*> This means that small relative changes in the entries of D and L
+*> cause only small relative changes in the eigenvalues and
+*> eigenvectors. The standard (unfactored) representation of the
+*> tridiagonal matrix T does not have this property in general.
+*> (b) Compute the eigenvalues to suitable accuracy.
+*> If the eigenvectors are desired, the algorithm attains full
+*> accuracy of the computed eigenvalues only right before
+*> the corresponding vectors have to be computed, see steps c) and d).
+*> (c) For each cluster of close eigenvalues, select a new
+*> shift close to the cluster, find a new factorization, and refine
+*> the shifted eigenvalues to suitable accuracy.
+*> (d) For each eigenvalue with a large enough relative separation compute
+*> the corresponding eigenvector by forming a rank revealing twisted
+*> factorization. Go back to (c) for any clusters that remain.
+*>
+*> For more details, see:
+*> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
+*> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
+*> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
+*> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
+*> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
+*> 2004. Also LAPACK Working Note 154.
+*> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem",
+*> Computer Science Division Technical Report No. UCB/CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*> Further Details
+*> 1.SSTEMR works only on machines which follow IEEE-754
+*> floating-point standard in their handling of infinities and NaNs.
+*> This permits the use of efficient inner loops avoiding a check for
+*> zero divisors.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal matrix
+*> T. On exit, D is overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the tridiagonal
+*> matrix T in elements 1 to N-1 of E. E(N) need not be set on
+*> input, but is used internally as workspace.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix T
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and can be computed with a workspace
+*> query by setting NZC = -1, see below.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] NZC
+*> \verbatim
+*> NZC is INTEGER
+*> The number of eigenvectors to be held in the array Z.
+*> If RANGE = 'A', then NZC >= max(1,N).
+*> If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
+*> If RANGE = 'I', then NZC >= IU-IL+1.
+*> If NZC = -1, then a workspace query is assumed; the
+*> routine calculates the number of columns of the array Z that
+*> are needed to hold the eigenvectors.
+*> This value is returned as the first entry of the Z array, and
+*> no error message related to NZC is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th computed eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ). This is relevant in the case when the matrix
+*> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
+*> \endverbatim
+*>
+*> \param[in,out] TRYRAC
+*> \verbatim
+*> TRYRAC is LOGICAL
+*> If TRYRAC.EQ..TRUE., indicates that the code should check whether
+*> the tridiagonal matrix defines its eigenvalues to high relative
+*> accuracy. If so, the code uses relative-accuracy preserving
+*> algorithms that might be (a bit) slower depending on the matrix.
+*> If the matrix does not define its eigenvalues to high relative
+*> accuracy, the code can uses possibly faster algorithms.
+*> If TRYRAC.EQ..FALSE., the code is not required to guarantee
+*> relatively accurate eigenvalues and can use the fastest possible
+*> techniques.
+*> On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
+*> does not define its eigenvalues to high relative accuracy.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal
+*> (and minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,18*N)
+*> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N)
+*> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
+*> if only the eigenvalues are to be computed.
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = 1X, internal error in SLARRE,
+*> if INFO = 2X, internal error in SLARRV.
+*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
+*> the nonzero error code returned by SLARRE or
+*> SLARRV, respectively.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
$ IWORK, LIWORK, INFO )
- IMPLICIT NONE
*
-* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- June 2010 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -20,198 +323,6 @@
REAL Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEMR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
-* a well defined set of pairwise different real eigenvalues, the corresponding
-* real eigenvectors are pairwise orthogonal.
-*
-* The spectrum may be computed either completely or partially by specifying
-* either an interval (VL,VU] or a range of indices IL:IU for the desired
-* eigenvalues.
-*
-* Depending on the number of desired eigenvalues, these are computed either
-* by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
-* computed by the use of various suitable L D L^T factorizations near clusters
-* of close eigenvalues (referred to as RRRs, Relatively Robust
-* Representations). An informal sketch of the algorithm follows.
-*
-* For each unreduced block (submatrix) of T,
-* (a) Compute T - sigma I = L D L^T, so that L and D
-* define all the wanted eigenvalues to high relative accuracy.
-* This means that small relative changes in the entries of D and L
-* cause only small relative changes in the eigenvalues and
-* eigenvectors. The standard (unfactored) representation of the
-* tridiagonal matrix T does not have this property in general.
-* (b) Compute the eigenvalues to suitable accuracy.
-* If the eigenvectors are desired, the algorithm attains full
-* accuracy of the computed eigenvalues only right before
-* the corresponding vectors have to be computed, see steps c) and d).
-* (c) For each cluster of close eigenvalues, select a new
-* shift close to the cluster, find a new factorization, and refine
-* the shifted eigenvalues to suitable accuracy.
-* (d) For each eigenvalue with a large enough relative separation compute
-* the corresponding eigenvector by forming a rank revealing twisted
-* factorization. Go back to (c) for any clusters that remain.
-*
-* For more details, see:
-* - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
-* to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
-* Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
-* - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
-* Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
-* 2004. Also LAPACK Working Note 154.
-* - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem",
-* Computer Science Division Technical Report No. UCB/CSD-97-971,
-* UC Berkeley, May 1997.
-*
-* Further Details
-* 1.SSTEMR works only on machines which follow IEEE-754
-* floating-point standard in their handling of infinities and NaNs.
-* This permits the use of efficient inner loops avoiding a check for
-* zero divisors.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal matrix
-* T. On exit, D is overwritten.
-*
-* E (input/output) REAL array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the tridiagonal
-* matrix T in elements 1 to N-1 of E. E(N) need not be set on
-* input, but is used internally as workspace.
-* On exit, E is overwritten.
-*
-* VL (input) REAL
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix T
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and can be computed with a workspace
-* query by setting NZC = -1, see below.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', then LDZ >= max(1,N).
-*
-* NZC (input) INTEGER
-* The number of eigenvectors to be held in the array Z.
-* If RANGE = 'A', then NZC >= max(1,N).
-* If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
-* If RANGE = 'I', then NZC >= IU-IL+1.
-* If NZC = -1, then a workspace query is assumed; the
-* routine calculates the number of columns of the array Z that
-* are needed to hold the eigenvectors.
-* This value is returned as the first entry of the Z array, and
-* no error message related to NZC is issued by XERBLA.
-*
-* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th computed eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ). This is relevant in the case when the matrix
-* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
-*
-* TRYRAC (input/output) LOGICAL
-* If TRYRAC.EQ..TRUE., indicates that the code should check whether
-* the tridiagonal matrix defines its eigenvalues to high relative
-* accuracy. If so, the code uses relative-accuracy preserving
-* algorithms that might be (a bit) slower depending on the matrix.
-* If the matrix does not define its eigenvalues to high relative
-* accuracy, the code can uses possibly faster algorithms.
-* If TRYRAC.EQ..FALSE., the code is not required to guarantee
-* relatively accurate eigenvalues and can use the fastest possible
-* techniques.
-* On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
-* does not define its eigenvalues to high relative accuracy.
-*
-* WORK (workspace/output) REAL array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal
-* (and minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,18*N)
-* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (LIWORK)
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N)
-* if the eigenvectors are desired, and LIWORK >= max(1,8*N)
-* if only the eigenvalues are to be computed.
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* On exit, INFO
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = 1X, internal error in SLARRE,
-* if INFO = 2X, internal error in SLARRV.
-* Here, the digit X = ABS( IINFO ) < 10, where IINFO is
-* the nonzero error code returned by SLARRE or
-* SLARRV, respectively.
-*
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssteqr.f b/SRC/ssteqr.f
index 4b756ae4..7d3d4616 100644
--- a/SRC/ssteqr.f
+++ b/SRC/ssteqr.f
@@ -1,9 +1,132 @@
+*> \brief \b SSTEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the implicit QL or QR method.
+*> The eigenvectors of a full or band symmetric matrix can also be found
+*> if SSYTRD or SSPTRD or SSBTRD has been used to reduce this matrix to
+*> tridiagonal form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'V': Compute eigenvalues and eigenvectors of the original
+*> symmetric matrix. On entry, Z must contain the
+*> orthogonal matrix used to reduce the original matrix
+*> to tridiagonal form.
+*> = 'I': Compute eigenvalues and eigenvectors of the
+*> tridiagonal matrix. Z is initialized to the identity
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', then Z contains the orthogonal
+*> matrix used in the reduction to tridiagonal form.
+*> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*> orthonormal eigenvectors of the original symmetric matrix,
+*> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*> of the symmetric tridiagonal matrix.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (max(1,2*N-2))
+*> If COMPZ = 'N', then WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm has failed to find all the eigenvalues in
+*> a total of 30*N iterations; if INFO = i, then i
+*> elements of E have not converged to zero; on exit, D
+*> and E contain the elements of a symmetric tridiagonal
+*> matrix which is orthogonally similar to the original
+*> matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup auxOTHERcomputational
+*
+* =====================================================================
SUBROUTINE SSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -13,66 +136,6 @@
REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEQR computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric tridiagonal matrix using the implicit QL or QR method.
-* The eigenvectors of a full or band symmetric matrix can also be found
-* if SSYTRD or SSPTRD or SSBTRD has been used to reduce this matrix to
-* tridiagonal form.
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'V': Compute eigenvalues and eigenvectors of the original
-* symmetric matrix. On entry, Z must contain the
-* orthogonal matrix used to reduce the original matrix
-* to tridiagonal form.
-* = 'I': Compute eigenvalues and eigenvectors of the
-* tridiagonal matrix. Z is initialized to the identity
-* matrix.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) REAL array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', then Z contains the orthogonal
-* matrix used in the reduction to tridiagonal form.
-* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-* orthonormal eigenvectors of the original symmetric matrix,
-* and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-* of the symmetric tridiagonal matrix.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* eigenvectors are desired, then LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (max(1,2*N-2))
-* If COMPZ = 'N', then WORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm has failed to find all the eigenvalues in
-* a total of 30*N iterations; if INFO = i, then i
-* elements of E have not converged to zero; on exit, D
-* and E contain the elements of a symmetric tridiagonal
-* matrix which is orthogonally similar to the original
-* matrix.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssterf.f b/SRC/ssterf.f
index daa97982..d9d24975 100644
--- a/SRC/ssterf.f
+++ b/SRC/ssterf.f
@@ -1,44 +1,94 @@
- SUBROUTINE SSTERF( N, D, E, INFO )
+*> \brief \b SSTERF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTERF( N, D, E, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * )
+* ..
+*
* Purpose
* =======
*
-* SSTERF computes all eigenvalues of a symmetric tridiagonal matrix
-* using the Pal-Walker-Kahan variant of the QL or QR algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTERF computes all eigenvalues of a symmetric tridiagonal matrix
+*> using the Pal-Walker-Kahan variant of the QL or QR algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm failed to find all of the eigenvalues in
+*> a total of 30*N iterations; if INFO = i, then i
+*> elements of E have not converged to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \date November 2011
*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
+*> \ingroup auxOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm failed to find all of the eigenvalues in
-* a total of 30*N iterations; if INFO = i, then i
-* elements of E have not converged to zero.
+* =====================================================================
+ SUBROUTINE SSTERF( N, D, E, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/sstev.f b/SRC/sstev.f
index 0da67972..1470be60 100644
--- a/SRC/sstev.f
+++ b/SRC/sstev.f
@@ -1,9 +1,117 @@
+*> \brief <b> SSTEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEV( JOBZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEV computes all eigenvalues and, optionally, eigenvectors of a
+*> real symmetric tridiagonal matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A, stored in elements 1 to N-1 of E.
+*> On exit, the contents of E are destroyed.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with D(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (max(1,2*N-2))
+*> If JOBZ = 'N', WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of E did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSTEV( JOBZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ
@@ -13,51 +121,6 @@
REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEV computes all eigenvalues and, optionally, eigenvectors of a
-* real symmetric tridiagonal matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A, stored in elements 1 to N-1 of E.
-* On exit, the contents of E are destroyed.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with D(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (max(1,2*N-2))
-* If JOBZ = 'N', WORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of E did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sstevd.f b/SRC/sstevd.f
index d44efeb7..bbefd14f 100644
--- a/SRC/sstevd.f
+++ b/SRC/sstevd.f
@@ -1,10 +1,166 @@
+*> \brief <b> SSTEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEVD( JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ
+* INTEGER INFO, LDZ, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEVD computes all eigenvalues and, optionally, eigenvectors of a
+*> real symmetric tridiagonal matrix. If eigenvectors are desired, it
+*> uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A, stored in elements 1 to N-1 of E.
+*> On exit, the contents of E are destroyed.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with D(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array,
+*> dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If JOBZ = 'N' or N <= 1 then LWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1 then LWORK must be at least
+*> ( 1 + 4*N + N**2 ).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOBZ = 'N' or N <= 1 then LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1 then LIWORK must be at least 3+5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of E did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSTEVD( JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ
@@ -15,86 +171,6 @@
REAL D( * ), E( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEVD computes all eigenvalues and, optionally, eigenvectors of a
-* real symmetric tridiagonal matrix. If eigenvectors are desired, it
-* uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) REAL array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A, stored in elements 1 to N-1 of E.
-* On exit, the contents of E are destroyed.
-*
-* Z (output) REAL array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with D(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array,
-* dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If JOBZ = 'N' or N <= 1 then LWORK must be at least 1.
-* If JOBZ = 'V' and N > 1 then LWORK must be at least
-* ( 1 + 4*N + N**2 ).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOBZ = 'N' or N <= 1 then LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1 then LIWORK must be at least 3+5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of E did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sstevr.f b/SRC/sstevr.f
index 9e65739e..7cb4bf45 100644
--- a/SRC/sstevr.f
+++ b/SRC/sstevr.f
@@ -1,11 +1,312 @@
+*> \brief <b> SSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEVR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
+* M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEVR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Eigenvalues and
+*> eigenvectors can be selected by specifying either a range of values
+*> or a range of indices for the desired eigenvalues.
+*>
+*> Whenever possible, SSTEVR calls SSTEMR to compute the
+*> eigenspectrum using Relatively Robust Representations. SSTEMR
+*> computes eigenvalues by the dqds algorithm, while orthogonal
+*> eigenvectors are computed from various "good" L D L^T representations
+*> (also known as Relatively Robust Representations). Gram-Schmidt
+*> orthogonalization is avoided as far as possible. More specifically,
+*> the various steps of the algorithm are as follows. For the i-th
+*> unreduced block of T,
+*> (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T
+*> is a relatively robust representation,
+*> (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high
+*> relative accuracy by the dqds algorithm,
+*> (c) If there is a cluster of close eigenvalues, "choose" sigma_i
+*> close to the cluster, and go to step (a),
+*> (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T,
+*> compute the corresponding eigenvector by forming a
+*> rank-revealing twisted factorization.
+*> The desired accuracy of the output can be specified by the input
+*> parameter ABSTOL.
+*>
+*> For more details, see "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem", by Inderjit Dhillon,
+*> Computer Science Division Technical Report No. UCB//CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*>
+*> Note 1 : SSTEVR calls SSTEMR when the full spectrum is requested
+*> on machines which conform to the ieee-754 floating point standard.
+*> SSTEVR calls SSTEBZ and SSTEIN on non-ieee machines and
+*> when partial spectrum requests are made.
+*>
+*> Normal execution of SSTEMR may create NaNs and infinities and
+*> hence may abort due to a floating point exception in environments
+*> which do not handle NaNs and infinities in the ieee standard default
+*> manner.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> For RANGE = 'V' or 'I' and IU - IL < N - 1, SSTEBZ and
+*> SSTEIN are called
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A.
+*> On exit, D may be multiplied by a constant factor chosen
+*> to avoid over/underflow in computing the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (max(1,N-1))
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A in elements 1 to N-1 of E.
+*> On exit, E may be multiplied by a constant factor chosen
+*> to avoid over/underflow in computing the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*> \verbatim
+*> If high relative accuracy is important, set ABSTOL to
+*> SLAMCH( 'Safe minimum' ). Doing so will guarantee that
+*> eigenvalues are computed to high relative accuracy when
+*> possible in future releases. The current code does not
+*> make any guarantees about high relative accuracy, but
+*> future releases will. See J. Barlow and J. Demmel,
+*> "Computing Accurate Eigensystems of Scaled Diagonally
+*> Dominant Matrices", LAPACK Working Note #7, for a discussion
+*> of which matrices define their eigenvalues to high relative
+*> accuracy.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ).
+*> Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal (and
+*> minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 20*N.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal (and
+*> minimal) LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= 10*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: Internal error
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Ken Stanley, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Jason Riedy, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSTEVR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
$ M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -17,193 +318,6 @@
REAL D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEVR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Eigenvalues and
-* eigenvectors can be selected by specifying either a range of values
-* or a range of indices for the desired eigenvalues.
-*
-* Whenever possible, SSTEVR calls SSTEMR to compute the
-* eigenspectrum using Relatively Robust Representations. SSTEMR
-* computes eigenvalues by the dqds algorithm, while orthogonal
-* eigenvectors are computed from various "good" L D L^T representations
-* (also known as Relatively Robust Representations). Gram-Schmidt
-* orthogonalization is avoided as far as possible. More specifically,
-* the various steps of the algorithm are as follows. For the i-th
-* unreduced block of T,
-* (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T
-* is a relatively robust representation,
-* (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high
-* relative accuracy by the dqds algorithm,
-* (c) If there is a cluster of close eigenvalues, "choose" sigma_i
-* close to the cluster, and go to step (a),
-* (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T,
-* compute the corresponding eigenvector by forming a
-* rank-revealing twisted factorization.
-* The desired accuracy of the output can be specified by the input
-* parameter ABSTOL.
-*
-* For more details, see "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem", by Inderjit Dhillon,
-* Computer Science Division Technical Report No. UCB//CSD-97-971,
-* UC Berkeley, May 1997.
-*
-*
-* Note 1 : SSTEVR calls SSTEMR when the full spectrum is requested
-* on machines which conform to the ieee-754 floating point standard.
-* SSTEVR calls SSTEBZ and SSTEIN on non-ieee machines and
-* when partial spectrum requests are made.
-*
-* Normal execution of SSTEMR may create NaNs and infinities and
-* hence may abort due to a floating point exception in environments
-* which do not handle NaNs and infinities in the ieee standard default
-* manner.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-* For RANGE = 'V' or 'I' and IU - IL < N - 1, SSTEBZ and
-* SSTEIN are called
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A.
-* On exit, D may be multiplied by a constant factor chosen
-* to avoid over/underflow in computing the eigenvalues.
-*
-* E (input/output) REAL array, dimension (max(1,N-1))
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A in elements 1 to N-1 of E.
-* On exit, E may be multiplied by a constant factor chosen
-* to avoid over/underflow in computing the eigenvalues.
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* If high relative accuracy is important, set ABSTOL to
-* SLAMCH( 'Safe minimum' ). Doing so will guarantee that
-* eigenvalues are computed to high relative accuracy when
-* possible in future releases. The current code does not
-* make any guarantees about high relative accuracy, but
-* future releases will. See J. Barlow and J. Demmel,
-* "Computing Accurate Eigensystems of Scaled Diagonally
-* Dominant Matrices", LAPACK Working Note #7, for a discussion
-* of which matrices define their eigenvalues to high relative
-* accuracy.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ).
-* Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal (and
-* minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 20*N.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal (and
-* minimal) LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= 10*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: Internal error
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Ken Stanley, Computer Science Division, University of
-* California at Berkeley, USA
-* Jason Riedy, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/sstevx.f b/SRC/sstevx.f
index 6770dbc4..652e1df0 100644
--- a/SRC/sstevx.f
+++ b/SRC/sstevx.f
@@ -1,10 +1,225 @@
+*> \brief <b> SSTEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTEVX( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
+* M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* INTEGER IL, INFO, IU, LDZ, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix A. Eigenvalues and
+*> eigenvectors can be selected by specifying either a range of values
+*> or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A.
+*> On exit, D may be multiplied by a constant factor chosen
+*> to avoid over/underflow in computing the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is REAL array, dimension (max(1,N-1))
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A in elements 1 to N-1 of E.
+*> On exit, E may be multiplied by a constant factor chosen
+*> to avoid over/underflow in computing the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less
+*> than or equal to zero, then EPS*|T| will be used in
+*> its place, where |T| is the 1-norm of the tridiagonal
+*> matrix.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge (INFO > 0), then that
+*> column of Z contains the latest approximation to the
+*> eigenvector, and the index of the eigenvector is returned
+*> in IFAIL. If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHEReigen
+*
+* =====================================================================
SUBROUTINE SSTEVX( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
$ M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -16,121 +231,6 @@
REAL D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSTEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix A. Eigenvalues and
-* eigenvectors can be selected by specifying either a range of values
-* or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) REAL array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A.
-* On exit, D may be multiplied by a constant factor chosen
-* to avoid over/underflow in computing the eigenvalues.
-*
-* E (input/output) REAL array, dimension (max(1,N-1))
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A in elements 1 to N-1 of E.
-* On exit, E may be multiplied by a constant factor chosen
-* to avoid over/underflow in computing the eigenvalues.
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less
-* than or equal to zero, then EPS*|T| will be used in
-* its place, where |T| is the 1-norm of the tridiagonal
-* matrix.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge (INFO > 0), then that
-* column of Z contains the latest approximation to the
-* eigenvector, and the index of the eigenvector is returned
-* in IFAIL. If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (5*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssycon.f b/SRC/ssycon.f
index 26244bbf..8ff22bba 100644
--- a/SRC/ssycon.f
+++ b/SRC/ssycon.f
@@ -1,12 +1,131 @@
+*> \brief \b SSYCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* REAL ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a real symmetric matrix A using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by SSYTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+* =====================================================================
SUBROUTINE SSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,55 +137,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a real symmetric matrix A using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by SSYTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSYTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
-*
-* ANORM (input) REAL
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssyconv.f b/SRC/ssyconv.f
index b8b15fcd..a9d8bc86 100644
--- a/SRC/ssyconv.f
+++ b/SRC/ssyconv.f
@@ -1,69 +1,135 @@
- SUBROUTINE SSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK PROTOTYPE routine (version 3.2.2) --
-* -- Written by Julie Langou of the Univ. of TN --
-* May 2010
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO, WAY
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b SSYCONV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, WAY
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SSYCONV convert A given by TRF into L and D and vice-versa.
-* Get Non-diag elements of D (returned in workspace) and
-* apply or reverse permutation done in TRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYCONV convert A given by TRF into L and D and vice-versa.
+*> Get Non-diag elements of D (returned in workspace) and
+*> apply or reverse permutation done in TRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* WAY (input) CHARACTER*1
-* = 'C': Convert
-* = 'R': Revert
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] WAY
+*> \verbatim
+*> WAY is CHARACTER*1
+*> = 'C': Convert
+*> = 'R': Revert
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1.
+*> LWORK = N
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (N)
+*> \ingroup realSYcomputational
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1.
-* LWORK = N
+* =====================================================================
+ SUBROUTINE SSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO, WAY
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssyequb.f b/SRC/ssyequb.f
index c22e2531..c85d0d84 100644
--- a/SRC/ssyequb.f
+++ b/SRC/ssyequb.f
@@ -1,83 +1,152 @@
- SUBROUTINE SSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*> \brief \b SSYEQUB
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- REAL AMAX, SCOND
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), S( * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* REAL AMAX, SCOND
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), S( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SSYEQUB computes row and column scalings intended to equilibrate a
-* symmetric matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYEQUB computes row and column scalings intended to equilibrate a
+*> symmetric matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The N-by-N symmetric matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The N-by-N symmetric matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is REAL
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is REAL
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
*
-* S (output) REAL array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+* Authors
+* =======
*
-* SCOND (output) REAL
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AMAX (output) REAL
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (3*N)
+*> \ingroup realSYcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
+*> Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
+*> DOI 10.1023/B:NUMA.0000016606.32820.69
+*> Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
*
-* Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
-* Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
-* DOI 10.1023/B:NUMA.0000016606.32820.69
-* Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ REAL AMAX, SCOND
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), S( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssyev.f b/SRC/ssyev.f
index dc295318..ce8a7de8 100644
--- a/SRC/ssyev.f
+++ b/SRC/ssyev.f
@@ -1,9 +1,134 @@
+*> \brief <b> SSYEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYEV computes all eigenvalues and, optionally, eigenvectors of a
+*> real symmetric matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> orthonormal eigenvectors of the matrix A.
+*> If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*> or the upper triangle (if UPLO='U') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,3*N-1).
+*> For optimal efficiency, LWORK >= (NB+2)*N,
+*> where NB is the blocksize for SSYTRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYeigen
+*
+* =====================================================================
SUBROUTINE SSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -13,64 +138,6 @@
REAL A( LDA, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYEV computes all eigenvalues and, optionally, eigenvectors of a
-* real symmetric matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* orthonormal eigenvectors of the matrix A.
-* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-* or the upper triangle (if UPLO='U') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,3*N-1).
-* For optimal efficiency, LWORK >= (NB+2)*N,
-* where NB is the blocksize for SSYTRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssyevd.f b/SRC/ssyevd.f
index f5285834..ae70decd 100644
--- a/SRC/ssyevd.f
+++ b/SRC/ssyevd.f
@@ -1,10 +1,192 @@
+*> \brief <b> SSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDA, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYEVD computes all eigenvalues and, optionally, eigenvectors of a
+*> real symmetric matrix A. If eigenvectors are desired, it uses a
+*> divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*> Because of large use of BLAS of level 3, SSYEVD needs N**2 more
+*> workspace than SSYEVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> orthonormal eigenvectors of the matrix A.
+*> If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*> or the upper triangle (if UPLO='U') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array,
+*> dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least 2*N+1.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least
+*> 1 + 6*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i and JOBZ = 'N', then the algorithm failed
+*> to converge; i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> if INFO = i and JOBZ = 'V', then the algorithm failed
+*> to compute an eigenvalue while working on the submatrix
+*> lying in rows and columns INFO/(N+1) through
+*> mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*> Modified by Francoise Tisseur, University of Tennessee.
+*>
+*> Modified description of INFO. Sven, 16 Feb 05.
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSYEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,107 +197,6 @@
REAL A( LDA, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYEVD computes all eigenvalues and, optionally, eigenvectors of a
-* real symmetric matrix A. If eigenvectors are desired, it uses a
-* divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Because of large use of BLAS of level 3, SSYEVD needs N**2 more
-* workspace than SSYEVX.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* orthonormal eigenvectors of the matrix A.
-* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-* or the upper triangle (if UPLO='U') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) REAL array,
-* dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least 2*N+1.
-* If JOBZ = 'V' and N > 1, LWORK must be at least
-* 1 + 6*N + 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i and JOBZ = 'N', then the algorithm failed
-* to converge; i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* if INFO = i and JOBZ = 'V', then the algorithm failed
-* to compute an eigenvalue while working on the submatrix
-* lying in rows and columns INFO/(N+1) through
-* mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-* Modified by Francoise Tisseur, University of Tennessee.
-*
-* Modified description of INFO. Sven, 16 Feb 05.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssyevr.f b/SRC/ssyevr.f
index 3be1d4f8..7036becf 100644
--- a/SRC/ssyevr.f
+++ b/SRC/ssyevr.f
@@ -1,11 +1,340 @@
+*> \brief <b> SSYEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
+* IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDA, LDZ, LIWORK, LWORK, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* REAL A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYEVR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric matrix A. Eigenvalues and eigenvectors can be
+*> selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*> SSYEVR first reduces the matrix A to tridiagonal form T with a call
+*> to SSYTRD. Then, whenever possible, SSYEVR calls SSTEMR to compute
+*> the eigenspectrum using Relatively Robust Representations. SSTEMR
+*> computes eigenvalues by the dqds algorithm, while orthogonal
+*> eigenvectors are computed from various "good" L D L^T representations
+*> (also known as Relatively Robust Representations). Gram-Schmidt
+*> orthogonalization is avoided as far as possible. More specifically,
+*> the various steps of the algorithm are as follows.
+*>
+*> For each unreduced block (submatrix) of T,
+*> (a) Compute T - sigma I = L D L^T, so that L and D
+*> define all the wanted eigenvalues to high relative accuracy.
+*> This means that small relative changes in the entries of D and L
+*> cause only small relative changes in the eigenvalues and
+*> eigenvectors. The standard (unfactored) representation of the
+*> tridiagonal matrix T does not have this property in general.
+*> (b) Compute the eigenvalues to suitable accuracy.
+*> If the eigenvectors are desired, the algorithm attains full
+*> accuracy of the computed eigenvalues only right before
+*> the corresponding vectors have to be computed, see steps c) and d).
+*> (c) For each cluster of close eigenvalues, select a new
+*> shift close to the cluster, find a new factorization, and refine
+*> the shifted eigenvalues to suitable accuracy.
+*> (d) For each eigenvalue with a large enough relative separation compute
+*> the corresponding eigenvector by forming a rank revealing twisted
+*> factorization. Go back to (c) for any clusters that remain.
+*>
+*> The desired accuracy of the output can be specified by the input
+*> parameter ABSTOL.
+*>
+*> For more details, see SSTEMR's documentation and:
+*> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
+*> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
+*> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
+*> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
+*> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
+*> 2004. Also LAPACK Working Note 154.
+*> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem",
+*> Computer Science Division Technical Report No. UCB/CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*>
+*> Note 1 : SSYEVR calls SSTEMR when the full spectrum is requested
+*> on machines which conform to the ieee-754 floating point standard.
+*> SSYEVR calls SSTEBZ and SSTEIN on non-ieee machines and
+*> when partial spectrum requests are made.
+*>
+*> Normal execution of SSTEMR may create NaNs and infinities and
+*> hence may abort due to a floating point exception in environments
+*> which do not handle NaNs and infinities in the ieee standard default
+*> manner.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> For RANGE = 'V' or 'I' and IU - IL < N - 1, SSTEBZ and
+*> SSTEIN are called
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*> \verbatim
+*> If high relative accuracy is important, set ABSTOL to
+*> SLAMCH( 'Safe minimum' ). Doing so will guarantee that
+*> eigenvalues are computed to high relative accuracy when
+*> possible in future releases. The current code does not
+*> make any guarantees about high relative accuracy, but
+*> future releases will. See J. Barlow and J. Demmel,
+*> "Computing Accurate Eigensystems of Scaled Diagonally
+*> Dominant Matrices", LAPACK Working Note #7, for a discussion
+*> of which matrices define their eigenvalues to high relative
+*> accuracy.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> Supplying N columns is always safe.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ).
+*> Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,26*N).
+*> For optimal efficiency, LWORK >= (NB+6)*N,
+*> where NB is the max of the blocksize for SSYTRD and SORMTR
+*> returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: Internal error
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Ken Stanley, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Jason Riedy, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSYEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
$ IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK eigen routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -17,218 +346,6 @@
REAL A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSYEVR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric matrix A. Eigenvalues and eigenvectors can be
-* selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* SSYEVR first reduces the matrix A to tridiagonal form T with a call
-* to SSYTRD. Then, whenever possible, SSYEVR calls SSTEMR to compute
-* the eigenspectrum using Relatively Robust Representations. SSTEMR
-* computes eigenvalues by the dqds algorithm, while orthogonal
-* eigenvectors are computed from various "good" L D L^T representations
-* (also known as Relatively Robust Representations). Gram-Schmidt
-* orthogonalization is avoided as far as possible. More specifically,
-* the various steps of the algorithm are as follows.
-*
-* For each unreduced block (submatrix) of T,
-* (a) Compute T - sigma I = L D L^T, so that L and D
-* define all the wanted eigenvalues to high relative accuracy.
-* This means that small relative changes in the entries of D and L
-* cause only small relative changes in the eigenvalues and
-* eigenvectors. The standard (unfactored) representation of the
-* tridiagonal matrix T does not have this property in general.
-* (b) Compute the eigenvalues to suitable accuracy.
-* If the eigenvectors are desired, the algorithm attains full
-* accuracy of the computed eigenvalues only right before
-* the corresponding vectors have to be computed, see steps c) and d).
-* (c) For each cluster of close eigenvalues, select a new
-* shift close to the cluster, find a new factorization, and refine
-* the shifted eigenvalues to suitable accuracy.
-* (d) For each eigenvalue with a large enough relative separation compute
-* the corresponding eigenvector by forming a rank revealing twisted
-* factorization. Go back to (c) for any clusters that remain.
-*
-* The desired accuracy of the output can be specified by the input
-* parameter ABSTOL.
-*
-* For more details, see SSTEMR's documentation and:
-* - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
-* to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
-* Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
-* - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
-* Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
-* 2004. Also LAPACK Working Note 154.
-* - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem",
-* Computer Science Division Technical Report No. UCB/CSD-97-971,
-* UC Berkeley, May 1997.
-*
-*
-* Note 1 : SSYEVR calls SSTEMR when the full spectrum is requested
-* on machines which conform to the ieee-754 floating point standard.
-* SSYEVR calls SSTEBZ and SSTEIN on non-ieee machines and
-* when partial spectrum requests are made.
-*
-* Normal execution of SSTEMR may create NaNs and infinities and
-* hence may abort due to a floating point exception in environments
-* which do not handle NaNs and infinities in the ieee standard default
-* manner.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-* For RANGE = 'V' or 'I' and IU - IL < N - 1, SSTEBZ and
-* SSTEIN are called
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* If high relative accuracy is important, set ABSTOL to
-* SLAMCH( 'Safe minimum' ). Doing so will guarantee that
-* eigenvalues are computed to high relative accuracy when
-* possible in future releases. The current code does not
-* make any guarantees about high relative accuracy, but
-* future releases will. See J. Barlow and J. Demmel,
-* "Computing Accurate Eigensystems of Scaled Diagonally
-* Dominant Matrices", LAPACK Working Note #7, for a discussion
-* of which matrices define their eigenvalues to high relative
-* accuracy.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-* Supplying N columns is always safe.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ).
-* Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,26*N).
-* For optimal efficiency, LWORK >= (NB+6)*N,
-* where NB is the max of the blocksize for SSYTRD and SORMTR
-* returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: Internal error
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Ken Stanley, Computer Science Division, University of
-* California at Berkeley, USA
-* Jason Riedy, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssyevx.f b/SRC/ssyevx.f
index c92ced10..47d6d1e1 100644
--- a/SRC/ssyevx.f
+++ b/SRC/ssyevx.f
@@ -1,11 +1,252 @@
+*> \brief <b> SSYEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK,
+* IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDA, LDZ, LWORK, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric matrix A. Eigenvalues and eigenvectors can be
+*> selected by specifying either a range of values or a range of indices
+*> for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*SLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= 1, when N <= 1;
+*> otherwise 8*N.
+*> For optimal efficiency, LWORK >= (NB+3)*N,
+*> where NB is the max of the blocksize for SSYTRD and SORMTR
+*> returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYeigen
+*
+* =====================================================================
SUBROUTINE SSYEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK,
$ IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -17,139 +258,6 @@
REAL A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSYEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric matrix A. Eigenvalues and eigenvectors can be
-* selected by specifying either a range of values or a range of indices
-* for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*SLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= 1, when N <= 1;
-* otherwise 8*N.
-* For optimal efficiency, LWORK >= (NB+3)*N,
-* where NB is the max of the blocksize for SSYTRD and SORMTR
-* returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssygs2.f b/SRC/ssygs2.f
index 5cebc7ba..4d4f95d1 100644
--- a/SRC/ssygs2.f
+++ b/SRC/ssygs2.f
@@ -1,73 +1,137 @@
- SUBROUTINE SSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, LDA, LDB, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SSYGS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SSYGS2 reduces a real symmetric-definite generalized eigenproblem
-* to standard form.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T *A*L.
-*
-* B must have been previously factorized as U**T *U or L*L**T by SPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYGS2 reduces a real symmetric-definite generalized eigenproblem
+*> to standard form.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T *A*L.
+*>
+*> B must have been previously factorized as U**T *U or L*L**T by SPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
-* = 2 or 3: compute U*A*U**T or L**T *A*L.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored, and how B has been factorized.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
+*> = 2 or 3: compute U*A*U**T or L**T *A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored, and how B has been factorized.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> The triangular factor from the Cholesky factorization of B,
+*> as returned by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup realSYcomputational
*
-* B (input) REAL array, dimension (LDB,N)
-* The triangular factor from the Cholesky factorization of B,
-* as returned by SPOTRF.
+* =====================================================================
+ SUBROUTINE SSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssygst.f b/SRC/ssygst.f
index 9a1c2f63..9be05944 100644
--- a/SRC/ssygst.f
+++ b/SRC/ssygst.f
@@ -1,73 +1,137 @@
- SUBROUTINE SSYGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, LDA, LDB, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SSYGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SSYGST reduces a real symmetric-definite generalized eigenproblem
-* to standard form.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
-*
-* B must have been previously factorized as U**T*U or L*L**T by SPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYGST reduces a real symmetric-definite generalized eigenproblem
+*> to standard form.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L.
+*>
+*> B must have been previously factorized as U**T*U or L*L**T by SPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
-* = 2 or 3: compute U*A*U**T or L**T*A*L.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored and B is factored as
-* U**T*U;
-* = 'L': Lower triangle of A is stored and B is factored as
-* L*L**T.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T);
+*> = 2 or 3: compute U*A*U**T or L**T*A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored and B is factored as
+*> U**T*U;
+*> = 'L': Lower triangle of A is stored and B is factored as
+*> L*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> The triangular factor from the Cholesky factorization of B,
+*> as returned by SPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup realSYcomputational
*
-* B (input) REAL array, dimension (LDB,N)
-* The triangular factor from the Cholesky factorization of B,
-* as returned by SPOTRF.
+* =====================================================================
+ SUBROUTINE SSYGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssygv.f b/SRC/ssygv.f
index 709e69ca..9f5d6869 100644
--- a/SRC/ssygv.f
+++ b/SRC/ssygv.f
@@ -1,10 +1,179 @@
+*> \brief \b SSYGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYGV computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
+*> Here A and B are assumed to be symmetric and B is also
+*> positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> matrix Z of eigenvectors. The eigenvectors are normalized
+*> as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+*> or the lower triangle (if UPLO='L') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the symmetric positive definite matrix B.
+*> If UPLO = 'U', the leading N-by-N upper triangular part of B
+*> contains the upper triangular part of the matrix B.
+*> If UPLO = 'L', the leading N-by-N lower triangular part of B
+*> contains the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,3*N-1).
+*> For optimal efficiency, LWORK >= (NB+2)*N,
+*> where NB is the blocksize for SSYTRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: SPOTRF or SSYEV returned an error code:
+*> <= N: if INFO = i, SSYEV failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYeigen
+*
+* =====================================================================
SUBROUTINE SSYGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -14,96 +183,6 @@
REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYGV computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
-* Here A and B are assumed to be symmetric and B is also
-* positive definite.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* matrix Z of eigenvectors. The eigenvectors are normalized
-* as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-* If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
-* or the lower triangle (if UPLO='L') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the symmetric positive definite matrix B.
-* If UPLO = 'U', the leading N-by-N upper triangular part of B
-* contains the upper triangular part of the matrix B.
-* If UPLO = 'L', the leading N-by-N lower triangular part of B
-* contains the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,3*N-1).
-* For optimal efficiency, LWORK >= (NB+2)*N,
-* where NB is the blocksize for SSYTRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: SPOTRF or SSYEV returned an error code:
-* <= N: if INFO = i, SSYEV failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssygvd.f b/SRC/ssygvd.f
index 4b391a57..c132dce9 100644
--- a/SRC/ssygvd.f
+++ b/SRC/ssygvd.f
@@ -1,10 +1,231 @@
+*> \brief \b SSYGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
+* LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be symmetric and B is also positive definite.
+*> If eigenvectors are desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> matrix Z of eigenvectors. The eigenvectors are normalized
+*> as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+*> or the lower triangle (if UPLO='L') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, the symmetric matrix B. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of B contains the
+*> upper triangular part of the matrix B. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of B contains
+*> the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= 2*N+1.
+*> If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK and IWORK
+*> arrays, returns these values as the first entries of the WORK
+*> and IWORK arrays, and no error message related to LWORK or
+*> LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If N <= 1, LIWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK and IWORK arrays, and no error message related to
+*> LWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: SPOTRF or SSYEVD returned an error code:
+*> <= N: if INFO = i and JOBZ = 'N', then the algorithm
+*> failed to converge; i off-diagonal elements of an
+*> intermediate tridiagonal form did not converge to
+*> zero;
+*> if INFO = i and JOBZ = 'V', then the algorithm
+*> failed to compute an eigenvalue while working on
+*> the submatrix lying in rows and columns INFO/(N+1)
+*> through mod(INFO,N+1);
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> Modified so that no backsubstitution is performed if SSYEVD fails to
+*> converge (NEIG in old code could be greater than N causing out of
+*> bounds reference to A - reported by Ralf Meyer). Also corrected the
+*> description of INFO and the test on ITYPE. Sven, 16 Feb 05.
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
$ LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,135 +236,6 @@
REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be symmetric and B is also positive definite.
-* If eigenvectors are desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* matrix Z of eigenvectors. The eigenvectors are normalized
-* as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-* If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
-* or the lower triangle (if UPLO='L') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB, N)
-* On entry, the symmetric matrix B. If UPLO = 'U', the
-* leading N-by-N upper triangular part of B contains the
-* upper triangular part of the matrix B. If UPLO = 'L',
-* the leading N-by-N lower triangular part of B contains
-* the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* W (output) REAL array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= 2*N+1.
-* If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK and IWORK
-* arrays, returns these values as the first entries of the WORK
-* and IWORK arrays, and no error message related to LWORK or
-* LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If N <= 1, LIWORK >= 1.
-* If JOBZ = 'N' and N > 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK and IWORK arrays, and no error message related to
-* LWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: SPOTRF or SSYEVD returned an error code:
-* <= N: if INFO = i and JOBZ = 'N', then the algorithm
-* failed to converge; i off-diagonal elements of an
-* intermediate tridiagonal form did not converge to
-* zero;
-* if INFO = i and JOBZ = 'V', then the algorithm
-* failed to compute an eigenvalue while working on
-* the submatrix lying in rows and columns INFO/(N+1)
-* through mod(INFO,N+1);
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
-* Modified so that no backsubstitution is performed if SSYEVD fails to
-* converge (NEIG in old code could be greater than N causing out of
-* bounds reference to A - reported by Ralf Meyer). Also corrected the
-* description of INFO and the test on ITYPE. Sven, 16 Feb 05.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssygvx.f b/SRC/ssygvx.f
index 162b402f..fa59a09c 100644
--- a/SRC/ssygvx.f
+++ b/SRC/ssygvx.f
@@ -1,11 +1,304 @@
+*> \brief \b SSYGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
+* VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
+* LWORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
+* REAL ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYGVX computes selected eigenvalues, and optionally, eigenvectors
+*> of a real generalized symmetric-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A
+*> and B are assumed to be symmetric and B is also positive definite.
+*> Eigenvalues and eigenvectors can be selected by specifying either a
+*> range of values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A and B are stored;
+*> = 'L': Lower triangle of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix pencil (A,B). N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDA, N)
+*> On entry, the symmetric matrix B. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of B contains the
+*> upper triangular part of the matrix B. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of B contains
+*> the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**T*U or B = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is REAL
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing C to tridiagonal form, where C is the symmetric
+*> matrix of the standard symmetric problem to which the
+*> generalized problem is transformed.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*SLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is REAL array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'N', then Z is not referenced.
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> \endverbatim
+*> \verbatim
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,8*N).
+*> For optimal efficiency, LWORK >= (NB+3)*N,
+*> where NB is the blocksize for SSYTRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: SPOTRF or SSYEVX returned an error code:
+*> <= N: if INFO = i, SSYEVX failed to converge;
+*> i eigenvectors failed to converge. Their indices
+*> are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSYGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
$ VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
$ LWORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,174 +311,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SSYGVX computes selected eigenvalues, and optionally, eigenvectors
-* of a real generalized symmetric-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A
-* and B are assumed to be symmetric and B is also positive definite.
-* Eigenvalues and eigenvectors can be selected by specifying either a
-* range of values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A and B are stored;
-* = 'L': Lower triangle of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrix pencil (A,B). N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDA, N)
-* On entry, the symmetric matrix B. If UPLO = 'U', the
-* leading N-by-N upper triangular part of B contains the
-* upper triangular part of the matrix B. If UPLO = 'L',
-* the leading N-by-N lower triangular part of B contains
-* the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**T*U or B = L*L**T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* VL (input) REAL
-*
-* VU (input) REAL
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) REAL
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing C to tridiagonal form, where C is the symmetric
-* matrix of the standard symmetric problem to which the
-* generalized problem is transformed.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*SLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) REAL array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) REAL array, dimension (LDZ, max(1,M))
-* If JOBZ = 'N', then Z is not referenced.
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-*
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,8*N).
-* For optimal efficiency, LWORK >= (NB+3)*N,
-* where NB is the blocksize for SSYTRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: SPOTRF or SSYEVX returned an error code:
-* <= N: if INFO = i, SSYEVX failed to converge;
-* i eigenvectors failed to converge. Their indices
-* are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssyrfs.f b/SRC/ssyrfs.f
index a3c5f10c..446e5386 100644
--- a/SRC/ssyrfs.f
+++ b/SRC/ssyrfs.f
@@ -1,12 +1,192 @@
+*> \brief \b SSYRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite, and
+*> provides error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or
+*> A = L*D*L**T as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SSYTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+* =====================================================================
SUBROUTINE SSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,93 +198,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SSYRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite, and
-* provides error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or
-* A = L*D*L**T as computed by SSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SSYTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssyrfsx.f b/SRC/ssyrfsx.f
index 9e0e16f4..79c38dca 100644
--- a/SRC/ssyrfsx.f
+++ b/SRC/ssyrfsx.f
@@ -1,18 +1,423 @@
+*> \brief \b SSYRFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYRFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* REAL S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SSYRFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite, and
+*> provides error bounds and backward error estimates for the
+*> solution. In addition to normwise error bound, the code provides
+*> maximum componentwise error bound if possible. See comments for
+*> ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or A =
+*> L*D*L**T as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by SGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+* =====================================================================
SUBROUTINE SSYRFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,274 +433,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SSYRFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite, and
-* provides error bounds and backward error estimates for the
-* solution. In addition to normwise error bound, the code provides
-* maximum componentwise error bound if possible. See comments for
-* ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) REAL array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or A =
-* L*D*L**T as computed by SSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) REAL array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by SGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/ssysv.f b/SRC/ssysv.f
index 4f73e7ab..a6976652 100644
--- a/SRC/ssysv.f
+++ b/SRC/ssysv.f
@@ -1,11 +1,174 @@
+*> \brief <b> SSYSV computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, LWORK, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYSV computes the solution to a real system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
+*> used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the block diagonal matrix D and the
+*> multipliers used to obtain the factor U or L from the
+*> factorization A = U*D*U**T or A = L*D*L**T as computed by
+*> SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by SSYTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= 1, and for best performance
+*> LWORK >= max(1,N*NB), where NB is the optimal blocksize for
+*> SSYTRF.
+*> for LWORK < N, TRS will be done with Level BLAS 2
+*> for LWORK >= N, TRS will be done with Level BLAS 3
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYsolve
+*
+* =====================================================================
SUBROUTINE SSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated s
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,94 +179,6 @@
REAL A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYSV computes the solution to a real system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
-* used to solve the system of equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the block diagonal matrix D and the
-* multipliers used to obtain the factor U or L from the
-* factorization A = U*D*U**T or A = L*D*L**T as computed by
-* SSYTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by SSYTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= 1, and for best performance
-* LWORK >= max(1,N*NB), where NB is the optimal blocksize for
-* SSYTRF.
-* for LWORK < N, TRS will be done with Level BLAS 2
-* for LWORK >= N, TRS will be done with Level BLAS 3
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/ssysvx.f b/SRC/ssysvx.f
index d137a1c6..9660d7d3 100644
--- a/SRC/ssysvx.f
+++ b/SRC/ssysvx.f
@@ -1,11 +1,285 @@
+*> \brief <b> SSYSVX computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
+* LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYSVX uses the diagonal pivoting factorization to compute the
+*> solution to a real system of linear equations A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
+*> The form of the factorization is
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AF and IPIV contain the factored form of
+*> A. AF and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) REAL array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by SSYTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= max(1,3*N), and for best
+*> performance, when FACT = 'N', LWORK >= max(1,3*N,N*NB), where
+*> NB is the optimal blocksize for SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYsolve
+*
+* =====================================================================
SUBROUTINE SSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
$ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
$ IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -18,173 +292,6 @@
$ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SSYSVX uses the diagonal pivoting factorization to compute the
-* solution to a real system of linear equations A * X = B,
-* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
-* The form of the factorization is
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AF and IPIV contain the factored form of
-* A. AF and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) REAL array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by SSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by SSYTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by SSYTRF.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= max(1,3*N), and for best
-* performance, when FACT = 'N', LWORK >= max(1,3*N,N*NB), where
-* NB is the optimal blocksize for SSYTRF.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssysvxx.f b/SRC/ssysvxx.f
index f7765812..77770c0d 100644
--- a/SRC/ssysvxx.f
+++ b/SRC/ssysvxx.f
@@ -1,18 +1,529 @@
+*> \brief \b SSYSVXX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* REAL RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), IWORK( * )
+* REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* REAL S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> SSYSVXX uses the diagonal pivoting factorization to compute the
+*> solution to a real system of linear equations A * X = B, where A
+*> is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. SSYSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> SSYSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> SSYSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what SSYSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 3. If some D(i,i)=0, so that D is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is
+*> less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(R) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) REAL array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T as computed by SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block
+*> structure of D, as determined by SSYTRF. If IPIV(k) > 0,
+*> then rows and columns k and IPIV(k) were interchanged and
+*> D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
+*> IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
+*> -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
+*> diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
+*> then rows and columns k+1 and -IPIV(k) were interchanged
+*> and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block
+*> structure of D, as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) REAL array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is REAL
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is REAL array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) REAL array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+* =====================================================================
SUBROUTINE SSYSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,371 +539,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* SSYSVXX uses the diagonal pivoting factorization to compute the
-* solution to a real system of linear equations A * X = B, where A
-* is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. SSYSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* SSYSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* SSYSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what SSYSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 3. If some D(i,i)=0, so that D is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is
-* less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(R) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) REAL array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T as computed by SSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block
-* structure of D, as determined by SSYTRF. If IPIV(k) > 0,
-* then rows and columns k and IPIV(k) were interchanged and
-* D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
-* IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
-* -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
-* diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
-* then rows and columns k+1 and -IPIV(k) were interchanged
-* and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block
-* structure of D, as determined by SSYTRF.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) REAL array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) REAL array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) REAL
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) REAL
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) REAL array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) REAL array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) REAL array, dimension (4*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/ssyswapr.f b/SRC/ssyswapr.f
index 83b416da..5a2702a7 100644
--- a/SRC/ssyswapr.f
+++ b/SRC/ssyswapr.f
@@ -1,54 +1,111 @@
- SUBROUTINE SSYSWAPR( UPLO, N, A, LDA, I1, I2)
+*> \brief \b SSYSWAPR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER I1, I2, LDA, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, N )
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SSYSWAPR( UPLO, N, A, LDA, I1, I2)
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, N )
+*
* Purpose
* =======
*
-* SSYSWAPR applies an elementary permutation on the rows and the columns of
-* a symmetric matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYSWAPR applies an elementary permutation on the rows and the columns of
+*> a symmetric matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] I1
+*> \verbatim
+*> I1 is INTEGER
+*> Index of the first row to swap
+*> \endverbatim
+*>
+*> \param[in] I2
+*> \verbatim
+*> I2 is INTEGER
+*> Index of the second row to swap
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by SSYTRF.
+*> \date November 2011
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \ingroup realSYauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ SUBROUTINE SSYSWAPR( UPLO, N, A, LDA, I1, I2)
*
-* I1 (input) INTEGER
-* Index of the first row to swap
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* I2 (input) INTEGER
-* Index of the second row to swap
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, N )
*
* =====================================================================
*
diff --git a/SRC/ssytd2.f b/SRC/ssytd2.f
index c3933e34..94ed1f26 100644
--- a/SRC/ssytd2.f
+++ b/SRC/ssytd2.f
@@ -1,116 +1,149 @@
- SUBROUTINE SSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), D( * ), E( * ), TAU( * )
-* ..
-*
+*> \brief \b SSYTD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* SSYTD2 reduces a real symmetric matrix A to symmetric tridiagonal
-* form T by an orthogonal similarity transformation: Q**T * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTD2 reduces a real symmetric matrix A to symmetric tridiagonal
+*> form T by an orthogonal similarity transformation: Q**T * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the orthogonal
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the orthogonal matrix Q as a product
-* of elementary reflectors. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (output) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (output) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \date November 2011
*
-* TAU (output) REAL array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \ingroup realSYcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> D (output) REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) REAL array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*> A(1:i-1,i+1), and tau in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*> and tau in TAU(i).
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( d e v2 v3 v4 ) ( d )
+*> ( d e v3 v4 ) ( e d )
+*> ( d e v4 ) ( v1 e d )
+*> ( d e ) ( v1 v2 e d )
+*> ( d ) ( v1 v2 v3 e d )
+*>
+*> where d and e denote diagonal and off-diagonal elements of T, and vi
+*> denotes an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-* A(1:i-1,i+1), and tau in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-* and tau in TAU(i).
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( d e v2 v3 v4 ) ( d )
-* ( d e v3 v4 ) ( e d )
-* ( d e v4 ) ( v1 e d )
-* ( d e ) ( v1 v2 e d )
-* ( d ) ( v1 v2 v3 e d )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of T, and vi
-* denotes an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), D( * ), E( * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssytf2.f b/SRC/ssytf2.f
index 6878a80d..1a98359f 100644
--- a/SRC/ssytf2.f
+++ b/SRC/ssytf2.f
@@ -1,9 +1,183 @@
+*> \brief \b SSYTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYTF2( UPLO, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTF2 computes the factorization of a real symmetric matrix A using
+*> the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U**T is the transpose of U, and D is symmetric and
+*> block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 09-29-06 - patch from
+*> Bobby Cheng, MathWorks
+*>
+*> Replace l.204 and l.372
+*> IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*> by
+*> IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. SISNAN(ABSAKK) ) THEN
+*>
+*> 01-01-96 - Based on modifications by
+*> J. Lewis, Boeing Computer Services Company
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*> 1-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSYTF2( UPLO, N, A, LDA, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,116 +188,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SSYTF2 computes the factorization of a real symmetric matrix A using
-* the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U**T is the transpose of U, and D is symmetric and
-* block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 09-29-06 - patch from
-* Bobby Cheng, MathWorks
-*
-* Replace l.204 and l.372
-* IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
-* by
-* IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. SISNAN(ABSAKK) ) THEN
-*
-* 01-01-96 - Based on modifications by
-* J. Lewis, Boeing Computer Services Company
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-* 1-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ssytrd.f b/SRC/ssytrd.f
index 9454295d..9e0ec380 100644
--- a/SRC/ssytrd.f
+++ b/SRC/ssytrd.f
@@ -1,129 +1,163 @@
- SUBROUTINE SSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), D( * ), E( * ), TAU( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b SSYTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), TAU( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SSYTRD reduces a real symmetric matrix A to real symmetric
-* tridiagonal form T by an orthogonal similarity transformation:
-* Q**T * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTRD reduces a real symmetric matrix A to real symmetric
+*> tridiagonal form T by an orthogonal similarity transformation:
+*> Q**T * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the orthogonal
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the orthogonal matrix Q as a product
-* of elementary reflectors. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* D (output) REAL array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
-*
-* E (output) REAL array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
-*
-* TAU (output) REAL array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1.
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realSYcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> D (output) REAL array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) REAL array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) REAL array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= 1.
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*> A(1:i-1,i+1), and tau in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**T
+*>
+*> where tau is a real scalar, and v is a real vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*> and tau in TAU(i).
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( d e v2 v3 v4 ) ( d )
+*> ( d e v3 v4 ) ( e d )
+*> ( d e v4 ) ( v1 e d )
+*> ( d e ) ( v1 v2 e d )
+*> ( d ) ( v1 v2 v3 e d )
+*>
+*> where d and e denote diagonal and off-diagonal elements of T, and vi
+*> denotes an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-* A(1:i-1,i+1), and tau in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**T
-*
-* where tau is a real scalar, and v is a real vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-* and tau in TAU(i).
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( d e v2 v3 v4 ) ( d )
-* ( d e v3 v4 ) ( e d )
-* ( d e v4 ) ( v1 e d )
-* ( d e ) ( v1 v2 e d )
-* ( d ) ( v1 v2 v3 e d )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of T, and vi
-* denotes an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), D( * ), E( * ), TAU( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssytrf.f b/SRC/ssytrf.f
index e66d0f5a..df7db3ae 100644
--- a/SRC/ssytrf.f
+++ b/SRC/ssytrf.f
@@ -1,9 +1,187 @@
+*> \brief \b SSYTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTRF computes the factorization of a real symmetric matrix A using
+*> the Bunch-Kaufman diagonal pivoting method. The form of the
+*> factorization is
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1. For best performance
+*> LWORK >= N*NB, where NB is the block size returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE SSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,113 +192,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYTRF computes the factorization of a real symmetric matrix A using
-* the Bunch-Kaufman diagonal pivoting method. The form of the
-* factorization is
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1. For best performance
-* LWORK >= N*NB, where NB is the block size returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/ssytri.f b/SRC/ssytri.f
index c378bae6..66137f83 100644
--- a/SRC/ssytri.f
+++ b/SRC/ssytri.f
@@ -1,63 +1,125 @@
- SUBROUTINE SSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b SSYTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SSYTRI computes the inverse of a real symmetric indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* SSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTRI computes the inverse of a real symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> SSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by SSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup realSYcomputational
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
+* =====================================================================
+ SUBROUTINE SSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssytri2.f b/SRC/ssytri2.f
index 11fab1e9..d0a6a78c 100644
--- a/SRC/ssytri2.f
+++ b/SRC/ssytri2.f
@@ -1,13 +1,130 @@
+*> \brief \b SSYTRI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTRI2 computes the inverse of a REAL hermitian indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> SSYTRF. SSYTRI2 sets the LEADING DIMENSION of the workspace
+*> before calling SSYTRI2X that actually computes the inverse.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NB structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N+NB+1)*(NB+3)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> WORK is size >= (N+NB+1)*(NB+3)
+*> If LDWORK = -1, then a workspace query is assumed; the routine
+*> calculates:
+*> - the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array,
+*> - and no error message related to LDWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+* =====================================================================
SUBROUTINE SSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* -- Written by Julie Langou of the Univ. of TN --
+* November 2011
*
-* @generated s
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER INFO, LDA, LWORK, N
@@ -17,61 +134,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYTRI2 computes the inverse of a REAL hermitian indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* SSYTRF. SSYTRI2 sets the LEADING DIMENSION of the workspace
-* before calling SSYTRI2X that actually computes the inverse.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by SSYTRF.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NB structure of D
-* as determined by SSYTRF.
-*
-* WORK (workspace) REAL array, dimension (N+NB+1)*(NB+3)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* WORK is size >= (N+NB+1)*(NB+3)
-* If LDWORK = -1, then a workspace query is assumed; the routine
-* calculates:
-* - the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array,
-* - and no error message related to LDWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/ssytri2x.f b/SRC/ssytri2x.f
index 81188bf2..6a38407e 100644
--- a/SRC/ssytri2x.f
+++ b/SRC/ssytri2x.f
@@ -1,68 +1,131 @@
- SUBROUTINE SSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*> \brief \b SSYTRI2X
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N, NB
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), WORK( N+NB+1,* )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), WORK( N+NB+1,* )
+* ..
+*
* Purpose
* =======
*
-* SSYTRI2X computes the inverse of a real symmetric indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* SSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTRI2X computes the inverse of a real symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> SSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the NNB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by SSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the NNB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NNB structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N+NNB+1,NNB+3)
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NNB structure of D
-* as determined by SSYTRF.
+*> \ingroup realSYcomputational
*
-* WORK (workspace) REAL array, dimension (N+NNB+1,NNB+3)
+* =====================================================================
+ SUBROUTINE SSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
*
-* NB (input) INTEGER
-* Block size
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), WORK( N+NB+1,* )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssytrs.f b/SRC/ssytrs.f
index 1fca3a10..fe4c3b15 100644
--- a/SRC/ssytrs.f
+++ b/SRC/ssytrs.f
@@ -1,63 +1,130 @@
- SUBROUTINE SSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SSYTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SSYTRS solves a system of linear equations A*X = B with a real
-* symmetric matrix A using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by SSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTRS solves a system of linear equations A*X = B with a real
+*> symmetric matrix A using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by SSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
+*> \ingroup realSYcomputational
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE SSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ssytrs2.f b/SRC/ssytrs2.f
index d96ee309..7d9192f1 100644
--- a/SRC/ssytrs2.f
+++ b/SRC/ssytrs2.f
@@ -1,68 +1,137 @@
- SUBROUTINE SSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
- $ WORK, INFO )
+*> \brief \b SSYTRS2
*
-* -- LAPACK PROTOTYPE routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SSYTRS2 solves a system of linear equations A*X = B with a real
-* symmetric matrix A using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by SSYTRF and converted by SSYCONV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYTRS2 solves a system of linear equations A*X = B with a real
+*> symmetric matrix A using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by SSYTRF and converted by SSYCONV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by SSYTRF.
+*> \date November 2011
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \ingroup realSYcomputational
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE SSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+ $ WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stbcon.f b/SRC/stbcon.f
index 530d2271..2f8f81f6 100644
--- a/SRC/stbcon.f
+++ b/SRC/stbcon.f
@@ -1,12 +1,144 @@
+*> \brief \b STBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, KD, LDAB, N
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBCON estimates the reciprocal of the condition number of a
+*> triangular band matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,65 +150,6 @@
REAL AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STBCON estimates the reciprocal of the condition number of a
-* triangular band matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stbrfs.f b/SRC/stbrfs.f
index 1e159e88..a209a7ef 100644
--- a/SRC/stbrfs.f
+++ b/SRC/stbrfs.f
@@ -1,12 +1,189 @@
+*> \brief \b STBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AB( LDAB, * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular band
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by STBTRS or some other
+*> means before entering this routine. STBRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,92 +195,6 @@
$ FERR( * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* STBRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular band
-* coefficient matrix.
-*
-* The solution matrix X must be computed by STBTRS or some other
-* means before entering this routine. STBRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stbtrs.f b/SRC/stbtrs.f
index 78fe9978..7642c14b 100644
--- a/SRC/stbtrs.f
+++ b/SRC/stbtrs.f
@@ -1,10 +1,147 @@
+*> \brief \b STBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBTRS solves a triangular system of the form
+*>
+*> A * X = B or A**T * X = B,
+*>
+*> where A is a triangular band matrix of order N, and B is an
+*> N-by NRHS matrix. A check is made to verify that A is nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of AB. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the
+*> solutions X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,70 +151,6 @@
REAL AB( LDAB, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* STBTRS solves a triangular system of the form
-*
-* A * X = B or A**T * X = B,
-*
-* where A is a triangular band matrix of order N, and B is an
-* N-by NRHS matrix. A check is made to verify that A is nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of AB. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the
-* solutions X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stfsm.f b/SRC/stfsm.f
index 6a5f782e..2a46d1ec 100644
--- a/SRC/stfsm.f
+++ b/SRC/stfsm.f
@@ -1,217 +1,302 @@
- SUBROUTINE STFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
- $ B, LDB )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b STFSM
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
- INTEGER LDB, M, N
- REAL ALPHA
-* ..
-* .. Array Arguments ..
- REAL A( 0: * ), B( 0: LDB-1, 0: * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE STFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
+* B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
+* INTEGER LDB, M, N
+* REAL ALPHA
+* ..
+* .. Array Arguments ..
+* REAL A( 0: * ), B( 0: LDB-1, 0: * )
+* ..
+*
* Purpose
* =======
*
-* Level 3 BLAS like routine for A in RFP Format.
-*
-* STFSM solves the matrix equation
-*
-* op( A )*X = alpha*B or X*op( A ) = alpha*B
-*
-* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**T.
-*
-* A is in Rectangular Full Packed (RFP) Format.
-*
-* The matrix X is overwritten on B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Level 3 BLAS like routine for A in RFP Format.
+*>
+*> STFSM solves the matrix equation
+*>
+*> op( A )*X = alpha*B or X*op( A ) = alpha*B
+*>
+*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**T.
+*>
+*> A is in Rectangular Full Packed (RFP) Format.
+*>
+*> The matrix X is overwritten on B.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal Form of RFP A is stored;
-* = 'T': The Transpose Form of RFP A is stored.
-*
-* SIDE (input) CHARACTER*1
-* On entry, SIDE specifies whether op( A ) appears on the left
-* or right of X as follows:
-*
-* SIDE = 'L' or 'l' op( A )*X = alpha*B.
-*
-* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
-*
-* Unchanged on exit.
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the RFP matrix A came from
-* an upper or lower triangular matrix as follows:
-* UPLO = 'U' or 'u' RFP A came from an upper triangular matrix
-* UPLO = 'L' or 'l' RFP A came from a lower triangular matrix
-*
-* Unchanged on exit.
-*
-* TRANS (input) CHARACTER*1
-* On entry, TRANS specifies the form of op( A ) to be used
-* in the matrix multiplication as follows:
-*
-* TRANS = 'N' or 'n' op( A ) = A.
-*
-* TRANS = 'T' or 't' op( A ) = A'.
-*
-* Unchanged on exit.
-*
-* DIAG (input) CHARACTER*1
-* On entry, DIAG specifies whether or not RFP A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
+* =========
*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal Form of RFP A is stored;
+*> = 'T': The Transpose Form of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) appears on the left
+*> or right of X as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the RFP matrix A came from
+*> an upper or lower triangular matrix as follows:
+*> UPLO = 'U' or 'u' RFP A came from an upper triangular matrix
+*> UPLO = 'L' or 'l' RFP A came from a lower triangular matrix
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the form of op( A ) to be used
+*> in the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'T' or 't' op( A ) = A'.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not RFP A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (NT)
+*> NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
+*> RFP Format is described by TRANSR, UPLO and N as follows:
+*> If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
+*> K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
+*> TRANSR = 'T' then RFP is the transpose of RFP A as
+*> defined when TRANSR = 'N'. The contents of RFP A are defined
+*> by UPLO as follows: If UPLO = 'U' the RFP A contains the NT
+*> elements of upper packed A either in normal or
+*> transpose Format. If UPLO = 'L' the RFP A contains
+*> the NT elements of lower packed A either in normal or
+*> transpose Format. The LDA of RFP A is (N+1)/2 when
+*> TRANSR = 'T'. When TRANSR is 'N' the LDA is N+1 when N is
+*> even and is N when is odd.
+*> See the Note below for more details. Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, DIMENSION (LDB,N)
+*> Before entry, the leading m by n part of the array B must
+*> contain the right-hand side matrix B, and on exit is
+*> overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) REAL
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) REAL array, dimension (NT)
-* NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
-* RFP Format is described by TRANSR, UPLO and N as follows:
-* If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
-* K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
-* TRANSR = 'T' then RFP is the transpose of RFP A as
-* defined when TRANSR = 'N'. The contents of RFP A are defined
-* by UPLO as follows: If UPLO = 'U' the RFP A contains the NT
-* elements of upper packed A either in normal or
-* transpose Format. If UPLO = 'L' the RFP A contains
-* the NT elements of lower packed A either in normal or
-* transpose Format. The LDA of RFP A is (N+1)/2 when
-* TRANSR = 'T'. When TRANSR is 'N' the LDA is N+1 when N is
-* even and is N when is odd.
-* See the Note below for more details. Unchanged on exit.
+*> \date November 2011
*
-* B (input/output) REAL array, DIMENSION (LDB,N)
-* Before entry, the leading m by n part of the array B must
-* contain the right-hand side matrix B, and on exit is
-* overwritten by the solution matrix X.
+*> \ingroup realOTHERcomputational
*
-* LDB (input) INTEGER
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> Reference
+*> =========
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
+ $ B, LDB )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
-*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference
-* =========
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
+ INTEGER LDB, M, N
+ REAL ALPHA
+* ..
+* .. Array Arguments ..
+ REAL A( 0: * ), B( 0: LDB-1, 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stftri.f b/SRC/stftri.f
index d30f6d88..40906ad6 100644
--- a/SRC/stftri.f
+++ b/SRC/stftri.f
@@ -1,153 +1,213 @@
- SUBROUTINE STFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO, DIAG
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL A( 0: * )
-* ..
-*
+*> \brief \b STFTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO, DIAG
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* STFTRI computes the inverse of a triangular matrix A stored in RFP
-* format.
-*
-* This is a Level 3 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STFTRI computes the inverse of a triangular matrix A stored in RFP
+*> format.
+*>
+*> This is a Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'T': The Transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (NT);
-* NT=N*(N+1)/2. On entry, the triangular factor of a Hermitian
-* Positive Definite matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
-* the transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A; If UPLO = 'L' the RFP A contains the nt
-* elements of lower packed A. The LDA of RFP A is (N+1)/2 when
-* TRANSR = 'T'. When TRANSR is 'N' the LDA is N+1 when N is
-* even and N is odd. See the Note below for more details.
-*
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
-*
-* Further Details
-* ===============
-*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'T': The Transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (NT);
+*> NT=N*(N+1)/2. On entry, the triangular factor of a Hermitian
+*> Positive Definite matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'T' then RFP is
+*> the transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A; If UPLO = 'L' the RFP A contains the nt
+*> elements of lower packed A. The LDA of RFP A is (N+1)/2 when
+*> TRANSR = 'T'. When TRANSR is 'N' the LDA is N+1 when N is
+*> even and N is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
+*> \date November 2011
*
-* RFP A RFP A
+*> \ingroup realOTHERcomputational
*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO, DIAG
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stfttp.f b/SRC/stfttp.f
index 1f6b12d2..c53adf61 100644
--- a/SRC/stfttp.f
+++ b/SRC/stfttp.f
@@ -1,140 +1,198 @@
- SUBROUTINE STFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL AP( 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b STFTTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL AP( 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* STFTTP copies a triangular matrix A from rectangular full packed
-* format (TF) to standard packed format (TP).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STFTTP copies a triangular matrix A from rectangular full packed
+*> format (TF) to standard packed format (TP).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF is in Normal format;
-* = 'T': ARF is in Transpose format;
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF is in Normal format;
+*> = 'T': ARF is in Transpose format;
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ARF
+*> \verbatim
+*> ARF is REAL array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is REAL array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ARF (input) REAL array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \date November 2011
*
-* AP (output) REAL array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL AP( 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stfttr.f b/SRC/stfttr.f
index 630b8d33..2b44fe83 100644
--- a/SRC/stfttr.f
+++ b/SRC/stfttr.f
@@ -1,148 +1,210 @@
- SUBROUTINE STFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N, LDA
-* ..
-* .. Array Arguments ..
- REAL A( 0: LDA-1, 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b STFTTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* REAL A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* STFTTR copies a triangular matrix A from rectangular full packed
-* format (TF) to standard full format (TR).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STFTTR copies a triangular matrix A from rectangular full packed
+*> format (TF) to standard full format (TR).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF is in Normal format;
-* = 'T': ARF is in Transpose format.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrices ARF and A. N >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF is in Normal format;
+*> = 'T': ARF is in Transpose format.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices ARF and A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ARF
+*> \verbatim
+*> ARF is REAL array, dimension (N*(N+1)/2).
+*> On entry, the upper (if UPLO = 'U') or lower (if UPLO = 'L')
+*> matrix A in RFP format. See the "Notes" below for more
+*> details.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On exit, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ARF (input) REAL array, dimension (N*(N+1)/2).
-* On entry, the upper (if UPLO = 'U') or lower (if UPLO = 'L')
-* matrix A in RFP format. See the "Notes" below for more
-* details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) REAL array, dimension (LDA,N)
-* On exit, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> Reference
+*> =========
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
-*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference
-* =========
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+ REAL A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stgevc.f b/SRC/stgevc.f
index 27a615f7..c31a93e2 100644
--- a/SRC/stgevc.f
+++ b/SRC/stgevc.f
@@ -1,212 +1,312 @@
- SUBROUTINE STGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
- $ LDVL, VR, LDVR, MM, M, WORK, INFO )
+*> \brief \b STGEVC
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER HOWMNY, SIDE
- INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N
-* ..
-* .. Array Arguments ..
- LOGICAL SELECT( * )
- REAL P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
- $ VR( LDVR, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
*
+* SUBROUTINE STGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
+* LDVL, VR, LDVR, MM, M, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, SIDE
+* INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* REAL P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+*
* Purpose
* =======
*
-* STGEVC computes some or all of the right and/or left eigenvectors of
-* a pair of real matrices (S,P), where S is a quasi-triangular matrix
-* and P is upper triangular. Matrix pairs of this type are produced by
-* the generalized Schur factorization of a matrix pair (A,B):
-*
-* A = Q*S*Z**T, B = Q*P*Z**T
-*
-* as computed by SGGHRD + SHGEQZ.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STGEVC computes some or all of the right and/or left eigenvectors of
+*> a pair of real matrices (S,P), where S is a quasi-triangular matrix
+*> and P is upper triangular. Matrix pairs of this type are produced by
+*> the generalized Schur factorization of a matrix pair (A,B):
+*>
+*> A = Q*S*Z**T, B = Q*P*Z**T
+*>
+*> as computed by SGGHRD + SHGEQZ.
+*>
+*> The right eigenvector x and the left eigenvector y of (S,P)
+*> corresponding to an eigenvalue w are defined by:
+*>
+*> S*x = w*P*x, (y**H)*S = w*(y**H)*P,
+*>
+*> where y**H denotes the conjugate tranpose of y.
+*> The eigenvalues are not input to this routine, but are computed
+*> directly from the diagonal blocks of S and P.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of (S,P), or the products Z*X and/or Q*Y,
+*> where Z and Q are input matrices.
+*> If Q and Z are the orthogonal factors from the generalized Schur
+*> factorization of a matrix pair (A,B), then Z*X and Q*Y
+*> are the matrices of right and left eigenvectors of (A,B).
+*>
+*>\endverbatim
*
-* The right eigenvector x and the left eigenvector y of (S,P)
-* corresponding to an eigenvalue w are defined by:
-*
-* S*x = w*P*x, (y**H)*S = w*(y**H)*P,
-*
-* where y**H denotes the conjugate tranpose of y.
-* The eigenvalues are not input to this routine, but are computed
-* directly from the diagonal blocks of S and P.
-*
-* This routine returns the matrices X and/or Y of right and left
-* eigenvectors of (S,P), or the products Z*X and/or Q*Y,
-* where Z and Q are input matrices.
-* If Q and Z are the orthogonal factors from the generalized Schur
-* factorization of a matrix pair (A,B), then Z*X and Q*Y
-* are the matrices of right and left eigenvectors of (A,B).
-*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute all right and/or left eigenvectors;
-* = 'B': compute all right and/or left eigenvectors,
-* backtransformed by the matrices in VR and/or VL;
-* = 'S': compute selected right and/or left eigenvectors,
-* specified by the logical array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY='S', SELECT specifies the eigenvectors to be
-* computed. If w(j) is a real eigenvalue, the corresponding
-* real eigenvector is computed if SELECT(j) is .TRUE..
-* If w(j) and w(j+1) are the real and imaginary parts of a
-* complex eigenvalue, the corresponding complex eigenvector
-* is computed if either SELECT(j) or SELECT(j+1) is .TRUE.,
-* and on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is
-* set to .FALSE..
-* Not referenced if HOWMNY = 'A' or 'B'.
-*
-* N (input) INTEGER
-* The order of the matrices S and P. N >= 0.
-*
-* S (input) REAL array, dimension (LDS,N)
-* The upper quasi-triangular matrix S from a generalized Schur
-* factorization, as computed by SHGEQZ.
-*
-* LDS (input) INTEGER
-* The leading dimension of array S. LDS >= max(1,N).
-*
-* P (input) REAL array, dimension (LDP,N)
-* The upper triangular matrix P from a generalized Schur
-* factorization, as computed by SHGEQZ.
-* 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks
-* of S must be in positive diagonal form.
-*
-* LDP (input) INTEGER
-* The leading dimension of array P. LDP >= max(1,N).
-*
-* VL (input/output) REAL array, dimension (LDVL,MM)
-* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-* contain an N-by-N matrix Q (usually the orthogonal matrix Q
-* of left Schur vectors returned by SHGEQZ).
-* On exit, if SIDE = 'L' or 'B', VL contains:
-* if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
-* if HOWMNY = 'B', the matrix Q*Y;
-* if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
-* SELECT, stored consecutively in the columns of
-* VL, in the same order as their eigenvalues.
-*
-* A complex eigenvector corresponding to a complex eigenvalue
-* is stored in two consecutive columns, the first holding the
-* real part, and the second the imaginary part.
-*
-* Not referenced if SIDE = 'R'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of array VL. LDVL >= 1, and if
-* SIDE = 'L' or 'B', LDVL >= N.
-*
-* VR (input/output) REAL array, dimension (LDVR,MM)
-* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-* contain an N-by-N matrix Z (usually the orthogonal matrix Z
-* of right Schur vectors returned by SHGEQZ).
-*
-* On exit, if SIDE = 'R' or 'B', VR contains:
-* if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
-* if HOWMNY = 'B' or 'b', the matrix Z*X;
-* if HOWMNY = 'S' or 's', the right eigenvectors of (S,P)
-* specified by SELECT, stored consecutively in the
-* columns of VR, in the same order as their
-* eigenvalues.
-*
-* A complex eigenvector corresponding to a complex eigenvalue
-* is stored in two consecutive columns, the first holding the
-* real part and the second the imaginary part.
-*
-* Not referenced if SIDE = 'L'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* SIDE = 'R' or 'B', LDVR >= N.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR actually
-* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
-* is set to N. Each selected real eigenvector occupies one
-* column and each selected complex eigenvector occupies two
-* columns.
-*
-* WORK (workspace) REAL array, dimension (6*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the 2-by-2 block (INFO:INFO+1) does not have a complex
-* eigenvalue.
-*
-* Further Details
-* ===============
-*
-* Allocation of workspace:
-* ---------- -- ---------
-*
-* WORK( j ) = 1-norm of j-th column of A, above the diagonal
-* WORK( N+j ) = 1-norm of j-th column of B, above the diagonal
-* WORK( 2*N+1:3*N ) = real part of eigenvector
-* WORK( 3*N+1:4*N ) = imaginary part of eigenvector
-* WORK( 4*N+1:5*N ) = real part of back-transformed eigenvector
-* WORK( 5*N+1:6*N ) = imaginary part of back-transformed eigenvector
-*
-* Rowwise vs. columnwise solution methods:
-* ------- -- ---------- -------- -------
-*
-* Finding a generalized eigenvector consists basically of solving the
-* singular triangular system
-*
-* (A - w B) x = 0 (for right) or: (A - w B)**H y = 0 (for left)
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute all right and/or left eigenvectors;
+*> = 'B': compute all right and/or left eigenvectors,
+*> backtransformed by the matrices in VR and/or VL;
+*> = 'S': compute selected right and/or left eigenvectors,
+*> specified by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY='S', SELECT specifies the eigenvectors to be
+*> computed. If w(j) is a real eigenvalue, the corresponding
+*> real eigenvector is computed if SELECT(j) is .TRUE..
+*> If w(j) and w(j+1) are the real and imaginary parts of a
+*> complex eigenvalue, the corresponding complex eigenvector
+*> is computed if either SELECT(j) or SELECT(j+1) is .TRUE.,
+*> and on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is
+*> set to .FALSE..
+*> Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices S and P. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (LDS,N)
+*> The upper quasi-triangular matrix S from a generalized Schur
+*> factorization, as computed by SHGEQZ.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of array S. LDS >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is REAL array, dimension (LDP,N)
+*> The upper triangular matrix P from a generalized Schur
+*> factorization, as computed by SHGEQZ.
+*> 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks
+*> of S must be in positive diagonal form.
+*> \endverbatim
+*>
+*> \param[in] LDP
+*> \verbatim
+*> LDP is INTEGER
+*> The leading dimension of array P. LDP >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,MM)
+*> On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*> contain an N-by-N matrix Q (usually the orthogonal matrix Q
+*> of left Schur vectors returned by SHGEQZ).
+*> On exit, if SIDE = 'L' or 'B', VL contains:
+*> if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
+*> if HOWMNY = 'B', the matrix Q*Y;
+*> if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
+*> SELECT, stored consecutively in the columns of
+*> VL, in the same order as their eigenvalues.
+*> \endverbatim
+*> \verbatim
+*> A complex eigenvector corresponding to a complex eigenvalue
+*> is stored in two consecutive columns, the first holding the
+*> real part, and the second the imaginary part.
+*> \endverbatim
+*> \verbatim
+*> Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of array VL. LDVL >= 1, and if
+*> SIDE = 'L' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,MM)
+*> On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*> contain an N-by-N matrix Z (usually the orthogonal matrix Z
+*> of right Schur vectors returned by SHGEQZ).
+*> \endverbatim
+*> \verbatim
+*> On exit, if SIDE = 'R' or 'B', VR contains:
+*> if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
+*> if HOWMNY = 'B' or 'b', the matrix Z*X;
+*> if HOWMNY = 'S' or 's', the right eigenvectors of (S,P)
+*> specified by SELECT, stored consecutively in the
+*> columns of VR, in the same order as their
+*> eigenvalues.
+*> \endverbatim
+*> \verbatim
+*> A complex eigenvector corresponding to a complex eigenvalue
+*> is stored in two consecutive columns, the first holding the
+*> real part and the second the imaginary part.
+*>
+*> Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> SIDE = 'R' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR actually
+*> used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
+*> is set to N. Each selected real eigenvector occupies one
+*> column and each selected complex eigenvector occupies two
+*> columns.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (6*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the 2-by-2 block (INFO:INFO+1) does not have a complex
+*> eigenvalue.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Consider finding the i-th right eigenvector (assume all eigenvalues
-* are real). The equation to be solved is:
-* n i
-* 0 = sum C(j,k) v(k) = sum C(j,k) v(k) for j = i,. . .,1
-* k=j k=j
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* where C = (A - w B) (The components v(i+1:n) are 0.)
+*> \date November 2011
*
-* The "rowwise" method is:
+*> \ingroup realGEcomputational
*
-* (1) v(i) := 1
-* for j = i-1,. . .,1:
-* i
-* (2) compute s = - sum C(j,k) v(k) and
-* k=j+1
*
-* (3) v(j) := s / C(j,j)
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Allocation of workspace:
+*> ---------- -- ---------
+*>
+*> WORK( j ) = 1-norm of j-th column of A, above the diagonal
+*> WORK( N+j ) = 1-norm of j-th column of B, above the diagonal
+*> WORK( 2*N+1:3*N ) = real part of eigenvector
+*> WORK( 3*N+1:4*N ) = imaginary part of eigenvector
+*> WORK( 4*N+1:5*N ) = real part of back-transformed eigenvector
+*> WORK( 5*N+1:6*N ) = imaginary part of back-transformed eigenvector
+*>
+*> Rowwise vs. columnwise solution methods:
+*> ------- -- ---------- -------- -------
+*>
+*> Finding a generalized eigenvector consists basically of solving the
+*> singular triangular system
+*>
+*> (A - w B) x = 0 (for right) or: (A - w B)**H y = 0 (for left)
+*>
+*> Consider finding the i-th right eigenvector (assume all eigenvalues
+*> are real). The equation to be solved is:
+*> n i
+*> 0 = sum C(j,k) v(k) = sum C(j,k) v(k) for j = i,. . .,1
+*> k=j k=j
+*>
+*> where C = (A - w B) (The components v(i+1:n) are 0.)
+*>
+*> The "rowwise" method is:
+*>
+*> (1) v(i) := 1
+*> for j = i-1,. . .,1:
+*> i
+*> (2) compute s = - sum C(j,k) v(k) and
+*> k=j+1
+*>
+*> (3) v(j) := s / C(j,j)
+*>
+*> Step 2 is sometimes called the "dot product" step, since it is an
+*> inner product between the j-th row and the portion of the eigenvector
+*> that has been computed so far.
+*>
+*> The "columnwise" method consists basically in doing the sums
+*> for all the rows in parallel. As each v(j) is computed, the
+*> contribution of v(j) times the j-th column of C is added to the
+*> partial sums. Since FORTRAN arrays are stored columnwise, this has
+*> the advantage that at each step, the elements of C that are accessed
+*> are adjacent to one another, whereas with the rowwise method, the
+*> elements accessed at a step are spaced LDS (and LDP) words apart.
+*>
+*> When finding left eigenvectors, the matrix in question is the
+*> transpose of the one in storage, so the rowwise method then
+*> actually accesses columns of A and B at each step, and so is the
+*> preferred method.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
+ $ LDVL, VR, LDVR, MM, M, WORK, INFO )
*
-* Step 2 is sometimes called the "dot product" step, since it is an
-* inner product between the j-th row and the portion of the eigenvector
-* that has been computed so far.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* The "columnwise" method consists basically in doing the sums
-* for all the rows in parallel. As each v(j) is computed, the
-* contribution of v(j) times the j-th column of C is added to the
-* partial sums. Since FORTRAN arrays are stored columnwise, this has
-* the advantage that at each step, the elements of C that are accessed
-* are adjacent to one another, whereas with the rowwise method, the
-* elements accessed at a step are spaced LDS (and LDP) words apart.
+* .. Scalar Arguments ..
+ CHARACTER HOWMNY, SIDE
+ INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+ LOGICAL SELECT( * )
+ REAL P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
+ $ VR( LDVR, * ), WORK( * )
+* ..
*
-* When finding left eigenvectors, the matrix in question is the
-* transpose of the one in storage, so the rowwise method then
-* actually accesses columns of A and B at each step, and so is the
-* preferred method.
*
* =====================================================================
*
diff --git a/SRC/stgex2.f b/SRC/stgex2.f
index 7cb03174..63def23c 100644
--- a/SRC/stgex2.f
+++ b/SRC/stgex2.f
@@ -1,131 +1,228 @@
- SUBROUTINE STGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
- $ LDZ, J1, N1, N2, WORK, LWORK, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- LOGICAL WANTQ, WANTZ
- INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
- $ WORK( * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b STGEX2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+* LDZ, J1, N1, N2, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* STGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22)
-* of size 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair
-* (A, B) by an orthogonal equivalence transformation.
-*
-* (A, B) must be in generalized real Schur canonical form (as returned
-* by SGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2
-* diagonal blocks. B is upper triangular.
-*
-* Optionally, the matrices Q and Z of generalized Schur vectors are
-* updated.
-*
-* Q(in) * A(in) * Z(in)**T = Q(out) * A(out) * Z(out)**T
-* Q(in) * B(in) * Z(in)**T = Q(out) * B(out) * Z(out)**T
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22)
+*> of size 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair
+*> (A, B) by an orthogonal equivalence transformation.
+*>
+*> (A, B) must be in generalized real Schur canonical form (as returned
+*> by SGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2
+*> diagonal blocks. B is upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*> Q(in) * A(in) * Z(in)**T = Q(out) * A(out) * Z(out)**T
+*> Q(in) * B(in) * Z(in)**T = Q(out) * B(out) * Z(out)**T
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) REAL arrays, dimensions (LDA,N)
-* On entry, the matrix A in the pair (A, B).
-* On exit, the updated matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL arrays, dimensions (LDB,N)
-* On entry, the matrix B in the pair (A, B).
-* On exit, the updated matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) REAL array, dimension (LDZ,N)
-* On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
-* On exit, the updated matrix Q.
-* Not referenced if WANTQ = .FALSE..
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) REAL array, dimension (LDZ,N)
-* On entry, if WANTZ =.TRUE., the orthogonal matrix Z.
-* On exit, the updated matrix Z.
-* Not referenced if WANTZ = .FALSE..
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If WANTZ = .TRUE., LDZ >= N.
-*
-* J1 (input) INTEGER
-* The index to the first block (A11, B11). 1 <= J1 <= N.
-*
-* N1 (input) INTEGER
-* The order of the first block (A11, B11). N1 = 0, 1 or 2.
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL arrays, dimensions (LDA,N)
+*> On entry, the matrix A in the pair (A, B).
+*> On exit, the updated matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL arrays, dimensions (LDB,N)
+*> On entry, the matrix B in the pair (A, B).
+*> On exit, the updated matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDZ,N)
+*> On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
+*> On exit, the updated matrix Q.
+*> Not referenced if WANTQ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,N)
+*> On entry, if WANTZ =.TRUE., the orthogonal matrix Z.
+*> On exit, the updated matrix Z.
+*> Not referenced if WANTZ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in] J1
+*> \verbatim
+*> J1 is INTEGER
+*> The index to the first block (A11, B11). 1 <= J1 <= N.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The order of the first block (A11, B11). N1 = 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> The order of the second block (A22, B22). N2 = 0, 1 or 2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK)).
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX( N*(N2+N1), (N2+N1)*(N2+N1)*2 )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit
+*> >0: If INFO = 1, the transformed matrix (A, B) would be
+*> too far from generalized Schur form; the blocks are
+*> not swapped and (A, B) and (Q, Z) are unchanged.
+*> The problem of swapping is too ill-conditioned.
+*> <0: If INFO = -16: LWORK is too small. Appropriate value
+*> for LWORK is returned in WORK(1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N2 (input) INTEGER
-* The order of the second block (A22, B22). N2 = 0, 1 or 2.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) REAL array, dimension (MAX(1,LWORK)).
+*> \date November 2011
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX( N*(N2+N1), (N2+N1)*(N2+N1)*2 )
+*> \ingroup realGEauxiliary
*
-* INFO (output) INTEGER
-* =0: Successful exit
-* >0: If INFO = 1, the transformed matrix (A, B) would be
-* too far from generalized Schur form; the blocks are
-* not swapped and (A, B) and (Q, Z) are unchanged.
-* The problem of swapping is too ill-conditioned.
-* <0: If INFO = -16: LWORK is too small. Appropriate value
-* for LWORK is returned in WORK(1).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> In the current code both weak and strong stability tests are
+*> performed. The user can omit the strong stability test by changing
+*> the internal logical parameter WANDS to .FALSE.. See ref. [2] for
+*> details.
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software,
+*> Report UMINF - 94.04, Department of Computing Science, Umea
+*> University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
+*> Note 87. To appear in Numerical Algorithms, 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+ $ LDZ, J1, N1, N2, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* In the current code both weak and strong stability tests are
-* performed. The user can omit the strong stability test by changing
-* the internal logical parameter WANDS to .FALSE.. See ref. [2] for
-* details.
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software,
-* Report UMINF - 94.04, Department of Computing Science, Umea
-* University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
-* Note 87. To appear in Numerical Algorithms, 1996.
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL WANTQ, WANTZ
+ INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+ $ WORK( * ), Z( LDZ, * )
+* ..
*
* =====================================================================
* Replaced various illegal calls to SCOPY by calls to SLASET, or by DO
diff --git a/SRC/stgexc.f b/SRC/stgexc.f
index 73cd09b5..568ca11f 100644
--- a/SRC/stgexc.f
+++ b/SRC/stgexc.f
@@ -1,136 +1,231 @@
- SUBROUTINE STGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
- $ LDZ, IFST, ILST, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- LOGICAL WANTQ, WANTZ
- INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
- $ WORK( * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b STGEXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+* LDZ, IFST, ILST, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* STGEXC reorders the generalized real Schur decomposition of a real
-* matrix pair (A,B) using an orthogonal equivalence transformation
-*
-* (A, B) = Q * (A, B) * Z**T,
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STGEXC reorders the generalized real Schur decomposition of a real
+*> matrix pair (A,B) using an orthogonal equivalence transformation
+*>
+*> (A, B) = Q * (A, B) * Z**T,
+*>
+*> so that the diagonal block of (A, B) with row index IFST is moved
+*> to row ILST.
+*>
+*> (A, B) must be in generalized real Schur canonical form (as returned
+*> by SGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2
+*> diagonal blocks. B is upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*> Q(in) * A(in) * Z(in)**T = Q(out) * A(out) * Z(out)**T
+*> Q(in) * B(in) * Z(in)**T = Q(out) * B(out) * Z(out)**T
+*>
+*>
+*>\endverbatim
*
-* so that the diagonal block of (A, B) with row index IFST is moved
-* to row ILST.
-*
-* (A, B) must be in generalized real Schur canonical form (as returned
-* by SGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2
-* diagonal blocks. B is upper triangular.
+* Arguments
+* =========
*
-* Optionally, the matrices Q and Z of generalized Schur vectors are
-* updated.
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the matrix A in generalized real Schur canonical
+*> form.
+*> On exit, the updated matrix A, again in generalized
+*> real Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> On entry, the matrix B in generalized real Schur canonical
+*> form (A,B).
+*> On exit, the updated matrix B, again in generalized
+*> real Schur canonical form (A,B).
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDZ,N)
+*> On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
+*> On exit, the updated matrix Q.
+*> If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,N)
+*> On entry, if WANTZ = .TRUE., the orthogonal matrix Z.
+*> On exit, the updated matrix Z.
+*> If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] IFST
+*> \verbatim
+*> IFST is INTEGER
+*> \endverbatim
+*>
+*> \param[in,out] ILST
+*> \verbatim
+*> ILST is INTEGER
+*> Specify the reordering of the diagonal blocks of (A, B).
+*> The block with row index IFST is moved to row ILST, by a
+*> sequence of swapping between adjacent blocks.
+*> On exit, if IFST pointed on entry to the second row of
+*> a 2-by-2 block, it is changed to point to the first row;
+*> ILST always points to the first row of the block in its
+*> final position (which may differ from its input value by
+*> +1 or -1). 1 <= IFST, ILST <= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= 1 when N <= 1, otherwise LWORK >= 4*N + 16.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: successful exit.
+*> <0: if INFO = -i, the i-th argument had an illegal value.
+*> =1: The transformed matrix pair (A, B) would be too far
+*> from generalized Schur form; the problem is ill-
+*> conditioned. (A, B) may have been partially reordered,
+*> and ILST points to the first row of the current
+*> position of the block being moved.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Q(in) * A(in) * Z(in)**T = Q(out) * A(out) * Z(out)**T
-* Q(in) * B(in) * Z(in)**T = Q(out) * B(out) * Z(out)**T
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup realGEcomputational
*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the matrix A in generalized real Schur canonical
-* form.
-* On exit, the updated matrix A, again in generalized
-* real Schur canonical form.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the matrix B in generalized real Schur canonical
-* form (A,B).
-* On exit, the updated matrix B, again in generalized
-* real Schur canonical form (A,B).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) REAL array, dimension (LDZ,N)
-* On entry, if WANTQ = .TRUE., the orthogonal matrix Q.
-* On exit, the updated matrix Q.
-* If WANTQ = .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) REAL array, dimension (LDZ,N)
-* On entry, if WANTZ = .TRUE., the orthogonal matrix Z.
-* On exit, the updated matrix Z.
-* If WANTZ = .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If WANTZ = .TRUE., LDZ >= N.
-*
-* IFST (input/output) INTEGER
-*
-* ILST (input/output) INTEGER
-* Specify the reordering of the diagonal blocks of (A, B).
-* The block with row index IFST is moved to row ILST, by a
-* sequence of swapping between adjacent blocks.
-* On exit, if IFST pointed on entry to the second row of
-* a 2-by-2 block, it is changed to point to the first row;
-* ILST always points to the first row of the block in its
-* final position (which may differ from its input value by
-* +1 or -1). 1 <= IFST, ILST <= N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= 1 when N <= 1, otherwise LWORK >= 4*N + 16.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* =0: successful exit.
-* <0: if INFO = -i, the i-th argument had an illegal value.
-* =1: The transformed matrix pair (A, B) would be too far
-* from generalized Schur form; the problem is ill-
-* conditioned. (A, B) may have been partially reordered,
-* and ILST points to the first row of the current
-* position of the block being moved.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+ $ LDZ, IFST, ILST, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+* .. Scalar Arguments ..
+ LOGICAL WANTQ, WANTZ
+ INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+ $ WORK( * ), Z( LDZ, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stgsen.f b/SRC/stgsen.f
index 85121dbd..265db88e 100644
--- a/SRC/stgsen.f
+++ b/SRC/stgsen.f
@@ -1,13 +1,446 @@
+*> \brief \b STGSEN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
+* ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL,
+* PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK,
+* $ M, N
+* REAL PL, PR
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), DIF( * ), Q( LDQ, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STGSEN reorders the generalized real Schur decomposition of a real
+*> matrix pair (A, B) (in terms of an orthonormal equivalence trans-
+*> formation Q**T * (A, B) * Z), so that a selected cluster of eigenvalues
+*> appears in the leading diagonal blocks of the upper quasi-triangular
+*> matrix A and the upper triangular B. The leading columns of Q and
+*> Z form orthonormal bases of the corresponding left and right eigen-
+*> spaces (deflating subspaces). (A, B) must be in generalized real
+*> Schur canonical form (as returned by SGGES), i.e. A is block upper
+*> triangular with 1-by-1 and 2-by-2 diagonal blocks. B is upper
+*> triangular.
+*>
+*> STGSEN also computes the generalized eigenvalues
+*>
+*> w(j) = (ALPHAR(j) + i*ALPHAI(j))/BETA(j)
+*>
+*> of the reordered matrix pair (A, B).
+*>
+*> Optionally, STGSEN computes the estimates of reciprocal condition
+*> numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
+*> (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
+*> between the matrix pairs (A11, B11) and (A22,B22) that correspond to
+*> the selected cluster and the eigenvalues outside the cluster, resp.,
+*> and norms of "projections" onto left and right eigenspaces w.r.t.
+*> the selected cluster in the (1,1)-block.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies whether condition numbers are required for the
+*> cluster of eigenvalues (PL and PR) or the deflating subspaces
+*> (Difu and Difl):
+*> =0: Only reorder w.r.t. SELECT. No extras.
+*> =1: Reciprocal of norms of "projections" onto left and right
+*> eigenspaces w.r.t. the selected cluster (PL and PR).
+*> =2: Upper bounds on Difu and Difl. F-norm-based estimate
+*> (DIF(1:2)).
+*> =3: Estimate of Difu and Difl. 1-norm-based estimate
+*> (DIF(1:2)).
+*> About 5 times as expensive as IJOB = 2.
+*> =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
+*> version to get it all.
+*> =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
+*> \endverbatim
+*>
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> SELECT specifies the eigenvalues in the selected cluster.
+*> To select a real eigenvalue w(j), SELECT(j) must be set to
+*> .TRUE.. To select a complex conjugate pair of eigenvalues
+*> w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
+*> either SELECT(j) or SELECT(j+1) or both must be set to
+*> .TRUE.; a complex conjugate pair of eigenvalues must be
+*> either both included in the cluster or both excluded.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension(LDA,N)
+*> On entry, the upper quasi-triangular matrix A, with (A, B) in
+*> generalized real Schur canonical form.
+*> On exit, A is overwritten by the reordered matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension(LDB,N)
+*> On entry, the upper triangular matrix B, with (A, B) in
+*> generalized real Schur canonical form.
+*> On exit, B is overwritten by the reordered matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
+*> be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
+*> and BETA(j),j=1,...,N are the diagonals of the complex Schur
+*> form (S,T) that would result if the 2-by-2 diagonal blocks of
+*> the real generalized Schur form of (A,B) were further reduced
+*> to triangular form using complex unitary transformations.
+*> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
+*> positive, then the j-th and (j+1)-st eigenvalues are a
+*> complex conjugate pair, with ALPHAI(j+1) negative.
+*> \endverbatim
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
+*> On exit, Q has been postmultiplied by the left orthogonal
+*> transformation matrix which reorder (A, B); The leading M
+*> columns of Q form orthonormal bases for the specified pair of
+*> left eigenspaces (deflating subspaces).
+*> If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1;
+*> and if WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ,N)
+*> On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
+*> On exit, Z has been postmultiplied by the left orthogonal
+*> transformation matrix which reorder (A, B); The leading M
+*> columns of Z form orthonormal bases for the specified pair of
+*> left eigenspaces (deflating subspaces).
+*> If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1;
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The dimension of the specified pair of left and right eigen-
+*> spaces (deflating subspaces). 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[out] PL
+*> \verbatim
+*> PL is REAL
+*> \param[out] PR
+*> \verbatim
+*> PR is REAL
+*> If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
+*> reciprocal of the norm of "projections" onto left and right
+*> eigenspaces with respect to the selected cluster.
+*> 0 < PL, PR <= 1.
+*> If M = 0 or M = N, PL = PR = 1.
+*> If IJOB = 0, 2 or 3, PL and PR are not referenced.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL array, dimension (2).
+*> If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
+*> If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
+*> Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
+*> estimates of Difu and Difl.
+*> If M = 0 or N, DIF(1:2) = F-norm([A, B]).
+*> If IJOB = 0 or 1, DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 4*N+16.
+*> If IJOB = 1, 2 or 4, LWORK >= MAX(4*N+16, 2*M*(N-M)).
+*> If IJOB = 3 or 5, LWORK >= MAX(4*N+16, 4*M*(N-M)).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= 1.
+*> If IJOB = 1, 2 or 4, LIWORK >= N+6.
+*> If IJOB = 3 or 5, LIWORK >= MAX(2*M*(N-M), N+6).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit.
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> =1: Reordering of (A, B) failed because the transformed
+*> matrix pair (A, B) would be too far from generalized
+*> Schur form; the problem is very ill-conditioned.
+*> (A, B) may have been partially reordered.
+*> If requested, 0 is returned in DIF(*), PL and PR.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> STGSEN first collects the selected eigenvalues by computing
+*> orthogonal U and W that move them to the top left corner of (A, B).
+*> In other words, the selected eigenvalues are the eigenvalues of
+*> (A11, B11) in:
+*>
+*> U**T*(A, B)*W = (A11 A12) (B11 B12) n1
+*> ( 0 A22),( 0 B22) n2
+*> n1 n2 n1 n2
+*>
+*> where N = n1+n2 and U**T means the transpose of U. The first n1 columns
+*> of U and W span the specified pair of left and right eigenspaces
+*> (deflating subspaces) of (A, B).
+*>
+*> If (A, B) has been obtained from the generalized real Schur
+*> decomposition of a matrix pair (C, D) = Q*(A, B)*Z**T, then the
+*> reordered generalized real Schur form of (C, D) is given by
+*>
+*> (C, D) = (Q*U)*(U**T*(A, B)*W)*(Z*W)**T,
+*>
+*> and the first n1 columns of Q*U and Z*W span the corresponding
+*> deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
+*>
+*> Note that if the selected eigenvalue is sufficiently ill-conditioned,
+*> then its value may differ significantly from its value before
+*> reordering.
+*>
+*> The reciprocal condition numbers of the left and right eigenspaces
+*> spanned by the first n1 columns of U and W (or Q*U and Z*W) may
+*> be returned in DIF(1:2), corresponding to Difu and Difl, resp.
+*>
+*> The Difu and Difl are defined as:
+*>
+*> Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
+*> and
+*> Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
+*>
+*> where sigma-min(Zu) is the smallest singular value of the
+*> (2*n1*n2)-by-(2*n1*n2) matrix
+*>
+*> Zu = [ kron(In2, A11) -kron(A22**T, In1) ]
+*> [ kron(In2, B11) -kron(B22**T, In1) ].
+*>
+*> Here, Inx is the identity matrix of size nx and A22**T is the
+*> transpose of A22. kron(X, Y) is the Kronecker product between
+*> the matrices X and Y.
+*>
+*> When DIF(2) is small, small changes in (A, B) can cause large changes
+*> in the deflating subspace. An approximate (asymptotic) bound on the
+*> maximum angular error in the computed deflating subspaces is
+*>
+*> EPS * norm((A, B)) / DIF(2),
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal norm of the projectors on the left and right
+*> eigenspaces associated with (A11, B11) may be returned in PL and PR.
+*> They are computed as follows. First we compute L and R so that
+*> P*(A, B)*Q is block diagonal, where
+*>
+*> P = ( I -L ) n1 Q = ( I R ) n1
+*> ( 0 I ) n2 and ( 0 I ) n2
+*> n1 n2 n1 n2
+*>
+*> and (L, R) is the solution to the generalized Sylvester equation
+*>
+*> A11*R - L*A22 = -A12
+*> B11*R - L*B22 = -B12
+*>
+*> Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
+*> An approximate (asymptotic) bound on the average absolute error of
+*> the selected eigenvalues is
+*>
+*> EPS * norm((A, B)) / PL.
+*>
+*> There are also global error bounds which valid for perturbations up
+*> to a certain restriction: A lower bound (x) on the smallest
+*> F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
+*> coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
+*> (i.e. (A + E, B + F), is
+*>
+*> x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
+*>
+*> An approximate bound on x can be computed from DIF(1:2), PL and PR.
+*>
+*> If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
+*> (L', R') and unperturbed (L, R) left and right deflating subspaces
+*> associated with the selected cluster in the (1,1)-blocks can be
+*> bounded as
+*>
+*> max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
+*> max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
+*>
+*> See LAPACK User's Guide section 4.11 or the following references
+*> for more information.
+*>
+*> Note that if the default method for computing the Frobenius-norm-
+*> based estimate DIF is not wanted (see SLATDF), then the parameter
+*> IDIFJB (see below) should be changed from 3 to 4 (routine SLATDF
+*> (IJOB = 2 will be used)). See STGSYL for more details.
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> References
+*> ==========
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software,
+*> Report UMINF - 94.04, Department of Computing Science, Umea
+*> University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
+*> Note 87. To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
+*> 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE STGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
$ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL,
$ PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTQ, WANTZ
@@ -23,312 +456,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* STGSEN reorders the generalized real Schur decomposition of a real
-* matrix pair (A, B) (in terms of an orthonormal equivalence trans-
-* formation Q**T * (A, B) * Z), so that a selected cluster of eigenvalues
-* appears in the leading diagonal blocks of the upper quasi-triangular
-* matrix A and the upper triangular B. The leading columns of Q and
-* Z form orthonormal bases of the corresponding left and right eigen-
-* spaces (deflating subspaces). (A, B) must be in generalized real
-* Schur canonical form (as returned by SGGES), i.e. A is block upper
-* triangular with 1-by-1 and 2-by-2 diagonal blocks. B is upper
-* triangular.
-*
-* STGSEN also computes the generalized eigenvalues
-*
-* w(j) = (ALPHAR(j) + i*ALPHAI(j))/BETA(j)
-*
-* of the reordered matrix pair (A, B).
-*
-* Optionally, STGSEN computes the estimates of reciprocal condition
-* numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
-* (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
-* between the matrix pairs (A11, B11) and (A22,B22) that correspond to
-* the selected cluster and the eigenvalues outside the cluster, resp.,
-* and norms of "projections" onto left and right eigenspaces w.r.t.
-* the selected cluster in the (1,1)-block.
-*
-* Arguments
-* =========
-*
-* IJOB (input) INTEGER
-* Specifies whether condition numbers are required for the
-* cluster of eigenvalues (PL and PR) or the deflating subspaces
-* (Difu and Difl):
-* =0: Only reorder w.r.t. SELECT. No extras.
-* =1: Reciprocal of norms of "projections" onto left and right
-* eigenspaces w.r.t. the selected cluster (PL and PR).
-* =2: Upper bounds on Difu and Difl. F-norm-based estimate
-* (DIF(1:2)).
-* =3: Estimate of Difu and Difl. 1-norm-based estimate
-* (DIF(1:2)).
-* About 5 times as expensive as IJOB = 2.
-* =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
-* version to get it all.
-* =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
-*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* SELECT specifies the eigenvalues in the selected cluster.
-* To select a real eigenvalue w(j), SELECT(j) must be set to
-* .TRUE.. To select a complex conjugate pair of eigenvalues
-* w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
-* either SELECT(j) or SELECT(j+1) or both must be set to
-* .TRUE.; a complex conjugate pair of eigenvalues must be
-* either both included in the cluster or both excluded.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) REAL array, dimension(LDA,N)
-* On entry, the upper quasi-triangular matrix A, with (A, B) in
-* generalized real Schur canonical form.
-* On exit, A is overwritten by the reordered matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension(LDB,N)
-* On entry, the upper triangular matrix B, with (A, B) in
-* generalized real Schur canonical form.
-* On exit, B is overwritten by the reordered matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* ALPHAR (output) REAL array, dimension (N)
-* ALPHAI (output) REAL array, dimension (N)
-* BETA (output) REAL array, dimension (N)
-* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
-* be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i
-* and BETA(j),j=1,...,N are the diagonals of the complex Schur
-* form (S,T) that would result if the 2-by-2 diagonal blocks of
-* the real generalized Schur form of (A,B) were further reduced
-* to triangular form using complex unitary transformations.
-* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
-* positive, then the j-th and (j+1)-st eigenvalues are a
-* complex conjugate pair, with ALPHAI(j+1) negative.
-*
-* Q (input/output) REAL array, dimension (LDQ,N)
-* On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
-* On exit, Q has been postmultiplied by the left orthogonal
-* transformation matrix which reorder (A, B); The leading M
-* columns of Q form orthonormal bases for the specified pair of
-* left eigenspaces (deflating subspaces).
-* If WANTQ = .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1;
-* and if WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) REAL array, dimension (LDZ,N)
-* On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
-* On exit, Z has been postmultiplied by the left orthogonal
-* transformation matrix which reorder (A, B); The leading M
-* columns of Z form orthonormal bases for the specified pair of
-* left eigenspaces (deflating subspaces).
-* If WANTZ = .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1;
-* If WANTZ = .TRUE., LDZ >= N.
-*
-* M (output) INTEGER
-* The dimension of the specified pair of left and right eigen-
-* spaces (deflating subspaces). 0 <= M <= N.
-*
-* PL (output) REAL
-* PR (output) REAL
-* If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
-* reciprocal of the norm of "projections" onto left and right
-* eigenspaces with respect to the selected cluster.
-* 0 < PL, PR <= 1.
-* If M = 0 or M = N, PL = PR = 1.
-* If IJOB = 0, 2 or 3, PL and PR are not referenced.
-*
-* DIF (output) REAL array, dimension (2).
-* If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
-* If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
-* Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
-* estimates of Difu and Difl.
-* If M = 0 or N, DIF(1:2) = F-norm([A, B]).
-* If IJOB = 0 or 1, DIF is not referenced.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 4*N+16.
-* If IJOB = 1, 2 or 4, LWORK >= MAX(4*N+16, 2*M*(N-M)).
-* If IJOB = 3 or 5, LWORK >= MAX(4*N+16, 4*M*(N-M)).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= 1.
-* If IJOB = 1, 2 or 4, LIWORK >= N+6.
-* If IJOB = 3 or 5, LIWORK >= MAX(2*M*(N-M), N+6).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* =0: Successful exit.
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* =1: Reordering of (A, B) failed because the transformed
-* matrix pair (A, B) would be too far from generalized
-* Schur form; the problem is very ill-conditioned.
-* (A, B) may have been partially reordered.
-* If requested, 0 is returned in DIF(*), PL and PR.
-*
-* Further Details
-* ===============
-*
-* STGSEN first collects the selected eigenvalues by computing
-* orthogonal U and W that move them to the top left corner of (A, B).
-* In other words, the selected eigenvalues are the eigenvalues of
-* (A11, B11) in:
-*
-* U**T*(A, B)*W = (A11 A12) (B11 B12) n1
-* ( 0 A22),( 0 B22) n2
-* n1 n2 n1 n2
-*
-* where N = n1+n2 and U**T means the transpose of U. The first n1 columns
-* of U and W span the specified pair of left and right eigenspaces
-* (deflating subspaces) of (A, B).
-*
-* If (A, B) has been obtained from the generalized real Schur
-* decomposition of a matrix pair (C, D) = Q*(A, B)*Z**T, then the
-* reordered generalized real Schur form of (C, D) is given by
-*
-* (C, D) = (Q*U)*(U**T*(A, B)*W)*(Z*W)**T,
-*
-* and the first n1 columns of Q*U and Z*W span the corresponding
-* deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
-*
-* Note that if the selected eigenvalue is sufficiently ill-conditioned,
-* then its value may differ significantly from its value before
-* reordering.
-*
-* The reciprocal condition numbers of the left and right eigenspaces
-* spanned by the first n1 columns of U and W (or Q*U and Z*W) may
-* be returned in DIF(1:2), corresponding to Difu and Difl, resp.
-*
-* The Difu and Difl are defined as:
-*
-* Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
-* and
-* Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
-*
-* where sigma-min(Zu) is the smallest singular value of the
-* (2*n1*n2)-by-(2*n1*n2) matrix
-*
-* Zu = [ kron(In2, A11) -kron(A22**T, In1) ]
-* [ kron(In2, B11) -kron(B22**T, In1) ].
-*
-* Here, Inx is the identity matrix of size nx and A22**T is the
-* transpose of A22. kron(X, Y) is the Kronecker product between
-* the matrices X and Y.
-*
-* When DIF(2) is small, small changes in (A, B) can cause large changes
-* in the deflating subspace. An approximate (asymptotic) bound on the
-* maximum angular error in the computed deflating subspaces is
-*
-* EPS * norm((A, B)) / DIF(2),
-*
-* where EPS is the machine precision.
-*
-* The reciprocal norm of the projectors on the left and right
-* eigenspaces associated with (A11, B11) may be returned in PL and PR.
-* They are computed as follows. First we compute L and R so that
-* P*(A, B)*Q is block diagonal, where
-*
-* P = ( I -L ) n1 Q = ( I R ) n1
-* ( 0 I ) n2 and ( 0 I ) n2
-* n1 n2 n1 n2
-*
-* and (L, R) is the solution to the generalized Sylvester equation
-*
-* A11*R - L*A22 = -A12
-* B11*R - L*B22 = -B12
-*
-* Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
-* An approximate (asymptotic) bound on the average absolute error of
-* the selected eigenvalues is
-*
-* EPS * norm((A, B)) / PL.
-*
-* There are also global error bounds which valid for perturbations up
-* to a certain restriction: A lower bound (x) on the smallest
-* F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
-* coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
-* (i.e. (A + E, B + F), is
-*
-* x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
-*
-* An approximate bound on x can be computed from DIF(1:2), PL and PR.
-*
-* If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
-* (L', R') and unperturbed (L, R) left and right deflating subspaces
-* associated with the selected cluster in the (1,1)-blocks can be
-* bounded as
-*
-* max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
-* max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
-*
-* See LAPACK User's Guide section 4.11 or the following references
-* for more information.
-*
-* Note that if the default method for computing the Frobenius-norm-
-* based estimate DIF is not wanted (see SLATDF), then the parameter
-* IDIFJB (see below) should be changed from 3 to 4 (routine SLATDF
-* (IJOB = 2 will be used)). See STGSYL for more details.
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* References
-* ==========
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software,
-* Report UMINF - 94.04, Department of Computing Science, Umea
-* University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
-* Note 87. To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
-* 1996.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stgsja.f b/SRC/stgsja.f
index ab2398d9..3c60ef8d 100644
--- a/SRC/stgsja.f
+++ b/SRC/stgsja.f
@@ -1,11 +1,311 @@
+*> \brief \b STGSJA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
+* LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
+* Q, LDQ, WORK, NCYCLE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N,
+* $ NCYCLE, P
+* REAL TOLA, TOLB
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), Q( LDQ, * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STGSJA computes the generalized singular value decomposition (GSVD)
+*> of two real upper triangular (or trapezoidal) matrices A and B.
+*>
+*> On entry, it is assumed that matrices A and B have the following
+*> forms, which may be obtained by the preprocessing subroutine SGGSVP
+*> from a general M-by-N matrix A and P-by-N matrix B:
+*>
+*> N-K-L K L
+*> A = K ( 0 A12 A13 ) if M-K-L >= 0;
+*> L ( 0 0 A23 )
+*> M-K-L ( 0 0 0 )
+*>
+*> N-K-L K L
+*> A = K ( 0 A12 A13 ) if M-K-L < 0;
+*> M-K ( 0 0 A23 )
+*>
+*> N-K-L K L
+*> B = L ( 0 0 B13 )
+*> P-L ( 0 0 0 )
+*>
+*> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
+*> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
+*> otherwise A23 is (M-K)-by-L upper trapezoidal.
+*>
+*> On exit,
+*>
+*> U**T *A*Q = D1*( 0 R ), V**T *B*Q = D2*( 0 R ),
+*>
+*> where U, V and Q are orthogonal matrices.
+*> R is a nonsingular upper triangular matrix, and D1 and D2 are
+*> ``diagonal'' matrices, which are of the following structures:
+*>
+*> If M-K-L >= 0,
+*>
+*> K L
+*> D1 = K ( I 0 )
+*> L ( 0 C )
+*> M-K-L ( 0 0 )
+*>
+*> K L
+*> D2 = L ( 0 S )
+*> P-L ( 0 0 )
+*>
+*> N-K-L K L
+*> ( 0 R ) = K ( 0 R11 R12 ) K
+*> L ( 0 0 R22 ) L
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
+*> S = diag( BETA(K+1), ... , BETA(K+L) ),
+*> C**2 + S**2 = I.
+*>
+*> R is stored in A(1:K+L,N-K-L+1:N) on exit.
+*>
+*> If M-K-L < 0,
+*>
+*> K M-K K+L-M
+*> D1 = K ( I 0 0 )
+*> M-K ( 0 C 0 )
+*>
+*> K M-K K+L-M
+*> D2 = M-K ( 0 S 0 )
+*> K+L-M ( 0 0 I )
+*> P-L ( 0 0 0 )
+*>
+*> N-K-L K M-K K+L-M
+*> ( 0 R ) = K ( 0 R11 R12 R13 )
+*> M-K ( 0 0 R22 R23 )
+*> K+L-M ( 0 0 0 R33 )
+*>
+*> where
+*> C = diag( ALPHA(K+1), ... , ALPHA(M) ),
+*> S = diag( BETA(K+1), ... , BETA(M) ),
+*> C**2 + S**2 = I.
+*>
+*> R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
+*> ( 0 R22 R23 )
+*> in B(M-K+1:L,N+M-K-L+1:N) on exit.
+*>
+*> The computation of the orthogonal transformation matrices U, V or Q
+*> is optional. These matrices may either be formed explicitly, or they
+*> may be postmultiplied into input matrices U1, V1, or Q1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': U must contain an orthogonal matrix U1 on entry, and
+*> the product U1*U is returned;
+*> = 'I': U is initialized to the unit matrix, and the
+*> orthogonal matrix U is returned;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': V must contain an orthogonal matrix V1 on entry, and
+*> the product V1*V is returned;
+*> = 'I': V is initialized to the unit matrix, and the
+*> orthogonal matrix V is returned;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Q must contain an orthogonal matrix Q1 on entry, and
+*> the product Q1*Q is returned;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> orthogonal matrix Q is returned;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> A (input/output) REAL array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
+*> matrix R or part of R. See Purpose for details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> B (input/output) REAL array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
+*> a part of R. See Purpose for details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*>
+*> TOLA (input) REAL
+*> TOLB (input) REAL
+*> TOLA and TOLB are the convergence criteria for the Jacobi-
+*> Kogbetliantz iteration procedure. Generally, they are the
+*> same as used in the preprocessing step, say
+*> TOLA = max(M,N)*norm(A)*MACHEPS,
+*> TOLB = max(P,N)*norm(B)*MACHEPS.
+*>
+*> ALPHA (output) REAL array, dimension (N)
+*> BETA (output) REAL array, dimension (N)
+*> On exit, ALPHA and BETA contain the generalized singular
+*> value pairs of A and B;
+*> ALPHA(1:K) = 1,
+*> BETA(1:K) = 0,
+*> and if M-K-L >= 0,
+*> ALPHA(K+1:K+L) = diag(C),
+*> BETA(K+1:K+L) = diag(S),
+*> or if M-K-L < 0,
+*> ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
+*> BETA(K+1:M) = S, BETA(M+1:K+L) = 1.
+*> Furthermore, if K+L < N,
+*> ALPHA(K+L+1:N) = 0 and
+*> BETA(K+L+1:N) = 0.
+*>
+*> U (input/output) REAL array, dimension (LDU,M)
+*> On entry, if JOBU = 'U', U must contain a matrix U1 (usually
+*> the orthogonal matrix returned by SGGSVP).
+*> On exit,
+*> if JOBU = 'I', U contains the orthogonal matrix U;
+*> if JOBU = 'U', U contains the product U1*U.
+*> If JOBU = 'N', U is not referenced.
+*>
+*> LDU (input) INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*>
+*> V (input/output) REAL array, dimension (LDV,P)
+*> On entry, if JOBV = 'V', V must contain a matrix V1 (usually
+*> the orthogonal matrix returned by SGGSVP).
+*> On exit,
+*> if JOBV = 'I', V contains the orthogonal matrix V;
+*> if JOBV = 'V', V contains the product V1*V.
+*> If JOBV = 'N', V is not referenced.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*>
+*> Q (input/output) REAL array, dimension (LDQ,N)
+*> On entry, if JOBQ = 'Q', Q must contain a matrix Q1 (usually
+*> the orthogonal matrix returned by SGGSVP).
+*> On exit,
+*> if JOBQ = 'I', Q contains the orthogonal matrix Q;
+*> if JOBQ = 'Q', Q contains the product Q1*Q.
+*> If JOBQ = 'N', Q is not referenced.
+*>
+*> LDQ (input) INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*>
+*> WORK (workspace) REAL array, dimension (2*N)
+*>
+*> NCYCLE (output) INTEGER
+*> The number of cycles required for convergence.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the procedure does not converge after MAXIT cycles.
+*>
+*> Internal Parameters
+*> ===================
+*>
+*> MAXIT INTEGER
+*> MAXIT specifies the total loops that the iterative procedure
+*> may take. If after MAXIT cycles, the routine fails to
+*> converge, we return INFO = 1.
+*>
+*>
+*> STGSJA essentially uses a variant of Kogbetliantz algorithm to reduce
+*> min(L,M-K)-by-L triangular (or trapezoidal) matrix A23 and L-by-L
+*> matrix B13 to the form:
+*>
+*> U1**T *A13*Q1 = C1*R1; V1**T *B13*Q1 = S1*R1,
+*>
+*> where U1, V1 and Q1 are orthogonal matrix, and Z**T is the transpose
+*> of Z. C1 and S1 are diagonal matrices satisfying
+*>
+*> C1**2 + S1**2 = I,
+*>
+*> and R1 is an L-by-L nonsingular upper triangular matrix.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE STGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
$ LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
$ Q, LDQ, WORK, NCYCLE, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -19,243 +319,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STGSJA computes the generalized singular value decomposition (GSVD)
-* of two real upper triangular (or trapezoidal) matrices A and B.
-*
-* On entry, it is assumed that matrices A and B have the following
-* forms, which may be obtained by the preprocessing subroutine SGGSVP
-* from a general M-by-N matrix A and P-by-N matrix B:
-*
-* N-K-L K L
-* A = K ( 0 A12 A13 ) if M-K-L >= 0;
-* L ( 0 0 A23 )
-* M-K-L ( 0 0 0 )
-*
-* N-K-L K L
-* A = K ( 0 A12 A13 ) if M-K-L < 0;
-* M-K ( 0 0 A23 )
-*
-* N-K-L K L
-* B = L ( 0 0 B13 )
-* P-L ( 0 0 0 )
-*
-* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
-* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
-* otherwise A23 is (M-K)-by-L upper trapezoidal.
-*
-* On exit,
-*
-* U**T *A*Q = D1*( 0 R ), V**T *B*Q = D2*( 0 R ),
-*
-* where U, V and Q are orthogonal matrices.
-* R is a nonsingular upper triangular matrix, and D1 and D2 are
-* ``diagonal'' matrices, which are of the following structures:
-*
-* If M-K-L >= 0,
-*
-* K L
-* D1 = K ( I 0 )
-* L ( 0 C )
-* M-K-L ( 0 0 )
-*
-* K L
-* D2 = L ( 0 S )
-* P-L ( 0 0 )
-*
-* N-K-L K L
-* ( 0 R ) = K ( 0 R11 R12 ) K
-* L ( 0 0 R22 ) L
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
-* S = diag( BETA(K+1), ... , BETA(K+L) ),
-* C**2 + S**2 = I.
-*
-* R is stored in A(1:K+L,N-K-L+1:N) on exit.
-*
-* If M-K-L < 0,
-*
-* K M-K K+L-M
-* D1 = K ( I 0 0 )
-* M-K ( 0 C 0 )
-*
-* K M-K K+L-M
-* D2 = M-K ( 0 S 0 )
-* K+L-M ( 0 0 I )
-* P-L ( 0 0 0 )
-*
-* N-K-L K M-K K+L-M
-* ( 0 R ) = K ( 0 R11 R12 R13 )
-* M-K ( 0 0 R22 R23 )
-* K+L-M ( 0 0 0 R33 )
-*
-* where
-* C = diag( ALPHA(K+1), ... , ALPHA(M) ),
-* S = diag( BETA(K+1), ... , BETA(M) ),
-* C**2 + S**2 = I.
-*
-* R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
-* ( 0 R22 R23 )
-* in B(M-K+1:L,N+M-K-L+1:N) on exit.
-*
-* The computation of the orthogonal transformation matrices U, V or Q
-* is optional. These matrices may either be formed explicitly, or they
-* may be postmultiplied into input matrices U1, V1, or Q1.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': U must contain an orthogonal matrix U1 on entry, and
-* the product U1*U is returned;
-* = 'I': U is initialized to the unit matrix, and the
-* orthogonal matrix U is returned;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': V must contain an orthogonal matrix V1 on entry, and
-* the product V1*V is returned;
-* = 'I': V is initialized to the unit matrix, and the
-* orthogonal matrix V is returned;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Q must contain an orthogonal matrix Q1 on entry, and
-* the product Q1*Q is returned;
-* = 'I': Q is initialized to the unit matrix, and the
-* orthogonal matrix Q is returned;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* K (input) INTEGER
-* L (input) INTEGER
-* K and L specify the subblocks in the input matrices A and B:
-* A23 = A(K+1:MIN(K+L,M),N-L+1:N) and B13 = B(1:L,N-L+1:N)
-* of A and B, whose GSVD is going to be computed by STGSJA.
-* See Further Details.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
-* matrix R or part of R. See Purpose for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
-* a part of R. See Purpose for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TOLA (input) REAL
-* TOLB (input) REAL
-* TOLA and TOLB are the convergence criteria for the Jacobi-
-* Kogbetliantz iteration procedure. Generally, they are the
-* same as used in the preprocessing step, say
-* TOLA = max(M,N)*norm(A)*MACHEPS,
-* TOLB = max(P,N)*norm(B)*MACHEPS.
-*
-* ALPHA (output) REAL array, dimension (N)
-* BETA (output) REAL array, dimension (N)
-* On exit, ALPHA and BETA contain the generalized singular
-* value pairs of A and B;
-* ALPHA(1:K) = 1,
-* BETA(1:K) = 0,
-* and if M-K-L >= 0,
-* ALPHA(K+1:K+L) = diag(C),
-* BETA(K+1:K+L) = diag(S),
-* or if M-K-L < 0,
-* ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
-* BETA(K+1:M) = S, BETA(M+1:K+L) = 1.
-* Furthermore, if K+L < N,
-* ALPHA(K+L+1:N) = 0 and
-* BETA(K+L+1:N) = 0.
-*
-* U (input/output) REAL array, dimension (LDU,M)
-* On entry, if JOBU = 'U', U must contain a matrix U1 (usually
-* the orthogonal matrix returned by SGGSVP).
-* On exit,
-* if JOBU = 'I', U contains the orthogonal matrix U;
-* if JOBU = 'U', U contains the product U1*U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (input/output) REAL array, dimension (LDV,P)
-* On entry, if JOBV = 'V', V must contain a matrix V1 (usually
-* the orthogonal matrix returned by SGGSVP).
-* On exit,
-* if JOBV = 'I', V contains the orthogonal matrix V;
-* if JOBV = 'V', V contains the product V1*V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (input/output) REAL array, dimension (LDQ,N)
-* On entry, if JOBQ = 'Q', Q must contain a matrix Q1 (usually
-* the orthogonal matrix returned by SGGSVP).
-* On exit,
-* if JOBQ = 'I', Q contains the orthogonal matrix Q;
-* if JOBQ = 'Q', Q contains the product Q1*Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-*
-* NCYCLE (output) INTEGER
-* The number of cycles required for convergence.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the procedure does not converge after MAXIT cycles.
-*
-* Internal Parameters
-* ===================
-*
-* MAXIT INTEGER
-* MAXIT specifies the total loops that the iterative procedure
-* may take. If after MAXIT cycles, the routine fails to
-* converge, we return INFO = 1.
-*
-* Further Details
-* ===============
-*
-* STGSJA essentially uses a variant of Kogbetliantz algorithm to reduce
-* min(L,M-K)-by-L triangular (or trapezoidal) matrix A23 and L-by-L
-* matrix B13 to the form:
-*
-* U1**T *A13*Q1 = C1*R1; V1**T *B13*Q1 = S1*R1,
-*
-* where U1, V1 and Q1 are orthogonal matrix, and Z**T is the transpose
-* of Z. C1 and S1 are diagonal matrices satisfying
-*
-* C1**2 + S1**2 = I,
-*
-* and R1 is an L-by-L nonsingular upper triangular matrix.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stgsna.f b/SRC/stgsna.f
index dc6f9840..c3ea04db 100644
--- a/SRC/stgsna.f
+++ b/SRC/stgsna.f
@@ -1,282 +1,391 @@
- SUBROUTINE STGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
- $ LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
- $ IWORK, INFO )
+*> \brief \b STGSNA
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER HOWMNY, JOB
- INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
-* ..
-* .. Array Arguments ..
- LOGICAL SELECT( * )
- INTEGER IWORK( * )
- REAL A( LDA, * ), B( LDB, * ), DIF( * ), S( * ),
- $ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE STGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
+* LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, JOB
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), B( LDB, * ), DIF( * ), S( * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* STGSNA estimates reciprocal condition numbers for specified
-* eigenvalues and/or eigenvectors of a matrix pair (A, B) in
-* generalized real Schur canonical form (or of any matrix pair
-* (Q*A*Z**T, Q*B*Z**T) with orthogonal matrices Q and Z, where
-* Z**T denotes the transpose of Z.
-*
-* (A, B) must be in generalized real Schur form (as returned by SGGES),
-* i.e. A is block upper triangular with 1-by-1 and 2-by-2 diagonal
-* blocks. B is upper triangular.
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STGSNA estimates reciprocal condition numbers for specified
+*> eigenvalues and/or eigenvectors of a matrix pair (A, B) in
+*> generalized real Schur canonical form (or of any matrix pair
+*> (Q*A*Z**T, Q*B*Z**T) with orthogonal matrices Q and Z, where
+*> Z**T denotes the transpose of Z.
+*>
+*> (A, B) must be in generalized real Schur form (as returned by SGGES),
+*> i.e. A is block upper triangular with 1-by-1 and 2-by-2 diagonal
+*> blocks. B is upper triangular.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for
-* eigenvalues (S) or eigenvectors (DIF):
-* = 'E': for eigenvalues only (S);
-* = 'V': for eigenvectors only (DIF);
-* = 'B': for both eigenvalues and eigenvectors (S and DIF).
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute condition numbers for all eigenpairs;
-* = 'S': compute condition numbers for selected eigenpairs
-* specified by the array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenpairs for which
-* condition numbers are required. To select condition numbers
-* for the eigenpair corresponding to a real eigenvalue w(j),
-* SELECT(j) must be set to .TRUE.. To select condition numbers
-* corresponding to a complex conjugate pair of eigenvalues w(j)
-* and w(j+1), either SELECT(j) or SELECT(j+1) or both, must be
-* set to .TRUE..
-* If HOWMNY = 'A', SELECT is not referenced.
-*
-* N (input) INTEGER
-* The order of the square matrix pair (A, B). N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The upper quasi-triangular matrix A in the pair (A,B).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,N)
-* The upper triangular matrix B in the pair (A,B).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* VL (input) REAL array, dimension (LDVL,M)
-* If JOB = 'E' or 'B', VL must contain left eigenvectors of
-* (A, B), corresponding to the eigenpairs specified by HOWMNY
-* and SELECT. The eigenvectors must be stored in consecutive
-* columns of VL, as returned by STGEVC.
-* If JOB = 'V', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1.
-* If JOB = 'E' or 'B', LDVL >= N.
-*
-* VR (input) REAL array, dimension (LDVR,M)
-* If JOB = 'E' or 'B', VR must contain right eigenvectors of
-* (A, B), corresponding to the eigenpairs specified by HOWMNY
-* and SELECT. The eigenvectors must be stored in consecutive
-* columns ov VR, as returned by STGEVC.
-* If JOB = 'V', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1.
-* If JOB = 'E' or 'B', LDVR >= N.
-*
-* S (output) REAL array, dimension (MM)
-* If JOB = 'E' or 'B', the reciprocal condition numbers of the
-* selected eigenvalues, stored in consecutive elements of the
-* array. For a complex conjugate pair of eigenvalues two
-* consecutive elements of S are set to the same value. Thus
-* S(j), DIF(j), and the j-th columns of VL and VR all
-* correspond to the same eigenpair (but not in general the
-* j-th eigenpair, unless all eigenpairs are selected).
-* If JOB = 'V', S is not referenced.
-*
-* DIF (output) REAL array, dimension (MM)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the selected eigenvectors, stored in consecutive
-* elements of the array. For a complex eigenvector two
-* consecutive elements of DIF are set to the same value. If
-* the eigenvalues cannot be reordered to compute DIF(j), DIF(j)
-* is set to 0; this can only occur when the true value would be
-* very small anyway.
-* If JOB = 'E', DIF is not referenced.
-*
-* MM (input) INTEGER
-* The number of elements in the arrays S and DIF. MM >= M.
-*
-* M (output) INTEGER
-* The number of elements of the arrays S and DIF used to store
-* the specified condition numbers; for each selected real
-* eigenvalue one element is used, and for each selected complex
-* conjugate pair of eigenvalues, two elements are used.
-* If HOWMNY = 'A', M is set to N.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* If JOB = 'V' or 'B' LWORK >= 2*N*(N+2)+16.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (N + 6)
-* If JOB = 'E', IWORK is not referenced.
-*
-* INFO (output) INTEGER
-* =0: Successful exit
-* <0: If INFO = -i, the i-th argument had an illegal value
-*
-*
-* Further Details
-* ===============
-*
-* The reciprocal of the condition number of a generalized eigenvalue
-* w = (a, b) is defined as
-*
-* S(w) = (|u**TAv|**2 + |u**TBv|**2)**(1/2) / (norm(u)*norm(v))
-*
-* where u and v are the left and right eigenvectors of (A, B)
-* corresponding to w; |z| denotes the absolute value of the complex
-* number, and norm(u) denotes the 2-norm of the vector u.
-* The pair (a, b) corresponds to an eigenvalue w = a/b (= u**TAv/u**TBv)
-* of the matrix pair (A, B). If both a and b equal zero, then (A B) is
-* singular and S(I) = -1 is returned.
-*
-* An approximate error bound on the chordal distance between the i-th
-* computed generalized eigenvalue w and the corresponding exact
-* eigenvalue lambda is
-*
-* chord(w, lambda) <= EPS * norm(A, B) / S(I)
-*
-* where EPS is the machine precision.
-*
-* The reciprocal of the condition number DIF(i) of right eigenvector u
-* and left eigenvector v corresponding to the generalized eigenvalue w
-* is defined as follows:
-*
-* a) If the i-th eigenvalue w = (a,b) is real
-*
-* Suppose U and V are orthogonal transformations such that
-*
-* U**T*(A, B)*V = (S, T) = ( a * ) ( b * ) 1
-* ( 0 S22 ),( 0 T22 ) n-1
-* 1 n-1 1 n-1
-*
-* Then the reciprocal condition number DIF(i) is
-*
-* Difl((a, b), (S22, T22)) = sigma-min( Zl ),
-*
-* where sigma-min(Zl) denotes the smallest singular value of the
-* 2(n-1)-by-2(n-1) matrix
-*
-* Zl = [ kron(a, In-1) -kron(1, S22) ]
-* [ kron(b, In-1) -kron(1, T22) ] .
-*
-* Here In-1 is the identity matrix of size n-1. kron(X, Y) is the
-* Kronecker product between the matrices X and Y.
-*
-* Note that if the default method for computing DIF(i) is wanted
-* (see SLATDF), then the parameter DIFDRI (see below) should be
-* changed from 3 to 4 (routine SLATDF(IJOB = 2 will be used)).
-* See STGSYL for more details.
-*
-* b) If the i-th and (i+1)-th eigenvalues are complex conjugate pair,
-*
-* Suppose U and V are orthogonal transformations such that
-*
-* U**T*(A, B)*V = (S, T) = ( S11 * ) ( T11 * ) 2
-* ( 0 S22 ),( 0 T22) n-2
-* 2 n-2 2 n-2
-*
-* and (S11, T11) corresponds to the complex conjugate eigenvalue
-* pair (w, conjg(w)). There exist unitary matrices U1 and V1 such
-* that
-*
-* U1**T*S11*V1 = ( s11 s12 ) and U1**T*T11*V1 = ( t11 t12 )
-* ( 0 s22 ) ( 0 t22 )
-*
-* where the generalized eigenvalues w = s11/t11 and
-* conjg(w) = s22/t22.
-*
-* Then the reciprocal condition number DIF(i) is bounded by
-*
-* min( d1, max( 1, |real(s11)/real(s22)| )*d2 )
-*
-* where, d1 = Difl((s11, t11), (s22, t22)) = sigma-min(Z1), where
-* Z1 is the complex 2-by-2 matrix
-*
-* Z1 = [ s11 -s22 ]
-* [ t11 -t22 ],
-*
-* This is done by computing (using real arithmetic) the
-* roots of the characteristical polynomial det(Z1**T * Z1 - lambda I),
-* where Z1**T denotes the transpose of Z1 and det(X) denotes
-* the determinant of X.
-*
-* and d2 is an upper bound on Difl((S11, T11), (S22, T22)), i.e. an
-* upper bound on sigma-min(Z2), where Z2 is (2n-2)-by-(2n-2)
-*
-* Z2 = [ kron(S11**T, In-2) -kron(I2, S22) ]
-* [ kron(T11**T, In-2) -kron(I2, T22) ]
-*
-* Note that if the default method for computing DIF is wanted (see
-* SLATDF), then the parameter DIFDRI (see below) should be changed
-* from 3 to 4 (routine SLATDF(IJOB = 2 will be used)). See STGSYL
-* for more details.
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for
+*> eigenvalues (S) or eigenvectors (DIF):
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for eigenvectors only (DIF);
+*> = 'B': for both eigenvalues and eigenvectors (S and DIF).
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute condition numbers for all eigenpairs;
+*> = 'S': compute condition numbers for selected eigenpairs
+*> specified by the array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenpairs for which
+*> condition numbers are required. To select condition numbers
+*> for the eigenpair corresponding to a real eigenvalue w(j),
+*> SELECT(j) must be set to .TRUE.. To select condition numbers
+*> corresponding to a complex conjugate pair of eigenvalues w(j)
+*> and w(j+1), either SELECT(j) or SELECT(j+1) or both, must be
+*> set to .TRUE..
+*> If HOWMNY = 'A', SELECT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the square matrix pair (A, B). N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The upper quasi-triangular matrix A in the pair (A,B).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> The upper triangular matrix B in the pair (A,B).
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,M)
+*> If JOB = 'E' or 'B', VL must contain left eigenvectors of
+*> (A, B), corresponding to the eigenpairs specified by HOWMNY
+*> and SELECT. The eigenvectors must be stored in consecutive
+*> columns of VL, as returned by STGEVC.
+*> If JOB = 'V', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1.
+*> If JOB = 'E' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,M)
+*> If JOB = 'E' or 'B', VR must contain right eigenvectors of
+*> (A, B), corresponding to the eigenpairs specified by HOWMNY
+*> and SELECT. The eigenvectors must be stored in consecutive
+*> columns ov VR, as returned by STGEVC.
+*> If JOB = 'V', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1.
+*> If JOB = 'E' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (MM)
+*> If JOB = 'E' or 'B', the reciprocal condition numbers of the
+*> selected eigenvalues, stored in consecutive elements of the
+*> array. For a complex conjugate pair of eigenvalues two
+*> consecutive elements of S are set to the same value. Thus
+*> S(j), DIF(j), and the j-th columns of VL and VR all
+*> correspond to the same eigenpair (but not in general the
+*> j-th eigenpair, unless all eigenpairs are selected).
+*> If JOB = 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL array, dimension (MM)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the selected eigenvectors, stored in consecutive
+*> elements of the array. For a complex eigenvector two
+*> consecutive elements of DIF are set to the same value. If
+*> the eigenvalues cannot be reordered to compute DIF(j), DIF(j)
+*> is set to 0; this can only occur when the true value would be
+*> very small anyway.
+*> If JOB = 'E', DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of elements in the arrays S and DIF. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of elements of the arrays S and DIF used to store
+*> the specified condition numbers; for each selected real
+*> eigenvalue one element is used, and for each selected complex
+*> conjugate pair of eigenvalues, two elements are used.
+*> If HOWMNY = 'A', M is set to N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> If JOB = 'V' or 'B' LWORK >= 2*N*(N+2)+16.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N + 6)
+*> If JOB = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit
+*> <0: If INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* For each eigenvalue/vector specified by SELECT, DIF stores a
-* Frobenius norm-based estimate of Difl.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* An approximate error bound for the i-th computed eigenvector VL(i) or
-* VR(i) is given by
+*> \date November 2011
*
-* EPS * norm(A, B) / DIF(i).
+*> \ingroup realOTHERcomputational
*
-* See ref. [2-3] for more details and further references.
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The reciprocal of the condition number of a generalized eigenvalue
+*> w = (a, b) is defined as
+*>
+*> S(w) = (|u**TAv|**2 + |u**TBv|**2)**(1/2) / (norm(u)*norm(v))
+*>
+*> where u and v are the left and right eigenvectors of (A, B)
+*> corresponding to w; |z| denotes the absolute value of the complex
+*> number, and norm(u) denotes the 2-norm of the vector u.
+*> The pair (a, b) corresponds to an eigenvalue w = a/b (= u**TAv/u**TBv)
+*> of the matrix pair (A, B). If both a and b equal zero, then (A B) is
+*> singular and S(I) = -1 is returned.
+*>
+*> An approximate error bound on the chordal distance between the i-th
+*> computed generalized eigenvalue w and the corresponding exact
+*> eigenvalue lambda is
+*>
+*> chord(w, lambda) <= EPS * norm(A, B) / S(I)
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal of the condition number DIF(i) of right eigenvector u
+*> and left eigenvector v corresponding to the generalized eigenvalue w
+*> is defined as follows:
+*>
+*> a) If the i-th eigenvalue w = (a,b) is real
+*>
+*> Suppose U and V are orthogonal transformations such that
+*>
+*> U**T*(A, B)*V = (S, T) = ( a * ) ( b * ) 1
+*> ( 0 S22 ),( 0 T22 ) n-1
+*> 1 n-1 1 n-1
+*>
+*> Then the reciprocal condition number DIF(i) is
+*>
+*> Difl((a, b), (S22, T22)) = sigma-min( Zl ),
+*>
+*> where sigma-min(Zl) denotes the smallest singular value of the
+*> 2(n-1)-by-2(n-1) matrix
+*>
+*> Zl = [ kron(a, In-1) -kron(1, S22) ]
+*> [ kron(b, In-1) -kron(1, T22) ] .
+*>
+*> Here In-1 is the identity matrix of size n-1. kron(X, Y) is the
+*> Kronecker product between the matrices X and Y.
+*>
+*> Note that if the default method for computing DIF(i) is wanted
+*> (see SLATDF), then the parameter DIFDRI (see below) should be
+*> changed from 3 to 4 (routine SLATDF(IJOB = 2 will be used)).
+*> See STGSYL for more details.
+*>
+*> b) If the i-th and (i+1)-th eigenvalues are complex conjugate pair,
+*>
+*> Suppose U and V are orthogonal transformations such that
+*>
+*> U**T*(A, B)*V = (S, T) = ( S11 * ) ( T11 * ) 2
+*> ( 0 S22 ),( 0 T22) n-2
+*> 2 n-2 2 n-2
+*>
+*> and (S11, T11) corresponds to the complex conjugate eigenvalue
+*> pair (w, conjg(w)). There exist unitary matrices U1 and V1 such
+*> that
+*>
+*> U1**T*S11*V1 = ( s11 s12 ) and U1**T*T11*V1 = ( t11 t12 )
+*> ( 0 s22 ) ( 0 t22 )
+*>
+*> where the generalized eigenvalues w = s11/t11 and
+*> conjg(w) = s22/t22.
+*>
+*> Then the reciprocal condition number DIF(i) is bounded by
+*>
+*> min( d1, max( 1, |real(s11)/real(s22)| )*d2 )
+*>
+*> where, d1 = Difl((s11, t11), (s22, t22)) = sigma-min(Z1), where
+*> Z1 is the complex 2-by-2 matrix
+*>
+*> Z1 = [ s11 -s22 ]
+*> [ t11 -t22 ],
+*>
+*> This is done by computing (using real arithmetic) the
+*> roots of the characteristical polynomial det(Z1**T * Z1 - lambda I),
+*> where Z1**T denotes the transpose of Z1 and det(X) denotes
+*> the determinant of X.
+*>
+*> and d2 is an upper bound on Difl((S11, T11), (S22, T22)), i.e. an
+*> upper bound on sigma-min(Z2), where Z2 is (2n-2)-by-(2n-2)
+*>
+*> Z2 = [ kron(S11**T, In-2) -kron(I2, S22) ]
+*> [ kron(T11**T, In-2) -kron(I2, T22) ]
+*>
+*> Note that if the default method for computing DIF is wanted (see
+*> SLATDF), then the parameter DIFDRI (see below) should be changed
+*> from 3 to 4 (routine SLATDF(IJOB = 2 will be used)). See STGSYL
+*> for more details.
+*>
+*> For each eigenvalue/vector specified by SELECT, DIF stores a
+*> Frobenius norm-based estimate of Difl.
+*>
+*> An approximate error bound for the i-th computed eigenvector VL(i) or
+*> VR(i) is given by
+*>
+*> EPS * norm(A, B) / DIF(i).
+*>
+*> See ref. [2-3] for more details and further references.
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> References
+*> ==========
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software,
+*> Report UMINF - 94.04, Department of Computing Science, Umea
+*> University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
+*> Note 87. To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
+*> No 1, 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
+ $ LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
+ $ IWORK, INFO )
*
-* References
-* ==========
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software,
-* Report UMINF - 94.04, Department of Computing Science, Umea
-* University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
-* Note 87. To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
-* No 1, 1996.
+* .. Scalar Arguments ..
+ CHARACTER HOWMNY, JOB
+ INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+ LOGICAL SELECT( * )
+ INTEGER IWORK( * )
+ REAL A( LDA, * ), B( LDB, * ), DIF( * ), S( * ),
+ $ VL( LDVL, * ), VR( LDVR, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stgsy2.f b/SRC/stgsy2.f
index dca68dcb..b3432411 100644
--- a/SRC/stgsy2.f
+++ b/SRC/stgsy2.f
@@ -1,3 +1,273 @@
+*> \brief \b STGSY2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+* LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
+* IWORK, PQ, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N,
+* $ PQ
+* REAL RDSCAL, RDSUM, SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STGSY2 solves the generalized Sylvester equation:
+*>
+*> A * R - L * B = scale * C (1)
+*> D * R - L * E = scale * F,
+*>
+*> using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices,
+*> (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
+*> N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E)
+*> must be in generalized Schur canonical form, i.e. A, B are upper
+*> quasi triangular and D, E are upper triangular. The solution (R, L)
+*> overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor
+*> chosen to avoid overflow.
+*>
+*> In matrix notation solving equation (1) corresponds to solve
+*> Z*x = scale*b, where Z is defined as
+*>
+*> Z = [ kron(In, A) -kron(B**T, Im) ] (2)
+*> [ kron(In, D) -kron(E**T, Im) ],
+*>
+*> Ik is the identity matrix of size k and X**T is the transpose of X.
+*> kron(X, Y) is the Kronecker product between the matrices X and Y.
+*> In the process of solving (1), we solve a number of such systems
+*> where Dim(In), Dim(In) = 1 or 2.
+*>
+*> If TRANS = 'T', solve the transposed system Z**T*y = scale*b for y,
+*> which is equivalent to solve for R and L in
+*>
+*> A**T * R + D**T * L = scale * C (3)
+*> R * B**T + L * E**T = scale * -F
+*>
+*> This case is used to compute an estimate of Dif[(A, D), (B, E)] =
+*> sigma_min(Z) using reverse communicaton with SLACON.
+*>
+*> STGSY2 also (IJOB >= 1) contributes to the computation in STGSYL
+*> of an upper bound on the separation between to matrix pairs. Then
+*> the input (A, D), (B, E) are sub-pencils of the matrix pair in
+*> STGSYL. See STGSYL for details.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N', solve the generalized Sylvester equation (1).
+*> = 'T': solve the 'transposed' system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what kind of functionality to be performed.
+*> = 0: solve (1) only.
+*> = 1: A contribution from this subsystem to a Frobenius
+*> norm-based estimate of the separation between two matrix
+*> pairs is computed. (look ahead strategy is used).
+*> = 2: A contribution from this subsystem to a Frobenius
+*> norm-based estimate of the separation between two matrix
+*> pairs is computed. (SGECON on sub-systems is used.)
+*> Not referenced if TRANS = 'T'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the order of A and D, and the row
+*> dimension of C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of B and E, and the column
+*> dimension of C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, M)
+*> On entry, A contains an upper quasi triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the matrix A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> On entry, B contains an upper quasi triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the matrix B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC, N)
+*> On entry, C contains the right-hand-side of the first matrix
+*> equation in (1).
+*> On exit, if IJOB = 0, C has been overwritten by the
+*> solution R.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the matrix C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (LDD, M)
+*> On entry, D contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of the matrix D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (LDE, N)
+*> On entry, E contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the matrix E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is REAL array, dimension (LDF, N)
+*> On entry, F contains the right-hand-side of the second matrix
+*> equation in (1).
+*> On exit, if IJOB = 0, F has been overwritten by the
+*> solution L.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the matrix F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
+*> R and L (C and F on entry) will hold the solutions to a
+*> slightly perturbed system but the input matrices A, B, D and
+*> E have not been changed. If SCALE = 0, R and L will hold the
+*> solutions to the homogeneous system with C = F = 0. Normally,
+*> SCALE = 1.
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*> RDSUM is REAL
+*> On entry, the sum of squares of computed contributions to
+*> the Dif-estimate under computation by STGSYL, where the
+*> scaling factor RDSCAL (see below) has been factored out.
+*> On exit, the corresponding sum of squares updated with the
+*> contributions from the current sub-system.
+*> If TRANS = 'T' RDSUM is not touched.
+*> NOTE: RDSUM only makes sense when STGSY2 is called by STGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*> RDSCAL is REAL
+*> On entry, scaling factor used to prevent overflow in RDSUM.
+*> On exit, RDSCAL is updated w.r.t. the current contributions
+*> in RDSUM.
+*> If TRANS = 'T', RDSCAL is not touched.
+*> NOTE: RDSCAL only makes sense when STGSY2 is called by
+*> STGSYL.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M+N+2)
+*> \endverbatim
+*>
+*> \param[out] PQ
+*> \verbatim
+*> PQ is INTEGER
+*> On exit, the number of subsystems (of size 2-by-2, 4-by-4 and
+*> 8-by-8) solved by this routine.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, if INFO is set to
+*> =0: Successful exit
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> >0: The matrix pairs (A, D) and (B, E) have common or very
+*> close eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE STGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
$ IWORK, PQ, INFO )
@@ -5,7 +275,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -19,160 +289,6 @@
$ D( LDD, * ), E( LDE, * ), F( LDF, * )
* ..
*
-* Purpose
-* =======
-*
-* STGSY2 solves the generalized Sylvester equation:
-*
-* A * R - L * B = scale * C (1)
-* D * R - L * E = scale * F,
-*
-* using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices,
-* (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
-* N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E)
-* must be in generalized Schur canonical form, i.e. A, B are upper
-* quasi triangular and D, E are upper triangular. The solution (R, L)
-* overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor
-* chosen to avoid overflow.
-*
-* In matrix notation solving equation (1) corresponds to solve
-* Z*x = scale*b, where Z is defined as
-*
-* Z = [ kron(In, A) -kron(B**T, Im) ] (2)
-* [ kron(In, D) -kron(E**T, Im) ],
-*
-* Ik is the identity matrix of size k and X**T is the transpose of X.
-* kron(X, Y) is the Kronecker product between the matrices X and Y.
-* In the process of solving (1), we solve a number of such systems
-* where Dim(In), Dim(In) = 1 or 2.
-*
-* If TRANS = 'T', solve the transposed system Z**T*y = scale*b for y,
-* which is equivalent to solve for R and L in
-*
-* A**T * R + D**T * L = scale * C (3)
-* R * B**T + L * E**T = scale * -F
-*
-* This case is used to compute an estimate of Dif[(A, D), (B, E)] =
-* sigma_min(Z) using reverse communicaton with SLACON.
-*
-* STGSY2 also (IJOB >= 1) contributes to the computation in STGSYL
-* of an upper bound on the separation between to matrix pairs. Then
-* the input (A, D), (B, E) are sub-pencils of the matrix pair in
-* STGSYL. See STGSYL for details.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N', solve the generalized Sylvester equation (1).
-* = 'T': solve the 'transposed' system (3).
-*
-* IJOB (input) INTEGER
-* Specifies what kind of functionality to be performed.
-* = 0: solve (1) only.
-* = 1: A contribution from this subsystem to a Frobenius
-* norm-based estimate of the separation between two matrix
-* pairs is computed. (look ahead strategy is used).
-* = 2: A contribution from this subsystem to a Frobenius
-* norm-based estimate of the separation between two matrix
-* pairs is computed. (SGECON on sub-systems is used.)
-* Not referenced if TRANS = 'T'.
-*
-* M (input) INTEGER
-* On entry, M specifies the order of A and D, and the row
-* dimension of C, F, R and L.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of B and E, and the column
-* dimension of C, F, R and L.
-*
-* A (input) REAL array, dimension (LDA, M)
-* On entry, A contains an upper quasi triangular matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the matrix A. LDA >= max(1, M).
-*
-* B (input) REAL array, dimension (LDB, N)
-* On entry, B contains an upper quasi triangular matrix.
-*
-* LDB (input) INTEGER
-* The leading dimension of the matrix B. LDB >= max(1, N).
-*
-* C (input/output) REAL array, dimension (LDC, N)
-* On entry, C contains the right-hand-side of the first matrix
-* equation in (1).
-* On exit, if IJOB = 0, C has been overwritten by the
-* solution R.
-*
-* LDC (input) INTEGER
-* The leading dimension of the matrix C. LDC >= max(1, M).
-*
-* D (input) REAL array, dimension (LDD, M)
-* On entry, D contains an upper triangular matrix.
-*
-* LDD (input) INTEGER
-* The leading dimension of the matrix D. LDD >= max(1, M).
-*
-* E (input) REAL array, dimension (LDE, N)
-* On entry, E contains an upper triangular matrix.
-*
-* LDE (input) INTEGER
-* The leading dimension of the matrix E. LDE >= max(1, N).
-*
-* F (input/output) REAL array, dimension (LDF, N)
-* On entry, F contains the right-hand-side of the second matrix
-* equation in (1).
-* On exit, if IJOB = 0, F has been overwritten by the
-* solution L.
-*
-* LDF (input) INTEGER
-* The leading dimension of the matrix F. LDF >= max(1, M).
-*
-* SCALE (output) REAL
-* On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
-* R and L (C and F on entry) will hold the solutions to a
-* slightly perturbed system but the input matrices A, B, D and
-* E have not been changed. If SCALE = 0, R and L will hold the
-* solutions to the homogeneous system with C = F = 0. Normally,
-* SCALE = 1.
-*
-* RDSUM (input/output) REAL
-* On entry, the sum of squares of computed contributions to
-* the Dif-estimate under computation by STGSYL, where the
-* scaling factor RDSCAL (see below) has been factored out.
-* On exit, the corresponding sum of squares updated with the
-* contributions from the current sub-system.
-* If TRANS = 'T' RDSUM is not touched.
-* NOTE: RDSUM only makes sense when STGSY2 is called by STGSYL.
-*
-* RDSCAL (input/output) REAL
-* On entry, scaling factor used to prevent overflow in RDSUM.
-* On exit, RDSCAL is updated w.r.t. the current contributions
-* in RDSUM.
-* If TRANS = 'T', RDSCAL is not touched.
-* NOTE: RDSCAL only makes sense when STGSY2 is called by
-* STGSYL.
-*
-* IWORK (workspace) INTEGER array, dimension (M+N+2)
-*
-* PQ (output) INTEGER
-* On exit, the number of subsystems (of size 2-by-2, 4-by-4 and
-* 8-by-8) solved by this routine.
-*
-* INFO (output) INTEGER
-* On exit, if INFO is set to
-* =0: Successful exit
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* >0: The matrix pairs (A, D) and (B, E) have common or very
-* close eigenvalues.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
* =====================================================================
* Replaced various illegal calls to SCOPY by calls to SLASET.
* Sven Hammarling, 27/5/02.
diff --git a/SRC/stgsyl.f b/SRC/stgsyl.f
index 7f7495b1..b73b7b3f 100644
--- a/SRC/stgsyl.f
+++ b/SRC/stgsyl.f
@@ -1,11 +1,301 @@
+*> \brief \b STGSYL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+* LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF,
+* $ LWORK, M, N
+* REAL DIF, SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STGSYL solves the generalized Sylvester equation:
+*>
+*> A * R - L * B = scale * C (1)
+*> D * R - L * E = scale * F
+*>
+*> where R and L are unknown m-by-n matrices, (A, D), (B, E) and
+*> (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
+*> respectively, with real entries. (A, D) and (B, E) must be in
+*> generalized (real) Schur canonical form, i.e. A, B are upper quasi
+*> triangular and D, E are upper triangular.
+*>
+*> The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
+*> scaling factor chosen to avoid overflow.
+*>
+*> In matrix notation (1) is equivalent to solve Zx = scale b, where
+*> Z is defined as
+*>
+*> Z = [ kron(In, A) -kron(B**T, Im) ] (2)
+*> [ kron(In, D) -kron(E**T, Im) ].
+*>
+*> Here Ik is the identity matrix of size k and X**T is the transpose of
+*> X. kron(X, Y) is the Kronecker product between the matrices X and Y.
+*>
+*> If TRANS = 'T', STGSYL solves the transposed system Z**T*y = scale*b,
+*> which is equivalent to solve for R and L in
+*>
+*> A**T * R + D**T * L = scale * C (3)
+*> R * B**T + L * E**T = scale * -F
+*>
+*> This case (TRANS = 'T') is used to compute an one-norm-based estimate
+*> of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
+*> and (B,E), using SLACON.
+*>
+*> If IJOB >= 1, STGSYL computes a Frobenius norm-based estimate
+*> of Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
+*> reciprocal of the smallest singular value of Z. See [1-2] for more
+*> information.
+*>
+*> This is a level 3 BLAS algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N', solve the generalized Sylvester equation (1).
+*> = 'T', solve the 'transposed' system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what kind of functionality to be performed.
+*> =0: solve (1) only.
+*> =1: The functionality of 0 and 3.
+*> =2: The functionality of 0 and 4.
+*> =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*> (look ahead strategy IJOB = 1 is used).
+*> =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*> ( SGECON on sub-systems is used ).
+*> Not referenced if TRANS = 'T'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the matrices A and D, and the row dimension of
+*> the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices B and E, and the column dimension
+*> of the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, M)
+*> The upper quasi triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> The upper quasi triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC, N)
+*> On entry, C contains the right-hand-side of the first matrix
+*> equation in (1) or (3).
+*> On exit, if IJOB = 0, 1 or 2, C has been overwritten by
+*> the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
+*> the solution achieved during the computation of the
+*> Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (LDD, M)
+*> The upper triangular matrix D.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of the array D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (LDE, N)
+*> The upper triangular matrix E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the array E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is REAL array, dimension (LDF, N)
+*> On entry, F contains the right-hand-side of the second matrix
+*> equation in (1) or (3).
+*> On exit, if IJOB = 0, 1 or 2, F has been overwritten by
+*> the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
+*> the solution achieved during the computation of the
+*> Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the array F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL
+*> On exit DIF is the reciprocal of a lower bound of the
+*> reciprocal of the Dif-function, i.e. DIF is an upper bound of
+*> Dif[(A,D), (B,E)] = sigma_min(Z), where Z as in (2).
+*> IF IJOB = 0 or TRANS = 'T', DIF is not touched.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> On exit SCALE is the scaling factor in (1) or (3).
+*> If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
+*> to a slightly perturbed system but the input matrices A, B, D
+*> and E have not been changed. If SCALE = 0, C and F hold the
+*> solutions R and L, respectively, to the homogeneous system
+*> with C = F = 0. Normally, SCALE = 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK > = 1.
+*> If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M+N+6)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: successful exit
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> >0: (A, D) and (B, E) have common or close eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
+*> No 1, 1996.
+*>
+*> [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
+*> Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
+*> Appl., 15(4):1045-1060, 1994
+*>
+*> [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
+*> Condition Estimators for Solving the Generalized Sylvester
+*> Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
+*> July 1989, pp 745-751.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE STGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -20,178 +310,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STGSYL solves the generalized Sylvester equation:
-*
-* A * R - L * B = scale * C (1)
-* D * R - L * E = scale * F
-*
-* where R and L are unknown m-by-n matrices, (A, D), (B, E) and
-* (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
-* respectively, with real entries. (A, D) and (B, E) must be in
-* generalized (real) Schur canonical form, i.e. A, B are upper quasi
-* triangular and D, E are upper triangular.
-*
-* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
-* scaling factor chosen to avoid overflow.
-*
-* In matrix notation (1) is equivalent to solve Zx = scale b, where
-* Z is defined as
-*
-* Z = [ kron(In, A) -kron(B**T, Im) ] (2)
-* [ kron(In, D) -kron(E**T, Im) ].
-*
-* Here Ik is the identity matrix of size k and X**T is the transpose of
-* X. kron(X, Y) is the Kronecker product between the matrices X and Y.
-*
-* If TRANS = 'T', STGSYL solves the transposed system Z**T*y = scale*b,
-* which is equivalent to solve for R and L in
-*
-* A**T * R + D**T * L = scale * C (3)
-* R * B**T + L * E**T = scale * -F
-*
-* This case (TRANS = 'T') is used to compute an one-norm-based estimate
-* of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
-* and (B,E), using SLACON.
-*
-* If IJOB >= 1, STGSYL computes a Frobenius norm-based estimate
-* of Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
-* reciprocal of the smallest singular value of Z. See [1-2] for more
-* information.
-*
-* This is a level 3 BLAS algorithm.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N', solve the generalized Sylvester equation (1).
-* = 'T', solve the 'transposed' system (3).
-*
-* IJOB (input) INTEGER
-* Specifies what kind of functionality to be performed.
-* =0: solve (1) only.
-* =1: The functionality of 0 and 3.
-* =2: The functionality of 0 and 4.
-* =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
-* (look ahead strategy IJOB = 1 is used).
-* =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
-* ( SGECON on sub-systems is used ).
-* Not referenced if TRANS = 'T'.
-*
-* M (input) INTEGER
-* The order of the matrices A and D, and the row dimension of
-* the matrices C, F, R and L.
-*
-* N (input) INTEGER
-* The order of the matrices B and E, and the column dimension
-* of the matrices C, F, R and L.
-*
-* A (input) REAL array, dimension (LDA, M)
-* The upper quasi triangular matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, M).
-*
-* B (input) REAL array, dimension (LDB, N)
-* The upper quasi triangular matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1, N).
-*
-* C (input/output) REAL array, dimension (LDC, N)
-* On entry, C contains the right-hand-side of the first matrix
-* equation in (1) or (3).
-* On exit, if IJOB = 0, 1 or 2, C has been overwritten by
-* the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
-* the solution achieved during the computation of the
-* Dif-estimate.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1, M).
-*
-* D (input) REAL array, dimension (LDD, M)
-* The upper triangular matrix D.
-*
-* LDD (input) INTEGER
-* The leading dimension of the array D. LDD >= max(1, M).
-*
-* E (input) REAL array, dimension (LDE, N)
-* The upper triangular matrix E.
-*
-* LDE (input) INTEGER
-* The leading dimension of the array E. LDE >= max(1, N).
-*
-* F (input/output) REAL array, dimension (LDF, N)
-* On entry, F contains the right-hand-side of the second matrix
-* equation in (1) or (3).
-* On exit, if IJOB = 0, 1 or 2, F has been overwritten by
-* the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
-* the solution achieved during the computation of the
-* Dif-estimate.
-*
-* LDF (input) INTEGER
-* The leading dimension of the array F. LDF >= max(1, M).
-*
-* DIF (output) REAL
-* On exit DIF is the reciprocal of a lower bound of the
-* reciprocal of the Dif-function, i.e. DIF is an upper bound of
-* Dif[(A,D), (B,E)] = sigma_min(Z), where Z as in (2).
-* IF IJOB = 0 or TRANS = 'T', DIF is not touched.
-*
-* SCALE (output) REAL
-* On exit SCALE is the scaling factor in (1) or (3).
-* If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
-* to a slightly perturbed system but the input matrices A, B, D
-* and E have not been changed. If SCALE = 0, C and F hold the
-* solutions R and L, respectively, to the homogeneous system
-* with C = F = 0. Normally, SCALE = 1.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK > = 1.
-* If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (M+N+6)
-*
-* INFO (output) INTEGER
-* =0: successful exit
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* >0: (A, D) and (B, E) have common or close eigenvalues.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
-* No 1, 1996.
-*
-* [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
-* Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
-* Appl., 15(4):1045-1060, 1994
-*
-* [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
-* Condition Estimators for Solving the Generalized Sylvester
-* Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
-* July 1989, pp 745-751.
-*
* =====================================================================
* Replaced various illegal calls to SCOPY by calls to SLASET.
* Sven Hammarling, 1/5/02.
diff --git a/SRC/stpcon.f b/SRC/stpcon.f
index 6862d1f7..fcc81b9a 100644
--- a/SRC/stpcon.f
+++ b/SRC/stpcon.f
@@ -1,12 +1,131 @@
+*> \brief \b STPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, N
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPCON estimates the reciprocal of the condition number of a packed
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,58 +137,6 @@
REAL AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STPCON estimates the reciprocal of the condition number of a packed
-* triangular matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stpmqrt.f b/SRC/stpmqrt.f
index c6c2c858..89888765 100644
--- a/SRC/stpmqrt.f
+++ b/SRC/stpmqrt.f
@@ -1,132 +1,190 @@
- SUBROUTINE STPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
- $ A, LDA, B, LDB, WORK, INFO )
- IMPLICIT NONE
+*> \brief \b STPMQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
-* ..
-* .. Array Arguments ..
- REAL V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
- $ WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE STPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
+* A, LDA, B, LDB, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
+* ..
+* .. Array Arguments ..
+* REAL V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* STPMQRT applies a real orthogonal matrix Q obtained from a
-* "triangular-pentagonal" real block reflector H to a general
-* real matrix C, which consists of two blocks A and B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPMQRT applies a real orthogonal matrix Q obtained from a
+*> "triangular-pentagonal" real block reflector H to a general
+*> real matrix C, which consists of two blocks A and B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q^H from the Left;
-* = 'R': apply Q or Q^H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q^H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix B. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-*
-* L (input) INTEGER
-* The order of the trapezoidal part of V.
-* K >= L >= 0. See Further Details.
-*
-* NB (input) INTEGER
-* The block size used for the storage of T. K >= NB >= 1.
-* This must be the same value of NB used to generate T
-* in CTPQRT.
-*
-* V (input) REAL array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CTPQRT in B. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* T (input) REAL array, dimension (LDT,K)
-* The upper triangular factors of the block reflectors
-* as returned by CTPQRT, stored as a NB-by-K matrix.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
-*
-* A (input/output) REAL array, dimension
-* (LDA,N) if SIDE = 'L' or
-* (LDA,K) if SIDE = 'R'
-* On entry, the K-by-N or M-by-K matrix A.
-* On exit, A is overwritten by the corresponding block of
-* Q*C or Q^H*C or C*Q or C*Q^H. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDC >= max(1,K);
-* If SIDE = 'R', LDC >= max(1,M).
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q^H from the Left;
+*> = 'R': apply Q or Q^H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q^H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B. N >= 0.
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the M-by-N matrix B.
-* On exit, B is overwritten by the corresponding block of
-* Q*C or Q^H*C or C*Q or C*Q^H. See Further Details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* LDB >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace/output) REAL array. The dimension of WORK is
-* N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* K >= L >= 0. See Further Details.
+*>
+*> NB (input) INTEGER
+*> The block size used for the storage of T. K >= NB >= 1.
+*> This must be the same value of NB used to generate T
+*> in CTPQRT.
+*>
+*> V (input) REAL array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CTPQRT in B. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*>
+*> T (input) REAL array, dimension (LDT,K)
+*> The upper triangular factors of the block reflectors
+*> as returned by CTPQRT, stored as a NB-by-K matrix.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> A (input/output) REAL array, dimension
+*> (LDA,N) if SIDE = 'L' or
+*> (LDA,K) if SIDE = 'R'
+*> On entry, the K-by-N or M-by-K matrix A.
+*> On exit, A is overwritten by the corresponding block of
+*> Q*C or Q^H*C or C*Q or C*Q^H. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDC >= max(1,K);
+*> If SIDE = 'R', LDC >= max(1,M).
+*>
+*> B (input/output) REAL array, dimension (LDB,N)
+*> On entry, the M-by-N matrix B.
+*> On exit, B is overwritten by the corresponding block of
+*> Q*C or Q^H*C or C*Q or C*Q^H. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B.
+*> LDB >= max(1,M).
+*>
+*> WORK (workspace/output) REAL array. The dimension of WORK is
+*> N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The columns of the pentagonal matrix V contain the elementary reflectors
+*> H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
+*> trapezoidal block V2:
+*>
+*> V = [V1]
+*> [V2].
+*>
+*> The size of the trapezoidal block V2 is determined by the parameter L,
+*> where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
+*> rows of a K-by-K upper triangular matrix. If L=K, V2 is upper triangular;
+*> if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
+*>
+*> If SIDE = 'L': C = [A] where A is K-by-N, B is M-by-N and V is M-by-K.
+*> [B]
+*>
+*> If SIDE = 'R': C = [A B] where A is M-by-K, B is M-by-N and V is N-by-K.
+*>
+*> The real orthogonal matrix Q is formed from V and T.
+*>
+*> If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
+*>
+*> If TRANS='C' and SIDE='L', C is on exit replaced with Q^H * C.
+*>
+*> If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
+*>
+*> If TRANS='C' and SIDE='R', C is on exit replaced with C * Q^H.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
+ $ A, LDA, B, LDB, WORK, INFO )
*
-* The columns of the pentagonal matrix V contain the elementary reflectors
-* H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
-* trapezoidal block V2:
-*
-* V = [V1]
-* [V2].
-*
-* The size of the trapezoidal block V2 is determined by the parameter L,
-* where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
-* rows of a K-by-K upper triangular matrix. If L=K, V2 is upper triangular;
-* if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
-*
-* If SIDE = 'L': C = [A] where A is K-by-N, B is M-by-N and V is M-by-K.
-* [B]
-*
-* If SIDE = 'R': C = [A B] where A is M-by-K, B is M-by-N and V is N-by-K.
-*
-* The real orthogonal matrix Q is formed from V and T.
-*
-* If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
-*
-* If TRANS='C' and SIDE='L', C is on exit replaced with Q^H * C.
-*
-* If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* If TRANS='C' and SIDE='R', C is on exit replaced with C * Q^H.
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
+* ..
+* .. Array Arguments ..
+ REAL V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stpqrt.f b/SRC/stpqrt.f
index 07b9a9a8..5271195c 100644
--- a/SRC/stpqrt.f
+++ b/SRC/stpqrt.f
@@ -1,120 +1,167 @@
- SUBROUTINE STPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
- $ INFO )
- IMPLICIT NONE
+*> \brief \b STPQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE STPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* STPQRT computes a blocked QR factorization of a real
-* "triangular-pentagonal" matrix C, which is composed of a
-* triangular block A and pentagonal block B, using the compact
-* WY representation for Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPQRT computes a blocked QR factorization of a real
+*> "triangular-pentagonal" matrix C, which is composed of a
+*> triangular block A and pentagonal block B, using the compact
+*> WY representation for Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B, and the order of the
-* triangular matrix A.
-* N >= 0.
-*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part of B.
-* MIN(M,N) >= L >= 0. See Further Details.
-*
-* NB (input) INTEGER
-* The block size to be used in the blocked QR. N >= NB >= 1.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the upper triangular N-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the pentagonal M-by-N matrix B. The first M-L rows
-* are rectangular, and the last L rows are upper trapezoidal.
-* On exit, B contains the pentagonal matrix V. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B, and the order of the
+*> triangular matrix A.
+*> N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) REAL array, dimension (LDT,N)
-* The upper triangular block reflectors stored in compact form
-* as a sequence of upper triangular blocks. See Further Details.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (NB*N)
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
-*
-* The input matrix C is a (N+M)-by-N matrix
-*
-* C = [ A ]
-* [ B ]
-*
-* where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
-* matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
-* upper trapezoidal matrix B2:
-*
-* B = [ B1 ] <- (M-L)-by-N rectangular
-* [ B2 ] <- L-by-N upper trapezoidal.
-*
-* The upper trapezoidal matrix B2 consists of the first L rows of a
-* N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
-* B is rectangular M-by-N; if M=L=N, B is upper triangular.
-*
-* The matrix W stores the elementary reflectors H(i) in the i-th column
-* below the diagonal (of A) in the (N+M)-by-N input matrix C
-*
-* C = [ A ] <- upper triangular N-by-N
-* [ B ] <- M-by-N pentagonal
-*
-* so that W can be represented as
-*
-* W = [ I ] <- identity, N-by-N
-* [ V ] <- M-by-N, same form as B.
-*
-* Thus, all of information needed for W is contained on exit in B, which
-* we call V above. Note that V has the same form as B; that is,
-*
-* V = [ V1 ] <- (M-L)-by-N rectangular
-* [ V2 ] <- L-by-N upper trapezoidal.
-*
-* The columns of V represent the vectors which define the H(i)'s.
+*>\details \b Further \b Details
+*> \verbatim
+* MIN(M,N) >= L >= 0. See Further Details.
+*>
+*> NB (input) INTEGER
+*> The block size to be used in the blocked QR. N >= NB >= 1.
+*>
+*> A (input/output) REAL array, dimension (LDA,N)
+*> On entry, the upper triangular N-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the upper triangular matrix R.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> B (input/output) REAL array, dimension (LDB,N)
+*> On entry, the pentagonal M-by-N matrix B. The first M-L rows
+*> are rectangular, and the last L rows are upper trapezoidal.
+*> On exit, B contains the pentagonal matrix V. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*>
+*> T (output) REAL array, dimension (LDT,N)
+*> The upper triangular block reflectors stored in compact form
+*> as a sequence of upper triangular blocks. See Further Details.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> WORK (workspace) REAL array, dimension (NB*N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The input matrix C is a (N+M)-by-N matrix
+*>
+*> C = [ A ]
+*> [ B ]
+*>
+*> where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
+*> matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
+*> upper trapezoidal matrix B2:
+*>
+*> B = [ B1 ] <- (M-L)-by-N rectangular
+*> [ B2 ] <- L-by-N upper trapezoidal.
+*>
+*> The upper trapezoidal matrix B2 consists of the first L rows of a
+*> N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
+*> B is rectangular M-by-N; if M=L=N, B is upper triangular.
+*>
+*> The matrix W stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal (of A) in the (N+M)-by-N input matrix C
+*>
+*> C = [ A ] <- upper triangular N-by-N
+*> [ B ] <- M-by-N pentagonal
+*>
+*> so that W can be represented as
+*>
+*> W = [ I ] <- identity, N-by-N
+*> [ V ] <- M-by-N, same form as B.
+*>
+*> Thus, all of information needed for W is contained on exit in B, which
+*> we call V above. Note that V has the same form as B; that is,
+*>
+*> V = [ V1 ] <- (M-L)-by-N rectangular
+*> [ V2 ] <- L-by-N upper trapezoidal.
+*>
+*> The columns of V represent the vectors which define the H(i)'s.
+*>
+*> The number of blocks is B = ceiling(N/NB), where each
+*> block is of order NB except for the last block, which is of order
+*> IB = N - (B-1)*NB. For each of the B blocks, a upper triangular block
+*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
+*> for the last block) T's are stored in the NB-by-N matrix T as
+*>
+*> T = [T1 T2 ... TB].
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
+ $ INFO )
*
-* The number of blocks is B = ceiling(N/NB), where each
-* block is of order NB except for the last block, which is of order
-* IB = N - (B-1)*NB. For each of the B blocks, a upper triangular block
-* reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
-* for the last block) T's are stored in the NB-by-N matrix T as
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* T = [T1 T2 ... TB].
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stpqrt2.f b/SRC/stpqrt2.f
index edbed209..0a705684 100644
--- a/SRC/stpqrt2.f
+++ b/SRC/stpqrt2.f
@@ -1,111 +1,157 @@
- SUBROUTINE STPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
- IMPLICIT NONE
+*> \brief \b STPQRT2
*
-* -- LAPACK routine (version 3.x) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LDT, N, M, L
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), T( LDT, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE STPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDT, N, M, L
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* STPQRT2 computes a QR factorization of a real "triangular-pentagonal"
-* matrix C, which is composed of a triangular block A and pentagonal block B,
-* using the compact WY representation for Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPQRT2 computes a QR factorization of a real "triangular-pentagonal"
+*> matrix C, which is composed of a triangular block A and pentagonal block B,
+*> using the compact WY representation for Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The total number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B, and the order of
-* the triangular matrix A.
-* N >= 0.
-*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part of B.
-* MIN(M,N) >= L >= 0. See Further Details.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the upper triangular N-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the pentagonal M-by-N matrix B. The first M-L rows
-* are rectangular, and the last L rows are upper trapezoidal.
-* On exit, B contains the pentagonal matrix V. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B, and the order of
+*> the triangular matrix A.
+*> N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) REAL array, dimension (LDT,N)
-* The N-by-N upper triangular factor T of the block reflector.
-* See Further Details.
+*> \date November 2011
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N)
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* MIN(M,N) >= L >= 0. See Further Details.
+*>
+*> A (input/output) REAL array, dimension (LDA,N)
+*> On entry, the upper triangular N-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the upper triangular matrix R.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> B (input/output) REAL array, dimension (LDB,N)
+*> On entry, the pentagonal M-by-N matrix B. The first M-L rows
+*> are rectangular, and the last L rows are upper trapezoidal.
+*> On exit, B contains the pentagonal matrix V. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*>
+*> T (output) REAL array, dimension (LDT,N)
+*> The N-by-N upper triangular factor T of the block reflector.
+*> See Further Details.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The input matrix C is a (N+M)-by-N matrix
+*>
+*> C = [ A ]
+*> [ B ]
+*>
+*> where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
+*> matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
+*> upper trapezoidal matrix B2:
+*>
+*> B = [ B1 ] <- (M-L)-by-N rectangular
+*> [ B2 ] <- L-by-N upper trapezoidal.
+*>
+*> The upper trapezoidal matrix B2 consists of the first L rows of a
+*> N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
+*> B is rectangular M-by-N; if M=L=N, B is upper triangular.
+*>
+*> The matrix W stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal (of A) in the (N+M)-by-N input matrix C
+*>
+*> C = [ A ] <- upper triangular N-by-N
+*> [ B ] <- M-by-N pentagonal
+*>
+*> so that W can be represented as
+*>
+*> W = [ I ] <- identity, N-by-N
+*> [ V ] <- M-by-N, same form as B.
+*>
+*> Thus, all of information needed for W is contained on exit in B, which
+*> we call V above. Note that V has the same form as B; that is,
+*>
+*> V = [ V1 ] <- (M-L)-by-N rectangular
+*> [ V2 ] <- L-by-N upper trapezoidal.
+*>
+*> The columns of V represent the vectors which define the H(i)'s.
+*> The (M+N)-by-(M+N) block reflector H is then given by
+*>
+*> H = I - W * T * W^H
+*>
+*> where W^H is the conjugate transpose of W and T is the upper triangular
+*> factor of the block reflector.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
*
-* The input matrix C is a (N+M)-by-N matrix
-*
-* C = [ A ]
-* [ B ]
-*
-* where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
-* matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
-* upper trapezoidal matrix B2:
-*
-* B = [ B1 ] <- (M-L)-by-N rectangular
-* [ B2 ] <- L-by-N upper trapezoidal.
-*
-* The upper trapezoidal matrix B2 consists of the first L rows of a
-* N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
-* B is rectangular M-by-N; if M=L=N, B is upper triangular.
-*
-* The matrix W stores the elementary reflectors H(i) in the i-th column
-* below the diagonal (of A) in the (N+M)-by-N input matrix C
-*
-* C = [ A ] <- upper triangular N-by-N
-* [ B ] <- M-by-N pentagonal
-*
-* so that W can be represented as
-*
-* W = [ I ] <- identity, N-by-N
-* [ V ] <- M-by-N, same form as B.
-*
-* Thus, all of information needed for W is contained on exit in B, which
-* we call V above. Note that V has the same form as B; that is,
-*
-* V = [ V1 ] <- (M-L)-by-N rectangular
-* [ V2 ] <- L-by-N upper trapezoidal.
-*
-* The columns of V represent the vectors which define the H(i)'s.
-* The (M+N)-by-(M+N) block reflector H is then given by
-*
-* H = I - W * T * W^H
+* -- LAPACK computational routine (version 3.x) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where W^H is the conjugate transpose of W and T is the upper triangular
-* factor of the block reflector.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LDT, N, M, L
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stprfb.f b/SRC/stprfb.f
index 234b8790..ff75b9b6 100644
--- a/SRC/stprfb.f
+++ b/SRC/stprfb.f
@@ -1,11 +1,218 @@
+*> \brief \b STPRFB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
+* V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, L, LDA, LDB, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), T( LDT, * ),
+* $ V( LDV, * ), WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPRFB applies a real "triangular-pentagonal" block reflector H or its
+*> conjugate transpose H^H to a real matrix C, which is composed of two
+*> blocks A and B, either from the left or right.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H^H from the Left
+*> = 'R': apply H or H^H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H^H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columns
+*> = 'R': Rows
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B.
+*> N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T, i.e. the number of elementary
+*> reflectors whose product defines the block reflector.
+*> K >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* K >= L >= 0. See Further Details.
+*>
+*> V (input) REAL array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,M) if STOREV = 'R' and SIDE = 'L'
+*> (LDV,N) if STOREV = 'R' and SIDE = 'R'
+*> The pentagonal matrix V, which contains the elementary reflectors
+*> H(1), H(2), ..., H(K). See Further Details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*> if STOREV = 'R', LDV >= K.
+*>
+*> T (input) REAL array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T.
+*> LDT >= K.
+*>
+*> A (input/output) REAL array, dimension
+*> (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
+*> On entry, the K-by-N or M-by-K matrix A.
+*> On exit, A is overwritten by the corresponding block of
+*> H*C or H^H*C or C*H or C*H^H. See Futher Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDC >= max(1,K);
+*> If SIDE = 'R', LDC >= max(1,M).
+*>
+*> B (input/output) REAL array, dimension (LDB,N)
+*> On entry, the M-by-N matrix B.
+*> On exit, B is overwritten by the corresponding block of
+*> H*C or H^H*C or C*H or C*H^H. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B.
+*> LDB >= max(1,M).
+*>
+*> WORK (workspace) REAL array, dimension
+*> (LDWORK,N) if SIDE = 'L',
+*> (LDWORK,K) if SIDE = 'R'.
+*>
+*> LDWORK (input) INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= K;
+*> if SIDE = 'R', LDWORK >= M.
+*>
+*>
+*> The matrix C is a composite matrix formed from blocks A and B.
+*> The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
+*> and if SIDE = 'L', A is of size K-by-N.
+*>
+*> If SIDE = 'R' and DIRECT = 'F', C = [A B].
+*>
+*> If SIDE = 'L' and DIRECT = 'F', C = [A]
+*> [B].
+*>
+*> If SIDE = 'R' and DIRECT = 'B', C = [B A].
+*>
+*> If SIDE = 'L' and DIRECT = 'B', C = [B]
+*> [A].
+*>
+*> The pentagonal matrix V is composed of a rectangular block V1 and a
+*> trapezoidal block V2. The size of the trapezoidal block is determined by
+*> the parameter L, where 0<=L<=K. If L=K, the V2 block of V is triangular;
+*> if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
+*>
+*> If DIRECT = 'F' and STOREV = 'C': V = [V1]
+*> [V2]
+*> - V2 is upper trapezoidal (first L rows of K-by-K upper triangular)
+*>
+*> If DIRECT = 'F' and STOREV = 'R': V = [V1 V2]
+*>
+*> - V2 is lower trapezoidal (first L columns of K-by-K lower triangular)
+*>
+*> If DIRECT = 'B' and STOREV = 'C': V = [V2]
+*> [V1]
+*> - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
+*>
+*> If DIRECT = 'B' and STOREV = 'R': V = [V2 V1]
+*>
+*> - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
+*>
+*> If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
+*>
+*> If STOREV = 'C' and SIDE = 'R', V is N-by-K with V2 L-by-K.
+*>
+*> If STOREV = 'R' and SIDE = 'L', V is K-by-M with V2 K-by-L.
+*>
+*> If STOREV = 'R' and SIDE = 'R', V is K-by-N with V2 K-by-L.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE STPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
$ V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.x) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIRECT, SIDE, STOREV, TRANS
@@ -16,149 +223,6 @@
$ V( LDV, * ), WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* STPRFB applies a real "triangular-pentagonal" block reflector H or its
-* conjugate transpose H^H to a real matrix C, which is composed of two
-* blocks A and B, either from the left or right.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H^H from the Left
-* = 'R': apply H or H^H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H^H (Conjugate transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columns
-* = 'R': Rows
-*
-* M (input) INTEGER
-* The number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B.
-* N >= 0.
-*
-* K (input) INTEGER
-* The order of the matrix T, i.e. the number of elementary
-* reflectors whose product defines the block reflector.
-* K >= 0.
-*
-* L (input) INTEGER
-* The order of the trapezoidal part of V.
-* K >= L >= 0. See Further Details.
-*
-* V (input) REAL array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,M) if STOREV = 'R' and SIDE = 'L'
-* (LDV,N) if STOREV = 'R' and SIDE = 'R'
-* The pentagonal matrix V, which contains the elementary reflectors
-* H(1), H(2), ..., H(K). See Further Details.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-* if STOREV = 'R', LDV >= K.
-*
-* T (input) REAL array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T.
-* LDT >= K.
-*
-* A (input/output) REAL array, dimension
-* (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
-* On entry, the K-by-N or M-by-K matrix A.
-* On exit, A is overwritten by the corresponding block of
-* H*C or H^H*C or C*H or C*H^H. See Futher Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDC >= max(1,K);
-* If SIDE = 'R', LDC >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,N)
-* On entry, the M-by-N matrix B.
-* On exit, B is overwritten by the corresponding block of
-* H*C or H^H*C or C*H or C*H^H. See Further Details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* LDB >= max(1,M).
-*
-* WORK (workspace) REAL array, dimension
-* (LDWORK,N) if SIDE = 'L',
-* (LDWORK,K) if SIDE = 'R'.
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= K;
-* if SIDE = 'R', LDWORK >= M.
-*
-* Further Details
-* ===============
-*
-* The matrix C is a composite matrix formed from blocks A and B.
-* The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
-* and if SIDE = 'L', A is of size K-by-N.
-*
-* If SIDE = 'R' and DIRECT = 'F', C = [A B].
-*
-* If SIDE = 'L' and DIRECT = 'F', C = [A]
-* [B].
-*
-* If SIDE = 'R' and DIRECT = 'B', C = [B A].
-*
-* If SIDE = 'L' and DIRECT = 'B', C = [B]
-* [A].
-*
-* The pentagonal matrix V is composed of a rectangular block V1 and a
-* trapezoidal block V2. The size of the trapezoidal block is determined by
-* the parameter L, where 0<=L<=K. If L=K, the V2 block of V is triangular;
-* if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
-*
-* If DIRECT = 'F' and STOREV = 'C': V = [V1]
-* [V2]
-* - V2 is upper trapezoidal (first L rows of K-by-K upper triangular)
-*
-* If DIRECT = 'F' and STOREV = 'R': V = [V1 V2]
-*
-* - V2 is lower trapezoidal (first L columns of K-by-K lower triangular)
-*
-* If DIRECT = 'B' and STOREV = 'C': V = [V2]
-* [V1]
-* - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
-*
-* If DIRECT = 'B' and STOREV = 'R': V = [V2 V1]
-*
-* - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
-*
-* If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
-*
-* If STOREV = 'C' and SIDE = 'R', V is N-by-K with V2 L-by-K.
-*
-* If STOREV = 'R' and SIDE = 'L', V is K-by-M with V2 K-by-L.
-*
-* If STOREV = 'R' and SIDE = 'R', V is K-by-N with V2 K-by-L.
-*
* ==========================================================================
*
* .. Parameters ..
diff --git a/SRC/stprfs.f b/SRC/stprfs.f
index 39f5ceae..15af2307 100644
--- a/SRC/stprfs.f
+++ b/SRC/stprfs.f
@@ -1,12 +1,176 @@
+*> \brief \b STPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
+* FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular packed
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by STPTRS or some other
+*> means before entering this routine. STPRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
$ FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,85 +182,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* STPRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular packed
-* coefficient matrix.
-*
-* The solution matrix X must be computed by STPTRS or some other
-* means before entering this routine. STPRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stptri.f b/SRC/stptri.f
index d17ea2a8..91dcc330 100644
--- a/SRC/stptri.f
+++ b/SRC/stptri.f
@@ -1,69 +1,128 @@
- SUBROUTINE STPTRI( UPLO, DIAG, N, AP, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL AP( * )
-* ..
-*
+*> \brief \b STPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPTRI( UPLO, DIAG, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * )
+* ..
+*
* Purpose
* =======
*
-* STPTRI computes the inverse of a real upper or lower triangular
-* matrix A stored in packed format.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPTRI computes the inverse of a real upper or lower triangular
+*> matrix A stored in packed format.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangular matrix A, stored
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-* On exit, the (triangular) inverse of the original matrix, in
-* the same packed storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangular matrix A, stored
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same packed storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A triangular matrix A can be transferred to packed storage using one
+*> of the following program segments:
+*>
+*> UPLO = 'U': UPLO = 'L':
+*>
+*> JC = 1 JC = 1
+*> DO 2 J = 1, N DO 2 J = 1, N
+*> DO 1 I = 1, J DO 1 I = J, N
+*> AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
+*> 1 CONTINUE 1 CONTINUE
+*> JC = JC + J JC = JC + N - J + 1
+*> 2 CONTINUE 2 CONTINUE
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STPTRI( UPLO, DIAG, N, AP, INFO )
*
-* A triangular matrix A can be transferred to packed storage using one
-* of the following program segments:
-*
-* UPLO = 'U': UPLO = 'L':
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* JC = 1 JC = 1
-* DO 2 J = 1, N DO 2 J = 1, N
-* DO 1 I = 1, J DO 1 I = J, N
-* AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
-* 1 CONTINUE 1 CONTINUE
-* JC = JC + J JC = JC + N - J + 1
-* 2 CONTINUE 2 CONTINUE
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stptrs.f b/SRC/stptrs.f
index 49f21a18..5190dbc4 100644
--- a/SRC/stptrs.f
+++ b/SRC/stptrs.f
@@ -1,9 +1,131 @@
+*> \brief \b STPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPTRS solves a triangular system of the form
+*>
+*> A * X = B or A**T * X = B,
+*>
+*> where A is a triangular matrix of order N stored in packed format,
+*> and B is an N-by-NRHS matrix. A check is made to verify that A is
+*> nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the
+*> solutions X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -13,62 +135,6 @@
REAL AP( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* STPTRS solves a triangular system of the form
-*
-* A * X = B or A**T * X = B,
-*
-* where A is a triangular matrix of order N stored in packed format,
-* and B is an N-by-NRHS matrix. A check is made to verify that A is
-* nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the
-* solutions X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stpttf.f b/SRC/stpttf.f
index e9f767e2..6c55ba37 100644
--- a/SRC/stpttf.f
+++ b/SRC/stpttf.f
@@ -1,139 +1,196 @@
- SUBROUTINE STPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b STPTTF
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- REAL AP( 0: * ), ARF( 0: * )
+* Definition
+* ==========
*
+* SUBROUTINE STPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* REAL AP( 0: * ), ARF( 0: * )
+*
* Purpose
* =======
*
-* STPTTF copies a triangular matrix A from standard packed format (TP)
-* to rectangular full packed format (TF).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPTTF copies a triangular matrix A from standard packed format (TP)
+*> to rectangular full packed format (TF).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF in Normal format is wanted;
-* = 'T': ARF in Conjugate-transpose format is wanted.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF in Normal format is wanted;
+*> = 'T': ARF in Conjugate-transpose format is wanted.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is REAL array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) REAL array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \date November 2011
*
-* ARF (output) REAL array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ REAL AP( 0: * ), ARF( 0: * )
*
* =====================================================================
*
diff --git a/SRC/stpttr.f b/SRC/stpttr.f
index 4255c67c..efa3c5e2 100644
--- a/SRC/stpttr.f
+++ b/SRC/stpttr.f
@@ -1,12 +1,105 @@
- SUBROUTINE STPTTR( UPLO, N, AP, A, LDA, INFO )
+*> \brief \b STPTTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPTTR( UPLO, N, AP, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AP( * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.3.0) --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPTTR copies a triangular matrix A from standard packed format (TP)
+*> to standard full format (TR).
+*>
+*>\endverbatim
*
-* -- Contributed by Julien Langou of the Univ. of Colorado Denver --
-* November 2010 --
+* Arguments
+* =========
*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular.
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension ( LDA, N )
+*> On exit, the triangular matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE STPTTR( UPLO, N, AP, A, LDA, INFO )
+*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,45 +109,6 @@
REAL A( LDA, * ), AP( * )
* ..
*
-* Purpose
-* =======
-*
-* STPTTR copies a triangular matrix A from standard packed format (TP)
-* to standard full format (TR).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular.
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) REAL array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* A (output) REAL array, dimension ( LDA, N )
-* On exit, the triangular matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strcon.f b/SRC/strcon.f
index 9e93ee77..77c84754 100644
--- a/SRC/strcon.f
+++ b/SRC/strcon.f
@@ -1,12 +1,138 @@
+*> \brief \b STRCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, LDA, N
+* REAL RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRCON estimates the reciprocal of the condition number of a
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,62 +144,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STRCON estimates the reciprocal of the condition number of a
-* triangular matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strevc.f b/SRC/strevc.f
index e5894215..ead7816a 100644
--- a/SRC/strevc.f
+++ b/SRC/strevc.f
@@ -1,10 +1,225 @@
+*> \brief \b STREVC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+* LDVR, MM, M, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, SIDE
+* INTEGER INFO, LDT, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* REAL T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STREVC computes some or all of the right and/or left eigenvectors of
+*> a real upper quasi-triangular matrix T.
+*> Matrices of this type are produced by the Schur factorization of
+*> a real general matrix: A = Q*T*Q**T, as computed by SHSEQR.
+*>
+*> The right eigenvector x and the left eigenvector y of T corresponding
+*> to an eigenvalue w are defined by:
+*>
+*> T*x = w*x, (y**T)*T = w*(y**T)
+*>
+*> where y**T denotes the transpose of y.
+*> The eigenvalues are not input to this routine, but are read directly
+*> from the diagonal blocks of T.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
+*> input matrix. If Q is the orthogonal factor that reduces a matrix
+*> A to Schur form T, then Q*X and Q*Y are the matrices of right and
+*> left eigenvectors of A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute all right and/or left eigenvectors;
+*> = 'B': compute all right and/or left eigenvectors,
+*> backtransformed by the matrices in VR and/or VL;
+*> = 'S': compute selected right and/or left eigenvectors,
+*> as indicated by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in,out] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenvectors to be
+*> computed.
+*> If w(j) is a real eigenvalue, the corresponding real
+*> eigenvector is computed if SELECT(j) is .TRUE..
+*> If w(j) and w(j+1) are the real and imaginary parts of a
+*> complex eigenvalue, the corresponding complex eigenvector is
+*> computed if either SELECT(j) or SELECT(j+1) is .TRUE., and
+*> on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is set to
+*> .FALSE..
+*> Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,N)
+*> The upper quasi-triangular matrix T in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,MM)
+*> On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*> contain an N-by-N matrix Q (usually the orthogonal matrix Q
+*> of Schur vectors returned by SHSEQR).
+*> On exit, if SIDE = 'L' or 'B', VL contains:
+*> if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
+*> if HOWMNY = 'B', the matrix Q*Y;
+*> if HOWMNY = 'S', the left eigenvectors of T specified by
+*> SELECT, stored consecutively in the columns
+*> of VL, in the same order as their
+*> eigenvalues.
+*> A complex eigenvector corresponding to a complex eigenvalue
+*> is stored in two consecutive columns, the first holding the
+*> real part, and the second the imaginary part.
+*> Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1, and if
+*> SIDE = 'L' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,MM)
+*> On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*> contain an N-by-N matrix Q (usually the orthogonal matrix Q
+*> of Schur vectors returned by SHSEQR).
+*> On exit, if SIDE = 'R' or 'B', VR contains:
+*> if HOWMNY = 'A', the matrix X of right eigenvectors of T;
+*> if HOWMNY = 'B', the matrix Q*X;
+*> if HOWMNY = 'S', the right eigenvectors of T specified by
+*> SELECT, stored consecutively in the columns
+*> of VR, in the same order as their
+*> eigenvalues.
+*> A complex eigenvector corresponding to a complex eigenvalue
+*> is stored in two consecutive columns, the first holding the
+*> real part and the second the imaginary part.
+*> Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> SIDE = 'R' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR actually
+*> used to store the eigenvectors.
+*> If HOWMNY = 'A' or 'B', M is set to N.
+*> Each selected real eigenvector occupies one column and each
+*> selected complex eigenvector occupies two columns.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The algorithm used in this program is basically backward (forward)
+*> substitution, with scaling to make the the code robust against
+*> possible overflow.
+*>
+*> Each eigenvector is normalized so that the element of largest
+*> magnitude has magnitude 1; here the magnitude of a complex number
+*> (x,y) is taken to be |x| + |y|.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE STREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
$ LDVR, MM, M, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, SIDE
@@ -16,132 +231,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STREVC computes some or all of the right and/or left eigenvectors of
-* a real upper quasi-triangular matrix T.
-* Matrices of this type are produced by the Schur factorization of
-* a real general matrix: A = Q*T*Q**T, as computed by SHSEQR.
-*
-* The right eigenvector x and the left eigenvector y of T corresponding
-* to an eigenvalue w are defined by:
-*
-* T*x = w*x, (y**T)*T = w*(y**T)
-*
-* where y**T denotes the transpose of y.
-* The eigenvalues are not input to this routine, but are read directly
-* from the diagonal blocks of T.
-*
-* This routine returns the matrices X and/or Y of right and left
-* eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
-* input matrix. If Q is the orthogonal factor that reduces a matrix
-* A to Schur form T, then Q*X and Q*Y are the matrices of right and
-* left eigenvectors of A.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute all right and/or left eigenvectors;
-* = 'B': compute all right and/or left eigenvectors,
-* backtransformed by the matrices in VR and/or VL;
-* = 'S': compute selected right and/or left eigenvectors,
-* as indicated by the logical array SELECT.
-*
-* SELECT (input/output) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenvectors to be
-* computed.
-* If w(j) is a real eigenvalue, the corresponding real
-* eigenvector is computed if SELECT(j) is .TRUE..
-* If w(j) and w(j+1) are the real and imaginary parts of a
-* complex eigenvalue, the corresponding complex eigenvector is
-* computed if either SELECT(j) or SELECT(j+1) is .TRUE., and
-* on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is set to
-* .FALSE..
-* Not referenced if HOWMNY = 'A' or 'B'.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input) REAL array, dimension (LDT,N)
-* The upper quasi-triangular matrix T in Schur canonical form.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* VL (input/output) REAL array, dimension (LDVL,MM)
-* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-* contain an N-by-N matrix Q (usually the orthogonal matrix Q
-* of Schur vectors returned by SHSEQR).
-* On exit, if SIDE = 'L' or 'B', VL contains:
-* if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
-* if HOWMNY = 'B', the matrix Q*Y;
-* if HOWMNY = 'S', the left eigenvectors of T specified by
-* SELECT, stored consecutively in the columns
-* of VL, in the same order as their
-* eigenvalues.
-* A complex eigenvector corresponding to a complex eigenvalue
-* is stored in two consecutive columns, the first holding the
-* real part, and the second the imaginary part.
-* Not referenced if SIDE = 'R'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1, and if
-* SIDE = 'L' or 'B', LDVL >= N.
-*
-* VR (input/output) REAL array, dimension (LDVR,MM)
-* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-* contain an N-by-N matrix Q (usually the orthogonal matrix Q
-* of Schur vectors returned by SHSEQR).
-* On exit, if SIDE = 'R' or 'B', VR contains:
-* if HOWMNY = 'A', the matrix X of right eigenvectors of T;
-* if HOWMNY = 'B', the matrix Q*X;
-* if HOWMNY = 'S', the right eigenvectors of T specified by
-* SELECT, stored consecutively in the columns
-* of VR, in the same order as their
-* eigenvalues.
-* A complex eigenvector corresponding to a complex eigenvalue
-* is stored in two consecutive columns, the first holding the
-* real part and the second the imaginary part.
-* Not referenced if SIDE = 'L'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* SIDE = 'R' or 'B', LDVR >= N.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR actually
-* used to store the eigenvectors.
-* If HOWMNY = 'A' or 'B', M is set to N.
-* Each selected real eigenvector occupies one column and each
-* selected complex eigenvector occupies two columns.
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The algorithm used in this program is basically backward (forward)
-* substitution, with scaling to make the the code robust against
-* possible overflow.
-*
-* Each eigenvector is normalized so that the element of largest
-* magnitude has magnitude 1; here the magnitude of a complex number
-* (x,y) is taken to be |x| + |y|.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strexc.f b/SRC/strexc.f
index a98aca61..d03a9ae0 100644
--- a/SRC/strexc.f
+++ b/SRC/strexc.f
@@ -1,10 +1,145 @@
+*> \brief \b STREXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ
+* INTEGER IFST, ILST, INFO, LDQ, LDT, N
+* ..
+* .. Array Arguments ..
+* REAL Q( LDQ, * ), T( LDT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STREXC reorders the real Schur factorization of a real matrix
+*> A = Q*T*Q**T, so that the diagonal block of T with row index IFST is
+*> moved to row ILST.
+*>
+*> The real Schur form T is reordered by an orthogonal similarity
+*> transformation Z**T*T*Z, and optionally the matrix Q of Schur vectors
+*> is updated by postmultiplying it with Z.
+*>
+*> T must be in Schur canonical form (as returned by SHSEQR), that is,
+*> block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
+*> 2-by-2 diagonal block has its diagonal elements equal and its
+*> off-diagonal elements of opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'V': update the matrix Q of Schur vectors;
+*> = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,N)
+*> On entry, the upper quasi-triangular matrix T, in Schur
+*> Schur canonical form.
+*> On exit, the reordered upper quasi-triangular matrix, again
+*> in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*> On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*> orthogonal transformation matrix Z which reorders T.
+*> If COMPQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IFST
+*> \verbatim
+*> IFST is INTEGER
+*> \param[in,out] ILST
+*> \verbatim
+*> ILST is INTEGER
+*> Specify the reordering of the diagonal blocks of T.
+*> The block with row index IFST is moved to row ILST, by a
+*> sequence of transpositions between adjacent blocks.
+*> On exit, if IFST pointed on entry to the second row of a
+*> 2-by-2 block, it is changed to point to the first row; ILST
+*> always points to the first row of the block in its final
+*> position (which may differ from its input value by +1 or -1).
+*> 1 <= IFST <= N; 1 <= ILST <= N.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1: two adjacent blocks were too close to swap (the problem
+*> is very ill-conditioned); T may have been partially
+*> reordered, and ILST points to the first row of the
+*> current position of the block being moved.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ
@@ -14,71 +149,6 @@
REAL Q( LDQ, * ), T( LDT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STREXC reorders the real Schur factorization of a real matrix
-* A = Q*T*Q**T, so that the diagonal block of T with row index IFST is
-* moved to row ILST.
-*
-* The real Schur form T is reordered by an orthogonal similarity
-* transformation Z**T*T*Z, and optionally the matrix Q of Schur vectors
-* is updated by postmultiplying it with Z.
-*
-* T must be in Schur canonical form (as returned by SHSEQR), that is,
-* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
-* 2-by-2 diagonal block has its diagonal elements equal and its
-* off-diagonal elements of opposite sign.
-*
-* Arguments
-* =========
-*
-* COMPQ (input) CHARACTER*1
-* = 'V': update the matrix Q of Schur vectors;
-* = 'N': do not update Q.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) REAL array, dimension (LDT,N)
-* On entry, the upper quasi-triangular matrix T, in Schur
-* Schur canonical form.
-* On exit, the reordered upper quasi-triangular matrix, again
-* in Schur canonical form.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* Q (input/output) REAL array, dimension (LDQ,N)
-* On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-* On exit, if COMPQ = 'V', Q has been postmultiplied by the
-* orthogonal transformation matrix Z which reorders T.
-* If COMPQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* IFST (input/output) INTEGER
-* ILST (input/output) INTEGER
-* Specify the reordering of the diagonal blocks of T.
-* The block with row index IFST is moved to row ILST, by a
-* sequence of transpositions between adjacent blocks.
-* On exit, if IFST pointed on entry to the second row of a
-* 2-by-2 block, it is changed to point to the first row; ILST
-* always points to the first row of the block in its final
-* position (which may differ from its input value by +1 or -1).
-* 1 <= IFST <= N; 1 <= ILST <= N.
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1: two adjacent blocks were too close to swap (the problem
-* is very ill-conditioned); T may have been partially
-* reordered, and ILST points to the first row of the
-* current position of the block being moved.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strrfs.f b/SRC/strrfs.f
index 7d2b3295..4c284639 100644
--- a/SRC/strrfs.f
+++ b/SRC/strrfs.f
@@ -1,12 +1,183 @@
+*> \brief \b STRRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
+* LDX, FERR, BERR, WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by STRTRS or some other
+*> means before entering this routine. STRRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
$ LDX, FERR, BERR, WORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,89 +189,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* STRRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular
-* coefficient matrix.
-*
-* The solution matrix X must be computed by STRTRS or some other
-* means before entering this routine. STRRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) REAL array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strsen.f b/SRC/strsen.f
index b1351d3a..e9da8d65 100644
--- a/SRC/strsen.f
+++ b/SRC/strsen.f
@@ -1,12 +1,317 @@
+*> \brief \b STRSEN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI,
+* M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, JOB
+* INTEGER INFO, LDQ, LDT, LIWORK, LWORK, M, N
+* REAL S, SEP
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* REAL Q( LDQ, * ), T( LDT, * ), WI( * ), WORK( * ),
+* $ WR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRSEN reorders the real Schur factorization of a real matrix
+*> A = Q*T*Q**T, so that a selected cluster of eigenvalues appears in
+*> the leading diagonal blocks of the upper quasi-triangular matrix T,
+*> and the leading columns of Q form an orthonormal basis of the
+*> corresponding right invariant subspace.
+*>
+*> Optionally the routine computes the reciprocal condition numbers of
+*> the cluster of eigenvalues and/or the invariant subspace.
+*>
+*> T must be in Schur canonical form (as returned by SHSEQR), that is,
+*> block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
+*> 2-by-2 diagonal block has its diagonal elemnts equal and its
+*> off-diagonal elements of opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for the
+*> cluster of eigenvalues (S) or the invariant subspace (SEP):
+*> = 'N': none;
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for invariant subspace only (SEP);
+*> = 'B': for both eigenvalues and invariant subspace (S and
+*> SEP).
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'V': update the matrix Q of Schur vectors;
+*> = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> SELECT specifies the eigenvalues in the selected cluster. To
+*> select a real eigenvalue w(j), SELECT(j) must be set to
+*> .TRUE.. To select a complex conjugate pair of eigenvalues
+*> w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
+*> either SELECT(j) or SELECT(j+1) or both must be set to
+*> .TRUE.; a complex conjugate pair of eigenvalues must be
+*> either both included in the cluster or both excluded.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,N)
+*> On entry, the upper quasi-triangular matrix T, in Schur
+*> canonical form.
+*> On exit, T is overwritten by the reordered matrix T, again in
+*> Schur canonical form, with the selected eigenvalues in the
+*> leading diagonal blocks.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*> On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*> orthogonal transformation matrix which reorders T; the
+*> leading M columns of Q form an orthonormal basis for the
+*> specified invariant subspace.
+*> If COMPQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> The real and imaginary parts, respectively, of the reordered
+*> eigenvalues of T. The eigenvalues are stored in the same
+*> order as on the diagonal of T, with WR(i) = T(i,i) and, if
+*> T(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) > 0 and
+*> WI(i+1) = -WI(i). Note that if a complex eigenvalue is
+*> sufficiently ill-conditioned, then its value may differ
+*> significantly from its value before reordering.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The dimension of the specified invariant subspace.
+*> 0 < = M <= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL
+*> If JOB = 'E' or 'B', S is a lower bound on the reciprocal
+*> condition number for the selected cluster of eigenvalues.
+*> S cannot underestimate the true reciprocal condition number
+*> by more than a factor of sqrt(N). If M = 0 or N, S = 1.
+*> If JOB = 'N' or 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is REAL
+*> If JOB = 'V' or 'B', SEP is the estimated reciprocal
+*> condition number of the specified invariant subspace. If
+*> M = 0 or N, SEP = norm(T).
+*> If JOB = 'N' or 'E', SEP is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If JOB = 'N', LWORK >= max(1,N);
+*> if JOB = 'E', LWORK >= max(1,M*(N-M));
+*> if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If JOB = 'N' or 'E', LIWORK >= 1;
+*> if JOB = 'V' or 'B', LIWORK >= max(1,M*(N-M)).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1: reordering of T failed because some eigenvalues are too
+*> close to separate (the problem is very ill-conditioned);
+*> T may have been partially reordered, and WR and WI
+*> contain the eigenvalues in the same order as in T; S and
+*> SEP (if requested) are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> STRSEN first collects the selected eigenvalues by computing an
+*> orthogonal transformation Z to move them to the top left corner of T.
+*> In other words, the selected eigenvalues are the eigenvalues of T11
+*> in:
+*>
+*> Z**T * T * Z = ( T11 T12 ) n1
+*> ( 0 T22 ) n2
+*> n1 n2
+*>
+*> where N = n1+n2 and Z**T means the transpose of Z. The first n1 columns
+*> of Z span the specified invariant subspace of T.
+*>
+*> If T has been obtained from the real Schur factorization of a matrix
+*> A = Q*T*Q**T, then the reordered real Schur factorization of A is given
+*> by A = (Q*Z)*(Z**T*T*Z)*(Q*Z)**T, and the first n1 columns of Q*Z span
+*> the corresponding invariant subspace of A.
+*>
+*> The reciprocal condition number of the average of the eigenvalues of
+*> T11 may be returned in S. S lies between 0 (very badly conditioned)
+*> and 1 (very well conditioned). It is computed as follows. First we
+*> compute R so that
+*>
+*> P = ( I R ) n1
+*> ( 0 0 ) n2
+*> n1 n2
+*>
+*> is the projector on the invariant subspace associated with T11.
+*> R is the solution of the Sylvester equation:
+*>
+*> T11*R - R*T22 = T12.
+*>
+*> Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
+*> the two-norm of M. Then S is computed as the lower bound
+*>
+*> (1 + F-norm(R)**2)**(-1/2)
+*>
+*> on the reciprocal of 2-norm(P), the true reciprocal condition number.
+*> S cannot underestimate 1 / 2-norm(P) by more than a factor of
+*> sqrt(N).
+*>
+*> An approximate error bound for the computed average of the
+*> eigenvalues of T11 is
+*>
+*> EPS * norm(T) / S
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal condition number of the right invariant subspace
+*> spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
+*> SEP is defined as the separation of T11 and T22:
+*>
+*> sep( T11, T22 ) = sigma-min( C )
+*>
+*> where sigma-min(C) is the smallest singular value of the
+*> n1*n2-by-n1*n2 matrix
+*>
+*> C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
+*>
+*> I(m) is an m by m identity matrix, and kprod denotes the Kronecker
+*> product. We estimate sigma-min(C) by the reciprocal of an estimate of
+*> the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
+*> cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
+*>
+*> When SEP is small, small changes in T can cause large changes in
+*> the invariant subspace. An approximate bound on the maximum angular
+*> error in the computed right invariant subspace is
+*>
+*> EPS * norm(T) / SEP
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE STRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI,
$ M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, JOB
@@ -20,208 +325,6 @@
$ WR( * )
* ..
*
-* Purpose
-* =======
-*
-* STRSEN reorders the real Schur factorization of a real matrix
-* A = Q*T*Q**T, so that a selected cluster of eigenvalues appears in
-* the leading diagonal blocks of the upper quasi-triangular matrix T,
-* and the leading columns of Q form an orthonormal basis of the
-* corresponding right invariant subspace.
-*
-* Optionally the routine computes the reciprocal condition numbers of
-* the cluster of eigenvalues and/or the invariant subspace.
-*
-* T must be in Schur canonical form (as returned by SHSEQR), that is,
-* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
-* 2-by-2 diagonal block has its diagonal elemnts equal and its
-* off-diagonal elements of opposite sign.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for the
-* cluster of eigenvalues (S) or the invariant subspace (SEP):
-* = 'N': none;
-* = 'E': for eigenvalues only (S);
-* = 'V': for invariant subspace only (SEP);
-* = 'B': for both eigenvalues and invariant subspace (S and
-* SEP).
-*
-* COMPQ (input) CHARACTER*1
-* = 'V': update the matrix Q of Schur vectors;
-* = 'N': do not update Q.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* SELECT specifies the eigenvalues in the selected cluster. To
-* select a real eigenvalue w(j), SELECT(j) must be set to
-* .TRUE.. To select a complex conjugate pair of eigenvalues
-* w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
-* either SELECT(j) or SELECT(j+1) or both must be set to
-* .TRUE.; a complex conjugate pair of eigenvalues must be
-* either both included in the cluster or both excluded.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) REAL array, dimension (LDT,N)
-* On entry, the upper quasi-triangular matrix T, in Schur
-* canonical form.
-* On exit, T is overwritten by the reordered matrix T, again in
-* Schur canonical form, with the selected eigenvalues in the
-* leading diagonal blocks.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* Q (input/output) REAL array, dimension (LDQ,N)
-* On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-* On exit, if COMPQ = 'V', Q has been postmultiplied by the
-* orthogonal transformation matrix which reorders T; the
-* leading M columns of Q form an orthonormal basis for the
-* specified invariant subspace.
-* If COMPQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
-*
-* WR (output) REAL array, dimension (N)
-* WI (output) REAL array, dimension (N)
-* The real and imaginary parts, respectively, of the reordered
-* eigenvalues of T. The eigenvalues are stored in the same
-* order as on the diagonal of T, with WR(i) = T(i,i) and, if
-* T(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) > 0 and
-* WI(i+1) = -WI(i). Note that if a complex eigenvalue is
-* sufficiently ill-conditioned, then its value may differ
-* significantly from its value before reordering.
-*
-* M (output) INTEGER
-* The dimension of the specified invariant subspace.
-* 0 < = M <= N.
-*
-* S (output) REAL
-* If JOB = 'E' or 'B', S is a lower bound on the reciprocal
-* condition number for the selected cluster of eigenvalues.
-* S cannot underestimate the true reciprocal condition number
-* by more than a factor of sqrt(N). If M = 0 or N, S = 1.
-* If JOB = 'N' or 'V', S is not referenced.
-*
-* SEP (output) REAL
-* If JOB = 'V' or 'B', SEP is the estimated reciprocal
-* condition number of the specified invariant subspace. If
-* M = 0 or N, SEP = norm(T).
-* If JOB = 'N' or 'E', SEP is not referenced.
-*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If JOB = 'N', LWORK >= max(1,N);
-* if JOB = 'E', LWORK >= max(1,M*(N-M));
-* if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If JOB = 'N' or 'E', LIWORK >= 1;
-* if JOB = 'V' or 'B', LIWORK >= max(1,M*(N-M)).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1: reordering of T failed because some eigenvalues are too
-* close to separate (the problem is very ill-conditioned);
-* T may have been partially reordered, and WR and WI
-* contain the eigenvalues in the same order as in T; S and
-* SEP (if requested) are set to zero.
-*
-* Further Details
-* ===============
-*
-* STRSEN first collects the selected eigenvalues by computing an
-* orthogonal transformation Z to move them to the top left corner of T.
-* In other words, the selected eigenvalues are the eigenvalues of T11
-* in:
-*
-* Z**T * T * Z = ( T11 T12 ) n1
-* ( 0 T22 ) n2
-* n1 n2
-*
-* where N = n1+n2 and Z**T means the transpose of Z. The first n1 columns
-* of Z span the specified invariant subspace of T.
-*
-* If T has been obtained from the real Schur factorization of a matrix
-* A = Q*T*Q**T, then the reordered real Schur factorization of A is given
-* by A = (Q*Z)*(Z**T*T*Z)*(Q*Z)**T, and the first n1 columns of Q*Z span
-* the corresponding invariant subspace of A.
-*
-* The reciprocal condition number of the average of the eigenvalues of
-* T11 may be returned in S. S lies between 0 (very badly conditioned)
-* and 1 (very well conditioned). It is computed as follows. First we
-* compute R so that
-*
-* P = ( I R ) n1
-* ( 0 0 ) n2
-* n1 n2
-*
-* is the projector on the invariant subspace associated with T11.
-* R is the solution of the Sylvester equation:
-*
-* T11*R - R*T22 = T12.
-*
-* Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
-* the two-norm of M. Then S is computed as the lower bound
-*
-* (1 + F-norm(R)**2)**(-1/2)
-*
-* on the reciprocal of 2-norm(P), the true reciprocal condition number.
-* S cannot underestimate 1 / 2-norm(P) by more than a factor of
-* sqrt(N).
-*
-* An approximate error bound for the computed average of the
-* eigenvalues of T11 is
-*
-* EPS * norm(T) / S
-*
-* where EPS is the machine precision.
-*
-* The reciprocal condition number of the right invariant subspace
-* spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
-* SEP is defined as the separation of T11 and T22:
-*
-* sep( T11, T22 ) = sigma-min( C )
-*
-* where sigma-min(C) is the smallest singular value of the
-* n1*n2-by-n1*n2 matrix
-*
-* C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
-*
-* I(m) is an m by m identity matrix, and kprod denotes the Kronecker
-* product. We estimate sigma-min(C) by the reciprocal of an estimate of
-* the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
-* cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
-*
-* When SEP is small, small changes in T can cause large changes in
-* the invariant subspace. An approximate bound on the maximum angular
-* error in the computed right invariant subspace is
-*
-* EPS * norm(T) / SEP
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strsna.f b/SRC/strsna.f
index 9813af69..ae219cad 100644
--- a/SRC/strsna.f
+++ b/SRC/strsna.f
@@ -1,13 +1,268 @@
+*> \brief \b STRSNA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+* LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, JOB
+* INTEGER INFO, LDT, LDVL, LDVR, LDWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* REAL S( * ), SEP( * ), T( LDT, * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRSNA estimates reciprocal condition numbers for specified
+*> eigenvalues and/or right eigenvectors of a real upper
+*> quasi-triangular matrix T (or of any matrix Q*T*Q**T with Q
+*> orthogonal).
+*>
+*> T must be in Schur canonical form (as returned by SHSEQR), that is,
+*> block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
+*> 2-by-2 diagonal block has its diagonal elements equal and its
+*> off-diagonal elements of opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for
+*> eigenvalues (S) or eigenvectors (SEP):
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for eigenvectors only (SEP);
+*> = 'B': for both eigenvalues and eigenvectors (S and SEP).
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute condition numbers for all eigenpairs;
+*> = 'S': compute condition numbers for selected eigenpairs
+*> specified by the array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenpairs for which
+*> condition numbers are required. To select condition numbers
+*> for the eigenpair corresponding to a real eigenvalue w(j),
+*> SELECT(j) must be set to .TRUE.. To select condition numbers
+*> corresponding to a complex conjugate pair of eigenvalues w(j)
+*> and w(j+1), either SELECT(j) or SELECT(j+1) or both, must be
+*> set to .TRUE..
+*> If HOWMNY = 'A', SELECT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is REAL array, dimension (LDT,N)
+*> The upper quasi-triangular matrix T, in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,M)
+*> If JOB = 'E' or 'B', VL must contain left eigenvectors of T
+*> (or of any Q*T*Q**T with Q orthogonal), corresponding to the
+*> eigenpairs specified by HOWMNY and SELECT. The eigenvectors
+*> must be stored in consecutive columns of VL, as returned by
+*> SHSEIN or STREVC.
+*> If JOB = 'V', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL.
+*> LDVL >= 1; and if JOB = 'E' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,M)
+*> If JOB = 'E' or 'B', VR must contain right eigenvectors of T
+*> (or of any Q*T*Q**T with Q orthogonal), corresponding to the
+*> eigenpairs specified by HOWMNY and SELECT. The eigenvectors
+*> must be stored in consecutive columns of VR, as returned by
+*> SHSEIN or STREVC.
+*> If JOB = 'V', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR.
+*> LDVR >= 1; and if JOB = 'E' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (MM)
+*> If JOB = 'E' or 'B', the reciprocal condition numbers of the
+*> selected eigenvalues, stored in consecutive elements of the
+*> array. For a complex conjugate pair of eigenvalues two
+*> consecutive elements of S are set to the same value. Thus
+*> S(j), SEP(j), and the j-th columns of VL and VR all
+*> correspond to the same eigenpair (but not in general the
+*> j-th eigenpair, unless all eigenpairs are selected).
+*> If JOB = 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is REAL array, dimension (MM)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the selected eigenvectors, stored in consecutive
+*> elements of the array. For a complex eigenvector two
+*> consecutive elements of SEP are set to the same value. If
+*> the eigenvalues cannot be reordered to compute SEP(j), SEP(j)
+*> is set to 0; this can only occur when the true value would be
+*> very small anyway.
+*> If JOB = 'E', SEP is not referenced.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of elements in the arrays S (if JOB = 'E' or 'B')
+*> and/or SEP (if JOB = 'V' or 'B'). MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of elements of the arrays S and/or SEP actually
+*> used to store the estimated condition numbers.
+*> If HOWMNY = 'A', M is set to N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LDWORK,N+6)
+*> If JOB = 'E', WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK.
+*> LDWORK >= 1; and if JOB = 'V' or 'B', LDWORK >= N.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*(N-1))
+*> If JOB = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The reciprocal of the condition number of an eigenvalue lambda is
+*> defined as
+*>
+*> S(lambda) = |v**T*u| / (norm(u)*norm(v))
+*>
+*> where u and v are the right and left eigenvectors of T corresponding
+*> to lambda; v**T denotes the transpose of v, and norm(u)
+*> denotes the Euclidean norm. These reciprocal condition numbers always
+*> lie between zero (very badly conditioned) and one (very well
+*> conditioned). If n = 1, S(lambda) is defined to be 1.
+*>
+*> An approximate error bound for a computed eigenvalue W(i) is given by
+*>
+*> EPS * norm(T) / S(i)
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal of the condition number of the right eigenvector u
+*> corresponding to lambda is defined as follows. Suppose
+*>
+*> T = ( lambda c )
+*> ( 0 T22 )
+*>
+*> Then the reciprocal condition number is
+*>
+*> SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
+*>
+*> where sigma-min denotes the smallest singular value. We approximate
+*> the smallest singular value by the reciprocal of an estimate of the
+*> one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is
+*> defined to be abs(T(1,1)).
+*>
+*> An approximate error bound for a computed right eigenvector VR(i)
+*> is given by
+*>
+*> EPS * norm(T) / SEP(i)
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE STRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
$ LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call SLACN2 in place of SLACON, 7 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, JOB
@@ -20,160 +275,6 @@
$ VR( LDVR, * ), WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* STRSNA estimates reciprocal condition numbers for specified
-* eigenvalues and/or right eigenvectors of a real upper
-* quasi-triangular matrix T (or of any matrix Q*T*Q**T with Q
-* orthogonal).
-*
-* T must be in Schur canonical form (as returned by SHSEQR), that is,
-* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
-* 2-by-2 diagonal block has its diagonal elements equal and its
-* off-diagonal elements of opposite sign.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for
-* eigenvalues (S) or eigenvectors (SEP):
-* = 'E': for eigenvalues only (S);
-* = 'V': for eigenvectors only (SEP);
-* = 'B': for both eigenvalues and eigenvectors (S and SEP).
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute condition numbers for all eigenpairs;
-* = 'S': compute condition numbers for selected eigenpairs
-* specified by the array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenpairs for which
-* condition numbers are required. To select condition numbers
-* for the eigenpair corresponding to a real eigenvalue w(j),
-* SELECT(j) must be set to .TRUE.. To select condition numbers
-* corresponding to a complex conjugate pair of eigenvalues w(j)
-* and w(j+1), either SELECT(j) or SELECT(j+1) or both, must be
-* set to .TRUE..
-* If HOWMNY = 'A', SELECT is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input) REAL array, dimension (LDT,N)
-* The upper quasi-triangular matrix T, in Schur canonical form.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* VL (input) REAL array, dimension (LDVL,M)
-* If JOB = 'E' or 'B', VL must contain left eigenvectors of T
-* (or of any Q*T*Q**T with Q orthogonal), corresponding to the
-* eigenpairs specified by HOWMNY and SELECT. The eigenvectors
-* must be stored in consecutive columns of VL, as returned by
-* SHSEIN or STREVC.
-* If JOB = 'V', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL.
-* LDVL >= 1; and if JOB = 'E' or 'B', LDVL >= N.
-*
-* VR (input) REAL array, dimension (LDVR,M)
-* If JOB = 'E' or 'B', VR must contain right eigenvectors of T
-* (or of any Q*T*Q**T with Q orthogonal), corresponding to the
-* eigenpairs specified by HOWMNY and SELECT. The eigenvectors
-* must be stored in consecutive columns of VR, as returned by
-* SHSEIN or STREVC.
-* If JOB = 'V', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR.
-* LDVR >= 1; and if JOB = 'E' or 'B', LDVR >= N.
-*
-* S (output) REAL array, dimension (MM)
-* If JOB = 'E' or 'B', the reciprocal condition numbers of the
-* selected eigenvalues, stored in consecutive elements of the
-* array. For a complex conjugate pair of eigenvalues two
-* consecutive elements of S are set to the same value. Thus
-* S(j), SEP(j), and the j-th columns of VL and VR all
-* correspond to the same eigenpair (but not in general the
-* j-th eigenpair, unless all eigenpairs are selected).
-* If JOB = 'V', S is not referenced.
-*
-* SEP (output) REAL array, dimension (MM)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the selected eigenvectors, stored in consecutive
-* elements of the array. For a complex eigenvector two
-* consecutive elements of SEP are set to the same value. If
-* the eigenvalues cannot be reordered to compute SEP(j), SEP(j)
-* is set to 0; this can only occur when the true value would be
-* very small anyway.
-* If JOB = 'E', SEP is not referenced.
-*
-* MM (input) INTEGER
-* The number of elements in the arrays S (if JOB = 'E' or 'B')
-* and/or SEP (if JOB = 'V' or 'B'). MM >= M.
-*
-* M (output) INTEGER
-* The number of elements of the arrays S and/or SEP actually
-* used to store the estimated condition numbers.
-* If HOWMNY = 'A', M is set to N.
-*
-* WORK (workspace) REAL array, dimension (LDWORK,N+6)
-* If JOB = 'E', WORK is not referenced.
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* LDWORK >= 1; and if JOB = 'V' or 'B', LDWORK >= N.
-*
-* IWORK (workspace) INTEGER array, dimension (2*(N-1))
-* If JOB = 'E', IWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The reciprocal of the condition number of an eigenvalue lambda is
-* defined as
-*
-* S(lambda) = |v**T*u| / (norm(u)*norm(v))
-*
-* where u and v are the right and left eigenvectors of T corresponding
-* to lambda; v**T denotes the transpose of v, and norm(u)
-* denotes the Euclidean norm. These reciprocal condition numbers always
-* lie between zero (very badly conditioned) and one (very well
-* conditioned). If n = 1, S(lambda) is defined to be 1.
-*
-* An approximate error bound for a computed eigenvalue W(i) is given by
-*
-* EPS * norm(T) / S(i)
-*
-* where EPS is the machine precision.
-*
-* The reciprocal of the condition number of the right eigenvector u
-* corresponding to lambda is defined as follows. Suppose
-*
-* T = ( lambda c )
-* ( 0 T22 )
-*
-* Then the reciprocal condition number is
-*
-* SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
-*
-* where sigma-min denotes the smallest singular value. We approximate
-* the smallest singular value by the reciprocal of an estimate of the
-* one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is
-* defined to be abs(T(1,1)).
-*
-* An approximate error bound for a computed right eigenvector VR(i)
-* is given by
-*
-* EPS * norm(T) / SEP(i)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strsyl.f b/SRC/strsyl.f
index fbe598b4..b677737d 100644
--- a/SRC/strsyl.f
+++ b/SRC/strsyl.f
@@ -1,10 +1,165 @@
+*> \brief \b STRSYL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
+* LDC, SCALE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANA, TRANB
+* INTEGER INFO, ISGN, LDA, LDB, LDC, M, N
+* REAL SCALE
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), C( LDC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRSYL solves the real Sylvester matrix equation:
+*>
+*> op(A)*X + X*op(B) = scale*C or
+*> op(A)*X - X*op(B) = scale*C,
+*>
+*> where op(A) = A or A**T, and A and B are both upper quasi-
+*> triangular. A is M-by-M and B is N-by-N; the right hand side C and
+*> the solution X are M-by-N; and scale is an output scale factor, set
+*> <= 1 to avoid overflow in X.
+*>
+*> A and B must be in Schur canonical form (as returned by SHSEQR), that
+*> is, block upper triangular with 1-by-1 and 2-by-2 diagonal blocks;
+*> each 2-by-2 diagonal block has its diagonal elements equal and its
+*> off-diagonal elements of opposite sign.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANA
+*> \verbatim
+*> TRANA is CHARACTER*1
+*> Specifies the option op(A):
+*> = 'N': op(A) = A (No transpose)
+*> = 'T': op(A) = A**T (Transpose)
+*> = 'C': op(A) = A**H (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANB
+*> \verbatim
+*> TRANB is CHARACTER*1
+*> Specifies the option op(B):
+*> = 'N': op(B) = B (No transpose)
+*> = 'T': op(B) = B**T (Transpose)
+*> = 'C': op(B) = B**H (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] ISGN
+*> \verbatim
+*> ISGN is INTEGER
+*> Specifies the sign in the equation:
+*> = +1: solve op(A)*X + X*op(B) = scale*C
+*> = -1: solve op(A)*X - X*op(B) = scale*C
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the matrix A, and the number of rows in the
+*> matrices X and C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B, and the number of columns in the
+*> matrices X and C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,M)
+*> The upper quasi-triangular matrix A, in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> The upper quasi-triangular matrix B, in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> On entry, the M-by-N right hand side matrix C.
+*> On exit, C is overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M)
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scale factor, scale, set <= 1 to avoid overflow in X.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1: A and B have common or very close eigenvalues; perturbed
+*> values were used to solve the equation (but the matrices
+*> A and B are unchanged).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realSYcomputational
+*
+* =====================================================================
SUBROUTINE STRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
$ LDC, SCALE, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANA, TRANB
@@ -15,81 +170,6 @@
REAL A( LDA, * ), B( LDB, * ), C( LDC, * )
* ..
*
-* Purpose
-* =======
-*
-* STRSYL solves the real Sylvester matrix equation:
-*
-* op(A)*X + X*op(B) = scale*C or
-* op(A)*X - X*op(B) = scale*C,
-*
-* where op(A) = A or A**T, and A and B are both upper quasi-
-* triangular. A is M-by-M and B is N-by-N; the right hand side C and
-* the solution X are M-by-N; and scale is an output scale factor, set
-* <= 1 to avoid overflow in X.
-*
-* A and B must be in Schur canonical form (as returned by SHSEQR), that
-* is, block upper triangular with 1-by-1 and 2-by-2 diagonal blocks;
-* each 2-by-2 diagonal block has its diagonal elements equal and its
-* off-diagonal elements of opposite sign.
-*
-* Arguments
-* =========
-*
-* TRANA (input) CHARACTER*1
-* Specifies the option op(A):
-* = 'N': op(A) = A (No transpose)
-* = 'T': op(A) = A**T (Transpose)
-* = 'C': op(A) = A**H (Conjugate transpose = Transpose)
-*
-* TRANB (input) CHARACTER*1
-* Specifies the option op(B):
-* = 'N': op(B) = B (No transpose)
-* = 'T': op(B) = B**T (Transpose)
-* = 'C': op(B) = B**H (Conjugate transpose = Transpose)
-*
-* ISGN (input) INTEGER
-* Specifies the sign in the equation:
-* = +1: solve op(A)*X + X*op(B) = scale*C
-* = -1: solve op(A)*X - X*op(B) = scale*C
-*
-* M (input) INTEGER
-* The order of the matrix A, and the number of rows in the
-* matrices X and C. M >= 0.
-*
-* N (input) INTEGER
-* The order of the matrix B, and the number of columns in the
-* matrices X and C. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,M)
-* The upper quasi-triangular matrix A, in Schur canonical form.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input) REAL array, dimension (LDB,N)
-* The upper quasi-triangular matrix B, in Schur canonical form.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* C (input/output) REAL array, dimension (LDC,N)
-* On entry, the M-by-N right hand side matrix C.
-* On exit, C is overwritten by the solution matrix X.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M)
-*
-* SCALE (output) REAL
-* The scale factor, scale, set <= 1 to avoid overflow in X.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1: A and B have common or very close eigenvalues; perturbed
-* values were used to solve the equation (but the matrices
-* A and B are unchanged).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strti2.f b/SRC/strti2.f
index 27519f71..7f276519 100644
--- a/SRC/strti2.f
+++ b/SRC/strti2.f
@@ -1,9 +1,112 @@
+*> \brief \b STRTI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRTI2( UPLO, DIAG, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRTI2 computes the inverse of a real upper or lower triangular
+*> matrix.
+*>
+*> This is the Level 2 BLAS version of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading n by n upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced. If DIAG = 'U', the
+*> diagonal elements of A are also not referenced and are
+*> assumed to be 1.
+*> \endverbatim
+*> \verbatim
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STRTI2( UPLO, DIAG, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,51 +116,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* STRTI2 computes the inverse of a real upper or lower triangular
-* matrix.
-*
-* This is the Level 2 BLAS version of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading n by n upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced. If DIAG = 'U', the
-* diagonal elements of A are also not referenced and are
-* assumed to be 1.
-*
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strtri.f b/SRC/strtri.f
index e5f183c8..0e31c95c 100644
--- a/SRC/strtri.f
+++ b/SRC/strtri.f
@@ -1,9 +1,110 @@
+*> \brief \b STRTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRTRI( UPLO, DIAG, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRTRI computes the inverse of a real upper or lower triangular
+*> matrix A.
+*>
+*> This is the Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced. If DIAG = 'U', the
+*> diagonal elements of A are also not referenced and are
+*> assumed to be 1.
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STRTRI( UPLO, DIAG, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,50 +114,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* STRTRI computes the inverse of a real upper or lower triangular
-* matrix A.
-*
-* This is the Level 3 BLAS version of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced. If DIAG = 'U', the
-* diagonal elements of A are also not referenced and are
-* assumed to be 1.
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strtrs.f b/SRC/strtrs.f
index aaa70b92..6f99f6b5 100644
--- a/SRC/strtrs.f
+++ b/SRC/strtrs.f
@@ -1,10 +1,141 @@
+*> \brief \b STRTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRTRS solves a triangular system of the form
+*>
+*> A * X = B or A**T * X = B,
+*>
+*> where A is a triangular matrix of order N, and B is an N-by-NRHS
+*> matrix. A check is made to verify that A is nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the solutions
+*> X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup realOTHERcomputational
+*
+* =====================================================================
SUBROUTINE STRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,67 +145,6 @@
REAL A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* STRTRS solves a triangular system of the form
-*
-* A * X = B or A**T * X = B,
-*
-* where A is a triangular matrix of order N, and B is an N-by-NRHS
-* matrix. A check is made to verify that A is nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the solutions
-* X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/strttf.f b/SRC/strttf.f
index 1870cb77..6938110f 100644
--- a/SRC/strttf.f
+++ b/SRC/strttf.f
@@ -1,146 +1,208 @@
- SUBROUTINE STRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N, LDA
-* ..
-* .. Array Arguments ..
- REAL A( 0: LDA-1, 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b STRTTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* REAL A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* STRTTF copies a triangular matrix A from standard full format (TR)
-* to rectangular full packed format (TF) .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRTTF copies a triangular matrix A from standard full format (TR)
+*> to rectangular full packed format (TF) .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF in Normal form is wanted;
-* = 'T': ARF in Transpose form is wanted.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF in Normal form is wanted;
+*> = 'T': ARF in Transpose form is wanted.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N).
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the matrix A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is REAL array, dimension (NT).
+*> NT=N*(N+1)/2. On exit, the triangular matrix A in RFP format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N).
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the matrix A. LDA >= max(1,N).
+*> \date November 2011
*
-* ARF (output) REAL array, dimension (NT).
-* NT=N*(N+1)/2. On exit, the triangular matrix A in RFP format.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Rectangular Full Packed (RFP) Format when N is
+*> even. We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> the transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> the transpose of the last three columns of AP lower.
+*> This covers the case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 03 04 05 33 43 53
+*> 13 14 15 00 44 54
+*> 23 24 25 10 11 55
+*> 33 34 35 20 21 22
+*> 00 44 45 30 31 32
+*> 01 11 55 40 41 42
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We then consider Rectangular Full Packed (RFP) Format when N is
+*> odd. We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> the transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> the transpose of the last two columns of AP lower.
+*> This covers the case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> 02 03 04 00 33 43
+*> 12 13 14 10 11 44
+*> 22 23 24 20 21 22
+*> 00 33 34 30 31 32
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
+*> transpose of RFP A above. One therefore gets:
+*>
+*> RFP A RFP A
+*>
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> Reference
+*> =========
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
*
-* We first consider Rectangular Full Packed (RFP) Format when N is
-* even. We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* the transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* the transpose of the last three columns of AP lower.
-* This covers the case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 03 04 05 33 43 53
-* 13 14 15 00 44 54
-* 23 24 25 10 11 55
-* 33 34 35 20 21 22
-* 00 44 45 30 31 32
-* 01 11 55 40 41 42
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We then consider Rectangular Full Packed (RFP) Format when N is
-* odd. We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* the transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* the transpose of the last two columns of AP lower.
-* This covers the case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* 02 03 04 00 33 43
-* 12 13 14 10 11 44
-* 22 23 24 20 21 22
-* 00 33 34 30 31 32
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'T'. RFP A in both UPLO cases is just the
-* transpose of RFP A above. One therefore gets:
-*
-* RFP A RFP A
-*
-* 02 12 22 00 01 00 10 20 30 40 50
-* 03 13 23 33 11 33 11 21 31 41 51
-* 04 14 24 34 44 43 44 22 32 42 52
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Reference
-* =========
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+ REAL A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/strttp.f b/SRC/strttp.f
index e0e8ac11..be63cf75 100644
--- a/SRC/strttp.f
+++ b/SRC/strttp.f
@@ -1,12 +1,105 @@
- SUBROUTINE STRTTP( UPLO, N, A, LDA, AP, INFO )
+*> \brief \b STRTTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRTTP( UPLO, N, A, LDA, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRTTP copies a triangular matrix A from full format (TR) to standard
+*> packed format (TP).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular.
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices AP and A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On exit, the triangular matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2
+*> On exit, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* -- LAPACK routine (version 3.3.0) --
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- and Julien Langou of the Univ. of Colorado Denver --
-* November 2010
+*> \ingroup realOTHERcomputational
*
+* =====================================================================
+ SUBROUTINE STRTTP( UPLO, N, A, LDA, AP, INFO )
+*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,45 +109,6 @@
REAL A( LDA, * ), AP( * )
* ..
*
-* Purpose
-* =======
-*
-* STRTTP copies a triangular matrix A from full format (TR) to standard
-* packed format (TP).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular.
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrices AP and A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* On exit, the triangular matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AP (output) REAL array, dimension (N*(N+1)/2
-* On exit, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/stzrqf.f b/SRC/stzrqf.f
index ff6572a9..7738a807 100644
--- a/SRC/stzrqf.f
+++ b/SRC/stzrqf.f
@@ -1,87 +1,148 @@
- SUBROUTINE STZRQF( M, N, A, LDA, TAU, INFO )
+*> \brief \b STZRQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE STZRQF( M, N, A, LDA, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine STZRZF.
-*
-* STZRQF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A
-* to upper triangular form by means of orthogonal transformations.
-*
-* The upper trapezoidal matrix A is factored as
-*
-* A = ( R 0 ) * Z,
-*
-* where Z is an N-by-N orthogonal matrix and R is an M-by-M upper
-* triangular matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine STZRZF.
+*>
+*> STZRQF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A
+*> to upper triangular form by means of orthogonal transformations.
+*>
+*> The upper trapezoidal matrix A is factored as
+*>
+*> A = ( R 0 ) * Z,
+*>
+*> where Z is an N-by-N orthogonal matrix and R is an M-by-M upper
+*> triangular matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements M+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> orthogonal matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements M+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* orthogonal matrix Z as a product of M elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAU (output) REAL array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an ( n - m ) element vector.
+*> tau and z( k ) are chosen to annihilate the elements of the kth row
+*> of X.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A, such that the elements of z( k ) are
+*> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STZRQF( M, N, A, LDA, TAU, INFO )
*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an ( n - m ) element vector.
-* tau and z( k ) are chosen to annihilate the elements of the kth row
-* of X.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A, such that the elements of z( k ) are
-* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/stzrzf.f b/SRC/stzrzf.f
index 99d8f308..bab4a738 100644
--- a/SRC/stzrzf.f
+++ b/SRC/stzrzf.f
@@ -1,102 +1,169 @@
- SUBROUTINE STZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b STZRZF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @generated s
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE STZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* STZRZF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A
-* to upper triangular form by means of orthogonal transformations.
-*
-* The upper trapezoidal matrix A is factored as
-*
-* A = ( R 0 ) * Z,
-*
-* where Z is an N-by-N orthogonal matrix and R is an M-by-M upper
-* triangular matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STZRZF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A
+*> to upper triangular form by means of orthogonal transformations.
+*>
+*> The upper trapezoidal matrix A is factored as
+*>
+*> A = ( R 0 ) * Z,
+*>
+*> where Z is an N-by-N orthogonal matrix and R is an M-by-M upper
+*> triangular matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements M+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* orthogonal matrix Z as a product of M elementary reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) REAL array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements M+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> orthogonal matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup realOTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an ( n - m ) element vector.
+*> tau and z( k ) are chosen to annihilate the elements of the kth row
+*> of X.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A, such that the elements of z( k ) are
+*> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE STZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**T, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an ( n - m ) element vector.
-* tau and z( k ) are chosen to annihilate the elements of the kth row
-* of X.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A, such that the elements of z( k ) are
-* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/xerbla.f b/SRC/xerbla.f
index bb860dae..1427b06f 100644
--- a/SRC/xerbla.f
+++ b/SRC/xerbla.f
@@ -1,34 +1,76 @@
- SUBROUTINE XERBLA( SRNAME, INFO )
+*> \brief \b XERBLA
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*(*) SRNAME
- INTEGER INFO
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE XERBLA( SRNAME, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER*(*) SRNAME
+* INTEGER INFO
+* ..
+*
* Purpose
* =======
*
-* XERBLA is an error handler for the LAPACK routines.
-* It is called by an LAPACK routine if an input parameter has an
-* invalid value. A message is printed and execution stops.
-*
-* Installers may consider modifying the STOP statement in order to
-* call system-specific exception-handling facilities.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> XERBLA is an error handler for the LAPACK routines.
+*> It is called by an LAPACK routine if an input parameter has an
+*> invalid value. A message is printed and execution stops.
+*>
+*> Installers may consider modifying the STOP statement in order to
+*> call system-specific exception-handling facilities.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SRNAME (input) CHARACTER*(*)
-* The name of the routine which called XERBLA.
+*> \param[in] SRNAME
+*> \verbatim
+*> SRNAME is CHARACTER*(*)
+*> The name of the routine which called XERBLA.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The position of the invalid parameter in the parameter list
+*> of the calling routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INFO (input) INTEGER
-* The position of the invalid parameter in the parameter list
-* of the calling routine.
+*> \date November 2011
+*
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ SUBROUTINE XERBLA( SRNAME, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*(*) SRNAME
+ INTEGER INFO
+* ..
*
* =====================================================================
*
diff --git a/SRC/xerbla_array.f b/SRC/xerbla_array.f
index ec146cc4..05c4cfec 100644
--- a/SRC/xerbla_array.f
+++ b/SRC/xerbla_array.f
@@ -1,54 +1,98 @@
- SUBROUTINE XERBLA_ARRAY( SRNAME_ARRAY, SRNAME_LEN, INFO)
+*> \brief \b XERBLA_ARRAY
*
-* -- LAPACK auxiliary routine (version 3.2.2) --
+* =========== DOCUMENTATION ===========
*
-* -- June 2010
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER SRNAME_LEN, INFO
-* ..
-* .. Array Arguments ..
- CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE XERBLA_ARRAY( SRNAME_ARRAY, SRNAME_LEN, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER SRNAME_LEN, INFO
+* ..
+* .. Array Arguments ..
+* CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
+* ..
+*
* Purpose
* =======
*
-* XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK
-* and BLAS error handler. Rather than taking a Fortran string argument
-* as the function's name, XERBLA_ARRAY takes an array of single
-* characters along with the array's length. XERBLA_ARRAY then copies
-* up to 32 characters of that array into a Fortran string and passes
-* that to XERBLA. If called with a non-positive SRNAME_LEN,
-* XERBLA_ARRAY will call XERBLA with a string of all blank characters.
-*
-* Say some macro or other device makes XERBLA_ARRAY available to C99
-* by a name lapack_xerbla and with a common Fortran calling convention.
-* Then a C99 program could invoke XERBLA via:
-* {
-* int flen = strlen(__func__);
-* lapack_xerbla(__func__, &flen, &info);
-* }
-*
-* Providing XERBLA_ARRAY is not necessary for intercepting LAPACK
-* errors. XERBLA_ARRAY calls XERBLA.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> XERBLA_ARRAY assists other languages in calling XERBLA, the LAPACK
+*> and BLAS error handler. Rather than taking a Fortran string argument
+*> as the function's name, XERBLA_ARRAY takes an array of single
+*> characters along with the array's length. XERBLA_ARRAY then copies
+*> up to 32 characters of that array into a Fortran string and passes
+*> that to XERBLA. If called with a non-positive SRNAME_LEN,
+*> XERBLA_ARRAY will call XERBLA with a string of all blank characters.
+*>
+*> Say some macro or other device makes XERBLA_ARRAY available to C99
+*> by a name lapack_xerbla and with a common Fortran calling convention.
+*> Then a C99 program could invoke XERBLA via:
+*> {
+*> int flen = strlen(__func__);
+*> lapack_xerbla(__func__, &flen, &info);
+*> }
+*>
+*> Providing XERBLA_ARRAY is not necessary for intercepting LAPACK
+*> errors. XERBLA_ARRAY calls XERBLA.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SRNAME_ARRAY (input) CHARACTER(1) array, dimension (SRNAME_LEN)
-* The name of the routine which called XERBLA_ARRAY.
+*> \param[in] SRNAME_ARRAY
+*> \verbatim
+*> SRNAME_ARRAY is CHARACTER(1) array, dimension (SRNAME_LEN)
+*> The name of the routine which called XERBLA_ARRAY.
+*> \endverbatim
+*>
+*> \param[in] SRNAME_LEN
+*> \verbatim
+*> SRNAME_LEN is INTEGER
+*> The length of the name in SRNAME_ARRAY.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The position of the invalid parameter in the parameter list
+*> of the calling routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SRNAME_LEN (input) INTEGER
-* The length of the name in SRNAME_ARRAY.
+*> \date November 2011
*
-* INFO (input) INTEGER
-* The position of the invalid parameter in the parameter list
-* of the calling routine.
+*> \ingroup auxOTHERauxiliary
+*
+* =====================================================================
+ SUBROUTINE XERBLA_ARRAY( SRNAME_ARRAY, SRNAME_LEN, INFO)
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER SRNAME_LEN, INFO
+* ..
+* .. Array Arguments ..
+ CHARACTER(1) SRNAME_ARRAY(SRNAME_LEN)
+* ..
*
* =====================================================================
*
diff --git a/SRC/zbbcsd.f b/SRC/zbbcsd.f
index 8d1125cc..2cafafc1 100644
--- a/SRC/zbbcsd.f
+++ b/SRC/zbbcsd.f
@@ -1,16 +1,302 @@
+*> \brief \b ZBBCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
+* THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
+* V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
+* B22D, B22E, RWORK, LRWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
+* INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LRWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B11D( * ), B11E( * ), B12D( * ), B12E( * ),
+* $ B21D( * ), B21E( * ), B22D( * ), B22E( * ),
+* $ PHI( * ), THETA( * ), RWORK( * )
+* COMPLEX*16 U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZBBCSD computes the CS decomposition of a unitary matrix in
+*> bidiagonal-block form,
+*>
+*>
+*> [ B11 | B12 0 0 ]
+*> [ 0 | 0 -I 0 ]
+*> X = [----------------]
+*> [ B21 | B22 0 0 ]
+*> [ 0 | 0 0 I ]
+*>
+*> [ C | -S 0 0 ]
+*> [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**H
+*> = [---------] [---------------] [---------] .
+*> [ | U2 ] [ S | C 0 0 ] [ | V2 ]
+*> [ 0 | 0 0 I ]
+*>
+*> X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
+*> than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
+*> transposed and/or permuted. This can be done in constant time using
+*> the TRANS and SIGNS options. See ZUNCSD for details.)
+*>
+*> The bidiagonal matrices B11, B12, B21, and B22 are represented
+*> implicitly by angles THETA(1:Q) and PHI(1:Q-1).
+*>
+*> The unitary matrices U1, U2, V1T, and V2T are input/output.
+*> The input matrices are pre- or post-multiplied by the appropriate
+*> singular vector matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU1
+*> \verbatim
+*> JOBU1 is CHARACTER
+*> = 'Y': U1 is updated;
+*> otherwise: U1 is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBU2
+*> \verbatim
+*> JOBU2 is CHARACTER
+*> = 'Y': U2 is updated;
+*> otherwise: U2 is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBV1T
+*> \verbatim
+*> JOBV1T is CHARACTER
+*> = 'Y': V1T is updated;
+*> otherwise: V1T is not updated.
+*> \endverbatim
+*>
+*> \param[in] JOBV2T
+*> \verbatim
+*> JOBV2T is CHARACTER
+*> = 'Y': V2T is updated;
+*> otherwise: V2T is not updated.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X, the unitary matrix in
+*> bidiagonal-block form.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in the top-left block of X. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in the top-left block of X.
+*> 0 <= Q <= MIN(P,M-P,M-Q).
+*> \endverbatim
+*>
+*> \param[in,out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension (Q)
+*> On entry, the angles THETA(1),...,THETA(Q) that, along with
+*> PHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block
+*> form. On exit, the angles whose cosines and sines define the
+*> diagonal blocks in the CS decomposition.
+*> \endverbatim
+*>
+*> \param[in,out] PHI
+*> \verbatim
+*> PHI is DOUBLE PRECISION array, dimension (Q-1)
+*> The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),...,
+*> THETA(Q), define the matrix in bidiagonal-block form.
+*> \endverbatim
+*>
+*> \param[in,out] U1
+*> \verbatim
+*> U1 is COMPLEX*16 array, dimension (LDU1,P)
+*> On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
+*> by the left singular vector matrix common to [ B11 ; 0 ] and
+*> [ B12 0 0 ; 0 -I 0 0 ].
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of the array U1.
+*> \endverbatim
+*>
+*> \param[in,out] U2
+*> \verbatim
+*> U2 is COMPLEX*16 array, dimension (LDU2,M-P)
+*> On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
+*> postmultiplied by the left singular vector matrix common to
+*> [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2.
+*> \endverbatim
+*>
+*> \param[in,out] V1T
+*> \verbatim
+*> V1T is COMPLEX*16 array, dimension (LDV1T,Q)
+*> On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
+*> by the conjugate transpose of the right singular vector
+*> matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of the array V1T.
+*> \endverbatim
+*>
+*> \param[in,out] V2T
+*> \verbatim
+*> V2T is COMPLEX*16 array, dimenison (LDV2T,M-Q)
+*> On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
+*> premultiplied by the conjugate transpose of the right
+*> singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
+*> [ B22 0 0 ; 0 0 I ].
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of the array V2T.
+*> \endverbatim
+*>
+*> \param[out] B11D
+*> \verbatim
+*> B11D is DOUBLE PRECISION array, dimension (Q)
+*> When ZBBCSD converges, B11D contains the cosines of THETA(1),
+*> ..., THETA(Q). If ZBBCSD fails to converge, then B11D
+*> contains the diagonal of the partially reduced top-left
+*> block.
+*> \endverbatim
+*>
+*> \param[out] B11E
+*> \verbatim
+*> B11E is DOUBLE PRECISION array, dimension (Q-1)
+*> When ZBBCSD converges, B11E contains zeros. If ZBBCSD fails
+*> to converge, then B11E contains the superdiagonal of the
+*> partially reduced top-left block.
+*> \endverbatim
+*>
+*> \param[out] B12D
+*> \verbatim
+*> B12D is DOUBLE PRECISION array, dimension (Q)
+*> When ZBBCSD converges, B12D contains the negative sines of
+*> THETA(1), ..., THETA(Q). If ZBBCSD fails to converge, then
+*> B12D contains the diagonal of the partially reduced top-right
+*> block.
+*> \endverbatim
+*>
+*> \param[out] B12E
+*> \verbatim
+*> B12E is DOUBLE PRECISION array, dimension (Q-1)
+*> When ZBBCSD converges, B12E contains zeros. If ZBBCSD fails
+*> to converge, then B12E contains the subdiagonal of the
+*> partially reduced top-right block.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK. LRWORK >= MAX(1,8*Q).
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the RWORK array,
+*> returns this value as the first entry of the work array, and
+*> no error message related to LRWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if ZBBCSD did not converge, INFO specifies the number
+*> of nonzero entries in PHI, and B11D, B11E, etc.,
+*> contain the partially reduced matrix.
+*> \endverbatim
+*> \verbatim
+*> Reference
+*> =========
+*> \endverbatim
+*> \verbatim
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLMUL DOUBLE PRECISION, default = MAX(10,MIN(100,EPS**(-1/8)))
+*> TOLMUL controls the convergence criterion of the QR loop.
+*> Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
+*> are within TOLMUL*EPS of either bound.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
$ THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
$ V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
$ B22D, B22E, RWORK, LRWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.0) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
@@ -24,170 +310,6 @@
$ V2T( LDV2T, * )
* ..
*
-* Purpose
-* =======
-*
-* ZBBCSD computes the CS decomposition of a unitary matrix in
-* bidiagonal-block form,
-*
-*
-* [ B11 | B12 0 0 ]
-* [ 0 | 0 -I 0 ]
-* X = [----------------]
-* [ B21 | B22 0 0 ]
-* [ 0 | 0 0 I ]
-*
-* [ C | -S 0 0 ]
-* [ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**H
-* = [---------] [---------------] [---------] .
-* [ | U2 ] [ S | C 0 0 ] [ | V2 ]
-* [ 0 | 0 0 I ]
-*
-* X is M-by-M, its top-left block is P-by-Q, and Q must be no larger
-* than P, M-P, or M-Q. (If Q is not the smallest index, then X must be
-* transposed and/or permuted. This can be done in constant time using
-* the TRANS and SIGNS options. See ZUNCSD for details.)
-*
-* The bidiagonal matrices B11, B12, B21, and B22 are represented
-* implicitly by angles THETA(1:Q) and PHI(1:Q-1).
-*
-* The unitary matrices U1, U2, V1T, and V2T are input/output.
-* The input matrices are pre- or post-multiplied by the appropriate
-* singular vector matrices.
-*
-* Arguments
-* =========
-*
-* JOBU1 (input) CHARACTER
-* = 'Y': U1 is updated;
-* otherwise: U1 is not updated.
-*
-* JOBU2 (input) CHARACTER
-* = 'Y': U2 is updated;
-* otherwise: U2 is not updated.
-*
-* JOBV1T (input) CHARACTER
-* = 'Y': V1T is updated;
-* otherwise: V1T is not updated.
-*
-* JOBV2T (input) CHARACTER
-* = 'Y': V2T is updated;
-* otherwise: V2T is not updated.
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* M (input) INTEGER
-* The number of rows and columns in X, the unitary matrix in
-* bidiagonal-block form.
-*
-* P (input) INTEGER
-* The number of rows in the top-left block of X. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in the top-left block of X.
-* 0 <= Q <= MIN(P,M-P,M-Q).
-*
-* THETA (input/output) DOUBLE PRECISION array, dimension (Q)
-* On entry, the angles THETA(1),...,THETA(Q) that, along with
-* PHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block
-* form. On exit, the angles whose cosines and sines define the
-* diagonal blocks in the CS decomposition.
-*
-* PHI (input/workspace) DOUBLE PRECISION array, dimension (Q-1)
-* The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),...,
-* THETA(Q), define the matrix in bidiagonal-block form.
-*
-* U1 (input/output) COMPLEX*16 array, dimension (LDU1,P)
-* On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
-* by the left singular vector matrix common to [ B11 ; 0 ] and
-* [ B12 0 0 ; 0 -I 0 0 ].
-*
-* LDU1 (input) INTEGER
-* The leading dimension of the array U1.
-*
-* U2 (input/output) COMPLEX*16 array, dimension (LDU2,M-P)
-* On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
-* postmultiplied by the left singular vector matrix common to
-* [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2.
-*
-* V1T (input/output) COMPLEX*16 array, dimension (LDV1T,Q)
-* On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
-* by the conjugate transpose of the right singular vector
-* matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
-*
-* LDV1T (input) INTEGER
-* The leading dimension of the array V1T.
-*
-* V2T (input/output) COMPLEX*16 array, dimenison (LDV2T,M-Q)
-* On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
-* premultiplied by the conjugate transpose of the right
-* singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
-* [ B22 0 0 ; 0 0 I ].
-*
-* LDV2T (input) INTEGER
-* The leading dimension of the array V2T.
-*
-* B11D (output) DOUBLE PRECISION array, dimension (Q)
-* When ZBBCSD converges, B11D contains the cosines of THETA(1),
-* ..., THETA(Q). If ZBBCSD fails to converge, then B11D
-* contains the diagonal of the partially reduced top-left
-* block.
-*
-* B11E (output) DOUBLE PRECISION array, dimension (Q-1)
-* When ZBBCSD converges, B11E contains zeros. If ZBBCSD fails
-* to converge, then B11E contains the superdiagonal of the
-* partially reduced top-left block.
-*
-* B12D (output) DOUBLE PRECISION array, dimension (Q)
-* When ZBBCSD converges, B12D contains the negative sines of
-* THETA(1), ..., THETA(Q). If ZBBCSD fails to converge, then
-* B12D contains the diagonal of the partially reduced top-right
-* block.
-*
-* B12E (output) DOUBLE PRECISION array, dimension (Q-1)
-* When ZBBCSD converges, B12E contains zeros. If ZBBCSD fails
-* to converge, then B12E contains the subdiagonal of the
-* partially reduced top-right block.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK. LRWORK >= MAX(1,8*Q).
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the RWORK array,
-* returns this value as the first entry of the work array, and
-* no error message related to LRWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if ZBBCSD did not converge, INFO specifies the number
-* of nonzero entries in PHI, and B11D, B11E, etc.,
-* contain the partially reduced matrix.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
-* Internal Parameters
-* ===================
-*
-* TOLMUL DOUBLE PRECISION, default = MAX(10,MIN(100,EPS**(-1/8)))
-* TOLMUL controls the convergence criterion of the QR loop.
-* Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they
-* are within TOLMUL*EPS of either bound.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/zbdsqr.f b/SRC/zbdsqr.f
index 6741bd25..be265798 100644
--- a/SRC/zbdsqr.f
+++ b/SRC/zbdsqr.f
@@ -1,10 +1,225 @@
+*> \brief \b ZBDSQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
+* LDU, C, LDC, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), RWORK( * )
+* COMPLEX*16 C( LDC, * ), U( LDU, * ), VT( LDVT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZBDSQR computes the singular values and, optionally, the right and/or
+*> left singular vectors from the singular value decomposition (SVD) of
+*> a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
+*> zero-shift QR algorithm. The SVD of B has the form
+*>
+*> B = Q * S * P**H
+*>
+*> where S is the diagonal matrix of singular values, Q is an orthogonal
+*> matrix of left singular vectors, and P is an orthogonal matrix of
+*> right singular vectors. If left singular vectors are requested, this
+*> subroutine actually returns U*Q instead of Q, and, if right singular
+*> vectors are requested, this subroutine returns P**H*VT instead of
+*> P**H, for given complex input matrices U and VT. When U and VT are
+*> the unitary matrices that reduce a general matrix A to bidiagonal
+*> form: A = U*B*VT, as computed by ZGEBRD, then
+*>
+*> A = (U*Q) * S * (P**H*VT)
+*>
+*> is the SVD of A. Optionally, the subroutine may also compute Q**H*C
+*> for a given complex input matrix C.
+*>
+*> See "Computing Small Singular Values of Bidiagonal Matrices With
+*> Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
+*> LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
+*> no. 5, pp. 873-912, Sept 1990) and
+*> "Accurate singular values and differential qd algorithms," by
+*> B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
+*> Department, University of California at Berkeley, July 1992
+*> for a detailed description of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': B is upper bidiagonal;
+*> = 'L': B is lower bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCVT
+*> \verbatim
+*> NCVT is INTEGER
+*> The number of columns of the matrix VT. NCVT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRU
+*> \verbatim
+*> NRU is INTEGER
+*> The number of rows of the matrix U. NRU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> The number of columns of the matrix C. NCC >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the bidiagonal matrix B.
+*> On exit, if INFO=0, the singular values of B in decreasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the N-1 offdiagonal elements of the bidiagonal
+*> matrix B.
+*> On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
+*> will contain the diagonal and superdiagonal elements of a
+*> bidiagonal matrix orthogonally equivalent to the one given
+*> as input.
+*> \endverbatim
+*>
+*> \param[in,out] VT
+*> \verbatim
+*> VT is COMPLEX*16 array, dimension (LDVT, NCVT)
+*> On entry, an N-by-NCVT matrix VT.
+*> On exit, VT is overwritten by P**H * VT.
+*> Not referenced if NCVT = 0.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT.
+*> LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
+*> \endverbatim
+*>
+*> \param[in,out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU, N)
+*> On entry, an NRU-by-N matrix U.
+*> On exit, U is overwritten by U * Q.
+*> Not referenced if NRU = 0.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,NRU).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, NCC)
+*> On entry, an N-by-NCC matrix C.
+*> On exit, C is overwritten by Q**H * C.
+*> Not referenced if NCC = 0.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C.
+*> LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm did not converge; D and E contain the
+*> elements of a bidiagonal matrix which is orthogonally
+*> similar to the input matrix B; if INFO = i, i
+*> elements of E have not converged to zero.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8)))
+*> TOLMUL controls the convergence criterion of the QR loop.
+*> If it is positive, TOLMUL*EPS is the desired relative
+*> precision in the computed singular values.
+*> If it is negative, abs(TOLMUL*EPS*sigma_max) is the
+*> desired absolute accuracy in the computed singular
+*> values (corresponds to relative accuracy
+*> abs(TOLMUL*EPS) in the largest singular value.
+*> abs(TOLMUL) should be between 1 and 1/EPS, and preferably
+*> between 10 (for fast convergence) and .1/EPS
+*> (for there to be some accuracy in the results).
+*> Default is to lose at either one eighth or 2 of the
+*> available decimal digits in each computed singular value
+*> (whichever is smaller).
+*> \endverbatim
+*> \verbatim
+*> MAXITR INTEGER, default = 6
+*> MAXITR controls the maximum number of passes of the
+*> algorithm through its inner loop. The algorithms stops
+*> (and so fails to converge) if the number of passes
+*> through the inner loop exceeds MAXITR*N**2.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
$ LDU, C, LDC, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,132 +230,6 @@
COMPLEX*16 C( LDC, * ), U( LDU, * ), VT( LDVT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZBDSQR computes the singular values and, optionally, the right and/or
-* left singular vectors from the singular value decomposition (SVD) of
-* a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
-* zero-shift QR algorithm. The SVD of B has the form
-*
-* B = Q * S * P**H
-*
-* where S is the diagonal matrix of singular values, Q is an orthogonal
-* matrix of left singular vectors, and P is an orthogonal matrix of
-* right singular vectors. If left singular vectors are requested, this
-* subroutine actually returns U*Q instead of Q, and, if right singular
-* vectors are requested, this subroutine returns P**H*VT instead of
-* P**H, for given complex input matrices U and VT. When U and VT are
-* the unitary matrices that reduce a general matrix A to bidiagonal
-* form: A = U*B*VT, as computed by ZGEBRD, then
-*
-* A = (U*Q) * S * (P**H*VT)
-*
-* is the SVD of A. Optionally, the subroutine may also compute Q**H*C
-* for a given complex input matrix C.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices With
-* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
-* LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
-* no. 5, pp. 873-912, Sept 1990) and
-* "Accurate singular values and differential qd algorithms," by
-* B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
-* Department, University of California at Berkeley, July 1992
-* for a detailed description of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': B is upper bidiagonal;
-* = 'L': B is lower bidiagonal.
-*
-* N (input) INTEGER
-* The order of the matrix B. N >= 0.
-*
-* NCVT (input) INTEGER
-* The number of columns of the matrix VT. NCVT >= 0.
-*
-* NRU (input) INTEGER
-* The number of rows of the matrix U. NRU >= 0.
-*
-* NCC (input) INTEGER
-* The number of columns of the matrix C. NCC >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the bidiagonal matrix B.
-* On exit, if INFO=0, the singular values of B in decreasing
-* order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the N-1 offdiagonal elements of the bidiagonal
-* matrix B.
-* On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
-* will contain the diagonal and superdiagonal elements of a
-* bidiagonal matrix orthogonally equivalent to the one given
-* as input.
-*
-* VT (input/output) COMPLEX*16 array, dimension (LDVT, NCVT)
-* On entry, an N-by-NCVT matrix VT.
-* On exit, VT is overwritten by P**H * VT.
-* Not referenced if NCVT = 0.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT.
-* LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
-*
-* U (input/output) COMPLEX*16 array, dimension (LDU, N)
-* On entry, an NRU-by-N matrix U.
-* On exit, U is overwritten by U * Q.
-* Not referenced if NRU = 0.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,NRU).
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC, NCC)
-* On entry, an N-by-NCC matrix C.
-* On exit, C is overwritten by Q**H * C.
-* Not referenced if NCC = 0.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C.
-* LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-* if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm did not converge; D and E contain the
-* elements of a bidiagonal matrix which is orthogonally
-* similar to the input matrix B; if INFO = i, i
-* elements of E have not converged to zero.
-*
-* Internal Parameters
-* ===================
-*
-* TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8)))
-* TOLMUL controls the convergence criterion of the QR loop.
-* If it is positive, TOLMUL*EPS is the desired relative
-* precision in the computed singular values.
-* If it is negative, abs(TOLMUL*EPS*sigma_max) is the
-* desired absolute accuracy in the computed singular
-* values (corresponds to relative accuracy
-* abs(TOLMUL*EPS) in the largest singular value.
-* abs(TOLMUL) should be between 1 and 1/EPS, and preferably
-* between 10 (for fast convergence) and .1/EPS
-* (for there to be some accuracy in the results).
-* Default is to lose at either one eighth or 2 of the
-* available decimal digits in each computed singular value
-* (whichever is smaller).
-*
-* MAXITR INTEGER, default = 6
-* MAXITR controls the maximum number of passes of the
-* algorithm through its inner loop. The algorithms stops
-* (and so fails to converge) if the number of passes
-* through the inner loop exceeds MAXITR*N**2.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zcgesv.f b/SRC/zcgesv.f
index a94d3d9f..6366dde0 100644
--- a/SRC/zcgesv.f
+++ b/SRC/zcgesv.f
@@ -1,12 +1,203 @@
+*> \brief <b> ZCGESV computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK,
+* SWORK, RWORK, ITER, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, ITER, LDA, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX SWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( N, * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCGESV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> ZCGESV first attempts to factorize the matrix in COMPLEX and use this
+*> factorization within an iterative refinement procedure to produce a
+*> solution with COMPLEX*16 normwise backward error quality (see below).
+*> If the approach fails the method switches to a COMPLEX*16
+*> factorization and solve.
+*>
+*> The iterative refinement is not going to be a winning strategy if
+*> the ratio COMPLEX performance over COMPLEX*16 performance is too
+*> small. A reasonable strategy should take the number of right-hand
+*> sides and the size of the matrix into account. This might be done
+*> with a call to ILAENV in the future. Up to now, we always try
+*> iterative refinement.
+*>
+*> The iterative refinement process is stopped if
+*> ITER > ITERMAX
+*> or for all the RHS we have:
+*> RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
+*> where
+*> o ITER is the number of the current iteration in the iterative
+*> refinement process
+*> o RNRM is the infinity-norm of the residual
+*> o XNRM is the infinity-norm of the solution
+*> o ANRM is the infinity-operator-norm of the matrix A
+*> o EPS is the machine epsilon returned by DLAMCH('Epsilon')
+*> The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
+*> respectively.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array,
+*> dimension (LDA,N)
+*> On entry, the N-by-N coefficient matrix A.
+*> On exit, if iterative refinement has been successfully used
+*> (INFO.EQ.0 and ITER.GE.0, see description below), then A is
+*> unchanged, if double precision factorization has been used
+*> (INFO.EQ.0 and ITER.LT.0, see description below), then the
+*> array A contains the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> Corresponds either to the single precision factorization
+*> (if INFO.EQ.0 and ITER.GE.0) or the double precision
+*> factorization (if INFO.EQ.0 and ITER.LT.0).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N*NRHS)
+*> This array is used to hold the residual vectors.
+*> \endverbatim
+*>
+*> \param[out] SWORK
+*> \verbatim
+*> SWORK is COMPLEX array, dimension (N*(N+NRHS))
+*> This array is used to use the single precision matrix and the
+*> right-hand sides or solutions in single precision.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ITER
+*> \verbatim
+*> ITER is INTEGER
+*> < 0: iterative refinement has failed, COMPLEX*16
+*> factorization has been performed
+*> -1 : the routine fell back to full precision for
+*> implementation- or machine-specific reasons
+*> -2 : narrowing the precision induced an overflow,
+*> the routine fell back to full precision
+*> -3 : failure of CGETRF
+*> -31: stop the iterative refinement after the 30th
+*> iterations
+*> > 0: iterative refinement has been sucessfully used.
+*> Returns the number of iterations
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) computed in COMPLEX*16 is exactly
+*> zero. The factorization has been completed, but the
+*> factor U is exactly singular, so the solution
+*> could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsolve
+*
+* =====================================================================
SUBROUTINE ZCGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK,
$ SWORK, RWORK, ITER, INFO )
*
-* -- LAPACK PROTOTYPE driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
-* ..
* .. Scalar Arguments ..
INTEGER INFO, ITER, LDA, LDB, LDX, N, NRHS
* ..
@@ -18,113 +209,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZCGESV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* ZCGESV first attempts to factorize the matrix in COMPLEX and use this
-* factorization within an iterative refinement procedure to produce a
-* solution with COMPLEX*16 normwise backward error quality (see below).
-* If the approach fails the method switches to a COMPLEX*16
-* factorization and solve.
-*
-* The iterative refinement is not going to be a winning strategy if
-* the ratio COMPLEX performance over COMPLEX*16 performance is too
-* small. A reasonable strategy should take the number of right-hand
-* sides and the size of the matrix into account. This might be done
-* with a call to ILAENV in the future. Up to now, we always try
-* iterative refinement.
-*
-* The iterative refinement process is stopped if
-* ITER > ITERMAX
-* or for all the RHS we have:
-* RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
-* where
-* o ITER is the number of the current iteration in the iterative
-* refinement process
-* o RNRM is the infinity-norm of the residual
-* o XNRM is the infinity-norm of the solution
-* o ANRM is the infinity-operator-norm of the matrix A
-* o EPS is the machine epsilon returned by DLAMCH('Epsilon')
-* The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
-* respectively.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array,
-* dimension (LDA,N)
-* On entry, the N-by-N coefficient matrix A.
-* On exit, if iterative refinement has been successfully used
-* (INFO.EQ.0 and ITER.GE.0, see description below), then A is
-* unchanged, if double precision factorization has been used
-* (INFO.EQ.0 and ITER.LT.0, see description below), then the
-* array A contains the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
-* Corresponds either to the single precision factorization
-* (if INFO.EQ.0 and ITER.GE.0) or the double precision
-* factorization (if INFO.EQ.0 and ITER.LT.0).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N*NRHS)
-* This array is used to hold the residual vectors.
-*
-* SWORK (workspace) COMPLEX array, dimension (N*(N+NRHS))
-* This array is used to use the single precision matrix and the
-* right-hand sides or solutions in single precision.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* ITER (output) INTEGER
-* < 0: iterative refinement has failed, COMPLEX*16
-* factorization has been performed
-* -1 : the routine fell back to full precision for
-* implementation- or machine-specific reasons
-* -2 : narrowing the precision induced an overflow,
-* the routine fell back to full precision
-* -3 : failure of CGETRF
-* -31: stop the iterative refinement after the 30th
-* iterations
-* > 0: iterative refinement has been sucessfully used.
-* Returns the number of iterations
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) computed in COMPLEX*16 is exactly
-* zero. The factorization has been completed, but the
-* factor U is exactly singular, so the solution
-* could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zcposv.f b/SRC/zcposv.f
index 5b7ebf57..2dd199df 100644
--- a/SRC/zcposv.f
+++ b/SRC/zcposv.f
@@ -1,13 +1,213 @@
- SUBROUTINE ZCPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK,
- $ SWORK, RWORK, ITER, INFO )
+*> \brief <b> ZCPOSV computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK,
+* SWORK, RWORK, ITER, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITER, LDA, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX SWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( N, * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK PROTOTYPE driver routine (version 3.3.1) --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCPOSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> ZCPOSV first attempts to factorize the matrix in COMPLEX and use this
+*> factorization within an iterative refinement procedure to produce a
+*> solution with COMPLEX*16 normwise backward error quality (see below).
+*> If the approach fails the method switches to a COMPLEX*16
+*> factorization and solve.
+*>
+*> The iterative refinement is not going to be a winning strategy if
+*> the ratio COMPLEX performance over COMPLEX*16 performance is too
+*> small. A reasonable strategy should take the number of right-hand
+*> sides and the size of the matrix into account. This might be done
+*> with a call to ILAENV in the future. Up to now, we always try
+*> iterative refinement.
+*>
+*> The iterative refinement process is stopped if
+*> ITER > ITERMAX
+*> or for all the RHS we have:
+*> RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
+*> where
+*> o ITER is the number of the current iteration in the iterative
+*> refinement process
+*> o RNRM is the infinity-norm of the residual
+*> o XNRM is the infinity-norm of the solution
+*> o ANRM is the infinity-operator-norm of the matrix A
+*> o EPS is the machine epsilon returned by DLAMCH('Epsilon')
+*> The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
+*> respectively.
+*>
+*>\endverbatim
*
-* -- April 2011 --
+* Arguments
+* =========
*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array,
+*> dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> Note that the imaginary parts of the diagonal
+*> elements need not be set and are assumed to be zero.
+*> \endverbatim
+*> \verbatim
+*> On exit, if iterative refinement has been successfully used
+*> (INFO.EQ.0 and ITER.GE.0, see description below), then A is
+*> unchanged, if double precision factorization has been used
+*> (INFO.EQ.0 and ITER.LT.0, see description below), then the
+*> array A contains the factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N*NRHS)
+*> This array is used to hold the residual vectors.
+*> \endverbatim
+*>
+*> \param[out] SWORK
+*> \verbatim
+*> SWORK is COMPLEX array, dimension (N*(N+NRHS))
+*> This array is used to use the single precision matrix and the
+*> right-hand sides or solutions in single precision.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] ITER
+*> \verbatim
+*> ITER is INTEGER
+*> < 0: iterative refinement has failed, COMPLEX*16
+*> factorization has been performed
+*> -1 : the routine fell back to full precision for
+*> implementation- or machine-specific reasons
+*> -2 : narrowing the precision induced an overflow,
+*> the routine fell back to full precision
+*> -3 : failure of CPOTRF
+*> -31: stop the iterative refinement after the 30th
+*> iterations
+*> > 0: iterative refinement has been sucessfully used.
+*> Returns the number of iterations
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of
+*> (COMPLEX*16) A is not positive definite, so the
+*> factorization could not be completed, and the solution
+*> has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POsolve
+*
+* =====================================================================
+ SUBROUTINE ZCPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK,
+ $ SWORK, RWORK, ITER, INFO )
+*
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* ..
+* November 2011
+*
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER INFO, ITER, LDA, LDB, LDX, N, NRHS
@@ -19,121 +219,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZCPOSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* ZCPOSV first attempts to factorize the matrix in COMPLEX and use this
-* factorization within an iterative refinement procedure to produce a
-* solution with COMPLEX*16 normwise backward error quality (see below).
-* If the approach fails the method switches to a COMPLEX*16
-* factorization and solve.
-*
-* The iterative refinement is not going to be a winning strategy if
-* the ratio COMPLEX performance over COMPLEX*16 performance is too
-* small. A reasonable strategy should take the number of right-hand
-* sides and the size of the matrix into account. This might be done
-* with a call to ILAENV in the future. Up to now, we always try
-* iterative refinement.
-*
-* The iterative refinement process is stopped if
-* ITER > ITERMAX
-* or for all the RHS we have:
-* RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
-* where
-* o ITER is the number of the current iteration in the iterative
-* refinement process
-* o RNRM is the infinity-norm of the residual
-* o XNRM is the infinity-norm of the solution
-* o ANRM is the infinity-operator-norm of the matrix A
-* o EPS is the machine epsilon returned by DLAMCH('Epsilon')
-* The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
-* respectively.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array,
-* dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* Note that the imaginary parts of the diagonal
-* elements need not be set and are assumed to be zero.
-*
-* On exit, if iterative refinement has been successfully used
-* (INFO.EQ.0 and ITER.GE.0, see description below), then A is
-* unchanged, if double precision factorization has been used
-* (INFO.EQ.0 and ITER.LT.0, see description below), then the
-* array A contains the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N*NRHS)
-* This array is used to hold the residual vectors.
-*
-* SWORK (workspace) COMPLEX array, dimension (N*(N+NRHS))
-* This array is used to use the single precision matrix and the
-* right-hand sides or solutions in single precision.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* ITER (output) INTEGER
-* < 0: iterative refinement has failed, COMPLEX*16
-* factorization has been performed
-* -1 : the routine fell back to full precision for
-* implementation- or machine-specific reasons
-* -2 : narrowing the precision induced an overflow,
-* the routine fell back to full precision
-* -3 : failure of CPOTRF
-* -31: stop the iterative refinement after the 30th
-* iterations
-* > 0: iterative refinement has been sucessfully used.
-* Returns the number of iterations
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of
-* (COMPLEX*16) A is not positive definite, so the
-* factorization could not be completed, and the solution
-* has not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zdrscl.f b/SRC/zdrscl.f
index 5e241643..5afa1157 100644
--- a/SRC/zdrscl.f
+++ b/SRC/zdrscl.f
@@ -1,9 +1,85 @@
+*> \brief \b ZDRSCL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRSCL( N, SA, SX, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* DOUBLE PRECISION SA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 SX( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRSCL multiplies an n-element complex vector x by the real scalar
+*> 1/a. This is done without overflow or underflow as long as
+*> the final result x/a does not overflow or underflow.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of components of the vector x.
+*> \endverbatim
+*>
+*> \param[in] SA
+*> \verbatim
+*> SA is DOUBLE PRECISION
+*> The scalar a which is used to divide each component of x.
+*> SA must be >= 0, or the subroutine will divide by zero.
+*> \endverbatim
+*>
+*> \param[in,out] SX
+*> \verbatim
+*> SX is COMPLEX*16 array, dimension
+*> (1+(N-1)*abs(INCX))
+*> The n-element vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of the vector SX.
+*> > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZDRSCL( N, SA, SX, INCX )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,31 +89,6 @@
COMPLEX*16 SX( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRSCL multiplies an n-element complex vector x by the real scalar
-* 1/a. This is done without overflow or underflow as long as
-* the final result x/a does not overflow or underflow.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of components of the vector x.
-*
-* SA (input) DOUBLE PRECISION
-* The scalar a which is used to divide each component of x.
-* SA must be >= 0, or the subroutine will divide by zero.
-*
-* SX (input/output) COMPLEX*16 array, dimension
-* (1+(N-1)*abs(INCX))
-* The n-element vector x.
-*
-* INCX (input) INTEGER
-* The increment between successive values of the vector SX.
-* > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgbbrd.f b/SRC/zgbbrd.f
index 3aae4b82..50a1a169 100644
--- a/SRC/zgbbrd.f
+++ b/SRC/zgbbrd.f
@@ -1,10 +1,194 @@
+*> \brief \b ZGBBRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
+* LDQ, PT, LDPT, C, LDC, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER VECT
+* INTEGER INFO, KL, KU, LDAB, LDC, LDPT, LDQ, M, N, NCC
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), C( LDC, * ), PT( LDPT, * ),
+* $ Q( LDQ, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBBRD reduces a complex general m-by-n band matrix A to real upper
+*> bidiagonal form B by a unitary transformation: Q**H * A * P = B.
+*>
+*> The routine computes B, and optionally forms Q or P**H, or computes
+*> Q**H*C for a given matrix C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> Specifies whether or not the matrices Q and P**H are to be
+*> formed.
+*> = 'N': do not form Q or P**H;
+*> = 'Q': form Q only;
+*> = 'P': form P**H only;
+*> = 'B': form both.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCC
+*> \verbatim
+*> NCC is INTEGER
+*> The number of columns of the matrix C. NCC >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals of the matrix A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals of the matrix A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the m-by-n band matrix A, stored in rows 1 to
+*> KL+KU+1. The j-th column of A is stored in the j-th column of
+*> the array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
+*> On exit, A is overwritten by values generated during the
+*> reduction.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (min(M,N)-1)
+*> The superdiagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,M)
+*> If VECT = 'Q' or 'B', the m-by-m unitary matrix Q.
+*> If VECT = 'N' or 'P', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] PT
+*> \verbatim
+*> PT is COMPLEX*16 array, dimension (LDPT,N)
+*> If VECT = 'P' or 'B', the n-by-n unitary matrix P'.
+*> If VECT = 'N' or 'Q', the array PT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the array PT.
+*> LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,NCC)
+*> On entry, an m-by-ncc matrix C.
+*> On exit, C is overwritten by Q**H*C.
+*> C is not referenced if NCC = 0.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C.
+*> LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
SUBROUTINE ZGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
$ LDQ, PT, LDPT, C, LDC, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER VECT
@@ -16,91 +200,6 @@
$ Q( LDQ, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBBRD reduces a complex general m-by-n band matrix A to real upper
-* bidiagonal form B by a unitary transformation: Q**H * A * P = B.
-*
-* The routine computes B, and optionally forms Q or P**H, or computes
-* Q**H*C for a given matrix C.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* Specifies whether or not the matrices Q and P**H are to be
-* formed.
-* = 'N': do not form Q or P**H;
-* = 'Q': form Q only;
-* = 'P': form P**H only;
-* = 'B': form both.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NCC (input) INTEGER
-* The number of columns of the matrix C. NCC >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals of the matrix A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals of the matrix A. KU >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the m-by-n band matrix A, stored in rows 1 to
-* KL+KU+1. The j-th column of A is stored in the j-th column of
-* the array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
-* On exit, A is overwritten by values generated during the
-* reduction.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KL+KU+1.
-*
-* D (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B.
-*
-* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
-* The superdiagonal elements of the bidiagonal matrix B.
-*
-* Q (output) COMPLEX*16 array, dimension (LDQ,M)
-* If VECT = 'Q' or 'B', the m-by-m unitary matrix Q.
-* If VECT = 'N' or 'P', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
-*
-* PT (output) COMPLEX*16 array, dimension (LDPT,N)
-* If VECT = 'P' or 'B', the n-by-n unitary matrix P'.
-* If VECT = 'N' or 'Q', the array PT is not referenced.
-*
-* LDPT (input) INTEGER
-* The leading dimension of the array PT.
-* LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,NCC)
-* On entry, an m-by-ncc matrix C.
-* On exit, C is overwritten by Q**H*C.
-* C is not referenced if NCC = 0.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C.
-* LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (max(M,N))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgbcon.f b/SRC/zgbcon.f
index be78b2ae..fdf298c4 100644
--- a/SRC/zgbcon.f
+++ b/SRC/zgbcon.f
@@ -1,12 +1,148 @@
+*> \brief \b ZGBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, KL, KU, LDAB, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBCON estimates the reciprocal of the condition number of a complex
+*> general band matrix A, in either the 1-norm or the infinity-norm,
+*> using the LU factorization computed by ZGBTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by ZGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= N, row i of the matrix was
+*> interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
SUBROUTINE ZGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -19,65 +155,6 @@
COMPLEX*16 AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBCON estimates the reciprocal of the condition number of a complex
-* general band matrix A, in either the 1-norm or the infinity-norm,
-* using the LU factorization computed by ZGBTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by ZGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= N, row i of the matrix was
-* interchanged with row IPIV(i).
-*
-* ANORM (input) DOUBLE PRECISION
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgbequ.f b/SRC/zgbequ.f
index 7d6addb0..902d2e68 100644
--- a/SRC/zgbequ.f
+++ b/SRC/zgbequ.f
@@ -1,10 +1,155 @@
+*> \brief \b ZGBEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), R( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBEQU computes row and column scalings intended to equilibrate an
+*> M-by-N band matrix A and reduce its condition number. R returns the
+*> row scale factors and C the column scale factors, chosen to try to
+*> make the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number. Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
+*> column of A is stored in the j-th column of the array AB as
+*> follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> If INFO = 0, or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
SUBROUTINE ZGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
$ AMAX, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, KL, KU, LDAB, M, N
@@ -15,74 +160,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBEQU computes row and column scalings intended to equilibrate an
-* M-by-N band matrix A and reduce its condition number. R returns the
-* row scale factors and C the column scale factors, chosen to try to
-* make the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
-*
-* R(i) and C(j) are restricted to be between SMLNUM = smallest safe
-* number and BIGNUM = largest safe number. Use of these scaling
-* factors is not guaranteed to reduce the condition number of A but
-* works well in practice.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The band matrix A, stored in rows 1 to KL+KU+1. The j-th
-* column of A is stored in the j-th column of the array AB as
-* follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* R (output) DOUBLE PRECISION array, dimension (M)
-* If INFO = 0, or INFO > M, R contains the row scale factors
-* for A.
-*
-* C (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
-*
-* ROWCND (output) DOUBLE PRECISION
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
-*
-* COLCND (output) DOUBLE PRECISION
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
-*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgbequb.f b/SRC/zgbequb.f
index 8bcecbc7..a6396e46 100644
--- a/SRC/zgbequb.f
+++ b/SRC/zgbequb.f
@@ -1,99 +1,171 @@
- SUBROUTINE ZGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
- $ AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
- DOUBLE PRECISION AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( * ), R( * )
- COMPLEX*16 AB( LDAB, * )
-* ..
-*
+*> \brief \b ZGBEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), R( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* ZGBEQUB computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
-* the radix.
-*
-* R(i) and C(j) are restricted to be a power of the radix between
-* SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
-* of these scaling factors is not guaranteed to reduce the condition
-* number of A but works well in practice.
-*
-* This routine differs from ZGEEQU by restricting the scaling factors
-* to a power of the radix. Baring over- and underflow, scaling by
-* these factors introduces no additional rounding errors. However, the
-* scaled entries' magnitured are no longer approximately 1 but lie
-* between sqrt(radix) and 1/sqrt(radix).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBEQUB computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
+*> the radix.
+*>
+*> R(i) and C(j) are restricted to be a power of the radix between
+*> SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
+*> of these scaling factors is not guaranteed to reduce the condition
+*> number of A but works well in practice.
+*>
+*> This routine differs from ZGEEQU by restricting the scaling factors
+*> to a power of the radix. Baring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors. However, the
+*> scaled entries' magnitured are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) DOUBLE PRECISION array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) DOUBLE PRECISION
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup complex16GBcomputational
*
-* COLCND (output) DOUBLE PRECISION
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE ZGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+ $ AMAX, INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+ DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( * ), R( * )
+ COMPLEX*16 AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgbrfs.f b/SRC/zgbrfs.f
index 1e200be4..9a8d031b 100644
--- a/SRC/zgbrfs.f
+++ b/SRC/zgbrfs.f
@@ -1,13 +1,207 @@
+*> \brief \b ZGBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
+* IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is banded, and provides
+*> error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX*16 array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by ZGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZGBTRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZGBTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
SUBROUTINE ZGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
$ IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -20,99 +214,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is banded, and provides
-* error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) COMPLEX*16 array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by ZGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZGBTRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZGBTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgbrfsx.f b/SRC/zgbrfsx.f
index 871f0f3e..b9a56e3b 100644
--- a/SRC/zgbrfsx.f
+++ b/SRC/zgbrfsx.f
@@ -1,19 +1,461 @@
+*> \brief \b ZGBRFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBRFSX( TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND,
+* BERR, N_ERR_BNDS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, EQUED
+* INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, KL, KU, NRHS,
+* $ NPARAMS, N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZGBRFSX improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED, R
+*> and C below. In this case, the solution and error bounds returned
+*> are for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by DGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
SUBROUTINE ZGBRFSX( TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND,
$ BERR, N_ERR_BNDS, ERR_BNDS_NORM,
$ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS, EQUED
INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, KL, KU, NRHS,
@@ -29,301 +471,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBRFSX improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED, R
-* and C below. In this case, the solution and error bounds returned
-* are for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by DGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zgbsv.f b/SRC/zgbsv.f
index be9c9cc1..eb3243e1 100644
--- a/SRC/zgbsv.f
+++ b/SRC/zgbsv.f
@@ -1,99 +1,173 @@
- SUBROUTINE ZGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
+*> \brief <b> ZGBSV computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK driver routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBSV computes the solution to a complex system of linear equations
+*> A * X = B, where A is a band matrix of order N with KL subdiagonals
+*> and KU superdiagonals, and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as A = L * U, where L is a product of permutation
+*> and unit lower triangular matrices with KL subdiagonals, and U is
+*> upper triangular with KL+KU superdiagonals. The factored form of A
+*> is then used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 AB( LDAB, * ), B( LDB, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KL+KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+KL)
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* ZGBSV computes the solution to a complex system of linear equations
-* A * X = B, where A is a band matrix of order N with KL subdiagonals
-* and KU superdiagonals, and X and B are N-by-NRHS matrices.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* The LU decomposition with partial pivoting and row interchanges is
-* used to factor A as A = L * U, where L is a product of permutation
-* and unit lower triangular matrices with KL subdiagonals, and U is
-* upper triangular with KL+KU superdiagonals. The factored form of A
-* is then used to solve the system of equations A * X = B.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup complex16GBsolve
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KL+KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+KL)
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U because of fill-in resulting from the row interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U because of fill-in resulting from the row interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgbsvx.f b/SRC/zgbsvx.f
index 54d10518..2fbcd31f 100644
--- a/SRC/zgbsvx.f
+++ b/SRC/zgbsvx.f
@@ -1,11 +1,374 @@
+*> \brief <b> ZGBSVX computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
+* RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), C( * ), FERR( * ), R( * ),
+* $ RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBSVX uses the LU factorization to compute the solution to a complex
+*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
+*> where A is a band matrix of order N with KL subdiagonals and KU
+*> superdiagonals, and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed by this subroutine:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*> matrix A (after equilibration if FACT = 'E') as
+*> A = L * U,
+*> where L is a product of permutation and unit lower triangular
+*> matrices with KL subdiagonals, and U is upper triangular with
+*> KL+KU superdiagonals.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFB and IPIV contain the factored form of
+*> A. If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> AB, AFB, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AFB and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFB and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'F' and EQUED is not 'N', then A must have been
+*> equilibrated by the scaling factors in R and/or C. AB is not
+*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
+*> EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) COMPLEX*16 array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains details of the LU factorization of the band matrix
+*> A, as computed by ZGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
+*> the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFB is an output argument and on exit
+*> returns details of the LU factorization of A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFB is an output argument and on exit
+*> returns details of the LU factorization of the equilibrated
+*> matrix A (see the description of AB for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = L*U
+*> as computed by ZGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*> to the original system of equations. Note that A and B are
+*> modified on exit if EQUED .ne. 'N', and the solution to the
+*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*> and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> On exit, RWORK(1) contains the reciprocal pivot growth
+*> factor norm(A)/norm(U). The "max absolute element" norm is
+*> used. If RWORK(1) is much less than 1, then the stability
+*> of the LU factorization of the (equilibrated) matrix A
+*> could be poor. This also means that the solution X, condition
+*> estimator RCOND, and forward error bound FERR could be
+*> unreliable. If factorization fails with 0<INFO<=N, then
+*> RWORK(1) contains the reciprocal pivot growth factor for the
+*> leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, so the solution and error bounds
+*> could not be computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBsolve
+*
+* =====================================================================
SUBROUTINE ZGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
$ RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
@@ -20,245 +383,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBSVX uses the LU factorization to compute the solution to a complex
-* system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-* where A is a band matrix of order N with KL subdiagonals and KU
-* superdiagonals, and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed by this subroutine:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-* matrix A (after equilibration if FACT = 'E') as
-* A = L * U,
-* where L is a product of permutation and unit lower triangular
-* matrices with KL subdiagonals, and U is upper triangular with
-* KL+KU superdiagonals.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFB and IPIV contain the factored form of
-* A. If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* AB, AFB, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AFB and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFB and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* If FACT = 'F' and EQUED is not 'N', then A must have been
-* equilibrated by the scaling factors in R and/or C. AB is not
-* modified if FACT = 'F' or 'N', or if FACT = 'E' and
-* EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input or output) COMPLEX*16 array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains details of the LU factorization of the band matrix
-* A, as computed by ZGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-* the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFB is an output argument and on exit
-* returns details of the LU factorization of A.
-*
-* If FACT = 'E', then AFB is an output argument and on exit
-* returns details of the LU factorization of the equilibrated
-* matrix A (see the description of AB for the form of the
-* equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = L*U
-* as computed by ZGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-* to the original system of equations. Note that A and B are
-* modified on exit if EQUED .ne. 'N', and the solution to the
-* equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-* and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace/output) DOUBLE PRECISION array, dimension (N)
-* On exit, RWORK(1) contains the reciprocal pivot growth
-* factor norm(A)/norm(U). The "max absolute element" norm is
-* used. If RWORK(1) is much less than 1, then the stability
-* of the LU factorization of the (equilibrated) matrix A
-* could be poor. This also means that the solution X, condition
-* estimator RCOND, and forward error bound FERR could be
-* unreliable. If factorization fails with 0<INFO<=N, then
-* RWORK(1) contains the reciprocal pivot growth factor for the
-* leading INFO columns of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, so the solution and error bounds
-* could not be computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
* Moved setting of INFO = N+1 so INFO does not subsequently get
* overwritten. Sven, 17 Mar 05.
diff --git a/SRC/zgbsvxx.f b/SRC/zgbsvxx.f
index 4c02a2f0..4cb09da9 100644
--- a/SRC/zgbsvxx.f
+++ b/SRC/zgbsvxx.f
@@ -1,19 +1,582 @@
+*> \brief <b> ZGBSVXX computes the solution to system of linear equations A * X = B for GB matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBSVXX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
+* LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
+* RCOND, RPVGRW, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBSVXX uses the LU factorization to compute the solution to a
+*> complex*16 system of linear equations A * X = B, where A is an
+*> N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. ZGBSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> ZGBSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> ZGBSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what ZGBSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = P * L * U,
+*>
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is less
+*> than machine precision, the routine still goes on to solve for X
+*> and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'F' and EQUED is not 'N', then AB must have been
+*> equilibrated by the scaling factors in R and/or C. AB is not
+*> modified if FACT = 'F' or 'N', or if FACT = 'E' and
+*> EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) COMPLEX*16 array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains details of the LU factorization of the band matrix
+*> A, as computed by ZGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
+*> the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by DGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit
+*> if EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
+*> inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A. In DGESVX, this quantity is
+*> returned in WORK(1).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBsolve
+*
+* =====================================================================
SUBROUTINE ZGBSVXX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
$ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
$ RCOND, RPVGRW, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
@@ -29,412 +592,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBSVXX uses the LU factorization to compute the solution to a
-* complex*16 system of linear equations A * X = B, where A is an
-* N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. ZGBSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* ZGBSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* ZGBSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what ZGBSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = P * L * U,
-*
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is less
-* than machine precision, the routine still goes on to solve for X
-* and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* If FACT = 'F' and EQUED is not 'N', then AB must have been
-* equilibrated by the scaling factors in R and/or C. AB is not
-* modified if FACT = 'F' or 'N', or if FACT = 'E' and
-* EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input or output) COMPLEX*16 array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains details of the LU factorization of the band matrix
-* A, as computed by ZGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is
-* the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by DGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit
-* if EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
-* inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A. In DGESVX, this quantity is
-* returned in WORK(1).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zgbtf2.f b/SRC/zgbtf2.f
index 546814ef..24183f08 100644
--- a/SRC/zgbtf2.f
+++ b/SRC/zgbtf2.f
@@ -1,88 +1,157 @@
- SUBROUTINE ZGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 AB( LDAB, * )
-* ..
-*
+*> \brief \b ZGBTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* ZGBTF2 computes an LU factorization of a complex m-by-n band matrix
-* A using partial pivoting with row interchanges.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBTF2 computes an LU factorization of a complex m-by-n band matrix
+*> A using partial pivoting with row interchanges.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup complex16GBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U, because of fill-in resulting from the row
+*> interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U, because of fill-in resulting from the row
-* interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgbtrf.f b/SRC/zgbtrf.f
index a5c8b546..8ee6a6a3 100644
--- a/SRC/zgbtrf.f
+++ b/SRC/zgbtrf.f
@@ -1,87 +1,156 @@
- SUBROUTINE ZGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDAB, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 AB( LDAB, * )
-* ..
-*
+*> \brief \b ZGBTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* ZGBTRF computes an LU factorization of a complex m-by-n band matrix A
-* using partial pivoting with row interchanges.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBTRF computes an LU factorization of a complex m-by-n band matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows KL+1 to
-* 2*KL+KU+1; rows 1 to KL of the array need not be set.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows KL+1 to
+*> 2*KL+KU+1; rows 1 to KL of the array need not be set.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(kl+ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, details of the factorization: U is stored as an
+*> upper triangular band matrix with KL+KU superdiagonals in
+*> rows 1 to KL+KU+1, and the multipliers used during the
+*> factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, details of the factorization: U is stored as an
-* upper triangular band matrix with KL+KU superdiagonals in
-* rows 1 to KL+KU+1, and the multipliers used during the
-* factorization are stored in rows KL+KU+2 to 2*KL+KU+1.
-* See below for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup complex16GBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = +i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> M = N = 6, KL = 2, KU = 1:
+*>
+*> On entry: On exit:
+*>
+*> * * * + + + * * * u14 u25 u36
+*> * * + + + + * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
+*> a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+*>
+*> Array elements marked * are not used by the routine; elements marked
+*> + need not be set on entry, but are required by the routine to store
+*> elements of U because of fill-in resulting from the row interchanges.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* M = N = 6, KL = 2, KU = 1:
-*
-* On entry: On exit:
-*
-* * * * + + + * * * u14 u25 u36
-* * * + + + + * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-* a21 a32 a43 a54 a65 * m21 m32 m43 m54 m65 *
-* a31 a42 a53 a64 * * m31 m42 m53 m64 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; elements marked
-* + need not be set on entry, but are required by the routine to store
-* elements of U because of fill-in resulting from the row interchanges.
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDAB, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgbtrs.f b/SRC/zgbtrs.f
index af27ae8e..f005129e 100644
--- a/SRC/zgbtrs.f
+++ b/SRC/zgbtrs.f
@@ -1,10 +1,139 @@
+*> \brief \b ZGBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBTRS solves a system of linear equations
+*> A * X = B, A**T * X = B, or A**H * X = B
+*> with a general band matrix A using the LU factorization computed
+*> by ZGBTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by ZGBTRF. U is stored as an upper triangular band
+*> matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
+*> the multipliers used during the factorization are stored in
+*> rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= N, row i of the matrix was
+*> interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
SUBROUTINE ZGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,61 +144,6 @@
COMPLEX*16 AB( LDAB, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBTRS solves a system of linear equations
-* A * X = B, A**T * X = B, or A**H * X = B
-* with a general band matrix A using the LU factorization computed
-* by ZGBTRF.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by ZGBTRF. U is stored as an upper triangular band
-* matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
-* the multipliers used during the factorization are stored in
-* rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= N, row i of the matrix was
-* interchanged with row IPIV(i).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgebak.f b/SRC/zgebak.f
index e557ea52..964e91a9 100644
--- a/SRC/zgebak.f
+++ b/SRC/zgebak.f
@@ -1,10 +1,132 @@
+*> \brief \b ZGEBAK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB, SIDE
+* INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION SCALE( * )
+* COMPLEX*16 V( LDV, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEBAK forms the right or left eigenvectors of a complex general
+*> matrix by backward transformation on the computed eigenvectors of the
+*> balanced matrix output by ZGEBAL.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the type of backward transformation required:
+*> = 'N', do nothing, return immediately;
+*> = 'P', do backward transformation for permutation only;
+*> = 'S', do backward transformation for scaling only;
+*> = 'B', do backward transformations for both permutation and
+*> scaling.
+*> JOB must be the same as the argument JOB supplied to ZGEBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': V contains right eigenvectors;
+*> = 'L': V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrix V. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> The integers ILO and IHI determined by ZGEBAL.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutation and scaling factors, as returned
+*> by ZGEBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix V. M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,M)
+*> On entry, the matrix of right or left eigenvectors to be
+*> transformed, as returned by ZHSEIN or ZTREVC.
+*> On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOB, SIDE
@@ -15,57 +137,6 @@
COMPLEX*16 V( LDV, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGEBAK forms the right or left eigenvectors of a complex general
-* matrix by backward transformation on the computed eigenvectors of the
-* balanced matrix output by ZGEBAL.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies the type of backward transformation required:
-* = 'N', do nothing, return immediately;
-* = 'P', do backward transformation for permutation only;
-* = 'S', do backward transformation for scaling only;
-* = 'B', do backward transformations for both permutation and
-* scaling.
-* JOB must be the same as the argument JOB supplied to ZGEBAL.
-*
-* SIDE (input) CHARACTER*1
-* = 'R': V contains right eigenvectors;
-* = 'L': V contains left eigenvectors.
-*
-* N (input) INTEGER
-* The number of rows of the matrix V. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* The integers ILO and IHI determined by ZGEBAL.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* SCALE (input) DOUBLE PRECISION array, dimension (N)
-* Details of the permutation and scaling factors, as returned
-* by ZGEBAL.
-*
-* M (input) INTEGER
-* The number of columns of the matrix V. M >= 0.
-*
-* V (input/output) COMPLEX*16 array, dimension (LDV,M)
-* On entry, the matrix of right or left eigenvectors to be
-* transformed, as returned by ZHSEIN or ZTREVC.
-* On exit, V is overwritten by the transformed eigenvectors.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgebal.f b/SRC/zgebal.f
index a3000f52..1dec1130 100644
--- a/SRC/zgebal.f
+++ b/SRC/zgebal.f
@@ -1,105 +1,152 @@
- SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-*
-* .. Scalar Arguments ..
- CHARACTER JOB
- INTEGER IHI, ILO, INFO, LDA, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION SCALE( * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZGEBAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION SCALE( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGEBAL balances a general complex matrix A. This involves, first,
-* permuting A by a similarity transformation to isolate eigenvalues
-* in the first 1 to ILO-1 and last IHI+1 to N elements on the
-* diagonal; and second, applying a diagonal similarity transformation
-* to rows and columns ILO to IHI to make the rows and columns as
-* close in norm as possible. Both steps are optional.
-*
-* Balancing may reduce the 1-norm of the matrix, and improve the
-* accuracy of the computed eigenvalues and/or eigenvectors.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEBAL balances a general complex matrix A. This involves, first,
+*> permuting A by a similarity transformation to isolate eigenvalues
+*> in the first 1 to ILO-1 and last IHI+1 to N elements on the
+*> diagonal; and second, applying a diagonal similarity transformation
+*> to rows and columns ILO to IHI to make the rows and columns as
+*> close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrix, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the operations to be performed on A:
-* = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0
-* for i = 1,...,N;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the input matrix A.
-* On exit, A is overwritten by the balanced matrix.
-* If JOB = 'N', A is not referenced.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the operations to be performed on A:
+*> = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0
+*> for i = 1,...,N;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ILO (output) INTEGER
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IHI (output) INTEGER
-* ILO and IHI are set to integers such that on exit
-* A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
-* If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \date November 2011
*
-* SCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied to
-* A. If P(j) is the index of the row and column interchanged
-* with row and column j and D(j) is the scaling factor
-* applied to row and column j, then
-* SCALE(j) = P(j) for j = 1,...,ILO-1
-* = D(j) for j = ILO,...,IHI
-* = P(j) for j = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> ILO (output) INTEGER
+*>
+*> IHI (output) INTEGER
+*> ILO and IHI are set to integers such that on exit
+*> A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N.
+*> If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*>
+*> SCALE (output) DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied to
+*> A. If P(j) is the index of the row and column interchanged
+*> with row and column j and D(j) is the scaling factor
+*> applied to row and column j, then
+*> SCALE(j) = P(j) for j = 1,...,ILO-1
+*> = D(j) for j = ILO,...,IHI
+*> = P(j) for j = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The permutations consist of row and column interchanges which put
+*> the matrix in the form
+*>
+*> ( T1 X Y )
+*> P A P = ( 0 B Z )
+*> ( 0 0 T2 )
+*>
+*> where T1 and T2 are upper triangular matrices whose eigenvalues lie
+*> along the diagonal. The column indices ILO and IHI mark the starting
+*> and ending columns of the submatrix B. Balancing consists of applying
+*> a diagonal similarity transformation inv(D) * B * D to make the
+*> 1-norms of each row of B and its corresponding column nearly equal.
+*> The output matrix is
+*>
+*> ( T1 X*D Y )
+*> ( 0 inv(D)*B*D inv(D)*Z ).
+*> ( 0 0 T2 )
+*>
+*> Information about the permutations P and the diagonal matrix D is
+*> returned in the vector SCALE.
+*>
+*> This subroutine is based on the EISPACK routine CBAL.
+*>
+*> Modified by Tzu-Yi Chen, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
*
-* The permutations consist of row and column interchanges which put
-* the matrix in the form
-*
-* ( T1 X Y )
-* P A P = ( 0 B Z )
-* ( 0 0 T2 )
-*
-* where T1 and T2 are upper triangular matrices whose eigenvalues lie
-* along the diagonal. The column indices ILO and IHI mark the starting
-* and ending columns of the submatrix B. Balancing consists of applying
-* a diagonal similarity transformation inv(D) * B * D to make the
-* 1-norms of each row of B and its corresponding column nearly equal.
-* The output matrix is
-*
-* ( T1 X*D Y )
-* ( 0 inv(D)*B*D inv(D)*Z ).
-* ( 0 0 T2 )
-*
-* Information about the permutations P and the diagonal matrix D is
-* returned in the vector SCALE.
-*
-* This subroutine is based on the EISPACK routine CBAL.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by Tzu-Yi Chen, Computer Science Division, University of
-* California at Berkeley, USA
+* .. Scalar Arguments ..
+ CHARACTER JOB
+ INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION SCALE( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgebd2.f b/SRC/zgebd2.f
index 37fbc008..dd17cfa6 100644
--- a/SRC/zgebd2.f
+++ b/SRC/zgebd2.f
@@ -1,126 +1,159 @@
- SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
- COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
-* ..
-*
+*> \brief \b ZGEBD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEBD2 reduces a complex general m by n matrix A to upper or lower
-* real bidiagonal form B by a unitary transformation: Q**H * A * P = B.
-*
-* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEBD2 reduces a complex general m by n matrix A to upper or lower
+*> real bidiagonal form B by a unitary transformation: Q**H * A * P = B.
+*>
+*> If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n general matrix to be reduced.
-* On exit,
-* if m >= n, the diagonal and the first superdiagonal are
-* overwritten with the upper bidiagonal matrix B; the
-* elements below the diagonal, with the array TAUQ, represent
-* the unitary matrix Q as a product of elementary
-* reflectors, and the elements above the first superdiagonal,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors;
-* if m < n, the diagonal and the first subdiagonal are
-* overwritten with the lower bidiagonal matrix B; the
-* elements below the first subdiagonal, with the array TAUQ,
-* represent the unitary matrix Q as a product of
-* elementary reflectors, and the elements above the diagonal,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B:
-* D(i) = A(i,i).
-*
-* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
-* The off-diagonal elements of the bidiagonal matrix B:
-* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
-* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAUQ (output) COMPLEX*16 array dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q. See Further Details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAUP (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix P. See Further Details.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (max(M,N))
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
+*> The off-diagonal elements of the bidiagonal matrix B:
+*> if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
+*> if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*>
+*> TAUQ (output) COMPLEX*16 array dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Q. See Further Details.
+*>
+*> TAUP (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix P. See Further Details.
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (max(M,N))
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> If m >= n,
+*>
+*> Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, and v and u are complex
+*> vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in
+*> A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in
+*> A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n,
+*>
+*> Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, v and u are complex vectors;
+*> v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
+*> u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
+*> tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The contents of A on exit are illustrated by the following examples:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
+*> ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
+*> ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
+*> ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
+*> ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
+*> ( v1 v2 v3 v4 v5 )
+*>
+*> where d and e denote diagonal and off-diagonal elements of B, vi
+*> denotes an element of the vector defining H(i), and ui an element of
+*> the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* If m >= n,
-*
-* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, and v and u are complex
-* vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in
-* A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in
-* A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n,
-*
-* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, v and u are complex vectors;
-* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i);
-* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n);
-* tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The contents of A on exit are illustrated by the following examples:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
-* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
-* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
-* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
-* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
-* ( v1 v2 v3 v4 v5 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of B, vi
-* denotes an element of the vector defining H(i), and ui an element of
-* the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+ COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgebrd.f b/SRC/zgebrd.f
index 04b13ee6..cba99d2b 100644
--- a/SRC/zgebrd.f
+++ b/SRC/zgebrd.f
@@ -1,138 +1,172 @@
- SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
- COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
-* ..
-*
+*> \brief \b ZGEBRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEBRD reduces a general complex M-by-N matrix A to upper or lower
-* bidiagonal form B by a unitary transformation: Q**H * A * P = B.
-*
-* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEBRD reduces a general complex M-by-N matrix A to upper or lower
+*> bidiagonal form B by a unitary transformation: Q**H * A * P = B.
+*>
+*> If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N general matrix to be reduced.
-* On exit,
-* if m >= n, the diagonal and the first superdiagonal are
-* overwritten with the upper bidiagonal matrix B; the
-* elements below the diagonal, with the array TAUQ, represent
-* the unitary matrix Q as a product of elementary
-* reflectors, and the elements above the first superdiagonal,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors;
-* if m < n, the diagonal and the first subdiagonal are
-* overwritten with the lower bidiagonal matrix B; the
-* elements below the first subdiagonal, with the array TAUQ,
-* represent the unitary matrix Q as a product of
-* elementary reflectors, and the elements above the diagonal,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B:
-* D(i) = A(i,i).
-*
-* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
-* The off-diagonal elements of the bidiagonal matrix B:
-* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
-* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
-*
-* TAUQ (output) COMPLEX*16 array dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q. See Further Details.
-*
-* TAUP (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix P. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,M,N).
-* For optimum performance LWORK >= (M+N)*NB, where NB
-* is the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
+*> The off-diagonal elements of the bidiagonal matrix B:
+*> if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1;
+*> if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1.
+*>
+*> TAUQ (output) COMPLEX*16 array dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Q. See Further Details.
+*>
+*> TAUP (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix P. See Further Details.
+*>
+*> WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The length of the array WORK. LWORK >= max(1,M,N).
+*> For optimum performance LWORK >= (M+N)*NB, where NB
+*> is the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> If m >= n,
+*>
+*> Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, and v and u are complex
+*> vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in
+*> A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in
+*> A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n,
+*>
+*> Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, and v and u are complex
+*> vectors; v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in
+*> A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The contents of A on exit are illustrated by the following examples:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
+*> ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
+*> ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
+*> ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
+*> ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
+*> ( v1 v2 v3 v4 v5 )
+*>
+*> where d and e denote diagonal and off-diagonal elements of B, vi
+*> denotes an element of the vector defining H(i), and ui an element of
+*> the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
+ $ INFO )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* If m >= n,
-*
-* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, and v and u are complex
-* vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in
-* A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in
-* A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n,
-*
-* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, and v and u are complex
-* vectors; v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in
-* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The contents of A on exit are illustrated by the following examples:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 )
-* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 )
-* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 )
-* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 )
-* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 )
-* ( v1 v2 v3 v4 v5 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of B, vi
-* denotes an element of the vector defining H(i), and ui an element of
-* the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+ COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgecon.f b/SRC/zgecon.f
index 1e7b62b8..efd3475b 100644
--- a/SRC/zgecon.f
+++ b/SRC/zgecon.f
@@ -1,12 +1,125 @@
+*> \brief \b ZGECON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGECON estimates the reciprocal of the condition number of a general
+*> complex matrix A, in either the 1-norm or the infinity-norm, using
+*> the LU factorization computed by ZGETRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
SUBROUTINE ZGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,52 +131,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGECON estimates the reciprocal of the condition number of a general
-* complex matrix A, in either the 1-norm or the infinity-norm, using
-* the LU factorization computed by ZGETRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by ZGETRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* ANORM (input) DOUBLE PRECISION
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgeequ.f b/SRC/zgeequ.f
index befad1b6..dd67bdbe 100644
--- a/SRC/zgeequ.f
+++ b/SRC/zgeequ.f
@@ -1,10 +1,141 @@
+*> \brief \b ZGEEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), R( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEEQU computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number. Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix whose equilibration factors are
+*> to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
SUBROUTINE ZGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, M, N
@@ -15,66 +146,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGEEQU computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
-*
-* R(i) and C(j) are restricted to be between SMLNUM = smallest safe
-* number and BIGNUM = largest safe number. Use of these scaling
-* factors is not guaranteed to reduce the condition number of A but
-* works well in practice.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix whose equilibration factors are
-* to be computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* R (output) DOUBLE PRECISION array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
-*
-* C (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
-*
-* ROWCND (output) DOUBLE PRECISION
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
-*
-* COLCND (output) DOUBLE PRECISION
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
-*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgeequb.f b/SRC/zgeequb.f
index 32fe3e5a..60985567 100644
--- a/SRC/zgeequb.f
+++ b/SRC/zgeequb.f
@@ -1,91 +1,157 @@
- SUBROUTINE ZGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
- $ INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
- DOUBLE PRECISION AMAX, COLCND, ROWCND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( * ), R( * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZGEEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), R( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGEEQUB computes row and column scalings intended to equilibrate an
-* M-by-N matrix A and reduce its condition number. R returns the row
-* scale factors and C the column scale factors, chosen to try to make
-* the largest element in each row and column of the matrix B with
-* elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
-* the radix.
-*
-* R(i) and C(j) are restricted to be a power of the radix between
-* SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
-* of these scaling factors is not guaranteed to reduce the condition
-* number of A but works well in practice.
-*
-* This routine differs from ZGEEQU by restricting the scaling factors
-* to a power of the radix. Baring over- and underflow, scaling by
-* these factors introduces no additional rounding errors. However, the
-* scaled entries' magnitured are no longer approximately 1 but lie
-* between sqrt(radix) and 1/sqrt(radix).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEEQUB computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number. R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have an absolute value of at most
+*> the radix.
+*>
+*> R(i) and C(j) are restricted to be a power of the radix between
+*> SMLNUM = smallest safe number and BIGNUM = largest safe number. Use
+*> of these scaling factors is not guaranteed to reduce the condition
+*> number of A but works well in practice.
+*>
+*> This routine differs from ZGEEQU by restricting the scaling factors
+*> to a power of the radix. Baring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors. However, the
+*> scaled entries' magnitured are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix whose equilibration factors are
-* to be computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix whose equilibration factors are
+*> to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> If INFO = 0 or INFO > M, R contains the row scale factors
+*> for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
+*> AMAX is neither too large nor too small, it is not worth
+*> scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> If INFO = 0, COLCND contains the ratio of the smallest
+*> C(i) to the largest C(i). If COLCND >= 0.1, it is not
+*> worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= M: the i-th row of A is exactly zero
+*> > M: the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* R (output) DOUBLE PRECISION array, dimension (M)
-* If INFO = 0 or INFO > M, R contains the row scale factors
-* for A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, C contains the column scale factors for A.
+*> \date November 2011
*
-* ROWCND (output) DOUBLE PRECISION
-* If INFO = 0 or INFO > M, ROWCND contains the ratio of the
-* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
-* AMAX is neither too large nor too small, it is not worth
-* scaling by R.
+*> \ingroup complex16GEcomputational
*
-* COLCND (output) DOUBLE PRECISION
-* If INFO = 0, COLCND contains the ratio of the smallest
-* C(i) to the largest C(i). If COLCND >= 0.1, it is not
-* worth scaling by C.
+* =====================================================================
+ SUBROUTINE ZGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+ $ INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= M: the i-th row of A is exactly zero
-* > M: the (i-M)-th column of A is exactly zero
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+ DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( * ), R( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgees.f b/SRC/zgees.f
index d9712c7d..7cdae1fe 100644
--- a/SRC/zgees.f
+++ b/SRC/zgees.f
@@ -1,10 +1,199 @@
+*> \brief <b> ZGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS,
+* LDVS, WORK, LWORK, RWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVS, SORT
+* INTEGER INFO, LDA, LDVS, LWORK, N, SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), VS( LDVS, * ), W( * ), WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELECT
+* EXTERNAL SELECT
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEES computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues, the Schur form T, and, optionally, the matrix of Schur
+*> vectors Z. This gives the Schur factorization A = Z*T*(Z**H).
+*>
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> Schur form so that selected eigenvalues are at the top left.
+*> The leading columns of Z then form an orthonormal basis for the
+*> invariant subspace corresponding to the selected eigenvalues.
+*>
+*> A complex matrix is in Schur form if it is upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVS
+*> \verbatim
+*> JOBVS is CHARACTER*1
+*> = 'N': Schur vectors are not computed;
+*> = 'V': Schur vectors are computed.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the Schur form.
+*> = 'N': Eigenvalues are not ordered:
+*> = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is procedure) LOGICAL FUNCTION of one COMPLEX*16 argument
+*> SELECT must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'S', SELECT is used to select eigenvalues to order
+*> to the top left of the Schur form.
+*> IF SORT = 'N', SELECT is not referenced.
+*> The eigenvalue W(j) is selected if SELECT(W(j)) is true.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten by its Schur form T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues for which
+*> SELECT is true.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> W contains the computed eigenvalues, in the same order that
+*> they appear on the diagonal of the output Schur form T.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX*16 array, dimension (LDVS,N)
+*> If JOBVS = 'V', VS contains the unitary matrix Z of Schur
+*> vectors.
+*> If JOBVS = 'N', VS is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> The leading dimension of the array VS. LDVS >= 1; if
+*> JOBVS = 'V', LDVS >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is
+*> <= N: the QR algorithm failed to compute all the
+*> eigenvalues; elements 1:ILO-1 and i+1:N of W
+*> contain those eigenvalues which have converged;
+*> if JOBVS = 'V', VS contains the matrix which
+*> reduces A to its partially converged Schur form.
+*> = N+1: the eigenvalues could not be reordered because
+*> some eigenvalues were too close to separate (the
+*> problem is very ill-conditioned);
+*> = N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Schur form no longer satisfy
+*> SELECT = .TRUE.. This could also be caused by
+*> underflow due to scaling.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+* =====================================================================
SUBROUTINE ZGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS,
$ LDVS, WORK, LWORK, RWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVS, SORT
@@ -20,103 +209,6 @@
EXTERNAL SELECT
* ..
*
-* Purpose
-* =======
-*
-* ZGEES computes for an N-by-N complex nonsymmetric matrix A, the
-* eigenvalues, the Schur form T, and, optionally, the matrix of Schur
-* vectors Z. This gives the Schur factorization A = Z*T*(Z**H).
-*
-* Optionally, it also orders the eigenvalues on the diagonal of the
-* Schur form so that selected eigenvalues are at the top left.
-* The leading columns of Z then form an orthonormal basis for the
-* invariant subspace corresponding to the selected eigenvalues.
-*
-* A complex matrix is in Schur form if it is upper triangular.
-*
-* Arguments
-* =========
-*
-* JOBVS (input) CHARACTER*1
-* = 'N': Schur vectors are not computed;
-* = 'V': Schur vectors are computed.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the Schur form.
-* = 'N': Eigenvalues are not ordered:
-* = 'S': Eigenvalues are ordered (see SELECT).
-*
-* SELECT (external procedure) LOGICAL FUNCTION of one COMPLEX*16 argument
-* SELECT must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'S', SELECT is used to select eigenvalues to order
-* to the top left of the Schur form.
-* IF SORT = 'N', SELECT is not referenced.
-* The eigenvalue W(j) is selected if SELECT(W(j)) is true.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten by its Schur form T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues for which
-* SELECT is true.
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* W contains the computed eigenvalues, in the same order that
-* they appear on the diagonal of the output Schur form T.
-*
-* VS (output) COMPLEX*16 array, dimension (LDVS,N)
-* If JOBVS = 'V', VS contains the unitary matrix Z of Schur
-* vectors.
-* If JOBVS = 'N', VS is not referenced.
-*
-* LDVS (input) INTEGER
-* The leading dimension of the array VS. LDVS >= 1; if
-* JOBVS = 'V', LDVS >= N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is
-* <= N: the QR algorithm failed to compute all the
-* eigenvalues; elements 1:ILO-1 and i+1:N of W
-* contain those eigenvalues which have converged;
-* if JOBVS = 'V', VS contains the matrix which
-* reduces A to its partially converged Schur form.
-* = N+1: the eigenvalues could not be reordered because
-* some eigenvalues were too close to separate (the
-* problem is very ill-conditioned);
-* = N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Schur form no longer satisfy
-* SELECT = .TRUE.. This could also be caused by
-* underflow due to scaling.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgeesx.f b/SRC/zgeesx.f
index 828d9a7f..8deb4fd9 100644
--- a/SRC/zgeesx.f
+++ b/SRC/zgeesx.f
@@ -1,11 +1,241 @@
+*> \brief <b> ZGEESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM, W,
+* VS, LDVS, RCONDE, RCONDV, WORK, LWORK, RWORK,
+* BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVS, SENSE, SORT
+* INTEGER INFO, LDA, LDVS, LWORK, N, SDIM
+* DOUBLE PRECISION RCONDE, RCONDV
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), VS( LDVS, * ), W( * ), WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELECT
+* EXTERNAL SELECT
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEESX computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues, the Schur form T, and, optionally, the matrix of Schur
+*> vectors Z. This gives the Schur factorization A = Z*T*(Z**H).
+*>
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> Schur form so that selected eigenvalues are at the top left;
+*> computes a reciprocal condition number for the average of the
+*> selected eigenvalues (RCONDE); and computes a reciprocal condition
+*> number for the right invariant subspace corresponding to the
+*> selected eigenvalues (RCONDV). The leading columns of Z form an
+*> orthonormal basis for this invariant subspace.
+*>
+*> For further explanation of the reciprocal condition numbers RCONDE
+*> and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
+*> these quantities are called s and sep respectively).
+*>
+*> A complex matrix is in Schur form if it is upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVS
+*> \verbatim
+*> JOBVS is CHARACTER*1
+*> = 'N': Schur vectors are not computed;
+*> = 'V': Schur vectors are computed.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is procedure) LOGICAL FUNCTION of one COMPLEX*16 argument
+*> SELECT must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'S', SELECT is used to select eigenvalues to order
+*> to the top left of the Schur form.
+*> If SORT = 'N', SELECT is not referenced.
+*> An eigenvalue W(j) is selected if SELECT(W(j)) is true.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': None are computed;
+*> = 'E': Computed for average of selected eigenvalues only;
+*> = 'V': Computed for selected right invariant subspace only;
+*> = 'B': Computed for both.
+*> If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A is overwritten by its Schur form T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues for which
+*> SELECT is true.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> W contains the computed eigenvalues, in the same order
+*> that they appear on the diagonal of the output Schur form T.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX*16 array, dimension (LDVS,N)
+*> If JOBVS = 'V', VS contains the unitary matrix Z of Schur
+*> vectors.
+*> If JOBVS = 'N', VS is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> The leading dimension of the array VS. LDVS >= 1, and if
+*> JOBVS = 'V', LDVS >= N.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION
+*> If SENSE = 'E' or 'B', RCONDE contains the reciprocal
+*> condition number for the average of the selected eigenvalues.
+*> Not referenced if SENSE = 'N' or 'V'.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION
+*> If SENSE = 'V' or 'B', RCONDV contains the reciprocal
+*> condition number for the selected right invariant subspace.
+*> Not referenced if SENSE = 'N' or 'E'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> Also, if SENSE = 'E' or 'V' or 'B', LWORK >= 2*SDIM*(N-SDIM),
+*> where SDIM is the number of selected eigenvalues computed by
+*> this routine. Note that 2*SDIM*(N-SDIM) <= N*N/2. Note also
+*> that an error is only returned if LWORK < max(1,2*N), but if
+*> SENSE = 'E' or 'V' or 'B' this may not be large enough.
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates upper bound on the optimal size of the
+*> array WORK, returns this value as the first entry of the WORK
+*> array, and no error message related to LWORK is issued by
+*> XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is
+*> <= N: the QR algorithm failed to compute all the
+*> eigenvalues; elements 1:ILO-1 and i+1:N of W
+*> contain those eigenvalues which have converged; if
+*> JOBVS = 'V', VS contains the transformation which
+*> reduces A to its partially converged Schur form.
+*> = N+1: the eigenvalues could not be reordered because some
+*> eigenvalues were too close to separate (the problem
+*> is very ill-conditioned);
+*> = N+2: after reordering, roundoff changed values of some
+*> complex eigenvalues so that leading eigenvalues in
+*> the Schur form no longer satisfy SELECT=.TRUE. This
+*> could also be caused by underflow due to scaling.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+* =====================================================================
SUBROUTINE ZGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM, W,
$ VS, LDVS, RCONDE, RCONDV, WORK, LWORK, RWORK,
$ BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK eigen routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVS, SENSE, SORT
@@ -22,133 +252,6 @@
EXTERNAL SELECT
* ..
*
-* Purpose
-* =======
-*
-* ZGEESX computes for an N-by-N complex nonsymmetric matrix A, the
-* eigenvalues, the Schur form T, and, optionally, the matrix of Schur
-* vectors Z. This gives the Schur factorization A = Z*T*(Z**H).
-*
-* Optionally, it also orders the eigenvalues on the diagonal of the
-* Schur form so that selected eigenvalues are at the top left;
-* computes a reciprocal condition number for the average of the
-* selected eigenvalues (RCONDE); and computes a reciprocal condition
-* number for the right invariant subspace corresponding to the
-* selected eigenvalues (RCONDV). The leading columns of Z form an
-* orthonormal basis for this invariant subspace.
-*
-* For further explanation of the reciprocal condition numbers RCONDE
-* and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
-* these quantities are called s and sep respectively).
-*
-* A complex matrix is in Schur form if it is upper triangular.
-*
-* Arguments
-* =========
-*
-* JOBVS (input) CHARACTER*1
-* = 'N': Schur vectors are not computed;
-* = 'V': Schur vectors are computed.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELECT).
-*
-* SELECT (external procedure) LOGICAL FUNCTION of one COMPLEX*16 argument
-* SELECT must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'S', SELECT is used to select eigenvalues to order
-* to the top left of the Schur form.
-* If SORT = 'N', SELECT is not referenced.
-* An eigenvalue W(j) is selected if SELECT(W(j)) is true.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': None are computed;
-* = 'E': Computed for average of selected eigenvalues only;
-* = 'V': Computed for selected right invariant subspace only;
-* = 'B': Computed for both.
-* If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the N-by-N matrix A.
-* On exit, A is overwritten by its Schur form T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues for which
-* SELECT is true.
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* W contains the computed eigenvalues, in the same order
-* that they appear on the diagonal of the output Schur form T.
-*
-* VS (output) COMPLEX*16 array, dimension (LDVS,N)
-* If JOBVS = 'V', VS contains the unitary matrix Z of Schur
-* vectors.
-* If JOBVS = 'N', VS is not referenced.
-*
-* LDVS (input) INTEGER
-* The leading dimension of the array VS. LDVS >= 1, and if
-* JOBVS = 'V', LDVS >= N.
-*
-* RCONDE (output) DOUBLE PRECISION
-* If SENSE = 'E' or 'B', RCONDE contains the reciprocal
-* condition number for the average of the selected eigenvalues.
-* Not referenced if SENSE = 'N' or 'V'.
-*
-* RCONDV (output) DOUBLE PRECISION
-* If SENSE = 'V' or 'B', RCONDV contains the reciprocal
-* condition number for the selected right invariant subspace.
-* Not referenced if SENSE = 'N' or 'E'.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* Also, if SENSE = 'E' or 'V' or 'B', LWORK >= 2*SDIM*(N-SDIM),
-* where SDIM is the number of selected eigenvalues computed by
-* this routine. Note that 2*SDIM*(N-SDIM) <= N*N/2. Note also
-* that an error is only returned if LWORK < max(1,2*N), but if
-* SENSE = 'E' or 'V' or 'B' this may not be large enough.
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates upper bound on the optimal size of the
-* array WORK, returns this value as the first entry of the WORK
-* array, and no error message related to LWORK is issued by
-* XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is
-* <= N: the QR algorithm failed to compute all the
-* eigenvalues; elements 1:ILO-1 and i+1:N of W
-* contain those eigenvalues which have converged; if
-* JOBVS = 'V', VS contains the transformation which
-* reduces A to its partially converged Schur form.
-* = N+1: the eigenvalues could not be reordered because some
-* eigenvalues were too close to separate (the problem
-* is very ill-conditioned);
-* = N+2: after reordering, roundoff changed values of some
-* complex eigenvalues so that leading eigenvalues in
-* the Schur form no longer satisfy SELECT=.TRUE. This
-* could also be caused by underflow due to scaling.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgeev.f b/SRC/zgeev.f
index 3047e32f..5d5e5a2d 100644
--- a/SRC/zgeev.f
+++ b/SRC/zgeev.f
@@ -1,10 +1,179 @@
+*> \brief <b> ZGEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEEV computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> The right eigenvector v(j) of A satisfies
+*> A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*> u(j)**H * A = lambda(j) * u(j)**H
+*> where u(j)**H denotes the conjugate transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': left eigenvectors of A are not computed;
+*> = 'V': left eigenvectors of are computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': right eigenvectors of A are not computed;
+*> = 'V': right eigenvectors of A are computed.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> W contains the computed eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order
+*> as their eigenvalues.
+*> If JOBVL = 'N', VL is not referenced.
+*> u(j) = VL(:,j), the j-th column of VL.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; if
+*> JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order
+*> as their eigenvalues.
+*> If JOBVR = 'N', VR is not referenced.
+*> v(j) = VR(:,j), the j-th column of VR.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1; if
+*> JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the QR algorithm failed to compute all the
+*> eigenvalues, and no eigenvectors have been computed;
+*> elements and i+1:N of W contain eigenvalues which have
+*> converged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+* =====================================================================
SUBROUTINE ZGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,
$ WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -16,90 +185,6 @@
$ W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGEEV computes for an N-by-N complex nonsymmetric matrix A, the
-* eigenvalues and, optionally, the left and/or right eigenvectors.
-*
-* The right eigenvector v(j) of A satisfies
-* A * v(j) = lambda(j) * v(j)
-* where lambda(j) is its eigenvalue.
-* The left eigenvector u(j) of A satisfies
-* u(j)**H * A = lambda(j) * u(j)**H
-* where u(j)**H denotes the conjugate transpose of u(j).
-*
-* The computed eigenvectors are normalized to have Euclidean norm
-* equal to 1 and largest component real.
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': left eigenvectors of A are not computed;
-* = 'V': left eigenvectors of are computed.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': right eigenvectors of A are not computed;
-* = 'V': right eigenvectors of A are computed.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* W contains the computed eigenvalues.
-*
-* VL (output) COMPLEX*16 array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order
-* as their eigenvalues.
-* If JOBVL = 'N', VL is not referenced.
-* u(j) = VL(:,j), the j-th column of VL.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; if
-* JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX*16 array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order
-* as their eigenvalues.
-* If JOBVR = 'N', VR is not referenced.
-* v(j) = VR(:,j), the j-th column of VR.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1; if
-* JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the QR algorithm failed to compute all the
-* eigenvalues, and no eigenvectors have been computed;
-* elements and i+1:N of W contain eigenvalues which have
-* converged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgeevx.f b/SRC/zgeevx.f
index 6c5e11d5..dc9a41f0 100644
--- a/SRC/zgeevx.f
+++ b/SRC/zgeevx.f
@@ -1,11 +1,289 @@
+*> \brief <b> ZGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, W, VL,
+* LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM, RCONDE,
+* RCONDV, WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER BALANC, JOBVL, JOBVR, SENSE
+* INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
+* DOUBLE PRECISION ABNRM
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RCONDE( * ), RCONDV( * ), RWORK( * ),
+* $ SCALE( * )
+* COMPLEX*16 A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEEVX computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> Optionally also, it computes a balancing transformation to improve
+*> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
+*> SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
+*> (RCONDE), and reciprocal condition numbers for the right
+*> eigenvectors (RCONDV).
+*>
+*> The right eigenvector v(j) of A satisfies
+*> A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*> u(j)**H * A = lambda(j) * u(j)**H
+*> where u(j)**H denotes the conjugate transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*>
+*> Balancing a matrix means permuting the rows and columns to make it
+*> more nearly upper triangular, and applying a diagonal similarity
+*> transformation D * A * D**(-1), where D is a diagonal matrix, to
+*> make its rows and columns closer in norm and the condition numbers
+*> of its eigenvalues and eigenvectors smaller. The computed
+*> reciprocal condition numbers correspond to the balanced matrix.
+*> Permuting rows and columns will not change the condition numbers
+*> (in exact arithmetic) but diagonal scaling will. For further
+*> explanation of balancing, see section 4.10.2 of the LAPACK
+*> Users' Guide.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER*1
+*> Indicates how the input matrix should be diagonally scaled
+*> and/or permuted to improve the conditioning of its
+*> eigenvalues.
+*> = 'N': Do not diagonally scale or permute;
+*> = 'P': Perform permutations to make the matrix more nearly
+*> upper triangular. Do not diagonally scale;
+*> = 'S': Diagonally scale the matrix, ie. replace A by
+*> D*A*D**(-1), where D is a diagonal matrix chosen
+*> to make the rows and columns of A more equal in
+*> norm. Do not permute;
+*> = 'B': Both diagonally scale and permute A.
+*> \endverbatim
+*> \verbatim
+*> Computed reciprocal condition numbers will be for the matrix
+*> after balancing and/or permuting. Permuting does not change
+*> condition numbers (in exact arithmetic), but balancing does.
+*> \endverbatim
+*>
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': left eigenvectors of A are not computed;
+*> = 'V': left eigenvectors of A are computed.
+*> If SENSE = 'E' or 'B', JOBVL must = 'V'.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': right eigenvectors of A are not computed;
+*> = 'V': right eigenvectors of A are computed.
+*> If SENSE = 'E' or 'B', JOBVR must = 'V'.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': None are computed;
+*> = 'E': Computed for eigenvalues only;
+*> = 'V': Computed for right eigenvectors only;
+*> = 'B': Computed for eigenvalues and right eigenvectors.
+*> \endverbatim
+*> \verbatim
+*> If SENSE = 'E' or 'B', both left and right eigenvectors
+*> must also be computed (JOBVL = 'V' and JOBVR = 'V').
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> On exit, A has been overwritten. If JOBVL = 'V' or
+*> JOBVR = 'V', A contains the Schur form of the balanced
+*> version of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> W contains the computed eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*> after another in the columns of VL, in the same order
+*> as their eigenvalues.
+*> If JOBVL = 'N', VL is not referenced.
+*> u(j) = VL(:,j), the j-th column of VL.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; if
+*> JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*> after another in the columns of VR, in the same order
+*> as their eigenvalues.
+*> If JOBVR = 'N', VR is not referenced.
+*> v(j) = VR(:,j), the j-th column of VR.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1; if
+*> JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are integer values determined when A was
+*> balanced. The balanced A(i,j) = 0 if I > J and
+*> J = 1,...,ILO-1 or I = IHI+1,...,N.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> when balancing A. If P(j) is the index of the row and column
+*> interchanged with row and column j, and D(j) is the scaling
+*> factor applied to row and column j, then
+*> SCALE(J) = P(J), for J = 1,...,ILO-1
+*> = D(J), for J = ILO,...,IHI
+*> = P(J) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] ABNRM
+*> \verbatim
+*> ABNRM is DOUBLE PRECISION
+*> The one-norm of the balanced matrix (the maximum
+*> of the sum of absolute values of elements of any column).
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension (N)
+*> RCONDE(j) is the reciprocal condition number of the j-th
+*> eigenvalue.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension (N)
+*> RCONDV(j) is the reciprocal condition number of the j-th
+*> right eigenvector.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. If SENSE = 'N' or 'E',
+*> LWORK >= max(1,2*N), and if SENSE = 'V' or 'B',
+*> LWORK >= N*N+2*N.
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the QR algorithm failed to compute all the
+*> eigenvalues, and no eigenvectors or condition numbers
+*> have been computed; elements 1:ILO-1 and i+1:N of W
+*> contain eigenvalues which have converged.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+* =====================================================================
SUBROUTINE ZGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, W, VL,
$ LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM, RCONDE,
$ RCONDV, WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER BALANC, JOBVL, JOBVR, SENSE
@@ -19,170 +297,6 @@
$ W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGEEVX computes for an N-by-N complex nonsymmetric matrix A, the
-* eigenvalues and, optionally, the left and/or right eigenvectors.
-*
-* Optionally also, it computes a balancing transformation to improve
-* the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
-* SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
-* (RCONDE), and reciprocal condition numbers for the right
-* eigenvectors (RCONDV).
-*
-* The right eigenvector v(j) of A satisfies
-* A * v(j) = lambda(j) * v(j)
-* where lambda(j) is its eigenvalue.
-* The left eigenvector u(j) of A satisfies
-* u(j)**H * A = lambda(j) * u(j)**H
-* where u(j)**H denotes the conjugate transpose of u(j).
-*
-* The computed eigenvectors are normalized to have Euclidean norm
-* equal to 1 and largest component real.
-*
-* Balancing a matrix means permuting the rows and columns to make it
-* more nearly upper triangular, and applying a diagonal similarity
-* transformation D * A * D**(-1), where D is a diagonal matrix, to
-* make its rows and columns closer in norm and the condition numbers
-* of its eigenvalues and eigenvectors smaller. The computed
-* reciprocal condition numbers correspond to the balanced matrix.
-* Permuting rows and columns will not change the condition numbers
-* (in exact arithmetic) but diagonal scaling will. For further
-* explanation of balancing, see section 4.10.2 of the LAPACK
-* Users' Guide.
-*
-* Arguments
-* =========
-*
-* BALANC (input) CHARACTER*1
-* Indicates how the input matrix should be diagonally scaled
-* and/or permuted to improve the conditioning of its
-* eigenvalues.
-* = 'N': Do not diagonally scale or permute;
-* = 'P': Perform permutations to make the matrix more nearly
-* upper triangular. Do not diagonally scale;
-* = 'S': Diagonally scale the matrix, ie. replace A by
-* D*A*D**(-1), where D is a diagonal matrix chosen
-* to make the rows and columns of A more equal in
-* norm. Do not permute;
-* = 'B': Both diagonally scale and permute A.
-*
-* Computed reciprocal condition numbers will be for the matrix
-* after balancing and/or permuting. Permuting does not change
-* condition numbers (in exact arithmetic), but balancing does.
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': left eigenvectors of A are not computed;
-* = 'V': left eigenvectors of A are computed.
-* If SENSE = 'E' or 'B', JOBVL must = 'V'.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': right eigenvectors of A are not computed;
-* = 'V': right eigenvectors of A are computed.
-* If SENSE = 'E' or 'B', JOBVR must = 'V'.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': None are computed;
-* = 'E': Computed for eigenvalues only;
-* = 'V': Computed for right eigenvectors only;
-* = 'B': Computed for eigenvalues and right eigenvectors.
-*
-* If SENSE = 'E' or 'B', both left and right eigenvectors
-* must also be computed (JOBVL = 'V' and JOBVR = 'V').
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-* On exit, A has been overwritten. If JOBVL = 'V' or
-* JOBVR = 'V', A contains the Schur form of the balanced
-* version of the matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* W contains the computed eigenvalues.
-*
-* VL (output) COMPLEX*16 array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored one
-* after another in the columns of VL, in the same order
-* as their eigenvalues.
-* If JOBVL = 'N', VL is not referenced.
-* u(j) = VL(:,j), the j-th column of VL.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; if
-* JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX*16 array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors v(j) are stored one
-* after another in the columns of VR, in the same order
-* as their eigenvalues.
-* If JOBVR = 'N', VR is not referenced.
-* v(j) = VR(:,j), the j-th column of VR.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1; if
-* JOBVR = 'V', LDVR >= N.
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are integer values determined when A was
-* balanced. The balanced A(i,j) = 0 if I > J and
-* J = 1,...,ILO-1 or I = IHI+1,...,N.
-*
-* SCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* when balancing A. If P(j) is the index of the row and column
-* interchanged with row and column j, and D(j) is the scaling
-* factor applied to row and column j, then
-* SCALE(J) = P(J), for J = 1,...,ILO-1
-* = D(J), for J = ILO,...,IHI
-* = P(J) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* ABNRM (output) DOUBLE PRECISION
-* The one-norm of the balanced matrix (the maximum
-* of the sum of absolute values of elements of any column).
-*
-* RCONDE (output) DOUBLE PRECISION array, dimension (N)
-* RCONDE(j) is the reciprocal condition number of the j-th
-* eigenvalue.
-*
-* RCONDV (output) DOUBLE PRECISION array, dimension (N)
-* RCONDV(j) is the reciprocal condition number of the j-th
-* right eigenvector.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. If SENSE = 'N' or 'E',
-* LWORK >= max(1,2*N), and if SENSE = 'V' or 'B',
-* LWORK >= N*N+2*N.
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the QR algorithm failed to compute all the
-* eigenvalues, and no eigenvectors or condition numbers
-* have been computed; elements 1:ILO-1 and i+1:N of W
-* contain eigenvalues which have converged.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgegs.f b/SRC/zgegs.f
index fd645ff4..1de57dbc 100644
--- a/SRC/zgegs.f
+++ b/SRC/zgegs.f
@@ -1,11 +1,228 @@
+*> \brief <b> ZGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHA, BETA,
+* VSL, LDVSL, VSR, LDVSR, WORK, LWORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine ZGGES.
+*>
+*> ZGEGS computes the eigenvalues, Schur form, and, optionally, the
+*> left and or/right Schur vectors of a complex matrix pair (A,B).
+*> Given two square matrices A and B, the generalized Schur
+*> factorization has the form
+*>
+*> A = Q*S*Z**H, B = Q*T*Z**H
+*>
+*> where Q and Z are unitary matrices and S and T are upper triangular.
+*> The columns of Q are the left Schur vectors
+*> and the columns of Z are the right Schur vectors.
+*>
+*> If only the eigenvalues of (A,B) are needed, the driver routine
+*> ZGEGV should be used instead. See ZGEGV for a description of the
+*> eigenvalues of the generalized nonsymmetric eigenvalue problem
+*> (GNEP).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors (returned in VSL).
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors (returned in VSR).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the matrix A.
+*> On exit, the upper triangular matrix S from the generalized
+*> Schur factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the matrix B.
+*> On exit, the upper triangular matrix T from the generalized
+*> Schur factorization.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> The complex scalars alpha that define the eigenvalues of
+*> GNEP. ALPHA(j) = S(j,j), the diagonal element of the Schur
+*> form of A.
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> The non-negative real scalars beta that define the
+*> eigenvalues of GNEP. BETA(j) = T(j,j), the diagonal element
+*> of the triangular factor T.
+*> \endverbatim
+*> \verbatim
+*> Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
+*> represent the j-th eigenvalue of the matrix pair (A,B), in
+*> one of the forms lambda = alpha/beta or mu = beta/alpha.
+*> Since either lambda or mu may overflow, they should not,
+*> in general, be computed.
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is COMPLEX*16 array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', the matrix of left Schur vectors Q.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >= 1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is COMPLEX*16 array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', the matrix of right Schur vectors Z.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> To compute the optimal value of LWORK, call ILAENV to get
+*> blocksizes (for ZGEQRF, ZUNMQR, and CUNGQR.) Then compute:
+*> NB -- MAX of the blocksizes for ZGEQRF, ZUNMQR, and CUNGQR;
+*> the optimal LWORK is N*(NB+1).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> =1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHA(j) and BETA(j) should be correct for
+*> j=INFO+1,...,N.
+*> > N: errors that usually indicate LAPACK problems:
+*> =N+1: error return from ZGGBAL
+*> =N+2: error return from ZGEQRF
+*> =N+3: error return from ZUNMQR
+*> =N+4: error return from ZUNGQR
+*> =N+5: error return from ZGGHRD
+*> =N+6: error return from ZHGEQZ (other than failed
+*> iteration)
+*> =N+7: error return from ZGGBAK (computing VSL)
+*> =N+8: error return from ZGGBAK (computing VSR)
+*> =N+9: error return from ZLASCL (various places)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+* =====================================================================
SUBROUTINE ZGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHA, BETA,
$ VSL, LDVSL, VSR, LDVSR, WORK, LWORK, RWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR
@@ -18,127 +235,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine ZGGES.
-*
-* ZGEGS computes the eigenvalues, Schur form, and, optionally, the
-* left and or/right Schur vectors of a complex matrix pair (A,B).
-* Given two square matrices A and B, the generalized Schur
-* factorization has the form
-*
-* A = Q*S*Z**H, B = Q*T*Z**H
-*
-* where Q and Z are unitary matrices and S and T are upper triangular.
-* The columns of Q are the left Schur vectors
-* and the columns of Z are the right Schur vectors.
-*
-* If only the eigenvalues of (A,B) are needed, the driver routine
-* ZGEGV should be used instead. See ZGEGV for a description of the
-* eigenvalues of the generalized nonsymmetric eigenvalue problem
-* (GNEP).
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors (returned in VSL).
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors (returned in VSR).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the matrix A.
-* On exit, the upper triangular matrix S from the generalized
-* Schur factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the matrix B.
-* On exit, the upper triangular matrix T from the generalized
-* Schur factorization.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX*16 array, dimension (N)
-* The complex scalars alpha that define the eigenvalues of
-* GNEP. ALPHA(j) = S(j,j), the diagonal element of the Schur
-* form of A.
-*
-* BETA (output) COMPLEX*16 array, dimension (N)
-* The non-negative real scalars beta that define the
-* eigenvalues of GNEP. BETA(j) = T(j,j), the diagonal element
-* of the triangular factor T.
-*
-* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
-* represent the j-th eigenvalue of the matrix pair (A,B), in
-* one of the forms lambda = alpha/beta or mu = beta/alpha.
-* Since either lambda or mu may overflow, they should not,
-* in general, be computed.
-*
-*
-* VSL (output) COMPLEX*16 array, dimension (LDVSL,N)
-* If JOBVSL = 'V', the matrix of left Schur vectors Q.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >= 1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) COMPLEX*16 array, dimension (LDVSR,N)
-* If JOBVSR = 'V', the matrix of right Schur vectors Z.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-* To compute the optimal value of LWORK, call ILAENV to get
-* blocksizes (for ZGEQRF, ZUNMQR, and CUNGQR.) Then compute:
-* NB -- MAX of the blocksizes for ZGEQRF, ZUNMQR, and CUNGQR;
-* the optimal LWORK is N*(NB+1).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* =1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHA(j) and BETA(j) should be correct for
-* j=INFO+1,...,N.
-* > N: errors that usually indicate LAPACK problems:
-* =N+1: error return from ZGGBAL
-* =N+2: error return from ZGEQRF
-* =N+3: error return from ZUNMQR
-* =N+4: error return from ZUNGQR
-* =N+5: error return from ZGGHRD
-* =N+6: error return from ZHGEQZ (other than failed
-* iteration)
-* =N+7: error return from ZGGBAK (computing VSL)
-* =N+8: error return from ZGGBAK (computing VSR)
-* =N+9: error return from ZLASCL (various places)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgegv.f b/SRC/zgegv.f
index 824eb809..1ff3093a 100644
--- a/SRC/zgegv.f
+++ b/SRC/zgegv.f
@@ -1,10 +1,286 @@
+*> \brief <b> ZGEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
+* VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine ZGGEV.
+*>
+*> ZGEGV computes the eigenvalues and, optionally, the left and/or right
+*> eigenvectors of a complex matrix pair (A,B).
+*> Given two square matrices A and B,
+*> the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
+*> eigenvalues lambda and corresponding (non-zero) eigenvectors x such
+*> that
+*> A*x = lambda*B*x.
+*>
+*> An alternate form is to find the eigenvalues mu and corresponding
+*> eigenvectors y such that
+*> mu*A*y = B*y.
+*>
+*> These two forms are equivalent with mu = 1/lambda and x = y if
+*> neither lambda nor mu is zero. In order to deal with the case that
+*> lambda or mu is zero or small, two values alpha and beta are returned
+*> for each eigenvalue, such that lambda = alpha/beta and
+*> mu = beta/alpha.
+*>
+*> The vectors x and y in the above equations are right eigenvectors of
+*> the matrix pair (A,B). Vectors u and v satisfying
+*> u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
+*> are left eigenvectors of (A,B).
+*>
+*> Note: this routine performs "full balancing" on A and B
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors (returned
+*> in VL).
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors (returned
+*> in VR).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the matrix A.
+*> If JOBVL = 'V' or JOBVR = 'V', then on exit A
+*> contains the Schur form of A from the generalized Schur
+*> factorization of the pair (A,B) after balancing. If no
+*> eigenvectors were computed, then only the diagonal elements
+*> of the Schur form will be correct. See ZGGHRD and ZHGEQZ
+*> for details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the matrix B.
+*> If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
+*> upper triangular matrix obtained from B in the generalized
+*> Schur factorization of the pair (A,B) after balancing.
+*> If no eigenvectors were computed, then only the diagonal
+*> elements of B will be correct. See ZGGHRD and ZHGEQZ for
+*> details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> The complex scalars alpha that define the eigenvalues of
+*> GNEP.
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> The complex scalars beta that define the eigenvalues of GNEP.
+*>
+*> Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
+*> represent the j-th eigenvalue of the matrix pair (A,B), in
+*> one of the forms lambda = alpha/beta or mu = beta/alpha.
+*> Since either lambda or mu may overflow, they should not,
+*> in general, be computed.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left eigenvectors u(j) are stored
+*> in the columns of VL, in the same order as their eigenvalues.
+*> Each eigenvector is scaled so that its largest component has
+*> abs(real part) + abs(imag. part) = 1, except for eigenvectors
+*> corresponding to an eigenvalue with alpha = beta = 0, which
+*> are set to zero.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right eigenvectors x(j) are stored
+*> in the columns of VR, in the same order as their eigenvalues.
+*> Each eigenvector is scaled so that its largest component has
+*> abs(real part) + abs(imag. part) = 1, except for eigenvectors
+*> corresponding to an eigenvalue with alpha = beta = 0, which
+*> are set to zero.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> To compute the optimal value of LWORK, call ILAENV to get
+*> blocksizes (for ZGEQRF, ZUNMQR, and ZUNGQR.) Then compute:
+*> NB -- MAX of the blocksizes for ZGEQRF, ZUNMQR, and ZUNGQR;
+*> The optimal LWORK is MAX( 2*N, N*(NB+1) ).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> =1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHA(j) and BETA(j) should be
+*> correct for j=INFO+1,...,N.
+*> > N: errors that usually indicate LAPACK problems:
+*> =N+1: error return from ZGGBAL
+*> =N+2: error return from ZGEQRF
+*> =N+3: error return from ZUNMQR
+*> =N+4: error return from ZUNGQR
+*> =N+5: error return from ZGGHRD
+*> =N+6: error return from ZHGEQZ (other than failed
+*> iteration)
+*> =N+7: error return from ZTGEVC
+*> =N+8: error return from ZGGBAK (computing VL)
+*> =N+9: error return from ZGGBAK (computing VR)
+*> =N+10: error return from ZLASCL (various calls)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Balancing
+*> ---------
+*>
+*> This driver calls ZGGBAL to both permute and scale rows and columns
+*> of A and B. The permutations PL and PR are chosen so that PL*A*PR
+*> and PL*B*R will be upper triangular except for the diagonal blocks
+*> A(i:j,i:j) and B(i:j,i:j), with i and j as close together as
+*> possible. The diagonal scaling matrices DL and DR are chosen so
+*> that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to
+*> one (except for the elements that start out zero.)
+*>
+*> After the eigenvalues and eigenvectors of the balanced matrices
+*> have been computed, ZGGBAK transforms the eigenvectors back to what
+*> they would have been (in perfect arithmetic) if they had not been
+*> balanced.
+*>
+*> Contents of A and B on Exit
+*> -------- -- - --- - -- ----
+*>
+*> If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
+*> both), then on exit the arrays A and B will contain the complex Schur
+*> form[*] of the "balanced" versions of A and B. If no eigenvectors
+*> are computed, then only the diagonal blocks will be correct.
+*>
+*> [*] In other words, upper triangular form.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
$ VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -17,182 +293,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine ZGGEV.
-*
-* ZGEGV computes the eigenvalues and, optionally, the left and/or right
-* eigenvectors of a complex matrix pair (A,B).
-* Given two square matrices A and B,
-* the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
-* eigenvalues lambda and corresponding (non-zero) eigenvectors x such
-* that
-* A*x = lambda*B*x.
-*
-* An alternate form is to find the eigenvalues mu and corresponding
-* eigenvectors y such that
-* mu*A*y = B*y.
-*
-* These two forms are equivalent with mu = 1/lambda and x = y if
-* neither lambda nor mu is zero. In order to deal with the case that
-* lambda or mu is zero or small, two values alpha and beta are returned
-* for each eigenvalue, such that lambda = alpha/beta and
-* mu = beta/alpha.
-*
-* The vectors x and y in the above equations are right eigenvectors of
-* the matrix pair (A,B). Vectors u and v satisfying
-* u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
-* are left eigenvectors of (A,B).
-*
-* Note: this routine performs "full balancing" on A and B
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors (returned
-* in VL).
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors (returned
-* in VR).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the matrix A.
-* If JOBVL = 'V' or JOBVR = 'V', then on exit A
-* contains the Schur form of A from the generalized Schur
-* factorization of the pair (A,B) after balancing. If no
-* eigenvectors were computed, then only the diagonal elements
-* of the Schur form will be correct. See ZGGHRD and ZHGEQZ
-* for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the matrix B.
-* If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
-* upper triangular matrix obtained from B in the generalized
-* Schur factorization of the pair (A,B) after balancing.
-* If no eigenvectors were computed, then only the diagonal
-* elements of B will be correct. See ZGGHRD and ZHGEQZ for
-* details.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX*16 array, dimension (N)
-* The complex scalars alpha that define the eigenvalues of
-* GNEP.
-*
-* BETA (output) COMPLEX*16 array, dimension (N)
-* The complex scalars beta that define the eigenvalues of GNEP.
-*
-* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
-* represent the j-th eigenvalue of the matrix pair (A,B), in
-* one of the forms lambda = alpha/beta or mu = beta/alpha.
-* Since either lambda or mu may overflow, they should not,
-* in general, be computed.
-*
-* VL (output) COMPLEX*16 array, dimension (LDVL,N)
-* If JOBVL = 'V', the left eigenvectors u(j) are stored
-* in the columns of VL, in the same order as their eigenvalues.
-* Each eigenvector is scaled so that its largest component has
-* abs(real part) + abs(imag. part) = 1, except for eigenvectors
-* corresponding to an eigenvalue with alpha = beta = 0, which
-* are set to zero.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX*16 array, dimension (LDVR,N)
-* If JOBVR = 'V', the right eigenvectors x(j) are stored
-* in the columns of VR, in the same order as their eigenvalues.
-* Each eigenvector is scaled so that its largest component has
-* abs(real part) + abs(imag. part) = 1, except for eigenvectors
-* corresponding to an eigenvalue with alpha = beta = 0, which
-* are set to zero.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-* To compute the optimal value of LWORK, call ILAENV to get
-* blocksizes (for ZGEQRF, ZUNMQR, and ZUNGQR.) Then compute:
-* NB -- MAX of the blocksizes for ZGEQRF, ZUNMQR, and ZUNGQR;
-* The optimal LWORK is MAX( 2*N, N*(NB+1) ).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array, dimension (8*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* =1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHA(j) and BETA(j) should be
-* correct for j=INFO+1,...,N.
-* > N: errors that usually indicate LAPACK problems:
-* =N+1: error return from ZGGBAL
-* =N+2: error return from ZGEQRF
-* =N+3: error return from ZUNMQR
-* =N+4: error return from ZUNGQR
-* =N+5: error return from ZGGHRD
-* =N+6: error return from ZHGEQZ (other than failed
-* iteration)
-* =N+7: error return from ZTGEVC
-* =N+8: error return from ZGGBAK (computing VL)
-* =N+9: error return from ZGGBAK (computing VR)
-* =N+10: error return from ZLASCL (various calls)
-*
-* Further Details
-* ===============
-*
-* Balancing
-* ---------
-*
-* This driver calls ZGGBAL to both permute and scale rows and columns
-* of A and B. The permutations PL and PR are chosen so that PL*A*PR
-* and PL*B*R will be upper triangular except for the diagonal blocks
-* A(i:j,i:j) and B(i:j,i:j), with i and j as close together as
-* possible. The diagonal scaling matrices DL and DR are chosen so
-* that the pair DL*PL*A*PR*DR, DL*PL*B*PR*DR have elements close to
-* one (except for the elements that start out zero.)
-*
-* After the eigenvalues and eigenvectors of the balanced matrices
-* have been computed, ZGGBAK transforms the eigenvectors back to what
-* they would have been (in perfect arithmetic) if they had not been
-* balanced.
-*
-* Contents of A and B on Exit
-* -------- -- - --- - -- ----
-*
-* If any eigenvectors are computed (either JOBVL='V' or JOBVR='V' or
-* both), then on exit the arrays A and B will contain the complex Schur
-* form[*] of the "balanced" versions of A and B. If no eigenvectors
-* are computed, then only the diagonal blocks will be correct.
-*
-* [*] In other words, upper triangular form.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgehd2.f b/SRC/zgehd2.f
index 0c67e65a..57190a5f 100644
--- a/SRC/zgehd2.f
+++ b/SRC/zgehd2.f
@@ -1,90 +1,131 @@
- SUBROUTINE ZGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZGEHD2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEHD2 reduces a complex general matrix A to upper Hessenberg form H
-* by a unitary similarity transformation: Q**H * A * Q = H .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEHD2 reduces a complex general matrix A to upper Hessenberg form H
+*> by a unitary similarity transformation: Q**H * A * Q = H .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that A is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to ZGEBAL; otherwise they should be
-* set to 1 and N respectively. See Further Details.
-* 1 <= ILO <= IHI <= max(1,N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the n by n general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* elements below the first subdiagonal, with the array TAU,
-* represent the unitary matrix Q as a product of elementary
-* reflectors. See Further Details.
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* set to 1 and N respectively. See Further Details.
+*> 1 <= ILO <= IHI <= max(1,N).
+*>
+*> A (input/output) COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the n by n general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> elements below the first subdiagonal, with the array TAU,
+*> represent the unitary matrix Q as a product of elementary
+*> reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of (ihi-ilo) elementary
+*> reflectors
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
+*> exit in A(i+2:ihi,i), and tau in TAU(i).
+*>
+*> The contents of A are illustrated by the following example, with
+*> n = 7, ilo = 2 and ihi = 6:
+*>
+*> on entry, on exit,
+*>
+*> ( a a a a a a a ) ( a a h h h h a )
+*> ( a a a a a a ) ( a h h h h a )
+*> ( a a a a a a ) ( h h h h h h )
+*> ( a a a a a a ) ( v2 h h h h h )
+*> ( a a a a a a ) ( v2 v3 h h h h )
+*> ( a a a a a a ) ( v2 v3 v4 h h h )
+*> ( a ) ( a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of (ihi-ilo) elementary
-* reflectors
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
-* exit in A(i+2:ihi,i), and tau in TAU(i).
-*
-* The contents of A are illustrated by the following example, with
-* n = 7, ilo = 2 and ihi = 6:
-*
-* on entry, on exit,
-*
-* ( a a a a a a a ) ( a a h h h h a )
-* ( a a a a a a ) ( a h h h h a )
-* ( a a a a a a ) ( h h h h h h )
-* ( a a a a a a ) ( v2 h h h h h )
-* ( a a a a a a ) ( v2 v3 h h h h )
-* ( a a a a a a ) ( v2 v3 v4 h h h )
-* ( a ) ( a )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgehrd.f b/SRC/zgehrd.f
index 320ea2a9..11360dd4 100644
--- a/SRC/zgehrd.f
+++ b/SRC/zgehrd.f
@@ -1,106 +1,147 @@
- SUBROUTINE ZGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZGEHRD
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEHRD reduces a complex general matrix A to upper Hessenberg form H by
-* an unitary similarity transformation: Q**H * A * Q = H .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEHRD reduces a complex general matrix A to upper Hessenberg form H by
+*> an unitary similarity transformation: Q**H * A * Q = H .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that A is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to ZGEBAL; otherwise they should be
-* set to 1 and N respectively. See Further Details.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* elements below the first subdiagonal, with the array TAU,
-* represent the unitary matrix Q as a product of elementary
-* reflectors. See Further Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) COMPLEX*16 array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to
-* zero.
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* set to 1 and N respectively. See Further Details.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*>
+*> A (input/output) COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> elements below the first subdiagonal, with the array TAU,
+*> represent the unitary matrix Q as a product of elementary
+*> reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to
+*> zero.
+*>
+*> WORK (workspace/output) COMPLEX*16 array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The length of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of (ihi-ilo) elementary
+*> reflectors
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
+*> exit in A(i+2:ihi,i), and tau in TAU(i).
+*>
+*> The contents of A are illustrated by the following example, with
+*> n = 7, ilo = 2 and ihi = 6:
+*>
+*> on entry, on exit,
+*>
+*> ( a a a a a a a ) ( a a h h h h a )
+*> ( a a a a a a ) ( a h h h h a )
+*> ( a a a a a a ) ( h h h h h h )
+*> ( a a a a a a ) ( v2 h h h h h )
+*> ( a a a a a a ) ( v2 v3 h h h h )
+*> ( a a a a a a ) ( v2 v3 v4 h h h )
+*> ( a ) ( a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> This file is a slight modification of LAPACK-3.0's DGEHRD
+*> subroutine incorporating improvements proposed by Quintana-Orti and
+*> Van de Geijn (2006). (See DLAHR2.)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of (ihi-ilo) elementary
-* reflectors
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
-* exit in A(i+2:ihi,i), and tau in TAU(i).
-*
-* The contents of A are illustrated by the following example, with
-* n = 7, ilo = 2 and ihi = 6:
-*
-* on entry, on exit,
-*
-* ( a a a a a a a ) ( a a h h h h a )
-* ( a a a a a a ) ( a h h h h a )
-* ( a a a a a a ) ( h h h h h h )
-* ( a a a a a a ) ( v2 h h h h h )
-* ( a a a a a a ) ( v2 v3 h h h h )
-* ( a a a a a a ) ( v2 v3 v4 h h h )
-* ( a ) ( a )
-*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This file is a slight modification of LAPACK-3.0's DGEHRD
-* subroutine incorporating improvements proposed by Quintana-Orti and
-* Van de Geijn (2006). (See DLAHR2.)
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgelq2.f b/SRC/zgelq2.f
index c591a884..650e0fb7 100644
--- a/SRC/zgelq2.f
+++ b/SRC/zgelq2.f
@@ -1,67 +1,110 @@
- SUBROUTINE ZGELQ2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZGELQ2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGELQ2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGELQ2 computes an LQ factorization of a complex m by n matrix A:
-* A = L * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGELQ2 computes an LQ factorization of a complex m by n matrix A:
+*> A = L * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and below the diagonal of the array
-* contain the m by min(m,n) lower trapezoidal matrix L (L is
-* lower triangular if m <= n); the elements above the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (M)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (M)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
+*> A(i,i+1:n), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGELQ2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
-* A(i,i+1:n), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgelqf.f b/SRC/zgelqf.f
index c6beac31..a602b37d 100644
--- a/SRC/zgelqf.f
+++ b/SRC/zgelqf.f
@@ -1,78 +1,121 @@
- SUBROUTINE ZGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZGELQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGELQF computes an LQ factorization of a complex M-by-N matrix A:
-* A = L * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGELQF computes an LQ factorization of a complex M-by-N matrix A:
+*> A = L * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and below the diagonal of the array
-* contain the m-by-min(m,n) lower trapezoidal matrix L (L is
-* lower triangular if m <= n); the elements above the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
+*> A(i,i+1:n), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H, where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in
-* A(i,i+1:n), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgels.f b/SRC/zgels.f
index 06dbc0eb..3dfe4a6d 100644
--- a/SRC/zgels.f
+++ b/SRC/zgels.f
@@ -1,10 +1,184 @@
+*> \brief <b> ZGELS solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGELS solves overdetermined or underdetermined complex linear systems
+*> involving an M-by-N matrix A, or its conjugate-transpose, using a QR
+*> or LQ factorization of A. It is assumed that A has full rank.
+*>
+*> The following options are provided:
+*>
+*> 1. If TRANS = 'N' and m >= n: find the least squares solution of
+*> an overdetermined system, i.e., solve the least squares problem
+*> minimize || B - A*X ||.
+*>
+*> 2. If TRANS = 'N' and m < n: find the minimum norm solution of
+*> an underdetermined system A * X = B.
+*>
+*> 3. If TRANS = 'C' and m >= n: find the minimum norm solution of
+*> an undetermined system A**H * X = B.
+*>
+*> 4. If TRANS = 'C' and m < n: find the least squares solution of
+*> an overdetermined system, i.e., solve the least squares problem
+*> minimize || B - A**H * X ||.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': the linear system involves A;
+*> = 'C': the linear system involves A**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> if M >= N, A is overwritten by details of its QR
+*> factorization as returned by ZGEQRF;
+*> if M < N, A is overwritten by details of its LQ
+*> factorization as returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the matrix B of right hand side vectors, stored
+*> columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
+*> if TRANS = 'C'.
+*> On exit, if INFO = 0, B is overwritten by the solution
+*> vectors, stored columnwise:
+*> if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
+*> squares solution vectors; the residual sum of squares for the
+*> solution in each column is given by the sum of squares of the
+*> modulus of elements N+1 to M in that column;
+*> if TRANS = 'N' and m < n, rows 1 to N of B contain the
+*> minimum norm solution vectors;
+*> if TRANS = 'C' and m >= n, rows 1 to M of B contain the
+*> minimum norm solution vectors;
+*> if TRANS = 'C' and m < n, rows 1 to M of B contain the
+*> least squares solution vectors; the residual sum of squares
+*> for the solution in each column is given by the sum of
+*> squares of the modulus of elements M+1 to N in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= MAX(1,M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= max( 1, MN + max( MN, NRHS ) ).
+*> For optimal performance,
+*> LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
+*> where MN = min(M,N) and NB is the optimum block size.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of the
+*> triangular factor of A is zero, so that A does not have
+*> full rank; the least squares solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsolve
+*
+* =====================================================================
SUBROUTINE ZGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -14,106 +188,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGELS solves overdetermined or underdetermined complex linear systems
-* involving an M-by-N matrix A, or its conjugate-transpose, using a QR
-* or LQ factorization of A. It is assumed that A has full rank.
-*
-* The following options are provided:
-*
-* 1. If TRANS = 'N' and m >= n: find the least squares solution of
-* an overdetermined system, i.e., solve the least squares problem
-* minimize || B - A*X ||.
-*
-* 2. If TRANS = 'N' and m < n: find the minimum norm solution of
-* an underdetermined system A * X = B.
-*
-* 3. If TRANS = 'C' and m >= n: find the minimum norm solution of
-* an undetermined system A**H * X = B.
-*
-* 4. If TRANS = 'C' and m < n: find the least squares solution of
-* an overdetermined system, i.e., solve the least squares problem
-* minimize || B - A**H * X ||.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N': the linear system involves A;
-* = 'C': the linear system involves A**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* if M >= N, A is overwritten by details of its QR
-* factorization as returned by ZGEQRF;
-* if M < N, A is overwritten by details of its LQ
-* factorization as returned by ZGELQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the matrix B of right hand side vectors, stored
-* columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
-* if TRANS = 'C'.
-* On exit, if INFO = 0, B is overwritten by the solution
-* vectors, stored columnwise:
-* if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
-* squares solution vectors; the residual sum of squares for the
-* solution in each column is given by the sum of squares of the
-* modulus of elements N+1 to M in that column;
-* if TRANS = 'N' and m < n, rows 1 to N of B contain the
-* minimum norm solution vectors;
-* if TRANS = 'C' and m >= n, rows 1 to M of B contain the
-* minimum norm solution vectors;
-* if TRANS = 'C' and m < n, rows 1 to M of B contain the
-* least squares solution vectors; the residual sum of squares
-* for the solution in each column is given by the sum of
-* squares of the modulus of elements M+1 to N in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= MAX(1,M,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= max( 1, MN + max( MN, NRHS ) ).
-* For optimal performance,
-* LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
-* where MN = min(M,N) and NB is the optimum block size.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of the
-* triangular factor of A is zero, so that A does not have
-* full rank; the least squares solution could not be
-* computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgelsd.f b/SRC/zgelsd.f
index a985d3a7..73f4197c 100644
--- a/SRC/zgelsd.f
+++ b/SRC/zgelsd.f
@@ -1,10 +1,233 @@
+*> \brief <b> ZGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+* WORK, LWORK, RWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGELSD computes the minimum-norm solution to a real linear least
+*> squares problem:
+*> minimize 2-norm(| b - A*x |)
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The problem is solved in three steps:
+*> (1) Reduce the coefficient matrix A to bidiagonal form with
+*> Householder tranformations, reducing the original problem
+*> into a "bidiagonal least squares problem" (BLS)
+*> (2) Solve the BLS using a divide and conquer approach.
+*> (3) Apply back all the Householder tranformations to solve
+*> the original least squares problem.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, B is overwritten by the N-by-NRHS solution matrix X.
+*> If m >= n and RANK = n, the residual sum-of-squares for
+*> the solution in the i-th column is given by the sum of
+*> squares of the modulus of elements n+1:m in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of A in decreasing order.
+*> The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> RCOND is used to determine the effective rank of A.
+*> Singular values S(i) <= RCOND*S(1) are treated as zero.
+*> If RCOND < 0, machine precision is used instead.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the number of singular values
+*> which are greater than RCOND*S(1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK must be at least 1.
+*> The exact minimum amount of workspace needed depends on M,
+*> N and NRHS. As long as LWORK is at least
+*> 2*N + N*NRHS
+*> if M is greater than or equal to N or
+*> 2*M + M*NRHS
+*> if M is less than N, the code will execute correctly.
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the array WORK and the
+*> minimum sizes of the arrays RWORK and IWORK, and returns
+*> these values as the first entries of the WORK, RWORK and
+*> IWORK arrays, and no error message related to LWORK is issued
+*> by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
+*> LRWORK >=
+*> 10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
+*> MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
+*> if M is greater than or equal to N or
+*> 10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
+*> MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
+*> if M is less than N, the code will execute correctly.
+*> SMLSIZ is returned by ILAENV and is equal to the maximum
+*> size of the subproblems at the bottom of the computation
+*> tree (usually about 25), and
+*> NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
+*> On exit, if INFO = 0, RWORK(1) returns the minimum LRWORK.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),
+*> where MINMN = MIN( M,N ).
+*> On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the algorithm for computing the SVD failed to converge;
+*> if INFO = i, i off-diagonal elements of an intermediate
+*> bidiagonal form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ WORK, LWORK, RWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -16,136 +239,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGELSD computes the minimum-norm solution to a real linear least
-* squares problem:
-* minimize 2-norm(| b - A*x |)
-* using the singular value decomposition (SVD) of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The problem is solved in three steps:
-* (1) Reduce the coefficient matrix A to bidiagonal form with
-* Householder tranformations, reducing the original problem
-* into a "bidiagonal least squares problem" (BLS)
-* (2) Solve the BLS using a divide and conquer approach.
-* (3) Apply back all the Householder tranformations to solve
-* the original least squares problem.
-*
-* The effective rank of A is determined by treating as zero those
-* singular values which are less than RCOND times the largest singular
-* value.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, B is overwritten by the N-by-NRHS solution matrix X.
-* If m >= n and RANK = n, the residual sum-of-squares for
-* the solution in the i-th column is given by the sum of
-* squares of the modulus of elements n+1:m in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* S (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of A in decreasing order.
-* The condition number of A in the 2-norm = S(1)/S(min(m,n)).
-*
-* RCOND (input) DOUBLE PRECISION
-* RCOND is used to determine the effective rank of A.
-* Singular values S(i) <= RCOND*S(1) are treated as zero.
-* If RCOND < 0, machine precision is used instead.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the number of singular values
-* which are greater than RCOND*S(1).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK must be at least 1.
-* The exact minimum amount of workspace needed depends on M,
-* N and NRHS. As long as LWORK is at least
-* 2*N + N*NRHS
-* if M is greater than or equal to N or
-* 2*M + M*NRHS
-* if M is less than N, the code will execute correctly.
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the array WORK and the
-* minimum sizes of the arrays RWORK and IWORK, and returns
-* these values as the first entries of the WORK, RWORK and
-* IWORK arrays, and no error message related to LWORK is issued
-* by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
-* LRWORK >=
-* 10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
-* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
-* if M is greater than or equal to N or
-* 10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
-* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
-* if M is less than N, the code will execute correctly.
-* SMLSIZ is returned by ILAENV and is equal to the maximum
-* size of the subproblems at the bottom of the computation
-* tree (usually about 25), and
-* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
-* On exit, if INFO = 0, RWORK(1) returns the minimum LRWORK.
-*
-* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))
-* LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),
-* where MINMN = MIN( M,N ).
-* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the algorithm for computing the SVD failed to converge;
-* if INFO = i, i off-diagonal elements of an intermediate
-* bidiagonal form did not converge to zero.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgelss.f b/SRC/zgelss.f
index f59b829f..0c2502ba 100644
--- a/SRC/zgelss.f
+++ b/SRC/zgelss.f
@@ -1,10 +1,180 @@
+*> \brief <b> ZGELSS solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGELSS computes the minimum norm solution to a complex linear
+*> least squares problem:
+*>
+*> Minimize 2-norm(| b - A*x |).
+*>
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix
+*> X.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the first min(m,n) rows of A are overwritten with
+*> its right singular vectors, stored rowwise.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, B is overwritten by the N-by-NRHS solution matrix X.
+*> If m >= n and RANK = n, the residual sum-of-squares for
+*> the solution in the i-th column is given by the sum of
+*> squares of the modulus of elements n+1:m in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of A in decreasing order.
+*> The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> RCOND is used to determine the effective rank of A.
+*> Singular values S(i) <= RCOND*S(1) are treated as zero.
+*> If RCOND < 0, machine precision is used instead.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the number of singular values
+*> which are greater than RCOND*S(1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1, and also:
+*> LWORK >= 2*min(M,N) + max(M,N,NRHS)
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (5*min(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: the algorithm for computing the SVD failed to converge;
+*> if INFO = i, i off-diagonal elements of an intermediate
+*> bidiagonal form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsolve
+*
+* =====================================================================
SUBROUTINE ZGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
$ WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -15,92 +185,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGELSS computes the minimum norm solution to a complex linear
-* least squares problem:
-*
-* Minimize 2-norm(| b - A*x |).
-*
-* using the singular value decomposition (SVD) of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix
-* X.
-*
-* The effective rank of A is determined by treating as zero those
-* singular values which are less than RCOND times the largest singular
-* value.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the first min(m,n) rows of A are overwritten with
-* its right singular vectors, stored rowwise.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, B is overwritten by the N-by-NRHS solution matrix X.
-* If m >= n and RANK = n, the residual sum-of-squares for
-* the solution in the i-th column is given by the sum of
-* squares of the modulus of elements n+1:m in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* S (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of A in decreasing order.
-* The condition number of A in the 2-norm = S(1)/S(min(m,n)).
-*
-* RCOND (input) DOUBLE PRECISION
-* RCOND is used to determine the effective rank of A.
-* Singular values S(i) <= RCOND*S(1) are treated as zero.
-* If RCOND < 0, machine precision is used instead.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the number of singular values
-* which are greater than RCOND*S(1).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1, and also:
-* LWORK >= 2*min(M,N) + max(M,N,NRHS)
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (5*min(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: the algorithm for computing the SVD failed to converge;
-* if INFO = i, i off-diagonal elements of an intermediate
-* bidiagonal form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgelsx.f b/SRC/zgelsx.f
index 68ab87f7..7b60c79a 100644
--- a/SRC/zgelsx.f
+++ b/SRC/zgelsx.f
@@ -1,10 +1,185 @@
+*> \brief <b> ZGELSX solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine ZGELSY.
+*>
+*> ZGELSX computes the minimum-norm solution to a complex linear least
+*> squares problem:
+*> minimize || A * X - B ||
+*> using a complete orthogonal factorization of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The routine first computes a QR factorization with column pivoting:
+*> A * P = Q * [ R11 R12 ]
+*> [ 0 R22 ]
+*> with R11 defined as the largest leading submatrix whose estimated
+*> condition number is less than 1/RCOND. The order of R11, RANK,
+*> is the effective rank of A.
+*>
+*> Then, R22 is considered to be negligible, and R12 is annihilated
+*> by unitary transformations from the right, arriving at the
+*> complete orthogonal factorization:
+*> A * P = Q * [ T11 0 ] * Z
+*> [ 0 0 ]
+*> The minimum-norm solution is then
+*> X = P * Z**H [ inv(T11)*Q1**H*B ]
+*> [ 0 ]
+*> where Q1 consists of the first RANK columns of Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been overwritten by details of its
+*> complete orthogonal factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, the N-by-NRHS solution matrix X.
+*> If m >= n and RANK = n, the residual sum-of-squares for
+*> the solution in the i-th column is given by the sum of
+*> squares of elements N+1:M in that column.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is an
+*> initial column, otherwise it is a free column. Before
+*> the QR factorization of A, all initial columns are
+*> permuted to the leading positions; only the remaining
+*> free columns are moved as a result of column pivoting
+*> during the factorization.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> RCOND is used to determine the effective rank of A, which
+*> is defined as the order of the largest leading triangular
+*> submatrix R11 in the QR factorization with pivoting of A,
+*> whose estimated condition number < 1/RCOND.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the order of the submatrix
+*> R11. This is the same as the order of the submatrix T11
+*> in the complete orthogonal factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (min(M,N) + max( N, 2*min(M,N)+NRHS )),
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsolve
+*
+* =====================================================================
SUBROUTINE ZGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
@@ -16,100 +191,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* This routine is deprecated and has been replaced by routine ZGELSY.
-*
-* ZGELSX computes the minimum-norm solution to a complex linear least
-* squares problem:
-* minimize || A * X - B ||
-* using a complete orthogonal factorization of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The routine first computes a QR factorization with column pivoting:
-* A * P = Q * [ R11 R12 ]
-* [ 0 R22 ]
-* with R11 defined as the largest leading submatrix whose estimated
-* condition number is less than 1/RCOND. The order of R11, RANK,
-* is the effective rank of A.
-*
-* Then, R22 is considered to be negligible, and R12 is annihilated
-* by unitary transformations from the right, arriving at the
-* complete orthogonal factorization:
-* A * P = Q * [ T11 0 ] * Z
-* [ 0 0 ]
-* The minimum-norm solution is then
-* X = P * Z**H [ inv(T11)*Q1**H*B ]
-* [ 0 ]
-* where Q1 consists of the first RANK columns of Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been overwritten by details of its
-* complete orthogonal factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, the N-by-NRHS solution matrix X.
-* If m >= n and RANK = n, the residual sum-of-squares for
-* the solution in the i-th column is given by the sum of
-* squares of elements N+1:M in that column.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is an
-* initial column, otherwise it is a free column. Before
-* the QR factorization of A, all initial columns are
-* permuted to the leading positions; only the remaining
-* free columns are moved as a result of column pivoting
-* during the factorization.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
-*
-* RCOND (input) DOUBLE PRECISION
-* RCOND is used to determine the effective rank of A, which
-* is defined as the order of the largest leading triangular
-* submatrix R11 in the QR factorization with pivoting of A,
-* whose estimated condition number < 1/RCOND.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the order of the submatrix
-* R11. This is the same as the order of the submatrix T11
-* in the complete orthogonal factorization of A.
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (min(M,N) + max( N, 2*min(M,N)+NRHS )),
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgelsy.f b/SRC/zgelsy.f
index 701b6549..dc30a770 100644
--- a/SRC/zgelsy.f
+++ b/SRC/zgelsy.f
@@ -1,10 +1,218 @@
+*> \brief <b> ZGELSY solves overdetermined or underdetermined systems for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGELSY computes the minimum-norm solution to a complex linear least
+*> squares problem:
+*> minimize || A * X - B ||
+*> using a complete orthogonal factorization of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The routine first computes a QR factorization with column pivoting:
+*> A * P = Q * [ R11 R12 ]
+*> [ 0 R22 ]
+*> with R11 defined as the largest leading submatrix whose estimated
+*> condition number is less than 1/RCOND. The order of R11, RANK,
+*> is the effective rank of A.
+*>
+*> Then, R22 is considered to be negligible, and R12 is annihilated
+*> by unitary transformations from the right, arriving at the
+*> complete orthogonal factorization:
+*> A * P = Q * [ T11 0 ] * Z
+*> [ 0 0 ]
+*> The minimum-norm solution is then
+*> X = P * Z**H [ inv(T11)*Q1**H*B ]
+*> [ 0 ]
+*> where Q1 consists of the first RANK columns of Q.
+*>
+*> This routine is basically identical to the original xGELSX except
+*> three differences:
+*> o The permutation of matrix B (the right hand side) is faster and
+*> more simple.
+*> o The call to the subroutine xGEQPF has been substituted by the
+*> the call to the subroutine xGEQP3. This subroutine is a Blas-3
+*> version of the QR factorization with column pivoting.
+*> o Matrix B (the right hand side) is updated with Blas-3.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of
+*> columns of matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A has been overwritten by details of its
+*> complete orthogonal factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the M-by-NRHS right hand side matrix B.
+*> On exit, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M,N).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of AP, otherwise column i is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> RCOND is used to determine the effective rank of A, which
+*> is defined as the order of the largest leading triangular
+*> submatrix R11 in the QR factorization with pivoting of A,
+*> whose estimated condition number < 1/RCOND.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The effective rank of A, i.e., the order of the submatrix
+*> R11. This is the same as the order of the submatrix T11
+*> in the complete orthogonal factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> The unblocked strategy requires that:
+*> LWORK >= MN + MAX( 2*MN, N+1, MN+NRHS )
+*> where MN = min(M,N).
+*> The block algorithm requires that:
+*> LWORK >= MN + MAX( 2*MN, NB*(N+1), MN+MN*NB, MN+NB*NRHS )
+*> where NB is an upper bound on the blocksize returned
+*> by ILAENV for the routines ZGEQP3, ZTZRZF, CTZRQF, ZUNMQR,
+*> and ZUNMRZ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*> E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
$ WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -16,124 +224,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGELSY computes the minimum-norm solution to a complex linear least
-* squares problem:
-* minimize || A * X - B ||
-* using a complete orthogonal factorization of A. A is an M-by-N
-* matrix which may be rank-deficient.
-*
-* Several right hand side vectors b and solution vectors x can be
-* handled in a single call; they are stored as the columns of the
-* M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-* matrix X.
-*
-* The routine first computes a QR factorization with column pivoting:
-* A * P = Q * [ R11 R12 ]
-* [ 0 R22 ]
-* with R11 defined as the largest leading submatrix whose estimated
-* condition number is less than 1/RCOND. The order of R11, RANK,
-* is the effective rank of A.
-*
-* Then, R22 is considered to be negligible, and R12 is annihilated
-* by unitary transformations from the right, arriving at the
-* complete orthogonal factorization:
-* A * P = Q * [ T11 0 ] * Z
-* [ 0 0 ]
-* The minimum-norm solution is then
-* X = P * Z**H [ inv(T11)*Q1**H*B ]
-* [ 0 ]
-* where Q1 consists of the first RANK columns of Q.
-*
-* This routine is basically identical to the original xGELSX except
-* three differences:
-* o The permutation of matrix B (the right hand side) is faster and
-* more simple.
-* o The call to the subroutine xGEQPF has been substituted by the
-* the call to the subroutine xGEQP3. This subroutine is a Blas-3
-* version of the QR factorization with column pivoting.
-* o Matrix B (the right hand side) is updated with Blas-3.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of
-* columns of matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A has been overwritten by details of its
-* complete orthogonal factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the M-by-NRHS right hand side matrix B.
-* On exit, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M,N).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of AP, otherwise column i is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
-*
-* RCOND (input) DOUBLE PRECISION
-* RCOND is used to determine the effective rank of A, which
-* is defined as the order of the largest leading triangular
-* submatrix R11 in the QR factorization with pivoting of A,
-* whose estimated condition number < 1/RCOND.
-*
-* RANK (output) INTEGER
-* The effective rank of A, i.e., the order of the submatrix
-* R11. This is the same as the order of the submatrix T11
-* in the complete orthogonal factorization of A.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* The unblocked strategy requires that:
-* LWORK >= MN + MAX( 2*MN, N+1, MN+NRHS )
-* where MN = min(M,N).
-* The block algorithm requires that:
-* LWORK >= MN + MAX( 2*MN, NB*(N+1), MN+MN*NB, MN+NB*NRHS )
-* where NB is an upper bound on the blocksize returned
-* by ILAENV for the routines ZGEQP3, ZTZRZF, CTZRQF, ZUNMQR,
-* and ZUNMRZ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-* E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgemqrt.f b/SRC/zgemqrt.f
index 119120ae..8a45c41d 100644
--- a/SRC/zgemqrt.f
+++ b/SRC/zgemqrt.f
@@ -1,96 +1,177 @@
- SUBROUTINE ZGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
- $ C, LDC, WORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
-* ..
-* .. Array Arguments ..
- COMPLEX*16 V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
-* ..
-*
+*> \brief \b ZGEMQRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
+* C, LDC, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEMQRT overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q C C Q
-* TRANS = 'C': Q**H C C Q**H
-*
-* where Q is a complex orthogonal matrix defined as the product of K
-* elementary reflectors:
-*
-* Q = H(1) H(2) . . . H(K) = I - V T V**H
-*
-* generated using the compact WY representation as returned by ZGEQRT.
-*
-* Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEMQRT overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q C C Q
+*> TRANS = 'C': Q**H C C Q**H
+*>
+*> where Q is a complex orthogonal matrix defined as the product of K
+*> elementary reflectors:
+*>
+*> Q = H(1) H(2) . . . H(K) = I - V T V**H
+*>
+*> generated using the compact WY representation as returned by ZGEQRT.
+*>
+*> Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* NB (input) INTEGER
-* The block size used for the storage of T. K >= NB >= 1.
-* This must be the same value of NB used to generate T
-* in CGEQRT.
-*
-* V (input) COMPLEX*16 array, dimension (LDV,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CGEQRT in the first K columns of its array argument A.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The block size used for the storage of T. K >= NB >= 1.
+*> This must be the same value of NB used to generate T
+*> in CGEQRT.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CGEQRT in the first K columns of its array argument A.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,K)
+*> The upper triangular factors of the block reflectors
+*> as returned by CGEQRT, stored as a NB-by-N matrix.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array. The dimension of WORK is
+*> N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (input) COMPLEX*16 array, dimension (LDT,K)
-* The upper triangular factors of the block reflectors
-* as returned by CGEQRT, stored as a NB-by-N matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q C, Q**H C, C Q**H or C Q.
+*> \ingroup complex16GEcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
+ $ C, LDC, WORK, INFO )
*
-* WORK (workspace/output) COMPLEX*16 array. The dimension of WORK is
-* N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDV, LDC, M, N, NB, LDT
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeql2.f b/SRC/zgeql2.f
index f3ab7e16..85470147 100644
--- a/SRC/zgeql2.f
+++ b/SRC/zgeql2.f
@@ -1,69 +1,110 @@
- SUBROUTINE ZGEQL2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZGEQL2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQL2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQL2 computes a QL factorization of a complex m by n matrix A:
-* A = Q * L.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQL2 computes a QL factorization of a complex m by n matrix A:
+*> A = Q * L.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, if m >= n, the lower triangle of the subarray
-* A(m-n+1:m,1:n) contains the n by n lower triangular matrix L;
-* if m <= n, the elements on and below the (n-m)-th
-* superdiagonal contain the m by n lower trapezoidal matrix L;
-* the remaining elements, with the array TAU, represent the
-* unitary matrix Q as a product of elementary reflectors
-* (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
+*> A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQL2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
-* A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqlf.f b/SRC/zgeqlf.f
index 0ccd2045..5a73da8d 100644
--- a/SRC/zgeqlf.f
+++ b/SRC/zgeqlf.f
@@ -1,81 +1,121 @@
- SUBROUTINE ZGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZGEQLF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQLF computes a QL factorization of a complex M-by-N matrix A:
-* A = Q * L.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQLF computes a QL factorization of a complex M-by-N matrix A:
+*> A = Q * L.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if m >= n, the lower triangle of the subarray
-* A(m-n+1:m,1:n) contains the N-by-N lower triangular matrix L;
-* if m <= n, the elements on and below the (n-m)-th
-* superdiagonal contain the M-by-N lower trapezoidal matrix L;
-* the remaining elements, with the array TAU, represent the
-* unitary matrix Q as a product of elementary reflectors
-* (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
+*> A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in
-* A(1:m-k+i-1,n-k+i), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqp3.f b/SRC/zgeqp3.f
index 3ae73f9f..fed682fa 100644
--- a/SRC/zgeqp3.f
+++ b/SRC/zgeqp3.f
@@ -1,93 +1,170 @@
- SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZGEQP3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQP3 computes a QR factorization with column pivoting of a
-* matrix A: A*P = Q*R using Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQP3 computes a QR factorization with column pivoting of a
+*> matrix A: A*P = Q*R using Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of the array contains the
-* min(M,N)-by-N upper trapezoidal matrix R; the elements below
-* the diagonal, together with the array TAU, represent the
-* unitary matrix Q as a product of min(M,N) elementary
-* reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(J).ne.0, the J-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(J)=0,
-* the J-th column of A is a free column.
-* On exit, if JPVT(J)=K, then the J-th column of A*P was the
-* the K-th column of A.
-*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of the array contains the
+*> min(M,N)-by-N upper trapezoidal matrix R; the elements below
+*> the diagonal, together with the array TAU, represent the
+*> unitary matrix Q as a product of min(M,N) elementary
+*> reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(J).ne.0, the J-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(J)=0,
+*> the J-th column of A is a free column.
+*> On exit, if JPVT(J)=K, then the J-th column of A*P was the
+*> the K-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= N+1.
+*> For optimal performance LWORK >= ( N+1 )*NB, where NB
+*> is the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= N+1.
-* For optimal performance LWORK >= ( N+1 )*NB, where NB
-* is the optimal blocksize.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \date November 2011
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a real/complex scalar, and v is a real/complex vector
+*> with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
+*> A(i+1:m,i), and tau in TAU(i).
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
+ $ INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a real/complex scalar, and v is a real/complex vector
-* with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
-* A(i+1:m,i), and tau in TAU(i).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqpf.f b/SRC/zgeqpf.f
index dde547b5..4500b106 100644
--- a/SRC/zgeqpf.f
+++ b/SRC/zgeqpf.f
@@ -1,88 +1,160 @@
- SUBROUTINE ZGEQPF( M, N, A, LDA, JPVT, TAU, WORK, RWORK, INFO )
-*
-* -- LAPACK deprecated computational routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZGEQPF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQPF( M, N, A, LDA, JPVT, TAU, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine ZGEQP3.
-*
-* ZGEQPF computes a QR factorization with column pivoting of a
-* complex M-by-N matrix A: A*P = Q*R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine ZGEQP3.
+*>
+*> ZGEQPF computes a QR factorization with column pivoting of a
+*> complex M-by-N matrix A: A*P = Q*R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of the array contains the
-* min(M,N)-by-N upper triangular matrix R; the elements
-* below the diagonal, together with the array TAU,
-* represent the unitary matrix Q as a product of
-* min(m,n) elementary reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(i) = 0,
-* the i-th column of A is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of the array contains the
+*> min(M,N)-by-N upper triangular matrix R; the elements
+*> below the diagonal, together with the array TAU,
+*> represent the unitary matrix Q as a product of
+*> min(m,n) elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(i) = 0,
+*> the i-th column of A is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+*> \date November 2011
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(n)
+*>
+*> Each H(i) has the form
+*>
+*> H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
+*>
+*> The matrix P is represented in jpvt as follows: If
+*> jpvt(j) = i
+*> then the jth column of P is the ith canonical unit vector.
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQPF( M, N, A, LDA, JPVT, TAU, WORK, RWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(n)
-*
-* Each H(i) has the form
-*
-* H = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i).
-*
-* The matrix P is represented in jpvt as follows: If
-* jpvt(j) = i
-* then the jth column of P is the ith canonical unit vector.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqr2.f b/SRC/zgeqr2.f
index 8f357817..3c129d37 100644
--- a/SRC/zgeqr2.f
+++ b/SRC/zgeqr2.f
@@ -1,67 +1,110 @@
- SUBROUTINE ZGEQR2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZGEQR2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQR2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQR2 computes a QR factorization of a complex m by n matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQR2 computes a QR factorization of a complex m by n matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(m,n) by n upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQR2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqr2p.f b/SRC/zgeqr2p.f
index b2a70a41..7e2cebec 100644
--- a/SRC/zgeqr2p.f
+++ b/SRC/zgeqr2p.f
@@ -1,67 +1,110 @@
- SUBROUTINE ZGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZGEQR2P
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQR2P computes a QR factorization of a complex m by n matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQR2P computes a QR factorization of a complex m by n matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(m,n) by n upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors (see Further Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* product of elementary reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqrf.f b/SRC/zgeqrf.f
index 1e4f02da..c76b5d4b 100644
--- a/SRC/zgeqrf.f
+++ b/SRC/zgeqrf.f
@@ -1,79 +1,147 @@
- SUBROUTINE ZGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZGEQRF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQRF computes a QR factorization of a complex M-by-N matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQRF computes a QR factorization of a complex M-by-N matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if m >= n); the elements below the diagonal,
+*> with the array TAU, represent the unitary matrix Q as a
+*> product of min(m,n) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqrfp.f b/SRC/zgeqrfp.f
index b0619bfe..56a9249a 100644
--- a/SRC/zgeqrfp.f
+++ b/SRC/zgeqrfp.f
@@ -1,79 +1,147 @@
- SUBROUTINE ZGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZGEQRFP
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQRFP computes a QR factorization of a complex M-by-N matrix A:
-* A = Q * R.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQRFP computes a QR factorization of a complex M-by-N matrix A:
+*> A = Q * R.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if m >= n); the elements below the diagonal,
-* with the array TAU, represent the unitary matrix Q as a
-* product of min(m,n) elementary reflectors (see Further
-* Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if m >= n); the elements below the diagonal,
+*> with the array TAU, represent the unitary matrix Q as a
+*> product of min(m,n) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*> and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-* and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqrt.f b/SRC/zgeqrt.f
index 666cc887..cac848c9 100644
--- a/SRC/zgeqrt.f
+++ b/SRC/zgeqrt.f
@@ -1,82 +1,151 @@
- SUBROUTINE ZGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
- IMPLICIT NONE
+*> \brief \b ZGEQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDT, M, N, NB
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDT, M, N, NB
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQRT computes a blocked QR factorization of a complex M-by-N matrix A
-* using the compact WY representation of Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQRT computes a blocked QR factorization of a complex M-by-N matrix A
+*> using the compact WY representation of Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The block size to be used in the blocked QR. MIN(M,N) >= NB >= 1.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-* upper triangular if M >= N); the elements below the diagonal
-* are the columns of V.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The block size to be used in the blocked QR. MIN(M,N) >= NB >= 1.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*> upper triangular if M >= N); the elements below the diagonal
+*> are the columns of V.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,MIN(M,N))
+*> The upper triangular block reflectors stored in compact form
+*> as a sequence of upper triangular blocks. See below
+*> for further details.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NB*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) COMPLEX*16 array, dimension (LDT,MIN(M,N))
-* The upper triangular block reflectors stored in compact form
-* as a sequence of upper triangular blocks. See below
-* for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (NB*N)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A.
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A.
+*>
+*> Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each
+*> block is of order NB except for the last block, which is of order
+*> IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block
+*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
+*> for the last block) T's are stored in the NB-by-N matrix T as
+*>
+*> T = (T1 T2 ... TB).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
*
-* Let K=MIN(M,N). The number of blocks is B = ceiling(K/NB), where each
-* block is of order NB except for the last block, which is of order
-* IB = K - (B-1)*NB. For each of the B blocks, a upper triangular block
-* reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
-* for the last block) T's are stored in the NB-by-N matrix T as
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* T = (T1 T2 ... TB).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDT, M, N, NB
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqrt2.f b/SRC/zgeqrt2.f
index a78c5c82..56f68ed9 100644
--- a/SRC/zgeqrt2.f
+++ b/SRC/zgeqrt2.f
@@ -1,73 +1,135 @@
- SUBROUTINE ZGEQRT2( M, N, A, LDA, T, LDT, INFO )
+*> \brief \b ZGEQRT2
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDT, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), T( LDT, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGEQRT2( M, N, A, LDA, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDT, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQRT2 computes a QR factorization of a complex M-by-N matrix A,
-* using the compact WY representation of Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQRT2 computes a QR factorization of a complex M-by-N matrix A,
+*> using the compact WY representation of Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= N.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the complex M-by-N matrix A. On exit, the elements on and
-* above the diagonal contain the N-by-N upper triangular matrix R; the
-* elements below the diagonal are the columns of V. See below for
-* further details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the complex M-by-N matrix A. On exit, the elements on and
+*> above the diagonal contain the N-by-N upper triangular matrix R; the
+*> elements below the diagonal are the columns of V. See below for
+*> further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,N)
+*> The N-by-N upper triangular factor of the block reflector.
+*> The elements on and above the diagonal contain the block
+*> reflector T; the elements below the diagonal are not used.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> LDT (intput) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX*16 array, dimension (LDT,N)
-* The N-by-N upper triangular factor of the block reflector.
-* The elements on and above the diagonal contain the block
-* reflector T; the elements below the diagonal are not used.
-* See below for further details.
+*> \date November 2011
*
-* LDT (intput) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A. The
+*> block reflector H is then given by
+*>
+*> H = I - V * T * V**H
+*>
+*> where V**H is the conjugate transpose of V.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGEQRT2( M, N, A, LDA, T, LDT, INFO )
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A. The
-* block reflector H is then given by
-*
-* H = I - V * T * V**H
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where V**H is the conjugate transpose of V.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDT, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgeqrt3.f b/SRC/zgeqrt3.f
index edcbe4ea..02d815e4 100644
--- a/SRC/zgeqrt3.f
+++ b/SRC/zgeqrt3.f
@@ -1,79 +1,140 @@
- RECURSIVE SUBROUTINE ZGEQRT3( M, N, A, LDA, T, LDT, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
+*> \brief \b ZGEQRT3
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N, LDT
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), T( LDT, * )
-* ..
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* RECURSIVE SUBROUTINE ZGEQRT3( M, N, A, LDA, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N, LDT
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* ZGEQRT3 recursively computes a QR factorization of a complex M-by-N
-* matrix A, using the compact WY representation of Q.
-*
-* Based on the algorithm of Elmroth and Gustavson,
-* IBM J. Res. Develop. Vol 44 No. 4 July 2000.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGEQRT3 recursively computes a QR factorization of a complex M-by-N
+*> matrix A, using the compact WY representation of Q.
+*>
+*> Based on the algorithm of Elmroth and Gustavson,
+*> IBM J. Res. Develop. Vol 44 No. 4 July 2000.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= N.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the complex M-by-N matrix A. On exit, the elements on
-* and above the diagonal contain the N-by-N upper triangular matrix R;
-* the elements below the diagonal are the columns of V. See below for
-* further details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= N.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the complex M-by-N matrix A. On exit, the elements on
+*> and above the diagonal contain the N-by-N upper triangular matrix R;
+*> the elements below the diagonal are the columns of V. See below for
+*> further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,N)
+*> The N-by-N upper triangular factor of the block reflector.
+*> The elements on and above the diagonal contain the block
+*> reflector T; the elements below the diagonal are not used.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> LDT (intput) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX*16 array, dimension (LDT,N)
-* The N-by-N upper triangular factor of the block reflector.
-* The elements on and above the diagonal contain the block
-* reflector T; the elements below the diagonal are not used.
-* See below for further details.
+*> \date November 2011
*
-* LDT (intput) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix V stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal. For example, if M=5 and N=3, the matrix V is
+*>
+*> V = ( 1 )
+*> ( v1 1 )
+*> ( v1 v2 1 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> where the vi's represent the vectors which define H(i), which are returned
+*> in the matrix A. The 1's along the diagonal of V are not stored in A. The
+*> block reflector H is then given by
+*>
+*> H = I - V * T * V**H
+*>
+*> where V**H is the conjugate transpose of V.
+*>
+*> For details of the algorithm, see Elmroth and Gustavson (cited above).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ RECURSIVE SUBROUTINE ZGEQRT3( M, N, A, LDA, T, LDT, INFO )
*
-* The matrix V stores the elementary reflectors H(i) in the i-th column
-* below the diagonal. For example, if M=5 and N=3, the matrix V is
-*
-* V = ( 1 )
-* ( v1 1 )
-* ( v1 v2 1 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* where the vi's represent the vectors which define H(i), which are returned
-* in the matrix A. The 1's along the diagonal of V are not stored in A. The
-* block reflector H is then given by
-*
-* H = I - V * T * V**H
-*
-* where V**H is the conjugate transpose of V.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* For details of the algorithm, see Elmroth and Gustavson (cited above).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N, LDT
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgerfs.f b/SRC/zgerfs.f
index 1e961185..4ede6fa4 100644
--- a/SRC/zgerfs.f
+++ b/SRC/zgerfs.f
@@ -1,12 +1,187 @@
+*> \brief \b ZGERFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGERFS improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates for
+*> the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
SUBROUTINE ZGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -19,87 +194,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGERFS improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates for
-* the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by ZGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgerfsx.f b/SRC/zgerfsx.f
index 1f4dfebd..73ea6bf3 100644
--- a/SRC/zgerfsx.f
+++ b/SRC/zgerfsx.f
@@ -1,18 +1,435 @@
+*> \brief \b ZGERFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGERFSX( TRANS, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX , * ), WORK( * )
+* DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZGERFSX improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED, R
+*> and C below. In this case, the solution and error bounds returned
+*> are for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed.
+*> If R is accessed, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed.
+*> If C is accessed, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
SUBROUTINE ZGERFSX( TRANS, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,283 +445,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGERFSX improves the computed solution to a system of linear
-* equations and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED, R
-* and C below. In this case, the solution and error bounds returned
-* are for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by ZGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
-*
-* R (input) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed.
-* If R is accessed, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed.
-* If C is accessed, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zgerq2.f b/SRC/zgerq2.f
index 50037cea..05b8aa74 100644
--- a/SRC/zgerq2.f
+++ b/SRC/zgerq2.f
@@ -1,69 +1,133 @@
- SUBROUTINE ZGERQ2( M, N, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZGERQ2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGERQ2( M, N, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGERQ2 computes an RQ factorization of a complex m by n matrix A:
-* A = R * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGERQ2 computes an RQ factorization of a complex m by n matrix A:
+*> A = R * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, if m <= n, the upper triangle of the subarray
-* A(1:m,n-m+1:n) contains the m by m upper triangular matrix R;
-* if m >= n, the elements on and above the (m-n)-th subdiagonal
-* contain the m by n upper trapezoidal matrix R; the remaining
-* elements, with the array TAU, represent the unitary matrix
-* Q as a product of elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the m by n matrix A.
+*> On exit, if m <= n, the upper triangle of the subarray
+*> A(1:m,n-m+1:n) contains the m by m upper triangular matrix R;
+*> if m >= n, the elements on and above the (m-n)-th subdiagonal
+*> contain the m by n upper trapezoidal matrix R; the remaining
+*> elements, with the array TAU, represent the unitary matrix
+*> Q as a product of elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (M)
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H, where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; conjg(v(1:n-k+i-1)) is stored on
+*> exit in A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGERQ2( M, N, A, LDA, TAU, WORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H, where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; conjg(v(1:n-k+i-1)) is stored on
-* exit in A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgerqf.f b/SRC/zgerqf.f
index a82f24b0..48b5102b 100644
--- a/SRC/zgerqf.f
+++ b/SRC/zgerqf.f
@@ -1,81 +1,121 @@
- SUBROUTINE ZGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZGERQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGERQF computes an RQ factorization of a complex M-by-N matrix A:
-* A = R * Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGERQF computes an RQ factorization of a complex M-by-N matrix A:
+*> A = R * Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if m <= n, the upper triangle of the subarray
-* A(1:m,n-m+1:n) contains the M-by-M upper triangular matrix R;
-* if m >= n, the elements on and above the (m-n)-th subdiagonal
-* contain the M-by-N upper trapezoidal matrix R;
-* the remaining elements, with the array TAU, represent the
-* unitary matrix Q as a product of min(m,n) elementary
-* reflectors (see Further Details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16GEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors (see Further Details).
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H, where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; conjg(v(1:n-k+i-1)) is stored on
+*> exit in A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H, where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; conjg(v(1:n-k+i-1)) is stored on
-* exit in A(m-k+i,1:n-k+i-1), and tau in TAU(i).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgesc2.f b/SRC/zgesc2.f
index 3ceddfd2..a36bb851 100644
--- a/SRC/zgesc2.f
+++ b/SRC/zgesc2.f
@@ -1,65 +1,131 @@
- SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, N
- DOUBLE PRECISION SCALE
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), JPIV( * )
- COMPLEX*16 A( LDA, * ), RHS( * )
-* ..
-*
+*> \brief \b ZGESC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* COMPLEX*16 A( LDA, * ), RHS( * )
+* ..
+*
* Purpose
* =======
*
-* ZGESC2 solves a system of linear equations
-*
-* A * X = scale* RHS
-*
-* with a general N-by-N matrix A using the LU factorization with
-* complete pivoting computed by ZGETC2.
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGESC2 solves a system of linear equations
+*>
+*> A * X = scale* RHS
+*>
+*> with a general N-by-N matrix A using the LU factorization with
+*> complete pivoting computed by ZGETC2.
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the LU part of the factorization of the n-by-n
-* matrix A computed by ZGETC2: A = P * L * U * Q
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the LU part of the factorization of the n-by-n
+*> matrix A computed by ZGETC2: A = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*> RHS is COMPLEX*16 array, dimension N.
+*> On entry, the right hand side vector b.
+*> On exit, the solution vector X.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On exit, SCALE contains the scale factor. SCALE is chosen
+*> 0 <= SCALE <= 1 to prevent owerflow in the solution.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RHS (input/output) COMPLEX*16 array, dimension N.
-* On entry, the right hand side vector b.
-* On exit, the solution vector X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
+*> \date November 2011
*
-* JPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
+*> \ingroup complex16GEauxiliary
*
-* SCALE (output) DOUBLE PRECISION
-* On exit, SCALE contains the scale factor. SCALE is chosen
-* 0 <= SCALE <= 1 to prevent owerflow in the solution.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* .. Scalar Arguments ..
+ INTEGER LDA, N
+ DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), JPIV( * )
+ COMPLEX*16 A( LDA, * ), RHS( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgesdd.f b/SRC/zgesdd.f
index 809aa5d0..3df447b2 100644
--- a/SRC/zgesdd.f
+++ b/SRC/zgesdd.f
@@ -1,11 +1,230 @@
+*> \brief \b ZGESC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
+* LWORK, RWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGESDD computes the singular value decomposition (SVD) of a complex
+*> M-by-N matrix A, optionally computing the left and/or right singular
+*> vectors, by using divide-and-conquer method. The SVD is written
+*>
+*> A = U * SIGMA * conjugate-transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
+*> V is an N-by-N unitary matrix. The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order. The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns VT = V**H, not V.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> Specifies options for computing all or part of the matrix U:
+*> = 'A': all M columns of U and all N rows of V**H are
+*> returned in the arrays U and VT;
+*> = 'S': the first min(M,N) columns of U and the first
+*> min(M,N) rows of V**H are returned in the arrays U
+*> and VT;
+*> = 'O': If M >= N, the first N columns of U are overwritten
+*> in the array A and all rows of V**H are returned in
+*> the array VT;
+*> otherwise, all columns of U are returned in the
+*> array U and the first M rows of V**H are overwritten
+*> in the array A;
+*> = 'N': no columns of U or rows of V**H are computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if JOBZ = 'O', A is overwritten with the first N columns
+*> of U (the left singular vectors, stored
+*> columnwise) if M >= N;
+*> A is overwritten with the first M rows
+*> of V**H (the right singular vectors, stored
+*> rowwise) otherwise.
+*> if JOBZ .ne. 'O', the contents of A are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,UCOL)
+*> UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
+*> UCOL = min(M,N) if JOBZ = 'S'.
+*> If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
+*> unitary matrix U;
+*> if JOBZ = 'S', U contains the first min(M,N) columns of U
+*> (the left singular vectors, stored columnwise);
+*> if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1; if
+*> JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is COMPLEX*16 array, dimension (LDVT,N)
+*> If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
+*> N-by-N unitary matrix V**H;
+*> if JOBZ = 'S', VT contains the first min(M,N) rows of
+*> V**H (the right singular vectors, stored rowwise);
+*> if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1; if
+*> JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
+*> if JOBZ = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1.
+*> if JOBZ = 'N', LWORK >= 2*min(M,N)+max(M,N).
+*> if JOBZ = 'O',
+*> LWORK >= 2*min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
+*> if JOBZ = 'S' or 'A',
+*> LWORK >= min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, a workspace query is assumed. The optimal
+*> size for the WORK array is calculated and stored in WORK(1),
+*> and no other work except argument checking is performed.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
+*> If JOBZ = 'N', LRWORK >= 5*min(M,N).
+*> Otherwise,
+*> LRWORK >= min(M,N)*max(5*min(M,N)+7,2*max(M,N)+2*min(M,N)+1)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (8*min(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The updating process of DBDSDC did not converge.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsing
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
$ LWORK, RWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
+* -- LAPACK sing routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
-* 8-15-00: Improve consistency of WS calculations (eca)
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ
@@ -18,132 +237,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGESDD computes the singular value decomposition (SVD) of a complex
-* M-by-N matrix A, optionally computing the left and/or right singular
-* vectors, by using divide-and-conquer method. The SVD is written
-*
-* A = U * SIGMA * conjugate-transpose(V)
-*
-* where SIGMA is an M-by-N matrix which is zero except for its
-* min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
-* V is an N-by-N unitary matrix. The diagonal elements of SIGMA
-* are the singular values of A; they are real and non-negative, and
-* are returned in descending order. The first min(m,n) columns of
-* U and V are the left and right singular vectors of A.
-*
-* Note that the routine returns VT = V**H, not V.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix U:
-* = 'A': all M columns of U and all N rows of V**H are
-* returned in the arrays U and VT;
-* = 'S': the first min(M,N) columns of U and the first
-* min(M,N) rows of V**H are returned in the arrays U
-* and VT;
-* = 'O': If M >= N, the first N columns of U are overwritten
-* in the array A and all rows of V**H are returned in
-* the array VT;
-* otherwise, all columns of U are returned in the
-* array U and the first M rows of V**H are overwritten
-* in the array A;
-* = 'N': no columns of U or rows of V**H are computed.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if JOBZ = 'O', A is overwritten with the first N columns
-* of U (the left singular vectors, stored
-* columnwise) if M >= N;
-* A is overwritten with the first M rows
-* of V**H (the right singular vectors, stored
-* rowwise) otherwise.
-* if JOBZ .ne. 'O', the contents of A are destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* S (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of A, sorted so that S(i) >= S(i+1).
-*
-* U (output) COMPLEX*16 array, dimension (LDU,UCOL)
-* UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
-* UCOL = min(M,N) if JOBZ = 'S'.
-* If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
-* unitary matrix U;
-* if JOBZ = 'S', U contains the first min(M,N) columns of U
-* (the left singular vectors, stored columnwise);
-* if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1; if
-* JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
-*
-* VT (output) COMPLEX*16 array, dimension (LDVT,N)
-* If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
-* N-by-N unitary matrix V**H;
-* if JOBZ = 'S', VT contains the first min(M,N) rows of
-* V**H (the right singular vectors, stored rowwise);
-* if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1; if
-* JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
-* if JOBZ = 'S', LDVT >= min(M,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1.
-* if JOBZ = 'N', LWORK >= 2*min(M,N)+max(M,N).
-* if JOBZ = 'O',
-* LWORK >= 2*min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
-* if JOBZ = 'S' or 'A',
-* LWORK >= min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, a workspace query is assumed. The optimal
-* size for the WORK array is calculated and stored in WORK(1),
-* and no other work except argument checking is performed.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
-* If JOBZ = 'N', LRWORK >= 5*min(M,N).
-* Otherwise,
-* LRWORK >= min(M,N)*max(5*min(M,N)+7,2*max(M,N)+2*min(M,N)+1)
-*
-* IWORK (workspace) INTEGER array, dimension (8*min(M,N))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The updating process of DBDSDC did not converge.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgesv.f b/SRC/zgesv.f
index 6b83e81b..7b824cb6 100644
--- a/SRC/zgesv.f
+++ b/SRC/zgesv.f
@@ -1,68 +1,131 @@
- SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief <b> ZGESV computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZGESV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* The LU decomposition with partial pivoting and row interchanges is
-* used to factor A as
-* A = P * L * U,
-* where P is a permutation matrix, L is unit lower triangular, and U is
-* upper triangular. The factored form of A is then used to solve the
-* system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGESV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as
+*> A = P * L * U,
+*> where P is a permutation matrix, L is unit lower triangular, and U is
+*> upper triangular. The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N coefficient matrix A.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices that define the permutation matrix P;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS matrix of right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N coefficient matrix A.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices that define the permutation matrix P;
-* row i of the matrix was interchanged with row IPIV(i).
+*> \ingroup complex16GEsolve
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS matrix of right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+* =====================================================================
+ SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK solve routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, so the solution could not be computed.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgesvd.f b/SRC/zgesvd.f
index abd5f582..19613332 100644
--- a/SRC/zgesvd.f
+++ b/SRC/zgesvd.f
@@ -1,10 +1,217 @@
+*> \brief <b> ZGESVD computes the singular value decomposition (SVD) for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU, JOBVT
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGESVD computes the singular value decomposition (SVD) of a complex
+*> M-by-N matrix A, optionally computing the left and/or right singular
+*> vectors. The SVD is written
+*>
+*> A = U * SIGMA * conjugate-transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
+*> V is an N-by-N unitary matrix. The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order. The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns V**H, not V.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> Specifies options for computing all or part of the matrix U:
+*> = 'A': all M columns of U are returned in array U:
+*> = 'S': the first min(m,n) columns of U (the left singular
+*> vectors) are returned in the array U;
+*> = 'O': the first min(m,n) columns of U (the left singular
+*> vectors) are overwritten on the array A;
+*> = 'N': no columns of U (no left singular vectors) are
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVT
+*> \verbatim
+*> JOBVT is CHARACTER*1
+*> Specifies options for computing all or part of the matrix
+*> V**H:
+*> = 'A': all N rows of V**H are returned in the array VT;
+*> = 'S': the first min(m,n) rows of V**H (the right singular
+*> vectors) are returned in the array VT;
+*> = 'O': the first min(m,n) rows of V**H (the right singular
+*> vectors) are overwritten on the array A;
+*> = 'N': no rows of V**H (no right singular vectors) are
+*> computed.
+*> \endverbatim
+*> \verbatim
+*> JOBVT and JOBU cannot both be 'O'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the input matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the input matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit,
+*> if JOBU = 'O', A is overwritten with the first min(m,n)
+*> columns of U (the left singular vectors,
+*> stored columnwise);
+*> if JOBVT = 'O', A is overwritten with the first min(m,n)
+*> rows of V**H (the right singular vectors,
+*> stored rowwise);
+*> if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
+*> are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,UCOL)
+*> (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
+*> If JOBU = 'A', U contains the M-by-M unitary matrix U;
+*> if JOBU = 'S', U contains the first min(m,n) columns of U
+*> (the left singular vectors, stored columnwise);
+*> if JOBU = 'N' or 'O', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= 1; if
+*> JOBU = 'S' or 'A', LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is COMPLEX*16 array, dimension (LDVT,N)
+*> If JOBVT = 'A', VT contains the N-by-N unitary matrix
+*> V**H;
+*> if JOBVT = 'S', VT contains the first min(m,n) rows of
+*> V**H (the right singular vectors, stored rowwise);
+*> if JOBVT = 'N' or 'O', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= 1; if
+*> JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX(1,2*MIN(M,N)+MAX(M,N)).
+*> For good performance, LWORK should generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (5*min(M,N))
+*> On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the
+*> unconverged superdiagonal elements of an upper bidiagonal
+*> matrix B whose diagonal is in S (not necessarily sorted).
+*> B satisfies A = U * B * VT, so it has the same singular
+*> values as A, and singular vectors related by U and VT.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if ZBDSQR did not converge, INFO specifies how many
+*> superdiagonals of an intermediate bidiagonal form B
+*> did not converge to zero. See the description of RWORK
+*> above for details.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsing
+*
+* =====================================================================
SUBROUTINE ZGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
$ WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK sing routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU, JOBVT
@@ -16,124 +223,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGESVD computes the singular value decomposition (SVD) of a complex
-* M-by-N matrix A, optionally computing the left and/or right singular
-* vectors. The SVD is written
-*
-* A = U * SIGMA * conjugate-transpose(V)
-*
-* where SIGMA is an M-by-N matrix which is zero except for its
-* min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
-* V is an N-by-N unitary matrix. The diagonal elements of SIGMA
-* are the singular values of A; they are real and non-negative, and
-* are returned in descending order. The first min(m,n) columns of
-* U and V are the left and right singular vectors of A.
-*
-* Note that the routine returns V**H, not V.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix U:
-* = 'A': all M columns of U are returned in array U:
-* = 'S': the first min(m,n) columns of U (the left singular
-* vectors) are returned in the array U;
-* = 'O': the first min(m,n) columns of U (the left singular
-* vectors) are overwritten on the array A;
-* = 'N': no columns of U (no left singular vectors) are
-* computed.
-*
-* JOBVT (input) CHARACTER*1
-* Specifies options for computing all or part of the matrix
-* V**H:
-* = 'A': all N rows of V**H are returned in the array VT;
-* = 'S': the first min(m,n) rows of V**H (the right singular
-* vectors) are returned in the array VT;
-* = 'O': the first min(m,n) rows of V**H (the right singular
-* vectors) are overwritten on the array A;
-* = 'N': no rows of V**H (no right singular vectors) are
-* computed.
-*
-* JOBVT and JOBU cannot both be 'O'.
-*
-* M (input) INTEGER
-* The number of rows of the input matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the input matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit,
-* if JOBU = 'O', A is overwritten with the first min(m,n)
-* columns of U (the left singular vectors,
-* stored columnwise);
-* if JOBVT = 'O', A is overwritten with the first min(m,n)
-* rows of V**H (the right singular vectors,
-* stored rowwise);
-* if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
-* are destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* S (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of A, sorted so that S(i) >= S(i+1).
-*
-* U (output) COMPLEX*16 array, dimension (LDU,UCOL)
-* (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
-* If JOBU = 'A', U contains the M-by-M unitary matrix U;
-* if JOBU = 'S', U contains the first min(m,n) columns of U
-* (the left singular vectors, stored columnwise);
-* if JOBU = 'N' or 'O', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= 1; if
-* JOBU = 'S' or 'A', LDU >= M.
-*
-* VT (output) COMPLEX*16 array, dimension (LDVT,N)
-* If JOBVT = 'A', VT contains the N-by-N unitary matrix
-* V**H;
-* if JOBVT = 'S', VT contains the first min(m,n) rows of
-* V**H (the right singular vectors, stored rowwise);
-* if JOBVT = 'N' or 'O', VT is not referenced.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= 1; if
-* JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX(1,2*MIN(M,N)+MAX(M,N)).
-* For good performance, LWORK should generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (5*min(M,N))
-* On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the
-* unconverged superdiagonal elements of an upper bidiagonal
-* matrix B whose diagonal is in S (not necessarily sorted).
-* B satisfies A = U * B * VT, so it has the same singular
-* values as A, and singular vectors related by U and VT.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if ZBDSQR did not converge, INFO specifies how many
-* superdiagonals of an intermediate bidiagonal form B
-* did not converge to zero. See the description of RWORK
-* above for details.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgesvx.f b/SRC/zgesvx.f
index 42f30853..9a10f3f3 100644
--- a/SRC/zgesvx.f
+++ b/SRC/zgesvx.f
@@ -1,11 +1,353 @@
+*> \brief <b> ZGESVX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), C( * ), FERR( * ), R( * ),
+* $ RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGESVX uses the LU factorization to compute the solution to a complex
+*> system of linear equations
+*> A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*> matrix A (after equilibration if FACT = 'E') as
+*> A = P * L * U,
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
+*> not 'N', then A must have been equilibrated by the scaling
+*> factors in R and/or C. A is not modified if FACT = 'F' or
+*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX*16 array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the factors L and U from the factorization
+*> A = P*L*U as computed by ZGETRF. If EQUED .ne. 'N', then
+*> AF is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by ZGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*> to the original system of equations. Note that A and B are
+*> modified on exit if EQUED .ne. 'N', and the solution to the
+*> equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*> EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*> and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> On exit, RWORK(1) contains the reciprocal pivot growth
+*> factor norm(A)/norm(U). The "max absolute element" norm is
+*> used. If RWORK(1) is much less than 1, then the stability
+*> of the LU factorization of the (equilibrated) matrix A
+*> could be poor. This also means that the solution X, condition
+*> estimator RCOND, and forward error bound FERR could be
+*> unreliable. If factorization fails with 0<INFO<=N, then
+*> RWORK(1) contains the reciprocal pivot growth factor for the
+*> leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization has
+*> been completed, but the factor U is exactly
+*> singular, so the solution and error bounds
+*> could not be computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsolve
+*
+* =====================================================================
SUBROUTINE ZGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK solve routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
@@ -20,231 +362,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGESVX uses the LU factorization to compute the solution to a complex
-* system of linear equations
-* A * X = B,
-* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
-* matrix A (after equilibration if FACT = 'E') as
-* A = P * L * U,
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-* not 'N', then A must have been equilibrated by the scaling
-* factors in R and/or C. A is not modified if FACT = 'F' or
-* 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX*16 array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the factors L and U from the factorization
-* A = P*L*U as computed by ZGETRF. If EQUED .ne. 'N', then
-* AF is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by ZGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
-* to the original system of equations. Note that A and B are
-* modified on exit if EQUED .ne. 'N', and the solution to the
-* equilibrated system is inv(diag(C))*X if TRANS = 'N' and
-* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
-* and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace/output) DOUBLE PRECISION array, dimension (2*N)
-* On exit, RWORK(1) contains the reciprocal pivot growth
-* factor norm(A)/norm(U). The "max absolute element" norm is
-* used. If RWORK(1) is much less than 1, then the stability
-* of the LU factorization of the (equilibrated) matrix A
-* could be poor. This also means that the solution X, condition
-* estimator RCOND, and forward error bound FERR could be
-* unreliable. If factorization fails with 0<INFO<=N, then
-* RWORK(1) contains the reciprocal pivot growth factor for the
-* leading INFO columns of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization has
-* been completed, but the factor U is exactly
-* singular, so the solution and error bounds
-* could not be computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgesvxx.f b/SRC/zgesvxx.f
index 711cb111..970139f8 100644
--- a/SRC/zgesvxx.f
+++ b/SRC/zgesvxx.f
@@ -1,19 +1,563 @@
+*> \brief <b> ZGESVXX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGESVXX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW,
+* BERR, N_ERR_BNDS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, TRANS
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX , * ),WORK( * )
+* DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZGESVXX uses the LU factorization to compute the solution to a
+*> complex*16 system of linear equations A * X = B, where A is an
+*> N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. ZGESVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> ZGESVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> ZGESVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what ZGESVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
+*> TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*> TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*> or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = P * L * U,
+*>
+*> where P is a permutation matrix, L is a unit lower triangular
+*> matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is less
+*> than machine precision, the routine still goes on to solve for X
+*> and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*> that it solves the original system before equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by R and C.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
+*> not 'N', then A must have been equilibrated by the scaling
+*> factors in R and/or C. A is not modified if FACT = 'F' or
+*> 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED .ne. 'N', A is scaled as follows:
+*> EQUED = 'R': A := diag(R) * A
+*> EQUED = 'C': A := A * diag(C)
+*> EQUED = 'B': A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX*16 array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the factors L and U from the factorization
+*> A = P*L*U as computed by ZGETRF. If EQUED .ne. 'N', then
+*> AF is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the factors L and U from the factorization A = P*L*U
+*> of the equilibrated matrix A (see the description of A for
+*> the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the factorization A = P*L*U
+*> as computed by ZGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the original matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then IPIV is an output argument and on exit
+*> contains the pivot indices from the factorization A = P*L*U
+*> of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'R' or 'B', A is
+*> multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*> is not accessed. R is an input argument if FACT = 'F';
+*> otherwise, R is an output argument. If FACT = 'F' and
+*> EQUED = 'R' or 'B', each element of R must be positive.
+*> If R is output, each element of R is a power of the radix.
+*> If R is input, each element of R should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is or output) DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If EQUED = 'C' or 'B', A is
+*> multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*> is not accessed. C is an input argument if FACT = 'F';
+*> otherwise, C is an output argument. If FACT = 'F' and
+*> EQUED = 'C' or 'B', each element of C must be positive.
+*> If C is output, each element of C is a power of the radix.
+*> If C is input, each element of C should be a power of the radix
+*> to ensure a reliable solution and error estimates. Scaling by
+*> powers of the radix does not cause rounding errors unless the
+*> result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*> diag(R)*B;
+*> if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*> overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit
+*> if EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
+*> inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A. In ZGESVX, this quantity is
+*> returned in WORK(1).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEsolve
+*
+* =====================================================================
SUBROUTINE ZGESVXX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW,
$ BERR, N_ERR_BNDS, ERR_BNDS_NORM,
$ ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, TRANS
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -29,398 +573,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGESVXX uses the LU factorization to compute the solution to a
-* complex*16 system of linear equations A * X = B, where A is an
-* N-by-N matrix and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. ZGESVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* ZGESVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* ZGESVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what ZGESVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
-* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
-* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
-* or diag(C)*B (if TRANS = 'T' or 'C').
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = P * L * U,
-*
-* where P is a permutation matrix, L is a unit lower triangular
-* matrix, and U is upper triangular.
-*
-* 3. If some U(i,i)=0, so that U is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is less
-* than machine precision, the routine still goes on to solve for X
-* and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
-* that it solves the original system before equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by R and C.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is
-* not 'N', then A must have been equilibrated by the scaling
-* factors in R and/or C. A is not modified if FACT = 'F' or
-* 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if EQUED .ne. 'N', A is scaled as follows:
-* EQUED = 'R': A := diag(R) * A
-* EQUED = 'C': A := A * diag(C)
-* EQUED = 'B': A := diag(R) * A * diag(C).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX*16 array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the factors L and U from the factorization
-* A = P*L*U as computed by ZGETRF. If EQUED .ne. 'N', then
-* AF is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the factors L and U from the factorization A = P*L*U
-* of the equilibrated matrix A (see the description of A for
-* the form of the equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the factorization A = P*L*U
-* as computed by ZGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the original matrix A.
-*
-* If FACT = 'E', then IPIV is an output argument and on exit
-* contains the pivot indices from the factorization A = P*L*U
-* of the equilibrated matrix A.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* R (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'R' or 'B', A is
-* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
-* is not accessed. R is an input argument if FACT = 'F';
-* otherwise, R is an output argument. If FACT = 'F' and
-* EQUED = 'R' or 'B', each element of R must be positive.
-* If R is output, each element of R is a power of the radix.
-* If R is input, each element of R should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* C (input or output) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If EQUED = 'C' or 'B', A is
-* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
-* is not accessed. C is an input argument if FACT = 'F';
-* otherwise, C is an output argument. If FACT = 'F' and
-* EQUED = 'C' or 'B', each element of C must be positive.
-* If C is output, each element of C is a power of the radix.
-* If C is input, each element of C should be a power of the radix
-* to ensure a reliable solution and error estimates. Scaling by
-* powers of the radix does not cause rounding errors unless the
-* result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
-* diag(R)*B;
-* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
-* overwritten by diag(C)*B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit
-* if EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(C))*X if TRANS = 'N' and EQUED = 'C' or 'B', or
-* inv(diag(R))*X if TRANS = 'T' or 'C' and EQUED = 'R' or 'B'.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A. In ZGESVX, this quantity is
-* returned in WORK(1).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zgetc2.f b/SRC/zgetc2.f
index b44ed200..786ad080 100644
--- a/SRC/zgetc2.f
+++ b/SRC/zgetc2.f
@@ -1,64 +1,126 @@
- SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * ), JPIV( * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZGETC2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGETC2 computes an LU factorization, using complete pivoting, of the
-* n-by-n matrix A. The factorization has the form A = P * L * U * Q,
-* where P and Q are permutation matrices, L is lower triangular with
-* unit diagonal elements and U is upper triangular.
-*
-* This is a level 1 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGETC2 computes an LU factorization, using complete pivoting, of the
+*> n-by-n matrix A. The factorization has the form A = P * L * U * Q,
+*> where P and Q are permutation matrices, L is lower triangular with
+*> unit diagonal elements and U is upper triangular.
+*>
+*> This is a level 1 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the n-by-n matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U*Q; the unit diagonal elements of L are not stored.
-* If U(k, k) appears to be less than SMIN, U(k, k) is given the
-* value of SMIN, giving a nonsingular perturbed system.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the n-by-n matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U*Q; the unit diagonal elements of L are not stored.
+*> If U(k, k) appears to be less than SMIN, U(k, k) is given the
+*> value of SMIN, giving a nonsingular perturbed system.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, U(k, k) is likely to produce overflow if
+*> one tries to solve for x in Ax = b. So U is perturbed
+*> to avoid the overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (output) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
+*> \date November 2011
*
-* JPIV (output) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
+*> \ingroup complex16GEauxiliary
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, U(k, k) is likely to produce overflow if
-* one tries to solve for x in Ax = b. So U is perturbed
-* to avoid the overflow.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * ), JPIV( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgetf2.f b/SRC/zgetf2.f
index 79c2170f..f85fd099 100644
--- a/SRC/zgetf2.f
+++ b/SRC/zgetf2.f
@@ -1,60 +1,117 @@
- SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZGETF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGETF2 computes an LU factorization of a general m-by-n matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the right-looking Level 2 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGETF2 computes an LU factorization of a general m-by-n matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*> A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 2 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the m by n matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup complex16GEcomputational
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* =====================================================================
+ SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgetrf.f b/SRC/zgetrf.f
index 23aabe9c..43a28c13 100644
--- a/SRC/zgetrf.f
+++ b/SRC/zgetrf.f
@@ -1,60 +1,117 @@
- SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZGETRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGETRF computes an LU factorization of a general M-by-N matrix A
-* using partial pivoting with row interchanges.
-*
-* The factorization has the form
-* A = P * L * U
-* where P is a permutation matrix, L is lower triangular with unit
-* diagonal elements (lower trapezoidal if m > n), and U is upper
-* triangular (upper trapezoidal if m < n).
-*
-* This is the right-looking Level 3 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGETRF computes an LU factorization of a general M-by-N matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*> A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix to be factored.
+*> On exit, the factors L and U from the factorization
+*> A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices; for 1 <= i <= min(M,N), row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix to be factored.
-* On exit, the factors L and U from the factorization
-* A = P*L*U; the unit diagonal elements of L are not stored.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup complex16GEcomputational
*
-* IPIV (output) INTEGER array, dimension (min(M,N))
-* The pivot indices; for 1 <= i <= min(M,N), row i of the
-* matrix was interchanged with row IPIV(i).
+* =====================================================================
+ SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgetri.f b/SRC/zgetri.f
index 188a3817..e9fb5ed6 100644
--- a/SRC/zgetri.f
+++ b/SRC/zgetri.f
@@ -1,63 +1,124 @@
- SUBROUTINE ZGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b ZGETRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGETRI computes the inverse of a matrix using the LU factorization
-* computed by ZGETRF.
-*
-* This method inverts U and then computes inv(A) by solving the system
-* inv(A)*L = inv(U) for inv(A).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGETRI computes the inverse of a matrix using the LU factorization
+*> computed by ZGETRF.
+*>
+*> This method inverts U and then computes inv(A) by solving the system
+*> inv(A)*L = inv(U) for inv(A).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the factors L and U from the factorization
-* A = P*L*U as computed by ZGETRF.
-* On exit, if INFO = 0, the inverse of the original matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the factors L and U from the factorization
+*> A = P*L*U as computed by ZGETRF.
+*> On exit, if INFO = 0, the inverse of the original matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimal performance LWORK >= N*NB, where NB is
+*> the optimal blocksize returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero; the matrix is
+*> singular and its inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \ingroup complex16GEcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimal performance LWORK >= N*NB, where NB is
-* the optimal blocksize returned by ILAENV.
+* =====================================================================
+ SUBROUTINE ZGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is
-* singular and its inverse could not be computed.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgetrs.f b/SRC/zgetrs.f
index 9c5de812..56617792 100644
--- a/SRC/zgetrs.f
+++ b/SRC/zgetrs.f
@@ -1,64 +1,131 @@
- SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZGETRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZGETRS solves a system of linear equations
-* A * X = B, A**T * X = B, or A**H * X = B
-* with a general N-by-N matrix A using the LU factorization computed
-* by ZGETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGETRS solves a system of linear equations
+*> A * X = B, A**T * X = B, or A**H * X = B
+*> with a general N-by-N matrix A using the LU factorization computed
+*> by ZGETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The factors L and U from the factorization A = P*L*U
+*> as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZGETRF; for 1<=i<=N, row i of the
+*> matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The factors L and U from the factorization A = P*L*U
-* as computed by ZGETRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZGETRF; for 1<=i<=N, row i of the
-* matrix was interchanged with row IPIV(i).
+*> \ingroup complex16GEcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zggbak.f b/SRC/zggbak.f
index 6a09ce3d..d0fd66c3 100644
--- a/SRC/zggbak.f
+++ b/SRC/zggbak.f
@@ -1,81 +1,160 @@
- SUBROUTINE ZGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
- $ LDV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOB, SIDE
- INTEGER IHI, ILO, INFO, LDV, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION LSCALE( * ), RSCALE( * )
- COMPLEX*16 V( LDV, * )
-* ..
-*
+*> \brief \b ZGGBAK
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+* LDV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB, SIDE
+* INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION LSCALE( * ), RSCALE( * )
+* COMPLEX*16 V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* ZGGBAK forms the right or left eigenvectors of a complex generalized
-* eigenvalue problem A*x = lambda*B*x, by backward transformation on
-* the computed eigenvectors of the balanced pair of matrices output by
-* ZGGBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGBAK forms the right or left eigenvectors of a complex generalized
+*> eigenvalue problem A*x = lambda*B*x, by backward transformation on
+*> the computed eigenvectors of the balanced pair of matrices output by
+*> ZGGBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER*1
-* Specifies the type of backward transformation required:
-* = 'N': do nothing, return immediately;
-* = 'P': do backward transformation for permutation only;
-* = 'S': do backward transformation for scaling only;
-* = 'B': do backward transformations for both permutation and
-* scaling.
-* JOB must be the same as the argument JOB supplied to ZGGBAL.
-*
-* SIDE (input) CHARACTER*1
-* = 'R': V contains right eigenvectors;
-* = 'L': V contains left eigenvectors.
-*
-* N (input) INTEGER
-* The number of rows of the matrix V. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* The integers ILO and IHI determined by ZGGBAL.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* LSCALE (input) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and/or scaling factors applied
-* to the left side of A and B, as returned by ZGGBAL.
-*
-* RSCALE (input) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and/or scaling factors applied
-* to the right side of A and B, as returned by ZGGBAL.
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the type of backward transformation required:
+*> = 'N': do nothing, return immediately;
+*> = 'P': do backward transformation for permutation only;
+*> = 'S': do backward transformation for scaling only;
+*> = 'B': do backward transformations for both permutation and
+*> scaling.
+*> JOB must be the same as the argument JOB supplied to ZGGBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': V contains right eigenvectors;
+*> = 'L': V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrix V. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> The integers ILO and IHI determined by ZGGBAL.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] LSCALE
+*> \verbatim
+*> LSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and/or scaling factors applied
+*> to the left side of A and B, as returned by ZGGBAL.
+*> \endverbatim
+*>
+*> \param[in] RSCALE
+*> \verbatim
+*> RSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and/or scaling factors applied
+*> to the right side of A and B, as returned by ZGGBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix V. M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,M)
+*> On entry, the matrix of right or left eigenvectors to be
+*> transformed, as returned by ZTGEVC.
+*> On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the matrix V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of columns of the matrix V. M >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* V (input/output) COMPLEX*16 array, dimension (LDV,M)
-* On entry, the matrix of right or left eigenvectors to be
-* transformed, as returned by ZTGEVC.
-* On exit, V is overwritten by the transformed eigenvectors.
+*> \date November 2011
*
-* LDV (input) INTEGER
-* The leading dimension of the matrix V. LDV >= max(1,N).
+*> \ingroup complex16GBcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> See R.C. Ward, Balancing the generalized eigenvalue problem,
+*> SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+ $ LDV, INFO )
+*
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* See R.C. Ward, Balancing the generalized eigenvalue problem,
-* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+* .. Scalar Arguments ..
+ CHARACTER JOB, SIDE
+ INTEGER IHI, ILO, INFO, LDV, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION LSCALE( * ), RSCALE( * )
+ COMPLEX*16 V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zggbal.f b/SRC/zggbal.f
index ee7d6d28..0de14cdb 100644
--- a/SRC/zggbal.f
+++ b/SRC/zggbal.f
@@ -1,10 +1,180 @@
+*> \brief \b ZGGBAL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
+* RSCALE, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER IHI, ILO, INFO, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION LSCALE( * ), RSCALE( * ), WORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGBAL balances a pair of general complex matrices (A,B). This
+*> involves, first, permuting A and B by similarity transformations to
+*> isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
+*> elements on the diagonal; and second, applying a diagonal similarity
+*> transformation to rows and columns ILO to IHI to make the rows
+*> and columns as close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrices, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors in the
+*> generalized eigenvalue problem A*x = lambda*B*x.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies the operations to be performed on A and B:
+*> = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
+*> and RSCALE(I) = 1.0 for i=1,...,N;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the input matrix A.
+*> On exit, A is overwritten by the balanced matrix.
+*> If JOB = 'N', A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the input matrix B.
+*> On exit, B is overwritten by the balanced matrix.
+*> If JOB = 'N', B is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are set to integers such that on exit
+*> A(i,j) = 0 and B(i,j) = 0 if i > j and
+*> j = 1,...,ILO-1 or i = IHI+1,...,N.
+*> If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the left side of A and B. If P(j) is the index of the
+*> row interchanged with row j, and D(j) is the scaling factor
+*> applied to row j, then
+*> LSCALE(j) = P(j) for J = 1,...,ILO-1
+*> = D(j) for J = ILO,...,IHI
+*> = P(j) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the right side of A and B. If P(j) is the index of the
+*> column interchanged with column j, and D(j) is the scaling
+*> factor applied to column j, then
+*> RSCALE(j) = P(j) for J = 1,...,ILO-1
+*> = D(j) for J = ILO,...,IHI
+*> = P(j) for J = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (lwork)
+*> lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
+*> at least 1 when JOB = 'N' or 'P'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> See R.C. WARD, Balancing the generalized eigenvalue problem,
+*> SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
$ RSCALE, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOB
@@ -15,94 +185,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGGBAL balances a pair of general complex matrices (A,B). This
-* involves, first, permuting A and B by similarity transformations to
-* isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
-* elements on the diagonal; and second, applying a diagonal similarity
-* transformation to rows and columns ILO to IHI to make the rows
-* and columns as close in norm as possible. Both steps are optional.
-*
-* Balancing may reduce the 1-norm of the matrices, and improve the
-* accuracy of the computed eigenvalues and/or eigenvectors in the
-* generalized eigenvalue problem A*x = lambda*B*x.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies the operations to be performed on A and B:
-* = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
-* and RSCALE(I) = 1.0 for i=1,...,N;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the input matrix A.
-* On exit, A is overwritten by the balanced matrix.
-* If JOB = 'N', A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the input matrix B.
-* On exit, B is overwritten by the balanced matrix.
-* If JOB = 'N', B is not referenced.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are set to integers such that on exit
-* A(i,j) = 0 and B(i,j) = 0 if i > j and
-* j = 1,...,ILO-1 or i = IHI+1,...,N.
-* If JOB = 'N' or 'S', ILO = 1 and IHI = N.
-*
-* LSCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the left side of A and B. If P(j) is the index of the
-* row interchanged with row j, and D(j) is the scaling factor
-* applied to row j, then
-* LSCALE(j) = P(j) for J = 1,...,ILO-1
-* = D(j) for J = ILO,...,IHI
-* = P(j) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* RSCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the right side of A and B. If P(j) is the index of the
-* column interchanged with column j, and D(j) is the scaling
-* factor applied to column j, then
-* RSCALE(j) = P(j) for J = 1,...,ILO-1
-* = D(j) for J = ILO,...,IHI
-* = P(j) for J = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* WORK (workspace) REAL array, dimension (lwork)
-* lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
-* at least 1 when JOB = 'N' or 'P'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* See R.C. WARD, Balancing the generalized eigenvalue problem,
-* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgges.f b/SRC/zgges.f
index b37a2fce..a2f4765e 100644
--- a/SRC/zgges.f
+++ b/SRC/zgges.f
@@ -1,11 +1,274 @@
+*> \brief <b> ZGGES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
+* SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
+* LWORK, RWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR, SORT
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+* $ WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELCTG
+* EXTERNAL SELCTG
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGES computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, the generalized complex Schur
+*> form (S, T), and optionally left and/or right Schur vectors (VSL
+*> and VSR). This gives the generalized Schur factorization
+*>
+*> (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )
+*>
+*> where (VSR)**H is the conjugate-transpose of VSR.
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> triangular matrix S and the upper triangular matrix T. The leading
+*> columns of VSL and VSR then form an unitary basis for the
+*> corresponding left and right eigenspaces (deflating subspaces).
+*>
+*> (If only the generalized eigenvalues are needed, use the driver
+*> ZGGEV instead, which is faster.)
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0, and even for both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized complex Schur form if S
+*> and T are upper triangular and, in addition, the diagonal elements
+*> of T are non-negative real numbers.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the generalized Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELCTG).
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*> SELCTG is procedure) LOGICAL FUNCTION of two COMPLEX*16 arguments
+*> SELCTG must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'N', SELCTG is not referenced.
+*> If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> An eigenvalue ALPHA(j)/BETA(j) is selected if
+*> SELCTG(ALPHA(j),BETA(j)) is true.
+*> \endverbatim
+*> \verbatim
+*> Note that a selected complex eigenvalue may no longer satisfy
+*> SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
+*> ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned), in this
+*> case INFO is set to N+2 (See INFO below).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the first of the pair of matrices.
+*> On exit, A has been overwritten by its generalized Schur
+*> form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the second of the pair of matrices.
+*> On exit, B has been overwritten by its generalized Schur
+*> form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELCTG is true.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
+*> generalized eigenvalues. ALPHA(j), j=1,...,N and BETA(j),
+*> j=1,...,N are the diagonals of the complex Schur form (A,B)
+*> output by ZGGES. The BETA(j) will be non-negative real.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHA(j)/BETA(j) may easily over- or
+*> underflow, and BETA(j) may even be zero. Thus, the user
+*> should avoid naively computing the ratio alpha/beta.
+*> However, ALPHA will be always less than and usually
+*> comparable with norm(A) in magnitude, and BETA always less
+*> than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is COMPLEX*16 array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >= 1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is COMPLEX*16 array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> =1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHA(j) and BETA(j) should be correct for
+*> j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in ZHGEQZ
+*> =N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Generalized Schur form no
+*> longer satisfy SELCTG=.TRUE. This could also
+*> be caused due to scaling.
+*> =N+3: reordering falied in ZTGSEN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+* =====================================================================
SUBROUTINE ZGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
$ SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
$ LWORK, RWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR, SORT
@@ -23,154 +286,6 @@
EXTERNAL SELCTG
* ..
*
-* Purpose
-* =======
-*
-* ZGGES computes for a pair of N-by-N complex nonsymmetric matrices
-* (A,B), the generalized eigenvalues, the generalized complex Schur
-* form (S, T), and optionally left and/or right Schur vectors (VSL
-* and VSR). This gives the generalized Schur factorization
-*
-* (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )
-*
-* where (VSR)**H is the conjugate-transpose of VSR.
-*
-* Optionally, it also orders the eigenvalues so that a selected cluster
-* of eigenvalues appears in the leading diagonal blocks of the upper
-* triangular matrix S and the upper triangular matrix T. The leading
-* columns of VSL and VSR then form an unitary basis for the
-* corresponding left and right eigenspaces (deflating subspaces).
-*
-* (If only the generalized eigenvalues are needed, use the driver
-* ZGGEV instead, which is faster.)
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is a
-* reasonable interpretation for beta=0, and even for both being zero.
-*
-* A pair of matrices (S,T) is in generalized complex Schur form if S
-* and T are upper triangular and, in addition, the diagonal elements
-* of T are non-negative real numbers.
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors.
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the generalized Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELCTG).
-*
-* SELCTG (external procedure) LOGICAL FUNCTION of two COMPLEX*16 arguments
-* SELCTG must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'N', SELCTG is not referenced.
-* If SORT = 'S', SELCTG is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* An eigenvalue ALPHA(j)/BETA(j) is selected if
-* SELCTG(ALPHA(j),BETA(j)) is true.
-*
-* Note that a selected complex eigenvalue may no longer satisfy
-* SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
-* ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned), in this
-* case INFO is set to N+2 (See INFO below).
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the first of the pair of matrices.
-* On exit, A has been overwritten by its generalized Schur
-* form S.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the second of the pair of matrices.
-* On exit, B has been overwritten by its generalized Schur
-* form T.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELCTG is true.
-*
-* ALPHA (output) COMPLEX*16 array, dimension (N)
-*
-* BETA (output) COMPLEX*16 array, dimension (N)
-* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
-* generalized eigenvalues. ALPHA(j), j=1,...,N and BETA(j),
-* j=1,...,N are the diagonals of the complex Schur form (A,B)
-* output by ZGGES. The BETA(j) will be non-negative real.
-*
-* Note: the quotients ALPHA(j)/BETA(j) may easily over- or
-* underflow, and BETA(j) may even be zero. Thus, the user
-* should avoid naively computing the ratio alpha/beta.
-* However, ALPHA will be always less than and usually
-* comparable with norm(A) in magnitude, and BETA always less
-* than and usually comparable with norm(B).
-*
-* VSL (output) COMPLEX*16 array, dimension (LDVSL,N)
-* If JOBVSL = 'V', VSL will contain the left Schur vectors.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >= 1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) COMPLEX*16 array, dimension (LDVSR,N)
-* If JOBVSR = 'V', VSR will contain the right Schur vectors.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (8*N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* =1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHA(j) and BETA(j) should be correct for
-* j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in ZHGEQZ
-* =N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Generalized Schur form no
-* longer satisfy SELCTG=.TRUE. This could also
-* be caused due to scaling.
-* =N+3: reordering falied in ZTGSEN.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zggesx.f b/SRC/zggesx.f
index 1aaa2a7d..00dee277 100644
--- a/SRC/zggesx.f
+++ b/SRC/zggesx.f
@@ -1,12 +1,334 @@
+*> \brief <b> ZGGESX computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA,
+* B, LDB, SDIM, ALPHA, BETA, VSL, LDVSL, VSR,
+* LDVSR, RCONDE, RCONDV, WORK, LWORK, RWORK,
+* IWORK, LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVSL, JOBVSR, SENSE, SORT
+* INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LIWORK, LWORK, N,
+* $ SDIM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RCONDE( 2 ), RCONDV( 2 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+* $ WORK( * )
+* ..
+* .. Function Arguments ..
+* LOGICAL SELCTG
+* EXTERNAL SELCTG
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGESX computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, the complex Schur form (S,T),
+*> and, optionally, the left and/or right matrices of Schur vectors (VSL
+*> and VSR). This gives the generalized Schur factorization
+*>
+*> (A,B) = ( (VSL) S (VSR)**H, (VSL) T (VSR)**H )
+*>
+*> where (VSR)**H is the conjugate-transpose of VSR.
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> triangular matrix S and the upper triangular matrix T; computes
+*> a reciprocal condition number for the average of the selected
+*> eigenvalues (RCONDE); and computes a reciprocal condition number for
+*> the right and left deflating subspaces corresponding to the selected
+*> eigenvalues (RCONDV). The leading columns of VSL and VSR then form
+*> an orthonormal basis for the corresponding left and right eigenspaces
+*> (deflating subspaces).
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0 or for both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized complex Schur form if T is
+*> upper triangular with non-negative diagonal and S is upper
+*> triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*> JOBVSL is CHARACTER*1
+*> = 'N': do not compute the left Schur vectors;
+*> = 'V': compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*> JOBVSR is CHARACTER*1
+*> = 'N': do not compute the right Schur vectors;
+*> = 'V': compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*> SORT is CHARACTER*1
+*> Specifies whether or not to order the eigenvalues on the
+*> diagonal of the generalized Schur form.
+*> = 'N': Eigenvalues are not ordered;
+*> = 'S': Eigenvalues are ordered (see SELCTG).
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*> SELCTG is procedure) LOGICAL FUNCTION of two COMPLEX*16 arguments
+*> SELCTG must be declared EXTERNAL in the calling subroutine.
+*> If SORT = 'N', SELCTG is not referenced.
+*> If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*> to the top left of the Schur form.
+*> Note that a selected complex eigenvalue may no longer satisfy
+*> SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
+*> ordering may change the value of complex eigenvalues
+*> (especially if the eigenvalue is ill-conditioned), in this
+*> case INFO is set to N+3 see INFO below).
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N' : None are computed;
+*> = 'E' : Computed for average of selected eigenvalues only;
+*> = 'V' : Computed for selected deflating subspaces only;
+*> = 'B' : Computed for both.
+*> If SENSE = 'E', 'V', or 'B', SORT must equal 'S'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VSL, and VSR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the first of the pair of matrices.
+*> On exit, A has been overwritten by its generalized Schur
+*> form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the second of the pair of matrices.
+*> On exit, B has been overwritten by its generalized Schur
+*> form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*> SDIM is INTEGER
+*> If SORT = 'N', SDIM = 0.
+*> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*> for which SELCTG is true.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
+*> generalized eigenvalues. ALPHA(j) and BETA(j),j=1,...,N are
+*> the diagonals of the complex Schur form (S,T). BETA(j) will
+*> be non-negative real.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHA(j)/BETA(j) may easily over- or
+*> underflow, and BETA(j) may even be zero. Thus, the user
+*> should avoid naively computing the ratio alpha/beta.
+*> However, ALPHA will be always less than and usually
+*> comparable with norm(A) in magnitude, and BETA always less
+*> than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*> VSL is COMPLEX*16 array, dimension (LDVSL,N)
+*> If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*> Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*> LDVSL is INTEGER
+*> The leading dimension of the matrix VSL. LDVSL >=1, and
+*> if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*> VSR is COMPLEX*16 array, dimension (LDVSR,N)
+*> If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*> Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*> LDVSR is INTEGER
+*> The leading dimension of the matrix VSR. LDVSR >= 1, and
+*> if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension ( 2 )
+*> If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
+*> reciprocal condition numbers for the average of the selected
+*> eigenvalues.
+*> Not referenced if SENSE = 'N' or 'V'.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension ( 2 )
+*> If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
+*> reciprocal condition number for the selected deflating
+*> subspaces.
+*> Not referenced if SENSE = 'N' or 'E'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N = 0, LWORK >= 1, else if SENSE = 'E', 'V', or 'B',
+*> LWORK >= MAX(1,2*N,2*SDIM*(N-SDIM)), else
+*> LWORK >= MAX(1,2*N). Note that 2*SDIM*(N-SDIM) <= N*N/2.
+*> Note also that an error is only returned if
+*> LWORK < MAX(1,2*N), but if SENSE = 'E' or 'V' or 'B' this may
+*> not be large enough.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the bound on the optimal size of the WORK
+*> array and the minimum size of the IWORK array, returns these
+*> values as the first entries of the WORK and IWORK arrays, and
+*> no error message related to LWORK or LIWORK is issued by
+*> XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension ( 8*N )
+*> Real workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If SENSE = 'N' or N = 0, LIWORK >= 1, otherwise
+*> LIWORK >= N+2.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the bound on the optimal size of the
+*> WORK array and the minimum size of the IWORK array, returns
+*> these values as the first entries of the WORK and IWORK
+*> arrays, and no error message related to LWORK or LIWORK is
+*> issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. (A,B) are not in Schur
+*> form, but ALPHA(j) and BETA(j) should be correct for
+*> j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in ZHGEQZ
+*> =N+2: after reordering, roundoff changed values of
+*> some complex eigenvalues so that leading
+*> eigenvalues in the Generalized Schur form no
+*> longer satisfy SELCTG=.TRUE. This could also
+*> be caused due to scaling.
+*> =N+3: reordering failed in ZTGSEN.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+* =====================================================================
SUBROUTINE ZGGESX( JOBVSL, JOBVSR, SORT, SELCTG, SENSE, N, A, LDA,
$ B, LDB, SDIM, ALPHA, BETA, VSL, LDVSL, VSR,
$ LDVSR, RCONDE, RCONDV, WORK, LWORK, RWORK,
$ IWORK, LIWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVSL, JOBVSR, SENSE, SORT
@@ -26,195 +348,6 @@
EXTERNAL SELCTG
* ..
*
-* Purpose
-* =======
-*
-* ZGGESX computes for a pair of N-by-N complex nonsymmetric matrices
-* (A,B), the generalized eigenvalues, the complex Schur form (S,T),
-* and, optionally, the left and/or right matrices of Schur vectors (VSL
-* and VSR). This gives the generalized Schur factorization
-*
-* (A,B) = ( (VSL) S (VSR)**H, (VSL) T (VSR)**H )
-*
-* where (VSR)**H is the conjugate-transpose of VSR.
-*
-* Optionally, it also orders the eigenvalues so that a selected cluster
-* of eigenvalues appears in the leading diagonal blocks of the upper
-* triangular matrix S and the upper triangular matrix T; computes
-* a reciprocal condition number for the average of the selected
-* eigenvalues (RCONDE); and computes a reciprocal condition number for
-* the right and left deflating subspaces corresponding to the selected
-* eigenvalues (RCONDV). The leading columns of VSL and VSR then form
-* an orthonormal basis for the corresponding left and right eigenspaces
-* (deflating subspaces).
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is a
-* reasonable interpretation for beta=0 or for both being zero.
-*
-* A pair of matrices (S,T) is in generalized complex Schur form if T is
-* upper triangular with non-negative diagonal and S is upper
-* triangular.
-*
-* Arguments
-* =========
-*
-* JOBVSL (input) CHARACTER*1
-* = 'N': do not compute the left Schur vectors;
-* = 'V': compute the left Schur vectors.
-*
-* JOBVSR (input) CHARACTER*1
-* = 'N': do not compute the right Schur vectors;
-* = 'V': compute the right Schur vectors.
-*
-* SORT (input) CHARACTER*1
-* Specifies whether or not to order the eigenvalues on the
-* diagonal of the generalized Schur form.
-* = 'N': Eigenvalues are not ordered;
-* = 'S': Eigenvalues are ordered (see SELCTG).
-*
-* SELCTG (external procedure) LOGICAL FUNCTION of two COMPLEX*16 arguments
-* SELCTG must be declared EXTERNAL in the calling subroutine.
-* If SORT = 'N', SELCTG is not referenced.
-* If SORT = 'S', SELCTG is used to select eigenvalues to sort
-* to the top left of the Schur form.
-* Note that a selected complex eigenvalue may no longer satisfy
-* SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
-* ordering may change the value of complex eigenvalues
-* (especially if the eigenvalue is ill-conditioned), in this
-* case INFO is set to N+3 see INFO below).
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N' : None are computed;
-* = 'E' : Computed for average of selected eigenvalues only;
-* = 'V' : Computed for selected deflating subspaces only;
-* = 'B' : Computed for both.
-* If SENSE = 'E', 'V', or 'B', SORT must equal 'S'.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VSL, and VSR. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the first of the pair of matrices.
-* On exit, A has been overwritten by its generalized Schur
-* form S.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the second of the pair of matrices.
-* On exit, B has been overwritten by its generalized Schur
-* form T.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* SDIM (output) INTEGER
-* If SORT = 'N', SDIM = 0.
-* If SORT = 'S', SDIM = number of eigenvalues (after sorting)
-* for which SELCTG is true.
-*
-* ALPHA (output) COMPLEX*16 array, dimension (N)
-*
-* BETA (output) COMPLEX*16 array, dimension (N)
-* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
-* generalized eigenvalues. ALPHA(j) and BETA(j),j=1,...,N are
-* the diagonals of the complex Schur form (S,T). BETA(j) will
-* be non-negative real.
-*
-* Note: the quotients ALPHA(j)/BETA(j) may easily over- or
-* underflow, and BETA(j) may even be zero. Thus, the user
-* should avoid naively computing the ratio alpha/beta.
-* However, ALPHA will be always less than and usually
-* comparable with norm(A) in magnitude, and BETA always less
-* than and usually comparable with norm(B).
-*
-* VSL (output) COMPLEX*16 array, dimension (LDVSL,N)
-* If JOBVSL = 'V', VSL will contain the left Schur vectors.
-* Not referenced if JOBVSL = 'N'.
-*
-* LDVSL (input) INTEGER
-* The leading dimension of the matrix VSL. LDVSL >=1, and
-* if JOBVSL = 'V', LDVSL >= N.
-*
-* VSR (output) COMPLEX*16 array, dimension (LDVSR,N)
-* If JOBVSR = 'V', VSR will contain the right Schur vectors.
-* Not referenced if JOBVSR = 'N'.
-*
-* LDVSR (input) INTEGER
-* The leading dimension of the matrix VSR. LDVSR >= 1, and
-* if JOBVSR = 'V', LDVSR >= N.
-*
-* RCONDE (output) DOUBLE PRECISION array, dimension ( 2 )
-* If SENSE = 'E' or 'B', RCONDE(1) and RCONDE(2) contain the
-* reciprocal condition numbers for the average of the selected
-* eigenvalues.
-* Not referenced if SENSE = 'N' or 'V'.
-*
-* RCONDV (output) DOUBLE PRECISION array, dimension ( 2 )
-* If SENSE = 'V' or 'B', RCONDV(1) and RCONDV(2) contain the
-* reciprocal condition number for the selected deflating
-* subspaces.
-* Not referenced if SENSE = 'N' or 'E'.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N = 0, LWORK >= 1, else if SENSE = 'E', 'V', or 'B',
-* LWORK >= MAX(1,2*N,2*SDIM*(N-SDIM)), else
-* LWORK >= MAX(1,2*N). Note that 2*SDIM*(N-SDIM) <= N*N/2.
-* Note also that an error is only returned if
-* LWORK < MAX(1,2*N), but if SENSE = 'E' or 'V' or 'B' this may
-* not be large enough.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the bound on the optimal size of the WORK
-* array and the minimum size of the IWORK array, returns these
-* values as the first entries of the WORK and IWORK arrays, and
-* no error message related to LWORK or LIWORK is issued by
-* XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension ( 8*N )
-* Real workspace.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If SENSE = 'N' or N = 0, LIWORK >= 1, otherwise
-* LIWORK >= N+2.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the bound on the optimal size of the
-* WORK array and the minimum size of the IWORK array, returns
-* these values as the first entries of the WORK and IWORK
-* arrays, and no error message related to LWORK or LIWORK is
-* issued by XERBLA.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* Not referenced if SORT = 'N'.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. (A,B) are not in Schur
-* form, but ALPHA(j) and BETA(j) should be correct for
-* j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in ZHGEQZ
-* =N+2: after reordering, roundoff changed values of
-* some complex eigenvalues so that leading
-* eigenvalues in the Generalized Schur form no
-* longer satisfy SELCTG=.TRUE. This could also
-* be caused due to scaling.
-* =N+3: reordering failed in ZTGSEN.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zggev.f b/SRC/zggev.f
index c596b86a..03f073ac 100644
--- a/SRC/zggev.f
+++ b/SRC/zggev.f
@@ -1,10 +1,220 @@
+*> \brief <b> ZGGEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
+* VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBVL, JOBVR
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGEV computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, and optionally, the left and/or
+*> right generalized eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right generalized eigenvector v(j) corresponding to the
+*> generalized eigenvalue lambda(j) of (A,B) satisfies
+*>
+*> A * v(j) = lambda(j) * B * v(j).
+*>
+*> The left generalized eigenvector u(j) corresponding to the
+*> generalized eigenvalues lambda(j) of (A,B) satisfies
+*>
+*> u(j)**H * A = lambda(j) * u(j)**H * B
+*>
+*> where u(j)**H is the conjugate-transpose of u(j).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the matrix A in the pair (A,B).
+*> On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the matrix B in the pair (A,B).
+*> On exit, B has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
+*> generalized eigenvalues.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotients ALPHA(j)/BETA(j) may easily over- or
+*> underflow, and BETA(j) may even be zero. Thus, the user
+*> should avoid naively computing the ratio alpha/beta.
+*> However, ALPHA will be always less than and usually
+*> comparable with norm(A) in magnitude, and BETA always less
+*> than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left generalized eigenvectors u(j) are
+*> stored one after another in the columns of VL, in the same
+*> order as their eigenvalues.
+*> Each eigenvector is scaled so the largest component has
+*> abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right generalized eigenvectors v(j) are
+*> stored one after another in the columns of VR, in the same
+*> order as their eigenvalues.
+*> Each eigenvector is scaled so the largest component has
+*> abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> For good performance, LWORK must generally be larger.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> =1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHA(j) and BETA(j) should be
+*> correct for j=INFO+1,...,N.
+*> > N: =N+1: other then QZ iteration failed in DHGEQZ,
+*> =N+2: error return from DTGEVC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+* =====================================================================
SUBROUTINE ZGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
$ VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBVL, JOBVR
@@ -17,120 +227,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGGEV computes for a pair of N-by-N complex nonsymmetric matrices
-* (A,B), the generalized eigenvalues, and optionally, the left and/or
-* right generalized eigenvectors.
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar
-* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
-* singular. It is usually represented as the pair (alpha,beta), as
-* there is a reasonable interpretation for beta=0, and even for both
-* being zero.
-*
-* The right generalized eigenvector v(j) corresponding to the
-* generalized eigenvalue lambda(j) of (A,B) satisfies
-*
-* A * v(j) = lambda(j) * B * v(j).
-*
-* The left generalized eigenvector u(j) corresponding to the
-* generalized eigenvalues lambda(j) of (A,B) satisfies
-*
-* u(j)**H * A = lambda(j) * u(j)**H * B
-*
-* where u(j)**H is the conjugate-transpose of u(j).
-*
-* Arguments
-* =========
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the matrix A in the pair (A,B).
-* On exit, A has been overwritten.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the matrix B in the pair (A,B).
-* On exit, B has been overwritten.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX*16 array, dimension (N)
-*
-* BETA (output) COMPLEX*16 array, dimension (N)
-* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
-* generalized eigenvalues.
-*
-* Note: the quotients ALPHA(j)/BETA(j) may easily over- or
-* underflow, and BETA(j) may even be zero. Thus, the user
-* should avoid naively computing the ratio alpha/beta.
-* However, ALPHA will be always less than and usually
-* comparable with norm(A) in magnitude, and BETA always less
-* than and usually comparable with norm(B).
-*
-* VL (output) COMPLEX*16 array, dimension (LDVL,N)
-* If JOBVL = 'V', the left generalized eigenvectors u(j) are
-* stored one after another in the columns of VL, in the same
-* order as their eigenvalues.
-* Each eigenvector is scaled so the largest component has
-* abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX*16 array, dimension (LDVR,N)
-* If JOBVR = 'V', the right generalized eigenvectors v(j) are
-* stored one after another in the columns of VR, in the same
-* order as their eigenvalues.
-* Each eigenvector is scaled so the largest component has
-* abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* For good performance, LWORK must generally be larger.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array, dimension (8*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* =1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHA(j) and BETA(j) should be
-* correct for j=INFO+1,...,N.
-* > N: =N+1: other then QZ iteration failed in DHGEQZ,
-* =N+2: error return from DTGEVC.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zggevx.f b/SRC/zggevx.f
index f3e53898..c6f24167 100644
--- a/SRC/zggevx.f
+++ b/SRC/zggevx.f
@@ -1,12 +1,379 @@
+*> \brief <b> ZGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
+* ALPHA, BETA, VL, LDVL, VR, LDVR, ILO, IHI,
+* LSCALE, RSCALE, ABNRM, BBNRM, RCONDE, RCONDV,
+* WORK, LWORK, RWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER BALANC, JOBVL, JOBVR, SENSE
+* INTEGER IHI, ILO, INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+* DOUBLE PRECISION ABNRM, BBNRM
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION LSCALE( * ), RCONDE( * ), RCONDV( * ),
+* $ RSCALE( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGEVX computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B) the generalized eigenvalues, and optionally, the left and/or
+*> right generalized eigenvectors.
+*>
+*> Optionally, it also computes a balancing transformation to improve
+*> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
+*> LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
+*> the eigenvalues (RCONDE), and reciprocal condition numbers for the
+*> right eigenvectors (RCONDV).
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*> A * v(j) = lambda(j) * B * v(j) .
+*> The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
+*> of (A,B) satisfies
+*> u(j)**H * A = lambda(j) * u(j)**H * B.
+*> where u(j)**H is the conjugate-transpose of u(j).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER*1
+*> Specifies the balance option to be performed:
+*> = 'N': do not diagonally scale or permute;
+*> = 'P': permute only;
+*> = 'S': scale only;
+*> = 'B': both permute and scale.
+*> Computed reciprocal condition numbers will be for the
+*> matrices after permuting and/or balancing. Permuting does
+*> not change condition numbers (in exact arithmetic), but
+*> balancing does.
+*> \endverbatim
+*>
+*> \param[in] JOBVL
+*> \verbatim
+*> JOBVL is CHARACTER*1
+*> = 'N': do not compute the left generalized eigenvectors;
+*> = 'V': compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*> JOBVR is CHARACTER*1
+*> = 'N': do not compute the right generalized eigenvectors;
+*> = 'V': compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] SENSE
+*> \verbatim
+*> SENSE is CHARACTER*1
+*> Determines which reciprocal condition numbers are computed.
+*> = 'N': none are computed;
+*> = 'E': computed for eigenvalues only;
+*> = 'V': computed for eigenvectors only;
+*> = 'B': computed for eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A, B, VL, and VR. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the matrix A in the pair (A,B).
+*> On exit, A has been overwritten. If JOBVL='V' or JOBVR='V'
+*> or both, then A contains the first part of the complex Schur
+*> form of the "balanced" versions of the input A and B.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the matrix B in the pair (A,B).
+*> On exit, B has been overwritten. If JOBVL='V' or JOBVR='V'
+*> or both, then B contains the second part of the complex
+*> Schur form of the "balanced" versions of the input A and B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the generalized
+*> eigenvalues.
+*> \endverbatim
+*> \verbatim
+*> Note: the quotient ALPHA(j)/BETA(j) ) may easily over- or
+*> underflow, and BETA(j) may even be zero. Thus, the user
+*> should avoid naively computing the ratio ALPHA/BETA.
+*> However, ALPHA will be always less than and usually
+*> comparable with norm(A) in magnitude, and BETA always less
+*> than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,N)
+*> If JOBVL = 'V', the left generalized eigenvectors u(j) are
+*> stored one after another in the columns of VL, in the same
+*> order as their eigenvalues.
+*> Each eigenvector will be scaled so the largest component
+*> will have abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the matrix VL. LDVL >= 1, and
+*> if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,N)
+*> If JOBVR = 'V', the right generalized eigenvectors v(j) are
+*> stored one after another in the columns of VR, in the same
+*> order as their eigenvalues.
+*> Each eigenvector will be scaled so the largest component
+*> will have abs(real part) + abs(imag. part) = 1.
+*> Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the matrix VR. LDVR >= 1, and
+*> if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI are integer values such that on exit
+*> A(i,j) = 0 and B(i,j) = 0 if i > j and
+*> j = 1,...,ILO-1 or i = IHI+1,...,N.
+*> If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the left side of A and B. If PL(j) is the index of the
+*> row interchanged with row j, and DL(j) is the scaling
+*> factor applied to row j, then
+*> LSCALE(j) = PL(j) for j = 1,...,ILO-1
+*> = DL(j) for j = ILO,...,IHI
+*> = PL(j) for j = IHI+1,...,N.
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is DOUBLE PRECISION array, dimension (N)
+*> Details of the permutations and scaling factors applied
+*> to the right side of A and B. If PR(j) is the index of the
+*> column interchanged with column j, and DR(j) is the scaling
+*> factor applied to column j, then
+*> RSCALE(j) = PR(j) for j = 1,...,ILO-1
+*> = DR(j) for j = ILO,...,IHI
+*> = PR(j) for j = IHI+1,...,N
+*> The order in which the interchanges are made is N to IHI+1,
+*> then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] ABNRM
+*> \verbatim
+*> ABNRM is DOUBLE PRECISION
+*> The one-norm of the balanced matrix A.
+*> \endverbatim
+*>
+*> \param[out] BBNRM
+*> \verbatim
+*> BBNRM is DOUBLE PRECISION
+*> The one-norm of the balanced matrix B.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension (N)
+*> If SENSE = 'E' or 'B', the reciprocal condition numbers of
+*> the eigenvalues, stored in consecutive elements of the array.
+*> If SENSE = 'N' or 'V', RCONDE is not referenced.
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension (N)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the eigenvectors, stored in consecutive elements
+*> of the array. If the eigenvalues cannot be reordered to
+*> compute RCONDV(j), RCONDV(j) is set to 0; this can only occur
+*> when the true value would be very small anyway.
+*> If SENSE = 'N' or 'E', RCONDV is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,2*N).
+*> If SENSE = 'E', LWORK >= max(1,4*N).
+*> If SENSE = 'V' or 'B', LWORK >= max(1,2*N*N+2*N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (lrwork)
+*> lrwork must be at least max(1,6*N) if BALANC = 'S' or 'B',
+*> and at least max(1,2*N) otherwise.
+*> Real workspace.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N+2)
+*> If SENSE = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> If SENSE = 'N', BWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1,...,N:
+*> The QZ iteration failed. No eigenvectors have been
+*> calculated, but ALPHA(j) and BETA(j) should be correct
+*> for j=INFO+1,...,N.
+*> > N: =N+1: other than QZ iteration failed in ZHGEQZ.
+*> =N+2: error return from ZTGEVC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Balancing a matrix pair (A,B) includes, first, permuting rows and
+*> columns to isolate eigenvalues, second, applying diagonal similarity
+*> transformation to the rows and columns to make the rows and columns
+*> as close in norm as possible. The computed reciprocal condition
+*> numbers correspond to the balanced matrix. Permuting rows and columns
+*> will not change the condition numbers (in exact arithmetic) but
+*> diagonal scaling will. For further explanation of balancing, see
+*> section 4.11.1.2 of LAPACK Users' Guide.
+*>
+*> An approximate error bound on the chordal distance between the i-th
+*> computed generalized eigenvalue w and the corresponding exact
+*> eigenvalue lambda is
+*>
+*> chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
+*>
+*> An approximate error bound for the angle between the i-th computed
+*> eigenvector VL(i) or VR(i) is given by
+*>
+*> EPS * norm(ABNRM, BBNRM) / DIF(i).
+*>
+*> For further explanation of the reciprocal condition numbers RCONDE
+*> and RCONDV, see section 4.11 of LAPACK User's Guide.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGGEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
$ ALPHA, BETA, VL, LDVL, VR, LDVR, ILO, IHI,
$ LSCALE, RSCALE, ABNRM, BBNRM, RCONDE, RCONDV,
$ WORK, LWORK, RWORK, IWORK, BWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER BALANC, JOBVL, JOBVR, SENSE
@@ -23,230 +390,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGGEVX computes for a pair of N-by-N complex nonsymmetric matrices
-* (A,B) the generalized eigenvalues, and optionally, the left and/or
-* right generalized eigenvectors.
-*
-* Optionally, it also computes a balancing transformation to improve
-* the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
-* LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
-* the eigenvalues (RCONDE), and reciprocal condition numbers for the
-* right eigenvectors (RCONDV).
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar
-* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
-* singular. It is usually represented as the pair (alpha,beta), as
-* there is a reasonable interpretation for beta=0, and even for both
-* being zero.
-*
-* The right eigenvector v(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-* A * v(j) = lambda(j) * B * v(j) .
-* The left eigenvector u(j) corresponding to the eigenvalue lambda(j)
-* of (A,B) satisfies
-* u(j)**H * A = lambda(j) * u(j)**H * B.
-* where u(j)**H is the conjugate-transpose of u(j).
-*
-*
-* Arguments
-* =========
-*
-* BALANC (input) CHARACTER*1
-* Specifies the balance option to be performed:
-* = 'N': do not diagonally scale or permute;
-* = 'P': permute only;
-* = 'S': scale only;
-* = 'B': both permute and scale.
-* Computed reciprocal condition numbers will be for the
-* matrices after permuting and/or balancing. Permuting does
-* not change condition numbers (in exact arithmetic), but
-* balancing does.
-*
-* JOBVL (input) CHARACTER*1
-* = 'N': do not compute the left generalized eigenvectors;
-* = 'V': compute the left generalized eigenvectors.
-*
-* JOBVR (input) CHARACTER*1
-* = 'N': do not compute the right generalized eigenvectors;
-* = 'V': compute the right generalized eigenvectors.
-*
-* SENSE (input) CHARACTER*1
-* Determines which reciprocal condition numbers are computed.
-* = 'N': none are computed;
-* = 'E': computed for eigenvalues only;
-* = 'V': computed for eigenvectors only;
-* = 'B': computed for eigenvalues and eigenvectors.
-*
-* N (input) INTEGER
-* The order of the matrices A, B, VL, and VR. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the matrix A in the pair (A,B).
-* On exit, A has been overwritten. If JOBVL='V' or JOBVR='V'
-* or both, then A contains the first part of the complex Schur
-* form of the "balanced" versions of the input A and B.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the matrix B in the pair (A,B).
-* On exit, B has been overwritten. If JOBVL='V' or JOBVR='V'
-* or both, then B contains the second part of the complex
-* Schur form of the "balanced" versions of the input A and B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX*16 array, dimension (N)
-*
-* BETA (output) COMPLEX*16 array, dimension (N)
-* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the generalized
-* eigenvalues.
-*
-* Note: the quotient ALPHA(j)/BETA(j) ) may easily over- or
-* underflow, and BETA(j) may even be zero. Thus, the user
-* should avoid naively computing the ratio ALPHA/BETA.
-* However, ALPHA will be always less than and usually
-* comparable with norm(A) in magnitude, and BETA always less
-* than and usually comparable with norm(B).
-*
-* VL (output) COMPLEX*16 array, dimension (LDVL,N)
-* If JOBVL = 'V', the left generalized eigenvectors u(j) are
-* stored one after another in the columns of VL, in the same
-* order as their eigenvalues.
-* Each eigenvector will be scaled so the largest component
-* will have abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVL = 'N'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the matrix VL. LDVL >= 1, and
-* if JOBVL = 'V', LDVL >= N.
-*
-* VR (output) COMPLEX*16 array, dimension (LDVR,N)
-* If JOBVR = 'V', the right generalized eigenvectors v(j) are
-* stored one after another in the columns of VR, in the same
-* order as their eigenvalues.
-* Each eigenvector will be scaled so the largest component
-* will have abs(real part) + abs(imag. part) = 1.
-* Not referenced if JOBVR = 'N'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the matrix VR. LDVR >= 1, and
-* if JOBVR = 'V', LDVR >= N.
-*
-* ILO (output) INTEGER
-*
-* IHI (output) INTEGER
-* ILO and IHI are integer values such that on exit
-* A(i,j) = 0 and B(i,j) = 0 if i > j and
-* j = 1,...,ILO-1 or i = IHI+1,...,N.
-* If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
-*
-* LSCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the left side of A and B. If PL(j) is the index of the
-* row interchanged with row j, and DL(j) is the scaling
-* factor applied to row j, then
-* LSCALE(j) = PL(j) for j = 1,...,ILO-1
-* = DL(j) for j = ILO,...,IHI
-* = PL(j) for j = IHI+1,...,N.
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* RSCALE (output) DOUBLE PRECISION array, dimension (N)
-* Details of the permutations and scaling factors applied
-* to the right side of A and B. If PR(j) is the index of the
-* column interchanged with column j, and DR(j) is the scaling
-* factor applied to column j, then
-* RSCALE(j) = PR(j) for j = 1,...,ILO-1
-* = DR(j) for j = ILO,...,IHI
-* = PR(j) for j = IHI+1,...,N
-* The order in which the interchanges are made is N to IHI+1,
-* then 1 to ILO-1.
-*
-* ABNRM (output) DOUBLE PRECISION
-* The one-norm of the balanced matrix A.
-*
-* BBNRM (output) DOUBLE PRECISION
-* The one-norm of the balanced matrix B.
-*
-* RCONDE (output) DOUBLE PRECISION array, dimension (N)
-* If SENSE = 'E' or 'B', the reciprocal condition numbers of
-* the eigenvalues, stored in consecutive elements of the array.
-* If SENSE = 'N' or 'V', RCONDE is not referenced.
-*
-* RCONDV (output) DOUBLE PRECISION array, dimension (N)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the eigenvectors, stored in consecutive elements
-* of the array. If the eigenvalues cannot be reordered to
-* compute RCONDV(j), RCONDV(j) is set to 0; this can only occur
-* when the true value would be very small anyway.
-* If SENSE = 'N' or 'E', RCONDV is not referenced.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,2*N).
-* If SENSE = 'E', LWORK >= max(1,4*N).
-* If SENSE = 'V' or 'B', LWORK >= max(1,2*N*N+2*N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) REAL array, dimension (lrwork)
-* lrwork must be at least max(1,6*N) if BALANC = 'S' or 'B',
-* and at least max(1,2*N) otherwise.
-* Real workspace.
-*
-* IWORK (workspace) INTEGER array, dimension (N+2)
-* If SENSE = 'E', IWORK is not referenced.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-* If SENSE = 'N', BWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1,...,N:
-* The QZ iteration failed. No eigenvectors have been
-* calculated, but ALPHA(j) and BETA(j) should be correct
-* for j=INFO+1,...,N.
-* > N: =N+1: other than QZ iteration failed in ZHGEQZ.
-* =N+2: error return from ZTGEVC.
-*
-* Further Details
-* ===============
-*
-* Balancing a matrix pair (A,B) includes, first, permuting rows and
-* columns to isolate eigenvalues, second, applying diagonal similarity
-* transformation to the rows and columns to make the rows and columns
-* as close in norm as possible. The computed reciprocal condition
-* numbers correspond to the balanced matrix. Permuting rows and columns
-* will not change the condition numbers (in exact arithmetic) but
-* diagonal scaling will. For further explanation of balancing, see
-* section 4.11.1.2 of LAPACK Users' Guide.
-*
-* An approximate error bound on the chordal distance between the i-th
-* computed generalized eigenvalue w and the corresponding exact
-* eigenvalue lambda is
-*
-* chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
-*
-* An approximate error bound for the angle between the i-th computed
-* eigenvector VL(i) or VR(i) is given by
-*
-* EPS * norm(ABNRM, BBNRM) / DIF(i).
-*
-* For further explanation of the reciprocal condition numbers RCONDE
-* and RCONDV, see section 4.11 of LAPACK User's Guide.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zggglm.f b/SRC/zggglm.f
index b7b9d271..cc4749e7 100644
--- a/SRC/zggglm.f
+++ b/SRC/zggglm.f
@@ -1,10 +1,185 @@
+*> \brief <b> ZGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), D( * ), WORK( * ),
+* $ X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGGLM solves a general Gauss-Markov linear model (GLM) problem:
+*>
+*> minimize || y ||_2 subject to d = A*x + B*y
+*> x
+*>
+*> where A is an N-by-M matrix, B is an N-by-P matrix, and d is a
+*> given N-vector. It is assumed that M <= N <= M+P, and
+*>
+*> rank(A) = M and rank( A B ) = N.
+*>
+*> Under these assumptions, the constrained equation is always
+*> consistent, and there is a unique solution x and a minimal 2-norm
+*> solution y, which is obtained using a generalized QR factorization
+*> of the matrices (A, B) given by
+*>
+*> A = Q*(R), B = Q*T*Z.
+*> (0)
+*>
+*> In particular, if matrix B is square nonsingular, then the problem
+*> GLM is equivalent to the following weighted linear least squares
+*> problem
+*>
+*> minimize || inv(B)*(d-A*x) ||_2
+*> x
+*>
+*> where inv(B) denotes the inverse of B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= N-M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,M)
+*> On entry, the N-by-M matrix A.
+*> On exit, the upper triangular part of the array A contains
+*> the M-by-M upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,P)
+*> On entry, the N-by-P matrix B.
+*> On exit, if N <= P, the upper triangle of the subarray
+*> B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
+*> if N > P, the elements on and above the (N-P)th subdiagonal
+*> contain the N-by-P upper trapezoidal matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> On entry, D is the left hand side of the GLM equation.
+*> On exit, D is destroyed.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (M)
+*> \param[out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (P)
+*> On exit, X and Y are the solutions of the GLM problem.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N+M+P).
+*> For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB,
+*> where NB is an upper bound for the optimal blocksizes for
+*> ZGEQRF, ZGERQF, ZUNMQR and ZUNMRQ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the upper triangular factor R associated with A in the
+*> generalized QR factorization of the pair (A, B) is
+*> singular, so that rank(A) < M; the least squares
+*> solution could not be computed.
+*> = 2: the bottom (N-M) by (N-M) part of the upper trapezoidal
+*> factor T associated with B in the generalized QR
+*> factorization of the pair (A, B) is singular, so that
+*> rank( A B ) < N; the least squares solution could not
+*> be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, P
@@ -14,101 +189,6 @@
$ X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGGGLM solves a general Gauss-Markov linear model (GLM) problem:
-*
-* minimize || y ||_2 subject to d = A*x + B*y
-* x
-*
-* where A is an N-by-M matrix, B is an N-by-P matrix, and d is a
-* given N-vector. It is assumed that M <= N <= M+P, and
-*
-* rank(A) = M and rank( A B ) = N.
-*
-* Under these assumptions, the constrained equation is always
-* consistent, and there is a unique solution x and a minimal 2-norm
-* solution y, which is obtained using a generalized QR factorization
-* of the matrices (A, B) given by
-*
-* A = Q*(R), B = Q*T*Z.
-* (0)
-*
-* In particular, if matrix B is square nonsingular, then the problem
-* GLM is equivalent to the following weighted linear least squares
-* problem
-*
-* minimize || inv(B)*(d-A*x) ||_2
-* x
-*
-* where inv(B) denotes the inverse of B.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. 0 <= M <= N.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= N-M.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,M)
-* On entry, the N-by-M matrix A.
-* On exit, the upper triangular part of the array A contains
-* the M-by-M upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,P)
-* On entry, the N-by-P matrix B.
-* On exit, if N <= P, the upper triangle of the subarray
-* B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
-* if N > P, the elements on and above the (N-P)th subdiagonal
-* contain the N-by-P upper trapezoidal matrix T.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* D (input/output) COMPLEX*16 array, dimension (N)
-* On entry, D is the left hand side of the GLM equation.
-* On exit, D is destroyed.
-*
-* X (output) COMPLEX*16 array, dimension (M)
-* Y (output) COMPLEX*16 array, dimension (P)
-* On exit, X and Y are the solutions of the GLM problem.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N+M+P).
-* For optimum performance, LWORK >= M+min(N,P)+max(N,P)*NB,
-* where NB is an upper bound for the optimal blocksizes for
-* ZGEQRF, ZGERQF, ZUNMQR and ZUNMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the upper triangular factor R associated with A in the
-* generalized QR factorization of the pair (A, B) is
-* singular, so that rank(A) < M; the least squares
-* solution could not be computed.
-* = 2: the bottom (N-M) by (N-M) part of the upper trapezoidal
-* factor T associated with B in the generalized QR
-* factorization of the pair (A, B) is singular, so that
-* rank( A B ) < N; the least squares solution could not
-* be computed.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/zgghrd.f b/SRC/zgghrd.f
index a628bc74..67ed2b69 100644
--- a/SRC/zgghrd.f
+++ b/SRC/zgghrd.f
@@ -1,10 +1,205 @@
+*> \brief \b ZGGHRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
+* LDQ, Z, LDZ, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, COMPZ
+* INTEGER IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGHRD reduces a pair of complex matrices (A,B) to generalized upper
+*> Hessenberg form using unitary transformations, where A is a
+*> general matrix and B is upper triangular. The form of the
+*> generalized eigenvalue problem is
+*> A*x = lambda*B*x,
+*> and B is typically made upper triangular by computing its QR
+*> factorization and moving the unitary matrix Q to the left side
+*> of the equation.
+*>
+*> This subroutine simultaneously reduces A to a Hessenberg matrix H:
+*> Q**H*A*Z = H
+*> and transforms B to another upper triangular matrix T:
+*> Q**H*B*Z = T
+*> in order to reduce the problem to its standard form
+*> H*y = lambda*T*y
+*> where y = Z**H*x.
+*>
+*> The unitary matrices Q and Z are determined as products of Givens
+*> rotations. They may either be formed explicitly, or they may be
+*> postmultiplied into input matrices Q1 and Z1, so that
+*> Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H
+*> Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H
+*> If Q1 is the unitary matrix from the QR factorization of B in the
+*> original equation A*x = lambda*B*x, then ZGGHRD reduces the original
+*> problem to generalized Hessenberg form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'N': do not compute Q;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> unitary matrix Q is returned;
+*> = 'V': Q must contain a unitary matrix Q1 on entry,
+*> and the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': do not compute Q;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> unitary matrix Q is returned;
+*> = 'V': Q must contain a unitary matrix Q1 on entry,
+*> and the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI mark the rows and columns of A which are to be
+*> reduced. It is assumed that A is already upper triangular
+*> in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
+*> normally set by a previous call to ZGGBAL; otherwise they
+*> should be set to 1 and N respectively.
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the N-by-N general matrix to be reduced.
+*> On exit, the upper triangle and the first subdiagonal of A
+*> are overwritten with the upper Hessenberg matrix H, and the
+*> rest is set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the N-by-N upper triangular matrix B.
+*> On exit, the upper triangular matrix T = Q**H B Z. The
+*> elements below the diagonal are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ, N)
+*> On entry, if COMPQ = 'V', the unitary matrix Q1, typically
+*> from the QR factorization of B.
+*> On exit, if COMPQ='I', the unitary matrix Q, and if
+*> COMPQ = 'V', the product Q1*Q.
+*> Not referenced if COMPQ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the unitary matrix Z1.
+*> On exit, if COMPZ='I', the unitary matrix Z, and if
+*> COMPZ = 'V', the product Z1*Z.
+*> Not referenced if COMPZ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z.
+*> LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine reduces A to Hessenberg and B to triangular form by
+*> an unblocked reduction, as described in _Matrix_Computations_,
+*> by Golub and van Loan (Johns Hopkins Press).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
$ LDQ, Z, LDZ, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, COMPZ
@@ -15,113 +210,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGGHRD reduces a pair of complex matrices (A,B) to generalized upper
-* Hessenberg form using unitary transformations, where A is a
-* general matrix and B is upper triangular. The form of the
-* generalized eigenvalue problem is
-* A*x = lambda*B*x,
-* and B is typically made upper triangular by computing its QR
-* factorization and moving the unitary matrix Q to the left side
-* of the equation.
-*
-* This subroutine simultaneously reduces A to a Hessenberg matrix H:
-* Q**H*A*Z = H
-* and transforms B to another upper triangular matrix T:
-* Q**H*B*Z = T
-* in order to reduce the problem to its standard form
-* H*y = lambda*T*y
-* where y = Z**H*x.
-*
-* The unitary matrices Q and Z are determined as products of Givens
-* rotations. They may either be formed explicitly, or they may be
-* postmultiplied into input matrices Q1 and Z1, so that
-* Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H
-* Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H
-* If Q1 is the unitary matrix from the QR factorization of B in the
-* original equation A*x = lambda*B*x, then ZGGHRD reduces the original
-* problem to generalized Hessenberg form.
-*
-* Arguments
-* =========
-*
-* COMPQ (input) CHARACTER*1
-* = 'N': do not compute Q;
-* = 'I': Q is initialized to the unit matrix, and the
-* unitary matrix Q is returned;
-* = 'V': Q must contain a unitary matrix Q1 on entry,
-* and the product Q1*Q is returned.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': do not compute Q;
-* = 'I': Q is initialized to the unit matrix, and the
-* unitary matrix Q is returned;
-* = 'V': Q must contain a unitary matrix Q1 on entry,
-* and the product Q1*Q is returned.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI mark the rows and columns of A which are to be
-* reduced. It is assumed that A is already upper triangular
-* in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
-* normally set by a previous call to ZGGBAL; otherwise they
-* should be set to 1 and N respectively.
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the N-by-N general matrix to be reduced.
-* On exit, the upper triangle and the first subdiagonal of A
-* are overwritten with the upper Hessenberg matrix H, and the
-* rest is set to zero.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the N-by-N upper triangular matrix B.
-* On exit, the upper triangular matrix T = Q**H B Z. The
-* elements below the diagonal are set to zero.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ, N)
-* On entry, if COMPQ = 'V', the unitary matrix Q1, typically
-* from the QR factorization of B.
-* On exit, if COMPQ='I', the unitary matrix Q, and if
-* COMPQ = 'V', the product Q1*Q.
-* Not referenced if COMPQ='N'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the unitary matrix Z1.
-* On exit, if COMPZ='I', the unitary matrix Z, and if
-* COMPZ = 'V', the product Z1*Z.
-* Not referenced if COMPZ='N'.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z.
-* LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* This routine reduces A to Hessenberg and B to triangular form by
-* an unblocked reduction, as described in _Matrix_Computations_,
-* by Golub and van Loan (Johns Hopkins Press).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgglse.f b/SRC/zgglse.f
index e1dbbb3b..a95e4656 100644
--- a/SRC/zgglse.f
+++ b/SRC/zgglse.f
@@ -1,10 +1,182 @@
+*> \brief <b> ZGGLSE solves overdetermined or underdetermined systems for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), C( * ), D( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGLSE solves the linear equality-constrained least squares (LSE)
+*> problem:
+*>
+*> minimize || c - A*x ||_2 subject to B*x = d
+*>
+*> where A is an M-by-N matrix, B is a P-by-N matrix, c is a given
+*> M-vector, and d is a given P-vector. It is assumed that
+*> P <= N <= M+P, and
+*>
+*> rank(B) = P and rank( (A) ) = N.
+*> ( (B) )
+*>
+*> These conditions ensure that the LSE problem has a unique solution,
+*> which is obtained using a generalized RQ factorization of the
+*> matrices (B, A) given by
+*>
+*> B = (0 R)*Q, A = Z*T*Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. 0 <= P <= N <= M+P.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(M,N)-by-N upper trapezoidal matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, the upper triangle of the subarray B(1:P,N-P+1:N)
+*> contains the P-by-P upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (M)
+*> On entry, C contains the right hand side vector for the
+*> least squares part of the LSE problem.
+*> On exit, the residual sum of squares for the solution
+*> is given by the sum of squares of elements N-P+1 to M of
+*> vector C.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (P)
+*> On entry, D contains the right hand side vector for the
+*> constrained equation.
+*> On exit, D is destroyed.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> On exit, X is the solution of the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M+N+P).
+*> For optimum performance LWORK >= P+min(M,N)+max(M,N)*NB,
+*> where NB is an upper bound for the optimal blocksizes for
+*> ZGEQRF, CGERQF, ZUNMQR and CUNMRQ.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the upper triangular factor R associated with B in the
+*> generalized RQ factorization of the pair (B, A) is
+*> singular, so that rank(B) < P; the least squares
+*> solution could not be computed.
+*> = 2: the (N-P) by (N-P) part of the upper trapezoidal factor
+*> T associated with A in the generalized RQ factorization
+*> of the pair (B, A) is singular, so that
+*> rank( (A) ) < N; the least squares solution could not
+*> ( (B) )
+*> be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERsolve
+*
+* =====================================================================
SUBROUTINE ZGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LWORK, M, N, P
@@ -14,98 +186,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGGLSE solves the linear equality-constrained least squares (LSE)
-* problem:
-*
-* minimize || c - A*x ||_2 subject to B*x = d
-*
-* where A is an M-by-N matrix, B is a P-by-N matrix, c is a given
-* M-vector, and d is a given P-vector. It is assumed that
-* P <= N <= M+P, and
-*
-* rank(B) = P and rank( (A) ) = N.
-* ( (B) )
-*
-* These conditions ensure that the LSE problem has a unique solution,
-* which is obtained using a generalized RQ factorization of the
-* matrices (B, A) given by
-*
-* B = (0 R)*Q, A = Z*T*Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. 0 <= P <= N <= M+P.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(M,N)-by-N upper trapezoidal matrix T.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, the upper triangle of the subarray B(1:P,N-P+1:N)
-* contains the P-by-P upper triangular matrix R.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* C (input/output) COMPLEX*16 array, dimension (M)
-* On entry, C contains the right hand side vector for the
-* least squares part of the LSE problem.
-* On exit, the residual sum of squares for the solution
-* is given by the sum of squares of elements N-P+1 to M of
-* vector C.
-*
-* D (input/output) COMPLEX*16 array, dimension (P)
-* On entry, D contains the right hand side vector for the
-* constrained equation.
-* On exit, D is destroyed.
-*
-* X (output) COMPLEX*16 array, dimension (N)
-* On exit, X is the solution of the LSE problem.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M+N+P).
-* For optimum performance LWORK >= P+min(M,N)+max(M,N)*NB,
-* where NB is an upper bound for the optimal blocksizes for
-* ZGEQRF, CGERQF, ZUNMQR and CUNMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the upper triangular factor R associated with B in the
-* generalized RQ factorization of the pair (B, A) is
-* singular, so that rank(B) < P; the least squares
-* solution could not be computed.
-* = 2: the (N-P) by (N-P) part of the upper trapezoidal factor
-* T associated with A in the generalized RQ factorization
-* of the pair (B, A) is singular, so that
-* rank( (A) ) < N; the least squares solution could not
-* ( (B) )
-* be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zggqrf.f b/SRC/zggqrf.f
index 1e809b86..1032b2a4 100644
--- a/SRC/zggqrf.f
+++ b/SRC/zggqrf.f
@@ -1,145 +1,203 @@
- SUBROUTINE ZGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
- $ LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b ZGGQRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGGQRF computes a generalized QR factorization of an N-by-M matrix A
-* and an N-by-P matrix B:
-*
-* A = Q*R, B = Q*T*Z,
-*
-* where Q is an N-by-N unitary matrix, Z is a P-by-P unitary matrix,
-* and R and T assume one of the forms:
-*
-* if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N,
-* ( 0 ) N-M N M-N
-* M
-*
-* where R11 is upper triangular, and
-*
-* if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P,
-* P-N N ( T21 ) P
-* P
-*
-* where T12 or T21 is upper triangular.
-*
-* In particular, if B is square and nonsingular, the GQR factorization
-* of A and B implicitly gives the QR factorization of inv(B)*A:
-*
-* inv(B)*A = Z**H * (inv(T)*R)
-*
-* where inv(B) denotes the inverse of the matrix B, and Z**H denotes the
-* conjugate transpose of matrix Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGQRF computes a generalized QR factorization of an N-by-M matrix A
+*> and an N-by-P matrix B:
+*>
+*> A = Q*R, B = Q*T*Z,
+*>
+*> where Q is an N-by-N unitary matrix, Z is a P-by-P unitary matrix,
+*> and R and T assume one of the forms:
+*>
+*> if N >= M, R = ( R11 ) M , or if N < M, R = ( R11 R12 ) N,
+*> ( 0 ) N-M N M-N
+*> M
+*>
+*> where R11 is upper triangular, and
+*>
+*> if N <= P, T = ( 0 T12 ) N, or if N > P, T = ( T11 ) N-P,
+*> P-N N ( T21 ) P
+*> P
+*>
+*> where T12 or T21 is upper triangular.
+*>
+*> In particular, if B is square and nonsingular, the GQR factorization
+*> of A and B implicitly gives the QR factorization of inv(B)*A:
+*>
+*> inv(B)*A = Z**H * (inv(T)*R)
+*>
+*> where inv(B) denotes the inverse of the matrix B, and Z**H denotes the
+*> conjugate transpose of matrix Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,M)
+*> On entry, the N-by-M matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(N,M)-by-M upper trapezoidal matrix R (R is
+*> upper triangular if N >= M); the elements below the diagonal,
+*> with the array TAUA, represent the unitary matrix Q as a
+*> product of min(N,M) elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,M)
-* On entry, the N-by-M matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(N,M)-by-M upper trapezoidal matrix R (R is
-* upper triangular if N >= M); the elements below the diagonal,
-* with the array TAUA, represent the unitary matrix Q as a
-* product of min(N,M) elementary reflectors (see Further
-* Details).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* TAUA (output) COMPLEX*16 array, dimension (min(N,M))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q (see Further Details).
+*> \ingroup complex16OTHERcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,P)
-* On entry, the N-by-P matrix B.
-* On exit, if N <= P, the upper triangle of the subarray
-* B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
-* if N > P, the elements on and above the (N-P)-th subdiagonal
-* contain the N-by-P upper trapezoidal matrix T; the remaining
-* elements, with the array TAUB, represent the unitary
-* matrix Z as a product of elementary reflectors (see Further
-* Details).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* TAUB (output) COMPLEX*16 array, dimension (min(N,P))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Z (see Further Details).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N,M,P).
-* For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
-* where NB1 is the optimal blocksize for the QR factorization
-* of an N-by-M matrix, NB2 is the optimal blocksize for the
-* RQ factorization of an N-by-P matrix, and NB3 is the optimal
-* blocksize for a call of ZUNMQR.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* represent the unitary matrix Q (see Further Details).
+*>
+*> B (input/output) COMPLEX*16 array, dimension (LDB,P)
+*> On entry, the N-by-P matrix B.
+*> On exit, if N <= P, the upper triangle of the subarray
+*> B(1:N,P-N+1:P) contains the N-by-N upper triangular matrix T;
+*> if N > P, the elements on and above the (N-P)-th subdiagonal
+*> contain the N-by-P upper trapezoidal matrix T; the remaining
+*> elements, with the array TAUB, represent the unitary
+*> matrix Z as a product of elementary reflectors (see Further
+*> Details).
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*>
+*> TAUB (output) COMPLEX*16 array, dimension (min(N,P))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Z (see Further Details).
+*>
+*> WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N,M,P).
+*> For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
+*> where NB1 is the optimal blocksize for the QR factorization
+*> of an N-by-M matrix, NB2 is the optimal blocksize for the
+*> RQ factorization of an N-by-P matrix, and NB3 is the optimal
+*> blocksize for a call of ZUNMQR.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(n,m).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taua * v * v**H
+*>
+*> where taua is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*> and taua in TAUA(i).
+*> To form Q explicitly, use LAPACK subroutine ZUNGQR.
+*> To use Q to update another matrix, use LAPACK subroutine ZUNMQR.
+*>
+*> The matrix Z is represented as a product of elementary reflectors
+*>
+*> Z = H(1) H(2) . . . H(k), where k = min(n,p).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taub * v * v**H
+*>
+*> where taub is a complex scalar, and v is a complex vector with
+*> v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
+*> B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
+*> To form Z explicitly, use LAPACK subroutine ZUNGRQ.
+*> To use Z to update another matrix, use LAPACK subroutine ZUNMRQ.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
+ $ LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(n,m).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taua * v * v**H
-*
-* where taua is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-* and taua in TAUA(i).
-* To form Q explicitly, use LAPACK subroutine ZUNGQR.
-* To use Q to update another matrix, use LAPACK subroutine ZUNMQR.
-*
-* The matrix Z is represented as a product of elementary reflectors
-*
-* Z = H(1) H(2) . . . H(k), where k = min(n,p).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taub * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where taub is a complex scalar, and v is a complex vector with
-* v(p-k+i+1:p) = 0 and v(p-k+i) = 1; v(1:p-k+i-1) is stored on exit in
-* B(n-k+i,1:p-k+i-1), and taub in TAUB(i).
-* To form Z explicitly, use LAPACK subroutine ZUNGRQ.
-* To use Z to update another matrix, use LAPACK subroutine ZUNMRQ.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zggrqf.f b/SRC/zggrqf.f
index afbc7afd..8b5e9e5e 100644
--- a/SRC/zggrqf.f
+++ b/SRC/zggrqf.f
@@ -1,144 +1,202 @@
- SUBROUTINE ZGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
- $ LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b ZGGRQF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGGRQF computes a generalized RQ factorization of an M-by-N matrix A
-* and a P-by-N matrix B:
-*
-* A = R*Q, B = Z*T*Q,
-*
-* where Q is an N-by-N unitary matrix, Z is a P-by-P unitary
-* matrix, and R and T assume one of the forms:
-*
-* if M <= N, R = ( 0 R12 ) M, or if M > N, R = ( R11 ) M-N,
-* N-M M ( R21 ) N
-* N
-*
-* where R12 or R21 is upper triangular, and
-*
-* if P >= N, T = ( T11 ) N , or if P < N, T = ( T11 T12 ) P,
-* ( 0 ) P-N P N-P
-* N
-*
-* where T11 is upper triangular.
-*
-* In particular, if B is square and nonsingular, the GRQ factorization
-* of A and B implicitly gives the RQ factorization of A*inv(B):
-*
-* A*inv(B) = (R*inv(T))*Z**H
-*
-* where inv(B) denotes the inverse of the matrix B, and Z**H denotes the
-* conjugate transpose of the matrix Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGRQF computes a generalized RQ factorization of an M-by-N matrix A
+*> and a P-by-N matrix B:
+*>
+*> A = R*Q, B = Z*T*Q,
+*>
+*> where Q is an N-by-N unitary matrix, Z is a P-by-P unitary
+*> matrix, and R and T assume one of the forms:
+*>
+*> if M <= N, R = ( 0 R12 ) M, or if M > N, R = ( R11 ) M-N,
+*> N-M M ( R21 ) N
+*> N
+*>
+*> where R12 or R21 is upper triangular, and
+*>
+*> if P >= N, T = ( T11 ) N , or if P < N, T = ( T11 T12 ) P,
+*> ( 0 ) P-N P N-P
+*> N
+*>
+*> where T11 is upper triangular.
+*>
+*> In particular, if B is square and nonsingular, the GRQ factorization
+*> of A and B implicitly gives the RQ factorization of A*inv(B):
+*>
+*> A*inv(B) = (R*inv(T))*Z**H
+*>
+*> where inv(B) denotes the inverse of the matrix B, and Z**H denotes the
+*> conjugate transpose of the matrix Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, if M <= N, the upper triangle of the subarray
+*> A(1:M,N-M+1:N) contains the M-by-M upper triangular matrix R;
+*> if M > N, the elements on and above the (M-N)-th subdiagonal
+*> contain the M-by-N upper trapezoidal matrix R; the remaining
+*> elements, with the array TAUA, represent the unitary
+*> matrix Q as a product of elementary reflectors (see Further
+*> Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, if M <= N, the upper triangle of the subarray
-* A(1:M,N-M+1:N) contains the M-by-M upper triangular matrix R;
-* if M > N, the elements on and above the (M-N)-th subdiagonal
-* contain the M-by-N upper trapezoidal matrix R; the remaining
-* elements, with the array TAUA, represent the unitary
-* matrix Q as a product of elementary reflectors (see Further
-* Details).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAUA (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q (see Further Details).
+*> \ingroup complex16OTHERcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, the elements on and above the diagonal of the array
-* contain the min(P,N)-by-N upper trapezoidal matrix T (T is
-* upper triangular if P >= N); the elements below the diagonal,
-* with the array TAUB, represent the unitary matrix Z as a
-* product of elementary reflectors (see Further Details).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TAUB (output) COMPLEX*16 array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Z (see Further Details).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N,M,P).
-* For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
-* where NB1 is the optimal blocksize for the RQ factorization
-* of an M-by-N matrix, NB2 is the optimal blocksize for the
-* QR factorization of a P-by-N matrix, and NB3 is the optimal
-* blocksize for a call of ZUNMRQ.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO=-i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* represent the unitary matrix Q (see Further Details).
+*>
+*> B (input/output) COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the min(P,N)-by-N upper trapezoidal matrix T (T is
+*> upper triangular if P >= N); the elements below the diagonal,
+*> with the array TAUB, represent the unitary matrix Z as a
+*> product of elementary reflectors (see Further Details).
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*>
+*> TAUB (output) COMPLEX*16 array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Z (see Further Details).
+*>
+*> WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N,M,P).
+*> For optimum performance LWORK >= max(N,M,P)*max(NB1,NB2,NB3),
+*> where NB1 is the optimal blocksize for the RQ factorization
+*> of an M-by-N matrix, NB2 is the optimal blocksize for the
+*> QR factorization of a P-by-N matrix, and NB3 is the optimal
+*> blocksize for a call of ZUNMRQ.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO=-i, the i-th argument had an illegal value.
+*>
+*>
+*> The matrix Q is represented as a product of elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taua * v * v**H
+*>
+*> where taua is a complex scalar, and v is a complex vector with
+*> v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
+*> A(m-k+i,1:n-k+i-1), and taua in TAUA(i).
+*> To form Q explicitly, use LAPACK subroutine ZUNGRQ.
+*> To use Q to update another matrix, use LAPACK subroutine ZUNMRQ.
+*>
+*> The matrix Z is represented as a product of elementary reflectors
+*>
+*> Z = H(1) H(2) . . . H(k), where k = min(p,n).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - taub * v * v**H
+*>
+*> where taub is a complex scalar, and v is a complex vector with
+*> v(1:i-1) = 0 and v(i) = 1; v(i+1:p) is stored on exit in B(i+1:p,i),
+*> and taub in TAUB(i).
+*> To form Z explicitly, use LAPACK subroutine ZUNGQR.
+*> To use Z to update another matrix, use LAPACK subroutine ZUNMQR.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
+ $ LWORK, INFO )
*
-* The matrix Q is represented as a product of elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taua * v * v**H
-*
-* where taua is a complex scalar, and v is a complex vector with
-* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
-* A(m-k+i,1:n-k+i-1), and taua in TAUA(i).
-* To form Q explicitly, use LAPACK subroutine ZUNGRQ.
-* To use Q to update another matrix, use LAPACK subroutine ZUNMRQ.
-*
-* The matrix Z is represented as a product of elementary reflectors
-*
-* Z = H(1) H(2) . . . H(k), where k = min(p,n).
-*
-* Each H(i) has the form
-*
-* H(i) = I - taub * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where taub is a complex scalar, and v is a complex vector with
-* v(1:i-1) = 0 and v(i) = 1; v(i+1:p) is stored on exit in B(i+1:p,i),
-* and taub in TAUB(i).
-* To form Z explicitly, use LAPACK subroutine ZUNGQR.
-* To use Z to update another matrix, use LAPACK subroutine ZUNMQR.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zggsvd.f b/SRC/zggsvd.f
index 2598c509..9ba75930 100644
--- a/SRC/zggsvd.f
+++ b/SRC/zggsvd.f
@@ -1,11 +1,338 @@
+*> \brief <b> ZGGSVD computes the singular value decomposition (SVD) for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
+* LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
+* RWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION ALPHA( * ), BETA( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGSVD computes the generalized singular value decomposition (GSVD)
+*> of an M-by-N complex matrix A and P-by-N complex matrix B:
+*>
+*> U**H*A*Q = D1*( 0 R ), V**H*B*Q = D2*( 0 R )
+*>
+*> where U, V and Q are unitary matrices.
+*> Let K+L = the effective numerical rank of the
+*> matrix (A**H,B**H)**H, then R is a (K+L)-by-(K+L) nonsingular upper
+*> triangular matrix, D1 and D2 are M-by-(K+L) and P-by-(K+L) "diagonal"
+*> matrices and of the following structures, respectively:
+*>
+*> If M-K-L >= 0,
+*>
+*> K L
+*> D1 = K ( I 0 )
+*> L ( 0 C )
+*> M-K-L ( 0 0 )
+*>
+*> K L
+*> D2 = L ( 0 S )
+*> P-L ( 0 0 )
+*>
+*> N-K-L K L
+*> ( 0 R ) = K ( 0 R11 R12 )
+*> L ( 0 0 R22 )
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
+*> S = diag( BETA(K+1), ... , BETA(K+L) ),
+*> C**2 + S**2 = I.
+*>
+*> R is stored in A(1:K+L,N-K-L+1:N) on exit.
+*>
+*> If M-K-L < 0,
+*>
+*> K M-K K+L-M
+*> D1 = K ( I 0 0 )
+*> M-K ( 0 C 0 )
+*>
+*> K M-K K+L-M
+*> D2 = M-K ( 0 S 0 )
+*> K+L-M ( 0 0 I )
+*> P-L ( 0 0 0 )
+*>
+*> N-K-L K M-K K+L-M
+*> ( 0 R ) = K ( 0 R11 R12 R13 )
+*> M-K ( 0 0 R22 R23 )
+*> K+L-M ( 0 0 0 R33 )
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(M) ),
+*> S = diag( BETA(K+1), ... , BETA(M) ),
+*> C**2 + S**2 = I.
+*>
+*> (R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N), and R33 is stored
+*> ( 0 R22 R23 )
+*> in B(M-K+1:L,N+M-K-L+1:N) on exit.
+*>
+*> The routine computes C, S, R, and optionally the unitary
+*> transformation matrices U, V and Q.
+*>
+*> In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
+*> A and B implicitly gives the SVD of A*inv(B):
+*> A*inv(B) = U*(D1*inv(D2))*V**H.
+*> If ( A**H,B**H)**H has orthnormal columns, then the GSVD of A and B is also
+*> equal to the CS decomposition of A and B. Furthermore, the GSVD can
+*> be used to derive the solution of the eigenvalue problem:
+*> A**H*A x = lambda* B**H*B x.
+*> In some literature, the GSVD of A and B is presented in the form
+*> U**H*A*X = ( 0 D1 ), V**H*B*X = ( 0 D2 )
+*> where U and V are orthogonal and X is nonsingular, and D1 and D2 are
+*> ``diagonal''. The former GSVD form can be converted to the latter
+*> form by taking the nonsingular matrix X as
+*>
+*> X = Q*( I 0 )
+*> ( 0 inv(R) )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': Unitary matrix U is computed;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': Unitary matrix V is computed;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Unitary matrix Q is computed;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> \param[out] L
+*> \verbatim
+*> L is INTEGER
+*> On exit, K and L specify the dimension of the subblocks
+*> described in Purpose.
+*> K + L = effective numerical rank of (A**H,B**H)**H.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A contains the triangular matrix R, or part of R.
+*> See Purpose for details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, B contains part of the triangular matrix R if
+*> M-K-L < 0. See Purpose for details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION array, dimension (N)
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> On exit, ALPHA and BETA contain the generalized singular
+*> value pairs of A and B;
+*> ALPHA(1:K) = 1,
+*> BETA(1:K) = 0,
+*> and if M-K-L >= 0,
+*> ALPHA(K+1:K+L) = C,
+*> BETA(K+1:K+L) = S,
+*> or if M-K-L < 0,
+*> ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
+*> BETA(K+1:M) = S, BETA(M+1:K+L) = 1
+*> and
+*> ALPHA(K+L+1:N) = 0
+*> BETA(K+L+1:N) = 0
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,M)
+*> If JOBU = 'U', U contains the M-by-M unitary matrix U.
+*> If JOBU = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,P)
+*> If JOBV = 'V', V contains the P-by-P unitary matrix V.
+*> If JOBV = 'N', V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> If JOBQ = 'Q', Q contains the N-by-N unitary matrix Q.
+*> If JOBQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (max(3*N,M,P)+N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> On exit, IWORK stores the sorting information. More
+*> precisely, the following loop will sort ALPHA
+*> for I = K+1, min(M,K+L)
+*> swap ALPHA(I) and ALPHA(IWORK(I))
+*> endfor
+*> such that ALPHA(1) >= ALPHA(2) >= ... >= ALPHA(N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, the Jacobi-type procedure failed to
+*> converge. For further details, see subroutine ZTGSJA.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> TOLA DOUBLE PRECISION
+*> TOLB DOUBLE PRECISION
+*> TOLA and TOLB are the thresholds to determine the effective
+*> rank of (A**H,B**H)**H. Generally, they are set to
+*> TOLA = MAX(M,N)*norm(A)*MAZHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MAZHEPS.
+*> The size of TOLA and TOLB may affect the size of backward
+*> errors of the decomposition.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERsing
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 2-96 Based on modifications by
+*> Ming Gu and Huan Ren, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
$ LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
$ RWORK, IWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK sing routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -18,210 +345,6 @@
$ U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGGSVD computes the generalized singular value decomposition (GSVD)
-* of an M-by-N complex matrix A and P-by-N complex matrix B:
-*
-* U**H*A*Q = D1*( 0 R ), V**H*B*Q = D2*( 0 R )
-*
-* where U, V and Q are unitary matrices.
-* Let K+L = the effective numerical rank of the
-* matrix (A**H,B**H)**H, then R is a (K+L)-by-(K+L) nonsingular upper
-* triangular matrix, D1 and D2 are M-by-(K+L) and P-by-(K+L) "diagonal"
-* matrices and of the following structures, respectively:
-*
-* If M-K-L >= 0,
-*
-* K L
-* D1 = K ( I 0 )
-* L ( 0 C )
-* M-K-L ( 0 0 )
-*
-* K L
-* D2 = L ( 0 S )
-* P-L ( 0 0 )
-*
-* N-K-L K L
-* ( 0 R ) = K ( 0 R11 R12 )
-* L ( 0 0 R22 )
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
-* S = diag( BETA(K+1), ... , BETA(K+L) ),
-* C**2 + S**2 = I.
-*
-* R is stored in A(1:K+L,N-K-L+1:N) on exit.
-*
-* If M-K-L < 0,
-*
-* K M-K K+L-M
-* D1 = K ( I 0 0 )
-* M-K ( 0 C 0 )
-*
-* K M-K K+L-M
-* D2 = M-K ( 0 S 0 )
-* K+L-M ( 0 0 I )
-* P-L ( 0 0 0 )
-*
-* N-K-L K M-K K+L-M
-* ( 0 R ) = K ( 0 R11 R12 R13 )
-* M-K ( 0 0 R22 R23 )
-* K+L-M ( 0 0 0 R33 )
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(M) ),
-* S = diag( BETA(K+1), ... , BETA(M) ),
-* C**2 + S**2 = I.
-*
-* (R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N), and R33 is stored
-* ( 0 R22 R23 )
-* in B(M-K+1:L,N+M-K-L+1:N) on exit.
-*
-* The routine computes C, S, R, and optionally the unitary
-* transformation matrices U, V and Q.
-*
-* In particular, if B is an N-by-N nonsingular matrix, then the GSVD of
-* A and B implicitly gives the SVD of A*inv(B):
-* A*inv(B) = U*(D1*inv(D2))*V**H.
-* If ( A**H,B**H)**H has orthnormal columns, then the GSVD of A and B is also
-* equal to the CS decomposition of A and B. Furthermore, the GSVD can
-* be used to derive the solution of the eigenvalue problem:
-* A**H*A x = lambda* B**H*B x.
-* In some literature, the GSVD of A and B is presented in the form
-* U**H*A*X = ( 0 D1 ), V**H*B*X = ( 0 D2 )
-* where U and V are orthogonal and X is nonsingular, and D1 and D2 are
-* ``diagonal''. The former GSVD form can be converted to the latter
-* form by taking the nonsingular matrix X as
-*
-* X = Q*( I 0 )
-* ( 0 inv(R) )
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': Unitary matrix U is computed;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': Unitary matrix V is computed;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Unitary matrix Q is computed;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* K (output) INTEGER
-* L (output) INTEGER
-* On exit, K and L specify the dimension of the subblocks
-* described in Purpose.
-* K + L = effective numerical rank of (A**H,B**H)**H.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A contains the triangular matrix R, or part of R.
-* See Purpose for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, B contains part of the triangular matrix R if
-* M-K-L < 0. See Purpose for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* ALPHA (output) DOUBLE PRECISION array, dimension (N)
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, ALPHA and BETA contain the generalized singular
-* value pairs of A and B;
-* ALPHA(1:K) = 1,
-* BETA(1:K) = 0,
-* and if M-K-L >= 0,
-* ALPHA(K+1:K+L) = C,
-* BETA(K+1:K+L) = S,
-* or if M-K-L < 0,
-* ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
-* BETA(K+1:M) = S, BETA(M+1:K+L) = 1
-* and
-* ALPHA(K+L+1:N) = 0
-* BETA(K+L+1:N) = 0
-*
-* U (output) COMPLEX*16 array, dimension (LDU,M)
-* If JOBU = 'U', U contains the M-by-M unitary matrix U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (output) COMPLEX*16 array, dimension (LDV,P)
-* If JOBV = 'V', V contains the P-by-P unitary matrix V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (output) COMPLEX*16 array, dimension (LDQ,N)
-* If JOBQ = 'Q', Q contains the N-by-N unitary matrix Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (max(3*N,M,P)+N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* IWORK (workspace/output) INTEGER array, dimension (N)
-* On exit, IWORK stores the sorting information. More
-* precisely, the following loop will sort ALPHA
-* for I = K+1, min(M,K+L)
-* swap ALPHA(I) and ALPHA(IWORK(I))
-* endfor
-* such that ALPHA(1) >= ALPHA(2) >= ... >= ALPHA(N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, the Jacobi-type procedure failed to
-* converge. For further details, see subroutine ZTGSJA.
-*
-* Internal Parameters
-* ===================
-*
-* TOLA DOUBLE PRECISION
-* TOLB DOUBLE PRECISION
-* TOLA and TOLB are the thresholds to determine the effective
-* rank of (A**H,B**H)**H. Generally, they are set to
-* TOLA = MAX(M,N)*norm(A)*MAZHEPS,
-* TOLB = MAX(P,N)*norm(B)*MAZHEPS.
-* The size of TOLA and TOLB may affect the size of backward
-* errors of the decomposition.
-*
-* Further Details
-* ===============
-*
-* 2-96 Based on modifications by
-* Ming Gu and Huan Ren, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zggsvp.f b/SRC/zggsvp.f
index 4dcd868f..e6fdb891 100644
--- a/SRC/zggsvp.f
+++ b/SRC/zggsvp.f
@@ -1,11 +1,262 @@
+*> \brief \b ZGGSVP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
+* TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
+* IWORK, RWORK, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
+* DOUBLE PRECISION TOLA, TOLB
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGGSVP computes unitary matrices U, V and Q such that
+*>
+*> N-K-L K L
+*> U**H*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;
+*> L ( 0 0 A23 )
+*> M-K-L ( 0 0 0 )
+*>
+*> N-K-L K L
+*> = K ( 0 A12 A13 ) if M-K-L < 0;
+*> M-K ( 0 0 A23 )
+*>
+*> N-K-L K L
+*> V**H*B*Q = L ( 0 0 B13 )
+*> P-L ( 0 0 0 )
+*>
+*> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
+*> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
+*> otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective
+*> numerical rank of the (M+P)-by-N matrix (A**H,B**H)**H.
+*>
+*> This decomposition is the preprocessing step for computing the
+*> Generalized Singular Value Decomposition (GSVD), see subroutine
+*> ZGGSVD.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': Unitary matrix U is computed;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': Unitary matrix V is computed;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Unitary matrix Q is computed;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A contains the triangular (or trapezoidal) matrix
+*> described in the Purpose section.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, B contains the triangular matrix described in
+*> the Purpose section.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[in] TOLA
+*> \verbatim
+*> TOLA is DOUBLE PRECISION
+*> \param[in] TOLB
+*> \verbatim
+*> TOLB is DOUBLE PRECISION
+*> TOLA and TOLB are the thresholds to determine the effective
+*> numerical rank of matrix B and a subblock of A. Generally,
+*> they are set to
+*> TOLA = MAX(M,N)*norm(A)*MAZHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MAZHEPS.
+*> The size of TOLA and TOLB may affect the size of backward
+*> errors of the decomposition.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> \param[out] L
+*> \verbatim
+*> L is INTEGER
+*> On exit, K and L specify the dimension of the subblocks
+*> described in Purpose section.
+*> K + L = effective numerical rank of (A**H,B**H)**H.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,M)
+*> If JOBU = 'U', U contains the unitary matrix U.
+*> If JOBU = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,P)
+*> If JOBV = 'V', V contains the unitary matrix V.
+*> If JOBV = 'N', V is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> If JOBQ = 'Q', Q contains the unitary matrix Q.
+*> If JOBQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (max(3*N,M,P))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The subroutine uses LAPACK subroutine ZGEQPF for the QR factorization
+*> with column pivoting to detect the effective numerical rank of the
+*> a matrix. It may be replaced by a better rank determination strategy.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
$ TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
$ IWORK, RWORK, TAU, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -19,132 +270,6 @@
$ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGGSVP computes unitary matrices U, V and Q such that
-*
-* N-K-L K L
-* U**H*A*Q = K ( 0 A12 A13 ) if M-K-L >= 0;
-* L ( 0 0 A23 )
-* M-K-L ( 0 0 0 )
-*
-* N-K-L K L
-* = K ( 0 A12 A13 ) if M-K-L < 0;
-* M-K ( 0 0 A23 )
-*
-* N-K-L K L
-* V**H*B*Q = L ( 0 0 B13 )
-* P-L ( 0 0 0 )
-*
-* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
-* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
-* otherwise A23 is (M-K)-by-L upper trapezoidal. K+L = the effective
-* numerical rank of the (M+P)-by-N matrix (A**H,B**H)**H.
-*
-* This decomposition is the preprocessing step for computing the
-* Generalized Singular Value Decomposition (GSVD), see subroutine
-* ZGGSVD.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': Unitary matrix U is computed;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': Unitary matrix V is computed;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Unitary matrix Q is computed;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A contains the triangular (or trapezoidal) matrix
-* described in the Purpose section.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, B contains the triangular matrix described in
-* the Purpose section.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TOLA (input) DOUBLE PRECISION
-* TOLB (input) DOUBLE PRECISION
-* TOLA and TOLB are the thresholds to determine the effective
-* numerical rank of matrix B and a subblock of A. Generally,
-* they are set to
-* TOLA = MAX(M,N)*norm(A)*MAZHEPS,
-* TOLB = MAX(P,N)*norm(B)*MAZHEPS.
-* The size of TOLA and TOLB may affect the size of backward
-* errors of the decomposition.
-*
-* K (output) INTEGER
-* L (output) INTEGER
-* On exit, K and L specify the dimension of the subblocks
-* described in Purpose section.
-* K + L = effective numerical rank of (A**H,B**H)**H.
-*
-* U (output) COMPLEX*16 array, dimension (LDU,M)
-* If JOBU = 'U', U contains the unitary matrix U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (output) COMPLEX*16 array, dimension (LDV,P)
-* If JOBV = 'V', V contains the unitary matrix V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (output) COMPLEX*16 array, dimension (LDQ,N)
-* If JOBQ = 'Q', Q contains the unitary matrix Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* TAU (workspace) COMPLEX*16 array, dimension (N)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (max(3*N,M,P))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* The subroutine uses LAPACK subroutine ZGEQPF for the QR factorization
-* with column pivoting to detect the effective numerical rank of the
-* a matrix. It may be replaced by a better rank determination strategy.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgtcon.f b/SRC/zgtcon.f
index ff7e035f..e56be70b 100644
--- a/SRC/zgtcon.f
+++ b/SRC/zgtcon.f
@@ -1,12 +1,142 @@
+*> \brief \b ZGTCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTCON estimates the reciprocal of the condition number of a complex
+*> tridiagonal matrix A using the LU factorization as computed by
+*> ZGTTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A as computed by ZGTTRF.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX*16 array, dimension (N-2)
+*> The (n-2) elements of the second superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> If NORM = '1' or 'O', the 1-norm of the original matrix A.
+*> If NORM = 'I', the infinity-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
$ WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -18,63 +148,6 @@
COMPLEX*16 D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGTCON estimates the reciprocal of the condition number of a complex
-* tridiagonal matrix A using the LU factorization as computed by
-* ZGTTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A as computed by ZGTTRF.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input) COMPLEX*16 array, dimension (N-2)
-* The (n-2) elements of the second superdiagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* ANORM (input) DOUBLE PRECISION
-* If NORM = '1' or 'O', the 1-norm of the original matrix A.
-* If NORM = 'I', the infinity-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgtrfs.f b/SRC/zgtrfs.f
index b75759a2..a05e5760 100644
--- a/SRC/zgtrfs.f
+++ b/SRC/zgtrfs.f
@@ -1,13 +1,211 @@
+*> \brief \b ZGTRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
+* IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 B( LDB, * ), D( * ), DF( * ), DL( * ),
+* $ DLF( * ), DU( * ), DU2( * ), DUF( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is tridiagonal, and provides
+*> error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) subdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DLF
+*> \verbatim
+*> DLF is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A as computed by ZGTTRF.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is COMPLEX*16 array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DUF
+*> \verbatim
+*> DUF is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX*16 array, dimension (N-2)
+*> The (n-2) elements of the second superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZGTTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
$ IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -21,99 +219,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGTRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is tridiagonal, and provides
-* error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) subdiagonal elements of A.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) superdiagonal elements of A.
-*
-* DLF (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A as computed by ZGTTRF.
-*
-* DF (input) COMPLEX*16 array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DUF (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input) COMPLEX*16 array, dimension (N-2)
-* The (n-2) elements of the second superdiagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZGTTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgtsv.f b/SRC/zgtsv.f
index a22338da..804f19ca 100644
--- a/SRC/zgtsv.f
+++ b/SRC/zgtsv.f
@@ -1,70 +1,132 @@
- SUBROUTINE ZGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*> \brief \b ZGTSV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * )
+* ..
+*
* Purpose
* =======
*
-* ZGTSV solves the equation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTSV solves the equation
+*>
+*> A*X = B,
+*>
+*> where A is an N-by-N tridiagonal matrix, by Gaussian elimination with
+*> partial pivoting.
+*>
+*> Note that the equation A**T *X = B may be solved by interchanging the
+*> order of the arguments DU and DL.
+*>
+*>\endverbatim
*
-* A*X = B,
+* Arguments
+* =========
*
-* where A is an N-by-N tridiagonal matrix, by Gaussian elimination with
-* partial pivoting.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> On entry, DL must contain the (n-1) subdiagonal elements of
+*> A.
+*> On exit, DL is overwritten by the (n-2) elements of the
+*> second superdiagonal of the upper triangular matrix U from
+*> the LU factorization of A, in DL(1), ..., DL(n-2).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> On entry, D must contain the diagonal elements of A.
+*> On exit, D is overwritten by the n diagonal elements of U.
+*> \endverbatim
+*>
+*> \param[in,out] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> On entry, DU must contain the (n-1) superdiagonal elements
+*> of A.
+*> On exit, DU is overwritten by the (n-1) elements of the first
+*> superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, U(i,i) is exactly zero, and the solution
+*> has not been computed. The factorization has not been
+*> completed unless i = N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Note that the equation A**T *X = B may be solved by interchanging the
-* order of the arguments DU and DL.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* =========
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE ZGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input/output) COMPLEX*16 array, dimension (N-1)
-* On entry, DL must contain the (n-1) subdiagonal elements of
-* A.
-* On exit, DL is overwritten by the (n-2) elements of the
-* second superdiagonal of the upper triangular matrix U from
-* the LU factorization of A, in DL(1), ..., DL(n-2).
-*
-* D (input/output) COMPLEX*16 array, dimension (N)
-* On entry, D must contain the diagonal elements of A.
-* On exit, D is overwritten by the n diagonal elements of U.
-*
-* DU (input/output) COMPLEX*16 array, dimension (N-1)
-* On entry, DU must contain the (n-1) superdiagonal elements
-* of A.
-* On exit, DU is overwritten by the (n-1) elements of the first
-* superdiagonal of U.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, U(i,i) is exactly zero, and the solution
-* has not been computed. The factorization has not been
-* completed unless i = N.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgtsvx.f b/SRC/zgtsvx.f
index 1524167d..9cb4e922 100644
--- a/SRC/zgtsvx.f
+++ b/SRC/zgtsvx.f
@@ -1,11 +1,297 @@
+*> \brief \b ZGTSVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
+* DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, TRANS
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 B( LDB, * ), D( * ), DF( * ), DL( * ),
+* $ DLF( * ), DU( * ), DU2( * ), DUF( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTSVX uses the LU factorization to compute the solution to a complex
+*> system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
+*> where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
+*> as A = L * U, where L is a product of permutation and unit lower
+*> bidiagonal matrices and U is upper triangular with nonzeros in
+*> only the main diagonal and first two superdiagonals.
+*>
+*> 2. If some U(i,i)=0, so that U is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': DLF, DF, DUF, DU2, and IPIV contain the factored form
+*> of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV will not
+*> be modified.
+*> = 'N': The matrix will be copied to DLF, DF, and DUF
+*> and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) subdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The n diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in,out] DLF
+*> \verbatim
+*> DLF is or output) COMPLEX*16 array, dimension (N-1)
+*> If FACT = 'F', then DLF is an input argument and on entry
+*> contains the (n-1) multipliers that define the matrix L from
+*> the LU factorization of A as computed by ZGTTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DLF is an output argument and on exit
+*> contains the (n-1) multipliers that define the matrix L from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DF
+*> \verbatim
+*> DF is or output) COMPLEX*16 array, dimension (N)
+*> If FACT = 'F', then DF is an input argument and on entry
+*> contains the n diagonal elements of the upper triangular
+*> matrix U from the LU factorization of A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DF is an output argument and on exit
+*> contains the n diagonal elements of the upper triangular
+*> matrix U from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DUF
+*> \verbatim
+*> DUF is or output) COMPLEX*16 array, dimension (N-1)
+*> If FACT = 'F', then DUF is an input argument and on entry
+*> contains the (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DUF is an output argument and on exit
+*> contains the (n-1) elements of the first superdiagonal of U.
+*> \endverbatim
+*>
+*> \param[in,out] DU2
+*> \verbatim
+*> DU2 is or output) COMPLEX*16 array, dimension (N-2)
+*> If FACT = 'F', then DU2 is an input argument and on entry
+*> contains the (n-2) elements of the second superdiagonal of
+*> U.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then DU2 is an output argument and on exit
+*> contains the (n-2) elements of the second superdiagonal of
+*> U.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains the pivot indices from the LU factorization of A as
+*> computed by ZGTTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains the pivot indices from the LU factorization of A;
+*> row i of the matrix was interchanged with row IPIV(i).
+*> IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
+*> a row interchange was not required.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: U(i,i) is exactly zero. The factorization
+*> has not been completed unless i = N, but the
+*> factor U is exactly singular, so the solution
+*> and error bounds could not be computed.
+*> RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
$ DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, TRANS
@@ -20,175 +306,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGTSVX uses the LU factorization to compute the solution to a complex
-* system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
-* where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
-* as A = L * U, where L is a product of permutation and unit lower
-* bidiagonal matrices and U is upper triangular with nonzeros in
-* only the main diagonal and first two superdiagonals.
-*
-* 2. If some U(i,i)=0, so that U is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': DLF, DF, DUF, DU2, and IPIV contain the factored form
-* of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV will not
-* be modified.
-* = 'N': The matrix will be copied to DLF, DF, and DUF
-* and factored.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) subdiagonal elements of A.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The n diagonal elements of A.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) superdiagonal elements of A.
-*
-* DLF (input or output) COMPLEX*16 array, dimension (N-1)
-* If FACT = 'F', then DLF is an input argument and on entry
-* contains the (n-1) multipliers that define the matrix L from
-* the LU factorization of A as computed by ZGTTRF.
-*
-* If FACT = 'N', then DLF is an output argument and on exit
-* contains the (n-1) multipliers that define the matrix L from
-* the LU factorization of A.
-*
-* DF (input or output) COMPLEX*16 array, dimension (N)
-* If FACT = 'F', then DF is an input argument and on entry
-* contains the n diagonal elements of the upper triangular
-* matrix U from the LU factorization of A.
-*
-* If FACT = 'N', then DF is an output argument and on exit
-* contains the n diagonal elements of the upper triangular
-* matrix U from the LU factorization of A.
-*
-* DUF (input or output) COMPLEX*16 array, dimension (N-1)
-* If FACT = 'F', then DUF is an input argument and on entry
-* contains the (n-1) elements of the first superdiagonal of U.
-*
-* If FACT = 'N', then DUF is an output argument and on exit
-* contains the (n-1) elements of the first superdiagonal of U.
-*
-* DU2 (input or output) COMPLEX*16 array, dimension (N-2)
-* If FACT = 'F', then DU2 is an input argument and on entry
-* contains the (n-2) elements of the second superdiagonal of
-* U.
-*
-* If FACT = 'N', then DU2 is an output argument and on exit
-* contains the (n-2) elements of the second superdiagonal of
-* U.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains the pivot indices from the LU factorization of A as
-* computed by ZGTTRF.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains the pivot indices from the LU factorization of A;
-* row i of the matrix was interchanged with row IPIV(i).
-* IPIV(i) will always be either i or i+1; IPIV(i) = i indicates
-* a row interchange was not required.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: U(i,i) is exactly zero. The factorization
-* has not been completed unless i = N, but the
-* factor U is exactly singular, so the solution
-* and error bounds could not be computed.
-* RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zgttrf.f b/SRC/zgttrf.f
index d410b6f8..15da01bc 100644
--- a/SRC/zgttrf.f
+++ b/SRC/zgttrf.f
@@ -1,73 +1,136 @@
- SUBROUTINE ZGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 D( * ), DL( * ), DU( * ), DU2( * )
-* ..
-*
+*> \brief \b ZGTTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
* Purpose
* =======
*
-* ZGTTRF computes an LU factorization of a complex tridiagonal matrix A
-* using elimination with partial pivoting and row interchanges.
-*
-* The factorization has the form
-* A = L * U
-* where L is a product of permutation and unit lower bidiagonal
-* matrices and U is upper triangular with nonzeros in only the main
-* diagonal and first two superdiagonals.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTTRF computes an LU factorization of a complex tridiagonal matrix A
+*> using elimination with partial pivoting and row interchanges.
+*>
+*> The factorization has the form
+*> A = L * U
+*> where L is a product of permutation and unit lower bidiagonal
+*> matrices and U is upper triangular with nonzeros in only the main
+*> diagonal and first two superdiagonals.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* DL (input/output) COMPLEX*16 array, dimension (N-1)
-* On entry, DL must contain the (n-1) sub-diagonal elements of
-* A.
-*
-* On exit, DL is overwritten by the (n-1) multipliers that
-* define the matrix L from the LU factorization of A.
-*
-* D (input/output) COMPLEX*16 array, dimension (N)
-* On entry, D must contain the diagonal elements of A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> On entry, DL must contain the (n-1) sub-diagonal elements of
+*> A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DL is overwritten by the (n-1) multipliers that
+*> define the matrix L from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> On entry, D must contain the diagonal elements of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, D is overwritten by the n diagonal elements of the
+*> upper triangular matrix U from the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> On entry, DU must contain the (n-1) super-diagonal elements
+*> of A.
+*> \endverbatim
+*> \verbatim
+*> On exit, DU is overwritten by the (n-1) elements of the first
+*> super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[out] DU2
+*> \verbatim
+*> DU2 is COMPLEX*16 array, dimension (N-2)
+*> On exit, DU2 is overwritten by the (n-2) elements of the
+*> second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly
+*> singular, and division by zero will occur if it is used
+*> to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, D is overwritten by the n diagonal elements of the
-* upper triangular matrix U from the LU factorization of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input/output) COMPLEX*16 array, dimension (N-1)
-* On entry, DU must contain the (n-1) super-diagonal elements
-* of A.
+*> \date November 2011
*
-* On exit, DU is overwritten by the (n-1) elements of the first
-* super-diagonal of U.
+*> \ingroup complex16OTHERcomputational
*
-* DU2 (output) COMPLEX*16 array, dimension (N-2)
-* On exit, DU2 is overwritten by the (n-2) elements of the
-* second super-diagonal of U.
+* =====================================================================
+ SUBROUTINE ZGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
*
-* IPIV (output) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-* has been completed, but the factor U is exactly
-* singular, and division by zero will occur if it is used
-* to solve a system of equations.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 D( * ), DL( * ), DU( * ), DU2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zgttrs.f b/SRC/zgttrs.f
index afe0657c..aae73603 100644
--- a/SRC/zgttrs.f
+++ b/SRC/zgttrs.f
@@ -1,10 +1,139 @@
+*> \brief \b ZGTTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTTRS solves one of the systems of equations
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*> with a tridiagonal matrix A using the LU factorization computed
+*> by ZGTTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX*16 array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the matrix of right hand side vectors B.
+*> On exit, B is overwritten by the solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,61 +144,6 @@
COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGTTRS solves one of the systems of equations
-* A * X = B, A**T * X = B, or A**H * X = B,
-* with a tridiagonal matrix A using the LU factorization computed
-* by ZGTTRF.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
-*
-* DU2 (input) COMPLEX*16 array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the matrix of right hand side vectors B.
-* On exit, B is overwritten by the solution vectors X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zgtts2.f b/SRC/zgtts2.f
index d3e57337..a5ed2b65 100644
--- a/SRC/zgtts2.f
+++ b/SRC/zgtts2.f
@@ -1,68 +1,137 @@
- SUBROUTINE ZGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER ITRANS, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
-* ..
-*
+*> \brief \b ZGTTS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER ITRANS, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
+*
* Purpose
* =======
*
-* ZGTTS2 solves one of the systems of equations
-* A * X = B, A**T * X = B, or A**H * X = B,
-* with a tridiagonal matrix A using the LU factorization computed
-* by ZGTTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTTS2 solves one of the systems of equations
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*> with a tridiagonal matrix A using the LU factorization computed
+*> by ZGTTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITRANS (input) INTEGER
-* Specifies the form of the system of equations.
-* = 0: A * X = B (No transpose)
-* = 1: A**T * X = B (Transpose)
-* = 2: A**H * X = B (Conjugate transpose)
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
+*> \param[in] ITRANS
+*> \verbatim
+*> ITRANS is INTEGER
+*> Specifies the form of the system of equations.
+*> = 0: A * X = B (No transpose)
+*> = 1: A**T * X = B (Transpose)
+*> = 2: A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX*16 array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the matrix of right hand side vectors B.
+*> On exit, B is overwritten by the solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) COMPLEX*16 array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
+*> \date November 2011
*
-* DU2 (input) COMPLEX*16 array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
+*> \ingroup complex16OTHERauxiliary
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
+* =====================================================================
+ SUBROUTINE ZGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the matrix of right hand side vectors B.
-* On exit, B is overwritten by the solution vectors X.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER ITRANS, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhbev.f b/SRC/zhbev.f
index adfaed02..84c809ca 100644
--- a/SRC/zhbev.f
+++ b/SRC/zhbev.f
@@ -1,10 +1,154 @@
+*> \brief <b> ZHBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KD, LDAB, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AB( LDAB, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBEV computes all the eigenvalues and, optionally, eigenvectors of
+*> a complex Hermitian band matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(1,3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZHBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,72 +159,6 @@
COMPLEX*16 AB( LDAB, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHBEV computes all the eigenvalues and, optionally, eigenvectors of
-* a complex Hermitian band matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(1,3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhbevd.f b/SRC/zhbevd.f
index d41fb4eb..3d7f92b9 100644
--- a/SRC/zhbevd.f
+++ b/SRC/zhbevd.f
@@ -1,10 +1,220 @@
+*> \brief <b> ZHBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
+* LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KD, LDAB, LDZ, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AB( LDAB, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBEVD computes all the eigenvalues and, optionally, eigenvectors of
+*> a complex Hermitian band matrix A. If eigenvectors are desired, it
+*> uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the first
+*> superdiagonal and the diagonal of the tridiagonal matrix T
+*> are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
+*> the diagonal and first subdiagonal of T are returned in the
+*> first two rows of AB.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (LRWORK)
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of array RWORK.
+*> If N <= 1, LRWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LRWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LRWORK must be at least
+*> 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N .
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZHBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
$ LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,122 +226,6 @@
COMPLEX*16 AB( LDAB, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHBEVD computes all the eigenvalues and, optionally, eigenvectors of
-* a complex Hermitian band matrix A. If eigenvectors are desired, it
-* uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the first
-* superdiagonal and the diagonal of the tridiagonal matrix T
-* are returned in rows KD and KD+1 of AB, and if UPLO = 'L',
-* the diagonal and first subdiagonal of T are returned in the
-* first two rows of AB.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LWORK must be at least 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LRWORK)
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of array RWORK.
-* If N <= 1, LRWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LRWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LRWORK must be at least
-* 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N .
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhbevx.f b/SRC/zhbevx.f
index 1a4c831c..2fc4ca1b 100644
--- a/SRC/zhbevx.f
+++ b/SRC/zhbevx.f
@@ -1,11 +1,266 @@
+*> \brief <b> ZHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
+* VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AB( LDAB, * ), Q( LDQ, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex Hermitian band matrix A. Eigenvalues and eigenvectors
+*> can be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, AB is overwritten by values generated during the
+*> reduction to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD + 1.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ, N)
+*> If JOBZ = 'V', the N-by-N unitary matrix used in the
+*> reduction to tridiagonal form.
+*> If JOBZ = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If JOBZ = 'V', then
+*> LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AB to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZHBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
$ VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,142 +274,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHBEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a complex Hermitian band matrix A. Eigenvalues and eigenvectors
-* can be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, AB is overwritten by values generated during the
-* reduction to tridiagonal form.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD + 1.
-*
-* Q (output) COMPLEX*16 array, dimension (LDQ, N)
-* If JOBZ = 'V', the N-by-N unitary matrix used in the
-* reduction to tridiagonal form.
-* If JOBZ = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If JOBZ = 'V', then
-* LDQ >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AB to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhbgst.f b/SRC/zhbgst.f
index 339d4a64..6ad7ea76 100644
--- a/SRC/zhbgst.f
+++ b/SRC/zhbgst.f
@@ -1,10 +1,167 @@
+*> \brief \b ZHBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
+* LDX, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, VECT
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDX, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBGST reduces a complex Hermitian-definite banded generalized
+*> eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y,
+*> such that C has the same bandwidth as A.
+*>
+*> B must have been previously factorized as S**H*S by ZPBSTF, using a
+*> split Cholesky factorization. A is overwritten by C = X**H*A*X, where
+*> X = S**(-1)*Q and Q is a unitary matrix chosen to preserve the
+*> bandwidth of A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'N': do not form the transformation matrix X;
+*> = 'V': form X.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the transformed matrix X**H*A*X, stored in the same
+*> format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in] BB
+*> \verbatim
+*> BB is COMPLEX*16 array, dimension (LDBB,N)
+*> The banded factor S from the split Cholesky factorization of
+*> B, as returned by ZPBSTF, stored in the first kb+1 rows of
+*> the array.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,N)
+*> If VECT = 'V', the n-by-n matrix X.
+*> If VECT = 'N', the array X is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> LDX >= max(1,N) if VECT = 'V'; LDX >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZHBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
$ LDX, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO, VECT
@@ -16,78 +173,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHBGST reduces a complex Hermitian-definite banded generalized
-* eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y,
-* such that C has the same bandwidth as A.
-*
-* B must have been previously factorized as S**H*S by ZPBSTF, using a
-* split Cholesky factorization. A is overwritten by C = X**H*A*X, where
-* X = S**(-1)*Q and Q is a unitary matrix chosen to preserve the
-* bandwidth of A.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'N': do not form the transformation matrix X;
-* = 'V': form X.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= KB >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the transformed matrix X**H*A*X, stored in the same
-* format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input) COMPLEX*16 array, dimension (LDBB,N)
-* The banded factor S from the split Cholesky factorization of
-* B, as returned by ZPBSTF, stored in the first kb+1 rows of
-* the array.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* X (output) COMPLEX*16 array, dimension (LDX,N)
-* If VECT = 'V', the n-by-n matrix X.
-* If VECT = 'N', the array X is not referenced.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
-* LDX >= max(1,N) if VECT = 'V'; LDX >= 1 otherwise.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhbgv.f b/SRC/zhbgv.f
index 6a53c89e..c25cfba9 100644
--- a/SRC/zhbgv.f
+++ b/SRC/zhbgv.f
@@ -1,10 +1,186 @@
+*> \brief \b ZHBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
+* LDZ, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBGV computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
+*> and banded, and B is also positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is COMPLEX*16 array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**H*S, as returned by ZPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so that Z**H*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: the algorithm failed to converge:
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then ZPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZHBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
$ LDZ, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,93 +192,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHBGV computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
-* and banded, and B is also positive definite.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) COMPLEX*16 array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**H*S, as returned by ZPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so that Z**H*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= N.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: the algorithm failed to converge:
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then ZPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zhbgvd.f b/SRC/zhbgvd.f
index 856ffd5c..21c27367 100644
--- a/SRC/zhbgvd.f
+++ b/SRC/zhbgvd.f
@@ -1,12 +1,264 @@
+*> \brief \b ZHBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
+* Z, LDZ, WORK, LWORK, RWORK, LRWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LRWORK,
+* $ LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
+*> and banded, and B is also positive definite. If eigenvectors are
+*> desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is COMPLEX*16 array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**H*S, as returned by ZPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so that Z**H*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= N.
+*> If JOBZ = 'V' and N > 1, LWORK >= 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO=0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of array RWORK.
+*> If N <= 1, LRWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LRWORK >= N.
+*> If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO=0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: the algorithm failed to converge:
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then ZPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
$ Z, LDZ, WORK, LWORK, RWORK, LRWORK, IWORK,
$ LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @precisions normal z -> c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -20,147 +272,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHBGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
-* and banded, and B is also positive definite. If eigenvectors are
-* desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) COMPLEX*16 array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**H*S, as returned by ZPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so that Z**H*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO=0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= N.
-* If JOBZ = 'V' and N > 1, LWORK >= 2*N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
-* On exit, if INFO=0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of array RWORK.
-* If N <= 1, LRWORK >= 1.
-* If JOBZ = 'N' and N > 1, LRWORK >= N.
-* If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO=0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: the algorithm failed to converge:
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then ZPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhbgvx.f b/SRC/zhbgvx.f
index d2a198c5..84f57ce9 100644
--- a/SRC/zhbgvx.f
+++ b/SRC/zhbgvx.f
@@ -1,11 +1,299 @@
+*> \brief \b ZHBGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
+* LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
+* LDZ, WORK, RWORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, KA, KB, LDAB, LDBB, LDQ, LDZ, M,
+* $ N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AB( LDAB, * ), BB( LDBB, * ), Q( LDQ, * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBGVX computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite banded eigenproblem, of
+*> the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
+*> and banded, and B is also positive definite. Eigenvalues and
+*> eigenvectors can be selected by specifying either all eigenvalues,
+*> a range of values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KA >= 0.
+*> \endverbatim
+*>
+*> \param[in] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of superdiagonals of the matrix B if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KB >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first ka+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AB are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KA+1.
+*> \endverbatim
+*>
+*> \param[in,out] BB
+*> \verbatim
+*> BB is COMPLEX*16 array, dimension (LDBB, N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix B, stored in the first kb+1 rows of the array. The
+*> j-th column of B is stored in the j-th column of the array BB
+*> as follows:
+*> if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
+*> if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
+*> \endverbatim
+*> \verbatim
+*> On exit, the factor S from the split Cholesky factorization
+*> B = S**H*S, as returned by ZPBSTF.
+*> \endverbatim
+*>
+*> \param[in] LDBB
+*> \verbatim
+*> LDBB is INTEGER
+*> The leading dimension of the array BB. LDBB >= KB+1.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ, N)
+*> If JOBZ = 'V', the n-by-n matrix used in the reduction of
+*> A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x,
+*> and consequently C to tridiagonal form.
+*> If JOBZ = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. If JOBZ = 'N',
+*> LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AP to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors, with the i-th column of Z holding the
+*> eigenvector associated with W(i). The eigenvectors are
+*> normalized so that Z**H*B*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is:
+*> <= N: then i eigenvectors failed to converge. Their
+*> indices are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= N, then ZPBSTF
+*> returned INFO = i: B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
$ LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
$ LDZ, WORK, RWORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -20,160 +308,6 @@
$ WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHBGVX computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite banded eigenproblem, of
-* the form A*x=(lambda)*B*x. Here A and B are assumed to be Hermitian
-* and banded, and B is also positive definite. Eigenvalues and
-* eigenvectors can be selected by specifying either all eigenvalues,
-* a range of values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* KA (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KA >= 0.
-*
-* KB (input) INTEGER
-* The number of superdiagonals of the matrix B if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KB >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first ka+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(ka+1+i-j,j) = A(i,j) for max(1,j-ka)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+ka).
-*
-* On exit, the contents of AB are destroyed.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KA+1.
-*
-* BB (input/output) COMPLEX*16 array, dimension (LDBB, N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix B, stored in the first kb+1 rows of the array. The
-* j-th column of B is stored in the j-th column of the array BB
-* as follows:
-* if UPLO = 'U', BB(kb+1+i-j,j) = B(i,j) for max(1,j-kb)<=i<=j;
-* if UPLO = 'L', BB(1+i-j,j) = B(i,j) for j<=i<=min(n,j+kb).
-*
-* On exit, the factor S from the split Cholesky factorization
-* B = S**H*S, as returned by ZPBSTF.
-*
-* LDBB (input) INTEGER
-* The leading dimension of the array BB. LDBB >= KB+1.
-*
-* Q (output) COMPLEX*16 array, dimension (LDQ, N)
-* If JOBZ = 'V', the n-by-n matrix used in the reduction of
-* A*x = (lambda)*B*x to standard form, i.e. C*x = (lambda)*x,
-* and consequently C to tridiagonal form.
-* If JOBZ = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. If JOBZ = 'N',
-* LDQ >= 1. If JOBZ = 'V', LDQ >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AP to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors, with the i-th column of Z holding the
-* eigenvector associated with W(i). The eigenvectors are
-* normalized so that Z**H*B*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= N.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is:
-* <= N: then i eigenvectors failed to converge. Their
-* indices are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= N, then ZPBSTF
-* returned INFO = i: B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhbtrd.f b/SRC/zhbtrd.f
index 8b4f4f42..583ad2f7 100644
--- a/SRC/zhbtrd.f
+++ b/SRC/zhbtrd.f
@@ -1,10 +1,167 @@
+*> \brief \b ZHBTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, VECT
+* INTEGER INFO, KD, LDAB, LDQ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* COMPLEX*16 AB( LDAB, * ), Q( LDQ, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBTRD reduces a complex Hermitian band matrix A to real symmetric
+*> tridiagonal form T by a unitary similarity transformation:
+*> Q**H * A * Q = T.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'N': do not form Q;
+*> = 'V': form Q;
+*> = 'U': update a matrix X, by forming X*Q.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> On exit, the diagonal elements of AB are overwritten by the
+*> diagonal elements of the tridiagonal matrix T; if KD > 0, the
+*> elements on the first superdiagonal (if UPLO = 'U') or the
+*> first subdiagonal (if UPLO = 'L') are overwritten by the
+*> off-diagonal elements of T; the rest of AB is overwritten by
+*> values generated during the reduction.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> On entry, if VECT = 'U', then Q must contain an N-by-N
+*> matrix X; if VECT = 'N' or 'V', then Q need not be set.
+*> \endverbatim
+*> \verbatim
+*> On exit:
+*> if VECT = 'V', Q contains the N-by-N unitary matrix Q;
+*> if VECT = 'U', Q contains the product X*Q;
+*> if VECT = 'N', the array Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by Linda Kaufman, Bell Labs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
$ WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO, VECT
@@ -15,80 +172,6 @@
COMPLEX*16 AB( LDAB, * ), Q( LDQ, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHBTRD reduces a complex Hermitian band matrix A to real symmetric
-* tridiagonal form T by a unitary similarity transformation:
-* Q**H * A * Q = T.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'N': do not form Q;
-* = 'V': form Q;
-* = 'U': update a matrix X, by forming X*Q.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* On exit, the diagonal elements of AB are overwritten by the
-* diagonal elements of the tridiagonal matrix T; if KD > 0, the
-* elements on the first superdiagonal (if UPLO = 'U') or the
-* first subdiagonal (if UPLO = 'L') are overwritten by the
-* off-diagonal elements of T; the rest of AB is overwritten by
-* values generated during the reduction.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T.
-*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
-* On entry, if VECT = 'U', then Q must contain an N-by-N
-* matrix X; if VECT = 'N' or 'V', then Q need not be set.
-*
-* On exit:
-* if VECT = 'V', Q contains the N-by-N unitary matrix Q;
-* if VECT = 'U', Q contains the product X*Q;
-* if VECT = 'N', the array Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* Modified by Linda Kaufman, Bell Labs.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhecon.f b/SRC/zhecon.f
index 580049d0..0989b796 100644
--- a/SRC/zhecon.f
+++ b/SRC/zhecon.f
@@ -1,12 +1,126 @@
+*> \brief \b ZHECON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHECON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHECON estimates the reciprocal of the condition number of a complex
+*> Hermitian matrix A using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by ZHETRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+* =====================================================================
SUBROUTINE ZHECON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,53 +132,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHECON estimates the reciprocal of the condition number of a complex
-* Hermitian matrix A using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by ZHETRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHETRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHETRF.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zheequb.f b/SRC/zheequb.f
index 25acd498..a52958ec 100644
--- a/SRC/zheequb.f
+++ b/SRC/zheequb.f
@@ -1,67 +1,124 @@
- SUBROUTINE ZHEEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*> \brief \b ZHEEQUB
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- DOUBLE PRECISION AMAX, SCOND
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), WORK( * )
- DOUBLE PRECISION S( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZHEEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* DOUBLE PRECISION S( * )
+* ..
+*
* Purpose
* =======
*
-* ZSYEQUB computes row and column scalings intended to equilibrate a
-* symmetric matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYEQUB computes row and column scalings intended to equilibrate a
+*> symmetric matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The N-by-N symmetric matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*> \endverbatim
+*>
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The N-by-N symmetric matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \date November 2011
*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+*> \ingroup complex16HEcomputational
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* =====================================================================
+ SUBROUTINE ZHEEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ DOUBLE PRECISION AMAX, SCOND
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), WORK( * )
+ DOUBLE PRECISION S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zheev.f b/SRC/zheev.f
index 4c97b2d9..fe0681c3 100644
--- a/SRC/zheev.f
+++ b/SRC/zheev.f
@@ -1,10 +1,142 @@
+*> \brief <b> ZHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEEV computes all eigenvalues and, optionally, eigenvectors of a
+*> complex Hermitian matrix A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> orthonormal eigenvectors of the matrix A.
+*> If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*> or the upper triangle (if UPLO='U') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,2*N-1).
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the blocksize for ZHETRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEeigen
+*
+* =====================================================================
SUBROUTINE ZHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,66 +147,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHEEV computes all eigenvalues and, optionally, eigenvectors of a
-* complex Hermitian matrix A.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* orthonormal eigenvectors of the matrix A.
-* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-* or the upper triangle (if UPLO='U') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,2*N-1).
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the blocksize for ZHETRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(1, 3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zheevd.f b/SRC/zheevd.f
index dc650a69..65deb697 100644
--- a/SRC/zheevd.f
+++ b/SRC/zheevd.f
@@ -1,10 +1,211 @@
+*> \brief <b> ZHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
+* LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDA, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEEVD computes all eigenvalues and, optionally, eigenvectors of a
+*> complex Hermitian matrix A. If eigenvectors are desired, it uses a
+*> divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> orthonormal eigenvectors of the matrix A.
+*> If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*> or the upper triangle (if UPLO='U') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least N + 1.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least 2*N + N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (LRWORK)
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK.
+*> If N <= 1, LRWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LRWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LRWORK must be at least
+*> 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i and JOBZ = 'N', then the algorithm failed
+*> to converge; i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> if INFO = i and JOBZ = 'V', then the algorithm failed
+*> to compute an eigenvalue while working on the submatrix
+*> lying in rows and columns INFO/(N+1) through
+*> mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> Modified description of INFO. Sven, 16 Feb 05.
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHEEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
$ LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,118 +217,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHEEVD computes all eigenvalues and, optionally, eigenvectors of a
-* complex Hermitian matrix A. If eigenvectors are desired, it uses a
-* divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* orthonormal eigenvectors of the matrix A.
-* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-* or the upper triangle (if UPLO='U') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least N + 1.
-* If JOBZ = 'V' and N > 1, LWORK must be at least 2*N + N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LRWORK)
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK.
-* If N <= 1, LRWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LRWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LRWORK must be at least
-* 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i and JOBZ = 'N', then the algorithm failed
-* to converge; i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* if INFO = i and JOBZ = 'V', then the algorithm failed
-* to compute an eigenvalue while working on the submatrix
-* lying in rows and columns INFO/(N+1) through
-* mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
-* Modified description of INFO. Sven, 16 Feb 05.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zheevr.f b/SRC/zheevr.f
index d142ea26..b89b58ea 100644
--- a/SRC/zheevr.f
+++ b/SRC/zheevr.f
@@ -1,11 +1,362 @@
+*> \brief <b> ZHEEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
+* RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDA, LDZ, LIWORK, LRWORK, LWORK,
+* $ M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 A( LDA, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEEVR computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex Hermitian matrix A. Eigenvalues and eigenvectors can
+*> be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*> ZHEEVR first reduces the matrix A to tridiagonal form T with a call
+*> to ZHETRD. Then, whenever possible, ZHEEVR calls ZSTEMR to compute
+*> eigenspectrum using Relatively Robust Representations. ZSTEMR
+*> computes eigenvalues by the dqds algorithm, while orthogonal
+*> eigenvectors are computed from various "good" L D L^T representations
+*> (also known as Relatively Robust Representations). Gram-Schmidt
+*> orthogonalization is avoided as far as possible. More specifically,
+*> the various steps of the algorithm are as follows.
+*>
+*> For each unreduced block (submatrix) of T,
+*> (a) Compute T - sigma I = L D L^T, so that L and D
+*> define all the wanted eigenvalues to high relative accuracy.
+*> This means that small relative changes in the entries of D and L
+*> cause only small relative changes in the eigenvalues and
+*> eigenvectors. The standard (unfactored) representation of the
+*> tridiagonal matrix T does not have this property in general.
+*> (b) Compute the eigenvalues to suitable accuracy.
+*> If the eigenvectors are desired, the algorithm attains full
+*> accuracy of the computed eigenvalues only right before
+*> the corresponding vectors have to be computed, see steps c) and d).
+*> (c) For each cluster of close eigenvalues, select a new
+*> shift close to the cluster, find a new factorization, and refine
+*> the shifted eigenvalues to suitable accuracy.
+*> (d) For each eigenvalue with a large enough relative separation compute
+*> the corresponding eigenvector by forming a rank revealing twisted
+*> factorization. Go back to (c) for any clusters that remain.
+*>
+*> The desired accuracy of the output can be specified by the input
+*> parameter ABSTOL.
+*>
+*> For more details, see DSTEMR's documentation and:
+*> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
+*> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
+*> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
+*> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
+*> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
+*> 2004. Also LAPACK Working Note 154.
+*> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem",
+*> Computer Science Division Technical Report No. UCB/CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*>
+*> Note 1 : ZHEEVR calls ZSTEMR when the full spectrum is requested
+*> on machines which conform to the ieee-754 floating point standard.
+*> ZHEEVR calls DSTEBZ and ZSTEIN on non-ieee machines and
+*> when partial spectrum requests are made.
+*>
+*> Normal execution of ZSTEMR may create NaNs and infinities and
+*> hence may abort due to a floating point exception in environments
+*> which do not handle NaNs and infinities in the ieee standard default
+*> manner.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> For RANGE = 'V' or 'I' and IU - IL < N - 1, DSTEBZ and
+*> ZSTEIN are called
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*> \verbatim
+*> If high relative accuracy is important, set ABSTOL to
+*> DLAMCH( 'Safe minimum' ). Doing so will guarantee that
+*> eigenvalues are computed to high relative accuracy when
+*> possible in future releases. The current code does not
+*> make any guarantees about high relative accuracy, but
+*> furutre releases will. See J. Barlow and J. Demmel,
+*> "Computing Accurate Eigensystems of Scaled Diagonally
+*> Dominant Matrices", LAPACK Working Note #7, for a discussion
+*> of which matrices define their eigenvalues to high relative
+*> accuracy.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ).
+*> Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,2*N).
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the max of the blocksize for ZHETRD and for
+*> ZUNMTR as returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO = 0, RWORK(1) returns the optimal
+*> (and minimal) LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The length of the array RWORK. LRWORK >= max(1,24*N).
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal
+*> (and minimal) LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N).
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: Internal error
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Ken Stanley, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Jason Riedy, Computer Science Division, University of
+*> California at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHEEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
$ RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,231 +370,6 @@
COMPLEX*16 A( LDA, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHEEVR computes selected eigenvalues and, optionally, eigenvectors
-* of a complex Hermitian matrix A. Eigenvalues and eigenvectors can
-* be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* ZHEEVR first reduces the matrix A to tridiagonal form T with a call
-* to ZHETRD. Then, whenever possible, ZHEEVR calls ZSTEMR to compute
-* eigenspectrum using Relatively Robust Representations. ZSTEMR
-* computes eigenvalues by the dqds algorithm, while orthogonal
-* eigenvectors are computed from various "good" L D L^T representations
-* (also known as Relatively Robust Representations). Gram-Schmidt
-* orthogonalization is avoided as far as possible. More specifically,
-* the various steps of the algorithm are as follows.
-*
-* For each unreduced block (submatrix) of T,
-* (a) Compute T - sigma I = L D L^T, so that L and D
-* define all the wanted eigenvalues to high relative accuracy.
-* This means that small relative changes in the entries of D and L
-* cause only small relative changes in the eigenvalues and
-* eigenvectors. The standard (unfactored) representation of the
-* tridiagonal matrix T does not have this property in general.
-* (b) Compute the eigenvalues to suitable accuracy.
-* If the eigenvectors are desired, the algorithm attains full
-* accuracy of the computed eigenvalues only right before
-* the corresponding vectors have to be computed, see steps c) and d).
-* (c) For each cluster of close eigenvalues, select a new
-* shift close to the cluster, find a new factorization, and refine
-* the shifted eigenvalues to suitable accuracy.
-* (d) For each eigenvalue with a large enough relative separation compute
-* the corresponding eigenvector by forming a rank revealing twisted
-* factorization. Go back to (c) for any clusters that remain.
-*
-* The desired accuracy of the output can be specified by the input
-* parameter ABSTOL.
-*
-* For more details, see DSTEMR's documentation and:
-* - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
-* to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
-* Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
-* - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
-* Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
-* 2004. Also LAPACK Working Note 154.
-* - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem",
-* Computer Science Division Technical Report No. UCB/CSD-97-971,
-* UC Berkeley, May 1997.
-*
-*
-* Note 1 : ZHEEVR calls ZSTEMR when the full spectrum is requested
-* on machines which conform to the ieee-754 floating point standard.
-* ZHEEVR calls DSTEBZ and ZSTEIN on non-ieee machines and
-* when partial spectrum requests are made.
-*
-* Normal execution of ZSTEMR may create NaNs and infinities and
-* hence may abort due to a floating point exception in environments
-* which do not handle NaNs and infinities in the ieee standard default
-* manner.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-* For RANGE = 'V' or 'I' and IU - IL < N - 1, DSTEBZ and
-* ZSTEIN are called
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* If high relative accuracy is important, set ABSTOL to
-* DLAMCH( 'Safe minimum' ). Doing so will guarantee that
-* eigenvalues are computed to high relative accuracy when
-* possible in future releases. The current code does not
-* make any guarantees about high relative accuracy, but
-* furutre releases will. See J. Barlow and J. Demmel,
-* "Computing Accurate Eigensystems of Scaled Diagonally
-* Dominant Matrices", LAPACK Working Note #7, for a discussion
-* of which matrices define their eigenvalues to high relative
-* accuracy.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ).
-* Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,2*N).
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the max of the blocksize for ZHETRD and for
-* ZUNMTR as returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
-* On exit, if INFO = 0, RWORK(1) returns the optimal
-* (and minimal) LRWORK.
-*
-* LRWORK (input) INTEGER
-* The length of the array RWORK. LRWORK >= max(1,24*N).
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal
-* (and minimal) LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N).
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: Internal error
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Ken Stanley, Computer Science Division, University of
-* California at Berkeley, USA
-* Jason Riedy, Computer Science Division, University of
-* California at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zheevx.f b/SRC/zheevx.f
index 796e2bb9..0cb0d85c 100644
--- a/SRC/zheevx.f
+++ b/SRC/zheevx.f
@@ -1,12 +1,258 @@
+*> \brief <b> ZHEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDA, LDZ, LWORK, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 A( LDA, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex Hermitian matrix A. Eigenvalues and eigenvectors can
+*> be selected by specifying either a range of values or a range of
+*> indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing A to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= 1, when N <= 1;
+*> otherwise 2*N.
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the max of the blocksize for ZHETRD and for
+*> ZUNMTR as returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEeigen
+*
+* =====================================================================
SUBROUTINE ZHEEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @precisions normal z -> c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,141 +265,6 @@
COMPLEX*16 A( LDA, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHEEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a complex Hermitian matrix A. Eigenvalues and eigenvectors can
-* be selected by specifying either a range of values or a range of
-* indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing A to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= 1, when N <= 1;
-* otherwise 2*N.
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the max of the blocksize for ZHETRD and for
-* ZUNMTR as returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhegs2.f b/SRC/zhegs2.f
index 351da32b..bfc417fd 100644
--- a/SRC/zhegs2.f
+++ b/SRC/zhegs2.f
@@ -1,73 +1,137 @@
- SUBROUTINE ZHEGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, LDA, LDB, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZHEGS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZHEGS2 reduces a complex Hermitian-definite generalized
-* eigenproblem to standard form.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H *A*L.
-*
-* B must have been previously factorized as U**H *U or L*L**H by ZPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEGS2 reduces a complex Hermitian-definite generalized
+*> eigenproblem to standard form.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H *A*L.
+*>
+*> B must have been previously factorized as U**H *U or L*L**H by ZPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
-* = 2 or 3: compute U*A*U**H or L**H *A*L.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored, and how B has been factorized.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
+*> = 2 or 3: compute U*A*U**H or L**H *A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored, and how B has been factorized.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> The triangular factor from the Cholesky factorization of B,
+*> as returned by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complex16HEcomputational
*
-* B (input) COMPLEX*16 array, dimension (LDB,N)
-* The triangular factor from the Cholesky factorization of B,
-* as returned by ZPOTRF.
+* =====================================================================
+ SUBROUTINE ZHEGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhegst.f b/SRC/zhegst.f
index 6aad3cc5..ba2142e8 100644
--- a/SRC/zhegst.f
+++ b/SRC/zhegst.f
@@ -1,73 +1,137 @@
- SUBROUTINE ZHEGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, LDA, LDB, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZHEGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZHEGST reduces a complex Hermitian-definite generalized
-* eigenproblem to standard form.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L.
-*
-* B must have been previously factorized as U**H*U or L*L**H by ZPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEGST reduces a complex Hermitian-definite generalized
+*> eigenproblem to standard form.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L.
+*>
+*> B must have been previously factorized as U**H*U or L*L**H by ZPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
-* = 2 or 3: compute U*A*U**H or L**H*A*L.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored and B is factored as
-* U**H*U;
-* = 'L': Lower triangle of A is stored and B is factored as
-* L*L**H.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
+*> = 2 or 3: compute U*A*U**H or L**H*A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored and B is factored as
+*> U**H*U;
+*> = 'L': Lower triangle of A is stored and B is factored as
+*> L*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> The triangular factor from the Cholesky factorization of B,
+*> as returned by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complex16HEcomputational
*
-* B (input) COMPLEX*16 array, dimension (LDB,N)
-* The triangular factor from the Cholesky factorization of B,
-* as returned by ZPOTRF.
+* =====================================================================
+ SUBROUTINE ZHEGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, LDA, LDB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhegv.f b/SRC/zhegv.f
index bee5fc1d..f67c9f9f 100644
--- a/SRC/zhegv.f
+++ b/SRC/zhegv.f
@@ -1,10 +1,185 @@
+*> \brief \b ZHEGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
+* LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEGV computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
+*> Here A and B are assumed to be Hermitian and B is also
+*> positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> matrix Z of eigenvectors. The eigenvectors are normalized
+*> as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+*> or the lower triangle (if UPLO='L') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the Hermitian positive definite matrix B.
+*> If UPLO = 'U', the leading N-by-N upper triangular part of B
+*> contains the upper triangular part of the matrix B.
+*> If UPLO = 'L', the leading N-by-N lower triangular part of B
+*> contains the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,2*N-1).
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the blocksize for ZHETRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: ZPOTRF or ZHEEV returned an error code:
+*> <= N: if INFO = i, ZHEEV failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not converge to zero;
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEeigen
+*
+* =====================================================================
SUBROUTINE ZHEGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
$ LWORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,98 +190,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHEGV computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
-* Here A and B are assumed to be Hermitian and B is also
-* positive definite.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* matrix Z of eigenvectors. The eigenvectors are normalized
-* as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-* If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
-* or the lower triangle (if UPLO='L') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the Hermitian positive definite matrix B.
-* If UPLO = 'U', the leading N-by-N upper triangular part of B
-* contains the upper triangular part of the matrix B.
-* If UPLO = 'L', the leading N-by-N lower triangular part of B
-* contains the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,2*N-1).
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the blocksize for ZHETRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(1, 3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: ZPOTRF or ZHEEV returned an error code:
-* <= N: if INFO = i, ZHEEV failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not converge to zero;
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhegvd.f b/SRC/zhegvd.f
index 06206f24..92523c9a 100644
--- a/SRC/zhegvd.f
+++ b/SRC/zhegvd.f
@@ -1,10 +1,254 @@
+*> \brief \b ZHEGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
+* LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEGVD computes all the eigenvalues, and optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be Hermitian and B is also positive definite.
+*> If eigenvectors are desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*> matrix Z of eigenvectors. The eigenvectors are normalized
+*> as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+*> or the lower triangle (if UPLO='L') of A, including the
+*> diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the Hermitian matrix B. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of B contains the
+*> upper triangular part of the matrix B. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of B contains
+*> the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= N + 1.
+*> If JOBZ = 'V' and N > 1, LWORK >= 2*N + N**2.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK.
+*> If N <= 1, LRWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LRWORK >= N.
+*> If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If N <= 1, LIWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: ZPOTRF or ZHEEVD returned an error code:
+*> <= N: if INFO = i and JOBZ = 'N', then the algorithm
+*> failed to converge; i off-diagonal elements of an
+*> intermediate tridiagonal form did not converge to
+*> zero;
+*> if INFO = i and JOBZ = 'V', then the algorithm
+*> failed to compute an eigenvalue while working on
+*> the submatrix lying in rows and columns INFO/(N+1)
+*> through mod(INFO,N+1);
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> Modified so that no backsubstitution is performed if ZHEEVD fails to
+*> converge (NEIG in old code could be greater than N causing out of
+*> bounds reference to A - reported by Ralf Meyer). Also corrected the
+*> description of INFO and the test on ITYPE. Sven, 16 Feb 05.
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHEGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
$ LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,150 +260,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHEGVD computes all the eigenvalues, and optionally, the eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be Hermitian and B is also positive definite.
-* If eigenvectors are desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-* matrix Z of eigenvectors. The eigenvectors are normalized
-* as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-* If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
-* or the lower triangle (if UPLO='L') of A, including the
-* diagonal, is destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the Hermitian matrix B. If UPLO = 'U', the
-* leading N-by-N upper triangular part of B contains the
-* upper triangular part of the matrix B. If UPLO = 'L',
-* the leading N-by-N lower triangular part of B contains
-* the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= N + 1.
-* If JOBZ = 'V' and N > 1, LWORK >= 2*N + N**2.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK.
-* If N <= 1, LRWORK >= 1.
-* If JOBZ = 'N' and N > 1, LRWORK >= N.
-* If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If N <= 1, LIWORK >= 1.
-* If JOBZ = 'N' and N > 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: ZPOTRF or ZHEEVD returned an error code:
-* <= N: if INFO = i and JOBZ = 'N', then the algorithm
-* failed to converge; i off-diagonal elements of an
-* intermediate tridiagonal form did not converge to
-* zero;
-* if INFO = i and JOBZ = 'V', then the algorithm
-* failed to compute an eigenvalue while working on
-* the submatrix lying in rows and columns INFO/(N+1)
-* through mod(INFO,N+1);
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
-* Modified so that no backsubstitution is performed if ZHEEVD fails to
-* converge (NEIG in old code could be greater than N causing out of
-* bounds reference to A - reported by Ralf Meyer). Also corrected the
-* description of INFO and the test on ITYPE. Sven, 16 Feb 05.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhegvx.f b/SRC/zhegvx.f
index bedc40b9..e3a1b89c 100644
--- a/SRC/zhegvx.f
+++ b/SRC/zhegvx.f
@@ -1,11 +1,307 @@
+*> \brief \b ZHEGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHEGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
+* VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
+* LWORK, RWORK, IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHEGVX computes selected eigenvalues, and optionally, eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be Hermitian and B is also positive definite.
+*> Eigenvalues and eigenvectors can be selected by specifying either a
+*> range of values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of A contains the
+*> upper triangular part of the matrix A. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of A contains
+*> the lower triangular part of the matrix A.
+*> \endverbatim
+*> \verbatim
+*> On exit, the lower triangle (if UPLO='L') or the upper
+*> triangle (if UPLO='U') of A, including the diagonal, is
+*> destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, the Hermitian matrix B. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of B contains the
+*> upper triangular part of the matrix B. If UPLO = 'L',
+*> the leading N-by-N lower triangular part of B contains
+*> the lower triangular part of the matrix B.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO <= N, the part of B containing the matrix is
+*> overwritten by the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing C to tridiagonal form, where C is the symmetric
+*> matrix of the standard symmetric problem to which the
+*> generalized problem is transformed.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'N', then Z is not referenced.
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**T*B*Z = I;
+*> if ITYPE = 3, Z**T*inv(B)*Z = I.
+*> \endverbatim
+*> \verbatim
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(1,2*N).
+*> For optimal efficiency, LWORK >= (NB+1)*N,
+*> where NB is the blocksize for ZHETRD returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: ZPOTRF or ZHEEVX returned an error code:
+*> <= N: if INFO = i, ZHEEVX failed to converge;
+*> i eigenvectors failed to converge. Their indices
+*> are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= N, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEeigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHEGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
$ VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
$ LWORK, RWORK, IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -19,174 +315,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHEGVX computes selected eigenvalues, and optionally, eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be Hermitian and B is also positive definite.
-* Eigenvalues and eigenvectors can be selected by specifying either a
-* range of values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-**
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of A contains the
-* upper triangular part of the matrix A. If UPLO = 'L',
-* the leading N-by-N lower triangular part of A contains
-* the lower triangular part of the matrix A.
-*
-* On exit, the lower triangle (if UPLO='L') or the upper
-* triangle (if UPLO='U') of A, including the diagonal, is
-* destroyed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB, N)
-* On entry, the Hermitian matrix B. If UPLO = 'U', the
-* leading N-by-N upper triangular part of B contains the
-* upper triangular part of the matrix B. If UPLO = 'L',
-* the leading N-by-N lower triangular part of B contains
-* the lower triangular part of the matrix B.
-*
-* On exit, if INFO <= N, the part of B containing the matrix is
-* overwritten by the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing C to tridiagonal form, where C is the symmetric
-* matrix of the standard symmetric problem to which the
-* generalized problem is transformed.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M))
-* If JOBZ = 'N', then Z is not referenced.
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**T*B*Z = I;
-* if ITYPE = 3, Z**T*inv(B)*Z = I.
-*
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(1,2*N).
-* For optimal efficiency, LWORK >= (NB+1)*N,
-* where NB is the blocksize for ZHETRD returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: ZPOTRF or ZHEEVX returned an error code:
-* <= N: if INFO = i, ZHEEVX failed to converge;
-* i eigenvectors failed to converge. Their indices
-* are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= N, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zherfs.f b/SRC/zherfs.f
index 7564decf..71e2a0fb 100644
--- a/SRC/zherfs.f
+++ b/SRC/zherfs.f
@@ -1,12 +1,193 @@
+*> \brief \b ZHERFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHERFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHERFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian indefinite, and
+*> provides error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**H or
+*> A = L*D*L**H as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZHETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+* =====================================================================
SUBROUTINE ZHERFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -19,93 +200,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHERFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian indefinite, and
-* provides error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**H or
-* A = L*D*L**H as computed by ZHETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHETRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZHETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zherfsx.f b/SRC/zherfsx.f
index 12a63765..f67bcaab 100644
--- a/SRC/zherfsx.f
+++ b/SRC/zherfsx.f
@@ -1,18 +1,422 @@
+*> \brief \b ZHERFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHERFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ), RWORK( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZHERFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian indefinite, and
+*> provides error bounds and backward error estimates for the
+*> solution. In addition to normwise error bound, the code provides
+*> maximum componentwise error bound if possible. See comments for
+*> ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or A =
+*> L*D*L**T as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+* =====================================================================
SUBROUTINE ZHERFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -27,274 +431,6 @@
$ ERR_BNDS_NORM( NRHS, * ),
$ ERR_BNDS_COMP( NRHS, * )
*
-* Purpose
-* =======
-*
-* ZHERFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian indefinite, and
-* provides error bounds and backward error estimates for the
-* solution. In addition to normwise error bound, the code provides
-* maximum componentwise error bound if possible. See comments for
-* ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or A =
-* L*D*L**T as computed by DSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zhesv.f b/SRC/zhesv.f
index 01b8ea0c..b1e74a99 100644
--- a/SRC/zhesv.f
+++ b/SRC/zhesv.f
@@ -1,11 +1,174 @@
+*> \brief <b> ZHESV computes the solution to system of linear equations A * X = B for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHESV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, LWORK, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHESV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**H, if UPLO = 'U', or
+*> A = L * D * L**H, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
+*> used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the block diagonal matrix D and the
+*> multipliers used to obtain the factor U or L from the
+*> factorization A = U*D*U**H or A = L*D*L**H as computed by
+*> ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by ZHETRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= 1, and for best performance
+*> LWORK >= max(1,N*NB), where NB is the optimal blocksize for
+*> ZHETRF.
+*> for LWORK < N, TRS will be done with Level BLAS 2
+*> for LWORK >= N, TRS will be done with Level BLAS 3
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEsolve
+*
+* =====================================================================
SUBROUTINE ZHESV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @precisions normal z -> c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,94 +179,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHESV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
-* matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**H, if UPLO = 'U', or
-* A = L * D * L**H, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
-* used to solve the system of equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the block diagonal matrix D and the
-* multipliers used to obtain the factor U or L from the
-* factorization A = U*D*U**H or A = L*D*L**H as computed by
-* ZHETRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by ZHETRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= 1, and for best performance
-* LWORK >= max(1,N*NB), where NB is the optimal blocksize for
-* ZHETRF.
-* for LWORK < N, TRS will be done with Level BLAS 2
-* for LWORK >= N, TRS will be done with Level BLAS 3
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zhesvx.f b/SRC/zhesvx.f
index d201a46f..311fbb15 100644
--- a/SRC/zhesvx.f
+++ b/SRC/zhesvx.f
@@ -1,11 +1,286 @@
+*> \brief <b> ZHESVX computes the solution to system of linear equations A * X = B for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHESVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
+* LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHESVX uses the diagonal pivoting factorization to compute the
+*> solution to a complex system of linear equations A * X = B,
+*> where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
+*> The form of the factorization is
+*> A = U * D * U**H, if UPLO = 'U', or
+*> A = L * D * L**H, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AF and IPIV contain the factored form
+*> of A. A, AF and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX*16 array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H as computed by ZHETRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by ZHETRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= max(1,2*N), and for best
+*> performance, when FACT = 'N', LWORK >= max(1,2*N,N*NB), where
+*> NB is the optimal blocksize for ZHETRF.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEsolve
+*
+* =====================================================================
SUBROUTINE ZHESVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
$ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -19,173 +294,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHESVX uses the diagonal pivoting factorization to compute the
-* solution to a complex system of linear equations A * X = B,
-* where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
-* The form of the factorization is
-* A = U * D * U**H, if UPLO = 'U', or
-* A = L * D * L**H, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AF and IPIV contain the factored form
-* of A. A, AF and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX*16 array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H as computed by ZHETRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by ZHETRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by ZHETRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= max(1,2*N), and for best
-* performance, when FACT = 'N', LWORK >= max(1,2*N,N*NB), where
-* NB is the optimal blocksize for ZHETRF.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhesvxx.f b/SRC/zhesvxx.f
index 88e4d5d2..618ae4f3 100644
--- a/SRC/zhesvxx.f
+++ b/SRC/zhesvxx.f
@@ -1,18 +1,520 @@
+*> \brief <b> ZHESVXX computes the solution to system of linear equations A * X = B for HE matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHESVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ), RWORK( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZHESVXX uses the diagonal pivoting factorization to compute the
+*> solution to a complex*16 system of linear equations A * X = B, where
+*> A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. ZHESVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> ZHESVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> ZHESVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what ZHESVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 3. If some D(i,i)=0, so that D is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is
+*> less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(R) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX*16 array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T as computed by DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block
+*> structure of D, as determined by ZHETRF. If IPIV(k) > 0,
+*> then rows and columns k and IPIV(k) were interchanged and
+*> D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
+*> IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
+*> -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
+*> diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
+*> then rows and columns k+1 and -IPIV(k) were interchanged
+*> and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block
+*> structure of D, as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEsolve
+*
+* =====================================================================
SUBROUTINE ZHESVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,365 +530,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHESVXX uses the diagonal pivoting factorization to compute the
-* solution to a complex*16 system of linear equations A * X = B, where
-* A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. ZHESVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* ZHESVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* ZHESVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what ZHESVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 3. If some D(i,i)=0, so that D is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is
-* less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(R) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX*16 array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T as computed by DSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block
-* structure of D, as determined by ZHETRF. If IPIV(k) > 0,
-* then rows and columns k and IPIV(k) were interchanged and
-* D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
-* IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
-* -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
-* diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
-* then rows and columns k+1 and -IPIV(k) were interchanged
-* and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block
-* structure of D, as determined by ZHETRF.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zheswapr.f b/SRC/zheswapr.f
index cfac1924..2fa9c5ef 100644
--- a/SRC/zheswapr.f
+++ b/SRC/zheswapr.f
@@ -1,54 +1,111 @@
- SUBROUTINE ZHESWAPR( UPLO, N, A, LDA, I1, I2)
+*> \brief \b ZHESWAPR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER I1, I2, LDA, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, N )
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZHESWAPR( UPLO, N, A, LDA, I1, I2)
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, N )
+*
* Purpose
* =======
*
-* ZHESWAPR applies an elementary permutation on the rows and the columns of
-* a hermitian matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHESWAPR applies an elementary permutation on the rows and the columns of
+*> a hermitian matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by CSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] I1
+*> \verbatim
+*> I1 is INTEGER
+*> Index of the first row to swap
+*> \endverbatim
+*>
+*> \param[in] I2
+*> \verbatim
+*> I2 is INTEGER
+*> Index of the second row to swap
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by CSYTRF.
+*> \date November 2011
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \ingroup complex16HEauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZHESWAPR( UPLO, N, A, LDA, I1, I2)
*
-* I1 (input) INTEGER
-* Index of the first row to swap
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* I2 (input) INTEGER
-* Index of the second row to swap
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, N )
*
* =====================================================================
*
diff --git a/SRC/zhetd2.f b/SRC/zhetd2.f
index 90d68af1..0a24e4cb 100644
--- a/SRC/zhetd2.f
+++ b/SRC/zhetd2.f
@@ -1,118 +1,152 @@
- SUBROUTINE ZHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
- COMPLEX*16 A( LDA, * ), TAU( * )
-* ..
-*
+*> \brief \b ZHETD2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* COMPLEX*16 A( LDA, * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* ZHETD2 reduces a complex Hermitian matrix A to real symmetric
-* tridiagonal form T by a unitary similarity transformation:
-* Q**H * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETD2 reduces a complex Hermitian matrix A to real symmetric
+*> tridiagonal form T by a unitary similarity transformation:
+*> Q**H * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the unitary
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the unitary matrix Q as a product
-* of elementary reflectors. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \date November 2011
*
-* TAU (output) COMPLEX*16 array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \ingroup complex16HEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) COMPLEX*16 array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*> A(1:i-1,i+1), and tau in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*> and tau in TAU(i).
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( d e v2 v3 v4 ) ( d )
+*> ( d e v3 v4 ) ( e d )
+*> ( d e v4 ) ( v1 e d )
+*> ( d e ) ( v1 v2 e d )
+*> ( d ) ( v1 v2 v3 e d )
+*>
+*> where d and e denote diagonal and off-diagonal elements of T, and vi
+*> denotes an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-* A(1:i-1,i+1), and tau in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-* and tau in TAU(i).
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( d e v2 v3 v4 ) ( d )
-* ( d e v3 v4 ) ( e d )
-* ( d e v4 ) ( v1 e d )
-* ( d e ) ( v1 v2 e d )
-* ( d ) ( v1 v2 v3 e d )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of T, and vi
-* denotes an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+ COMPLEX*16 A( LDA, * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhetf2.f b/SRC/zhetf2.f
index 199407ce..641411ab 100644
--- a/SRC/zhetf2.f
+++ b/SRC/zhetf2.f
@@ -1,9 +1,181 @@
+*> \brief \b ZHETF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHETF2( UPLO, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETF2 computes the factorization of a complex Hermitian matrix A
+*> using the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**H or A = L*D*L**H
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U**H is the conjugate transpose of U, and D is
+*> Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 09-29-06 - patch from
+*> Bobby Cheng, MathWorks
+*>
+*> Replace l.210 and l.393
+*> IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*> by
+*> IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN
+*>
+*> 01-01-96 - Based on modifications by
+*> J. Lewis, Boeing Computer Services Company
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> If UPLO = 'U', then A = U*D*U**H, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**H, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHETF2( UPLO, N, A, LDA, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,114 +186,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHETF2 computes the factorization of a complex Hermitian matrix A
-* using the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**H or A = L*D*L**H
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U**H is the conjugate transpose of U, and D is
-* Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 09-29-06 - patch from
-* Bobby Cheng, MathWorks
-*
-* Replace l.210 and l.393
-* IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
-* by
-* IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN
-*
-* 01-01-96 - Based on modifications by
-* J. Lewis, Boeing Computer Services Company
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* If UPLO = 'U', then A = U*D*U**H, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**H, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhetrd.f b/SRC/zhetrd.f
index b816648c..83417ba3 100644
--- a/SRC/zhetrd.f
+++ b/SRC/zhetrd.f
@@ -1,129 +1,163 @@
- SUBROUTINE ZHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZHETRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZHETRD reduces a complex Hermitian matrix A to real symmetric
-* tridiagonal form T by a unitary similarity transformation:
-* Q**H * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETRD reduces a complex Hermitian matrix A to real symmetric
+*> tridiagonal form T by a unitary similarity transformation:
+*> Q**H * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the unitary
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the unitary matrix Q as a product
-* of elementary reflectors. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
-*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
-*
-* TAU (output) COMPLEX*16 array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1.
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16HEcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) COMPLEX*16 array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>
+*> LWORK (input) INTEGER
+*> The dimension of the array WORK. LWORK >= 1.
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*>
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*> A(1:i-1,i+1), and tau in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*> and tau in TAU(i).
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( d e v2 v3 v4 ) ( d )
+*> ( d e v3 v4 ) ( e d )
+*> ( d e v4 ) ( v1 e d )
+*> ( d e ) ( v1 v2 e d )
+*> ( d ) ( v1 v2 v3 e d )
+*>
+*> where d and e denote diagonal and off-diagonal elements of T, and vi
+*> denotes an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-* A(1:i-1,i+1), and tau in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-* and tau in TAU(i).
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( d e v2 v3 v4 ) ( d )
-* ( d e v3 v4 ) ( e d )
-* ( d e v4 ) ( v1 e d )
-* ( d e ) ( v1 v2 e d )
-* ( d ) ( v1 v2 v3 e d )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d and e denote diagonal and off-diagonal elements of T, and vi
-* denotes an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhetrf.f b/SRC/zhetrf.f
index 024f79f5..6caae895 100644
--- a/SRC/zhetrf.f
+++ b/SRC/zhetrf.f
@@ -1,9 +1,181 @@
+*> \brief \b ZHETRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHETRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETRF computes the factorization of a complex Hermitian matrix A
+*> using the Bunch-Kaufman diagonal pivoting method. The form of the
+*> factorization is
+*>
+*> A = U*D*U**H or A = L*D*L**H
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1. For best performance
+*> LWORK >= N*NB, where NB is the block size returned by ILAENV.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> If UPLO = 'U', then A = U*D*U**H, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**H, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHETRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,108 +186,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHETRF computes the factorization of a complex Hermitian matrix A
-* using the Bunch-Kaufman diagonal pivoting method. The form of the
-* factorization is
-*
-* A = U*D*U**H or A = L*D*L**H
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1. For best performance
-* LWORK >= N*NB, where NB is the block size returned by ILAENV.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* If UPLO = 'U', then A = U*D*U**H, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**H, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zhetri.f b/SRC/zhetri.f
index 428a3089..58c5fe6b 100644
--- a/SRC/zhetri.f
+++ b/SRC/zhetri.f
@@ -1,63 +1,125 @@
- SUBROUTINE ZHETRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b ZHETRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHETRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZHETRI computes the inverse of a complex Hermitian indefinite matrix
-* A using the factorization A = U*D*U**H or A = L*D*L**H computed by
-* ZHETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETRI computes the inverse of a complex Hermitian indefinite matrix
+*> A using the factorization A = U*D*U**H or A = L*D*L**H computed by
+*> ZHETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (Hermitian) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZHETRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the (Hermitian) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complex16HEcomputational
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHETRF.
+* =====================================================================
+ SUBROUTINE ZHETRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhetri2.f b/SRC/zhetri2.f
index 124d2a25..b67b143c 100644
--- a/SRC/zhetri2.f
+++ b/SRC/zhetri2.f
@@ -1,13 +1,129 @@
+*> \brief \b ZHETRI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHETRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETRI2 computes the inverse of a COMPLEX*16 hermitian indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> ZHETRF. ZHETRI2 set the LEADING DIMENSION of the workspace
+*> before calling ZHETRI2X that actually computes the inverse.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NB structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N+NB+1)*(NB+3)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> WORK is size >= (N+NB+1)*(NB+3)
+*> If LDWORK = -1, then a workspace query is assumed; the routine
+*> calculates:
+*> - the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array,
+*> - and no error message related to LDWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+* =====================================================================
SUBROUTINE ZHETRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* -- Written by Julie Langou of the Univ. of TN --
-*
-* @precisions normal z -> c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,61 +134,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHETRI2 computes the inverse of a COMPLEX*16 hermitian indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* ZHETRF. ZHETRI2 set the LEADING DIMENSION of the workspace
-* before calling ZHETRI2X that actually computes the inverse.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZHETRF.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NB structure of D
-* as determined by ZHETRF.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N+NB+1)*(NB+3)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* WORK is size >= (N+NB+1)*(NB+3)
-* If LDWORK = -1, then a workspace query is assumed; the routine
-* calculates:
-* - the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array,
-* - and no error message related to LDWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zhetri2x.f b/SRC/zhetri2x.f
index e81d4b27..4199dcbf 100644
--- a/SRC/zhetri2x.f
+++ b/SRC/zhetri2x.f
@@ -1,68 +1,131 @@
- SUBROUTINE ZHETRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*> \brief \b ZHETRI2X
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N, NB
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), WORK( N+NB+1,* )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZHETRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( N+NB+1,* )
+* ..
+*
* Purpose
* =======
*
-* ZHETRI2X computes the inverse of a COMPLEX*16 Hermitian indefinite matrix
-* A using the factorization A = U*D*U**H or A = L*D*L**H computed by
-* ZHETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETRI2X computes the inverse of a COMPLEX*16 Hermitian indefinite matrix
+*> A using the factorization A = U*D*U**H or A = L*D*L**H computed by
+*> ZHETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the NNB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZHETRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the NNB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NNB structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N+NNB+1,NNB+3)
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NNB structure of D
-* as determined by ZHETRF.
+*> \ingroup complex16HEcomputational
*
-* WORK (workspace) COMPLEX*16 array, dimension (N+NNB+1,NNB+3)
+* =====================================================================
+ SUBROUTINE ZHETRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
*
-* NB (input) INTEGER
-* Block size
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), WORK( N+NB+1,* )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhetrs.f b/SRC/zhetrs.f
index e4477c0f..648448ad 100644
--- a/SRC/zhetrs.f
+++ b/SRC/zhetrs.f
@@ -1,63 +1,130 @@
- SUBROUTINE ZHETRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZHETRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHETRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZHETRS solves a system of linear equations A*X = B with a complex
-* Hermitian matrix A using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by ZHETRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETRS solves a system of linear equations A*X = B with a complex
+*> Hermitian matrix A using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by ZHETRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHETRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHETRF.
+*> \ingroup complex16HEcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE ZHETRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhetrs2.f b/SRC/zhetrs2.f
index 6557e3e3..ac1b53b5 100644
--- a/SRC/zhetrs2.f
+++ b/SRC/zhetrs2.f
@@ -1,69 +1,137 @@
- SUBROUTINE ZHETRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
- $ WORK, INFO )
+*> \brief \b ZHETRS2
*
-* -- LAPACK PROTOTYPE routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZHETRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZHETRS2 solves a system of linear equations A*X = B with a complex
-* Hermitian matrix A using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by ZHETRF and converted by ZSYCONV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHETRS2 solves a system of linear equations A*X = B with a complex
+*> Hermitian matrix A using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by ZHETRF and converted by ZSYCONV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHETRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHETRF.
+*> \date November 2011
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \ingroup complex16HEcomputational
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZHETRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+ $ WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhfrk.f b/SRC/zhfrk.f
index f8f92e34..4a7ae4bf 100644
--- a/SRC/zhfrk.f
+++ b/SRC/zhfrk.f
@@ -1,111 +1,184 @@
- SUBROUTINE ZHFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
- $ C )
+*> \brief \b ZHFRK
*
-* -- LAPACK routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Julien Langou of the Univ. of Colorado Denver --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER K, LDA, N
- CHARACTER TRANS, TRANSR, UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), C( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZHFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
+* C )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER K, LDA, N
+* CHARACTER TRANS, TRANSR, UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( * )
+* ..
+*
* Purpose
* =======
*
-* Level 3 BLAS like routine for C in RFP Format.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Level 3 BLAS like routine for C in RFP Format.
+*>
+*> ZHFRK performs one of the Hermitian rank--k operations
+*>
+*> C := alpha*A*A**H + beta*C,
+*>
+*> or
+*>
+*> C := alpha*A**H*A + beta*C,
+*>
+*> where alpha and beta are real scalars, C is an n--by--n Hermitian
+*> matrix and A is an n--by--k matrix in the first case and a k--by--n
+*> matrix in the second case.
+*>
+*>\endverbatim
*
-* ZHFRK performs one of the Hermitian rank--k operations
+* Arguments
+* =========
+*
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal Form of RFP A is stored;
+*> = 'C': The Conjugate-transpose Form of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array C is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of C
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix C. N must be
+*> at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> On entry with TRANS = 'N' or 'n', K specifies the number
+*> of columns of the matrix A, and on entry with
+*> TRANS = 'C' or 'c', K specifies the number of rows of the
+*> matrix A. K must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION (LDA,ka)
+*> where KA
+*> is K when TRANS = 'N' or 'n', and is N otherwise. Before
+*> entry with TRANS = 'N' or 'n', the leading N--by--K part of
+*> the array A must contain the matrix A, otherwise the leading
+*> K--by--N part of the array A must contain the matrix A.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. When TRANS = 'N' or 'n'
+*> then LDA must be at least max( 1, n ), otherwise LDA must
+*> be at least max( 1, k ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> On entry, BETA specifies the scalar beta.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the matrix A in RFP Format. RFP Format is
+*> described by TRANSR, UPLO and N. Note that the imaginary
+*> parts of the diagonal elements need not be set, they are
+*> assumed to be zero, and on exit they are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C := alpha*A*A**H + beta*C,
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* or
+*> \date November 2011
*
-* C := alpha*A**H*A + beta*C,
+*> \ingroup complex16OTHERcomputational
*
-* where alpha and beta are real scalars, C is an n--by--n Hermitian
-* matrix and A is an n--by--k matrix in the first case and a k--by--n
-* matrix in the second case.
+* =====================================================================
+ SUBROUTINE ZHFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
+ $ C )
*
-* Arguments
-* ==========
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal Form of RFP A is stored;
-* = 'C': The Conjugate-transpose Form of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array C is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of C
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of C
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* TRANS (input) CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* TRANS = 'N' or 'n' C := alpha*A*A**H + beta*C.
-*
-* TRANS = 'C' or 'c' C := alpha*A**H*A + beta*C.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix C. N must be
-* at least zero.
-* Unchanged on exit.
-*
-* K (input) INTEGER
-* On entry with TRANS = 'N' or 'n', K specifies the number
-* of columns of the matrix A, and on entry with
-* TRANS = 'C' or 'c', K specifies the number of rows of the
-* matrix A. K must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) DOUBLE PRECISION
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX*16 array of DIMENSION (LDA,ka)
-* where KA
-* is K when TRANS = 'N' or 'n', and is N otherwise. Before
-* entry with TRANS = 'N' or 'n', the leading N--by--K part of
-* the array A must contain the matrix A, otherwise the leading
-* K--by--N part of the array A must contain the matrix A.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. When TRANS = 'N' or 'n'
-* then LDA must be at least max( 1, n ), otherwise LDA must
-* be at least max( 1, k ).
-* Unchanged on exit.
-*
-* BETA (input) DOUBLE PRECISION
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* C (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the matrix A in RFP Format. RFP Format is
-* described by TRANSR, UPLO and N. Note that the imaginary
-* parts of the diagonal elements need not be set, they are
-* assumed to be zero, and on exit they are set to zero.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER K, LDA, N
+ CHARACTER TRANS, TRANSR, UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), C( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhgeqz.f b/SRC/zhgeqz.f
index ced2f48d..87088e88 100644
--- a/SRC/zhgeqz.f
+++ b/SRC/zhgeqz.f
@@ -1,11 +1,289 @@
+*> \brief \b ZHGEQZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
+* ALPHA, BETA, Q, LDQ, Z, LDZ, WORK, LWORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, COMPZ, JOB
+* INTEGER IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 ALPHA( * ), BETA( * ), H( LDH, * ),
+* $ Q( LDQ, * ), T( LDT, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHGEQZ computes the eigenvalues of a complex matrix pair (H,T),
+*> where H is an upper Hessenberg matrix and T is upper triangular,
+*> using the single-shift QZ method.
+*> Matrix pairs of this type are produced by the reduction to
+*> generalized upper Hessenberg form of a complex matrix pair (A,B):
+*>
+*> A = Q1*H*Z1**H, B = Q1*T*Z1**H,
+*>
+*> as computed by ZGGHRD.
+*>
+*> If JOB='S', then the Hessenberg-triangular pair (H,T) is
+*> also reduced to generalized Schur form,
+*>
+*> H = Q*S*Z**H, T = Q*P*Z**H,
+*>
+*> where Q and Z are unitary matrices and S and P are upper triangular.
+*>
+*> Optionally, the unitary matrix Q from the generalized Schur
+*> factorization may be postmultiplied into an input matrix Q1, and the
+*> unitary matrix Z may be postmultiplied into an input matrix Z1.
+*> If Q1 and Z1 are the unitary matrices from ZGGHRD that reduced
+*> the matrix pair (A,B) to generalized Hessenberg form, then the output
+*> matrices Q1*Q and Z1*Z are the unitary factors from the generalized
+*> Schur factorization of (A,B):
+*>
+*> A = (Q1*Q)*S*(Z1*Z)**H, B = (Q1*Q)*P*(Z1*Z)**H.
+*>
+*> To avoid overflow, eigenvalues of the matrix pair (H,T)
+*> (equivalently, of (A,B)) are computed as a pair of complex values
+*> (alpha,beta). If beta is nonzero, lambda = alpha / beta is an
+*> eigenvalue of the generalized nonsymmetric eigenvalue problem (GNEP)
+*> A*x = lambda*B*x
+*> and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
+*> alternate form of the GNEP
+*> mu*A*y = B*y.
+*> The values of alpha and beta for the i-th eigenvalue can be read
+*> directly from the generalized Schur form: alpha = S(i,i),
+*> beta = P(i,i).
+*>
+*> Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
+*> Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
+*> pp. 241--256.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> = 'E': Compute eigenvalues only;
+*> = 'S': Computer eigenvalues and the Schur form.
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'N': Left Schur vectors (Q) are not computed;
+*> = 'I': Q is initialized to the unit matrix and the matrix Q
+*> of left Schur vectors of (H,T) is returned;
+*> = 'V': Q must contain a unitary matrix Q1 on entry and
+*> the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Right Schur vectors (Z) are not computed;
+*> = 'I': Q is initialized to the unit matrix and the matrix Z
+*> of right Schur vectors of (H,T) is returned;
+*> = 'V': Z must contain a unitary matrix Z1 on entry and
+*> the product Z1*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices H, T, Q, and Z. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI mark the rows and columns of H which are in
+*> Hessenberg form. It is assumed that A is already upper
+*> triangular in rows and columns 1:ILO-1 and IHI+1:N.
+*> If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH, N)
+*> On entry, the N-by-N upper Hessenberg matrix H.
+*> On exit, if JOB = 'S', H contains the upper triangular
+*> matrix S from the generalized Schur factorization.
+*> If JOB = 'E', the diagonal of H matches that of S, but
+*> the rest of H is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT, N)
+*> On entry, the N-by-N upper triangular matrix T.
+*> On exit, if JOB = 'S', T contains the upper triangular
+*> matrix P from the generalized Schur factorization.
+*> If JOB = 'E', the diagonal of T matches that of P, but
+*> the rest of T is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> The complex scalars alpha that define the eigenvalues of
+*> GNEP. ALPHA(i) = S(i,i) in the generalized Schur
+*> factorization.
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> The real non-negative scalars beta that define the
+*> eigenvalues of GNEP. BETA(i) = P(i,i) in the generalized
+*> Schur factorization.
+*> \endverbatim
+*> \verbatim
+*> Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
+*> represent the j-th eigenvalue of the matrix pair (A,B), in
+*> one of the forms lambda = alpha/beta or mu = beta/alpha.
+*> Since either lambda or mu may overflow, they should not,
+*> in general, be computed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ, N)
+*> On entry, if COMPZ = 'V', the unitary matrix Q1 used in the
+*> reduction of (A,B) to generalized Hessenberg form.
+*> On exit, if COMPZ = 'I', the unitary matrix of left Schur
+*> vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
+*> left Schur vectors of (A,B).
+*> Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If COMPQ='V' or 'I', then LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the unitary matrix Z1 used in the
+*> reduction of (A,B) to generalized Hessenberg form.
+*> On exit, if COMPZ = 'I', the unitary matrix of right Schur
+*> vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
+*> right Schur vectors of (A,B).
+*> Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If COMPZ='V' or 'I', then LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1,...,N: the QZ iteration did not converge. (H,T) is not
+*> in Schur form, but ALPHA(i) and BETA(i),
+*> i=INFO+1,...,N should be correct.
+*> = N+1,...,2*N: the shift calculation failed. (H,T) is not
+*> in Schur form, but ALPHA(i) and BETA(i),
+*> i=INFO-N+1,...,N should be correct.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We assume that complex ABS works as long as its value is less than
+*> overflow.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
$ ALPHA, BETA, Q, LDQ, Z, LDZ, WORK, LWORK,
$ RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, COMPZ, JOB
@@ -18,173 +296,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHGEQZ computes the eigenvalues of a complex matrix pair (H,T),
-* where H is an upper Hessenberg matrix and T is upper triangular,
-* using the single-shift QZ method.
-* Matrix pairs of this type are produced by the reduction to
-* generalized upper Hessenberg form of a complex matrix pair (A,B):
-*
-* A = Q1*H*Z1**H, B = Q1*T*Z1**H,
-*
-* as computed by ZGGHRD.
-*
-* If JOB='S', then the Hessenberg-triangular pair (H,T) is
-* also reduced to generalized Schur form,
-*
-* H = Q*S*Z**H, T = Q*P*Z**H,
-*
-* where Q and Z are unitary matrices and S and P are upper triangular.
-*
-* Optionally, the unitary matrix Q from the generalized Schur
-* factorization may be postmultiplied into an input matrix Q1, and the
-* unitary matrix Z may be postmultiplied into an input matrix Z1.
-* If Q1 and Z1 are the unitary matrices from ZGGHRD that reduced
-* the matrix pair (A,B) to generalized Hessenberg form, then the output
-* matrices Q1*Q and Z1*Z are the unitary factors from the generalized
-* Schur factorization of (A,B):
-*
-* A = (Q1*Q)*S*(Z1*Z)**H, B = (Q1*Q)*P*(Z1*Z)**H.
-*
-* To avoid overflow, eigenvalues of the matrix pair (H,T)
-* (equivalently, of (A,B)) are computed as a pair of complex values
-* (alpha,beta). If beta is nonzero, lambda = alpha / beta is an
-* eigenvalue of the generalized nonsymmetric eigenvalue problem (GNEP)
-* A*x = lambda*B*x
-* and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
-* alternate form of the GNEP
-* mu*A*y = B*y.
-* The values of alpha and beta for the i-th eigenvalue can be read
-* directly from the generalized Schur form: alpha = S(i,i),
-* beta = P(i,i).
-*
-* Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
-* Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
-* pp. 241--256.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* = 'E': Compute eigenvalues only;
-* = 'S': Computer eigenvalues and the Schur form.
-*
-* COMPQ (input) CHARACTER*1
-* = 'N': Left Schur vectors (Q) are not computed;
-* = 'I': Q is initialized to the unit matrix and the matrix Q
-* of left Schur vectors of (H,T) is returned;
-* = 'V': Q must contain a unitary matrix Q1 on entry and
-* the product Q1*Q is returned.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Right Schur vectors (Z) are not computed;
-* = 'I': Q is initialized to the unit matrix and the matrix Z
-* of right Schur vectors of (H,T) is returned;
-* = 'V': Z must contain a unitary matrix Z1 on entry and
-* the product Z1*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrices H, T, Q, and Z. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* ILO and IHI mark the rows and columns of H which are in
-* Hessenberg form. It is assumed that A is already upper
-* triangular in rows and columns 1:ILO-1 and IHI+1:N.
-* If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
-*
-* H (input/output) COMPLEX*16 array, dimension (LDH, N)
-* On entry, the N-by-N upper Hessenberg matrix H.
-* On exit, if JOB = 'S', H contains the upper triangular
-* matrix S from the generalized Schur factorization.
-* If JOB = 'E', the diagonal of H matches that of S, but
-* the rest of H is unspecified.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max( 1, N ).
-*
-* T (input/output) COMPLEX*16 array, dimension (LDT, N)
-* On entry, the N-by-N upper triangular matrix T.
-* On exit, if JOB = 'S', T contains the upper triangular
-* matrix P from the generalized Schur factorization.
-* If JOB = 'E', the diagonal of T matches that of P, but
-* the rest of T is unspecified.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max( 1, N ).
-*
-* ALPHA (output) COMPLEX*16 array, dimension (N)
-* The complex scalars alpha that define the eigenvalues of
-* GNEP. ALPHA(i) = S(i,i) in the generalized Schur
-* factorization.
-*
-* BETA (output) COMPLEX*16 array, dimension (N)
-* The real non-negative scalars beta that define the
-* eigenvalues of GNEP. BETA(i) = P(i,i) in the generalized
-* Schur factorization.
-*
-* Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
-* represent the j-th eigenvalue of the matrix pair (A,B), in
-* one of the forms lambda = alpha/beta or mu = beta/alpha.
-* Since either lambda or mu may overflow, they should not,
-* in general, be computed.
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ, N)
-* On entry, if COMPZ = 'V', the unitary matrix Q1 used in the
-* reduction of (A,B) to generalized Hessenberg form.
-* On exit, if COMPZ = 'I', the unitary matrix of left Schur
-* vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
-* left Schur vectors of (A,B).
-* Not referenced if COMPZ = 'N'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If COMPQ='V' or 'I', then LDQ >= N.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the unitary matrix Z1 used in the
-* reduction of (A,B) to generalized Hessenberg form.
-* On exit, if COMPZ = 'I', the unitary matrix of right Schur
-* vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
-* right Schur vectors of (A,B).
-* Not referenced if COMPZ = 'N'.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If COMPZ='V' or 'I', then LDZ >= N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1,...,N: the QZ iteration did not converge. (H,T) is not
-* in Schur form, but ALPHA(i) and BETA(i),
-* i=INFO+1,...,N should be correct.
-* = N+1,...,2*N: the shift calculation failed. (H,T) is not
-* in Schur form, but ALPHA(i) and BETA(i),
-* i=INFO-N+1,...,N should be correct.
-*
-* Further Details
-* ===============
-*
-* We assume that complex ABS works as long as its value is less than
-* overflow.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhpcon.f b/SRC/zhpcon.f
index 687f7271..4dfe1c45 100644
--- a/SRC/zhpcon.f
+++ b/SRC/zhpcon.f
@@ -1,11 +1,119 @@
+*> \brief \b ZHPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPCON estimates the reciprocal of the condition number of a complex
+*> Hermitian packed matrix A using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by ZHPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHPTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZHPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,51 +125,6 @@
COMPLEX*16 AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPCON estimates the reciprocal of the condition number of a complex
-* Hermitian packed matrix A using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by ZHPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHPTRF, stored as a
-* packed triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHPTRF.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhpev.f b/SRC/zhpev.f
index 2e080971..f632fb1e 100644
--- a/SRC/zhpev.f
+++ b/SRC/zhpev.f
@@ -1,10 +1,140 @@
+*> \brief <b> ZHPEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPEV computes all the eigenvalues and, optionally, eigenvectors of a
+*> complex Hermitian matrix in packed storage.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (max(1, 2*N-1))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZHPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, RWORK,
$ INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,64 +145,6 @@
COMPLEX*16 AP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPEV computes all the eigenvalues and, optionally, eigenvectors of a
-* complex Hermitian matrix in packed storage.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (max(1, 2*N-1))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(1, 3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhpevd.f b/SRC/zhpevd.f
index 12a3b497..dac8ce4f 100644
--- a/SRC/zhpevd.f
+++ b/SRC/zhpevd.f
@@ -1,10 +1,206 @@
+*> \brief <b> ZHPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
+* RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, LDZ, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPEVD computes all the eigenvalues and, optionally, eigenvectors of
+*> a complex Hermitian matrix A in packed storage. If eigenvectors are
+*> desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
+*> eigenvectors of the matrix A, with the i-th column of Z
+*> holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the required LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of array WORK.
+*> If N <= 1, LWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LWORK must be at least 2*N.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the required sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (LRWORK)
+*> On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of array RWORK.
+*> If N <= 1, LRWORK must be at least 1.
+*> If JOBZ = 'N' and N > 1, LRWORK must be at least N.
+*> If JOBZ = 'V' and N > 1, LRWORK must be at least
+*> 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the algorithm failed to converge; i
+*> off-diagonal elements of an intermediate tridiagonal
+*> form did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZHPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
$ RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,114 +212,6 @@
COMPLEX*16 AP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPEVD computes all the eigenvalues and, optionally, eigenvectors of
-* a complex Hermitian matrix A in packed storage. If eigenvectors are
-* desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
-* eigenvectors of the matrix A, with the i-th column of Z
-* holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the required LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of array WORK.
-* If N <= 1, LWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LWORK must be at least 2*N.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the required sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LRWORK)
-* On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of array RWORK.
-* If N <= 1, LRWORK must be at least 1.
-* If JOBZ = 'N' and N > 1, LRWORK must be at least N.
-* If JOBZ = 'V' and N > 1, LRWORK must be at least
-* 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If JOBZ = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the algorithm failed to converge; i
-* off-diagonal elements of an intermediate tridiagonal
-* form did not converge to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhpevx.f b/SRC/zhpevx.f
index 40a26f5c..fdd2c7c1 100644
--- a/SRC/zhpevx.f
+++ b/SRC/zhpevx.f
@@ -1,11 +1,239 @@
+*> \brief <b> ZHPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, WORK, RWORK, IWORK,
+* IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, IU, LDZ, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPEVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex Hermitian matrix A in packed storage.
+*> Eigenvalues/vectors can be selected by specifying either a range of
+*> values or a range of indices for the desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, AP is overwritten by values generated during the
+*> reduction to tridiagonal form. If UPLO = 'U', the diagonal
+*> and first superdiagonal of the tridiagonal matrix T overwrite
+*> the corresponding elements of A, and if UPLO = 'L', the
+*> diagonal and first subdiagonal of T overwrite the
+*> corresponding elements of A.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AP to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*> \verbatim
+*> See "Computing Small Singular Values of Bidiagonal Matrices
+*> with Guaranteed High Relative Accuracy," by Demmel and
+*> Kahan, LAPACK Working Note #3.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the selected eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M))
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and
+*> the index of the eigenvector is returned in IFAIL.
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge.
+*> Their indices are stored in array IFAIL.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZHPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, WORK, RWORK, IWORK,
$ IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.2) --
+* -- LAPACK eigen routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,128 +246,6 @@
COMPLEX*16 AP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPEVX computes selected eigenvalues and, optionally, eigenvectors
-* of a complex Hermitian matrix A in packed storage.
-* Eigenvalues/vectors can be selected by specifying either a range of
-* values or a range of indices for the desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, AP is overwritten by values generated during the
-* reduction to tridiagonal form. If UPLO = 'U', the diagonal
-* and first superdiagonal of the tridiagonal matrix T overwrite
-* the corresponding elements of A, and if UPLO = 'L', the
-* diagonal and first subdiagonal of T overwrite the
-* corresponding elements of A.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-*
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AP to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* See "Computing Small Singular Values of Bidiagonal Matrices
-* with Guaranteed High Relative Accuracy," by Demmel and
-* Kahan, LAPACK Working Note #3.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the selected eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M))
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and
-* the index of the eigenvector is returned in IFAIL.
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge.
-* Their indices are stored in array IFAIL.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhpgst.f b/SRC/zhpgst.f
index eb9e35d8..d2f0b27b 100644
--- a/SRC/zhpgst.f
+++ b/SRC/zhpgst.f
@@ -1,65 +1,123 @@
- SUBROUTINE ZHPGST( ITYPE, UPLO, N, AP, BP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, ITYPE, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( * ), BP( * )
-* ..
-*
+*> \brief \b ZHPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPGST( ITYPE, UPLO, N, AP, BP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, ITYPE, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * ), BP( * )
+* ..
+*
* Purpose
* =======
*
-* ZHPGST reduces a complex Hermitian-definite generalized
-* eigenproblem to standard form, using packed storage.
-*
-* If ITYPE = 1, the problem is A*x = lambda*B*x,
-* and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
-*
-* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
-* B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L.
-*
-* B must have been previously factorized as U**H*U or L*L**H by ZPPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPGST reduces a complex Hermitian-definite generalized
+*> eigenproblem to standard form, using packed storage.
+*>
+*> If ITYPE = 1, the problem is A*x = lambda*B*x,
+*> and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H)
+*>
+*> If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or
+*> B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L.
+*>
+*> B must have been previously factorized as U**H*U or L*L**H by ZPPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
-* = 2 or 3: compute U*A*U**H or L**H*A*L.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H);
+*> = 2 or 3: compute U*A*U**H or L**H*A*L.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored and B is factored as
+*> U**H*U;
+*> = 'L': Lower triangle of A is stored and B is factored as
+*> L*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the transformed matrix, stored in the
+*> same format as A.
+*> \endverbatim
+*>
+*> \param[in] BP
+*> \verbatim
+*> BP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The triangular factor from the Cholesky factorization of B,
+*> stored in the same format as A, as returned by ZPPTRF.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored and B is factored as
-* U**H*U;
-* = 'L': Lower triangle of A is stored and B is factored as
-* L*L**H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
+*> \date November 2011
*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \ingroup complex16OTHERcomputational
*
-* On exit, if INFO = 0, the transformed matrix, stored in the
-* same format as A.
+* =====================================================================
+ SUBROUTINE ZHPGST( ITYPE, UPLO, N, AP, BP, INFO )
*
-* BP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The triangular factor from the Cholesky factorization of B,
-* stored in the same format as A, as returned by ZPPTRF.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, ITYPE, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( * ), BP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhpgv.f b/SRC/zhpgv.f
index 2828c8aa..e0b9f490 100644
--- a/SRC/zhpgv.f
+++ b/SRC/zhpgv.f
@@ -1,10 +1,168 @@
+*> \brief \b ZHPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPGV computes all the eigenvalues and, optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
+*> Here A and B are assumed to be Hermitian, stored in packed format,
+*> and B is also positive definite.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors. The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (max(1, 2*N-1))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: ZPPTRF or ZHPEV returned an error code:
+*> <= N: if INFO = i, ZHPEV failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not convergeto zero;
+*> > N: if INFO = N + i, for 1 <= i <= n, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+* =====================================================================
SUBROUTINE ZHPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -15,85 +173,6 @@
COMPLEX*16 AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPGV computes all the eigenvalues and, optionally, the eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
-* Here A and B are assumed to be Hermitian, stored in packed format,
-* and B is also positive definite.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H, in the same storage
-* format as B.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors. The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (max(1, 2*N-1))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(1, 3*N-2))
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: ZPPTRF or ZHPEV returned an error code:
-* <= N: if INFO = i, ZHPEV failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not convergeto zero;
-* > N: if INFO = N + i, for 1 <= i <= n, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zhpgvd.f b/SRC/zhpgvd.f
index dd764004..25175407 100644
--- a/SRC/zhpgvd.f
+++ b/SRC/zhpgvd.f
@@ -1,10 +1,243 @@
+*> \brief \b ZHPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
+* LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, UPLO
+* INTEGER INFO, ITYPE, LDZ, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPGVD computes all the eigenvalues and, optionally, the eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be Hermitian, stored in packed format, and B is also
+*> positive definite.
+*> If eigenvectors are desired, it uses a divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
+*> eigenvectors. The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> If JOBZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the required LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If N <= 1, LWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LWORK >= N.
+*> If JOBZ = 'V' and N > 1, LWORK >= 2*N.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the required sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
+*> On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of array RWORK.
+*> If N <= 1, LRWORK >= 1.
+*> If JOBZ = 'N' and N > 1, LRWORK >= N.
+*> If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of array IWORK.
+*> If JOBZ = 'N' or N <= 1, LIWORK >= 1.
+*> If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the required sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: ZPPTRF or ZHPEVD returned an error code:
+*> <= N: if INFO = i, ZHPEVD failed to converge;
+*> i off-diagonal elements of an intermediate
+*> tridiagonal form did not convergeto zero;
+*> > N: if INFO = N + i, for 1 <= i <= n, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
$ LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, UPLO
@@ -16,139 +249,6 @@
COMPLEX*16 AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPGVD computes all the eigenvalues and, optionally, the eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be Hermitian, stored in packed format, and B is also
-* positive definite.
-* If eigenvectors are desired, it uses a divide and conquer algorithm.
-*
-* The divide and conquer algorithm makes very mild assumptions about
-* floating point arithmetic. It will work on machines with a guard
-* digit in add/subtract, or on those binary machines without guard
-* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-* Cray-2. It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H, in the same storage
-* format as B.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, the eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of
-* eigenvectors. The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-* If JOBZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the required LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If N <= 1, LWORK >= 1.
-* If JOBZ = 'N' and N > 1, LWORK >= N.
-* If JOBZ = 'V' and N > 1, LWORK >= 2*N.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the required sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
-* On exit, if INFO = 0, RWORK(1) returns the required LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of array RWORK.
-* If N <= 1, LRWORK >= 1.
-* If JOBZ = 'N' and N > 1, LRWORK >= N.
-* If JOBZ = 'V' and N > 1, LRWORK >= 1 + 5*N + 2*N**2.
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of array IWORK.
-* If JOBZ = 'N' or N <= 1, LIWORK >= 1.
-* If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the required sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: ZPPTRF or ZHPEVD returned an error code:
-* <= N: if INFO = i, ZHPEVD failed to converge;
-* i off-diagonal elements of an intermediate
-* tridiagonal form did not convergeto zero;
-* > N: if INFO = N + i, for 1 <= i <= n, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zhpgvx.f b/SRC/zhpgvx.f
index 296dfb2a..f4953682 100644
--- a/SRC/zhpgvx.f
+++ b/SRC/zhpgvx.f
@@ -1,11 +1,277 @@
+*> \brief \b ZHPGST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
+* IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE, UPLO
+* INTEGER IL, INFO, ITYPE, IU, LDZ, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IFAIL( * ), IWORK( * )
+* DOUBLE PRECISION RWORK( * ), W( * )
+* COMPLEX*16 AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPGVX computes selected eigenvalues and, optionally, eigenvectors
+*> of a complex generalized Hermitian-definite eigenproblem, of the form
+*> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
+*> B are assumed to be Hermitian, stored in packed format, and B is also
+*> positive definite. Eigenvalues and eigenvectors can be selected by
+*> specifying either a range of values or a range of indices for the
+*> desired eigenvalues.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the problem type to be solved:
+*> = 1: A*x = (lambda)*B*x
+*> = 2: A*B*x = (lambda)*x
+*> = 3: B*A*x = (lambda)*x
+*> \endverbatim
+*>
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found;
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found;
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangles of A and B are stored;
+*> = 'L': Lower triangles of A and B are stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the contents of AP are destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] BP
+*> \verbatim
+*> BP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> B, packed columnwise in a linear array. The j-th column of B
+*> is stored in the array BP as follows:
+*> if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
+*> if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the triangular factor U or L from the Cholesky
+*> factorization B = U**H*U or B = L*L**H, in the same storage
+*> format as B.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute error tolerance for the eigenvalues.
+*> An approximate eigenvalue is accepted as converged
+*> when it is determined to lie in an interval [a,b]
+*> of width less than or equal to
+*> \endverbatim
+*> \verbatim
+*> ABSTOL + EPS * max( |a|,|b| ) ,
+*> \endverbatim
+*> \verbatim
+*> where EPS is the machine precision. If ABSTOL is less than
+*> or equal to zero, then EPS*|T| will be used in its place,
+*> where |T| is the 1-norm of the tridiagonal matrix obtained
+*> by reducing AP to tridiagonal form.
+*> \endverbatim
+*> \verbatim
+*> Eigenvalues will be computed most accurately when ABSTOL is
+*> set to twice the underflow threshold 2*DLAMCH('S'), not zero.
+*> If this routine returns with INFO>0, indicating that some
+*> eigenvectors did not converge, try setting ABSTOL to
+*> 2*DLAMCH('S').
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> On normal exit, the first M elements contain the selected
+*> eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> If JOBZ = 'N', then Z is not referenced.
+*> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix A
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> The eigenvectors are normalized as follows:
+*> if ITYPE = 1 or 2, Z**H*B*Z = I;
+*> if ITYPE = 3, Z**H*inv(B)*Z = I.
+*> \endverbatim
+*> \verbatim
+*> If an eigenvector fails to converge, then that column of Z
+*> contains the latest approximation to the eigenvector, and the
+*> index of the eigenvector is returned in IFAIL.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (N)
+*> If JOBZ = 'V', then if INFO = 0, the first M elements of
+*> IFAIL are zero. If INFO > 0, then IFAIL contains the
+*> indices of the eigenvectors that failed to converge.
+*> If JOBZ = 'N', then IFAIL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: ZPPTRF or ZHPEVX returned an error code:
+*> <= N: if INFO = i, ZHPEVX failed to converge;
+*> i eigenvectors failed to converge. Their indices
+*> are stored in array IFAIL.
+*> > N: if INFO = N + i, for 1 <= i <= n, then the leading
+*> minor of order i of B is not positive definite.
+*> The factorization of B could not be completed and
+*> no eigenvalues or eigenvectors were computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHEReigen
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
$ IL, IU, ABSTOL, M, W, Z, LDZ, WORK, RWORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK eigen routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE, UPLO
@@ -18,154 +284,6 @@
COMPLEX*16 AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPGVX computes selected eigenvalues and, optionally, eigenvectors
-* of a complex generalized Hermitian-definite eigenproblem, of the form
-* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
-* B are assumed to be Hermitian, stored in packed format, and B is also
-* positive definite. Eigenvalues and eigenvectors can be selected by
-* specifying either a range of values or a range of indices for the
-* desired eigenvalues.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the problem type to be solved:
-* = 1: A*x = (lambda)*B*x
-* = 2: A*B*x = (lambda)*x
-* = 3: B*A*x = (lambda)*x
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found;
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found;
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangles of A and B are stored;
-* = 'L': Lower triangles of A and B are stored.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the contents of AP are destroyed.
-*
-* BP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* B, packed columnwise in a linear array. The j-th column of B
-* is stored in the array BP as follows:
-* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
-* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
-*
-* On exit, the triangular factor U or L from the Cholesky
-* factorization B = U**H*U or B = L*L**H, in the same storage
-* format as B.
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute error tolerance for the eigenvalues.
-* An approximate eigenvalue is accepted as converged
-* when it is determined to lie in an interval [a,b]
-* of width less than or equal to
-*
-* ABSTOL + EPS * max( |a|,|b| ) ,
-*
-* where EPS is the machine precision. If ABSTOL is less than
-* or equal to zero, then EPS*|T| will be used in its place,
-* where |T| is the 1-norm of the tridiagonal matrix obtained
-* by reducing AP to tridiagonal form.
-*
-* Eigenvalues will be computed most accurately when ABSTOL is
-* set to twice the underflow threshold 2*DLAMCH('S'), not zero.
-* If this routine returns with INFO>0, indicating that some
-* eigenvectors did not converge, try setting ABSTOL to
-* 2*DLAMCH('S').
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* On normal exit, the first M elements contain the selected
-* eigenvalues in ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, N)
-* If JOBZ = 'N', then Z is not referenced.
-* If JOBZ = 'V', then if INFO = 0, the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix A
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* The eigenvectors are normalized as follows:
-* if ITYPE = 1 or 2, Z**H*B*Z = I;
-* if ITYPE = 3, Z**H*inv(B)*Z = I.
-*
-* If an eigenvector fails to converge, then that column of Z
-* contains the latest approximation to the eigenvector, and the
-* index of the eigenvector is returned in IFAIL.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (7*N)
-*
-* IWORK (workspace) INTEGER array, dimension (5*N)
-*
-* IFAIL (output) INTEGER array, dimension (N)
-* If JOBZ = 'V', then if INFO = 0, the first M elements of
-* IFAIL are zero. If INFO > 0, then IFAIL contains the
-* indices of the eigenvectors that failed to converge.
-* If JOBZ = 'N', then IFAIL is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: ZPPTRF or ZHPEVX returned an error code:
-* <= N: if INFO = i, ZHPEVX failed to converge;
-* i eigenvectors failed to converge. Their indices
-* are stored in array IFAIL.
-* > N: if INFO = N + i, for 1 <= i <= n, then the leading
-* minor of order i of B is not positive definite.
-* The factorization of B could not be completed and
-* no eigenvalues or eigenvectors were computed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zhprfs.f b/SRC/zhprfs.f
index 672d0234..82235025 100644
--- a/SRC/zhprfs.f
+++ b/SRC/zhprfs.f
@@ -1,12 +1,181 @@
+*> \brief \b ZHPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
+* FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian indefinite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A. AFP contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**H or
+*> A = L*D*L**H as computed by ZHPTRF, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZHPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZHPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
$ FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -19,87 +188,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian indefinite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The factored form of the matrix A. AFP contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**H or
-* A = L*D*L**H as computed by ZHPTRF, stored as a packed
-* triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHPTRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZHPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhpsv.f b/SRC/zhpsv.f
index 7cc19a2d..6da7d22e 100644
--- a/SRC/zhpsv.f
+++ b/SRC/zhpsv.f
@@ -1,105 +1,175 @@
- SUBROUTINE ZHPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> ZHPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZHPSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian matrix stored in packed format and X
-* and B are N-by-NRHS matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**H, if UPLO = 'U', or
-* A = L * D * L**H, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, D is Hermitian and block diagonal with 1-by-1
-* and 2-by-2 diagonal blocks. The factored form of A is then used to
-* solve the system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian matrix stored in packed format and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**H, if UPLO = 'U', or
+*> A = L * D * L**H, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, D is Hermitian and block diagonal with 1-by-1
+*> and 2-by-2 diagonal blocks. The factored form of A is then used to
+*> solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H as computed by ZHPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by ZHPTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be
-* computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H as computed by ZHPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by ZHPTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Further Details
-* ===============
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
+*> \ingroup complex16OTHERsolve
*
-* Two-dimensional storage of the Hermitian matrix A:
*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhpsvx.f b/SRC/zhpsvx.f
index a9cbe3ab..debcf81b 100644
--- a/SRC/zhpsvx.f
+++ b/SRC/zhpsvx.f
@@ -1,10 +1,279 @@
+*> \brief <b> ZHPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
+* LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPSVX uses the diagonal pivoting factorization A = U*D*U**H or
+*> A = L*D*L**H to compute the solution to a complex system of linear
+*> equations A * X = B, where A is an N-by-N Hermitian matrix stored
+*> in packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
+*> A = U * D * U**H, if UPLO = 'U', or
+*> A = L * D * L**H, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AFP and IPIV contain the factored form of
+*> A. AFP and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) COMPLEX*16 array, dimension (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H as computed by ZHPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**H or A = L*D*L**H as computed by ZHPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by ZHPTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by ZHPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
$ LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -18,173 +287,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPSVX uses the diagonal pivoting factorization A = U*D*U**H or
-* A = L*D*L**H to compute the solution to a complex system of linear
-* equations A * X = B, where A is an N-by-N Hermitian matrix stored
-* in packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
-* A = U * D * U**H, if UPLO = 'U', or
-* A = L * D * L**H, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AFP and IPIV contain the factored form of
-* A. AFP and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* AFP (input or output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H as computed by ZHPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**H or A = L*D*L**H as computed by ZHPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by ZHPTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by ZHPTRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhptrd.f b/SRC/zhptrd.f
index 75ce2c36..3f9cc6f0 100644
--- a/SRC/zhptrd.f
+++ b/SRC/zhptrd.f
@@ -1,97 +1,133 @@
- SUBROUTINE ZHPTRD( UPLO, N, AP, D, E, TAU, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
- COMPLEX*16 AP( * ), TAU( * )
-* ..
-*
+*> \brief \b ZHPTRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPTRD( UPLO, N, AP, D, E, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* COMPLEX*16 AP( * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* ZHPTRD reduces a complex Hermitian matrix A stored in packed form to
-* real symmetric tridiagonal form T by a unitary similarity
-* transformation: Q**H * A * Q = T.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPTRD reduces a complex Hermitian matrix A stored in packed form to
+*> real symmetric tridiagonal form T by a unitary similarity
+*> transformation: Q**H * A * Q = T.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* On exit, if UPLO = 'U', the diagonal and first superdiagonal
-* of A are overwritten by the corresponding elements of the
-* tridiagonal matrix T, and the elements above the first
-* superdiagonal, with the array TAU, represent the unitary
-* matrix Q as a product of elementary reflectors; if UPLO
-* = 'L', the diagonal and first subdiagonal of A are over-
-* written by the corresponding elements of the tridiagonal
-* matrix T, and the elements below the first subdiagonal, with
-* the array TAU, represent the unitary matrix Q as a product
-* of elementary reflectors. See Further Details.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (output) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the tridiagonal matrix T:
-* D(i) = A(i,i).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal elements of the tridiagonal matrix T:
-* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \date November 2011
*
-* TAU (output) COMPLEX*16 array, dimension (N-1)
-* The scalar factors of the elementary reflectors (see Further
-* Details).
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* of elementary reflectors. See Further Details.
+*>
+*> D (output) DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the tridiagonal matrix T:
+*> D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal elements of the tridiagonal matrix T:
+*> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>
+*> TAU (output) COMPLEX*16 array, dimension (N-1)
+*> The scalar factors of the elementary reflectors (see Further
+*> Details).
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n-1) . . . H(2) H(1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
+*> overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(n-1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
+*> overwriting A(i+2:n,i), and tau is stored in TAU(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZHPTRD( UPLO, N, AP, D, E, TAU, INFO )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n-1) . . . H(2) H(1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
-* overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(n-1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
-* overwriting A(i+2:n,i), and tau is stored in TAU(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+ COMPLEX*16 AP( * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhptrf.f b/SRC/zhptrf.f
index e20fa092..e9c81bff 100644
--- a/SRC/zhptrf.f
+++ b/SRC/zhptrf.f
@@ -1,9 +1,161 @@
+*> \brief \b ZHPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPTRF( UPLO, N, AP, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPTRF computes the factorization of a complex Hermitian packed
+*> matrix A using the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**H or A = L*D*L**H
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is Hermitian and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L, stored as a packed triangular
+*> matrix overwriting A (see below for further details).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**H, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**H, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHPTRF( UPLO, N, AP, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,97 +166,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPTRF computes the factorization of a complex Hermitian packed
-* matrix A using the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**H or A = L*D*L**H
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is Hermitian and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L, stored as a packed triangular
-* matrix overwriting A (see below for further details).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**H, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**H, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhptri.f b/SRC/zhptri.f
index f5f40454..86f5406b 100644
--- a/SRC/zhptri.f
+++ b/SRC/zhptri.f
@@ -1,9 +1,111 @@
+*> \brief \b ZHPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPTRI( UPLO, N, AP, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPTRI computes the inverse of a complex Hermitian indefinite matrix
+*> A in packed storage using the factorization A = U*D*U**H or
+*> A = L*D*L**H computed by ZHPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZHPTRF,
+*> stored as a packed triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (Hermitian) inverse of the original
+*> matrix, stored as a packed triangular matrix. The j-th column
+*> of inv(A) is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHPTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZHPTRI( UPLO, N, AP, IPIV, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,49 +116,6 @@
COMPLEX*16 AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPTRI computes the inverse of a complex Hermitian indefinite matrix
-* A in packed storage using the factorization A = U*D*U**H or
-* A = L*D*L**H computed by ZHPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZHPTRF,
-* stored as a packed triangular matrix.
-*
-* On exit, if INFO = 0, the (Hermitian) inverse of the original
-* matrix, stored as a packed triangular matrix. The j-th column
-* of inv(A) is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHPTRF.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhptrs.f b/SRC/zhptrs.f
index 08afb6aa..e246a8bb 100644
--- a/SRC/zhptrs.f
+++ b/SRC/zhptrs.f
@@ -1,61 +1,125 @@
- SUBROUTINE ZHPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZHPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZHPTRS solves a system of linear equations A*X = B with a complex
-* Hermitian matrix A stored in packed format using the factorization
-* A = U*D*U**H or A = L*D*L**H computed by ZHPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPTRS solves a system of linear equations A*X = B with a complex
+*> Hermitian matrix A stored in packed format using the factorization
+*> A = U*D*U**H or A = L*D*L**H computed by ZHPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**H;
-* = 'L': Lower triangular, form is A = L*D*L**H.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**H;
+*> = 'L': Lower triangular, form is A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHPTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHPTRF, stored as a
-* packed triangular matrix.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHPTRF.
+*> \ingroup complex16OTHERcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE ZHPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zhsein.f b/SRC/zhsein.f
index b0e12355..218e7b90 100644
--- a/SRC/zhsein.f
+++ b/SRC/zhsein.f
@@ -1,11 +1,247 @@
+*> \brief \b ZHSEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, W, VL,
+* LDVL, VR, LDVR, MM, M, WORK, RWORK, IFAILL,
+* IFAILR, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EIGSRC, INITV, SIDE
+* INTEGER INFO, LDH, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IFAILL( * ), IFAILR( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 H( LDH, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHSEIN uses inverse iteration to find specified right and/or left
+*> eigenvectors of a complex upper Hessenberg matrix H.
+*>
+*> The right eigenvector x and the left eigenvector y of the matrix H
+*> corresponding to an eigenvalue w are defined by:
+*>
+*> H * x = w * x, y**h * H = w * y**h
+*>
+*> where y**h denotes the conjugate transpose of the vector y.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] EIGSRC
+*> \verbatim
+*> EIGSRC is CHARACTER*1
+*> Specifies the source of eigenvalues supplied in W:
+*> = 'Q': the eigenvalues were found using ZHSEQR; thus, if
+*> H has zero subdiagonal elements, and so is
+*> block-triangular, then the j-th eigenvalue can be
+*> assumed to be an eigenvalue of the block containing
+*> the j-th row/column. This property allows ZHSEIN to
+*> perform inverse iteration on just one diagonal block.
+*> = 'N': no assumptions are made on the correspondence
+*> between eigenvalues and diagonal blocks. In this
+*> case, ZHSEIN must always perform inverse iteration
+*> using the whole matrix H.
+*> \endverbatim
+*>
+*> \param[in] INITV
+*> \verbatim
+*> INITV is CHARACTER*1
+*> = 'N': no initial vectors are supplied;
+*> = 'U': user-supplied initial vectors are stored in the arrays
+*> VL and/or VR.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> Specifies the eigenvectors to be computed. To select the
+*> eigenvector corresponding to the eigenvalue W(j),
+*> SELECT(j) must be set to .TRUE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> The upper Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> On entry, the eigenvalues of H.
+*> On exit, the real parts of W may have been altered since
+*> close eigenvalues are perturbed slightly in searching for
+*> independent eigenvectors.
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,MM)
+*> On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must
+*> contain starting vectors for the inverse iteration for the
+*> left eigenvectors; the starting vector for each eigenvector
+*> must be in the same column in which the eigenvector will be
+*> stored.
+*> On exit, if SIDE = 'L' or 'B', the left eigenvectors
+*> specified by SELECT will be stored consecutively in the
+*> columns of VL, in the same order as their eigenvalues.
+*> If SIDE = 'R', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL.
+*> LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,MM)
+*> On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must
+*> contain starting vectors for the inverse iteration for the
+*> right eigenvectors; the starting vector for each eigenvector
+*> must be in the same column in which the eigenvector will be
+*> stored.
+*> On exit, if SIDE = 'R' or 'B', the right eigenvectors
+*> specified by SELECT will be stored consecutively in the
+*> columns of VR, in the same order as their eigenvalues.
+*> If SIDE = 'L', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR.
+*> LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR required to
+*> store the eigenvectors (= the number of .TRUE. elements in
+*> SELECT).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] IFAILL
+*> \verbatim
+*> IFAILL is INTEGER array, dimension (MM)
+*> If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left
+*> eigenvector in the i-th column of VL (corresponding to the
+*> eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the
+*> eigenvector converged satisfactorily.
+*> If SIDE = 'R', IFAILL is not referenced.
+*> \endverbatim
+*>
+*> \param[out] IFAILR
+*> \verbatim
+*> IFAILR is INTEGER array, dimension (MM)
+*> If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right
+*> eigenvector in the i-th column of VR (corresponding to the
+*> eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the
+*> eigenvector converged satisfactorily.
+*> If SIDE = 'L', IFAILR is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, i is the number of eigenvectors which
+*> failed to converge; see IFAILL and IFAILR for further
+*> details.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Each eigenvector is normalized so that the element of largest
+*> magnitude has magnitude 1; here the magnitude of a complex number
+*> (x,y) is taken to be |x|+|y|.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, W, VL,
$ LDVL, VR, LDVR, MM, M, WORK, RWORK, IFAILL,
$ IFAILR, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EIGSRC, INITV, SIDE
@@ -19,135 +255,6 @@
$ W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHSEIN uses inverse iteration to find specified right and/or left
-* eigenvectors of a complex upper Hessenberg matrix H.
-*
-* The right eigenvector x and the left eigenvector y of the matrix H
-* corresponding to an eigenvalue w are defined by:
-*
-* H * x = w * x, y**h * H = w * y**h
-*
-* where y**h denotes the conjugate transpose of the vector y.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* EIGSRC (input) CHARACTER*1
-* Specifies the source of eigenvalues supplied in W:
-* = 'Q': the eigenvalues were found using ZHSEQR; thus, if
-* H has zero subdiagonal elements, and so is
-* block-triangular, then the j-th eigenvalue can be
-* assumed to be an eigenvalue of the block containing
-* the j-th row/column. This property allows ZHSEIN to
-* perform inverse iteration on just one diagonal block.
-* = 'N': no assumptions are made on the correspondence
-* between eigenvalues and diagonal blocks. In this
-* case, ZHSEIN must always perform inverse iteration
-* using the whole matrix H.
-*
-* INITV (input) CHARACTER*1
-* = 'N': no initial vectors are supplied;
-* = 'U': user-supplied initial vectors are stored in the arrays
-* VL and/or VR.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* Specifies the eigenvectors to be computed. To select the
-* eigenvector corresponding to the eigenvalue W(j),
-* SELECT(j) must be set to .TRUE..
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* H (input) COMPLEX*16 array, dimension (LDH,N)
-* The upper Hessenberg matrix H.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* W (input/output) COMPLEX*16 array, dimension (N)
-* On entry, the eigenvalues of H.
-* On exit, the real parts of W may have been altered since
-* close eigenvalues are perturbed slightly in searching for
-* independent eigenvectors.
-*
-* VL (input/output) COMPLEX*16 array, dimension (LDVL,MM)
-* On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must
-* contain starting vectors for the inverse iteration for the
-* left eigenvectors; the starting vector for each eigenvector
-* must be in the same column in which the eigenvector will be
-* stored.
-* On exit, if SIDE = 'L' or 'B', the left eigenvectors
-* specified by SELECT will be stored consecutively in the
-* columns of VL, in the same order as their eigenvalues.
-* If SIDE = 'R', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL.
-* LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.
-*
-* VR (input/output) COMPLEX*16 array, dimension (LDVR,MM)
-* On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must
-* contain starting vectors for the inverse iteration for the
-* right eigenvectors; the starting vector for each eigenvector
-* must be in the same column in which the eigenvector will be
-* stored.
-* On exit, if SIDE = 'R' or 'B', the right eigenvectors
-* specified by SELECT will be stored consecutively in the
-* columns of VR, in the same order as their eigenvalues.
-* If SIDE = 'L', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR.
-* LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR required to
-* store the eigenvectors (= the number of .TRUE. elements in
-* SELECT).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* IFAILL (output) INTEGER array, dimension (MM)
-* If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left
-* eigenvector in the i-th column of VL (corresponding to the
-* eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the
-* eigenvector converged satisfactorily.
-* If SIDE = 'R', IFAILL is not referenced.
-*
-* IFAILR (output) INTEGER array, dimension (MM)
-* If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right
-* eigenvector in the i-th column of VR (corresponding to the
-* eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the
-* eigenvector converged satisfactorily.
-* If SIDE = 'L', IFAILR is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, i is the number of eigenvectors which
-* failed to converge; see IFAILL and IFAILR for further
-* details.
-*
-* Further Details
-* ===============
-*
-* Each eigenvector is normalized so that the element of largest
-* magnitude has magnitude 1; here the magnitude of a complex number
-* (x,y) is taken to be |x|+|y|.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zhseqr.f b/SRC/zhseqr.f
index c965fd46..63e648bf 100644
--- a/SRC/zhseqr.f
+++ b/SRC/zhseqr.f
@@ -1,9 +1,235 @@
+*> \brief \b ZHSEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
+* CHARACTER COMPZ, JOB
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZHSEQR computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**H, where T is an upper triangular matrix (the
+*> Schur form), and Z is the unitary matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input unitary
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> = 'E': compute eigenvalues only;
+*> = 'S': compute eigenvalues and the Schur form T.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': no Schur vectors are computed;
+*> = 'I': Z is initialized to the unit matrix and the matrix Z
+*> of Schur vectors of H is returned;
+*> = 'V': Z must contain an unitary matrix Q on entry, and
+*> the product Q*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
+*> set by a previous call to ZGEBAL, and then passed to ZGEHRD
+*> when the matrix output by ZGEBAL is reduced to Hessenberg
+*> form. Otherwise ILO and IHI should be set to 1 and N
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and JOB = 'S', H contains the upper
+*> triangular matrix T from the Schur decomposition (the
+*> Schur form). If INFO = 0 and JOB = 'E', the contents of
+*> H are unspecified on exit. (The output value of H when
+*> INFO.GT.0 is given under the description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> Unlike earlier versions of ZHSEQR, this subroutine may
+*> explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
+*> or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> The computed eigenvalues. If JOB = 'S', the eigenvalues are
+*> stored in the same order as on the diagonal of the Schur
+*> form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,N)
+*> If COMPZ = 'N', Z is not referenced.
+*> If COMPZ = 'I', on entry Z need not be set and on exit,
+*> if INFO = 0, Z contains the unitary matrix Z of the Schur
+*> vectors of H. If COMPZ = 'V', on entry Z must contain an
+*> N-by-N matrix Q, which is assumed to be equal to the unit
+*> matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
+*> if INFO = 0, Z contains Q*Z.
+*> Normally Q is the unitary matrix generated by ZUNGHR
+*> after the call to ZGEHRD which formed the Hessenberg matrix
+*> H. (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if COMPZ = 'I' or
+*> COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient and delivers very good and sometimes
+*> optimal performance. However, LWORK as large as 11*N
+*> may be required for optimal performance. A workspace
+*> query is recommended to determine the optimal workspace
+*> size.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then ZHSEQR does a workspace query.
+*> In this case, ZHSEQR checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .LT. 0: if INFO = -i, the i-th argument had an illegal
+*> value
+*> .GT. 0: if INFO = i, ZHSEQR failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and JOB = 'E', then on exit, the
+*> remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and JOB = 'S', then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is a unitary matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'V', then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z) = (initial value of Z)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the unitary matrix in (*) (regard-
+*> less of the value of JOB.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'I', then on exit
+*> (final value of Z) = U
+*> where U is the unitary matrix in (*) (regard-
+*> less of the value of JOB.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and COMPZ = 'N', then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,
$ WORK, LWORK, INFO )
*
* -- LAPACK computational routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
@@ -12,141 +238,6 @@
* .. Array Arguments ..
COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
* ..
-* Purpose
-* =======
-*
-* ZHSEQR computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**H, where T is an upper triangular matrix (the
-* Schur form), and Z is the unitary matrix of Schur vectors.
-*
-* Optionally Z may be postmultiplied into an input unitary
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* = 'E': compute eigenvalues only;
-* = 'S': compute eigenvalues and the Schur form T.
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': no Schur vectors are computed;
-* = 'I': Z is initialized to the unit matrix and the matrix Z
-* of Schur vectors of H is returned;
-* = 'V': Z must contain an unitary matrix Q on entry, and
-* the product Q*Z is returned.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-* set by a previous call to ZGEBAL, and then passed to ZGEHRD
-* when the matrix output by ZGEBAL is reduced to Hessenberg
-* form. Otherwise ILO and IHI should be set to 1 and N
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) COMPLEX*16 array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and JOB = 'S', H contains the upper
-* triangular matrix T from the Schur decomposition (the
-* Schur form). If INFO = 0 and JOB = 'E', the contents of
-* H are unspecified on exit. (The output value of H when
-* INFO.GT.0 is given under the description of INFO below.)
-*
-* Unlike earlier versions of ZHSEQR, this subroutine may
-* explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
-* or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* The computed eigenvalues. If JOB = 'S', the eigenvalues are
-* stored in the same order as on the diagonal of the Schur
-* form returned in H, with W(i) = H(i,i).
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* If COMPZ = 'N', Z is not referenced.
-* If COMPZ = 'I', on entry Z need not be set and on exit,
-* if INFO = 0, Z contains the unitary matrix Z of the Schur
-* vectors of H. If COMPZ = 'V', on entry Z must contain an
-* N-by-N matrix Q, which is assumed to be equal to the unit
-* matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
-* if INFO = 0, Z contains Q*Z.
-* Normally Q is the unitary matrix generated by ZUNGHR
-* after the call to ZGEHRD which formed the Hessenberg matrix
-* H. (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if COMPZ = 'I' or
-* COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient and delivers very good and sometimes
-* optimal performance. However, LWORK as large as 11*N
-* may be required for optimal performance. A workspace
-* query is recommended to determine the optimal workspace
-* size.
-*
-* If LWORK = -1, then ZHSEQR does a workspace query.
-* In this case, ZHSEQR checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .LT. 0: if INFO = -i, the i-th argument had an illegal
-* value
-* .GT. 0: if INFO = i, ZHSEQR failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and JOB = 'E', then on exit, the
-* remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and JOB = 'S', then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is a unitary matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and COMPZ = 'V', then on exit
-*
-* (final value of Z) = (initial value of Z)*U
-*
-* where U is the unitary matrix in (*) (regard-
-* less of the value of JOB.)
-*
-* If INFO .GT. 0 and COMPZ = 'I', then on exit
-* (final value of Z) = U
-* where U is the unitary matrix in (*) (regard-
-* less of the value of JOB.)
-*
-* If INFO .GT. 0 and COMPZ = 'N', then Z is not
-* accessed.
-*
* ================================================================
* Default values supplied by
* ILAENV(ISPEC,'ZHSEQR',JOB(:1)//COMPZ(:1),N,ILO,IHI,LWORK).
diff --git a/SRC/zla_gbamv.f b/SRC/zla_gbamv.f
index 23d5e2c8..a3bdf374 100644
--- a/SRC/zla_gbamv.f
+++ b/SRC/zla_gbamv.f
@@ -1,122 +1,199 @@
- SUBROUTINE ZLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
- $ INCX, BETA, Y, INCY )
+*> \brief \b ZLA_GBAMV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AB( LDAB, * ), X( * )
- DOUBLE PRECISION Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
+* INCX, BETA, Y, INCY )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AB( LDAB, * ), X( * )
+* DOUBLE PRECISION Y( * )
+* ..
+*
* Purpose
* =======
*
-* ZLA_GBAMV performs one of the matrix-vector operations
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-* or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GBAMV performs one of the matrix-vector operations
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) INTEGER
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
-* BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-* BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* ALPHA (input) DOUBLE PRECISION
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AB (input) COMPLEX*16 array of DIMENSION ( LDAB, n )
-* Before entry, the leading m by n part of the array AB must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDAB (input) INTEGER
-* On entry, LDAB specifies the first dimension of AB as declared
-* in the calling (sub) program. LDAB must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX*16 array, dimension
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is INTEGER
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
+*> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array of DIMENSION ( LDAB, n )
+*> Before entry, the leading m by n part of the array AB must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> On entry, LDAB specifies the first dimension of AB as declared
+*> in the calling (sub) program. LDAB must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) DOUBLE PRECISION
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup complex16GBcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
+* =====================================================================
+ SUBROUTINE ZLA_GBAMV( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
+ $ INCX, BETA, Y, INCY )
*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Level 2 Blas routine.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AB( LDAB, * ), X( * )
+ DOUBLE PRECISION Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_gbrcond_c.f b/SRC/zla_gbrcond_c.f
index 67184c3d..1cde4d66 100644
--- a/SRC/zla_gbrcond_c.f
+++ b/SRC/zla_gbrcond_c.f
@@ -1,18 +1,165 @@
+*> \brief \b ZLA_GBRCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_GBRCOND_C( TRANS, N, KL, KU, AB,
+* LDAB, AFB, LDAFB, IPIV,
+* C, CAPPLY, INFO, WORK,
+* RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* LOGICAL CAPPLY
+* INTEGER N, KL, KU, KD, KE, LDAB, LDAFB, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), WORK( * )
+* DOUBLE PRECISION C( * ), RWORK( * )
+*
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GBRCOND_C Computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX*16 array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by ZGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by ZGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_GBRCOND_C( TRANS, N, KL, KU, AB,
$ LDAB, AFB, LDAFB, IPIV,
$ C, CAPPLY, INFO, WORK,
$ RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS
LOGICAL CAPPLY
@@ -24,71 +171,6 @@
DOUBLE PRECISION C( * ), RWORK( * )
*
*
-* Purpose
-* =======
-*
-* ZLA_GBRCOND_C Computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) COMPLEX*16 array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by ZGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by ZGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
-*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_gbrcond_x.f b/SRC/zla_gbrcond_x.f
index 08ff3266..86ec5427 100644
--- a/SRC/zla_gbrcond_x.f
+++ b/SRC/zla_gbrcond_x.f
@@ -1,17 +1,157 @@
+*> \brief \b ZLA_GBRCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_GBRCOND_X( TRANS, N, KL, KU, AB,
+* LDAB, AFB, LDAFB, IPIV,
+* X, INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER N, KL, KU, KD, KE, LDAB, LDAFB, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), WORK( * ),
+* $ X( * )
+* DOUBLE PRECISION RWORK( * )
+*
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GBRCOND_X Computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX*16 vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX*16 array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by ZGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by ZGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_GBRCOND_X( TRANS, N, KL, KU, AB,
$ LDAB, AFB, LDAFB, IPIV,
$ X, INFO, WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS
INTEGER N, KL, KU, KD, KE, LDAB, LDAFB, INFO
@@ -23,68 +163,6 @@
DOUBLE PRECISION RWORK( * )
*
*
-* Purpose
-* =======
-*
-* ZLA_GBRCOND_X Computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX*16 vector.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* AFB (input) COMPLEX*16 array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by ZGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by ZGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* X (input) COMPLEX*16 array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_gbrfsx_extended.f b/SRC/zla_gbrfsx_extended.f
index efd6145b..2f22386d 100644
--- a/SRC/zla_gbrfsx_extended.f
+++ b/SRC/zla_gbrfsx_extended.f
@@ -1,3 +1,415 @@
+*> \brief \b ZLA_GBRFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLA_GBRFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, KL, KU,
+* NRHS, AB, LDAB, AFB, LDAFB, IPIV,
+* COLEQU, C, B, LDB, Y, LDY,
+* BERR_OUT, N_NORMS, ERR_BNDS_NORM,
+* ERR_BNDS_COMP, RES, AYB, DY,
+* Y_TAIL, RCOND, ITHRESH, RTHRESH,
+* DZ_UB, IGNORE_CWISE, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
+* $ PREC_TYPE, TRANS_TYPE, N_NORMS, ITHRESH
+* LOGICAL COLEQU, IGNORE_CWISE
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* DOUBLE PRECISION C( * ), AYB(*), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GBRFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by ZGBRFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] TRANS_TYPE
+*> \verbatim
+*> TRANS_TYPE is INTEGER
+*> Specifies the transposition operation on A.
+*> The value is defined by ILATRANS(T) where T is a CHARACTER and
+*> T = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX*16 array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by ZGBTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by ZGBTRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by ZGBTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by ZLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to ZGBTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
SUBROUTINE ZLA_GBRFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, KL, KU,
$ NRHS, AB, LDAB, AFB, LDAFB, IPIV,
$ COLEQU, C, B, LDB, Y, LDY,
@@ -6,16 +418,11 @@
$ Y_TAIL, RCOND, ITHRESH, RTHRESH,
$ DZ_UB, IGNORE_CWISE, INFO )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDAB, LDAFB, LDB, LDY, N, KL, KU, NRHS,
$ PREC_TYPE, TRANS_TYPE, N_NORMS, ITHRESH
@@ -31,259 +438,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_GBRFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by ZGBRFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* TRANS_TYPE (input) INTEGER
-* Specifies the transposition operation on A.
-* The value is defined by ILATRANS(T) where T is a CHARACTER and
-* T = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* AB (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AFB (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by ZGBTRF.
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by ZGBTRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX*16 array, dimension (LDY,NRHS)
-* On entry, the solution matrix X, as computed by ZGBTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by ZLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to ZGBTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_gbrpvgrw.f b/SRC/zla_gbrpvgrw.f
index 06f41cd2..085694c2 100644
--- a/SRC/zla_gbrpvgrw.f
+++ b/SRC/zla_gbrpvgrw.f
@@ -1,67 +1,125 @@
- DOUBLE PRECISION FUNCTION ZLA_GBRPVGRW( N, KL, KU, NCOLS, AB,
- $ LDAB, AFB, LDAFB )
-*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * )
-* ..
-*
+*> \brief \b ZLA_GBRPVGRW
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_GBRPVGRW( N, KL, KU, NCOLS, AB,
+* LDAB, AFB, LDAFB )
+*
+* .. Scalar Arguments ..
+* INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * )
+* ..
+*
* Purpose
* =======
*
-* ZLA_GBRPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GBRPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX*16 array, dimension (LDAFB,N)
+*> Details of the LU factorization of the band matrix A, as
+*> computed by ZGBTRF. U is stored as an upper triangular
+*> band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
+*> and the multipliers used during the factorization are stored
+*> in rows KL+KU+2 to 2*KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+*> \date November 2011
*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl)
+*> \ingroup complex16GBcomputational
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLA_GBRPVGRW( N, KL, KU, NCOLS, AB,
+ $ LDAB, AFB, LDAFB )
*
-* AFB (input) COMPLEX*16 array, dimension (LDAFB,N)
-* Details of the LU factorization of the band matrix A, as
-* computed by ZGBTRF. U is stored as an upper triangular
-* band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1,
-* and the multipliers used during the factorization are stored
-* in rows KL+KU+2 to 2*KL+KU+1.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= 2*KL+KU+1.
+* .. Scalar Arguments ..
+ INTEGER N, KL, KU, NCOLS, LDAB, LDAFB
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_geamv.f b/SRC/zla_geamv.f
index 791c6b37..76c38be0 100644
--- a/SRC/zla_geamv.f
+++ b/SRC/zla_geamv.f
@@ -1,117 +1,189 @@
- SUBROUTINE ZLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
- $ Y, INCY )
+*> \brief \b ZLA_GEAMV
*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER INCX, INCY, LDA, M, N
- INTEGER TRANS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), X( * )
- DOUBLE PRECISION Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
+* Y, INCY )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER INCX, INCY, LDA, M, N
+* INTEGER TRANS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), X( * )
+* DOUBLE PRECISION Y( * )
+* ..
+*
* Purpose
* =======
*
-* ZLA_GEAMV performs one of the matrix-vector operations
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-* or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* m by n matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GEAMV performs one of the matrix-vector operations
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*> or y := alpha*abs(A)**T*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> m by n matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANS (input) INTEGER
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-*
-* BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
-* BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-* BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of the matrix A.
-* M must be at least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) DOUBLE PRECISION
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX*16 array of DIMENSION ( LDA, n )
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, m ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX*16 array of DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is INTEGER
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y)
+*> BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y)
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of the matrix A.
+*> M must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array of DIMENSION ( LDA, n )
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array of DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( m - 1 )*abs( INCX ) ) otherwise.
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
+*> and at least
+*> ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Level 2 Blas routine.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) DOUBLE PRECISION
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n'
-* and at least
-* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise.
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup complex16GEcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
+* =====================================================================
+ SUBROUTINE ZLA_GEAMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
+ $ Y, INCY )
*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Level 2 Blas routine.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER INCX, INCY, LDA, M, N
+ INTEGER TRANS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), X( * )
+ DOUBLE PRECISION Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_gercond_c.f b/SRC/zla_gercond_c.f
index b6046a0c..a75dc9fb 100644
--- a/SRC/zla_gercond_c.f
+++ b/SRC/zla_gercond_c.f
@@ -1,17 +1,145 @@
+*> \brief \b ZLA_GERCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_GERCOND_C( TRANS, N, A, LDA, AF,
+* LDAF, IPIV, C, CAPPLY,
+* INFO, WORK, RWORK )
+*
+* .. Scalar Aguments ..
+* CHARACTER TRANS
+* LOGICAL CAPPLY
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * )
+* DOUBLE PRECISION C( * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GERCOND_C computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by ZGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_GERCOND_C( TRANS, N, A, LDA, AF,
$ LDAF, IPIV, C, CAPPLY,
$ INFO, WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Aguments ..
CHARACTER TRANS
LOGICAL CAPPLY
@@ -23,59 +151,6 @@
DOUBLE PRECISION C( * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_GERCOND_C computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by ZGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by ZGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
-*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_gercond_x.f b/SRC/zla_gercond_x.f
index 7b759a0e..d2a8387c 100644
--- a/SRC/zla_gercond_x.f
+++ b/SRC/zla_gercond_x.f
@@ -1,17 +1,138 @@
+*> \brief \b ZLA_GERCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_GERCOND_X( TRANS, N, A, LDA, AF,
+* LDAF, IPIV, X, INFO,
+* WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+* DOUBLE PRECISION RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GERCOND_X computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX*16 vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate Transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by ZGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_GERCOND_X( TRANS, N, A, LDA, AF,
$ LDAF, IPIV, X, INFO,
$ WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER TRANS
INTEGER N, LDA, LDAF, INFO
@@ -22,56 +143,6 @@
DOUBLE PRECISION RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_GERCOND_X computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX*16 vector.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate Transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by ZGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by ZGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* X (input) COMPLEX*16 array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_gerfsx_extended.f b/SRC/zla_gerfsx_extended.f
index abe05375..211e8bd1 100644
--- a/SRC/zla_gerfsx_extended.f
+++ b/SRC/zla_gerfsx_extended.f
@@ -1,3 +1,402 @@
+*> \brief \b ZLA_GERFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLA_GERFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, NRHS, A,
+* LDA, AF, LDAF, IPIV, COLEQU, C, B,
+* LDB, Y, LDY, BERR_OUT, N_NORMS,
+* ERRS_N, ERRS_C, RES, AYB, DY,
+* Y_TAIL, RCOND, ITHRESH, RTHRESH,
+* DZ_UB, IGNORE_CWISE, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ TRANS_TYPE, N_NORMS
+* LOGICAL COLEQU, IGNORE_CWISE
+* INTEGER ITHRESH
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* DOUBLE PRECISION C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERRS_N( NRHS, * ), ERRS_C( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GERFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by ZGERFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] TRANS_TYPE
+*> \verbatim
+*> TRANS_TYPE is INTEGER
+*> Specifies the transposition operation on A.
+*> The value is defined by ILATRANS(T) where T is a CHARACTER and
+*> T = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from the factorization A = P*L*U
+*> as computed by ZGETRF; row i of the matrix was interchanged
+*> with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by ZGETRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by ZLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to ZGETRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
SUBROUTINE ZLA_GERFSX_EXTENDED( PREC_TYPE, TRANS_TYPE, N, NRHS, A,
$ LDA, AF, LDAF, IPIV, COLEQU, C, B,
$ LDB, Y, LDY, BERR_OUT, N_NORMS,
@@ -5,16 +404,11 @@
$ Y_TAIL, RCOND, ITHRESH, RTHRESH,
$ DZ_UB, IGNORE_CWISE, INFO )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ TRANS_TYPE, N_NORMS
@@ -30,253 +424,6 @@
$ ERRS_N( NRHS, * ), ERRS_C( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_GERFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by ZGERFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* TRANS_TYPE (input) INTEGER
-* Specifies the transposition operation on A.
-* The value is defined by ILATRANS(T) where T is a CHARACTER and
-* T = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by ZGETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from the factorization A = P*L*U
-* as computed by ZGETRF; row i of the matrix was interchanged
-* with row IPIV(i).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX*16 array, dimension (LDY,NRHS)
-* On entry, the solution matrix X, as computed by ZGETRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by ZLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to ZGETRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_gerpvgrw.f b/SRC/zla_gerpvgrw.f
index e14718ea..e5871c9b 100644
--- a/SRC/zla_gerpvgrw.f
+++ b/SRC/zla_gerpvgrw.f
@@ -1,55 +1,107 @@
- DOUBLE PRECISION FUNCTION ZLA_GERPVGRW( N, NCOLS, A, LDA, AF,
- $ LDAF )
+*> \brief \b ZLA_GERPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N, NCOLS, LDA, LDAF
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), AF( LDAF, * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION ZLA_GERPVGRW( N, NCOLS, A, LDA, AF,
+* LDAF )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * )
+* ..
+*
* Purpose
* =======
-*
-* ZLA_GERPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_GERPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDAF,N)
+*> The factors L and U from the factorization
+*> A = P*L*U as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \ingroup complex16GEcomputational
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLA_GERPVGRW( N, NCOLS, A, LDA, AF,
+ $ LDAF )
*
-* AF (input) DOUBLE PRECISION array, dimension (LDAF,N)
-* The factors L and U from the factorization
-* A = P*L*U as computed by ZGETRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* .. Scalar Arguments ..
+ INTEGER N, NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), AF( LDAF, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_heamv.f b/SRC/zla_heamv.f
index fea569c3..8259d7a3 100644
--- a/SRC/zla_heamv.f
+++ b/SRC/zla_heamv.f
@@ -1,119 +1,193 @@
- SUBROUTINE ZLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
- $ INCY )
+*> \brief \b ZLA_HEAMV
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER INCX, INCY, LDA, N, UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), X( * )
- DOUBLE PRECISION Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER INCX, INCY, LDA, N, UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), X( * )
+* DOUBLE PRECISION Y( * )
+* ..
+*
* Purpose
* =======
*
-* ZLA_SYAMV performs the matrix-vector operation
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* n by n symmetric matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_SYAMV performs the matrix-vector operation
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> n by n symmetric matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) INTEGER
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = BLAS_UPPER Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = BLAS_LOWER Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) DOUBLE PRECISION .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX*16 array, DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX*16 array, DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) )
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is INTEGER
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_UPPER Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_LOWER Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION .
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) )
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION .
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> ( 1 + ( n - 1 )*abs( INCY ) )
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) DOUBLE PRECISION .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* ( 1 + ( n - 1 )*abs( INCY ) )
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup complex16HEcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*> -- Modified for the absolute-value product, April 2006
+*> Jason Riedy, UC Berkeley
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLA_HEAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+ $ INCY )
*
-* Level 2 Blas routine.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
-* -- Modified for the absolute-value product, April 2006
-* Jason Riedy, UC Berkeley
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER INCX, INCY, LDA, N, UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), X( * )
+ DOUBLE PRECISION Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_hercond_c.f b/SRC/zla_hercond_c.f
index d0531adb..5c1bb019 100644
--- a/SRC/zla_hercond_c.f
+++ b/SRC/zla_hercond_c.f
@@ -1,17 +1,142 @@
+*> \brief \b ZLA_HERCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_HERCOND_C( UPLO, N, A, LDA, AF,
+* LDAF, IPIV, C, CAPPLY,
+* INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* LOGICAL CAPPLY
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * )
+* DOUBLE PRECISION C ( * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_HERCOND_C computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_HERCOND_C( UPLO, N, A, LDA, AF,
$ LDAF, IPIV, C, CAPPLY,
$ INFO, WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO
LOGICAL CAPPLY
@@ -23,56 +148,6 @@
DOUBLE PRECISION C ( * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_HERCOND_C computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
-*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_hercond_x.f b/SRC/zla_hercond_x.f
index 16f94d34..1eb23776 100644
--- a/SRC/zla_hercond_x.f
+++ b/SRC/zla_hercond_x.f
@@ -1,17 +1,135 @@
+*> \brief \b ZLA_HERCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_HERCOND_X( UPLO, N, A, LDA, AF,
+* LDAF, IPIV, X, INFO,
+* WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+* DOUBLE PRECISION RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_HERCOND_X computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX*16 vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_HERCOND_X( UPLO, N, A, LDA, AF,
$ LDAF, IPIV, X, INFO,
$ WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER N, LDA, LDAF, INFO
@@ -22,53 +140,6 @@
DOUBLE PRECISION RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_HERCOND_X computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX*16 vector.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by CHETRF.
-*
-* X (input) COMPLEX*16 array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_herfsx_extended.f b/SRC/zla_herfsx_extended.f
index c45ec033..67de5171 100644
--- a/SRC/zla_herfsx_extended.f
+++ b/SRC/zla_herfsx_extended.f
@@ -1,3 +1,401 @@
+*> \brief \b ZLA_HERFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLA_HERFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, IPIV, COLEQU, C, B, LDB,
+* Y, LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* DOUBLE PRECISION C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_HERFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by ZHERFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by ZHETRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by ZLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to ZHETRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+* =====================================================================
SUBROUTINE ZLA_HERFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, IPIV, COLEQU, C, B, LDB,
$ Y, LDY, BERR_OUT, N_NORMS,
@@ -6,16 +404,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -32,250 +425,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_HERFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by ZHERFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHETRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHETRF.
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX*16 array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by ZHETRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by ZLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to ZHETRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_herpvgrw.f b/SRC/zla_herpvgrw.f
index d7abc1ce..63fae726 100644
--- a/SRC/zla_herpvgrw.f
+++ b/SRC/zla_herpvgrw.f
@@ -1,72 +1,139 @@
- DOUBLE PRECISION FUNCTION ZLA_HERPVGRW( UPLO, N, INFO, A, LDA, AF,
- $ LDAF, IPIV, WORK )
+*> \brief \b ZLA_HERPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER N, INFO, LDA, LDAF
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), AF( LDAF, * )
- DOUBLE PRECISION WORK( * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION ZLA_HERPVGRW( UPLO, N, INFO, A, LDA, AF,
+* LDAF, IPIV, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * )
+* DOUBLE PRECISION WORK( * )
+* ..
+*
* Purpose
* =======
-*
-* ZLA_HERPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_HERPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The value of INFO returned from ZHETRF, .i.e., the pivot in
+*> column INFO is exactly 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* INFO (input) INTEGER
-* The value of INFO returned from ZHETRF, .i.e., the pivot in
-* column INFO is exactly 0.
-*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZHETRF.
+*> \ingroup complex16HEcomputational
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLA_HERPVGRW( UPLO, N, INFO, A, LDA, AF,
+ $ LDAF, IPIV, WORK )
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZHETRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) COMPLEX*16 array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), AF( LDAF, * )
+ DOUBLE PRECISION WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_lin_berr.f b/SRC/zla_lin_berr.f
index 5a710171..cf82e45a 100644
--- a/SRC/zla_lin_berr.f
+++ b/SRC/zla_lin_berr.f
@@ -1,15 +1,103 @@
- SUBROUTINE ZLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*> \brief \b ZLA_LIN_BERR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NZ, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AYB( N, NRHS ), BERR( NRHS )
+* COMPLEX*16 RES( N, NRHS )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_LIN_BERR computes componentwise relative backward error from
+*> the formula
+*> max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z.
+*>
+*>\endverbatim
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NZ
+*> \verbatim
+*> NZ is INTEGER
+*> We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
+*> guard against spuriously zero residuals. Default value is N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices AYB, RES, and BERR. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is DOUBLE PRECISION array, dimension (N,NRHS)
+*> The residual matrix, i.e., the matrix R in the relative backward
+*> error formula above.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N, NRHS)
+*> The denominator in the relative backward error formula above, i.e.,
+*> the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
+*> are from iterative refinement (see zla_gerfsx_extended.f).
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is COMPLEX*16 array, dimension (NRHS)
+*> The componentwise relative backward error from the formula above.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE ZLA_LIN_BERR ( N, NZ, NRHS, RES, AYB, BERR )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER N, NZ, NRHS
* ..
@@ -18,42 +106,6 @@
COMPLEX*16 RES( N, NRHS )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_LIN_BERR computes componentwise relative backward error from
-* the formula
-* max(i) ( abs(R(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NZ (input) INTEGER
-* We add (NZ+1)*SLAMCH( 'Safe minimum' ) to R(i) in the numerator to
-* guard against spuriously zero residuals. Default value is N.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices AYB, RES, and BERR. NRHS >= 0.
-*
-* RES (input) DOUBLE PRECISION array, dimension (N,NRHS)
-* The residual matrix, i.e., the matrix R in the relative backward
-* error formula above.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N, NRHS)
-* The denominator in the relative backward error formula above, i.e.,
-* the matrix abs(op(A_s))*abs(Y) + abs(B_s). The matrices A, Y, and B
-* are from iterative refinement (see zla_gerfsx_extended.f).
-*
-* BERR (output) COMPLEX*16 array, dimension (NRHS)
-* The componentwise relative backward error from the formula above.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_porcond_c.f b/SRC/zla_porcond_c.f
index e2eee9d1..a20bb980 100644
--- a/SRC/zla_porcond_c.f
+++ b/SRC/zla_porcond_c.f
@@ -1,17 +1,134 @@
+*> \brief \b ZLA_PORCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_PORCOND_C( UPLO, N, A, LDA, AF,
+* LDAF, C, CAPPLY, INFO,
+* WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* LOGICAL CAPPLY
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * )
+* DOUBLE PRECISION C( * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_PORCOND_C Computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_PORCOND_C( UPLO, N, A, LDA, AF,
$ LDAF, C, CAPPLY, INFO,
$ WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO
LOGICAL CAPPLY
@@ -22,52 +139,6 @@
DOUBLE PRECISION C( * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_PORCOND_C Computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by ZPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
-*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_porcond_x.f b/SRC/zla_porcond_x.f
index 7ef63389..5b32a4ca 100644
--- a/SRC/zla_porcond_x.f
+++ b/SRC/zla_porcond_x.f
@@ -1,68 +1,135 @@
- DOUBLE PRECISION FUNCTION ZLA_PORCOND_X( UPLO, N, A, LDA, AF,
- $ LDAF, X, INFO, WORK,
- $ RWORK )
-*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N, LDA, LDAF, INFO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
- DOUBLE PRECISION RWORK( * )
-* ..
-*
+*> \brief \b ZLA_PORCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_PORCOND_X( UPLO, N, A, LDA, AF,
+* LDAF, X, INFO, WORK,
+* RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+* DOUBLE PRECISION RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLA_PORCOND_X Computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX*16 vector.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_PORCOND_X Computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX*16 vector.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by ZPOTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+*> \date November 2011
*
-* X (input) COMPLEX*16 array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
+*> \ingroup complex16POcomputational
*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLA_PORCOND_X( UPLO, N, A, LDA, AF,
+ $ LDAF, X, INFO, WORK,
+ $ RWORK )
*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+ DOUBLE PRECISION RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_porfsx_extended.f b/SRC/zla_porfsx_extended.f
index db9f5d5a..fab64cfe 100644
--- a/SRC/zla_porfsx_extended.f
+++ b/SRC/zla_porfsx_extended.f
@@ -1,3 +1,393 @@
+*> \brief \b ZLA_PORFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLA_PORFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, COLEQU, C, B, LDB, Y,
+* LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* DOUBLE PRECISION C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_PORFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by ZPORFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by ZPOTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by ZLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX*16 PRECISION array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to ZPOTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POcomputational
+*
+* =====================================================================
SUBROUTINE ZLA_PORFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, COLEQU, C, B, LDB, Y,
$ LDY, BERR_OUT, N_NORMS,
@@ -6,16 +396,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -31,246 +416,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_PORFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by ZPORFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by ZPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX*16 array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by ZPOTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by ZLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX*16 PRECISION array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to ZPOTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_porpvgrw.f b/SRC/zla_porpvgrw.f
index 1e168fc2..b25d5e47 100644
--- a/SRC/zla_porpvgrw.f
+++ b/SRC/zla_porpvgrw.f
@@ -1,59 +1,116 @@
- DOUBLE PRECISION FUNCTION ZLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF,
- $ LDAF, WORK )
+*> \brief \b ZLA_PORPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER NCOLS, LDA, LDAF
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), AF( LDAF, * )
- DOUBLE PRECISION WORK( * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION ZLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF,
+* LDAF, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * )
+* DOUBLE PRECISION WORK( * )
+* ..
+*
* Purpose
* =======
-*
-* ZLA_PORPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_PORPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complex16POcomputational
*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by ZPOTRF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLA_PORPVGRW( UPLO, NCOLS, A, LDA, AF,
+ $ LDAF, WORK )
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) COMPLEX*16 array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER NCOLS, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), AF( LDAF, * )
+ DOUBLE PRECISION WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_syamv.f b/SRC/zla_syamv.f
index c086fa10..91284b8c 100644
--- a/SRC/zla_syamv.f
+++ b/SRC/zla_syamv.f
@@ -1,120 +1,195 @@
- SUBROUTINE ZLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
- $ INCY )
+*> \brief \b ZLA_SYAMV
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- DOUBLE PRECISION ALPHA, BETA
- INTEGER INCX, INCY, LDA, N
- INTEGER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), X( * )
- DOUBLE PRECISION Y( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ALPHA, BETA
+* INTEGER INCX, INCY, LDA, N
+* INTEGER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), X( * )
+* DOUBLE PRECISION Y( * )
+* ..
+*
* Purpose
* =======
*
-* ZLA_SYAMV performs the matrix-vector operation
-*
-* y := alpha*abs(A)*abs(x) + beta*abs(y),
-*
-* where alpha and beta are scalars, x and y are vectors and A is an
-* n by n symmetric matrix.
-*
-* This function is primarily used in calculating error bounds.
-* To protect against underflow during evaluation, components in
-* the resulting vector are perturbed away from zero by (N+1)
-* times the underflow threshold. To prevent unnecessarily large
-* errors for block-structure embedded in general matrices,
-* "symbolically" zero components are not perturbed. A zero
-* entry is considered "symbolic" if all multiplications involved
-* in computing that entry have at least one zero multiplicand.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_SYAMV performs the matrix-vector operation
+*>
+*> y := alpha*abs(A)*abs(x) + beta*abs(y),
+*>
+*> where alpha and beta are scalars, x and y are vectors and A is an
+*> n by n symmetric matrix.
+*>
+*> This function is primarily used in calculating error bounds.
+*> To protect against underflow during evaluation, components in
+*> the resulting vector are perturbed away from zero by (N+1)
+*> times the underflow threshold. To prevent unnecessarily large
+*> errors for block-structure embedded in general matrices,
+*> "symbolically" zero components are not perturbed. A zero
+*> entry is considered "symbolic" if all multiplications involved
+*> in computing that entry have at least one zero multiplicand.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) INTEGER
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = BLAS_UPPER Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = BLAS_LOWER Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) DOUBLE PRECISION .
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX*16 array, DIMENSION ( LDA, n ).
-* Before entry, the leading m by n part of the array A must
-* contain the matrix of coefficients.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, n ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX*16 array, DIMENSION at least
-* ( 1 + ( n - 1 )*abs( INCX ) )
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is INTEGER
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_UPPER Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = BLAS_LOWER Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION .
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, DIMENSION ( LDA, n ).
+*> Before entry, the leading m by n part of the array A must
+*> contain the matrix of coefficients.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, n ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, DIMENSION at least
+*> ( 1 + ( n - 1 )*abs( INCX ) )
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION .
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension
+*> ( 1 + ( n - 1 )*abs( INCY ) )
+*> Before entry with BETA non-zero, the incremented array Y
+*> must contain the vector y. On exit, Y is overwritten by the
+*> updated vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) DOUBLE PRECISION .
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
+*> \date November 2011
*
-* Y (input/output) DOUBLE PRECISION array, dimension
-* ( 1 + ( n - 1 )*abs( INCY ) )
-* Before entry with BETA non-zero, the incremented array Y
-* must contain the vector y. On exit, Y is overwritten by the
-* updated vector y.
+*> \ingroup complex16SYcomputational
*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Level 2 Blas routine.
+*>
+*> -- Written on 22-October-1986.
+*> Jack Dongarra, Argonne National Lab.
+*> Jeremy Du Croz, Nag Central Office.
+*> Sven Hammarling, Nag Central Office.
+*> Richard Hanson, Sandia National Labs.
+*> -- Modified for the absolute-value product, April 2006
+*> Jason Riedy, UC Berkeley
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLA_SYAMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
+ $ INCY )
*
-* Level 2 Blas routine.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- Written on 22-October-1986.
-* Jack Dongarra, Argonne National Lab.
-* Jeremy Du Croz, Nag Central Office.
-* Sven Hammarling, Nag Central Office.
-* Richard Hanson, Sandia National Labs.
-* -- Modified for the absolute-value product, April 2006
-* Jason Riedy, UC Berkeley
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ALPHA, BETA
+ INTEGER INCX, INCY, LDA, N
+ INTEGER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), X( * )
+ DOUBLE PRECISION Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_syrcond_c.f b/SRC/zla_syrcond_c.f
index 42ef9db3..c4887d64 100644
--- a/SRC/zla_syrcond_c.f
+++ b/SRC/zla_syrcond_c.f
@@ -1,17 +1,142 @@
+*> \brief \b ZLA_SYRCOND_C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_SYRCOND_C( UPLO, N, A, LDA, AF,
+* LDAF, IPIV, C, CAPPLY,
+* INFO, WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* LOGICAL CAPPLY
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * )
+* DOUBLE PRECISION C( * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_SYRCOND_C Computes the infinity norm condition number of
+*> op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The vector C in the formula op(A) * inv(diag(C)).
+*> \endverbatim
+*>
+*> \param[in] CAPPLY
+*> \verbatim
+*> CAPPLY is LOGICAL
+*> If .TRUE. then access the vector C in the formula above.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_SYRCOND_C( UPLO, N, A, LDA, AF,
$ LDAF, IPIV, C, CAPPLY,
$ INFO, WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO
LOGICAL CAPPLY
@@ -23,56 +148,6 @@
DOUBLE PRECISION C( * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_SYRCOND_C Computes the infinity norm condition number of
-* op(A) * inv(diag(C)) where C is a DOUBLE PRECISION vector.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The vector C in the formula op(A) * inv(diag(C)).
-*
-* CAPPLY (input) LOGICAL
-* If .TRUE. then access the vector C in the formula above.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_syrcond_x.f b/SRC/zla_syrcond_x.f
index aaac999e..e3bdd1e0 100644
--- a/SRC/zla_syrcond_x.f
+++ b/SRC/zla_syrcond_x.f
@@ -1,17 +1,135 @@
+*> \brief \b ZLA_SYRCOND_X
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLA_SYRCOND_X( UPLO, N, A, LDA, AF,
+* LDAF, IPIV, X, INFO,
+* WORK, RWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N, LDA, LDAF, INFO
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), WORK( * ), X( * )
+* DOUBLE PRECISION RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_SYRCOND_X Computes the infinity norm condition number of
+*> op(A) * diag(X) where X is a COMPLEX*16 vector.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> The vector X in the formula op(A) * diag(X).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> i > 0: The ith argument is invalid.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N).
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N).
+*> Workspace.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLA_SYRCOND_X( UPLO, N, A, LDA, AF,
$ LDAF, IPIV, X, INFO,
$ WORK, RWORK )
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER N, LDA, LDAF, INFO
@@ -22,53 +140,6 @@
DOUBLE PRECISION RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_SYRCOND_X Computes the infinity norm condition number of
-* op(A) * diag(X) where X is a COMPLEX*16 vector.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
-*
-* X (input) COMPLEX*16 array, dimension (N)
-* The vector X in the formula op(A) * diag(X).
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* i > 0: The ith argument is invalid.
-*
-* WORK (input) COMPLEX*16 array, dimension (2*N).
-* Workspace.
-*
-* RWORK (input) DOUBLE PRECISION array, dimension (N).
-* Workspace.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_syrfsx_extended.f b/SRC/zla_syrfsx_extended.f
index 275627de..0891c808 100644
--- a/SRC/zla_syrfsx_extended.f
+++ b/SRC/zla_syrfsx_extended.f
@@ -1,3 +1,401 @@
+*> \brief \b ZLA_SYRFSX_EXTENDED
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLA_SYRFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
+* AF, LDAF, IPIV, COLEQU, C, B, LDB,
+* Y, LDY, BERR_OUT, N_NORMS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
+* AYB, DY, Y_TAIL, RCOND, ITHRESH,
+* RTHRESH, DZ_UB, IGNORE_CWISE,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
+* $ N_NORMS, ITHRESH
+* CHARACTER UPLO
+* LOGICAL COLEQU, IGNORE_CWISE
+* DOUBLE PRECISION RTHRESH, DZ_UB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ Y( LDY, * ), RES( * ), DY( * ), Y_TAIL( * )
+* DOUBLE PRECISION C( * ), AYB( * ), RCOND, BERR_OUT( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_SYRFSX_EXTENDED improves the computed solution to a system of
+*> linear equations by performing extra-precise iterative refinement
+*> and provides error bounds and backward error estimates for the solution.
+*> This subroutine is called by ZSYRFSX to perform iterative refinement.
+*> In addition to normwise error bound, the code provides maximum
+*> componentwise error bound if possible. See comments for ERR_BNDS_NORM
+*> and ERR_BNDS_COMP for details of the error bounds. Note that this
+*> subroutine is only resonsible for setting the second fields of
+*> ERR_BNDS_NORM and ERR_BNDS_COMP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PREC_TYPE
+*> \verbatim
+*> PREC_TYPE is INTEGER
+*> Specifies the intermediate precision to be used in refinement.
+*> The value is defined by ILAPREC(P) where P is a CHARACTER and
+*> P = 'S': Single
+*> = 'D': Double
+*> = 'I': Indigenous
+*> = 'X', 'E': Extra
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand-sides, i.e., the number of columns of the
+*> matrix B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] COLEQU
+*> \verbatim
+*> COLEQU is LOGICAL
+*> If .TRUE. then column equilibration was done to A before calling
+*> this routine. This is needed to compute the solution and error
+*> bounds correctly.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A. If COLEQU = .FALSE., C
+*> is not accessed. If C is input, each element of C should be a power
+*> of the radix to ensure a reliable solution and error estimates.
+*> Scaling by powers of the radix does not cause rounding errors unless
+*> the result underflows or overflows. Rounding errors during scaling
+*> lead to refining with a matrix that is not equivalent to the
+*> input matrix, producing error estimates that may not be
+*> reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right-hand-side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension
+*> (LDY,NRHS)
+*> On entry, the solution matrix X, as computed by ZSYTRS.
+*> On exit, the improved solution matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] BERR_OUT
+*> \verbatim
+*> BERR_OUT is DOUBLE PRECISION array, dimension (NRHS)
+*> On exit, BERR_OUT(j) contains the componentwise relative backward
+*> error for right-hand-side j from the formula
+*> max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
+*> where abs(Z) is the componentwise absolute value of the matrix
+*> or vector Z. This is computed by ZLA_LIN_BERR.
+*> \endverbatim
+*>
+*> \param[in] N_NORMS
+*> \verbatim
+*> N_NORMS is INTEGER
+*> Determines which error bounds to return (see ERR_BNDS_NORM
+*> and ERR_BNDS_COMP).
+*> If N_NORMS >= 1 return normwise error bounds.
+*> If N_NORMS >= 2 return componentwise error bounds.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in,out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension
+*> (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * slamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * slamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * slamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> This subroutine is only responsible for setting the second field
+*> above.
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] RES
+*> \verbatim
+*> RES is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate residual.
+*> \endverbatim
+*>
+*> \param[in] AYB
+*> \verbatim
+*> AYB is DOUBLE PRECISION array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[in] DY
+*> \verbatim
+*> DY is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] Y_TAIL
+*> \verbatim
+*> Y_TAIL is COMPLEX*16 array, dimension (N)
+*> Workspace to hold the trailing bits of the intermediate solution.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[in] ITHRESH
+*> \verbatim
+*> ITHRESH is INTEGER
+*> The maximum number of residual computations allowed for
+*> refinement. The default is 10. For 'aggressive' set to 100 to
+*> permit convergence using approximate factorizations or
+*> factorizations other than LU. If the factorization uses a
+*> technique other than Gaussian elimination, the guarantees in
+*> ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
+*> \endverbatim
+*>
+*> \param[in] RTHRESH
+*> \verbatim
+*> RTHRESH is DOUBLE PRECISION
+*> Determines when to stop refinement if the error estimate stops
+*> decreasing. Refinement will stop when the next solution no longer
+*> satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
+*> the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
+*> default value is 0.5. For 'aggressive' set to 0.9 to permit
+*> convergence on extremely ill-conditioned matrices. See LAWN 165
+*> for more details.
+*> \endverbatim
+*>
+*> \param[in] DZ_UB
+*> \verbatim
+*> DZ_UB is DOUBLE PRECISION
+*> Determines when to start considering componentwise convergence.
+*> Componentwise convergence is only considered after each component
+*> of the solution Y is stable, which we definte as the relative
+*> change in each component being less than DZ_UB. The default value
+*> is 0.25, requiring the first bit to be stable. See LAWN 165 for
+*> more details.
+*> \endverbatim
+*>
+*> \param[in] IGNORE_CWISE
+*> \verbatim
+*> IGNORE_CWISE is LOGICAL
+*> If .TRUE. then ignore componentwise convergence. Default value
+*> is .FALSE..
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit.
+*> < 0: if INFO = -i, the ith argument to ZSYTRS had an illegal
+*> value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
SUBROUTINE ZLA_SYRFSX_EXTENDED( PREC_TYPE, UPLO, N, NRHS, A, LDA,
$ AF, LDAF, IPIV, COLEQU, C, B, LDB,
$ Y, LDY, BERR_OUT, N_NORMS,
@@ -6,16 +404,11 @@
$ RTHRESH, DZ_UB, IGNORE_CWISE,
$ INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
$ N_NORMS, ITHRESH
@@ -32,250 +425,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLA_SYRFSX_EXTENDED improves the computed solution to a system of
-* linear equations by performing extra-precise iterative refinement
-* and provides error bounds and backward error estimates for the solution.
-* This subroutine is called by ZSYRFSX to perform iterative refinement.
-* In addition to normwise error bound, the code provides maximum
-* componentwise error bound if possible. See comments for ERR_BNDS_NORM
-* and ERR_BNDS_COMP for details of the error bounds. Note that this
-* subroutine is only resonsible for setting the second fields of
-* ERR_BNDS_NORM and ERR_BNDS_COMP.
-*
-* Arguments
-* =========
-*
-* PREC_TYPE (input) INTEGER
-* Specifies the intermediate precision to be used in refinement.
-* The value is defined by ILAPREC(P) where P is a CHARACTER and
-* P = 'S': Single
-* = 'D': Double
-* = 'I': Indigenous
-* = 'X', 'E': Extra
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand-sides, i.e., the number of columns of the
-* matrix B.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
-*
-* COLEQU (input) LOGICAL
-* If .TRUE. then column equilibration was done to A before calling
-* this routine. This is needed to compute the solution and error
-* bounds correctly.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A. If COLEQU = .FALSE., C
-* is not accessed. If C is input, each element of C should be a power
-* of the radix to ensure a reliable solution and error estimates.
-* Scaling by powers of the radix does not cause rounding errors unless
-* the result underflows or overflows. Rounding errors during scaling
-* lead to refining with a matrix that is not equivalent to the
-* input matrix, producing error estimates that may not be
-* reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right-hand-side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Y (input/output) COMPLEX*16 array, dimension
-* (LDY,NRHS)
-* On entry, the solution matrix X, as computed by ZSYTRS.
-* On exit, the improved solution matrix Y.
-*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
-*
-* BERR_OUT (output) DOUBLE PRECISION array, dimension (NRHS)
-* On exit, BERR_OUT(j) contains the componentwise relative backward
-* error for right-hand-side j from the formula
-* max(i) ( abs(RES(i)) / ( abs(op(A_s))*abs(Y) + abs(B_s) )(i) )
-* where abs(Z) is the componentwise absolute value of the matrix
-* or vector Z. This is computed by ZLA_LIN_BERR.
-*
-* N_NORMS (input) INTEGER
-* Determines which error bounds to return (see ERR_BNDS_NORM
-* and ERR_BNDS_COMP).
-* If N_NORMS >= 1 return normwise error bounds.
-* If N_NORMS >= 2 return componentwise error bounds.
-*
-* ERR_BNDS_NORM (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (input/output) DOUBLE PRECISION array, dimension
-* (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * slamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * slamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * slamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* This subroutine is only responsible for setting the second field
-* above.
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* RES (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate residual.
-*
-* AYB (input) DOUBLE PRECISION array, dimension (N)
-* Workspace.
-*
-* DY (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the intermediate solution.
-*
-* Y_TAIL (input) COMPLEX*16 array, dimension (N)
-* Workspace to hold the trailing bits of the intermediate solution.
-*
-* RCOND (input) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* ITHRESH (input) INTEGER
-* The maximum number of residual computations allowed for
-* refinement. The default is 10. For 'aggressive' set to 100 to
-* permit convergence using approximate factorizations or
-* factorizations other than LU. If the factorization uses a
-* technique other than Gaussian elimination, the guarantees in
-* ERR_BNDS_NORM and ERR_BNDS_COMP may no longer be trustworthy.
-*
-* RTHRESH (input) DOUBLE PRECISION
-* Determines when to stop refinement if the error estimate stops
-* decreasing. Refinement will stop when the next solution no longer
-* satisfies norm(dx_{i+1}) < RTHRESH * norm(dx_i) where norm(Z) is
-* the infinity norm of Z. RTHRESH satisfies 0 < RTHRESH <= 1. The
-* default value is 0.5. For 'aggressive' set to 0.9 to permit
-* convergence on extremely ill-conditioned matrices. See LAWN 165
-* for more details.
-*
-* DZ_UB (input) DOUBLE PRECISION
-* Determines when to start considering componentwise convergence.
-* Componentwise convergence is only considered after each component
-* of the solution Y is stable, which we definte as the relative
-* change in each component being less than DZ_UB. The default value
-* is 0.25, requiring the first bit to be stable. See LAWN 165 for
-* more details.
-*
-* IGNORE_CWISE (input) LOGICAL
-* If .TRUE. then ignore componentwise convergence. Default value
-* is .FALSE..
-*
-* INFO (output) INTEGER
-* = 0: Successful exit.
-* < 0: if INFO = -i, the ith argument to ZSYTRS had an illegal
-* value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zla_syrpvgrw.f b/SRC/zla_syrpvgrw.f
index 7b3c0d49..58fa72ca 100644
--- a/SRC/zla_syrpvgrw.f
+++ b/SRC/zla_syrpvgrw.f
@@ -1,72 +1,139 @@
- DOUBLE PRECISION FUNCTION ZLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF,
- $ LDAF, IPIV, WORK )
+*> \brief \b ZLA_SYRPVGRW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- CHARACTER*1 UPLO
- INTEGER N, INFO, LDA, LDAF
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), AF( LDAF, * )
- DOUBLE PRECISION WORK( * )
- INTEGER IPIV( * )
-* ..
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION ZLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF,
+* LDAF, IPIV, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER*1 UPLO
+* INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * )
+* DOUBLE PRECISION WORK( * )
+* INTEGER IPIV( * )
+* ..
+*
* Purpose
* =======
-*
-* ZLA_SYRPVGRW computes the reciprocal pivot growth factor
-* norm(A)/norm(U). The "max absolute element" norm is used. If this is
-* much less than 1, the stability of the LU factorization of the
-* (equilibrated) matrix A could be poor. This also means that the
-* solution X, estimated condition numbers, and error bounds could be
-* unreliable.
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLA_SYRPVGRW computes the reciprocal pivot growth factor
+*> norm(A)/norm(U). The "max absolute element" norm is used. If this is
+*> much less than 1, the stability of the LU factorization of the
+*> (equilibrated) matrix A could be poor. This also means that the
+*> solution X, estimated condition numbers, and error bounds could be
+*> unreliable.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The value of INFO returned from ZSYTRF, .i.e., the pivot in
+*> column INFO is exactly 0.
+*> \endverbatim
+*>
+*> \param[in] NCOLS
+*> \verbatim
+*> NCOLS is INTEGER
+*> The number of columns of the matrix A. NCOLS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* INFO (input) INTEGER
-* The value of INFO returned from ZSYTRF, .i.e., the pivot in
-* column INFO is exactly 0.
-*
-* NCOLS (input) INTEGER
-* The number of columns of the matrix A. NCOLS >= 0.
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSYTRF.
+*> \ingroup complex16SYcomputational
*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLA_SYRPVGRW( UPLO, N, INFO, A, LDA, AF,
+ $ LDAF, IPIV, WORK )
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (input) COMPLEX*16 array, dimension (2*N)
+* .. Scalar Arguments ..
+ CHARACTER*1 UPLO
+ INTEGER N, INFO, LDA, LDAF
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), AF( LDAF, * )
+ DOUBLE PRECISION WORK( * )
+ INTEGER IPIV( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zla_wwaddw.f b/SRC/zla_wwaddw.f
index 50158f89..50e70280 100644
--- a/SRC/zla_wwaddw.f
+++ b/SRC/zla_wwaddw.f
@@ -1,44 +1,91 @@
- SUBROUTINE ZLA_WWADDW( N, X, Y, W )
+*> \brief \b ZLA_WWADDW
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 X( * ), Y( * ), W( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZLA_WWADDW( N, X, Y, W )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X( * ), Y( * ), W( * )
+* ..
+*
* Purpose
-* =======
-*
-* ZLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
+* =======
*
-* This works for all extant IBM's hex and binary floating point
-* arithmetics, but not for decimal.
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZLA_WWADDW adds a vector W into a doubled-single vector (X, Y).
+*>
+*> This works for all extant IBM's hex and binary floating point
+*> arithmetics, but not for decimal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of vectors X, Y, and W.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of vectors X, Y, and W.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> The first part of the doubled-single accumulation vector.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (N)
+*> The second part of the doubled-single accumulation vector.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> The vector to be added.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input/output) COMPLEX*16 array, dimension (N)
-* The first part of the doubled-single accumulation vector.
+*> \date November 2011
*
-* Y (input/output) COMPLEX*16 array, dimension (N)
-* The second part of the doubled-single accumulation vector.
+*> \ingroup complex16OTHERcomputational
*
-* W (input) COMPLEX*16 array, dimension (N)
-* The vector to be added.
+* =====================================================================
+ SUBROUTINE ZLA_WWADDW( N, X, Y, W )
+*
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 X( * ), Y( * ), W( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlabrd.f b/SRC/zlabrd.f
index ac41b178..729d7967 100644
--- a/SRC/zlabrd.f
+++ b/SRC/zlabrd.f
@@ -1,139 +1,178 @@
- SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
- $ LDY )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDX, LDY, M, N, NB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * )
- COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
- $ Y( LDY, * )
-* ..
-*
+*> \brief \b ZLABRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+* LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDX, LDY, M, N, NB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * )
+* COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
+* $ Y( LDY, * )
+* ..
+*
* Purpose
* =======
*
-* ZLABRD reduces the first NB rows and columns of a complex general
-* m by n matrix A to upper or lower real bidiagonal form by a unitary
-* transformation Q**H * A * P, and returns the matrices X and Y which
-* are needed to apply the transformation to the unreduced part of A.
-*
-* If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
-* bidiagonal form.
-*
-* This is an auxiliary routine called by ZGEBRD
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLABRD reduces the first NB rows and columns of a complex general
+*> m by n matrix A to upper or lower real bidiagonal form by a unitary
+*> transformation Q**H * A * P, and returns the matrices X and Y which
+*> are needed to apply the transformation to the unreduced part of A.
+*>
+*> If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
+*> bidiagonal form.
+*>
+*> This is an auxiliary routine called by ZGEBRD
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in the matrix A.
-*
-* N (input) INTEGER
-* The number of columns in the matrix A.
-*
-* NB (input) INTEGER
-* The number of leading rows and columns of A to be reduced.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n general matrix to be reduced.
-* On exit, the first NB rows and columns of the matrix are
-* overwritten; the rest of the array is unchanged.
-* If m >= n, elements on and below the diagonal in the first NB
-* columns, with the array TAUQ, represent the unitary
-* matrix Q as a product of elementary reflectors; and
-* elements above the diagonal in the first NB rows, with the
-* array TAUP, represent the unitary matrix P as a product
-* of elementary reflectors.
-* If m < n, elements below the diagonal in the first NB
-* columns, with the array TAUQ, represent the unitary
-* matrix Q as a product of elementary reflectors, and
-* elements on and above the diagonal in the first NB rows,
-* with the array TAUP, represent the unitary matrix P as
-* a product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* D (output) DOUBLE PRECISION array, dimension (NB)
-* The diagonal elements of the first NB rows and columns of
-* the reduced matrix. D(i) = A(i,i).
-*
-* E (output) DOUBLE PRECISION array, dimension (NB)
-* The off-diagonal elements of the first NB rows and columns of
-* the reduced matrix.
-*
-* TAUQ (output) COMPLEX*16 array dimension (NB)
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix Q. See Further Details.
-*
-* TAUP (output) COMPLEX*16 array, dimension (NB)
-* The scalar factors of the elementary reflectors which
-* represent the unitary matrix P. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of leading rows and columns of A to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (output) COMPLEX*16 array, dimension (LDX,NB)
-* The m-by-nb matrix X required to update the unreduced part
-* of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,M).
+*> \date November 2011
*
-* Y (output) COMPLEX*16 array, dimension (LDY,NB)
-* The n-by-nb matrix Y required to update the unreduced part
-* of A.
+*> \ingroup complex16OTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> D (output) DOUBLE PRECISION array, dimension (NB)
+*> The diagonal elements of the first NB rows and columns of
+*> the reduced matrix. D(i) = A(i,i).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (NB)
+*> The off-diagonal elements of the first NB rows and columns of
+*> the reduced matrix.
+*>
+*> TAUQ (output) COMPLEX*16 array dimension (NB)
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix Q. See Further Details.
+*>
+*> TAUP (output) COMPLEX*16 array, dimension (NB)
+*> The scalar factors of the elementary reflectors which
+*> represent the unitary matrix P. See Further Details.
+*>
+*> X (output) COMPLEX*16 array, dimension (LDX,NB)
+*> The m-by-nb matrix X required to update the unreduced part
+*> of A.
+*>
+*> LDX (input) INTEGER
+*> The leading dimension of the array X. LDX >= max(1,M).
+*>
+*> Y (output) COMPLEX*16 array, dimension (LDY,NB)
+*> The n-by-nb matrix Y required to update the unreduced part
+*> of A.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*>
+*>
+*> The matrices Q and P are represented as products of elementary
+*> reflectors:
+*>
+*> Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
+*>
+*> Each H(i) and G(i) has the form:
+*>
+*> H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
+*>
+*> where tauq and taup are complex scalars, and v and u are complex
+*> vectors.
+*>
+*> If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
+*> A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
+*> A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
+*> A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*> The elements of the vectors v and u together form the m-by-nb matrix
+*> V and the nb-by-n matrix U**H which are needed, with X and Y, to apply
+*> the transformation to the unreduced part of the matrix, using a block
+*> update of the form: A := A - V*Y**H - X*U**H.
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with nb = 2:
+*>
+*> m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
+*>
+*> ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
+*> ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
+*> ( v1 v2 a a a ) ( v1 1 a a a a )
+*> ( v1 v2 a a a ) ( v1 v2 a a a a )
+*> ( v1 v2 a a a ) ( v1 v2 a a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix which is unchanged,
+*> vi denotes an element of the vector defining H(i), and ui an element
+*> of the vector defining G(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+ $ LDY )
*
-* The matrices Q and P are represented as products of elementary
-* reflectors:
-*
-* Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb)
-*
-* Each H(i) and G(i) has the form:
-*
-* H(i) = I - tauq * v * v**H and G(i) = I - taup * u * u**H
-*
-* where tauq and taup are complex scalars, and v and u are complex
-* vectors.
-*
-* If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
-* A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
-* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
-* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*
-* The elements of the vectors v and u together form the m-by-nb matrix
-* V and the nb-by-n matrix U**H which are needed, with X and Y, to apply
-* the transformation to the unreduced part of the matrix, using a block
-* update of the form: A := A - V*Y**H - X*U**H.
-*
-* The contents of A on exit are illustrated by the following examples
-* with nb = 2:
-*
-* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n):
-*
-* ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 )
-* ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 )
-* ( v1 v2 a a a ) ( v1 1 a a a a )
-* ( v1 v2 a a a ) ( v1 v2 a a a a )
-* ( v1 v2 a a a ) ( v1 v2 a a a a )
-* ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix which is unchanged,
-* vi denotes an element of the vector defining H(i), and ui an element
-* of the vector defining G(i).
+* .. Scalar Arguments ..
+ INTEGER LDA, LDX, LDY, M, N, NB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * )
+ COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
+ $ Y( LDY, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlacgv.f b/SRC/zlacgv.f
index 18eb0a6f..14e234e1 100644
--- a/SRC/zlacgv.f
+++ b/SRC/zlacgv.f
@@ -1,35 +1,82 @@
- SUBROUTINE ZLACGV( N, X, INCX )
+*> \brief \b ZLACGV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCX, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 X( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLACGV( N, X, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X( * )
+* ..
+*
* Purpose
* =======
*
-* ZLACGV conjugates a complex vector of length N.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLACGV conjugates a complex vector of length N.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of the vector X. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vector X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension
+*> (1+(N-1)*abs(INCX))
+*> On entry, the vector of length N to be conjugated.
+*> On exit, X is overwritten with conjg(X).
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between successive elements of X.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input/output) COMPLEX*16 array, dimension
-* (1+(N-1)*abs(INCX))
-* On entry, the vector of length N to be conjugated.
-* On exit, X is overwritten with conjg(X).
+*> \date November 2011
*
-* INCX (input) INTEGER
-* The spacing between successive elements of X.
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
+ SUBROUTINE ZLACGV( N, X, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlacn2.f b/SRC/zlacn2.f
index 5f0bd742..094fad4e 100644
--- a/SRC/zlacn2.f
+++ b/SRC/zlacn2.f
@@ -1,75 +1,138 @@
- SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KASE, N
- DOUBLE PRECISION EST
-* ..
-* .. Array Arguments ..
- INTEGER ISAVE( 3 )
- COMPLEX*16 V( * ), X( * )
-* ..
-*
+*> \brief \b ZLACN2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE )
+*
+* .. Scalar Arguments ..
+* INTEGER KASE, N
+* DOUBLE PRECISION EST
+* ..
+* .. Array Arguments ..
+* INTEGER ISAVE( 3 )
+* COMPLEX*16 V( * ), X( * )
+* ..
+*
* Purpose
* =======
*
-* ZLACN2 estimates the 1-norm of a square, complex matrix A.
-* Reverse communication is used for evaluating matrix-vector products.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLACN2 estimates the 1-norm of a square, complex matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 1.
-*
-* V (workspace) COMPLEX*16 array, dimension (N)
-* On the final return, V = A*W, where EST = norm(V)/norm(W)
-* (W is not returned).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (N)
+*> On the final return, V = A*W, where EST = norm(V)/norm(W)
+*> (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> On an intermediate return, X should be overwritten by
+*> A * X, if KASE=1,
+*> A**H * X, if KASE=2,
+*> where A**H is the conjugate transpose of A, and ZLACN2 must be
+*> re-called with all the other parameters unchanged.
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*> EST is DOUBLE PRECISION
+*> On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
+*> unchanged from the previous call to ZLACN2.
+*> On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*> KASE is INTEGER
+*> On the initial call to ZLACN2, KASE should be 0.
+*> On an intermediate return, KASE will be 1 or 2, indicating
+*> whether X should be overwritten by A * X or A**H * X.
+*> On the final return from ZLACN2, KASE will again be 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISAVE
+*> \verbatim
+*> ISAVE is INTEGER array, dimension (3)
+*> ISAVE is used to save variables between calls to ZLACN2
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input/output) COMPLEX*16 array, dimension (N)
-* On an intermediate return, X should be overwritten by
-* A * X, if KASE=1,
-* A**H * X, if KASE=2,
-* where A**H is the conjugate transpose of A, and ZLACN2 must be
-* re-called with all the other parameters unchanged.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* EST (input/output) DOUBLE PRECISION
-* On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
-* unchanged from the previous call to ZLACN2.
-* On exit, EST is an estimate (a lower bound) for norm(A).
+*> \date November 2011
*
-* KASE (input/output) INTEGER
-* On the initial call to ZLACN2, KASE should be 0.
-* On an intermediate return, KASE will be 1 or 2, indicating
-* whether X should be overwritten by A * X or A**H * X.
-* On the final return from ZLACN2, KASE will again be 0.
+*> \ingroup complex16OTHERauxiliary
*
-* ISAVE (input/output) INTEGER array, dimension (3)
-* ISAVE is used to save variables between calls to ZLACN2
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Contributed by Nick Higham, University of Manchester.
+*> Originally named CONEST, dated March 16, 1988.
+*>
+*> Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*> a real or complex matrix, with applications to condition estimation",
+*> ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*> Last modified: April, 1999
+*>
+*> This is a thread safe version of ZLACON, which uses the array ISAVE
+*> in place of a SAVE statement, as follows:
+*>
+*> ZLACON ZLACN2
+*> JUMP ISAVE(1)
+*> J ISAVE(2)
+*> ITER ISAVE(3)
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE )
*
-* Contributed by Nick Higham, University of Manchester.
-* Originally named CONEST, dated March 16, 1988.
-*
-* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
-* a real or complex matrix, with applications to condition estimation",
-* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
-*
-* Last modified: April, 1999
-*
-* This is a thread safe version of ZLACON, which uses the array ISAVE
-* in place of a SAVE statement, as follows:
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* ZLACON ZLACN2
-* JUMP ISAVE(1)
-* J ISAVE(2)
-* ITER ISAVE(3)
+* .. Scalar Arguments ..
+ INTEGER KASE, N
+ DOUBLE PRECISION EST
+* ..
+* .. Array Arguments ..
+ INTEGER ISAVE( 3 )
+ COMPLEX*16 V( * ), X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlacon.f b/SRC/zlacon.f
index 9ab482d7..6f54354c 100644
--- a/SRC/zlacon.f
+++ b/SRC/zlacon.f
@@ -1,63 +1,122 @@
- SUBROUTINE ZLACON( N, V, X, EST, KASE )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KASE, N
- DOUBLE PRECISION EST
-* ..
-* .. Array Arguments ..
- COMPLEX*16 V( N ), X( N )
-* ..
-*
+*> \brief \b ZLACON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLACON( N, V, X, EST, KASE )
+*
+* .. Scalar Arguments ..
+* INTEGER KASE, N
+* DOUBLE PRECISION EST
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 V( N ), X( N )
+* ..
+*
* Purpose
* =======
*
-* ZLACON estimates the 1-norm of a square, complex matrix A.
-* Reverse communication is used for evaluating matrix-vector products.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLACON estimates the 1-norm of a square, complex matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix. N >= 1.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (N)
+*> On the final return, V = A*W, where EST = norm(V)/norm(W)
+*> (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> On an intermediate return, X should be overwritten by
+*> A * X, if KASE=1,
+*> A**H * X, if KASE=2,
+*> where A**H is the conjugate transpose of A, and ZLACON must be
+*> re-called with all the other parameters unchanged.
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*> EST is DOUBLE PRECISION
+*> On entry with KASE = 1 or 2 and JUMP = 3, EST should be
+*> unchanged from the previous call to ZLACON.
+*> On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*> KASE is INTEGER
+*> On the initial call to ZLACON, KASE should be 0.
+*> On an intermediate return, KASE will be 1 or 2, indicating
+*> whether X should be overwritten by A * X or A**H * X.
+*> On the final return from ZLACON, KASE will again be 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* V (workspace) COMPLEX*16 array, dimension (N)
-* On the final return, V = A*W, where EST = norm(V)/norm(W)
-* (W is not returned).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input/output) COMPLEX*16 array, dimension (N)
-* On an intermediate return, X should be overwritten by
-* A * X, if KASE=1,
-* A**H * X, if KASE=2,
-* where A**H is the conjugate transpose of A, and ZLACON must be
-* re-called with all the other parameters unchanged.
+*> \date November 2011
*
-* EST (input/output) DOUBLE PRECISION
-* On entry with KASE = 1 or 2 and JUMP = 3, EST should be
-* unchanged from the previous call to ZLACON.
-* On exit, EST is an estimate (a lower bound) for norm(A).
+*> \ingroup complex16OTHERauxiliary
*
-* KASE (input/output) INTEGER
-* On the initial call to ZLACON, KASE should be 0.
-* On an intermediate return, KASE will be 1 or 2, indicating
-* whether X should be overwritten by A * X or A**H * X.
-* On the final return from ZLACON, KASE will again be 0.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Contributed by Nick Higham, University of Manchester.
+*> Originally named CONEST, dated March 16, 1988.
+*>
+*> Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*> a real or complex matrix, with applications to condition estimation",
+*> ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*> Last modified: April, 1999
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLACON( N, V, X, EST, KASE )
*
-* Contributed by Nick Higham, University of Manchester.
-* Originally named CONEST, dated March 16, 1988.
-*
-* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of
-* a real or complex matrix, with applications to condition estimation",
-* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Last modified: April, 1999
+* .. Scalar Arguments ..
+ INTEGER KASE, N
+ DOUBLE PRECISION EST
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 V( N ), X( N )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlacp2.f b/SRC/zlacp2.f
index 78b98eb4..89d8bd6e 100644
--- a/SRC/zlacp2.f
+++ b/SRC/zlacp2.f
@@ -1,9 +1,105 @@
+*> \brief \b ZLACP2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLACP2( UPLO, M, N, A, LDA, B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* COMPLEX*16 B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLACP2 copies all or part of a real two-dimensional matrix A to a
+*> complex matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be copied to B.
+*> = 'U': Upper triangular part
+*> = 'L': Lower triangular part
+*> Otherwise: All of the matrix A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m by n matrix A. If UPLO = 'U', only the upper trapezium
+*> is accessed; if UPLO = 'L', only the lower trapezium is
+*> accessed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> On exit, B = A in the locations specified by UPLO.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLACP2( UPLO, M, N, A, LDA, B, LDB )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,41 +110,6 @@
COMPLEX*16 B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLACP2 copies all or part of a real two-dimensional matrix A to a
-* complex matrix B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be copied to B.
-* = 'U': Upper triangular part
-* = 'L': Lower triangular part
-* Otherwise: All of the matrix A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m by n matrix A. If UPLO = 'U', only the upper trapezium
-* is accessed; if UPLO = 'L', only the lower trapezium is
-* accessed.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (output) COMPLEX*16 array, dimension (LDB,N)
-* On exit, B = A in the locations specified by UPLO.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zlacpy.f b/SRC/zlacpy.f
index 9cb25d80..bacb098c 100644
--- a/SRC/zlacpy.f
+++ b/SRC/zlacpy.f
@@ -1,52 +1,112 @@
- SUBROUTINE ZLACPY( UPLO, M, N, A, LDA, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDB, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZLACPY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLACPY( UPLO, M, N, A, LDA, B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZLACPY copies all or part of a two-dimensional matrix A to another
-* matrix B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLACPY copies all or part of a two-dimensional matrix A to another
+*> matrix B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be copied to B.
-* = 'U': Upper triangular part
-* = 'L': Lower triangular part
-* Otherwise: All of the matrix A
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be copied to B.
+*> = 'U': Upper triangular part
+*> = 'L': Lower triangular part
+*> Otherwise: All of the matrix A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m by n matrix A. If UPLO = 'U', only the upper trapezium
+*> is accessed; if UPLO = 'L', only the lower trapezium is
+*> accessed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> On exit, B = A in the locations specified by UPLO.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \date November 2011
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m by n matrix A. If UPLO = 'U', only the upper trapezium
-* is accessed; if UPLO = 'L', only the lower trapezium is
-* accessed.
+*> \ingroup complex16OTHERauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZLACPY( UPLO, M, N, A, LDA, B, LDB )
*
-* B (output) COMPLEX*16 array, dimension (LDB,N)
-* On exit, B = A in the locations specified by UPLO.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDB, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlacrm.f b/SRC/zlacrm.f
index aaa10647..e725bea2 100644
--- a/SRC/zlacrm.f
+++ b/SRC/zlacrm.f
@@ -1,57 +1,123 @@
- SUBROUTINE ZLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LDC, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION B( LDB, * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), C( LDC, * )
-* ..
-*
+*> \brief \b ZLACRM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDC, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), C( LDC, * )
+* ..
+*
* Purpose
* =======
*
-* ZLACRM performs a very simple matrix-matrix multiplication:
-* C := A * B,
-* where A is M by N and complex; B is N by N and real;
-* C is M by N and complex.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLACRM performs a very simple matrix-matrix multiplication:
+*> C := A * B,
+*> where A is M by N and complex; B is N by N and real;
+*> C is M by N and complex.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A and of the matrix C.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns and rows of the matrix B and
-* the number of columns of the matrix C.
-* N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* A contains the M by N matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A and of the matrix C.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns and rows of the matrix B and
+*> the number of columns of the matrix C.
+*> N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> A contains the M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >=max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> B contains the N by N matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >=max(1,N).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, N)
+*> C contains the M by N matrix C.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >=max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*M*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >=max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* B contains the N by N matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >=max(1,N).
+*> \ingroup complex16OTHERauxiliary
*
-* C (input) COMPLEX*16 array, dimension (LDC, N)
-* C contains the M by N matrix C.
+* =====================================================================
+ SUBROUTINE ZLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >=max(1,N).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*M*N)
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LDC, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION B( LDB, * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), C( LDC, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlacrt.f b/SRC/zlacrt.f
index bd3b1691..2144b531 100644
--- a/SRC/zlacrt.f
+++ b/SRC/zlacrt.f
@@ -1,54 +1,114 @@
- SUBROUTINE ZLACRT( N, CX, INCX, CY, INCY, C, S )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCX, INCY, N
- COMPLEX*16 C, S
-* ..
-* .. Array Arguments ..
- COMPLEX*16 CX( * ), CY( * )
-* ..
-*
+*> \brief \b ZLACRT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLACRT( N, CX, INCX, CY, INCY, C, S )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* COMPLEX*16 C, S
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 CX( * ), CY( * )
+* ..
+*
* Purpose
* =======
*
-* ZLACRT performs the operation
-*
-* ( c s )( x ) ==> ( x )
-* ( -s c )( y ) ( y )
-*
-* where c and s are complex and the vectors x and y are complex.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLACRT performs the operation
+*>
+*> ( c s )( x ) ==> ( x )
+*> ( -s c )( y ) ( y )
+*>
+*> where c and s are complex and the vectors x and y are complex.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of elements in the vectors CX and CY.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements in the vectors CX and CY.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*> CX is COMPLEX*16 array, dimension (N)
+*> On input, the vector x.
+*> On output, CX is overwritten with c*x + s*y.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of CX. INCX <> 0.
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*> CY is COMPLEX*16 array, dimension (N)
+*> On input, the vector y.
+*> On output, CY is overwritten with -s*x + c*y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between successive values of CY. INCY <> 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX*16
+*> C and S define the matrix
+*> [ C S ].
+*> [ -S C ]
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CX (input/output) COMPLEX*16 array, dimension (N)
-* On input, the vector x.
-* On output, CX is overwritten with c*x + s*y.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCX (input) INTEGER
-* The increment between successive values of CX. INCX <> 0.
+*> \date November 2011
*
-* CY (input/output) COMPLEX*16 array, dimension (N)
-* On input, the vector y.
-* On output, CY is overwritten with -s*x + c*y.
+*> \ingroup complex16OTHERauxiliary
*
-* INCY (input) INTEGER
-* The increment between successive values of CY. INCY <> 0.
+* =====================================================================
+ SUBROUTINE ZLACRT( N, CX, INCX, CY, INCY, C, S )
*
-* C (input) COMPLEX*16
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* S (input) COMPLEX*16
-* C and S define the matrix
-* [ C S ].
-* [ -S C ]
+* .. Scalar Arguments ..
+ INTEGER INCX, INCY, N
+ COMPLEX*16 C, S
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 CX( * ), CY( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zladiv.f b/SRC/zladiv.f
index eff0ccd4..44bab04a 100644
--- a/SRC/zladiv.f
+++ b/SRC/zladiv.f
@@ -1,28 +1,69 @@
- COMPLEX*16 FUNCTION ZLADIV( X, Y )
+*> \brief \b ZLADIV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX*16 X, Y
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* COMPLEX*16 FUNCTION ZLADIV( X, Y )
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 X, Y
+* ..
+*
* Purpose
* =======
*
-* ZLADIV := X / Y, where X and Y are complex. The computation of X / Y
-* will not overflow on an intermediary step unless the results
-* overflows.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLADIV := X / Y, where X and Y are complex. The computation of X / Y
+*> will not overflow on an intermediary step unless the results
+*> overflows.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* X (input) COMPLEX*16
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*> Y is COMPLEX*16
+*> The complex scalars X and Y.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* Y (input) COMPLEX*16
-* The complex scalars X and Y.
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
+ COMPLEX*16 FUNCTION ZLADIV( X, Y )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX*16 X, Y
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlaed0.f b/SRC/zlaed0.f
index a0651a87..b1381f74 100644
--- a/SRC/zlaed0.f
+++ b/SRC/zlaed0.f
@@ -1,10 +1,146 @@
+*> \brief \b ZLAED0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAED0( QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS, RWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDQ, LDQS, N, QSIZ
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), RWORK( * )
+* COMPLEX*16 Q( LDQ, * ), QSTORE( LDQS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Using the divide and conquer method, ZLAED0 computes all eigenvalues
+*> of a symmetric tridiagonal matrix which is one diagonal block of
+*> those from reducing a dense or band Hermitian matrix and
+*> corresponding eigenvectors of the dense or band matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the unitary matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the off-diagonal elements of the tridiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> On entry, Q must contain an QSIZ x N matrix whose columns
+*> unitarily orthonormal. It is a part of the unitary matrix
+*> that reduces the full dense Hermitian matrix to a
+*> (reducible) symmetric tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array,
+*> the dimension of IWORK must be at least
+*> 6 + 6*N + 5*N*lg N
+*> ( lg( N ) = smallest integer k
+*> such that 2^k >= N )
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (1 + 3*N + 2*N*lg N + 3*N**2)
+*> ( lg( N ) = smallest integer k
+*> such that 2^k >= N )
+*> \endverbatim
+*>
+*> \param[out] QSTORE
+*> \verbatim
+*> QSTORE is COMPLEX*16 array, dimension (LDQS, N)
+*> Used to store parts of
+*> the eigenvector matrix when the updating matrix multiplies
+*> take place.
+*> \endverbatim
+*>
+*> \param[in] LDQS
+*> \verbatim
+*> LDQS is INTEGER
+*> The leading dimension of the array QSTORE.
+*> LDQS >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute an eigenvalue while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZLAED0( QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS, RWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDQ, LDQS, N, QSIZ
@@ -15,68 +151,6 @@
COMPLEX*16 Q( LDQ, * ), QSTORE( LDQS, * )
* ..
*
-* Purpose
-* =======
-*
-* Using the divide and conquer method, ZLAED0 computes all eigenvalues
-* of a symmetric tridiagonal matrix which is one diagonal block of
-* those from reducing a dense or band Hermitian matrix and
-* corresponding eigenvectors of the dense or band matrix.
-*
-* Arguments
-* =========
-*
-* QSIZ (input) INTEGER
-* The dimension of the unitary matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N if ICOMPQ = 1.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, the eigenvalues in ascending order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the off-diagonal elements of the tridiagonal matrix.
-* On exit, E has been destroyed.
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
-* On entry, Q must contain an QSIZ x N matrix whose columns
-* unitarily orthonormal. It is a part of the unitary matrix
-* that reduces the full dense Hermitian matrix to a
-* (reducible) symmetric tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* IWORK (workspace) INTEGER array,
-* the dimension of IWORK must be at least
-* 6 + 6*N + 5*N*lg N
-* ( lg( N ) = smallest integer k
-* such that 2^k >= N )
-*
-* RWORK (workspace) DOUBLE PRECISION array,
-* dimension (1 + 3*N + 2*N*lg N + 3*N**2)
-* ( lg( N ) = smallest integer k
-* such that 2^k >= N )
-*
-* QSTORE (workspace) COMPLEX*16 array, dimension (LDQS, N)
-* Used to store parts of
-* the eigenvector matrix when the updating matrix multiplies
-* take place.
-*
-* LDQS (input) INTEGER
-* The leading dimension of the array QSTORE.
-* LDQS >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute an eigenvalue while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through mod(INFO,N+1).
-*
* =====================================================================
*
* Warning: N could be as big as QSIZ!
diff --git a/SRC/zlaed7.f b/SRC/zlaed7.f
index 46e0b409..1ff21cad 100644
--- a/SRC/zlaed7.f
+++ b/SRC/zlaed7.f
@@ -1,12 +1,250 @@
+*> \brief \b ZLAED7
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAED7( N, CUTPNT, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
+* LDQ, RHO, INDXQ, QSTORE, QPTR, PRMPTR, PERM,
+* GIVPTR, GIVCOL, GIVNUM, WORK, RWORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CURLVL, CURPBM, CUTPNT, INFO, LDQ, N, QSIZ,
+* $ TLVLS
+* DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), GIVPTR( * ), INDXQ( * ),
+* $ IWORK( * ), PERM( * ), PRMPTR( * ), QPTR( * )
+* DOUBLE PRECISION D( * ), GIVNUM( 2, * ), QSTORE( * ), RWORK( * )
+* COMPLEX*16 Q( LDQ, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAED7 computes the updated eigensystem of a diagonal
+*> matrix after modification by a rank-one symmetric matrix. This
+*> routine is used only for the eigenproblem which requires all
+*> eigenvalues and optionally eigenvectors of a dense or banded
+*> Hermitian matrix that has been reduced to tridiagonal form.
+*>
+*> T = Q(in) ( D(in) + RHO * Z*Z**H ) Q**H(in) = Q(out) * D(out) * Q**H(out)
+*>
+*> where Z = Q**Hu, u is a vector of length N with ones in the
+*> CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
+*>
+*> The eigenvectors of the original matrix are stored in Q, and the
+*> eigenvalues are in D. The algorithm consists of three stages:
+*>
+*> The first stage consists of deflating the size of the problem
+*> when there are multiple eigenvalues or if there is a zero in
+*> the Z vector. For each such occurence the dimension of the
+*> secular equation problem is reduced by one. This stage is
+*> performed by the routine DLAED2.
+*>
+*> The second stage consists of calculating the updated
+*> eigenvalues. This is done by finding the roots of the secular
+*> equation via the routine DLAED4 (as called by SLAED3).
+*> This routine also calculates the eigenvectors of the current
+*> problem.
+*>
+*> The final stage consists of computing the updated eigenvectors
+*> directly using the updated eigenvalues. The eigenvectors for
+*> the current problem are multiplied with the eigenvectors from
+*> the overall problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> Contains the location of the last eigenvalue in the leading
+*> sub-matrix. min(1,N) <= CUTPNT <= N.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the unitary matrix used to reduce
+*> the full matrix to tridiagonal form. QSIZ >= N.
+*> \endverbatim
+*>
+*> \param[in] TLVLS
+*> \verbatim
+*> TLVLS is INTEGER
+*> The total number of merging levels in the overall divide and
+*> conquer tree.
+*> \endverbatim
+*>
+*> \param[in] CURLVL
+*> \verbatim
+*> CURLVL is INTEGER
+*> The current level in the overall merge routine,
+*> 0 <= curlvl <= tlvls.
+*> \endverbatim
+*>
+*> \param[in] CURPBM
+*> \verbatim
+*> CURPBM is INTEGER
+*> The current problem in the current level in the overall
+*> merge routine (counting from upper left to lower right).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the eigenvalues of the rank-1-perturbed matrix.
+*> On exit, the eigenvalues of the repaired matrix.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> On entry, the eigenvectors of the rank-1-perturbed matrix.
+*> On exit, the eigenvectors of the repaired tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> Contains the subdiagonal element used to create the rank-1
+*> modification.
+*> \endverbatim
+*>
+*> \param[out] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> This contains the permutation which will reintegrate the
+*> subproblem just solved back into sorted order,
+*> ie. D( INDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (3*N+2*QSIZ*N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (QSIZ*N)
+*> \endverbatim
+*>
+*> \param[in,out] QSTORE
+*> \verbatim
+*> QSTORE is DOUBLE PRECISION array, dimension (N**2+1)
+*> Stores eigenvectors of submatrices encountered during
+*> divide and conquer, packed together. QPTR points to
+*> beginning of the submatrices.
+*> \endverbatim
+*>
+*> \param[in,out] QPTR
+*> \verbatim
+*> QPTR is INTEGER array, dimension (N+2)
+*> List of indices pointing to beginning of submatrices stored
+*> in QSTORE. The submatrices are numbered starting at the
+*> bottom left of the divide and conquer tree, from left to
+*> right and bottom to top.
+*> \endverbatim
+*>
+*> \param[in] PRMPTR
+*> \verbatim
+*> PRMPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in PERM a
+*> level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
+*> indicates the size of the permutation and also the size of
+*> the full, non-deflated problem.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N lg N)
+*> Contains the permutations (from deflation and sorting) to be
+*> applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension (N lg N)
+*> Contains a list of pointers which indicate where in GIVCOL a
+*> level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
+*> indicates the number of Givens rotations.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N lg N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension (2, N lg N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = 1, an eigenvalue did not converge
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZLAED7( N, CUTPNT, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
$ LDQ, RHO, INDXQ, QSTORE, QPTR, PRMPTR, PERM,
$ GIVPTR, GIVCOL, GIVNUM, WORK, RWORK, IWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER CURLVL, CURPBM, CUTPNT, INFO, LDQ, N, QSIZ,
@@ -20,132 +258,6 @@
COMPLEX*16 Q( LDQ, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAED7 computes the updated eigensystem of a diagonal
-* matrix after modification by a rank-one symmetric matrix. This
-* routine is used only for the eigenproblem which requires all
-* eigenvalues and optionally eigenvectors of a dense or banded
-* Hermitian matrix that has been reduced to tridiagonal form.
-*
-* T = Q(in) ( D(in) + RHO * Z*Z**H ) Q**H(in) = Q(out) * D(out) * Q**H(out)
-*
-* where Z = Q**Hu, u is a vector of length N with ones in the
-* CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
-*
-* The eigenvectors of the original matrix are stored in Q, and the
-* eigenvalues are in D. The algorithm consists of three stages:
-*
-* The first stage consists of deflating the size of the problem
-* when there are multiple eigenvalues or if there is a zero in
-* the Z vector. For each such occurence the dimension of the
-* secular equation problem is reduced by one. This stage is
-* performed by the routine DLAED2.
-*
-* The second stage consists of calculating the updated
-* eigenvalues. This is done by finding the roots of the secular
-* equation via the routine DLAED4 (as called by SLAED3).
-* This routine also calculates the eigenvectors of the current
-* problem.
-*
-* The final stage consists of computing the updated eigenvectors
-* directly using the updated eigenvalues. The eigenvectors for
-* the current problem are multiplied with the eigenvectors from
-* the overall problem.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* CUTPNT (input) INTEGER
-* Contains the location of the last eigenvalue in the leading
-* sub-matrix. min(1,N) <= CUTPNT <= N.
-*
-* QSIZ (input) INTEGER
-* The dimension of the unitary matrix used to reduce
-* the full matrix to tridiagonal form. QSIZ >= N.
-*
-* TLVLS (input) INTEGER
-* The total number of merging levels in the overall divide and
-* conquer tree.
-*
-* CURLVL (input) INTEGER
-* The current level in the overall merge routine,
-* 0 <= curlvl <= tlvls.
-*
-* CURPBM (input) INTEGER
-* The current problem in the current level in the overall
-* merge routine (counting from upper left to lower right).
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the eigenvalues of the rank-1-perturbed matrix.
-* On exit, the eigenvalues of the repaired matrix.
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
-* On entry, the eigenvectors of the rank-1-perturbed matrix.
-* On exit, the eigenvectors of the repaired tridiagonal matrix.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* RHO (input) DOUBLE PRECISION
-* Contains the subdiagonal element used to create the rank-1
-* modification.
-*
-* INDXQ (output) INTEGER array, dimension (N)
-* This contains the permutation which will reintegrate the
-* subproblem just solved back into sorted order,
-* ie. D( INDXQ( I = 1, N ) ) will be in ascending order.
-*
-* IWORK (workspace) INTEGER array, dimension (4*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array,
-* dimension (3*N+2*QSIZ*N)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (QSIZ*N)
-*
-* QSTORE (input/output) DOUBLE PRECISION array, dimension (N**2+1)
-* Stores eigenvectors of submatrices encountered during
-* divide and conquer, packed together. QPTR points to
-* beginning of the submatrices.
-*
-* QPTR (input/output) INTEGER array, dimension (N+2)
-* List of indices pointing to beginning of submatrices stored
-* in QSTORE. The submatrices are numbered starting at the
-* bottom left of the divide and conquer tree, from left to
-* right and bottom to top.
-*
-* PRMPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in PERM a
-* level's permutation is stored. PRMPTR(i+1) - PRMPTR(i)
-* indicates the size of the permutation and also the size of
-* the full, non-deflated problem.
-*
-* PERM (input) INTEGER array, dimension (N lg N)
-* Contains the permutations (from deflation and sorting) to be
-* applied to each eigenblock.
-*
-* GIVPTR (input) INTEGER array, dimension (N lg N)
-* Contains a list of pointers which indicate where in GIVCOL a
-* level's Givens rotations are stored. GIVPTR(i+1) - GIVPTR(i)
-* indicates the number of Givens rotations.
-*
-* GIVCOL (input) INTEGER array, dimension (2, N lg N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (input) DOUBLE PRECISION array, dimension (2, N lg N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = 1, an eigenvalue did not converge
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zlaed8.f b/SRC/zlaed8.f
index ac0e5ee3..1a986775 100644
--- a/SRC/zlaed8.f
+++ b/SRC/zlaed8.f
@@ -1,11 +1,229 @@
+*> \brief \b ZLAED8
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAED8( K, N, QSIZ, Q, LDQ, D, RHO, CUTPNT, Z, DLAMDA,
+* Q2, LDQ2, W, INDXP, INDX, INDXQ, PERM, GIVPTR,
+* GIVCOL, GIVNUM, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER CUTPNT, GIVPTR, INFO, K, LDQ, LDQ2, N, QSIZ
+* DOUBLE PRECISION RHO
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( 2, * ), INDX( * ), INDXP( * ),
+* $ INDXQ( * ), PERM( * )
+* DOUBLE PRECISION D( * ), DLAMDA( * ), GIVNUM( 2, * ), W( * ),
+* $ Z( * )
+* COMPLEX*16 Q( LDQ, * ), Q2( LDQ2, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAED8 merges the two sets of eigenvalues together into a single
+*> sorted set. Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur: when two or more
+*> eigenvalues are close together or if there is a tiny element in the
+*> Z vector. For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the number of non-deflated eigenvalues.
+*> This is the order of the related secular equation.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*> QSIZ is INTEGER
+*> The dimension of the unitary matrix used to reduce
+*> the dense or band matrix to tridiagonal form.
+*> QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> On entry, Q contains the eigenvectors of the partially solved
+*> system which has been previously updated in matrix
+*> multiplies with other partially solved eigensystems.
+*> On exit, Q contains the trailing (N-K) updated eigenvectors
+*> (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, D contains the eigenvalues of the two submatrices to
+*> be combined. On exit, D contains the trailing (N-K) updated
+*> eigenvalues (those which were deflated) sorted into increasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] RHO
+*> \verbatim
+*> RHO is DOUBLE PRECISION
+*> Contains the off diagonal element associated with the rank-1
+*> cut which originally split the two submatrices which are now
+*> being recombined. RHO is modified during the computation to
+*> the value required by DLAED3.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*> CUTPNT is INTEGER
+*> Contains the location of the last eigenvalue in the leading
+*> sub-matrix. MIN(1,N) <= CUTPNT <= N.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (N)
+*> On input this vector contains the updating vector (the last
+*> row of the first sub-eigenvector matrix and the first row of
+*> the second sub-eigenvector matrix). The contents of Z are
+*> destroyed during the updating process.
+*> \endverbatim
+*>
+*> \param[out] DLAMDA
+*> \verbatim
+*> DLAMDA is DOUBLE PRECISION array, dimension (N)
+*> Contains a copy of the first K eigenvalues which will be used
+*> by DLAED3 to form the secular equation.
+*> \endverbatim
+*>
+*> \param[out] Q2
+*> \verbatim
+*> Q2 is COMPLEX*16 array, dimension (LDQ2,N)
+*> If ICOMPQ = 0, Q2 is not referenced. Otherwise,
+*> Contains a copy of the first K eigenvectors which will be used
+*> by DLAED7 in a matrix multiply (DGEMM) to update the new
+*> eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQ2
+*> \verbatim
+*> LDQ2 is INTEGER
+*> The leading dimension of the array Q2. LDQ2 >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> This will hold the first k values of the final
+*> deflation-altered z-vector and will be passed to DLAED3.
+*> \endverbatim
+*>
+*> \param[out] INDXP
+*> \verbatim
+*> INDXP is INTEGER array, dimension (N)
+*> This will contain the permutation used to place deflated
+*> values of D at the end of the array. On output INDXP(1:K)
+*> points to the nondeflated D-values and INDXP(K+1:N)
+*> points to the deflated eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] INDX
+*> \verbatim
+*> INDX is INTEGER array, dimension (N)
+*> This will contain the permutation used to sort the contents of
+*> D into ascending order.
+*> \endverbatim
+*>
+*> \param[in] INDXQ
+*> \verbatim
+*> INDXQ is INTEGER array, dimension (N)
+*> This contains the permutation which separately sorts the two
+*> sub-problems in D into ascending order. Note that elements in
+*> the second half of this permutation must first have CUTPNT
+*> added to their values in order to be accurate.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension (N)
+*> Contains the permutations (from deflation and sorting) to be
+*> applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> Contains the number of Givens rotations which took place in
+*> this subproblem.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension (2, N)
+*> Each pair of numbers indicates a pair of columns to take place
+*> in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension (2, N)
+*> Each number indicates the S value to be used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZLAED8( K, N, QSIZ, Q, LDQ, D, RHO, CUTPNT, Z, DLAMDA,
$ Q2, LDQ2, W, INDXP, INDX, INDXQ, PERM, GIVPTR,
$ GIVCOL, GIVNUM, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* June 2010
+* November 2011
*
* .. Scalar Arguments ..
INTEGER CUTPNT, GIVPTR, INFO, K, LDQ, LDQ2, N, QSIZ
@@ -19,116 +237,6 @@
COMPLEX*16 Q( LDQ, * ), Q2( LDQ2, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAED8 merges the two sets of eigenvalues together into a single
-* sorted set. Then it tries to deflate the size of the problem.
-* There are two ways in which deflation can occur: when two or more
-* eigenvalues are close together or if there is a tiny element in the
-* Z vector. For each such occurrence the order of the related secular
-* equation problem is reduced by one.
-*
-* Arguments
-* =========
-*
-* K (output) INTEGER
-* Contains the number of non-deflated eigenvalues.
-* This is the order of the related secular equation.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* QSIZ (input) INTEGER
-* The dimension of the unitary matrix used to reduce
-* the dense or band matrix to tridiagonal form.
-* QSIZ >= N if ICOMPQ = 1.
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
-* On entry, Q contains the eigenvectors of the partially solved
-* system which has been previously updated in matrix
-* multiplies with other partially solved eigensystems.
-* On exit, Q contains the trailing (N-K) updated eigenvectors
-* (those which were deflated) in its last N-K columns.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max( 1, N ).
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, D contains the eigenvalues of the two submatrices to
-* be combined. On exit, D contains the trailing (N-K) updated
-* eigenvalues (those which were deflated) sorted into increasing
-* order.
-*
-* RHO (input/output) DOUBLE PRECISION
-* Contains the off diagonal element associated with the rank-1
-* cut which originally split the two submatrices which are now
-* being recombined. RHO is modified during the computation to
-* the value required by DLAED3.
-*
-* CUTPNT (input) INTEGER
-* Contains the location of the last eigenvalue in the leading
-* sub-matrix. MIN(1,N) <= CUTPNT <= N.
-*
-* Z (input) DOUBLE PRECISION array, dimension (N)
-* On input this vector contains the updating vector (the last
-* row of the first sub-eigenvector matrix and the first row of
-* the second sub-eigenvector matrix). The contents of Z are
-* destroyed during the updating process.
-*
-* DLAMDA (output) DOUBLE PRECISION array, dimension (N)
-* Contains a copy of the first K eigenvalues which will be used
-* by DLAED3 to form the secular equation.
-*
-* Q2 (output) COMPLEX*16 array, dimension (LDQ2,N)
-* If ICOMPQ = 0, Q2 is not referenced. Otherwise,
-* Contains a copy of the first K eigenvectors which will be used
-* by DLAED7 in a matrix multiply (DGEMM) to update the new
-* eigenvectors.
-*
-* LDQ2 (input) INTEGER
-* The leading dimension of the array Q2. LDQ2 >= max( 1, N ).
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* This will hold the first k values of the final
-* deflation-altered z-vector and will be passed to DLAED3.
-*
-* INDXP (workspace) INTEGER array, dimension (N)
-* This will contain the permutation used to place deflated
-* values of D at the end of the array. On output INDXP(1:K)
-* points to the nondeflated D-values and INDXP(K+1:N)
-* points to the deflated eigenvalues.
-*
-* INDX (workspace) INTEGER array, dimension (N)
-* This will contain the permutation used to sort the contents of
-* D into ascending order.
-*
-* INDXQ (input) INTEGER array, dimension (N)
-* This contains the permutation which separately sorts the two
-* sub-problems in D into ascending order. Note that elements in
-* the second half of this permutation must first have CUTPNT
-* added to their values in order to be accurate.
-*
-* PERM (output) INTEGER array, dimension (N)
-* Contains the permutations (from deflation and sorting) to be
-* applied to each eigenblock.
-*
-* GIVPTR (output) INTEGER
-* Contains the number of Givens rotations which took place in
-* this subproblem.
-*
-* GIVCOL (output) INTEGER array, dimension (2, N)
-* Each pair of numbers indicates a pair of columns to take place
-* in a Givens rotation.
-*
-* GIVNUM (output) DOUBLE PRECISION array, dimension (2, N)
-* Each number indicates the S value to be used in the
-* corresponding Givens rotation.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaein.f b/SRC/zlaein.f
index a5b52e71..00d2b2d9 100644
--- a/SRC/zlaein.f
+++ b/SRC/zlaein.f
@@ -1,10 +1,150 @@
+*> \brief \b ZLAEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAEIN( RIGHTV, NOINIT, N, H, LDH, W, V, B, LDB, RWORK,
+* EPS3, SMLNUM, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL NOINIT, RIGHTV
+* INTEGER INFO, LDB, LDH, N
+* DOUBLE PRECISION EPS3, SMLNUM
+* COMPLEX*16 W
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 B( LDB, * ), H( LDH, * ), V( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAEIN uses inverse iteration to find a right or left eigenvector
+*> corresponding to the eigenvalue W of a complex upper Hessenberg
+*> matrix H.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RIGHTV
+*> \verbatim
+*> RIGHTV is LOGICAL
+*> = .TRUE. : compute right eigenvector;
+*> = .FALSE.: compute left eigenvector.
+*> \endverbatim
+*>
+*> \param[in] NOINIT
+*> \verbatim
+*> NOINIT is LOGICAL
+*> = .TRUE. : no initial vector supplied in V
+*> = .FALSE.: initial vector supplied in V.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> The upper Hessenberg matrix H.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is COMPLEX*16
+*> The eigenvalue of H whose corresponding right or left
+*> eigenvector is to be computed.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (N)
+*> On entry, if NOINIT = .FALSE., V must contain a starting
+*> vector for inverse iteration; otherwise V need not be set.
+*> On exit, V contains the computed eigenvector, normalized so
+*> that the component of largest magnitude has magnitude 1; here
+*> the magnitude of a complex number (x,y) is taken to be
+*> |x| + |y|.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] EPS3
+*> \verbatim
+*> EPS3 is DOUBLE PRECISION
+*> A small machine-dependent value which is used to perturb
+*> close eigenvalues, and to replace zero pivots.
+*> \endverbatim
+*>
+*> \param[in] SMLNUM
+*> \verbatim
+*> SMLNUM is DOUBLE PRECISION
+*> A machine-dependent value close to the underflow threshold.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: inverse iteration did not converge; V is set to the
+*> last iterate.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAEIN( RIGHTV, NOINIT, N, H, LDH, W, V, B, LDB, RWORK,
$ EPS3, SMLNUM, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL NOINIT, RIGHTV
@@ -17,64 +157,6 @@
COMPLEX*16 B( LDB, * ), H( LDH, * ), V( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAEIN uses inverse iteration to find a right or left eigenvector
-* corresponding to the eigenvalue W of a complex upper Hessenberg
-* matrix H.
-*
-* Arguments
-* =========
-*
-* RIGHTV (input) LOGICAL
-* = .TRUE. : compute right eigenvector;
-* = .FALSE.: compute left eigenvector.
-*
-* NOINIT (input) LOGICAL
-* = .TRUE. : no initial vector supplied in V
-* = .FALSE.: initial vector supplied in V.
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* H (input) COMPLEX*16 array, dimension (LDH,N)
-* The upper Hessenberg matrix H.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* W (input) COMPLEX*16
-* The eigenvalue of H whose corresponding right or left
-* eigenvector is to be computed.
-*
-* V (input/output) COMPLEX*16 array, dimension (N)
-* On entry, if NOINIT = .FALSE., V must contain a starting
-* vector for inverse iteration; otherwise V need not be set.
-* On exit, V contains the computed eigenvector, normalized so
-* that the component of largest magnitude has magnitude 1; here
-* the magnitude of a complex number (x,y) is taken to be
-* |x| + |y|.
-*
-* B (workspace) COMPLEX*16 array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* EPS3 (input) DOUBLE PRECISION
-* A small machine-dependent value which is used to perturb
-* close eigenvalues, and to replace zero pivots.
-*
-* SMLNUM (input) DOUBLE PRECISION
-* A machine-dependent value close to the underflow threshold.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* = 1: inverse iteration did not converge; V is set to the
-* last iterate.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaesy.f b/SRC/zlaesy.f
index e56bfebf..a5f6923b 100644
--- a/SRC/zlaesy.f
+++ b/SRC/zlaesy.f
@@ -1,61 +1,120 @@
- SUBROUTINE ZLAESY( A, B, C, RT1, RT2, EVSCAL, CS1, SN1 )
+*> \brief \b ZLAESY
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX*16 A, B, C, CS1, EVSCAL, RT1, RT2, SN1
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLAESY( A, B, C, RT1, RT2, EVSCAL, CS1, SN1 )
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 A, B, C, CS1, EVSCAL, RT1, RT2, SN1
+* ..
+*
* Purpose
* =======
*
-* ZLAESY computes the eigendecomposition of a 2-by-2 symmetric matrix
-* ( ( A, B );( B, C ) )
-* provided the norm of the matrix of eigenvectors is larger than
-* some threshold value.
-*
-* RT1 is the eigenvalue of larger absolute value, and RT2 of
-* smaller absolute value. If the eigenvectors are computed, then
-* on return ( CS1, SN1 ) is the unit eigenvector for RT1, hence
-*
-* [ CS1 SN1 ] . [ A B ] . [ CS1 -SN1 ] = [ RT1 0 ]
-* [ -SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ]
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAESY computes the eigendecomposition of a 2-by-2 symmetric matrix
+*> ( ( A, B );( B, C ) )
+*> provided the norm of the matrix of eigenvectors is larger than
+*> some threshold value.
+*>
+*> RT1 is the eigenvalue of larger absolute value, and RT2 of
+*> smaller absolute value. If the eigenvectors are computed, then
+*> on return ( CS1, SN1 ) is the unit eigenvector for RT1, hence
+*>
+*> [ CS1 SN1 ] . [ A B ] . [ CS1 -SN1 ] = [ RT1 0 ]
+*> [ -SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ]
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) COMPLEX*16
-* The ( 1, 1 ) element of input matrix.
-*
-* B (input) COMPLEX*16
-* The ( 1, 2 ) element of input matrix. The ( 2, 1 ) element
-* is also given by B, since the 2-by-2 matrix is symmetric.
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16
+*> The ( 1, 1 ) element of input matrix.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16
+*> The ( 1, 2 ) element of input matrix. The ( 2, 1 ) element
+*> is also given by B, since the 2-by-2 matrix is symmetric.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX*16
+*> The ( 2, 2 ) element of input matrix.
+*> \endverbatim
+*>
+*> \param[out] RT1
+*> \verbatim
+*> RT1 is COMPLEX*16
+*> The eigenvalue of larger modulus.
+*> \endverbatim
+*>
+*> \param[out] RT2
+*> \verbatim
+*> RT2 is COMPLEX*16
+*> The eigenvalue of smaller modulus.
+*> \endverbatim
+*>
+*> \param[out] EVSCAL
+*> \verbatim
+*> EVSCAL is COMPLEX*16
+*> The complex value by which the eigenvector matrix was scaled
+*> to make it orthonormal. If EVSCAL is zero, the eigenvectors
+*> were not computed. This means one of two things: the 2-by-2
+*> matrix could not be diagonalized, or the norm of the matrix
+*> of eigenvectors before scaling was larger than the threshold
+*> value THRESH (set below).
+*> \endverbatim
+*>
+*> \param[out] CS1
+*> \verbatim
+*> CS1 is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[out] SN1
+*> \verbatim
+*> SN1 is COMPLEX*16
+*> If EVSCAL .NE. 0, ( CS1, SN1 ) is the unit right eigenvector
+*> for RT1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input) COMPLEX*16
-* The ( 2, 2 ) element of input matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RT1 (output) COMPLEX*16
-* The eigenvalue of larger modulus.
+*> \date November 2011
*
-* RT2 (output) COMPLEX*16
-* The eigenvalue of smaller modulus.
+*> \ingroup complex16SYauxiliary
*
-* EVSCAL (output) COMPLEX*16
-* The complex value by which the eigenvector matrix was scaled
-* to make it orthonormal. If EVSCAL is zero, the eigenvectors
-* were not computed. This means one of two things: the 2-by-2
-* matrix could not be diagonalized, or the norm of the matrix
-* of eigenvectors before scaling was larger than the threshold
-* value THRESH (set below).
+* =====================================================================
+ SUBROUTINE ZLAESY( A, B, C, RT1, RT2, EVSCAL, CS1, SN1 )
*
-* CS1 (output) COMPLEX*16
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SN1 (output) COMPLEX*16
-* If EVSCAL .NE. 0, ( CS1, SN1 ) is the unit right eigenvector
-* for RT1.
+* .. Scalar Arguments ..
+ COMPLEX*16 A, B, C, CS1, EVSCAL, RT1, RT2, SN1
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlaev2.f b/SRC/zlaev2.f
index 1f31ff7b..8210b5fb 100644
--- a/SRC/zlaev2.f
+++ b/SRC/zlaev2.f
@@ -1,67 +1,129 @@
- SUBROUTINE ZLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
+*> \brief \b ZLAEV2
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION CS1, RT1, RT2
- COMPLEX*16 A, B, C, SN1
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION CS1, RT1, RT2
+* COMPLEX*16 A, B, C, SN1
+* ..
+*
* Purpose
* =======
*
-* ZLAEV2 computes the eigendecomposition of a 2-by-2 Hermitian matrix
-* [ A B ]
-* [ CONJG(B) C ].
-* On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
-* eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
-* eigenvector for RT1, giving the decomposition
-*
-* [ CS1 CONJG(SN1) ] [ A B ] [ CS1 -CONJG(SN1) ] = [ RT1 0 ]
-* [-SN1 CS1 ] [ CONJG(B) C ] [ SN1 CS1 ] [ 0 RT2 ].
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAEV2 computes the eigendecomposition of a 2-by-2 Hermitian matrix
+*> [ A B ]
+*> [ CONJG(B) C ].
+*> On return, RT1 is the eigenvalue of larger absolute value, RT2 is the
+*> eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right
+*> eigenvector for RT1, giving the decomposition
+*>
+*> [ CS1 CONJG(SN1) ] [ A B ] [ CS1 -CONJG(SN1) ] = [ RT1 0 ]
+*> [-SN1 CS1 ] [ CONJG(B) C ] [ SN1 CS1 ] [ 0 RT2 ].
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) COMPLEX*16
-* The (1,1) element of the 2-by-2 matrix.
-*
-* B (input) COMPLEX*16
-* The (1,2) element and the conjugate of the (2,1) element of
-* the 2-by-2 matrix.
-*
-* C (input) COMPLEX*16
-* The (2,2) element of the 2-by-2 matrix.
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16
+*> The (1,1) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16
+*> The (1,2) element and the conjugate of the (2,1) element of
+*> the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX*16
+*> The (2,2) element of the 2-by-2 matrix.
+*> \endverbatim
+*>
+*> \param[out] RT1
+*> \verbatim
+*> RT1 is DOUBLE PRECISION
+*> The eigenvalue of larger absolute value.
+*> \endverbatim
+*>
+*> \param[out] RT2
+*> \verbatim
+*> RT2 is DOUBLE PRECISION
+*> The eigenvalue of smaller absolute value.
+*> \endverbatim
+*>
+*> \param[out] CS1
+*> \verbatim
+*> CS1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SN1
+*> \verbatim
+*> SN1 is COMPLEX*16
+*> The vector (CS1, SN1) is a unit right eigenvector for RT1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RT1 (output) DOUBLE PRECISION
-* The eigenvalue of larger absolute value.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RT2 (output) DOUBLE PRECISION
-* The eigenvalue of smaller absolute value.
+*> \date November 2011
*
-* CS1 (output) DOUBLE PRECISION
+*> \ingroup complex16OTHERauxiliary
*
-* SN1 (output) COMPLEX*16
-* The vector (CS1, SN1) is a unit right eigenvector for RT1.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> RT1 is accurate to a few ulps barring over/underflow.
+*>
+*> RT2 may be inaccurate if there is massive cancellation in the
+*> determinant A*C-B*B; higher precision or correctly rounded or
+*> correctly truncated arithmetic would be needed to compute RT2
+*> accurately in all cases.
+*>
+*> CS1 and SN1 are accurate to a few ulps barring over/underflow.
+*>
+*> Overflow is possible only if RT1 is within a factor of 5 of overflow.
+*> Underflow is harmless if the input data is 0 or exceeds
+*> underflow_threshold / macheps.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
*
-* RT1 is accurate to a few ulps barring over/underflow.
-*
-* RT2 may be inaccurate if there is massive cancellation in the
-* determinant A*C-B*B; higher precision or correctly rounded or
-* correctly truncated arithmetic would be needed to compute RT2
-* accurately in all cases.
-*
-* CS1 and SN1 are accurate to a few ulps barring over/underflow.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Overflow is possible only if RT1 is within a factor of 5 of overflow.
-* Underflow is harmless if the input data is 0 or exceeds
-* underflow_threshold / macheps.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION CS1, RT1, RT2
+ COMPLEX*16 A, B, C, SN1
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlag2c.f b/SRC/zlag2c.f
index c0dcd318..f49d8324 100644
--- a/SRC/zlag2c.f
+++ b/SRC/zlag2c.f
@@ -1,57 +1,116 @@
- SUBROUTINE ZLAG2C( M, N, A, LDA, SA, LDSA, INFO )
-*
-* -- LAPACK PROTOTYPE auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDSA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX SA( LDSA, * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZLAG2C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAG2C( M, N, A, LDA, SA, LDSA, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDSA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX SA( LDSA, * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZLAG2C converts a COMPLEX*16 matrix, SA, to a COMPLEX matrix, A.
-*
-* RMAX is the overflow for the SINGLE PRECISION arithmetic
-* ZLAG2C checks that all the entries of A are between -RMAX and
-* RMAX. If not the convertion is aborted and a flag is raised.
-*
-* This is an auxiliary routine so there is no argument checking.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAG2C converts a COMPLEX*16 matrix, SA, to a COMPLEX matrix, A.
+*>
+*> RMAX is the overflow for the SINGLE PRECISION arithmetic
+*> ZLAG2C checks that all the entries of A are between -RMAX and
+*> RMAX. If not the convertion is aborted and a flag is raised.
+*>
+*> This is an auxiliary routine so there is no argument checking.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of lines of the matrix A. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of lines of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N coefficient matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] SA
+*> \verbatim
+*> SA is COMPLEX array, dimension (LDSA,N)
+*> On exit, if INFO=0, the M-by-N coefficient matrix SA; if
+*> INFO>0, the content of SA is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDSA
+*> \verbatim
+*> LDSA is INTEGER
+*> The leading dimension of the array SA. LDSA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> = 1: an entry of the matrix A is greater than the SINGLE
+*> PRECISION overflow threshold, in this case, the content
+*> of SA in exit is unspecified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N coefficient matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \ingroup complex16OTHERauxiliary
*
-* SA (output) COMPLEX array, dimension (LDSA,N)
-* On exit, if INFO=0, the M-by-N coefficient matrix SA; if
-* INFO>0, the content of SA is unspecified.
+* =====================================================================
+ SUBROUTINE ZLAG2C( M, N, A, LDA, SA, LDSA, INFO )
*
-* LDSA (input) INTEGER
-* The leading dimension of the array SA. LDSA >= max(1,M).
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* = 1: an entry of the matrix A is greater than the SINGLE
-* PRECISION overflow threshold, in this case, the content
-* of SA in exit is unspecified.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDSA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX SA( LDSA, * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlags2.f b/SRC/zlags2.f
index 6daa241b..42ba705e 100644
--- a/SRC/zlags2.f
+++ b/SRC/zlags2.f
@@ -1,88 +1,165 @@
- SUBROUTINE ZLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
- $ SNV, CSQ, SNQ )
+*> \brief \b ZLAGS2
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL UPPER
- DOUBLE PRECISION A1, A3, B1, B3, CSQ, CSU, CSV
- COMPLEX*16 A2, B2, SNQ, SNU, SNV
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
+* SNV, CSQ, SNQ )
+*
+* .. Scalar Arguments ..
+* LOGICAL UPPER
+* DOUBLE PRECISION A1, A3, B1, B3, CSQ, CSU, CSV
+* COMPLEX*16 A2, B2, SNQ, SNU, SNV
+* ..
+*
* Purpose
* =======
*
-* ZLAGS2 computes 2-by-2 unitary matrices U, V and Q, such
-* that if ( UPPER ) then
-*
-* U**H *A*Q = U**H *( A1 A2 )*Q = ( x 0 )
-* ( 0 A3 ) ( x x )
-* and
-* V**H*B*Q = V**H *( B1 B2 )*Q = ( x 0 )
-* ( 0 B3 ) ( x x )
-*
-* or if ( .NOT.UPPER ) then
-*
-* U**H *A*Q = U**H *( A1 0 )*Q = ( x x )
-* ( A2 A3 ) ( 0 x )
-* and
-* V**H *B*Q = V**H *( B1 0 )*Q = ( x x )
-* ( B2 B3 ) ( 0 x )
-* where
-*
-* U = ( CSU SNU ), V = ( CSV SNV ),
-* ( -SNU**H CSU ) ( -SNV**H CSV )
-*
-* Q = ( CSQ SNQ )
-* ( -SNQ**H CSQ )
-*
-* The rows of the transformed A and B are parallel. Moreover, if the
-* input 2-by-2 matrix A is not zero, then the transformed (1,1) entry
-* of A is not zero. If the input matrices A and B are both not zero,
-* then the transformed (2,2) element of B is not zero, except when the
-* first rows of input A and B are parallel and the second rows are
-* zero.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAGS2 computes 2-by-2 unitary matrices U, V and Q, such
+*> that if ( UPPER ) then
+*>
+*> U**H *A*Q = U**H *( A1 A2 )*Q = ( x 0 )
+*> ( 0 A3 ) ( x x )
+*> and
+*> V**H*B*Q = V**H *( B1 B2 )*Q = ( x 0 )
+*> ( 0 B3 ) ( x x )
+*>
+*> or if ( .NOT.UPPER ) then
+*>
+*> U**H *A*Q = U**H *( A1 0 )*Q = ( x x )
+*> ( A2 A3 ) ( 0 x )
+*> and
+*> V**H *B*Q = V**H *( B1 0 )*Q = ( x x )
+*> ( B2 B3 ) ( 0 x )
+*> where
+*>
+*> U = ( CSU SNU ), V = ( CSV SNV ),
+*> ( -SNU**H CSU ) ( -SNV**H CSV )
+*>
+*> Q = ( CSQ SNQ )
+*> ( -SNQ**H CSQ )
+*>
+*> The rows of the transformed A and B are parallel. Moreover, if the
+*> input 2-by-2 matrix A is not zero, then the transformed (1,1) entry
+*> of A is not zero. If the input matrices A and B are both not zero,
+*> then the transformed (2,2) element of B is not zero, except when the
+*> first rows of input A and B are parallel and the second rows are
+*> zero.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPPER (input) LOGICAL
-* = .TRUE.: the input matrices A and B are upper triangular.
-* = .FALSE.: the input matrices A and B are lower triangular.
-*
-* A1 (input) DOUBLE PRECISION
-*
-* A2 (input) COMPLEX*16
-*
-* A3 (input) DOUBLE PRECISION
-* On entry, A1, A2 and A3 are elements of the input 2-by-2
-* upper (lower) triangular matrix A.
-*
-* B1 (input) DOUBLE PRECISION
-*
-* B2 (input) COMPLEX*16
-*
-* B3 (input) DOUBLE PRECISION
-* On entry, B1, B2 and B3 are elements of the input 2-by-2
-* upper (lower) triangular matrix B.
+*> \param[in] UPPER
+*> \verbatim
+*> UPPER is LOGICAL
+*> = .TRUE.: the input matrices A and B are upper triangular.
+*> = .FALSE.: the input matrices A and B are lower triangular.
+*> \endverbatim
+*>
+*> \param[in] A1
+*> \verbatim
+*> A1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] A2
+*> \verbatim
+*> A2 is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[in] A3
+*> \verbatim
+*> A3 is DOUBLE PRECISION
+*> On entry, A1, A2 and A3 are elements of the input 2-by-2
+*> upper (lower) triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] B1
+*> \verbatim
+*> B1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] B2
+*> \verbatim
+*> B2 is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[in] B3
+*> \verbatim
+*> B3 is DOUBLE PRECISION
+*> On entry, B1, B2 and B3 are elements of the input 2-by-2
+*> upper (lower) triangular matrix B.
+*> \endverbatim
+*>
+*> \param[out] CSU
+*> \verbatim
+*> CSU is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SNU
+*> \verbatim
+*> SNU is COMPLEX*16
+*> The desired unitary matrix U.
+*> \endverbatim
+*>
+*> \param[out] CSV
+*> \verbatim
+*> CSV is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SNV
+*> \verbatim
+*> SNV is COMPLEX*16
+*> The desired unitary matrix V.
+*> \endverbatim
+*>
+*> \param[out] CSQ
+*> \verbatim
+*> CSQ is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] SNQ
+*> \verbatim
+*> SNQ is COMPLEX*16
+*> The desired unitary matrix Q.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* CSU (output) DOUBLE PRECISION
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SNU (output) COMPLEX*16
-* The desired unitary matrix U.
+*> \date November 2011
*
-* CSV (output) DOUBLE PRECISION
+*> \ingroup complex16OTHERauxiliary
*
-* SNV (output) COMPLEX*16
-* The desired unitary matrix V.
+* =====================================================================
+ SUBROUTINE ZLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
+ $ SNV, CSQ, SNQ )
*
-* CSQ (output) DOUBLE PRECISION
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* SNQ (output) COMPLEX*16
-* The desired unitary matrix Q.
+* .. Scalar Arguments ..
+ LOGICAL UPPER
+ DOUBLE PRECISION A1, A3, B1, B3, CSQ, CSU, CSV
+ COMPLEX*16 A2, B2, SNQ, SNU, SNV
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlagtm.f b/SRC/zlagtm.f
index 65703fff..d107d13e 100644
--- a/SRC/zlagtm.f
+++ b/SRC/zlagtm.f
@@ -1,10 +1,145 @@
+*> \brief \b ZLAGTM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
+* B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAGTM performs a matrix-vector product of the form
+*>
+*> B := alpha * A * X + beta * B
+*>
+*> where A is a tridiagonal matrix of order N, B and X are N by NRHS
+*> matrices, and alpha and beta are real scalars, each of which may be
+*> 0., 1., or -1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': No transpose, B := alpha * A * X + beta * B
+*> = 'T': Transpose, B := alpha * A**T * X + beta * B
+*> = 'C': Conjugate transpose, B := alpha * A**H * X + beta * B
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) super-diagonal elements of T.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The N by NRHS matrix X.
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(N,1).
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> The scalar beta. BETA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix B.
+*> On exit, B is overwritten by the matrix expression
+*> B := alpha * A * X + beta * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(N,1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
$ B, LDB )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -16,63 +151,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAGTM performs a matrix-vector product of the form
-*
-* B := alpha * A * X + beta * B
-*
-* where A is a tridiagonal matrix of order N, B and X are N by NRHS
-* matrices, and alpha and beta are real scalars, each of which may be
-* 0., 1., or -1.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': No transpose, B := alpha * A * X + beta * B
-* = 'T': Transpose, B := alpha * A**T * X + beta * B
-* = 'C': Conjugate transpose, B := alpha * A**H * X + beta * B
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B.
-*
-* ALPHA (input) DOUBLE PRECISION
-* The scalar alpha. ALPHA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) sub-diagonal elements of T.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The diagonal elements of T.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) super-diagonal elements of T.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The N by NRHS matrix X.
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(N,1).
-*
-* BETA (input) DOUBLE PRECISION
-* The scalar beta. BETA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 1.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix B.
-* On exit, B is overwritten by the matrix expression
-* B := alpha * A * X + beta * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(N,1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlahef.f b/SRC/zlahef.f
index e06f2a2c..4cbbcd54 100644
--- a/SRC/zlahef.f
+++ b/SRC/zlahef.f
@@ -1,9 +1,159 @@
+*> \brief \b ZLAHEF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAHEF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KB, LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), W( LDW, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAHEF computes a partial factorization of a complex Hermitian
+*> matrix A using the Bunch-Kaufman diagonal pivoting method. The
+*> partial factorization has the form:
+*>
+*> A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
+*> ( 0 U22 ) ( 0 D ) ( U12**H U22**H )
+*>
+*> A = ( L11 0 ) ( D 0 ) ( L11**H L21**H ) if UPLO = 'L'
+*> ( L21 I ) ( 0 A22 ) ( 0 I )
+*>
+*> where the order of D is at most NB. The actual order is returned in
+*> the argument KB, and is either NB or NB-1, or N if N <= NB.
+*> Note that U**H denotes the conjugate transpose of U.
+*>
+*> ZLAHEF is an auxiliary routine called by ZHETRF. It uses blocked code
+*> (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
+*> A22 (if UPLO = 'L').
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The maximum number of columns of the matrix A that should be
+*> factored. NB should be at least 2 to allow for 2-by-2 pivot
+*> blocks.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns of A that were actually factored.
+*> KB is either NB-1 or NB, or N if N <= NB.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> On exit, A contains details of the partial factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If UPLO = 'U', only the last KB elements of IPIV are set;
+*> if UPLO = 'L', only the first KB elements are set.
+*> \endverbatim
+*> \verbatim
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (LDW,NB)
+*> \endverbatim
+*>
+*> \param[in] LDW
+*> \verbatim
+*> LDW is INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEcomputational
+*
+* =====================================================================
SUBROUTINE ZLAHEF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,85 +164,6 @@
COMPLEX*16 A( LDA, * ), W( LDW, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAHEF computes a partial factorization of a complex Hermitian
-* matrix A using the Bunch-Kaufman diagonal pivoting method. The
-* partial factorization has the form:
-*
-* A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
-* ( 0 U22 ) ( 0 D ) ( U12**H U22**H )
-*
-* A = ( L11 0 ) ( D 0 ) ( L11**H L21**H ) if UPLO = 'L'
-* ( L21 I ) ( 0 A22 ) ( 0 I )
-*
-* where the order of D is at most NB. The actual order is returned in
-* the argument KB, and is either NB or NB-1, or N if N <= NB.
-* Note that U**H denotes the conjugate transpose of U.
-*
-* ZLAHEF is an auxiliary routine called by ZHETRF. It uses blocked code
-* (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
-* A22 (if UPLO = 'L').
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The maximum number of columns of the matrix A that should be
-* factored. NB should be at least 2 to allow for 2-by-2 pivot
-* blocks.
-*
-* KB (output) INTEGER
-* The number of columns of A that were actually factored.
-* KB is either NB-1 or NB, or N if N <= NB.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, A contains details of the partial factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If UPLO = 'U', only the last KB elements of IPIV are set;
-* if UPLO = 'L', only the first KB elements are set.
-*
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* W (workspace) COMPLEX*16 array, dimension (LDW,NB)
-*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlahqr.f b/SRC/zlahqr.f
index 84c53ba8..45a1c462 100644
--- a/SRC/zlahqr.f
+++ b/SRC/zlahqr.f
@@ -1,121 +1,209 @@
- SUBROUTINE ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
- $ IHIZ, Z, LDZ, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
- LOGICAL WANTT, WANTZ
-* ..
-* .. Array Arguments ..
- COMPLEX*16 H( LDH, * ), W( * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b ZLAHQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+* IHIZ, Z, LDZ, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 H( LDH, * ), W( * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* ZLAHQR is an auxiliary routine called by CHSEQR to update the
-* eigenvalues and Schur decomposition already computed by CHSEQR, by
-* dealing with the Hessenberg submatrix in rows and columns ILO to
-* IHI.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAHQR is an auxiliary routine called by CHSEQR to update the
+*> eigenvalues and Schur decomposition already computed by CHSEQR, by
+*> dealing with the Hessenberg submatrix in rows and columns ILO to
+*> IHI.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N >= 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows and
-* columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1).
-* ZLAHQR works primarily with the Hessenberg submatrix in rows
-* and columns ILO to IHI, but applies transformations to all of
-* H if WANTT is .TRUE..
-* 1 <= ILO <= max(1,IHI); IHI <= N.
-*
-* H (input/output) COMPLEX*16 array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO is zero and if WANTT is .TRUE., then H
-* is upper triangular in rows and columns ILO:IHI. If INFO
-* is zero and if WANTT is .FALSE., then the contents of H
-* are unspecified on exit. The output state of H in case
-* INF is positive is below under the description of INFO.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* The computed eigenvalues ILO to IHI are stored in the
-* corresponding elements of W. If WANTT is .TRUE., the
-* eigenvalues are stored in the same order as on the diagonal
-* of the Schur form returned in H, with W(i) = H(i,i).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE..
-* 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* If WANTZ is .TRUE., on entry Z must contain the current
-* matrix Z of transformations accumulated by CHSEQR, and on
-* exit Z has been updated; transformations are applied only to
-* the submatrix Z(ILOZ:IHIZ,ILO:IHI).
-* If WANTZ is .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, ZLAHQR failed to compute all the
-* eigenvalues ILO to IHI in a total of 30 iterations
-* per eigenvalue; elements i+1:ihi of W contain
-* those eigenvalues which have been successfully
-* computed.
-*
-* If INFO .GT. 0 and WANTT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the
-* eigenvalues of the upper Hessenberg matrix
-* rows and columns ILO thorugh INFO of the final,
-* output value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-* (*) (initial value of H)*U = U*(final value of H)
-* where U is an orthognal matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-* (final value of Z) = (initial value of Z)*U
-* where U is the orthogonal matrix in (*)
-* (regardless of the value of WANTT.)
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows and
+*> columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1).
+*> ZLAHQR works primarily with the Hessenberg submatrix in rows
+*> and columns ILO to IHI, but applies transformations to all of
+*> H if WANTT is .TRUE..
+*> 1 <= ILO <= max(1,IHI); IHI <= N.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO is zero and if WANTT is .TRUE., then H
+*> is upper triangular in rows and columns ILO:IHI. If INFO
+*> is zero and if WANTT is .FALSE., then the contents of H
+*> are unspecified on exit. The output state of H in case
+*> INF is positive is below under the description of INFO.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> The computed eigenvalues ILO to IHI are stored in the
+*> corresponding elements of W. If WANTT is .TRUE., the
+*> eigenvalues are stored in the same order as on the diagonal
+*> of the Schur form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE..
+*> 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,N)
+*> If WANTZ is .TRUE., on entry Z must contain the current
+*> matrix Z of transformations accumulated by CHSEQR, and on
+*> exit Z has been updated; transformations are applied only to
+*> the submatrix Z(ILOZ:IHIZ,ILO:IHI).
+*> If WANTZ is .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, ZLAHQR failed to compute all the
+*> eigenvalues ILO to IHI in a total of 30 iterations
+*> per eigenvalue; elements i+1:ihi of W contain
+*> those eigenvalues which have been successfully
+*> computed.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the
+*> eigenvalues of the upper Hessenberg matrix
+*> rows and columns ILO thorugh INFO of the final,
+*> output value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> (*) (initial value of H)*U = U*(final value of H)
+*> where U is an orthognal matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> (final value of Z) = (initial value of Z)*U
+*> where U is the orthogonal matrix in (*)
+*> (regardless of the value of WANTT.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 02-96 Based on modifications by
+*> David Day, Sandia National Laboratory, USA
+*>
+*> 12-04 Further modifications by
+*> Ralph Byers, University of Kansas, USA
+*> This is a modified version of ZLAHQR from LAPACK version 3.0.
+*> It is (1) more robust against overflow and underflow and
+*> (2) adopts the more conservative Ahues & Tisseur stopping
+*> criterion (LAWN 122, 1997).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+ $ IHIZ, Z, LDZ, INFO )
*
-* 02-96 Based on modifications by
-* David Day, Sandia National Laboratory, USA
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 12-04 Further modifications by
-* Ralph Byers, University of Kansas, USA
-* This is a modified version of ZLAHQR from LAPACK version 3.0.
-* It is (1) more robust against overflow and underflow and
-* (2) adopts the more conservative Ahues & Tisseur stopping
-* criterion (LAWN 122, 1997).
+* .. Scalar Arguments ..
+ INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
+ LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 H( LDH, * ), W( * ), Z( LDZ, * )
+* ..
*
* =========================================================
*
diff --git a/SRC/zlahr2.f b/SRC/zlahr2.f
index 6d0f83c2..f34cdfb3 100644
--- a/SRC/zlahr2.f
+++ b/SRC/zlahr2.f
@@ -1,118 +1,164 @@
- SUBROUTINE ZLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*> \brief \b ZLAHR2
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LDT, LDY, N, NB
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), T( LDT, NB ), TAU( NB ),
- $ Y( LDY, NB )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), T( LDT, NB ), TAU( NB ),
+* $ Y( LDY, NB )
+* ..
+*
* Purpose
* =======
*
-* ZLAHR2 reduces the first NB columns of A complex general n-BY-(n-k+1)
-* matrix A so that elements below the k-th subdiagonal are zero. The
-* reduction is performed by an unitary similarity transformation
-* Q**H * A * Q. The routine returns the matrices V and T which determine
-* Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
-*
-* This is an auxiliary routine called by ZGEHRD.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAHR2 reduces the first NB columns of A complex general n-BY-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by an unitary similarity transformation
+*> Q**H * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
+*>
+*> This is an auxiliary routine called by ZGEHRD.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* K (input) INTEGER
-* The offset for the reduction. Elements below the k-th
-* subdiagonal in the first NB columns are reduced to zero.
-* K < N.
-*
-* NB (input) INTEGER
-* The number of columns to be reduced.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N-K+1)
-* On entry, the n-by-(n-k+1) general matrix A.
-* On exit, the elements on and above the k-th subdiagonal in
-* the first NB columns are overwritten with the corresponding
-* elements of the reduced matrix; the elements below the k-th
-* subdiagonal, with the array TAU, represent the matrix Q as a
-* product of elementary reflectors. The other columns of A are
-* unchanged. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) COMPLEX*16 array, dimension (NB)
-* The scalar factors of the elementary reflectors. See Further
-* Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The offset for the reduction. Elements below the k-th
+*> subdiagonal in the first NB columns are reduced to zero.
+*> K < N.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) COMPLEX*16 array, dimension (LDT,NB)
-* The upper triangular matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* Y (output) COMPLEX*16 array, dimension (LDY,NB)
-* The n-by-nb matrix Y.
+*> \ingroup complex16OTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= N.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* unchanged. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (NB)
+*> The scalar factors of the elementary reflectors. See Further
+*> Details.
+*>
+*> T (output) COMPLEX*16 array, dimension (LDT,NB)
+*> The upper triangular matrix T.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> Y (output) COMPLEX*16 array, dimension (LDY,NB)
+*> The n-by-nb matrix Y.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= N.
+*>
+*>
+*> The matrix Q is represented as a product of nb elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*> A(i+k+1:n,i), and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*> V which is needed, with T and Y, to apply the transformation to the
+*> unreduced part of the matrix, using an update of the form:
+*> A := (I - V*T*V**H) * (A - Y*V**H).
+*>
+*> The contents of A on exit are illustrated by the following example
+*> with n = 7, k = 3 and nb = 2:
+*>
+*> ( a a a a a )
+*> ( a a a a a )
+*> ( a a a a a )
+*> ( h h a a a )
+*> ( v1 h a a a )
+*> ( v1 v2 a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> This subroutine is a slight modification of LAPACK-3.0's DLAHRD
+*> incorporating improvements proposed by Quintana-Orti and Van de
+*> Gejin. Note that the entries of A(1:K,2:NB) differ from those
+*> returned by the original LAPACK-3.0's DLAHRD routine. (This
+*> subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
+*>
+*> References
+*> ==========
+*>
+*> Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
+*> performance of reduction to Hessenberg form," ACM Transactions on
+*> Mathematical Software, 32(2):180-194, June 2006.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
*
-* The matrix Q is represented as a product of nb elementary reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-* A(i+k+1:n,i), and tau in TAU(i).
-*
-* The elements of the vectors v together form the (n-k+1)-by-nb matrix
-* V which is needed, with T and Y, to apply the transformation to the
-* unreduced part of the matrix, using an update of the form:
-* A := (I - V*T*V**H) * (A - Y*V**H).
-*
-* The contents of A on exit are illustrated by the following example
-* with n = 7, k = 3 and nb = 2:
-*
-* ( a a a a a )
-* ( a a a a a )
-* ( a a a a a )
-* ( h h a a a )
-* ( v1 h a a a )
-* ( v1 v2 a a a )
-* ( v1 v2 a a a )
-*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
-*
-* This subroutine is a slight modification of LAPACK-3.0's DLAHRD
-* incorporating improvements proposed by Quintana-Orti and Van de
-* Gejin. Note that the entries of A(1:K,2:NB) differ from those
-* returned by the original LAPACK-3.0's DLAHRD routine. (This
-* subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
-*
-* References
-* ==========
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
-* performance of reduction to Hessenberg form," ACM Transactions on
-* Mathematical Software, 32(2):180-194, June 2006.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), T( LDT, NB ), TAU( NB ),
+ $ Y( LDY, NB )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlahrd.f b/SRC/zlahrd.f
index cdb63d75..2ea0526d 100644
--- a/SRC/zlahrd.f
+++ b/SRC/zlahrd.f
@@ -1,106 +1,152 @@
- SUBROUTINE ZLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LDT, LDY, N, NB
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), T( LDT, NB ), TAU( NB ),
- $ Y( LDY, NB )
-* ..
-*
+*> \brief \b ZLAHRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), T( LDT, NB ), TAU( NB ),
+* $ Y( LDY, NB )
+* ..
+*
* Purpose
* =======
*
-* ZLAHRD reduces the first NB columns of a complex general n-by-(n-k+1)
-* matrix A so that elements below the k-th subdiagonal are zero. The
-* reduction is performed by a unitary similarity transformation
-* Q**H * A * Q. The routine returns the matrices V and T which determine
-* Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
-*
-* This is an OBSOLETE auxiliary routine.
-* This routine will be 'deprecated' in a future release.
-* Please use the new routine ZLAHR2 instead.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAHRD reduces the first NB columns of a complex general n-by-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by a unitary similarity transformation
+*> Q**H * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
+*>
+*> This is an OBSOLETE auxiliary routine.
+*> This routine will be 'deprecated' in a future release.
+*> Please use the new routine ZLAHR2 instead.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* K (input) INTEGER
-* The offset for the reduction. Elements below the k-th
-* subdiagonal in the first NB columns are reduced to zero.
-*
-* NB (input) INTEGER
-* The number of columns to be reduced.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N-K+1)
-* On entry, the n-by-(n-k+1) general matrix A.
-* On exit, the elements on and above the k-th subdiagonal in
-* the first NB columns are overwritten with the corresponding
-* elements of the reduced matrix; the elements below the k-th
-* subdiagonal, with the array TAU, represent the matrix Q as a
-* product of elementary reflectors. The other columns of A are
-* unchanged. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* TAU (output) COMPLEX*16 array, dimension (NB)
-* The scalar factors of the elementary reflectors. See Further
-* Details.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The offset for the reduction. Elements below the k-th
+*> subdiagonal in the first NB columns are reduced to zero.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (output) COMPLEX*16 array, dimension (LDT,NB)
-* The upper triangular matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* Y (output) COMPLEX*16 array, dimension (LDY,NB)
-* The n-by-nb matrix Y.
+*> \ingroup complex16OTHERauxiliary
*
-* LDY (input) INTEGER
-* The leading dimension of the array Y. LDY >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* unchanged. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> TAU (output) COMPLEX*16 array, dimension (NB)
+*> The scalar factors of the elementary reflectors. See Further
+*> Details.
+*>
+*> T (output) COMPLEX*16 array, dimension (LDT,NB)
+*> The upper triangular matrix T.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> Y (output) COMPLEX*16 array, dimension (LDY,NB)
+*> The n-by-nb matrix Y.
+*>
+*> LDY (input) INTEGER
+*> The leading dimension of the array Y. LDY >= max(1,N).
+*>
+*>
+*> The matrix Q is represented as a product of nb elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*> A(i+k+1:n,i), and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*> V which is needed, with T and Y, to apply the transformation to the
+*> unreduced part of the matrix, using an update of the form:
+*> A := (I - V*T*V**H) * (A - Y*V**H).
+*>
+*> The contents of A on exit are illustrated by the following example
+*> with n = 7, k = 3 and nb = 2:
+*>
+*> ( a h a a a )
+*> ( a h a a a )
+*> ( a h a a a )
+*> ( h h a a a )
+*> ( v1 h a a a )
+*> ( v1 v2 a a a )
+*> ( v1 v2 a a a )
+*>
+*> where a denotes an element of the original matrix A, h denotes a
+*> modified element of the upper Hessenberg matrix H, and vi denotes an
+*> element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
*
-* The matrix Q is represented as a product of nb elementary reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-* A(i+k+1:n,i), and tau in TAU(i).
-*
-* The elements of the vectors v together form the (n-k+1)-by-nb matrix
-* V which is needed, with T and Y, to apply the transformation to the
-* unreduced part of the matrix, using an update of the form:
-* A := (I - V*T*V**H) * (A - Y*V**H).
-*
-* The contents of A on exit are illustrated by the following example
-* with n = 7, k = 3 and nb = 2:
-*
-* ( a h a a a )
-* ( a h a a a )
-* ( a h a a a )
-* ( h h a a a )
-* ( v1 h a a a )
-* ( v1 v2 a a a )
-* ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where a denotes an element of the original matrix A, h denotes a
-* modified element of the upper Hessenberg matrix H, and vi denotes an
-* element of the vector defining H(i).
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LDT, LDY, N, NB
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), T( LDT, NB ), TAU( NB ),
+ $ Y( LDY, NB )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlaic1.f b/SRC/zlaic1.f
index 98d9c9f3..ecb2010b 100644
--- a/SRC/zlaic1.f
+++ b/SRC/zlaic1.f
@@ -1,9 +1,136 @@
+*> \brief \b ZLAIC1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
+*
+* .. Scalar Arguments ..
+* INTEGER J, JOB
+* DOUBLE PRECISION SEST, SESTPR
+* COMPLEX*16 C, GAMMA, S
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 W( J ), X( J )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAIC1 applies one step of incremental condition estimation in
+*> its simplest version:
+*>
+*> Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j
+*> lower triangular matrix L, such that
+*> twonorm(L*x) = sest
+*> Then ZLAIC1 computes sestpr, s, c such that
+*> the vector
+*> [ s*x ]
+*> xhat = [ c ]
+*> is an approximate singular vector of
+*> [ L 0 ]
+*> Lhat = [ w**H gamma ]
+*> in the sense that
+*> twonorm(Lhat*xhat) = sestpr.
+*>
+*> Depending on JOB, an estimate for the largest or smallest singular
+*> value is computed.
+*>
+*> Note that [s c]**H and sestpr**2 is an eigenpair of the system
+*>
+*> diag(sest*sest, 0) + [alpha gamma] * [ conjg(alpha) ]
+*> [ conjg(gamma) ]
+*>
+*> where alpha = x**H * w.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is INTEGER
+*> = 1: an estimate for the largest singular value is computed.
+*> = 2: an estimate for the smallest singular value is computed.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Length of X and W
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (J)
+*> The j-vector x.
+*> \endverbatim
+*>
+*> \param[in] SEST
+*> \verbatim
+*> SEST is DOUBLE PRECISION
+*> Estimated singular value of j by j matrix L
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (J)
+*> The j-vector w.
+*> \endverbatim
+*>
+*> \param[in] GAMMA
+*> \verbatim
+*> GAMMA is COMPLEX*16
+*> The diagonal element gamma.
+*> \endverbatim
+*>
+*> \param[out] SESTPR
+*> \verbatim
+*> SESTPR is DOUBLE PRECISION
+*> Estimated singular value of (j+1) by (j+1) matrix Lhat.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is COMPLEX*16
+*> Sine needed in forming xhat.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16
+*> Cosine needed in forming xhat.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER J, JOB
@@ -14,66 +141,6 @@
COMPLEX*16 W( J ), X( J )
* ..
*
-* Purpose
-* =======
-*
-* ZLAIC1 applies one step of incremental condition estimation in
-* its simplest version:
-*
-* Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j
-* lower triangular matrix L, such that
-* twonorm(L*x) = sest
-* Then ZLAIC1 computes sestpr, s, c such that
-* the vector
-* [ s*x ]
-* xhat = [ c ]
-* is an approximate singular vector of
-* [ L 0 ]
-* Lhat = [ w**H gamma ]
-* in the sense that
-* twonorm(Lhat*xhat) = sestpr.
-*
-* Depending on JOB, an estimate for the largest or smallest singular
-* value is computed.
-*
-* Note that [s c]**H and sestpr**2 is an eigenpair of the system
-*
-* diag(sest*sest, 0) + [alpha gamma] * [ conjg(alpha) ]
-* [ conjg(gamma) ]
-*
-* where alpha = x**H * w.
-*
-* Arguments
-* =========
-*
-* JOB (input) INTEGER
-* = 1: an estimate for the largest singular value is computed.
-* = 2: an estimate for the smallest singular value is computed.
-*
-* J (input) INTEGER
-* Length of X and W
-*
-* X (input) COMPLEX*16 array, dimension (J)
-* The j-vector x.
-*
-* SEST (input) DOUBLE PRECISION
-* Estimated singular value of j by j matrix L
-*
-* W (input) COMPLEX*16 array, dimension (J)
-* The j-vector w.
-*
-* GAMMA (input) COMPLEX*16
-* The diagonal element gamma.
-*
-* SESTPR (output) DOUBLE PRECISION
-* Estimated singular value of (j+1) by (j+1) matrix Lhat.
-*
-* S (output) COMPLEX*16
-* Sine needed in forming xhat.
-*
-* C (output) COMPLEX*16
-* Cosine needed in forming xhat.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlals0.f b/SRC/zlals0.f
index 8c72f1cf..abedce09 100644
--- a/SRC/zlals0.f
+++ b/SRC/zlals0.f
@@ -1,11 +1,278 @@
+*> \brief \b ZLALS0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
+* PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
+* POLES, DIFL, DIFR, Z, K, C, S, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
+* $ LDGNUM, NL, NR, NRHS, SQRE
+* DOUBLE PRECISION C, S
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), PERM( * )
+* DOUBLE PRECISION DIFL( * ), DIFR( LDGNUM, * ),
+* $ GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
+* $ RWORK( * ), Z( * )
+* COMPLEX*16 B( LDB, * ), BX( LDBX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLALS0 applies back the multiplying factors of either the left or the
+*> right singular vector matrix of a diagonal matrix appended by a row
+*> to the right hand side matrix B in solving the least squares problem
+*> using the divide-and-conquer SVD approach.
+*>
+*> For the left singular vector matrix, three types of orthogonal
+*> matrices are involved:
+*>
+*> (1L) Givens rotations: the number of such rotations is GIVPTR; the
+*> pairs of columns/rows they were applied to are stored in GIVCOL;
+*> and the C- and S-values of these rotations are stored in GIVNUM.
+*>
+*> (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
+*> row, and for J=2:N, PERM(J)-th row of B is to be moved to the
+*> J-th row.
+*>
+*> (3L) The left singular vector matrix of the remaining matrix.
+*>
+*> For the right singular vector matrix, four types of orthogonal
+*> matrices are involved:
+*>
+*> (1R) The right singular vector matrix of the remaining matrix.
+*>
+*> (2R) If SQRE = 1, one extra Givens rotation to generate the right
+*> null space.
+*>
+*> (3R) The inverse transformation of (2L).
+*>
+*> (4R) The inverse transformation of (1L).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether singular vectors are to be computed in
+*> factored form:
+*> = 0: Left singular vector matrix.
+*> = 1: Right singular vector matrix.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*> NL is INTEGER
+*> The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*> NR is INTEGER
+*> The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*> SQRE is INTEGER
+*> = 0: the lower block is an NR-by-NR square matrix.
+*> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*> \endverbatim
+*> \verbatim
+*> The bidiagonal matrix has row dimension N = NL + NR + 1,
+*> and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension ( LDB, NRHS )
+*> On input, B contains the right hand sides of the least
+*> squares problem in rows 1 through M. On output, B contains
+*> the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. LDB must be at least
+*> max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*> BX is COMPLEX*16 array, dimension ( LDBX, NRHS )
+*> \endverbatim
+*>
+*> \param[in] LDBX
+*> \verbatim
+*> LDBX is INTEGER
+*> The leading dimension of BX.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( N )
+*> The permutations (from deflation and sorting) applied
+*> to the two blocks.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER
+*> The number of Givens rotations which took place in this
+*> subproblem.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*> Each pair of numbers indicates a pair of rows/columns
+*> involved in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER
+*> The leading dimension of GIVCOL, must be at least N.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*> Each number indicates the C or S value used in the
+*> corresponding Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] LDGNUM
+*> \verbatim
+*> LDGNUM is INTEGER
+*> The leading dimension of arrays DIFR, POLES and
+*> GIVNUM, must be at least K.
+*> \endverbatim
+*>
+*> \param[in] POLES
+*> \verbatim
+*> POLES is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*> On entry, POLES(1:K, 1) contains the new singular
+*> values obtained from solving the secular equation, and
+*> POLES(1:K, 2) is an array containing the poles in the secular
+*> equation.
+*> \endverbatim
+*>
+*> \param[in] DIFL
+*> \verbatim
+*> DIFL is DOUBLE PRECISION array, dimension ( K ).
+*> On entry, DIFL(I) is the distance between I-th updated
+*> (undeflated) singular value and the I-th (undeflated) old
+*> singular value.
+*> \endverbatim
+*>
+*> \param[in] DIFR
+*> \verbatim
+*> DIFR is DOUBLE PRECISION array, dimension ( LDGNUM, 2 ).
+*> On entry, DIFR(I, 1) contains the distances between I-th
+*> updated (undeflated) singular value and the I+1-th
+*> (undeflated) old singular value. And DIFR(I, 2) is the
+*> normalizing factor for the I-th right singular vector.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( K )
+*> Contain the components of the deflation-adjusted updating row
+*> vector.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> Contains the dimension of the non-deflated matrix,
+*> This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> C contains garbage if SQRE =0 and the C-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION
+*> S contains garbage if SQRE =0 and the S-value of a Givens
+*> rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> ( K*(1+NRHS) + 2*NRHS )
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
$ PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
$ POLES, DIFL, DIFR, Z, K, C, S, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
@@ -20,149 +287,6 @@
COMPLEX*16 B( LDB, * ), BX( LDBX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLALS0 applies back the multiplying factors of either the left or the
-* right singular vector matrix of a diagonal matrix appended by a row
-* to the right hand side matrix B in solving the least squares problem
-* using the divide-and-conquer SVD approach.
-*
-* For the left singular vector matrix, three types of orthogonal
-* matrices are involved:
-*
-* (1L) Givens rotations: the number of such rotations is GIVPTR; the
-* pairs of columns/rows they were applied to are stored in GIVCOL;
-* and the C- and S-values of these rotations are stored in GIVNUM.
-*
-* (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
-* row, and for J=2:N, PERM(J)-th row of B is to be moved to the
-* J-th row.
-*
-* (3L) The left singular vector matrix of the remaining matrix.
-*
-* For the right singular vector matrix, four types of orthogonal
-* matrices are involved:
-*
-* (1R) The right singular vector matrix of the remaining matrix.
-*
-* (2R) If SQRE = 1, one extra Givens rotation to generate the right
-* null space.
-*
-* (3R) The inverse transformation of (2L).
-*
-* (4R) The inverse transformation of (1L).
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether singular vectors are to be computed in
-* factored form:
-* = 0: Left singular vector matrix.
-* = 1: Right singular vector matrix.
-*
-* NL (input) INTEGER
-* The row dimension of the upper block. NL >= 1.
-*
-* NR (input) INTEGER
-* The row dimension of the lower block. NR >= 1.
-*
-* SQRE (input) INTEGER
-* = 0: the lower block is an NR-by-NR square matrix.
-* = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*
-* The bidiagonal matrix has row dimension N = NL + NR + 1,
-* and column dimension M = N + SQRE.
-*
-* NRHS (input) INTEGER
-* The number of columns of B and BX. NRHS must be at least 1.
-*
-* B (input/output) COMPLEX*16 array, dimension ( LDB, NRHS )
-* On input, B contains the right hand sides of the least
-* squares problem in rows 1 through M. On output, B contains
-* the solution X in rows 1 through N.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. LDB must be at least
-* max(1,MAX( M, N ) ).
-*
-* BX (workspace) COMPLEX*16 array, dimension ( LDBX, NRHS )
-*
-* LDBX (input) INTEGER
-* The leading dimension of BX.
-*
-* PERM (input) INTEGER array, dimension ( N )
-* The permutations (from deflation and sorting) applied
-* to the two blocks.
-*
-* GIVPTR (input) INTEGER
-* The number of Givens rotations which took place in this
-* subproblem.
-*
-* GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 )
-* Each pair of numbers indicates a pair of rows/columns
-* involved in a Givens rotation.
-*
-* LDGCOL (input) INTEGER
-* The leading dimension of GIVCOL, must be at least N.
-*
-* GIVNUM (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-* Each number indicates the C or S value used in the
-* corresponding Givens rotation.
-*
-* LDGNUM (input) INTEGER
-* The leading dimension of arrays DIFR, POLES and
-* GIVNUM, must be at least K.
-*
-* POLES (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-* On entry, POLES(1:K, 1) contains the new singular
-* values obtained from solving the secular equation, and
-* POLES(1:K, 2) is an array containing the poles in the secular
-* equation.
-*
-* DIFL (input) DOUBLE PRECISION array, dimension ( K ).
-* On entry, DIFL(I) is the distance between I-th updated
-* (undeflated) singular value and the I-th (undeflated) old
-* singular value.
-*
-* DIFR (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 ).
-* On entry, DIFR(I, 1) contains the distances between I-th
-* updated (undeflated) singular value and the I+1-th
-* (undeflated) old singular value. And DIFR(I, 2) is the
-* normalizing factor for the I-th right singular vector.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( K )
-* Contain the components of the deflation-adjusted updating row
-* vector.
-*
-* K (input) INTEGER
-* Contains the dimension of the non-deflated matrix,
-* This is the order of the related secular equation. 1 <= K <=N.
-*
-* C (input) DOUBLE PRECISION
-* C contains garbage if SQRE =0 and the C-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* S (input) DOUBLE PRECISION
-* S contains garbage if SQRE =0 and the S-value of a Givens
-* rotation related to the right null space if SQRE = 1.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* ( K*(1+NRHS) + 2*NRHS )
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlalsa.f b/SRC/zlalsa.f
index eee6476b..86ca33bc 100644
--- a/SRC/zlalsa.f
+++ b/SRC/zlalsa.f
@@ -1,12 +1,275 @@
+*> \brief \b ZLALSA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
+* LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
+* GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
+* $ SMLSIZ
+* ..
+* .. Array Arguments ..
+* INTEGER GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
+* $ K( * ), PERM( LDGCOL, * )
+* DOUBLE PRECISION C( * ), DIFL( LDU, * ), DIFR( LDU, * ),
+* $ GIVNUM( LDU, * ), POLES( LDU, * ), RWORK( * ),
+* $ S( * ), U( LDU, * ), VT( LDU, * ), Z( LDU, * )
+* COMPLEX*16 B( LDB, * ), BX( LDBX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLALSA is an itermediate step in solving the least squares problem
+*> by computing the SVD of the coefficient matrix in compact form (The
+*> singular vectors are computed as products of simple orthorgonal
+*> matrices.).
+*>
+*> If ICOMPQ = 0, ZLALSA applies the inverse of the left singular vector
+*> matrix of an upper bidiagonal matrix to the right hand side; and if
+*> ICOMPQ = 1, ZLALSA applies the right singular vector matrix to the
+*> right hand side. The singular vector matrices were generated in
+*> compact form by ZLALSA.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*> ICOMPQ is INTEGER
+*> Specifies whether the left or the right singular vector
+*> matrix is involved.
+*> = 0: Left singular vector matrix
+*> = 1: Right singular vector matrix
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The row and column dimensions of the upper bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension ( LDB, NRHS )
+*> On input, B contains the right hand sides of the least
+*> squares problem in rows 1 through M.
+*> On output, B contains the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B in the calling subprogram.
+*> LDB must be at least max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*> BX is COMPLEX*16 array, dimension ( LDBX, NRHS )
+*> On exit, the result of applying the left or right singular
+*> vector matrix to B.
+*> \endverbatim
+*>
+*> \param[in] LDBX
+*> \verbatim
+*> LDBX is INTEGER
+*> The leading dimension of BX.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ).
+*> On entry, U contains the left singular vector matrices of all
+*> subproblems at the bottom level.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER, LDU = > N.
+*> The leading dimension of arrays U, VT, DIFL, DIFR,
+*> POLES, GIVNUM, and Z.
+*> \endverbatim
+*>
+*> \param[in] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ).
+*> On entry, VT**H contains the right singular vector matrices of
+*> all subproblems at the bottom level.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER array, dimension ( N ).
+*> \endverbatim
+*>
+*> \param[in] DIFL
+*> \verbatim
+*> DIFL is DOUBLE PRECISION array, dimension ( LDU, NLVL ).
+*> where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
+*> \endverbatim
+*>
+*> \param[in] DIFR
+*> \verbatim
+*> DIFR is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*> On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
+*> distances between singular values on the I-th level and
+*> singular values on the (I -1)-th level, and DIFR(*, 2 * I)
+*> record the normalizing factors of the right singular vectors
+*> matrices of subproblems on I-th level.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension ( LDU, NLVL ).
+*> On entry, Z(1, I) contains the components of the deflation-
+*> adjusted updating row vector for subproblems on the I-th
+*> level.
+*> \endverbatim
+*>
+*> \param[in] POLES
+*> \verbatim
+*> POLES is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*> On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
+*> singular values involved in the secular equations on the I-th
+*> level.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*> GIVPTR is INTEGER array, dimension ( N ).
+*> On entry, GIVPTR( I ) records the number of Givens
+*> rotations performed on the I-th problem on the computation
+*> tree.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*> GIVCOL is INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
+*> On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
+*> locations of Givens rotations performed on the I-th level on
+*> the computation tree.
+*> \endverbatim
+*>
+*> \param[in] LDGCOL
+*> \verbatim
+*> LDGCOL is INTEGER, LDGCOL = > N.
+*> The leading dimension of arrays GIVCOL and PERM.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*> PERM is INTEGER array, dimension ( LDGCOL, NLVL ).
+*> On entry, PERM(*, I) records permutations done on the I-th
+*> level of the computation tree.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*> GIVNUM is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*> On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
+*> values of Givens rotations performed on the I-th level on the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension ( N ).
+*> On entry, if the I-th subproblem is not square,
+*> C( I ) contains the C-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension ( N ).
+*> On entry, if the I-th subproblem is not square,
+*> S( I ) contains the S-value of a Givens rotation related to
+*> the right null space of the I-th subproblem.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension at least
+*> MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array.
+*> The dimension must be at least 3 * N
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
$ LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
$ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
@@ -21,139 +284,6 @@
COMPLEX*16 B( LDB, * ), BX( LDBX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLALSA is an itermediate step in solving the least squares problem
-* by computing the SVD of the coefficient matrix in compact form (The
-* singular vectors are computed as products of simple orthorgonal
-* matrices.).
-*
-* If ICOMPQ = 0, ZLALSA applies the inverse of the left singular vector
-* matrix of an upper bidiagonal matrix to the right hand side; and if
-* ICOMPQ = 1, ZLALSA applies the right singular vector matrix to the
-* right hand side. The singular vector matrices were generated in
-* compact form by ZLALSA.
-*
-* Arguments
-* =========
-*
-* ICOMPQ (input) INTEGER
-* Specifies whether the left or the right singular vector
-* matrix is involved.
-* = 0: Left singular vector matrix
-* = 1: Right singular vector matrix
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The row and column dimensions of the upper bidiagonal matrix.
-*
-* NRHS (input) INTEGER
-* The number of columns of B and BX. NRHS must be at least 1.
-*
-* B (input/output) COMPLEX*16 array, dimension ( LDB, NRHS )
-* On input, B contains the right hand sides of the least
-* squares problem in rows 1 through M.
-* On output, B contains the solution X in rows 1 through N.
-*
-* LDB (input) INTEGER
-* The leading dimension of B in the calling subprogram.
-* LDB must be at least max(1,MAX( M, N ) ).
-*
-* BX (output) COMPLEX*16 array, dimension ( LDBX, NRHS )
-* On exit, the result of applying the left or right singular
-* vector matrix to B.
-*
-* LDBX (input) INTEGER
-* The leading dimension of BX.
-*
-* U (input) DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ).
-* On entry, U contains the left singular vector matrices of all
-* subproblems at the bottom level.
-*
-* LDU (input) INTEGER, LDU = > N.
-* The leading dimension of arrays U, VT, DIFL, DIFR,
-* POLES, GIVNUM, and Z.
-*
-* VT (input) DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ).
-* On entry, VT**H contains the right singular vector matrices of
-* all subproblems at the bottom level.
-*
-* K (input) INTEGER array, dimension ( N ).
-*
-* DIFL (input) DOUBLE PRECISION array, dimension ( LDU, NLVL ).
-* where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
-*
-* DIFR (input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-* On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
-* distances between singular values on the I-th level and
-* singular values on the (I -1)-th level, and DIFR(*, 2 * I)
-* record the normalizing factors of the right singular vectors
-* matrices of subproblems on I-th level.
-*
-* Z (input) DOUBLE PRECISION array, dimension ( LDU, NLVL ).
-* On entry, Z(1, I) contains the components of the deflation-
-* adjusted updating row vector for subproblems on the I-th
-* level.
-*
-* POLES (input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-* On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
-* singular values involved in the secular equations on the I-th
-* level.
-*
-* GIVPTR (input) INTEGER array, dimension ( N ).
-* On entry, GIVPTR( I ) records the number of Givens
-* rotations performed on the I-th problem on the computation
-* tree.
-*
-* GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
-* On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
-* locations of Givens rotations performed on the I-th level on
-* the computation tree.
-*
-* LDGCOL (input) INTEGER, LDGCOL = > N.
-* The leading dimension of arrays GIVCOL and PERM.
-*
-* PERM (input) INTEGER array, dimension ( LDGCOL, NLVL ).
-* On entry, PERM(*, I) records permutations done on the I-th
-* level of the computation tree.
-*
-* GIVNUM (input) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-* On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
-* values of Givens rotations performed on the I-th level on the
-* computation tree.
-*
-* C (input) DOUBLE PRECISION array, dimension ( N ).
-* On entry, if the I-th subproblem is not square,
-* C( I ) contains the C-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* S (input) DOUBLE PRECISION array, dimension ( N ).
-* On entry, if the I-th subproblem is not square,
-* S( I ) contains the S-value of a Givens rotation related to
-* the right null space of the I-th subproblem.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension at least
-* MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ).
-*
-* IWORK (workspace) INTEGER array.
-* The dimension must be at least 3 * N
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlalsd.f b/SRC/zlalsd.f
index 3ca8fa77..004fcb1d 100644
--- a/SRC/zlalsd.f
+++ b/SRC/zlalsd.f
@@ -1,10 +1,195 @@
+*> \brief \b ZLALSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
+* RANK, WORK, RWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS, RANK, SMLSIZ
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), RWORK( * )
+* COMPLEX*16 B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLALSD uses the singular value decomposition of A to solve the least
+*> squares problem of finding X to minimize the Euclidean norm of each
+*> column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
+*> are N-by-NRHS. The solution X overwrites B.
+*>
+*> The singular values of A smaller than RCOND times the largest
+*> singular value are treated as zero in solving the least squares
+*> problem; in this case a minimum norm solution is returned.
+*> The actual singular values are returned in D in ascending order.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': D and E define an upper bidiagonal matrix.
+*> = 'L': D and E define a lower bidiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] SMLSIZ
+*> \verbatim
+*> SMLSIZ is INTEGER
+*> The maximum size of the subproblems at the bottom of the
+*> computation tree.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the bidiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry D contains the main diagonal of the bidiagonal
+*> matrix. On exit, if INFO = 0, D contains its singular values.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> Contains the super-diagonal entries of the bidiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On input, B contains the right hand sides of the least
+*> squares problem. On output, B contains the solution X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B in the calling subprogram.
+*> LDB must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The singular values of A less than or equal to RCOND times
+*> the largest singular value are treated as zero in solving
+*> the least squares problem. If RCOND is negative,
+*> machine precision is used instead.
+*> For example, if diag(S)*X=B were the least squares problem,
+*> where diag(S) is a diagonal matrix of singular values, the
+*> solution would be X(i) = B(i) / S(i) if S(i) is greater than
+*> RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
+*> RCOND*max(S).
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The number of singular values of A greater than RCOND times
+*> the largest singular value.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension at least
+*> (N * NRHS).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension at least
+*> (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
+*> MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS ),
+*> where
+*> NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least
+*> (3*N*NLVL + 11*N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute a singular value while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through MOD(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*> California at Berkeley, USA
+*> Osni Marques, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
$ RANK, WORK, RWORK, IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,101 +202,6 @@
COMPLEX*16 B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLALSD uses the singular value decomposition of A to solve the least
-* squares problem of finding X to minimize the Euclidean norm of each
-* column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
-* are N-by-NRHS. The solution X overwrites B.
-*
-* The singular values of A smaller than RCOND times the largest
-* singular value are treated as zero in solving the least squares
-* problem; in this case a minimum norm solution is returned.
-* The actual singular values are returned in D in ascending order.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': D and E define an upper bidiagonal matrix.
-* = 'L': D and E define a lower bidiagonal matrix.
-*
-* SMLSIZ (input) INTEGER
-* The maximum size of the subproblems at the bottom of the
-* computation tree.
-*
-* N (input) INTEGER
-* The dimension of the bidiagonal matrix. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS must be at least 1.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry D contains the main diagonal of the bidiagonal
-* matrix. On exit, if INFO = 0, D contains its singular values.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* Contains the super-diagonal entries of the bidiagonal matrix.
-* On exit, E has been destroyed.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On input, B contains the right hand sides of the least
-* squares problem. On output, B contains the solution X.
-*
-* LDB (input) INTEGER
-* The leading dimension of B in the calling subprogram.
-* LDB must be at least max(1,N).
-*
-* RCOND (input) DOUBLE PRECISION
-* The singular values of A less than or equal to RCOND times
-* the largest singular value are treated as zero in solving
-* the least squares problem. If RCOND is negative,
-* machine precision is used instead.
-* For example, if diag(S)*X=B were the least squares problem,
-* where diag(S) is a diagonal matrix of singular values, the
-* solution would be X(i) = B(i) / S(i) if S(i) is greater than
-* RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
-* RCOND*max(S).
-*
-* RANK (output) INTEGER
-* The number of singular values of A greater than RCOND times
-* the largest singular value.
-*
-* WORK (workspace) COMPLEX*16 array, dimension at least
-* (N * NRHS).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension at least
-* (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
-* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS ),
-* where
-* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
-*
-* IWORK (workspace) INTEGER array, dimension at least
-* (3*N*NLVL + 11*N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute a singular value while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through MOD(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Ming Gu and Ren-Cang Li, Computer Science Division, University of
-* California at Berkeley, USA
-* Osni Marques, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlangb.f b/SRC/zlangb.f
index ce2cf679..276c01b6 100644
--- a/SRC/zlangb.f
+++ b/SRC/zlangb.f
@@ -1,10 +1,127 @@
+*> \brief \b ZLANGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANGB( NORM, N, KL, KU, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER KL, KU, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANGB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANGB returns the value
+*>
+*> ZLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANGB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANGB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of sub-diagonals of the matrix A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of super-diagonals of the matrix A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
+*> column of A is stored in the j-th column of the array AB as
+*> follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANGB( NORM, N, KL, KU, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -15,61 +132,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANGB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n band matrix A, with kl sub-diagonals and ku super-diagonals.
-*
-* Description
-* ===========
-*
-* ZLANGB returns the value
-*
-* ZLANGB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANGB as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANGB is
-* set to zero.
-*
-* KL (input) INTEGER
-* The number of sub-diagonals of the matrix A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of super-diagonals of the matrix A. KU >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The band matrix A, stored in rows 1 to KL+KU+1. The j-th
-* column of A is stored in the j-th column of the array AB as
-* follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlange.f b/SRC/zlange.f
index 56aa3ecb..fbaaa434 100644
--- a/SRC/zlange.f
+++ b/SRC/zlange.f
@@ -1,9 +1,117 @@
+*> \brief \b ZLANGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANGE( NORM, M, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANGE returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANGE returns the value
+*>
+*> ZLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANGE as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0. When M = 0,
+*> ZLANGE is set to zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0. When N = 0,
+*> ZLANGE is set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANGE( NORM, M, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -14,56 +122,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANGE returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex matrix A.
-*
-* Description
-* ===========
-*
-* ZLANGE returns the value
-*
-* ZLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANGE as described
-* above.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0. When M = 0,
-* ZLANGE is set to zero.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0. When N = 0,
-* ZLANGE is set to zero.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlangt.f b/SRC/zlangt.f
index a02184e1..4f6d6d15 100644
--- a/SRC/zlangt.f
+++ b/SRC/zlangt.f
@@ -1,9 +1,108 @@
+*> \brief \b ZLANGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANGT( NORM, N, DL, D, DU )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 D( * ), DL( * ), DU( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANGT returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex tridiagonal matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANGT returns the value
+*>
+*> ZLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANGT as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANGT is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANGT( NORM, N, DL, D, DU )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -13,51 +112,6 @@
COMPLEX*16 D( * ), DL( * ), DU( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANGT returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex tridiagonal matrix A.
-*
-* Description
-* ===========
-*
-* ZLANGT returns the value
-*
-* ZLANGT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANGT as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANGT is
-* set to zero.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlanhb.f b/SRC/zlanhb.f
index 92fa9e63..38d69e32 100644
--- a/SRC/zlanhb.f
+++ b/SRC/zlanhb.f
@@ -1,10 +1,134 @@
+*> \brief \b ZLANHB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANHB( NORM, UPLO, N, K, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANHB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n hermitian band matrix A, with k super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANHB returns the value
+*>
+*> ZLANHB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANHB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> band matrix A is supplied.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANHB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals or sub-diagonals of the
+*> band matrix A. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangle of the hermitian band matrix A,
+*> stored in the first K+1 rows of AB. The j-th column of A is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANHB( NORM, UPLO, N, K, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -15,68 +139,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANHB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n hermitian band matrix A, with k super-diagonals.
-*
-* Description
-* ===========
-*
-* ZLANHB returns the value
-*
-* ZLANHB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANHB as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* band matrix A is supplied.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANHB is
-* set to zero.
-*
-* K (input) INTEGER
-* The number of super-diagonals or sub-diagonals of the
-* band matrix A. K >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangle of the hermitian band matrix A,
-* stored in the first K+1 rows of AB. The j-th column of A is
-* stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlanhe.f b/SRC/zlanhe.f
index f3ed0f09..98d089ff 100644
--- a/SRC/zlanhe.f
+++ b/SRC/zlanhe.f
@@ -1,9 +1,126 @@
+*> \brief \b ZLANHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANHE( NORM, UPLO, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANHE returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex hermitian matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANHE returns the value
+*>
+*> ZLANHE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANHE as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> hermitian matrix A is to be referenced.
+*> = 'U': Upper triangular part of A is referenced
+*> = 'L': Lower triangular part of A is referenced
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANHE is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The hermitian matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced. Note that the imaginary parts of the diagonal
+*> elements need not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANHE( NORM, UPLO, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,65 +131,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANHE returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex hermitian matrix A.
-*
-* Description
-* ===========
-*
-* ZLANHE returns the value
-*
-* ZLANHE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANHE as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* hermitian matrix A is to be referenced.
-* = 'U': Upper triangular part of A is referenced
-* = 'L': Lower triangular part of A is referenced
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANHE is
-* set to zero.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The hermitian matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced. Note that the imaginary parts of the diagonal
-* elements need not be set and are assumed to be zero.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlanhf.f b/SRC/zlanhf.f
index 2399fd63..1b498d0e 100644
--- a/SRC/zlanhf.f
+++ b/SRC/zlanhf.f
@@ -1,199 +1,261 @@
- DOUBLE PRECISION FUNCTION ZLANHF( NORM, TRANSR, UPLO, N, A, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2009 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER NORM, TRANSR, UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION WORK( 0: * )
- COMPLEX*16 A( 0: * )
-* ..
-*
+*> \brief \b ZLANHF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANHF( NORM, TRANSR, UPLO, N, A, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, TRANSR, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( 0: * )
+* COMPLEX*16 A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* ZLANHF returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex Hermitian matrix A in RFP format.
-*
-* Description
-* ===========
-*
-* ZLANHF returns the value
-*
-* ZLANHF = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANHF returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex Hermitian matrix A in RFP format.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANHF returns the value
+*>
+*> ZLANHF = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER
-* Specifies the value to be returned in ZLANHF as described
-* above.
-*
-* TRANSR (input) CHARACTER
-* Specifies whether the RFP format of A is normal or
-* conjugate-transposed format.
-* = 'N': RFP format is Normal
-* = 'C': RFP format is Conjugate-transposed
-*
-* UPLO (input) CHARACTER
-* On entry, UPLO specifies whether the RFP matrix A came from
-* an upper or lower triangular matrix as follows:
-*
-* UPLO = 'U' or 'u' RFP A came from an upper triangular
-* matrix
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER
+*> Specifies the value to be returned in ZLANHF as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER
+*> Specifies whether the RFP format of A is normal or
+*> conjugate-transposed format.
+*> = 'N': RFP format is Normal
+*> = 'C': RFP format is Conjugate-transposed
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> On entry, UPLO specifies whether the RFP matrix A came from
+*> an upper or lower triangular matrix as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' RFP A came from an upper triangular
+*> matrix
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' RFP A came from a lower triangular
+*> matrix
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANHF is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( N*(N+1)/2 );
+*> On entry, the matrix A in RFP Format.
+*> RFP Format is described by TRANSR, UPLO and N as follows:
+*> If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
+*> K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
+*> TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A
+*> as defined when TRANSR = 'N'. The contents of RFP A are
+*> defined by UPLO as follows: If UPLO = 'U' the RFP A
+*> contains the ( N*(N+1)/2 ) elements of upper packed A
+*> either in normal or conjugate-transpose Format. If
+*> UPLO = 'L' the RFP A contains the ( N*(N+1) /2 ) elements
+*> of lower packed A either in normal or conjugate-transpose
+*> Format. The LDA of RFP A is (N+1)/2 when TRANSR = 'C'. When
+*> TRANSR is 'N' the LDA is N+1 when N is even and is N when
+*> is odd. See the Note below for more details.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO = 'L' or 'l' RFP A came from a lower triangular
-* matrix
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANHF is
-* set to zero.
+*> \date November 2011
*
-* A (input) COMPLEX*16 array, dimension ( N*(N+1)/2 );
-* On entry, the matrix A in RFP Format.
-* RFP Format is described by TRANSR, UPLO and N as follows:
-* If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
-* K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
-* TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A
-* as defined when TRANSR = 'N'. The contents of RFP A are
-* defined by UPLO as follows: If UPLO = 'U' the RFP A
-* contains the ( N*(N+1)/2 ) elements of upper packed A
-* either in normal or conjugate-transpose Format. If
-* UPLO = 'L' the RFP A contains the ( N*(N+1) /2 ) elements
-* of lower packed A either in normal or conjugate-transpose
-* Format. The LDA of RFP A is (N+1)/2 when TRANSR = 'C'. When
-* TRANSR is 'N' the LDA is N+1 when N is even and is N when
-* is odd. See the Note below for more details.
-* Unchanged on exit.
+*> \ingroup complex16OTHERcomputational
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLANHF( NORM, TRANSR, UPLO, N, A, WORK )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER NORM, TRANSR, UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION WORK( 0: * )
+ COMPLEX*16 A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlanhp.f b/SRC/zlanhp.f
index 72b6fcfb..578095e2 100644
--- a/SRC/zlanhp.f
+++ b/SRC/zlanhp.f
@@ -1,9 +1,119 @@
+*> \brief \b ZLANHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANHP( NORM, UPLO, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANHP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex hermitian matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANHP returns the value
+*>
+*> ZLANHP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANHP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> hermitian matrix A is supplied.
+*> = 'U': Upper triangular part of A is supplied
+*> = 'L': Lower triangular part of A is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANHP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set and are assumed to be zero.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANHP( NORM, UPLO, N, AP, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,61 +124,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANHP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex hermitian matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* ZLANHP returns the value
-*
-* ZLANHP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANHP as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* hermitian matrix A is supplied.
-* = 'U': Upper triangular part of A is supplied
-* = 'L': Lower triangular part of A is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANHP is
-* set to zero.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* Note that the imaginary parts of the diagonal elements need
-* not be set and are assumed to be zero.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlanhs.f b/SRC/zlanhs.f
index f8027289..68f85488 100644
--- a/SRC/zlanhs.f
+++ b/SRC/zlanhs.f
@@ -1,9 +1,111 @@
+*> \brief \b ZLANHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANHS( NORM, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANHS returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> Hessenberg matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANHS returns the value
+*>
+*> ZLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANHS as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANHS is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The n by n upper Hessenberg matrix A; the part of A below the
+*> first sub-diagonal is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANHS( NORM, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -14,53 +116,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANHS returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* Hessenberg matrix A.
-*
-* Description
-* ===========
-*
-* ZLANHS returns the value
-*
-* ZLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANHS as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANHS is
-* set to zero.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The n by n upper Hessenberg matrix A; the part of A below the
-* first sub-diagonal is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlanht.f b/SRC/zlanht.f
index 24c81098..9df5e9cb 100644
--- a/SRC/zlanht.f
+++ b/SRC/zlanht.f
@@ -1,9 +1,103 @@
+*> \brief \b ZLANHT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANHT( NORM, N, D, E )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANHT returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex Hermitian tridiagonal matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANHT returns the value
+*>
+*> ZLANHT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANHT as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANHT is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) sub-diagonal or super-diagonal elements of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANHT( NORM, N, D, E )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM
@@ -14,48 +108,6 @@
COMPLEX*16 E( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANHT returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex Hermitian tridiagonal matrix A.
-*
-* Description
-* ===========
-*
-* ZLANHT returns the value
-*
-* ZLANHT = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANHT as described
-* above.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANHT is
-* set to zero.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of A.
-*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) sub-diagonal or super-diagonal elements of A.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlansb.f b/SRC/zlansb.f
index e1e90cfa..630e92ef 100644
--- a/SRC/zlansb.f
+++ b/SRC/zlansb.f
@@ -1,10 +1,132 @@
+*> \brief \b ZLANSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANSB( NORM, UPLO, N, K, AB, LDAB,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANSB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n symmetric band matrix A, with k super-diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANSB returns the value
+*>
+*> ZLANSB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANSB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> band matrix A is supplied.
+*> = 'U': Upper triangular part is supplied
+*> = 'L': Lower triangular part is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANSB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals or sub-diagonals of the
+*> band matrix A. K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first K+1 rows of AB. The j-th column of A is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANSB( NORM, UPLO, N, K, AB, LDAB,
$ WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -15,66 +137,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANSB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n symmetric band matrix A, with k super-diagonals.
-*
-* Description
-* ===========
-*
-* ZLANSB returns the value
-*
-* ZLANSB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANSB as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* band matrix A is supplied.
-* = 'U': Upper triangular part is supplied
-* = 'L': Lower triangular part is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANSB is
-* set to zero.
-*
-* K (input) INTEGER
-* The number of super-diagonals or sub-diagonals of the
-* band matrix A. K >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first K+1 rows of AB. The j-th column of A is
-* stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlansp.f b/SRC/zlansp.f
index 7e75f428..13fadb33 100644
--- a/SRC/zlansp.f
+++ b/SRC/zlansp.f
@@ -1,9 +1,117 @@
+*> \brief \b ZLANSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANSP( NORM, UPLO, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANSP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex symmetric matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANSP returns the value
+*>
+*> ZLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANSP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is supplied.
+*> = 'U': Upper triangular part of A is supplied
+*> = 'L': Lower triangular part of A is supplied
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANSP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANSP( NORM, UPLO, N, AP, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,59 +122,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANSP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex symmetric matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* ZLANSP returns the value
-*
-* ZLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANSP as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is supplied.
-* = 'U': Upper triangular part of A is supplied
-* = 'L': Lower triangular part of A is supplied
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANSP is
-* set to zero.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlansy.f b/SRC/zlansy.f
index fde698f9..fff76354 100644
--- a/SRC/zlansy.f
+++ b/SRC/zlansy.f
@@ -1,9 +1,125 @@
+*> \brief \b ZLANSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANSY( NORM, UPLO, N, A, LDA, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER NORM, UPLO
+* INTEGER LDA, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANSY returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> complex symmetric matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANSY returns the value
+*>
+*> ZLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANSY as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is to be referenced.
+*> = 'U': Upper triangular part of A is referenced
+*> = 'L': Lower triangular part of A is referenced
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANSY is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*> WORK is not referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYauxiliary
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION ZLANSY( NORM, UPLO, N, A, LDA, WORK )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER NORM, UPLO
@@ -14,64 +130,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLANSY returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* complex symmetric matrix A.
-*
-* Description
-* ===========
-*
-* ZLANSY returns the value
-*
-* ZLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANSY as described
-* above.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is to be referenced.
-* = 'U': Upper triangular part of A is referenced
-* = 'L': Lower triangular part of A is referenced
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANSY is
-* set to zero.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-* WORK is not referenced.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlantb.f b/SRC/zlantb.f
index 04e296f1..8b19c13a 100644
--- a/SRC/zlantb.f
+++ b/SRC/zlantb.f
@@ -1,87 +1,152 @@
- DOUBLE PRECISION FUNCTION ZLANTB( NORM, UPLO, DIAG, N, K, AB,
- $ LDAB, WORK )
+*> \brief \b ZLANTB
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER K, LDAB, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION WORK( * )
- COMPLEX*16 AB( LDAB, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION ZLANTB( NORM, UPLO, DIAG, N, K, AB,
+* LDAB, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* ZLANTB returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of an
-* n by n triangular band matrix A, with ( k + 1 ) diagonals.
-*
-* Description
-* ===========
-*
-* ZLANTB returns the value
-*
-* ZLANTB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANTB returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of an
+*> n by n triangular band matrix A, with ( k + 1 ) diagonals.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANTB returns the value
+*>
+*> ZLANTB = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANTB as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANTB as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANTB is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals of the matrix A if UPLO = 'L'.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first k+1 rows of AB. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
+*> Note that when DIAG = 'U', the elements of the array AB
+*> corresponding to the diagonal elements of the matrix A are
+*> not referenced, but are assumed to be one.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= K+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+* Authors
+* =======
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANTB is
-* set to zero.
+*> \date November 2011
*
-* K (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals of the matrix A if UPLO = 'L'.
-* K >= 0.
+*> \ingroup complex16OTHERauxiliary
*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first k+1 rows of AB. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(k+1+i-j,j) = A(i,j) for max(1,j-k)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+k).
-* Note that when DIAG = 'U', the elements of the array AB
-* corresponding to the diagonal elements of the matrix A are
-* not referenced, but are assumed to be one.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLANTB( NORM, UPLO, DIAG, N, K, AB,
+ $ LDAB, WORK )
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= K+1.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER K, LDAB, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION WORK( * )
+ COMPLEX*16 AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlantp.f b/SRC/zlantp.f
index d3723121..976900b1 100644
--- a/SRC/zlantp.f
+++ b/SRC/zlantp.f
@@ -1,78 +1,136 @@
- DOUBLE PRECISION FUNCTION ZLANTP( NORM, UPLO, DIAG, N, AP, WORK )
+*> \brief \b ZLANTP
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION WORK( * )
- COMPLEX*16 AP( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZLANTP( NORM, UPLO, DIAG, N, AP, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 AP( * )
+* ..
+*
* Purpose
* =======
*
-* ZLANTP returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* triangular matrix A, supplied in packed form.
-*
-* Description
-* ===========
-*
-* ZLANTP returns the value
-*
-* ZLANTP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANTP returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> triangular matrix A, supplied in packed form.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANTP returns the value
+*>
+*> ZLANTP = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANTP as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANTP as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0. When N = 0, ZLANTP is
+*> set to zero.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> Note that when DIAG = 'U', the elements of the array AP
+*> corresponding to the diagonal elements of the matrix A are
+*> not referenced, but are assumed to be one.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \date November 2011
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \ingroup complex16OTHERauxiliary
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0. When N = 0, ZLANTP is
-* set to zero.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLANTP( NORM, UPLO, DIAG, N, AP, WORK )
*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* Note that when DIAG = 'U', the elements of the array AP
-* corresponding to the diagonal elements of the matrix A are
-* not referenced, but are assumed to be one.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION WORK( * )
+ COMPLEX*16 AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlantr.f b/SRC/zlantr.f
index e2ea5b28..45845dee 100644
--- a/SRC/zlantr.f
+++ b/SRC/zlantr.f
@@ -1,88 +1,153 @@
- DOUBLE PRECISION FUNCTION ZLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
- $ WORK )
+*> \brief \b ZLANTR
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, NORM, UPLO
- INTEGER LDA, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION WORK( * )
- COMPLEX*16 A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION ZLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+* WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZLANTR returns the value of the one norm, or the Frobenius norm, or
-* the infinity norm, or the element of largest absolute value of a
-* trapezoidal or triangular matrix A.
-*
-* Description
-* ===========
-*
-* ZLANTR returns the value
-*
-* ZLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-* (
-* ( norm1(A), NORM = '1', 'O' or 'o'
-* (
-* ( normI(A), NORM = 'I' or 'i'
-* (
-* ( normF(A), NORM = 'F', 'f', 'E' or 'e'
-*
-* where norm1 denotes the one norm of a matrix (maximum column sum),
-* normI denotes the infinity norm of a matrix (maximum row sum) and
-* normF denotes the Frobenius norm of a matrix (square root of sum of
-* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLANTR returns the value of the one norm, or the Frobenius norm, or
+*> the infinity norm, or the element of largest absolute value of a
+*> trapezoidal or triangular matrix A.
+*>
+*> Description
+*> ===========
+*>
+*> ZLANTR returns the value
+*>
+*> ZLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*> (
+*> ( norm1(A), NORM = '1', 'O' or 'o'
+*> (
+*> ( normI(A), NORM = 'I' or 'i'
+*> (
+*> ( normF(A), NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where norm1 denotes the one norm of a matrix (maximum column sum),
+*> normI denotes the infinity norm of a matrix (maximum row sum) and
+*> normF denotes the Frobenius norm of a matrix (square root of sum of
+*> squares). Note that max(abs(A(i,j))) is not a consistent matrix norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NORM (input) CHARACTER*1
-* Specifies the value to be returned in ZLANTR as described
-* above.
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies the value to be returned in ZLANTR as described
+*> above.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower trapezoidal.
+*> = 'U': Upper trapezoidal
+*> = 'L': Lower trapezoidal
+*> Note that A is triangular instead of trapezoidal if M = N.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A has unit diagonal.
+*> = 'N': Non-unit diagonal
+*> = 'U': Unit diagonal
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0, and if
+*> UPLO = 'U', M <= N. When M = 0, ZLANTR is set to zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0, and if
+*> UPLO = 'L', N <= M. When N = 0, ZLANTR is set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The trapezoidal matrix A (A is triangular if M = N).
+*> If UPLO = 'U', the leading m by n upper trapezoidal part of
+*> the array A contains the upper trapezoidal matrix, and the
+*> strictly lower triangular part of A is not referenced.
+*> If UPLO = 'L', the leading m by n lower trapezoidal part of
+*> the array A contains the lower trapezoidal matrix, and the
+*> strictly upper triangular part of A is not referenced. Note
+*> that when DIAG = 'U', the diagonal elements of A are not
+*> referenced and are assumed to be one.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*> where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*> referenced.
+*> \endverbatim
+*>
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower trapezoidal.
-* = 'U': Upper trapezoidal
-* = 'L': Lower trapezoidal
-* Note that A is triangular instead of trapezoidal if M = N.
+* Authors
+* =======
*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A has unit diagonal.
-* = 'N': Non-unit diagonal
-* = 'U': Unit diagonal
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0, and if
-* UPLO = 'U', M <= N. When M = 0, ZLANTR is set to zero.
+*> \date November 2011
*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0, and if
-* UPLO = 'L', N <= M. When N = 0, ZLANTR is set to zero.
+*> \ingroup complex16OTHERauxiliary
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The trapezoidal matrix A (A is triangular if M = N).
-* If UPLO = 'U', the leading m by n upper trapezoidal part of
-* the array A contains the upper trapezoidal matrix, and the
-* strictly lower triangular part of A is not referenced.
-* If UPLO = 'L', the leading m by n lower trapezoidal part of
-* the array A contains the lower trapezoidal matrix, and the
-* strictly upper triangular part of A is not referenced. Note
-* that when DIAG = 'U', the diagonal elements of A are not
-* referenced and are assumed to be one.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+ $ WORK )
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-* where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-* referenced.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, NORM, UPLO
+ INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION WORK( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlapll.f b/SRC/zlapll.f
index d91c99fc..dab53638 100644
--- a/SRC/zlapll.f
+++ b/SRC/zlapll.f
@@ -1,9 +1,101 @@
+*> \brief \b ZLAPLL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAPLL( N, X, INCX, Y, INCY, SSMIN )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* DOUBLE PRECISION SSMIN
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given two column vectors X and Y, let
+*>
+*> A = ( X Y ).
+*>
+*> The subroutine first computes the QR factorization of A = Q*R,
+*> and then computes the SVD of the 2-by-2 upper triangular matrix R.
+*> The smaller singular value of R is returned in SSMIN, which is used
+*> as the measurement of the linear dependency of the vectors X and Y.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vectors X and Y.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (1+(N-1)*INCX)
+*> On entry, X contains the N-vector X.
+*> On exit, X is overwritten.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (1+(N-1)*INCY)
+*> On entry, Y contains the N-vector Y.
+*> On exit, Y is overwritten.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between successive elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[out] SSMIN
+*> \verbatim
+*> SSMIN is DOUBLE PRECISION
+*> The smallest singular value of the N-by-2 matrix A = ( X Y ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAPLL( N, X, INCX, Y, INCY, SSMIN )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
@@ -13,41 +105,6 @@
COMPLEX*16 X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* Given two column vectors X and Y, let
-*
-* A = ( X Y ).
-*
-* The subroutine first computes the QR factorization of A = Q*R,
-* and then computes the SVD of the 2-by-2 upper triangular matrix R.
-* The smaller singular value of R is returned in SSMIN, which is used
-* as the measurement of the linear dependency of the vectors X and Y.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The length of the vectors X and Y.
-*
-* X (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX)
-* On entry, X contains the N-vector X.
-* On exit, X is overwritten.
-*
-* INCX (input) INTEGER
-* The increment between successive elements of X. INCX > 0.
-*
-* Y (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCY)
-* On entry, Y contains the N-vector Y.
-* On exit, Y is overwritten.
-*
-* INCY (input) INTEGER
-* The increment between successive elements of Y. INCY > 0.
-*
-* SSMIN (output) DOUBLE PRECISION
-* The smallest singular value of the N-by-2 matrix A = ( X Y ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlapmr.f b/SRC/zlapmr.f
index 28d7b6e5..3f68fd25 100644
--- a/SRC/zlapmr.f
+++ b/SRC/zlapmr.f
@@ -1,14 +1,105 @@
+*> \brief \b ZLAPMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAPMR( FORWRD, M, N, X, LDX, K )
+*
+* .. Scalar Arguments ..
+* LOGICAL FORWRD
+* INTEGER LDX, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER K( * )
+* COMPLEX*16 X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAPMR rearranges the rows of the M by N matrix X as specified
+*> by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
+*> If FORWRD = .TRUE., forward permutation:
+*>
+*> X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
+*>
+*> If FORWRD = .FALSE., backward permutation:
+*>
+*> X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FORWRD
+*> \verbatim
+*> FORWRD is LOGICAL
+*> = .TRUE., forward permutation
+*> = .FALSE., backward permutation
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,N)
+*> On entry, the M by N matrix X.
+*> On exit, X contains the permuted matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X, LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] K
+*> \verbatim
+*> K is INTEGER array, dimension (M)
+*> On entry, K contains the permutation vector. K is used as
+*> internal workspace, but reset to its original value on
+*> output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAPMR( FORWRD, M, N, X, LDX, K )
- IMPLICIT NONE
*
-* Originally ZLAPMT
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Adapted to ZLAPMR
-* July 2010
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL FORWRD
@@ -19,44 +110,6 @@
COMPLEX*16 X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAPMR rearranges the rows of the M by N matrix X as specified
-* by the permutation K(1),K(2),...,K(M) of the integers 1,...,M.
-* If FORWRD = .TRUE., forward permutation:
-*
-* X(K(I),*) is moved X(I,*) for I = 1,2,...,M.
-*
-* If FORWRD = .FALSE., backward permutation:
-*
-* X(I,*) is moved to X(K(I),*) for I = 1,2,...,M.
-*
-* Arguments
-* =========
-*
-* FORWRD (input) LOGICAL
-* = .TRUE., forward permutation
-* = .FALSE., backward permutation
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix X. N >= 0.
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,N)
-* On entry, the M by N matrix X.
-* On exit, X contains the permuted matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X, LDX >= MAX(1,M).
-*
-* K (input/output) INTEGER array, dimension (M)
-* On entry, K contains the permutation vector. K is used as
-* internal workspace, but reset to its original value on
-* output.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zlapmt.f b/SRC/zlapmt.f
index b3c07b49..5d93064f 100644
--- a/SRC/zlapmt.f
+++ b/SRC/zlapmt.f
@@ -1,9 +1,105 @@
+*> \brief \b ZLAPMT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAPMT( FORWRD, M, N, X, LDX, K )
+*
+* .. Scalar Arguments ..
+* LOGICAL FORWRD
+* INTEGER LDX, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER K( * )
+* COMPLEX*16 X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAPMT rearranges the columns of the M by N matrix X as specified
+*> by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
+*> If FORWRD = .TRUE., forward permutation:
+*>
+*> X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
+*>
+*> If FORWRD = .FALSE., backward permutation:
+*>
+*> X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FORWRD
+*> \verbatim
+*> FORWRD is LOGICAL
+*> = .TRUE., forward permutation
+*> = .FALSE., backward permutation
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,N)
+*> On entry, the M by N matrix X.
+*> On exit, X contains the permuted matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X, LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] K
+*> \verbatim
+*> K is INTEGER array, dimension (N)
+*> On entry, K contains the permutation vector. K is used as
+*> internal workspace, but reset to its original value on
+*> output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAPMT( FORWRD, M, N, X, LDX, K )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL FORWRD
@@ -14,44 +110,6 @@
COMPLEX*16 X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAPMT rearranges the columns of the M by N matrix X as specified
-* by the permutation K(1),K(2),...,K(N) of the integers 1,...,N.
-* If FORWRD = .TRUE., forward permutation:
-*
-* X(*,K(J)) is moved X(*,J) for J = 1,2,...,N.
-*
-* If FORWRD = .FALSE., backward permutation:
-*
-* X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N.
-*
-* Arguments
-* =========
-*
-* FORWRD (input) LOGICAL
-* = .TRUE., forward permutation
-* = .FALSE., backward permutation
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix X. N >= 0.
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,N)
-* On entry, the M by N matrix X.
-* On exit, X contains the permuted matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X, LDX >= MAX(1,M).
-*
-* K (input/output) INTEGER array, dimension (N)
-* On entry, K contains the permutation vector. K is used as
-* internal workspace, but reset to its original value on
-* output.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zlaqgb.f b/SRC/zlaqgb.f
index 7296feae..61004f53 100644
--- a/SRC/zlaqgb.f
+++ b/SRC/zlaqgb.f
@@ -1,10 +1,163 @@
+*> \brief \b ZLAQGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
+* AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED
+* INTEGER KL, KU, LDAB, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), R( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQGB equilibrates a general M by N band matrix A with KL
+*> subdiagonals and KU superdiagonals using the row and scaling factors
+*> in the vectors R and C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix, in the same storage format
+*> as A. See EQUED for the form of the equilibrated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDA >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> The row scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> Ratio of the smallest R(i) to the largest R(i).
+*> \endverbatim
+*>
+*> \param[in] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> Ratio of the smallest C(i) to the largest C(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if row or column scaling
+*> should be done based on the ratio of the row or column scaling
+*> factors. If ROWCND < THRESH, row scaling is done, and if
+*> COLCND < THRESH, column scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if row scaling
+*> should be done based on the absolute size of the largest matrix
+*> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
$ AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED
@@ -16,77 +169,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQGB equilibrates a general M by N band matrix A with KL
-* subdiagonals and KU superdiagonals using the row and scaling factors
-* in the vectors R and C.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the matrix A in band storage, in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl)
-*
-* On exit, the equilibrated matrix, in the same storage format
-* as A. See EQUED for the form of the equilibrated matrix.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDA >= KL+KU+1.
-*
-* R (input) DOUBLE PRECISION array, dimension (M)
-* The row scale factors for A.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A.
-*
-* ROWCND (input) DOUBLE PRECISION
-* Ratio of the smallest R(i) to the largest R(i).
-*
-* COLCND (input) DOUBLE PRECISION
-* Ratio of the smallest C(i) to the largest C(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if row or column scaling
-* should be done based on the ratio of the row or column scaling
-* factors. If ROWCND < THRESH, row scaling is done, and if
-* COLCND < THRESH, column scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if row scaling
-* should be done based on the absolute size of the largest matrix
-* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqge.f b/SRC/zlaqge.f
index 156e57be..156f5c4d 100644
--- a/SRC/zlaqge.f
+++ b/SRC/zlaqge.f
@@ -1,10 +1,145 @@
+*> \brief \b ZLAQGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+* EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED
+* INTEGER LDA, M, N
+* DOUBLE PRECISION AMAX, COLCND, ROWCND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), R( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQGE equilibrates a general M by N matrix A using the row and
+*> column scaling factors in the vectors R and C.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M by N matrix A.
+*> On exit, the equilibrated matrix. See EQUED for the form of
+*> the equilibrated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(M,1).
+*> \endverbatim
+*>
+*> \param[in] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (M)
+*> The row scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (N)
+*> The column scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] ROWCND
+*> \verbatim
+*> ROWCND is DOUBLE PRECISION
+*> Ratio of the smallest R(i) to the largest R(i).
+*> \endverbatim
+*>
+*> \param[in] COLCND
+*> \verbatim
+*> COLCND is DOUBLE PRECISION
+*> Ratio of the smallest C(i) to the largest C(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration
+*> = 'R': Row equilibration, i.e., A has been premultiplied by
+*> diag(R).
+*> = 'C': Column equilibration, i.e., A has been postmultiplied
+*> by diag(C).
+*> = 'B': Both row and column equilibration, i.e., A has been
+*> replaced by diag(R) * A * diag(C).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if row or column scaling
+*> should be done based on the ratio of the row or column scaling
+*> factors. If ROWCND < THRESH, row scaling is done, and if
+*> COLCND < THRESH, column scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if row scaling
+*> should be done based on the absolute size of the largest matrix
+*> element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
$ EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED
@@ -16,66 +151,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQGE equilibrates a general M by N matrix A using the row and
-* column scaling factors in the vectors R and C.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M by N matrix A.
-* On exit, the equilibrated matrix. See EQUED for the form of
-* the equilibrated matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(M,1).
-*
-* R (input) DOUBLE PRECISION array, dimension (M)
-* The row scale factors for A.
-*
-* C (input) DOUBLE PRECISION array, dimension (N)
-* The column scale factors for A.
-*
-* ROWCND (input) DOUBLE PRECISION
-* Ratio of the smallest R(i) to the largest R(i).
-*
-* COLCND (input) DOUBLE PRECISION
-* Ratio of the smallest C(i) to the largest C(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration
-* = 'R': Row equilibration, i.e., A has been premultiplied by
-* diag(R).
-* = 'C': Column equilibration, i.e., A has been postmultiplied
-* by diag(C).
-* = 'B': Both row and column equilibration, i.e., A has been
-* replaced by diag(R) * A * diag(C).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if row or column scaling
-* should be done based on the ratio of the row or column scaling
-* factors. If ROWCND < THRESH, row scaling is done, and if
-* COLCND < THRESH, column scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if row scaling
-* should be done based on the absolute size of the largest matrix
-* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqhb.f b/SRC/zlaqhb.f
index 9cfa0dc3..41e5e37f 100644
--- a/SRC/zlaqhb.f
+++ b/SRC/zlaqhb.f
@@ -1,9 +1,144 @@
+*> \brief \b ZLAQHB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQHB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER KD, LDAB, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQHB equilibrates a Hermitian band matrix A
+*> using the scaling factors in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H *U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQHB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,69 +150,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQHB equilibrates a Hermitian band matrix A
-* using the scaling factors in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H *U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqhe.f b/SRC/zlaqhe.f
index 3ecdce2d..6cd0c692 100644
--- a/SRC/zlaqhe.f
+++ b/SRC/zlaqhe.f
@@ -1,9 +1,137 @@
+*> \brief \b ZLAQHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQHE( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQHE equilibrates a Hermitian matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED = 'Y', the equilibrated matrix:
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16HEauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQHE( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,65 +143,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQHE equilibrates a Hermitian matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if EQUED = 'Y', the equilibrated matrix:
-* diag(S) * A * diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqhp.f b/SRC/zlaqhp.f
index 09b208b3..93e272ca 100644
--- a/SRC/zlaqhp.f
+++ b/SRC/zlaqhp.f
@@ -1,9 +1,129 @@
+*> \brief \b ZLAQHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQHP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQHP equilibrates a Hermitian matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix: diag(S) * A * diag(S), in
+*> the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQHP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,60 +135,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQHP equilibrates a Hermitian matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the equilibrated matrix: diag(S) * A * diag(S), in
-* the same storage format as A.
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqp2.f b/SRC/zlaqp2.f
index 1d5cd756..1709b1a9 100644
--- a/SRC/zlaqp2.f
+++ b/SRC/zlaqp2.f
@@ -1,82 +1,158 @@
- SUBROUTINE ZLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
- $ WORK )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER LDA, M, N, OFFSET
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION VN1( * ), VN2( * )
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZLAQP2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+* WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, M, N, OFFSET
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION VN1( * ), VN2( * )
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLAQP2 computes a QR factorization with column pivoting of
-* the block A(OFFSET+1:M,1:N).
-* The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQP2 computes a QR factorization with column pivoting of
+*> the block A(OFFSET+1:M,1:N).
+*> The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* OFFSET (input) INTEGER
-* The number of rows of the matrix A that must be pivoted
-* but no factorized. OFFSET >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
-* the triangular factor obtained; the elements in block
-* A(OFFSET+1:M,1:N) below the diagonal, together with the
-* array TAU, represent the orthogonal matrix Q as a product of
-* elementary reflectors. Block A(1:OFFSET,1:N) has been
-* accordingly pivoted, but no factorized.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-* to the front of A*P (a leading column); if JPVT(i) = 0,
-* the i-th column of A is a free column.
-* On exit, if JPVT(i) = k, then the i-th column of A*P
-* was the k-th column of A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> The number of rows of the matrix A that must be pivoted
+*> but no factorized. OFFSET >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
+*> the triangular factor obtained; the elements in block
+*> A(OFFSET+1:M,1:N) below the diagonal, together with the
+*> array TAU, represent the orthogonal matrix Q as a product of
+*> elementary reflectors. Block A(1:OFFSET,1:N) has been
+*> accordingly pivoted, but no factorized.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*> to the front of A*P (a leading column); if JPVT(i) = 0,
+*> the i-th column of A is a free column.
+*> On exit, if JPVT(i) = k, then the i-th column of A*P
+*> was the k-th column of A.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*> VN1 is DOUBLE PRECISION array, dimension (N)
+*> The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*> VN2 is DOUBLE PRECISION array, dimension (N)
+*> The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* VN1 (input/output) DOUBLE PRECISION array, dimension (N)
-* The vector with the partial column norms.
+*> \date November 2011
*
-* VN2 (input/output) DOUBLE PRECISION array, dimension (N)
-* The vector with the exact column norms.
+*> \ingroup complex16OTHERauxiliary
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+ $ WORK )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* .. Scalar Arguments ..
+ INTEGER LDA, M, N, OFFSET
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION VN1( * ), VN2( * )
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqps.f b/SRC/zlaqps.f
index 803e071c..6ffd8413 100644
--- a/SRC/zlaqps.f
+++ b/SRC/zlaqps.f
@@ -1,98 +1,186 @@
- SUBROUTINE ZLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
- $ VN2, AUXV, F, LDF )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER KB, LDA, LDF, M, N, NB, OFFSET
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION VN1( * ), VN2( * )
- COMPLEX*16 A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
-* ..
-*
+*> \brief \b ZLAQPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+* VN2, AUXV, F, LDF )
+*
+* .. Scalar Arguments ..
+* INTEGER KB, LDA, LDF, M, N, NB, OFFSET
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION VN1( * ), VN2( * )
+* COMPLEX*16 A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* ZLAQPS computes a step of QR factorization with column pivoting
-* of a complex M-by-N matrix A by using Blas-3. It tries to factorize
-* NB columns from A starting from the row OFFSET+1, and updates all
-* of the matrix with Blas-3 xGEMM.
-*
-* In some cases, due to catastrophic cancellations, it cannot
-* factorize NB columns. Hence, the actual number of factorized
-* columns is returned in KB.
-*
-* Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQPS computes a step of QR factorization with column pivoting
+*> of a complex M-by-N matrix A by using Blas-3. It tries to factorize
+*> NB columns from A starting from the row OFFSET+1, and updates all
+*> of the matrix with Blas-3 xGEMM.
+*>
+*> In some cases, due to catastrophic cancellations, it cannot
+*> factorize NB columns. Hence, the actual number of factorized
+*> columns is returned in KB.
+*>
+*> Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0
-*
-* OFFSET (input) INTEGER
-* The number of rows of A that have been factorized in
-* previous steps.
-*
-* NB (input) INTEGER
-* The number of columns to factorize.
-*
-* KB (output) INTEGER
-* The number of columns actually factorized.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, block A(OFFSET+1:M,1:KB) is the triangular
-* factor obtained and block A(1:OFFSET,1:N) has been
-* accordingly pivoted, but no factorized.
-* The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
-* been updated.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* JPVT (input/output) INTEGER array, dimension (N)
-* JPVT(I) = K <==> Column K of the full matrix A has been
-* permuted into position I in AP.
-*
-* TAU (output) COMPLEX*16 array, dimension (KB)
-* The scalar factors of the elementary reflectors.
-*
-* VN1 (input/output) DOUBLE PRECISION array, dimension (N)
-* The vector with the partial column norms.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0
+*> \endverbatim
+*>
+*> \param[in] OFFSET
+*> \verbatim
+*> OFFSET is INTEGER
+*> The number of rows of A that have been factorized in
+*> previous steps.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of columns to factorize.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns actually factorized.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, block A(OFFSET+1:M,1:KB) is the triangular
+*> factor obtained and block A(1:OFFSET,1:N) has been
+*> accordingly pivoted, but no factorized.
+*> The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
+*> been updated.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> JPVT(I) = K <==> Column K of the full matrix A has been
+*> permuted into position I in AP.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (KB)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*> VN1 is DOUBLE PRECISION array, dimension (N)
+*> The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*> VN2 is DOUBLE PRECISION array, dimension (N)
+*> The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[in,out] AUXV
+*> \verbatim
+*> AUXV is COMPLEX*16 array, dimension (NB)
+*> Auxiliar vector.
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is COMPLEX*16 array, dimension (LDF,NB)
+*> Matrix F**H = L * Y**H * A.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the array F. LDF >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* VN2 (input/output) DOUBLE PRECISION array, dimension (N)
-* The vector with the exact column norms.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AUXV (input/output) COMPLEX*16 array, dimension (NB)
-* Auxiliar vector.
+*> \date November 2011
*
-* F (input/output) COMPLEX*16 array, dimension (LDF,NB)
-* Matrix F**H = L * Y**H * A.
+*> \ingroup complex16OTHERauxiliary
*
-* LDF (input) INTEGER
-* The leading dimension of the array F. LDF >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*> X. Sun, Computer Science Dept., Duke University, USA
+*>
+*> Partial column norm updating strategy modified by
+*> Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*> University of Zagreb, Croatia.
+*> -- April 2011 --
+*> For more details see LAPACK Working Note 176.
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+ $ VN2, AUXV, F, LDF )
*
-* Based on contributions by
-* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-* X. Sun, Computer Science Dept., Duke University, USA
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER KB, LDA, LDF, M, N, NB, OFFSET
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION VN1( * ), VN2( * )
+ COMPLEX*16 A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
+* ..
*
-* Partial column norm updating strategy modified by
-* Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-* University of Zagreb, Croatia.
-* -- April 2011 --
-* For more details see LAPACK Working Note 176.
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqr0.f b/SRC/zlaqr0.f
index b55d1303..6473569d 100644
--- a/SRC/zlaqr0.f
+++ b/SRC/zlaqr0.f
@@ -1,155 +1,249 @@
- SUBROUTINE ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
- $ IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*> \brief \b ZLAQR0
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+* IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQR0 computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**H, where T is an upper triangular matrix (the
+*> Schur form), and Z is the unitary matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input unitary
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
- LOGICAL WANTT, WANTZ
-* ..
-* .. Array Arguments ..
- COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*> H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*> previous call to ZGEBAL, and then passed to ZGEHRD when the
+*> matrix output by ZGEBAL is reduced to Hessenberg form.
+*> Otherwise, ILO and IHI should be set to 1 and N,
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and WANTT is .TRUE., then H
+*> contains the upper triangular matrix T from the Schur
+*> decomposition (the Schur form). If INFO = 0 and WANT is
+*> .FALSE., then the contents of H are unspecified on exit.
+*> (The output value of H when INFO.GT.0 is given under the
+*> description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*> j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
+*> in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
+*> stored in the same order as on the diagonal of the Schur
+*> form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,IHI)
+*> If WANTZ is .FALSE., then Z is not referenced.
+*> If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*> replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*> orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*> (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if WANTZ is .TRUE.
+*> then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension LWORK
+*> On exit, if LWORK = -1, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient, but LWORK typically as large as 6*N may
+*> be required for optimal performance. A workspace query
+*> to determine the optimal workspace size is recommended.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then ZLAQR0 does a workspace query.
+*> In this case, ZLAQR0 checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, ZLAQR0 failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is a unitary matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*> = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the unitary matrix in (*) (regard-
+*> less of the value of WANTT.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* ZLAQR0 computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**H, where T is an upper triangular matrix (the
-* Schur form), and Z is the unitary matrix of Schur vectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Optionally Z may be postmultiplied into an input unitary
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup complex16OTHERauxiliary
*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-* previous call to ZGEBAL, and then passed to ZGEHRD when the
-* matrix output by ZGEBAL is reduced to Hessenberg form.
-* Otherwise, ILO and IHI should be set to 1 and N,
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) COMPLEX*16 array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and WANTT is .TRUE., then H
-* contains the upper triangular matrix T from the Schur
-* decomposition (the Schur form). If INFO = 0 and WANT is
-* .FALSE., then the contents of H are unspecified on exit.
-* (The output value of H when INFO.GT.0 is given under the
-* description of INFO below.)
-*
-* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
-* in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
-* stored in the same order as on the diagonal of the Schur
-* form returned in H, with W(i) = H(i,i).
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,IHI)
-* If WANTZ is .FALSE., then Z is not referenced.
-* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-* orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-* (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if WANTZ is .TRUE.
-* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension LWORK
-* On exit, if LWORK = -1, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient, but LWORK typically as large as 6*N may
-* be required for optimal performance. A workspace query
-* to determine the optimal workspace size is recommended.
-*
-* If LWORK = -1, then ZLAQR0 does a workspace query.
-* In this case, ZLAQR0 checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, ZLAQR0 failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and WANT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is a unitary matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*
-* (final value of Z(ILO:IHI,ILOZ:IHIZ)
-* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
-*
-* where U is the unitary matrix in (*) (regard-
-* less of the value of WANTT.)
-*
-* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-* accessed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> References:
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*> Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*> 929--947, 2002.
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*> of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+ $ IHIZ, Z, LDZ, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* References:
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-* Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-* 929--947, 2002.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-* of Matrix Analysis, volume 23, pages 948--973, 2002.
+* .. Scalar Arguments ..
+ INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+ LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
*
* ================================================================
*
diff --git a/SRC/zlaqr1.f b/SRC/zlaqr1.f
index a12c3d82..863f7645 100644
--- a/SRC/zlaqr1.f
+++ b/SRC/zlaqr1.f
@@ -1,56 +1,116 @@
- SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- COMPLEX*16 S1, S2
- INTEGER LDH, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 H( LDH, * ), V( * )
-* ..
-*
+*> \brief \b ZLAQR1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 S1, S2
+* INTEGER LDH, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 H( LDH, * ), V( * )
+* ..
+*
* Purpose
* =======
*
-* Given a 2-by-2 or 3-by-3 matrix H, ZLAQR1 sets v to a
-* scalar multiple of the first column of the product
-*
-* (*) K = (H - s1*I)*(H - s2*I)
-*
-* scaling to avoid overflows and most underflows.
-*
-* This is useful for starting double implicit shift bulges
-* in the QR algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Given a 2-by-2 or 3-by-3 matrix H, ZLAQR1 sets v to a
+*> scalar multiple of the first column of the product
+*>
+*> (*) K = (H - s1*I)*(H - s2*I)
+*>
+*> scaling to avoid overflows and most underflows.
+*>
+*> This is useful for starting double implicit shift bulges
+*> in the QR algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) integer
-* Order of the matrix H. N must be either 2 or 3.
+*> \param[in] N
+*> \verbatim
+*> N is integer
+*> Order of the matrix H. N must be either 2 or 3.
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is COMPLEX*16 array of dimension (LDH,N)
+*> The 2-by-2 or 3-by-3 matrix H in (*).
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> The leading dimension of H as declared in
+*> the calling procedure. LDH.GE.N
+*> \endverbatim
+*>
+*> \param[in] S1
+*> \verbatim
+*> S1 is COMPLEX*16
+*> S2 S1 and S2 are the shifts defining K in (*) above.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array of dimension N
+*> A scalar multiple of the first column of the
+*> matrix K in (*).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* H (input) COMPLEX*16 array of dimension (LDH,N)
-* The 2-by-2 or 3-by-3 matrix H in (*).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDH (input) integer
-* The leading dimension of H as declared in
-* the calling procedure. LDH.GE.N
+*> \date November 2011
*
-* S1 (input) COMPLEX*16
-* S2 S1 and S2 are the shifts defining K in (*) above.
+*> \ingroup complex16OTHERauxiliary
*
-* V (output) COMPLEX*16 array of dimension N
-* A scalar multiple of the first column of the
-* matrix K in (*).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX*16 S1, S2
+ INTEGER LDH, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 H( LDH, * ), V( * )
+* ..
*
* ================================================================
*
diff --git a/SRC/zlaqr2.f b/SRC/zlaqr2.f
index a4ac8186..5e0b103f 100644
--- a/SRC/zlaqr2.f
+++ b/SRC/zlaqr2.f
@@ -1,10 +1,277 @@
+*> \brief \b ZLAQR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+* IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
+* NV, WV, LDWV, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+* $ LDZ, LWORK, N, ND, NH, NS, NV, NW
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( * ), WV( LDWV, * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQR2 is identical to ZLAQR3 except that it avoids
+*> recursion by calling ZLAHQR instead of ZLAQR4.
+*>
+*> Aggressive early deflation:
+*>
+*> ZLAQR2 accepts as input an upper Hessenberg matrix
+*> H and performs an unitary similarity transformation
+*> designed to detect and deflate fully converged eigenvalues from
+*> a trailing principal submatrix. On output H has been over-
+*> written by a new Hessenberg matrix that is a perturbation of
+*> an unitary similarity transformation of H. It is to be
+*> hoped that the final version of H has many zero subdiagonal
+*> entries.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> If .TRUE., then the Hessenberg matrix H is fully updated
+*> so that the triangular Schur factor may be
+*> computed (in cooperation with the calling subroutine).
+*> If .FALSE., then only enough of H is updated to preserve
+*> the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> If .TRUE., then the unitary matrix Z is updated so
+*> so that the unitary Schur factor may be computed
+*> (in cooperation with the calling subroutine).
+*> If .FALSE., then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H and (if WANTZ is .TRUE.) the
+*> order of the unitary matrix Z.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is INTEGER
+*> It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*> KBOT and KTOP together determine an isolated block
+*> along the diagonal of the Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is INTEGER
+*> It is assumed without a check that either
+*> KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
+*> determine an isolated block along the diagonal of the
+*> Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> On input the initial N-by-N section of H stores the
+*> Hessenberg matrix undergoing aggressive early deflation.
+*> On output H has been transformed by a unitary
+*> similarity transformation, perturbed, and the returned
+*> to Hessenberg form that (it is to be hoped) has some
+*> zero subdiagonal entries.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> Leading dimension of H just as declared in the calling
+*> subroutine. N .LE. LDH
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,N)
+*> IF WANTZ is .TRUE., then on output, the unitary
+*> similarity transformation mentioned above has been
+*> accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer
+*> The leading dimension of Z just as declared in the
+*> calling subroutine. 1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*> NS is integer
+*> The number of unconverged (ie approximate) eigenvalues
+*> returned in SR and SI that may be used as shifts by the
+*> calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is integer
+*> The number of converged eigenvalues uncovered by this
+*> subroutine.
+*> \endverbatim
+*>
+*> \param[out] SH
+*> \verbatim
+*> SH is COMPLEX*16 array, dimension KBOT
+*> On output, approximate eigenvalues that may
+*> be used for shifts are stored in SH(KBOT-ND-NS+1)
+*> through SR(KBOT-ND). Converged eigenvalues are
+*> stored in SH(KBOT-ND+1) through SH(KBOT).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,NW)
+*> An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> The leading dimension of V just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> The number of columns of T. NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is integer
+*> The leading dimension of T just as declared in the
+*> calling subroutine. NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer
+*> The number of rows of work array WV available for
+*> workspace. NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is COMPLEX*16 array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer
+*> The leading dimension of W just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension LWORK.
+*> On exit, WORK(1) is set to an estimate of the optimal value
+*> of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer
+*> The dimension of the work array WORK. LWORK = 2*NW
+*> suffices, but greater efficiency may result from larger
+*> values of LWORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; ZLAQR2
+*> only estimates the optimal workspace size for the given
+*> values of N, NW, KTOP and KBOT. The estimate is returned
+*> in WORK(1). No error message related to LWORK is issued
+*> by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
$ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
$ NV, WV, LDWV, WORK, LWORK )
*
-* -- LAPACK auxiliary routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- April 2009 --
+* -- LAPACK auxiliary routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -16,148 +283,6 @@
$ WORK( * ), WV( LDWV, * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQR2 is identical to ZLAQR3 except that it avoids
-* recursion by calling ZLAHQR instead of ZLAQR4.
-*
-* Aggressive early deflation:
-*
-* ZLAQR2 accepts as input an upper Hessenberg matrix
-* H and performs an unitary similarity transformation
-* designed to detect and deflate fully converged eigenvalues from
-* a trailing principal submatrix. On output H has been over-
-* written by a new Hessenberg matrix that is a perturbation of
-* an unitary similarity transformation of H. It is to be
-* hoped that the final version of H has many zero subdiagonal
-* entries.
-*
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* If .TRUE., then the Hessenberg matrix H is fully updated
-* so that the triangular Schur factor may be
-* computed (in cooperation with the calling subroutine).
-* If .FALSE., then only enough of H is updated to preserve
-* the eigenvalues.
-*
-* WANTZ (input) LOGICAL
-* If .TRUE., then the unitary matrix Z is updated so
-* so that the unitary Schur factor may be computed
-* (in cooperation with the calling subroutine).
-* If .FALSE., then Z is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix H and (if WANTZ is .TRUE.) the
-* order of the unitary matrix Z.
-*
-* KTOP (input) INTEGER
-* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-* KBOT and KTOP together determine an isolated block
-* along the diagonal of the Hessenberg matrix.
-*
-* KBOT (input) INTEGER
-* It is assumed without a check that either
-* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
-* determine an isolated block along the diagonal of the
-* Hessenberg matrix.
-*
-* NW (input) INTEGER
-* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
-*
-* H (input/output) COMPLEX*16 array, dimension (LDH,N)
-* On input the initial N-by-N section of H stores the
-* Hessenberg matrix undergoing aggressive early deflation.
-* On output H has been transformed by a unitary
-* similarity transformation, perturbed, and the returned
-* to Hessenberg form that (it is to be hoped) has some
-* zero subdiagonal entries.
-*
-* LDH (input) integer
-* Leading dimension of H just as declared in the calling
-* subroutine. N .LE. LDH
-*
-* ILOZ (input) INTEGER
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* IF WANTZ is .TRUE., then on output, the unitary
-* similarity transformation mentioned above has been
-* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ is .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer
-* The leading dimension of Z just as declared in the
-* calling subroutine. 1 .LE. LDZ.
-*
-* NS (output) integer
-* The number of unconverged (ie approximate) eigenvalues
-* returned in SR and SI that may be used as shifts by the
-* calling subroutine.
-*
-* ND (output) integer
-* The number of converged eigenvalues uncovered by this
-* subroutine.
-*
-* SH (output) COMPLEX*16 array, dimension KBOT
-* On output, approximate eigenvalues that may
-* be used for shifts are stored in SH(KBOT-ND-NS+1)
-* through SR(KBOT-ND). Converged eigenvalues are
-* stored in SH(KBOT-ND+1) through SH(KBOT).
-*
-* V (workspace) COMPLEX*16 array, dimension (LDV,NW)
-* An NW-by-NW work array.
-*
-* LDV (input) integer scalar
-* The leading dimension of V just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* NH (input) integer scalar
-* The number of columns of T. NH.GE.NW.
-*
-* T (workspace) COMPLEX*16 array, dimension (LDT,NW)
-*
-* LDT (input) integer
-* The leading dimension of T just as declared in the
-* calling subroutine. NW .LE. LDT
-*
-* NV (input) integer
-* The number of rows of work array WV available for
-* workspace. NV.GE.NW.
-*
-* WV (workspace) COMPLEX*16 array, dimension (LDWV,NW)
-*
-* LDWV (input) integer
-* The leading dimension of W just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* WORK (workspace) COMPLEX*16 array, dimension LWORK.
-* On exit, WORK(1) is set to an estimate of the optimal value
-* of LWORK for the given values of N, NW, KTOP and KBOT.
-*
-* LWORK (input) integer
-* The dimension of the work array WORK. LWORK = 2*NW
-* suffices, but greater efficiency may result from larger
-* values of LWORK.
-*
-* If LWORK = -1, then a workspace query is assumed; ZLAQR2
-* only estimates the optimal workspace size for the given
-* values of N, NW, KTOP and KBOT. The estimate is returned
-* in WORK(1). No error message related to LWORK is issued
-* by XERBLA. Neither H nor Z are accessed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
* ================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqr3.f b/SRC/zlaqr3.f
index 79a1fff4..9db9d3a8 100644
--- a/SRC/zlaqr3.f
+++ b/SRC/zlaqr3.f
@@ -1,10 +1,275 @@
+*> \brief \b ZLAQR3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+* IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
+* NV, WV, LDWV, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+* $ LDZ, LWORK, N, ND, NH, NS, NV, NW
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( * ), WV( LDWV, * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Aggressive early deflation:
+*>
+*> ZLAQR3 accepts as input an upper Hessenberg matrix
+*> H and performs an unitary similarity transformation
+*> designed to detect and deflate fully converged eigenvalues from
+*> a trailing principal submatrix. On output H has been over-
+*> written by a new Hessenberg matrix that is a perturbation of
+*> an unitary similarity transformation of H. It is to be
+*> hoped that the final version of H has many zero subdiagonal
+*> entries.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> If .TRUE., then the Hessenberg matrix H is fully updated
+*> so that the triangular Schur factor may be
+*> computed (in cooperation with the calling subroutine).
+*> If .FALSE., then only enough of H is updated to preserve
+*> the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> If .TRUE., then the unitary matrix Z is updated so
+*> so that the unitary Schur factor may be computed
+*> (in cooperation with the calling subroutine).
+*> If .FALSE., then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H and (if WANTZ is .TRUE.) the
+*> order of the unitary matrix Z.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is INTEGER
+*> It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*> KBOT and KTOP together determine an isolated block
+*> along the diagonal of the Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is INTEGER
+*> It is assumed without a check that either
+*> KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
+*> determine an isolated block along the diagonal of the
+*> Hessenberg matrix.
+*> \endverbatim
+*>
+*> \param[in] NW
+*> \verbatim
+*> NW is INTEGER
+*> Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> On input the initial N-by-N section of H stores the
+*> Hessenberg matrix undergoing aggressive early deflation.
+*> On output H has been transformed by a unitary
+*> similarity transformation, perturbed, and the returned
+*> to Hessenberg form that (it is to be hoped) has some
+*> zero subdiagonal entries.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer
+*> Leading dimension of H just as declared in the calling
+*> subroutine. N .LE. LDH
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,N)
+*> IF WANTZ is .TRUE., then on output, the unitary
+*> similarity transformation mentioned above has been
+*> accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer
+*> The leading dimension of Z just as declared in the
+*> calling subroutine. 1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*> NS is integer
+*> The number of unconverged (ie approximate) eigenvalues
+*> returned in SR and SI that may be used as shifts by the
+*> calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*> ND is integer
+*> The number of converged eigenvalues uncovered by this
+*> subroutine.
+*> \endverbatim
+*>
+*> \param[out] SH
+*> \verbatim
+*> SH is COMPLEX*16 array, dimension KBOT
+*> On output, approximate eigenvalues that may
+*> be used for shifts are stored in SH(KBOT-ND-NS+1)
+*> through SR(KBOT-ND). Converged eigenvalues are
+*> stored in SH(KBOT-ND+1) through SH(KBOT).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,NW)
+*> An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> The leading dimension of V just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> The number of columns of T. NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is integer
+*> The leading dimension of T just as declared in the
+*> calling subroutine. NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer
+*> The number of rows of work array WV available for
+*> workspace. NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is COMPLEX*16 array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer
+*> The leading dimension of W just as declared in the
+*> calling subroutine. NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension LWORK.
+*> On exit, WORK(1) is set to an estimate of the optimal value
+*> of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is integer
+*> The dimension of the work array WORK. LWORK = 2*NW
+*> suffices, but greater efficiency may result from larger
+*> values of LWORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; ZLAQR3
+*> only estimates the optimal workspace size for the given
+*> values of N, NW, KTOP and KBOT. The estimate is returned
+*> in WORK(1). No error message related to LWORK is issued
+*> by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
$ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
$ NV, WV, LDWV, WORK, LWORK )
*
-* -- LAPACK auxiliary routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* -- April 2009 --
+* -- LAPACK auxiliary routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -16,146 +281,6 @@
$ WORK( * ), WV( LDWV, * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* Aggressive early deflation:
-*
-* ZLAQR3 accepts as input an upper Hessenberg matrix
-* H and performs an unitary similarity transformation
-* designed to detect and deflate fully converged eigenvalues from
-* a trailing principal submatrix. On output H has been over-
-* written by a new Hessenberg matrix that is a perturbation of
-* an unitary similarity transformation of H. It is to be
-* hoped that the final version of H has many zero subdiagonal
-* entries.
-*
-*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* If .TRUE., then the Hessenberg matrix H is fully updated
-* so that the triangular Schur factor may be
-* computed (in cooperation with the calling subroutine).
-* If .FALSE., then only enough of H is updated to preserve
-* the eigenvalues.
-*
-* WANTZ (input) LOGICAL
-* If .TRUE., then the unitary matrix Z is updated so
-* so that the unitary Schur factor may be computed
-* (in cooperation with the calling subroutine).
-* If .FALSE., then Z is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix H and (if WANTZ is .TRUE.) the
-* order of the unitary matrix Z.
-*
-* KTOP (input) INTEGER
-* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-* KBOT and KTOP together determine an isolated block
-* along the diagonal of the Hessenberg matrix.
-*
-* KBOT (input) INTEGER
-* It is assumed without a check that either
-* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together
-* determine an isolated block along the diagonal of the
-* Hessenberg matrix.
-*
-* NW (input) INTEGER
-* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1).
-*
-* H (input/output) COMPLEX*16 array, dimension (LDH,N)
-* On input the initial N-by-N section of H stores the
-* Hessenberg matrix undergoing aggressive early deflation.
-* On output H has been transformed by a unitary
-* similarity transformation, perturbed, and the returned
-* to Hessenberg form that (it is to be hoped) has some
-* zero subdiagonal entries.
-*
-* LDH (input) integer
-* Leading dimension of H just as declared in the calling
-* subroutine. N .LE. LDH
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* IF WANTZ is .TRUE., then on output, the unitary
-* similarity transformation mentioned above has been
-* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ is .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer
-* The leading dimension of Z just as declared in the
-* calling subroutine. 1 .LE. LDZ.
-*
-* NS (output) integer
-* The number of unconverged (ie approximate) eigenvalues
-* returned in SR and SI that may be used as shifts by the
-* calling subroutine.
-*
-* ND (output) integer
-* The number of converged eigenvalues uncovered by this
-* subroutine.
-*
-* SH (output) COMPLEX*16 array, dimension KBOT
-* On output, approximate eigenvalues that may
-* be used for shifts are stored in SH(KBOT-ND-NS+1)
-* through SR(KBOT-ND). Converged eigenvalues are
-* stored in SH(KBOT-ND+1) through SH(KBOT).
-*
-* V (workspace) COMPLEX*16 array, dimension (LDV,NW)
-* An NW-by-NW work array.
-*
-* LDV (input) integer scalar
-* The leading dimension of V just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* NH (input) integer scalar
-* The number of columns of T. NH.GE.NW.
-*
-* T (workspace) COMPLEX*16 array, dimension (LDT,NW)
-*
-* LDT (input) integer
-* The leading dimension of T just as declared in the
-* calling subroutine. NW .LE. LDT
-*
-* NV (input) integer
-* The number of rows of work array WV available for
-* workspace. NV.GE.NW.
-*
-* WV (workspace) COMPLEX*16 array, dimension (LDWV,NW)
-*
-* LDWV (input) integer
-* The leading dimension of W just as declared in the
-* calling subroutine. NW .LE. LDV
-*
-* WORK (workspace) COMPLEX*16 array, dimension LWORK.
-* On exit, WORK(1) is set to an estimate of the optimal value
-* of LWORK for the given values of N, NW, KTOP and KBOT.
-*
-* LWORK (input) integer
-* The dimension of the work array WORK. LWORK = 2*NW
-* suffices, but greater efficiency may result from larger
-* values of LWORK.
-*
-* If LWORK = -1, then a workspace query is assumed; ZLAQR3
-* only estimates the optimal workspace size for the given
-* values of N, NW, KTOP and KBOT. The estimate is returned
-* in WORK(1). No error message related to LWORK is issued
-* by XERBLA. Neither H nor Z are accessed.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
* ================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqr4.f b/SRC/zlaqr4.f
index 962817cf..ff4c2c52 100644
--- a/SRC/zlaqr4.f
+++ b/SRC/zlaqr4.f
@@ -1,163 +1,257 @@
- SUBROUTINE ZLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
- $ IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*> \brief \b ZLAQR4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+* IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQR4 implements one level of recursion for ZLAQR0.
+*> It is a complete implementation of the small bulge multi-shift
+*> QR algorithm. It may be called by ZLAQR0 and, for large enough
+*> deflation window size, it may be called by ZLAQR3. This
+*> subroutine is identical to ZLAQR0 except that it calls ZLAQR2
+*> instead of ZLAQR3.
+*>
+*> ZLAQR4 computes the eigenvalues of a Hessenberg matrix H
+*> and, optionally, the matrices T and Z from the Schur decomposition
+*> H = Z T Z**H, where T is an upper triangular matrix (the
+*> Schur form), and Z is the unitary matrix of Schur vectors.
+*>
+*> Optionally Z may be postmultiplied into an input unitary
+*> matrix Q so that this routine can give the Schur factorization
+*> of a matrix A which has been reduced to the Hessenberg form H
+*> by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*>
+*>\endverbatim
*
-* .. Scalar Arguments ..
- INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
- LOGICAL WANTT, WANTZ
-* ..
-* .. Array Arguments ..
- COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
-* ..
+* Arguments
+* =========
*
-* Purpose
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is LOGICAL
+*> = .TRUE. : the full Schur form T is required;
+*> = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> = .TRUE. : the matrix of Schur vectors Z is required;
+*> = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix H. N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> It is assumed that H is already upper triangular in rows
+*> and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*> H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*> previous call to ZGEBAL, and then passed to ZGEHRD when the
+*> matrix output by ZGEBAL is reduced to Hessenberg form.
+*> Otherwise, ILO and IHI should be set to 1 and N,
+*> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*> If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> On entry, the upper Hessenberg matrix H.
+*> On exit, if INFO = 0 and WANTT is .TRUE., then H
+*> contains the upper triangular matrix T from the Schur
+*> decomposition (the Schur form). If INFO = 0 and WANT is
+*> .FALSE., then the contents of H are unspecified on exit.
+*> (The output value of H when INFO.GT.0 is given under the
+*> description of INFO below.)
+*> \endverbatim
+*> \verbatim
+*> This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*> j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
+*> in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
+*> stored in the same order as on the diagonal of the Schur
+*> form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,IHI)
+*> If WANTZ is .FALSE., then Z is not referenced.
+*> If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*> replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*> orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*> (The output value of Z when INFO.GT.0 is given under
+*> the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. if WANTZ is .TRUE.
+*> then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension LWORK
+*> On exit, if LWORK = -1, WORK(1) returns an estimate of
+*> the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK .GE. max(1,N)
+*> is sufficient, but LWORK typically as large as 6*N may
+*> be required for optimal performance. A workspace query
+*> to determine the optimal workspace size is recommended.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then ZLAQR4 does a workspace query.
+*> In this case, ZLAQR4 checks the input parameters and
+*> estimates the optimal workspace size for the given
+*> values of N, ILO and IHI. The estimate is returned
+*> in WORK(1). No error message related to LWORK is
+*> issued by XERBLA. Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> .GT. 0: if INFO = i, ZLAQR4 failed to compute all of
+*> the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
+*> and WI contain those eigenvalues which have been
+*> successfully computed. (Failures are rare.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*> the remaining unconverged eigenvalues are the eigen-
+*> values of the upper Hessenberg matrix rows and
+*> columns ILO through INFO of the final, output
+*> value of H.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (*) (initial value of H)*U = U*(final value of H)
+*> \endverbatim
+*> \verbatim
+*> where U is a unitary matrix. The final
+*> value of H is upper Hessenberg and triangular in
+*> rows and columns INFO+1 through IHI.
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*> \endverbatim
+*> \verbatim
+*> (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*> = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*> \endverbatim
+*> \verbatim
+*> where U is the unitary matrix in (*) (regard-
+*> less of the value of WANTT.)
+*> \endverbatim
+*> \verbatim
+*> If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*> accessed.
+*> \endverbatim
+*>
+*
+* Authors
* =======
*
-* ZLAQR4 implements one level of recursion for ZLAQR0.
-* It is a complete implementation of the small bulge multi-shift
-* QR algorithm. It may be called by ZLAQR0 and, for large enough
-* deflation window size, it may be called by ZLAQR3. This
-* subroutine is identical to ZLAQR0 except that it calls ZLAQR2
-* instead of ZLAQR3.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ZLAQR4 computes the eigenvalues of a Hessenberg matrix H
-* and, optionally, the matrices T and Z from the Schur decomposition
-* H = Z T Z**H, where T is an upper triangular matrix (the
-* Schur form), and Z is the unitary matrix of Schur vectors.
+*> \date November 2011
*
-* Optionally Z may be postmultiplied into an input unitary
-* matrix Q so that this routine can give the Schur factorization
-* of a matrix A which has been reduced to the Hessenberg form H
-* by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*> \ingroup complex16OTHERauxiliary
*
-* Arguments
-* =========
-*
-* WANTT (input) LOGICAL
-* = .TRUE. : the full Schur form T is required;
-* = .FALSE.: only eigenvalues are required.
-*
-* WANTZ (input) LOGICAL
-* = .TRUE. : the matrix of Schur vectors Z is required;
-* = .FALSE.: Schur vectors are not required.
-*
-* N (input) INTEGER
-* The order of the matrix H. N .GE. 0.
-*
-* ILO (input) INTEGER
-*
-* IHI (input) INTEGER
-* It is assumed that H is already upper triangular in rows
-* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-* previous call to ZGEBAL, and then passed to ZGEHRD when the
-* matrix output by ZGEBAL is reduced to Hessenberg form.
-* Otherwise, ILO and IHI should be set to 1 and N,
-* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-* If N = 0, then ILO = 1 and IHI = 0.
-*
-* H (input/output) COMPLEX*16 array, dimension (LDH,N)
-* On entry, the upper Hessenberg matrix H.
-* On exit, if INFO = 0 and WANTT is .TRUE., then H
-* contains the upper triangular matrix T from the Schur
-* decomposition (the Schur form). If INFO = 0 and WANT is
-* .FALSE., then the contents of H are unspecified on exit.
-* (The output value of H when INFO.GT.0 is given under the
-* description of INFO below.)
-*
-* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH .GE. max(1,N).
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
-* in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
-* stored in the same order as on the diagonal of the Schur
-* form returned in H, with W(i) = H(i,i).
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,IHI)
-* If WANTZ is .FALSE., then Z is not referenced.
-* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-* orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-* (The output value of Z when INFO.GT.0 is given under
-* the description of INFO below.)
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. if WANTZ is .TRUE.
-* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension LWORK
-* On exit, if LWORK = -1, WORK(1) returns an estimate of
-* the optimal value for LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK .GE. max(1,N)
-* is sufficient, but LWORK typically as large as 6*N may
-* be required for optimal performance. A workspace query
-* to determine the optimal workspace size is recommended.
-*
-* If LWORK = -1, then ZLAQR4 does a workspace query.
-* In this case, ZLAQR4 checks the input parameters and
-* estimates the optimal workspace size for the given
-* values of N, ILO and IHI. The estimate is returned
-* in WORK(1). No error message related to LWORK is
-* issued by XERBLA. Neither H nor Z are accessed.
-*
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* .GT. 0: if INFO = i, ZLAQR4 failed to compute all of
-* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
-* and WI contain those eigenvalues which have been
-* successfully computed. (Failures are rare.)
-*
-* If INFO .GT. 0 and WANT is .FALSE., then on exit,
-* the remaining unconverged eigenvalues are the eigen-
-* values of the upper Hessenberg matrix rows and
-* columns ILO through INFO of the final, output
-* value of H.
-*
-* If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*
-* (*) (initial value of H)*U = U*(final value of H)
-*
-* where U is a unitary matrix. The final
-* value of H is upper Hessenberg and triangular in
-* rows and columns INFO+1 through IHI.
-*
-* If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*
-* (final value of Z(ILO:IHI,ILOZ:IHIZ)
-* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
-*
-* where U is the unitary matrix in (*) (regard-
-* less of the value of WANTT.)
-*
-* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-* accessed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Karen Braman and Ralph Byers, Department of Mathematics,
+*> University of Kansas, USA
+*>
+*> References:
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*> Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*> 929--947, 2002.
+*>
+*> K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*> Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*> of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+ $ IHIZ, Z, LDZ, WORK, LWORK, INFO )
*
-* Based on contributions by
-* Karen Braman and Ralph Byers, Department of Mathematics,
-* University of Kansas, USA
-*
-* References:
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-* Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-* 929--947, 2002.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-* Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-* of Matrix Analysis, volume 23, pages 948--973, 2002.
+* .. Scalar Arguments ..
+ INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+ LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+* ..
*
* ================================================================
*
diff --git a/SRC/zlaqr5.f b/SRC/zlaqr5.f
index 9e7effa8..5d7c6bc1 100644
--- a/SRC/zlaqr5.f
+++ b/SRC/zlaqr5.f
@@ -1,10 +1,238 @@
+*> \brief \b ZLAQR5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
+* H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
+* WV, LDWV, NH, WH, LDWH )
+*
+* .. Scalar Arguments ..
+* INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
+* $ LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
+* LOGICAL WANTT, WANTZ
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ),
+* $ WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQR5, called by ZLAQR0, performs a
+*> single small-bulge multi-shift QR sweep.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] WANTT
+*> \verbatim
+*> WANTT is logical scalar
+*> WANTT = .true. if the triangular Schur factor
+*> is being computed. WANTT is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is logical scalar
+*> WANTZ = .true. if the unitary Schur factor is being
+*> computed. WANTZ is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] KACC22
+*> \verbatim
+*> KACC22 is integer with value 0, 1, or 2.
+*> Specifies the computation mode of far-from-diagonal
+*> orthogonal updates.
+*> = 0: ZLAQR5 does not accumulate reflections and does not
+*> use matrix-matrix multiply to update far-from-diagonal
+*> matrix entries.
+*> = 1: ZLAQR5 accumulates reflections and uses matrix-matrix
+*> multiply to update the far-from-diagonal matrix entries.
+*> = 2: ZLAQR5 accumulates reflections, uses matrix-matrix
+*> multiply to update the far-from-diagonal matrix entries,
+*> and takes advantage of 2-by-2 block structure during
+*> matrix multiplies.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is integer scalar
+*> N is the order of the Hessenberg matrix H upon which this
+*> subroutine operates.
+*> \endverbatim
+*>
+*> \param[in] KTOP
+*> \verbatim
+*> KTOP is integer scalar
+*> \endverbatim
+*>
+*> \param[in] KBOT
+*> \verbatim
+*> KBOT is integer scalar
+*> These are the first and last rows and columns of an
+*> isolated diagonal block upon which the QR sweep is to be
+*> applied. It is assumed without a check that
+*> either KTOP = 1 or H(KTOP,KTOP-1) = 0
+*> and
+*> either KBOT = N or H(KBOT+1,KBOT) = 0.
+*> \endverbatim
+*>
+*> \param[in] NSHFTS
+*> \verbatim
+*> NSHFTS is integer scalar
+*> NSHFTS gives the number of simultaneous shifts. NSHFTS
+*> must be positive and even.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is COMPLEX*16 array of size (NSHFTS)
+*> S contains the shifts of origin that define the multi-
+*> shift QR sweep. On output S may be reordered.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*> H is COMPLEX*16 array of size (LDH,N)
+*> On input H contains a Hessenberg matrix. On output a
+*> multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
+*> to the isolated diagonal block in rows and columns KTOP
+*> through KBOT.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is integer scalar
+*> LDH is the leading dimension of H just as declared in the
+*> calling procedure. LDH.GE.MAX(1,N).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*> ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*> IHIZ is INTEGER
+*> Specify the rows of Z to which transformations must be
+*> applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array of size (LDZ,IHI)
+*> If WANTZ = .TRUE., then the QR Sweep unitary
+*> similarity transformation is accumulated into
+*> Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*> If WANTZ = .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is integer scalar
+*> LDA is the leading dimension of Z just as declared in
+*> the calling procedure. LDZ.GE.N.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array of size (LDV,NSHFTS/2)
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is integer scalar
+*> LDV is the leading dimension of V as declared in the
+*> calling procedure. LDV.GE.3.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array of size
+*> (LDU,3*NSHFTS-3)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is integer scalar
+*> LDU is the leading dimension of U just as declared in the
+*> in the calling subroutine. LDU.GE.3*NSHFTS-3.
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*> NH is integer scalar
+*> NH is the number of columns in array WH available for
+*> workspace. NH.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WH
+*> \verbatim
+*> WH is COMPLEX*16 array of size (LDWH,NH)
+*> \endverbatim
+*>
+*> \param[in] LDWH
+*> \verbatim
+*> LDWH is integer scalar
+*> Leading dimension of WH just as declared in the
+*> calling procedure. LDWH.GE.3*NSHFTS-3.
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*> NV is integer scalar
+*> NV is the number of rows in WV agailable for workspace.
+*> NV.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*> WV is COMPLEX*16 array of size
+*> (LDWV,3*NSHFTS-3)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*> LDWV is integer scalar
+*> LDWV is the leading dimension of WV as declared in the
+*> in the calling subroutine. LDWV.GE.NV.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
$ H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
$ WV, LDWV, NH, WH, LDWH )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-* November 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
@@ -16,118 +244,6 @@
$ WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQR5, called by ZLAQR0, performs a
-* single small-bulge multi-shift QR sweep.
-*
-* Arguments
-* =========
-*
-* WANTT (input) logical scalar
-* WANTT = .true. if the triangular Schur factor
-* is being computed. WANTT is set to .false. otherwise.
-*
-* WANTZ (input) logical scalar
-* WANTZ = .true. if the unitary Schur factor is being
-* computed. WANTZ is set to .false. otherwise.
-*
-* KACC22 (input) integer with value 0, 1, or 2.
-* Specifies the computation mode of far-from-diagonal
-* orthogonal updates.
-* = 0: ZLAQR5 does not accumulate reflections and does not
-* use matrix-matrix multiply to update far-from-diagonal
-* matrix entries.
-* = 1: ZLAQR5 accumulates reflections and uses matrix-matrix
-* multiply to update the far-from-diagonal matrix entries.
-* = 2: ZLAQR5 accumulates reflections, uses matrix-matrix
-* multiply to update the far-from-diagonal matrix entries,
-* and takes advantage of 2-by-2 block structure during
-* matrix multiplies.
-*
-* N (input) integer scalar
-* N is the order of the Hessenberg matrix H upon which this
-* subroutine operates.
-*
-* KTOP (input) integer scalar
-*
-* KBOT (input) integer scalar
-* These are the first and last rows and columns of an
-* isolated diagonal block upon which the QR sweep is to be
-* applied. It is assumed without a check that
-* either KTOP = 1 or H(KTOP,KTOP-1) = 0
-* and
-* either KBOT = N or H(KBOT+1,KBOT) = 0.
-*
-* NSHFTS (input) integer scalar
-* NSHFTS gives the number of simultaneous shifts. NSHFTS
-* must be positive and even.
-*
-* S (input/output) COMPLEX*16 array of size (NSHFTS)
-* S contains the shifts of origin that define the multi-
-* shift QR sweep. On output S may be reordered.
-*
-* H (input/output) COMPLEX*16 array of size (LDH,N)
-* On input H contains a Hessenberg matrix. On output a
-* multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
-* to the isolated diagonal block in rows and columns KTOP
-* through KBOT.
-*
-* LDH (input) integer scalar
-* LDH is the leading dimension of H just as declared in the
-* calling procedure. LDH.GE.MAX(1,N).
-*
-* ILOZ (input) INTEGER
-*
-* IHIZ (input) INTEGER
-* Specify the rows of Z to which transformations must be
-* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
-*
-* Z (input/output) COMPLEX*16 array of size (LDZ,IHI)
-* If WANTZ = .TRUE., then the QR Sweep unitary
-* similarity transformation is accumulated into
-* Z(ILOZ:IHIZ,ILO:IHI) from the right.
-* If WANTZ = .FALSE., then Z is unreferenced.
-*
-* LDZ (input) integer scalar
-* LDA is the leading dimension of Z just as declared in
-* the calling procedure. LDZ.GE.N.
-*
-* V (workspace) COMPLEX*16 array of size (LDV,NSHFTS/2)
-*
-* LDV (input) integer scalar
-* LDV is the leading dimension of V as declared in the
-* calling procedure. LDV.GE.3.
-*
-* U (workspace) COMPLEX*16 array of size
-* (LDU,3*NSHFTS-3)
-*
-* LDU (input) integer scalar
-* LDU is the leading dimension of U just as declared in the
-* in the calling subroutine. LDU.GE.3*NSHFTS-3.
-*
-* NH (input) integer scalar
-* NH is the number of columns in array WH available for
-* workspace. NH.GE.1.
-*
-* WH (workspace) COMPLEX*16 array of size (LDWH,NH)
-*
-* LDWH (input) integer scalar
-* Leading dimension of WH just as declared in the
-* calling procedure. LDWH.GE.3*NSHFTS-3.
-*
-* NV (input) integer scalar
-* NV is the number of rows in WV agailable for workspace.
-* NV.GE.1.
-*
-* WV (workspace) COMPLEX*16 array of size
-* (LDWV,3*NSHFTS-3)
-*
-* LDWV (input) integer scalar
-* LDWV is the leading dimension of WV as declared in the
-* in the calling subroutine. LDWV.GE.NV.
-*
* ================================================================
* Based on contributions by
* Karen Braman and Ralph Byers, Department of Mathematics,
diff --git a/SRC/zlaqsb.f b/SRC/zlaqsb.f
index 7aa1afa6..a1da5031 100644
--- a/SRC/zlaqsb.f
+++ b/SRC/zlaqsb.f
@@ -1,9 +1,144 @@
+*> \brief \b ZLAQSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER KD, LDAB, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQSB equilibrates a symmetric band matrix A using the scaling
+*> factors in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the symmetric band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H *U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,69 +150,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQSB equilibrates a symmetric band matrix A using the scaling
-* factors in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the symmetric band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H *U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqsp.f b/SRC/zlaqsp.f
index f6e9d4e1..fb235f5b 100644
--- a/SRC/zlaqsp.f
+++ b/SRC/zlaqsp.f
@@ -1,9 +1,129 @@
+*> \brief \b ZLAQSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQSP equilibrates a symmetric matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the equilibrated matrix: diag(S) * A * diag(S), in
+*> the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,60 +135,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQSP equilibrates a symmetric matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the equilibrated matrix: diag(S) * A * diag(S), in
-* the same storage format as A.
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaqsy.f b/SRC/zlaqsy.f
index cab43382..d483235f 100644
--- a/SRC/zlaqsy.f
+++ b/SRC/zlaqsy.f
@@ -1,9 +1,137 @@
+*> \brief \b ZLAQSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, UPLO
+* INTEGER LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAQSY equilibrates a symmetric matrix A using the scaling factors
+*> in the vector S.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if EQUED = 'Y', the equilibrated matrix:
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A.
+*> \endverbatim
+*>
+*> \param[in] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> Ratio of the smallest S(i) to the largest S(i).
+*> \endverbatim
+*>
+*> \param[in] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix entry.
+*> \endverbatim
+*>
+*> \param[out] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies whether or not equilibration was done.
+*> = 'N': No equilibration.
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> THRESH is a threshold value used to decide if scaling should be done
+*> based on the ratio of the scaling factors. If SCOND < THRESH,
+*> scaling is done.
+*> \endverbatim
+*> \verbatim
+*> LARGE and SMALL are threshold values used to decide if scaling should
+*> be done based on the absolute size of the largest matrix element.
+*> If AMAX > LARGE or AMAX < SMALL, scaling is done.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, UPLO
@@ -15,65 +143,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAQSY equilibrates a symmetric matrix A using the scaling factors
-* in the vector S.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if EQUED = 'Y', the equilibrated matrix:
-* diag(S) * A * diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(N,1).
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A.
-*
-* SCOND (input) DOUBLE PRECISION
-* Ratio of the smallest S(i) to the largest S(i).
-*
-* AMAX (input) DOUBLE PRECISION
-* Absolute value of largest matrix entry.
-*
-* EQUED (output) CHARACTER*1
-* Specifies whether or not equilibration was done.
-* = 'N': No equilibration.
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-*
-* Internal Parameters
-* ===================
-*
-* THRESH is a threshold value used to decide if scaling should be done
-* based on the ratio of the scaling factors. If SCOND < THRESH,
-* scaling is done.
-*
-* LARGE and SMALL are threshold values used to decide if scaling should
-* be done based on the absolute size of the largest matrix element.
-* If AMAX > LARGE or AMAX < SMALL, scaling is done.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlar1v.f b/SRC/zlar1v.f
index 97878950..a44f9cc9 100644
--- a/SRC/zlar1v.f
+++ b/SRC/zlar1v.f
@@ -1,3 +1,229 @@
+*> \brief \b ZLAR1V
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
+* PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
+* R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTNC
+* INTEGER B1, BN, N, NEGCNT, R
+* DOUBLE PRECISION GAPTOL, LAMBDA, MINGMA, NRMINV, PIVMIN, RESID,
+* $ RQCORR, ZTZ
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * )
+* DOUBLE PRECISION D( * ), L( * ), LD( * ), LLD( * ),
+* $ WORK( * )
+* COMPLEX*16 Z( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAR1V computes the (scaled) r-th column of the inverse of
+*> the sumbmatrix in rows B1 through BN of the tridiagonal matrix
+*> L D L**T - sigma I. When sigma is close to an eigenvalue, the
+*> computed vector is an accurate eigenvector. Usually, r corresponds
+*> to the index where the eigenvector is largest in magnitude.
+*> The following steps accomplish this computation :
+*> (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
+*> (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
+*> (c) Computation of the diagonal elements of the inverse of
+*> L D L**T - sigma I by combining the above transforms, and choosing
+*> r as the index where the diagonal of the inverse is (one of the)
+*> largest in magnitude.
+*> (d) Computation of the (scaled) r-th column of the inverse using the
+*> twisted factorization obtained by combining the top part of the
+*> the stationary and the bottom part of the progressive transform.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix L D L**T.
+*> \endverbatim
+*>
+*> \param[in] B1
+*> \verbatim
+*> B1 is INTEGER
+*> First index of the submatrix of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] BN
+*> \verbatim
+*> BN is INTEGER
+*> Last index of the submatrix of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] LAMBDA
+*> \verbatim
+*> LAMBDA is DOUBLE PRECISION
+*> The shift. In order to compute an accurate eigenvector,
+*> LAMBDA should be a good approximation to an eigenvalue
+*> of L D L**T.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the unit bidiagonal matrix
+*> L, in elements 1 to N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[in] LD
+*> \verbatim
+*> LD is DOUBLE PRECISION array, dimension (N-1)
+*> The n-1 elements L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] LLD
+*> \verbatim
+*> LLD is DOUBLE PRECISION array, dimension (N-1)
+*> The n-1 elements L(i)*L(i)*D(i).
+*> \endverbatim
+*>
+*> \param[in] PIVMIN
+*> \verbatim
+*> PIVMIN is DOUBLE PRECISION
+*> The minimum pivot in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] GAPTOL
+*> \verbatim
+*> GAPTOL is DOUBLE PRECISION
+*> Tolerance that indicates when eigenvector entries are negligible
+*> w.r.t. their contribution to the residual.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (N)
+*> On input, all entries of Z must be set to 0.
+*> On output, Z contains the (scaled) r-th column of the
+*> inverse. The scaling is such that Z(R) equals 1.
+*> \endverbatim
+*>
+*> \param[in] WANTNC
+*> \verbatim
+*> WANTNC is LOGICAL
+*> Specifies whether NEGCNT has to be computed.
+*> \endverbatim
+*>
+*> \param[out] NEGCNT
+*> \verbatim
+*> NEGCNT is INTEGER
+*> If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin
+*> in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] ZTZ
+*> \verbatim
+*> ZTZ is DOUBLE PRECISION
+*> The square of the 2-norm of Z.
+*> \endverbatim
+*>
+*> \param[out] MINGMA
+*> \verbatim
+*> MINGMA is DOUBLE PRECISION
+*> The reciprocal of the largest (in magnitude) diagonal
+*> element of the inverse of L D L**T - sigma I.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*> R is INTEGER
+*> The twist index for the twisted factorization used to
+*> compute Z.
+*> On input, 0 <= R <= N. If R is input as 0, R is set to
+*> the index where (L D L**T - sigma I)^{-1} is largest
+*> in magnitude. If 1 <= R <= N, R is unchanged.
+*> On output, R contains the twist index used to compute Z.
+*> Ideally, R designates the position of the maximum entry in the
+*> eigenvector.
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension (2)
+*> The support of the vector in Z, i.e., the vector Z is
+*> nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).
+*> \endverbatim
+*>
+*> \param[out] NRMINV
+*> \verbatim
+*> NRMINV is DOUBLE PRECISION
+*> NRMINV = 1/SQRT( ZTZ )
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The residual of the FP vector.
+*> RESID = ABS( MINGMA )/SQRT( ZTZ )
+*> \endverbatim
+*>
+*> \param[out] RQCORR
+*> \verbatim
+*> RQCORR is DOUBLE PRECISION
+*> The Rayleigh Quotient correction to LAMBDA.
+*> RQCORR = MINGMA*TMP
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
$ PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
$ R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
@@ -5,7 +231,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTNC
@@ -20,118 +246,6 @@
COMPLEX*16 Z( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAR1V computes the (scaled) r-th column of the inverse of
-* the sumbmatrix in rows B1 through BN of the tridiagonal matrix
-* L D L**T - sigma I. When sigma is close to an eigenvalue, the
-* computed vector is an accurate eigenvector. Usually, r corresponds
-* to the index where the eigenvector is largest in magnitude.
-* The following steps accomplish this computation :
-* (a) Stationary qd transform, L D L**T - sigma I = L(+) D(+) L(+)**T,
-* (b) Progressive qd transform, L D L**T - sigma I = U(-) D(-) U(-)**T,
-* (c) Computation of the diagonal elements of the inverse of
-* L D L**T - sigma I by combining the above transforms, and choosing
-* r as the index where the diagonal of the inverse is (one of the)
-* largest in magnitude.
-* (d) Computation of the (scaled) r-th column of the inverse using the
-* twisted factorization obtained by combining the top part of the
-* the stationary and the bottom part of the progressive transform.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix L D L**T.
-*
-* B1 (input) INTEGER
-* First index of the submatrix of L D L**T.
-*
-* BN (input) INTEGER
-* Last index of the submatrix of L D L**T.
-*
-* LAMBDA (input) DOUBLE PRECISION
-* The shift. In order to compute an accurate eigenvector,
-* LAMBDA should be a good approximation to an eigenvalue
-* of L D L**T.
-*
-* L (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the unit bidiagonal matrix
-* L, in elements 1 to N-1.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D.
-*
-* LD (input) DOUBLE PRECISION array, dimension (N-1)
-* The n-1 elements L(i)*D(i).
-*
-* LLD (input) DOUBLE PRECISION array, dimension (N-1)
-* The n-1 elements L(i)*L(i)*D(i).
-*
-* PIVMIN (input) DOUBLE PRECISION
-* The minimum pivot in the Sturm sequence.
-*
-* GAPTOL (input) DOUBLE PRECISION
-* Tolerance that indicates when eigenvector entries are negligible
-* w.r.t. their contribution to the residual.
-*
-* Z (input/output) COMPLEX*16 array, dimension (N)
-* On input, all entries of Z must be set to 0.
-* On output, Z contains the (scaled) r-th column of the
-* inverse. The scaling is such that Z(R) equals 1.
-*
-* WANTNC (input) LOGICAL
-* Specifies whether NEGCNT has to be computed.
-*
-* NEGCNT (output) INTEGER
-* If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin
-* in the matrix factorization L D L**T, and NEGCNT = -1 otherwise.
-*
-* ZTZ (output) DOUBLE PRECISION
-* The square of the 2-norm of Z.
-*
-* MINGMA (output) DOUBLE PRECISION
-* The reciprocal of the largest (in magnitude) diagonal
-* element of the inverse of L D L**T - sigma I.
-*
-* R (input/output) INTEGER
-* The twist index for the twisted factorization used to
-* compute Z.
-* On input, 0 <= R <= N. If R is input as 0, R is set to
-* the index where (L D L**T - sigma I)^{-1} is largest
-* in magnitude. If 1 <= R <= N, R is unchanged.
-* On output, R contains the twist index used to compute Z.
-* Ideally, R designates the position of the maximum entry in the
-* eigenvector.
-*
-* ISUPPZ (output) INTEGER array, dimension (2)
-* The support of the vector in Z, i.e., the vector Z is
-* nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ).
-*
-* NRMINV (output) DOUBLE PRECISION
-* NRMINV = 1/SQRT( ZTZ )
-*
-* RESID (output) DOUBLE PRECISION
-* The residual of the FP vector.
-* RESID = ABS( MINGMA )/SQRT( ZTZ )
-*
-* RQCORR (output) DOUBLE PRECISION
-* The Rayleigh Quotient correction to LAMBDA.
-* RQCORR = MINGMA*TMP
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlar2v.f b/SRC/zlar2v.f
index f2df95bd..8485c96f 100644
--- a/SRC/zlar2v.f
+++ b/SRC/zlar2v.f
@@ -1,57 +1,120 @@
- SUBROUTINE ZLAR2V( N, X, Y, Z, INCX, C, S, INCC )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( * )
- COMPLEX*16 S( * ), X( * ), Y( * ), Z( * )
-* ..
-*
+*> \brief \b ZLAR2V
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAR2V( N, X, Y, Z, INCX, C, S, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * )
+* COMPLEX*16 S( * ), X( * ), Y( * ), Z( * )
+* ..
+*
* Purpose
* =======
*
-* ZLAR2V applies a vector of complex plane rotations with real cosines
-* from both sides to a sequence of 2-by-2 complex Hermitian matrices,
-* defined by the elements of the vectors x, y and z. For i = 1,2,...,n
-*
-* ( x(i) z(i) ) :=
-* ( conjg(z(i)) y(i) )
-*
-* ( c(i) conjg(s(i)) ) ( x(i) z(i) ) ( c(i) -conjg(s(i)) )
-* ( -s(i) c(i) ) ( conjg(z(i)) y(i) ) ( s(i) c(i) )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAR2V applies a vector of complex plane rotations with real cosines
+*> from both sides to a sequence of 2-by-2 complex Hermitian matrices,
+*> defined by the elements of the vectors x, y and z. For i = 1,2,...,n
+*>
+*> ( x(i) z(i) ) :=
+*> ( conjg(z(i)) y(i) )
+*>
+*> ( c(i) conjg(s(i)) ) ( x(i) z(i) ) ( c(i) -conjg(s(i)) )
+*> ( -s(i) c(i) ) ( conjg(z(i)) y(i) ) ( s(i) c(i) )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be applied.
-*
-* X (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX)
-* The vector x; the elements of x are assumed to be real.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be applied.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (1+(N-1)*INCX)
+*> The vector x; the elements of x are assumed to be real.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (1+(N-1)*INCX)
+*> The vector y; the elements of y are assumed to be real.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (1+(N-1)*INCX)
+*> The vector z.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X, Y and Z. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX*16 array, dimension (1+(N-1)*INCC)
+*> The sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C and S. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Y (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX)
-* The vector y; the elements of y are assumed to be real.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Z (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX)
-* The vector z.
+*> \date November 2011
*
-* INCX (input) INTEGER
-* The increment between elements of X, Y and Z. INCX > 0.
+*> \ingroup complex16OTHERauxiliary
*
-* C (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* =====================================================================
+ SUBROUTINE ZLAR2V( N, X, Y, Z, INCX, C, S, INCC )
*
-* S (input) COMPLEX*16 array, dimension (1+(N-1)*INCC)
-* The sines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C and S. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( * )
+ COMPLEX*16 S( * ), X( * ), Y( * ), Z( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarcm.f b/SRC/zlarcm.f
index 75bb9d9c..f4ca1346 100644
--- a/SRC/zlarcm.f
+++ b/SRC/zlarcm.f
@@ -1,57 +1,123 @@
- SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LDC, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), RWORK( * )
- COMPLEX*16 B( LDB, * ), C( LDC, * )
-* ..
-*
+*> \brief \b ZLARCM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDC, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), RWORK( * )
+* COMPLEX*16 B( LDB, * ), C( LDC, * )
+* ..
+*
* Purpose
* =======
*
-* ZLARCM performs a very simple matrix-matrix multiplication:
-* C := A * B,
-* where A is M by M and real; B is M by N and complex;
-* C is M by N and complex.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARCM performs a very simple matrix-matrix multiplication:
+*> C := A * B,
+*> where A is M by M and real; B is M by N and complex;
+*> C is M by N and complex.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A and of the matrix C.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns and rows of the matrix B and
-* the number of columns of the matrix C.
-* N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, M)
-* A contains the M by M matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A and of the matrix C.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns and rows of the matrix B and
+*> the number of columns of the matrix C.
+*> N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, M)
+*> A contains the M by M matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >=max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> B contains the M by N matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >=max(1,M).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, N)
+*> C contains the M by N matrix C.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >=max(1,M).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*M*N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >=max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* B contains the M by N matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >=max(1,M).
+*> \ingroup complex16OTHERauxiliary
*
-* C (input) COMPLEX*16 array, dimension (LDC, N)
-* C contains the M by N matrix C.
+* =====================================================================
+ SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >=max(1,M).
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*M*N)
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LDC, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), RWORK( * )
+ COMPLEX*16 B( LDB, * ), C( LDC, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarf.f b/SRC/zlarf.f
index f29d6da4..481ce0fc 100644
--- a/SRC/zlarf.f
+++ b/SRC/zlarf.f
@@ -1,10 +1,129 @@
+*> \brief \b ZLARF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, LDC, M, N
+* COMPLEX*16 TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARF applies a complex elementary reflector H to a complex M-by-N
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*> H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar and v is a complex vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*> To apply H**H, supply conjg(tau) instead
+*> tau.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension
+*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*> or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*> The vector v in the representation of H. V is not used if
+*> TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE
@@ -15,59 +134,6 @@
COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLARF applies a complex elementary reflector H to a complex M-by-N
-* matrix C, from either the left or the right. H is represented in the
-* form
-*
-* H = I - tau * v * v**H
-*
-* where tau is a complex scalar and v is a complex vector.
-*
-* If tau = 0, then H is taken to be the unit matrix.
-*
-* To apply H**H, supply conjg(tau) instead
-* tau.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) COMPLEX*16 array, dimension
-* (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-* or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-* The vector v in the representation of H. V is not used if
-* TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0.
-*
-* TAU (input) COMPLEX*16
-* The value tau in the representation of H.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlarfb.f b/SRC/zlarfb.f
index ec42de0b..13474d9b 100644
--- a/SRC/zlarfb.f
+++ b/SRC/zlarfb.f
@@ -1,117 +1,179 @@
- SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
- $ T, LDT, C, LDC, WORK, LDWORK )
- IMPLICIT NONE
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, SIDE, STOREV, TRANS
- INTEGER K, LDC, LDT, LDV, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ),
- $ WORK( LDWORK, * )
-* ..
-*
+*> \brief \b ZLARFB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+* T, LDT, C, LDC, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* ZLARFB applies a complex block reflector H or its transpose H**H to a
-* complex M-by-N matrix C, from either the left or the right.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARFB applies a complex block reflector H or its transpose H**H to a
+*> complex M-by-N matrix C, from either the left or the right.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**H from the Left
-* = 'R': apply H or H**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H**H (Conjugate transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columnwise
-* = 'R': Rowwise
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* K (input) INTEGER
-* The order of the matrix T (= the number of elementary
-* reflectors whose product defines the block reflector).
-*
-* V (input) COMPLEX*16 array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,M) if STOREV = 'R' and SIDE = 'L'
-* (LDV,N) if STOREV = 'R' and SIDE = 'R'
-* The matrix V. See Further Details.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-* if STOREV = 'R', LDV >= K.
-*
-* T (input) COMPLEX*16 array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**H from the Left
+*> = 'R': apply H or H**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columnwise
+*> = 'R': Rowwise
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T (= the number of elementary
+*> reflectors whose product defines the block reflector).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,K)
+*> \ingroup complex16OTHERauxiliary
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= max(1,N);
-* if SIDE = 'R', LDWORK >= max(1,M).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* The matrix V. See Further Details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*> if STOREV = 'R', LDV >= K.
+*>
+*> T (input) COMPLEX*16 array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*> C (input/output) COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*>
+*> LDC (input) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (LDWORK,K)
+*>
+*> LDWORK (input) INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= max(1,N);
+*> if SIDE = 'R', LDWORK >= max(1,M).
+*>
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
+*> ( v1 1 ) ( 1 v2 v2 v2 )
+*> ( v1 v2 1 ) ( 1 v3 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
+*> ( v1 v2 v3 ) ( v2 v2 v2 1 )
+*> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
+*> ( 1 v3 )
+*> ( 1 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+ $ T, LDT, C, LDC, WORK, LDWORK )
*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
-* ( v1 1 ) ( 1 v2 v2 v2 )
-* ( v1 v2 1 ) ( 1 v3 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* V = ( v1 v2 v3 ) V = ( v1 v1 1 )
-* ( v1 v2 v3 ) ( v2 v2 v2 1 )
-* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
-* ( 1 v3 )
-* ( 1 )
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, SIDE, STOREV, TRANS
+ INTEGER K, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarfg.f b/SRC/zlarfg.f
index 8a28851e..a8aa3212 100644
--- a/SRC/zlarfg.f
+++ b/SRC/zlarfg.f
@@ -1,9 +1,107 @@
+*> \brief \b ZLARFG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* COMPLEX*16 ALPHA, TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARFG generates a complex elementary reflector H of order n, such
+*> that
+*>
+*> H**H * ( alpha ) = ( beta ), H**H * H = I.
+*> ( x ) ( 0 )
+*>
+*> where alpha and beta are scalars, with beta real, and x is an
+*> (n-1)-element complex vector. H is represented in the form
+*>
+*> H = I - tau * ( 1 ) * ( 1 v**H ) ,
+*> ( v )
+*>
+*> where tau is a complex scalar and v is a complex (n-1)-element
+*> vector. Note that H is not hermitian.
+*>
+*> If the elements of x are all zero and alpha is real, then tau = 0
+*> and H is taken to be the unit matrix.
+*>
+*> Otherwise 1 <= real(tau) <= 2 and abs(tau-1) <= 1 .
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the elementary reflector.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, the value alpha.
+*> On exit, it is overwritten with the value beta.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension
+*> (1+(N-2)*abs(INCX))
+*> On entry, the vector x.
+*> On exit, it is overwritten with the vector v.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16
+*> The value tau.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,50 +111,6 @@
COMPLEX*16 X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLARFG generates a complex elementary reflector H of order n, such
-* that
-*
-* H**H * ( alpha ) = ( beta ), H**H * H = I.
-* ( x ) ( 0 )
-*
-* where alpha and beta are scalars, with beta real, and x is an
-* (n-1)-element complex vector. H is represented in the form
-*
-* H = I - tau * ( 1 ) * ( 1 v**H ) ,
-* ( v )
-*
-* where tau is a complex scalar and v is a complex (n-1)-element
-* vector. Note that H is not hermitian.
-*
-* If the elements of x are all zero and alpha is real, then tau = 0
-* and H is taken to be the unit matrix.
-*
-* Otherwise 1 <= real(tau) <= 2 and abs(tau-1) <= 1 .
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the elementary reflector.
-*
-* ALPHA (input/output) COMPLEX*16
-* On entry, the value alpha.
-* On exit, it is overwritten with the value beta.
-*
-* X (input/output) COMPLEX*16 array, dimension
-* (1+(N-2)*abs(INCX))
-* On entry, the vector x.
-* On exit, it is overwritten with the vector v.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
-*
-* TAU (output) COMPLEX*16
-* The value tau.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlarfgp.f b/SRC/zlarfgp.f
index efc685e2..25925372 100644
--- a/SRC/zlarfgp.f
+++ b/SRC/zlarfgp.f
@@ -1,9 +1,105 @@
+*> \brief \b ZLARFGP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARFGP( N, ALPHA, X, INCX, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* COMPLEX*16 ALPHA, TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARFGP generates a complex elementary reflector H of order n, such
+*> that
+*>
+*> H**H * ( alpha ) = ( beta ), H**H * H = I.
+*> ( x ) ( 0 )
+*>
+*> where alpha and beta are scalars, beta is real and non-negative, and
+*> x is an (n-1)-element complex vector. H is represented in the form
+*>
+*> H = I - tau * ( 1 ) * ( 1 v**H ) ,
+*> ( v )
+*>
+*> where tau is a complex scalar and v is a complex (n-1)-element
+*> vector. Note that H is not hermitian.
+*>
+*> If the elements of x are all zero and alpha is real, then tau = 0
+*> and H is taken to be the unit matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the elementary reflector.
+*> \endverbatim
+*>
+*> \param[in,out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, the value alpha.
+*> On exit, it is overwritten with the value beta.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension
+*> (1+(N-2)*abs(INCX))
+*> On entry, the vector x.
+*> On exit, it is overwritten with the vector v.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16
+*> The value tau.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLARFGP( N, ALPHA, X, INCX, TAU )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,48 +109,6 @@
COMPLEX*16 X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLARFGP generates a complex elementary reflector H of order n, such
-* that
-*
-* H**H * ( alpha ) = ( beta ), H**H * H = I.
-* ( x ) ( 0 )
-*
-* where alpha and beta are scalars, beta is real and non-negative, and
-* x is an (n-1)-element complex vector. H is represented in the form
-*
-* H = I - tau * ( 1 ) * ( 1 v**H ) ,
-* ( v )
-*
-* where tau is a complex scalar and v is a complex (n-1)-element
-* vector. Note that H is not hermitian.
-*
-* If the elements of x are all zero and alpha is real, then tau = 0
-* and H is taken to be the unit matrix.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the elementary reflector.
-*
-* ALPHA (input/output) COMPLEX*16
-* On entry, the value alpha.
-* On exit, it is overwritten with the value beta.
-*
-* X (input/output) COMPLEX*16 array, dimension
-* (1+(N-2)*abs(INCX))
-* On entry, the vector x.
-* On exit, it is overwritten with the vector v.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
-*
-* TAU (output) COMPLEX*16
-* The value tau.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlarft.f b/SRC/zlarft.f
index 06d5adb0..be0bec50 100644
--- a/SRC/zlarft.f
+++ b/SRC/zlarft.f
@@ -1,105 +1,150 @@
- SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, STOREV
- INTEGER K, LDT, LDV, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 T( LDT, * ), TAU( * ), V( LDV, * )
-* ..
-*
+*> \brief \b ZLARFT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, STOREV
+* INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* ZLARFT forms the triangular factor T of a complex block reflector H
-* of order n, which is defined as a product of k elementary reflectors.
-*
-* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*
-* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
-*
-* If STOREV = 'C', the vector which defines the elementary reflector
-* H(i) is stored in the i-th column of the array V, and
-*
-* H = I - V * T * V**H
-*
-* If STOREV = 'R', the vector which defines the elementary reflector
-* H(i) is stored in the i-th row of the array V, and
-*
-* H = I - V**H * T * V
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARFT forms the triangular factor T of a complex block reflector H
+*> of order n, which is defined as a product of k elementary reflectors.
+*>
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
+*>
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*>
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
+*>
+*> H = I - V * T * V**H
+*>
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
+*>
+*> H = I - V**H * T * V
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIRECT (input) CHARACTER*1
-* Specifies the order in which the elementary reflectors are
-* multiplied to form the block reflector:
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Specifies how the vectors which define the elementary
-* reflectors are stored (see also Further Details):
-* = 'C': columnwise
-* = 'R': rowwise
-*
-* N (input) INTEGER
-* The order of the block reflector H. N >= 0.
-*
-* K (input) INTEGER
-* The order of the triangular factor T (= the number of
-* elementary reflectors). K >= 1.
-*
-* V (input/output) COMPLEX*16 array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,N) if STOREV = 'R'
-* The matrix V. See further details.
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies the order in which the elementary reflectors are
+*> multiplied to form the block reflector:
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i).
+*> \date November 2011
*
-* T (output) COMPLEX*16 array, dimension (LDT,K)
-* The k by k triangular factor T of the block reflector.
-* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-* lower triangular. The rest of the array is not used.
+*> \ingroup complex16OTHERauxiliary
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors are stored (see also Further Details):
+*> = 'C': columnwise
+*> = 'R': rowwise
+*>
+*> N (input) INTEGER
+*> The order of the block reflector H. N >= 0.
+*>
+*> K (input) INTEGER
+*> The order of the triangular factor T (= the number of
+*> elementary reflectors). K >= 1.
+*>
+*> V (input/output) COMPLEX*16 array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,N) if STOREV = 'R'
+*> The matrix V. See further details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>
+*> TAU (input) COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i).
+*>
+*> T (output) COMPLEX*16 array, dimension (LDT,K)
+*> The k by k triangular factor T of the block reflector.
+*> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*> lower triangular. The rest of the array is not used.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
+*> ( v1 1 ) ( 1 v2 v2 v2 )
+*> ( v1 v2 1 ) ( 1 v3 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> V = ( v1 v2 v3 ) V = ( v1 v1 1 )
+*> ( v1 v2 v3 ) ( v2 v2 v2 1 )
+*> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
+*> ( 1 v3 )
+*> ( 1 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* V = ( 1 ) V = ( 1 v1 v1 v1 v1 )
-* ( v1 1 ) ( 1 v2 v2 v2 )
-* ( v1 v2 1 ) ( 1 v3 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* V = ( v1 v2 v3 ) V = ( v1 v1 1 )
-* ( v1 v2 v3 ) ( v2 v2 v2 1 )
-* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 )
-* ( 1 v3 )
-* ( 1 )
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, STOREV
+ INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarfx.f b/SRC/zlarfx.f
index 9ced041f..e7377f1d 100644
--- a/SRC/zlarfx.f
+++ b/SRC/zlarfx.f
@@ -1,10 +1,120 @@
+*> \brief \b ZLARFX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER LDC, M, N
+* COMPLEX*16 TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARFX applies a complex elementary reflector H to a complex m by n
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*> H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar and v is a complex vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix
+*>
+*> This version uses inline code if H has order < 11.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (M) if SIDE = 'L'
+*> or (N) if SIDE = 'R'
+*> The vector v in the representation of H.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the m by n matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> WORK is not referenced if H has order < 11.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE
@@ -15,53 +125,6 @@
COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLARFX applies a complex elementary reflector H to a complex m by n
-* matrix C, from either the left or the right. H is represented in the
-* form
-*
-* H = I - tau * v * v**H
-*
-* where tau is a complex scalar and v is a complex vector.
-*
-* If tau = 0, then H is taken to be the unit matrix
-*
-* This version uses inline code if H has order < 11.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) COMPLEX*16 array, dimension (M) if SIDE = 'L'
-* or (N) if SIDE = 'R'
-* The vector v in the representation of H.
-*
-* TAU (input) COMPLEX*16
-* The value tau in the representation of H.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the m by n matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDA >= max(1,M).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
-* WORK is not referenced if H has order < 11.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlargv.f b/SRC/zlargv.f
index f097cb13..29abfc05 100644
--- a/SRC/zlargv.f
+++ b/SRC/zlargv.f
@@ -1,68 +1,133 @@
- SUBROUTINE ZLARGV( N, X, INCX, Y, INCY, C, INCC )
+*> \brief \b ZLARGV
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, INCY, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( * )
- COMPLEX*16 X( * ), Y( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLARGV( N, X, INCX, Y, INCY, C, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * )
+* COMPLEX*16 X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* ZLARGV generates a vector of complex plane rotations with real
-* cosines, determined by elements of the complex vectors x and y.
-* For i = 1,2,...,n
-*
-* ( c(i) s(i) ) ( x(i) ) = ( r(i) )
-* ( -conjg(s(i)) c(i) ) ( y(i) ) = ( 0 )
-*
-* where c(i)**2 + ABS(s(i))**2 = 1
-*
-* The following conventions are used (these are the same as in ZLARTG,
-* but differ from the BLAS1 routine ZROTG):
-* If y(i)=0, then c(i)=1 and s(i)=0.
-* If x(i)=0, then c(i)=0 and s(i) is chosen so that r(i) is real.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARGV generates a vector of complex plane rotations with real
+*> cosines, determined by elements of the complex vectors x and y.
+*> For i = 1,2,...,n
+*>
+*> ( c(i) s(i) ) ( x(i) ) = ( r(i) )
+*> ( -conjg(s(i)) c(i) ) ( y(i) ) = ( 0 )
+*>
+*> where c(i)**2 + ABS(s(i))**2 = 1
+*>
+*> The following conventions are used (these are the same as in ZLARTG,
+*> but differ from the BLAS1 routine ZROTG):
+*> If y(i)=0, then c(i)=1 and s(i)=0.
+*> If x(i)=0, then c(i)=0 and s(i) is chosen so that r(i) is real.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be generated.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be generated.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (1+(N-1)*INCX)
+*> On entry, the vector x.
+*> On exit, x(i) is overwritten by r(i), for i = 1,...,n.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (1+(N-1)*INCY)
+*> On entry, the vector y.
+*> On exit, the sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C. INCC > 0.
+*> \endverbatim
+*>
*
-* X (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX)
-* On entry, the vector x.
-* On exit, x(i) is overwritten by r(i), for i = 1,...,n.
-*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
+* Authors
+* =======
*
-* Y (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCY)
-* On entry, the vector y.
-* On exit, the sines of the plane rotations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCY (input) INTEGER
-* The increment between elements of Y. INCY > 0.
+*> \date November 2011
*
-* C (output) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+*> \ingroup complex16OTHERauxiliary
*
-* INCC (input) INTEGER
-* The increment between elements of C. INCC > 0.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 6-6-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+*>
+*> This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). 10 feb 03, SJH.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLARGV( N, X, INCX, Y, INCY, C, INCC )
*
-* 6-6-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). 10 feb 03, SJH.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( * )
+ COMPLEX*16 X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarnv.f b/SRC/zlarnv.f
index 2e14f4a9..2a3c6ad4 100644
--- a/SRC/zlarnv.f
+++ b/SRC/zlarnv.f
@@ -1,54 +1,110 @@
- SUBROUTINE ZLARNV( IDIST, ISEED, N, X )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IDIST, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- COMPLEX*16 X( * )
-* ..
-*
+*> \brief \b ZLARNV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARNV( IDIST, ISEED, N, X )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX*16 X( * )
+* ..
+*
* Purpose
* =======
*
-* ZLARNV returns a vector of n random complex numbers from a uniform or
-* normal distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARNV returns a vector of n random complex numbers from a uniform or
+*> normal distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IDIST (input) INTEGER
-* Specifies the distribution of the random numbers:
-* = 1: real and imaginary parts each uniform (0,1)
-* = 2: real and imaginary parts each uniform (-1,1)
-* = 3: real and imaginary parts each normal (0,1)
-* = 4: uniformly distributed on the disc abs(z) < 1
-* = 5: uniformly distributed on the circle abs(z) = 1
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the distribution of the random numbers:
+*> = 1: real and imaginary parts each uniform (0,1)
+*> = 2: real and imaginary parts each uniform (-1,1)
+*> = 3: real and imaginary parts each normal (0,1)
+*> = 4: uniformly distributed on the disc abs(z) < 1
+*> = 5: uniformly distributed on the circle abs(z) = 1
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of random numbers to be generated.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> The generated random numbers.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of random numbers to be generated.
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
*
-* X (output) COMPLEX*16 array, dimension (N)
-* The generated random numbers.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine calls the auxiliary routine DLARUV to generate random
+*> real numbers from a uniform (0,1) distribution, in batches of up to
+*> 128 using vectorisable code. The Box-Muller method is used to
+*> transform numbers from a uniform to a normal distribution.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLARNV( IDIST, ISEED, N, X )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This routine calls the auxiliary routine DLARUV to generate random
-* real numbers from a uniform (0,1) distribution, in batches of up to
-* 128 using vectorisable code. The Box-Muller method is used to
-* transform numbers from a uniform to a normal distribution.
+* .. Scalar Arguments ..
+ INTEGER IDIST, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ COMPLEX*16 X( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarrv.f b/SRC/zlarrv.f
index 395a0f80..245bcdf0 100644
--- a/SRC/zlarrv.f
+++ b/SRC/zlarrv.f
@@ -1,3 +1,280 @@
+*> \brief \b ZLARRV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARRV( N, VL, VU, D, L, PIVMIN,
+* ISPLIT, M, DOL, DOU, MINRGP,
+* RTOL1, RTOL2, W, WERR, WGAP,
+* IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
+* WORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER DOL, DOU, INFO, LDZ, M, N
+* DOUBLE PRECISION MINRGP, PIVMIN, RTOL1, RTOL2, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), INDEXW( * ), ISPLIT( * ),
+* $ ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), GERS( * ), L( * ), W( * ), WERR( * ),
+* $ WGAP( * ), WORK( * )
+* COMPLEX*16 Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARRV computes the eigenvectors of the tridiagonal matrix
+*> T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
+*> The input eigenvalues should have been computed by DLARRE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> Lower and upper bounds of the interval that contains the desired
+*> eigenvalues. VL < VU. Needed to compute gaps on the left or right
+*> end of the extremal eigenvalues in the desired RANGE.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the N diagonal elements of the diagonal matrix D.
+*> On exit, D may be overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the unit
+*> bidiagonal matrix L are in elements 1 to N-1 of L
+*> (if the matrix is not splitted.) At the end of each block
+*> is stored the corresponding shift as given by DLARRE.
+*> On exit, L is overwritten.
+*> \endverbatim
+*> \verbatim
+*> PIVMIN (in) DOUBLE PRECISION
+*> The minimum pivot allowed in the Sturm sequence.
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into blocks.
+*> The first block consists of rows/columns 1 to
+*> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
+*> through ISPLIT( 2 ), etc.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of input eigenvalues. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] DOL
+*> \verbatim
+*> DOL is INTEGER
+*> \endverbatim
+*>
+*> \param[in] DOU
+*> \verbatim
+*> DOU is INTEGER
+*> If the user wants to compute only selected eigenvectors from all
+*> the eigenvalues supplied, he can specify an index range DOL:DOU.
+*> Or else the setting DOL=1, DOU=M should be applied.
+*> Note that DOL and DOU refer to the order in which the eigenvalues
+*> are stored in W.
+*> If the user wants to compute only selected eigenpairs, then
+*> the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
+*> computed eigenvectors. All other columns of Z are set to zero.
+*> \endverbatim
+*>
+*> \param[in] MINRGP
+*> \verbatim
+*> MINRGP is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] RTOL1
+*> \verbatim
+*> RTOL1 is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] RTOL2
+*> \verbatim
+*> RTOL2 is DOUBLE PRECISION
+*> Parameters for bisection.
+*> An interval [LEFT,RIGHT] has converged if
+*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> \endverbatim
+*>
+*> \param[in,out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements of W contain the APPROXIMATE eigenvalues for
+*> which eigenvectors are to be computed. The eigenvalues
+*> should be grouped by split-off block and ordered from
+*> smallest to largest within the block ( The output array
+*> W from DLARRE is expected here ). Furthermore, they are with
+*> respect to the shift of the corresponding root representation
+*> for their block. On exit, W holds the eigenvalues of the
+*> UNshifted matrix.
+*> \endverbatim
+*>
+*> \param[in,out] WERR
+*> \verbatim
+*> WERR is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the semiwidth of the uncertainty
+*> interval of the corresponding eigenvalue in W
+*> \endverbatim
+*>
+*> \param[in,out] WGAP
+*> \verbatim
+*> WGAP is DOUBLE PRECISION array, dimension (N)
+*> The separation from the right neighbor eigenvalue in W.
+*> \endverbatim
+*>
+*> \param[in] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The indices of the blocks (submatrices) associated with the
+*> corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
+*> W(i) belongs to the first block from the top, =2 if W(i)
+*> belongs to the second block, etc.
+*> \endverbatim
+*>
+*> \param[in] INDEXW
+*> \verbatim
+*> INDEXW is INTEGER array, dimension (N)
+*> The indices of the eigenvalues within each block (submatrix);
+*> for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
+*> i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
+*> \endverbatim
+*>
+*> \param[in] GERS
+*> \verbatim
+*> GERS is DOUBLE PRECISION array, dimension (2*N)
+*> The N Gerschgorin intervals (the i-th Gerschgorin interval
+*> is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
+*> be computed from the original UNshifted matrix.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M) )
+*> If INFO = 0, the first M columns of Z contain the
+*> orthonormal eigenvectors of the matrix T
+*> corresponding to the input eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER array, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The I-th eigenvector
+*> is nonzero only in elements ISUPPZ( 2*I-1 ) through
+*> ISUPPZ( 2*I ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (12*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (7*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> \endverbatim
+*> \verbatim
+*> > 0: A problem occured in ZLARRV.
+*> < 0: One of the called subroutines signaled an internal problem.
+*> Needs inspection of the corresponding parameter IINFO
+*> for further information.
+*> \endverbatim
+*> \verbatim
+*> =-1: Problem in DLARRB when refining a child's eigenvalues.
+*> =-2: Problem in DLARRF when computing the RRR of a child.
+*> When a child is inside a tight cluster, it can be difficult
+*> to find an RRR. A partial remedy from the user's point of
+*> view is to make the parameter MINRGP smaller and recompile.
+*> However, as the orthogonality of the computed vectors is
+*> proportional to 1/MINRGP, the user should be aware that
+*> he might be trading in precision when he decreases MINRGP.
+*> =-3: Problem in DLARRB when refining a single eigenvalue
+*> after the Rayleigh correction was rejected.
+*> = 5: The Rayleigh Quotient Iteration failed to converge to
+*> full accuracy in MAXITR steps.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLARRV( N, VL, VU, D, L, PIVMIN,
$ ISPLIT, M, DOL, DOU, MINRGP,
$ RTOL1, RTOL2, W, WERR, WGAP,
@@ -7,7 +284,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER DOL, DOU, INFO, LDZ, M, N
@@ -21,156 +298,6 @@
COMPLEX*16 Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLARRV computes the eigenvectors of the tridiagonal matrix
-* T = L D L**T given L, D and APPROXIMATIONS to the eigenvalues of L D L**T.
-* The input eigenvalues should have been computed by DLARRE.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* VL (input) DOUBLE PRECISION
-*
-* VU (input) DOUBLE PRECISION
-* Lower and upper bounds of the interval that contains the desired
-* eigenvalues. VL < VU. Needed to compute gaps on the left or right
-* end of the extremal eigenvalues in the desired RANGE.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the N diagonal elements of the diagonal matrix D.
-* On exit, D may be overwritten.
-*
-* L (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the unit
-* bidiagonal matrix L are in elements 1 to N-1 of L
-* (if the matrix is not splitted.) At the end of each block
-* is stored the corresponding shift as given by DLARRE.
-* On exit, L is overwritten.
-*
-* PIVMIN (in) DOUBLE PRECISION
-* The minimum pivot allowed in the Sturm sequence.
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into blocks.
-* The first block consists of rows/columns 1 to
-* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
-* through ISPLIT( 2 ), etc.
-*
-* M (input) INTEGER
-* The total number of input eigenvalues. 0 <= M <= N.
-*
-* DOL (input) INTEGER
-*
-* DOU (input) INTEGER
-* If the user wants to compute only selected eigenvectors from all
-* the eigenvalues supplied, he can specify an index range DOL:DOU.
-* Or else the setting DOL=1, DOU=M should be applied.
-* Note that DOL and DOU refer to the order in which the eigenvalues
-* are stored in W.
-* If the user wants to compute only selected eigenpairs, then
-* the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
-* computed eigenvectors. All other columns of Z are set to zero.
-*
-* MINRGP (input) DOUBLE PRECISION
-*
-* RTOL1 (input) DOUBLE PRECISION
-*
-* RTOL2 (input) DOUBLE PRECISION
-* Parameters for bisection.
-* An interval [LEFT,RIGHT] has converged if
-* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
-*
-* W (input/output) DOUBLE PRECISION array, dimension (N)
-* The first M elements of W contain the APPROXIMATE eigenvalues for
-* which eigenvectors are to be computed. The eigenvalues
-* should be grouped by split-off block and ordered from
-* smallest to largest within the block ( The output array
-* W from DLARRE is expected here ). Furthermore, they are with
-* respect to the shift of the corresponding root representation
-* for their block. On exit, W holds the eigenvalues of the
-* UNshifted matrix.
-*
-* WERR (input/output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the semiwidth of the uncertainty
-* interval of the corresponding eigenvalue in W
-*
-* WGAP (input/output) DOUBLE PRECISION array, dimension (N)
-* The separation from the right neighbor eigenvalue in W.
-*
-* IBLOCK (input) INTEGER array, dimension (N)
-* The indices of the blocks (submatrices) associated with the
-* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
-* W(i) belongs to the first block from the top, =2 if W(i)
-* belongs to the second block, etc.
-*
-* INDEXW (input) INTEGER array, dimension (N)
-* The indices of the eigenvalues within each block (submatrix);
-* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
-* i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
-*
-* GERS (input) DOUBLE PRECISION array, dimension (2*N)
-* The N Gerschgorin intervals (the i-th Gerschgorin interval
-* is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
-* be computed from the original UNshifted matrix.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M) )
-* If INFO = 0, the first M columns of Z contain the
-* orthonormal eigenvectors of the matrix T
-* corresponding to the input eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The I-th eigenvector
-* is nonzero only in elements ISUPPZ( 2*I-1 ) through
-* ISUPPZ( 2*I ).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (12*N)
-*
-* IWORK (workspace) INTEGER array, dimension (7*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-*
-* > 0: A problem occured in ZLARRV.
-* < 0: One of the called subroutines signaled an internal problem.
-* Needs inspection of the corresponding parameter IINFO
-* for further information.
-*
-* =-1: Problem in DLARRB when refining a child's eigenvalues.
-* =-2: Problem in DLARRF when computing the RRR of a child.
-* When a child is inside a tight cluster, it can be difficult
-* to find an RRR. A partial remedy from the user's point of
-* view is to make the parameter MINRGP smaller and recompile.
-* However, as the orthogonality of the computed vectors is
-* proportional to 1/MINRGP, the user should be aware that
-* he might be trading in precision when he decreases MINRGP.
-* =-3: Problem in DLARRB when refining a single eigenvalue
-* after the Rayleigh correction was rejected.
-* = 5: The Rayleigh Quotient Iteration failed to converge to
-* full accuracy in MAXITR steps.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlarscl2.f b/SRC/zlarscl2.f
index 39751b71..c6c1d5bd 100644
--- a/SRC/zlarscl2.f
+++ b/SRC/zlarscl2.f
@@ -1,51 +1,100 @@
- SUBROUTINE ZLARSCL2 ( M, N, D, X, LDX )
+*> \brief \b ZLARSCL2
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER M, N, LDX
-* ..
-* .. Array Arguments ..
- COMPLEX*16 X( LDX, * )
- DOUBLE PRECISION D( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZLARSCL2 ( M, N, D, X, LDX )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X( LDX, * )
+* DOUBLE PRECISION D( * )
+* ..
+*
* Purpose
* =======
*
-* ZLARSCL2 performs a reciprocal diagonal scaling on an vector:
-* x <-- inv(D) * x
-* where the DOUBLE PRECISION diagonal matrix D is stored as a vector.
-*
-* Eventually to be replaced by BLAS_zge_diag_scale in the new BLAS
-* standard.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARSCL2 performs a reciprocal diagonal scaling on an vector:
+*> x <-- inv(D) * x
+*> where the DOUBLE PRECISION diagonal matrix D is stored as a vector.
+*>
+*> Eventually to be replaced by BLAS_zge_diag_scale in the new BLAS
+*> standard.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of D and X. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of D and X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of D and X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, length M
+*> Diagonal matrix D, stored as a vector of length M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,N)
+*> On entry, the vector X to be scaled by D.
+*> On exit, the scaled vector.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the vector X. LDX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of D and X. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) DOUBLE PRECISION array, length M
-* Diagonal matrix D, stored as a vector of length M.
+*> \date November 2011
*
-* X (input/output) COMPLEX*16 array, dimension (LDX,N)
-* On entry, the vector X to be scaled by D.
-* On exit, the scaled vector.
+*> \ingroup complex16OTHERcomputational
*
-* LDX (input) INTEGER
-* The leading dimension of the vector X. LDX >= 0.
+* =====================================================================
+ SUBROUTINE ZLARSCL2 ( M, N, D, X, LDX )
+*
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 X( LDX, * )
+ DOUBLE PRECISION D( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlartg.f b/SRC/zlartg.f
index 44376ee2..98ec9eef 100644
--- a/SRC/zlartg.f
+++ b/SRC/zlartg.f
@@ -1,55 +1,113 @@
- SUBROUTINE ZLARTG( F, G, CS, SN, R )
+*> \brief \b ZLARTG
*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION CS
- COMPLEX*16 F, G, R, SN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLARTG( F, G, CS, SN, R )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION CS
+* COMPLEX*16 F, G, R, SN
+* ..
+*
* Purpose
* =======
*
-* ZLARTG generates a plane rotation so that
-*
-* [ CS SN ] [ F ] [ R ]
-* [ __ ] . [ ] = [ ] where CS**2 + |SN|**2 = 1.
-* [ -SN CS ] [ G ] [ 0 ]
-*
-* This is a faster version of the BLAS1 routine ZROTG, except for
-* the following differences:
-* F and G are unchanged on return.
-* If G=0, then CS=1 and SN=0.
-* If F=0, then CS=0 and SN is chosen so that R is real.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARTG generates a plane rotation so that
+*>
+*> [ CS SN ] [ F ] [ R ]
+*> [ __ ] . [ ] = [ ] where CS**2 + |SN|**2 = 1.
+*> [ -SN CS ] [ G ] [ 0 ]
+*>
+*> This is a faster version of the BLAS1 routine ZROTG, except for
+*> the following differences:
+*> F and G are unchanged on return.
+*> If G=0, then CS=1 and SN=0.
+*> If F=0, then CS=0 and SN is chosen so that R is real.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* F (input) COMPLEX*16
-* The first component of vector to be rotated.
+*> \param[in] F
+*> \verbatim
+*> F is COMPLEX*16
+*> The first component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[in] G
+*> \verbatim
+*> G is COMPLEX*16
+*> The second component of vector to be rotated.
+*> \endverbatim
+*>
+*> \param[out] CS
+*> \verbatim
+*> CS is DOUBLE PRECISION
+*> The cosine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] SN
+*> \verbatim
+*> SN is COMPLEX*16
+*> The sine of the rotation.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16
+*> The nonzero component of the rotated vector.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* G (input) COMPLEX*16
-* The second component of vector to be rotated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* CS (output) DOUBLE PRECISION
-* The cosine of the rotation.
+*> \date November 2011
*
-* SN (output) COMPLEX*16
-* The sine of the rotation.
+*> \ingroup complex16OTHERauxiliary
*
-* R (output) COMPLEX*16
-* The nonzero component of the rotated vector.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> 3-5-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+*>
+*> This version has a few statements commented out for thread safety
+*> (machine parameters are computed on each entry). 10 feb 03, SJH.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLARTG( F, G, CS, SN, R )
*
-* 3-5-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* This version has a few statements commented out for thread safety
-* (machine parameters are computed on each entry). 10 feb 03, SJH.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION CS
+ COMPLEX*16 F, G, R, SN
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlartv.f b/SRC/zlartv.f
index 114a577d..883ebf40 100644
--- a/SRC/zlartv.f
+++ b/SRC/zlartv.f
@@ -1,53 +1,116 @@
- SUBROUTINE ZLARTV( N, X, INCX, Y, INCY, C, S, INCC )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCC, INCX, INCY, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( * )
- COMPLEX*16 S( * ), X( * ), Y( * )
-* ..
-*
+*> \brief \b ZLARTV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARTV( N, X, INCX, Y, INCY, C, S, INCC )
+*
+* .. Scalar Arguments ..
+* INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * )
+* COMPLEX*16 S( * ), X( * ), Y( * )
+* ..
+*
* Purpose
* =======
*
-* ZLARTV applies a vector of complex plane rotations with real cosines
-* to elements of the complex vectors x and y. For i = 1,2,...,n
-*
-* ( x(i) ) := ( c(i) s(i) ) ( x(i) )
-* ( y(i) ) ( -conjg(s(i)) c(i) ) ( y(i) )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARTV applies a vector of complex plane rotations with real cosines
+*> to elements of the complex vectors x and y. For i = 1,2,...,n
+*>
+*> ( x(i) ) := ( c(i) s(i) ) ( x(i) )
+*> ( y(i) ) ( -conjg(s(i)) c(i) ) ( y(i) )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of plane rotations to be applied.
-*
-* X (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX)
-* The vector x.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of plane rotations to be applied.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (1+(N-1)*INCX)
+*> The vector x.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between elements of X. INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (1+(N-1)*INCY)
+*> The vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between elements of Y. INCY > 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
+*> The cosines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX*16 array, dimension (1+(N-1)*INCC)
+*> The sines of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] INCC
+*> \verbatim
+*> INCC is INTEGER
+*> The increment between elements of C and S. INCC > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* INCX (input) INTEGER
-* The increment between elements of X. INCX > 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Y (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCY)
-* The vector y.
+*> \date November 2011
*
-* INCY (input) INTEGER
-* The increment between elements of Y. INCY > 0.
+*> \ingroup complex16OTHERauxiliary
*
-* C (input) DOUBLE PRECISION array, dimension (1+(N-1)*INCC)
-* The cosines of the plane rotations.
+* =====================================================================
+ SUBROUTINE ZLARTV( N, X, INCX, Y, INCY, C, S, INCC )
*
-* S (input) COMPLEX*16 array, dimension (1+(N-1)*INCC)
-* The sines of the plane rotations.
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCC (input) INTEGER
-* The increment between elements of C and S. INCC > 0.
+* .. Scalar Arguments ..
+ INTEGER INCC, INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( * )
+ COMPLEX*16 S( * ), X( * ), Y( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarz.f b/SRC/zlarz.f
index c6d95361..84eba55a 100644
--- a/SRC/zlarz.f
+++ b/SRC/zlarz.f
@@ -1,82 +1,157 @@
- SUBROUTINE ZLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE
- INTEGER INCV, L, LDC, M, N
- COMPLEX*16 TAU
-* ..
-* .. Array Arguments ..
- COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b ZLARZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, L, LDC, M, N
+* COMPLEX*16 TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLARZ applies a complex elementary reflector H to a complex
-* M-by-N matrix C, from either the left or the right. H is represented
-* in the form
-*
-* H = I - tau * v * v**H
-*
-* where tau is a complex scalar and v is a complex vector.
-*
-* If tau = 0, then H is taken to be the unit matrix.
-*
-* To apply H**H (the conjugate transpose of H), supply conjg(tau) instead
-* tau.
-*
-* H is a product of k elementary reflectors as returned by ZTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARZ applies a complex elementary reflector H to a complex
+*> M-by-N matrix C, from either the left or the right. H is represented
+*> in the form
+*>
+*> H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar and v is a complex vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*> To apply H**H (the conjugate transpose of H), supply conjg(tau) instead
+*> tau.
+*>
+*> H is a product of k elementary reflectors as returned by ZTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': form H * C
-* = 'R': form C * H
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* L (input) INTEGER
-* The number of entries of the vector V containing
-* the meaningful part of the Householder vectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* V (input) COMPLEX*16 array, dimension (1+(L-1)*abs(INCV))
-* The vector v in the representation of H as returned by
-* ZTZRZF. V is not used if TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form H * C
+*> = 'R': form C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of entries of the vector V containing
+*> the meaningful part of the Householder vectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (1+(L-1)*abs(INCV))
+*> The vector v in the representation of H as returned by
+*> ZTZRZF. V is not used if TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16
+*> The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*> or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L'
+*> or (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX*16
-* The value tau in the representation of H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-* or C * H if SIDE = 'R'.
+*> \date November 2011
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \ingroup complex16OTHERcomputational
*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L'
-* or (M) if SIDE = 'R'
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER SIDE
+ INTEGER INCV, L, LDC, M, N
+ COMPLEX*16 TAU
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarzb.f b/SRC/zlarzb.f
index cfa0ca1a..4af9036f 100644
--- a/SRC/zlarzb.f
+++ b/SRC/zlarzb.f
@@ -1,99 +1,193 @@
- SUBROUTINE ZLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
- $ LDV, T, LDT, C, LDC, WORK, LDWORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, SIDE, STOREV, TRANS
- INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ),
- $ WORK( LDWORK, * )
-* ..
-*
+*> \brief \b ZLARZB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
+* LDV, T, LDT, C, LDC, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* ZLARZB applies a complex block reflector H or its transpose H**H
-* to a complex distributed M-by-N C from the left or the right.
-*
-* Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARZB applies a complex block reflector H or its transpose H**H
+*> to a complex distributed M-by-N C from the left or the right.
+*>
+*> Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**H from the Left
-* = 'R': apply H or H**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H**H (Conjugate transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columnwise (not supported yet)
-* = 'R': Rowwise
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* K (input) INTEGER
-* The order of the matrix T (= the number of elementary
-* reflectors whose product defines the block reflector).
-*
-* L (input) INTEGER
-* The number of columns of the matrix V containing the
-* meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* V (input) COMPLEX*16 array, dimension (LDV,NV).
-* If STOREV = 'C', NV = K; if STOREV = 'R', NV = L.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K.
-*
-* T (input) COMPLEX*16 array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**H from the Left
+*> = 'R': apply H or H**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columnwise (not supported yet)
+*> = 'R': Rowwise
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T (= the number of elementary
+*> reflectors whose product defines the block reflector).
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix V containing the
+*> meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,NV).
+*> If STOREV = 'C', NV = K; if STOREV = 'R', NV = L.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK,K)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= max(1,N);
+*> if SIDE = 'R', LDWORK >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,K)
+*> \ingroup complex16OTHERcomputational
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= max(1,N);
-* if SIDE = 'R', LDWORK >= max(1,M).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
+ $ LDV, T, LDT, C, LDC, WORK, LDWORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, SIDE, STOREV, TRANS
+ INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlarzt.f b/SRC/zlarzt.f
index 76554d08..72c98118 100644
--- a/SRC/zlarzt.f
+++ b/SRC/zlarzt.f
@@ -1,123 +1,168 @@
- SUBROUTINE ZLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER DIRECT, STOREV
- INTEGER K, LDT, LDV, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 T( LDT, * ), TAU( * ), V( LDV, * )
-* ..
-*
+*> \brief \b ZLARZT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, STOREV
+* INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
+*
* Purpose
* =======
*
-* ZLARZT forms the triangular factor T of a complex block reflector
-* H of order > n, which is defined as a product of k elementary
-* reflectors.
-*
-* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*
-* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
-*
-* If STOREV = 'C', the vector which defines the elementary reflector
-* H(i) is stored in the i-th column of the array V, and
-*
-* H = I - V * T * V**H
-*
-* If STOREV = 'R', the vector which defines the elementary reflector
-* H(i) is stored in the i-th row of the array V, and
-*
-* H = I - V**H * T * V
-*
-* Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARZT forms the triangular factor T of a complex block reflector
+*> H of order > n, which is defined as a product of k elementary
+*> reflectors.
+*>
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
+*>
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*>
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
+*>
+*> H = I - V * T * V**H
+*>
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
+*>
+*> H = I - V**H * T * V
+*>
+*> Currently, only STOREV = 'R' and DIRECT = 'B' are supported.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* DIRECT (input) CHARACTER*1
-* Specifies the order in which the elementary reflectors are
-* multiplied to form the block reflector:
-* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Specifies how the vectors which define the elementary
-* reflectors are stored (see also Further Details):
-* = 'C': columnwise (not supported yet)
-* = 'R': rowwise
-*
-* N (input) INTEGER
-* The order of the block reflector H. N >= 0.
-*
-* K (input) INTEGER
-* The order of the triangular factor T (= the number of
-* elementary reflectors). K >= 1.
-*
-* V (input/output) COMPLEX*16 array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,N) if STOREV = 'R'
-* The matrix V. See further details.
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies the order in which the elementary reflectors are
+*> multiplied to form the block reflector:
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i).
+*> \date November 2011
*
-* T (output) COMPLEX*16 array, dimension (LDT,K)
-* The k by k triangular factor T of the block reflector.
-* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-* lower triangular. The rest of the array is not used.
+*> \ingroup complex16OTHERcomputational
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= K.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* reflectors are stored (see also Further Details):
+*> = 'C': columnwise (not supported yet)
+*> = 'R': rowwise
+*>
+*> N (input) INTEGER
+*> The order of the block reflector H. N >= 0.
+*>
+*> K (input) INTEGER
+*> The order of the triangular factor T (= the number of
+*> elementary reflectors). K >= 1.
+*>
+*> V (input/output) COMPLEX*16 array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,N) if STOREV = 'R'
+*> The matrix V. See further details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>
+*> TAU (input) COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i).
+*>
+*> T (output) COMPLEX*16 array, dimension (LDT,K)
+*> The k by k triangular factor T of the block reflector.
+*> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*> lower triangular. The rest of the array is not used.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= K.
+*>
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The shape of the matrix V and the storage of the vectors which define
+*> the H(i) is best illustrated by the following example with n = 5 and
+*> k = 3. The elements equal to 1 are not stored; the corresponding
+*> array elements are modified but restored on exit. The rest of the
+*> array is not used.
+*>
+*> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
+*>
+*> ______V_____
+*> ( v1 v2 v3 ) / \
+*> ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 )
+*> V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 )
+*> ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 )
+*> ( v1 v2 v3 )
+*> . . .
+*> . . .
+*> 1 . .
+*> 1 .
+*> 1
+*>
+*> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
+*>
+*> ______V_____
+*> 1 / \
+*> . 1 ( 1 . . . . v1 v1 v1 v1 v1 )
+*> . . 1 ( . 1 . . . v2 v2 v2 v2 v2 )
+*> . . . ( . . 1 . . v3 v3 v3 v3 v3 )
+*> . . .
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*> V = ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*> ( v1 v2 v3 )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The shape of the matrix V and the storage of the vectors which define
-* the H(i) is best illustrated by the following example with n = 5 and
-* k = 3. The elements equal to 1 are not stored; the corresponding
-* array elements are modified but restored on exit. The rest of the
-* array is not used.
-*
-* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R':
-*
-* ______V_____
-* ( v1 v2 v3 ) / \
-* ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 )
-* V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 )
-* ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 )
-* ( v1 v2 v3 )
-* . . .
-* . . .
-* 1 . .
-* 1 .
-* 1
-*
-* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R':
-*
-* ______V_____
-* 1 / \
-* . 1 ( 1 . . . . v1 v1 v1 v1 v1 )
-* . . 1 ( . 1 . . . v2 v2 v2 v2 v2 )
-* . . . ( . . 1 . . v3 v3 v3 v3 v3 )
-* . . .
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
-* V = ( v1 v2 v3 )
-* ( v1 v2 v3 )
-* ( v1 v2 v3 )
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER DIRECT, STOREV
+ INTEGER K, LDT, LDV, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 T( LDT, * ), TAU( * ), V( LDV, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlascl.f b/SRC/zlascl.f
index f69159b9..cfccb530 100644
--- a/SRC/zlascl.f
+++ b/SRC/zlascl.f
@@ -1,9 +1,139 @@
+*> \brief \b ZLASCL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TYPE
+* INTEGER INFO, KL, KU, LDA, M, N
+* DOUBLE PRECISION CFROM, CTO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLASCL multiplies the M by N complex matrix A by the real scalar
+*> CTO/CFROM. This is done without over/underflow as long as the final
+*> result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
+*> A may be full, upper triangular, lower triangular, upper Hessenberg,
+*> or banded.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> TYPE indices the storage type of the input matrix.
+*> = 'G': A is a full matrix.
+*> = 'L': A is a lower triangular matrix.
+*> = 'U': A is an upper triangular matrix.
+*> = 'H': A is an upper Hessenberg matrix.
+*> = 'B': A is a symmetric band matrix with lower bandwidth KL
+*> and upper bandwidth KU and with the only the lower
+*> half stored.
+*> = 'Q': A is a symmetric band matrix with lower bandwidth KL
+*> and upper bandwidth KU and with the only the upper
+*> half stored.
+*> = 'Z': A is a band matrix with lower bandwidth KL and upper
+*> bandwidth KU. See ZGBTRF for storage details.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower bandwidth of A. Referenced only if TYPE = 'B',
+*> 'Q' or 'Z'.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper bandwidth of A. Referenced only if TYPE = 'B',
+*> 'Q' or 'Z'.
+*> \endverbatim
+*>
+*> \param[in] CFROM
+*> \verbatim
+*> CFROM is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] CTO
+*> \verbatim
+*> CTO is DOUBLE PRECISION
+*> The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
+*> without over/underflow if the final result CTO*A(I,J)/CFROM
+*> can be represented without over/underflow. CFROM must be
+*> nonzero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The matrix to be multiplied by CTO/CFROM. See TYPE for the
+*> storage type.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 - successful exit
+*> <0 - if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2010
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TYPE
@@ -14,66 +144,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLASCL multiplies the M by N complex matrix A by the real scalar
-* CTO/CFROM. This is done without over/underflow as long as the final
-* result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
-* A may be full, upper triangular, lower triangular, upper Hessenberg,
-* or banded.
-*
-* Arguments
-* =========
-*
-* TYPE (input) CHARACTER*1
-* TYPE indices the storage type of the input matrix.
-* = 'G': A is a full matrix.
-* = 'L': A is a lower triangular matrix.
-* = 'U': A is an upper triangular matrix.
-* = 'H': A is an upper Hessenberg matrix.
-* = 'B': A is a symmetric band matrix with lower bandwidth KL
-* and upper bandwidth KU and with the only the lower
-* half stored.
-* = 'Q': A is a symmetric band matrix with lower bandwidth KL
-* and upper bandwidth KU and with the only the upper
-* half stored.
-* = 'Z': A is a band matrix with lower bandwidth KL and upper
-* bandwidth KU. See ZGBTRF for storage details.
-*
-* KL (input) INTEGER
-* The lower bandwidth of A. Referenced only if TYPE = 'B',
-* 'Q' or 'Z'.
-*
-* KU (input) INTEGER
-* The upper bandwidth of A. Referenced only if TYPE = 'B',
-* 'Q' or 'Z'.
-*
-* CFROM (input) DOUBLE PRECISION
-*
-* CTO (input) DOUBLE PRECISION
-* The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
-* without over/underflow if the final result CTO*A(I,J)/CFROM
-* can be represented without over/underflow. CFROM must be
-* nonzero.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* The matrix to be multiplied by CTO/CFROM. See TYPE for the
-* storage type.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* INFO (output) INTEGER
-* 0 - successful exit
-* <0 - if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlascl2.f b/SRC/zlascl2.f
index c6f10a45..ae7add3c 100644
--- a/SRC/zlascl2.f
+++ b/SRC/zlascl2.f
@@ -1,51 +1,100 @@
- SUBROUTINE ZLASCL2 ( M, N, D, X, LDX )
+*> \brief \b ZLASCL2
*
-* -- LAPACK routine (version 3.2.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER M, N, LDX
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * )
- COMPLEX*16 X( LDX, * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZLASCL2 ( M, N, D, X, LDX )
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* ZLASCL2 performs a diagonal scaling on a vector:
-* x <-- D * x
-* where the DOUBLE PRECISION diagonal matrix D is stored as a vector.
-*
-* Eventually to be replaced by BLAS_zge_diag_scale in the new BLAS
-* standard.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLASCL2 performs a diagonal scaling on a vector:
+*> x <-- D * x
+*> where the DOUBLE PRECISION diagonal matrix D is stored as a vector.
+*>
+*> Eventually to be replaced by BLAS_zge_diag_scale in the new BLAS
+*> standard.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of D and X. M >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of D and X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of D and X. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, length M
+*> Diagonal matrix D, stored as a vector of length M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,N)
+*> On entry, the vector X to be scaled by D.
+*> On exit, the scaled vector.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the vector X. LDX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of D and X. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) DOUBLE PRECISION array, length M
-* Diagonal matrix D, stored as a vector of length M.
+*> \date November 2011
*
-* X (input/output) COMPLEX*16 array, dimension (LDX,N)
-* On entry, the vector X to be scaled by D.
-* On exit, the scaled vector.
+*> \ingroup complex16OTHERcomputational
*
-* LDX (input) INTEGER
-* The leading dimension of the vector X. LDX >= 0.
+* =====================================================================
+ SUBROUTINE ZLASCL2 ( M, N, D, X, LDX )
+*
+* -- LAPACK computational routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDX
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * )
+ COMPLEX*16 X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlaset.f b/SRC/zlaset.f
index f832ee88..a7ca7804 100644
--- a/SRC/zlaset.f
+++ b/SRC/zlaset.f
@@ -1,9 +1,107 @@
+*> \brief \b ZLASET
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, M, N
+* COMPLEX*16 ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLASET initializes a 2-D array A to BETA on the diagonal and
+*> ALPHA on the offdiagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the part of the matrix A to be set.
+*> = 'U': Upper triangular part is set. The lower triangle
+*> is unchanged.
+*> = 'L': Lower triangular part is set. The upper triangle
+*> is unchanged.
+*> Otherwise: All of the matrix A is set.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of A.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> All the offdiagonal array elements are set to ALPHA.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> All the diagonal array elements are set to BETA.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the m by n matrix A.
+*> On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
+*> A(i,i) = BETA , 1 <= i <= min(m,n)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,43 +112,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLASET initializes a 2-D array A to BETA on the diagonal and
-* ALPHA on the offdiagonals.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies the part of the matrix A to be set.
-* = 'U': Upper triangular part is set. The lower triangle
-* is unchanged.
-* = 'L': Lower triangular part is set. The upper triangle
-* is unchanged.
-* Otherwise: All of the matrix A is set.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of A.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of A.
-*
-* ALPHA (input) COMPLEX*16
-* All the offdiagonal array elements are set to ALPHA.
-*
-* BETA (input) COMPLEX*16
-* All the diagonal array elements are set to BETA.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the m by n matrix A.
-* On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
-* A(i,i) = BETA , 1 <= i <= min(m,n)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zlasr.f b/SRC/zlasr.f
index 7e665cf1..493b2317 100644
--- a/SRC/zlasr.f
+++ b/SRC/zlasr.f
@@ -1,9 +1,201 @@
+*> \brief \b ZLASR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, PIVOT, SIDE
+* INTEGER LDA, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( * ), S( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLASR applies a sequence of real plane rotations to a complex matrix
+*> A, from either the left or the right.
+*>
+*> When SIDE = 'L', the transformation takes the form
+*>
+*> A := P*A
+*>
+*> and when SIDE = 'R', the transformation takes the form
+*>
+*> A := A*P**T
+*>
+*> where P is an orthogonal matrix consisting of a sequence of z plane
+*> rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
+*> and P**T is the transpose of P.
+*>
+*> When DIRECT = 'F' (Forward sequence), then
+*>
+*> P = P(z-1) * ... * P(2) * P(1)
+*>
+*> and when DIRECT = 'B' (Backward sequence), then
+*>
+*> P = P(1) * P(2) * ... * P(z-1)
+*>
+*> where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
+*>
+*> R(k) = ( c(k) s(k) )
+*> = ( -s(k) c(k) ).
+*>
+*> When PIVOT = 'V' (Variable pivot), the rotation is performed
+*> for the plane (k,k+1), i.e., P(k) has the form
+*>
+*> P(k) = ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( c(k) s(k) )
+*> ( -s(k) c(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*>
+*> where R(k) appears as a rank-2 modification to the identity matrix in
+*> rows and columns k and k+1.
+*>
+*> When PIVOT = 'T' (Top pivot), the rotation is performed for the
+*> plane (1,k+1), so P(k) has the form
+*>
+*> P(k) = ( c(k) s(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( -s(k) c(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*>
+*> where R(k) appears in rows and columns 1 and k+1.
+*>
+*> Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
+*> performed for the plane (k,z), giving P(k) the form
+*>
+*> P(k) = ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( c(k) s(k) )
+*> ( 1 )
+*> ( ... )
+*> ( 1 )
+*> ( -s(k) c(k) )
+*>
+*> where R(k) appears in rows and columns k and z. The rotations are
+*> performed without ever forming P(k) explicitly.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> Specifies whether the plane rotation matrix P is applied to
+*> A on the left or the right.
+*> = 'L': Left, compute A := P*A
+*> = 'R': Right, compute A:= A*P**T
+*> \endverbatim
+*>
+*> \param[in] PIVOT
+*> \verbatim
+*> PIVOT is CHARACTER*1
+*> Specifies the plane for which P(k) is a plane rotation
+*> matrix.
+*> = 'V': Variable pivot, the plane (k,k+1)
+*> = 'T': Top pivot, the plane (1,k+1)
+*> = 'B': Bottom pivot, the plane (k,z)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Specifies whether P is a forward or backward sequence of
+*> plane rotations.
+*> = 'F': Forward, P = P(z-1)*...*P(2)*P(1)
+*> = 'B': Backward, P = P(1)*P(2)*...*P(z-1)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. If m <= 1, an immediate
+*> return is effected.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. If n <= 1, an
+*> immediate return is effected.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> The cosines c(k) of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> The sines s(k) of the plane rotations. The 2-by-2 plane
+*> rotation part of the matrix P(k), R(k), has the form
+*> R(k) = ( c(k) s(k) )
+*> ( -s(k) c(k) ).
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix A. On exit, A is overwritten by P*A if
+*> SIDE = 'R' or by A*P**T if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIRECT, PIVOT, SIDE
@@ -14,131 +206,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLASR applies a sequence of real plane rotations to a complex matrix
-* A, from either the left or the right.
-*
-* When SIDE = 'L', the transformation takes the form
-*
-* A := P*A
-*
-* and when SIDE = 'R', the transformation takes the form
-*
-* A := A*P**T
-*
-* where P is an orthogonal matrix consisting of a sequence of z plane
-* rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
-* and P**T is the transpose of P.
-*
-* When DIRECT = 'F' (Forward sequence), then
-*
-* P = P(z-1) * ... * P(2) * P(1)
-*
-* and when DIRECT = 'B' (Backward sequence), then
-*
-* P = P(1) * P(2) * ... * P(z-1)
-*
-* where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
-*
-* R(k) = ( c(k) s(k) )
-* = ( -s(k) c(k) ).
-*
-* When PIVOT = 'V' (Variable pivot), the rotation is performed
-* for the plane (k,k+1), i.e., P(k) has the form
-*
-* P(k) = ( 1 )
-* ( ... )
-* ( 1 )
-* ( c(k) s(k) )
-* ( -s(k) c(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-*
-* where R(k) appears as a rank-2 modification to the identity matrix in
-* rows and columns k and k+1.
-*
-* When PIVOT = 'T' (Top pivot), the rotation is performed for the
-* plane (1,k+1), so P(k) has the form
-*
-* P(k) = ( c(k) s(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-* ( -s(k) c(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-*
-* where R(k) appears in rows and columns 1 and k+1.
-*
-* Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
-* performed for the plane (k,z), giving P(k) the form
-*
-* P(k) = ( 1 )
-* ( ... )
-* ( 1 )
-* ( c(k) s(k) )
-* ( 1 )
-* ( ... )
-* ( 1 )
-* ( -s(k) c(k) )
-*
-* where R(k) appears in rows and columns k and z. The rotations are
-* performed without ever forming P(k) explicitly.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* Specifies whether the plane rotation matrix P is applied to
-* A on the left or the right.
-* = 'L': Left, compute A := P*A
-* = 'R': Right, compute A:= A*P**T
-*
-* PIVOT (input) CHARACTER*1
-* Specifies the plane for which P(k) is a plane rotation
-* matrix.
-* = 'V': Variable pivot, the plane (k,k+1)
-* = 'T': Top pivot, the plane (1,k+1)
-* = 'B': Bottom pivot, the plane (k,z)
-*
-* DIRECT (input) CHARACTER*1
-* Specifies whether P is a forward or backward sequence of
-* plane rotations.
-* = 'F': Forward, P = P(z-1)*...*P(2)*P(1)
-* = 'B': Backward, P = P(1)*P(2)*...*P(z-1)
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. If m <= 1, an immediate
-* return is effected.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. If n <= 1, an
-* immediate return is effected.
-*
-* C (input) DOUBLE PRECISION array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* The cosines c(k) of the plane rotations.
-*
-* S (input) DOUBLE PRECISION array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* The sines s(k) of the plane rotations. The 2-by-2 plane
-* rotation part of the matrix P(k), R(k), has the form
-* R(k) = ( c(k) s(k) )
-* ( -s(k) c(k) ).
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix A. On exit, A is overwritten by P*A if
-* SIDE = 'R' or by A*P**T if SIDE = 'L'.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlassq.f b/SRC/zlassq.f
index faa7b16b..9e9e198d 100644
--- a/SRC/zlassq.f
+++ b/SRC/zlassq.f
@@ -1,9 +1,107 @@
+*> \brief \b ZLASSQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, N
+* DOUBLE PRECISION SCALE, SUMSQ
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLASSQ returns the values scl and ssq such that
+*>
+*> ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
+*>
+*> where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
+*> assumed to be at least unity and the value of ssq will then satisfy
+*>
+*> 1.0 .le. ssq .le. ( sumsq + 2*n ).
+*>
+*> scale is assumed to be non-negative and scl returns the value
+*>
+*> scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
+*> i
+*>
+*> scale and sumsq must be supplied in SCALE and SUMSQ respectively.
+*> SCALE and SUMSQ are overwritten by scl and ssq respectively.
+*>
+*> The routine makes only one pass through the vector X.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements to be used from the vector X.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> The vector x as described above.
+*> x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of the vector X.
+*> INCX > 0.
+*> \endverbatim
+*>
+*> \param[in,out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On entry, the value scale in the equation above.
+*> On exit, SCALE is overwritten with the value scl .
+*> \endverbatim
+*>
+*> \param[in,out] SUMSQ
+*> \verbatim
+*> SUMSQ is DOUBLE PRECISION
+*> On entry, the value sumsq in the equation above.
+*> On exit, SUMSQ is overwritten with the value ssq .
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -13,50 +111,6 @@
COMPLEX*16 X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLASSQ returns the values scl and ssq such that
-*
-* ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
-*
-* where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
-* assumed to be at least unity and the value of ssq will then satisfy
-*
-* 1.0 .le. ssq .le. ( sumsq + 2*n ).
-*
-* scale is assumed to be non-negative and scl returns the value
-*
-* scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
-* i
-*
-* scale and sumsq must be supplied in SCALE and SUMSQ respectively.
-* SCALE and SUMSQ are overwritten by scl and ssq respectively.
-*
-* The routine makes only one pass through the vector X.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of elements to be used from the vector X.
-*
-* X (input) COMPLEX*16 array, dimension (N)
-* The vector x as described above.
-* x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
-*
-* INCX (input) INTEGER
-* The increment between successive values of the vector X.
-* INCX > 0.
-*
-* SCALE (input/output) DOUBLE PRECISION
-* On entry, the value scale in the equation above.
-* On exit, SCALE is overwritten with the value scl .
-*
-* SUMSQ (input/output) DOUBLE PRECISION
-* On entry, the value sumsq in the equation above.
-* On exit, SUMSQ is overwritten with the value ssq .
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlaswp.f b/SRC/zlaswp.f
index 29edd05f..2c0791f8 100644
--- a/SRC/zlaswp.f
+++ b/SRC/zlaswp.f
@@ -1,60 +1,125 @@
- SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX )
-*
-* -- LAPACK auxiliary routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INCX, K1, K2, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZLASWP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, K1, K2, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZLASWP performs a series of row interchanges on the matrix A.
-* One row interchange is initiated for each of rows K1 through K2 of A.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLASWP performs a series of row interchanges on the matrix A.
+*> One row interchange is initiated for each of rows K1 through K2 of A.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the matrix of column dimension N to which the row
-* interchanges will be applied.
-* On exit, the permuted matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the matrix of column dimension N to which the row
+*> interchanges will be applied.
+*> On exit, the permuted matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] K1
+*> \verbatim
+*> K1 is INTEGER
+*> The first element of IPIV for which a row interchange will
+*> be done.
+*> \endverbatim
+*>
+*> \param[in] K2
+*> \verbatim
+*> K2 is INTEGER
+*> The last element of IPIV for which a row interchange will
+*> be done.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (K2*abs(INCX))
+*> The vector of pivot indices. Only the elements in positions
+*> K1 through K2 of IPIV are accessed.
+*> IPIV(K) = L implies rows K and L are to be interchanged.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of IPIV. If IPIV
+*> is negative, the pivots are applied in reverse order.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K1 (input) INTEGER
-* The first element of IPIV for which a row interchange will
-* be done.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* K2 (input) INTEGER
-* The last element of IPIV for which a row interchange will
-* be done.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (K2*abs(INCX))
-* The vector of pivot indices. Only the elements in positions
-* K1 through K2 of IPIV are accessed.
-* IPIV(K) = L implies rows K and L are to be interchanged.
+*> \ingroup complex16OTHERauxiliary
*
-* INCX (input) INTEGER
-* The increment between successive values of IPIV. If IPIV
-* is negative, the pivots are applied in reverse order.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Modified by
+*> R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+* -- LAPACK auxiliary routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Modified by
-* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* .. Scalar Arguments ..
+ INTEGER INCX, K1, K2, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlasyf.f b/SRC/zlasyf.f
index e79d750a..dc69d5ad 100644
--- a/SRC/zlasyf.f
+++ b/SRC/zlasyf.f
@@ -1,9 +1,159 @@
+*> \brief \b ZLASYF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KB, LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), W( LDW, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLASYF computes a partial factorization of a complex symmetric matrix
+*> A using the Bunch-Kaufman diagonal pivoting method. The partial
+*> factorization has the form:
+*>
+*> A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
+*> ( 0 U22 ) ( 0 D ) ( U12**T U22**T )
+*>
+*> A = ( L11 0 ) ( D 0 ) ( L11**T L21**T ) if UPLO = 'L'
+*> ( L21 I ) ( 0 A22 ) ( 0 I )
+*>
+*> where the order of D is at most NB. The actual order is returned in
+*> the argument KB, and is either NB or NB-1, or N if N <= NB.
+*> Note that U**T denotes the transpose of U.
+*>
+*> ZLASYF is an auxiliary routine called by ZSYTRF. It uses blocked code
+*> (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
+*> A22 (if UPLO = 'L').
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The maximum number of columns of the matrix A that should be
+*> factored. NB should be at least 2 to allow for 2-by-2 pivot
+*> blocks.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*> KB is INTEGER
+*> The number of columns of A that were actually factored.
+*> KB is either NB-1 or NB, or N if N <= NB.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> On exit, A contains details of the partial factorization.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If UPLO = 'U', only the last KB elements of IPIV are set;
+*> if UPLO = 'L', only the first KB elements are set.
+*> \endverbatim
+*> \verbatim
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (LDW,NB)
+*> \endverbatim
+*>
+*> \param[in] LDW
+*> \verbatim
+*> LDW is INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
SUBROUTINE ZLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,85 +164,6 @@
COMPLEX*16 A( LDA, * ), W( LDW, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLASYF computes a partial factorization of a complex symmetric matrix
-* A using the Bunch-Kaufman diagonal pivoting method. The partial
-* factorization has the form:
-*
-* A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or:
-* ( 0 U22 ) ( 0 D ) ( U12**T U22**T )
-*
-* A = ( L11 0 ) ( D 0 ) ( L11**T L21**T ) if UPLO = 'L'
-* ( L21 I ) ( 0 A22 ) ( 0 I )
-*
-* where the order of D is at most NB. The actual order is returned in
-* the argument KB, and is either NB or NB-1, or N if N <= NB.
-* Note that U**T denotes the transpose of U.
-*
-* ZLASYF is an auxiliary routine called by ZSYTRF. It uses blocked code
-* (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
-* A22 (if UPLO = 'L').
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NB (input) INTEGER
-* The maximum number of columns of the matrix A that should be
-* factored. NB should be at least 2 to allow for 2-by-2 pivot
-* blocks.
-*
-* KB (output) INTEGER
-* The number of columns of A that were actually factored.
-* KB is either NB-1 or NB, or N if N <= NB.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit, A contains details of the partial factorization.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If UPLO = 'U', only the last KB elements of IPIV are set;
-* if UPLO = 'L', only the first KB elements are set.
-*
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* W (workspace) COMPLEX*16 array, dimension (LDW,NB)
-*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlat2c.f b/SRC/zlat2c.f
index e01aab7b..fe1ed79e 100644
--- a/SRC/zlat2c.f
+++ b/SRC/zlat2c.f
@@ -1,60 +1,121 @@
- SUBROUTINE ZLAT2C( UPLO, N, A, LDA, SA, LDSA, INFO )
-*
-* -- LAPACK PROTOTYPE auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDSA, N
-* ..
-* .. Array Arguments ..
- COMPLEX SA( LDSA, * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZLAT2C
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAT2C( UPLO, N, A, LDA, SA, LDSA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDSA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX SA( LDSA, * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZLAT2C converts a COMPLEX*16 triangular matrix, SA, to a COMPLEX
-* triangular matrix, A.
-*
-* RMAX is the overflow for the SINGLE PRECISION arithmetic
-* ZLAT2C checks that all the entries of A are between -RMAX and
-* RMAX. If not the convertion is aborted and a flag is raised.
-*
-* This is an auxiliary routine so there is no argument checking.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAT2C converts a COMPLEX*16 triangular matrix, SA, to a COMPLEX
+*> triangular matrix, A.
+*>
+*> RMAX is the overflow for the SINGLE PRECISION arithmetic
+*> ZLAT2C checks that all the entries of A are between -RMAX and
+*> RMAX. If not the convertion is aborted and a flag is raised.
+*>
+*> This is an auxiliary routine so there is no argument checking.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the N-by-N triangular coefficient matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SA
+*> \verbatim
+*> SA is COMPLEX array, dimension (LDSA,N)
+*> Only the UPLO part of SA is referenced. On exit, if INFO=0,
+*> the N-by-N coefficient matrix SA; if INFO>0, the content of
+*> the UPLO part of SA is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDSA
+*> \verbatim
+*> LDSA is INTEGER
+*> The leading dimension of the array SA. LDSA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> = 1: an entry of the matrix A is greater than the SINGLE
+*> PRECISION overflow threshold, in this case, the content
+*> of the UPLO part of SA in exit is unspecified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the N-by-N triangular coefficient matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complex16OTHERauxiliary
*
-* SA (output) COMPLEX array, dimension (LDSA,N)
-* Only the UPLO part of SA is referenced. On exit, if INFO=0,
-* the N-by-N coefficient matrix SA; if INFO>0, the content of
-* the UPLO part of SA is unspecified.
+* =====================================================================
+ SUBROUTINE ZLAT2C( UPLO, N, A, LDA, SA, LDSA, INFO )
*
-* LDSA (input) INTEGER
-* The leading dimension of the array SA. LDSA >= max(1,M).
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* = 1: an entry of the matrix A is greater than the SINGLE
-* PRECISION overflow threshold, in this case, the content
-* of the UPLO part of SA in exit is unspecified.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDSA, N
+* ..
+* .. Array Arguments ..
+ COMPLEX SA( LDSA, * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlatbs.f b/SRC/zlatbs.f
index 80fb1099..71f683bf 100644
--- a/SRC/zlatbs.f
+++ b/SRC/zlatbs.f
@@ -1,10 +1,248 @@
+*> \brief \b ZLATBS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
+* SCALE, CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION CNORM( * )
+* COMPLEX*16 AB( LDAB, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATBS solves one of the triangular systems
+*>
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
+*>
+*> with scaling to prevent overflow, where A is an upper or lower
+*> triangular band matrix. Here A**T denotes the transpose of A, x and b
+*> are n-element vectors, and s is a scaling factor, usually less than
+*> or equal to 1, chosen so that the components of x will be less than
+*> the overflow threshold. If the unscaled problem will not cause
+*> overflow, the Level 2 BLAS routine ZTBSV is called. If the matrix A
+*> is singular (A(j,j) = 0 for some j), then s is set to 0 and a
+*> non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T * x = s*b (Transpose)
+*> = 'C': Solve A**H * x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of subdiagonals or superdiagonals in the
+*> triangular matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s for the triangular system
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, ZTBSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTBSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T *x = b or
+*> A**H *x = b. The basic algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call ZTBSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
$ SCALE, CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -16,159 +254,6 @@
COMPLEX*16 AB( LDAB, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATBS solves one of the triangular systems
-*
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
-*
-* with scaling to prevent overflow, where A is an upper or lower
-* triangular band matrix. Here A**T denotes the transpose of A, x and b
-* are n-element vectors, and s is a scaling factor, usually less than
-* or equal to 1, chosen so that the components of x will be less than
-* the overflow threshold. If the unscaled problem will not cause
-* overflow, the Level 2 BLAS routine ZTBSV is called. If the matrix A
-* is singular (A(j,j) = 0 for some j), then s is set to 0 and a
-* non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T * x = s*b (Transpose)
-* = 'C': Solve A**H * x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of subdiagonals or superdiagonals in the
-* triangular matrix A. KD >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* X (input/output) COMPLEX*16 array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) DOUBLE PRECISION
-* The scaling factor s for the triangular system
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) DOUBLE PRECISION array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, ZTBSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTBSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T *x = b or
-* A**H *x = b. The basic algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call ZTBSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlatdf.f b/SRC/zlatdf.f
index 60928957..309f6964 100644
--- a/SRC/zlatdf.f
+++ b/SRC/zlatdf.f
@@ -1,10 +1,170 @@
+*> \brief \b ZLATDF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
+* JPIV )
+*
+* .. Scalar Arguments ..
+* INTEGER IJOB, LDZ, N
+* DOUBLE PRECISION RDSCAL, RDSUM
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * ), JPIV( * )
+* COMPLEX*16 RHS( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATDF computes the contribution to the reciprocal Dif-estimate
+*> by solving for x in Z * x = b, where b is chosen such that the norm
+*> of x is as large as possible. It is assumed that LU decomposition
+*> of Z has been computed by ZGETC2. On entry RHS = f holds the
+*> contribution from earlier solved sub-systems, and on return RHS = x.
+*>
+*> The factorization of Z returned by ZGETC2 has the form
+*> Z = P * L * U * Q, where P and Q are permutation matrices. L is lower
+*> triangular with unit diagonal elements and U is upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> IJOB = 2: First compute an approximative null-vector e
+*> of Z using ZGECON, e is normalized and solve for
+*> Zx = +-e - f with the sign giving the greater value of
+*> 2-norm(x). About 5 times as expensive as Default.
+*> IJOB .ne. 2: Local look ahead strategy where
+*> all entries of the r.h.s. b is choosen as either +1 or
+*> -1. Default.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Z.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, N)
+*> On entry, the LU part of the factorization of the n-by-n
+*> matrix Z computed by ZGETC2: Z = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*> RHS is DOUBLE PRECISION array, dimension (N).
+*> On entry, RHS contains contributions from other subsystems.
+*> On exit, RHS contains the solution of the subsystem with
+*> entries according to the value of IJOB (see above).
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*> RDSUM is DOUBLE PRECISION
+*> On entry, the sum of squares of computed contributions to
+*> the Dif-estimate under computation by ZTGSYL, where the
+*> scaling factor RDSCAL (see below) has been factored out.
+*> On exit, the corresponding sum of squares updated with the
+*> contributions from the current sub-system.
+*> If TRANS = 'T' RDSUM is not touched.
+*> NOTE: RDSUM only makes sense when ZTGSY2 is called by CTGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*> RDSCAL is DOUBLE PRECISION
+*> On entry, scaling factor used to prevent overflow in RDSUM.
+*> On exit, RDSCAL is updated w.r.t. the current contributions
+*> in RDSUM.
+*> If TRANS = 'T', RDSCAL is not touched.
+*> NOTE: RDSCAL only makes sense when ZTGSY2 is called by
+*> ZTGSYL.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= i <= N, row i of the
+*> matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*> JPIV is INTEGER array, dimension (N).
+*> The pivot indices; for 1 <= j <= N, column j of the
+*> matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> This routine is a further developed implementation of algorithm
+*> BSOLVE in [1] using complete pivoting in the LU factorization.
+*>
+*> [1] Bo Kagstrom and Lars Westin,
+*> Generalized Schur Methods with Condition Estimators for
+*> Solving the Generalized Sylvester Equation, IEEE Transactions
+*> on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
+*>
+*> [2] Peter Poromaa,
+*> On Efficient and Robust Estimators for the Separation
+*> between two Regular Matrix Pairs with Applications in
+*> Condition Estimation. Report UMINF-95.05, Department of
+*> Computing Science, Umea University, S-901 87 Umea, Sweden,
+*> 1995.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
$ JPIV )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IJOB, LDZ, N
@@ -15,93 +175,6 @@
COMPLEX*16 RHS( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATDF computes the contribution to the reciprocal Dif-estimate
-* by solving for x in Z * x = b, where b is chosen such that the norm
-* of x is as large as possible. It is assumed that LU decomposition
-* of Z has been computed by ZGETC2. On entry RHS = f holds the
-* contribution from earlier solved sub-systems, and on return RHS = x.
-*
-* The factorization of Z returned by ZGETC2 has the form
-* Z = P * L * U * Q, where P and Q are permutation matrices. L is lower
-* triangular with unit diagonal elements and U is upper triangular.
-*
-* Arguments
-* =========
-*
-* IJOB (input) INTEGER
-* IJOB = 2: First compute an approximative null-vector e
-* of Z using ZGECON, e is normalized and solve for
-* Zx = +-e - f with the sign giving the greater value of
-* 2-norm(x). About 5 times as expensive as Default.
-* IJOB .ne. 2: Local look ahead strategy where
-* all entries of the r.h.s. b is choosen as either +1 or
-* -1. Default.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Z.
-*
-* Z (input) DOUBLE PRECISION array, dimension (LDZ, N)
-* On entry, the LU part of the factorization of the n-by-n
-* matrix Z computed by ZGETC2: Z = P * L * U * Q
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDA >= max(1, N).
-*
-* RHS (input/output) DOUBLE PRECISION array, dimension (N).
-* On entry, RHS contains contributions from other subsystems.
-* On exit, RHS contains the solution of the subsystem with
-* entries according to the value of IJOB (see above).
-*
-* RDSUM (input/output) DOUBLE PRECISION
-* On entry, the sum of squares of computed contributions to
-* the Dif-estimate under computation by ZTGSYL, where the
-* scaling factor RDSCAL (see below) has been factored out.
-* On exit, the corresponding sum of squares updated with the
-* contributions from the current sub-system.
-* If TRANS = 'T' RDSUM is not touched.
-* NOTE: RDSUM only makes sense when ZTGSY2 is called by CTGSYL.
-*
-* RDSCAL (input/output) DOUBLE PRECISION
-* On entry, scaling factor used to prevent overflow in RDSUM.
-* On exit, RDSCAL is updated w.r.t. the current contributions
-* in RDSUM.
-* If TRANS = 'T', RDSCAL is not touched.
-* NOTE: RDSCAL only makes sense when ZTGSY2 is called by
-* ZTGSYL.
-*
-* IPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= i <= N, row i of the
-* matrix has been interchanged with row IPIV(i).
-*
-* JPIV (input) INTEGER array, dimension (N).
-* The pivot indices; for 1 <= j <= N, column j of the
-* matrix has been interchanged with column JPIV(j).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* This routine is a further developed implementation of algorithm
-* BSOLVE in [1] using complete pivoting in the LU factorization.
-*
-* [1] Bo Kagstrom and Lars Westin,
-* Generalized Schur Methods with Condition Estimators for
-* Solving the Generalized Sylvester Equation, IEEE Transactions
-* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
-*
-* [2] Peter Poromaa,
-* On Efficient and Robust Estimators for the Separation
-* between two Regular Matrix Pairs with Applications in
-* Condition Estimation. Report UMINF-95.05, Department of
-* Computing Science, Umea University, S-901 87 Umea, Sweden,
-* 1995.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlatps.f b/SRC/zlatps.f
index 3e47d6c1..a25be416 100644
--- a/SRC/zlatps.f
+++ b/SRC/zlatps.f
@@ -1,10 +1,236 @@
+*> \brief \b ZLATPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
+* CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION CNORM( * )
+* COMPLEX*16 AP( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATPS solves one of the triangular systems
+*>
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
+*>
+*> with scaling to prevent overflow, where A is an upper or lower
+*> triangular matrix stored in packed form. Here A**T denotes the
+*> transpose of A, A**H denotes the conjugate transpose of A, x and b
+*> are n-element vectors, and s is a scaling factor, usually less than
+*> or equal to 1, chosen so that the components of x will be less than
+*> the overflow threshold. If the unscaled problem will not cause
+*> overflow, the Level 2 BLAS routine ZTPSV is called. If the matrix A
+*> is singular (A(j,j) = 0 for some j), then s is set to 0 and a
+*> non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T * x = s*b (Transpose)
+*> = 'C': Solve A**H * x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s for the triangular system
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, ZTPSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTPSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T *x = b or
+*> A**H *x = b. The basic algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call ZTPSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
$ CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -16,153 +242,6 @@
COMPLEX*16 AP( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATPS solves one of the triangular systems
-*
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
-*
-* with scaling to prevent overflow, where A is an upper or lower
-* triangular matrix stored in packed form. Here A**T denotes the
-* transpose of A, A**H denotes the conjugate transpose of A, x and b
-* are n-element vectors, and s is a scaling factor, usually less than
-* or equal to 1, chosen so that the components of x will be less than
-* the overflow threshold. If the unscaled problem will not cause
-* overflow, the Level 2 BLAS routine ZTPSV is called. If the matrix A
-* is singular (A(j,j) = 0 for some j), then s is set to 0 and a
-* non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T * x = s*b (Transpose)
-* = 'C': Solve A**H * x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* X (input/output) COMPLEX*16 array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) DOUBLE PRECISION
-* The scaling factor s for the triangular system
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) DOUBLE PRECISION array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, ZTPSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTPSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T *x = b or
-* A**H *x = b. The basic algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call ZTPSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlatrd.f b/SRC/zlatrd.f
index 432552d8..8c664d25 100644
--- a/SRC/zlatrd.f
+++ b/SRC/zlatrd.f
@@ -1,139 +1,174 @@
- SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDW, N, NB
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION E( * )
- COMPLEX*16 A( LDA, * ), TAU( * ), W( LDW, * )
-* ..
-*
+*> \brief \b ZLATRD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION E( * )
+* COMPLEX*16 A( LDA, * ), TAU( * ), W( LDW, * )
+* ..
+*
* Purpose
* =======
*
-* ZLATRD reduces NB rows and columns of a complex Hermitian matrix A to
-* Hermitian tridiagonal form by a unitary similarity
-* transformation Q**H * A * Q, and returns the matrices V and W which are
-* needed to apply the transformation to the unreduced part of A.
-*
-* If UPLO = 'U', ZLATRD reduces the last NB rows and columns of a
-* matrix, of which the upper triangle is supplied;
-* if UPLO = 'L', ZLATRD reduces the first NB rows and columns of a
-* matrix, of which the lower triangle is supplied.
-*
-* This is an auxiliary routine called by ZHETRD.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATRD reduces NB rows and columns of a complex Hermitian matrix A to
+*> Hermitian tridiagonal form by a unitary similarity
+*> transformation Q**H * A * Q, and returns the matrices V and W which are
+*> needed to apply the transformation to the unreduced part of A.
+*>
+*> If UPLO = 'U', ZLATRD reduces the last NB rows and columns of a
+*> matrix, of which the upper triangle is supplied;
+*> if UPLO = 'L', ZLATRD reduces the first NB rows and columns of a
+*> matrix, of which the lower triangle is supplied.
+*>
+*> This is an auxiliary routine called by ZHETRD.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A.
-*
-* NB (input) INTEGER
-* The number of rows and columns to be reduced.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-* On exit:
-* if UPLO = 'U', the last NB columns have been reduced to
-* tridiagonal form, with the diagonal elements overwriting
-* the diagonal elements of A; the elements above the diagonal
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors;
-* if UPLO = 'L', the first NB columns have been reduced to
-* tridiagonal form, with the diagonal elements overwriting
-* the diagonal elements of A; the elements below the diagonal
-* with the array TAU, represent the unitary matrix Q as a
-* product of elementary reflectors.
-* See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> The number of rows and columns to be reduced.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (output) DOUBLE PRECISION array, dimension (N-1)
-* If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
-* elements of the last NB columns of the reduced matrix;
-* if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
-* the first NB columns of the reduced matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (N-1)
-* The scalar factors of the elementary reflectors, stored in
-* TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
-* See Further Details.
+*> \date November 2011
*
-* W (output) COMPLEX*16 array, dimension (LDW,NB)
-* The n-by-nb matrix W required to update the unreduced part
-* of A.
+*> \ingroup complex16OTHERauxiliary
*
-* LDW (input) INTEGER
-* The leading dimension of the array W. LDW >= max(1,N).
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> E (output) DOUBLE PRECISION array, dimension (N-1)
+*> If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
+*> elements of the last NB columns of the reduced matrix;
+*> if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
+*> the first NB columns of the reduced matrix.
+*>
+*> TAU (output) COMPLEX*16 array, dimension (N-1)
+*> The scalar factors of the elementary reflectors, stored in
+*> TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
+*> See Further Details.
+*>
+*> W (output) COMPLEX*16 array, dimension (LDW,NB)
+*> The n-by-nb matrix W required to update the unreduced part
+*> of A.
+*>
+*> LDW (input) INTEGER
+*> The leading dimension of the array W. LDW >= max(1,N).
+*>
+*>
+*> If UPLO = 'U', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(n) H(n-1) . . . H(n-nb+1).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
+*> and tau in TAU(i-1).
+*>
+*> If UPLO = 'L', the matrix Q is represented as a product of elementary
+*> reflectors
+*>
+*> Q = H(1) H(2) . . . H(nb).
+*>
+*> Each H(i) has the form
+*>
+*> H(i) = I - tau * v * v**H
+*>
+*> where tau is a complex scalar, and v is a complex vector with
+*> v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*> and tau in TAU(i).
+*>
+*> The elements of the vectors v together form the n-by-nb matrix V
+*> which is needed, with W, to apply the transformation to the unreduced
+*> part of the matrix, using a Hermitian rank-2k update of the form:
+*> A := A - V*W**H - W*V**H.
+*>
+*> The contents of A on exit are illustrated by the following examples
+*> with n = 5 and nb = 2:
+*>
+*> if UPLO = 'U': if UPLO = 'L':
+*>
+*> ( a a a v4 v5 ) ( d )
+*> ( a a v4 v5 ) ( 1 d )
+*> ( a 1 v5 ) ( v1 1 a )
+*> ( d 1 ) ( v1 v2 a a )
+*> ( d ) ( v1 v2 a a a )
+*>
+*> where d denotes a diagonal element of the reduced matrix, a denotes
+*> an element of the original matrix that is unchanged, and vi denotes
+*> an element of the vector defining H(i).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
*
-* If UPLO = 'U', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(n) H(n-1) . . . H(n-nb+1).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
-* and tau in TAU(i-1).
-*
-* If UPLO = 'L', the matrix Q is represented as a product of elementary
-* reflectors
-*
-* Q = H(1) H(2) . . . H(nb).
-*
-* Each H(i) has the form
-*
-* H(i) = I - tau * v * v**H
-*
-* where tau is a complex scalar, and v is a complex vector with
-* v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-* and tau in TAU(i).
-*
-* The elements of the vectors v together form the n-by-nb matrix V
-* which is needed, with W, to apply the transformation to the unreduced
-* part of the matrix, using a Hermitian rank-2k update of the form:
-* A := A - V*W**H - W*V**H.
-*
-* The contents of A on exit are illustrated by the following examples
-* with n = 5 and nb = 2:
-*
-* if UPLO = 'U': if UPLO = 'L':
-*
-* ( a a a v4 v5 ) ( d )
-* ( a a v4 v5 ) ( 1 d )
-* ( a 1 v5 ) ( v1 1 a )
-* ( d 1 ) ( v1 v2 a a )
-* ( d ) ( v1 v2 a a a )
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where d denotes a diagonal element of the reduced matrix, a denotes
-* an element of the original matrix that is unchanged, and vi denotes
-* an element of the vector defining H(i).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDW, N, NB
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION E( * )
+ COMPLEX*16 A( LDA, * ), TAU( * ), W( LDW, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlatrs.f b/SRC/zlatrs.f
index 19daca18..dea87894 100644
--- a/SRC/zlatrs.f
+++ b/SRC/zlatrs.f
@@ -1,10 +1,244 @@
+*> \brief \b ZLATRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
+* CNORM, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORMIN, TRANS, UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION CNORM( * )
+* COMPLEX*16 A( LDA, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATRS solves one of the triangular systems
+*>
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
+*>
+*> with scaling to prevent overflow. Here A is an upper or lower
+*> triangular matrix, A**T denotes the transpose of A, A**H denotes the
+*> conjugate transpose of A, x and b are n-element vectors, and s is a
+*> scaling factor, usually less than or equal to 1, chosen so that the
+*> components of x will be less than the overflow threshold. If the
+*> unscaled problem will not cause overflow, the Level 2 BLAS routine
+*> ZTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
+*> then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': Solve A * x = s*b (No transpose)
+*> = 'T': Solve A**T * x = s*b (Transpose)
+*> = 'C': Solve A**H * x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*> NORMIN is CHARACTER*1
+*> Specifies whether CNORM has been set or not.
+*> = 'Y': CNORM contains the column norms on entry
+*> = 'N': CNORM is not set on entry. On exit, the norms will
+*> be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max (1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N)
+*> On entry, the right hand side b of the triangular system.
+*> On exit, X is overwritten by the solution vector x.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s for the triangular system
+*> A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
+*> If SCALE = 0, the matrix A is singular or badly scaled, and
+*> the vector x is an exact or approximate solution to A*x = 0.
+*> \endverbatim
+*>
+*> \param[in,out] CNORM
+*> \verbatim
+*> CNORM is or output) DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*> contains the norm of the off-diagonal part of the j-th column
+*> of A. If TRANS = 'N', CNORM(j) must be greater than or equal
+*> to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*> must be greater than or equal to the 1-norm.
+*> \endverbatim
+*> \verbatim
+*> If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*> returns the 1-norm of the offdiagonal part of the j-th column
+*> of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A rough bound on x is computed; if that is less than overflow, ZTRSV
+*> is called, otherwise, specific code is used which checks for possible
+*> overflow or divide-by-zero at every operation.
+*>
+*> A columnwise scheme is used for solving A*x = b. The basic algorithm
+*> if A is lower triangular is
+*>
+*> x[1:n] := b[1:n]
+*> for j = 1, ..., n
+*> x(j) := x(j) / A(j,j)
+*> x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*> end
+*>
+*> Define bounds on the components of x after j iterations of the loop:
+*> M(j) = bound on x[1:j]
+*> G(j) = bound on x[j+1:n]
+*> Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*> Then for iteration j+1 we have
+*> M(j+1) <= G(j) / | A(j+1,j+1) |
+*> G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*> <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*> where CNORM(j+1) is greater than or equal to the infinity-norm of
+*> column j+1 of A, not counting the diagonal. Hence
+*>
+*> G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*> 1<=i<=j
+*> and
+*>
+*> |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*> 1<=i< j
+*>
+*> Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTRSV if the
+*> reciprocal of the largest M(j), j=1,..,n, is larger than
+*> max(underflow, 1/overflow).
+*>
+*> The bound on x(j) is also used to determine when a step in the
+*> columnwise method can be performed without fear of overflow. If
+*> the computed bound is greater than a large constant, x is scaled to
+*> prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*> 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*> Similarly, a row-wise scheme is used to solve A**T *x = b or
+*> A**H *x = b. The basic algorithm for A upper triangular is
+*>
+*> for j = 1, ..., n
+*> x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
+*> end
+*>
+*> We simultaneously compute two bounds
+*> G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
+*> M(j) = bound on x(i), 1<=i<=j
+*>
+*> The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*> add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*> Then the bound on x(j) is
+*>
+*> M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*> <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*> 1<=i<=j
+*>
+*> and we can safely call ZTRSV if 1/M(n) and 1/G(n) are both greater
+*> than max(underflow, 1/overflow).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
$ CNORM, INFO )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORMIN, TRANS, UPLO
@@ -16,158 +250,6 @@
COMPLEX*16 A( LDA, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATRS solves one of the triangular systems
-*
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b,
-*
-* with scaling to prevent overflow. Here A is an upper or lower
-* triangular matrix, A**T denotes the transpose of A, A**H denotes the
-* conjugate transpose of A, x and b are n-element vectors, and s is a
-* scaling factor, usually less than or equal to 1, chosen so that the
-* components of x will be less than the overflow threshold. If the
-* unscaled problem will not cause overflow, the Level 2 BLAS routine
-* ZTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
-* then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': Solve A * x = s*b (No transpose)
-* = 'T': Solve A**T * x = s*b (Transpose)
-* = 'C': Solve A**H * x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* NORMIN (input) CHARACTER*1
-* Specifies whether CNORM has been set or not.
-* = 'Y': CNORM contains the column norms on entry
-* = 'N': CNORM is not set on entry. On exit, the norms will
-* be computed and stored in CNORM.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max (1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (N)
-* On entry, the right hand side b of the triangular system.
-* On exit, X is overwritten by the solution vector x.
-*
-* SCALE (output) DOUBLE PRECISION
-* The scaling factor s for the triangular system
-* A * x = s*b, A**T * x = s*b, or A**H * x = s*b.
-* If SCALE = 0, the matrix A is singular or badly scaled, and
-* the vector x is an exact or approximate solution to A*x = 0.
-*
-* CNORM (input or output) DOUBLE PRECISION array, dimension (N)
-*
-* If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-* contains the norm of the off-diagonal part of the j-th column
-* of A. If TRANS = 'N', CNORM(j) must be greater than or equal
-* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-* must be greater than or equal to the 1-norm.
-*
-* If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-* returns the 1-norm of the offdiagonal part of the j-th column
-* of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* A rough bound on x is computed; if that is less than overflow, ZTRSV
-* is called, otherwise, specific code is used which checks for possible
-* overflow or divide-by-zero at every operation.
-*
-* A columnwise scheme is used for solving A*x = b. The basic algorithm
-* if A is lower triangular is
-*
-* x[1:n] := b[1:n]
-* for j = 1, ..., n
-* x(j) := x(j) / A(j,j)
-* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-* end
-*
-* Define bounds on the components of x after j iterations of the loop:
-* M(j) = bound on x[1:j]
-* G(j) = bound on x[j+1:n]
-* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*
-* Then for iteration j+1 we have
-* M(j+1) <= G(j) / | A(j+1,j+1) |
-* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*
-* where CNORM(j+1) is greater than or equal to the infinity-norm of
-* column j+1 of A, not counting the diagonal. Hence
-*
-* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-* 1<=i<=j
-* and
-*
-* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-* 1<=i< j
-*
-* Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTRSV if the
-* reciprocal of the largest M(j), j=1,..,n, is larger than
-* max(underflow, 1/overflow).
-*
-* The bound on x(j) is also used to determine when a step in the
-* columnwise method can be performed without fear of overflow. If
-* the computed bound is greater than a large constant, x is scaled to
-* prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
-*
-* Similarly, a row-wise scheme is used to solve A**T *x = b or
-* A**H *x = b. The basic algorithm for A upper triangular is
-*
-* for j = 1, ..., n
-* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
-* end
-*
-* We simultaneously compute two bounds
-* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
-* M(j) = bound on x(i), 1<=i<=j
-*
-* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-* Then the bound on x(j) is
-*
-* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
-*
-* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-* 1<=i<=j
-*
-* and we can safely call ZTRSV if 1/M(n) and 1/G(n) are both greater
-* than max(underflow, 1/overflow).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlatrz.f b/SRC/zlatrz.f
index e696f86c..0b3fae90 100644
--- a/SRC/zlatrz.f
+++ b/SRC/zlatrz.f
@@ -1,84 +1,148 @@
- SUBROUTINE ZLATRZ( M, N, L, A, LDA, TAU, WORK )
+*> \brief \b ZLATRZ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER L, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLATRZ( M, N, L, A, LDA, TAU, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER L, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLATRZ factors the M-by-(M+L) complex upper trapezoidal matrix
-* [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z by means
-* of unitary transformations, where Z is an (M+L)-by-(M+L) unitary
-* matrix and, R and A1 are M-by-M upper triangular matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATRZ factors the M-by-(M+L) complex upper trapezoidal matrix
+*> [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z by means
+*> of unitary transformations, where Z is an (M+L)-by-(M+L) unitary
+*> matrix and, R and A1 are M-by-M upper triangular matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing the
-* meaningful part of the Householder vectors. N-M >= L >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing the
+*> meaningful part of the Householder vectors. N-M >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements N-L+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> unitary matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements N-L+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* unitary matrix Z as a product of M elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAU (output) COMPLEX*16 array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \ingroup complex16OTHERcomputational
*
-* WORK (workspace) COMPLEX*16 array, dimension (M)
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an l element vector. tau and z( k )
+*> are chosen to annihilate the elements of the kth row of A2.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A2, such that the elements of z( k ) are
+*> in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A1.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLATRZ( M, N, L, A, LDA, TAU, WORK )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an l element vector. tau and z( k )
-* are chosen to annihilate the elements of the kth row of A2.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A2, such that the elements of z( k ) are
-* in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A1.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER L, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlatzm.f b/SRC/zlatzm.f
index 64f39699..2ea8e3ca 100644
--- a/SRC/zlatzm.f
+++ b/SRC/zlatzm.f
@@ -1,92 +1,164 @@
- SUBROUTINE ZLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE
- INTEGER INCV, LDC, M, N
- COMPLEX*16 TAU
-* ..
-* .. Array Arguments ..
- COMPLEX*16 C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b ZLATZM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE
+* INTEGER INCV, LDC, M, N
+* COMPLEX*16 TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine ZUNMRZ.
-*
-* ZLATZM applies a Householder matrix generated by ZTZRQF to a matrix.
-*
-* Let P = I - tau*u*u**H, u = ( 1 ),
-* ( v )
-* where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
-* SIDE = 'R'.
-*
-* If SIDE equals 'L', let
-* C = [ C1 ] 1
-* [ C2 ] m-1
-* n
-* Then C is overwritten by P*C.
-*
-* If SIDE equals 'R', let
-* C = [ C1, C2 ] m
-* 1 n-1
-* Then C is overwritten by C*P.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine ZUNMRZ.
+*>
+*> ZLATZM applies a Householder matrix generated by ZTZRQF to a matrix.
+*>
+*> Let P = I - tau*u*u**H, u = ( 1 ),
+*> ( v )
+*> where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if
+*> SIDE = 'R'.
+*>
+*> If SIDE equals 'L', let
+*> C = [ C1 ] 1
+*> [ C2 ] m-1
+*> n
+*> Then C is overwritten by P*C.
+*>
+*> If SIDE equals 'R', let
+*> C = [ C1, C2 ] m
+*> 1 n-1
+*> Then C is overwritten by C*P.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': form P * C
-* = 'R': form C * P
-*
-* M (input) INTEGER
-* The number of rows of the matrix C.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C.
-*
-* V (input) COMPLEX*16 array, dimension
-* (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-* (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-* The vector v in the representation of P. V is not used
-* if TAU = 0.
-*
-* INCV (input) INTEGER
-* The increment between elements of v. INCV <> 0
-*
-* TAU (input) COMPLEX*16
-* The value tau in the representation of P.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': form P * C
+*> = 'R': form C * P
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension
+*> (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*> (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*> The vector v in the representation of P. V is not used
+*> if TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between elements of v. INCV <> 0
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16
+*> The value tau in the representation of P.
+*> \endverbatim
+*>
+*> \param[in,out] C1
+*> \verbatim
+*> C1 is COMPLEX*16 array, dimension
+*> (LDC,N) if SIDE = 'L'
+*> (M,1) if SIDE = 'R'
+*> On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
+*> if SIDE = 'R'.
+*> \endverbatim
+*> \verbatim
+*> On exit, the first row of P*C if SIDE = 'L', or the first
+*> column of C*P if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in,out] C2
+*> \verbatim
+*> C2 is COMPLEX*16 array, dimension
+*> (LDC, N) if SIDE = 'L'
+*> (LDC, N-1) if SIDE = 'R'
+*> On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
+*> m x (n - 1) matrix C2 if SIDE = 'R'.
+*> \endverbatim
+*> \verbatim
+*> On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
+*> if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the arrays C1 and C2.
+*> LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L'
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C1 (input/output) COMPLEX*16 array, dimension
-* (LDC,N) if SIDE = 'L'
-* (M,1) if SIDE = 'R'
-* On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1
-* if SIDE = 'R'.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, the first row of P*C if SIDE = 'L', or the first
-* column of C*P if SIDE = 'R'.
+*> \date November 2011
*
-* C2 (input/output) COMPLEX*16 array, dimension
-* (LDC, N) if SIDE = 'L'
-* (LDC, N-1) if SIDE = 'R'
-* On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the
-* m x (n - 1) matrix C2 if SIDE = 'R'.
+*> \ingroup complex16OTHERcomputational
*
-* On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P
-* if SIDE = 'R'.
+* =====================================================================
+ SUBROUTINE ZLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the arrays C1 and C2.
-* LDC >= max(1,M).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L'
-* (M) if SIDE = 'R'
+* .. Scalar Arguments ..
+ CHARACTER SIDE
+ INTEGER INCV, LDC, M, N
+ COMPLEX*16 TAU
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zlauu2.f b/SRC/zlauu2.f
index 3a265c5d..46ae8dde 100644
--- a/SRC/zlauu2.f
+++ b/SRC/zlauu2.f
@@ -1,9 +1,103 @@
+*> \brief \b ZLAUU2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAUU2( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAUU2 computes the product U * U**H or L**H * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
+*>
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
+*>
+*> This is the unblocked form of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the triangular factor stored in the array A
+*> is upper or lower triangular:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the triangular factor U or L. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the triangular factor U or L.
+*> On exit, if UPLO = 'U', the upper triangle of A is
+*> overwritten with the upper triangle of the product U * U**H;
+*> if UPLO = 'L', the lower triangle of A is overwritten with
+*> the lower triangle of the product L**H * L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAUU2( UPLO, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,46 +107,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAUU2 computes the product U * U**H or L**H * L, where the triangular
-* factor U or L is stored in the upper or lower triangular part of
-* the array A.
-*
-* If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
-* overwriting the factor U in A.
-* If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
-* overwriting the factor L in A.
-*
-* This is the unblocked form of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the triangular factor stored in the array A
-* is upper or lower triangular:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the triangular factor U or L. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the triangular factor U or L.
-* On exit, if UPLO = 'U', the upper triangle of A is
-* overwritten with the upper triangle of the product U * U**H;
-* if UPLO = 'L', the lower triangle of A is overwritten with
-* the lower triangle of the product L**H * L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zlauum.f b/SRC/zlauum.f
index df8a3381..cd8524e3 100644
--- a/SRC/zlauum.f
+++ b/SRC/zlauum.f
@@ -1,9 +1,103 @@
+*> \brief \b ZLAUUM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAUUM( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAUUM computes the product U * U**H or L**H * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
+*>
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
+*>
+*> This is the blocked form of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the triangular factor stored in the array A
+*> is upper or lower triangular:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the triangular factor U or L. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the triangular factor U or L.
+*> On exit, if UPLO = 'U', the upper triangle of A is
+*> overwritten with the upper triangle of the product U * U**H;
+*> if UPLO = 'L', the lower triangle of A is overwritten with
+*> the lower triangle of the product L**H * L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZLAUUM( UPLO, N, A, LDA, INFO )
*
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,46 +107,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAUUM computes the product U * U**H or L**H * L, where the triangular
-* factor U or L is stored in the upper or lower triangular part of
-* the array A.
-*
-* If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
-* overwriting the factor U in A.
-* If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
-* overwriting the factor L in A.
-*
-* This is the blocked form of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the triangular factor stored in the array A
-* is upper or lower triangular:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the triangular factor U or L. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the triangular factor U or L.
-* On exit, if UPLO = 'U', the upper triangle of A is
-* overwritten with the upper triangle of the product U * U**H;
-* if UPLO = 'L', the lower triangle of A is overwritten with
-* the lower triangle of the product L**H * L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpbcon.f b/SRC/zpbcon.f
index e9bb3ed3..eb75770a 100644
--- a/SRC/zpbcon.f
+++ b/SRC/zpbcon.f
@@ -1,12 +1,134 @@
+*> \brief \b ZPBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex Hermitian positive definite band matrix using
+*> the Cholesky factorization A = U**H*U or A = L*L**H computed by
+*> ZPBTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor stored in AB;
+*> = 'L': Lower triangular factor stored in AB.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H of the band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of U or L is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm (or infinity-norm) of the Hermitian band matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
$ RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,58 +140,6 @@
COMPLEX*16 AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPBCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex Hermitian positive definite band matrix using
-* the Cholesky factorization A = U**H*U or A = L*L**H computed by
-* ZPBTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor stored in AB;
-* = 'L': Lower triangular factor stored in AB.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H of the band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of U or L is
-* stored in the j-th column of the array AB as follows:
-* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm (or infinity-norm) of the Hermitian band matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpbequ.f b/SRC/zpbequ.f
index 4eb34328..d0111cc8 100644
--- a/SRC/zpbequ.f
+++ b/SRC/zpbequ.f
@@ -1,9 +1,131 @@
+*> \brief \b ZPBEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBEQU computes row and column scalings intended to equilibrate a
+*> Hermitian positive definite band matrix A and reduce its condition
+*> number (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular of A is stored;
+*> = 'L': Lower triangular of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangle of the Hermitian band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,60 +137,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPBEQU computes row and column scalings intended to equilibrate a
-* Hermitian positive definite band matrix A and reduce its condition
-* number (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular of A is stored;
-* = 'L': Lower triangular of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangle of the Hermitian band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KD+1.
-*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
-*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
-*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpbrfs.f b/SRC/zpbrfs.f
index 254c8bc8..1c5e2672 100644
--- a/SRC/zpbrfs.f
+++ b/SRC/zpbrfs.f
@@ -1,12 +1,190 @@
+*> \brief \b ZPBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
+* LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian positive definite
+*> and banded, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangle of the Hermitian band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] AFB
+*> \verbatim
+*> AFB is COMPLEX*16 array, dimension (LDAFB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H of the band matrix A as computed by
+*> ZPBTRF, in the same storage format as A (see AB).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZPBTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
$ LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,91 +196,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPBRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian positive definite
-* and banded, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangle of the Hermitian band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* AFB (input) COMPLEX*16 array, dimension (LDAFB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H of the band matrix A as computed by
-* ZPBTRF, in the same storage format as A (see AB).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= KD+1.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZPBTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpbstf.f b/SRC/zpbstf.f
index b63fba71..c18bbd30 100644
--- a/SRC/zpbstf.f
+++ b/SRC/zpbstf.f
@@ -1,103 +1,158 @@
- SUBROUTINE ZPBSTF( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AB( LDAB, * )
-* ..
-*
+*> \brief \b ZPBSTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBSTF( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPBSTF computes a split Cholesky factorization of a complex
-* Hermitian positive definite band matrix A.
-*
-* This routine is designed to be used in conjunction with ZHBGST.
-*
-* The factorization has the form A = S**H*S where S is a band matrix
-* of the same bandwidth as A and the following structure:
-*
-* S = ( U )
-* ( M L )
-*
-* where U is upper triangular of order m = (n+kd)/2, and L is lower
-* triangular of order n-m.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBSTF computes a split Cholesky factorization of a complex
+*> Hermitian positive definite band matrix A.
+*>
+*> This routine is designed to be used in conjunction with ZHBGST.
+*>
+*> The factorization has the form A = S**H*S where S is a band matrix
+*> of the same bandwidth as A and the following structure:
+*>
+*> S = ( U )
+*> ( M L )
+*>
+*> where U is upper triangular of order m = (n+kd)/2, and L is lower
+*> triangular of order n-m.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first kd+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first kd+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the factor S from the split Cholesky
-* factorization A = S**H*S. See Further Details.
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the factorization could not be completed,
-* because the updated element a(i,i) was negative; the
-* matrix A is not positive definite.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* factorization A = S**H*S. See Further Details.
+*>
+*> LDAB (input) INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the factorization could not be completed,
+*> because the updated element a(i,i) was negative; the
+*> matrix A is not positive definite.
+*>
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 7, KD = 2:
+*>
+*> S = ( s11 s12 s13 )
+*> ( s22 s23 s24 )
+*> ( s33 s34 )
+*> ( s44 )
+*> ( s53 s54 s55 )
+*> ( s64 s65 s66 )
+*> ( s75 s76 s77 )
+*>
+*> If UPLO = 'U', the array AB holds:
+*>
+*> on entry: on exit:
+*>
+*> * * a13 a24 a35 a46 a57 * * s13 s24 s53**H s64**H s75**H
+*> * a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54**H s65**H s76**H
+*> a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
+*>
+*> If UPLO = 'L', the array AB holds:
+*>
+*> on entry: on exit:
+*>
+*> a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
+*> a21 a32 a43 a54 a65 a76 * s12**H s23**H s34**H s54 s65 s76 *
+*> a31 a42 a53 a64 a64 * * s13**H s24**H s53 s64 s75 * *
+*>
+*> Array elements marked * are not used by the routine; s12**H denotes
+*> conjg(s12); the diagonal elements of S are real.
+
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPBSTF( UPLO, N, KD, AB, LDAB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 7, KD = 2:
-*
-* S = ( s11 s12 s13 )
-* ( s22 s23 s24 )
-* ( s33 s34 )
-* ( s44 )
-* ( s53 s54 s55 )
-* ( s64 s65 s66 )
-* ( s75 s76 s77 )
-*
-* If UPLO = 'U', the array AB holds:
-*
-* on entry: on exit:
-*
-* * * a13 a24 a35 a46 a57 * * s13 s24 s53**H s64**H s75**H
-* * a12 a23 a34 a45 a56 a67 * s12 s23 s34 s54**H s65**H s76**H
-* a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
-*
-* If UPLO = 'L', the array AB holds:
-*
-* on entry: on exit:
-*
-* a11 a22 a33 a44 a55 a66 a77 s11 s22 s33 s44 s55 s66 s77
-* a21 a32 a43 a54 a65 a76 * s12**H s23**H s34**H s54 s65 s76 *
-* a31 a42 a53 a64 a64 * * s13**H s24**H s53 s64 s75 * *
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine; s12**H denotes
-* conjg(s12); the diagonal elements of S are real.
-
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpbsv.f b/SRC/zpbsv.f
index 923a3758..9ecc01e9 100644
--- a/SRC/zpbsv.f
+++ b/SRC/zpbsv.f
@@ -1,104 +1,176 @@
- SUBROUTINE ZPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AB( LDAB, * ), B( LDB, * )
-* ..
-*
+*> \brief <b> ZPBSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPBSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite band matrix and X
-* and B are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular band matrix, and L is a lower
-* triangular band matrix, with the same number of superdiagonals or
-* subdiagonals as A. The factored form of A is then used to solve the
-* system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite band matrix and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular band matrix, and L is a lower
+*> triangular band matrix, with the same number of superdiagonals or
+*> subdiagonals as A. The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
-* See below for further details.
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H *U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H *U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup complex16OTHERsolve
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* On entry: On exit:
-*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* On entry: On exit:
-*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpbsvx.f b/SRC/zpbsvx.f
index 381fae94..3e1baa71 100644
--- a/SRC/zpbsvx.f
+++ b/SRC/zpbsvx.f
@@ -1,11 +1,345 @@
+*> \brief <b> ZPBSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
+* EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * ), S( * )
+* COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
+*> compute the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite band matrix and X
+*> and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular band matrix, and L is a lower
+*> triangular band matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFB contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. AB and AFB will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AFB and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFB and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right-hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array, except
+*> if FACT = 'F' and EQUED = 'Y', then A must contain the
+*> equilibrated matrix diag(S)*A*diag(S). The j-th column of A
+*> is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array A. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] AFB
+*> \verbatim
+*> AFB is or output) COMPLEX*16 array, dimension (LDAFB,N)
+*> If FACT = 'F', then AFB is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H of the band matrix
+*> A, in the same storage format as A (see AB). If EQUED = 'Y',
+*> then AFB is the factored form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFB is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFB is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAFB
+*> \verbatim
+*> LDAFB is INTEGER
+*> The leading dimension of the array AFB. LDAFB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13
+*> a22 a23 a24
+*> a33 a34 a35
+*> a44 a45 a46
+*> a55 a56
+*> (aij=conjg(aji)) a66
+*>
+*> Band storage of the upper triangle of A:
+*>
+*> * * a13 a24 a35 a46
+*> * a12 a23 a34 a45 a56
+*> a11 a22 a33 a44 a55 a66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> a11 a22 a33 a44 a55 a66
+*> a21 a32 a43 a54 a65 *
+*> a31 a42 a53 a64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
$ EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
$ WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -18,225 +352,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPBSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
-* compute the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite band matrix and X
-* and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular band matrix, and L is a lower
-* triangular band matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFB contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. AB and AFB will not
-* be modified.
-* = 'N': The matrix A will be copied to AFB and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFB and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right-hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array, except
-* if FACT = 'F' and EQUED = 'Y', then A must contain the
-* equilibrated matrix diag(S)*A*diag(S). The j-th column of A
-* is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD).
-* See below for further details.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array A. LDAB >= KD+1.
-*
-* AFB (input or output) COMPLEX*16 array, dimension (LDAFB,N)
-* If FACT = 'F', then AFB is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H of the band matrix
-* A, in the same storage format as A (see AB). If EQUED = 'Y',
-* then AFB is the factored form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFB is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H.
-*
-* If FACT = 'E', then AFB is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAFB (input) INTEGER
-* The leading dimension of the array AFB. LDAFB >= KD+1.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13
-* a22 a23 a24
-* a33 a34 a35
-* a44 a45 a46
-* a55 a56
-* (aij=conjg(aji)) a66
-*
-* Band storage of the upper triangle of A:
-*
-* * * a13 a24 a35 a46
-* * a12 a23 a34 a45 a56
-* a11 a22 a33 a44 a55 a66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* a11 a22 a33 a44 a55 a66
-* a21 a32 a43 a54 a65 *
-* a31 a42 a53 a64 * *
-*
-* Array elements marked * are not used by the routine.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpbtf2.f b/SRC/zpbtf2.f
index 6936b9fa..c4182854 100644
--- a/SRC/zpbtf2.f
+++ b/SRC/zpbtf2.f
@@ -1,91 +1,154 @@
- SUBROUTINE ZPBTF2( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AB( LDAB, * )
-* ..
-*
+*> \brief \b ZPBTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBTF2( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPBTF2 computes the Cholesky factorization of a complex Hermitian
-* positive definite band matrix A.
-*
-* The factorization has the form
-* A = U**H * U , if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix, U**H is the conjugate transpose
-* of U, and L is lower triangular.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBTF2 computes the Cholesky factorization of a complex Hermitian
+*> positive definite band matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U , if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix, U**H is the conjugate transpose
+*> of U, and L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H *U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite, and the factorization could not be
-* completed.
-*
-* Further Details
-* ===============
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H *U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On entry: On exit:
+*> \date November 2011
*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*> \ingroup complex16OTHERcomputational
*
-* Similarly, if UPLO = 'L' the format of A is as follows:
*
-* On entry: On exit:
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPBTF2( UPLO, N, KD, AB, LDAB, INFO )
*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Array elements marked * are not used by the routine.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpbtrf.f b/SRC/zpbtrf.f
index 57963100..6dcf78b0 100644
--- a/SRC/zpbtrf.f
+++ b/SRC/zpbtrf.f
@@ -1,89 +1,152 @@
- SUBROUTINE ZPBTRF( UPLO, N, KD, AB, LDAB, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AB( LDAB, * )
-* ..
-*
+*> \brief \b ZPBTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBTRF( UPLO, N, KD, AB, LDAB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPBTRF computes the Cholesky factorization of a complex Hermitian
-* positive definite band matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite band matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> On entry, the upper or lower triangle of the Hermitian band
+*> matrix A, stored in the first KD+1 rows of the array. The
+*> j-th column of A is stored in the j-th column of the array AB
+*> as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H*U or A = L*L**H of the band
+*> matrix A, in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AB (input/output) COMPLEX*16 array, dimension (LDAB,N)
-* On entry, the upper or lower triangle of the Hermitian band
-* matrix A, stored in the first KD+1 rows of the array. The
-* j-th column of A is stored in the j-th column of the array AB
-* as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H*U or A = L*L**H of the band
-* matrix A, in the same storage format as A.
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The band storage scheme is illustrated by the following example, when
+*> N = 6, KD = 2, and UPLO = 'U':
+*>
+*> On entry: On exit:
+*>
+*> * * a13 a24 a35 a46 * * u13 u24 u35 u46
+*> * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
+*> a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
+*>
+*> Similarly, if UPLO = 'L' the format of A is as follows:
+*>
+*> On entry: On exit:
+*>
+*> a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
+*> a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
+*> a31 a42 a53 a64 * * l31 l42 l53 l64 * *
+*>
+*> Array elements marked * are not used by the routine.
+*>
+*> Contributed by
+*> Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPBTRF( UPLO, N, KD, AB, LDAB, INFO )
*
-* The band storage scheme is illustrated by the following example, when
-* N = 6, KD = 2, and UPLO = 'U':
-*
-* On entry: On exit:
-*
-* * * a13 a24 a35 a46 * * u13 u24 u35 u46
-* * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56
-* a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66
-*
-* Similarly, if UPLO = 'L' the format of A is as follows:
-*
-* On entry: On exit:
-*
-* a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66
-* a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 *
-* a31 a42 a53 a64 * * l31 l42 l53 l64 * *
-*
-* Array elements marked * are not used by the routine.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Contributed by
-* Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AB( LDAB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpbtrs.f b/SRC/zpbtrs.f
index fe59a3dd..410ca83b 100644
--- a/SRC/zpbtrs.f
+++ b/SRC/zpbtrs.f
@@ -1,64 +1,130 @@
- SUBROUTINE ZPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, KD, LDAB, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AB( LDAB, * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZPBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPBTRS solves a system of linear equations A*X = B with a Hermitian
-* positive definite band matrix A using the Cholesky factorization
-* A = U**H *U or A = L*L**H computed by ZPBTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBTRS solves a system of linear equations A*X = B with a Hermitian
+*> positive definite band matrix A using the Cholesky factorization
+*> A = U**H *U or A = L*L**H computed by ZPBTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor stored in AB;
-* = 'L': Lower triangular factor stored in AB.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals of the matrix A if UPLO = 'U',
-* or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor stored in AB;
+*> = 'L': Lower triangular factor stored in AB.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals of the matrix A if UPLO = 'U',
+*> or the number of subdiagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H *U or A = L*L**H of the band matrix A, stored in the
+*> first KD+1 rows of the array. The j-th column of U or L is
+*> stored in the j-th column of the array AB as follows:
+*> if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H *U or A = L*L**H of the band matrix A, stored in the
-* first KD+1 rows of the array. The j-th column of U or L is
-* stored in the j-th column of the array AB as follows:
-* if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd).
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup complex16OTHERcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE ZPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AB( LDAB, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpftrf.f b/SRC/zpftrf.f
index b81d963c..39f910d6 100644
--- a/SRC/zpftrf.f
+++ b/SRC/zpftrf.f
@@ -1,175 +1,241 @@
- SUBROUTINE ZPFTRF( TRANSR, UPLO, N, A, INFO )
+*> \brief \b ZPFTRF
*
-* -- LAPACK routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 ----
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER N, INFO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( 0: * )
+* Definition
+* ==========
*
+* SUBROUTINE ZPFTRF( TRANSR, UPLO, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( 0: * )
+*
* Purpose
* =======
*
-* ZPFTRF computes the Cholesky factorization of a complex Hermitian
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the block version of the algorithm, calling Level 3 BLAS.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPFTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the block version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of RFP A is stored;
-* = 'L': Lower triangle of RFP A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX array, dimension ( N*(N+1)/2 );
-* On entry, the Hermitian matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
-* the Conjugate-transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A. If UPLO = 'L' the RFP A contains the elements
-* of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
-* 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
-* is odd. See the Note below for more details.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization RFP A = U**H*U or RFP A = L*L**H.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
-* Further Notes on RFP Format:
-* ============================
-*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of RFP A is stored;
+*> = 'L': Lower triangle of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( N*(N+1)/2 );
+*> On entry, the Hermitian matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
+*> the Conjugate-transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A. If UPLO = 'L' the RFP A contains the elements
+*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
+*> 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
+*> is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization RFP A = U**H*U or RFP A = L*L**H.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*> \verbatim
+*> Further Notes on RFP Format:
+*> ============================
+*> \endverbatim
+*> \verbatim
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*> \endverbatim
+*> \verbatim
+*> AP is Upper AP is Lower
+*> \endverbatim
+*> \verbatim
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*> \endverbatim
+*> \verbatim
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*> \endverbatim
+*> \verbatim
+*> RFP A RFP A
+*> \endverbatim
+*> \verbatim
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*> \endverbatim
+*> \verbatim
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*> \endverbatim
+*> \verbatim
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*> \endverbatim
+*> \verbatim
+*> RFP A RFP A
+*> \endverbatim
+*> \verbatim
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*> \endverbatim
+*> \verbatim
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*> \endverbatim
+*> \verbatim
+*> AP is Upper AP is Lower
+*> \endverbatim
+*> \verbatim
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*> \endverbatim
+*> \verbatim
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*> \endverbatim
+*> \verbatim
+*> RFP A RFP A
+*> \endverbatim
+*> \verbatim
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*> \endverbatim
+*> \verbatim
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*> \endverbatim
+*> \verbatim
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*> \endverbatim
+*> \verbatim
+*> RFP A RFP A
+*> \endverbatim
+*> \verbatim
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE ZPFTRF( TRANSR, UPLO, N, A, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER N, INFO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( 0: * )
*
* =====================================================================
*
diff --git a/SRC/zpftri.f b/SRC/zpftri.f
index 63cf2220..aa75d424 100644
--- a/SRC/zpftri.f
+++ b/SRC/zpftri.f
@@ -1,167 +1,223 @@
- SUBROUTINE ZPFTRI( TRANSR, UPLO, N, A, INFO )
+*> \brief \b ZPFTRI
*
-* -- LAPACK routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* .. Array Arguments ..
- COMPLEX*16 A( 0: * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZPFTRI( TRANSR, UPLO, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* .. Array Arguments ..
+* COMPLEX*16 A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* ZPFTRI computes the inverse of a complex Hermitian positive definite
-* matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
-* computed by ZPFTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPFTRI computes the inverse of a complex Hermitian positive definite
+*> matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
+*> computed by ZPFTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension ( N*(N+1)/2 );
-* On entry, the Hermitian matrix A in RFP format. RFP format is
-* described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
-* then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
-* the Conjugate-transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A. If UPLO = 'L' the RFP A contains the elements
-* of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
-* 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
-* is odd. See the Note below for more details.
-*
-* On exit, the Hermitian inverse of the original matrix, in the
-* same storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
-* Further Details
-* ===============
-*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( N*(N+1)/2 );
+*> On entry, the Hermitian matrix A in RFP format. RFP format is
+*> described by TRANSR, UPLO, and N as follows: If TRANSR = 'N'
+*> then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
+*> the Conjugate-transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A. If UPLO = 'L' the RFP A contains the elements
+*> of lower packed A. The LDA of RFP A is (N+1)/2 when TRANSR =
+*> 'C'. When TRANSR is 'N' the LDA is N+1 when N is even and N
+*> is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the Hermitian inverse of the original matrix, in the
+*> same storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RFP A RFP A
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
+*> \date November 2011
*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
+*> \ingroup complex16OTHERcomputational
*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPFTRI( TRANSR, UPLO, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* .. Array Arguments ..
+ COMPLEX*16 A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpftrs.f b/SRC/zpftrs.f
index daa2fcb6..d89dc499 100644
--- a/SRC/zpftrs.f
+++ b/SRC/zpftrs.f
@@ -1,166 +1,231 @@
- SUBROUTINE ZPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( 0: * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZPFTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( 0: * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPFTRS solves a system of linear equations A*X = B with a Hermitian
-* positive definite matrix A using the Cholesky factorization
-* A = U**H*U or A = L*L**H computed by ZPFTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPFTRS solves a system of linear equations A*X = B with a Hermitian
+*> positive definite matrix A using the Cholesky factorization
+*> A = U**H*U or A = L*L**H computed by ZPFTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of RFP A is stored;
-* = 'L': Lower triangle of RFP A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of RFP A is stored;
+*> = 'L': Lower triangle of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( N*(N+1)/2 );
+*> The triangular factor U or L from the Cholesky factorization
+*> of RFP A = U**H*U or RFP A = L*L**H, as computed by ZPFTRF.
+*> See note below for more details about RFP A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension ( N*(N+1)/2 );
-* The triangular factor U or L from the Cholesky factorization
-* of RFP A = U**H*U or RFP A = L*L**H, as computed by ZPFTRF.
-* See note below for more details about RFP A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( 0: * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpocon.f b/SRC/zpocon.f
index a8779901..481644b1 100644
--- a/SRC/zpocon.f
+++ b/SRC/zpocon.f
@@ -1,12 +1,122 @@
+*> \brief \b ZPOCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex Hermitian positive definite matrix using the
+*> Cholesky factorization A = U**H*U or A = L*L**H computed by ZPOTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm (or infinity-norm) of the Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POcomputational
+*
+* =====================================================================
SUBROUTINE ZPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,49 +128,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex Hermitian positive definite matrix using the
-* Cholesky factorization A = U**H*U or A = L*L**H computed by ZPOTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by ZPOTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm (or infinity-norm) of the Hermitian matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpoequ.f b/SRC/zpoequ.f
index 5e996594..b021f2f9 100644
--- a/SRC/zpoequ.f
+++ b/SRC/zpoequ.f
@@ -1,62 +1,123 @@
- SUBROUTINE ZPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- DOUBLE PRECISION AMAX, SCOND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION S( * )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZPOEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZPOEQU computes row and column scalings intended to equilibrate a
-* Hermitian positive definite matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOEQU computes row and column scalings intended to equilibrate a
+*> Hermitian positive definite matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The N-by-N Hermitian positive definite matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The N-by-N Hermitian positive definite matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup complex16POcomputational
*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE ZPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION S( * )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpoequb.f b/SRC/zpoequb.f
index 24c30e1e..24651cb3 100644
--- a/SRC/zpoequb.f
+++ b/SRC/zpoequb.f
@@ -1,67 +1,123 @@
- SUBROUTINE ZPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- November 2008 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
-*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- DOUBLE PRECISION AMAX, SCOND
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * )
- DOUBLE PRECISION S( * )
-* ..
-*
+*> \brief \b ZPOEQUB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* DOUBLE PRECISION S( * )
+* ..
+*
* Purpose
* =======
*
-* ZPOEQUB computes row and column scalings intended to equilibrate a
-* symmetric positive definite matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOEQUB computes row and column scalings intended to equilibrate a
+*> symmetric positive definite matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The N-by-N symmetric positive definite matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The N-by-N symmetric positive definite matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+*> \ingroup complex16POcomputational
*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+* =====================================================================
+ SUBROUTINE ZPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * )
+ DOUBLE PRECISION S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zporfs.f b/SRC/zporfs.f
index ad242d7e..039556ed 100644
--- a/SRC/zporfs.f
+++ b/SRC/zporfs.f
@@ -1,12 +1,184 @@
+*> \brief \b ZPORFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
+* LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPORFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian positive definite,
+*> and provides error bounds and backward error estimates for the
+*> solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZPOTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POcomputational
+*
+* =====================================================================
SUBROUTINE ZPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
$ LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,88 +190,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPORFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian positive definite,
-* and provides error bounds and backward error estimates for the
-* solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The Hermitian matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by ZPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZPOTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/zporfsx.f b/SRC/zporfsx.f
index 553b3991..384470fb 100644
--- a/SRC/zporfsx.f
+++ b/SRC/zporfsx.f
@@ -1,18 +1,414 @@
+*> \brief \b ZPORFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, S, B,
+* LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* DOUBLE PRECISION RWORK( * ), S( * ), PARAMS(*), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZPORFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric positive
+*> definite, and provides error bounds and backward error estimates
+*> for the solution. In addition to normwise error bound, the code
+*> provides maximum componentwise error bound if possible. See
+*> comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
+*> error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**T*U or A = L*L**T, as computed by DPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POcomputational
+*
+* =====================================================================
SUBROUTINE ZPORFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, S, B,
$ LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -27,269 +423,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPORFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric positive
-* definite, and provides error bounds and backward error estimates
-* for the solution. In addition to normwise error bound, the code
-* provides maximum componentwise error bound if possible. See
-* comments for ERR_BNDS_NORM and ERR_BNDS_COMP for details of the
-* error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**T*U or A = L*L**T, as computed by DPOTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zposv.f b/SRC/zposv.f
index fa5e9ef3..8c31a302 100644
--- a/SRC/zposv.f
+++ b/SRC/zposv.f
@@ -1,9 +1,132 @@
+*> \brief <b> ZPOSV computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**H* U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix. The factored form of A is then used to solve the system of
+*> equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POsolve
+*
+* =====================================================================
SUBROUTINE ZPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,65 +136,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**H* U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix. The factored form of A is then used to solve the system of
-* equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
-*
* =====================================================================
*
* .. External Functions ..
diff --git a/SRC/zposvx.f b/SRC/zposvx.f
index 8da07b30..54b03785 100644
--- a/SRC/zposvx.f
+++ b/SRC/zposvx.f
@@ -1,11 +1,307 @@
+*> \brief <b> ZPOSVX computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
+* S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * ), S( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
+*> compute the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**H* U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. A and AF will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A, except if FACT = 'F' and
+*> EQUED = 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced. A is not modified if
+*> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX*16 array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H, in the same storage
+*> format as A. If EQUED .ne. 'N', then AF is the factored form
+*> of the equilibrated matrix diag(S)*A*diag(S).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS righthand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POsolve
+*
+* =====================================================================
SUBROUTINE ZPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -18,195 +314,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOSVX uses the Cholesky factorization A = U**H*U or A = L*L**H to
-* compute the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix and X and B
-* are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**H* U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. A and AF will not
-* be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A, except if FACT = 'F' and
-* EQUED = 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced. A is not modified if
-* FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX*16 array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H, in the same storage
-* format as A. If EQUED .ne. 'N', then AF is the factored form
-* of the equilibrated matrix diag(S)*A*diag(S).
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H of the original
-* matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS righthand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zposvxx.f b/SRC/zposvxx.f
index 155278e9..0e0c1886 100644
--- a/SRC/zposvxx.f
+++ b/SRC/zposvxx.f
@@ -1,18 +1,514 @@
+*> \brief <b> ZPOSVXX computes the solution to system of linear equations A * X = B for PO matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
+* S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ), RWORK( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T
+*> to compute the solution to a complex*16 system of linear equations
+*> A * X = B, where A is an N-by-N symmetric positive definite matrix
+*> and X and B are N-by-NRHS matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. ZPOSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> ZPOSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> ZPOSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what ZPOSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**T* U, if UPLO = 'U', or
+*> A = L * L**T, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A (see argument RCOND). If the reciprocal of the condition number
+*> is less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF contains the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A and AF are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the symmetric matrix A, except if FACT = 'F' and EQUED =
+*> 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper
+*> triangular part of A contains the upper triangular part of the
+*> matrix A, and the strictly lower triangular part of A is not
+*> referenced. If UPLO = 'L', the leading N-by-N lower triangular
+*> part of A contains the lower triangular part of the matrix A, and
+*> the strictly upper triangular part of A is not referenced. A is
+*> not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
+*> 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX*16 array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T, in the same storage
+*> format as A. If EQUED .ne. 'N', then AF is the factored
+*> form of the equilibrated matrix diag(S)*A*diag(S).
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AF is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**T*U or A = L*L**T of the equilibrated
+*> matrix A (see the description of A for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The row scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POsolve
+*
+* =====================================================================
SUBROUTINE ZPOSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -27,360 +523,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOSVXX uses the Cholesky factorization A = U**T*U or A = L*L**T
-* to compute the solution to a complex*16 system of linear equations
-* A * X = B, where A is an N-by-N symmetric positive definite matrix
-* and X and B are N-by-NRHS matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. ZPOSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* ZPOSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* ZPOSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what ZPOSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**T* U, if UPLO = 'U', or
-* A = L * L**T, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A (see argument RCOND). If the reciprocal of the condition number
-* is less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF contains the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A and AF are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A, except if FACT = 'F' and EQUED =
-* 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). If UPLO = 'U', the leading N-by-N upper
-* triangular part of A contains the upper triangular part of the
-* matrix A, and the strictly lower triangular part of A is not
-* referenced. If UPLO = 'L', the leading N-by-N lower triangular
-* part of A contains the lower triangular part of the matrix A, and
-* the strictly upper triangular part of A is not referenced. A is
-* not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED =
-* 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX*16 array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T, in the same storage
-* format as A. If EQUED .ne. 'N', then AF is the factored
-* form of the equilibrated matrix diag(S)*A*diag(S).
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the original
-* matrix A.
-*
-* If FACT = 'E', then AF is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**T*U or A = L*L**T of the equilibrated
-* matrix A (see the description of A for the form of the
-* equilibrated matrix).
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The row scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zpotf2.f b/SRC/zpotf2.f
index 5a923c5a..d27b3e9e 100644
--- a/SRC/zpotf2.f
+++ b/SRC/zpotf2.f
@@ -1,9 +1,111 @@
+*> \brief \b ZPOTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOTF2( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOTF2 computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U , if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POcomputational
+*
+* =====================================================================
SUBROUTINE ZPOTF2( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,53 +115,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOTF2 computes the Cholesky factorization of a complex Hermitian
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U , if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpotrf.f b/SRC/zpotrf.f
index 3c6f270d..29b06055 100644
--- a/SRC/zpotrf.f
+++ b/SRC/zpotrf.f
@@ -1,9 +1,109 @@
+*> \brief \b ZPOTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOTRF( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the block version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the Hermitian matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**H *U or A = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POcomputational
+*
+* =====================================================================
SUBROUTINE ZPOTRF( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,51 +113,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOTRF computes the Cholesky factorization of a complex Hermitian
-* positive definite matrix A.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
-*
-* This is the block version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the Hermitian matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H *U or A = L*L**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpotri.f b/SRC/zpotri.f
index dee160ea..f17a7f8c 100644
--- a/SRC/zpotri.f
+++ b/SRC/zpotri.f
@@ -1,9 +1,96 @@
+*> \brief \b ZPOTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOTRI( UPLO, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOTRI computes the inverse of a complex Hermitian positive definite
+*> matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
+*> computed by ZPOTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, as computed by
+*> ZPOTRF.
+*> On exit, the upper or lower triangle of the (Hermitian)
+*> inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16POcomputational
+*
+* =====================================================================
SUBROUTINE ZPOTRI( UPLO, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,39 +100,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOTRI computes the inverse of a complex Hermitian positive definite
-* matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
-* computed by ZPOTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, as computed by
-* ZPOTRF.
-* On exit, the upper or lower triangle of the (Hermitian)
-* inverse of A, overwriting the input factor U or L.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
* =====================================================================
*
* .. External Functions ..
diff --git a/SRC/zpotrs.f b/SRC/zpotrs.f
index 01af8f34..3e486d52 100644
--- a/SRC/zpotrs.f
+++ b/SRC/zpotrs.f
@@ -1,56 +1,119 @@
- SUBROUTINE ZPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZPOTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPOTRS solves a system of linear equations A*X = B with a Hermitian
-* positive definite matrix A using the Cholesky factorization
-* A = U**H * U or A = L * L**H computed by ZPOTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOTRS solves a system of linear equations A*X = B with a Hermitian
+*> positive definite matrix A using the Cholesky factorization
+*> A = U**H * U or A = L * L**H computed by ZPOTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H * U or A = L * L**H, as computed by ZPOTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H * U or A = L * L**H, as computed by ZPOTRF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complex16POcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE ZPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zppcon.f b/SRC/zppcon.f
index 67d5751e..b6808d75 100644
--- a/SRC/zppcon.f
+++ b/SRC/zppcon.f
@@ -1,11 +1,119 @@
+*> \brief \b ZPPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPCON( UPLO, N, AP, ANORM, RCOND, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex Hermitian positive definite packed matrix using
+*> the Cholesky factorization A = U**H*U or A = L*L**H computed by
+*> ZPPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, packed columnwise in a linear
+*> array. The j-th column of U or L is stored in the array AP
+*> as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm (or infinity-norm) of the Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPPCON( UPLO, N, AP, ANORM, RCOND, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,51 +125,6 @@
COMPLEX*16 AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPPCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex Hermitian positive definite packed matrix using
-* the Cholesky factorization A = U**H*U or A = L*L**H computed by
-* ZPPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, packed columnwise in a linear
-* array. The j-th column of U or L is stored in the array AP
-* as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm (or infinity-norm) of the Hermitian matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zppequ.f b/SRC/zppequ.f
index 92478f9a..c1de9f48 100644
--- a/SRC/zppequ.f
+++ b/SRC/zppequ.f
@@ -1,9 +1,118 @@
+*> \brief \b ZPPEQU
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION AMAX, SCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPEQU computes row and column scalings intended to equilibrate a
+*> Hermitian positive definite matrix A in packed storage and reduce
+*> its condition number (with respect to the two-norm). S contains the
+*> scale factors, S(i)=1/sqrt(A(i,i)), chosen so that the scaled matrix
+*> B with elements B(i,j)=S(i)*A(i,j)*S(j) has ones on the diagonal.
+*> This choice of S puts the condition number of B within a factor N of
+*> the smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,53 +124,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPPEQU computes row and column scalings intended to equilibrate a
-* Hermitian positive definite matrix A in packed storage and reduce
-* its condition number (with respect to the two-norm). S contains the
-* scale factors, S(i)=1/sqrt(A(i,i)), chosen so that the scaled matrix
-* B with elements B(i,j)=S(i)*A(i,j)*S(j) has ones on the diagonal.
-* This choice of S puts the condition number of B within a factor N of
-* the smallest possible condition number over all possible diagonal
-* scalings.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
-*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
-*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpprfs.f b/SRC/zpprfs.f
index 99d3a2f7..c62201a5 100644
--- a/SRC/zpprfs.f
+++ b/SRC/zpprfs.f
@@ -1,12 +1,172 @@
+*> \brief \b ZPPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
+* BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian positive definite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H*U or A = L*L**H, as computed by DPPTRF/ZPPTRF,
+*> packed columnwise in a linear array in the same format as A
+*> (see AP).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZPPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
$ BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,82 +178,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian positive definite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H*U or A = L*L**H, as computed by DPPTRF/ZPPTRF,
-* packed columnwise in a linear array in the same format as A
-* (see AP).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZPPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/zppsv.f b/SRC/zppsv.f
index d7114485..6aa3656d 100644
--- a/SRC/zppsv.f
+++ b/SRC/zppsv.f
@@ -1,90 +1,156 @@
- SUBROUTINE ZPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> ZPPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPPSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix stored in
-* packed format and X and B are N-by-NRHS matrices.
-*
-* The Cholesky decomposition is used to factor A as
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is a lower triangular
-* matrix. The factored form of A is then used to solve the system of
-* equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix stored in
+*> packed format and X and B are N-by-NRHS matrices.
+*>
+*> The Cholesky decomposition is used to factor A as
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is a lower triangular
+*> matrix. The factored form of A is then used to solve the system of
+*> equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, in the same storage
+*> format as A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i of A is not
+*> positive definite, so the factorization could not be
+*> completed, and the solution has not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, in the same storage
-* format as A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup complex16OTHERsolve
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i of A is not
-* positive definite, so the factorization could not be
-* completed, and the solution has not been computed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zppsvx.f b/SRC/zppsvx.f
index 2c116ae0..a3396629 100644
--- a/SRC/zppsvx.f
+++ b/SRC/zppsvx.f
@@ -1,10 +1,314 @@
+*> \brief <b> ZPPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
+* X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * ), S( * )
+* COMPLEX*16 AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPSVX uses the Cholesky factorization A = U**H * U or A = L * L**H to
+*> compute the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N Hermitian positive definite matrix stored in
+*> packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*> the system:
+*> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
+*> factor the matrix A (after equilibration if FACT = 'E') as
+*> A = U**H * U , if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix, L is a lower triangular
+*> matrix, and **H indicates conjugate transpose.
+*>
+*> 3. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(S) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AFP contains the factored form of A.
+*> If EQUED = 'Y', the matrix A has been equilibrated
+*> with scaling factors given by S. AP and AFP will not
+*> be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array, except if FACT = 'F'
+*> and EQUED = 'Y', then A must contain the equilibrated matrix
+*> diag(S)*A*diag(S). The j-th column of A is stored in the
+*> array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details. A is not modified if
+*> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) COMPLEX*16 array, dimension (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, in the same storage
+*> format as A. If EQUED .ne. 'N', then AFP is the factored
+*> form of the equilibrated matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H * U or A = L * L**H of the original
+*> matrix A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'E', then AFP is an output argument and on exit
+*> returns the triangular factor U or L from the Cholesky
+*> factorization A = U**H * U or A = L * L**H of the equilibrated
+*> matrix A (see the description of AP for the form of the
+*> equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Equilibration was done, i.e., A has been replaced by
+*> diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A; not accessed if EQUED = 'N'. S is
+*> an input argument if FACT = 'F'; otherwise, S is an output
+*> argument. If FACT = 'F' and EQUED = 'Y', each element of S
+*> must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
+*> B is overwritten by diag(S) * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
+*> the original system of equations. Note that if EQUED = 'Y',
+*> A and B are modified on exit, and the solution to the
+*> equilibrated system is inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A after equilibration (if done). If RCOND is less than the
+*> machine precision (in particular, if RCOND = 0), the matrix
+*> is singular to working precision. This condition is
+*> indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
$ X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
@@ -17,205 +321,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPPSVX uses the Cholesky factorization A = U**H * U or A = L * L**H to
-* compute the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N Hermitian positive definite matrix stored in
-* packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', real scaling factors are computed to equilibrate
-* the system:
-* diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
-* factor the matrix A (after equilibration if FACT = 'E') as
-* A = U**H * U , if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix, L is a lower triangular
-* matrix, and **H indicates conjugate transpose.
-*
-* 3. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(S) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AFP contains the factored form of A.
-* If EQUED = 'Y', the matrix A has been equilibrated
-* with scaling factors given by S. AP and AFP will not
-* be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array, except if FACT = 'F'
-* and EQUED = 'Y', then A must contain the equilibrated matrix
-* diag(S)*A*diag(S). The j-th column of A is stored in the
-* array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details. A is not modified if
-* FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* AFP (input or output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, in the same storage
-* format as A. If EQUED .ne. 'N', then AFP is the factored
-* form of the equilibrated matrix A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H * U or A = L * L**H of the original
-* matrix A.
-*
-* If FACT = 'E', then AFP is an output argument and on exit
-* returns the triangular factor U or L from the Cholesky
-* factorization A = U**H * U or A = L * L**H of the equilibrated
-* matrix A (see the description of AP for the form of the
-* equilibrated matrix).
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Equilibration was done, i.e., A has been replaced by
-* diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A; not accessed if EQUED = 'N'. S is
-* an input argument if FACT = 'F'; otherwise, S is an output
-* argument. If FACT = 'F' and EQUED = 'Y', each element of S
-* must be positive.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
-* B is overwritten by diag(S) * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X to
-* the original system of equations. Note that if EQUED = 'Y',
-* A and B are modified on exit, and the solution to the
-* equilibrated system is inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A after equilibration (if done). If RCOND is less than the
-* machine precision (in particular, if RCOND = 0), the matrix
-* is singular to working precision. This condition is
-* indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpptrf.f b/SRC/zpptrf.f
index 734ed897..8aa20cd6 100644
--- a/SRC/zpptrf.f
+++ b/SRC/zpptrf.f
@@ -1,74 +1,131 @@
- SUBROUTINE ZPPTRF( UPLO, N, AP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( * )
-* ..
-*
+*> \brief \b ZPPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPTRF( UPLO, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * )
+* ..
+*
* Purpose
* =======
*
-* ZPPTRF computes the Cholesky factorization of a complex Hermitian
-* positive definite matrix A stored in packed format.
-*
-* The factorization has the form
-* A = U**H * U, if UPLO = 'U', or
-* A = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A stored in packed format.
+*>
+*> The factorization has the form
+*> A = U**H * U, if UPLO = 'U', or
+*> A = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the Hermitian matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the triangular factor U or L from the
+*> Cholesky factorization A = U**H*U or A = L*L**H, in the same
+*> storage format as A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the factorization could not be
+*> completed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the Hermitian matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
+*> \date November 2011
*
-* On exit, if INFO = 0, the triangular factor U or L from the
-* Cholesky factorization A = U**H*U or A = L*L**H, in the same
-* storage format as A.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the factorization could not be
-* completed.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the Hermitian matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = conjg(aji))
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPPTRF( UPLO, N, AP, INFO )
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the Hermitian matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = conjg(aji))
-* a44
-*
-* Packed storage of the upper triangle of A:
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpptri.f b/SRC/zpptri.f
index b1d1df6e..40ad1bd1 100644
--- a/SRC/zpptri.f
+++ b/SRC/zpptri.f
@@ -1,9 +1,95 @@
+*> \brief \b ZPPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPTRI( UPLO, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPTRI computes the inverse of a complex Hermitian positive definite
+*> matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
+*> computed by ZPPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular factor is stored in AP;
+*> = 'L': Lower triangular factor is stored in AP.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the triangular factor U or L from the Cholesky
+*> factorization A = U**H*U or A = L*L**H, packed columnwise as
+*> a linear array. The j-th column of U or L is stored in the
+*> array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the upper or lower triangle of the (Hermitian)
+*> inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the (i,i) element of the factor U or L is
+*> zero, and the inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPPTRI( UPLO, N, AP, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -13,40 +99,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPPTRI computes the inverse of a complex Hermitian positive definite
-* matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
-* computed by ZPPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular factor is stored in AP;
-* = 'L': Lower triangular factor is stored in AP.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the triangular factor U or L from the Cholesky
-* factorization A = U**H*U or A = L*L**H, packed columnwise as
-* a linear array. The j-th column of U or L is stored in the
-* array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
-*
-* On exit, the upper or lower triangle of the (Hermitian)
-* inverse of A, overwriting the input factor U or L.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the (i,i) element of the factor U or L is
-* zero, and the inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpptrs.f b/SRC/zpptrs.f
index 85cab59e..06441834 100644
--- a/SRC/zpptrs.f
+++ b/SRC/zpptrs.f
@@ -1,57 +1,117 @@
- SUBROUTINE ZPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZPPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZPPTRS solves a system of linear equations A*X = B with a Hermitian
-* positive definite matrix A in packed storage using the Cholesky
-* factorization A = U**H * U or A = L * L**H computed by ZPPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPTRS solves a system of linear equations A*X = B with a Hermitian
+*> positive definite matrix A in packed storage using the Cholesky
+*> factorization A = U**H * U or A = L * L**H computed by ZPPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The triangular factor U or L from the Cholesky factorization
+*> A = U**H * U or A = L * L**H, packed columnwise in a linear
+*> array. The j-th column of U or L is stored in the array AP
+*> as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \date November 2011
*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The triangular factor U or L from the Cholesky factorization
-* A = U**H * U or A = L * L**H, packed columnwise in a linear
-* array. The j-th column of U or L is stored in the array AP
-* as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = U(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = L(i,j) for j<=i<=n.
+*> \ingroup complex16OTHERcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE ZPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpstf2.f b/SRC/zpstf2.f
index 568980b7..953f8ace 100644
--- a/SRC/zpstf2.f
+++ b/SRC/zpstf2.f
@@ -1,8 +1,143 @@
+*> \brief \b ZPSTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION TOL
+* INTEGER INFO, LDA, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* DOUBLE PRECISION WORK( 2*N )
+* INTEGER PIV( N )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPSTF2 computes the Cholesky factorization with complete
+*> pivoting of a complex Hermitian positive semidefinite matrix A.
+*>
+*> The factorization has the form
+*> P**T * A * P = U**H * U , if UPLO = 'U',
+*> P**T * A * P = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular, and
+*> P is stored as vector PIV.
+*>
+*> This algorithm does not attempt to check that A is positive
+*> semidefinite. This version of the algorithm calls level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization as above.
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of A given by the number of steps the algorithm
+*> completed.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> User defined tolerance. If TOL < 0, then N*U*MAX( A( K,K ) )
+*> will be used. The algorithm terminates at the (K-1)st step
+*> if the pivot <= TOL.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> Work space.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0: If INFO = -K, the K-th argument had an illegal value,
+*> = 0: algorithm completed successfully, and
+*> > 0: the matrix A is either rank deficient with computed rank
+*> as returned in RANK, or is indefinite. See Section 7 of
+*> LAPACK Working Note #161 for further information.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
*
-* -- LAPACK PROTOTYPE routine (version 3.2.2) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION TOL
@@ -15,70 +150,6 @@
INTEGER PIV( N )
* ..
*
-* Purpose
-* =======
-*
-* ZPSTF2 computes the Cholesky factorization with complete
-* pivoting of a complex Hermitian positive semidefinite matrix A.
-*
-* The factorization has the form
-* P**T * A * P = U**H * U , if UPLO = 'U',
-* P**T * A * P = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular, and
-* P is stored as vector PIV.
-*
-* This algorithm does not attempt to check that A is positive
-* semidefinite. This version of the algorithm calls level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization as above.
-*
-* PIV (output) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
-*
-* RANK (output) INTEGER
-* The rank of A given by the number of steps the algorithm
-* completed.
-*
-* TOL (input) DOUBLE PRECISION
-* User defined tolerance. If TOL < 0, then N*U*MAX( A( K,K ) )
-* will be used. The algorithm terminates at the (K-1)st step
-* if the pivot <= TOL.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-* Work space.
-*
-* INFO (output) INTEGER
-* < 0: If INFO = -K, the K-th argument had an illegal value,
-* = 0: algorithm completed successfully, and
-* > 0: the matrix A is either rank deficient with computed rank
-* as returned in RANK, or is indefinite. See Section 7 of
-* LAPACK Working Note #161 for further information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpstrf.f b/SRC/zpstrf.f
index 90970cd7..6ea5d066 100644
--- a/SRC/zpstrf.f
+++ b/SRC/zpstrf.f
@@ -1,11 +1,143 @@
- SUBROUTINE ZPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*> \brief \b ZPSTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION TOL
+* INTEGER INFO, LDA, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* DOUBLE PRECISION WORK( 2*N )
+* INTEGER PIV( N )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPSTRF computes the Cholesky factorization with complete
+*> pivoting of a complex Hermitian positive semidefinite matrix A.
+*>
+*> The factorization has the form
+*> P**T * A * P = U**H * U , if UPLO = 'U',
+*> P**T * A * P = L * L**H, if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular, and
+*> P is stored as vector PIV.
+*>
+*> This algorithm does not attempt to check that A is positive
+*> semidefinite. This version of the algorithm calls level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n by n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the factor U or L from the Cholesky
+*> factorization as above.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of A given by the number of steps the algorithm
+*> completed.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> User defined tolerance. If TOL < 0, then N*U*MAX( A(K,K) )
+*> will be used. The algorithm terminates at the (K-1)st step
+*> if the pivot <= TOL.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> Work space.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> < 0: If INFO = -K, the K-th argument had an illegal value,
+*> = 0: algorithm completed successfully, and
+*> > 0: the matrix A is either rank deficient with computed rank
+*> as returned in RANK, or is indefinite. See Section 7 of
+*> LAPACK Working Note #161 for further information.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
*
-* -- LAPACK routine (version 3.2.2) --
-*
-* -- Contributed by Craig Lucas, University of Manchester / NAG Ltd. --
-* -- June 2010 --
+* =====================================================================
+ SUBROUTINE ZPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
*
+* -- LAPACK computational routine (version 3.2.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION TOL
@@ -18,70 +150,6 @@
INTEGER PIV( N )
* ..
*
-* Purpose
-* =======
-*
-* ZPSTRF computes the Cholesky factorization with complete
-* pivoting of a complex Hermitian positive semidefinite matrix A.
-*
-* The factorization has the form
-* P**T * A * P = U**H * U , if UPLO = 'U',
-* P**T * A * P = L * L**H, if UPLO = 'L',
-* where U is an upper triangular matrix and L is lower triangular, and
-* P is stored as vector PIV.
-*
-* This algorithm does not attempt to check that A is positive
-* semidefinite. This version of the algorithm calls level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n by n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the factor U or L from the Cholesky
-* factorization as above.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* PIV (output) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are P( PIV(K), K ) = 1.
-*
-* RANK (output) INTEGER
-* The rank of A given by the number of steps the algorithm
-* completed.
-*
-* TOL (input) DOUBLE PRECISION
-* User defined tolerance. If TOL < 0, then N*U*MAX( A(K,K) )
-* will be used. The algorithm terminates at the (K-1)st step
-* if the pivot <= TOL.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-* Work space.
-*
-* INFO (output) INTEGER
-* < 0: If INFO = -K, the K-th argument had an illegal value,
-* = 0: algorithm completed successfully, and
-* > 0: the matrix A is either rank deficient with computed rank
-* as returned in RANK, or is indefinite. See Section 7 of
-* LAPACK Working Note #161 for further information.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zptcon.f b/SRC/zptcon.f
index 4131c0f1..503dfe0a 100644
--- a/SRC/zptcon.f
+++ b/SRC/zptcon.f
@@ -1,65 +1,131 @@
- SUBROUTINE ZPTCON( N, D, E, ANORM, RCOND, RWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- DOUBLE PRECISION ANORM, RCOND
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), RWORK( * )
- COMPLEX*16 E( * )
-* ..
-*
+*> \brief \b ZPTCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTCON( N, D, E, ANORM, RCOND, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), RWORK( * )
+* COMPLEX*16 E( * )
+* ..
+*
* Purpose
* =======
*
-* ZPTCON computes the reciprocal of the condition number (in the
-* 1-norm) of a complex Hermitian positive definite tridiagonal matrix
-* using the factorization A = L*D*L**H or A = U**H*D*U computed by
-* ZPTTRF.
-*
-* Norm(inv(A)) is computed by a direct method, and the reciprocal of
-* the condition number is computed as
-* RCOND = 1 / (ANORM * norm(inv(A))).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTCON computes the reciprocal of the condition number (in the
+*> 1-norm) of a complex Hermitian positive definite tridiagonal matrix
+*> using the factorization A = L*D*L**H or A = U**H*D*U computed by
+*> ZPTTRF.
+*>
+*> Norm(inv(A)) is computed by a direct method, and the reciprocal of
+*> the condition number is computed as
+*> RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization of A, as computed by ZPTTRF.
-*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) off-diagonal elements of the unit bidiagonal factor
-* U or L from the factorization of A, as computed by ZPTTRF.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization of A, as computed by ZPTTRF.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the unit bidiagonal factor
+*> U or L from the factorization of A, as computed by ZPTTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the
+*> 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm of the original matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is the
-* 1-norm of inv(A) computed in this routine.
+*> \date November 2011
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The method used is described in Nicholas J. Higham, "Efficient
+*> Algorithms for Computing the Condition Number of a Tridiagonal
+*> Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZPTCON( N, D, E, ANORM, RCOND, RWORK, INFO )
*
-* The method used is described in Nicholas J. Higham, "Efficient
-* Algorithms for Computing the Condition Number of a Tridiagonal
-* Matrix", SIAM J. Sci. Stat. Comput., Vol. 7, No. 1, January 1986.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), RWORK( * )
+ COMPLEX*16 E( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zpteqr.f b/SRC/zpteqr.f
index 92dd5d51..3c34c333 100644
--- a/SRC/zpteqr.f
+++ b/SRC/zpteqr.f
@@ -1,9 +1,146 @@
+*> \brief \b ZPTEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), WORK( * )
+* COMPLEX*16 Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric positive definite tridiagonal matrix by first factoring the
+*> matrix using DPTTRF and then calling ZBDSQR to compute the singular
+*> values of the bidiagonal factor.
+*>
+*> This routine computes the eigenvalues of the positive definite
+*> tridiagonal matrix to high relative accuracy. This means that if the
+*> eigenvalues range over many orders of magnitude in size, then the
+*> small eigenvalues and corresponding eigenvectors will be computed
+*> more accurately than, for example, with the standard QR method.
+*>
+*> The eigenvectors of a full or band positive definite Hermitian matrix
+*> can also be found if ZHETRD, ZHPTRD, or ZHBTRD has been used to
+*> reduce this matrix to tridiagonal form. (The reduction to
+*> tridiagonal form, however, may preclude the possibility of obtaining
+*> high relative accuracy in the small eigenvalues of the original
+*> matrix, if these eigenvalues range over many orders of magnitude.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'V': Compute eigenvectors of original Hermitian
+*> matrix also. Array Z contains the unitary matrix
+*> used to reduce the original matrix to tridiagonal
+*> form.
+*> = 'I': Compute eigenvectors of tridiagonal matrix also.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix.
+*> On normal exit, D contains the eigenvalues, in descending
+*> order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', the unitary matrix used in the
+*> reduction to tridiagonal form.
+*> On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
+*> original Hermitian matrix;
+*> if COMPZ = 'I', the orthonormal eigenvectors of the
+*> tridiagonal matrix.
+*> If INFO > 0 on exit, Z contains the eigenvectors associated
+*> with only the stored eigenvalues.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> COMPZ = 'V' or 'I', LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: if INFO = i, and i is:
+*> <= N the Cholesky factorization of the matrix could
+*> not be performed because the i-th principal minor
+*> was not positive definite.
+*> > N the SVD algorithm failed to converge;
+*> if INFO = N+i, i off-diagonal elements of the
+*> bidiagonal factor did not converge to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -14,79 +151,6 @@
COMPLEX*16 Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPTEQR computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric positive definite tridiagonal matrix by first factoring the
-* matrix using DPTTRF and then calling ZBDSQR to compute the singular
-* values of the bidiagonal factor.
-*
-* This routine computes the eigenvalues of the positive definite
-* tridiagonal matrix to high relative accuracy. This means that if the
-* eigenvalues range over many orders of magnitude in size, then the
-* small eigenvalues and corresponding eigenvectors will be computed
-* more accurately than, for example, with the standard QR method.
-*
-* The eigenvectors of a full or band positive definite Hermitian matrix
-* can also be found if ZHETRD, ZHPTRD, or ZHBTRD has been used to
-* reduce this matrix to tridiagonal form. (The reduction to
-* tridiagonal form, however, may preclude the possibility of obtaining
-* high relative accuracy in the small eigenvalues of the original
-* matrix, if these eigenvalues range over many orders of magnitude.)
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'V': Compute eigenvectors of original Hermitian
-* matrix also. Array Z contains the unitary matrix
-* used to reduce the original matrix to tridiagonal
-* form.
-* = 'I': Compute eigenvectors of tridiagonal matrix also.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix.
-* On normal exit, D contains the eigenvalues, in descending
-* order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', the unitary matrix used in the
-* reduction to tridiagonal form.
-* On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
-* original Hermitian matrix;
-* if COMPZ = 'I', the orthonormal eigenvectors of the
-* tridiagonal matrix.
-* If INFO > 0 on exit, Z contains the eigenvectors associated
-* with only the stored eigenvalues.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* COMPZ = 'V' or 'I', LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: if INFO = i, and i is:
-* <= N the Cholesky factorization of the matrix could
-* not be performed because the i-th principal minor
-* was not positive definite.
-* > N the SVD algorithm failed to converge;
-* if INFO = N+i, i off-diagonal elements of the
-* bidiagonal factor did not converge to zero.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/zptrfs.f b/SRC/zptrfs.f
index 3c7d2179..75338ab7 100644
--- a/SRC/zptrfs.f
+++ b/SRC/zptrfs.f
@@ -1,10 +1,184 @@
+*> \brief \b ZPTRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTRFS( UPLO, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
+* FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), D( * ), DF( * ), FERR( * ),
+* $ RWORK( * )
+* COMPLEX*16 B( LDB, * ), E( * ), EF( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is Hermitian positive definite
+*> and tridiagonal, and provides error bounds and backward error
+*> estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the superdiagonal or the subdiagonal of the
+*> tridiagonal matrix A is stored and the form of the
+*> factorization:
+*> = 'U': E is the superdiagonal of A, and A = U**H*D*U;
+*> = 'L': E is the subdiagonal of A, and A = L*D*L**H.
+*> (The two forms are equivalent if A is real.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n real diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the tridiagonal matrix A
+*> (see UPLO).
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from
+*> the factorization computed by ZPTTRF.
+*> \endverbatim
+*>
+*> \param[in] EF
+*> \verbatim
+*> EF is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) off-diagonal elements of the unit bidiagonal
+*> factor U or L from the factorization computed by ZPTTRF
+*> (see UPLO).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZPTTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPTRFS( UPLO, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
$ FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,87 +191,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPTRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is Hermitian positive definite
-* and tridiagonal, and provides error bounds and backward error
-* estimates for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the superdiagonal or the subdiagonal of the
-* tridiagonal matrix A is stored and the form of the
-* factorization:
-* = 'U': E is the superdiagonal of A, and A = U**H*D*U;
-* = 'L': E is the subdiagonal of A, and A = L*D*L**H.
-* (The two forms are equivalent if A is real.)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n real diagonal elements of the tridiagonal matrix A.
-*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) off-diagonal elements of the tridiagonal matrix A
-* (see UPLO).
-*
-* DF (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from
-* the factorization computed by ZPTTRF.
-*
-* EF (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) off-diagonal elements of the unit bidiagonal
-* factor U or L from the factorization computed by ZPTTRF
-* (see UPLO).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZPTTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zptsv.f b/SRC/zptsv.f
index a50f4a88..c693d2f8 100644
--- a/SRC/zptsv.f
+++ b/SRC/zptsv.f
@@ -1,9 +1,116 @@
+*> \brief \b ZPTSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTSV( N, NRHS, D, E, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 B( LDB, * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTSV computes the solution to a complex system of linear equations
+*> A*X = B, where A is an N-by-N Hermitian positive definite tridiagonal
+*> matrix, and X and B are N-by-NRHS matrices.
+*>
+*> A is factored as A = L*D*L**H, and the factored form of A is then
+*> used to solve the system of equations.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A. On exit, the n diagonal elements of the diagonal matrix
+*> D from the factorization A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A. On exit, the (n-1) subdiagonal elements of the
+*> unit bidiagonal factor L from the L*D*L**H factorization of
+*> A. E can also be regarded as the superdiagonal of the unit
+*> bidiagonal factor U from the U**H*D*U factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the leading minor of order i is not
+*> positive definite, and the solution has not been
+*> computed. The factorization has not been completed
+*> unless i = N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPTSV( N, NRHS, D, E, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDB, N, NRHS
@@ -13,53 +120,6 @@
COMPLEX*16 B( LDB, * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPTSV computes the solution to a complex system of linear equations
-* A*X = B, where A is an N-by-N Hermitian positive definite tridiagonal
-* matrix, and X and B are N-by-NRHS matrices.
-*
-* A is factored as A = L*D*L**H, and the factored form of A is then
-* used to solve the system of equations.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A. On exit, the n diagonal elements of the diagonal matrix
-* D from the factorization A = L*D*L**H.
-*
-* E (input/output) COMPLEX*16 array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A. On exit, the (n-1) subdiagonal elements of the
-* unit bidiagonal factor L from the L*D*L**H factorization of
-* A. E can also be regarded as the superdiagonal of the unit
-* bidiagonal factor U from the U**H*D*U factorization of A.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the leading minor of order i is not
-* positive definite, and the solution has not been
-* computed. The factorization has not been completed
-* unless i = N.
-*
* =====================================================================
*
* .. External Subroutines ..
diff --git a/SRC/zptsvx.f b/SRC/zptsvx.f
index a390beb0..e21db6f5 100644
--- a/SRC/zptsvx.f
+++ b/SRC/zptsvx.f
@@ -1,10 +1,232 @@
+*> \brief \b ZPTSVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
+* RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), D( * ), DF( * ), FERR( * ),
+* $ RWORK( * )
+* COMPLEX*16 B( LDB, * ), E( * ), EF( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTSVX uses the factorization A = L*D*L**H to compute the solution
+*> to a complex system of linear equations A*X = B, where A is an
+*> N-by-N Hermitian positive definite tridiagonal matrix and X and B
+*> are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the matrix A is factored as A = L*D*L**H, where L
+*> is a unit lower bidiagonal matrix and D is diagonal. The
+*> factorization can also be regarded as having the form
+*> A = U**H*D*U.
+*>
+*> 2. If the leading i-by-i principal minor is not positive definite,
+*> then the routine returns with INFO = i. Otherwise, the factored
+*> form of A is used to estimate the condition number of the matrix
+*> A. If the reciprocal of the condition number is less than machine
+*> precision, INFO = N+1 is returned as a warning, but the routine
+*> still goes on to solve for X and compute error bounds as
+*> described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix
+*> A is supplied on entry.
+*> = 'F': On entry, DF and EF contain the factored form of A.
+*> D, E, DF, and EF will not be modified.
+*> = 'N': The matrix A will be copied to DF and EF and
+*> factored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] DF
+*> \verbatim
+*> DF is or output) DOUBLE PRECISION array, dimension (N)
+*> If FACT = 'F', then DF is an input argument and on entry
+*> contains the n diagonal elements of the diagonal matrix D
+*> from the L*D*L**H factorization of A.
+*> If FACT = 'N', then DF is an output argument and on exit
+*> contains the n diagonal elements of the diagonal matrix D
+*> from the L*D*L**H factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] EF
+*> \verbatim
+*> EF is or output) COMPLEX*16 array, dimension (N-1)
+*> If FACT = 'F', then EF is an input argument and on entry
+*> contains the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the L*D*L**H factorization of A.
+*> If FACT = 'N', then EF is an output argument and on exit
+*> contains the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the L*D*L**H factorization of A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal condition number of the matrix A. If RCOND
+*> is less than the machine precision (in particular, if
+*> RCOND = 0), the matrix is singular to working precision.
+*> This condition is indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j).
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in any
+*> element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: the leading minor of order i of A is
+*> not positive definite, so the factorization
+*> could not be completed, and the solution has not
+*> been computed. RCOND = 0 is returned.
+*> = N+1: U is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
$ RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT
@@ -18,133 +240,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPTSVX uses the factorization A = L*D*L**H to compute the solution
-* to a complex system of linear equations A*X = B, where A is an
-* N-by-N Hermitian positive definite tridiagonal matrix and X and B
-* are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the matrix A is factored as A = L*D*L**H, where L
-* is a unit lower bidiagonal matrix and D is diagonal. The
-* factorization can also be regarded as having the form
-* A = U**H*D*U.
-*
-* 2. If the leading i-by-i principal minor is not positive definite,
-* then the routine returns with INFO = i. Otherwise, the factored
-* form of A is used to estimate the condition number of the matrix
-* A. If the reciprocal of the condition number is less than machine
-* precision, INFO = N+1 is returned as a warning, but the routine
-* still goes on to solve for X and compute error bounds as
-* described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix
-* A is supplied on entry.
-* = 'F': On entry, DF and EF contain the factored form of A.
-* D, E, DF, and EF will not be modified.
-* = 'N': The matrix A will be copied to DF and EF and
-* factored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* DF (input or output) DOUBLE PRECISION array, dimension (N)
-* If FACT = 'F', then DF is an input argument and on entry
-* contains the n diagonal elements of the diagonal matrix D
-* from the L*D*L**H factorization of A.
-* If FACT = 'N', then DF is an output argument and on exit
-* contains the n diagonal elements of the diagonal matrix D
-* from the L*D*L**H factorization of A.
-*
-* EF (input or output) COMPLEX*16 array, dimension (N-1)
-* If FACT = 'F', then EF is an input argument and on entry
-* contains the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the L*D*L**H factorization of A.
-* If FACT = 'N', then EF is an output argument and on exit
-* contains the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the L*D*L**H factorization of A.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal condition number of the matrix A. If RCOND
-* is less than the machine precision (in particular, if
-* RCOND = 0), the matrix is singular to working precision.
-* This condition is indicated by a return code of INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j).
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in any
-* element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: the leading minor of order i of A is
-* not positive definite, so the factorization
-* could not be completed, and the solution has not
-* been computed. RCOND = 0 is returned.
-* = N+1: U is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpttrf.f b/SRC/zpttrf.f
index 299007d0..525d4f40 100644
--- a/SRC/zpttrf.f
+++ b/SRC/zpttrf.f
@@ -1,9 +1,93 @@
+*> \brief \b ZPTTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTTRF( N, D, E, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTTRF computes the L*D*L**H factorization of a complex Hermitian
+*> positive definite tridiagonal matrix A. The factorization may also
+*> be regarded as having the form A = U**H *D*U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the n diagonal elements of the tridiagonal matrix
+*> A. On exit, the n diagonal elements of the diagonal matrix
+*> D from the L*D*L**H factorization of A.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix A. On exit, the (n-1) subdiagonal elements of the
+*> unit bidiagonal factor L from the L*D*L**H factorization of A.
+*> E can also be regarded as the superdiagonal of the unit
+*> bidiagonal factor U from the U**H *D*U factorization of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, the leading minor of order k is not
+*> positive definite; if k < N, the factorization could not
+*> be completed, while if k = N, the factorization was
+*> completed, but D(N) <= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPTTRF( N, D, E, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, N
@@ -13,39 +97,6 @@
COMPLEX*16 E( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPTTRF computes the L*D*L**H factorization of a complex Hermitian
-* positive definite tridiagonal matrix A. The factorization may also
-* be regarded as having the form A = U**H *D*U.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the n diagonal elements of the tridiagonal matrix
-* A. On exit, the n diagonal elements of the diagonal matrix
-* D from the L*D*L**H factorization of A.
-*
-* E (input/output) COMPLEX*16 array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix A. On exit, the (n-1) subdiagonal elements of the
-* unit bidiagonal factor L from the L*D*L**H factorization of A.
-* E can also be regarded as the superdiagonal of the unit
-* bidiagonal factor U from the U**H *D*U factorization of A.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, the leading minor of order k is not
-* positive definite; if k < N, the factorization could not
-* be completed, while if k = N, the factorization was
-* completed, but D(N) <= 0.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zpttrs.f b/SRC/zpttrs.f
index 14a9a7e7..259c1552 100644
--- a/SRC/zpttrs.f
+++ b/SRC/zpttrs.f
@@ -1,9 +1,122 @@
+*> \brief \b ZPTTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTTRS( UPLO, N, NRHS, D, E, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 B( LDB, * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTTRS solves a tridiagonal system of the form
+*> A * X = B
+*> using the factorization A = U**H *D* U or A = L*D*L**H computed by ZPTTRF.
+*> D is a diagonal matrix specified in the vector D, U (or L) is a unit
+*> bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
+*> the vector E, and X and B are N by NRHS matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies the form of the factorization and whether the
+*> vector E is the superdiagonal of the upper bidiagonal factor
+*> U or the subdiagonal of the lower bidiagonal factor L.
+*> = 'U': A = U**H *D*U, E is the superdiagonal of U
+*> = 'L': A = L*D*L**H, E is the subdiagonal of L
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization A = U**H *D*U or A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> If UPLO = 'U', the (n-1) superdiagonal elements of the unit
+*> bidiagonal factor U from the factorization A = U**H*D*U.
+*> If UPLO = 'L', the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the factorization A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors B for the system of
+*> linear equations.
+*> On exit, the solution vectors, X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPTTRS( UPLO, N, NRHS, D, E, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,55 +127,6 @@
COMPLEX*16 B( LDB, * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPTTRS solves a tridiagonal system of the form
-* A * X = B
-* using the factorization A = U**H *D* U or A = L*D*L**H computed by ZPTTRF.
-* D is a diagonal matrix specified in the vector D, U (or L) is a unit
-* bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
-* the vector E, and X and B are N by NRHS matrices.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies the form of the factorization and whether the
-* vector E is the superdiagonal of the upper bidiagonal factor
-* U or the subdiagonal of the lower bidiagonal factor L.
-* = 'U': A = U**H *D*U, E is the superdiagonal of U
-* = 'L': A = L*D*L**H, E is the subdiagonal of L
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization A = U**H *D*U or A = L*D*L**H.
-*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* If UPLO = 'U', the (n-1) superdiagonal elements of the unit
-* bidiagonal factor U from the factorization A = U**H*D*U.
-* If UPLO = 'L', the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the factorization A = L*D*L**H.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors B for the system of
-* linear equations.
-* On exit, the solution vectors, X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zptts2.f b/SRC/zptts2.f
index bccf0706..a4f7aea3 100644
--- a/SRC/zptts2.f
+++ b/SRC/zptts2.f
@@ -1,9 +1,114 @@
+*> \brief \b ZPTTS2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTTS2( IUPLO, N, NRHS, D, E, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER IUPLO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 B( LDB, * ), E( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTTS2 solves a tridiagonal system of the form
+*> A * X = B
+*> using the factorization A = U**H *D*U or A = L*D*L**H computed by ZPTTRF.
+*> D is a diagonal matrix specified in the vector D, U (or L) is a unit
+*> bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
+*> the vector E, and X and B are N by NRHS matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IUPLO
+*> \verbatim
+*> IUPLO is INTEGER
+*> Specifies the form of the factorization and whether the
+*> vector E is the superdiagonal of the upper bidiagonal factor
+*> U or the subdiagonal of the lower bidiagonal factor L.
+*> = 1: A = U**H *D*U, E is the superdiagonal of U
+*> = 0: A = L*D*L**H, E is the subdiagonal of L
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the tridiagonal matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the diagonal matrix D from the
+*> factorization A = U**H *D*U or A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> If IUPLO = 1, the (n-1) superdiagonal elements of the unit
+*> bidiagonal factor U from the factorization A = U**H*D*U.
+*> If IUPLO = 0, the (n-1) subdiagonal elements of the unit
+*> bidiagonal factor L from the factorization A = L*D*L**H.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors B for the system of
+*> linear equations.
+*> On exit, the solution vectors, X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZPTTS2( IUPLO, N, NRHS, D, E, B, LDB )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IUPLO, LDB, N, NRHS
@@ -13,51 +118,6 @@
COMPLEX*16 B( LDB, * ), E( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPTTS2 solves a tridiagonal system of the form
-* A * X = B
-* using the factorization A = U**H *D*U or A = L*D*L**H computed by ZPTTRF.
-* D is a diagonal matrix specified in the vector D, U (or L) is a unit
-* bidiagonal matrix whose superdiagonal (subdiagonal) is specified in
-* the vector E, and X and B are N by NRHS matrices.
-*
-* Arguments
-* =========
-*
-* IUPLO (input) INTEGER
-* Specifies the form of the factorization and whether the
-* vector E is the superdiagonal of the upper bidiagonal factor
-* U or the subdiagonal of the lower bidiagonal factor L.
-* = 1: A = U**H *D*U, E is the superdiagonal of U
-* = 0: A = L*D*L**H, E is the subdiagonal of L
-*
-* N (input) INTEGER
-* The order of the tridiagonal matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the diagonal matrix D from the
-* factorization A = U**H *D*U or A = L*D*L**H.
-*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* If IUPLO = 1, the (n-1) superdiagonal elements of the unit
-* bidiagonal factor U from the factorization A = U**H*D*U.
-* If IUPLO = 0, the (n-1) subdiagonal elements of the unit
-* bidiagonal factor L from the factorization A = L*D*L**H.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors B for the system of
-* linear equations.
-* On exit, the solution vectors, X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zrot.f b/SRC/zrot.f
index ec1ebe64..a5cd6a4b 100644
--- a/SRC/zrot.f
+++ b/SRC/zrot.f
@@ -1,9 +1,103 @@
+*> \brief \b ZROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZROT( N, CX, INCX, CY, INCY, C, S )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* DOUBLE PRECISION C
+* COMPLEX*16 S
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 CX( * ), CY( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZROT applies a plane rotation, where the cos (C) is real and the
+*> sin (S) is complex, and the vectors CX and CY are complex.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of elements in the vectors CX and CY.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*> CX is COMPLEX*16 array, dimension (N)
+*> On input, the vector X.
+*> On output, CX is overwritten with C*X + S*Y.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The increment between successive values of CY. INCX <> 0.
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*> CY is COMPLEX*16 array, dimension (N)
+*> On input, the vector Y.
+*> On output, CY is overwritten with -CONJG(S)*X + C*Y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The increment between successive values of CY. INCX <> 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX*16
+*> C and S define a rotation
+*> [ C S ]
+*> [ -conjg(S) C ]
+*> where C*C + S*CONJG(S) = 1.0.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZROT( N, CX, INCX, CY, INCY, C, S )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, INCY, N
@@ -14,39 +108,6 @@
COMPLEX*16 CX( * ), CY( * )
* ..
*
-* Purpose
-* =======
-*
-* ZROT applies a plane rotation, where the cos (C) is real and the
-* sin (S) is complex, and the vectors CX and CY are complex.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of elements in the vectors CX and CY.
-*
-* CX (input/output) COMPLEX*16 array, dimension (N)
-* On input, the vector X.
-* On output, CX is overwritten with C*X + S*Y.
-*
-* INCX (input) INTEGER
-* The increment between successive values of CY. INCX <> 0.
-*
-* CY (input/output) COMPLEX*16 array, dimension (N)
-* On input, the vector Y.
-* On output, CY is overwritten with -CONJG(S)*X + C*Y.
-*
-* INCY (input) INTEGER
-* The increment between successive values of CY. INCX <> 0.
-*
-* C (input) DOUBLE PRECISION
-* S (input) COMPLEX*16
-* C and S define a rotation
-* [ C S ]
-* [ -conjg(S) C ]
-* where C*C + S*CONJG(S) = 1.0.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zspcon.f b/SRC/zspcon.f
index 796d8526..bd2c24a4 100644
--- a/SRC/zspcon.f
+++ b/SRC/zspcon.f
@@ -1,11 +1,119 @@
+*> \brief \b ZSPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex symmetric packed matrix A using the
+*> factorization A = U*D*U**T or A = L*D*L**T computed by ZSPTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSPTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,51 +125,6 @@
COMPLEX*16 AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSPCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex symmetric packed matrix A using the
-* factorization A = U*D*U**T or A = L*D*L**T computed by ZSPTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSPTRF, stored as a
-* packed triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSPTRF.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zspmv.f b/SRC/zspmv.f
index 74b4f77e..d663b9a2 100644
--- a/SRC/zspmv.f
+++ b/SRC/zspmv.f
@@ -1,9 +1,155 @@
+*> \brief \b ZSPMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPMV( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, INCY, N
+* COMPLEX*16 ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * ), X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension at least
+*> ( ( N*( N + 1 ) )/2 ).
+*> Before entry, with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on.
+*> Before entry, with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the N-
+*> element vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZSPMV( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,82 +160,6 @@
COMPLEX*16 AP( * ), X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSPMV performs the matrix-vector operation
-*
-* y := alpha*A*x + beta*y,
-*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric matrix, supplied in packed form.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) COMPLEX*16
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* AP (input) COMPLEX*16 array, dimension at least
-* ( ( N*( N + 1 ) )/2 ).
-* Before entry, with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on.
-* Before entry, with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on.
-* Unchanged on exit.
-*
-* X (input) COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the N-
-* element vector x.
-* Unchanged on exit.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA (input) COMPLEX*16
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y (input/output) COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zspr.f b/SRC/zspr.f
index 154a5d76..da949e98 100644
--- a/SRC/zspr.f
+++ b/SRC/zspr.f
@@ -1,9 +1,136 @@
+*> \brief \b ZSPR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPR( UPLO, N, ALPHA, X, INCX, AP )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, N
+* COMPLEX*16 ALPHA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPR performs the symmetric rank 1 operation
+*>
+*> A := alpha*x*x**H + A,
+*>
+*> where alpha is a complex scalar, x is an n element vector and A is an
+*> n by n symmetric matrix, supplied in packed form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the matrix A is supplied in the packed
+*> array AP as follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> supplied in AP.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the N-
+*> element vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension at least
+*> ( ( N*( N + 1 ) )/2 ).
+*> Before entry, with UPLO = 'U' or 'u', the array AP must
+*> contain the upper triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
+*> and a( 2, 2 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the upper triangular part of the
+*> updated matrix.
+*> Before entry, with UPLO = 'L' or 'l', the array AP must
+*> contain the lower triangular part of the symmetric matrix
+*> packed sequentially, column by column, so that AP( 1 )
+*> contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
+*> and a( 3, 1 ) respectively, and so on. On exit, the array
+*> AP is overwritten by the lower triangular part of the
+*> updated matrix.
+*> Note that the imaginary parts of the diagonal elements need
+*> not be set, they are assumed to be zero, and on exit they
+*> are set to zero.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+* =====================================================================
SUBROUTINE ZSPR( UPLO, N, ALPHA, X, INCX, AP )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,72 +141,6 @@
COMPLEX*16 AP( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSPR performs the symmetric rank 1 operation
-*
-* A := alpha*x*x**H + A,
-*
-* where alpha is a complex scalar, x is an n element vector and A is an
-* n by n symmetric matrix, supplied in packed form.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the matrix A is supplied in the packed
-* array AP as follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* supplied in AP.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* supplied in AP.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) COMPLEX*16
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X (input) COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the N-
-* element vector x.
-* Unchanged on exit.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* AP (input/output) COMPLEX*16 array, dimension at least
-* ( ( N*( N + 1 ) )/2 ).
-* Before entry, with UPLO = 'U' or 'u', the array AP must
-* contain the upper triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 )
-* and a( 2, 2 ) respectively, and so on. On exit, the array
-* AP is overwritten by the upper triangular part of the
-* updated matrix.
-* Before entry, with UPLO = 'L' or 'l', the array AP must
-* contain the lower triangular part of the symmetric matrix
-* packed sequentially, column by column, so that AP( 1 )
-* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 )
-* and a( 3, 1 ) respectively, and so on. On exit, the array
-* AP is overwritten by the lower triangular part of the
-* updated matrix.
-* Note that the imaginary parts of the diagonal elements need
-* not be set, they are assumed to be zero, and on exit they
-* are set to zero.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsprfs.f b/SRC/zsprfs.f
index cb473d05..effec499 100644
--- a/SRC/zsprfs.f
+++ b/SRC/zsprfs.f
@@ -1,12 +1,181 @@
+*> \brief \b ZSPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
+* FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite
+*> and packed, and provides error bounds and backward error estimates
+*> for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AFP
+*> \verbatim
+*> AFP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A. AFP contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or
+*> A = L*D*L**T as computed by ZSPTRF, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZSPTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
$ FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -19,87 +188,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSPRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite
-* and packed, and provides error bounds and backward error estimates
-* for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* AFP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The factored form of the matrix A. AFP contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or
-* A = L*D*L**T as computed by ZSPTRF, stored as a packed
-* triangular matrix.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSPTRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZSPTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zspsv.f b/SRC/zspsv.f
index 3928b90a..dfd4ca2e 100644
--- a/SRC/zspsv.f
+++ b/SRC/zspsv.f
@@ -1,105 +1,175 @@
- SUBROUTINE ZSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK driver routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 AP( * ), B( LDB, * )
-* ..
-*
+*> \brief <b> ZSPSV computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZSPSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric matrix stored in packed format and X
-* and B are N-by-NRHS matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, D is symmetric and block diagonal with 1-by-1
-* and 2-by-2 diagonal blocks. The factored form of A is then used to
-* solve the system of equations A * X = B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric matrix stored in packed format and X
+*> and B are N-by-NRHS matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, D is symmetric and block diagonal with 1-by-1
+*> and 2-by-2 diagonal blocks. The factored form of A is then used to
+*> solve the system of equations A * X = B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by ZSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by ZSPTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be
-* computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by ZSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by ZSPTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be
+*> computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Further Details
-* ===============
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
+*> \ingroup complex16OTHERsolve
*
-* Two-dimensional storage of the symmetric matrix A:
*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* Packed storage of the upper triangle of A:
+* -- LAPACK solve routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zspsvx.f b/SRC/zspsvx.f
index b44a04dd..3cc24b1d 100644
--- a/SRC/zspsvx.f
+++ b/SRC/zspsvx.f
@@ -1,10 +1,279 @@
+*> \brief <b> ZSPSVX computes the solution to system of linear equations A * X = B for OTHER matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
+* LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPSVX uses the diagonal pivoting factorization A = U*D*U**T or
+*> A = L*D*L**T to compute the solution to a complex system of linear
+*> equations A * X = B, where A is an N-by-N symmetric matrix stored
+*> in packed format and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AFP and IPIV contain the factored form
+*> of A. AP, AFP and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AFP and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> \endverbatim
+*>
+*> \param[in,out] AFP
+*> \verbatim
+*> AFP is or output) COMPLEX*16 array, dimension (N*(N+1)/2)
+*> If FACT = 'F', then AFP is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by ZSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AFP is an output argument and on exit
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by ZSPTRF, stored as
+*> a packed triangular matrix in the same storage format as A.
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by ZSPTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by ZSPTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERsolve
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The packed storage scheme is illustrated by the following example
+*> when N = 4, UPLO = 'U':
+*>
+*> Two-dimensional storage of the symmetric matrix A:
+*>
+*> a11 a12 a13 a14
+*> a22 a23 a24
+*> a33 a34 (aij = aji)
+*> a44
+*>
+*> Packed storage of the upper triangle of A:
+*>
+*> AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
$ LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -18,173 +287,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSPSVX uses the diagonal pivoting factorization A = U*D*U**T or
-* A = L*D*L**T to compute the solution to a complex system of linear
-* equations A * X = B, where A is an N-by-N symmetric matrix stored
-* in packed format and X and B are N-by-NRHS matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AFP and IPIV contain the factored form
-* of A. AP, AFP and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AFP and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-*
-* AFP (input or output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* If FACT = 'F', then AFP is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by ZSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* If FACT = 'N', then AFP is an output argument and on exit
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by ZSPTRF, stored as
-* a packed triangular matrix in the same storage format as A.
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by ZSPTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by ZSPTRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
-* Further Details
-* ===============
-*
-* The packed storage scheme is illustrated by the following example
-* when N = 4, UPLO = 'U':
-*
-* Two-dimensional storage of the symmetric matrix A:
-*
-* a11 a12 a13 a14
-* a22 a23 a24
-* a33 a34 (aij = aji)
-* a44
-*
-* Packed storage of the upper triangle of A:
-*
-* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsptrf.f b/SRC/zsptrf.f
index 8cf892b3..6807f2bb 100644
--- a/SRC/zsptrf.f
+++ b/SRC/zsptrf.f
@@ -1,9 +1,162 @@
+*> \brief \b ZSPTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPTRF( UPLO, N, AP, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPTRF computes the factorization of a complex symmetric matrix A
+*> stored in packed format using the Bunch-Kaufman diagonal pivoting
+*> method:
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangle of the symmetric matrix
+*> A, packed columnwise in a linear array. The j-th column of A
+*> is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L, stored as a packed triangular
+*> matrix overwriting A (see below for further details).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZSPTRF( UPLO, N, AP, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,98 +167,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSPTRF computes the factorization of a complex symmetric matrix A
-* stored in packed format using the Bunch-Kaufman diagonal pivoting
-* method:
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangle of the symmetric matrix
-* A, packed columnwise in a linear array. The j-th column of A
-* is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L, stored as a packed triangular
-* matrix overwriting A (see below for further details).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 5-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsptri.f b/SRC/zsptri.f
index 3d41b61e..091e61a6 100644
--- a/SRC/zsptri.f
+++ b/SRC/zsptri.f
@@ -1,9 +1,111 @@
+*> \brief \b ZSPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPTRI computes the inverse of a complex symmetric indefinite matrix
+*> A in packed storage using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by ZSPTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZSPTRF,
+*> stored as a packed triangular matrix.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix, stored as a packed triangular matrix. The j-th column
+*> of inv(A) is stored in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSPTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,49 +116,6 @@
COMPLEX*16 AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSPTRI computes the inverse of a complex symmetric indefinite matrix
-* A in packed storage using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by ZSPTRF.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZSPTRF,
-* stored as a packed triangular matrix.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix, stored as a packed triangular matrix. The j-th column
-* of inv(A) is stored in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = inv(A)(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP(i + (j-1)*(2n-j)/2) = inv(A)(i,j) for j<=i<=n.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSPTRF.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsptrs.f b/SRC/zsptrs.f
index 1306f6a7..d4c7a909 100644
--- a/SRC/zsptrs.f
+++ b/SRC/zsptrs.f
@@ -1,61 +1,125 @@
- SUBROUTINE ZSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 AP( * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZSPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 AP( * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZSPTRS solves a system of linear equations A*X = B with a complex
-* symmetric matrix A stored in packed format using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by ZSPTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPTRS solves a system of linear equations A*X = B with a complex
+*> symmetric matrix A stored in packed format using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by ZSPTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSPTRF, stored as a
+*> packed triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSPTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSPTRF, stored as a
-* packed triangular matrix.
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSPTRF.
+*> \ingroup complex16OTHERcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE ZSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 AP( * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zstedc.f b/SRC/zstedc.f
index a104aaae..c09723ae 100644
--- a/SRC/zstedc.f
+++ b/SRC/zstedc.f
@@ -1,10 +1,223 @@
+*> \brief \b ZSTEDC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK,
+* LRWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, LIWORK, LRWORK, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), RWORK( * )
+* COMPLEX*16 WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSTEDC computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the divide and conquer method.
+*> The eigenvectors of a full or band complex Hermitian matrix can also
+*> be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this
+*> matrix to tridiagonal form.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none. See DLAED3 for details.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'I': Compute eigenvectors of tridiagonal matrix also.
+*> = 'V': Compute eigenvectors of original Hermitian matrix
+*> also. On entry, Z contains the unitary matrix used
+*> to reduce the original matrix to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the symmetric tridiagonal matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the subdiagonal elements of the tridiagonal matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,N)
+*> On entry, if COMPZ = 'V', then Z contains the unitary
+*> matrix used in the reduction to tridiagonal form.
+*> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*> orthonormal eigenvectors of the original Hermitian matrix,
+*> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*> of the symmetric tridiagonal matrix.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If COMPZ = 'N' or 'I', or N <= 1, LWORK must be at least 1.
+*> If COMPZ = 'V' and N > 1, LWORK must be at least N*N.
+*> Note that for COMPZ = 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LWORK need
+*> only be 1.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal sizes of the WORK, RWORK and
+*> IWORK arrays, returns these values as the first entries of
+*> the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (LRWORK)
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK.
+*> If COMPZ = 'N' or N <= 1, LRWORK must be at least 1.
+*> If COMPZ = 'V' and N > 1, LRWORK must be at least
+*> 1 + 3*N + 2*N*lg N + 4*N**2 ,
+*> where lg( N ) = smallest integer k such
+*> that 2**k >= N.
+*> If COMPZ = 'I' and N > 1, LRWORK must be at least
+*> 1 + 4*N + 2*N**2 .
+*> Note that for COMPZ = 'I' or 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LRWORK
+*> need only be max(1,2*(N-1)).
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK.
+*> If COMPZ = 'N' or N <= 1, LIWORK must be at least 1.
+*> If COMPZ = 'V' or N > 1, LIWORK must be at least
+*> 6 + 6*N + 5*N*lg N.
+*> If COMPZ = 'I' or N > 1, LIWORK must be at least
+*> 3 + 5*N .
+*> Note that for COMPZ = 'I' or 'V', then if N is less than or
+*> equal to the minimum divide size, usually 25, then LIWORK
+*> need only be 1.
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal sizes of the WORK, RWORK
+*> and IWORK arrays, returns these values as the first entries
+*> of the WORK, RWORK and IWORK arrays, and no error message
+*> related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: The algorithm failed to compute an eigenvalue while
+*> working on the submatrix lying in rows and columns
+*> INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK,
$ LRWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -16,130 +229,6 @@
COMPLEX*16 WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSTEDC computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric tridiagonal matrix using the divide and conquer method.
-* The eigenvectors of a full or band complex Hermitian matrix can also
-* be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this
-* matrix to tridiagonal form.
-*
-* This code makes very mild assumptions about floating point
-* arithmetic. It will work on machines with a guard digit in
-* add/subtract, or on those binary machines without guard digits
-* which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
-* It could conceivably fail on hexadecimal or decimal machines
-* without guard digits, but we know of none. See DLAED3 for details.
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'I': Compute eigenvectors of tridiagonal matrix also.
-* = 'V': Compute eigenvectors of original Hermitian matrix
-* also. On entry, Z contains the unitary matrix used
-* to reduce the original matrix to tridiagonal form.
-*
-* N (input) INTEGER
-* The dimension of the symmetric tridiagonal matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the subdiagonal elements of the tridiagonal matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* On entry, if COMPZ = 'V', then Z contains the unitary
-* matrix used in the reduction to tridiagonal form.
-* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-* orthonormal eigenvectors of the original Hermitian matrix,
-* and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-* of the symmetric tridiagonal matrix.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If eigenvectors are desired, then LDZ >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If COMPZ = 'N' or 'I', or N <= 1, LWORK must be at least 1.
-* If COMPZ = 'V' and N > 1, LWORK must be at least N*N.
-* Note that for COMPZ = 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LWORK need
-* only be 1.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal sizes of the WORK, RWORK and
-* IWORK arrays, returns these values as the first entries of
-* the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array,
-* dimension (LRWORK)
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK.
-* If COMPZ = 'N' or N <= 1, LRWORK must be at least 1.
-* If COMPZ = 'V' and N > 1, LRWORK must be at least
-* 1 + 3*N + 2*N*lg N + 4*N**2 ,
-* where lg( N ) = smallest integer k such
-* that 2**k >= N.
-* If COMPZ = 'I' and N > 1, LRWORK must be at least
-* 1 + 4*N + 2*N**2 .
-* Note that for COMPZ = 'I' or 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LRWORK
-* need only be max(1,2*(N-1)).
-*
-* If LRWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK.
-* If COMPZ = 'N' or N <= 1, LIWORK must be at least 1.
-* If COMPZ = 'V' or N > 1, LIWORK must be at least
-* 6 + 6*N + 5*N*lg N.
-* If COMPZ = 'I' or N > 1, LIWORK must be at least
-* 3 + 5*N .
-* Note that for COMPZ = 'I' or 'V', then if N is less than or
-* equal to the minimum divide size, usually 25, then LIWORK
-* need only be 1.
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal sizes of the WORK, RWORK
-* and IWORK arrays, returns these values as the first entries
-* of the WORK, RWORK and IWORK arrays, and no error message
-* related to LWORK or LRWORK or LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: The algorithm failed to compute an eigenvalue while
-* working on the submatrix lying in rows and columns
-* INFO/(N+1) through mod(INFO,N+1).
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Jeff Rutter, Computer Science Division, University of California
-* at Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zstegr.f b/SRC/zstegr.f
index f7a02694..34cbd633 100644
--- a/SRC/zstegr.f
+++ b/SRC/zstegr.f
@@ -1,14 +1,259 @@
+*> \brief \b ZSTEGR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
+* ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
+* LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
+* DOUBLE PRECISION ABSTOL, VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
+* COMPLEX*16 Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSTEGR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
+*> a well defined set of pairwise different real eigenvalues, the corresponding
+*> real eigenvectors are pairwise orthogonal.
+*>
+*> The spectrum may be computed either completely or partially by specifying
+*> either an interval (VL,VU] or a range of indices IL:IU for the desired
+*> eigenvalues.
+*>
+*> ZSTEGR is a compatability wrapper around the improved ZSTEMR routine.
+*> See DSTEMR for further details.
+*>
+*> One important change is that the ABSTOL parameter no longer provides any
+*> benefit and hence is no longer used.
+*>
+*> Note : ZSTEGR and ZSTEMR work only on machines which follow
+*> IEEE-754 floating-point standard in their handling of infinities and
+*> NaNs. Normal execution may create these exceptiona values and hence
+*> may abort due to a floating point exception in environments which
+*> do not conform to the IEEE-754 standard.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal matrix
+*> T. On exit, D is overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the tridiagonal
+*> matrix T in elements 1 to N-1 of E. E(N) need not be set on
+*> input, but is used internally as workspace.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> Unused. Was the absolute error tolerance for the
+*> eigenvalues/eigenvectors in previous versions.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix T
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and an upper bound must be used.
+*> Supplying N columns is always safe.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th computed eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ). This is relevant in the case when the matrix
+*> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal
+*> (and minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,18*N)
+*> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N)
+*> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
+*> if only the eigenvalues are to be computed.
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = 1X, internal error in DLARRE,
+*> if INFO = 2X, internal error in ZLARRV.
+*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
+*> the nonzero error code returned by DLARRE or
+*> ZLARRV, respectively.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Inderjit Dhillon, IBM Almaden, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, LBNL/NERSC, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
$ LIWORK, INFO )
-
- IMPLICIT NONE
-*
*
* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -21,145 +266,6 @@
COMPLEX*16 Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSTEGR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
-* a well defined set of pairwise different real eigenvalues, the corresponding
-* real eigenvectors are pairwise orthogonal.
-*
-* The spectrum may be computed either completely or partially by specifying
-* either an interval (VL,VU] or a range of indices IL:IU for the desired
-* eigenvalues.
-*
-* ZSTEGR is a compatability wrapper around the improved ZSTEMR routine.
-* See DSTEMR for further details.
-*
-* One important change is that the ABSTOL parameter no longer provides any
-* benefit and hence is no longer used.
-*
-* Note : ZSTEGR and ZSTEMR work only on machines which follow
-* IEEE-754 floating-point standard in their handling of infinities and
-* NaNs. Normal execution may create these exceptiona values and hence
-* may abort due to a floating point exception in environments which
-* do not conform to the IEEE-754 standard.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal matrix
-* T. On exit, D is overwritten.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the tridiagonal
-* matrix T in elements 1 to N-1 of E. E(N) need not be set on
-* input, but is used internally as workspace.
-* On exit, E is overwritten.
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* ABSTOL (input) DOUBLE PRECISION
-* Unused. Was the absolute error tolerance for the
-* eigenvalues/eigenvectors in previous versions.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix T
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and an upper bound must be used.
-* Supplying N columns is always safe.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', then LDZ >= max(1,N).
-*
-* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th computed eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ). This is relevant in the case when the matrix
-* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal
-* (and minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,18*N)
-* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (LIWORK)
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N)
-* if the eigenvectors are desired, and LIWORK >= max(1,8*N)
-* if only the eigenvalues are to be computed.
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* On exit, INFO
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = 1X, internal error in DLARRE,
-* if INFO = 2X, internal error in ZLARRV.
-* Here, the digit X = ABS( IINFO ) < 10, where IINFO is
-* the nonzero error code returned by DLARRE or
-* ZLARRV, respectively.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Inderjit Dhillon, IBM Almaden, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, LBNL/NERSC, USA
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zstein.f b/SRC/zstein.f
index 03240eed..7964e411 100644
--- a/SRC/zstein.f
+++ b/SRC/zstein.f
@@ -1,10 +1,184 @@
+*> \brief \b ZSTEIN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
+* IWORK, IFAIL, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER IBLOCK( * ), IFAIL( * ), ISPLIT( * ),
+* $ IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
+* COMPLEX*16 Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSTEIN computes the eigenvectors of a real symmetric tridiagonal
+*> matrix T corresponding to specified eigenvalues, using inverse
+*> iteration.
+*>
+*> The maximum number of iterations allowed for each eigenvector is
+*> specified by an internal parameter MAXITS (currently set to 5).
+*>
+*> Although the eigenvectors are real, they are stored in a complex
+*> array, which may be passed to ZUNMTR or ZUPMTR for back
+*> transformation to the eigenvectors of a complex Hermitian matrix
+*> which was reduced to tridiagonal form.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix
+*> T, stored in elements 1 to N-1.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenvectors to be found. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements of W contain the eigenvalues for
+*> which eigenvectors are to be computed. The eigenvalues
+*> should be grouped by split-off block and ordered from
+*> smallest to largest within the block. ( The output array
+*> W from DSTEBZ with ORDER = 'B' is expected here. )
+*> \endverbatim
+*>
+*> \param[in] IBLOCK
+*> \verbatim
+*> IBLOCK is INTEGER array, dimension (N)
+*> The submatrix indices associated with the corresponding
+*> eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to
+*> the first submatrix from the top, =2 if W(i) belongs to
+*> the second submatrix, etc. ( The output array IBLOCK
+*> from DSTEBZ is expected here. )
+*> \endverbatim
+*>
+*> \param[in] ISPLIT
+*> \verbatim
+*> ISPLIT is INTEGER array, dimension (N)
+*> The splitting points, at which T breaks up into submatrices.
+*> The first submatrix consists of rows/columns 1 to
+*> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
+*> through ISPLIT( 2 ), etc.
+*> ( The output array ISPLIT from DSTEBZ is expected here. )
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, M)
+*> The computed eigenvectors. The eigenvector associated
+*> with the eigenvalue W(i) is stored in the i-th column of
+*> Z. Any vector which fails to converge is set to its current
+*> iterate after MAXITS iterations.
+*> The imaginary parts of the eigenvectors are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (5*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] IFAIL
+*> \verbatim
+*> IFAIL is INTEGER array, dimension (M)
+*> On normal exit, all elements of IFAIL are zero.
+*> If one or more eigenvectors fail to converge after
+*> MAXITS iterations, then their indices are stored in
+*> array IFAIL.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, then i eigenvectors failed to converge
+*> in MAXITS iterations. Their indices are stored in
+*> array IFAIL.
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> MAXITS INTEGER, default = 5
+*> The maximum number of iterations performed.
+*> \endverbatim
+*> \verbatim
+*> EXTRA INTEGER, default = 2
+*> The number of iterations performed after norm growth
+*> criterion is satisfied, should be at least 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
$ IWORK, IFAIL, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDZ, M, N
@@ -16,96 +190,6 @@
COMPLEX*16 Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSTEIN computes the eigenvectors of a real symmetric tridiagonal
-* matrix T corresponding to specified eigenvalues, using inverse
-* iteration.
-*
-* The maximum number of iterations allowed for each eigenvector is
-* specified by an internal parameter MAXITS (currently set to 5).
-*
-* Although the eigenvectors are real, they are stored in a complex
-* array, which may be passed to ZUNMTR or ZUPMTR for back
-* transformation to the eigenvectors of a complex Hermitian matrix
-* which was reduced to tridiagonal form.
-*
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix T.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix
-* T, stored in elements 1 to N-1.
-*
-* M (input) INTEGER
-* The number of eigenvectors to be found. 0 <= M <= N.
-*
-* W (input) DOUBLE PRECISION array, dimension (N)
-* The first M elements of W contain the eigenvalues for
-* which eigenvectors are to be computed. The eigenvalues
-* should be grouped by split-off block and ordered from
-* smallest to largest within the block. ( The output array
-* W from DSTEBZ with ORDER = 'B' is expected here. )
-*
-* IBLOCK (input) INTEGER array, dimension (N)
-* The submatrix indices associated with the corresponding
-* eigenvalues in W; IBLOCK(i)=1 if eigenvalue W(i) belongs to
-* the first submatrix from the top, =2 if W(i) belongs to
-* the second submatrix, etc. ( The output array IBLOCK
-* from DSTEBZ is expected here. )
-*
-* ISPLIT (input) INTEGER array, dimension (N)
-* The splitting points, at which T breaks up into submatrices.
-* The first submatrix consists of rows/columns 1 to
-* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
-* through ISPLIT( 2 ), etc.
-* ( The output array ISPLIT from DSTEBZ is expected here. )
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, M)
-* The computed eigenvectors. The eigenvector associated
-* with the eigenvalue W(i) is stored in the i-th column of
-* Z. Any vector which fails to converge is set to its current
-* iterate after MAXITS iterations.
-* The imaginary parts of the eigenvectors are set to zero.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (5*N)
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* IFAIL (output) INTEGER array, dimension (M)
-* On normal exit, all elements of IFAIL are zero.
-* If one or more eigenvectors fail to converge after
-* MAXITS iterations, then their indices are stored in
-* array IFAIL.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, then i eigenvectors failed to converge
-* in MAXITS iterations. Their indices are stored in
-* array IFAIL.
-*
-* Internal Parameters
-* ===================
-*
-* MAXITS INTEGER, default = 5
-* The maximum number of iterations performed.
-*
-* EXTRA INTEGER, default = 2
-* The number of iterations performed after norm growth
-* criterion is satisfied, should be at least 1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zstemr.f b/SRC/zstemr.f
index 02ef49f3..25810bd2 100644
--- a/SRC/zstemr.f
+++ b/SRC/zstemr.f
@@ -1,14 +1,332 @@
+*> \brief \b ZSTEMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
+* M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
+* IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBZ, RANGE
+* LOGICAL TRYRAC
+* INTEGER IL, INFO, IU, LDZ, NZC, LIWORK, LWORK, M, N
+* DOUBLE PRECISION VL, VU
+* ..
+* .. Array Arguments ..
+* INTEGER ISUPPZ( * ), IWORK( * )
+* DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
+* COMPLEX*16 Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSTEMR computes selected eigenvalues and, optionally, eigenvectors
+*> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
+*> a well defined set of pairwise different real eigenvalues, the corresponding
+*> real eigenvectors are pairwise orthogonal.
+*>
+*> The spectrum may be computed either completely or partially by specifying
+*> either an interval (VL,VU] or a range of indices IL:IU for the desired
+*> eigenvalues.
+*>
+*> Depending on the number of desired eigenvalues, these are computed either
+*> by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
+*> computed by the use of various suitable L D L^T factorizations near clusters
+*> of close eigenvalues (referred to as RRRs, Relatively Robust
+*> Representations). An informal sketch of the algorithm follows.
+*>
+*> For each unreduced block (submatrix) of T,
+*> (a) Compute T - sigma I = L D L^T, so that L and D
+*> define all the wanted eigenvalues to high relative accuracy.
+*> This means that small relative changes in the entries of D and L
+*> cause only small relative changes in the eigenvalues and
+*> eigenvectors. The standard (unfactored) representation of the
+*> tridiagonal matrix T does not have this property in general.
+*> (b) Compute the eigenvalues to suitable accuracy.
+*> If the eigenvectors are desired, the algorithm attains full
+*> accuracy of the computed eigenvalues only right before
+*> the corresponding vectors have to be computed, see steps c) and d).
+*> (c) For each cluster of close eigenvalues, select a new
+*> shift close to the cluster, find a new factorization, and refine
+*> the shifted eigenvalues to suitable accuracy.
+*> (d) For each eigenvalue with a large enough relative separation compute
+*> the corresponding eigenvector by forming a rank revealing twisted
+*> factorization. Go back to (c) for any clusters that remain.
+*>
+*> For more details, see:
+*> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
+*> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
+*> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
+*> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
+*> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
+*> 2004. Also LAPACK Working Note 154.
+*> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
+*> tridiagonal eigenvalue/eigenvector problem",
+*> Computer Science Division Technical Report No. UCB/CSD-97-971,
+*> UC Berkeley, May 1997.
+*>
+*> Further Details
+*> 1.ZSTEMR works only on machines which follow IEEE-754
+*> floating-point standard in their handling of infinities and NaNs.
+*> This permits the use of efficient inner loops avoiding a check for
+*> zero divisors.
+*>
+*> 2. LAPACK routines can be used to reduce a complex Hermitean matrix to
+*> real symmetric tridiagonal form.
+*>
+*> (Any complex Hermitean tridiagonal matrix has real values on its diagonal
+*> and potentially complex numbers on its off-diagonals. By applying a
+*> similarity transform with an appropriate diagonal matrix
+*> diag(1,e^{i \phy_1}, ... , e^{i \phy_{n-1}}), the complex Hermitean
+*> matrix can be transformed into a real symmetric matrix and complex
+*> arithmetic can be entirely avoided.)
+*>
+*> While the eigenvectors of the real symmetric tridiagonal matrix are real,
+*> the eigenvectors of original complex Hermitean matrix have complex entries
+*> in general.
+*> Since LAPACK drivers overwrite the matrix data with the eigenvectors,
+*> ZSTEMR accepts complex workspace to facilitate interoperability
+*> with ZUNMTR or ZUPMTR.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*> JOBZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only;
+*> = 'V': Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RANGE
+*> \verbatim
+*> RANGE is CHARACTER*1
+*> = 'A': all eigenvalues will be found.
+*> = 'V': all eigenvalues in the half-open interval (VL,VU]
+*> will be found.
+*> = 'I': the IL-th through IU-th eigenvalues will be found.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the N diagonal elements of the tridiagonal matrix
+*> T. On exit, D is overwritten.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> On entry, the (N-1) subdiagonal elements of the tridiagonal
+*> matrix T in elements 1 to N-1 of E. E(N) need not be set on
+*> input, but is used internally as workspace.
+*> On exit, E is overwritten.
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION
+*> \param[in] VU
+*> \verbatim
+*> VU is DOUBLE PRECISION
+*> If RANGE='V', the lower and upper bounds of the interval to
+*> be searched for eigenvalues. VL < VU.
+*> Not referenced if RANGE = 'A' or 'I'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] IL
+*> \verbatim
+*> IL is INTEGER
+*> \param[in] IU
+*> \verbatim
+*> IU is INTEGER
+*> If RANGE='I', the indices (in ascending order) of the
+*> smallest and largest eigenvalues to be returned.
+*> 1 <= IL <= IU <= N, if N > 0.
+*> Not referenced if RANGE = 'A' or 'V'.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of eigenvalues found. 0 <= M <= N.
+*> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is DOUBLE PRECISION array, dimension (N)
+*> The first M elements contain the selected eigenvalues in
+*> ascending order.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, max(1,M) )
+*> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
+*> contain the orthonormal eigenvectors of the matrix T
+*> corresponding to the selected eigenvalues, with the i-th
+*> column of Z holding the eigenvector associated with W(i).
+*> If JOBZ = 'N', then Z is not referenced.
+*> Note: the user must ensure that at least max(1,M) columns are
+*> supplied in the array Z; if RANGE = 'V', the exact value of M
+*> is not known in advance and can be computed with a workspace
+*> query by setting NZC = -1, see below.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> JOBZ = 'V', then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] NZC
+*> \verbatim
+*> NZC is INTEGER
+*> The number of eigenvectors to be held in the array Z.
+*> If RANGE = 'A', then NZC >= max(1,N).
+*> If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
+*> If RANGE = 'I', then NZC >= IU-IL+1.
+*> If NZC = -1, then a workspace query is assumed; the
+*> routine calculates the number of columns of the array Z that
+*> are needed to hold the eigenvectors.
+*> This value is returned as the first entry of the Z array, and
+*> no error message related to NZC is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] ISUPPZ
+*> \verbatim
+*> ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
+*> The support of the eigenvectors in Z, i.e., the indices
+*> indicating the nonzero elements in Z. The i-th computed eigenvector
+*> is nonzero only in elements ISUPPZ( 2*i-1 ) through
+*> ISUPPZ( 2*i ). This is relevant in the case when the matrix
+*> is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
+*> \endverbatim
+*>
+*> \param[in,out] TRYRAC
+*> \verbatim
+*> TRYRAC is LOGICAL
+*> If TRYRAC.EQ..TRUE., indicates that the code should check whether
+*> the tridiagonal matrix defines its eigenvalues to high relative
+*> accuracy. If so, the code uses relative-accuracy preserving
+*> algorithms that might be (a bit) slower depending on the matrix.
+*> If the matrix does not define its eigenvalues to high relative
+*> accuracy, the code can uses possibly faster algorithms.
+*> If TRYRAC.EQ..FALSE., the code is not required to guarantee
+*> relatively accurate eigenvalues and can use the fastest possible
+*> techniques.
+*> On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
+*> does not define its eigenvalues to high relative accuracy.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> On exit, if INFO = 0, WORK(1) returns the optimal
+*> (and minimal) LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,18*N)
+*> if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= max(1,10*N)
+*> if the eigenvectors are desired, and LIWORK >= max(1,8*N)
+*> if only the eigenvalues are to be computed.
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, INFO
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = 1X, internal error in DLARRE,
+*> if INFO = 2X, internal error in ZLARRV.
+*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
+*> the nonzero error code returned by DLARRE or
+*> ZLARRV, respectively.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Beresford Parlett, University of California, Berkeley, USA
+*> Jim Demmel, University of California, Berkeley, USA
+*> Inderjit Dhillon, University of Texas, Austin, USA
+*> Osni Marques, LBNL/NERSC, USA
+*> Christof Voemel, University of California, Berkeley, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
$ IWORK, LIWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK computational routine (version 3.2.1) --
-*
-* -- April 2009 --
*
+* -- LAPACK computational routine (version 3.2.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBZ, RANGE
@@ -22,215 +340,6 @@
COMPLEX*16 Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSTEMR computes selected eigenvalues and, optionally, eigenvectors
-* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
-* a well defined set of pairwise different real eigenvalues, the corresponding
-* real eigenvectors are pairwise orthogonal.
-*
-* The spectrum may be computed either completely or partially by specifying
-* either an interval (VL,VU] or a range of indices IL:IU for the desired
-* eigenvalues.
-*
-* Depending on the number of desired eigenvalues, these are computed either
-* by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
-* computed by the use of various suitable L D L^T factorizations near clusters
-* of close eigenvalues (referred to as RRRs, Relatively Robust
-* Representations). An informal sketch of the algorithm follows.
-*
-* For each unreduced block (submatrix) of T,
-* (a) Compute T - sigma I = L D L^T, so that L and D
-* define all the wanted eigenvalues to high relative accuracy.
-* This means that small relative changes in the entries of D and L
-* cause only small relative changes in the eigenvalues and
-* eigenvectors. The standard (unfactored) representation of the
-* tridiagonal matrix T does not have this property in general.
-* (b) Compute the eigenvalues to suitable accuracy.
-* If the eigenvectors are desired, the algorithm attains full
-* accuracy of the computed eigenvalues only right before
-* the corresponding vectors have to be computed, see steps c) and d).
-* (c) For each cluster of close eigenvalues, select a new
-* shift close to the cluster, find a new factorization, and refine
-* the shifted eigenvalues to suitable accuracy.
-* (d) For each eigenvalue with a large enough relative separation compute
-* the corresponding eigenvector by forming a rank revealing twisted
-* factorization. Go back to (c) for any clusters that remain.
-*
-* For more details, see:
-* - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
-* to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
-* Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
-* - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
-* Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
-* 2004. Also LAPACK Working Note 154.
-* - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
-* tridiagonal eigenvalue/eigenvector problem",
-* Computer Science Division Technical Report No. UCB/CSD-97-971,
-* UC Berkeley, May 1997.
-*
-* Further Details
-* 1.ZSTEMR works only on machines which follow IEEE-754
-* floating-point standard in their handling of infinities and NaNs.
-* This permits the use of efficient inner loops avoiding a check for
-* zero divisors.
-*
-* 2. LAPACK routines can be used to reduce a complex Hermitean matrix to
-* real symmetric tridiagonal form.
-*
-* (Any complex Hermitean tridiagonal matrix has real values on its diagonal
-* and potentially complex numbers on its off-diagonals. By applying a
-* similarity transform with an appropriate diagonal matrix
-* diag(1,e^{i \phy_1}, ... , e^{i \phy_{n-1}}), the complex Hermitean
-* matrix can be transformed into a real symmetric matrix and complex
-* arithmetic can be entirely avoided.)
-*
-* While the eigenvectors of the real symmetric tridiagonal matrix are real,
-* the eigenvectors of original complex Hermitean matrix have complex entries
-* in general.
-* Since LAPACK drivers overwrite the matrix data with the eigenvectors,
-* ZSTEMR accepts complex workspace to facilitate interoperability
-* with ZUNMTR or ZUPMTR.
-*
-* Arguments
-* =========
-*
-* JOBZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only;
-* = 'V': Compute eigenvalues and eigenvectors.
-*
-* RANGE (input) CHARACTER*1
-* = 'A': all eigenvalues will be found.
-* = 'V': all eigenvalues in the half-open interval (VL,VU]
-* will be found.
-* = 'I': the IL-th through IU-th eigenvalues will be found.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the N diagonal elements of the tridiagonal matrix
-* T. On exit, D is overwritten.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the (N-1) subdiagonal elements of the tridiagonal
-* matrix T in elements 1 to N-1 of E. E(N) need not be set on
-* input, but is used internally as workspace.
-* On exit, E is overwritten.
-*
-* VL (input) DOUBLE PRECISION
-* VU (input) DOUBLE PRECISION
-* If RANGE='V', the lower and upper bounds of the interval to
-* be searched for eigenvalues. VL < VU.
-* Not referenced if RANGE = 'A' or 'I'.
-*
-* IL (input) INTEGER
-* IU (input) INTEGER
-* If RANGE='I', the indices (in ascending order) of the
-* smallest and largest eigenvalues to be returned.
-* 1 <= IL <= IU <= N, if N > 0.
-* Not referenced if RANGE = 'A' or 'V'.
-*
-* M (output) INTEGER
-* The total number of eigenvalues found. 0 <= M <= N.
-* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
-*
-* W (output) DOUBLE PRECISION array, dimension (N)
-* The first M elements contain the selected eigenvalues in
-* ascending order.
-*
-* Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M) )
-* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
-* contain the orthonormal eigenvectors of the matrix T
-* corresponding to the selected eigenvalues, with the i-th
-* column of Z holding the eigenvector associated with W(i).
-* If JOBZ = 'N', then Z is not referenced.
-* Note: the user must ensure that at least max(1,M) columns are
-* supplied in the array Z; if RANGE = 'V', the exact value of M
-* is not known in advance and can be computed with a workspace
-* query by setting NZC = -1, see below.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* JOBZ = 'V', then LDZ >= max(1,N).
-*
-* NZC (input) INTEGER
-* The number of eigenvectors to be held in the array Z.
-* If RANGE = 'A', then NZC >= max(1,N).
-* If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
-* If RANGE = 'I', then NZC >= IU-IL+1.
-* If NZC = -1, then a workspace query is assumed; the
-* routine calculates the number of columns of the array Z that
-* are needed to hold the eigenvectors.
-* This value is returned as the first entry of the Z array, and
-* no error message related to NZC is issued by XERBLA.
-*
-* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )
-* The support of the eigenvectors in Z, i.e., the indices
-* indicating the nonzero elements in Z. The i-th computed eigenvector
-* is nonzero only in elements ISUPPZ( 2*i-1 ) through
-* ISUPPZ( 2*i ). This is relevant in the case when the matrix
-* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
-*
-* TRYRAC (input/output) LOGICAL
-* If TRYRAC.EQ..TRUE., indicates that the code should check whether
-* the tridiagonal matrix defines its eigenvalues to high relative
-* accuracy. If so, the code uses relative-accuracy preserving
-* algorithms that might be (a bit) slower depending on the matrix.
-* If the matrix does not define its eigenvalues to high relative
-* accuracy, the code can uses possibly faster algorithms.
-* If TRYRAC.EQ..FALSE., the code is not required to guarantee
-* relatively accurate eigenvalues and can use the fastest possible
-* techniques.
-* On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
-* does not define its eigenvalues to high relative accuracy.
-*
-* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
-* On exit, if INFO = 0, WORK(1) returns the optimal
-* (and minimal) LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,18*N)
-* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (LIWORK)
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= max(1,10*N)
-* if the eigenvectors are desired, and LIWORK >= max(1,8*N)
-* if only the eigenvalues are to be computed.
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* On exit, INFO
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = 1X, internal error in DLARRE,
-* if INFO = 2X, internal error in ZLARRV.
-* Here, the digit X = ABS( IINFO ) < 10, where IINFO is
-* the nonzero error code returned by DLARRE or
-* ZLARRV, respectively.
-*
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Beresford Parlett, University of California, Berkeley, USA
-* Jim Demmel, University of California, Berkeley, USA
-* Inderjit Dhillon, University of Texas, Austin, USA
-* Osni Marques, LBNL/NERSC, USA
-* Christof Voemel, University of California, Berkeley, USA
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsteqr.f b/SRC/zsteqr.f
index 55ce87b6..79777442 100644
--- a/SRC/zsteqr.f
+++ b/SRC/zsteqr.f
@@ -1,9 +1,133 @@
+*> \brief \b ZSTEQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPZ
+* INTEGER INFO, LDZ, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), WORK( * )
+* COMPLEX*16 Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the implicit QL or QR method.
+*> The eigenvectors of a full or band complex Hermitian matrix can also
+*> be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this
+*> matrix to tridiagonal form.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMPZ
+*> \verbatim
+*> COMPZ is CHARACTER*1
+*> = 'N': Compute eigenvalues only.
+*> = 'V': Compute eigenvalues and eigenvectors of the original
+*> Hermitian matrix. On entry, Z must contain the
+*> unitary matrix used to reduce the original matrix
+*> to tridiagonal form.
+*> = 'I': Compute eigenvalues and eigenvectors of the
+*> tridiagonal matrix. Z is initialized to the identity
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> On entry, the diagonal elements of the tridiagonal matrix.
+*> On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> On entry, the (n-1) subdiagonal elements of the tridiagonal
+*> matrix.
+*> On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, N)
+*> On entry, if COMPZ = 'V', then Z contains the unitary
+*> matrix used in the reduction to tridiagonal form.
+*> On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*> orthonormal eigenvectors of the original Hermitian matrix,
+*> and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*> of the symmetric tridiagonal matrix.
+*> If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1, and if
+*> eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (max(1,2*N-2))
+*> If COMPZ = 'N', then WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: the algorithm has failed to find all the eigenvalues in
+*> a total of 30*N iterations; if INFO = i, then i
+*> elements of E have not converged to zero; on exit, D
+*> and E contain the elements of a symmetric tridiagonal
+*> matrix which is unitarily similar to the original
+*> matrix.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPZ
@@ -14,66 +138,6 @@
COMPLEX*16 Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSTEQR computes all eigenvalues and, optionally, eigenvectors of a
-* symmetric tridiagonal matrix using the implicit QL or QR method.
-* The eigenvectors of a full or band complex Hermitian matrix can also
-* be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this
-* matrix to tridiagonal form.
-*
-* Arguments
-* =========
-*
-* COMPZ (input) CHARACTER*1
-* = 'N': Compute eigenvalues only.
-* = 'V': Compute eigenvalues and eigenvectors of the original
-* Hermitian matrix. On entry, Z must contain the
-* unitary matrix used to reduce the original matrix
-* to tridiagonal form.
-* = 'I': Compute eigenvalues and eigenvectors of the
-* tridiagonal matrix. Z is initialized to the identity
-* matrix.
-*
-* N (input) INTEGER
-* The order of the matrix. N >= 0.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (N)
-* On entry, the diagonal elements of the tridiagonal matrix.
-* On exit, if INFO = 0, the eigenvalues in ascending order.
-*
-* E (input/output) DOUBLE PRECISION array, dimension (N-1)
-* On entry, the (n-1) subdiagonal elements of the tridiagonal
-* matrix.
-* On exit, E has been destroyed.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ, N)
-* On entry, if COMPZ = 'V', then Z contains the unitary
-* matrix used in the reduction to tridiagonal form.
-* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-* orthonormal eigenvectors of the original Hermitian matrix,
-* and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-* of the symmetric tridiagonal matrix.
-* If COMPZ = 'N', then Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1, and if
-* eigenvectors are desired, then LDZ >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2))
-* If COMPZ = 'N', then WORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: the algorithm has failed to find all the eigenvalues in
-* a total of 30*N iterations; if INFO = i, then i
-* elements of E have not converged to zero; on exit, D
-* and E contain the elements of a symmetric tridiagonal
-* matrix which is unitarily similar to the original
-* matrix.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsycon.f b/SRC/zsycon.f
index 370c805d..ad5dbbc2 100644
--- a/SRC/zsycon.f
+++ b/SRC/zsycon.f
@@ -1,12 +1,126 @@
+*> \brief \b ZSYCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION ANORM, RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYCON estimates the reciprocal of the condition number (in the
+*> 1-norm) of a complex symmetric matrix A using the factorization
+*> A = U*D*U**T or A = L*D*L**T computed by ZSYTRF.
+*>
+*> An estimate is obtained for norm(inv(A)), and the reciprocal of the
+*> condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The 1-norm of the original matrix A.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
+*> estimate of the 1-norm of inv(A) computed in this routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
SUBROUTINE ZSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,53 +132,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYCON estimates the reciprocal of the condition number (in the
-* 1-norm) of a complex symmetric matrix A using the factorization
-* A = U*D*U**T or A = L*D*L**T computed by ZSYTRF.
-*
-* An estimate is obtained for norm(inv(A)), and the reciprocal of the
-* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSYTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
-*
-* ANORM (input) DOUBLE PRECISION
-* The 1-norm of the original matrix A.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an
-* estimate of the 1-norm of inv(A) computed in this routine.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsyconv.f b/SRC/zsyconv.f
index 91752637..51573a1c 100644
--- a/SRC/zsyconv.f
+++ b/SRC/zsyconv.f
@@ -1,69 +1,135 @@
- SUBROUTINE ZSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK PROTOTYPE routine (version 3.2.2) --
-* -- Written by Julie Langou of the Univ. of TN --
-* May 2010
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO, WAY
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b ZSYCONV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, WAY
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZSYCONV converts A given by ZHETRF into L and D or vice-versa.
-* Get nondiagonal elements of D (returned in workspace) and
-* apply or reverse permutation done in TRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYCONV converts A given by ZHETRF into L and D or vice-versa.
+*> Get nondiagonal elements of D (returned in workspace) and
+*> apply or reverse permutation done in TRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* WAY (input) CHARACTER*1
-* = 'C': Convert
-* = 'R': Revert
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] WAY
+*> \verbatim
+*> WAY is CHARACTER*1
+*> = 'C': Convert
+*> = 'R': Revert
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1.
+*> LWORK = N
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+*> \ingroup complex16SYcomputational
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1.
-* LWORK = N
+* =====================================================================
+ SUBROUTINE ZSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO, WAY
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zsyequb.f b/SRC/zsyequb.f
index 41eb95f4..b96e34cf 100644
--- a/SRC/zsyequb.f
+++ b/SRC/zsyequb.f
@@ -1,84 +1,154 @@
- SUBROUTINE ZSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*> \brief \b ZSYEQUB
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
- IMPLICIT NONE
-* ..
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
- DOUBLE PRECISION AMAX, SCOND
- CHARACTER UPLO
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), WORK( * )
- DOUBLE PRECISION S( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION AMAX, SCOND
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* DOUBLE PRECISION S( * )
+* ..
+*
* Purpose
* =======
*
-* ZSYEQUB computes row and column scalings intended to equilibrate a
-* symmetric matrix A and reduce its condition number
-* (with respect to the two-norm). S contains the scale factors,
-* S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-* elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
-* choice of S puts the condition number of B within a factor N of the
-* smallest possible condition number over all possible diagonal
-* scalings.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYEQUB computes row and column scalings intended to equilibrate a
+*> symmetric matrix A and reduce its condition number
+*> (with respect to the two-norm). S contains the scale factors,
+*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
+*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal. This
+*> choice of S puts the condition number of B within a factor N of the
+*> smallest possible condition number over all possible diagonal
+*> scalings.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The N-by-N symmetric matrix whose scaling
-* factors are to be computed. Only the diagonal elements of A
-* are referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The N-by-N symmetric matrix whose scaling
+*> factors are to be computed. Only the diagonal elements of A
+*> are referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> If INFO = 0, S contains the scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] SCOND
+*> \verbatim
+*> SCOND is DOUBLE PRECISION
+*> If INFO = 0, S contains the ratio of the smallest S(i) to
+*> the largest S(i). If SCOND >= 0.1 and AMAX is neither too
+*> large nor too small, it is not worth scaling by S.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*> AMAX is DOUBLE PRECISION
+*> Absolute value of largest matrix element. If AMAX is very
+*> close to overflow or very close to underflow, the matrix
+*> should be scaled.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element is nonpositive.
+*> \endverbatim
+*>
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* If INFO = 0, S contains the scale factors for A.
+* Authors
+* =======
*
-* SCOND (output) DOUBLE PRECISION
-* If INFO = 0, S contains the ratio of the smallest S(i) to
-* the largest S(i). If SCOND >= 0.1 and AMAX is neither too
-* large nor too small, it is not worth scaling by S.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AMAX (output) DOUBLE PRECISION
-* Absolute value of largest matrix element. If AMAX is very
-* close to overflow or very close to underflow, the matrix
-* should be scaled.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (3*N)
+*> \ingroup complex16SYcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element is nonpositive.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* Further Details
+*> ======= =======
+*>
+*> Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
+*> Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
+*> DOI 10.1023/B:NUMA.0000016606.32820.69
+*> Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
*
-* Reference: Livne, O.E. and Golub, G.H., "Scaling by Binormalization",
-* Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004.
-* DOI 10.1023/B:NUMA.0000016606.32820.69
-* Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+ DOUBLE PRECISION AMAX, SCOND
+ CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), WORK( * )
+ DOUBLE PRECISION S( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zsymv.f b/SRC/zsymv.f
index c880a74f..cb0e9e5e 100644
--- a/SRC/zsymv.f
+++ b/SRC/zsymv.f
@@ -1,9 +1,161 @@
+*> \brief \b ZSYMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, INCY, LDA, N
+* COMPLEX*16 ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( LDA, N )
+*> Before entry, with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced.
+*> Before entry, with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the N-
+*> element vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> On entry, BETA specifies the scalar beta. When BETA is
+*> supplied as zero then Y need not be set on input.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the n
+*> element vector y. On exit, Y is overwritten by the updated
+*> vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYauxiliary
+*
+* =====================================================================
SUBROUTINE ZSYMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,85 +166,6 @@
COMPLEX*16 A( LDA, * ), X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYMV performs the matrix-vector operation
-*
-* y := alpha*A*x + beta*y,
-*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric matrix.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) COMPLEX*16
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A (input) COMPLEX*16 array, dimension ( LDA, N )
-* Before entry, with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced.
-* Before entry, with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced.
-* Unchanged on exit.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* X (input) COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the N-
-* element vector x.
-* Unchanged on exit.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA (input) COMPLEX*16
-* On entry, BETA specifies the scalar beta. When BETA is
-* supplied as zero then Y need not be set on input.
-* Unchanged on exit.
-*
-* Y (input/output) COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the n
-* element vector y. On exit, Y is overwritten by the updated
-* vector y.
-*
-* INCY (input) INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsyr.f b/SRC/zsyr.f
index 383979ee..0c0d0d97 100644
--- a/SRC/zsyr.f
+++ b/SRC/zsyr.f
@@ -1,9 +1,139 @@
+*> \brief \b ZSYR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYR( UPLO, N, ALPHA, X, INCX, A, LDA )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, LDA, N
+* COMPLEX*16 ALPHA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYR performs the symmetric rank 1 operation
+*>
+*> A := alpha*x*x**H + A,
+*>
+*> where alpha is a complex scalar, x is an n element vector and A is an
+*> n by n symmetric matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the array A is to be referenced as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' Only the upper triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' Only the lower triangular part of A
+*> is to be referenced.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the N-
+*> element vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( LDA, N )
+*> Before entry, with UPLO = 'U' or 'u', the leading n by n
+*> upper triangular part of the array A must contain the upper
+*> triangular part of the symmetric matrix and the strictly
+*> lower triangular part of A is not referenced. On exit, the
+*> upper triangular part of the array A is overwritten by the
+*> upper triangular part of the updated matrix.
+*> Before entry, with UPLO = 'L' or 'l', the leading n by n
+*> lower triangular part of the array A must contain the lower
+*> triangular part of the symmetric matrix and the strictly
+*> upper triangular part of A is not referenced. On exit, the
+*> lower triangular part of the array A is overwritten by the
+*> lower triangular part of the updated matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYauxiliary
+*
+* =====================================================================
SUBROUTINE ZSYR( UPLO, N, ALPHA, X, INCX, A, LDA )
*
* -- LAPACK auxiliary routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,72 +144,6 @@
COMPLEX*16 A( LDA, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYR performs the symmetric rank 1 operation
-*
-* A := alpha*x*x**H + A,
-*
-* where alpha is a complex scalar, x is an n element vector and A is an
-* n by n symmetric matrix.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the array A is to be referenced as
-* follows:
-*
-* UPLO = 'U' or 'u' Only the upper triangular part of A
-* is to be referenced.
-*
-* UPLO = 'L' or 'l' Only the lower triangular part of A
-* is to be referenced.
-*
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* ALPHA (input) COMPLEX*16
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* X (input) COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the N-
-* element vector x.
-* Unchanged on exit.
-*
-* INCX (input) INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* A (input/output) COMPLEX*16 array, dimension ( LDA, N )
-* Before entry, with UPLO = 'U' or 'u', the leading n by n
-* upper triangular part of the array A must contain the upper
-* triangular part of the symmetric matrix and the strictly
-* lower triangular part of A is not referenced. On exit, the
-* upper triangular part of the array A is overwritten by the
-* upper triangular part of the updated matrix.
-* Before entry, with UPLO = 'L' or 'l', the leading n by n
-* lower triangular part of the array A must contain the lower
-* triangular part of the symmetric matrix and the strictly
-* upper triangular part of A is not referenced. On exit, the
-* lower triangular part of the array A is overwritten by the
-* lower triangular part of the updated matrix.
-*
-* LDA (input) INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsyrfs.f b/SRC/zsyrfs.f
index 2609604a..14d6d6d0 100644
--- a/SRC/zsyrfs.f
+++ b/SRC/zsyrfs.f
@@ -1,12 +1,193 @@
+*> \brief \b ZSYRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+* X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYRFS improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite, and
+*> provides error bounds and backward error estimates for the solution.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or
+*> A = L*D*L**T as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by ZSYTRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*> \verbatim
+*> Internal Parameters
+*> ===================
+*> \endverbatim
+*> \verbatim
+*> ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
SUBROUTINE ZSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
$ X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -19,93 +200,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYRFS improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite, and
-* provides error bounds and backward error estimates for the solution.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or
-* A = L*D*L**T as computed by ZSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by ZSYTRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Internal Parameters
-* ===================
-*
-* ITMAX is the maximum number of steps of iterative refinement.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsyrfsx.f b/SRC/zsyrfsx.f
index 701cd55c..58ad7eae 100644
--- a/SRC/zsyrfsx.f
+++ b/SRC/zsyrfsx.f
@@ -1,18 +1,423 @@
+*> \brief \b ZSYRFSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYRFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
+* ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO, EQUED
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ), RWORK( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZSYRFSX improves the computed solution to a system of linear
+*> equations when the coefficient matrix is symmetric indefinite, and
+*> provides error bounds and backward error estimates for the
+*> solution. In addition to normwise error bound, the code provides
+*> maximum componentwise error bound if possible. See comments for
+*> ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
+*>
+*> The original system of linear equations may have been equilibrated
+*> before calling this routine, as described by arguments EQUED and S
+*> below. In this case, the solution and error bounds returned are
+*> for the original unequilibrated system.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] EQUED
+*> \verbatim
+*> EQUED is CHARACTER*1
+*> Specifies the form of equilibration that was done to A
+*> before calling this routine. This is needed to compute
+*> the solution and error bounds correctly.
+*> = 'N': No equilibration
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> The right hand side B has been changed accordingly.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDAF,N)
+*> The factored form of the matrix A. AF contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor U or L from the factorization A = U*D*U**T or A =
+*> L*D*L**T as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, the solution matrix X, as computed by DGETRS.
+*> On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the double-precision refinement algorithm,
+*> possibly with doubled-single computations if the
+*> compilation environment does not support DOUBLE
+*> PRECISION.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
SUBROUTINE ZSYRFSX( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS,
$ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
$ WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK computational routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER UPLO, EQUED
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,274 +433,6 @@
$ ERR_BNDS_COMP( NRHS, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYRFSX improves the computed solution to a system of linear
-* equations when the coefficient matrix is symmetric indefinite, and
-* provides error bounds and backward error estimates for the
-* solution. In addition to normwise error bound, the code provides
-* maximum componentwise error bound if possible. See comments for
-* ERR_BNDS_NORM and ERR_BNDS_COMP for details of the error bounds.
-*
-* The original system of linear equations may have been equilibrated
-* before calling this routine, as described by arguments EQUED and S
-* below. In this case, the solution and error bounds returned are
-* for the original unequilibrated system.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* EQUED (input) CHARACTER*1
-* Specifies the form of equilibration that was done to A
-* before calling this routine. This is needed to compute
-* the solution and error bounds correctly.
-* = 'N': No equilibration
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* The right hand side B has been changed accordingly.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input) COMPLEX*16 array, dimension (LDAF,N)
-* The factored form of the matrix A. AF contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor U or L from the factorization A = U*D*U**T or A =
-* L*D*L**T as computed by DSYTRF.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by DSYTRF.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input/output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, the solution matrix X, as computed by DGETRS.
-* On exit, the improved solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the double-precision refinement algorithm,
-* possibly with doubled-single computations if the
-* compilation environment does not support DOUBLE
-* PRECISION.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zsysv.f b/SRC/zsysv.f
index dd4a0dae..85e6b0bb 100644
--- a/SRC/zsysv.f
+++ b/SRC/zsysv.f
@@ -1,11 +1,174 @@
+*> \brief <b> ZSYSV computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
+* LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, LWORK, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYSV computes the solution to a complex system of linear equations
+*> A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> The diagonal pivoting method is used to factor A as
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
+*> used to solve the system of equations A * X = B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the block diagonal matrix D and the
+*> multipliers used to obtain the factor U or L from the
+*> factorization A = U*D*U**T or A = L*D*L**T as computed by
+*> ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D, as
+*> determined by ZSYTRF. If IPIV(k) > 0, then rows and columns
+*> k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
+*> diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
+*> then rows and columns k-1 and -IPIV(k) were interchanged and
+*> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
+*> IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
+*> -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
+*> diagonal block.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= 1, and for best performance
+*> LWORK >= max(1,N*NB), where NB is the optimal blocksize for
+*> ZSYTRF.
+*> for LWORK < N, TRS will be done with Level BLAS 2
+*> for LWORK >= N, TRS will be done with Level BLAS 3
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, so the solution could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYsolve
+*
+* =====================================================================
SUBROUTINE ZSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
$ LWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @precisions normal z -> s d c
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,94 +179,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYSV computes the solution to a complex system of linear equations
-* A * X = B,
-* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* The diagonal pivoting method is used to factor A as
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then
-* used to solve the system of equations A * X = B.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if INFO = 0, the block diagonal matrix D and the
-* multipliers used to obtain the factor U or L from the
-* factorization A = U*D*U**T or A = L*D*L**T as computed by
-* ZSYTRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D, as
-* determined by ZSYTRF. If IPIV(k) > 0, then rows and columns
-* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1
-* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0,
-* then rows and columns k-1 and -IPIV(k) were interchanged and
-* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
-* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and
-* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2
-* diagonal block.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= 1, and for best performance
-* LWORK >= max(1,N*NB), where NB is the optimal blocksize for
-* ZSYTRF.
-* for LWORK < N, TRS will be done with Level BLAS 2
-* for LWORK >= N, TRS will be done with Level BLAS 3
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, so the solution could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zsysvx.f b/SRC/zsysvx.f
index a4563932..220cd75d 100644
--- a/SRC/zsysvx.f
+++ b/SRC/zsysvx.f
@@ -1,11 +1,286 @@
+*> \brief <b> ZSYSVX computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
+* LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYSVX uses the diagonal pivoting factorization to compute the
+*> solution to a complex system of linear equations A * X = B,
+*> where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
+*> The form of the factorization is
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 2. If some D(i,i)=0, so that D is exactly singular, then the routine
+*> returns with INFO = i. Otherwise, the factored form of A is used
+*> to estimate the condition number of the matrix A. If the
+*> reciprocal of the condition number is less than machine precision,
+*> INFO = N+1 is returned as a warning, but the routine still goes on
+*> to solve for X and compute error bounds as described below.
+*>
+*> 3. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 4. Iterative refinement is applied to improve the computed solution
+*> matrix and calculate error bounds and backward error estimates
+*> for it.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of A has been
+*> supplied on entry.
+*> = 'F': On entry, AF and IPIV contain the factored form
+*> of A. A, AF and IPIV will not be modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX*16 array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T as computed by ZSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L from the factorization
+*> A = U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block structure
+*> of D, as determined by ZSYTRF.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block structure
+*> of D, as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The N-by-NRHS right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number of the matrix
+*> A. If RCOND is less than the machine precision (in
+*> particular, if RCOND = 0), the matrix is singular to working
+*> precision. This condition is indicated by a return code of
+*> INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >= max(1,2*N), and for best
+*> performance, when FACT = 'N', LWORK >= max(1,2*N,N*NB), where
+*> NB is the optimal blocksize for ZSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, and i is
+*> <= N: D(i,i) is exactly zero. The factorization
+*> has been completed but the factor D is exactly
+*> singular, so the solution and error bounds could
+*> not be computed. RCOND = 0 is returned.
+*> = N+1: D is nonsingular, but RCOND is less than machine
+*> precision, meaning that the matrix is singular
+*> to working precision. Nevertheless, the
+*> solution and error bounds are computed because
+*> there are a number of situations where the
+*> computed solution can be more accurate than the
+*> value of RCOND would suggest.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYsolve
+*
+* =====================================================================
SUBROUTINE ZSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
$ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
$ RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.3.1) --
+* -- LAPACK solve routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER FACT, UPLO
@@ -19,173 +294,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYSVX uses the diagonal pivoting factorization to compute the
-* solution to a complex system of linear equations A * X = B,
-* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* Error bounds on the solution and a condition estimate are also
-* provided.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'N', the diagonal pivoting method is used to factor A.
-* The form of the factorization is
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 2. If some D(i,i)=0, so that D is exactly singular, then the routine
-* returns with INFO = i. Otherwise, the factored form of A is used
-* to estimate the condition number of the matrix A. If the
-* reciprocal of the condition number is less than machine precision,
-* INFO = N+1 is returned as a warning, but the routine still goes on
-* to solve for X and compute error bounds as described below.
-*
-* 3. The system of equations is solved for X using the factored form
-* of A.
-*
-* 4. Iterative refinement is applied to improve the computed solution
-* matrix and calculate error bounds and backward error estimates
-* for it.
-*
-* Arguments
-* =========
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of A has been
-* supplied on entry.
-* = 'F': On entry, AF and IPIV contain the factored form
-* of A. A, AF and IPIV will not be modified.
-* = 'N': The matrix A will be copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX*16 array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T as computed by ZSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L from the factorization
-* A = U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block structure
-* of D, as determined by ZSYTRF.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block structure
-* of D, as determined by ZSYTRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The N-by-NRHS right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The estimate of the reciprocal condition number of the matrix
-* A. If RCOND is less than the machine precision (in
-* particular, if RCOND = 0), the matrix is singular to working
-* precision. This condition is indicated by a return code of
-* INFO > 0.
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >= max(1,2*N), and for best
-* performance, when FACT = 'N', LWORK >= max(1,2*N,N*NB), where
-* NB is the optimal blocksize for ZSYTRF.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, and i is
-* <= N: D(i,i) is exactly zero. The factorization
-* has been completed but the factor D is exactly
-* singular, so the solution and error bounds could
-* not be computed. RCOND = 0 is returned.
-* = N+1: D is nonsingular, but RCOND is less than machine
-* precision, meaning that the matrix is singular
-* to working precision. Nevertheless, the
-* solution and error bounds are computed because
-* there are a number of situations where the
-* computed solution can be more accurate than the
-* value of RCOND would suggest.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsysvxx.f b/SRC/zsysvxx.f
index 33b90b70..34776a22 100644
--- a/SRC/zsysvxx.f
+++ b/SRC/zsysvxx.f
@@ -1,18 +1,527 @@
+*> \brief <b> ZSYSVXX computes the solution to system of linear equations A * X = B for SY matrices</b>
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
+* EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
+* N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
+* NPARAMS, PARAMS, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER EQUED, FACT, UPLO
+* INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
+* $ N_ERR_BNDS
+* DOUBLE PRECISION RCOND, RPVGRW
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+* $ X( LDX, * ), WORK( * )
+* DOUBLE PRECISION S( * ), PARAMS( * ), BERR( * ),
+* $ ERR_BNDS_NORM( NRHS, * ),
+* $ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> =======
+*>
+*> ZSYSVXX uses the diagonal pivoting factorization to compute the
+*> solution to a complex*16 system of linear equations A * X = B, where
+*> A is an N-by-N symmetric matrix and X and B are N-by-NRHS
+*> matrices.
+*>
+*> If requested, both normwise and maximum componentwise error bounds
+*> are returned. ZSYSVXX will return a solution with a tiny
+*> guaranteed error (O(eps) where eps is the working machine
+*> precision) unless the matrix is very ill-conditioned, in which
+*> case a warning is returned. Relevant condition numbers also are
+*> calculated and returned.
+*>
+*> ZSYSVXX accepts user-provided factorizations and equilibration
+*> factors; see the definitions of the FACT and EQUED options.
+*> Solving with refinement and using a factorization from a previous
+*> ZSYSVXX call will also produce a solution with either O(eps)
+*> errors or warnings, but we cannot make that claim for general
+*> user-provided factorizations and equilibration factors if they
+*> differ from what ZSYSVXX would itself produce.
+*>
+*> Description
+*> ===========
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
+*> the system:
+*>
+*> diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
+*>
+*> Whether or not the system will be equilibrated depends on the
+*> scaling of the matrix A, but if equilibration is used, A is
+*> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
+*> the matrix A (after equilibration if FACT = 'E') as
+*>
+*> A = U * D * U**T, if UPLO = 'U', or
+*> A = L * D * L**T, if UPLO = 'L',
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> 3. If some D(i,i)=0, so that D is exactly singular, then the
+*> routine returns with INFO = i. Otherwise, the factored form of A
+*> is used to estimate the condition number of the matrix A (see
+*> argument RCOND). If the reciprocal of the condition number is
+*> less than machine precision, the routine still goes on to solve
+*> for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*> of A.
+*>
+*> 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
+*> the routine will use iterative refinement to try to get a small
+*> error and error bounds. Refinement calculates the residual to at
+*> least twice the working precision.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*> diag(R) so that it solves the original system before
+*> equilibration.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> Some optional parameters are bundled in the PARAMS array. These
+*> settings determine how refinement is performed, but often the
+*> defaults are acceptable. If the defaults are acceptable, users
+*> can pass NPARAMS = 0 which prevents the source code from accessing
+*> the PARAMS argument.
+*> \endverbatim
+*>
+*> \param[in] FACT
+*> \verbatim
+*> FACT is CHARACTER*1
+*> Specifies whether or not the factored form of the matrix A is
+*> supplied on entry, and if not, whether the matrix A should be
+*> equilibrated before it is factored.
+*> = 'F': On entry, AF and IPIV contain the factored form of A.
+*> If EQUED is not 'N', the matrix A has been
+*> equilibrated with scaling factors given by S.
+*> A, AF, and IPIV are not modified.
+*> = 'N': The matrix A will be copied to AF and factored.
+*> = 'E': The matrix A will be equilibrated if necessary, then
+*> copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of linear equations, i.e., the order of the
+*> matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of A contains the upper triangular
+*> part of the matrix A, and the strictly lower triangular
+*> part of A is not referenced. If UPLO = 'L', the leading
+*> N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
+*> diag(S)*A*diag(S).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*> AF is or output) COMPLEX*16 array, dimension (LDAF,N)
+*> If FACT = 'F', then AF is an input argument and on entry
+*> contains the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T as computed by DSYTRF.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then AF is an output argument and on exit
+*> returns the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L from the factorization A =
+*> U*D*U**T or A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*> LDAF is INTEGER
+*> The leading dimension of the array AF. LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*> IPIV is or output) INTEGER array, dimension (N)
+*> If FACT = 'F', then IPIV is an input argument and on entry
+*> contains details of the interchanges and the block
+*> structure of D, as determined by DSYTRF. If IPIV(k) > 0,
+*> then rows and columns k and IPIV(k) were interchanged and
+*> D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
+*> IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
+*> -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
+*> diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
+*> then rows and columns k+1 and -IPIV(k) were interchanged
+*> and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*> \verbatim
+*> If FACT = 'N', then IPIV is an output argument and on exit
+*> contains details of the interchanges and the block
+*> structure of D, as determined by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*> EQUED is or output) CHARACTER*1
+*> Specifies the form of equilibration that was done.
+*> = 'N': No equilibration (always true if FACT = 'N').
+*> = 'Y': Both row and column equilibration, i.e., A has been
+*> replaced by diag(S) * A * diag(S).
+*> EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*> output argument.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*> S is or output) DOUBLE PRECISION array, dimension (N)
+*> The scale factors for A. If EQUED = 'Y', A is multiplied on
+*> the left and right by diag(S). S is an input argument if FACT =
+*> 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
+*> = 'Y', each element of S must be positive. If S is output, each
+*> element of S is a power of the radix. If S is input, each element
+*> of S should be a power of the radix to ensure a reliable solution
+*> and error estimates. Scaling by powers of the radix does not cause
+*> rounding errors unless the result underflows or overflows.
+*> Rounding errors during scaling lead to refining with a matrix that
+*> is not equivalent to the input matrix, producing error estimates
+*> that may not be reliable.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N-by-NRHS right hand side matrix B.
+*> On exit,
+*> if EQUED = 'N', B is not modified;
+*> if EQUED = 'Y', B is overwritten by diag(S)*B;
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If INFO = 0, the N-by-NRHS solution matrix X to the original
+*> system of equations. Note that A and B are modified on exit if
+*> EQUED .ne. 'N', and the solution to the equilibrated system is
+*> inv(diag(S))*X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> Reciprocal scaled condition number. This is an estimate of the
+*> reciprocal Skeel condition number of the matrix A after
+*> equilibration (if done). If this is less than the machine
+*> precision (in particular, if it is zero), the matrix is singular
+*> to working precision. Note that the error may still be small even
+*> if this number is very small and the matrix appears ill-
+*> conditioned.
+*> \endverbatim
+*>
+*> \param[out] RPVGRW
+*> \verbatim
+*> RPVGRW is DOUBLE PRECISION
+*> Reciprocal pivot growth. On exit, this contains the reciprocal
+*> pivot growth factor norm(A)/norm(U). The "max absolute element"
+*> norm is used. If this is much less than 1, then the stability of
+*> the LU factorization of the (equilibrated) matrix A could be poor.
+*> This also means that the solution X, estimated condition numbers,
+*> and error bounds could be unreliable. If factorization fails with
+*> 0<INFO<=N, then this contains the reciprocal pivot growth factor
+*> for the leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> Componentwise relative backward error. This is the
+*> componentwise relative backward error of each solution vector X(j)
+*> (i.e., the smallest relative change in any element of A or B that
+*> makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[in] N_ERR_BNDS
+*> \verbatim
+*> N_ERR_BNDS is INTEGER
+*> Number of error bounds to return for each right hand side
+*> and each type (normwise or componentwise). See ERR_BNDS_NORM and
+*> ERR_BNDS_COMP below.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_NORM
+*> \verbatim
+*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> normwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Normwise relative error in the ith solution vector:
+*> max_j (abs(XTRUE(j,i) - X(j,i)))
+*> ------------------------------
+*> max_j abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the type of error information as described
+*> below. There currently are up to three pieces of information
+*> returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_NORM(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated normwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*A, where S scales each row by a power of the
+*> radix so all absolute row sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[out] ERR_BNDS_COMP
+*> \verbatim
+*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
+*> For each right-hand side, this array contains information about
+*> various error bounds and condition numbers corresponding to the
+*> componentwise relative error, which is defined as follows:
+*> \endverbatim
+*> \verbatim
+*> Componentwise relative error in the ith solution vector:
+*> abs(XTRUE(j,i) - X(j,i))
+*> max_j ----------------------
+*> abs(X(j,i))
+*> \endverbatim
+*> \verbatim
+*> The array is indexed by the right-hand side i (on which the
+*> componentwise relative error depends), and the type of error
+*> information as described below. There currently are up to three
+*> pieces of information returned for each right-hand side. If
+*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then
+*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
+*> the first (:,N_ERR_BNDS) entries are returned.
+*> \endverbatim
+*> \verbatim
+*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
+*> right-hand side.
+*> \endverbatim
+*> \verbatim
+*> The second index in ERR_BNDS_COMP(:,err) contains the following
+*> three fields:
+*> err = 1 "Trust/don't trust" boolean. Trust the answer if the
+*> reciprocal condition number is less than the threshold
+*> sqrt(n) * dlamch('Epsilon').
+*> \endverbatim
+*> \verbatim
+*> err = 2 "Guaranteed" error bound: The estimated forward error,
+*> almost certainly within a factor of 10 of the true error
+*> so long as the next entry is greater than the threshold
+*> sqrt(n) * dlamch('Epsilon'). This error bound should only
+*> be trusted if the previous boolean is true.
+*> \endverbatim
+*> \verbatim
+*> err = 3 Reciprocal condition number: Estimated componentwise
+*> reciprocal condition number. Compared with the threshold
+*> sqrt(n) * dlamch('Epsilon') to determine if the error
+*> estimate is "guaranteed". These reciprocal condition
+*> numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
+*> appropriately scaled matrix Z.
+*> Let Z = S*(A*diag(x)), where x is the solution for the
+*> current right-hand side and S scales each row of
+*> A*diag(x) by a power of the radix so all absolute row
+*> sums of Z are approximately 1.
+*> \endverbatim
+*> \verbatim
+*> See Lapack Working Note 165 for further details and extra
+*> cautions.
+*> \endverbatim
+*>
+*> \param[in] NPARAMS
+*> \verbatim
+*> NPARAMS is INTEGER
+*> Specifies the number of parameters set in PARAMS. If .LE. 0, the
+*> PARAMS array is never referenced and default values are used.
+*> \endverbatim
+*>
+*> \param[in,out] PARAMS
+*> \verbatim
+*> PARAMS is / output) DOUBLE PRECISION array, dimension NPARAMS
+*> Specifies algorithm parameters. If an entry is .LT. 0.0, then
+*> that entry will be filled with default value used for that
+*> parameter. Only positions up to NPARAMS are accessed; defaults
+*> are used for higher-numbered parameters.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
+*> refinement or not.
+*> Default: 1.0D+0
+*> = 0.0 : No refinement is performed, and no error bounds are
+*> computed.
+*> = 1.0 : Use the extra-precise refinement algorithm.
+*> (other values are reserved for future use)
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
+*> computations allowed for refinement.
+*> Default: 10
+*> Aggressive: Set to 100 to permit convergence using approximate
+*> factorizations or factorizations other than LU. If
+*> the factorization uses a technique other than
+*> Gaussian elimination, the guarantees in
+*> err_bnds_norm and err_bnds_comp may no longer be
+*> trustworthy.
+*> \endverbatim
+*> \verbatim
+*> PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
+*> will attempt to find a solution with small componentwise
+*> relative error in the double-precision algorithm. Positive
+*> is true, 0.0 is false.
+*> Default: 1.0 (attempt componentwise convergence)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit. The solution to every right-hand side is
+*> guaranteed.
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
+*> has been completed, but the factor U is exactly singular, so
+*> the solution and error bounds could not be computed. RCOND = 0
+*> is returned.
+*> = N+J: The solution corresponding to the Jth right-hand side is
+*> not guaranteed. The solutions corresponding to other right-
+*> hand sides K with K > J may not be guaranteed as well, but
+*> only the first such right-hand side is reported. If a small
+*> componentwise error is not requested (PARAMS(3) = 0.0) then
+*> the Jth right-hand side is the first with a normwise error
+*> bound that is not guaranteed (the smallest J such
+*> that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
+*> the Jth right-hand side is the first with either a normwise or
+*> componentwise error bound that is not guaranteed (the smallest
+*> J such that either ERR_BNDS_NORM(J,1) = 0.0 or
+*> ERR_BNDS_COMP(J,1) = 0.0). See the definition of
+*> ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
+*> about all of the right-hand sides check ERR_BNDS_NORM or
+*> ERR_BNDS_COMP.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYsolve
+*
+* =====================================================================
SUBROUTINE ZSYSVXX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
$ EQUED, S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
$ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
$ NPARAMS, PARAMS, WORK, RWORK, INFO )
*
-* -- LAPACK driver routine (version 3.2.2) --
-* -- Contributed by James Demmel, Deaglan Halligan, Yozo Hida and --
-* -- Jason Riedy of Univ. of California Berkeley. --
-* -- June 2010 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley and NAG Ltd. --
+* -- LAPACK solve routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
- IMPLICIT NONE
-* ..
* .. Scalar Arguments ..
CHARACTER EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
@@ -28,369 +537,6 @@
$ ERR_BNDS_COMP( NRHS, * ), RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYSVXX uses the diagonal pivoting factorization to compute the
-* solution to a complex*16 system of linear equations A * X = B, where
-* A is an N-by-N symmetric matrix and X and B are N-by-NRHS
-* matrices.
-*
-* If requested, both normwise and maximum componentwise error bounds
-* are returned. ZSYSVXX will return a solution with a tiny
-* guaranteed error (O(eps) where eps is the working machine
-* precision) unless the matrix is very ill-conditioned, in which
-* case a warning is returned. Relevant condition numbers also are
-* calculated and returned.
-*
-* ZSYSVXX accepts user-provided factorizations and equilibration
-* factors; see the definitions of the FACT and EQUED options.
-* Solving with refinement and using a factorization from a previous
-* ZSYSVXX call will also produce a solution with either O(eps)
-* errors or warnings, but we cannot make that claim for general
-* user-provided factorizations and equilibration factors if they
-* differ from what ZSYSVXX would itself produce.
-*
-* Description
-* ===========
-*
-* The following steps are performed:
-*
-* 1. If FACT = 'E', double precision scaling factors are computed to equilibrate
-* the system:
-*
-* diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B
-*
-* Whether or not the system will be equilibrated depends on the
-* scaling of the matrix A, but if equilibration is used, A is
-* overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-*
-* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor
-* the matrix A (after equilibration if FACT = 'E') as
-*
-* A = U * D * U**T, if UPLO = 'U', or
-* A = L * D * L**T, if UPLO = 'L',
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* 1-by-1 and 2-by-2 diagonal blocks.
-*
-* 3. If some D(i,i)=0, so that D is exactly singular, then the
-* routine returns with INFO = i. Otherwise, the factored form of A
-* is used to estimate the condition number of the matrix A (see
-* argument RCOND). If the reciprocal of the condition number is
-* less than machine precision, the routine still goes on to solve
-* for X and compute error bounds as described below.
-*
-* 4. The system of equations is solved for X using the factored form
-* of A.
-*
-* 5. By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero),
-* the routine will use iterative refinement to try to get a small
-* error and error bounds. Refinement calculates the residual to at
-* least twice the working precision.
-*
-* 6. If equilibration was used, the matrix X is premultiplied by
-* diag(R) so that it solves the original system before
-* equilibration.
-*
-* Arguments
-* =========
-*
-* Some optional parameters are bundled in the PARAMS array. These
-* settings determine how refinement is performed, but often the
-* defaults are acceptable. If the defaults are acceptable, users
-* can pass NPARAMS = 0 which prevents the source code from accessing
-* the PARAMS argument.
-*
-* FACT (input) CHARACTER*1
-* Specifies whether or not the factored form of the matrix A is
-* supplied on entry, and if not, whether the matrix A should be
-* equilibrated before it is factored.
-* = 'F': On entry, AF and IPIV contain the factored form of A.
-* If EQUED is not 'N', the matrix A has been
-* equilibrated with scaling factors given by S.
-* A, AF, and IPIV are not modified.
-* = 'N': The matrix A will be copied to AF and factored.
-* = 'E': The matrix A will be equilibrated if necessary, then
-* copied to AF and factored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The number of linear equations, i.e., the order of the
-* matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of A contains the upper triangular
-* part of the matrix A, and the strictly lower triangular
-* part of A is not referenced. If UPLO = 'L', the leading
-* N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
-* diag(S)*A*diag(S).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AF (input or output) COMPLEX*16 array, dimension (LDAF,N)
-* If FACT = 'F', then AF is an input argument and on entry
-* contains the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T as computed by DSYTRF.
-*
-* If FACT = 'N', then AF is an output argument and on exit
-* returns the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L from the factorization A =
-* U*D*U**T or A = L*D*L**T.
-*
-* LDAF (input) INTEGER
-* The leading dimension of the array AF. LDAF >= max(1,N).
-*
-* IPIV (input or output) INTEGER array, dimension (N)
-* If FACT = 'F', then IPIV is an input argument and on entry
-* contains details of the interchanges and the block
-* structure of D, as determined by DSYTRF. If IPIV(k) > 0,
-* then rows and columns k and IPIV(k) were interchanged and
-* D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and
-* IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
-* -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2
-* diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0,
-* then rows and columns k+1 and -IPIV(k) were interchanged
-* and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* If FACT = 'N', then IPIV is an output argument and on exit
-* contains details of the interchanges and the block
-* structure of D, as determined by DSYTRF.
-*
-* EQUED (input or output) CHARACTER*1
-* Specifies the form of equilibration that was done.
-* = 'N': No equilibration (always true if FACT = 'N').
-* = 'Y': Both row and column equilibration, i.e., A has been
-* replaced by diag(S) * A * diag(S).
-* EQUED is an input argument if FACT = 'F'; otherwise, it is an
-* output argument.
-*
-* S (input or output) DOUBLE PRECISION array, dimension (N)
-* The scale factors for A. If EQUED = 'Y', A is multiplied on
-* the left and right by diag(S). S is an input argument if FACT =
-* 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED
-* = 'Y', each element of S must be positive. If S is output, each
-* element of S is a power of the radix. If S is input, each element
-* of S should be a power of the radix to ensure a reliable solution
-* and error estimates. Scaling by powers of the radix does not cause
-* rounding errors unless the result underflows or overflows.
-* Rounding errors during scaling lead to refining with a matrix that
-* is not equivalent to the input matrix, producing error estimates
-* that may not be reliable.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N-by-NRHS right hand side matrix B.
-* On exit,
-* if EQUED = 'N', B is not modified;
-* if EQUED = 'Y', B is overwritten by diag(S)*B;
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (output) COMPLEX*16 array, dimension (LDX,NRHS)
-* If INFO = 0, the N-by-NRHS solution matrix X to the original
-* system of equations. Note that A and B are modified on exit if
-* EQUED .ne. 'N', and the solution to the equilibrated system is
-* inv(diag(S))*X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* Reciprocal scaled condition number. This is an estimate of the
-* reciprocal Skeel condition number of the matrix A after
-* equilibration (if done). If this is less than the machine
-* precision (in particular, if it is zero), the matrix is singular
-* to working precision. Note that the error may still be small even
-* if this number is very small and the matrix appears ill-
-* conditioned.
-*
-* RPVGRW (output) DOUBLE PRECISION
-* Reciprocal pivot growth. On exit, this contains the reciprocal
-* pivot growth factor norm(A)/norm(U). The "max absolute element"
-* norm is used. If this is much less than 1, then the stability of
-* the LU factorization of the (equilibrated) matrix A could be poor.
-* This also means that the solution X, estimated condition numbers,
-* and error bounds could be unreliable. If factorization fails with
-* 0<INFO<=N, then this contains the reciprocal pivot growth factor
-* for the leading INFO columns of A.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* Componentwise relative backward error. This is the
-* componentwise relative backward error of each solution vector X(j)
-* (i.e., the smallest relative change in any element of A or B that
-* makes X(j) an exact solution).
-*
-* N_ERR_BNDS (input) INTEGER
-* Number of error bounds to return for each right hand side
-* and each type (normwise or componentwise). See ERR_BNDS_NORM and
-* ERR_BNDS_COMP below.
-*
-* ERR_BNDS_NORM (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* normwise relative error, which is defined as follows:
-*
-* Normwise relative error in the ith solution vector:
-* max_j (abs(XTRUE(j,i) - X(j,i)))
-* ------------------------------
-* max_j abs(X(j,i))
-*
-* The array is indexed by the type of error information as described
-* below. There currently are up to three pieces of information
-* returned.
-*
-* The first index in ERR_BNDS_NORM(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_NORM(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated normwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*A, where S scales each row by a power of the
-* radix so all absolute row sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* ERR_BNDS_COMP (output) DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS)
-* For each right-hand side, this array contains information about
-* various error bounds and condition numbers corresponding to the
-* componentwise relative error, which is defined as follows:
-*
-* Componentwise relative error in the ith solution vector:
-* abs(XTRUE(j,i) - X(j,i))
-* max_j ----------------------
-* abs(X(j,i))
-*
-* The array is indexed by the right-hand side i (on which the
-* componentwise relative error depends), and the type of error
-* information as described below. There currently are up to three
-* pieces of information returned for each right-hand side. If
-* componentwise accuracy is not requested (PARAMS(3) = 0.0), then
-* ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most
-* the first (:,N_ERR_BNDS) entries are returned.
-*
-* The first index in ERR_BNDS_COMP(i,:) corresponds to the ith
-* right-hand side.
-*
-* The second index in ERR_BNDS_COMP(:,err) contains the following
-* three fields:
-* err = 1 "Trust/don't trust" boolean. Trust the answer if the
-* reciprocal condition number is less than the threshold
-* sqrt(n) * dlamch('Epsilon').
-*
-* err = 2 "Guaranteed" error bound: The estimated forward error,
-* almost certainly within a factor of 10 of the true error
-* so long as the next entry is greater than the threshold
-* sqrt(n) * dlamch('Epsilon'). This error bound should only
-* be trusted if the previous boolean is true.
-*
-* err = 3 Reciprocal condition number: Estimated componentwise
-* reciprocal condition number. Compared with the threshold
-* sqrt(n) * dlamch('Epsilon') to determine if the error
-* estimate is "guaranteed". These reciprocal condition
-* numbers are 1 / (norm(Z^{-1},inf) * norm(Z,inf)) for some
-* appropriately scaled matrix Z.
-* Let Z = S*(A*diag(x)), where x is the solution for the
-* current right-hand side and S scales each row of
-* A*diag(x) by a power of the radix so all absolute row
-* sums of Z are approximately 1.
-*
-* See Lapack Working Note 165 for further details and extra
-* cautions.
-*
-* NPARAMS (input) INTEGER
-* Specifies the number of parameters set in PARAMS. If .LE. 0, the
-* PARAMS array is never referenced and default values are used.
-*
-* PARAMS (input / output) DOUBLE PRECISION array, dimension NPARAMS
-* Specifies algorithm parameters. If an entry is .LT. 0.0, then
-* that entry will be filled with default value used for that
-* parameter. Only positions up to NPARAMS are accessed; defaults
-* are used for higher-numbered parameters.
-*
-* PARAMS(LA_LINRX_ITREF_I = 1) : Whether to perform iterative
-* refinement or not.
-* Default: 1.0D+0
-* = 0.0 : No refinement is performed, and no error bounds are
-* computed.
-* = 1.0 : Use the extra-precise refinement algorithm.
-* (other values are reserved for future use)
-*
-* PARAMS(LA_LINRX_ITHRESH_I = 2) : Maximum number of residual
-* computations allowed for refinement.
-* Default: 10
-* Aggressive: Set to 100 to permit convergence using approximate
-* factorizations or factorizations other than LU. If
-* the factorization uses a technique other than
-* Gaussian elimination, the guarantees in
-* err_bnds_norm and err_bnds_comp may no longer be
-* trustworthy.
-*
-* PARAMS(LA_LINRX_CWISE_I = 3) : Flag determining if the code
-* will attempt to find a solution with small componentwise
-* relative error in the double-precision algorithm. Positive
-* is true, 0.0 is false.
-* Default: 1.0 (attempt componentwise convergence)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: Successful exit. The solution to every right-hand side is
-* guaranteed.
-* < 0: If INFO = -i, the i-th argument had an illegal value
-* > 0 and <= N: U(INFO,INFO) is exactly zero. The factorization
-* has been completed, but the factor U is exactly singular, so
-* the solution and error bounds could not be computed. RCOND = 0
-* is returned.
-* = N+J: The solution corresponding to the Jth right-hand side is
-* not guaranteed. The solutions corresponding to other right-
-* hand sides K with K > J may not be guaranteed as well, but
-* only the first such right-hand side is reported. If a small
-* componentwise error is not requested (PARAMS(3) = 0.0) then
-* the Jth right-hand side is the first with a normwise error
-* bound that is not guaranteed (the smallest J such
-* that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0)
-* the Jth right-hand side is the first with either a normwise or
-* componentwise error bound that is not guaranteed (the smallest
-* J such that either ERR_BNDS_NORM(J,1) = 0.0 or
-* ERR_BNDS_COMP(J,1) = 0.0). See the definition of
-* ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information
-* about all of the right-hand sides check ERR_BNDS_NORM or
-* ERR_BNDS_COMP.
-*
* ==================================================================
*
* .. Parameters ..
diff --git a/SRC/zsyswapr.f b/SRC/zsyswapr.f
index 40239000..0e5eeb41 100644
--- a/SRC/zsyswapr.f
+++ b/SRC/zsyswapr.f
@@ -1,54 +1,111 @@
- SUBROUTINE ZSYSWAPR( UPLO, N, A, LDA, I1, I2)
+*> \brief \b ZSYSWAPR
*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER I1, I2, LDA, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, N )
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZSYSWAPR( UPLO, N, A, LDA, I1, I2)
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, N )
+*
* Purpose
* =======
*
-* ZSYSWAPR applies an elementary permutation on the rows and the columns of
-* a symmetric matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYSWAPR applies an elementary permutation on the rows and the columns of
+*> a symmetric matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] I1
+*> \verbatim
+*> I1 is INTEGER
+*> Index of the first row to swap
+*> \endverbatim
+*>
+*> \param[in] I2
+*> \verbatim
+*> I2 is INTEGER
+*> Index of the second row to swap
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZSYTRF.
+*> \date November 2011
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \ingroup complex16SYauxiliary
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZSYSWAPR( UPLO, N, A, LDA, I1, I2)
*
-* I1 (input) INTEGER
-* Index of the first row to swap
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* I2 (input) INTEGER
-* Index of the second row to swap
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER I1, I2, LDA, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, N )
*
* =====================================================================
*
diff --git a/SRC/zsytf2.f b/SRC/zsytf2.f
index dfe4b283..0f4070f9 100644
--- a/SRC/zsytf2.f
+++ b/SRC/zsytf2.f
@@ -1,9 +1,180 @@
+*> \brief \b ZSYTF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYTF2( UPLO, N, A, LDA, IPIV, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYTF2 computes the factorization of a complex symmetric matrix A
+*> using the Bunch-Kaufman diagonal pivoting method:
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U**T is the transpose of U, and D is symmetric and
+*> block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> n-by-n upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n-by-n lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> > 0: if INFO = k, D(k,k) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> 09-29-06 - patch from
+*> Bobby Cheng, MathWorks
+*>
+*> Replace l.209 and l.377
+*> IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*> by
+*> IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN
+*>
+*> 1-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*> Company
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZSYTF2( UPLO, N, A, LDA, IPIV, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,113 +185,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYTF2 computes the factorization of a complex symmetric matrix A
-* using the Bunch-Kaufman diagonal pivoting method:
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U**T is the transpose of U, and D is symmetric and
-* block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the unblocked version of the algorithm, calling Level 2 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* n-by-n upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n-by-n lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* > 0: if INFO = k, D(k,k) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* 09-29-06 - patch from
-* Bobby Cheng, MathWorks
-*
-* Replace l.209 and l.377
-* IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
-* by
-* IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN
-*
-* 1-96 - Based on modifications by J. Lewis, Boeing Computer Services
-* Company
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zsytrf.f b/SRC/zsytrf.f
index 4a76635f..dfc0c072 100644
--- a/SRC/zsytrf.f
+++ b/SRC/zsytrf.f
@@ -1,9 +1,187 @@
+*> \brief \b ZSYTRF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYTRF computes the factorization of a complex symmetric matrix A
+*> using the Bunch-Kaufman diagonal pivoting method. The form of the
+*> factorization is
+*>
+*> A = U*D*U**T or A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A is stored;
+*> = 'L': Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the symmetric matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*> \verbatim
+*> On exit, the block diagonal matrix D and the multipliers used
+*> to obtain the factor U or L (see below for further details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D.
+*> If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*> interchanged and D(k,k) is a 1-by-1 diagonal block.
+*> If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*> columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*> is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
+*> IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*> interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK >=1. For best performance
+*> LWORK >= N*NB, where NB is the block size returned by ILAENV.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) is exactly zero. The factorization
+*> has been completed, but the block diagonal matrix D is
+*> exactly singular, and division by zero will occur if it
+*> is used to solve a system of equations.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> If UPLO = 'U', then A = U*D*U**T, where
+*> U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*> i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*> 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I v 0 ) k-s
+*> U(k) = ( 0 I 0 ) s
+*> ( 0 0 I ) n-k
+*> k-s s n-k
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*> If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*> and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*> If UPLO = 'L', then A = L*D*L**T, where
+*> L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*> i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*> n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*> and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
+*> defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*> that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*> ( I 0 0 ) k-1
+*> L(k) = ( 0 I 0 ) s
+*> ( 0 v I ) n-k-s+1
+*> k-1 s n-k-s+1
+*>
+*> If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*> If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*> and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,113 +192,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYTRF computes the factorization of a complex symmetric matrix A
-* using the Bunch-Kaufman diagonal pivoting method. The form of the
-* factorization is
-*
-* A = U*D*U**T or A = L*D*L**T
-*
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, and D is symmetric and block diagonal with
-* with 1-by-1 and 2-by-2 diagonal blocks.
-*
-* This is the blocked version of the algorithm, calling Level 3 BLAS.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A is stored;
-* = 'L': Lower triangle of A is stored.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the symmetric matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* On exit, the block diagonal matrix D and the multipliers used
-* to obtain the factor U or L (see below for further details).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (output) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D.
-* If IPIV(k) > 0, then rows and columns k and IPIV(k) were
-* interchanged and D(k,k) is a 1-by-1 diagonal block.
-* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
-* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
-* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) =
-* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
-* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK >=1. For best performance
-* LWORK >= N*NB, where NB is the block size returned by ILAENV.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) is exactly zero. The factorization
-* has been completed, but the block diagonal matrix D is
-* exactly singular, and division by zero will occur if it
-* is used to solve a system of equations.
-*
-* Further Details
-* ===============
-*
-* If UPLO = 'U', then A = U*D*U**T, where
-* U = P(n)*U(n)* ... *P(k)U(k)* ...,
-* i.e., U is a product of terms P(k)*U(k), where k decreases from n to
-* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I v 0 ) k-s
-* U(k) = ( 0 I 0 ) s
-* ( 0 0 I ) n-k
-* k-s s n-k
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
-* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
-* and A(k,k), and v overwrites A(1:k-2,k-1:k).
-*
-* If UPLO = 'L', then A = L*D*L**T, where
-* L = P(1)*L(1)* ... *P(k)*L(k)* ...,
-* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
-* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
-* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as
-* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
-* that if the diagonal block D(k) is of order s (s = 1 or 2), then
-*
-* ( I 0 0 ) k-1
-* L(k) = ( 0 I 0 ) s
-* ( 0 v I ) n-k-s+1
-* k-1 s n-k-s+1
-*
-* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
-* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
-* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zsytri.f b/SRC/zsytri.f
index 2fd19fdc..2e345632 100644
--- a/SRC/zsytri.f
+++ b/SRC/zsytri.f
@@ -1,63 +1,125 @@
- SUBROUTINE ZSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b ZSYTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZSYTRI computes the inverse of a complex symmetric indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* ZSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYTRI computes the inverse of a complex symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> ZSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the block diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the block diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complex16SYcomputational
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
+* =====================================================================
+ SUBROUTINE ZSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zsytri2.f b/SRC/zsytri2.f
index f995edd9..e5e4ca46 100644
--- a/SRC/zsytri2.f
+++ b/SRC/zsytri2.f
@@ -1,13 +1,130 @@
+*> \brief \b ZSYTRI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYTRI2 computes the inverse of a COMPLEX*16 hermitian indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> ZSYTRF. ZSYTRI2 sets the LEADING DIMENSION of the workspace
+*> before calling ZSYTRI2X that actually computes the inverse.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the NB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NB structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N+NB+1)*(NB+3)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> WORK is size >= (N+NB+1)*(NB+3)
+*> If LDWORK = -1, then a workspace query is assumed; the routine
+*> calculates:
+*> - the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array,
+*> - and no error message related to LDWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
SUBROUTINE ZSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* -- Written by Julie Langou of the Univ. of TN --
+* November 2011
*
-* @precisions normal z -> s d c
* .. Scalar Arguments ..
CHARACTER UPLO
INTEGER INFO, LDA, LWORK, N
@@ -17,61 +134,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYTRI2 computes the inverse of a COMPLEX*16 hermitian indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* ZSYTRF. ZSYTRI2 sets the LEADING DIMENSION of the workspace
-* before calling ZSYTRI2X that actually computes the inverse.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the NB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZSYTRF.
-*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NB structure of D
-* as determined by ZSYTRF.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N+NB+1)*(NB+3)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* WORK is size >= (N+NB+1)*(NB+3)
-* If LDWORK = -1, then a workspace query is assumed; the routine
-* calculates:
-* - the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array,
-* - and no error message related to LDWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zsytri2x.f b/SRC/zsytri2x.f
index 51645389..c4fa6930 100644
--- a/SRC/zsytri2x.f
+++ b/SRC/zsytri2x.f
@@ -1,68 +1,131 @@
- SUBROUTINE ZSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*> \brief \b ZSYTRI2X
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, N, NB
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), WORK( N+NB+1,* )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), WORK( N+NB+1,* )
+* ..
+*
* Purpose
* =======
*
-* ZSYTRI2X computes the inverse of a complex symmetric indefinite matrix
-* A using the factorization A = U*D*U**T or A = L*D*L**T computed by
-* ZSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYTRI2X computes the inverse of a complex symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> ZSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the NNB diagonal matrix D and the multipliers
-* used to obtain the factor U or L as computed by ZSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the NNB diagonal matrix D and the multipliers
+*> used to obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*> \verbatim
+*> On exit, if INFO = 0, the (symmetric) inverse of the original
+*> matrix. If UPLO = 'U', the upper triangular part of the
+*> inverse is formed and the part of A below the diagonal is not
+*> referenced; if UPLO = 'L' the lower triangular part of the
+*> inverse is formed and the part of A above the diagonal is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the NNB structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N+NNB+1,NNB+3)
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*> inverse could not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* On exit, if INFO = 0, the (symmetric) inverse of the original
-* matrix. If UPLO = 'U', the upper triangular part of the
-* inverse is formed and the part of A below the diagonal is not
-* referenced; if UPLO = 'L' the lower triangular part of the
-* inverse is formed and the part of A above the diagonal is
-* not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the NNB structure of D
-* as determined by ZSYTRF.
+*> \ingroup complex16SYcomputational
*
-* WORK (workspace) COMPLEX*16 array, dimension (N+NNB+1,NNB+3)
+* =====================================================================
+ SUBROUTINE ZSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
*
-* NB (input) INTEGER
-* Block size
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
-* inverse could not be computed.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, N, NB
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), WORK( N+NB+1,* )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zsytrs.f b/SRC/zsytrs.f
index ba5826de..d9d69776 100644
--- a/SRC/zsytrs.f
+++ b/SRC/zsytrs.f
@@ -1,63 +1,130 @@
- SUBROUTINE ZSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b ZSYTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* ZSYTRS solves a system of linear equations A*X = B with a complex
-* symmetric matrix A using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by ZSYTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYTRS solves a system of linear equations A*X = B with a complex
+*> symmetric matrix A using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by ZSYTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
+*> \ingroup complex16SYcomputational
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+* =====================================================================
+ SUBROUTINE ZSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zsytrs2.f b/SRC/zsytrs2.f
index 3d01aa96..32c3eb4a 100644
--- a/SRC/zsytrs2.f
+++ b/SRC/zsytrs2.f
@@ -1,69 +1,137 @@
- SUBROUTINE ZSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
- $ WORK, INFO )
+*> \brief \b ZSYTRS2
*
-* -- LAPACK PROTOTYPE routine (version 3.3.1) --
+* =========== DOCUMENTATION ===========
*
-* -- Written by Julie Langou of the Univ. of TN --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZSYTRS2 solves a system of linear equations A*X = B with a real
-* symmetric matrix A using the factorization A = U*D*U**T or
-* A = L*D*L**T computed by ZSYTRF and converted by ZSYCONV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYTRS2 solves a system of linear equations A*X = B with a real
+*> symmetric matrix A using the factorization A = U*D*U**T or
+*> A = L*D*L**T computed by ZSYTRF and converted by ZSYCONV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the details of the factorization are stored
-* as an upper or lower triangular matrix.
-* = 'U': Upper triangular, form is A = U*D*U**T;
-* = 'L': Lower triangular, form is A = L*D*L**T.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by ZSYTRF.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the details of the factorization are stored
+*> as an upper or lower triangular matrix.
+*> = 'U': Upper triangular, form is A = U*D*U**T;
+*> = 'L': Lower triangular, form is A = L*D*L**T.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> Details of the interchanges and the block structure of D
+*> as determined by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* Details of the interchanges and the block structure of D
-* as determined by ZSYTRF.
+*> \date November 2011
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, the solution matrix X.
+*> \ingroup complex16SYcomputational
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
+ $ WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztbcon.f b/SRC/ztbcon.f
index 5bd36c35..34c0b4f0 100644
--- a/SRC/ztbcon.f
+++ b/SRC/ztbcon.f
@@ -1,12 +1,144 @@
+*> \brief \b ZTBCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, KD, LDAB, N
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBCON estimates the reciprocal of the condition number of a
+*> triangular band matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
$ RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,65 +150,6 @@
COMPLEX*16 AB( LDAB, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTBCON estimates the reciprocal of the condition number of a
-* triangular band matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztbrfs.f b/SRC/ztbrfs.f
index 0288c539..31548910 100644
--- a/SRC/ztbrfs.f
+++ b/SRC/ztbrfs.f
@@ -1,12 +1,189 @@
+*> \brief \b ZTBRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular band
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by ZTBTRS or some other
+*> means before entering this routine. ZTBRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,92 +195,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTBRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular band
-* coefficient matrix.
-*
-* The solution matrix X must be computed by ZTBTRS or some other
-* means before entering this routine. ZTBRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztbtrs.f b/SRC/ztbtrs.f
index 337400f7..158753c4 100644
--- a/SRC/ztbtrs.f
+++ b/SRC/ztbtrs.f
@@ -1,10 +1,147 @@
+*> \brief \b ZTBTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, KD, LDAB, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBTRS solves a triangular system of the form
+*>
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*>
+*> where A is a triangular band matrix of order N, and B is an
+*> N-by-NRHS matrix. A check is made to verify that A is nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of AB. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the
+*> solutions X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,70 +151,6 @@
COMPLEX*16 AB( LDAB, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTBTRS solves a triangular system of the form
-*
-* A * X = B, A**T * X = B, or A**H * X = B,
-*
-* where A is a triangular band matrix of order N, and B is an
-* N-by-NRHS matrix. A check is made to verify that A is nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of AB. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the
-* solutions X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztfsm.f b/SRC/ztfsm.f
index c0ffdbc4..b050ebf5 100644
--- a/SRC/ztfsm.f
+++ b/SRC/ztfsm.f
@@ -1,235 +1,320 @@
- SUBROUTINE ZTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
- $ B, LDB )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b ZTFSM
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
- INTEGER LDB, M, N
- COMPLEX*16 ALPHA
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( 0: * ), B( 0: LDB-1, 0: * )
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
+* B, LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
+* INTEGER LDB, M, N
+* COMPLEX*16 ALPHA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( 0: * ), B( 0: LDB-1, 0: * )
+* ..
+*
* Purpose
* =======
*
-* Level 3 BLAS like routine for A in RFP Format.
-*
-* ZTFSM solves the matrix equation
-*
-* op( A )*X = alpha*B or X*op( A ) = alpha*B
-*
-* where alpha is a scalar, X and B are m by n matrices, A is a unit, or
-* non-unit, upper or lower triangular matrix and op( A ) is one of
-*
-* op( A ) = A or op( A ) = A**H.
-*
-* A is in Rectangular Full Packed (RFP) Format.
-*
-* The matrix X is overwritten on B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Level 3 BLAS like routine for A in RFP Format.
+*>
+*> ZTFSM solves the matrix equation
+*>
+*> op( A )*X = alpha*B or X*op( A ) = alpha*B
+*>
+*> where alpha is a scalar, X and B are m by n matrices, A is a unit, or
+*> non-unit, upper or lower triangular matrix and op( A ) is one of
+*>
+*> op( A ) = A or op( A ) = A**H.
+*>
+*> A is in Rectangular Full Packed (RFP) Format.
+*>
+*> The matrix X is overwritten on B.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal Form of RFP A is stored;
-* = 'C': The Conjugate-transpose Form of RFP A is stored.
-*
-* SIDE (input) CHARACTER*1
-* On entry, SIDE specifies whether op( A ) appears on the left
-* or right of X as follows:
-*
-* SIDE = 'L' or 'l' op( A )*X = alpha*B.
-*
-* SIDE = 'R' or 'r' X*op( A ) = alpha*B.
-*
-* Unchanged on exit.
-*
-* UPLO (input) CHARACTER*1
-* On entry, UPLO specifies whether the RFP matrix A came from
-* an upper or lower triangular matrix as follows:
-* UPLO = 'U' or 'u' RFP A came from an upper triangular matrix
-* UPLO = 'L' or 'l' RFP A came from a lower triangular matrix
-*
-* Unchanged on exit.
-*
-* TRANS (input) CHARACTER*1
-* On entry, TRANS specifies the form of op( A ) to be used
-* in the matrix multiplication as follows:
-*
-* TRANS = 'N' or 'n' op( A ) = A.
-*
-* TRANS = 'C' or 'c' op( A ) = conjg( A' ).
-*
-* Unchanged on exit.
-*
-* DIAG (input) CHARACTER*1
-* On entry, DIAG specifies whether or not RFP A is unit
-* triangular as follows:
-*
-* DIAG = 'U' or 'u' A is assumed to be unit triangular.
-*
-* DIAG = 'N' or 'n' A is not assumed to be unit
-* triangular.
-*
-* Unchanged on exit.
-*
-* M (input) INTEGER
-* On entry, M specifies the number of rows of B. M must be at
-* least zero.
-* Unchanged on exit.
-*
-* N (input) INTEGER
-* On entry, N specifies the number of columns of B. N must be
-* at least zero.
-* Unchanged on exit.
+* =========
+*
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal Form of RFP A is stored;
+*> = 'C': The Conjugate-transpose Form of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> On entry, SIDE specifies whether op( A ) appears on the left
+*> or right of X as follows:
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'L' or 'l' op( A )*X = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> SIDE = 'R' or 'r' X*op( A ) = alpha*B.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> On entry, UPLO specifies whether the RFP matrix A came from
+*> an upper or lower triangular matrix as follows:
+*> UPLO = 'U' or 'u' RFP A came from an upper triangular matrix
+*> UPLO = 'L' or 'l' RFP A came from a lower triangular matrix
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> On entry, TRANS specifies the form of op( A ) to be used
+*> in the matrix multiplication as follows:
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'N' or 'n' op( A ) = A.
+*> \endverbatim
+*> \verbatim
+*> TRANS = 'C' or 'c' op( A ) = conjg( A' ).
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> On entry, DIAG specifies whether or not RFP A is unit
+*> triangular as follows:
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'U' or 'u' A is assumed to be unit triangular.
+*> \endverbatim
+*> \verbatim
+*> DIAG = 'N' or 'n' A is not assumed to be unit
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the number of rows of B. M must be at
+*> least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the number of columns of B. N must be
+*> at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha. When alpha is
+*> zero then A is not referenced and B need not be set before
+*> entry.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
+*> RFP Format is described by TRANSR, UPLO and N as follows:
+*> If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
+*> K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
+*> TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A as
+*> defined when TRANSR = 'N'. The contents of RFP A are defined
+*> by UPLO as follows: If UPLO = 'U' the RFP A contains the NT
+*> elements of upper packed A either in normal or
+*> conjugate-transpose Format. If UPLO = 'L' the RFP A contains
+*> the NT elements of lower packed A either in normal or
+*> conjugate-transpose Format. The LDA of RFP A is (N+1)/2 when
+*> TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is
+*> even and is N when is odd.
+*> See the Note below for more details. Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> Before entry, the leading m by n part of the array B must
+*> contain the right-hand side matrix B, and on exit is
+*> overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> On entry, LDB specifies the first dimension of B as declared
+*> in the calling (sub) program. LDB must be at least
+*> max( 1, m ).
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) COMPLEX*16
-* On entry, ALPHA specifies the scalar alpha. When alpha is
-* zero then A is not referenced and B need not be set before
-* entry.
-* Unchanged on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* NT = N*(N+1)/2. On entry, the matrix A in RFP Format.
-* RFP Format is described by TRANSR, UPLO and N as follows:
-* If TRANSR='N' then RFP A is (0:N,0:K-1) when N is even;
-* K=N/2. RFP A is (0:N-1,0:K) when N is odd; K=N/2. If
-* TRANSR = 'C' then RFP is the Conjugate-transpose of RFP A as
-* defined when TRANSR = 'N'. The contents of RFP A are defined
-* by UPLO as follows: If UPLO = 'U' the RFP A contains the NT
-* elements of upper packed A either in normal or
-* conjugate-transpose Format. If UPLO = 'L' the RFP A contains
-* the NT elements of lower packed A either in normal or
-* conjugate-transpose Format. The LDA of RFP A is (N+1)/2 when
-* TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is
-* even and is N when is odd.
-* See the Note below for more details. Unchanged on exit.
+*> \date November 2011
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* Before entry, the leading m by n part of the array B must
-* contain the right-hand side matrix B, and on exit is
-* overwritten by the solution matrix X.
+*> \ingroup complex16OTHERcomputational
*
-* LDB (input) INTEGER
-* On entry, LDB specifies the first dimension of B as declared
-* in the calling (sub) program. LDB must be at least
-* max( 1, m ).
-* Unchanged on exit.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
+ $ B, LDB )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, DIAG, SIDE, TRANS, UPLO
+ INTEGER LDB, M, N
+ COMPLEX*16 ALPHA
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( 0: * ), B( 0: LDB-1, 0: * )
+* ..
*
* =====================================================================
* ..
diff --git a/SRC/ztftri.f b/SRC/ztftri.f
index 1442e27e..29519ce4 100644
--- a/SRC/ztftri.f
+++ b/SRC/ztftri.f
@@ -1,173 +1,233 @@
- SUBROUTINE ZTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO, DIAG
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( 0: * )
-* ..
-*
+*> \brief \b ZTFTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO, DIAG
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( 0: * )
+* ..
+*
* Purpose
* =======
*
-* ZTFTRI computes the inverse of a triangular matrix A stored in RFP
-* format.
-*
-* This is a Level 3 BLAS version of the algorithm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTFTRI computes the inverse of a triangular matrix A stored in RFP
+*> format.
+*>
+*> This is a Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': The Normal TRANSR of RFP A is stored;
-* = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension ( N*(N+1)/2 );
-* On entry, the triangular matrix A in RFP format. RFP format
-* is described by TRANSR, UPLO, and N as follows: If TRANSR =
-* 'N' then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
-* (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
-* the Conjugate-transpose of RFP A as defined when
-* TRANSR = 'N'. The contents of RFP A are defined by UPLO as
-* follows: If UPLO = 'U' the RFP A contains the nt elements of
-* upper packed A; If UPLO = 'L' the RFP A contains the nt
-* elements of lower packed A. The LDA of RFP A is (N+1)/2 when
-* TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is
-* even and N is odd. See the Note below for more details.
-*
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
-*
-* Further Details
-* ===============
-*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': The Normal TRANSR of RFP A is stored;
+*> = 'C': The Conjugate-transpose TRANSR of RFP A is stored.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( N*(N+1)/2 );
+*> On entry, the triangular matrix A in RFP format. RFP format
+*> is described by TRANSR, UPLO, and N as follows: If TRANSR =
+*> 'N' then RFP A is (0:N,0:k-1) when N is even; k=N/2. RFP A is
+*> (0:N-1,0:k) when N is odd; k=N/2. IF TRANSR = 'C' then RFP is
+*> the Conjugate-transpose of RFP A as defined when
+*> TRANSR = 'N'. The contents of RFP A are defined by UPLO as
+*> follows: If UPLO = 'U' the RFP A contains the nt elements of
+*> upper packed A; If UPLO = 'L' the RFP A contains the nt
+*> elements of lower packed A. The LDA of RFP A is (N+1)/2 when
+*> TRANSR = 'C'. When TRANSR is 'N' the LDA is N+1 when N is
+*> even and N is odd. See the Note below for more details.
+*> \endverbatim
+*> \verbatim
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RFP A RFP A
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
+*> \date November 2011
*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
+*> \ingroup complex16OTHERcomputational
*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO, DIAG
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztfttp.f b/SRC/ztfttp.f
index 8bf015a4..7abc791f 100644
--- a/SRC/ztfttp.f
+++ b/SRC/ztfttp.f
@@ -1,160 +1,219 @@
- SUBROUTINE ZTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b ZTFTTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* ZTFTTP copies a triangular matrix A from rectangular full packed
-* format (TF) to standard packed format (TP).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTFTTP copies a triangular matrix A from rectangular full packed
+*> format (TF) to standard packed format (TP).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF is in Normal format;
-* = 'C': ARF is in Conjugate-transpose format;
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF is in Normal format;
+*> = 'C': ARF is in Conjugate-transpose format;
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ARF (input) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \date November 2011
*
-* AP (output) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztfttr.f b/SRC/ztfttr.f
index 5a55d446..5011df17 100644
--- a/SRC/ztfttr.f
+++ b/SRC/ztfttr.f
@@ -1,165 +1,227 @@
- SUBROUTINE ZTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( 0: LDA-1, 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b ZTFTTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* ZTFTTR copies a triangular matrix A from rectangular full packed
-* format (TF) to standard full format (TR).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTFTTR copies a triangular matrix A from rectangular full packed
+*> format (TF) to standard full format (TR).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF is in Normal format;
-* = 'C': ARF is in Conjugate-transpose format;
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF is in Normal format;
+*> = 'C': ARF is in Conjugate-transpose format;
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( LDA, N )
+*> On exit, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ARF (input) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) COMPLEX*16 array, dimension ( LDA, N )
-* On exit, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztgevc.f b/SRC/ztgevc.f
index 6a79b7c5..45b9061e 100644
--- a/SRC/ztgevc.f
+++ b/SRC/ztgevc.f
@@ -1,10 +1,220 @@
+*> \brief \b ZTGEVC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
+* LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, SIDE
+* INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTGEVC computes some or all of the right and/or left eigenvectors of
+*> a pair of complex matrices (S,P), where S and P are upper triangular.
+*> Matrix pairs of this type are produced by the generalized Schur
+*> factorization of a complex matrix pair (A,B):
+*>
+*> A = Q*S*Z**H, B = Q*P*Z**H
+*>
+*> as computed by ZGGHRD + ZHGEQZ.
+*>
+*> The right eigenvector x and the left eigenvector y of (S,P)
+*> corresponding to an eigenvalue w are defined by:
+*>
+*> S*x = w*P*x, (y**H)*S = w*(y**H)*P,
+*>
+*> where y**H denotes the conjugate tranpose of y.
+*> The eigenvalues are not input to this routine, but are computed
+*> directly from the diagonal elements of S and P.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of (S,P), or the products Z*X and/or Q*Y,
+*> where Z and Q are input matrices.
+*> If Q and Z are the unitary factors from the generalized Schur
+*> factorization of a matrix pair (A,B), then Z*X and Q*Y
+*> are the matrices of right and left eigenvectors of (A,B).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute all right and/or left eigenvectors;
+*> = 'B': compute all right and/or left eigenvectors,
+*> backtransformed by the matrices in VR and/or VL;
+*> = 'S': compute selected right and/or left eigenvectors,
+*> specified by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY='S', SELECT specifies the eigenvectors to be
+*> computed. The eigenvector corresponding to the j-th
+*> eigenvalue is computed if SELECT(j) = .TRUE..
+*> Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices S and P. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX*16 array, dimension (LDS,N)
+*> The upper triangular matrix S from a generalized Schur
+*> factorization, as computed by ZHGEQZ.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of array S. LDS >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is COMPLEX*16 array, dimension (LDP,N)
+*> The upper triangular matrix P from a generalized Schur
+*> factorization, as computed by ZHGEQZ. P must have real
+*> diagonal elements.
+*> \endverbatim
+*>
+*> \param[in] LDP
+*> \verbatim
+*> LDP is INTEGER
+*> The leading dimension of array P. LDP >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,MM)
+*> On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*> contain an N-by-N matrix Q (usually the unitary matrix Q
+*> of left Schur vectors returned by ZHGEQZ).
+*> On exit, if SIDE = 'L' or 'B', VL contains:
+*> if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
+*> if HOWMNY = 'B', the matrix Q*Y;
+*> if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
+*> SELECT, stored consecutively in the columns of
+*> VL, in the same order as their eigenvalues.
+*> Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of array VL. LDVL >= 1, and if
+*> SIDE = 'L' or 'l' or 'B' or 'b', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,MM)
+*> On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*> contain an N-by-N matrix Q (usually the unitary matrix Z
+*> of right Schur vectors returned by ZHGEQZ).
+*> On exit, if SIDE = 'R' or 'B', VR contains:
+*> if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
+*> if HOWMNY = 'B', the matrix Z*X;
+*> if HOWMNY = 'S', the right eigenvectors of (S,P) specified by
+*> SELECT, stored consecutively in the columns of
+*> VR, in the same order as their eigenvalues.
+*> Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> SIDE = 'R' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR actually
+*> used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
+*> is set to N. Each selected eigenvector occupies one column.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GEcomputational
+*
+* =====================================================================
SUBROUTINE ZTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
$ LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, SIDE
@@ -18,121 +228,6 @@
* ..
*
*
-* Purpose
-* =======
-*
-* ZTGEVC computes some or all of the right and/or left eigenvectors of
-* a pair of complex matrices (S,P), where S and P are upper triangular.
-* Matrix pairs of this type are produced by the generalized Schur
-* factorization of a complex matrix pair (A,B):
-*
-* A = Q*S*Z**H, B = Q*P*Z**H
-*
-* as computed by ZGGHRD + ZHGEQZ.
-*
-* The right eigenvector x and the left eigenvector y of (S,P)
-* corresponding to an eigenvalue w are defined by:
-*
-* S*x = w*P*x, (y**H)*S = w*(y**H)*P,
-*
-* where y**H denotes the conjugate tranpose of y.
-* The eigenvalues are not input to this routine, but are computed
-* directly from the diagonal elements of S and P.
-*
-* This routine returns the matrices X and/or Y of right and left
-* eigenvectors of (S,P), or the products Z*X and/or Q*Y,
-* where Z and Q are input matrices.
-* If Q and Z are the unitary factors from the generalized Schur
-* factorization of a matrix pair (A,B), then Z*X and Q*Y
-* are the matrices of right and left eigenvectors of (A,B).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute all right and/or left eigenvectors;
-* = 'B': compute all right and/or left eigenvectors,
-* backtransformed by the matrices in VR and/or VL;
-* = 'S': compute selected right and/or left eigenvectors,
-* specified by the logical array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY='S', SELECT specifies the eigenvectors to be
-* computed. The eigenvector corresponding to the j-th
-* eigenvalue is computed if SELECT(j) = .TRUE..
-* Not referenced if HOWMNY = 'A' or 'B'.
-*
-* N (input) INTEGER
-* The order of the matrices S and P. N >= 0.
-*
-* S (input) COMPLEX*16 array, dimension (LDS,N)
-* The upper triangular matrix S from a generalized Schur
-* factorization, as computed by ZHGEQZ.
-*
-* LDS (input) INTEGER
-* The leading dimension of array S. LDS >= max(1,N).
-*
-* P (input) COMPLEX*16 array, dimension (LDP,N)
-* The upper triangular matrix P from a generalized Schur
-* factorization, as computed by ZHGEQZ. P must have real
-* diagonal elements.
-*
-* LDP (input) INTEGER
-* The leading dimension of array P. LDP >= max(1,N).
-*
-* VL (input/output) COMPLEX*16 array, dimension (LDVL,MM)
-* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-* contain an N-by-N matrix Q (usually the unitary matrix Q
-* of left Schur vectors returned by ZHGEQZ).
-* On exit, if SIDE = 'L' or 'B', VL contains:
-* if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
-* if HOWMNY = 'B', the matrix Q*Y;
-* if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
-* SELECT, stored consecutively in the columns of
-* VL, in the same order as their eigenvalues.
-* Not referenced if SIDE = 'R'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of array VL. LDVL >= 1, and if
-* SIDE = 'L' or 'l' or 'B' or 'b', LDVL >= N.
-*
-* VR (input/output) COMPLEX*16 array, dimension (LDVR,MM)
-* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-* contain an N-by-N matrix Q (usually the unitary matrix Z
-* of right Schur vectors returned by ZHGEQZ).
-* On exit, if SIDE = 'R' or 'B', VR contains:
-* if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
-* if HOWMNY = 'B', the matrix Z*X;
-* if HOWMNY = 'S', the right eigenvectors of (S,P) specified by
-* SELECT, stored consecutively in the columns of
-* VR, in the same order as their eigenvalues.
-* Not referenced if SIDE = 'L'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* SIDE = 'R' or 'B', LDVR >= N.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR actually
-* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
-* is set to N. Each selected eigenvector occupies one column.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztgex2.f b/SRC/ztgex2.f
index 5f7082fe..796c9790 100644
--- a/SRC/ztgex2.f
+++ b/SRC/ztgex2.f
@@ -1,116 +1,200 @@
- SUBROUTINE ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
- $ LDZ, J1, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- LOGICAL WANTQ, WANTZ
- INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
- $ Z( LDZ, * )
-* ..
-*
+*> \brief \b ZTGEX2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+* LDZ, J1, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* ZTGEX2 swaps adjacent diagonal 1 by 1 blocks (A11,B11) and (A22,B22)
-* in an upper triangular matrix pair (A, B) by an unitary equivalence
-* transformation.
-*
-* (A, B) must be in generalized Schur canonical form, that is, A and
-* B are both upper triangular.
-*
-* Optionally, the matrices Q and Z of generalized Schur vectors are
-* updated.
-*
-* Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
-* Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTGEX2 swaps adjacent diagonal 1 by 1 blocks (A11,B11) and (A22,B22)
+*> in an upper triangular matrix pair (A, B) by an unitary equivalence
+*> transformation.
+*>
+*> (A, B) must be in generalized Schur canonical form, that is, A and
+*> B are both upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*> Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
+*> Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX*16 arrays, dimensions (LDA,N)
-* On entry, the matrix A in the pair (A, B).
-* On exit, the updated matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 arrays, dimensions (LDB,N)
-* On entry, the matrix B in the pair (A, B).
-* On exit, the updated matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit,
-* the updated matrix Q.
-* Not referenced if WANTQ = .FALSE..
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1;
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* If WANTZ = .TRUE, on entry, the unitary matrix Z. On exit,
-* the updated matrix Z.
-* Not referenced if WANTZ = .FALSE..
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 arrays, dimensions (LDA,N)
+*> On entry, the matrix A in the pair (A, B).
+*> On exit, the updated matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 arrays, dimensions (LDB,N)
+*> On entry, the matrix B in the pair (A, B).
+*> On exit, the updated matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDZ,N)
+*> If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit,
+*> the updated matrix Q.
+*> Not referenced if WANTQ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1;
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,N)
+*> If WANTZ = .TRUE, on entry, the unitary matrix Z. On exit,
+*> the updated matrix Z.
+*> Not referenced if WANTZ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1;
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in] J1
+*> \verbatim
+*> J1 is INTEGER
+*> The index to the first block (A11, B11).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit.
+*> =1: The transformed matrix pair (A, B) would be too far
+*> from generalized Schur form; the problem is ill-
+*> conditioned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1;
-* If WANTZ = .TRUE., LDZ >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* J1 (input) INTEGER
-* The index to the first block (A11, B11).
+*> \date November 2011
*
-* INFO (output) INTEGER
-* =0: Successful exit.
-* =1: The transformed matrix pair (A, B) would be too far
-* from generalized Schur form; the problem is ill-
-* conditioned.
+*> \ingroup complex16GEauxiliary
*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> In the current code both weak and strong stability tests are
+*> performed. The user can omit the strong stability test by changing
+*> the internal logical parameter WANDS to .FALSE.. See ref. [2] for
+*> details.
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software, Report UMINF-94.04,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, 1994. Also as LAPACK Working Note 87. To appear in
+*> Numerical Algorithms, 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+ $ LDZ, J1, INFO )
+*
+* -- LAPACK auxiliary routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* In the current code both weak and strong stability tests are
-* performed. The user can omit the strong stability test by changing
-* the internal logical parameter WANDS to .FALSE.. See ref. [2] for
-* details.
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software, Report UMINF-94.04,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, 1994. Also as LAPACK Working Note 87. To appear in
-* Numerical Algorithms, 1996.
+* .. Scalar Arguments ..
+ LOGICAL WANTQ, WANTZ
+ INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+ $ Z( LDZ, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztgexc.f b/SRC/ztgexc.f
index e534f64f..d0ee2fc9 100644
--- a/SRC/ztgexc.f
+++ b/SRC/ztgexc.f
@@ -1,126 +1,213 @@
- SUBROUTINE ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
- $ LDZ, IFST, ILST, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- LOGICAL WANTQ, WANTZ
- INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
- $ Z( LDZ, * )
-* ..
-*
+*> \brief \b ZTGEXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+* LDZ, IFST, ILST, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* ZTGEXC reorders the generalized Schur decomposition of a complex
-* matrix pair (A,B), using an unitary equivalence transformation
-* (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with
-* row index IFST is moved to row ILST.
-*
-* (A, B) must be in generalized Schur canonical form, that is, A and
-* B are both upper triangular.
-*
-* Optionally, the matrices Q and Z of generalized Schur vectors are
-* updated.
-*
-* Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
-* Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTGEXC reorders the generalized Schur decomposition of a complex
+*> matrix pair (A,B), using an unitary equivalence transformation
+*> (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with
+*> row index IFST is moved to row ILST.
+*>
+*> (A, B) must be in generalized Schur canonical form, that is, A and
+*> B are both upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*> Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
+*> Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the upper triangular matrix A in the pair (A, B).
-* On exit, the updated matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the upper triangular matrix B in the pair (A, B).
-* On exit, the updated matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* On entry, if WANTQ = .TRUE., the unitary matrix Q.
-* On exit, the updated matrix Q.
-* If WANTQ = .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1;
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* On entry, if WANTZ = .TRUE., the unitary matrix Z.
-* On exit, the updated matrix Z.
-* If WANTZ = .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1;
-* If WANTZ = .TRUE., LDZ >= N.
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the upper triangular matrix A in the pair (A, B).
+*> On exit, the updated matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the upper triangular matrix B in the pair (A, B).
+*> On exit, the updated matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDZ,N)
+*> On entry, if WANTQ = .TRUE., the unitary matrix Q.
+*> On exit, the updated matrix Q.
+*> If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1;
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,N)
+*> On entry, if WANTZ = .TRUE., the unitary matrix Z.
+*> On exit, the updated matrix Z.
+*> If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1;
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in] IFST
+*> \verbatim
+*> IFST is INTEGER
+*> \endverbatim
+*>
+*> \param[in,out] ILST
+*> \verbatim
+*> ILST is INTEGER
+*> Specify the reordering of the diagonal blocks of (A, B).
+*> The block with row index IFST is moved to row ILST, by a
+*> sequence of swapping between adjacent blocks.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit.
+*> <0: if INFO = -i, the i-th argument had an illegal value.
+*> =1: The transformed matrix pair (A, B) would be too far
+*> from generalized Schur form; the problem is ill-
+*> conditioned. (A, B) may have been partially reordered,
+*> and ILST points to the first row of the current
+*> position of the block being moved.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* IFST (input) INTEGER
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ILST (input/output) INTEGER
-* Specify the reordering of the diagonal blocks of (A, B).
-* The block with row index IFST is moved to row ILST, by a
-* sequence of swapping between adjacent blocks.
+*> \date November 2011
*
-* INFO (output) INTEGER
-* =0: Successful exit.
-* <0: if INFO = -i, the i-th argument had an illegal value.
-* =1: The transformed matrix pair (A, B) would be too far
-* from generalized Schur form; the problem is ill-
-* conditioned. (A, B) may have been partially reordered,
-* and ILST points to the first row of the current
-* position of the block being moved.
+*> \ingroup complex16GEcomputational
*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software, Report
+*> UMINF - 94.04, Department of Computing Science, Umea University,
+*> S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
+*> To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
+*> 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+ $ LDZ, IFST, ILST, INFO )
*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software, Report
-* UMINF - 94.04, Department of Computing Science, Umea University,
-* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
-* To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
-* 1996.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL WANTQ, WANTZ
+ INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+ $ Z( LDZ, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztgsen.f b/SRC/ztgsen.f
index d9f7206e..1df3425d 100644
--- a/SRC/ztgsen.f
+++ b/SRC/ztgsen.f
@@ -1,13 +1,432 @@
+*> \brief \b ZTGSEN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
+* ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF,
+* WORK, LWORK, IWORK, LIWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL WANTQ, WANTZ
+* INTEGER IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK,
+* $ M, N
+* DOUBLE PRECISION PL, PR
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION DIF( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), Q( LDQ, * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTGSEN reorders the generalized Schur decomposition of a complex
+*> matrix pair (A, B) (in terms of an unitary equivalence trans-
+*> formation Q**H * (A, B) * Z), so that a selected cluster of eigenvalues
+*> appears in the leading diagonal blocks of the pair (A,B). The leading
+*> columns of Q and Z form unitary bases of the corresponding left and
+*> right eigenspaces (deflating subspaces). (A, B) must be in
+*> generalized Schur canonical form, that is, A and B are both upper
+*> triangular.
+*>
+*> ZTGSEN also computes the generalized eigenvalues
+*>
+*> w(j)= ALPHA(j) / BETA(j)
+*>
+*> of the reordered matrix pair (A, B).
+*>
+*> Optionally, the routine computes estimates of reciprocal condition
+*> numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
+*> (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
+*> between the matrix pairs (A11, B11) and (A22,B22) that correspond to
+*> the selected cluster and the eigenvalues outside the cluster, resp.,
+*> and norms of "projections" onto left and right eigenspaces w.r.t.
+*> the selected cluster in the (1,1)-block.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is integer
+*> Specifies whether condition numbers are required for the
+*> cluster of eigenvalues (PL and PR) or the deflating subspaces
+*> (Difu and Difl):
+*> =0: Only reorder w.r.t. SELECT. No extras.
+*> =1: Reciprocal of norms of "projections" onto left and right
+*> eigenspaces w.r.t. the selected cluster (PL and PR).
+*> =2: Upper bounds on Difu and Difl. F-norm-based estimate
+*> (DIF(1:2)).
+*> =3: Estimate of Difu and Difl. 1-norm-based estimate
+*> (DIF(1:2)).
+*> About 5 times as expensive as IJOB = 2.
+*> =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
+*> version to get it all.
+*> =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
+*> \endverbatim
+*>
+*> \param[in] WANTQ
+*> \verbatim
+*> WANTQ is LOGICAL
+*> .TRUE. : update the left transformation matrix Q;
+*> .FALSE.: do not update Q.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*> WANTZ is LOGICAL
+*> .TRUE. : update the right transformation matrix Z;
+*> .FALSE.: do not update Z.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> SELECT specifies the eigenvalues in the selected cluster. To
+*> select an eigenvalue w(j), SELECT(j) must be set to
+*> .TRUE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension(LDA,N)
+*> On entry, the upper triangular matrix A, in generalized
+*> Schur canonical form.
+*> On exit, A is overwritten by the reordered matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension(LDB,N)
+*> On entry, the upper triangular matrix B, in generalized
+*> Schur canonical form.
+*> On exit, B is overwritten by the reordered matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> The diagonal elements of A and B, respectively,
+*> when the pair (A,B) has been reduced to generalized Schur
+*> form. ALPHA(i)/BETA(i) i=1,...,N are the generalized
+*> eigenvalues.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
+*> On exit, Q has been postmultiplied by the left unitary
+*> transformation matrix which reorder (A, B); The leading M
+*> columns of Q form orthonormal bases for the specified pair of
+*> left eigenspaces (deflating subspaces).
+*> If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= 1.
+*> If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ,N)
+*> On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
+*> On exit, Z has been postmultiplied by the left unitary
+*> transformation matrix which reorder (A, B); The leading M
+*> columns of Z form orthonormal bases for the specified pair of
+*> left eigenspaces (deflating subspaces).
+*> If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= 1.
+*> If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The dimension of the specified pair of left and right
+*> eigenspaces, (deflating subspaces) 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[out] PL
+*> \verbatim
+*> PL is DOUBLE PRECISION
+*> \param[out] PR
+*> \verbatim
+*> PR is DOUBLE PRECISION
+*> If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
+*> reciprocal of the norm of "projections" onto left and right
+*> eigenspace with respect to the selected cluster.
+*> 0 < PL, PR <= 1.
+*> If M = 0 or M = N, PL = PR = 1.
+*> If IJOB = 0, 2 or 3 PL, PR are not referenced.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION array, dimension (2).
+*> If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
+*> If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
+*> Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
+*> estimates of Difu and Difl, computed using reversed
+*> communication with ZLACN2.
+*> If M = 0 or N, DIF(1:2) = F-norm([A, B]).
+*> If IJOB = 0 or 1, DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 1
+*> If IJOB = 1, 2 or 4, LWORK >= 2*M*(N-M)
+*> If IJOB = 3 or 5, LWORK >= 4*M*(N-M)
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*> On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= 1.
+*> If IJOB = 1, 2 or 4, LIWORK >= N+2;
+*> If IJOB = 3 or 5, LIWORK >= MAX(N+2, 2*M*(N-M));
+*> \endverbatim
+*> \verbatim
+*> If LIWORK = -1, then a workspace query is assumed; the
+*> routine only calculates the optimal size of the IWORK array,
+*> returns this value as the first entry of the IWORK array, and
+*> no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: Successful exit.
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> =1: Reordering of (A, B) failed because the transformed
+*> matrix pair (A, B) would be too far from generalized
+*> Schur form; the problem is very ill-conditioned.
+*> (A, B) may have been partially reordered.
+*> If requested, 0 is returned in DIF(*), PL and PR.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> ZTGSEN first collects the selected eigenvalues by computing unitary
+*> U and W that move them to the top left corner of (A, B). In other
+*> words, the selected eigenvalues are the eigenvalues of (A11, B11) in
+*>
+*> U**H*(A, B)*W = (A11 A12) (B11 B12) n1
+*> ( 0 A22),( 0 B22) n2
+*> n1 n2 n1 n2
+*>
+*> where N = n1+n2 and U**H means the conjugate transpose of U. The first
+*> n1 columns of U and W span the specified pair of left and right
+*> eigenspaces (deflating subspaces) of (A, B).
+*>
+*> If (A, B) has been obtained from the generalized real Schur
+*> decomposition of a matrix pair (C, D) = Q*(A, B)*Z**H, then the
+*> reordered generalized Schur form of (C, D) is given by
+*>
+*> (C, D) = (Q*U)*(U**H *(A, B)*W)*(Z*W)**H,
+*>
+*> and the first n1 columns of Q*U and Z*W span the corresponding
+*> deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
+*>
+*> Note that if the selected eigenvalue is sufficiently ill-conditioned,
+*> then its value may differ significantly from its value before
+*> reordering.
+*>
+*> The reciprocal condition numbers of the left and right eigenspaces
+*> spanned by the first n1 columns of U and W (or Q*U and Z*W) may
+*> be returned in DIF(1:2), corresponding to Difu and Difl, resp.
+*>
+*> The Difu and Difl are defined as:
+*>
+*> Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
+*> and
+*> Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
+*>
+*> where sigma-min(Zu) is the smallest singular value of the
+*> (2*n1*n2)-by-(2*n1*n2) matrix
+*>
+*> Zu = [ kron(In2, A11) -kron(A22**H, In1) ]
+*> [ kron(In2, B11) -kron(B22**H, In1) ].
+*>
+*> Here, Inx is the identity matrix of size nx and A22**H is the
+*> conjugate transpose of A22. kron(X, Y) is the Kronecker product between
+*> the matrices X and Y.
+*>
+*> When DIF(2) is small, small changes in (A, B) can cause large changes
+*> in the deflating subspace. An approximate (asymptotic) bound on the
+*> maximum angular error in the computed deflating subspaces is
+*>
+*> EPS * norm((A, B)) / DIF(2),
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal norm of the projectors on the left and right
+*> eigenspaces associated with (A11, B11) may be returned in PL and PR.
+*> They are computed as follows. First we compute L and R so that
+*> P*(A, B)*Q is block diagonal, where
+*>
+*> P = ( I -L ) n1 Q = ( I R ) n1
+*> ( 0 I ) n2 and ( 0 I ) n2
+*> n1 n2 n1 n2
+*>
+*> and (L, R) is the solution to the generalized Sylvester equation
+*>
+*> A11*R - L*A22 = -A12
+*> B11*R - L*B22 = -B12
+*>
+*> Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
+*> An approximate (asymptotic) bound on the average absolute error of
+*> the selected eigenvalues is
+*>
+*> EPS * norm((A, B)) / PL.
+*>
+*> There are also global error bounds which valid for perturbations up
+*> to a certain restriction: A lower bound (x) on the smallest
+*> F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
+*> coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
+*> (i.e. (A + E, B + F), is
+*>
+*> x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
+*>
+*> An approximate bound on x can be computed from DIF(1:2), PL and PR.
+*>
+*> If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
+*> (L', R') and unperturbed (L, R) left and right deflating subspaces
+*> associated with the selected cluster in the (1,1)-blocks can be
+*> bounded as
+*>
+*> max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
+*> max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
+*>
+*> See LAPACK User's Guide section 4.11 or the following references
+*> for more information.
+*>
+*> Note that if the default method for computing the Frobenius-norm-
+*> based estimate DIF is not wanted (see ZLATDF), then the parameter
+*> IDIFJB (see below) should be changed from 3 to 4 (routine ZLATDF
+*> (IJOB = 2 will be used)). See ZTGSYL for more details.
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> References
+*> ==========
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software, Report
+*> UMINF - 94.04, Department of Computing Science, Umea University,
+*> S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
+*> To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
+*> 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
$ ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF,
$ WORK, LWORK, IWORK, LIWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL WANTQ, WANTZ
@@ -23,302 +442,6 @@
$ BETA( * ), Q( LDQ, * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTGSEN reorders the generalized Schur decomposition of a complex
-* matrix pair (A, B) (in terms of an unitary equivalence trans-
-* formation Q**H * (A, B) * Z), so that a selected cluster of eigenvalues
-* appears in the leading diagonal blocks of the pair (A,B). The leading
-* columns of Q and Z form unitary bases of the corresponding left and
-* right eigenspaces (deflating subspaces). (A, B) must be in
-* generalized Schur canonical form, that is, A and B are both upper
-* triangular.
-*
-* ZTGSEN also computes the generalized eigenvalues
-*
-* w(j)= ALPHA(j) / BETA(j)
-*
-* of the reordered matrix pair (A, B).
-*
-* Optionally, the routine computes estimates of reciprocal condition
-* numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
-* (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
-* between the matrix pairs (A11, B11) and (A22,B22) that correspond to
-* the selected cluster and the eigenvalues outside the cluster, resp.,
-* and norms of "projections" onto left and right eigenspaces w.r.t.
-* the selected cluster in the (1,1)-block.
-*
-*
-* Arguments
-* =========
-*
-* IJOB (input) integer
-* Specifies whether condition numbers are required for the
-* cluster of eigenvalues (PL and PR) or the deflating subspaces
-* (Difu and Difl):
-* =0: Only reorder w.r.t. SELECT. No extras.
-* =1: Reciprocal of norms of "projections" onto left and right
-* eigenspaces w.r.t. the selected cluster (PL and PR).
-* =2: Upper bounds on Difu and Difl. F-norm-based estimate
-* (DIF(1:2)).
-* =3: Estimate of Difu and Difl. 1-norm-based estimate
-* (DIF(1:2)).
-* About 5 times as expensive as IJOB = 2.
-* =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
-* version to get it all.
-* =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
-*
-* WANTQ (input) LOGICAL
-* .TRUE. : update the left transformation matrix Q;
-* .FALSE.: do not update Q.
-*
-* WANTZ (input) LOGICAL
-* .TRUE. : update the right transformation matrix Z;
-* .FALSE.: do not update Z.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* SELECT specifies the eigenvalues in the selected cluster. To
-* select an eigenvalue w(j), SELECT(j) must be set to
-* .TRUE..
-*
-* N (input) INTEGER
-* The order of the matrices A and B. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension(LDA,N)
-* On entry, the upper triangular matrix A, in generalized
-* Schur canonical form.
-* On exit, A is overwritten by the reordered matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension(LDB,N)
-* On entry, the upper triangular matrix B, in generalized
-* Schur canonical form.
-* On exit, B is overwritten by the reordered matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* ALPHA (output) COMPLEX*16 array, dimension (N)
-* BETA (output) COMPLEX*16 array, dimension (N)
-* The diagonal elements of A and B, respectively,
-* when the pair (A,B) has been reduced to generalized Schur
-* form. ALPHA(i)/BETA(i) i=1,...,N are the generalized
-* eigenvalues.
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
-* On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
-* On exit, Q has been postmultiplied by the left unitary
-* transformation matrix which reorder (A, B); The leading M
-* columns of Q form orthonormal bases for the specified pair of
-* left eigenspaces (deflating subspaces).
-* If WANTQ = .FALSE., Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= 1.
-* If WANTQ = .TRUE., LDQ >= N.
-*
-* Z (input/output) COMPLEX*16 array, dimension (LDZ,N)
-* On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
-* On exit, Z has been postmultiplied by the left unitary
-* transformation matrix which reorder (A, B); The leading M
-* columns of Z form orthonormal bases for the specified pair of
-* left eigenspaces (deflating subspaces).
-* If WANTZ = .FALSE., Z is not referenced.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= 1.
-* If WANTZ = .TRUE., LDZ >= N.
-*
-* M (output) INTEGER
-* The dimension of the specified pair of left and right
-* eigenspaces, (deflating subspaces) 0 <= M <= N.
-*
-* PL (output) DOUBLE PRECISION
-* PR (output) DOUBLE PRECISION
-* If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
-* reciprocal of the norm of "projections" onto left and right
-* eigenspace with respect to the selected cluster.
-* 0 < PL, PR <= 1.
-* If M = 0 or M = N, PL = PR = 1.
-* If IJOB = 0, 2 or 3 PL, PR are not referenced.
-*
-* DIF (output) DOUBLE PRECISION array, dimension (2).
-* If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
-* If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
-* Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
-* estimates of Difu and Difl, computed using reversed
-* communication with ZLACN2.
-* If M = 0 or N, DIF(1:2) = F-norm([A, B]).
-* If IJOB = 0 or 1, DIF is not referenced.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 1
-* If IJOB = 1, 2 or 4, LWORK >= 2*M*(N-M)
-* If IJOB = 3 or 5, LWORK >= 4*M*(N-M)
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
-* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= 1.
-* If IJOB = 1, 2 or 4, LIWORK >= N+2;
-* If IJOB = 3 or 5, LIWORK >= MAX(N+2, 2*M*(N-M));
-*
-* If LIWORK = -1, then a workspace query is assumed; the
-* routine only calculates the optimal size of the IWORK array,
-* returns this value as the first entry of the IWORK array, and
-* no error message related to LIWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* =0: Successful exit.
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* =1: Reordering of (A, B) failed because the transformed
-* matrix pair (A, B) would be too far from generalized
-* Schur form; the problem is very ill-conditioned.
-* (A, B) may have been partially reordered.
-* If requested, 0 is returned in DIF(*), PL and PR.
-*
-*
-* Further Details
-* ===============
-*
-* ZTGSEN first collects the selected eigenvalues by computing unitary
-* U and W that move them to the top left corner of (A, B). In other
-* words, the selected eigenvalues are the eigenvalues of (A11, B11) in
-*
-* U**H*(A, B)*W = (A11 A12) (B11 B12) n1
-* ( 0 A22),( 0 B22) n2
-* n1 n2 n1 n2
-*
-* where N = n1+n2 and U**H means the conjugate transpose of U. The first
-* n1 columns of U and W span the specified pair of left and right
-* eigenspaces (deflating subspaces) of (A, B).
-*
-* If (A, B) has been obtained from the generalized real Schur
-* decomposition of a matrix pair (C, D) = Q*(A, B)*Z**H, then the
-* reordered generalized Schur form of (C, D) is given by
-*
-* (C, D) = (Q*U)*(U**H *(A, B)*W)*(Z*W)**H,
-*
-* and the first n1 columns of Q*U and Z*W span the corresponding
-* deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
-*
-* Note that if the selected eigenvalue is sufficiently ill-conditioned,
-* then its value may differ significantly from its value before
-* reordering.
-*
-* The reciprocal condition numbers of the left and right eigenspaces
-* spanned by the first n1 columns of U and W (or Q*U and Z*W) may
-* be returned in DIF(1:2), corresponding to Difu and Difl, resp.
-*
-* The Difu and Difl are defined as:
-*
-* Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
-* and
-* Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
-*
-* where sigma-min(Zu) is the smallest singular value of the
-* (2*n1*n2)-by-(2*n1*n2) matrix
-*
-* Zu = [ kron(In2, A11) -kron(A22**H, In1) ]
-* [ kron(In2, B11) -kron(B22**H, In1) ].
-*
-* Here, Inx is the identity matrix of size nx and A22**H is the
-* conjugate transpose of A22. kron(X, Y) is the Kronecker product between
-* the matrices X and Y.
-*
-* When DIF(2) is small, small changes in (A, B) can cause large changes
-* in the deflating subspace. An approximate (asymptotic) bound on the
-* maximum angular error in the computed deflating subspaces is
-*
-* EPS * norm((A, B)) / DIF(2),
-*
-* where EPS is the machine precision.
-*
-* The reciprocal norm of the projectors on the left and right
-* eigenspaces associated with (A11, B11) may be returned in PL and PR.
-* They are computed as follows. First we compute L and R so that
-* P*(A, B)*Q is block diagonal, where
-*
-* P = ( I -L ) n1 Q = ( I R ) n1
-* ( 0 I ) n2 and ( 0 I ) n2
-* n1 n2 n1 n2
-*
-* and (L, R) is the solution to the generalized Sylvester equation
-*
-* A11*R - L*A22 = -A12
-* B11*R - L*B22 = -B12
-*
-* Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
-* An approximate (asymptotic) bound on the average absolute error of
-* the selected eigenvalues is
-*
-* EPS * norm((A, B)) / PL.
-*
-* There are also global error bounds which valid for perturbations up
-* to a certain restriction: A lower bound (x) on the smallest
-* F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
-* coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
-* (i.e. (A + E, B + F), is
-*
-* x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
-*
-* An approximate bound on x can be computed from DIF(1:2), PL and PR.
-*
-* If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
-* (L', R') and unperturbed (L, R) left and right deflating subspaces
-* associated with the selected cluster in the (1,1)-blocks can be
-* bounded as
-*
-* max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
-* max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
-*
-* See LAPACK User's Guide section 4.11 or the following references
-* for more information.
-*
-* Note that if the default method for computing the Frobenius-norm-
-* based estimate DIF is not wanted (see ZLATDF), then the parameter
-* IDIFJB (see below) should be changed from 3 to 4 (routine ZLATDF
-* (IJOB = 2 will be used)). See ZTGSYL for more details.
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* References
-* ==========
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software, Report
-* UMINF - 94.04, Department of Computing Science, Umea University,
-* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
-* To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
-* 1996.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztgsja.f b/SRC/ztgsja.f
index 4ffcbb72..6a34021e 100644
--- a/SRC/ztgsja.f
+++ b/SRC/ztgsja.f
@@ -1,11 +1,312 @@
+*> \brief \b ZTGSJA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
+* LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
+* Q, LDQ, WORK, NCYCLE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBQ, JOBU, JOBV
+* INTEGER INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N,
+* $ NCYCLE, P
+* DOUBLE PRECISION TOLA, TOLB
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION ALPHA( * ), BETA( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+* $ U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTGSJA computes the generalized singular value decomposition (GSVD)
+*> of two complex upper triangular (or trapezoidal) matrices A and B.
+*>
+*> On entry, it is assumed that matrices A and B have the following
+*> forms, which may be obtained by the preprocessing subroutine ZGGSVP
+*> from a general M-by-N matrix A and P-by-N matrix B:
+*>
+*> N-K-L K L
+*> A = K ( 0 A12 A13 ) if M-K-L >= 0;
+*> L ( 0 0 A23 )
+*> M-K-L ( 0 0 0 )
+*>
+*> N-K-L K L
+*> A = K ( 0 A12 A13 ) if M-K-L < 0;
+*> M-K ( 0 0 A23 )
+*>
+*> N-K-L K L
+*> B = L ( 0 0 B13 )
+*> P-L ( 0 0 0 )
+*>
+*> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
+*> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
+*> otherwise A23 is (M-K)-by-L upper trapezoidal.
+*>
+*> On exit,
+*>
+*> U**H *A*Q = D1*( 0 R ), V**H *B*Q = D2*( 0 R ),
+*>
+*> where U, V and Q are unitary matrices.
+*> R is a nonsingular upper triangular matrix, and D1
+*> and D2 are ``diagonal'' matrices, which are of the following
+*> structures:
+*>
+*> If M-K-L >= 0,
+*>
+*> K L
+*> D1 = K ( I 0 )
+*> L ( 0 C )
+*> M-K-L ( 0 0 )
+*>
+*> K L
+*> D2 = L ( 0 S )
+*> P-L ( 0 0 )
+*>
+*> N-K-L K L
+*> ( 0 R ) = K ( 0 R11 R12 ) K
+*> L ( 0 0 R22 ) L
+*>
+*> where
+*>
+*> C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
+*> S = diag( BETA(K+1), ... , BETA(K+L) ),
+*> C**2 + S**2 = I.
+*>
+*> R is stored in A(1:K+L,N-K-L+1:N) on exit.
+*>
+*> If M-K-L < 0,
+*>
+*> K M-K K+L-M
+*> D1 = K ( I 0 0 )
+*> M-K ( 0 C 0 )
+*>
+*> K M-K K+L-M
+*> D2 = M-K ( 0 S 0 )
+*> K+L-M ( 0 0 I )
+*> P-L ( 0 0 0 )
+*>
+*> N-K-L K M-K K+L-M
+*> ( 0 R ) = K ( 0 R11 R12 R13 )
+*> M-K ( 0 0 R22 R23 )
+*> K+L-M ( 0 0 0 R33 )
+*>
+*> where
+*> C = diag( ALPHA(K+1), ... , ALPHA(M) ),
+*> S = diag( BETA(K+1), ... , BETA(M) ),
+*> C**2 + S**2 = I.
+*>
+*> R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
+*> ( 0 R22 R23 )
+*> in B(M-K+1:L,N+M-K-L+1:N) on exit.
+*>
+*> The computation of the unitary transformation matrices U, V or Q
+*> is optional. These matrices may either be formed explicitly, or they
+*> may be postmultiplied into input matrices U1, V1, or Q1.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU
+*> \verbatim
+*> JOBU is CHARACTER*1
+*> = 'U': U must contain a unitary matrix U1 on entry, and
+*> the product U1*U is returned;
+*> = 'I': U is initialized to the unit matrix, and the
+*> unitary matrix U is returned;
+*> = 'N': U is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV
+*> \verbatim
+*> JOBV is CHARACTER*1
+*> = 'V': V must contain a unitary matrix V1 on entry, and
+*> the product V1*V is returned;
+*> = 'I': V is initialized to the unit matrix, and the
+*> unitary matrix V is returned;
+*> = 'N': V is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBQ
+*> \verbatim
+*> JOBQ is CHARACTER*1
+*> = 'Q': Q must contain a unitary matrix Q1 on entry, and
+*> the product Q1*Q is returned;
+*> = 'I': Q is initialized to the unit matrix, and the
+*> unitary matrix Q is returned;
+*> = 'N': Q is not computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* See Further Details.
+*>
+*> A (input/output) COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the M-by-N matrix A.
+*> On exit, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
+*> matrix R or part of R. See Purpose for details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*>
+*> B (input/output) COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the P-by-N matrix B.
+*> On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
+*> a part of R. See Purpose for details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,P).
+*>
+*> TOLA (input) DOUBLE PRECISION
+*> TOLB (input) DOUBLE PRECISION
+*> TOLA and TOLB are the convergence criteria for the Jacobi-
+*> Kogbetliantz iteration procedure. Generally, they are the
+*> same as used in the preprocessing step, say
+*> TOLA = MAX(M,N)*norm(A)*MAZHEPS,
+*> TOLB = MAX(P,N)*norm(B)*MAZHEPS.
+*>
+*> ALPHA (output) DOUBLE PRECISION array, dimension (N)
+*> BETA (output) DOUBLE PRECISION array, dimension (N)
+*> On exit, ALPHA and BETA contain the generalized singular
+*> value pairs of A and B;
+*> ALPHA(1:K) = 1,
+*> BETA(1:K) = 0,
+*> and if M-K-L >= 0,
+*> ALPHA(K+1:K+L) = diag(C),
+*> BETA(K+1:K+L) = diag(S),
+*> or if M-K-L < 0,
+*> ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
+*> BETA(K+1:M) = S, BETA(M+1:K+L) = 1.
+*> Furthermore, if K+L < N,
+*> ALPHA(K+L+1:N) = 0 and
+*> BETA(K+L+1:N) = 0.
+*>
+*> U (input/output) COMPLEX*16 array, dimension (LDU,M)
+*> On entry, if JOBU = 'U', U must contain a matrix U1 (usually
+*> the unitary matrix returned by ZGGSVP).
+*> On exit,
+*> if JOBU = 'I', U contains the unitary matrix U;
+*> if JOBU = 'U', U contains the product U1*U.
+*> If JOBU = 'N', U is not referenced.
+*>
+*> LDU (input) INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M) if
+*> JOBU = 'U'; LDU >= 1 otherwise.
+*>
+*> V (input/output) COMPLEX*16 array, dimension (LDV,P)
+*> On entry, if JOBV = 'V', V must contain a matrix V1 (usually
+*> the unitary matrix returned by ZGGSVP).
+*> On exit,
+*> if JOBV = 'I', V contains the unitary matrix V;
+*> if JOBV = 'V', V contains the product V1*V.
+*> If JOBV = 'N', V is not referenced.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P) if
+*> JOBV = 'V'; LDV >= 1 otherwise.
+*>
+*> Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
+*> On entry, if JOBQ = 'Q', Q must contain a matrix Q1 (usually
+*> the unitary matrix returned by ZGGSVP).
+*> On exit,
+*> if JOBQ = 'I', Q contains the unitary matrix Q;
+*> if JOBQ = 'Q', Q contains the product Q1*Q.
+*> If JOBQ = 'N', Q is not referenced.
+*>
+*> LDQ (input) INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N) if
+*> JOBQ = 'Q'; LDQ >= 1 otherwise.
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (2*N)
+*>
+*> NCYCLE (output) INTEGER
+*> The number of cycles required for convergence.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> = 1: the procedure does not converge after MAXIT cycles.
+*>
+*> Internal Parameters
+*> ===================
+*>
+*> MAXIT INTEGER
+*> MAXIT specifies the total loops that the iterative procedure
+*> may take. If after MAXIT cycles, the routine fails to
+*> converge, we return INFO = 1.
+*>
+*>
+*> ZTGSJA essentially uses a variant of Kogbetliantz algorithm to reduce
+*> min(L,M-K)-by-L triangular (or trapezoidal) matrix A23 and L-by-L
+*> matrix B13 to the form:
+*>
+*> U1**H *A13*Q1 = C1*R1; V1**H *B13*Q1 = S1*R1,
+*>
+*> where U1, V1 and Q1 are unitary matrix.
+*> C1 and S1 are diagonal matrices satisfying
+*>
+*> C1**2 + S1**2 = I,
+*>
+*> and R1 is an L-by-L nonsingular upper triangular matrix.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
$ LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
$ Q, LDQ, WORK, NCYCLE, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2009 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBQ, JOBU, JOBV
@@ -19,244 +320,6 @@
$ U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTGSJA computes the generalized singular value decomposition (GSVD)
-* of two complex upper triangular (or trapezoidal) matrices A and B.
-*
-* On entry, it is assumed that matrices A and B have the following
-* forms, which may be obtained by the preprocessing subroutine ZGGSVP
-* from a general M-by-N matrix A and P-by-N matrix B:
-*
-* N-K-L K L
-* A = K ( 0 A12 A13 ) if M-K-L >= 0;
-* L ( 0 0 A23 )
-* M-K-L ( 0 0 0 )
-*
-* N-K-L K L
-* A = K ( 0 A12 A13 ) if M-K-L < 0;
-* M-K ( 0 0 A23 )
-*
-* N-K-L K L
-* B = L ( 0 0 B13 )
-* P-L ( 0 0 0 )
-*
-* where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
-* upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
-* otherwise A23 is (M-K)-by-L upper trapezoidal.
-*
-* On exit,
-*
-* U**H *A*Q = D1*( 0 R ), V**H *B*Q = D2*( 0 R ),
-*
-* where U, V and Q are unitary matrices.
-* R is a nonsingular upper triangular matrix, and D1
-* and D2 are ``diagonal'' matrices, which are of the following
-* structures:
-*
-* If M-K-L >= 0,
-*
-* K L
-* D1 = K ( I 0 )
-* L ( 0 C )
-* M-K-L ( 0 0 )
-*
-* K L
-* D2 = L ( 0 S )
-* P-L ( 0 0 )
-*
-* N-K-L K L
-* ( 0 R ) = K ( 0 R11 R12 ) K
-* L ( 0 0 R22 ) L
-*
-* where
-*
-* C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
-* S = diag( BETA(K+1), ... , BETA(K+L) ),
-* C**2 + S**2 = I.
-*
-* R is stored in A(1:K+L,N-K-L+1:N) on exit.
-*
-* If M-K-L < 0,
-*
-* K M-K K+L-M
-* D1 = K ( I 0 0 )
-* M-K ( 0 C 0 )
-*
-* K M-K K+L-M
-* D2 = M-K ( 0 S 0 )
-* K+L-M ( 0 0 I )
-* P-L ( 0 0 0 )
-*
-* N-K-L K M-K K+L-M
-* ( 0 R ) = K ( 0 R11 R12 R13 )
-* M-K ( 0 0 R22 R23 )
-* K+L-M ( 0 0 0 R33 )
-*
-* where
-* C = diag( ALPHA(K+1), ... , ALPHA(M) ),
-* S = diag( BETA(K+1), ... , BETA(M) ),
-* C**2 + S**2 = I.
-*
-* R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
-* ( 0 R22 R23 )
-* in B(M-K+1:L,N+M-K-L+1:N) on exit.
-*
-* The computation of the unitary transformation matrices U, V or Q
-* is optional. These matrices may either be formed explicitly, or they
-* may be postmultiplied into input matrices U1, V1, or Q1.
-*
-* Arguments
-* =========
-*
-* JOBU (input) CHARACTER*1
-* = 'U': U must contain a unitary matrix U1 on entry, and
-* the product U1*U is returned;
-* = 'I': U is initialized to the unit matrix, and the
-* unitary matrix U is returned;
-* = 'N': U is not computed.
-*
-* JOBV (input) CHARACTER*1
-* = 'V': V must contain a unitary matrix V1 on entry, and
-* the product V1*V is returned;
-* = 'I': V is initialized to the unit matrix, and the
-* unitary matrix V is returned;
-* = 'N': V is not computed.
-*
-* JOBQ (input) CHARACTER*1
-* = 'Q': Q must contain a unitary matrix Q1 on entry, and
-* the product Q1*Q is returned;
-* = 'I': Q is initialized to the unit matrix, and the
-* unitary matrix Q is returned;
-* = 'N': Q is not computed.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* K (input) INTEGER
-* L (input) INTEGER
-* K and L specify the subblocks in the input matrices A and B:
-* A23 = A(K+1:MIN(K+L,M),N-L+1:N) and B13 = B(1:L,,N-L+1:N)
-* of A and B, whose GSVD is going to be computed by ZTGSJA.
-* See Further Details.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the M-by-N matrix A.
-* On exit, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
-* matrix R or part of R. See Purpose for details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the P-by-N matrix B.
-* On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
-* a part of R. See Purpose for details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,P).
-*
-* TOLA (input) DOUBLE PRECISION
-* TOLB (input) DOUBLE PRECISION
-* TOLA and TOLB are the convergence criteria for the Jacobi-
-* Kogbetliantz iteration procedure. Generally, they are the
-* same as used in the preprocessing step, say
-* TOLA = MAX(M,N)*norm(A)*MAZHEPS,
-* TOLB = MAX(P,N)*norm(B)*MAZHEPS.
-*
-* ALPHA (output) DOUBLE PRECISION array, dimension (N)
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* On exit, ALPHA and BETA contain the generalized singular
-* value pairs of A and B;
-* ALPHA(1:K) = 1,
-* BETA(1:K) = 0,
-* and if M-K-L >= 0,
-* ALPHA(K+1:K+L) = diag(C),
-* BETA(K+1:K+L) = diag(S),
-* or if M-K-L < 0,
-* ALPHA(K+1:M)= C, ALPHA(M+1:K+L)= 0
-* BETA(K+1:M) = S, BETA(M+1:K+L) = 1.
-* Furthermore, if K+L < N,
-* ALPHA(K+L+1:N) = 0 and
-* BETA(K+L+1:N) = 0.
-*
-* U (input/output) COMPLEX*16 array, dimension (LDU,M)
-* On entry, if JOBU = 'U', U must contain a matrix U1 (usually
-* the unitary matrix returned by ZGGSVP).
-* On exit,
-* if JOBU = 'I', U contains the unitary matrix U;
-* if JOBU = 'U', U contains the product U1*U.
-* If JOBU = 'N', U is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M) if
-* JOBU = 'U'; LDU >= 1 otherwise.
-*
-* V (input/output) COMPLEX*16 array, dimension (LDV,P)
-* On entry, if JOBV = 'V', V must contain a matrix V1 (usually
-* the unitary matrix returned by ZGGSVP).
-* On exit,
-* if JOBV = 'I', V contains the unitary matrix V;
-* if JOBV = 'V', V contains the product V1*V.
-* If JOBV = 'N', V is not referenced.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P) if
-* JOBV = 'V'; LDV >= 1 otherwise.
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
-* On entry, if JOBQ = 'Q', Q must contain a matrix Q1 (usually
-* the unitary matrix returned by ZGGSVP).
-* On exit,
-* if JOBQ = 'I', Q contains the unitary matrix Q;
-* if JOBQ = 'Q', Q contains the product Q1*Q.
-* If JOBQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N) if
-* JOBQ = 'Q'; LDQ >= 1 otherwise.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* NCYCLE (output) INTEGER
-* The number of cycles required for convergence.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* = 1: the procedure does not converge after MAXIT cycles.
-*
-* Internal Parameters
-* ===================
-*
-* MAXIT INTEGER
-* MAXIT specifies the total loops that the iterative procedure
-* may take. If after MAXIT cycles, the routine fails to
-* converge, we return INFO = 1.
-*
-* Further Details
-* ===============
-*
-* ZTGSJA essentially uses a variant of Kogbetliantz algorithm to reduce
-* min(L,M-K)-by-L triangular (or trapezoidal) matrix A23 and L-by-L
-* matrix B13 to the form:
-*
-* U1**H *A13*Q1 = C1*R1; V1**H *B13*Q1 = S1*R1,
-*
-* where U1, V1 and Q1 are unitary matrix.
-* C1 and S1 are diagonal matrices satisfying
-*
-* C1**2 + S1**2 = I,
-*
-* and R1 is an L-by-L nonsingular upper triangular matrix.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztgsna.f b/SRC/ztgsna.f
index 46fdce5a..80b93a06 100644
--- a/SRC/ztgsna.f
+++ b/SRC/ztgsna.f
@@ -1,11 +1,309 @@
+*> \brief \b ZTGSNA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
+* LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, JOB
+* INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION DIF( * ), S( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), VL( LDVL, * ),
+* $ VR( LDVR, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTGSNA estimates reciprocal condition numbers for specified
+*> eigenvalues and/or eigenvectors of a matrix pair (A, B).
+*>
+*> (A, B) must be in generalized Schur canonical form, that is, A and
+*> B are both upper triangular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for
+*> eigenvalues (S) or eigenvectors (DIF):
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for eigenvectors only (DIF);
+*> = 'B': for both eigenvalues and eigenvectors (S and DIF).
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute condition numbers for all eigenpairs;
+*> = 'S': compute condition numbers for selected eigenpairs
+*> specified by the array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenpairs for which
+*> condition numbers are required. To select condition numbers
+*> for the corresponding j-th eigenvalue and/or eigenvector,
+*> SELECT(j) must be set to .TRUE..
+*> If HOWMNY = 'A', SELECT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the square matrix pair (A, B). N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The upper triangular matrix A in the pair (A,B).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> The upper triangular matrix B in the pair (A, B).
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,M)
+*> IF JOB = 'E' or 'B', VL must contain left eigenvectors of
+*> (A, B), corresponding to the eigenpairs specified by HOWMNY
+*> and SELECT. The eigenvectors must be stored in consecutive
+*> columns of VL, as returned by ZTGEVC.
+*> If JOB = 'V', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1; and
+*> If JOB = 'E' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,M)
+*> IF JOB = 'E' or 'B', VR must contain right eigenvectors of
+*> (A, B), corresponding to the eigenpairs specified by HOWMNY
+*> and SELECT. The eigenvectors must be stored in consecutive
+*> columns of VR, as returned by ZTGEVC.
+*> If JOB = 'V', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1;
+*> If JOB = 'E' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (MM)
+*> If JOB = 'E' or 'B', the reciprocal condition numbers of the
+*> selected eigenvalues, stored in consecutive elements of the
+*> array.
+*> If JOB = 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION array, dimension (MM)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the selected eigenvectors, stored in consecutive
+*> elements of the array.
+*> If the eigenvalues cannot be reordered to compute DIF(j),
+*> DIF(j) is set to 0; this can only occur when the true value
+*> would be very small anyway.
+*> For each eigenvalue/vector specified by SELECT, DIF stores
+*> a Frobenius norm-based estimate of Difl.
+*> If JOB = 'E', DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of elements in the arrays S and DIF. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of elements of the arrays S and DIF used to store
+*> the specified condition numbers; for each selected eigenvalue
+*> one element is used. If HOWMNY = 'A', M is set to N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> If JOB = 'V' or 'B', LWORK >= max(1,2*N*N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N+2)
+*> If JOB = 'E', IWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: Successful exit
+*> < 0: If INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The reciprocal of the condition number of the i-th generalized
+*> eigenvalue w = (a, b) is defined as
+*>
+*> S(I) = (|v**HAu|**2 + |v**HBu|**2)**(1/2) / (norm(u)*norm(v))
+*>
+*> where u and v are the right and left eigenvectors of (A, B)
+*> corresponding to w; |z| denotes the absolute value of the complex
+*> number, and norm(u) denotes the 2-norm of the vector u. The pair
+*> (a, b) corresponds to an eigenvalue w = a/b (= v**HAu/v**HBu) of the
+*> matrix pair (A, B). If both a and b equal zero, then (A,B) is
+*> singular and S(I) = -1 is returned.
+*>
+*> An approximate error bound on the chordal distance between the i-th
+*> computed generalized eigenvalue w and the corresponding exact
+*> eigenvalue lambda is
+*>
+*> chord(w, lambda) <= EPS * norm(A, B) / S(I),
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal of the condition number of the right eigenvector u
+*> and left eigenvector v corresponding to the generalized eigenvalue w
+*> is defined as follows. Suppose
+*>
+*> (A, B) = ( a * ) ( b * ) 1
+*> ( 0 A22 ),( 0 B22 ) n-1
+*> 1 n-1 1 n-1
+*>
+*> Then the reciprocal condition number DIF(I) is
+*>
+*> Difl[(a, b), (A22, B22)] = sigma-min( Zl )
+*>
+*> where sigma-min(Zl) denotes the smallest singular value of
+*>
+*> Zl = [ kron(a, In-1) -kron(1, A22) ]
+*> [ kron(b, In-1) -kron(1, B22) ].
+*>
+*> Here In-1 is the identity matrix of size n-1 and X**H is the conjugate
+*> transpose of X. kron(X, Y) is the Kronecker product between the
+*> matrices X and Y.
+*>
+*> We approximate the smallest singular value of Zl with an upper
+*> bound. This is done by ZLATDF.
+*>
+*> An approximate error bound for a computed eigenvector VL(i) or
+*> VR(i) is given by
+*>
+*> EPS * norm(A, B) / DIF(i).
+*>
+*> See ref. [2-3] for more details and further references.
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> References
+*> ==========
+*>
+*> [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*> Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*> M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*> Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*>
+*> [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*> Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*> Estimation: Theory, Algorithms and Software, Report
+*> UMINF - 94.04, Department of Computing Science, Umea University,
+*> S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
+*> To appear in Numerical Algorithms, 1996.
+*>
+*> [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75.
+*> To appear in ACM Trans. on Math. Software, Vol 22, No 1, 1996.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
$ LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, JOB
@@ -19,194 +317,6 @@
$ VR( LDVR, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTGSNA estimates reciprocal condition numbers for specified
-* eigenvalues and/or eigenvectors of a matrix pair (A, B).
-*
-* (A, B) must be in generalized Schur canonical form, that is, A and
-* B are both upper triangular.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for
-* eigenvalues (S) or eigenvectors (DIF):
-* = 'E': for eigenvalues only (S);
-* = 'V': for eigenvectors only (DIF);
-* = 'B': for both eigenvalues and eigenvectors (S and DIF).
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute condition numbers for all eigenpairs;
-* = 'S': compute condition numbers for selected eigenpairs
-* specified by the array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenpairs for which
-* condition numbers are required. To select condition numbers
-* for the corresponding j-th eigenvalue and/or eigenvector,
-* SELECT(j) must be set to .TRUE..
-* If HOWMNY = 'A', SELECT is not referenced.
-*
-* N (input) INTEGER
-* The order of the square matrix pair (A, B). N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The upper triangular matrix A in the pair (A,B).
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,N)
-* The upper triangular matrix B in the pair (A, B).
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* VL (input) COMPLEX*16 array, dimension (LDVL,M)
-* IF JOB = 'E' or 'B', VL must contain left eigenvectors of
-* (A, B), corresponding to the eigenpairs specified by HOWMNY
-* and SELECT. The eigenvectors must be stored in consecutive
-* columns of VL, as returned by ZTGEVC.
-* If JOB = 'V', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1; and
-* If JOB = 'E' or 'B', LDVL >= N.
-*
-* VR (input) COMPLEX*16 array, dimension (LDVR,M)
-* IF JOB = 'E' or 'B', VR must contain right eigenvectors of
-* (A, B), corresponding to the eigenpairs specified by HOWMNY
-* and SELECT. The eigenvectors must be stored in consecutive
-* columns of VR, as returned by ZTGEVC.
-* If JOB = 'V', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1;
-* If JOB = 'E' or 'B', LDVR >= N.
-*
-* S (output) DOUBLE PRECISION array, dimension (MM)
-* If JOB = 'E' or 'B', the reciprocal condition numbers of the
-* selected eigenvalues, stored in consecutive elements of the
-* array.
-* If JOB = 'V', S is not referenced.
-*
-* DIF (output) DOUBLE PRECISION array, dimension (MM)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the selected eigenvectors, stored in consecutive
-* elements of the array.
-* If the eigenvalues cannot be reordered to compute DIF(j),
-* DIF(j) is set to 0; this can only occur when the true value
-* would be very small anyway.
-* For each eigenvalue/vector specified by SELECT, DIF stores
-* a Frobenius norm-based estimate of Difl.
-* If JOB = 'E', DIF is not referenced.
-*
-* MM (input) INTEGER
-* The number of elements in the arrays S and DIF. MM >= M.
-*
-* M (output) INTEGER
-* The number of elements of the arrays S and DIF used to store
-* the specified condition numbers; for each selected eigenvalue
-* one element is used. If HOWMNY = 'A', M is set to N.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* If JOB = 'V' or 'B', LWORK >= max(1,2*N*N).
-*
-* IWORK (workspace) INTEGER array, dimension (N+2)
-* If JOB = 'E', IWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: Successful exit
-* < 0: If INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The reciprocal of the condition number of the i-th generalized
-* eigenvalue w = (a, b) is defined as
-*
-* S(I) = (|v**HAu|**2 + |v**HBu|**2)**(1/2) / (norm(u)*norm(v))
-*
-* where u and v are the right and left eigenvectors of (A, B)
-* corresponding to w; |z| denotes the absolute value of the complex
-* number, and norm(u) denotes the 2-norm of the vector u. The pair
-* (a, b) corresponds to an eigenvalue w = a/b (= v**HAu/v**HBu) of the
-* matrix pair (A, B). If both a and b equal zero, then (A,B) is
-* singular and S(I) = -1 is returned.
-*
-* An approximate error bound on the chordal distance between the i-th
-* computed generalized eigenvalue w and the corresponding exact
-* eigenvalue lambda is
-*
-* chord(w, lambda) <= EPS * norm(A, B) / S(I),
-*
-* where EPS is the machine precision.
-*
-* The reciprocal of the condition number of the right eigenvector u
-* and left eigenvector v corresponding to the generalized eigenvalue w
-* is defined as follows. Suppose
-*
-* (A, B) = ( a * ) ( b * ) 1
-* ( 0 A22 ),( 0 B22 ) n-1
-* 1 n-1 1 n-1
-*
-* Then the reciprocal condition number DIF(I) is
-*
-* Difl[(a, b), (A22, B22)] = sigma-min( Zl )
-*
-* where sigma-min(Zl) denotes the smallest singular value of
-*
-* Zl = [ kron(a, In-1) -kron(1, A22) ]
-* [ kron(b, In-1) -kron(1, B22) ].
-*
-* Here In-1 is the identity matrix of size n-1 and X**H is the conjugate
-* transpose of X. kron(X, Y) is the Kronecker product between the
-* matrices X and Y.
-*
-* We approximate the smallest singular value of Zl with an upper
-* bound. This is done by ZLATDF.
-*
-* An approximate error bound for a computed eigenvector VL(i) or
-* VR(i) is given by
-*
-* EPS * norm(A, B) / DIF(i).
-*
-* See ref. [2-3] for more details and further references.
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* References
-* ==========
-*
-* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
-* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
-* M.S. Moonen et al (eds), Linear Algebra for Large Scale and
-* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
-*
-* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
-* Eigenvalues of a Regular Matrix Pair (A, B) and Condition
-* Estimation: Theory, Algorithms and Software, Report
-* UMINF - 94.04, Department of Computing Science, Umea University,
-* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
-* To appear in Numerical Algorithms, 1996.
-*
-* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75.
-* To appear in ACM Trans. on Math. Software, Vol 22, No 1, 1996.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztgsy2.f b/SRC/ztgsy2.f
index 388a1f99..fb383e36 100644
--- a/SRC/ztgsy2.f
+++ b/SRC/ztgsy2.f
@@ -1,3 +1,258 @@
+*> \brief \b ZTGSY2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+* LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N
+* DOUBLE PRECISION RDSCAL, RDSUM, SCALE
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTGSY2 solves the generalized Sylvester equation
+*>
+*> A * R - L * B = scale * C (1)
+*> D * R - L * E = scale * F
+*>
+*> using Level 1 and 2 BLAS, where R and L are unknown M-by-N matrices,
+*> (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
+*> N-by-N and M-by-N, respectively. A, B, D and E are upper triangular
+*> (i.e., (A,D) and (B,E) in generalized Schur form).
+*>
+*> The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
+*> scaling factor chosen to avoid overflow.
+*>
+*> In matrix notation solving equation (1) corresponds to solve
+*> Zx = scale * b, where Z is defined as
+*>
+*> Z = [ kron(In, A) -kron(B**H, Im) ] (2)
+*> [ kron(In, D) -kron(E**H, Im) ],
+*>
+*> Ik is the identity matrix of size k and X**H is the conjuguate transpose of X.
+*> kron(X, Y) is the Kronecker product between the matrices X and Y.
+*>
+*> If TRANS = 'C', y in the conjugate transposed system Z**H*y = scale*b
+*> is solved for, which is equivalent to solve for R and L in
+*>
+*> A**H * R + D**H * L = scale * C (3)
+*> R * B**H + L * E**H = scale * -F
+*>
+*> This case is used to compute an estimate of Dif[(A, D), (B, E)] =
+*> = sigma_min(Z) using reverse communicaton with ZLACON.
+*>
+*> ZTGSY2 also (IJOB >= 1) contributes to the computation in ZTGSYL
+*> of an upper bound on the separation between to matrix pairs. Then
+*> the input (A, D), (B, E) are sub-pencils of two matrix pairs in
+*> ZTGSYL.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N', solve the generalized Sylvester equation (1).
+*> = 'T': solve the 'transposed' system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what kind of functionality to be performed.
+*> =0: solve (1) only.
+*> =1: A contribution from this subsystem to a Frobenius
+*> norm-based estimate of the separation between two matrix
+*> pairs is computed. (look ahead strategy is used).
+*> =2: A contribution from this subsystem to a Frobenius
+*> norm-based estimate of the separation between two matrix
+*> pairs is computed. (DGECON on sub-systems is used.)
+*> Not referenced if TRANS = 'T'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> On entry, M specifies the order of A and D, and the row
+*> dimension of C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> On entry, N specifies the order of B and E, and the column
+*> dimension of C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, M)
+*> On entry, A contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the matrix A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> On entry, B contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the matrix B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, N)
+*> On entry, C contains the right-hand-side of the first matrix
+*> equation in (1).
+*> On exit, if IJOB = 0, C has been overwritten by the solution
+*> R.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the matrix C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (LDD, M)
+*> On entry, D contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of the matrix D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (LDE, N)
+*> On entry, E contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the matrix E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is COMPLEX*16 array, dimension (LDF, N)
+*> On entry, F contains the right-hand-side of the second matrix
+*> equation in (1).
+*> On exit, if IJOB = 0, F has been overwritten by the solution
+*> L.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the matrix F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
+*> R and L (C and F on entry) will hold the solutions to a
+*> slightly perturbed system but the input matrices A, B, D and
+*> E have not been changed. If SCALE = 0, R and L will hold the
+*> solutions to the homogeneous system with C = F = 0.
+*> Normally, SCALE = 1.
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*> RDSUM is DOUBLE PRECISION
+*> On entry, the sum of squares of computed contributions to
+*> the Dif-estimate under computation by ZTGSYL, where the
+*> scaling factor RDSCAL (see below) has been factored out.
+*> On exit, the corresponding sum of squares updated with the
+*> contributions from the current sub-system.
+*> If TRANS = 'T' RDSUM is not touched.
+*> NOTE: RDSUM only makes sense when ZTGSY2 is called by
+*> ZTGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*> RDSCAL is DOUBLE PRECISION
+*> On entry, scaling factor used to prevent overflow in RDSUM.
+*> On exit, RDSCAL is updated w.r.t. the current contributions
+*> in RDSUM.
+*> If TRANS = 'T', RDSCAL is not touched.
+*> NOTE: RDSCAL only makes sense when ZTGSY2 is called by
+*> ZTGSYL.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> On exit, if INFO is set to
+*> =0: Successful exit
+*> <0: If INFO = -i, input argument number i is illegal.
+*> >0: The matrix pairs (A, D) and (B, E) have common or very
+*> close eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
$ INFO )
@@ -5,7 +260,7 @@
* -- LAPACK auxiliary routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -17,153 +272,6 @@
$ D( LDD, * ), E( LDE, * ), F( LDF, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTGSY2 solves the generalized Sylvester equation
-*
-* A * R - L * B = scale * C (1)
-* D * R - L * E = scale * F
-*
-* using Level 1 and 2 BLAS, where R and L are unknown M-by-N matrices,
-* (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
-* N-by-N and M-by-N, respectively. A, B, D and E are upper triangular
-* (i.e., (A,D) and (B,E) in generalized Schur form).
-*
-* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
-* scaling factor chosen to avoid overflow.
-*
-* In matrix notation solving equation (1) corresponds to solve
-* Zx = scale * b, where Z is defined as
-*
-* Z = [ kron(In, A) -kron(B**H, Im) ] (2)
-* [ kron(In, D) -kron(E**H, Im) ],
-*
-* Ik is the identity matrix of size k and X**H is the conjuguate transpose of X.
-* kron(X, Y) is the Kronecker product between the matrices X and Y.
-*
-* If TRANS = 'C', y in the conjugate transposed system Z**H*y = scale*b
-* is solved for, which is equivalent to solve for R and L in
-*
-* A**H * R + D**H * L = scale * C (3)
-* R * B**H + L * E**H = scale * -F
-*
-* This case is used to compute an estimate of Dif[(A, D), (B, E)] =
-* = sigma_min(Z) using reverse communicaton with ZLACON.
-*
-* ZTGSY2 also (IJOB >= 1) contributes to the computation in ZTGSYL
-* of an upper bound on the separation between to matrix pairs. Then
-* the input (A, D), (B, E) are sub-pencils of two matrix pairs in
-* ZTGSYL.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N', solve the generalized Sylvester equation (1).
-* = 'T': solve the 'transposed' system (3).
-*
-* IJOB (input) INTEGER
-* Specifies what kind of functionality to be performed.
-* =0: solve (1) only.
-* =1: A contribution from this subsystem to a Frobenius
-* norm-based estimate of the separation between two matrix
-* pairs is computed. (look ahead strategy is used).
-* =2: A contribution from this subsystem to a Frobenius
-* norm-based estimate of the separation between two matrix
-* pairs is computed. (DGECON on sub-systems is used.)
-* Not referenced if TRANS = 'T'.
-*
-* M (input) INTEGER
-* On entry, M specifies the order of A and D, and the row
-* dimension of C, F, R and L.
-*
-* N (input) INTEGER
-* On entry, N specifies the order of B and E, and the column
-* dimension of C, F, R and L.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, M)
-* On entry, A contains an upper triangular matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of the matrix A. LDA >= max(1, M).
-*
-* B (input) COMPLEX*16 array, dimension (LDB, N)
-* On entry, B contains an upper triangular matrix.
-*
-* LDB (input) INTEGER
-* The leading dimension of the matrix B. LDB >= max(1, N).
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC, N)
-* On entry, C contains the right-hand-side of the first matrix
-* equation in (1).
-* On exit, if IJOB = 0, C has been overwritten by the solution
-* R.
-*
-* LDC (input) INTEGER
-* The leading dimension of the matrix C. LDC >= max(1, M).
-*
-* D (input) COMPLEX*16 array, dimension (LDD, M)
-* On entry, D contains an upper triangular matrix.
-*
-* LDD (input) INTEGER
-* The leading dimension of the matrix D. LDD >= max(1, M).
-*
-* E (input) COMPLEX*16 array, dimension (LDE, N)
-* On entry, E contains an upper triangular matrix.
-*
-* LDE (input) INTEGER
-* The leading dimension of the matrix E. LDE >= max(1, N).
-*
-* F (input/output) COMPLEX*16 array, dimension (LDF, N)
-* On entry, F contains the right-hand-side of the second matrix
-* equation in (1).
-* On exit, if IJOB = 0, F has been overwritten by the solution
-* L.
-*
-* LDF (input) INTEGER
-* The leading dimension of the matrix F. LDF >= max(1, M).
-*
-* SCALE (output) DOUBLE PRECISION
-* On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
-* R and L (C and F on entry) will hold the solutions to a
-* slightly perturbed system but the input matrices A, B, D and
-* E have not been changed. If SCALE = 0, R and L will hold the
-* solutions to the homogeneous system with C = F = 0.
-* Normally, SCALE = 1.
-*
-* RDSUM (input/output) DOUBLE PRECISION
-* On entry, the sum of squares of computed contributions to
-* the Dif-estimate under computation by ZTGSYL, where the
-* scaling factor RDSCAL (see below) has been factored out.
-* On exit, the corresponding sum of squares updated with the
-* contributions from the current sub-system.
-* If TRANS = 'T' RDSUM is not touched.
-* NOTE: RDSUM only makes sense when ZTGSY2 is called by
-* ZTGSYL.
-*
-* RDSCAL (input/output) DOUBLE PRECISION
-* On entry, scaling factor used to prevent overflow in RDSUM.
-* On exit, RDSCAL is updated w.r.t. the current contributions
-* in RDSUM.
-* If TRANS = 'T', RDSCAL is not touched.
-* NOTE: RDSCAL only makes sense when ZTGSY2 is called by
-* ZTGSYL.
-*
-* INFO (output) INTEGER
-* On exit, if INFO is set to
-* =0: Successful exit
-* <0: If INFO = -i, input argument number i is illegal.
-* >0: The matrix pairs (A, D) and (B, E) have common or very
-* close eigenvalues.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztgsyl.f b/SRC/ztgsyl.f
index 6c6f32e4..a9bae618 100644
--- a/SRC/ztgsyl.f
+++ b/SRC/ztgsyl.f
@@ -1,11 +1,300 @@
+*> \brief \b ZTGSYL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+* LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF,
+* $ LWORK, M, N
+* DOUBLE PRECISION DIF, SCALE
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTGSYL solves the generalized Sylvester equation:
+*>
+*> A * R - L * B = scale * C (1)
+*> D * R - L * E = scale * F
+*>
+*> where R and L are unknown m-by-n matrices, (A, D), (B, E) and
+*> (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
+*> respectively, with complex entries. A, B, D and E are upper
+*> triangular (i.e., (A,D) and (B,E) in generalized Schur form).
+*>
+*> The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1
+*> is an output scaling factor chosen to avoid overflow.
+*>
+*> In matrix notation (1) is equivalent to solve Zx = scale*b, where Z
+*> is defined as
+*>
+*> Z = [ kron(In, A) -kron(B**H, Im) ] (2)
+*> [ kron(In, D) -kron(E**H, Im) ],
+*>
+*> Here Ix is the identity matrix of size x and X**H is the conjugate
+*> transpose of X. Kron(X, Y) is the Kronecker product between the
+*> matrices X and Y.
+*>
+*> If TRANS = 'C', y in the conjugate transposed system Z**H *y = scale*b
+*> is solved for, which is equivalent to solve for R and L in
+*>
+*> A**H * R + D**H * L = scale * C (3)
+*> R * B**H + L * E**H = scale * -F
+*>
+*> This case (TRANS = 'C') is used to compute an one-norm-based estimate
+*> of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
+*> and (B,E), using ZLACON.
+*>
+*> If IJOB >= 1, ZTGSYL computes a Frobenius norm-based estimate of
+*> Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
+*> reciprocal of the smallest singular value of Z.
+*>
+*> This is a level-3 BLAS algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': solve the generalized sylvester equation (1).
+*> = 'C': solve the "conjugate transposed" system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*> IJOB is INTEGER
+*> Specifies what kind of functionality to be performed.
+*> =0: solve (1) only.
+*> =1: The functionality of 0 and 3.
+*> =2: The functionality of 0 and 4.
+*> =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*> (look ahead strategy is used).
+*> =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*> (ZGECON on sub-systems is used).
+*> Not referenced if TRANS = 'C'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the matrices A and D, and the row dimension of
+*> the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices B and E, and the column dimension
+*> of the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, M)
+*> The upper triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> The upper triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, N)
+*> On entry, C contains the right-hand-side of the first matrix
+*> equation in (1) or (3).
+*> On exit, if IJOB = 0, 1 or 2, C has been overwritten by
+*> the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
+*> the solution achieved during the computation of the
+*> Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (LDD, M)
+*> The upper triangular matrix D.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of the array D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (LDE, N)
+*> The upper triangular matrix E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the array E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*> F is COMPLEX*16 array, dimension (LDF, N)
+*> On entry, F contains the right-hand-side of the second matrix
+*> equation in (1) or (3).
+*> On exit, if IJOB = 0, 1 or 2, F has been overwritten by
+*> the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
+*> the solution achieved during the computation of the
+*> Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of the array F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION
+*> On exit DIF is the reciprocal of a lower bound of the
+*> reciprocal of the Dif-function, i.e. DIF is an upper bound of
+*> Dif[(A,D), (B,E)] = sigma-min(Z), where Z as in (2).
+*> IF IJOB = 0 or TRANS = 'C', DIF is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> On exit SCALE is the scaling factor in (1) or (3).
+*> If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
+*> to a slightly perturbed system but the input matrices A, B,
+*> D and E have not been changed. If SCALE = 0, R and L will
+*> hold the solutions to the homogenious system with C = F = 0.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK > = 1.
+*> If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M+N+2)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: successful exit
+*> <0: If INFO = -i, the i-th argument had an illegal value.
+*> >0: (A, D) and (B, E) have common or very close
+*> eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*> Umea University, S-901 87 Umea, Sweden.
+*>
+*> [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*> for Solving the Generalized Sylvester Equation and Estimating the
+*> Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*> Department of Computing Science, Umea University, S-901 87 Umea,
+*> Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*> Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
+*> No 1, 1996.
+*>
+*> [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
+*> Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
+*> Appl., 15(4):1045-1060, 1994.
+*>
+*> [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
+*> Condition Estimators for Solving the Generalized Sylvester
+*> Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
+*> July 1989, pp 745-751.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
$ LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
$ IWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -20,177 +309,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTGSYL solves the generalized Sylvester equation:
-*
-* A * R - L * B = scale * C (1)
-* D * R - L * E = scale * F
-*
-* where R and L are unknown m-by-n matrices, (A, D), (B, E) and
-* (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
-* respectively, with complex entries. A, B, D and E are upper
-* triangular (i.e., (A,D) and (B,E) in generalized Schur form).
-*
-* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1
-* is an output scaling factor chosen to avoid overflow.
-*
-* In matrix notation (1) is equivalent to solve Zx = scale*b, where Z
-* is defined as
-*
-* Z = [ kron(In, A) -kron(B**H, Im) ] (2)
-* [ kron(In, D) -kron(E**H, Im) ],
-*
-* Here Ix is the identity matrix of size x and X**H is the conjugate
-* transpose of X. Kron(X, Y) is the Kronecker product between the
-* matrices X and Y.
-*
-* If TRANS = 'C', y in the conjugate transposed system Z**H *y = scale*b
-* is solved for, which is equivalent to solve for R and L in
-*
-* A**H * R + D**H * L = scale * C (3)
-* R * B**H + L * E**H = scale * -F
-*
-* This case (TRANS = 'C') is used to compute an one-norm-based estimate
-* of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
-* and (B,E), using ZLACON.
-*
-* If IJOB >= 1, ZTGSYL computes a Frobenius norm-based estimate of
-* Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
-* reciprocal of the smallest singular value of Z.
-*
-* This is a level-3 BLAS algorithm.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* = 'N': solve the generalized sylvester equation (1).
-* = 'C': solve the "conjugate transposed" system (3).
-*
-* IJOB (input) INTEGER
-* Specifies what kind of functionality to be performed.
-* =0: solve (1) only.
-* =1: The functionality of 0 and 3.
-* =2: The functionality of 0 and 4.
-* =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
-* (look ahead strategy is used).
-* =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
-* (ZGECON on sub-systems is used).
-* Not referenced if TRANS = 'C'.
-*
-* M (input) INTEGER
-* The order of the matrices A and D, and the row dimension of
-* the matrices C, F, R and L.
-*
-* N (input) INTEGER
-* The order of the matrices B and E, and the column dimension
-* of the matrices C, F, R and L.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, M)
-* The upper triangular matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1, M).
-*
-* B (input) COMPLEX*16 array, dimension (LDB, N)
-* The upper triangular matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1, N).
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC, N)
-* On entry, C contains the right-hand-side of the first matrix
-* equation in (1) or (3).
-* On exit, if IJOB = 0, 1 or 2, C has been overwritten by
-* the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
-* the solution achieved during the computation of the
-* Dif-estimate.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1, M).
-*
-* D (input) COMPLEX*16 array, dimension (LDD, M)
-* The upper triangular matrix D.
-*
-* LDD (input) INTEGER
-* The leading dimension of the array D. LDD >= max(1, M).
-*
-* E (input) COMPLEX*16 array, dimension (LDE, N)
-* The upper triangular matrix E.
-*
-* LDE (input) INTEGER
-* The leading dimension of the array E. LDE >= max(1, N).
-*
-* F (input/output) COMPLEX*16 array, dimension (LDF, N)
-* On entry, F contains the right-hand-side of the second matrix
-* equation in (1) or (3).
-* On exit, if IJOB = 0, 1 or 2, F has been overwritten by
-* the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
-* the solution achieved during the computation of the
-* Dif-estimate.
-*
-* LDF (input) INTEGER
-* The leading dimension of the array F. LDF >= max(1, M).
-*
-* DIF (output) DOUBLE PRECISION
-* On exit DIF is the reciprocal of a lower bound of the
-* reciprocal of the Dif-function, i.e. DIF is an upper bound of
-* Dif[(A,D), (B,E)] = sigma-min(Z), where Z as in (2).
-* IF IJOB = 0 or TRANS = 'C', DIF is not referenced.
-*
-* SCALE (output) DOUBLE PRECISION
-* On exit SCALE is the scaling factor in (1) or (3).
-* If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
-* to a slightly perturbed system but the input matrices A, B,
-* D and E have not been changed. If SCALE = 0, R and L will
-* hold the solutions to the homogenious system with C = F = 0.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK > = 1.
-* If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (M+N+2)
-*
-* INFO (output) INTEGER
-* =0: successful exit
-* <0: If INFO = -i, the i-th argument had an illegal value.
-* >0: (A, D) and (B, E) have common or very close
-* eigenvalues.
-*
-* Further Details
-* ===============
-*
-* Based on contributions by
-* Bo Kagstrom and Peter Poromaa, Department of Computing Science,
-* Umea University, S-901 87 Umea, Sweden.
-*
-* [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
-* for Solving the Generalized Sylvester Equation and Estimating the
-* Separation between Regular Matrix Pairs, Report UMINF - 93.23,
-* Department of Computing Science, Umea University, S-901 87 Umea,
-* Sweden, December 1993, Revised April 1994, Also as LAPACK Working
-* Note 75. To appear in ACM Trans. on Math. Software, Vol 22,
-* No 1, 1996.
-*
-* [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
-* Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
-* Appl., 15(4):1045-1060, 1994.
-*
-* [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
-* Condition Estimators for Solving the Generalized Sylvester
-* Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
-* July 1989, pp 745-751.
-*
* =====================================================================
* Replaced various illegal calls to CCOPY by calls to CLASET.
* Sven Hammarling, 1/5/02.
diff --git a/SRC/ztpcon.f b/SRC/ztpcon.f
index a48990fc..b04fcdeb 100644
--- a/SRC/ztpcon.f
+++ b/SRC/ztpcon.f
@@ -1,12 +1,131 @@
+*> \brief \b ZTPCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, N
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPCON estimates the reciprocal of the condition number of a packed
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,58 +137,6 @@
COMPLEX*16 AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTPCON estimates the reciprocal of the condition number of a packed
-* triangular matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztpmqrt.f b/SRC/ztpmqrt.f
index ffb0ce25..8b2a55bd 100644
--- a/SRC/ztpmqrt.f
+++ b/SRC/ztpmqrt.f
@@ -1,132 +1,190 @@
- SUBROUTINE ZTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
- $ A, LDA, B, LDB, WORK, INFO )
- IMPLICIT NONE
+*> \brief \b ZTPMQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd. --
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
-* ..
-* .. Array Arguments ..
- COMPLEX*16 V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
- $ WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
+* A, LDA, B, LDB, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZTPMQRT applies a complex orthogonal matrix Q obtained from a
-* "triangular-pentagonal" complex block reflector H to a general
-* complex matrix C, which consists of two blocks A and B.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPMQRT applies a complex orthogonal matrix Q obtained from a
+*> "triangular-pentagonal" complex block reflector H to a general
+*> complex matrix C, which consists of two blocks A and B.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix B. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-*
-* L (input) INTEGER
-* The order of the trapezoidal part of V.
-* K >= L >= 0. See Further Details.
-*
-* NB (input) INTEGER
-* The block size used for the storage of T. K >= NB >= 1.
-* This must be the same value of NB used to generate T
-* in CTPQRT.
-*
-* V (input) COMPLEX*16 array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* CTPQRT in B. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* T (input) COMPLEX*16 array, dimension (LDT,K)
-* The upper triangular factors of the block reflectors
-* as returned by CTPQRT, stored as a NB-by-K matrix.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
-*
-* A (input/output) COMPLEX*16 array, dimension
-* (LDA,N) if SIDE = 'L' or
-* (LDA,K) if SIDE = 'R'
-* On entry, the K-by-N or M-by-K matrix A.
-* On exit, A is overwritten by the corresponding block of
-* Q*C or Q**H*C or C*Q or C*Q**H. See Further Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDC >= max(1,K);
-* If SIDE = 'R', LDC >= max(1,M).
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B. N >= 0.
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the M-by-N matrix B.
-* On exit, B is overwritten by the corresponding block of
-* Q*C or Q**H*C or C*Q or C*Q**H. See Further Details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* LDB >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX*16 array. The dimension of WORK is
-* N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* K >= L >= 0. See Further Details.
+*>
+*> NB (input) INTEGER
+*> The block size used for the storage of T. K >= NB >= 1.
+*> This must be the same value of NB used to generate T
+*> in CTPQRT.
+*>
+*> V (input) COMPLEX*16 array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> CTPQRT in B. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*>
+*> T (input) COMPLEX*16 array, dimension (LDT,K)
+*> The upper triangular factors of the block reflectors
+*> as returned by CTPQRT, stored as a NB-by-K matrix.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> A (input/output) COMPLEX*16 array, dimension
+*> (LDA,N) if SIDE = 'L' or
+*> (LDA,K) if SIDE = 'R'
+*> On entry, the K-by-N or M-by-K matrix A.
+*> On exit, A is overwritten by the corresponding block of
+*> Q*C or Q**H*C or C*Q or C*Q**H. See Further Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDC >= max(1,K);
+*> If SIDE = 'R', LDC >= max(1,M).
+*>
+*> B (input/output) COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the M-by-N matrix B.
+*> On exit, B is overwritten by the corresponding block of
+*> Q*C or Q**H*C or C*Q or C*Q**H. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B.
+*> LDB >= max(1,M).
+*>
+*> WORK (workspace/output) COMPLEX*16 array. The dimension of WORK is
+*> N*NB if SIDE = 'L', or M*NB if SIDE = 'R'.
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The columns of the pentagonal matrix V contain the elementary reflectors
+*> H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
+*> trapezoidal block V2:
+*>
+*> V = [V1]
+*> [V2].
+*>
+*> The size of the trapezoidal block V2 is determined by the parameter L,
+*> where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
+*> rows of a K-by-K upper triangular matrix. If L=K, V2 is upper triangular;
+*> if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
+*>
+*> If SIDE = 'L': C = [A] where A is K-by-N, B is M-by-N and V is M-by-K.
+*> [B]
+*>
+*> If SIDE = 'R': C = [A B] where A is M-by-K, B is M-by-N and V is N-by-K.
+*>
+*> The complex orthogonal matrix Q is formed from V and T.
+*>
+*> If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
+*>
+*> If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C.
+*>
+*> If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
+*>
+*> If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
+ $ A, LDA, B, LDB, WORK, INFO )
*
-* The columns of the pentagonal matrix V contain the elementary reflectors
-* H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
-* trapezoidal block V2:
-*
-* V = [V1]
-* [V2].
-*
-* The size of the trapezoidal block V2 is determined by the parameter L,
-* where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
-* rows of a K-by-K upper triangular matrix. If L=K, V2 is upper triangular;
-* if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
-*
-* If SIDE = 'L': C = [A] where A is K-by-N, B is M-by-N and V is M-by-K.
-* [B]
-*
-* If SIDE = 'R': C = [A B] where A is M-by-K, B is M-by-N and V is N-by-K.
-*
-* The complex orthogonal matrix Q is formed from V and T.
-*
-* If TRANS='N' and SIDE='L', C is on exit replaced with Q * C.
-*
-* If TRANS='C' and SIDE='L', C is on exit replaced with Q**H * C.
-*
-* If TRANS='N' and SIDE='R', C is on exit replaced with C * Q.
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* If TRANS='C' and SIDE='R', C is on exit replaced with C * Q**H.
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 V( LDV, * ), A( LDA, * ), B( LDB, * ), T( LDT, * ),
+ $ WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztpqrt.f b/SRC/ztpqrt.f
index d0570407..25d987b3 100644
--- a/SRC/ztpqrt.f
+++ b/SRC/ztpqrt.f
@@ -1,120 +1,167 @@
- SUBROUTINE ZTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
- $ INFO )
- IMPLICIT NONE
+*> \brief \b ZTPQRT
*
-* -- LAPACK routine (version 3.?) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZTPQRT computes a blocked QR factorization of a complex
-* "triangular-pentagonal" matrix C, which is composed of a
-* triangular block A and pentagonal block B, using the compact
-* WY representation for Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPQRT computes a blocked QR factorization of a complex
+*> "triangular-pentagonal" matrix C, which is composed of a
+*> triangular block A and pentagonal block B, using the compact
+*> WY representation for Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B, and the order of the
-* triangular matrix A.
-* N >= 0.
-*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part of B.
-* MIN(M,N) >= L >= 0. See Further Details.
-*
-* NB (input) INTEGER
-* The block size to be used in the blocked QR. N >= NB >= 1.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the upper triangular N-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the pentagonal M-by-N matrix B. The first M-L rows
-* are rectangular, and the last L rows are upper trapezoidal.
-* On exit, B contains the pentagonal matrix V. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B, and the order of the
+*> triangular matrix A.
+*> N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX*16 array, dimension (LDT,N)
-* The upper triangular block reflectors stored in compact form
-* as a sequence of upper triangular blocks. See Further Details.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= NB.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (NB*N)
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
-*
-* The input matrix C is a (N+M)-by-N matrix
-*
-* C = [ A ]
-* [ B ]
-*
-* where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
-* matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
-* upper trapezoidal matrix B2:
-*
-* B = [ B1 ] <- (M-L)-by-N rectangular
-* [ B2 ] <- L-by-N upper trapezoidal.
-*
-* The upper trapezoidal matrix B2 consists of the first L rows of a
-* N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
-* B is rectangular M-by-N; if M=L=N, B is upper triangular.
-*
-* The matrix W stores the elementary reflectors H(i) in the i-th column
-* below the diagonal (of A) in the (N+M)-by-N input matrix C
-*
-* C = [ A ] <- upper triangular N-by-N
-* [ B ] <- M-by-N pentagonal
-*
-* so that W can be represented as
-*
-* W = [ I ] <- identity, N-by-N
-* [ V ] <- M-by-N, same form as B.
-*
-* Thus, all of information needed for W is contained on exit in B, which
-* we call V above. Note that V has the same form as B; that is,
-*
-* V = [ V1 ] <- (M-L)-by-N rectangular
-* [ V2 ] <- L-by-N upper trapezoidal.
-*
-* The columns of V represent the vectors which define the H(i)'s.
+*>\details \b Further \b Details
+*> \verbatim
+* MIN(M,N) >= L >= 0. See Further Details.
+*>
+*> NB (input) INTEGER
+*> The block size to be used in the blocked QR. N >= NB >= 1.
+*>
+*> A (input/output) COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the upper triangular N-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the upper triangular matrix R.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> B (input/output) COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the pentagonal M-by-N matrix B. The first M-L rows
+*> are rectangular, and the last L rows are upper trapezoidal.
+*> On exit, B contains the pentagonal matrix V. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*>
+*> T (output) COMPLEX*16 array, dimension (LDT,N)
+*> The upper triangular block reflectors stored in compact form
+*> as a sequence of upper triangular blocks. See Further Details.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= NB.
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension (NB*N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The input matrix C is a (N+M)-by-N matrix
+*>
+*> C = [ A ]
+*> [ B ]
+*>
+*> where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
+*> matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
+*> upper trapezoidal matrix B2:
+*>
+*> B = [ B1 ] <- (M-L)-by-N rectangular
+*> [ B2 ] <- L-by-N upper trapezoidal.
+*>
+*> The upper trapezoidal matrix B2 consists of the first L rows of a
+*> N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
+*> B is rectangular M-by-N; if M=L=N, B is upper triangular.
+*>
+*> The matrix W stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal (of A) in the (N+M)-by-N input matrix C
+*>
+*> C = [ A ] <- upper triangular N-by-N
+*> [ B ] <- M-by-N pentagonal
+*>
+*> so that W can be represented as
+*>
+*> W = [ I ] <- identity, N-by-N
+*> [ V ] <- M-by-N, same form as B.
+*>
+*> Thus, all of information needed for W is contained on exit in B, which
+*> we call V above. Note that V has the same form as B; that is,
+*>
+*> V = [ V1 ] <- (M-L)-by-N rectangular
+*> [ V2 ] <- L-by-N upper trapezoidal.
+*>
+*> The columns of V represent the vectors which define the H(i)'s.
+*>
+*> The number of blocks is B = ceiling(N/NB), where each
+*> block is of order NB except for the last block, which is of order
+*> IB = N - (B-1)*NB. For each of the B blocks, a upper triangular block
+*> reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
+*> for the last block) T's are stored in the NB-by-N matrix T as
+*>
+*> T = [T1 T2 ... TB].
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
+ $ INFO )
*
-* The number of blocks is B = ceiling(N/NB), where each
-* block is of order NB except for the last block, which is of order
-* IB = N - (B-1)*NB. For each of the B blocks, a upper triangular block
-* reflector factor is computed: T1, T2, ..., TB. The NB-by-NB (and IB-by-IB
-* for the last block) T's are stored in the NB-by-N matrix T as
+* -- LAPACK computational routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* T = [T1 T2 ... TB].
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztpqrt2.f b/SRC/ztpqrt2.f
index 0d087fd6..00283329 100644
--- a/SRC/ztpqrt2.f
+++ b/SRC/ztpqrt2.f
@@ -1,111 +1,157 @@
- SUBROUTINE ZTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
- IMPLICIT NONE
+*> \brief \b ZTPQRT2
*
-* -- LAPACK routine (version 3.x) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LDT, N, M, L
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), T( LDT, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDT, N, M, L
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* ZTPQRT2 computes a QR factorization of a complex "triangular-pentagonal"
-* matrix C, which is composed of a triangular block A and pentagonal block B,
-* using the compact WY representation for Q.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPQRT2 computes a QR factorization of a complex "triangular-pentagonal"
+*> matrix C, which is composed of a triangular block A and pentagonal block B,
+*> using the compact WY representation for Q.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The total number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B, and the order of
-* the triangular matrix A.
-* N >= 0.
-*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part of B.
-* MIN(M,N) >= L >= 0. See Further Details.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the upper triangular N-by-N matrix A.
-* On exit, the elements on and above the diagonal of the array
-* contain the upper triangular matrix R.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the pentagonal M-by-N matrix B. The first M-L rows
-* are rectangular, and the last L rows are upper trapezoidal.
-* On exit, B contains the pentagonal matrix V. See Further Details.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The total number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B, and the order of
+*> the triangular matrix A.
+*> N >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* T (output) COMPLEX*16 array, dimension (LDT,N)
-* The N-by-N upper triangular factor T of the block reflector.
-* See Further Details.
+*> \date November 2011
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N)
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* MIN(M,N) >= L >= 0. See Further Details.
+*>
+*> A (input/output) COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the upper triangular N-by-N matrix A.
+*> On exit, the elements on and above the diagonal of the array
+*> contain the upper triangular matrix R.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*>
+*> B (input/output) COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the pentagonal M-by-N matrix B. The first M-L rows
+*> are rectangular, and the last L rows are upper trapezoidal.
+*> On exit, B contains the pentagonal matrix V. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*>
+*> T (output) COMPLEX*16 array, dimension (LDT,N)
+*> The N-by-N upper triangular factor T of the block reflector.
+*> See Further Details.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N)
+*>
+*> INFO (output) INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*>
+*>
+*> The input matrix C is a (N+M)-by-N matrix
+*>
+*> C = [ A ]
+*> [ B ]
+*>
+*> where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
+*> matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
+*> upper trapezoidal matrix B2:
+*>
+*> B = [ B1 ] <- (M-L)-by-N rectangular
+*> [ B2 ] <- L-by-N upper trapezoidal.
+*>
+*> The upper trapezoidal matrix B2 consists of the first L rows of a
+*> N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
+*> B is rectangular M-by-N; if M=L=N, B is upper triangular.
+*>
+*> The matrix W stores the elementary reflectors H(i) in the i-th column
+*> below the diagonal (of A) in the (N+M)-by-N input matrix C
+*>
+*> C = [ A ] <- upper triangular N-by-N
+*> [ B ] <- M-by-N pentagonal
+*>
+*> so that W can be represented as
+*>
+*> W = [ I ] <- identity, N-by-N
+*> [ V ] <- M-by-N, same form as B.
+*>
+*> Thus, all of information needed for W is contained on exit in B, which
+*> we call V above. Note that V has the same form as B; that is,
+*>
+*> V = [ V1 ] <- (M-L)-by-N rectangular
+*> [ V2 ] <- L-by-N upper trapezoidal.
+*>
+*> The columns of V represent the vectors which define the H(i)'s.
+*> The (M+N)-by-(M+N) block reflector H is then given by
+*>
+*> H = I - W * T * W**H
+*>
+*> where W**H is the conjugate transpose of W and T is the upper triangular
+*> factor of the block reflector.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
*
-* The input matrix C is a (N+M)-by-N matrix
-*
-* C = [ A ]
-* [ B ]
-*
-* where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
-* matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
-* upper trapezoidal matrix B2:
-*
-* B = [ B1 ] <- (M-L)-by-N rectangular
-* [ B2 ] <- L-by-N upper trapezoidal.
-*
-* The upper trapezoidal matrix B2 consists of the first L rows of a
-* N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N). If L=0,
-* B is rectangular M-by-N; if M=L=N, B is upper triangular.
-*
-* The matrix W stores the elementary reflectors H(i) in the i-th column
-* below the diagonal (of A) in the (N+M)-by-N input matrix C
-*
-* C = [ A ] <- upper triangular N-by-N
-* [ B ] <- M-by-N pentagonal
-*
-* so that W can be represented as
-*
-* W = [ I ] <- identity, N-by-N
-* [ V ] <- M-by-N, same form as B.
-*
-* Thus, all of information needed for W is contained on exit in B, which
-* we call V above. Note that V has the same form as B; that is,
-*
-* V = [ V1 ] <- (M-L)-by-N rectangular
-* [ V2 ] <- L-by-N upper trapezoidal.
-*
-* The columns of V represent the vectors which define the H(i)'s.
-* The (M+N)-by-(M+N) block reflector H is then given by
-*
-* H = I - W * T * W**H
+* -- LAPACK computational routine (version 3.x) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* where W**H is the conjugate transpose of W and T is the upper triangular
-* factor of the block reflector.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LDT, N, M, L
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztprfb.f b/SRC/ztprfb.f
index c97c35d1..7109302d 100644
--- a/SRC/ztprfb.f
+++ b/SRC/ztprfb.f
@@ -1,11 +1,218 @@
+*> \brief \b ZTPRFB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
+* V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIRECT, SIDE, STOREV, TRANS
+* INTEGER K, L, LDA, LDB, LDT, LDV, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), T( LDT, * ),
+* $ V( LDV, * ), WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPRFB applies a complex "triangular-pentagonal" block reflector H or its
+*> conjugate transpose H**H to a complex matrix C, which is composed of two
+*> blocks A and B, either from the left or right.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply H or H**H from the Left
+*> = 'R': apply H or H**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply H (No transpose)
+*> = 'C': apply H**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*> DIRECT is CHARACTER*1
+*> Indicates how H is formed from a product of elementary
+*> reflectors
+*> = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*> = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*> \endverbatim
+*>
+*> \param[in] STOREV
+*> \verbatim
+*> STOREV is CHARACTER*1
+*> Indicates how the vectors which define the elementary
+*> reflectors are stored:
+*> = 'C': Columns
+*> = 'R': Rows
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix B.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix B.
+*> N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The order of the matrix T, i.e. the number of elementary
+*> reflectors whose product defines the block reflector.
+*> K >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+* K >= L >= 0. See Further Details.
+*>
+*> V (input) COMPLEX*16 array, dimension
+*> (LDV,K) if STOREV = 'C'
+*> (LDV,M) if STOREV = 'R' and SIDE = 'L'
+*> (LDV,N) if STOREV = 'R' and SIDE = 'R'
+*> The pentagonal matrix V, which contains the elementary reflectors
+*> H(1), H(2), ..., H(K). See Further Details.
+*>
+*> LDV (input) INTEGER
+*> The leading dimension of the array V.
+*> If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*> if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*> if STOREV = 'R', LDV >= K.
+*>
+*> T (input) COMPLEX*16 array, dimension (LDT,K)
+*> The triangular K-by-K matrix T in the representation of the
+*> block reflector.
+*>
+*> LDT (input) INTEGER
+*> The leading dimension of the array T.
+*> LDT >= K.
+*>
+*> A (input/output) COMPLEX*16 array, dimension
+*> (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
+*> On entry, the K-by-N or M-by-K matrix A.
+*> On exit, A is overwritten by the corresponding block of
+*> H*C or H**H*C or C*H or C*H**H. See Futher Details.
+*>
+*> LDA (input) INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDC >= max(1,K);
+*> If SIDE = 'R', LDC >= max(1,M).
+*>
+*> B (input/output) COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the M-by-N matrix B.
+*> On exit, B is overwritten by the corresponding block of
+*> H*C or H**H*C or C*H or C*H**H. See Further Details.
+*>
+*> LDB (input) INTEGER
+*> The leading dimension of the array B.
+*> LDB >= max(1,M).
+*>
+*> WORK (workspace) COMPLEX*16 array, dimension
+*> (LDWORK,N) if SIDE = 'L',
+*> (LDWORK,K) if SIDE = 'R'.
+*>
+*> LDWORK (input) INTEGER
+*> The leading dimension of the array WORK.
+*> If SIDE = 'L', LDWORK >= K;
+*> if SIDE = 'R', LDWORK >= M.
+*>
+*>
+*> The matrix C is a composite matrix formed from blocks A and B.
+*> The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
+*> and if SIDE = 'L', A is of size K-by-N.
+*>
+*> If SIDE = 'R' and DIRECT = 'F', C = [A B].
+*>
+*> If SIDE = 'L' and DIRECT = 'F', C = [A]
+*> [B].
+*>
+*> If SIDE = 'R' and DIRECT = 'B', C = [B A].
+*>
+*> If SIDE = 'L' and DIRECT = 'B', C = [B]
+*> [A].
+*>
+*> The pentagonal matrix V is composed of a rectangular block V1 and a
+*> trapezoidal block V2. The size of the trapezoidal block is determined by
+*> the parameter L, where 0<=L<=K. If L=K, the V2 block of V is triangular;
+*> if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
+*>
+*> If DIRECT = 'F' and STOREV = 'C': V = [V1]
+*> [V2]
+*> - V2 is upper trapezoidal (first L rows of K-by-K upper triangular)
+*>
+*> If DIRECT = 'F' and STOREV = 'R': V = [V1 V2]
+*>
+*> - V2 is lower trapezoidal (first L columns of K-by-K lower triangular)
+*>
+*> If DIRECT = 'B' and STOREV = 'C': V = [V2]
+*> [V1]
+*> - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
+*>
+*> If DIRECT = 'B' and STOREV = 'R': V = [V2 V1]
+*>
+*> - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
+*>
+*> If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
+*>
+*> If STOREV = 'C' and SIDE = 'R', V is N-by-K with V2 L-by-K.
+*>
+*> If STOREV = 'R' and SIDE = 'L', V is K-by-M with V2 K-by-L.
+*>
+*> If STOREV = 'R' and SIDE = 'R', V is K-by-N with V2 K-by-L.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
$ V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
- IMPLICIT NONE
*
* -- LAPACK auxiliary routine (version 3.x) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- July 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIRECT, SIDE, STOREV, TRANS
@@ -16,149 +223,6 @@
$ V( LDV, * ), WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTPRFB applies a complex "triangular-pentagonal" block reflector H or its
-* conjugate transpose H**H to a complex matrix C, which is composed of two
-* blocks A and B, either from the left or right.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply H or H**H from the Left
-* = 'R': apply H or H**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply H (No transpose)
-* = 'C': apply H**H (Conjugate transpose)
-*
-* DIRECT (input) CHARACTER*1
-* Indicates how H is formed from a product of elementary
-* reflectors
-* = 'F': H = H(1) H(2) . . . H(k) (Forward)
-* = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*
-* STOREV (input) CHARACTER*1
-* Indicates how the vectors which define the elementary
-* reflectors are stored:
-* = 'C': Columns
-* = 'R': Rows
-*
-* M (input) INTEGER
-* The number of rows of the matrix B.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix B.
-* N >= 0.
-*
-* K (input) INTEGER
-* The order of the matrix T, i.e. the number of elementary
-* reflectors whose product defines the block reflector.
-* K >= 0.
-*
-* L (input) INTEGER
-* The order of the trapezoidal part of V.
-* K >= L >= 0. See Further Details.
-*
-* V (input) COMPLEX*16 array, dimension
-* (LDV,K) if STOREV = 'C'
-* (LDV,M) if STOREV = 'R' and SIDE = 'L'
-* (LDV,N) if STOREV = 'R' and SIDE = 'R'
-* The pentagonal matrix V, which contains the elementary reflectors
-* H(1), H(2), ..., H(K). See Further Details.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V.
-* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-* if STOREV = 'R', LDV >= K.
-*
-* T (input) COMPLEX*16 array, dimension (LDT,K)
-* The triangular K-by-K matrix T in the representation of the
-* block reflector.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T.
-* LDT >= K.
-*
-* A (input/output) COMPLEX*16 array, dimension
-* (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
-* On entry, the K-by-N or M-by-K matrix A.
-* On exit, A is overwritten by the corresponding block of
-* H*C or H**H*C or C*H or C*H**H. See Futher Details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDC >= max(1,K);
-* If SIDE = 'R', LDC >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the M-by-N matrix B.
-* On exit, B is overwritten by the corresponding block of
-* H*C or H**H*C or C*H or C*H**H. See Further Details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* LDB >= max(1,M).
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (LDWORK,N) if SIDE = 'L',
-* (LDWORK,K) if SIDE = 'R'.
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* If SIDE = 'L', LDWORK >= K;
-* if SIDE = 'R', LDWORK >= M.
-*
-* Further Details
-* ===============
-*
-* The matrix C is a composite matrix formed from blocks A and B.
-* The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
-* and if SIDE = 'L', A is of size K-by-N.
-*
-* If SIDE = 'R' and DIRECT = 'F', C = [A B].
-*
-* If SIDE = 'L' and DIRECT = 'F', C = [A]
-* [B].
-*
-* If SIDE = 'R' and DIRECT = 'B', C = [B A].
-*
-* If SIDE = 'L' and DIRECT = 'B', C = [B]
-* [A].
-*
-* The pentagonal matrix V is composed of a rectangular block V1 and a
-* trapezoidal block V2. The size of the trapezoidal block is determined by
-* the parameter L, where 0<=L<=K. If L=K, the V2 block of V is triangular;
-* if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
-*
-* If DIRECT = 'F' and STOREV = 'C': V = [V1]
-* [V2]
-* - V2 is upper trapezoidal (first L rows of K-by-K upper triangular)
-*
-* If DIRECT = 'F' and STOREV = 'R': V = [V1 V2]
-*
-* - V2 is lower trapezoidal (first L columns of K-by-K lower triangular)
-*
-* If DIRECT = 'B' and STOREV = 'C': V = [V2]
-* [V1]
-* - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
-*
-* If DIRECT = 'B' and STOREV = 'R': V = [V2 V1]
-*
-* - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
-*
-* If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
-*
-* If STOREV = 'C' and SIDE = 'R', V is N-by-K with V2 L-by-K.
-*
-* If STOREV = 'R' and SIDE = 'L', V is K-by-M with V2 K-by-L.
-*
-* If STOREV = 'R' and SIDE = 'R', V is K-by-N with V2 K-by-L.
-*
* ==========================================================================
*
* .. Parameters ..
diff --git a/SRC/ztprfs.f b/SRC/ztprfs.f
index 6f2c797f..c40f9c14 100644
--- a/SRC/ztprfs.f
+++ b/SRC/ztprfs.f
@@ -1,12 +1,175 @@
+*> \brief \b ZTPRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
+* FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular packed
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by ZTPTRS or some other
+*> means before entering this routine. ZTPRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
$ FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -17,85 +180,6 @@
COMPLEX*16 AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTPRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular packed
-* coefficient matrix.
-*
-* The solution matrix X must be computed by ZTPTRS or some other
-* means before entering this routine. ZTPRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztptri.f b/SRC/ztptri.f
index 42f85cdd..ba931125 100644
--- a/SRC/ztptri.f
+++ b/SRC/ztptri.f
@@ -1,69 +1,128 @@
- SUBROUTINE ZTPTRI( UPLO, DIAG, N, AP, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( * )
-* ..
-*
+*> \brief \b ZTPTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPTRI( UPLO, DIAG, N, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * )
+* ..
+*
* Purpose
* =======
*
-* ZTPTRI computes the inverse of a complex upper or lower triangular
-* matrix A stored in packed format.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPTRI computes the inverse of a complex upper or lower triangular
+*> matrix A stored in packed format.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the upper or lower triangular matrix A, stored
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
-* See below for further details.
-* On exit, the (triangular) inverse of the original matrix, in
-* the same packed storage format.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the upper or lower triangular matrix A, stored
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*((2*n-j)/2) = A(i,j) for j<=i<=n.
+*> See below for further details.
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same packed storage format.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> A triangular matrix A can be transferred to packed storage using one
+*> of the following program segments:
+*>
+*> UPLO = 'U': UPLO = 'L':
+*>
+*> JC = 1 JC = 1
+*> DO 2 J = 1, N DO 2 J = 1, N
+*> DO 1 I = 1, J DO 1 I = J, N
+*> AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
+*> 1 CONTINUE 1 CONTINUE
+*> JC = JC + J JC = JC + N - J + 1
+*> 2 CONTINUE 2 CONTINUE
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTPTRI( UPLO, DIAG, N, AP, INFO )
*
-* A triangular matrix A can be transferred to packed storage using one
-* of the following program segments:
-*
-* UPLO = 'U': UPLO = 'L':
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* JC = 1 JC = 1
-* DO 2 J = 1, N DO 2 J = 1, N
-* DO 1 I = 1, J DO 1 I = J, N
-* AP(JC+I-1) = A(I,J) AP(JC+I-J) = A(I,J)
-* 1 CONTINUE 1 CONTINUE
-* JC = JC + J JC = JC + N - J + 1
-* 2 CONTINUE 2 CONTINUE
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztptrs.f b/SRC/ztptrs.f
index 6de926bb..fb100dd9 100644
--- a/SRC/ztptrs.f
+++ b/SRC/ztptrs.f
@@ -1,9 +1,131 @@
+*> \brief \b ZTPTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPTRS solves a triangular system of the form
+*>
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*>
+*> where A is a triangular matrix of order N stored in packed format,
+*> and B is an N-by-NRHS matrix. A check is made to verify that A is
+*> nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the
+*> solutions X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -13,62 +135,6 @@
COMPLEX*16 AP( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTPTRS solves a triangular system of the form
-*
-* A * X = B, A**T * X = B, or A**H * X = B,
-*
-* where A is a triangular matrix of order N stored in packed format,
-* and B is an N-by-NRHS matrix. A check is made to verify that A is
-* nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the
-* solutions X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztpttf.f b/SRC/ztpttf.f
index 7c37c5cb..2d923ef0 100644
--- a/SRC/ztpttf.f
+++ b/SRC/ztpttf.f
@@ -1,160 +1,217 @@
- SUBROUTINE ZTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
+*> \brief \b ZTPTTF
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* ..
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( 0: * ), ARF( 0: * )
+* Definition
+* ==========
*
+* SUBROUTINE ZTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( 0: * ), ARF( 0: * )
+*
* Purpose
* =======
*
-* ZTPTTF copies a triangular matrix A from standard packed format (TP)
-* to rectangular full packed format (TF).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPTTF copies a triangular matrix A from standard packed format (TP)
+*> to rectangular full packed format (TF).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF in Normal format is wanted;
-* = 'C': ARF in Conjugate-transpose format is wanted.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF in Normal format is wanted;
+*> = 'C': ARF in Conjugate-transpose format is wanted.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \date November 2011
*
-* ARF (output) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( 0: * ), ARF( 0: * )
*
* =====================================================================
*
diff --git a/SRC/ztpttr.f b/SRC/ztpttr.f
index 7fa16dcb..fc5c576a 100644
--- a/SRC/ztpttr.f
+++ b/SRC/ztpttr.f
@@ -1,12 +1,105 @@
- SUBROUTINE ZTPTTR( UPLO, N, AP, A, LDA, INFO )
+*> \brief \b ZTPTTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPTTR( UPLO, N, AP, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AP( * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.3.0) --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPTTR copies a triangular matrix A from standard packed format (TP)
+*> to standard full format (TR).
+*>
+*>\endverbatim
*
-* -- Contributed by Julien Langou of the Univ. of Colorado Denver --
-* November 2010 --
+* Arguments
+* =========
*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular.
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On entry, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( LDA, N )
+*> On exit, the triangular matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE ZTPTTR( UPLO, N, AP, A, LDA, INFO )
+*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,45 +109,6 @@
COMPLEX*16 A( LDA, * ), AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTPTTR copies a triangular matrix A from standard packed format (TP)
-* to standard full format (TR).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular.
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On entry, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* A (output) COMPLEX*16 array, dimension ( LDA, N )
-* On exit, the triangular matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrcon.f b/SRC/ztrcon.f
index 6dc12f7a..55cfa51e 100644
--- a/SRC/ztrcon.f
+++ b/SRC/ztrcon.f
@@ -1,12 +1,138 @@
+*> \brief \b ZTRCON
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, NORM, UPLO
+* INTEGER INFO, LDA, N
+* DOUBLE PRECISION RCOND
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRCON estimates the reciprocal of the condition number of a
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
+*>
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*> RCOND = 1 / ( norm(A) * norm(inv(A)) ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NORM
+*> \verbatim
+*> NORM is CHARACTER*1
+*> Specifies whether the 1-norm condition number or the
+*> infinity-norm condition number is required:
+*> = '1' or 'O': 1-norm;
+*> = 'I': Infinity-norm.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the matrix A,
+*> computed as RCOND = 1/(norm(A) * norm(inv(A))).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
$ RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, NORM, UPLO
@@ -18,62 +144,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRCON estimates the reciprocal of the condition number of a
-* triangular matrix A, in either the 1-norm or the infinity-norm.
-*
-* The norm of A is computed and an estimate is obtained for
-* norm(inv(A)), then the reciprocal of the condition number is
-* computed as
-* RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*
-* Arguments
-* =========
-*
-* NORM (input) CHARACTER*1
-* Specifies whether the 1-norm condition number or the
-* infinity-norm condition number is required:
-* = '1' or 'O': 1-norm;
-* = 'I': Infinity-norm.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of the matrix A,
-* computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrevc.f b/SRC/ztrevc.f
index e74a4179..b06eb430 100644
--- a/SRC/ztrevc.f
+++ b/SRC/ztrevc.f
@@ -1,10 +1,221 @@
+*> \brief \b ZTREVC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+* LDVR, MM, M, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, SIDE
+* INTEGER INFO, LDT, LDVL, LDVR, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTREVC computes some or all of the right and/or left eigenvectors of
+*> a complex upper triangular matrix T.
+*> Matrices of this type are produced by the Schur factorization of
+*> a complex general matrix: A = Q*T*Q**H, as computed by ZHSEQR.
+*>
+*> The right eigenvector x and the left eigenvector y of T corresponding
+*> to an eigenvalue w are defined by:
+*>
+*> T*x = w*x, (y**H)*T = w*(y**H)
+*>
+*> where y**H denotes the conjugate transpose of the vector y.
+*> The eigenvalues are not input to this routine, but are read directly
+*> from the diagonal of T.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
+*> input matrix. If Q is the unitary factor that reduces a matrix A to
+*> Schur form T, then Q*X and Q*Y are the matrices of right and left
+*> eigenvectors of A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'R': compute right eigenvectors only;
+*> = 'L': compute left eigenvectors only;
+*> = 'B': compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute all right and/or left eigenvectors;
+*> = 'B': compute all right and/or left eigenvectors,
+*> backtransformed using the matrices supplied in
+*> VR and/or VL;
+*> = 'S': compute selected right and/or left eigenvectors,
+*> as indicated by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenvectors to be
+*> computed.
+*> The eigenvector corresponding to the j-th eigenvalue is
+*> computed if SELECT(j) = .TRUE..
+*> Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,N)
+*> The upper triangular matrix T. T is modified, but restored
+*> on exit.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,MM)
+*> On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*> contain an N-by-N matrix Q (usually the unitary matrix Q of
+*> Schur vectors returned by ZHSEQR).
+*> On exit, if SIDE = 'L' or 'B', VL contains:
+*> if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
+*> if HOWMNY = 'B', the matrix Q*Y;
+*> if HOWMNY = 'S', the left eigenvectors of T specified by
+*> SELECT, stored consecutively in the columns
+*> of VL, in the same order as their
+*> eigenvalues.
+*> Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL. LDVL >= 1, and if
+*> SIDE = 'L' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,MM)
+*> On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*> contain an N-by-N matrix Q (usually the unitary matrix Q of
+*> Schur vectors returned by ZHSEQR).
+*> On exit, if SIDE = 'R' or 'B', VR contains:
+*> if HOWMNY = 'A', the matrix X of right eigenvectors of T;
+*> if HOWMNY = 'B', the matrix Q*X;
+*> if HOWMNY = 'S', the right eigenvectors of T specified by
+*> SELECT, stored consecutively in the columns
+*> of VR, in the same order as their
+*> eigenvalues.
+*> Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR. LDVR >= 1, and if
+*> SIDE = 'R' or 'B'; LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns in the arrays VL and/or VR actually
+*> used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
+*> is set to N. Each selected eigenvector occupies one
+*> column.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The algorithm used in this program is basically backward (forward)
+*> substitution, with scaling to make the the code robust against
+*> possible overflow.
+*>
+*> Each eigenvector is normalized so that the element of largest
+*> magnitude has magnitude 1; here the magnitude of a complex number
+*> (x,y) is taken to be |x| + |y|.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
$ LDVR, MM, M, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, SIDE
@@ -17,124 +228,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTREVC computes some or all of the right and/or left eigenvectors of
-* a complex upper triangular matrix T.
-* Matrices of this type are produced by the Schur factorization of
-* a complex general matrix: A = Q*T*Q**H, as computed by ZHSEQR.
-*
-* The right eigenvector x and the left eigenvector y of T corresponding
-* to an eigenvalue w are defined by:
-*
-* T*x = w*x, (y**H)*T = w*(y**H)
-*
-* where y**H denotes the conjugate transpose of the vector y.
-* The eigenvalues are not input to this routine, but are read directly
-* from the diagonal of T.
-*
-* This routine returns the matrices X and/or Y of right and left
-* eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
-* input matrix. If Q is the unitary factor that reduces a matrix A to
-* Schur form T, then Q*X and Q*Y are the matrices of right and left
-* eigenvectors of A.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'R': compute right eigenvectors only;
-* = 'L': compute left eigenvectors only;
-* = 'B': compute both right and left eigenvectors.
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute all right and/or left eigenvectors;
-* = 'B': compute all right and/or left eigenvectors,
-* backtransformed using the matrices supplied in
-* VR and/or VL;
-* = 'S': compute selected right and/or left eigenvectors,
-* as indicated by the logical array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenvectors to be
-* computed.
-* The eigenvector corresponding to the j-th eigenvalue is
-* computed if SELECT(j) = .TRUE..
-* Not referenced if HOWMNY = 'A' or 'B'.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) COMPLEX*16 array, dimension (LDT,N)
-* The upper triangular matrix T. T is modified, but restored
-* on exit.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* VL (input/output) COMPLEX*16 array, dimension (LDVL,MM)
-* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-* contain an N-by-N matrix Q (usually the unitary matrix Q of
-* Schur vectors returned by ZHSEQR).
-* On exit, if SIDE = 'L' or 'B', VL contains:
-* if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
-* if HOWMNY = 'B', the matrix Q*Y;
-* if HOWMNY = 'S', the left eigenvectors of T specified by
-* SELECT, stored consecutively in the columns
-* of VL, in the same order as their
-* eigenvalues.
-* Not referenced if SIDE = 'R'.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL. LDVL >= 1, and if
-* SIDE = 'L' or 'B', LDVL >= N.
-*
-* VR (input/output) COMPLEX*16 array, dimension (LDVR,MM)
-* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-* contain an N-by-N matrix Q (usually the unitary matrix Q of
-* Schur vectors returned by ZHSEQR).
-* On exit, if SIDE = 'R' or 'B', VR contains:
-* if HOWMNY = 'A', the matrix X of right eigenvectors of T;
-* if HOWMNY = 'B', the matrix Q*X;
-* if HOWMNY = 'S', the right eigenvectors of T specified by
-* SELECT, stored consecutively in the columns
-* of VR, in the same order as their
-* eigenvalues.
-* Not referenced if SIDE = 'L'.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR. LDVR >= 1, and if
-* SIDE = 'R' or 'B'; LDVR >= N.
-*
-* MM (input) INTEGER
-* The number of columns in the arrays VL and/or VR. MM >= M.
-*
-* M (output) INTEGER
-* The number of columns in the arrays VL and/or VR actually
-* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M
-* is set to N. Each selected eigenvector occupies one
-* column.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The algorithm used in this program is basically backward (forward)
-* substitution, with scaling to make the the code robust against
-* possible overflow.
-*
-* Each eigenvector is normalized so that the element of largest
-* magnitude has magnitude 1; here the magnitude of a complex number
-* (x,y) is taken to be |x| + |y|.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrexc.f b/SRC/ztrexc.f
index e259e122..b1c807df 100644
--- a/SRC/ztrexc.f
+++ b/SRC/ztrexc.f
@@ -1,65 +1,131 @@
- SUBROUTINE ZTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER COMPQ
- INTEGER IFST, ILST, INFO, LDQ, LDT, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 Q( LDQ, * ), T( LDT, * )
-* ..
-*
+*> \brief \b ZTREXC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ
+* INTEGER IFST, ILST, INFO, LDQ, LDT, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 Q( LDQ, * ), T( LDT, * )
+* ..
+*
* Purpose
* =======
*
-* ZTREXC reorders the Schur factorization of a complex matrix
-* A = Q*T*Q**H, so that the diagonal element of T with row index IFST
-* is moved to row ILST.
-*
-* The Schur form T is reordered by a unitary similarity transformation
-* Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by
-* postmultplying it with Z.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTREXC reorders the Schur factorization of a complex matrix
+*> A = Q*T*Q**H, so that the diagonal element of T with row index IFST
+*> is moved to row ILST.
+*>
+*> The Schur form T is reordered by a unitary similarity transformation
+*> Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by
+*> postmultplying it with Z.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* COMPQ (input) CHARACTER*1
-* = 'V': update the matrix Q of Schur vectors;
-* = 'N': do not update Q.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'V': update the matrix Q of Schur vectors;
+*> = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,N)
+*> On entry, the upper triangular matrix T.
+*> On exit, the reordered upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*> On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*> unitary transformation matrix Z which reorders T.
+*> If COMPQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IFST
+*> \verbatim
+*> IFST is INTEGER
+*> \param[in] ILST
+*> \verbatim
+*> ILST is INTEGER
+*> Specify the reordering of the diagonal elements of T:
+*> The element with row index IFST is moved to row ILST by a
+*> sequence of transpositions between adjacent elements.
+*> 1 <= IFST <= N; 1 <= ILST <= N.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* T (input/output) COMPLEX*16 array, dimension (LDT,N)
-* On entry, the upper triangular matrix T.
-* On exit, the reordered upper triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
+*> \date November 2011
*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
-* On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-* On exit, if COMPQ = 'V', Q has been postmultiplied by the
-* unitary transformation matrix Z which reorders T.
-* If COMPQ = 'N', Q is not referenced.
+*> \ingroup complex16OTHERcomputational
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
*
-* IFST (input) INTEGER
-* ILST (input) INTEGER
-* Specify the reordering of the diagonal elements of T:
-* The element with row index IFST is moved to row ILST by a
-* sequence of transpositions between adjacent elements.
-* 1 <= IFST <= N; 1 <= ILST <= N.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER COMPQ
+ INTEGER IFST, ILST, INFO, LDQ, LDT, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 Q( LDQ, * ), T( LDT, * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztrrfs.f b/SRC/ztrrfs.f
index 7ae24020..fbea966e 100644
--- a/SRC/ztrrfs.f
+++ b/SRC/ztrrfs.f
@@ -1,12 +1,183 @@
+*> \brief \b ZTRRFS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
+* LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, LDX, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRRFS provides error bounds and backward error estimates for the
+*> solution to a system of linear equations with a triangular
+*> coefficient matrix.
+*>
+*> The solution matrix X must be computed by ZTRTRS or some other
+*> means before entering this routine. ZTRRFS does not do iterative
+*> refinement because doing so cannot improve the backward error.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bound for each solution vector
+*> X(j) (the j-th column of the solution matrix X).
+*> If XTRUE is the true solution corresponding to X(j), FERR(j)
+*> is an estimated upper bound for the magnitude of the largest
+*> element in (X(j) - XTRUE) divided by the magnitude of the
+*> largest element in X(j). The estimate is as reliable as
+*> the estimate for RCOND, and is almost always a slight
+*> overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector X(j) (i.e., the smallest relative change in
+*> any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
$ LDX, FERR, BERR, WORK, RWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -18,89 +189,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRRFS provides error bounds and backward error estimates for the
-* solution to a system of linear equations with a triangular
-* coefficient matrix.
-*
-* The solution matrix X must be computed by ZTRTRS or some other
-* means before entering this routine. ZTRRFS does not do iterative
-* refinement because doing so cannot improve the backward error.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The solution matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* FERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bound for each solution vector
-* X(j) (the j-th column of the solution matrix X).
-* If XTRUE is the true solution corresponding to X(j), FERR(j)
-* is an estimated upper bound for the magnitude of the largest
-* element in (X(j) - XTRUE) divided by the magnitude of the
-* largest element in X(j). The estimate is as reliable as
-* the estimate for RCOND, and is almost always a slight
-* overestimate of the true error.
-*
-* BERR (output) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector X(j) (i.e., the smallest relative change in
-* any element of A or B that makes X(j) an exact solution).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrsen.f b/SRC/ztrsen.f
index 838d6887..0fa05e56 100644
--- a/SRC/ztrsen.f
+++ b/SRC/ztrsen.f
@@ -1,12 +1,268 @@
+*> \brief \b ZTRSEN
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,
+* SEP, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER COMPQ, JOB
+* INTEGER INFO, LDQ, LDT, LWORK, M, N
+* DOUBLE PRECISION S, SEP
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* COMPLEX*16 Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRSEN reorders the Schur factorization of a complex matrix
+*> A = Q*T*Q**H, so that a selected cluster of eigenvalues appears in
+*> the leading positions on the diagonal of the upper triangular matrix
+*> T, and the leading columns of Q form an orthonormal basis of the
+*> corresponding right invariant subspace.
+*>
+*> Optionally the routine computes the reciprocal condition numbers of
+*> the cluster of eigenvalues and/or the invariant subspace.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for the
+*> cluster of eigenvalues (S) or the invariant subspace (SEP):
+*> = 'N': none;
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for invariant subspace only (SEP);
+*> = 'B': for both eigenvalues and invariant subspace (S and
+*> SEP).
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*> COMPQ is CHARACTER*1
+*> = 'V': update the matrix Q of Schur vectors;
+*> = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> SELECT specifies the eigenvalues in the selected cluster. To
+*> select the j-th eigenvalue, SELECT(j) must be set to .TRUE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,N)
+*> On entry, the upper triangular matrix T.
+*> On exit, T is overwritten by the reordered matrix T, with the
+*> selected eigenvalues as the leading diagonal elements.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*> On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*> unitary transformation matrix which reorders T; the leading M
+*> columns of Q form an orthonormal basis for the specified
+*> invariant subspace.
+*> If COMPQ = 'N', Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q.
+*> LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> The reordered eigenvalues of T, in the same order as they
+*> appear on the diagonal of T.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The dimension of the specified invariant subspace.
+*> 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION
+*> If JOB = 'E' or 'B', S is a lower bound on the reciprocal
+*> condition number for the selected cluster of eigenvalues.
+*> S cannot underestimate the true reciprocal condition number
+*> by more than a factor of sqrt(N). If M = 0 or N, S = 1.
+*> If JOB = 'N' or 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is DOUBLE PRECISION
+*> If JOB = 'V' or 'B', SEP is the estimated reciprocal
+*> condition number of the specified invariant subspace. If
+*> M = 0 or N, SEP = norm(T).
+*> If JOB = 'N' or 'E', SEP is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If JOB = 'N', LWORK >= 1;
+*> if JOB = 'E', LWORK = max(1,M*(N-M));
+*> if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> ZTRSEN first collects the selected eigenvalues by computing a unitary
+*> transformation Z to move them to the top left corner of T. In other
+*> words, the selected eigenvalues are the eigenvalues of T11 in:
+*>
+*> Z**H * T * Z = ( T11 T12 ) n1
+*> ( 0 T22 ) n2
+*> n1 n2
+*>
+*> where N = n1+n2. The first
+*> n1 columns of Z span the specified invariant subspace of T.
+*>
+*> If T has been obtained from the Schur factorization of a matrix
+*> A = Q*T*Q**H, then the reordered Schur factorization of A is given by
+*> A = (Q*Z)*(Z**H*T*Z)*(Q*Z)**H, and the first n1 columns of Q*Z span the
+*> corresponding invariant subspace of A.
+*>
+*> The reciprocal condition number of the average of the eigenvalues of
+*> T11 may be returned in S. S lies between 0 (very badly conditioned)
+*> and 1 (very well conditioned). It is computed as follows. First we
+*> compute R so that
+*>
+*> P = ( I R ) n1
+*> ( 0 0 ) n2
+*> n1 n2
+*>
+*> is the projector on the invariant subspace associated with T11.
+*> R is the solution of the Sylvester equation:
+*>
+*> T11*R - R*T22 = T12.
+*>
+*> Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
+*> the two-norm of M. Then S is computed as the lower bound
+*>
+*> (1 + F-norm(R)**2)**(-1/2)
+*>
+*> on the reciprocal of 2-norm(P), the true reciprocal condition number.
+*> S cannot underestimate 1 / 2-norm(P) by more than a factor of
+*> sqrt(N).
+*>
+*> An approximate error bound for the computed average of the
+*> eigenvalues of T11 is
+*>
+*> EPS * norm(T) / S
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal condition number of the right invariant subspace
+*> spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
+*> SEP is defined as the separation of T11 and T22:
+*>
+*> sep( T11, T22 ) = sigma-min( C )
+*>
+*> where sigma-min(C) is the smallest singular value of the
+*> n1*n2-by-n1*n2 matrix
+*>
+*> C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
+*>
+*> I(m) is an m by m identity matrix, and kprod denotes the Kronecker
+*> product. We estimate sigma-min(C) by the reciprocal of an estimate of
+*> the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
+*> cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
+*>
+*> When SEP is small, small changes in T can cause large changes in
+*> the invariant subspace. An approximate bound on the maximum angular
+*> error in the computed right invariant subspace is
+*>
+*> EPS * norm(T) / SEP
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,
$ SEP, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER COMPQ, JOB
@@ -18,171 +274,6 @@
COMPLEX*16 Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRSEN reorders the Schur factorization of a complex matrix
-* A = Q*T*Q**H, so that a selected cluster of eigenvalues appears in
-* the leading positions on the diagonal of the upper triangular matrix
-* T, and the leading columns of Q form an orthonormal basis of the
-* corresponding right invariant subspace.
-*
-* Optionally the routine computes the reciprocal condition numbers of
-* the cluster of eigenvalues and/or the invariant subspace.
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for the
-* cluster of eigenvalues (S) or the invariant subspace (SEP):
-* = 'N': none;
-* = 'E': for eigenvalues only (S);
-* = 'V': for invariant subspace only (SEP);
-* = 'B': for both eigenvalues and invariant subspace (S and
-* SEP).
-*
-* COMPQ (input) CHARACTER*1
-* = 'V': update the matrix Q of Schur vectors;
-* = 'N': do not update Q.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* SELECT specifies the eigenvalues in the selected cluster. To
-* select the j-th eigenvalue, SELECT(j) must be set to .TRUE..
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input/output) COMPLEX*16 array, dimension (LDT,N)
-* On entry, the upper triangular matrix T.
-* On exit, T is overwritten by the reordered matrix T, with the
-* selected eigenvalues as the leading diagonal elements.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* Q (input/output) COMPLEX*16 array, dimension (LDQ,N)
-* On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-* On exit, if COMPQ = 'V', Q has been postmultiplied by the
-* unitary transformation matrix which reorders T; the leading M
-* columns of Q form an orthonormal basis for the specified
-* invariant subspace.
-* If COMPQ = 'N', Q is not referenced.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q.
-* LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
-*
-* W (output) COMPLEX*16 array, dimension (N)
-* The reordered eigenvalues of T, in the same order as they
-* appear on the diagonal of T.
-*
-* M (output) INTEGER
-* The dimension of the specified invariant subspace.
-* 0 <= M <= N.
-*
-* S (output) DOUBLE PRECISION
-* If JOB = 'E' or 'B', S is a lower bound on the reciprocal
-* condition number for the selected cluster of eigenvalues.
-* S cannot underestimate the true reciprocal condition number
-* by more than a factor of sqrt(N). If M = 0 or N, S = 1.
-* If JOB = 'N' or 'V', S is not referenced.
-*
-* SEP (output) DOUBLE PRECISION
-* If JOB = 'V' or 'B', SEP is the estimated reciprocal
-* condition number of the specified invariant subspace. If
-* M = 0 or N, SEP = norm(T).
-* If JOB = 'N' or 'E', SEP is not referenced.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If JOB = 'N', LWORK >= 1;
-* if JOB = 'E', LWORK = max(1,M*(N-M));
-* if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* ZTRSEN first collects the selected eigenvalues by computing a unitary
-* transformation Z to move them to the top left corner of T. In other
-* words, the selected eigenvalues are the eigenvalues of T11 in:
-*
-* Z**H * T * Z = ( T11 T12 ) n1
-* ( 0 T22 ) n2
-* n1 n2
-*
-* where N = n1+n2. The first
-* n1 columns of Z span the specified invariant subspace of T.
-*
-* If T has been obtained from the Schur factorization of a matrix
-* A = Q*T*Q**H, then the reordered Schur factorization of A is given by
-* A = (Q*Z)*(Z**H*T*Z)*(Q*Z)**H, and the first n1 columns of Q*Z span the
-* corresponding invariant subspace of A.
-*
-* The reciprocal condition number of the average of the eigenvalues of
-* T11 may be returned in S. S lies between 0 (very badly conditioned)
-* and 1 (very well conditioned). It is computed as follows. First we
-* compute R so that
-*
-* P = ( I R ) n1
-* ( 0 0 ) n2
-* n1 n2
-*
-* is the projector on the invariant subspace associated with T11.
-* R is the solution of the Sylvester equation:
-*
-* T11*R - R*T22 = T12.
-*
-* Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
-* the two-norm of M. Then S is computed as the lower bound
-*
-* (1 + F-norm(R)**2)**(-1/2)
-*
-* on the reciprocal of 2-norm(P), the true reciprocal condition number.
-* S cannot underestimate 1 / 2-norm(P) by more than a factor of
-* sqrt(N).
-*
-* An approximate error bound for the computed average of the
-* eigenvalues of T11 is
-*
-* EPS * norm(T) / S
-*
-* where EPS is the machine precision.
-*
-* The reciprocal condition number of the right invariant subspace
-* spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
-* SEP is defined as the separation of T11 and T22:
-*
-* sep( T11, T22 ) = sigma-min( C )
-*
-* where sigma-min(C) is the smallest singular value of the
-* n1*n2-by-n1*n2 matrix
-*
-* C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
-*
-* I(m) is an m by m identity matrix, and kprod denotes the Kronecker
-* product. We estimate sigma-min(C) by the reciprocal of an estimate of
-* the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
-* cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
-*
-* When SEP is small, small changes in T can cause large changes in
-* the invariant subspace. An approximate bound on the maximum angular
-* error in the computed right invariant subspace is
-*
-* EPS * norm(T) / SEP
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrsna.f b/SRC/ztrsna.f
index 06e7f282..b0a7940b 100644
--- a/SRC/ztrsna.f
+++ b/SRC/ztrsna.f
@@ -1,13 +1,252 @@
+*> \brief \b ZTRSNA
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+* LDVR, S, SEP, MM, M, WORK, LDWORK, RWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER HOWMNY, JOB
+* INTEGER INFO, LDT, LDVL, LDVR, LDWORK, M, MM, N
+* ..
+* .. Array Arguments ..
+* LOGICAL SELECT( * )
+* DOUBLE PRECISION RWORK( * ), S( * ), SEP( * )
+* COMPLEX*16 T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRSNA estimates reciprocal condition numbers for specified
+*> eigenvalues and/or right eigenvectors of a complex upper triangular
+*> matrix T (or of any matrix Q*T*Q**H with Q unitary).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER*1
+*> Specifies whether condition numbers are required for
+*> eigenvalues (S) or eigenvectors (SEP):
+*> = 'E': for eigenvalues only (S);
+*> = 'V': for eigenvectors only (SEP);
+*> = 'B': for both eigenvalues and eigenvectors (S and SEP).
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*> HOWMNY is CHARACTER*1
+*> = 'A': compute condition numbers for all eigenpairs;
+*> = 'S': compute condition numbers for selected eigenpairs
+*> specified by the array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*> SELECT is LOGICAL array, dimension (N)
+*> If HOWMNY = 'S', SELECT specifies the eigenpairs for which
+*> condition numbers are required. To select condition numbers
+*> for the j-th eigenpair, SELECT(j) must be set to .TRUE..
+*> If HOWMNY = 'A', SELECT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT,N)
+*> The upper triangular matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,M)
+*> If JOB = 'E' or 'B', VL must contain left eigenvectors of T
+*> (or of any Q*T*Q**H with Q unitary), corresponding to the
+*> eigenpairs specified by HOWMNY and SELECT. The eigenvectors
+*> must be stored in consecutive columns of VL, as returned by
+*> ZHSEIN or ZTREVC.
+*> If JOB = 'V', VL is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> The leading dimension of the array VL.
+*> LDVL >= 1; and if JOB = 'E' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,M)
+*> If JOB = 'E' or 'B', VR must contain right eigenvectors of T
+*> (or of any Q*T*Q**H with Q unitary), corresponding to the
+*> eigenpairs specified by HOWMNY and SELECT. The eigenvectors
+*> must be stored in consecutive columns of VR, as returned by
+*> ZHSEIN or ZTREVC.
+*> If JOB = 'V', VR is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> The leading dimension of the array VR.
+*> LDVR >= 1; and if JOB = 'E' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (MM)
+*> If JOB = 'E' or 'B', the reciprocal condition numbers of the
+*> selected eigenvalues, stored in consecutive elements of the
+*> array. Thus S(j), SEP(j), and the j-th columns of VL and VR
+*> all correspond to the same eigenpair (but not in general the
+*> j-th eigenpair, unless all eigenpairs are selected).
+*> If JOB = 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*> SEP is DOUBLE PRECISION array, dimension (MM)
+*> If JOB = 'V' or 'B', the estimated reciprocal condition
+*> numbers of the selected eigenvectors, stored in consecutive
+*> elements of the array.
+*> If JOB = 'E', SEP is not referenced.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER
+*> The number of elements in the arrays S (if JOB = 'E' or 'B')
+*> and/or SEP (if JOB = 'V' or 'B'). MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*> M is INTEGER
+*> The number of elements of the arrays S and/or SEP actually
+*> used to store the estimated condition numbers.
+*> If HOWMNY = 'A', M is set to N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK,N+6)
+*> If JOB = 'E', WORK is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK.
+*> LDWORK >= 1; and if JOB = 'V' or 'B', LDWORK >= N.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> If JOB = 'E', RWORK is not referenced.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The reciprocal of the condition number of an eigenvalue lambda is
+*> defined as
+*>
+*> S(lambda) = |v**H*u| / (norm(u)*norm(v))
+*>
+*> where u and v are the right and left eigenvectors of T corresponding
+*> to lambda; v**H denotes the conjugate transpose of v, and norm(u)
+*> denotes the Euclidean norm. These reciprocal condition numbers always
+*> lie between zero (very badly conditioned) and one (very well
+*> conditioned). If n = 1, S(lambda) is defined to be 1.
+*>
+*> An approximate error bound for a computed eigenvalue W(i) is given by
+*>
+*> EPS * norm(T) / S(i)
+*>
+*> where EPS is the machine precision.
+*>
+*> The reciprocal of the condition number of the right eigenvector u
+*> corresponding to lambda is defined as follows. Suppose
+*>
+*> T = ( lambda c )
+*> ( 0 T22 )
+*>
+*> Then the reciprocal condition number is
+*>
+*> SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
+*>
+*> where sigma-min denotes the smallest singular value. We approximate
+*> the smallest singular value by the reciprocal of an estimate of the
+*> one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is
+*> defined to be abs(T(1,1)).
+*>
+*> An approximate error bound for a computed right eigenvector VR(i)
+*> is given by
+*>
+*> EPS * norm(T) / SEP(i)
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
$ LDVR, S, SEP, MM, M, WORK, LDWORK, RWORK,
$ INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH.
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER HOWMNY, JOB
@@ -20,144 +259,6 @@
$ WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRSNA estimates reciprocal condition numbers for specified
-* eigenvalues and/or right eigenvectors of a complex upper triangular
-* matrix T (or of any matrix Q*T*Q**H with Q unitary).
-*
-* Arguments
-* =========
-*
-* JOB (input) CHARACTER*1
-* Specifies whether condition numbers are required for
-* eigenvalues (S) or eigenvectors (SEP):
-* = 'E': for eigenvalues only (S);
-* = 'V': for eigenvectors only (SEP);
-* = 'B': for both eigenvalues and eigenvectors (S and SEP).
-*
-* HOWMNY (input) CHARACTER*1
-* = 'A': compute condition numbers for all eigenpairs;
-* = 'S': compute condition numbers for selected eigenpairs
-* specified by the array SELECT.
-*
-* SELECT (input) LOGICAL array, dimension (N)
-* If HOWMNY = 'S', SELECT specifies the eigenpairs for which
-* condition numbers are required. To select condition numbers
-* for the j-th eigenpair, SELECT(j) must be set to .TRUE..
-* If HOWMNY = 'A', SELECT is not referenced.
-*
-* N (input) INTEGER
-* The order of the matrix T. N >= 0.
-*
-* T (input) COMPLEX*16 array, dimension (LDT,N)
-* The upper triangular matrix T.
-*
-* LDT (input) INTEGER
-* The leading dimension of the array T. LDT >= max(1,N).
-*
-* VL (input) COMPLEX*16 array, dimension (LDVL,M)
-* If JOB = 'E' or 'B', VL must contain left eigenvectors of T
-* (or of any Q*T*Q**H with Q unitary), corresponding to the
-* eigenpairs specified by HOWMNY and SELECT. The eigenvectors
-* must be stored in consecutive columns of VL, as returned by
-* ZHSEIN or ZTREVC.
-* If JOB = 'V', VL is not referenced.
-*
-* LDVL (input) INTEGER
-* The leading dimension of the array VL.
-* LDVL >= 1; and if JOB = 'E' or 'B', LDVL >= N.
-*
-* VR (input) COMPLEX*16 array, dimension (LDVR,M)
-* If JOB = 'E' or 'B', VR must contain right eigenvectors of T
-* (or of any Q*T*Q**H with Q unitary), corresponding to the
-* eigenpairs specified by HOWMNY and SELECT. The eigenvectors
-* must be stored in consecutive columns of VR, as returned by
-* ZHSEIN or ZTREVC.
-* If JOB = 'V', VR is not referenced.
-*
-* LDVR (input) INTEGER
-* The leading dimension of the array VR.
-* LDVR >= 1; and if JOB = 'E' or 'B', LDVR >= N.
-*
-* S (output) DOUBLE PRECISION array, dimension (MM)
-* If JOB = 'E' or 'B', the reciprocal condition numbers of the
-* selected eigenvalues, stored in consecutive elements of the
-* array. Thus S(j), SEP(j), and the j-th columns of VL and VR
-* all correspond to the same eigenpair (but not in general the
-* j-th eigenpair, unless all eigenpairs are selected).
-* If JOB = 'V', S is not referenced.
-*
-* SEP (output) DOUBLE PRECISION array, dimension (MM)
-* If JOB = 'V' or 'B', the estimated reciprocal condition
-* numbers of the selected eigenvectors, stored in consecutive
-* elements of the array.
-* If JOB = 'E', SEP is not referenced.
-*
-* MM (input) INTEGER
-* The number of elements in the arrays S (if JOB = 'E' or 'B')
-* and/or SEP (if JOB = 'V' or 'B'). MM >= M.
-*
-* M (output) INTEGER
-* The number of elements of the arrays S and/or SEP actually
-* used to store the estimated condition numbers.
-* If HOWMNY = 'A', M is set to N.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,N+6)
-* If JOB = 'E', WORK is not referenced.
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK.
-* LDWORK >= 1; and if JOB = 'V' or 'B', LDWORK >= N.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-* If JOB = 'E', RWORK is not referenced.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
-* Further Details
-* ===============
-*
-* The reciprocal of the condition number of an eigenvalue lambda is
-* defined as
-*
-* S(lambda) = |v**H*u| / (norm(u)*norm(v))
-*
-* where u and v are the right and left eigenvectors of T corresponding
-* to lambda; v**H denotes the conjugate transpose of v, and norm(u)
-* denotes the Euclidean norm. These reciprocal condition numbers always
-* lie between zero (very badly conditioned) and one (very well
-* conditioned). If n = 1, S(lambda) is defined to be 1.
-*
-* An approximate error bound for a computed eigenvalue W(i) is given by
-*
-* EPS * norm(T) / S(i)
-*
-* where EPS is the machine precision.
-*
-* The reciprocal of the condition number of the right eigenvector u
-* corresponding to lambda is defined as follows. Suppose
-*
-* T = ( lambda c )
-* ( 0 T22 )
-*
-* Then the reciprocal condition number is
-*
-* SEP( lambda, T22 ) = sigma-min( T22 - lambda*I )
-*
-* where sigma-min denotes the smallest singular value. We approximate
-* the smallest singular value by the reciprocal of an estimate of the
-* one-norm of the inverse of T22 - lambda*I. If n = 1, SEP(1) is
-* defined to be abs(T(1,1)).
-*
-* An approximate error bound for a computed right eigenvector VR(i)
-* is given by
-*
-* EPS * norm(T) / SEP(i)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrsyl.f b/SRC/ztrsyl.f
index af93b424..3962d7bb 100644
--- a/SRC/ztrsyl.f
+++ b/SRC/ztrsyl.f
@@ -1,10 +1,158 @@
+*> \brief \b ZTRSYL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
+* LDC, SCALE, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANA, TRANB
+* INTEGER INFO, ISGN, LDA, LDB, LDC, M, N
+* DOUBLE PRECISION SCALE
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRSYL solves the complex Sylvester matrix equation:
+*>
+*> op(A)*X + X*op(B) = scale*C or
+*> op(A)*X - X*op(B) = scale*C,
+*>
+*> where op(A) = A or A**H, and A and B are both upper triangular. A is
+*> M-by-M and B is N-by-N; the right hand side C and the solution X are
+*> M-by-N; and scale is an output scale factor, set <= 1 to avoid
+*> overflow in X.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANA
+*> \verbatim
+*> TRANA is CHARACTER*1
+*> Specifies the option op(A):
+*> = 'N': op(A) = A (No transpose)
+*> = 'C': op(A) = A**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANB
+*> \verbatim
+*> TRANB is CHARACTER*1
+*> Specifies the option op(B):
+*> = 'N': op(B) = B (No transpose)
+*> = 'C': op(B) = B**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] ISGN
+*> \verbatim
+*> ISGN is INTEGER
+*> Specifies the sign in the equation:
+*> = +1: solve op(A)*X + X*op(B) = scale*C
+*> = -1: solve op(A)*X - X*op(B) = scale*C
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the matrix A, and the number of rows in the
+*> matrices X and C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B, and the number of columns in the
+*> matrices X and C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,M)
+*> The upper triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> The upper triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N right hand side matrix C.
+*> On exit, C is overwritten by the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M)
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scale factor, scale, set <= 1 to avoid overflow in X.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> = 1: A and B have common or very close eigenvalues; perturbed
+*> values were used to solve the equation (but the matrices
+*> A and B are unchanged).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16SYcomputational
+*
+* =====================================================================
SUBROUTINE ZTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
$ LDC, SCALE, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANA, TRANB
@@ -15,74 +163,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRSYL solves the complex Sylvester matrix equation:
-*
-* op(A)*X + X*op(B) = scale*C or
-* op(A)*X - X*op(B) = scale*C,
-*
-* where op(A) = A or A**H, and A and B are both upper triangular. A is
-* M-by-M and B is N-by-N; the right hand side C and the solution X are
-* M-by-N; and scale is an output scale factor, set <= 1 to avoid
-* overflow in X.
-*
-* Arguments
-* =========
-*
-* TRANA (input) CHARACTER*1
-* Specifies the option op(A):
-* = 'N': op(A) = A (No transpose)
-* = 'C': op(A) = A**H (Conjugate transpose)
-*
-* TRANB (input) CHARACTER*1
-* Specifies the option op(B):
-* = 'N': op(B) = B (No transpose)
-* = 'C': op(B) = B**H (Conjugate transpose)
-*
-* ISGN (input) INTEGER
-* Specifies the sign in the equation:
-* = +1: solve op(A)*X + X*op(B) = scale*C
-* = -1: solve op(A)*X - X*op(B) = scale*C
-*
-* M (input) INTEGER
-* The order of the matrix A, and the number of rows in the
-* matrices X and C. M >= 0.
-*
-* N (input) INTEGER
-* The order of the matrix B, and the number of columns in the
-* matrices X and C. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,M)
-* The upper triangular matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,N)
-* The upper triangular matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N right hand side matrix C.
-* On exit, C is overwritten by the solution matrix X.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M)
-*
-* SCALE (output) DOUBLE PRECISION
-* The scale factor, scale, set <= 1 to avoid overflow in X.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* = 1: A and B have common or very close eigenvalues; perturbed
-* values were used to solve the equation (but the matrices
-* A and B are unchanged).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrti2.f b/SRC/ztrti2.f
index 0cf8c2af..d6843e1c 100644
--- a/SRC/ztrti2.f
+++ b/SRC/ztrti2.f
@@ -1,9 +1,112 @@
+*> \brief \b ZTRTI2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRTI2( UPLO, DIAG, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRTI2 computes the inverse of a complex upper or lower triangular
+*> matrix.
+*>
+*> This is the Level 2 BLAS version of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading n by n upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading n by n lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced. If DIAG = 'U', the
+*> diagonal elements of A are also not referenced and are
+*> assumed to be 1.
+*> \endverbatim
+*> \verbatim
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTRTI2( UPLO, DIAG, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,51 +116,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRTI2 computes the inverse of a complex upper or lower triangular
-* matrix.
-*
-* This is the Level 2 BLAS version of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading n by n upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading n by n lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced. If DIAG = 'U', the
-* diagonal elements of A are also not referenced and are
-* assumed to be 1.
-*
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrtri.f b/SRC/ztrtri.f
index 8b193f0c..7d9c41e0 100644
--- a/SRC/ztrtri.f
+++ b/SRC/ztrtri.f
@@ -1,9 +1,110 @@
+*> \brief \b ZTRTRI
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRTRI( UPLO, DIAG, N, A, LDA, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRTRI computes the inverse of a complex upper or lower triangular
+*> matrix A.
+*>
+*> This is the Level 3 BLAS version of the algorithm.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced. If DIAG = 'U', the
+*> diagonal elements of A are also not referenced and are
+*> assumed to be 1.
+*> On exit, the (triangular) inverse of the original matrix, in
+*> the same storage format.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, A(i,i) is exactly zero. The triangular
+*> matrix is singular and its inverse can not be computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTRTRI( UPLO, DIAG, N, A, LDA, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,50 +114,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRTRI computes the inverse of a complex upper or lower triangular
-* matrix A.
-*
-* This is the Level 3 BLAS version of the algorithm.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced. If DIAG = 'U', the
-* diagonal elements of A are also not referenced and are
-* assumed to be 1.
-* On exit, the (triangular) inverse of the original matrix, in
-* the same storage format.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, A(i,i) is exactly zero. The triangular
-* matrix is singular and its inverse can not be computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrtrs.f b/SRC/ztrtrs.f
index d63f3448..33dd3b55 100644
--- a/SRC/ztrtrs.f
+++ b/SRC/ztrtrs.f
@@ -1,10 +1,141 @@
+*> \brief \b ZTRTRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRTRS solves a triangular system of the form
+*>
+*> A * X = B, A**T * X = B, or A**H * X = B,
+*>
+*> where A is a triangular matrix of order N, and B is an N-by-NRHS
+*> matrix. A check is made to verify that A is nonsingular.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> = 'N': A is non-unit triangular;
+*> = 'U': A is unit triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrix B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N-by-N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N-by-N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side matrix B.
+*> On exit, if INFO = 0, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: if INFO = i, the i-th diagonal element of A is zero,
+*> indicating that the matrix is singular and the solutions
+*> X have not been computed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
$ INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,67 +145,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRTRS solves a triangular system of the form
-*
-* A * X = B, A**T * X = B, or A**H * X = B,
-*
-* where A is a triangular matrix of order N, and B is an N-by-NRHS
-* matrix. A check is made to verify that A is nonsingular.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* = 'N': A is non-unit triangular;
-* = 'U': A is unit triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrix B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N-by-N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N-by-N lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side matrix B.
-* On exit, if INFO = 0, the solution matrix X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: if INFO = i, the i-th diagonal element of A is zero,
-* indicating that the matrix is singular and the solutions
-* X have not been computed.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztrttf.f b/SRC/ztrttf.f
index 56816098..a7116f1c 100644
--- a/SRC/ztrttf.f
+++ b/SRC/ztrttf.f
@@ -1,165 +1,227 @@
- SUBROUTINE ZTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- April 2011 --
-*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* .. Scalar Arguments ..
- CHARACTER TRANSR, UPLO
- INTEGER INFO, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( 0: LDA-1, 0: * ), ARF( 0: * )
-* ..
-*
+*> \brief \b ZTRTTF
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSR, UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
+*
* Purpose
* =======
*
-* ZTRTTF copies a triangular matrix A from standard full format (TR)
-* to rectangular full packed format (TF) .
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRTTF copies a triangular matrix A from standard full format (TR)
+*> to rectangular full packed format (TF) .
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANSR (input) CHARACTER*1
-* = 'N': ARF in Normal mode is wanted;
-* = 'C': ARF in Conjugate Transpose mode is wanted;
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] TRANSR
+*> \verbatim
+*> TRANSR is CHARACTER*1
+*> = 'N': ARF in Normal mode is wanted;
+*> = 'C': ARF in Conjugate Transpose mode is wanted;
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( LDA, N )
+*> On entry, the triangular matrix A. If UPLO = 'U', the
+*> leading N-by-N upper triangular part of the array A contains
+*> the upper triangular matrix, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of the array A contains
+*> the lower triangular matrix, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the matrix A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A stored in
+*> RFP format. For a further discussion see Notes below.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension ( LDA, N )
-* On entry, the triangular matrix A. If UPLO = 'U', the
-* leading N-by-N upper triangular part of the array A contains
-* the upper triangular matrix, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of the array A contains
-* the lower triangular matrix, and the strictly upper
-* triangular part of A is not referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the matrix A. LDA >= max(1,N).
+*> \date November 2011
*
-* ARF (output) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A stored in
-* RFP format. For a further discussion see Notes below.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> We first consider Standard Packed Format when N is even.
+*> We give an example where N = 6.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 05 00
+*> 11 12 13 14 15 10 11
+*> 22 23 24 25 20 21 22
+*> 33 34 35 30 31 32 33
+*> 44 45 40 41 42 43 44
+*> 55 50 51 52 53 54 55
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(4:6,0:2) consists of
+*> conjugate-transpose of the first three columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:2,0:2) consists of
+*> conjugate-transpose of the last three columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N even and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- -- --
+*> 03 04 05 33 43 53
+*> -- --
+*> 13 14 15 00 44 54
+*> --
+*> 23 24 25 10 11 55
+*>
+*> 33 34 35 20 21 22
+*> --
+*> 00 44 45 30 31 32
+*> -- --
+*> 01 11 55 40 41 42
+*> -- -- --
+*> 02 12 22 50 51 52
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 00 01 02 33 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 11 12 43 44 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- -- --
+*> 05 15 25 35 45 55 22 53 54 55 22 32 42 52
+*>
+*>
+*> We next consider Standard Packed Format when N is odd.
+*> We give an example where N = 5.
+*>
+*> AP is Upper AP is Lower
+*>
+*> 00 01 02 03 04 00
+*> 11 12 13 14 10 11
+*> 22 23 24 20 21 22
+*> 33 34 30 31 32 33
+*> 44 40 41 42 43 44
+*>
+*>
+*> Let TRANSR = 'N'. RFP holds AP as follows:
+*> For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
+*> three columns of AP upper. The lower triangle A(3:4,0:1) consists of
+*> conjugate-transpose of the first two columns of AP upper.
+*> For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
+*> three columns of AP lower. The upper triangle A(0:1,1:2) consists of
+*> conjugate-transpose of the last two columns of AP lower.
+*> To denote conjugate we place -- above the element. This covers the
+*> case N odd and TRANSR = 'N'.
+*>
+*> RFP A RFP A
+*>
+*> -- --
+*> 02 03 04 00 33 43
+*> --
+*> 12 13 14 10 11 44
+*>
+*> 22 23 24 20 21 22
+*> --
+*> 00 33 34 30 31 32
+*> -- --
+*> 01 11 44 40 41 42
+*>
+*> Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
+*> transpose of RFP A above. One therefore gets:
+*>
+*>
+*> RFP A RFP A
+*>
+*> -- -- -- -- -- -- -- -- --
+*> 02 12 22 00 01 00 10 20 30 40 50
+*> -- -- -- -- -- -- -- -- --
+*> 03 13 23 33 11 33 11 21 31 41 51
+*> -- -- -- -- -- -- -- -- --
+*> 04 14 24 34 44 43 44 22 32 42 52
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
*
-* We first consider Standard Packed Format when N is even.
-* We give an example where N = 6.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 05 00
-* 11 12 13 14 15 10 11
-* 22 23 24 25 20 21 22
-* 33 34 35 30 31 32 33
-* 44 45 40 41 42 43 44
-* 55 50 51 52 53 54 55
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:5,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(4:6,0:2) consists of
-* conjugate-transpose of the first three columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(1:6,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:2,0:2) consists of
-* conjugate-transpose of the last three columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N even and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- -- --
-* 03 04 05 33 43 53
-* -- --
-* 13 14 15 00 44 54
-* --
-* 23 24 25 10 11 55
-*
-* 33 34 35 20 21 22
-* --
-* 00 44 45 30 31 32
-* -- --
-* 01 11 55 40 41 42
-* -- -- --
-* 02 12 22 50 51 52
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
-*
-* -- -- -- -- -- -- -- -- -- --
-* 03 13 23 33 00 01 02 33 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 11 12 43 44 11 21 31 41 51
-* -- -- -- -- -- -- -- -- -- --
-* 05 15 25 35 45 55 22 53 54 55 22 32 42 52
-*
-*
-* We next consider Standard Packed Format when N is odd.
-* We give an example where N = 5.
-*
-* AP is Upper AP is Lower
-*
-* 00 01 02 03 04 00
-* 11 12 13 14 10 11
-* 22 23 24 20 21 22
-* 33 34 30 31 32 33
-* 44 40 41 42 43 44
-*
-*
-* Let TRANSR = 'N'. RFP holds AP as follows:
-* For UPLO = 'U' the upper trapezoid A(0:4,0:2) consists of the last
-* three columns of AP upper. The lower triangle A(3:4,0:1) consists of
-* conjugate-transpose of the first two columns of AP upper.
-* For UPLO = 'L' the lower trapezoid A(0:4,0:2) consists of the first
-* three columns of AP lower. The upper triangle A(0:1,1:2) consists of
-* conjugate-transpose of the last two columns of AP lower.
-* To denote conjugate we place -- above the element. This covers the
-* case N odd and TRANSR = 'N'.
-*
-* RFP A RFP A
-*
-* -- --
-* 02 03 04 00 33 43
-* --
-* 12 13 14 10 11 44
-*
-* 22 23 24 20 21 22
-* --
-* 00 33 34 30 31 32
-* -- --
-* 01 11 44 40 41 42
-*
-* Now let TRANSR = 'C'. RFP A in both UPLO cases is just the conjugate-
-* transpose of RFP A above. One therefore gets:
-*
-*
-* RFP A RFP A
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* -- -- -- -- -- -- -- -- --
-* 02 12 22 00 01 00 10 20 30 40 50
-* -- -- -- -- -- -- -- -- --
-* 03 13 23 33 11 33 11 21 31 41 51
-* -- -- -- -- -- -- -- -- --
-* 04 14 24 34 44 43 44 22 32 42 52
+* .. Scalar Arguments ..
+ CHARACTER TRANSR, UPLO
+ INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( 0: LDA-1, 0: * ), ARF( 0: * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztrttp.f b/SRC/ztrttp.f
index 6128ba85..b99b4367 100644
--- a/SRC/ztrttp.f
+++ b/SRC/ztrttp.f
@@ -1,13 +1,105 @@
- SUBROUTINE ZTRTTP( UPLO, N, A, LDA, AP, INFO )
+*> \brief \b ZTRTTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRTTP( UPLO, N, A, LDA, AP, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AP( * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK routine (version 3.3.0) --
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRTTP copies a triangular matrix A from full format (TR) to standard
+*> packed format (TP).
+*>
+*>\endverbatim
*
-* -- Contributed by Fred Gustavson of the IBM Watson Research Center --
-* -- and Julien Langou of the Univ. of Colorado Denver --
-* November 2010 --
+* Arguments
+* =========
*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': A is upper triangular;
+*> = 'L': A is lower triangular.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrices AP and A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the triangular matrix A. If UPLO = 'U', the leading
+*> N-by-N upper triangular part of A contains the upper
+*> triangular part of the matrix A, and the strictly lower
+*> triangular part of A is not referenced. If UPLO = 'L', the
+*> leading N-by-N lower triangular part of A contains the lower
+*> triangular part of the matrix A, and the strictly upper
+*> triangular part of A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension ( N*(N+1)/2 ),
+*> On exit, the upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
+ SUBROUTINE ZTRTTP( UPLO, N, A, LDA, AP, INFO )
+*
+* -- LAPACK computational routine (version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -17,45 +109,6 @@
COMPLEX*16 A( LDA, * ), AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRTTP copies a triangular matrix A from full format (TR) to standard
-* packed format (TP).
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* = 'U': A is upper triangular;
-* = 'L': A is lower triangular.
-*
-* N (input) INTEGER
-* The order of the matrices AP and A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the triangular matrix A. If UPLO = 'U', the leading
-* N-by-N upper triangular part of A contains the upper
-* triangular part of the matrix A, and the strictly lower
-* triangular part of A is not referenced. If UPLO = 'L', the
-* leading N-by-N lower triangular part of A contains the lower
-* triangular part of the matrix A, and the strictly upper
-* triangular part of A is not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AP (output) COMPLEX*16 array, dimension ( N*(N+1)/2 ),
-* On exit, the upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/ztzrqf.f b/SRC/ztzrqf.f
index df6382a0..20e7db7a 100644
--- a/SRC/ztzrqf.f
+++ b/SRC/ztzrqf.f
@@ -1,87 +1,148 @@
- SUBROUTINE ZTZRQF( M, N, A, LDA, TAU, INFO )
+*> \brief \b ZTZRQF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZTZRQF( M, N, A, LDA, TAU, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * )
+* ..
+*
* Purpose
* =======
*
-* This routine is deprecated and has been replaced by routine ZTZRZF.
-*
-* ZTZRQF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
-* to upper triangular form by means of unitary transformations.
-*
-* The upper trapezoidal matrix A is factored as
-*
-* A = ( R 0 ) * Z,
-*
-* where Z is an N-by-N unitary matrix and R is an M-by-M upper
-* triangular matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This routine is deprecated and has been replaced by routine ZTZRZF.
+*>
+*> ZTZRQF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
+*> to upper triangular form by means of unitary transformations.
+*>
+*> The upper trapezoidal matrix A is factored as
+*>
+*> A = ( R 0 ) * Z,
+*>
+*> where Z is an N-by-N unitary matrix and R is an M-by-M upper
+*> triangular matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements M+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> unitary matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements M+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* unitary matrix Z as a product of M elementary reflectors.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* TAU (output) COMPLEX*16 array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), whose conjugate transpose is used to
+*> introduce zeros into the (m - k + 1)th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an ( n - m ) element vector.
+*> tau and z( k ) are chosen to annihilate the elements of the kth row
+*> of X.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A, such that the elements of z( k ) are
+*> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTZRQF( M, N, A, LDA, TAU, INFO )
*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), whose conjugate transpose is used to
-* introduce zeros into the (m - k + 1)th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an ( n - m ) element vector.
-* tau and z( k ) are chosen to annihilate the elements of the kth row
-* of X.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A, such that the elements of z( k ) are
-* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/ztzrzf.f b/SRC/ztzrzf.f
index 90d9dbfe..97fa9f23 100644
--- a/SRC/ztzrzf.f
+++ b/SRC/ztzrzf.f
@@ -1,102 +1,169 @@
- SUBROUTINE ZTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZTZRZF
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-* @precisions normal z -> s d c
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZTZRZF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
-* to upper triangular form by means of unitary transformations.
-*
-* The upper trapezoidal matrix A is factored as
-*
-* A = ( R 0 ) * Z,
-*
-* where Z is an N-by-N unitary matrix and R is an M-by-M upper
-* triangular matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTZRZF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
+*> to upper triangular form by means of unitary transformations.
+*>
+*> The upper trapezoidal matrix A is factored as
+*>
+*> A = ( R 0 ) * Z,
+*>
+*> where Z is an N-by-N unitary matrix and R is an M-by-M upper
+*> triangular matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the leading M-by-N upper trapezoidal part of the
-* array A must contain the matrix to be factorized.
-* On exit, the leading M-by-M upper triangular part of A
-* contains the upper triangular matrix R, and elements M+1 to
-* N of the first M rows of A, with the array TAU, represent the
-* unitary matrix Z as a product of M elementary reflectors.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* TAU (output) COMPLEX*16 array, dimension (M)
-* The scalar factors of the elementary reflectors.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the leading M-by-N upper trapezoidal part of the
+*> array A must contain the matrix to be factorized.
+*> On exit, the leading M-by-M upper triangular part of A
+*> contains the upper triangular matrix R, and elements M+1 to
+*> N of the first M rows of A, with the array TAU, represent the
+*> unitary matrix Z as a product of M elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+*> \date November 2011
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> The factorization is obtained by Householder's method. The kth
+*> transformation matrix, Z( k ), which is used to introduce zeros into
+*> the ( m - k + 1 )th row of A, is given in the form
+*>
+*> Z( k ) = ( I 0 ),
+*> ( 0 T( k ) )
+*>
+*> where
+*>
+*> T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
+*> ( 0 )
+*> ( z( k ) )
+*>
+*> tau is a scalar and z( k ) is an ( n - m ) element vector.
+*> tau and z( k ) are chosen to annihilate the elements of the kth row
+*> of X.
+*>
+*> The scalar tau is returned in the kth element of TAU and the vector
+*> u( k ) in the kth row of A, such that the elements of z( k ) are
+*> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
+*> the upper triangular part of A.
+*>
+*> Z is given by
+*>
+*> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*
-* The factorization is obtained by Householder's method. The kth
-* transformation matrix, Z( k ), which is used to introduce zeros into
-* the ( m - k + 1 )th row of A, is given in the form
-*
-* Z( k ) = ( I 0 ),
-* ( 0 T( k ) )
-*
-* where
-*
-* T( k ) = I - tau*u( k )*u( k )**H, u( k ) = ( 1 ),
-* ( 0 )
-* ( z( k ) )
-*
-* tau is a scalar and z( k ) is an ( n - m ) element vector.
-* tau and z( k ) are chosen to annihilate the elements of the kth row
-* of X.
-*
-* The scalar tau is returned in the kth element of TAU and the vector
-* u( k ) in the kth row of A, such that the elements of z( k ) are
-* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
-* the upper triangular part of A.
-*
-* Z is given by
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunbdb.f b/SRC/zunbdb.f
index 57871985..03cb2439 100644
--- a/SRC/zunbdb.f
+++ b/SRC/zunbdb.f
@@ -1,15 +1,291 @@
+*> \brief \b ZUNBDB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
+* X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
+* TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIGNS, TRANS
+* INTEGER INFO, LDX11, LDX12, LDX21, LDX22, LWORK, M, P,
+* $ Q
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION PHI( * ), THETA( * )
+* COMPLEX*16 TAUP1( * ), TAUP2( * ), TAUQ1( * ), TAUQ2( * ),
+* $ WORK( * ), X11( LDX11, * ), X12( LDX12, * ),
+* $ X21( LDX21, * ), X22( LDX22, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNBDB simultaneously bidiagonalizes the blocks of an M-by-M
+*> partitioned unitary matrix X:
+*>
+*> [ B11 | B12 0 0 ]
+*> [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**H
+*> X = [-----------] = [---------] [----------------] [---------] .
+*> [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
+*> [ 0 | 0 0 I ]
+*>
+*> X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
+*> not the case, then X must be transposed and/or permuted. This can be
+*> done in constant time using the TRANS and SIGNS options. See ZUNCSD
+*> for details.)
+*>
+*> The unitary matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
+*> (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
+*> represented implicitly by Householder vectors.
+*>
+*> B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
+*> implicitly by angles THETA, PHI.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] SIGNS
+*> \verbatim
+*> SIGNS is CHARACTER
+*> = 'O': The lower-left block is made nonpositive (the
+*> "other" convention);
+*> otherwise: The upper-right block is made nonpositive (the
+*> "default" convention).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in X11 and X12. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in X11 and X21. 0 <= Q <=
+*> MIN(P,M-P,M-Q).
+*> \endverbatim
+*>
+*> \param[in,out] X11
+*> \verbatim
+*> X11 is COMPLEX*16 array, dimension (LDX11,Q)
+*> On entry, the top-left block of the unitary matrix to be
+*> reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the columns of tril(X11) specify reflectors for P1,
+*> the rows of triu(X11,1) specify reflectors for Q1;
+*> else TRANS = 'T', and
+*> the rows of triu(X11) specify reflectors for P1,
+*> the columns of tril(X11,-1) specify reflectors for Q1.
+*> \endverbatim
+*>
+*> \param[in] LDX11
+*> \verbatim
+*> LDX11 is INTEGER
+*> The leading dimension of X11. If TRANS = 'N', then LDX11 >=
+*> P; else LDX11 >= Q.
+*> \endverbatim
+*>
+*> \param[in,out] X12
+*> \verbatim
+*> X12 is COMPLEX*16 array, dimension (LDX12,M-Q)
+*> On entry, the top-right block of the unitary matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the rows of triu(X12) specify the first P reflectors for
+*> Q2;
+*> else TRANS = 'T', and
+*> the columns of tril(X12) specify the first P reflectors
+*> for Q2.
+*> \endverbatim
+*>
+*> \param[in] LDX12
+*> \verbatim
+*> LDX12 is INTEGER
+*> The leading dimension of X12. If TRANS = 'N', then LDX12 >=
+*> P; else LDX11 >= M-Q.
+*> \endverbatim
+*>
+*> \param[in,out] X21
+*> \verbatim
+*> X21 is COMPLEX*16 array, dimension (LDX21,Q)
+*> On entry, the bottom-left block of the unitary matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the columns of tril(X21) specify reflectors for P2;
+*> else TRANS = 'T', and
+*> the rows of triu(X21) specify reflectors for P2.
+*> \endverbatim
+*>
+*> \param[in] LDX21
+*> \verbatim
+*> LDX21 is INTEGER
+*> The leading dimension of X21. If TRANS = 'N', then LDX21 >=
+*> M-P; else LDX21 >= Q.
+*> \endverbatim
+*>
+*> \param[in,out] X22
+*> \verbatim
+*> X22 is COMPLEX*16 array, dimension (LDX22,M-Q)
+*> On entry, the bottom-right block of the unitary matrix to
+*> be reduced. On exit, the form depends on TRANS:
+*> If TRANS = 'N', then
+*> the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
+*> M-P-Q reflectors for Q2,
+*> else TRANS = 'T', and
+*> the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
+*> M-P-Q reflectors for P2.
+*> \endverbatim
+*>
+*> \param[in] LDX22
+*> \verbatim
+*> LDX22 is INTEGER
+*> The leading dimension of X22. If TRANS = 'N', then LDX22 >=
+*> M-P; else LDX22 >= M-Q.
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension (Q)
+*> The entries of the bidiagonal blocks B11, B12, B21, B22 can
+*> be computed from the angles THETA and PHI. See Further
+*> Details.
+*> \endverbatim
+*>
+*> \param[out] PHI
+*> \verbatim
+*> PHI is DOUBLE PRECISION array, dimension (Q-1)
+*> The entries of the bidiagonal blocks B11, B12, B21, B22 can
+*> be computed from the angles THETA and PHI. See Further
+*> Details.
+*> \endverbatim
+*>
+*> \param[out] TAUP1
+*> \verbatim
+*> TAUP1 is COMPLEX*16 array, dimension (P)
+*> The scalar factors of the elementary reflectors that define
+*> P1.
+*> \endverbatim
+*>
+*> \param[out] TAUP2
+*> \verbatim
+*> TAUP2 is COMPLEX*16 array, dimension (M-P)
+*> The scalar factors of the elementary reflectors that define
+*> P2.
+*> \endverbatim
+*>
+*> \param[out] TAUQ1
+*> \verbatim
+*> TAUQ1 is COMPLEX*16 array, dimension (Q)
+*> The scalar factors of the elementary reflectors that define
+*> Q1.
+*> \endverbatim
+*>
+*> \param[out] TAUQ2
+*> \verbatim
+*> TAUQ2 is COMPLEX*16 array, dimension (M-Q)
+*> The scalar factors of the elementary reflectors that define
+*> Q2.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= M-Q.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+*
+* Further Details
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The bidiagonal blocks B11, B12, B21, and B22 are represented
+*> implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
+*> PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
+*> lower bidiagonal. Every entry in each bidiagonal band is a product
+*> of a sine or cosine of a THETA with a sine or cosine of a PHI. See
+*> [1] or ZUNCSD for details.
+*>
+*> P1, P2, Q1, and Q2 are represented as products of elementary
+*> reflectors. See ZUNCSD for details on generating P1, P2, Q1, and Q2
+*> using ZUNGQR and ZUNGLQ.
+*>
+*> Reference
+*> =========
+*>
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*>
+*> \endverbatim
+*>
+* =====================================================================
SUBROUTINE ZUNBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
$ X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
$ TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine ((version 3.3.0)) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine ((version 3.3.0) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIGNS, TRANS
@@ -23,169 +299,6 @@
$ X21( LDX21, * ), X22( LDX22, * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNBDB simultaneously bidiagonalizes the blocks of an M-by-M
-* partitioned unitary matrix X:
-*
-* [ B11 | B12 0 0 ]
-* [ X11 | X12 ] [ P1 | ] [ 0 | 0 -I 0 ] [ Q1 | ]**H
-* X = [-----------] = [---------] [----------------] [---------] .
-* [ X21 | X22 ] [ | P2 ] [ B21 | B22 0 0 ] [ | Q2 ]
-* [ 0 | 0 0 I ]
-*
-* X11 is P-by-Q. Q must be no larger than P, M-P, or M-Q. (If this is
-* not the case, then X must be transposed and/or permuted. This can be
-* done in constant time using the TRANS and SIGNS options. See ZUNCSD
-* for details.)
-*
-* The unitary matrices P1, P2, Q1, and Q2 are P-by-P, (M-P)-by-
-* (M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. They are
-* represented implicitly by Householder vectors.
-*
-* B11, B12, B21, and B22 are Q-by-Q bidiagonal matrices represented
-* implicitly by angles THETA, PHI.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* SIGNS (input) CHARACTER
-* = 'O': The lower-left block is made nonpositive (the
-* "other" convention);
-* otherwise: The upper-right block is made nonpositive (the
-* "default" convention).
-*
-* M (input) INTEGER
-* The number of rows and columns in X.
-*
-* P (input) INTEGER
-* The number of rows in X11 and X12. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in X11 and X21. 0 <= Q <=
-* MIN(P,M-P,M-Q).
-*
-* X11 (input/output) COMPLEX*16 array, dimension (LDX11,Q)
-* On entry, the top-left block of the unitary matrix to be
-* reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the columns of tril(X11) specify reflectors for P1,
-* the rows of triu(X11,1) specify reflectors for Q1;
-* else TRANS = 'T', and
-* the rows of triu(X11) specify reflectors for P1,
-* the columns of tril(X11,-1) specify reflectors for Q1.
-*
-* LDX11 (input) INTEGER
-* The leading dimension of X11. If TRANS = 'N', then LDX11 >=
-* P; else LDX11 >= Q.
-*
-* X12 (input/output) COMPLEX*16 array, dimension (LDX12,M-Q)
-* On entry, the top-right block of the unitary matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the rows of triu(X12) specify the first P reflectors for
-* Q2;
-* else TRANS = 'T', and
-* the columns of tril(X12) specify the first P reflectors
-* for Q2.
-*
-* LDX12 (input) INTEGER
-* The leading dimension of X12. If TRANS = 'N', then LDX12 >=
-* P; else LDX11 >= M-Q.
-*
-* X21 (input/output) COMPLEX*16 array, dimension (LDX21,Q)
-* On entry, the bottom-left block of the unitary matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the columns of tril(X21) specify reflectors for P2;
-* else TRANS = 'T', and
-* the rows of triu(X21) specify reflectors for P2.
-*
-* LDX21 (input) INTEGER
-* The leading dimension of X21. If TRANS = 'N', then LDX21 >=
-* M-P; else LDX21 >= Q.
-*
-* X22 (input/output) COMPLEX*16 array, dimension (LDX22,M-Q)
-* On entry, the bottom-right block of the unitary matrix to
-* be reduced. On exit, the form depends on TRANS:
-* If TRANS = 'N', then
-* the rows of triu(X22(Q+1:M-P,P+1:M-Q)) specify the last
-* M-P-Q reflectors for Q2,
-* else TRANS = 'T', and
-* the columns of tril(X22(P+1:M-Q,Q+1:M-P)) specify the last
-* M-P-Q reflectors for P2.
-*
-* LDX22 (input) INTEGER
-* The leading dimension of X22. If TRANS = 'N', then LDX22 >=
-* M-P; else LDX22 >= M-Q.
-*
-* THETA (output) DOUBLE PRECISION array, dimension (Q)
-* The entries of the bidiagonal blocks B11, B12, B21, B22 can
-* be computed from the angles THETA and PHI. See Further
-* Details.
-*
-* PHI (output) DOUBLE PRECISION array, dimension (Q-1)
-* The entries of the bidiagonal blocks B11, B12, B21, B22 can
-* be computed from the angles THETA and PHI. See Further
-* Details.
-*
-* TAUP1 (output) COMPLEX*16 array, dimension (P)
-* The scalar factors of the elementary reflectors that define
-* P1.
-*
-* TAUP2 (output) COMPLEX*16 array, dimension (M-P)
-* The scalar factors of the elementary reflectors that define
-* P2.
-*
-* TAUQ1 (output) COMPLEX*16 array, dimension (Q)
-* The scalar factors of the elementary reflectors that define
-* Q1.
-*
-* TAUQ2 (output) COMPLEX*16 array, dimension (M-Q)
-* The scalar factors of the elementary reflectors that define
-* Q2.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= M-Q.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-*
-* Further Details
-* ===============
-*
-* The bidiagonal blocks B11, B12, B21, and B22 are represented
-* implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ...,
-* PHI(Q-1). B11 and B21 are upper bidiagonal, while B21 and B22 are
-* lower bidiagonal. Every entry in each bidiagonal band is a product
-* of a sine or cosine of a THETA with a sine or cosine of a PHI. See
-* [1] or ZUNCSD for details.
-*
-* P1, P2, Q1, and Q2 are represented as products of elementary
-* reflectors. See ZUNCSD for details on generating P1, P2, Q1, and Q2
-* using ZUNGQR and ZUNGLQ.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/SRC/zuncsd.f b/SRC/zuncsd.f
index 723cd661..47af1abd 100644
--- a/SRC/zuncsd.f
+++ b/SRC/zuncsd.f
@@ -1,20 +1,289 @@
+*> \brief \b ZUNCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* RECURSIVE SUBROUTINE ZUNCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS,
+* SIGNS, M, P, Q, X11, LDX11, X12,
+* LDX12, X21, LDX21, X22, LDX22, THETA,
+* U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
+* LDV2T, WORK, LWORK, RWORK, LRWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
+* INTEGER INFO, LDU1, LDU2, LDV1T, LDV2T, LDX11, LDX12,
+* $ LDX21, LDX22, LRWORK, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION THETA( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * ), WORK( * ), X11( LDX11, * ),
+* $ X12( LDX12, * ), X21( LDX21, * ), X22( LDX22,
+* $ * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNCSD computes the CS decomposition of an M-by-M partitioned
+*> unitary matrix X:
+*>
+*> [ I 0 0 | 0 0 0 ]
+*> [ 0 C 0 | 0 -S 0 ]
+*> [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**H
+*> X = [-----------] = [---------] [---------------------] [---------] .
+*> [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
+*> [ 0 S 0 | 0 C 0 ]
+*> [ 0 0 I | 0 0 0 ]
+*>
+*> X11 is P-by-Q. The unitary matrices U1, U2, V1, and V2 are P-by-P,
+*> (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
+*> R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
+*> which R = MIN(P,M-P,Q,M-Q).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] JOBU1
+*> \verbatim
+*> JOBU1 is CHARACTER
+*> = 'Y': U1 is computed;
+*> otherwise: U1 is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBU2
+*> \verbatim
+*> JOBU2 is CHARACTER
+*> = 'Y': U2 is computed;
+*> otherwise: U2 is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV1T
+*> \verbatim
+*> JOBV1T is CHARACTER
+*> = 'Y': V1T is computed;
+*> otherwise: V1T is not computed.
+*> \endverbatim
+*>
+*> \param[in] JOBV2T
+*> \verbatim
+*> JOBV2T is CHARACTER
+*> = 'Y': V2T is computed;
+*> otherwise: V2T is not computed.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> = 'T': X, U1, U2, V1T, and V2T are stored in row-major
+*> order;
+*> otherwise: X, U1, U2, V1T, and V2T are stored in column-
+*> major order.
+*> \endverbatim
+*>
+*> \param[in] SIGNS
+*> \verbatim
+*> SIGNS is CHARACTER
+*> = 'O': The lower-left block is made nonpositive (the
+*> "other" convention);
+*> otherwise: The upper-right block is made nonpositive (the
+*> "default" convention).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows and columns in X.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows in X11 and X12. 0 <= P <= M.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns in X11 and X21. 0 <= Q <= M.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,M)
+*> On entry, the unitary matrix whose CSD is desired.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X. LDX >= MAX(1,M).
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension (R), in which R =
+*> MIN(P,M-P,Q,M-Q).
+*> C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
+*> S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is COMPLEX*16 array, dimension (P)
+*> If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1.
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
+*> MAX(1,P).
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is COMPLEX*16 array, dimension (M-P)
+*> If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary
+*> matrix U2.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
+*> MAX(1,M-P).
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is COMPLEX*16 array, dimension (Q)
+*> If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary
+*> matrix V1**H.
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
+*> MAX(1,Q).
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is COMPLEX*16 array, dimension (M-Q)
+*> If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary
+*> matrix V2**H.
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
+*> MAX(1,M-Q).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the work array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension MAX(1,LRWORK)
+*> On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> If INFO > 0 on exit, RWORK(2:R) contains the values PHI(1),
+*> ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
+*> define the matrix in intermediate bidiagonal-block form
+*> remaining after nonconvergence. INFO specifies the number
+*> of nonzero PHI's.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*> LRWORK is INTEGER
+*> The dimension of the array RWORK.
+*> \endverbatim
+*> \verbatim
+*> If LRWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the RWORK array, returns
+*> this value as the first entry of the work array, and no error
+*> message related to LRWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M-MIN(P,M-P,Q,M-Q))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: ZBBCSD did not converge. See the description of RWORK
+*> above for details.
+*> \endverbatim
+*> \verbatim
+*> Reference
+*> =========
+*> \endverbatim
+*> \verbatim
+*> [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
+*> Algorithms, 50(1):33-65, 2009.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
RECURSIVE SUBROUTINE ZUNCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS,
$ SIGNS, M, P, Q, X11, LDX11, X12,
$ LDX12, X21, LDX21, X22, LDX22, THETA,
$ U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
$ LDV2T, WORK, LWORK, RWORK, LRWORK,
$ IWORK, INFO )
- IMPLICIT NONE
-*
-* -- LAPACK routine (version 3.3.1) --
-*
-* -- Contributed by Brian Sutton of the Randolph-Macon College --
-* -- November 2010
*
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*
-* @precisions normal z -> c
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
@@ -31,148 +300,6 @@
$ * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNCSD computes the CS decomposition of an M-by-M partitioned
-* unitary matrix X:
-*
-* [ I 0 0 | 0 0 0 ]
-* [ 0 C 0 | 0 -S 0 ]
-* [ X11 | X12 ] [ U1 | ] [ 0 0 0 | 0 0 -I ] [ V1 | ]**H
-* X = [-----------] = [---------] [---------------------] [---------] .
-* [ X21 | X22 ] [ | U2 ] [ 0 0 0 | I 0 0 ] [ | V2 ]
-* [ 0 S 0 | 0 C 0 ]
-* [ 0 0 I | 0 0 0 ]
-*
-* X11 is P-by-Q. The unitary matrices U1, U2, V1, and V2 are P-by-P,
-* (M-P)-by-(M-P), Q-by-Q, and (M-Q)-by-(M-Q), respectively. C and S are
-* R-by-R nonnegative diagonal matrices satisfying C^2 + S^2 = I, in
-* which R = MIN(P,M-P,Q,M-Q).
-*
-* Arguments
-* =========
-*
-* JOBU1 (input) CHARACTER
-* = 'Y': U1 is computed;
-* otherwise: U1 is not computed.
-*
-* JOBU2 (input) CHARACTER
-* = 'Y': U2 is computed;
-* otherwise: U2 is not computed.
-*
-* JOBV1T (input) CHARACTER
-* = 'Y': V1T is computed;
-* otherwise: V1T is not computed.
-*
-* JOBV2T (input) CHARACTER
-* = 'Y': V2T is computed;
-* otherwise: V2T is not computed.
-*
-* TRANS (input) CHARACTER
-* = 'T': X, U1, U2, V1T, and V2T are stored in row-major
-* order;
-* otherwise: X, U1, U2, V1T, and V2T are stored in column-
-* major order.
-*
-* SIGNS (input) CHARACTER
-* = 'O': The lower-left block is made nonpositive (the
-* "other" convention);
-* otherwise: The upper-right block is made nonpositive (the
-* "default" convention).
-*
-* M (input) INTEGER
-* The number of rows and columns in X.
-*
-* P (input) INTEGER
-* The number of rows in X11 and X12. 0 <= P <= M.
-*
-* Q (input) INTEGER
-* The number of columns in X11 and X21. 0 <= Q <= M.
-*
-* X (input/workspace) COMPLEX*16 array, dimension (LDX,M)
-* On entry, the unitary matrix whose CSD is desired.
-*
-* LDX (input) INTEGER
-* The leading dimension of X. LDX >= MAX(1,M).
-*
-* THETA (output) DOUBLE PRECISION array, dimension (R), in which R =
-* MIN(P,M-P,Q,M-Q).
-* C = DIAG( COS(THETA(1)), ... , COS(THETA(R)) ) and
-* S = DIAG( SIN(THETA(1)), ... , SIN(THETA(R)) ).
-*
-* U1 (output) COMPLEX*16 array, dimension (P)
-* If JOBU1 = 'Y', U1 contains the P-by-P unitary matrix U1.
-*
-* LDU1 (input) INTEGER
-* The leading dimension of U1. If JOBU1 = 'Y', LDU1 >=
-* MAX(1,P).
-*
-* U2 (output) COMPLEX*16 array, dimension (M-P)
-* If JOBU2 = 'Y', U2 contains the (M-P)-by-(M-P) unitary
-* matrix U2.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of U2. If JOBU2 = 'Y', LDU2 >=
-* MAX(1,M-P).
-*
-* V1T (output) COMPLEX*16 array, dimension (Q)
-* If JOBV1T = 'Y', V1T contains the Q-by-Q matrix unitary
-* matrix V1**H.
-*
-* LDV1T (input) INTEGER
-* The leading dimension of V1T. If JOBV1T = 'Y', LDV1T >=
-* MAX(1,Q).
-*
-* V2T (output) COMPLEX*16 array, dimension (M-Q)
-* If JOBV2T = 'Y', V2T contains the (M-Q)-by-(M-Q) unitary
-* matrix V2**H.
-*
-* LDV2T (input) INTEGER
-* The leading dimension of V2T. If JOBV2T = 'Y', LDV2T >=
-* MAX(1,M-Q).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the work array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension MAX(1,LRWORK)
-* On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
-* If INFO > 0 on exit, RWORK(2:R) contains the values PHI(1),
-* ..., PHI(R-1) that, together with THETA(1), ..., THETA(R),
-* define the matrix in intermediate bidiagonal-block form
-* remaining after nonconvergence. INFO specifies the number
-* of nonzero PHI's.
-*
-* LRWORK (input) INTEGER
-* The dimension of the array RWORK.
-*
-* If LRWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the RWORK array, returns
-* this value as the first entry of the work array, and no error
-* message related to LRWORK is issued by XERBLA.
-*
-* IWORK (workspace) INTEGER array, dimension (M-MIN(P,M-P,Q,M-Q))
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: ZBBCSD did not converge. See the description of RWORK
-* above for details.
-*
-* Reference
-* =========
-*
-* [1] Brian D. Sutton. Computing the complete CS decomposition. Numer.
-* Algorithms, 50(1):33-65, 2009.
-*
* ===================================================================
*
* .. Parameters ..
diff --git a/SRC/zung2l.f b/SRC/zung2l.f
index 2a9d815e..4d29707d 100644
--- a/SRC/zung2l.f
+++ b/SRC/zung2l.f
@@ -1,60 +1,122 @@
- SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZUNG2L
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNG2L generates an m by n complex matrix Q with orthonormal columns,
-* which is defined as the last n columns of a product of k elementary
-* reflectors of order m
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by ZGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNG2L generates an m by n complex matrix Q with orthonormal columns,
+*> which is defined as the last n columns of a product of k elementary
+*> reflectors of order m
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by ZGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the (n-k+i)-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by ZGEQLF in the last k columns of its array
+*> argument A.
+*> On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the (n-k+i)-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by ZGEQLF in the last k columns of its array
-* argument A.
-* On exit, the m-by-n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup complex16OTHERcomputational
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEQLF.
+* =====================================================================
+ SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zung2r.f b/SRC/zung2r.f
index d3281039..e790ec83 100644
--- a/SRC/zung2r.f
+++ b/SRC/zung2r.f
@@ -1,60 +1,122 @@
- SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZUNG2R
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNG2R generates an m by n complex matrix Q with orthonormal columns,
-* which is defined as the first n columns of a product of k elementary
-* reflectors of order m
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by ZGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNG2R generates an m by n complex matrix Q with orthonormal columns,
+*> which is defined as the first n columns of a product of k elementary
+*> reflectors of order m
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by ZGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the i-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by ZGEQRF in the first k columns of its array
+*> argument A.
+*> On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the i-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by ZGEQRF in the first k columns of its array
-* argument A.
-* On exit, the m by n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup complex16OTHERcomputational
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEQRF.
+* =====================================================================
+ SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zungbr.f b/SRC/zungbr.f
index c918ee3f..24860518 100644
--- a/SRC/zungbr.f
+++ b/SRC/zungbr.f
@@ -1,9 +1,159 @@
+*> \brief \b ZUNGBR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER VECT
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGBR generates one of the complex unitary matrices Q or P**H
+*> determined by ZGEBRD when reducing a complex matrix A to bidiagonal
+*> form: A = Q * B * P**H. Q and P**H are defined as products of
+*> elementary reflectors H(i) or G(i) respectively.
+*>
+*> If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
+*> is of order M:
+*> if m >= k, Q = H(1) H(2) . . . H(k) and ZUNGBR returns the first n
+*> columns of Q, where m >= n >= k;
+*> if m < k, Q = H(1) H(2) . . . H(m-1) and ZUNGBR returns Q as an
+*> M-by-M matrix.
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**H
+*> is of order N:
+*> if k < n, P**H = G(k) . . . G(2) G(1) and ZUNGBR returns the first m
+*> rows of P**H, where n >= m >= k;
+*> if k >= n, P**H = G(n-1) . . . G(2) G(1) and ZUNGBR returns P**H as
+*> an N-by-N matrix.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> Specifies whether the matrix Q or the matrix P**H is
+*> required, as defined in the transformation applied by ZGEBRD:
+*> = 'Q': generate Q;
+*> = 'P': generate P**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q or P**H to be returned.
+*> M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q or P**H to be returned.
+*> N >= 0.
+*> If VECT = 'Q', M >= N >= min(M,K);
+*> if VECT = 'P', N >= M >= min(N,K).
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> If VECT = 'Q', the number of columns in the original M-by-K
+*> matrix reduced by ZGEBRD.
+*> If VECT = 'P', the number of rows in the original K-by-N
+*> matrix reduced by ZGEBRD.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by ZGEBRD.
+*> On exit, the M-by-N matrix Q or P**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension
+*> (min(M,K)) if VECT = 'Q'
+*> (min(N,K)) if VECT = 'P'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i) or G(i), which determines Q or P**H, as
+*> returned by ZGEBRD in its array argument TAUQ or TAUP.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,min(M,N)).
+*> For optimum performance LWORK >= min(M,N)*NB, where NB
+*> is the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16GBcomputational
+*
+* =====================================================================
SUBROUTINE ZUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER VECT
@@ -13,86 +163,6 @@
COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNGBR generates one of the complex unitary matrices Q or P**H
-* determined by ZGEBRD when reducing a complex matrix A to bidiagonal
-* form: A = Q * B * P**H. Q and P**H are defined as products of
-* elementary reflectors H(i) or G(i) respectively.
-*
-* If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
-* is of order M:
-* if m >= k, Q = H(1) H(2) . . . H(k) and ZUNGBR returns the first n
-* columns of Q, where m >= n >= k;
-* if m < k, Q = H(1) H(2) . . . H(m-1) and ZUNGBR returns Q as an
-* M-by-M matrix.
-*
-* If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**H
-* is of order N:
-* if k < n, P**H = G(k) . . . G(2) G(1) and ZUNGBR returns the first m
-* rows of P**H, where n >= m >= k;
-* if k >= n, P**H = G(n-1) . . . G(2) G(1) and ZUNGBR returns P**H as
-* an N-by-N matrix.
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* Specifies whether the matrix Q or the matrix P**H is
-* required, as defined in the transformation applied by ZGEBRD:
-* = 'Q': generate Q;
-* = 'P': generate P**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix Q or P**H to be returned.
-* M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q or P**H to be returned.
-* N >= 0.
-* If VECT = 'Q', M >= N >= min(M,K);
-* if VECT = 'P', N >= M >= min(N,K).
-*
-* K (input) INTEGER
-* If VECT = 'Q', the number of columns in the original M-by-K
-* matrix reduced by ZGEBRD.
-* If VECT = 'P', the number of rows in the original K-by-N
-* matrix reduced by ZGEBRD.
-* K >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by ZGEBRD.
-* On exit, the M-by-N matrix Q or P**H.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
-*
-* TAU (input) COMPLEX*16 array, dimension
-* (min(M,K)) if VECT = 'Q'
-* (min(N,K)) if VECT = 'P'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i) or G(i), which determines Q or P**H, as
-* returned by ZGEBRD in its array argument TAUQ or TAUP.
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,min(M,N)).
-* For optimum performance LWORK >= min(M,N)*NB, where NB
-* is the optimal blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zunghr.f b/SRC/zunghr.f
index e887fdff..f0a30db4 100644
--- a/SRC/zunghr.f
+++ b/SRC/zunghr.f
@@ -1,67 +1,133 @@
- SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZUNGHR
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNGHR generates a complex unitary matrix Q which is defined as the
-* product of IHI-ILO elementary reflectors of order N, as returned by
-* ZGEHRD:
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGHR generates a complex unitary matrix Q which is defined as the
+*> product of IHI-ILO elementary reflectors of order N, as returned by
+*> ZGEHRD:
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI must have the same values as in the previous call
-* of ZGEHRD. Q is equal to the unit matrix except in the
-* submatrix Q(ilo+1:ihi,ilo+1:ihi).
-* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by ZGEHRD.
-* On exit, the N-by-N unitary matrix Q.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI must have the same values as in the previous call
+*> of ZGEHRD. Q is equal to the unit matrix except in the
+*> submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by ZGEHRD.
+*> On exit, the N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEHRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= IHI-ILO.
+*> For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEHRD.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complex16OTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= IHI-ILO.
-* For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zungl2.f b/SRC/zungl2.f
index 95eb3c86..d30adeb7 100644
--- a/SRC/zungl2.f
+++ b/SRC/zungl2.f
@@ -1,59 +1,121 @@
- SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZUNGL2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNGL2 generates an m-by-n complex matrix Q with orthonormal rows,
-* which is defined as the first m rows of a product of k elementary
-* reflectors of order n
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H
-*
-* as returned by ZGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGL2 generates an m-by-n complex matrix Q with orthonormal rows,
+*> which is defined as the first m rows of a product of k elementary
+*> reflectors of order n
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by ZGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the i-th row must contain the vector which defines
+*> the elementary reflector H(i), for i = 1,2,...,k, as returned
+*> by ZGELQF in the first k rows of its array argument A.
+*> On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the i-th row must contain the vector which defines
-* the elementary reflector H(i), for i = 1,2,...,k, as returned
-* by ZGELQF in the first k rows of its array argument A.
-* On exit, the m by n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup complex16OTHERcomputational
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGELQF.
+* =====================================================================
+ SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (M)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunglq.f b/SRC/zunglq.f
index 1e00d1a5..99863fde 100644
--- a/SRC/zunglq.f
+++ b/SRC/zunglq.f
@@ -1,70 +1,136 @@
- SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZUNGLQ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNGLQ generates an M-by-N complex matrix Q with orthonormal rows,
-* which is defined as the first M rows of a product of K elementary
-* reflectors of order N
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H
-*
-* as returned by ZGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGLQ generates an M-by-N complex matrix Q with orthonormal rows,
+*> which is defined as the first M rows of a product of K elementary
+*> reflectors of order N
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by ZGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the i-th row must contain the vector which defines
-* the elementary reflector H(i), for i = 1,2,...,k, as returned
-* by ZGELQF in the first k rows of its array argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the i-th row must contain the vector which defines
+*> the elementary reflector H(i), for i = 1,2,...,k, as returned
+*> by ZGELQF in the first k rows of its array argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit;
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGELQF.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complex16OTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit;
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zungql.f b/SRC/zungql.f
index 7447b5a9..4894d312 100644
--- a/SRC/zungql.f
+++ b/SRC/zungql.f
@@ -1,71 +1,137 @@
- SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZUNGQL
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNGQL generates an M-by-N complex matrix Q with orthonormal columns,
-* which is defined as the last N columns of a product of K elementary
-* reflectors of order M
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by ZGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGQL generates an M-by-N complex matrix Q with orthonormal columns,
+*> which is defined as the last N columns of a product of K elementary
+*> reflectors of order M
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by ZGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the (n-k+i)-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by ZGEQLF in the last k columns of its array
-* argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the (n-k+i)-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by ZGEQLF in the last k columns of its array
+*> argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEQLF.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complex16OTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zungqr.f b/SRC/zungqr.f
index 372c3874..587e0fc9 100644
--- a/SRC/zungqr.f
+++ b/SRC/zungqr.f
@@ -1,71 +1,137 @@
- SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZUNGQR
*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
-* which is defined as the first N columns of a product of K elementary
-* reflectors of order M
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by ZGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
+*> which is defined as the first N columns of a product of K elementary
+*> reflectors of order M
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by ZGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the i-th column must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by ZGEQRF in the first k columns of its array
-* argument A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the i-th column must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by ZGEQRF in the first k columns of its array
+*> argument A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,N).
+*> For optimum performance LWORK >= N*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEQRF.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complex16OTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,N).
-* For optimum performance LWORK >= N*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zungr2.f b/SRC/zungr2.f
index e02d38bf..b2deea7d 100644
--- a/SRC/zungr2.f
+++ b/SRC/zungr2.f
@@ -1,60 +1,122 @@
- SUBROUTINE ZUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+*> \brief \b ZUNGR2
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNGR2 generates an m by n complex matrix Q with orthonormal rows,
-* which is defined as the last m rows of a product of k elementary
-* reflectors of order n
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H
-*
-* as returned by ZGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGR2 generates an m by n complex matrix Q with orthonormal rows,
+*> which is defined as the last m rows of a product of k elementary
+*> reflectors of order n
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by ZGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the (m-k+i)-th row must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by ZGERQF in the last k rows of its array argument
+*> A.
+*> On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the (m-k+i)-th row must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by ZGERQF in the last k rows of its array argument
-* A.
-* On exit, the m-by-n matrix Q.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \ingroup complex16OTHERcomputational
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGERQF.
+* =====================================================================
+ SUBROUTINE ZUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (M)
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zungrq.f b/SRC/zungrq.f
index 197a5466..0e5c6215 100644
--- a/SRC/zungrq.f
+++ b/SRC/zungrq.f
@@ -1,71 +1,137 @@
- SUBROUTINE ZUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*> \brief \b ZUNGRQ
*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNGRQ generates an M-by-N complex matrix Q with orthonormal rows,
-* which is defined as the last M rows of a product of K elementary
-* reflectors of order N
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H
-*
-* as returned by ZGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGRQ generates an M-by-N complex matrix Q with orthonormal rows,
+*> which is defined as the last M rows of a product of K elementary
+*> reflectors of order N
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by ZGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q. N >= M.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the (m-k+i)-th row must contain the vector which
-* defines the elementary reflector H(i), for i = 1,2,...,k, as
-* returned by ZGERQF in the last k rows of its array argument
-* A.
-* On exit, the M-by-N matrix Q.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the (m-k+i)-th row must contain the vector which
+*> defines the elementary reflector H(i), for i = 1,2,...,k, as
+*> returned by ZGERQF in the last k rows of its array argument
+*> A.
+*> On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= max(1,M).
+*> For optimum performance LWORK >= M*NB, where NB is the
+*> optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The first dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGERQF.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complex16OTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= max(1,M).
-* For optimum performance LWORK >= M*NB, where NB is the
-* optimal blocksize.
+* =====================================================================
+ SUBROUTINE ZUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument has an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zungtr.f b/SRC/zungtr.f
index d81d9bb3..ebe4120c 100644
--- a/SRC/zungtr.f
+++ b/SRC/zungtr.f
@@ -1,69 +1,133 @@
- SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDA, LWORK, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUNGTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNGTR generates a complex unitary matrix Q which is defined as the
-* product of n-1 elementary reflectors of order N, as returned by
-* ZHETRD:
-*
-* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNGTR generates a complex unitary matrix Q which is defined as the
+*> product of n-1 elementary reflectors of order N, as returned by
+*> ZHETRD:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A contains elementary reflectors
-* from ZHETRD;
-* = 'L': Lower triangle of A contains elementary reflectors
-* from ZHETRD.
-*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the vectors which define the elementary reflectors,
-* as returned by ZHETRD.
-* On exit, the N-by-N unitary matrix Q.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A contains elementary reflectors
+*> from ZHETRD;
+*> = 'L': Lower triangle of A contains elementary reflectors
+*> from ZHETRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the vectors which define the elementary reflectors,
+*> as returned by ZHETRD.
+*> On exit, the N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZHETRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= N-1.
+*> For optimum performance LWORK >= (N-1)*NB, where NB is
+*> the optimal blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZHETRD.
+*> \date November 2011
*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \ingroup complex16OTHERcomputational
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= N-1.
-* For optimum performance LWORK >= (N-1)*NB, where NB is
-* the optimal blocksize.
+* =====================================================================
+ SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDA, LWORK, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunm2l.f b/SRC/zunm2l.f
index 00dde137..848014ce 100644
--- a/SRC/zunm2l.f
+++ b/SRC/zunm2l.f
@@ -1,92 +1,168 @@
- SUBROUTINE ZUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUNM2L
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNM2L overwrites the general complex m-by-n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by ZGEQLF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNM2L overwrites the general complex m-by-n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by ZGEQLF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZGEQLF in the last k columns of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZGEQLF in the last k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEQLF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEQLF.
+*> \date November 2011
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complex16OTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunm2r.f b/SRC/zunm2r.f
index 646fd093..dfe2c89a 100644
--- a/SRC/zunm2r.f
+++ b/SRC/zunm2r.f
@@ -1,92 +1,168 @@
- SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUNM2R
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNM2R overwrites the general complex m-by-n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by ZGEQRF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNM2R overwrites the general complex m-by-n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by ZGEQRF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZGEQRF in the first k columns of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZGEQRF in the first k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEQRF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEQRF.
+*> \date November 2011
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complex16OTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunmbr.f b/SRC/zunmbr.f
index 33b5a97b..c301aa94 100644
--- a/SRC/zunmbr.f
+++ b/SRC/zunmbr.f
@@ -1,10 +1,198 @@
+*> \brief \b ZUNMBR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
+* LDC, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, VECT
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> If VECT = 'Q', ZUNMBR overwrites the general complex M-by-N matrix C
+*> with
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> If VECT = 'P', ZUNMBR overwrites the general complex M-by-N matrix C
+*> with
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': P * C C * P
+*> TRANS = 'C': P**H * C C * P**H
+*>
+*> Here Q and P**H are the unitary matrices determined by ZGEBRD when
+*> reducing a complex matrix A to bidiagonal form: A = Q * B * P**H. Q
+*> and P**H are defined as products of elementary reflectors H(i) and
+*> G(i) respectively.
+*>
+*> Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
+*> order of the unitary matrix Q or P**H that is applied.
+*>
+*> If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
+*> if nq >= k, Q = H(1) H(2) . . . H(k);
+*> if nq < k, Q = H(1) H(2) . . . H(nq-1).
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
+*> if k < nq, P = G(1) G(2) . . . G(k);
+*> if k >= nq, P = G(1) G(2) . . . G(nq-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] VECT
+*> \verbatim
+*> VECT is CHARACTER*1
+*> = 'Q': apply Q or Q**H;
+*> = 'P': apply P or P**H.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q, Q**H, P or P**H from the Left;
+*> = 'R': apply Q, Q**H, P or P**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q or P;
+*> = 'C': Conjugate transpose, apply Q**H or P**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> If VECT = 'Q', the number of columns in the original
+*> matrix reduced by ZGEBRD.
+*> If VECT = 'P', the number of rows in the original
+*> matrix reduced by ZGEBRD.
+*> K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,min(nq,K)) if VECT = 'Q'
+*> (LDA,nq) if VECT = 'P'
+*> The vectors which define the elementary reflectors H(i) and
+*> G(i), whose products determine the matrices Q and P, as
+*> returned by ZGEBRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If VECT = 'Q', LDA >= max(1,nq);
+*> if VECT = 'P', LDA >= max(1,min(nq,K)).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(nq,K))
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i) or G(i) which determines Q or P, as returned
+*> by ZGEBRD in the array argument TAUQ or TAUP.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q
+*> or P*C or P**H*C or C*P or C*P**H.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M);
+*> if N = 0 or M = 0, LWORK >= 1.
+*> For optimum performance LWORK >= max(1,N*NB) if SIDE = 'L',
+*> and LWORK >= max(1,M*NB) if SIDE = 'R', where NB is the
+*> optimal blocksize. (NB = 0 if M = 0 or N = 0.)
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
$ LDC, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS, VECT
@@ -14,111 +202,6 @@
COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* If VECT = 'Q', ZUNMBR overwrites the general complex M-by-N matrix C
-* with
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* If VECT = 'P', ZUNMBR overwrites the general complex M-by-N matrix C
-* with
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': P * C C * P
-* TRANS = 'C': P**H * C C * P**H
-*
-* Here Q and P**H are the unitary matrices determined by ZGEBRD when
-* reducing a complex matrix A to bidiagonal form: A = Q * B * P**H. Q
-* and P**H are defined as products of elementary reflectors H(i) and
-* G(i) respectively.
-*
-* Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
-* order of the unitary matrix Q or P**H that is applied.
-*
-* If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
-* if nq >= k, Q = H(1) H(2) . . . H(k);
-* if nq < k, Q = H(1) H(2) . . . H(nq-1).
-*
-* If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
-* if k < nq, P = G(1) G(2) . . . G(k);
-* if k >= nq, P = G(1) G(2) . . . G(nq-1).
-*
-* Arguments
-* =========
-*
-* VECT (input) CHARACTER*1
-* = 'Q': apply Q or Q**H;
-* = 'P': apply P or P**H.
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q, Q**H, P or P**H from the Left;
-* = 'R': apply Q, Q**H, P or P**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q or P;
-* = 'C': Conjugate transpose, apply Q**H or P**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* If VECT = 'Q', the number of columns in the original
-* matrix reduced by ZGEBRD.
-* If VECT = 'P', the number of rows in the original
-* matrix reduced by ZGEBRD.
-* K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,min(nq,K)) if VECT = 'Q'
-* (LDA,nq) if VECT = 'P'
-* The vectors which define the elementary reflectors H(i) and
-* G(i), whose products determine the matrices Q and P, as
-* returned by ZGEBRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If VECT = 'Q', LDA >= max(1,nq);
-* if VECT = 'P', LDA >= max(1,min(nq,K)).
-*
-* TAU (input) COMPLEX*16 array, dimension (min(nq,K))
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i) or G(i) which determines Q or P, as returned
-* by ZGEBRD in the array argument TAUQ or TAUP.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q
-* or P*C or P**H*C or C*P or C*P**H.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M);
-* if N = 0 or M = 0, LWORK >= 1.
-* For optimum performance LWORK >= max(1,N*NB) if SIDE = 'L',
-* and LWORK >= max(1,M*NB) if SIDE = 'R', where NB is the
-* optimal blocksize. (NB = 0 if M = 0 or N = 0.)
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zunmhr.f b/SRC/zunmhr.f
index da0cb7ef..d14752ec 100644
--- a/SRC/zunmhr.f
+++ b/SRC/zunmhr.f
@@ -1,10 +1,178 @@
+*> \brief \b ZUNMHR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
+* LDC, WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER IHI, ILO, INFO, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMHR overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> IHI-ILO elementary reflectors, as returned by ZGEHRD:
+*>
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> ILO and IHI must have the same values as in the previous call
+*> of ZGEHRD. Q is equal to the unit matrix except in the
+*> submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*> If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
+*> ILO = 1 and IHI = 0, if M = 0;
+*> if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
+*> ILO = 1 and IHI = 0, if N = 0.
+*> \endverbatim
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,M) if SIDE = 'L'
+*> (LDA,N) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by ZGEHRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEHRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
$ LDC, WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,91 +182,6 @@
COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNMHR overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* IHI-ILO elementary reflectors, as returned by ZGEHRD:
-*
-* Q = H(ilo) H(ilo+1) . . . H(ihi-1).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* ILO and IHI must have the same values as in the previous call
-* of ZGEHRD. Q is equal to the unit matrix except in the
-* submatrix Q(ilo+1:ihi,ilo+1:ihi).
-* If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
-* ILO = 1 and IHI = 0, if M = 0;
-* if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
-* ILO = 1 and IHI = 0, if N = 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,M) if SIDE = 'L'
-* (LDA,N) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by ZGEHRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*
-* TAU (input) COMPLEX*16 array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEHRD.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zunml2.f b/SRC/zunml2.f
index e8042804..cd1451c6 100644
--- a/SRC/zunml2.f
+++ b/SRC/zunml2.f
@@ -1,92 +1,168 @@
- SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUNML2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNML2 overwrites the general complex m-by-n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H
-*
-* as returned by ZGELQF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNML2 overwrites the general complex m-by-n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by ZGELQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZGELQF in the first k rows of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZGELQF in the first k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGELQF.
+*> \date November 2011
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complex16OTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunmlq.f b/SRC/zunmlq.f
index c336fb09..f8b4eb9a 100644
--- a/SRC/zunmlq.f
+++ b/SRC/zunmlq.f
@@ -1,10 +1,172 @@
+*> \brief \b ZUNMLQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMLQ overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by ZGELQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZGELQF in the first k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,88 +176,6 @@
COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNMLQ overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k)**H . . . H(2)**H H(1)**H
-*
-* as returned by ZGELQF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZGELQF in the first k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGELQF.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zunmql.f b/SRC/zunmql.f
index 7a1657ce..f63c808d 100644
--- a/SRC/zunmql.f
+++ b/SRC/zunmql.f
@@ -1,10 +1,172 @@
+*> \brief \b ZUNMQL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMQL overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by ZGEQLF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZGEQLF in the last k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEQLF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZUNMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,88 +176,6 @@
COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNMQL overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(k) . . . H(2) H(1)
-*
-* as returned by ZGEQLF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZGEQLF in the last k columns of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEQLF.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zunmqr.f b/SRC/zunmqr.f
index 25a24400..b95d3a98 100644
--- a/SRC/zunmqr.f
+++ b/SRC/zunmqr.f
@@ -1,10 +1,172 @@
+*> \brief \b ZUNMQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMQR overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by ZGEQRF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,K)
+*> The i-th column must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZGEQRF in the first k columns of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If SIDE = 'L', LDA >= max(1,M);
+*> if SIDE = 'R', LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGEQRF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,88 +176,6 @@
COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNMQR overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by ZGEQRF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,K)
-* The i-th column must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZGEQRF in the first k columns of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If SIDE = 'L', LDA >= max(1,M);
-* if SIDE = 'R', LDA >= max(1,N).
-*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGEQRF.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zunmr2.f b/SRC/zunmr2.f
index 86850b76..affdda68 100644
--- a/SRC/zunmr2.f
+++ b/SRC/zunmr2.f
@@ -1,92 +1,168 @@
- SUBROUTINE ZUNMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUNMR2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNMR2 overwrites the general complex m-by-n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H
-*
-* as returned by ZGERQF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMR2 overwrites the general complex m-by-n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by ZGERQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZGERQF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZGERQF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGERQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGERQF.
+*> \date November 2011
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complex16OTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZUNMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunmr3.f b/SRC/zunmr3.f
index eab78129..e184c75f 100644
--- a/SRC/zunmr3.f
+++ b/SRC/zunmr3.f
@@ -1,103 +1,187 @@
- SUBROUTINE ZUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
- $ WORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, L, LDA, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUNMR3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, L, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNMR3 overwrites the general complex m by n matrix C with
-*
-* Q * C if SIDE = 'L' and TRANS = 'N', or
-*
-* Q**H* C if SIDE = 'L' and TRANS = 'C', or
-*
-* C * Q if SIDE = 'R' and TRANS = 'N', or
-*
-* C * Q**H if SIDE = 'R' and TRANS = 'C',
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1) H(2) . . . H(k)
-*
-* as returned by ZTZRZF. Q is of order m if SIDE = 'L' and of order n
-* if SIDE = 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMR3 overwrites the general complex m by n matrix C with
+*>
+*> Q * C if SIDE = 'L' and TRANS = 'N', or
+*>
+*> Q**H* C if SIDE = 'L' and TRANS = 'C', or
+*>
+*> C * Q if SIDE = 'R' and TRANS = 'N', or
+*>
+*> C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by ZTZRZF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left
-* = 'R': apply Q or Q**H from the Right
-*
-* TRANS (input) CHARACTER*1
-* = 'N': apply Q (No transpose)
-* = 'C': apply Q**H (Conjugate transpose)
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing
-* the meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZTZRZF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZTZRZF.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left
+*> = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': apply Q (No transpose)
+*> = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing
+*> the meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZTZRZF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZTZRZF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the m-by-n matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L',
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the m-by-n matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L',
-* (M) if SIDE = 'R'
+*> \ingroup complex16OTHERcomputational
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+ $ WORK, INFO )
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, L, LDA, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunmrq.f b/SRC/zunmrq.f
index 9b315313..82c22b1b 100644
--- a/SRC/zunmrq.f
+++ b/SRC/zunmrq.f
@@ -1,10 +1,172 @@
+*> \brief \b ZUNMRQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMRQ overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by ZGERQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZGERQF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZGERQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZUNMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.3.1) --
+* -- LAPACK computational routine (version 3.3.1) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS
@@ -14,88 +176,6 @@
COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNMRQ overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
-*
-* Q = H(1)**H H(2)**H . . . H(k)**H
-*
-* as returned by ZGERQF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZGERQF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZGERQF.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/SRC/zunmrz.f b/SRC/zunmrz.f
index ced6493a..5ba6b872 100644
--- a/SRC/zunmrz.f
+++ b/SRC/zunmrz.f
@@ -1,111 +1,199 @@
- SUBROUTINE ZUNMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
- $ WORK, LWORK, INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS
- INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUNMRZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS
+* INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNMRZ overwrites the general complex M-by-N matrix C with
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMRZ overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*> Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by ZTZRZF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*>
+*>\endverbatim
*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
+* Arguments
+* =========
*
-* where Q is a complex unitary matrix defined as the product of k
-* elementary reflectors
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines
+*> the matrix Q.
+*> If SIDE = 'L', M >= K >= 0;
+*> if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of columns of the matrix A containing
+*> the meaningful part of the Householder reflectors.
+*> If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,M) if SIDE = 'L',
+*> (LDA,N) if SIDE = 'R'
+*> The i-th row must contain the vector which defines the
+*> elementary reflector H(i), for i = 1,2,...,k, as returned by
+*> ZTZRZF in the last k rows of its array argument A.
+*> A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZTZRZF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Q = H(1) H(2) . . . H(k)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* as returned by ZTZRZF. Q is of order M if SIDE = 'L' and of order N
-* if SIDE = 'R'.
+*> \date November 2011
*
-* Arguments
-* =========
+*> \ingroup complex16OTHERcomputational
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines
-* the matrix Q.
-* If SIDE = 'L', M >= K >= 0;
-* if SIDE = 'R', N >= K >= 0.
-*
-* L (input) INTEGER
-* The number of columns of the matrix A containing
-* the meaningful part of the Householder reflectors.
-* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,M) if SIDE = 'L',
-* (LDA,N) if SIDE = 'R'
-* The i-th row must contain the vector which defines the
-* elementary reflector H(i), for i = 1,2,...,k, as returned by
-* ZTZRZF in the last k rows of its array argument A.
-* A is modified by the routine but restored on exit.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,K).
-*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZTZRZF.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> Based on contributions by
+*> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZUNMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
+ $ WORK, LWORK, INFO )
+*
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* Based on contributions by
-* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS
+ INTEGER INFO, K, L, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zunmtr.f b/SRC/zunmtr.f
index 09a9be8a..093952f1 100644
--- a/SRC/zunmtr.f
+++ b/SRC/zunmtr.f
@@ -1,10 +1,173 @@
+*> \brief \b ZUNMTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
+* WORK, LWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, UPLO
+* INTEGER INFO, LDA, LDC, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNMTR overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by ZHETRD:
+*>
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangle of A contains elementary reflectors
+*> from ZHETRD;
+*> = 'L': Lower triangle of A contains elementary reflectors
+*> from ZHETRD.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (LDA,M) if SIDE = 'L'
+*> (LDA,N) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by ZHETRD.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension
+*> (M-1) if SIDE = 'L'
+*> (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZHETRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> If SIDE = 'L', LWORK >= max(1,N);
+*> if SIDE = 'R', LWORK >= max(1,M).
+*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*> LWORK >=M*NB if SIDE = 'R', where NB is the optimal
+*> blocksize.
+*> \endverbatim
+*> \verbatim
+*> If LWORK = -1, then a workspace query is assumed; the routine
+*> only calculates the optimal size of the WORK array, returns
+*> this value as the first entry of the WORK array, and no error
+*> message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16OTHERcomputational
+*
+* =====================================================================
SUBROUTINE ZUNMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
$ WORK, LWORK, INFO )
*
-* -- LAPACK routine (version 3.2) --
+* -- LAPACK computational routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER SIDE, TRANS, UPLO
@@ -14,89 +177,6 @@
COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNMTR overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* nq-1 elementary reflectors, as returned by ZHETRD:
-*
-* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangle of A contains elementary reflectors
-* from ZHETRD;
-* = 'L': Lower triangle of A contains elementary reflectors
-* from ZHETRD.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension
-* (LDA,M) if SIDE = 'L'
-* (LDA,N) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by ZHETRD.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*
-* TAU (input) COMPLEX*16 array, dimension
-* (M-1) if SIDE = 'L'
-* (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZHETRD.
-*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
-* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* If SIDE = 'L', LWORK >= max(1,N);
-* if SIDE = 'R', LWORK >= max(1,M).
-* For optimum performance LWORK >= N*NB if SIDE = 'L', and
-* LWORK >=M*NB if SIDE = 'R', where NB is the optimal
-* blocksize.
-*
-* If LWORK = -1, then a workspace query is assumed; the routine
-* only calculates the optimal size of the WORK array, returns
-* this value as the first entry of the WORK array, and no error
-* message related to LWORK is issued by XERBLA.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/SRC/zupgtr.f b/SRC/zupgtr.f
index 2041bd95..00830c8d 100644
--- a/SRC/zupgtr.f
+++ b/SRC/zupgtr.f
@@ -1,60 +1,123 @@
- SUBROUTINE ZUPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
-*
-* -- LAPACK routine (version 3.2) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INFO, LDQ, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUPGTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INFO, LDQ, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUPGTR generates a complex unitary matrix Q which is defined as the
-* product of n-1 elementary reflectors H(i) of order n, as returned by
-* ZHPTRD using packed storage:
-*
-* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUPGTR generates a complex unitary matrix Q which is defined as the
+*> product of n-1 elementary reflectors H(i) of order n, as returned by
+*> ZHPTRD using packed storage:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular packed storage used in previous
-* call to ZHPTRD;
-* = 'L': Lower triangular packed storage used in previous
-* call to ZHPTRD.
-*
-* N (input) INTEGER
-* The order of the matrix Q. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular packed storage used in previous
+*> call to ZHPTRD;
+*> = 'L': Lower triangular packed storage used in previous
+*> call to ZHPTRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The vectors which define the elementary reflectors, as
+*> returned by ZHPTRD.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N-1)
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZHPTRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> The N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N-1)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The vectors which define the elementary reflectors, as
-* returned by ZHPTRD.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (N-1)
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZHPTRD.
+*> \date November 2011
*
-* Q (output) COMPLEX*16 array, dimension (LDQ,N)
-* The N-by-N unitary matrix Q.
+*> \ingroup complex16OTHERcomputational
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZUPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (N-1)
+* -- LAPACK computational routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INFO, LDQ, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/SRC/zupmtr.f b/SRC/zupmtr.f
index 9f386c48..7788265b 100644
--- a/SRC/zupmtr.f
+++ b/SRC/zupmtr.f
@@ -1,86 +1,159 @@
- SUBROUTINE ZUPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.3.1) --
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* -- April 2011 --
-*
-* .. Scalar Arguments ..
- CHARACTER SIDE, TRANS, UPLO
- INTEGER INFO, LDC, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AP( * ), C( LDC, * ), TAU( * ), WORK( * )
-* ..
-*
+*> \brief \b ZUPMTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER SIDE, TRANS, UPLO
+* INTEGER INFO, LDC, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AP( * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUPMTR overwrites the general complex M-by-N matrix C with
-*
-* SIDE = 'L' SIDE = 'R'
-* TRANS = 'N': Q * C C * Q
-* TRANS = 'C': Q**H * C C * Q**H
-*
-* where Q is a complex unitary matrix of order nq, with nq = m if
-* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-* nq-1 elementary reflectors, as returned by ZHPTRD using packed
-* storage:
-*
-* if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
-*
-* if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUPMTR overwrites the general complex M-by-N matrix C with
+*>
+*> SIDE = 'L' SIDE = 'R'
+*> TRANS = 'N': Q * C C * Q
+*> TRANS = 'C': Q**H * C C * Q**H
+*>
+*> where Q is a complex unitary matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by ZHPTRD using packed
+*> storage:
+*>
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SIDE (input) CHARACTER*1
-* = 'L': apply Q or Q**H from the Left;
-* = 'R': apply Q or Q**H from the Right.
-*
-* UPLO (input) CHARACTER*1
-* = 'U': Upper triangular packed storage used in previous
-* call to ZHPTRD;
-* = 'L': Lower triangular packed storage used in previous
-* call to ZHPTRD.
-*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, apply Q;
-* = 'C': Conjugate transpose, apply Q**H.
-*
-* M (input) INTEGER
-* The number of rows of the matrix C. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix C. N >= 0.
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> = 'L': apply Q or Q**H from the Left;
+*> = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> = 'U': Upper triangular packed storage used in previous
+*> call to ZHPTRD;
+*> = 'L': Lower triangular packed storage used in previous
+*> call to ZHPTRD.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, apply Q;
+*> = 'C': Conjugate transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension
+*> (M*(M+1)/2) if SIDE = 'L'
+*> (N*(N+1)/2) if SIDE = 'R'
+*> The vectors which define the elementary reflectors, as
+*> returned by ZHPTRD. AP is modified by the routine but
+*> restored on exit.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M-1) if SIDE = 'L'
+*> or (N-1) if SIDE = 'R'
+*> TAU(i) must contain the scalar factor of the elementary
+*> reflector H(i), as returned by ZHPTRD.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> On entry, the M-by-N matrix C.
+*> On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (N) if SIDE = 'L'
+*> (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AP (input) COMPLEX*16 array, dimension
-* (M*(M+1)/2) if SIDE = 'L'
-* (N*(N+1)/2) if SIDE = 'R'
-* The vectors which define the elementary reflectors, as
-* returned by ZHPTRD. AP is modified by the routine but
-* restored on exit.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (M-1) if SIDE = 'L'
-* or (N-1) if SIDE = 'R'
-* TAU(i) must contain the scalar factor of the elementary
-* reflector H(i), as returned by ZHPTRD.
+*> \date November 2011
*
-* C (input/output) COMPLEX*16 array, dimension (LDC,N)
-* On entry, the M-by-N matrix C.
-* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \ingroup complex16OTHERcomputational
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+* =====================================================================
+ SUBROUTINE ZUPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
+ $ INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (N) if SIDE = 'L'
-* (M) if SIDE = 'R'
+* -- LAPACK computational routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER SIDE, TRANS, UPLO
+ INTEGER INFO, LDC, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AP( * ), C( LDC, * ), TAU( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/alahdg.f b/TESTING/EIG/alahdg.f
index 94467b7d..2befca1a 100644
--- a/TESTING/EIG/alahdg.f
+++ b/TESTING/EIG/alahdg.f
@@ -1,35 +1,78 @@
- SUBROUTINE ALAHDG( IOUNIT, PATH )
+*> \brief \b ALAHDG
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER IOUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ALAHDG( IOUNIT, PATH )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER IOUNIT
+* ..
+*
* Purpose
* =======
*
-* ALAHDG prints header information for the different test paths.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALAHDG prints header information for the different test paths.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IOUNIT (input) INTEGER
-* The unit number to which the header information should be
-* printed.
-*
-* PATH (input) CHARACTER*3
-* The name of the path for which the header information is to
-* be printed. Current paths are
-* GQR: GQR (general matrices)
-* GRQ: GRQ (general matrices)
-* LSE: LSE Problem
-* GLM: GLM Problem
-* GSV: Generalized Singular Value Decomposition
-* CSD: CS Decomposition
+*> \param[in] IOUNIT
+*> \verbatim
+*> IOUNIT is INTEGER
+*> The unit number to which the header information should be
+*> printed.
+*> \endverbatim
+*>
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The name of the path for which the header information is to
+*> be printed. Current paths are
+*> GQR: GQR (general matrices)
+*> GRQ: GRQ (general matrices)
+*> LSE: LSE Problem
+*> GLM: GLM Problem
+*> GSV: Generalized Singular Value Decomposition
+*> CSD: CS Decomposition
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_eig
+*
+* =====================================================================
+ SUBROUTINE ALAHDG( IOUNIT, PATH )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER IOUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/alareq.f b/TESTING/EIG/alareq.f
index b42cb20e..fc29edcc 100644
--- a/TESTING/EIG/alareq.f
+++ b/TESTING/EIG/alareq.f
@@ -1,51 +1,109 @@
- SUBROUTINE ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NIN, NMATS, NOUT, NTYPES
-* ..
-* .. Array Arguments ..
- LOGICAL DOTYPE( * )
-* ..
-*
+*> \brief \b ALAREQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NIN, NMATS, NOUT, NTYPES
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* ..
+*
* Purpose
* =======
*
-* ALAREQ handles input for the LAPACK test program. It is called
-* to evaluate the input line which requested NMATS matrix types for
-* PATH. The flow of control is as follows:
-*
-* If NMATS = NTYPES then
-* DOTYPE(1:NTYPES) = .TRUE.
-* else
-* Read the next input line for NMATS matrix types
-* Set DOTYPE(I) = .TRUE. for each valid type I
-* endif
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALAREQ handles input for the LAPACK test program. It is called
+*> to evaluate the input line which requested NMATS matrix types for
+*> PATH. The flow of control is as follows:
+*>
+*> If NMATS = NTYPES then
+*> DOTYPE(1:NTYPES) = .TRUE.
+*> else
+*> Read the next input line for NMATS matrix types
+*> Set DOTYPE(I) = .TRUE. for each valid type I
+*> endif
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* An LAPACK path name for testing.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> An LAPACK path name for testing.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be used in testing this path.
+*> \endverbatim
+*>
+*> \param[out] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The vector of flags indicating if each type will be tested.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The maximum number of matrix types for this path.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input. NIN >= 1.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output. NOUT >= 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NMATS (input) INTEGER
-* The number of matrix types to be used in testing this path.
+*> \date November 2011
*
-* DOTYPE (output) LOGICAL array, dimension (NTYPES)
-* The vector of flags indicating if each type will be tested.
+*> \ingroup aux_eig
*
-* NTYPES (input) INTEGER
-* The maximum number of matrix types for this path.
+* =====================================================================
+ SUBROUTINE ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
*
-* NIN (input) INTEGER
-* The unit number for input. NIN >= 1.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* NOUT (input) INTEGER
-* The unit number for output. NOUT >= 1.
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NIN, NMATS, NOUT, NTYPES
+* ..
+* .. Array Arguments ..
+ LOGICAL DOTYPE( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/alarqg.f b/TESTING/EIG/alarqg.f
index 7ca0f5fa..7aa1fc1c 100644
--- a/TESTING/EIG/alarqg.f
+++ b/TESTING/EIG/alarqg.f
@@ -1,51 +1,109 @@
- SUBROUTINE ALARQG( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NIN, NMATS, NOUT, NTYPES
-* ..
-* .. Array Arguments ..
- LOGICAL DOTYPE( * )
-* ..
-*
+*> \brief \b ALARQG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ALARQG( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NIN, NMATS, NOUT, NTYPES
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* ..
+*
* Purpose
* =======
*
-* ALARQG handles input for the LAPACK test program. It is called
-* to evaluate the input line which requested NMATS matrix types for
-* PATH. The flow of control is as follows:
-*
-* If NMATS = NTYPES then
-* DOTYPE(1:NTYPES) = .TRUE.
-* else
-* Read the next input line for NMATS matrix types
-* Set DOTYPE(I) = .TRUE. for each valid type I
-* endif
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALARQG handles input for the LAPACK test program. It is called
+*> to evaluate the input line which requested NMATS matrix types for
+*> PATH. The flow of control is as follows:
+*>
+*> If NMATS = NTYPES then
+*> DOTYPE(1:NTYPES) = .TRUE.
+*> else
+*> Read the next input line for NMATS matrix types
+*> Set DOTYPE(I) = .TRUE. for each valid type I
+*> endif
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* An LAPACK path name for testing.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> An LAPACK path name for testing.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be used in testing this path.
+*> \endverbatim
+*>
+*> \param[out] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The vector of flags indicating if each type will be tested.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The maximum number of matrix types for this path.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input. NIN >= 1.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output. NOUT >= 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NMATS (input) INTEGER
-* The number of matrix types to be used in testing this path.
+*> \date November 2011
*
-* DOTYPE (output) LOGICAL array, dimension (NTYPES)
-* The vector of flags indicating if each type will be tested.
+*> \ingroup aux_eig
*
-* NTYPES (input) INTEGER
-* The maximum number of matrix types for this path.
+* =====================================================================
+ SUBROUTINE ALARQG( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
*
-* NIN (input) INTEGER
-* The unit number for input. NIN >= 1.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* NOUT (input) INTEGER
-* The unit number for output. NOUT >= 1.
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NIN, NMATS, NOUT, NTYPES
+* ..
+* .. Array Arguments ..
+ LOGICAL DOTYPE( * )
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/alasmg.f b/TESTING/EIG/alasmg.f
index be0000e6..e7face92 100644
--- a/TESTING/EIG/alasmg.f
+++ b/TESTING/EIG/alasmg.f
@@ -1,37 +1,89 @@
- SUBROUTINE ALASMG( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*> \brief \b ALASMG
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 TYPE
- INTEGER NFAIL, NOUT, NRUN, NERRS
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ALASMG( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
+*
* Purpose
* =======
*
-* ALASMG prints a summary of results from one of the -CHK- routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALASMG prints a summary of results from one of the -CHK- routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) CHARACTER*3
-* The LAPACK path name.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number on which results are to be printed.
+*> NOUT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NFAIL
+*> \verbatim
+*> NFAIL is INTEGER
+*> The number of tests which did not pass the threshold ratio.
+*> \endverbatim
+*>
+*> \param[in] NRUN
+*> \verbatim
+*> NRUN is INTEGER
+*> The total number of tests.
+*> \endverbatim
+*>
+*> \param[in] NERRS
+*> \verbatim
+*> NERRS is INTEGER
+*> The number of error messages recorded.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The unit number on which results are to be printed.
-* NOUT >= 0.
+*> \ingroup aux_eig
*
-* NFAIL (input) INTEGER
-* The number of tests which did not pass the threshold ratio.
+* =====================================================================
+ SUBROUTINE ALASMG( TYPE, NOUT, NFAIL, NRUN, NERRS )
*
-* NRUN (input) INTEGER
-* The total number of tests.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* NERRS (input) INTEGER
-* The number of error messages recorded.
+* .. Scalar Arguments ..
+ CHARACTER*3 TYPE
+ INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/alasum.f b/TESTING/EIG/alasum.f
index 057da15e..47c60f11 100644
--- a/TESTING/EIG/alasum.f
+++ b/TESTING/EIG/alasum.f
@@ -1,37 +1,89 @@
- SUBROUTINE ALASUM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*> \brief \b ALASUM
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 TYPE
- INTEGER NFAIL, NOUT, NRUN, NERRS
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ALASUM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
+*
* Purpose
* =======
*
-* ALASUM prints a summary of results from one of the -CHK- routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALASUM prints a summary of results from one of the -CHK- routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) CHARACTER*3
-* The LAPACK path name.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number on which results are to be printed.
+*> NOUT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NFAIL
+*> \verbatim
+*> NFAIL is INTEGER
+*> The number of tests which did not pass the threshold ratio.
+*> \endverbatim
+*>
+*> \param[in] NRUN
+*> \verbatim
+*> NRUN is INTEGER
+*> The total number of tests.
+*> \endverbatim
+*>
+*> \param[in] NERRS
+*> \verbatim
+*> NERRS is INTEGER
+*> The number of error messages recorded.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NOUT (input) INTEGER
-* The unit number on which results are to be printed.
-* NOUT >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NFAIL (input) INTEGER
-* The number of tests which did not pass the threshold ratio.
+*> \date November 2011
*
-* NRUN (input) INTEGER
-* The total number of tests.
+*> \ingroup aux_eig
*
-* NERRS (input) INTEGER
-* The number of error messages recorded.
+* =====================================================================
+ SUBROUTINE ALASUM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 TYPE
+ INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/alasvm.f b/TESTING/EIG/alasvm.f
index 123e2183..b30db3d5 100644
--- a/TESTING/EIG/alasvm.f
+++ b/TESTING/EIG/alasvm.f
@@ -1,37 +1,89 @@
- SUBROUTINE ALASVM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*> \brief \b ALASVM
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 TYPE
- INTEGER NFAIL, NOUT, NRUN, NERRS
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ALASVM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
+*
* Purpose
* =======
*
-* ALASVM prints a summary of results from one of the -DRV- routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALASVM prints a summary of results from one of the -DRV- routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) CHARACTER*3
-* The LAPACK path name.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number on which results are to be printed.
+*> NOUT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NFAIL
+*> \verbatim
+*> NFAIL is INTEGER
+*> The number of tests which did not pass the threshold ratio.
+*> \endverbatim
+*>
+*> \param[in] NRUN
+*> \verbatim
+*> NRUN is INTEGER
+*> The total number of tests.
+*> \endverbatim
+*>
+*> \param[in] NERRS
+*> \verbatim
+*> NERRS is INTEGER
+*> The number of error messages recorded.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NOUT (input) INTEGER
-* The unit number on which results are to be printed.
-* NOUT >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NFAIL (input) INTEGER
-* The number of tests which did not pass the threshold ratio.
+*> \date November 2011
*
-* NRUN (input) INTEGER
-* The total number of tests.
+*> \ingroup aux_eig
*
-* NERRS (input) INTEGER
-* The number of error messages recorded.
+* =====================================================================
+ SUBROUTINE ALASVM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 TYPE
+ INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cbdt01.f b/TESTING/EIG/cbdt01.f
index df4c2fc9..b5c21189 100644
--- a/TESTING/EIG/cbdt01.f
+++ b/TESTING/EIG/cbdt01.f
@@ -1,9 +1,157 @@
+*> \brief \b CBDT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER KD, LDA, LDPT, LDQ, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), RWORK( * )
+* COMPLEX A( LDA, * ), PT( LDPT, * ), Q( LDQ, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CBDT01 reconstructs a general matrix A from its bidiagonal form
+*> A = Q * B * P'
+*> where Q (m by min(m,n)) and P' (min(m,n) by n) are unitary
+*> matrices and B is bidiagonal.
+*>
+*> The test ratio to test the reduction is
+*> RESID = norm( A - Q * B * PT ) / ( n * norm(A) * EPS )
+*> where PT = P' and EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and P'.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> If KD = 0, B is diagonal and the array E is not referenced.
+*> If KD = 1, the reduction was performed by xGEBRD; B is upper
+*> bidiagonal if M >= N, and lower bidiagonal if M < N.
+*> If KD = -1, the reduction was performed by xGBBRD; B is
+*> always upper bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> The m by min(m,n) unitary matrix Q in the reduction
+*> A = Q * B * P'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (min(M,N)-1)
+*> The superdiagonal elements of the bidiagonal matrix B if
+*> m >= n, or the subdiagonal elements of B if m < n.
+*> \endverbatim
+*>
+*> \param[in] PT
+*> \verbatim
+*> PT is COMPLEX array, dimension (LDPT,N)
+*> The min(m,n) by n unitary matrix P' in the reduction
+*> A = Q * B * P'.
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the array PT.
+*> LDPT >= max(1,min(M,N)).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (M+N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The test ratio: norm(A - Q * B * P') / ( n * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KD, LDA, LDPT, LDQ, M, N
@@ -15,69 +163,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CBDT01 reconstructs a general matrix A from its bidiagonal form
-* A = Q * B * P'
-* where Q (m by min(m,n)) and P' (min(m,n) by n) are unitary
-* matrices and B is bidiagonal.
-*
-* The test ratio to test the reduction is
-* RESID = norm( A - Q * B * PT ) / ( n * norm(A) * EPS )
-* where PT = P' and EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrices A and Q.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and P'.
-*
-* KD (input) INTEGER
-* If KD = 0, B is diagonal and the array E is not referenced.
-* If KD = 1, the reduction was performed by xGEBRD; B is upper
-* bidiagonal if M >= N, and lower bidiagonal if M < N.
-* If KD = -1, the reduction was performed by xGBBRD; B is
-* always upper bidiagonal.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* Q (input) COMPLEX array, dimension (LDQ,N)
-* The m by min(m,n) unitary matrix Q in the reduction
-* A = Q * B * P'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,M).
-*
-* D (input) REAL array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B.
-*
-* E (input) REAL array, dimension (min(M,N)-1)
-* The superdiagonal elements of the bidiagonal matrix B if
-* m >= n, or the subdiagonal elements of B if m < n.
-*
-* PT (input) COMPLEX array, dimension (LDPT,N)
-* The min(m,n) by n unitary matrix P' in the reduction
-* A = Q * B * P'.
-*
-* LDPT (input) INTEGER
-* The leading dimension of the array PT.
-* LDPT >= max(1,min(M,N)).
-*
-* WORK (workspace) COMPLEX array, dimension (M+N)
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESID (output) REAL
-* The test ratio: norm(A - Q * B * P') / ( n * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cbdt02.f b/TESTING/EIG/cbdt02.f
index d10fe3fd..d0909ebd 100644
--- a/TESTING/EIG/cbdt02.f
+++ b/TESTING/EIG/cbdt02.f
@@ -1,9 +1,130 @@
+*> \brief \b CBDT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDC, LDU, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX B( LDB, * ), C( LDC, * ), U( LDU, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CBDT02 tests the change of basis C = U' * B by computing the residual
+*>
+*> RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+*>
+*> where B and C are M by N matrices, U is an M by M orthogonal matrix,
+*> and EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices B and C and the order of
+*> the matrix Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices B and C.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> The m by n matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> The m by n matrix C, assumed to contain U' * B.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,M)
+*> The m by m orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDB, LDC, LDU, M, N
@@ -15,51 +136,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CBDT02 tests the change of basis C = U' * B by computing the residual
-*
-* RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
-*
-* where B and C are M by N matrices, U is an M by M orthogonal matrix,
-* and EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrices B and C and the order of
-* the matrix Q.
-*
-* N (input) INTEGER
-* The number of columns of the matrices B and C.
-*
-* B (input) COMPLEX array, dimension (LDB,N)
-* The m by n matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
-*
-* C (input) COMPLEX array, dimension (LDC,N)
-* The m by n matrix C, assumed to contain U' * B.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* U (input) COMPLEX array, dimension (LDU,M)
-* The m by m orthogonal matrix U.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
-*
-* WORK (workspace) COMPLEX array, dimension (M)
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESID (output) REAL
-* RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cbdt03.f b/TESTING/EIG/cbdt03.f
index f4405d01..ad26cf7d 100644
--- a/TESTING/EIG/cbdt03.f
+++ b/TESTING/EIG/cbdt03.f
@@ -1,9 +1,146 @@
+*> \brief \b CBDT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CBDT03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDU, LDVT, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), S( * )
+* COMPLEX U( LDU, * ), VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CBDT03 reconstructs a bidiagonal matrix B from its SVD:
+*> S = U' * B * V
+*> where U and V are orthogonal matrices and S is diagonal.
+*>
+*> The test ratio to test the singular value decomposition is
+*> RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS )
+*> where VT = V' and EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix B is upper or lower bidiagonal.
+*> = 'U': Upper bidiagonal
+*> = 'L': Lower bidiagonal
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The bandwidth of the bidiagonal matrix B. If KD = 1, the
+*> matrix B is bidiagonal, and if KD = 0, B is diagonal and E is
+*> not referenced. If KD is greater than 1, it is assumed to be
+*> 1, and if KD is less than 0, it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) superdiagonal elements of the bidiagonal matrix B
+*> if UPLO = 'U', or the (n-1) subdiagonal elements of B if
+*> UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,N)
+*> The n by n orthogonal matrix U in the reduction B = U'*A*P.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The singular values from the SVD of B, sorted in decreasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in] VT
+*> \verbatim
+*> VT is COMPLEX array, dimension (LDVT,N)
+*> The n by n orthogonal matrix V' in the reduction
+*> B = U * S * V'.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CBDT03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,64 +152,6 @@
COMPLEX U( LDU, * ), VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CBDT03 reconstructs a bidiagonal matrix B from its SVD:
-* S = U' * B * V
-* where U and V are orthogonal matrices and S is diagonal.
-*
-* The test ratio to test the singular value decomposition is
-* RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS )
-* where VT = V' and EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix B is upper or lower bidiagonal.
-* = 'U': Upper bidiagonal
-* = 'L': Lower bidiagonal
-*
-* N (input) INTEGER
-* The order of the matrix B.
-*
-* KD (input) INTEGER
-* The bandwidth of the bidiagonal matrix B. If KD = 1, the
-* matrix B is bidiagonal, and if KD = 0, B is diagonal and E is
-* not referenced. If KD is greater than 1, it is assumed to be
-* 1, and if KD is less than 0, it is assumed to be 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the bidiagonal matrix B.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) superdiagonal elements of the bidiagonal matrix B
-* if UPLO = 'U', or the (n-1) subdiagonal elements of B if
-* UPLO = 'L'.
-*
-* U (input) COMPLEX array, dimension (LDU,N)
-* The n by n orthogonal matrix U in the reduction B = U'*A*P.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,N)
-*
-* S (input) REAL array, dimension (N)
-* The singular values from the SVD of B, sorted in decreasing
-* order.
-*
-* VT (input) COMPLEX array, dimension (LDVT,N)
-* The n by n orthogonal matrix V' in the reduction
-* B = U * S * V'.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RESID (output) REAL
-* The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS )
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cchkbb.f b/TESTING/EIG/cchkbb.f
index a10d3267..a930fc10 100644
--- a/TESTING/EIG/cchkbb.f
+++ b/TESTING/EIG/cchkbb.f
@@ -1,11 +1,375 @@
+*> \brief \b CCHKBB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKBB( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
+* NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
+* BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
+* LWORK, RWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
+* $ NRHS, NSIZES, NTYPES, NWDTHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), KK( * ), MVAL( * ), NVAL( * )
+* REAL BD( * ), BE( * ), RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AB( LDAB, * ), C( LDC, * ),
+* $ CC( LDC, * ), P( LDP, * ), Q( LDQ, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKBB tests the reduction of a general complex rectangular band
+*> matrix to real bidiagonal form.
+*>
+*> CGBBRD factors a general band matrix A as Q B P* , where * means
+*> conjugate transpose, B is upper bidiagonal, and Q and P are unitary;
+*> CGBBRD can also overwrite a given matrix C with Q* C .
+*>
+*> For each pair of matrix dimensions (M,N) and each selected matrix
+*> type, an M by N matrix A and an M by NRHS matrix C are generated.
+*> The problem dimensions are as follows
+*> A: M x N
+*> Q: M x M
+*> P: N x N
+*> B: min(M,N) x min(M,N)
+*> C: M x NRHS
+*>
+*> For each generated matrix, 4 tests are performed:
+*>
+*> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
+*>
+*> (2) | I - Q' Q | / ( M ulp )
+*>
+*> (3) | I - PT PT' | / ( N ulp )
+*>
+*> (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
+*>
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> The possible matrix types are
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (3), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (3), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U D V, where U and V are orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U D V, where U and V are orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Rectangular matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of values of M and N contained in the vectors
+*> MVAL and NVAL. The matrix sizes are used in pairs (M,N).
+*> If NSIZES is zero, CCHKBB does nothing. NSIZES must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NSIZES)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NSIZES)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NWDTHS
+*> \verbatim
+*> NWDTHS is INTEGER
+*> The number of bandwidths to use. If it is zero,
+*> CCHKBB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KK
+*> \verbatim
+*> KK is INTEGER array, dimension (NWDTHS)
+*> An array containing the bandwidths to be used for the band
+*> matrices. The values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CCHKBB
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns in the "right-hand side" matrix C.
+*> If NRHS = 0, then the operations on the right-hand side will
+*> not be tested. NRHS must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CCHKBB to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA, max(NN))
+*> Used to hold the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB, max(NN))
+*> Used to hold A in band storage format.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of AB. It must be at least 2 (not 1!)
+*> and at least max( KK )+1.
+*> \endverbatim
+*>
+*> \param[out] BD
+*> \verbatim
+*> BD is REAL array, dimension (max(NN))
+*> Used to hold the diagonal of the bidiagonal matrix computed
+*> by CGBBRD.
+*> \endverbatim
+*>
+*> \param[out] BE
+*> \verbatim
+*> BE is REAL array, dimension (max(NN))
+*> Used to hold the off-diagonal of the bidiagonal matrix
+*> computed by CGBBRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ, max(NN))
+*> Used to hold the unitary matrix Q computed by CGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] P
+*> \verbatim
+*> P is COMPLEX array, dimension (LDP, max(NN))
+*> Used to hold the unitary matrix P computed by CGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDP
+*> \verbatim
+*> LDP is INTEGER
+*> The leading dimension of P. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, max(NN))
+*> Used to hold the matrix C updated by CGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of U. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX array, dimension (LDC, max(NN))
+*> Used to hold a copy of the matrix C.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( LDA+1, max(NN)+1 )*max(NN).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCHKBB( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
$ NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
$ BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
$ LWORK, RWORK, RESULT, INFO )
*
-* -- LAPACK test routine (new routine for release 2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
@@ -21,231 +385,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKBB tests the reduction of a general complex rectangular band
-* matrix to real bidiagonal form.
-*
-* CGBBRD factors a general band matrix A as Q B P* , where * means
-* conjugate transpose, B is upper bidiagonal, and Q and P are unitary;
-* CGBBRD can also overwrite a given matrix C with Q* C .
-*
-* For each pair of matrix dimensions (M,N) and each selected matrix
-* type, an M by N matrix A and an M by NRHS matrix C are generated.
-* The problem dimensions are as follows
-* A: M x N
-* Q: M x M
-* P: N x N
-* B: min(M,N) x min(M,N)
-* C: M x NRHS
-*
-* For each generated matrix, 4 tests are performed:
-*
-* (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
-*
-* (2) | I - Q' Q | / ( M ulp )
-*
-* (3) | I - PT PT' | / ( N ulp )
-*
-* (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
-*
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* The possible matrix types are
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (3), but multiplied by SQRT( overflow threshold )
-* (7) Same as (3), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U D V, where U and V are orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U D V, where U and V are orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Rectangular matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of values of M and N contained in the vectors
-* MVAL and NVAL. The matrix sizes are used in pairs (M,N).
-* If NSIZES is zero, CCHKBB does nothing. NSIZES must be at
-* least zero.
-*
-* MVAL (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix row dimension M.
-*
-* NVAL (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix column dimension N.
-*
-* NWDTHS (input) INTEGER
-* The number of bandwidths to use. If it is zero,
-* CCHKBB does nothing. It must be at least zero.
-*
-* KK (input) INTEGER array, dimension (NWDTHS)
-* An array containing the bandwidths to be used for the band
-* matrices. The values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CCHKBB
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* NRHS (input) INTEGER
-* The number of columns in the "right-hand side" matrix C.
-* If NRHS = 0, then the operations on the right-hand side will
-* not be tested. NRHS must be at least 0.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CCHKBB to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) REAL array, dimension
-* (LDA, max(NN))
-* Used to hold the matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least max( NN ).
-*
-* AB (workspace) REAL array, dimension (LDAB, max(NN))
-* Used to hold A in band storage format.
-*
-* LDAB (input) INTEGER
-* The leading dimension of AB. It must be at least 2 (not 1!)
-* and at least max( KK )+1.
-*
-* BD (workspace) REAL array, dimension (max(NN))
-* Used to hold the diagonal of the bidiagonal matrix computed
-* by CGBBRD.
-*
-* BE (workspace) REAL array, dimension (max(NN))
-* Used to hold the off-diagonal of the bidiagonal matrix
-* computed by CGBBRD.
-*
-* Q (workspace) COMPLEX array, dimension (LDQ, max(NN))
-* Used to hold the unitary matrix Q computed by CGBBRD.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q. It must be at least 1
-* and at least max( NN ).
-*
-* P (workspace) COMPLEX array, dimension (LDP, max(NN))
-* Used to hold the unitary matrix P computed by CGBBRD.
-*
-* LDP (input) INTEGER
-* The leading dimension of P. It must be at least 1
-* and at least max( NN ).
-*
-* C (workspace) COMPLEX array, dimension (LDC, max(NN))
-* Used to hold the matrix C updated by CGBBRD.
-*
-* LDC (input) INTEGER
-* The leading dimension of U. It must be at least 1
-* and at least max( NN ).
-*
-* CC (workspace) COMPLEX array, dimension (LDC, max(NN))
-* Used to hold a copy of the matrix C.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( LDA+1, max(NN)+1 )*max(NN).
-*
-* RWORK (workspace) REAL array, dimension (max(NN))
-*
-* RESULT (output) REAL array, dimension (4)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cchkbd.f b/TESTING/EIG/cchkbd.f
index c141a8d1..c2679caf 100644
--- a/TESTING/EIG/cchkbd.f
+++ b/TESTING/EIG/cchkbd.f
@@ -1,11 +1,431 @@
+*> \brief \b CCHKBD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
+* ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
+* Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
+* RWORK, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
+* $ NSIZES, NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * )
+* REAL BD( * ), BE( * ), RWORK( * ), S1( * ), S2( * )
+* COMPLEX A( LDA, * ), PT( LDPT, * ), Q( LDQ, * ),
+* $ U( LDPT, * ), VT( LDPT, * ), WORK( * ),
+* $ X( LDX, * ), Y( LDX, * ), Z( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKBD checks the singular value decomposition (SVD) routines.
+*>
+*> CGEBRD reduces a complex general m by n matrix A to real upper or
+*> lower bidiagonal form by an orthogonal transformation: Q' * A * P = B
+*> (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
+*> and lower bidiagonal if m < n.
+*>
+*> CUNGBR generates the orthogonal matrices Q and P' from CGEBRD.
+*> Note that Q and P are not necessarily square.
+*>
+*> CBDSQR computes the singular value decomposition of the bidiagonal
+*> matrix B as B = U S V'. It is called three times to compute
+*> 1) B = U S1 V', where S1 is the diagonal matrix of singular
+*> values and the columns of the matrices U and V are the left
+*> and right singular vectors, respectively, of B.
+*> 2) Same as 1), but the singular values are stored in S2 and the
+*> singular vectors are not computed.
+*> 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
+*> In addition, CBDSQR has an option to apply the left orthogonal matrix
+*> U to a matrix X, useful in least squares applications.
+*>
+*> For each pair of matrix dimensions (M,N) and each selected matrix
+*> type, an M by N matrix A and an M by NRHS matrix X are generated.
+*> The problem dimensions are as follows
+*> A: M x N
+*> Q: M x min(M,N) (but M x M if NRHS > 0)
+*> P: min(M,N) x N
+*> B: min(M,N) x min(M,N)
+*> U, V: min(M,N) x min(M,N)
+*> S1, S2 diagonal, order min(M,N)
+*> X: M x NRHS
+*>
+*> For each generated matrix, 14 tests are performed:
+*>
+*> Test CGEBRD and CUNGBR
+*>
+*> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
+*>
+*> (2) | I - Q' Q | / ( M ulp )
+*>
+*> (3) | I - PT PT' | / ( N ulp )
+*>
+*> Test CBDSQR on bidiagonal matrix B
+*>
+*> (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
+*>
+*> (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
+*> and Z = U' Y.
+*> (6) | I - U' U | / ( min(M,N) ulp )
+*>
+*> (7) | I - VT VT' | / ( min(M,N) ulp )
+*>
+*> (8) S1 contains min(M,N) nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (9) 0 if the true singular values of B are within THRESH of
+*> those in S1. 2*THRESH if they are not. (Tested using
+*> SSVDCH)
+*>
+*> (10) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
+*> computing U and V.
+*>
+*> Test CBDSQR on matrix A
+*>
+*> (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
+*>
+*> (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
+*>
+*> (13) | I - (QU)'(QU) | / ( M ulp )
+*>
+*> (14) | I - (VT PT) (PT'VT') | / ( N ulp )
+*>
+*> The possible matrix types are
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (3), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (3), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U D V, where U and V are orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U D V, where U and V are orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Rectangular matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*> Special case:
+*> (16) A bidiagonal matrix with random entries chosen from a
+*> logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
+*> entry is e^x, where x is chosen uniformly on
+*> [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
+*> (a) CGEBRD is not called to reduce it to bidiagonal form.
+*> (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
+*> matrix will be lower bidiagonal, otherwise upper.
+*> (c) only tests 5--8 and 14 are performed.
+*>
+*> A subset of the full set of matrix types may be selected through
+*> the logical array DOTYPE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of values of M and N contained in the vectors
+*> MVAL and NVAL. The matrix sizes are used in pairs (M,N).
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NM)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CCHKBD
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrices are in A and B.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
+*> of type j will be generated. If NTYPES is smaller than the
+*> maximum number of types defined (PARAMETER MAXTYP), then
+*> types NTYPES+1 through MAXTYP will not be generated. If
+*> NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
+*> DOTYPE(NTYPES) will be ignored.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns in the "right-hand side" matrices X, Y,
+*> and Z, used in testing CBDSQR. If NRHS = 0, then the
+*> operations on the right-hand side will not be tested.
+*> NRHS must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The values of ISEED are changed on exit, and can be
+*> used in the next call to CCHKBD to continue the same random
+*> number sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0. Note that the
+*> expected value of the test ratios is O(1), so THRESH should
+*> be a reasonably small multiple of 1, e.g., 10 or 100.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,NMAX)
+*> where NMAX is the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,MMAX),
+*> where MMAX is the maximum value of M in MVAL.
+*> \endverbatim
+*>
+*> \param[out] BD
+*> \verbatim
+*> BD is REAL array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] BE
+*> \verbatim
+*> BE is REAL array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] S1
+*> \verbatim
+*> S1 is REAL array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is REAL array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the arrays X, Y, and Z.
+*> LDX >= max(1,MMAX).
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,MMAX)
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,MMAX).
+*> \endverbatim
+*>
+*> \param[out] PT
+*> \verbatim
+*> PT is COMPLEX array, dimension (LDPT,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the arrays PT, U, and V.
+*> LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension
+*> (LDPT,max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension
+*> (LDPT,max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all
+*> pairs (M,N)=(MM(j),NN(j))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (5*max(min(M,N)))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some MM(j) < 0
+*> -3: Some NN(j) < 0
+*> -4: NTYPES < 0
+*> -6: NRHS < 0
+*> -8: THRESH < 0
+*> -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
+*> -17: LDB < 1 or LDB < MMAX.
+*> -21: LDQ < 1 or LDQ < MMAX.
+*> -23: LDP < 1 or LDP < MNMAX.
+*> -27: LWORK too small.
+*> If CLATMR, CLATMS, CGEBRD, CUNGBR, or CBDSQR,
+*> returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> MMAX Largest value in NN.
+*> NMAX Largest value in NN.
+*> MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal
+*> matrix.)
+*> MNMAX The maximum value of MNMIN for j=1,...,NSIZES.
+*> NFAIL The number of tests which have exceeded THRESH
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
$ ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
$ Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
$ RWORK, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
@@ -21,285 +441,6 @@
$ X( LDX, * ), Y( LDX, * ), Z( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKBD checks the singular value decomposition (SVD) routines.
-*
-* CGEBRD reduces a complex general m by n matrix A to real upper or
-* lower bidiagonal form by an orthogonal transformation: Q' * A * P = B
-* (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
-* and lower bidiagonal if m < n.
-*
-* CUNGBR generates the orthogonal matrices Q and P' from CGEBRD.
-* Note that Q and P are not necessarily square.
-*
-* CBDSQR computes the singular value decomposition of the bidiagonal
-* matrix B as B = U S V'. It is called three times to compute
-* 1) B = U S1 V', where S1 is the diagonal matrix of singular
-* values and the columns of the matrices U and V are the left
-* and right singular vectors, respectively, of B.
-* 2) Same as 1), but the singular values are stored in S2 and the
-* singular vectors are not computed.
-* 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
-* In addition, CBDSQR has an option to apply the left orthogonal matrix
-* U to a matrix X, useful in least squares applications.
-*
-* For each pair of matrix dimensions (M,N) and each selected matrix
-* type, an M by N matrix A and an M by NRHS matrix X are generated.
-* The problem dimensions are as follows
-* A: M x N
-* Q: M x min(M,N) (but M x M if NRHS > 0)
-* P: min(M,N) x N
-* B: min(M,N) x min(M,N)
-* U, V: min(M,N) x min(M,N)
-* S1, S2 diagonal, order min(M,N)
-* X: M x NRHS
-*
-* For each generated matrix, 14 tests are performed:
-*
-* Test CGEBRD and CUNGBR
-*
-* (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
-*
-* (2) | I - Q' Q | / ( M ulp )
-*
-* (3) | I - PT PT' | / ( N ulp )
-*
-* Test CBDSQR on bidiagonal matrix B
-*
-* (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
-*
-* (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
-* and Z = U' Y.
-* (6) | I - U' U | / ( min(M,N) ulp )
-*
-* (7) | I - VT VT' | / ( min(M,N) ulp )
-*
-* (8) S1 contains min(M,N) nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (9) 0 if the true singular values of B are within THRESH of
-* those in S1. 2*THRESH if they are not. (Tested using
-* SSVDCH)
-*
-* (10) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
-* computing U and V.
-*
-* Test CBDSQR on matrix A
-*
-* (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
-*
-* (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
-*
-* (13) | I - (QU)'(QU) | / ( M ulp )
-*
-* (14) | I - (VT PT) (PT'VT') | / ( N ulp )
-*
-* The possible matrix types are
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (3), but multiplied by SQRT( overflow threshold )
-* (7) Same as (3), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U D V, where U and V are orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U D V, where U and V are orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Rectangular matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Special case:
-* (16) A bidiagonal matrix with random entries chosen from a
-* logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
-* entry is e^x, where x is chosen uniformly on
-* [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
-* (a) CGEBRD is not called to reduce it to bidiagonal form.
-* (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
-* matrix will be lower bidiagonal, otherwise upper.
-* (c) only tests 5--8 and 14 are performed.
-*
-* A subset of the full set of matrix types may be selected through
-* the logical array DOTYPE.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of values of M and N contained in the vectors
-* MVAL and NVAL. The matrix sizes are used in pairs (M,N).
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix column dimension N.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CCHKBD
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrices are in A and B.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
-* of type j will be generated. If NTYPES is smaller than the
-* maximum number of types defined (PARAMETER MAXTYP), then
-* types NTYPES+1 through MAXTYP will not be generated. If
-* NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
-* DOTYPE(NTYPES) will be ignored.
-*
-* NRHS (input) INTEGER
-* The number of columns in the "right-hand side" matrices X, Y,
-* and Z, used in testing CBDSQR. If NRHS = 0, then the
-* operations on the right-hand side will not be tested.
-* NRHS must be at least 0.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The values of ISEED are changed on exit, and can be
-* used in the next call to CCHKBD to continue the same random
-* number sequence.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0. Note that the
-* expected value of the test ratios is O(1), so THRESH should
-* be a reasonably small multiple of 1, e.g., 10 or 100.
-*
-* A (workspace) COMPLEX array, dimension (LDA,NMAX)
-* where NMAX is the maximum value of N in NVAL.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,MMAX),
-* where MMAX is the maximum value of M in MVAL.
-*
-* BD (workspace) REAL array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* BE (workspace) REAL array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* S1 (workspace) REAL array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* S2 (workspace) REAL array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* X (workspace) COMPLEX array, dimension (LDX,NRHS)
-*
-* LDX (input) INTEGER
-* The leading dimension of the arrays X, Y, and Z.
-* LDX >= max(1,MMAX).
-*
-* Y (workspace) COMPLEX array, dimension (LDX,NRHS)
-*
-* Z (workspace) COMPLEX array, dimension (LDX,NRHS)
-*
-* Q (workspace) COMPLEX array, dimension (LDQ,MMAX)
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,MMAX).
-*
-* PT (workspace) COMPLEX array, dimension (LDPT,NMAX)
-*
-* LDPT (input) INTEGER
-* The leading dimension of the arrays PT, U, and V.
-* LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).
-*
-* U (workspace) COMPLEX array, dimension
-* (LDPT,max(min(MVAL(j),NVAL(j))))
-*
-* V (workspace) COMPLEX array, dimension
-* (LDPT,max(min(MVAL(j),NVAL(j))))
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all
-* pairs (M,N)=(MM(j),NN(j))
-*
-* RWORK (workspace) REAL array, dimension
-* (5*max(min(M,N)))
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some MM(j) < 0
-* -3: Some NN(j) < 0
-* -4: NTYPES < 0
-* -6: NRHS < 0
-* -8: THRESH < 0
-* -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
-* -17: LDB < 1 or LDB < MMAX.
-* -21: LDQ < 1 or LDQ < MMAX.
-* -23: LDP < 1 or LDP < MNMAX.
-* -27: LWORK too small.
-* If CLATMR, CLATMS, CGEBRD, CUNGBR, or CBDSQR,
-* returns an error code, the
-* absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* MMAX Largest value in NN.
-* NMAX Largest value in NN.
-* MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal
-* matrix.)
-* MNMAX The maximum value of MNMIN for j=1,...,NSIZES.
-* NFAIL The number of tests which have exceeded THRESH
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* ULP, ULPINV Finest relative precision and its inverse.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cchkbk.f b/TESTING/EIG/cchkbk.f
index 02cd00eb..fdc7d83d 100644
--- a/TESTING/EIG/cchkbk.f
+++ b/TESTING/EIG/cchkbk.f
@@ -1,28 +1,70 @@
- SUBROUTINE CCHKBK( NIN, NOUT )
+*> \brief \b CCHKBK
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKBK( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* CCHKBK tests CGEBAK, a routine for backward transformation of
-* the computed right or left eigenvectors if the orginal matrix
-* was preprocessed by balance subroutine CGEBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKBK tests CGEBAK, a routine for backward transformation of
+*> the computed right or left eigenvectors if the orginal matrix
+*> was preprocessed by balance subroutine CGEBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CCHKBK( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/cchkbl.f b/TESTING/EIG/cchkbl.f
index f038ef3e..ba05f916 100644
--- a/TESTING/EIG/cchkbl.f
+++ b/TESTING/EIG/cchkbl.f
@@ -1,27 +1,69 @@
- SUBROUTINE CCHKBL( NIN, NOUT )
+*> \brief \b CCHKBL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKBL( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* CCHKBL tests CGEBAL, a routine for balancing a general complex
-* matrix and isolating some of its eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKBL tests CGEBAL, a routine for balancing a general complex
+*> matrix and isolating some of its eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CCHKBL( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/cchkec.f b/TESTING/EIG/cchkec.f
index 2eab1c41..6ee67009 100644
--- a/TESTING/EIG/cchkec.f
+++ b/TESTING/EIG/cchkec.f
@@ -1,42 +1,92 @@
- SUBROUTINE CCHKEC( THRESH, TSTERR, NIN, NOUT )
+*> \brief \b CCHKEC
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL TSTERR
- INTEGER NIN, NOUT
- REAL THRESH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CCHKEC( THRESH, TSTERR, NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NIN, NOUT
+* REAL THRESH
+* ..
+*
* Purpose
* =======
*
-* CCHKEC tests eigen- condition estimation routines
-* CTRSYL, CTREXC, CTRSNA, CTRSEN
-*
-* In all cases, the routine runs through a fixed set of numerical
-* examples, subjects them to various tests, and compares the test
-* results to a threshold THRESH. In addition, CTRSNA and CTRSEN are
-* tested by reading in precomputed examples from a file (on input unit
-* NIN). Output is written to output unit NOUT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKEC tests eigen- condition estimation routines
+*> CTRSYL, CTREXC, CTRSNA, CTRSEN
+*>
+*> In all cases, the routine runs through a fixed set of numerical
+*> examples, subjects them to various tests, and compares the test
+*> results to a threshold THRESH. In addition, CTRSNA and CTRSEN are
+*> tested by reading in precomputed examples from a file (on input unit
+*> NIN). Output is written to output unit NOUT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* THRESH (input) REAL
-* Threshold for residual tests. A computed test ratio passes
-* the threshold if it is less than THRESH.
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> Threshold for residual tests. A computed test ratio passes
+*> the threshold if it is less than THRESH.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
+*> \date November 2011
*
-* NIN (input) INTEGER
-* The logical unit number for input.
+*> \ingroup complex_eig
*
-* NOUT (input) INTEGER
-* The logical unit number for output.
+* =====================================================================
+ SUBROUTINE CCHKEC( THRESH, TSTERR, NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NIN, NOUT
+ REAL THRESH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cchkee.f b/TESTING/EIG/cchkee.f
index 7370a65d..775534ca 100644
--- a/TESTING/EIG/cchkee.f
+++ b/TESTING/EIG/cchkee.f
@@ -1,1008 +1,1043 @@
- PROGRAM CCHKEE
-*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
-*
-* Purpose
-* =======
-*
-* CCHKEE tests the COMPLEX LAPACK subroutines for the matrix
-* eigenvalue problem. The test paths in this version are
-*
-* NEP (Nonsymmetric Eigenvalue Problem):
-* Test CGEHRD, CUNGHR, CHSEQR, CTREVC, CHSEIN, and CUNMHR
-*
-* SEP (Hermitian Eigenvalue Problem):
-* Test CHETRD, CUNGTR, CSTEQR, CSTERF, CSTEIN, CSTEDC,
-* and drivers CHEEV(X), CHBEV(X), CHPEV(X),
-* CHEEVD, CHBEVD, CHPEVD
-*
-* SVD (Singular Value Decomposition):
-* Test CGEBRD, CUNGBR, and CBDSQR
-* and the drivers CGESVD, CGESDD
-*
-* CEV (Nonsymmetric Eigenvalue/eigenvector Driver):
-* Test CGEEV
-*
-* CES (Nonsymmetric Schur form Driver):
-* Test CGEES
-*
-* CVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
-* Test CGEEVX
-*
-* CSX (Nonsymmetric Schur form Expert Driver):
-* Test CGEESX
-*
-* CGG (Generalized Nonsymmetric Eigenvalue Problem):
-* Test CGGHRD, CGGBAL, CGGBAK, CHGEQZ, and CTGEVC
-* and the driver routines CGEGS and CGEGV
-*
-* CGS (Generalized Nonsymmetric Schur form Driver):
-* Test CGGES
-*
-* CGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
-* Test CGGEV
-*
-* CGX (Generalized Nonsymmetric Schur form Expert Driver):
-* Test CGGESX
-*
-* CXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
-* Test CGGEVX
-*
-* CSG (Hermitian Generalized Eigenvalue Problem):
-* Test CHEGST, CHEGV, CHEGVD, CHEGVX, CHPGST, CHPGV, CHPGVD,
-* CHPGVX, CHBGST, CHBGV, CHBGVD, and CHBGVX
-*
-* CHB (Hermitian Band Eigenvalue Problem):
-* Test CHBTRD
-*
-* CBB (Band Singular Value Decomposition):
-* Test CGBBRD
-*
-* CEC (Eigencondition estimation):
-* Test CTRSYL, CTREXC, CTRSNA, and CTRSEN
-*
-* CBL (Balancing a general matrix)
-* Test CGEBAL
-*
-* CBK (Back transformation on a balanced matrix)
-* Test CGEBAK
-*
-* CGL (Balancing a matrix pair)
-* Test CGGBAL
-*
-* CGK (Back transformation on a matrix pair)
-* Test CGGBAK
-*
-* GLM (Generalized Linear Regression Model):
-* Tests CGGGLM
-*
-* GQR (Generalized QR and RQ factorizations):
-* Tests CGGQRF and CGGRQF
-*
-* GSV (Generalized Singular Value Decomposition):
-* Tests CGGSVD, CGGSVP, CTGSJA, CLAGS2, CLAPLL, and CLAPMT
-*
-* CSD (CS decomposition):
-* Tests CUNCSD
-*
-* LSE (Constrained Linear Least Squares):
-* Tests CGGLSE
-*
-* Each test path has a different set of inputs, but the data sets for
-* the driver routines xEV, xES, xVX, and xSX can be concatenated in a
-* single input file. The first line of input should contain one of the
-* 3-character path names in columns 1-3. The number of remaining lines
-* depends on what is found on the first line.
-*
-* The number of matrix types used in testing is often controllable from
-* the input file. The number of matrix types for each path, and the
-* test routine that describes them, is as follows:
-*
-* Path name(s) Types Test routine
-*
-* CHS or NEP 21 CCHKHS
-* CST or SEP 21 CCHKST (routines)
-* 18 CDRVST (drivers)
-* CBD or SVD 16 CCHKBD (routines)
-* 5 CDRVBD (drivers)
-* CEV 21 CDRVEV
-* CES 21 CDRVES
-* CVX 21 CDRVVX
-* CSX 21 CDRVSX
-* CGG 26 CCHKGG (routines)
-* 26 CDRVGG (drivers)
-* CGS 26 CDRGES
-* CGX 5 CDRGSX
-* CGV 26 CDRGEV
-* CXV 2 CDRGVX
-* CSG 21 CDRVSG
-* CHB 15 CCHKHB
-* CBB 15 CCHKBB
-* CEC - CCHKEC
-* CBL - CCHKBL
-* CBK - CCHKBK
-* CGL - CCHKGL
-* CGK - CCHKGK
-* GLM 8 CCKGLM
-* GQR 8 CCKGQR
-* GSV 8 CCKGSV
-* CSD 3 CCKCSD
-* LSE 8 CCKLSE
-*
-*-----------------------------------------------------------------------
-*
-* NEP input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, NX, NS, and
-* MAXB.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 7: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 8: INMIN, INTEGER array, dimension (NPARMS)
-* LAHQR vs TTQRE crossover point, >= 11
-*
-* line 9: INWIN, INTEGER array, dimension (NPARMS)
-* recommended deflation window size
-*
-* line 10: INIBL, INTEGER array, dimension (NPARMS)
-* nibble crossover point
-*
-* line 11: ISHFTS, INTEGER array, dimension (NPARMS)
-* number of simultaneous shifts)
-*
-* line 12: IACC22, INTEGER array, dimension (NPARMS)
-* select structured matrix multiply: 0, 1 or 2)
-*
-* line 13: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold. To have all of the test
-* ratios printed, use THRESH = 0.0 .
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
-* the user to specify the matrix types. Each line contains
-* a 3-character path name in columns 1-3, and the number
-* of matrix types must be the first nonblank item in columns
-* 4-80. If the number of matrix types is at least 1 but is
-* less than the maximum number of possible types, a second
-* line will be read to get the numbers of the matrix types to
-* be used. For example,
-* NEP 21
-* requests all of the matrix types for the nonsymmetric
-* eigenvalue problem, while
-* NEP 4
-* 9 10 11 12
-* requests only matrices of type 9, 10, 11, and 12.
-*
-* The valid 3-character path names are 'NEP' or 'CHS' for the
-* nonsymmetric eigenvalue routines.
-*
-*-----------------------------------------------------------------------
-*
-* SEP or CSG input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, and NX.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 7: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 8: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 9: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 10: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 11: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 12: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 12 was 2:
-*
-* line 13: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 13-EOF: Lines specifying matrix types, as for NEP.
-* The valid 3-character path names are 'SEP' or 'CST' for the
-* Hermitian eigenvalue routines and driver routines, and
-* 'CSG' for the routines for the Hermitian generalized
-* eigenvalue problem.
-*
-*-----------------------------------------------------------------------
-*
-* SVD input file:
-*
-* line 2: NN, INTEGER
-* Number of values of M and N.
-*
-* line 3: MVAL, INTEGER array, dimension (NN)
-* The values for the matrix row dimension M.
-*
-* line 4: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix column dimension N.
-*
-* line 5: NPARMS, INTEGER
-* Number of values of the parameter NB, NBMIN, NX, and NRHS.
-*
-* line 6: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 7: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 8: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 9: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of right hand sides NRHS.
-*
-* line 10: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 11: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 12: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 13: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 15-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path names are 'SVD' or 'CBD' for both the
-* SVD routines and the SVD driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* CEV and CES data files:
-*
-* line 1: 'CEV' or 'CES' in columns 1 to 3.
-*
-* line 2: NSIZES, INTEGER
-* Number of sizes of matrices to use. Should be at least 0
-* and at most 20. If NSIZES = 0, no testing is done
-* (although the remaining 3 lines are still read).
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-* Dimensions of matrices to be tested.
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHSEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 5: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* If it is 0., all test case data will be printed.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 8 and following: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'CEV' to test CGEEV, or
-* 'CES' to test CGEES.
-*
-*-----------------------------------------------------------------------
-*
-* The CVX data has two parts. The first part is identical to CEV,
-* and the second part consists of test matrices with precomputed
-* solutions.
-*
-* line 1: 'CVX' in columns 1-3.
-*
-* line 2: NSIZES, INTEGER
-* If NSIZES = 0, no testing of randomly generated examples
-* is done, but any precomputed examples are tested.
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-*
-* line 5: THRESH, REAL
-*
-* line 6: NEWSD, INTEGER
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-*
-* lines 8 and following: The first line contains 'CVX' in columns 1-3
-* followed by the number of matrix types, possibly with
-* a second line to specify certain matrix types.
-* If the number of matrix types = 0, no testing of randomly
-* generated examples is done, but any precomputed examples
-* are tested.
-*
-* remaining lines : Each matrix is stored on 1+N+N**2 lines, where N is
-* its dimension. The first line contains the dimension N and
-* ISRT (two integers). ISRT indicates whether the last N lines
-* are sorted by increasing real part of the eigenvalue
-* (ISRT=0) or by increasing imaginary part (ISRT=1). The next
-* N**2 lines contain the matrix rowwise, one entry per line.
-* The last N lines correspond to each eigenvalue. Each of
-* these last N lines contains 4 real values: the real part of
-* the eigenvalues, the imaginary part of the eigenvalue, the
-* reciprocal condition number of the eigenvalues, and the
-* reciprocal condition number of the vector eigenvector. The
-* end of data is indicated by dimension N=0. Even if no data
-* is to be tested, there must be at least one line containing
-* N=0.
-*
-*-----------------------------------------------------------------------
-*
-* The CSX data is like CVX. The first part is identical to CEV, and the
-* second part consists of test matrices with precomputed solutions.
-*
-* line 1: 'CSX' in columns 1-3.
-*
-* line 2: NSIZES, INTEGER
-* If NSIZES = 0, no testing of randomly generated examples
-* is done, but any precomputed examples are tested.
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-*
-* line 5: THRESH, REAL
-*
-* line 6: NEWSD, INTEGER
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-*
-* lines 8 and following: The first line contains 'CSX' in columns 1-3
-* followed by the number of matrix types, possibly with
-* a second line to specify certain matrix types.
-* If the number of matrix types = 0, no testing of randomly
-* generated examples is done, but any precomputed examples
-* are tested.
-*
-* remaining lines : Each matrix is stored on 3+N**2 lines, where N is
-* its dimension. The first line contains the dimension N, the
-* dimension M of an invariant subspace, and ISRT. The second
-* line contains M integers, identifying the eigenvalues in the
-* invariant subspace (by their position in a list of
-* eigenvalues ordered by increasing real part (if ISRT=0) or
-* by increasing imaginary part (if ISRT=1)). The next N**2
-* lines contain the matrix rowwise. The last line contains the
-* reciprocal condition number for the average of the selected
-* eigenvalues, and the reciprocal condition number for the
-* corresponding right invariant subspace. The end of data in
-* indicated by a line containing N=0, M=0, and ISRT = 0. Even
-* if no data is to be tested, there must be at least one line
-* containing N=0, M=0 and ISRT=0.
-*
-*-----------------------------------------------------------------------
-*
-* CGG input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, NBCOL, NS, and
-* MAXB.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for NBMIN, the minimum row dimension for blocks.
-*
-* line 7: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of shifts.
-*
-* line 8: MXBVAL, INTEGER array, dimension (NPARMS)
-* The values for MAXB, used in determining minimum blocksize.
-*
-* line 9: NBCOL, INTEGER array, dimension (NPARMS)
-* The values for NBCOL, the minimum column dimension for
-* blocks.
-*
-* line 10: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 11: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
+*> \brief \b CCHKEE
*
-* line 12: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
+* =========== DOCUMENTATION ===========
*
-* line 13: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
+* Definition
+* ==========
*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 16-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'CGG' for the generalized
-* eigenvalue problem routines and driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* CGS and CGV input files:
-*
-* line 1: 'CGS' or 'CGV' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension(NN)
-* Dimensions of matrices to be tested.
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 5: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* If it is 0., all test case data will be printed.
-*
-* line 6: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 17 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 7-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'CGS' for the generalized
-* eigenvalue problem routines and driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* CGX input file:
-* line 1: 'CGX' in columns 1 to 3.
-*
-* line 2: N, INTEGER
-* Value of N.
-*
-* line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 4: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* Information will be printed about each test for which the
-* test ratio is greater than or equal to the threshold.
-*
-* line 5: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* If line 2 was 0:
-*
-* line 7-EOF: Precomputed examples are tested.
-*
-* remaining lines : Each example is stored on 3+2*N*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next line contains an integer k such
-* that only the last k eigenvalues will be selected and appear
-* in the leading diagonal blocks of $A$ and $B$. The next N*N
-* lines contain the matrix A, one element per line. The next N*N
-* lines contain the matrix B. The last line contains the
-* reciprocal of the eigenvalue cluster condition number and the
-* reciprocal of the deflating subspace (associated with the
-* selected eigencluster) condition number. The end of data is
-* indicated by dimension N=0. Even if no data is to be tested,
-* there must be at least one line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* CXV input files:
-* line 1: 'CXV' in columns 1 to 3.
-*
-* line 2: N, INTEGER
-* Value of N.
-*
-* line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 4: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* Information will be printed about each test for which the
-* test ratio is greater than or equal to the threshold.
-*
-* line 5: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* If line 2 was 0:
-*
-* line 7-EOF: Precomputed examples are tested.
-*
-* remaining lines : Each example is stored on 3+2*N*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next N*N lines contain the matrix A, one
-* element per line. The next N*N lines contain the matrix B.
-* The next line contains the reciprocals of the eigenvalue
-* condition numbers. The last line contains the reciprocals of
-* the eigenvector condition numbers. The end of data is
-* indicated by dimension N=0. Even if no data is to be tested,
-* there must be at least one line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* CHB input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NK, INTEGER
-* Number of values of K.
-*
-* line 5: KVAL, INTEGER array, dimension (NK)
-* The values for the matrix dimension K.
-*
-* line 6: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 8-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'CHB'.
-*
-*-----------------------------------------------------------------------
-*
-* CBB input file:
-*
-* line 2: NN, INTEGER
-* Number of values of M and N.
-*
-* line 3: MVAL, INTEGER array, dimension (NN)
-* The values for the matrix row dimension M.
-*
-* line 4: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix column dimension N.
-*
-* line 4: NK, INTEGER
-* Number of values of K.
-*
-* line 5: KVAL, INTEGER array, dimension (NK)
-* The values for the matrix bandwidth K.
-*
-* line 6: NPARMS, INTEGER
-* Number of values of the parameter NRHS
-*
-* line 7: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of right hand sides NRHS.
-*
-* line 8: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 9: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 9 was 2:
-*
-* line 10: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 10-EOF: Lines specifying matrix types, as for SVD.
-* The 3-character path name is 'CBB'.
-*
-*-----------------------------------------------------------------------
-*
-* CEC input file:
-*
-* line 2: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* lines 3-EOF:
-*
-* Input for testing the eigencondition routines consists of a set of
-* specially constructed test cases and their solutions. The data
-* format is not intended to be modified by the user.
-*
-*-----------------------------------------------------------------------
-*
-* CBL and CBK input files:
-*
-* line 1: 'CBL' in columns 1-3 to test CGEBAL, or 'CBK' in
-* columns 1-3 to test CGEBAK.
-*
-* The remaining lines consist of specially constructed test cases.
-*
-*-----------------------------------------------------------------------
-*
-* CGL and CGK input files:
-*
-* line 1: 'CGL' in columns 1-3 to test CGGBAL, or 'CGK' in
-* columns 1-3 to test CGGBAK.
-*
-* The remaining lines consist of specially constructed test cases.
-*
-*-----------------------------------------------------------------------
-*
-* GLM data file:
-*
-* line 1: 'GLM' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M (row dimension).
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P (row dimension).
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N (column dimension), note M <= N <= M+P.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GLM' for the generalized
-* linear regression model routines.
-*
-*-----------------------------------------------------------------------
-*
-* GQR data file:
-*
-* line 1: 'GQR' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M.
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P.
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GQR' for the generalized
-* QR and RQ routines.
-*
-*-----------------------------------------------------------------------
-*
-* GSV data file:
-*
-* line 1: 'GSV' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M (row dimension).
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P (row dimension).
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N (column dimension).
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GSV' for the generalized
-* SVD routines.
-*
-*-----------------------------------------------------------------------
-*
-* CSD data file:
-*
-* line 1: 'CSD' in columns 1 to 3.
-*
-* line 2: NM, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NM)
-* Values of M (row and column dimension of orthogonal matrix).
-*
-* line 4: PVAL, INTEGER array, dimension(NM)
-* Values of P (row dimension of top-left block).
-*
-* line 5: NVAL, INTEGER array, dimension(NM)
-* Values of N (column dimension of top-left block).
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'CSD' for the CSD routine.
-*
-*-----------------------------------------------------------------------
-*
-* LSE data file:
-*
-* line 1: 'LSE' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M.
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P.
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N, note P <= N <= P+M.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
+* PROGRAM CCHKEE
+*
+* Purpose
+* =======
*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKEE tests the COMPLEX LAPACK subroutines for the matrix
+*> eigenvalue problem. The test paths in this version are
+*>
+*> NEP (Nonsymmetric Eigenvalue Problem):
+*> Test CGEHRD, CUNGHR, CHSEQR, CTREVC, CHSEIN, and CUNMHR
+*>
+*> SEP (Hermitian Eigenvalue Problem):
+*> Test CHETRD, CUNGTR, CSTEQR, CSTERF, CSTEIN, CSTEDC,
+*> and drivers CHEEV(X), CHBEV(X), CHPEV(X),
+*> CHEEVD, CHBEVD, CHPEVD
+*>
+*> SVD (Singular Value Decomposition):
+*> Test CGEBRD, CUNGBR, and CBDSQR
+*> and the drivers CGESVD, CGESDD
+*>
+*> CEV (Nonsymmetric Eigenvalue/eigenvector Driver):
+*> Test CGEEV
+*>
+*> CES (Nonsymmetric Schur form Driver):
+*> Test CGEES
+*>
+*> CVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
+*> Test CGEEVX
+*>
+*> CSX (Nonsymmetric Schur form Expert Driver):
+*> Test CGEESX
+*>
+*> CGG (Generalized Nonsymmetric Eigenvalue Problem):
+*> Test CGGHRD, CGGBAL, CGGBAK, CHGEQZ, and CTGEVC
+*> and the driver routines CGEGS and CGEGV
+*>
+*> CGS (Generalized Nonsymmetric Schur form Driver):
+*> Test CGGES
+*>
+*> CGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
+*> Test CGGEV
+*>
+*> CGX (Generalized Nonsymmetric Schur form Expert Driver):
+*> Test CGGESX
+*>
+*> CXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
+*> Test CGGEVX
+*>
+*> CSG (Hermitian Generalized Eigenvalue Problem):
+*> Test CHEGST, CHEGV, CHEGVD, CHEGVX, CHPGST, CHPGV, CHPGVD,
+*> CHPGVX, CHBGST, CHBGV, CHBGVD, and CHBGVX
+*>
+*> CHB (Hermitian Band Eigenvalue Problem):
+*> Test CHBTRD
+*>
+*> CBB (Band Singular Value Decomposition):
+*> Test CGBBRD
+*>
+*> CEC (Eigencondition estimation):
+*> Test CTRSYL, CTREXC, CTRSNA, and CTRSEN
+*>
+*> CBL (Balancing a general matrix)
+*> Test CGEBAL
+*>
+*> CBK (Back transformation on a balanced matrix)
+*> Test CGEBAK
+*>
+*> CGL (Balancing a matrix pair)
+*> Test CGGBAL
+*>
+*> CGK (Back transformation on a matrix pair)
+*> Test CGGBAK
+*>
+*> GLM (Generalized Linear Regression Model):
+*> Tests CGGGLM
+*>
+*> GQR (Generalized QR and RQ factorizations):
+*> Tests CGGQRF and CGGRQF
+*>
+*> GSV (Generalized Singular Value Decomposition):
+*> Tests CGGSVD, CGGSVP, CTGSJA, CLAGS2, CLAPLL, and CLAPMT
+*>
+*> CSD (CS decomposition):
+*> Tests CUNCSD
+*>
+*> LSE (Constrained Linear Least Squares):
+*> Tests CGGLSE
+*>
+*> Each test path has a different set of inputs, but the data sets for
+*> the driver routines xEV, xES, xVX, and xSX can be concatenated in a
+*> single input file. The first line of input should contain one of the
+*> 3-character path names in columns 1-3. The number of remaining lines
+*> depends on what is found on the first line.
+*>
+*> The number of matrix types used in testing is often controllable from
+*> the input file. The number of matrix types for each path, and the
+*> test routine that describes them, is as follows:
+*>
+*> Path name(s) Types Test routine
+*>
+*> CHS or NEP 21 CCHKHS
+*> CST or SEP 21 CCHKST (routines)
+*> 18 CDRVST (drivers)
+*> CBD or SVD 16 CCHKBD (routines)
+*> 5 CDRVBD (drivers)
+*> CEV 21 CDRVEV
+*> CES 21 CDRVES
+*> CVX 21 CDRVVX
+*> CSX 21 CDRVSX
+*> CGG 26 CCHKGG (routines)
+*> 26 CDRVGG (drivers)
+*> CGS 26 CDRGES
+*> CGX 5 CDRGSX
+*> CGV 26 CDRGEV
+*> CXV 2 CDRGVX
+*> CSG 21 CDRVSG
+*> CHB 15 CCHKHB
+*> CBB 15 CCHKBB
+*> CEC - CCHKEC
+*> CBL - CCHKBL
+*> CBK - CCHKBK
+*> CGL - CCHKGL
+*> CGK - CCHKGK
+*> GLM 8 CCKGLM
+*> GQR 8 CCKGQR
+*> GSV 8 CCKGSV
+*> CSD 3 CCKCSD
+*> LSE 8 CCKLSE
+*>
+*>-----------------------------------------------------------------------
+*>
+*> NEP input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, NX, NS, and
+*> MAXB.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 7: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 8: INMIN, INTEGER array, dimension (NPARMS)
+*> LAHQR vs TTQRE crossover point, >= 11
+*>
+*> line 9: INWIN, INTEGER array, dimension (NPARMS)
+*> recommended deflation window size
+*>
+*> line 10: INIBL, INTEGER array, dimension (NPARMS)
+*> nibble crossover point
+*>
+*> line 11: ISHFTS, INTEGER array, dimension (NPARMS)
+*> number of simultaneous shifts)
+*>
+*> line 12: IACC22, INTEGER array, dimension (NPARMS)
+*> select structured matrix multiply: 0, 1 or 2)
+*>
+*> line 13: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold. To have all of the test
+*> ratios printed, use THRESH = 0.0 .
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
+*> the user to specify the matrix types. Each line contains
+*> a 3-character path name in columns 1-3, and the number
+*> of matrix types must be the first nonblank item in columns
+*> 4-80. If the number of matrix types is at least 1 but is
+*> less than the maximum number of possible types, a second
+*> line will be read to get the numbers of the matrix types to
+*> be used. For example,
+*> NEP 21
+*> requests all of the matrix types for the nonsymmetric
+*> eigenvalue problem, while
+*> NEP 4
+*> 9 10 11 12
+*> requests only matrices of type 9, 10, 11, and 12.
+*>
+*> The valid 3-character path names are 'NEP' or 'CHS' for the
+*> nonsymmetric eigenvalue routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SEP or CSG input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, and NX.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 7: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 8: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 9: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 10: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 11: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 12: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 12 was 2:
+*>
+*> line 13: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 13-EOF: Lines specifying matrix types, as for NEP.
+*> The valid 3-character path names are 'SEP' or 'CST' for the
+*> Hermitian eigenvalue routines and driver routines, and
+*> 'CSG' for the routines for the Hermitian generalized
+*> eigenvalue problem.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SVD input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension (NN)
+*> The values for the matrix row dimension M.
+*>
+*> line 4: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix column dimension N.
+*>
+*> line 5: NPARMS, INTEGER
+*> Number of values of the parameter NB, NBMIN, NX, and NRHS.
+*>
+*> line 6: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 7: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 8: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 9: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of right hand sides NRHS.
+*>
+*> line 10: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 11: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 12: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 13: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path names are 'SVD' or 'CBD' for both the
+*> SVD routines and the SVD driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CEV and CES data files:
+*>
+*> line 1: 'CEV' or 'CES' in columns 1 to 3.
+*>
+*> line 2: NSIZES, INTEGER
+*> Number of sizes of matrices to use. Should be at least 0
+*> and at most 20. If NSIZES = 0, no testing is done
+*> (although the remaining 3 lines are still read).
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*> Dimensions of matrices to be tested.
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHSEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 5: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> If it is 0., all test case data will be printed.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 8 and following: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'CEV' to test CGEEV, or
+*> 'CES' to test CGEES.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> The CVX data has two parts. The first part is identical to CEV,
+*> and the second part consists of test matrices with precomputed
+*> solutions.
+*>
+*> line 1: 'CVX' in columns 1-3.
+*>
+*> line 2: NSIZES, INTEGER
+*> If NSIZES = 0, no testing of randomly generated examples
+*> is done, but any precomputed examples are tested.
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*>
+*> line 5: THRESH, REAL
+*>
+*> line 6: NEWSD, INTEGER
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*>
+*> lines 8 and following: The first line contains 'CVX' in columns 1-3
+*> followed by the number of matrix types, possibly with
+*> a second line to specify certain matrix types.
+*> If the number of matrix types = 0, no testing of randomly
+*> generated examples is done, but any precomputed examples
+*> are tested.
+*>
+*> remaining lines : Each matrix is stored on 1+N+N**2 lines, where N is
+*> its dimension. The first line contains the dimension N and
+*> ISRT (two integers). ISRT indicates whether the last N lines
+*> are sorted by increasing real part of the eigenvalue
+*> (ISRT=0) or by increasing imaginary part (ISRT=1). The next
+*> N**2 lines contain the matrix rowwise, one entry per line.
+*> The last N lines correspond to each eigenvalue. Each of
+*> these last N lines contains 4 real values: the real part of
+*> the eigenvalues, the imaginary part of the eigenvalue, the
+*> reciprocal condition number of the eigenvalues, and the
+*> reciprocal condition number of the vector eigenvector. The
+*> end of data is indicated by dimension N=0. Even if no data
+*> is to be tested, there must be at least one line containing
+*> N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> The CSX data is like CVX. The first part is identical to CEV, and the
+*> second part consists of test matrices with precomputed solutions.
+*>
+*> line 1: 'CSX' in columns 1-3.
+*>
+*> line 2: NSIZES, INTEGER
+*> If NSIZES = 0, no testing of randomly generated examples
+*> is done, but any precomputed examples are tested.
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*>
+*> line 5: THRESH, REAL
+*>
+*> line 6: NEWSD, INTEGER
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*>
+*> lines 8 and following: The first line contains 'CSX' in columns 1-3
+*> followed by the number of matrix types, possibly with
+*> a second line to specify certain matrix types.
+*> If the number of matrix types = 0, no testing of randomly
+*> generated examples is done, but any precomputed examples
+*> are tested.
+*>
+*> remaining lines : Each matrix is stored on 3+N**2 lines, where N is
+*> its dimension. The first line contains the dimension N, the
+*> dimension M of an invariant subspace, and ISRT. The second
+*> line contains M integers, identifying the eigenvalues in the
+*> invariant subspace (by their position in a list of
+*> eigenvalues ordered by increasing real part (if ISRT=0) or
+*> by increasing imaginary part (if ISRT=1)). The next N**2
+*> lines contain the matrix rowwise. The last line contains the
+*> reciprocal condition number for the average of the selected
+*> eigenvalues, and the reciprocal condition number for the
+*> corresponding right invariant subspace. The end of data in
+*> indicated by a line containing N=0, M=0, and ISRT = 0. Even
+*> if no data is to be tested, there must be at least one line
+*> containing N=0, M=0 and ISRT=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CGG input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, NBCOL, NS, and
+*> MAXB.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for NBMIN, the minimum row dimension for blocks.
+*>
+*> line 7: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of shifts.
+*>
+*> line 8: MXBVAL, INTEGER array, dimension (NPARMS)
+*> The values for MAXB, used in determining minimum blocksize.
+*>
+*> line 9: NBCOL, INTEGER array, dimension (NPARMS)
+*> The values for NBCOL, the minimum column dimension for
+*> blocks.
+*>
+*> line 10: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 11: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 12: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 13: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 16-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'CGG' for the generalized
+*> eigenvalue problem routines and driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CGS and CGV input files:
+*>
+*> line 1: 'CGS' or 'CGV' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension(NN)
+*> Dimensions of matrices to be tested.
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 5: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> If it is 0., all test case data will be printed.
+*>
+*> line 6: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 17 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 7-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'CGS' for the generalized
+*> eigenvalue problem routines and driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CGX input file:
+*> line 1: 'CGX' in columns 1 to 3.
+*>
+*> line 2: N, INTEGER
+*> Value of N.
+*>
+*> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 4: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> Information will be printed about each test for which the
+*> test ratio is greater than or equal to the threshold.
+*>
+*> line 5: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> If line 2 was 0:
+*>
+*> line 7-EOF: Precomputed examples are tested.
+*>
+*> remaining lines : Each example is stored on 3+2*N*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next line contains an integer k such
+*> that only the last k eigenvalues will be selected and appear
+*> in the leading diagonal blocks of $A$ and $B$. The next N*N
+*> lines contain the matrix A, one element per line. The next N*N
+*> lines contain the matrix B. The last line contains the
+*> reciprocal of the eigenvalue cluster condition number and the
+*> reciprocal of the deflating subspace (associated with the
+*> selected eigencluster) condition number. The end of data is
+*> indicated by dimension N=0. Even if no data is to be tested,
+*> there must be at least one line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CXV input files:
+*> line 1: 'CXV' in columns 1 to 3.
+*>
+*> line 2: N, INTEGER
+*> Value of N.
+*>
+*> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 4: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> Information will be printed about each test for which the
+*> test ratio is greater than or equal to the threshold.
+*>
+*> line 5: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> If line 2 was 0:
+*>
+*> line 7-EOF: Precomputed examples are tested.
+*>
+*> remaining lines : Each example is stored on 3+2*N*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next N*N lines contain the matrix A, one
+*> element per line. The next N*N lines contain the matrix B.
+*> The next line contains the reciprocals of the eigenvalue
+*> condition numbers. The last line contains the reciprocals of
+*> the eigenvector condition numbers. The end of data is
+*> indicated by dimension N=0. Even if no data is to be tested,
+*> there must be at least one line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CHB input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NK, INTEGER
+*> Number of values of K.
+*>
+*> line 5: KVAL, INTEGER array, dimension (NK)
+*> The values for the matrix dimension K.
+*>
+*> line 6: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 8-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'CHB'.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CBB input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension (NN)
+*> The values for the matrix row dimension M.
+*>
+*> line 4: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix column dimension N.
+*>
+*> line 4: NK, INTEGER
+*> Number of values of K.
+*>
+*> line 5: KVAL, INTEGER array, dimension (NK)
+*> The values for the matrix bandwidth K.
+*>
+*> line 6: NPARMS, INTEGER
+*> Number of values of the parameter NRHS
+*>
+*> line 7: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of right hand sides NRHS.
+*>
+*> line 8: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 9: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 9 was 2:
+*>
+*> line 10: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 10-EOF: Lines specifying matrix types, as for SVD.
+*> The 3-character path name is 'CBB'.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CEC input file:
+*>
+*> line 2: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> lines 3-EOF:
+*>
+*> Input for testing the eigencondition routines consists of a set of
+*> specially constructed test cases and their solutions. The data
+*> format is not intended to be modified by the user.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CBL and CBK input files:
+*>
+*> line 1: 'CBL' in columns 1-3 to test CGEBAL, or 'CBK' in
+*> columns 1-3 to test CGEBAK.
+*>
+*> The remaining lines consist of specially constructed test cases.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CGL and CGK input files:
+*>
+*> line 1: 'CGL' in columns 1-3 to test CGGBAL, or 'CGK' in
+*> columns 1-3 to test CGGBAK.
+*>
+*> The remaining lines consist of specially constructed test cases.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GLM data file:
+*>
+*> line 1: 'GLM' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M (row dimension).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P (row dimension).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N (column dimension), note M <= N <= M+P.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GLM' for the generalized
+*> linear regression model routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GQR data file:
+*>
+*> line 1: 'GQR' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M.
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P.
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GQR' for the generalized
+*> QR and RQ routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GSV data file:
+*>
+*> line 1: 'GSV' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M (row dimension).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P (row dimension).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N (column dimension).
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GSV' for the generalized
+*> SVD routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CSD data file:
+*>
+*> line 1: 'CSD' in columns 1 to 3.
+*>
+*> line 2: NM, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NM)
+*> Values of M (row and column dimension of orthogonal matrix).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NM)
+*> Values of P (row dimension of top-left block).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NM)
+*> Values of N (column dimension of top-left block).
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'CSD' for the CSD routine.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> LSE data file:
+*>
+*> line 1: 'LSE' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M.
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P.
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N, note P <= N <= P+M.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GSV' for the generalized
+*> SVD routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> NMAX is currently set to 132 and must be at least 12 for some of the
+*> precomputed examples, and LWORK = NMAX*(5*NMAX+20) in the parameter
+*> statements below. For SVD, we assume NRHS may be as big as N. The
+*> parameter NEED is set to 14 to allow for 14 N-by-N matrices for CGG.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
*
-* If line 8 was 2:
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
+*> \date November 2011
*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GSV' for the generalized
-* SVD routines.
+*> \ingroup complex_eig
*
-*-----------------------------------------------------------------------
+* =====================================================================
+ PROGRAM CCHKEE
*
-* NMAX is currently set to 132 and must be at least 12 for some of the
-* precomputed examples, and LWORK = NMAX*(5*NMAX+20) in the parameter
-* statements below. For SVD, we assume NRHS may be as big as N. The
-* parameter NEED is set to 14 to allow for 14 N-by-N matrices for CGG.
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/EIG/cchkgg.f b/TESTING/EIG/cchkgg.f
index 6aa44bdc..6e04957b 100644
--- a/TESTING/EIG/cchkgg.f
+++ b/TESTING/EIG/cchkgg.f
@@ -1,3 +1,504 @@
+*> \brief \b CCHKGG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* TSTDIF, THRSHN, NOUNIT, A, LDA, B, H, T, S1,
+* S2, P1, P2, U, LDU, V, Q, Z, ALPHA1, BETA1,
+* ALPHA3, BETA3, EVECTL, EVECTR, WORK, LWORK,
+* RWORK, LLWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTDIF
+* INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES
+* REAL THRESH, THRSHN
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * ), LLWORK( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL RESULT( 15 ), RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA1( * ), ALPHA3( * ),
+* $ B( LDA, * ), BETA1( * ), BETA3( * ),
+* $ EVECTL( LDU, * ), EVECTR( LDU, * ),
+* $ H( LDA, * ), P1( LDA, * ), P2( LDA, * ),
+* $ Q( LDU, * ), S1( LDA, * ), S2( LDA, * ),
+* $ T( LDA, * ), U( LDU, * ), V( LDU, * ),
+* $ WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKGG checks the nonsymmetric generalized eigenvalue problem
+*> routines.
+*> H H H
+*> CGGHRD factors A and B as U H V and U T V , where means conjugate
+*> transpose, H is hessenberg, T is triangular and U and V are unitary.
+*>
+*> H H
+*> CHGEQZ factors H and T as Q S Z and Q P Z , where P and S are upper
+*> triangular and Q and Z are unitary. It also computes the generalized
+*> eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)), where
+*> alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus, w(j) = alpha(j)/beta(j)
+*> is a root of the generalized eigenvalue problem
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
+*> problem
+*>
+*> det( m(j) A - B ) = 0
+*>
+*> CTGEVC computes the matrix L of left eigenvectors and the matrix R
+*> of right eigenvectors for the matrix pair ( S, P ). In the
+*> description below, l and r are left and right eigenvectors
+*> corresponding to the generalized eigenvalues (alpha,beta).
+*>
+*> When CCHKGG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 13
+*> tests will be performed. The first twelve "test ratios" should be
+*> small -- O(1). They will be compared with the threshhold THRESH:
+*>
+*> H
+*> (1) | A - U H V | / ( |A| n ulp )
+*>
+*> H
+*> (2) | B - U T V | / ( |B| n ulp )
+*>
+*> H
+*> (3) | I - UU | / ( n ulp )
+*>
+*> H
+*> (4) | I - VV | / ( n ulp )
+*>
+*> H
+*> (5) | H - Q S Z | / ( |H| n ulp )
+*>
+*> H
+*> (6) | T - Q P Z | / ( |T| n ulp )
+*>
+*> H
+*> (7) | I - QQ | / ( n ulp )
+*>
+*> H
+*> (8) | I - ZZ | / ( n ulp )
+*>
+*> (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*> H
+*> | (beta A - alpha B) l | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of
+*> H
+*> | (beta H - alpha T) l' | / ( ulp max( |beta H|, |alpha T| ) )
+*>
+*> where the eigenvectors l' are the result of passing Q to
+*> STGEVC and back transforming (JOB='B').
+*>
+*> (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of
+*>
+*> | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) )
+*>
+*> where the eigenvectors r' are the result of passing Z to
+*> STGEVC and back transforming (JOB='B').
+*>
+*> The last three test ratios will usually be small, but there is no
+*> mathematical requirement that they be so. They are therefore
+*> compared with THRESH only if TSTDIF is .TRUE.
+*>
+*> (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp )
+*>
+*> (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp )
+*>
+*> (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| ,
+*> |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp
+*>
+*> In addition, the normalization of L and R are checked, and compared
+*> with the threshhold THRSHN.
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is P*D1, P is a random unitary diagonal
+*> matrix (i.e., with random magnitude 1 entries
+*> on the diagonal), and D1=diag( 0, 1,..., N-1 )
+*> (i.e., a diagonal matrix with D1(1,1)=0,
+*> D1(2,2)=1, ..., D1(N,N)=N-1.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1=P*diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2=Q*diag( 0, N-3, N-4,..., 1, 0, 0 ), and
+*> P and Q are random unitary diagonal matrices.
+*> t t
+*> (16) U ( J , J ) V where U and V are random unitary matrices.
+*>
+*> (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> P*( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> Q*( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) U ( big*T1, small*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) U ( small*T1, big*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) U ( small*T1, small*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) U ( big*T1, big*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CCHKGG does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CCHKGG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CCHKGG to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] TSTDIF
+*> \verbatim
+*> TSTDIF is LOGICAL
+*> Specifies whether test ratios 13-15 will be computed and
+*> compared with THRESH.
+*> = .FALSE.: Only test ratios 1-12 will be computed and tested.
+*> Ratios 13-15 will be set to zero.
+*> = .TRUE.: All the test ratios 1-15 will be computed and
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] THRSHN
+*> \verbatim
+*> THRSHN is REAL
+*> Threshhold for reporting eigenvector normalization error.
+*> If the normalization of any eigenvector differs from 1 by
+*> more than THRSHN*ulp, then a special error message will be
+*> printed. (This is handled separately from the other tests,
+*> since only a compiler or programming error should cause an
+*> error message, at least if THRSHN is at least 5--10.)
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, H, T, S1, P1, S2, and P2.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDA, max(NN))
+*> The upper Hessenberg matrix computed from A by CGGHRD.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by CGGHRD.
+*> \endverbatim
+*>
+*> \param[out] S1
+*> \verbatim
+*> S1 is COMPLEX array, dimension (LDA, max(NN))
+*> The Schur (upper triangular) matrix computed from H by CHGEQZ
+*> when Q and Z are also computed.
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is COMPLEX array, dimension (LDA, max(NN))
+*> The Schur (upper triangular) matrix computed from H by CHGEQZ
+*> when Q and Z are not computed.
+*> \endverbatim
+*>
+*> \param[out] P1
+*> \verbatim
+*> P1 is COMPLEX array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from T by CHGEQZ
+*> when Q and Z are also computed.
+*> \endverbatim
+*>
+*> \param[out] P2
+*> \verbatim
+*> P2 is COMPLEX array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from T by CHGEQZ
+*> when Q and Z are not computed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU, max(NN))
+*> The (left) unitary matrix computed by CGGHRD.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U, V, Q, Z, EVECTL, and EVECTR. It
+*> must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDU, max(NN))
+*> The (right) unitary matrix computed by CGGHRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDU, max(NN))
+*> The (left) unitary matrix computed by CHGEQZ.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDU, max(NN))
+*> The (left) unitary matrix computed by CHGEQZ.
+*> \endverbatim
+*>
+*> \param[out] ALPHA1
+*> \verbatim
+*> ALPHA1 is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is COMPLEX array, dimension (max(NN))
+*> The generalized eigenvalues of (A,B) computed by CHGEQZ
+*> when Q, Z, and the full Schur matrices are computed.
+*> \endverbatim
+*>
+*> \param[out] ALPHA3
+*> \verbatim
+*> ALPHA3 is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA3
+*> \verbatim
+*> BETA3 is COMPLEX array, dimension (max(NN))
+*> The generalized eigenvalues of (A,B) computed by CHGEQZ
+*> when neither Q, Z, nor the Schur matrices are computed.
+*> \endverbatim
+*>
+*> \param[out] EVECTL
+*> \verbatim
+*> EVECTL is COMPLEX array, dimension (LDU, max(NN))
+*> The (lower triangular) left eigenvector matrix for the
+*> matrices in S1 and P1.
+*> \endverbatim
+*>
+*> \param[out] EVECTR
+*> \verbatim
+*> EVECTR is COMPLEX array, dimension (LDU, max(NN))
+*> The (upper triangular) right eigenvector matrix for the
+*> matrices in S1 and P1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( 4*N, 2 * N**2, 1 ), for all N=NN(j).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*max(NN))
+*> \endverbatim
+*>
+*> \param[out] LLWORK
+*> \verbatim
+*> LLWORK is LOGICAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCHKGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ TSTDIF, THRSHN, NOUNIT, A, LDA, B, H, T, S1,
$ S2, P1, P2, U, LDU, V, Q, Z, ALPHA1, BETA1,
@@ -5,8 +506,9 @@
$ RWORK, LLWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTDIF
@@ -26,347 +528,6 @@
$ WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKGG checks the nonsymmetric generalized eigenvalue problem
-* routines.
-* H H H
-* CGGHRD factors A and B as U H V and U T V , where means conjugate
-* transpose, H is hessenberg, T is triangular and U and V are unitary.
-*
-* H H
-* CHGEQZ factors H and T as Q S Z and Q P Z , where P and S are upper
-* triangular and Q and Z are unitary. It also computes the generalized
-* eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)), where
-* alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus, w(j) = alpha(j)/beta(j)
-* is a root of the generalized eigenvalue problem
-*
-* det( A - w(j) B ) = 0
-*
-* and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
-* problem
-*
-* det( m(j) A - B ) = 0
-*
-* CTGEVC computes the matrix L of left eigenvectors and the matrix R
-* of right eigenvectors for the matrix pair ( S, P ). In the
-* description below, l and r are left and right eigenvectors
-* corresponding to the generalized eigenvalues (alpha,beta).
-*
-* When CCHKGG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 13
-* tests will be performed. The first twelve "test ratios" should be
-* small -- O(1). They will be compared with the threshhold THRESH:
-*
-* H
-* (1) | A - U H V | / ( |A| n ulp )
-*
-* H
-* (2) | B - U T V | / ( |B| n ulp )
-*
-* H
-* (3) | I - UU | / ( n ulp )
-*
-* H
-* (4) | I - VV | / ( n ulp )
-*
-* H
-* (5) | H - Q S Z | / ( |H| n ulp )
-*
-* H
-* (6) | T - Q P Z | / ( |T| n ulp )
-*
-* H
-* (7) | I - QQ | / ( n ulp )
-*
-* H
-* (8) | I - ZZ | / ( n ulp )
-*
-* (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-* H
-* | (beta A - alpha B) l | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of
-* H
-* | (beta H - alpha T) l' | / ( ulp max( |beta H|, |alpha T| ) )
-*
-* where the eigenvectors l' are the result of passing Q to
-* STGEVC and back transforming (JOB='B').
-*
-* (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of
-*
-* | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) )
-*
-* where the eigenvectors r' are the result of passing Z to
-* STGEVC and back transforming (JOB='B').
-*
-* The last three test ratios will usually be small, but there is no
-* mathematical requirement that they be so. They are therefore
-* compared with THRESH only if TSTDIF is .TRUE.
-*
-* (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp )
-*
-* (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp )
-*
-* (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| ,
-* |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp
-*
-* In addition, the normalization of L and R are checked, and compared
-* with the threshhold THRSHN.
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is P*D1, P is a random unitary diagonal
-* matrix (i.e., with random magnitude 1 entries
-* on the diagonal), and D1=diag( 0, 1,..., N-1 )
-* (i.e., a diagonal matrix with D1(1,1)=0,
-* D1(2,2)=1, ..., D1(N,N)=N-1.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1=P*diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2=Q*diag( 0, N-3, N-4,..., 1, 0, 0 ), and
-* P and Q are random unitary diagonal matrices.
-* t t
-* (16) U ( J , J ) V where U and V are random unitary matrices.
-*
-* (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* P*( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* Q*( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) U ( big*T1, small*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) U ( small*T1, big*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) U ( small*T1, small*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) U ( big*T1, big*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular
-* matrices.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CCHKGG does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CCHKGG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CCHKGG to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* TSTDIF (input) LOGICAL
-* Specifies whether test ratios 13-15 will be computed and
-* compared with THRESH.
-* = .FALSE.: Only test ratios 1-12 will be computed and tested.
-* Ratios 13-15 will be set to zero.
-* = .TRUE.: All the test ratios 1-15 will be computed and
-* tested.
-*
-* THRSHN (input) REAL
-* Threshhold for reporting eigenvector normalization error.
-* If the normalization of any eigenvector differs from 1 by
-* more than THRSHN*ulp, then a special error message will be
-* printed. (This is handled separately from the other tests,
-* since only a compiler or programming error should cause an
-* error message, at least if THRSHN is at least 5--10.)
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) COMPLEX array, dimension (LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, H, T, S1, P1, S2, and P2.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) COMPLEX array, dimension (LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* H (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The upper Hessenberg matrix computed from A by CGGHRD.
-*
-* T (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by CGGHRD.
-*
-* S1 (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The Schur (upper triangular) matrix computed from H by CHGEQZ
-* when Q and Z are also computed.
-*
-* S2 (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The Schur (upper triangular) matrix computed from H by CHGEQZ
-* when Q and Z are not computed.
-*
-* P1 (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from T by CHGEQZ
-* when Q and Z are also computed.
-*
-* P2 (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from T by CHGEQZ
-* when Q and Z are not computed.
-*
-* U (workspace) COMPLEX array, dimension (LDU, max(NN))
-* The (left) unitary matrix computed by CGGHRD.
-*
-* LDU (input) INTEGER
-* The leading dimension of U, V, Q, Z, EVECTL, and EVECTR. It
-* must be at least 1 and at least max( NN ).
-*
-* V (workspace) COMPLEX array, dimension (LDU, max(NN))
-* The (right) unitary matrix computed by CGGHRD.
-*
-* Q (workspace) COMPLEX array, dimension (LDU, max(NN))
-* The (left) unitary matrix computed by CHGEQZ.
-*
-* Z (workspace) COMPLEX array, dimension (LDU, max(NN))
-* The (left) unitary matrix computed by CHGEQZ.
-*
-* ALPHA1 (workspace) COMPLEX array, dimension (max(NN))
-* BETA1 (workspace) COMPLEX array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by CHGEQZ
-* when Q, Z, and the full Schur matrices are computed.
-*
-* ALPHA3 (workspace) COMPLEX array, dimension (max(NN))
-* BETA3 (workspace) COMPLEX array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by CHGEQZ
-* when neither Q, Z, nor the Schur matrices are computed.
-*
-* EVECTL (workspace) COMPLEX array, dimension (LDU, max(NN))
-* The (lower triangular) left eigenvector matrix for the
-* matrices in S1 and P1.
-*
-* EVECTR (workspace) COMPLEX array, dimension (LDU, max(NN))
-* The (upper triangular) right eigenvector matrix for the
-* matrices in S1 and P1.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( 4*N, 2 * N**2, 1 ), for all N=NN(j).
-*
-* RWORK (workspace) REAL array, dimension (2*max(NN))
-*
-* LLWORK (workspace) LOGICAL array, dimension (max(NN))
-*
-* RESULT (output) REAL array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cchkgk.f b/TESTING/EIG/cchkgk.f
index 14b60f19..5d30e1d0 100644
--- a/TESTING/EIG/cchkgk.f
+++ b/TESTING/EIG/cchkgk.f
@@ -1,27 +1,69 @@
- SUBROUTINE CCHKGK( NIN, NOUT )
+*> \brief \b CCHKGK
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKGK( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* CCHKGK tests CGGBAK, a routine for backward balancing of
-* a matrix pair (A, B).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKGK tests CGGBAK, a routine for backward balancing of
+*> a matrix pair (A, B).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CCHKGK( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cchkgl.f b/TESTING/EIG/cchkgl.f
index 6661fdcb..f3b47179 100644
--- a/TESTING/EIG/cchkgl.f
+++ b/TESTING/EIG/cchkgl.f
@@ -1,26 +1,68 @@
- SUBROUTINE CCHKGL( NIN, NOUT )
+*> \brief \b CCHKGL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKGL( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* CCHKGL tests CGGBAL, a routine for balancing a matrix pair (A, B).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKGL tests CGGBAL, a routine for balancing a matrix pair (A, B).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CCHKGL( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cchkhb.f b/TESTING/EIG/cchkhb.f
index 32832971..f0d61d71 100644
--- a/TESTING/EIG/cchkhb.f
+++ b/TESTING/EIG/cchkhb.f
@@ -1,10 +1,307 @@
+*> \brief \b CCHKHB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKHB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED,
+* THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK,
+* LWORK, RWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
+* $ NWDTHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), KK( * ), NN( * )
+* REAL RESULT( * ), RWORK( * ), SD( * ), SE( * )
+* COMPLEX A( LDA, * ), U( LDU, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKHB tests the reduction of a Hermitian band matrix to tridiagonal
+*> from, used with the Hermitian eigenvalue problem.
+*>
+*> CHBTRD factors a Hermitian band matrix A as U S U* , where * means
+*> conjugate transpose, S is symmetric tridiagonal, and U is unitary.
+*> CHBTRD can use either just the lower or just the upper triangle
+*> of A; CCHKHB checks both cases.
+*>
+*> When CCHKHB is called, a number of matrix "sizes" ("n's"), a number
+*> of bandwidths ("k's"), and a number of matrix "types" are
+*> specified. For each size ("n"), each bandwidth ("k") less than or
+*> equal to "n", and each type of matrix, one matrix will be generated
+*> and used to test the hermitian banded reduction routine. For each
+*> matrix, a number of tests will be performed:
+*>
+*> (1) | A - V S V* | / ( |A| n ulp ) computed by CHBTRD with
+*> UPLO='U'
+*>
+*> (2) | I - UU* | / ( n ulp )
+*>
+*> (3) | A - V S V* | / ( |A| n ulp ) computed by CHBTRD with
+*> UPLO='L'
+*>
+*> (4) | I - UU* | / ( n ulp )
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is unitary and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is unitary and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Hermitian matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CCHKHB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NWDTHS
+*> \verbatim
+*> NWDTHS is INTEGER
+*> The number of bandwidths to use. If it is zero,
+*> CCHKHB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KK
+*> \verbatim
+*> KK is INTEGER array, dimension (NWDTHS)
+*> An array containing the bandwidths to be used for the band
+*> matrices. The values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CCHKHB
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CCHKHB to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 2 (not 1!)
+*> and at least max( KK )+1.
+*> \endverbatim
+*>
+*> \param[out] SD
+*> \verbatim
+*> SD is REAL array, dimension (max(NN))
+*> Used to hold the diagonal of the tridiagonal matrix computed
+*> by CHBTRD.
+*> \endverbatim
+*>
+*> \param[out] SE
+*> \verbatim
+*> SE is REAL array, dimension (max(NN))
+*> Used to hold the off-diagonal of the tridiagonal matrix
+*> computed by CHBTRD.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, max(NN))
+*> Used to hold the unitary matrix computed by CHBTRD.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( LDA+1, max(NN)+1 )*max(NN).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCHKHB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED,
$ THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK,
$ LWORK, RWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
@@ -18,197 +315,6 @@
COMPLEX A( LDA, * ), U( LDU, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKHB tests the reduction of a Hermitian band matrix to tridiagonal
-* from, used with the Hermitian eigenvalue problem.
-*
-* CHBTRD factors a Hermitian band matrix A as U S U* , where * means
-* conjugate transpose, S is symmetric tridiagonal, and U is unitary.
-* CHBTRD can use either just the lower or just the upper triangle
-* of A; CCHKHB checks both cases.
-*
-* When CCHKHB is called, a number of matrix "sizes" ("n's"), a number
-* of bandwidths ("k's"), and a number of matrix "types" are
-* specified. For each size ("n"), each bandwidth ("k") less than or
-* equal to "n", and each type of matrix, one matrix will be generated
-* and used to test the hermitian banded reduction routine. For each
-* matrix, a number of tests will be performed:
-*
-* (1) | A - V S V* | / ( |A| n ulp ) computed by CHBTRD with
-* UPLO='U'
-*
-* (2) | I - UU* | / ( n ulp )
-*
-* (3) | A - V S V* | / ( |A| n ulp ) computed by CHBTRD with
-* UPLO='L'
-*
-* (4) | I - UU* | / ( n ulp )
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is unitary and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is unitary and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Hermitian matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CCHKHB does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NWDTHS (input) INTEGER
-* The number of bandwidths to use. If it is zero,
-* CCHKHB does nothing. It must be at least zero.
-*
-* KK (input) INTEGER array, dimension (NWDTHS)
-* An array containing the bandwidths to be used for the band
-* matrices. The values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CCHKHB
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CCHKHB to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) REAL array, dimension
-* (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 2 (not 1!)
-* and at least max( KK )+1.
-*
-* SD (workspace) REAL array, dimension (max(NN))
-* Used to hold the diagonal of the tridiagonal matrix computed
-* by CHBTRD.
-*
-* SE (workspace) REAL array, dimension (max(NN))
-* Used to hold the off-diagonal of the tridiagonal matrix
-* computed by CHBTRD.
-*
-* U (workspace) REAL array, dimension (LDU, max(NN))
-* Used to hold the unitary matrix computed by CHBTRD.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. It must be at least 1
-* and at least max( NN ).
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( LDA+1, max(NN)+1 )*max(NN).
-*
-* RESULT (output) REAL array, dimension (4)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cchkhs.f b/TESTING/EIG/cchkhs.f
index 98eeb873..66663338 100644
--- a/TESTING/EIG/cchkhs.f
+++ b/TESTING/EIG/cchkhs.f
@@ -1,3 +1,448 @@
+*> \brief \b CCHKHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, W1,
+* W3, EVECTL, EVECTR, EVECTY, EVECTX, UU, TAU,
+* WORK, NWORK, RWORK, IWORK, SELECT, RESULT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * ), SELECT( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL RESULT( 14 ), RWORK( * )
+* COMPLEX A( LDA, * ), EVECTL( LDU, * ),
+* $ EVECTR( LDU, * ), EVECTX( LDU, * ),
+* $ EVECTY( LDU, * ), H( LDA, * ), T1( LDA, * ),
+* $ T2( LDA, * ), TAU( * ), U( LDU, * ),
+* $ UU( LDU, * ), UZ( LDU, * ), W1( * ), W3( * ),
+* $ WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKHS checks the nonsymmetric eigenvalue problem routines.
+*>
+*> CGEHRD factors A as U H U' , where ' means conjugate
+*> transpose, H is hessenberg, and U is unitary.
+*>
+*> CUNGHR generates the unitary matrix U.
+*>
+*> CUNMHR multiplies a matrix by the unitary matrix U.
+*>
+*> CHSEQR factors H as Z T Z' , where Z is unitary and T
+*> is upper triangular. It also computes the eigenvalues,
+*> w(1), ..., w(n); we define a diagonal matrix W whose
+*> (diagonal) entries are the eigenvalues.
+*>
+*> CTREVC computes the left eigenvector matrix L and the
+*> right eigenvector matrix R for the matrix T. The
+*> columns of L are the complex conjugates of the left
+*> eigenvectors of T. The columns of R are the right
+*> eigenvectors of T. L is lower triangular, and R is
+*> upper triangular.
+*>
+*> CHSEIN computes the left eigenvector matrix Y and the
+*> right eigenvector matrix X for the matrix H. The
+*> columns of Y are the complex conjugates of the left
+*> eigenvectors of H. The columns of X are the right
+*> eigenvectors of H. Y is lower triangular, and X is
+*> upper triangular.
+*>
+*> When CCHKHS is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 14
+*> tests will be performed:
+*>
+*> (1) | A - U H U**H | / ( |A| n ulp )
+*>
+*> (2) | I - UU**H | / ( n ulp )
+*>
+*> (3) | H - Z T Z**H | / ( |H| n ulp )
+*>
+*> (4) | I - ZZ**H | / ( n ulp )
+*>
+*> (5) | A - UZ H (UZ)**H | / ( |A| n ulp )
+*>
+*> (6) | I - UZ (UZ)**H | / ( n ulp )
+*>
+*> (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp )
+*>
+*> (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp )
+*>
+*> (9) | TR - RW | / ( |T| |R| ulp )
+*>
+*> (10) | L**H T - W**H L | / ( |T| |L| ulp )
+*>
+*> (11) | HX - XW | / ( |H| |X| ulp )
+*>
+*> (12) | Y**H H - W**H Y | / ( |H| |Y| ulp )
+*>
+*> (13) | AX - XW | / ( |A| |X| ulp )
+*>
+*> (14) | Y**H A - W**H Y | / ( |A| |Y| ulp )
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (8) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random complex
+*> angles on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is unitary and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (18) Same as (16), but multiplied by SQRT( underflow threshold )
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from |z| < 1
+*> (20) Same as (19), but multiplied by SQRT( overflow threshold )
+*> (21) Same as (19), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES - INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CCHKHS does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN - INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES - INTEGER
+*> The number of elements in DOTYPE. If it is zero, CCHKHS
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE - LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED - INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CCHKHS to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH - REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT - INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX array, dimension (LDA,max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> The leading dimension of A, H, T1 and T2. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> H - COMPLEX array, dimension (LDA,max(NN))
+*> The upper hessenberg matrix computed by CGEHRD. On exit,
+*> H contains the Hessenberg form of the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> T1 - COMPLEX array, dimension (LDA,max(NN))
+*> The Schur (="quasi-triangular") matrix computed by CHSEQR
+*> if Z is computed. On exit, T1 contains the Schur form of
+*> the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> T2 - COMPLEX array, dimension (LDA,max(NN))
+*> The Schur matrix computed by CHSEQR when Z is not computed.
+*> This should be identical to T1.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDU - INTEGER
+*> The leading dimension of U, Z, UZ and UU. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> U - COMPLEX array, dimension (LDU,max(NN))
+*> The unitary matrix computed by CGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z - COMPLEX array, dimension (LDU,max(NN))
+*> The unitary matrix computed by CHSEQR.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> UZ - COMPLEX array, dimension (LDU,max(NN))
+*> The product of U times Z.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> W1 - COMPLEX array, dimension (max(NN))
+*> The eigenvalues of A, as computed by a full Schur
+*> decomposition H = Z T Z'. On exit, W1 contains the
+*> eigenvalues of the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> W3 - COMPLEX array, dimension (max(NN))
+*> The eigenvalues of A, as computed by a partial Schur
+*> decomposition (Z not computed, T only computed as much
+*> as is necessary for determining eigenvalues). On exit,
+*> W3 contains the eigenvalues of the matrix in A, possibly
+*> perturbed by CHSEIN.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTL - COMPLEX array, dimension (LDU,max(NN))
+*> The conjugate transpose of the (upper triangular) left
+*> eigenvector matrix for the matrix in T1.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTR - COMPLEX array, dimension (LDU,max(NN))
+*> The (upper triangular) right eigenvector matrix for the
+*> matrix in T1.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTY - COMPLEX array, dimension (LDU,max(NN))
+*> The conjugate transpose of the left eigenvector matrix
+*> for the matrix in H.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTX - COMPLEX array, dimension (LDU,max(NN))
+*> The right eigenvector matrix for the matrix in H.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> UU - COMPLEX array, dimension (LDU,max(NN))
+*> Details of the unitary matrix computed by CGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> TAU - COMPLEX array, dimension (max(NN))
+*> Further details of the unitary matrix computed by CGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK - COMPLEX array, dimension (NWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> NWORK - INTEGER
+*> The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2.
+*> \endverbatim
+*> \verbatim
+*> RWORK - REAL array, dimension (max(NN))
+*> Workspace. Could be equivalenced to IWORK, but not SELECT.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> IWORK - INTEGER array, dimension (max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> SELECT - LOGICAL array, dimension (max(NN))
+*> Workspace. Could be equivalenced to IWORK, but not RWORK.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT - REAL array, dimension (14)
+*> The values computed by the fourteen tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -14: LDU < 1 or LDU < NMAX.
+*> -26: NWORK too small.
+*> If CLATMR, CLATMS, or CLATME returns an error code, the
+*> absolute value of it is returned.
+*> If 1, then CHSEQR could not find all the shifts.
+*> If 2, then the EISPACK code (for small blocks) failed.
+*> If >2, then 30*N iterations were not enough to find an
+*> eigenvalue or to decompose the problem.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> MTEST The number of tests defined: care must be taken
+*> that (1) the size of RESULT, (2) the number of
+*> tests actually performed, and (3) MTEST agree.
+*> NTEST The number of tests performed on this matrix
+*> so far. This should be less than MTEST, and
+*> equal to it by the last test. It will be less
+*> if any of the routines being tested indicates
+*> that it could not compute the matrices that
+*> would be tested.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by SLAFTS).
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL,
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selects whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, W1,
$ W3, EVECTL, EVECTR, EVECTY, EVECTX, UU, TAU,
@@ -5,8 +450,9 @@
$ INFO )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
@@ -24,363 +470,6 @@
$ WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKHS checks the nonsymmetric eigenvalue problem routines.
-*
-* CGEHRD factors A as U H U' , where ' means conjugate
-* transpose, H is hessenberg, and U is unitary.
-*
-* CUNGHR generates the unitary matrix U.
-*
-* CUNMHR multiplies a matrix by the unitary matrix U.
-*
-* CHSEQR factors H as Z T Z' , where Z is unitary and T
-* is upper triangular. It also computes the eigenvalues,
-* w(1), ..., w(n); we define a diagonal matrix W whose
-* (diagonal) entries are the eigenvalues.
-*
-* CTREVC computes the left eigenvector matrix L and the
-* right eigenvector matrix R for the matrix T. The
-* columns of L are the complex conjugates of the left
-* eigenvectors of T. The columns of R are the right
-* eigenvectors of T. L is lower triangular, and R is
-* upper triangular.
-*
-* CHSEIN computes the left eigenvector matrix Y and the
-* right eigenvector matrix X for the matrix H. The
-* columns of Y are the complex conjugates of the left
-* eigenvectors of H. The columns of X are the right
-* eigenvectors of H. Y is lower triangular, and X is
-* upper triangular.
-*
-* When CCHKHS is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 14
-* tests will be performed:
-*
-* (1) | A - U H U**H | / ( |A| n ulp )
-*
-* (2) | I - UU**H | / ( n ulp )
-*
-* (3) | H - Z T Z**H | / ( |H| n ulp )
-*
-* (4) | I - ZZ**H | / ( n ulp )
-*
-* (5) | A - UZ H (UZ)**H | / ( |A| n ulp )
-*
-* (6) | I - UZ (UZ)**H | / ( n ulp )
-*
-* (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp )
-*
-* (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp )
-*
-* (9) | TR - RW | / ( |T| |R| ulp )
-*
-* (10) | L**H T - W**H L | / ( |T| |L| ulp )
-*
-* (11) | HX - XW | / ( |H| |X| ulp )
-*
-* (12) | Y**H H - W**H Y | / ( |H| |Y| ulp )
-*
-* (13) | AX - XW | / ( |A| |X| ulp )
-*
-* (14) | Y**H A - W**H Y | / ( |A| |Y| ulp )
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by SQRT( overflow threshold )
-* (8) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random complex
-* angles on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is unitary and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by SQRT( overflow threshold )
-* (18) Same as (16), but multiplied by SQRT( underflow threshold )
-*
-* (19) Nonsymmetric matrix with random entries chosen from |z| < 1
-* (20) Same as (19), but multiplied by SQRT( overflow threshold )
-* (21) Same as (19), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* ==========
-*
-* NSIZES - INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CCHKHS does nothing. It must be at least zero.
-* Not modified.
-*
-* NN - INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES - INTEGER
-* The number of elements in DOTYPE. If it is zero, CCHKHS
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE - LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED - INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CCHKHS to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH - REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT - INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A - COMPLEX array, dimension (LDA,max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA - INTEGER
-* The leading dimension of A, H, T1 and T2. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* H - COMPLEX array, dimension (LDA,max(NN))
-* The upper hessenberg matrix computed by CGEHRD. On exit,
-* H contains the Hessenberg form of the matrix in A.
-* Modified.
-*
-* T1 - COMPLEX array, dimension (LDA,max(NN))
-* The Schur (="quasi-triangular") matrix computed by CHSEQR
-* if Z is computed. On exit, T1 contains the Schur form of
-* the matrix in A.
-* Modified.
-*
-* T2 - COMPLEX array, dimension (LDA,max(NN))
-* The Schur matrix computed by CHSEQR when Z is not computed.
-* This should be identical to T1.
-* Modified.
-*
-* LDU - INTEGER
-* The leading dimension of U, Z, UZ and UU. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* U - COMPLEX array, dimension (LDU,max(NN))
-* The unitary matrix computed by CGEHRD.
-* Modified.
-*
-* Z - COMPLEX array, dimension (LDU,max(NN))
-* The unitary matrix computed by CHSEQR.
-* Modified.
-*
-* UZ - COMPLEX array, dimension (LDU,max(NN))
-* The product of U times Z.
-* Modified.
-*
-* W1 - COMPLEX array, dimension (max(NN))
-* The eigenvalues of A, as computed by a full Schur
-* decomposition H = Z T Z'. On exit, W1 contains the
-* eigenvalues of the matrix in A.
-* Modified.
-*
-* W3 - COMPLEX array, dimension (max(NN))
-* The eigenvalues of A, as computed by a partial Schur
-* decomposition (Z not computed, T only computed as much
-* as is necessary for determining eigenvalues). On exit,
-* W3 contains the eigenvalues of the matrix in A, possibly
-* perturbed by CHSEIN.
-* Modified.
-*
-* EVECTL - COMPLEX array, dimension (LDU,max(NN))
-* The conjugate transpose of the (upper triangular) left
-* eigenvector matrix for the matrix in T1.
-* Modified.
-*
-* EVECTR - COMPLEX array, dimension (LDU,max(NN))
-* The (upper triangular) right eigenvector matrix for the
-* matrix in T1.
-* Modified.
-*
-* EVECTY - COMPLEX array, dimension (LDU,max(NN))
-* The conjugate transpose of the left eigenvector matrix
-* for the matrix in H.
-* Modified.
-*
-* EVECTX - COMPLEX array, dimension (LDU,max(NN))
-* The right eigenvector matrix for the matrix in H.
-* Modified.
-*
-* UU - COMPLEX array, dimension (LDU,max(NN))
-* Details of the unitary matrix computed by CGEHRD.
-* Modified.
-*
-* TAU - COMPLEX array, dimension (max(NN))
-* Further details of the unitary matrix computed by CGEHRD.
-* Modified.
-*
-* WORK - COMPLEX array, dimension (NWORK)
-* Workspace.
-* Modified.
-*
-* NWORK - INTEGER
-* The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2.
-*
-* RWORK - REAL array, dimension (max(NN))
-* Workspace. Could be equivalenced to IWORK, but not SELECT.
-* Modified.
-*
-* IWORK - INTEGER array, dimension (max(NN))
-* Workspace.
-* Modified.
-*
-* SELECT - LOGICAL array, dimension (max(NN))
-* Workspace. Could be equivalenced to IWORK, but not RWORK.
-* Modified.
-*
-* RESULT - REAL array, dimension (14)
-* The values computed by the fourteen tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-* Modified.
-*
-* INFO - INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -14: LDU < 1 or LDU < NMAX.
-* -26: NWORK too small.
-* If CLATMR, CLATMS, or CLATME returns an error code, the
-* absolute value of it is returned.
-* If 1, then CHSEQR could not find all the shifts.
-* If 2, then the EISPACK code (for small blocks) failed.
-* If >2, then 30*N iterations were not enough to find an
-* eigenvalue or to decompose the problem.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* MTEST The number of tests defined: care must be taken
-* that (1) the size of RESULT, (2) the number of
-* tests actually performed, and (3) MTEST agree.
-* NTEST The number of tests performed on this matrix
-* so far. This should be less than MTEST, and
-* equal to it by the last test. It will be less
-* if any of the routines being tested indicates
-* that it could not compute the matrices that
-* would be tested.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by SLAFTS).
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL,
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selects whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cchkst.f b/TESTING/EIG/cchkst.f
index bb0b223a..2d5f299d 100644
--- a/TESTING/EIG/cchkst.f
+++ b/TESTING/EIG/cchkst.f
@@ -1,13 +1,549 @@
+*> \brief \b CCHKST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
+* WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
+* LWORK, RWORK, LRWORK, IWORK, LIWORK, RESULT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
+* $ NSIZES, NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL D1( * ), D2( * ), D3( * ), D4( * ), D5( * ),
+* $ RESULT( * ), RWORK( * ), SD( * ), SE( * ),
+* $ WA1( * ), WA2( * ), WA3( * ), WR( * )
+* COMPLEX A( LDA, * ), AP( * ), TAU( * ), U( LDU, * ),
+* $ V( LDU, * ), VP( * ), WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKST checks the Hermitian eigenvalue problem routines.
+*>
+*> CHETRD factors A as U S U* , where * means conjugate transpose,
+*> S is real symmetric tridiagonal, and U is unitary.
+*> CHETRD can use either just the lower or just the upper triangle
+*> of A; CCHKST checks both cases.
+*> U is represented as a product of Householder
+*> transformations, whose vectors are stored in the first
+*> n-1 columns of V, and whose scale factors are in TAU.
+*>
+*> CHPTRD does the same as CHETRD, except that A and V are stored
+*> in "packed" format.
+*>
+*> CUNGTR constructs the matrix U from the contents of V and TAU.
+*>
+*> CUPGTR constructs the matrix U from the contents of VP and TAU.
+*>
+*> CSTEQR factors S as Z D1 Z* , where Z is the unitary
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal. D2 is the matrix of
+*> eigenvalues computed when Z is not computed.
+*>
+*> SSTERF computes D3, the matrix of eigenvalues, by the
+*> PWK method, which does not yield eigenvectors.
+*>
+*> CPTEQR factors S as Z4 D4 Z4* , for a
+*> Hermitian positive definite tridiagonal matrix.
+*> D5 is the matrix of eigenvalues computed when Z is not
+*> computed.
+*>
+*> SSTEBZ computes selected eigenvalues. WA1, WA2, and
+*> WA3 will denote eigenvalues computed to high
+*> absolute accuracy, with different range options.
+*> WR will denote eigenvalues computed to high relative
+*> accuracy.
+*>
+*> CSTEIN computes Y, the eigenvectors of S, given the
+*> eigenvalues.
+*>
+*> CSTEDC factors S as Z D1 Z* , where Z is the unitary
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal ('I' option). It may also
+*> update an input unitary matrix, usually the output
+*> from CHETRD/CUNGTR or CHPTRD/CUPGTR ('V' option). It may
+*> also just compute eigenvalues ('N' option).
+*>
+*> CSTEMR factors S as Z D1 Z* , where Z is the unitary
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal ('I' option). CSTEMR
+*> uses the Relatively Robust Representation whenever possible.
+*>
+*> When CCHKST is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the Hermitian eigenroutines. For each matrix, a number
+*> of tests will be performed:
+*>
+*> (1) | A - V S V* | / ( |A| n ulp ) CHETRD( UPLO='U', ... )
+*>
+*> (2) | I - UV* | / ( n ulp ) CUNGTR( UPLO='U', ... )
+*>
+*> (3) | A - V S V* | / ( |A| n ulp ) CHETRD( UPLO='L', ... )
+*>
+*> (4) | I - UV* | / ( n ulp ) CUNGTR( UPLO='L', ... )
+*>
+*> (5-8) Same as 1-4, but for CHPTRD and CUPGTR.
+*>
+*> (9) | S - Z D Z* | / ( |S| n ulp ) CSTEQR('V',...)
+*>
+*> (10) | I - ZZ* | / ( n ulp ) CSTEQR('V',...)
+*>
+*> (11) | D1 - D2 | / ( |D1| ulp ) CSTEQR('N',...)
+*>
+*> (12) | D1 - D3 | / ( |D1| ulp ) SSTERF
+*>
+*> (13) 0 if the true eigenvalues (computed by sturm count)
+*> of S are within THRESH of
+*> those in D1. 2*THRESH if they are not. (Tested using
+*> SSTECH)
+*>
+*> For S positive definite,
+*>
+*> (14) | S - Z4 D4 Z4* | / ( |S| n ulp ) CPTEQR('V',...)
+*>
+*> (15) | I - Z4 Z4* | / ( n ulp ) CPTEQR('V',...)
+*>
+*> (16) | D4 - D5 | / ( 100 |D4| ulp ) CPTEQR('N',...)
+*>
+*> When S is also diagonally dominant by the factor gamma < 1,
+*>
+*> (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> SSTEBZ( 'A', 'E', ...)
+*>
+*> (18) | WA1 - D3 | / ( |D3| ulp ) SSTEBZ( 'A', 'E', ...)
+*>
+*> (19) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> SSTEBZ( 'I', 'E', ...)
+*>
+*> (20) | S - Y WA1 Y* | / ( |S| n ulp ) SSTEBZ, CSTEIN
+*>
+*> (21) | I - Y Y* | / ( n ulp ) SSTEBZ, CSTEIN
+*>
+*> (22) | S - Z D Z* | / ( |S| n ulp ) CSTEDC('I')
+*>
+*> (23) | I - ZZ* | / ( n ulp ) CSTEDC('I')
+*>
+*> (24) | S - Z D Z* | / ( |S| n ulp ) CSTEDC('V')
+*>
+*> (25) | I - ZZ* | / ( n ulp ) CSTEDC('V')
+*>
+*> (26) | D1 - D2 | / ( |D1| ulp ) CSTEDC('V') and
+*> CSTEDC('N')
+*>
+*> Test 27 is disabled at the moment because CSTEMR does not
+*> guarantee high relatvie accuracy.
+*>
+*> (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> CSTEMR('V', 'A')
+*>
+*> (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> CSTEMR('V', 'I')
+*>
+*> Tests 29 through 34 are disable at present because CSTEMR
+*> does not handle partial specturm requests.
+*>
+*> (29) | S - Z D Z* | / ( |S| n ulp ) CSTEMR('V', 'I')
+*>
+*> (30) | I - ZZ* | / ( n ulp ) CSTEMR('V', 'I')
+*>
+*> (31) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> CSTEMR('N', 'I') vs. CSTEMR('V', 'I')
+*>
+*> (32) | S - Z D Z* | / ( |S| n ulp ) CSTEMR('V', 'V')
+*>
+*> (33) | I - ZZ* | / ( n ulp ) CSTEMR('V', 'V')
+*>
+*> (34) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> CSTEMR('N', 'V') vs. CSTEMR('V', 'V')
+*>
+*> (35) | S - Z D Z* | / ( |S| n ulp ) CSTEMR('V', 'A')
+*>
+*> (36) | I - ZZ* | / ( n ulp ) CSTEMR('V', 'A')
+*>
+*> (37) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> CSTEMR('N', 'A') vs. CSTEMR('V', 'A')
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is unitary and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is unitary and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Hermitian matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*> (16) Same as (8), but diagonal elements are all positive.
+*> (17) Same as (9), but diagonal elements are all positive.
+*> (18) Same as (10), but diagonal elements are all positive.
+*> (19) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (20) Same as (16), but multiplied by SQRT( underflow threshold )
+*> (21) A diagonally dominant tridiagonal matrix with geometrically
+*> spaced diagonal entries 1, ..., ULP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CCHKST does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CCHKST
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CCHKST to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array of
+*> dimension ( LDA , max(NN) )
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX array of
+*> dimension( max(NN)*max(NN+1)/2 )
+*> The matrix A stored in packed format.
+*> \endverbatim
+*>
+*> \param[out] SD
+*> \verbatim
+*> SD is REAL array of
+*> dimension( max(NN) )
+*> The diagonal of the tridiagonal matrix computed by CHETRD.
+*> On exit, SD and SE contain the tridiagonal form of the
+*> matrix in A.
+*> \endverbatim
+*>
+*> \param[out] SE
+*> \verbatim
+*> SE is REAL array of
+*> dimension( max(NN) )
+*> The off-diagonal of the tridiagonal matrix computed by
+*> CHETRD. On exit, SD and SE contain the tridiagonal form of
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D1
+*> \verbatim
+*> D1 is REAL array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by CSTEQR simlutaneously
+*> with Z. On exit, the eigenvalues in D1 correspond with the
+*> matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D2
+*> \verbatim
+*> D2 is REAL array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by CSTEQR if Z is not
+*> computed. On exit, the eigenvalues in D2 correspond with
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D3
+*> \verbatim
+*> D3 is REAL array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by SSTERF. On exit, the
+*> eigenvalues in D3 correspond with the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array of
+*> dimension( LDU, max(NN) ).
+*> The unitary matrix computed by CHETRD + CUNGTR.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U, Z, and V. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array of
+*> dimension( LDU, max(NN) ).
+*> The Housholder vectors computed by CHETRD in reducing A to
+*> tridiagonal form. The vectors computed with UPLO='U' are
+*> in the upper triangle, and the vectors computed with UPLO='L'
+*> are in the lower triangle. (As described in CHETRD, the
+*> sub- and superdiagonal are not set to 1, although the
+*> true Householder vector has a 1 in that position. The
+*> routines that use V, such as CUNGTR, set those entries to
+*> 1 before using them, and then restore them later.)
+*> \endverbatim
+*>
+*> \param[out] VP
+*> \verbatim
+*> VP is COMPLEX array of
+*> dimension( max(NN)*max(NN+1)/2 )
+*> The matrix V stored in packed format.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array of
+*> dimension( max(NN) )
+*> The Householder factors computed by CHETRD in reducing A
+*> to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array of
+*> dimension( LDU, max(NN) ).
+*> The unitary matrix of eigenvectors computed by CSTEQR,
+*> CPTEQR, and CSTEIN.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array of
+*> dimension( LWORK )
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array,
+*> dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array of
+*> dimension( ??? )
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (26)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -23: LDU < 1 or LDU < NMAX.
+*> -29: LWORK too small.
+*> If CLATMR, CLATMS, CHETRD, CUNGTR, CSTEQR, SSTERF,
+*> or CUNMC2 returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NBLOCK Blocksize as returned by ENVIR.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCHKST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
$ WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
$ LWORK, RWORK, LRWORK, IWORK, LIWORK, RESULT,
$ INFO )
- IMPLICIT NONE
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
@@ -24,408 +560,6 @@
$ V( LDU, * ), VP( * ), WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKST checks the Hermitian eigenvalue problem routines.
-*
-* CHETRD factors A as U S U* , where * means conjugate transpose,
-* S is real symmetric tridiagonal, and U is unitary.
-* CHETRD can use either just the lower or just the upper triangle
-* of A; CCHKST checks both cases.
-* U is represented as a product of Householder
-* transformations, whose vectors are stored in the first
-* n-1 columns of V, and whose scale factors are in TAU.
-*
-* CHPTRD does the same as CHETRD, except that A and V are stored
-* in "packed" format.
-*
-* CUNGTR constructs the matrix U from the contents of V and TAU.
-*
-* CUPGTR constructs the matrix U from the contents of VP and TAU.
-*
-* CSTEQR factors S as Z D1 Z* , where Z is the unitary
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal. D2 is the matrix of
-* eigenvalues computed when Z is not computed.
-*
-* SSTERF computes D3, the matrix of eigenvalues, by the
-* PWK method, which does not yield eigenvectors.
-*
-* CPTEQR factors S as Z4 D4 Z4* , for a
-* Hermitian positive definite tridiagonal matrix.
-* D5 is the matrix of eigenvalues computed when Z is not
-* computed.
-*
-* SSTEBZ computes selected eigenvalues. WA1, WA2, and
-* WA3 will denote eigenvalues computed to high
-* absolute accuracy, with different range options.
-* WR will denote eigenvalues computed to high relative
-* accuracy.
-*
-* CSTEIN computes Y, the eigenvectors of S, given the
-* eigenvalues.
-*
-* CSTEDC factors S as Z D1 Z* , where Z is the unitary
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal ('I' option). It may also
-* update an input unitary matrix, usually the output
-* from CHETRD/CUNGTR or CHPTRD/CUPGTR ('V' option). It may
-* also just compute eigenvalues ('N' option).
-*
-* CSTEMR factors S as Z D1 Z* , where Z is the unitary
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal ('I' option). CSTEMR
-* uses the Relatively Robust Representation whenever possible.
-*
-* When CCHKST is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the Hermitian eigenroutines. For each matrix, a number
-* of tests will be performed:
-*
-* (1) | A - V S V* | / ( |A| n ulp ) CHETRD( UPLO='U', ... )
-*
-* (2) | I - UV* | / ( n ulp ) CUNGTR( UPLO='U', ... )
-*
-* (3) | A - V S V* | / ( |A| n ulp ) CHETRD( UPLO='L', ... )
-*
-* (4) | I - UV* | / ( n ulp ) CUNGTR( UPLO='L', ... )
-*
-* (5-8) Same as 1-4, but for CHPTRD and CUPGTR.
-*
-* (9) | S - Z D Z* | / ( |S| n ulp ) CSTEQR('V',...)
-*
-* (10) | I - ZZ* | / ( n ulp ) CSTEQR('V',...)
-*
-* (11) | D1 - D2 | / ( |D1| ulp ) CSTEQR('N',...)
-*
-* (12) | D1 - D3 | / ( |D1| ulp ) SSTERF
-*
-* (13) 0 if the true eigenvalues (computed by sturm count)
-* of S are within THRESH of
-* those in D1. 2*THRESH if they are not. (Tested using
-* SSTECH)
-*
-* For S positive definite,
-*
-* (14) | S - Z4 D4 Z4* | / ( |S| n ulp ) CPTEQR('V',...)
-*
-* (15) | I - Z4 Z4* | / ( n ulp ) CPTEQR('V',...)
-*
-* (16) | D4 - D5 | / ( 100 |D4| ulp ) CPTEQR('N',...)
-*
-* When S is also diagonally dominant by the factor gamma < 1,
-*
-* (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* SSTEBZ( 'A', 'E', ...)
-*
-* (18) | WA1 - D3 | / ( |D3| ulp ) SSTEBZ( 'A', 'E', ...)
-*
-* (19) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* SSTEBZ( 'I', 'E', ...)
-*
-* (20) | S - Y WA1 Y* | / ( |S| n ulp ) SSTEBZ, CSTEIN
-*
-* (21) | I - Y Y* | / ( n ulp ) SSTEBZ, CSTEIN
-*
-* (22) | S - Z D Z* | / ( |S| n ulp ) CSTEDC('I')
-*
-* (23) | I - ZZ* | / ( n ulp ) CSTEDC('I')
-*
-* (24) | S - Z D Z* | / ( |S| n ulp ) CSTEDC('V')
-*
-* (25) | I - ZZ* | / ( n ulp ) CSTEDC('V')
-*
-* (26) | D1 - D2 | / ( |D1| ulp ) CSTEDC('V') and
-* CSTEDC('N')
-*
-* Test 27 is disabled at the moment because CSTEMR does not
-* guarantee high relatvie accuracy.
-*
-* (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* CSTEMR('V', 'A')
-*
-* (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* CSTEMR('V', 'I')
-*
-* Tests 29 through 34 are disable at present because CSTEMR
-* does not handle partial specturm requests.
-*
-* (29) | S - Z D Z* | / ( |S| n ulp ) CSTEMR('V', 'I')
-*
-* (30) | I - ZZ* | / ( n ulp ) CSTEMR('V', 'I')
-*
-* (31) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* CSTEMR('N', 'I') vs. CSTEMR('V', 'I')
-*
-* (32) | S - Z D Z* | / ( |S| n ulp ) CSTEMR('V', 'V')
-*
-* (33) | I - ZZ* | / ( n ulp ) CSTEMR('V', 'V')
-*
-* (34) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* CSTEMR('N', 'V') vs. CSTEMR('V', 'V')
-*
-* (35) | S - Z D Z* | / ( |S| n ulp ) CSTEMR('V', 'A')
-*
-* (36) | I - ZZ* | / ( n ulp ) CSTEMR('V', 'A')
-*
-* (37) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* CSTEMR('N', 'A') vs. CSTEMR('V', 'A')
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is unitary and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is unitary and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Hermitian matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-* (16) Same as (8), but diagonal elements are all positive.
-* (17) Same as (9), but diagonal elements are all positive.
-* (18) Same as (10), but diagonal elements are all positive.
-* (19) Same as (16), but multiplied by SQRT( overflow threshold )
-* (20) Same as (16), but multiplied by SQRT( underflow threshold )
-* (21) A diagonally dominant tridiagonal matrix with geometrically
-* spaced diagonal entries 1, ..., ULP.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CCHKST does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CCHKST
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CCHKST to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace/output) COMPLEX array of
-* dimension ( LDA , max(NN) )
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-*
-* AP (workspace) COMPLEX array of
-* dimension( max(NN)*max(NN+1)/2 )
-* The matrix A stored in packed format.
-*
-* SD (workspace/output) REAL array of
-* dimension( max(NN) )
-* The diagonal of the tridiagonal matrix computed by CHETRD.
-* On exit, SD and SE contain the tridiagonal form of the
-* matrix in A.
-*
-* SE (workspace/output) REAL array of
-* dimension( max(NN) )
-* The off-diagonal of the tridiagonal matrix computed by
-* CHETRD. On exit, SD and SE contain the tridiagonal form of
-* the matrix in A.
-*
-* D1 (workspace/output) REAL array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by CSTEQR simlutaneously
-* with Z. On exit, the eigenvalues in D1 correspond with the
-* matrix in A.
-*
-* D2 (workspace/output) REAL array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by CSTEQR if Z is not
-* computed. On exit, the eigenvalues in D2 correspond with
-* the matrix in A.
-*
-* D3 (workspace/output) REAL array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by SSTERF. On exit, the
-* eigenvalues in D3 correspond with the matrix in A.
-*
-* U (workspace/output) COMPLEX array of
-* dimension( LDU, max(NN) ).
-* The unitary matrix computed by CHETRD + CUNGTR.
-*
-* LDU (input) INTEGER
-* The leading dimension of U, Z, and V. It must be at least 1
-* and at least max( NN ).
-*
-* V (workspace/output) COMPLEX array of
-* dimension( LDU, max(NN) ).
-* The Housholder vectors computed by CHETRD in reducing A to
-* tridiagonal form. The vectors computed with UPLO='U' are
-* in the upper triangle, and the vectors computed with UPLO='L'
-* are in the lower triangle. (As described in CHETRD, the
-* sub- and superdiagonal are not set to 1, although the
-* true Householder vector has a 1 in that position. The
-* routines that use V, such as CUNGTR, set those entries to
-* 1 before using them, and then restore them later.)
-*
-* VP (workspace) COMPLEX array of
-* dimension( max(NN)*max(NN+1)/2 )
-* The matrix V stored in packed format.
-*
-* TAU (workspace/output) COMPLEX array of
-* dimension( max(NN) )
-* The Householder factors computed by CHETRD in reducing A
-* to tridiagonal form.
-*
-* Z (workspace/output) COMPLEX array of
-* dimension( LDU, max(NN) ).
-* The unitary matrix of eigenvectors computed by CSTEQR,
-* CPTEQR, and CSTEIN.
-*
-* WORK (workspace/output) COMPLEX array of
-* dimension( LWORK )
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-*
-* IWORK (workspace/output) INTEGER array,
-* dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-* Workspace.
-*
-* RWORK (workspace/output) REAL array of
-* dimension( ??? )
-*
-* RESULT (output) REAL array, dimension (26)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -23: LDU < 1 or LDU < NMAX.
-* -29: LWORK too small.
-* If CLATMR, CLATMS, CHETRD, CUNGTR, CSTEQR, SSTERF,
-* or CUNMC2 returns an error code, the
-* absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NBLOCK Blocksize as returned by ENVIR.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cckcsd.f b/TESTING/EIG/cckcsd.f
index f454e3c0..04f25ef5 100644
--- a/TESTING/EIG/cckcsd.f
+++ b/TESTING/EIG/cckcsd.f
@@ -1,15 +1,195 @@
+*> \brief \b CCKCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCKCSD( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
+* MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
+* WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), PVAL( * ),
+* $ QVAL( * )
+* REAL RWORK( * ), THETA( * )
+* COMPLEX U1( * ), U2( * ), V1T( * ), V2T( * ),
+* $ WORK( * ), X( * ), XF( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCKCSD tests CUNCSD:
+*> the CSD for an M-by-M unitary matrix X partitioned as
+*> [ X11 X12; X21 X22 ]. X11 is P-by-Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension P.
+*> \endverbatim
+*>
+*> \param[in] QVAL
+*> \verbatim
+*> QVAL is INTEGER array, dimension (NM)
+*> The values of the matrix column dimension Q.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] MMAX
+*> \verbatim
+*> MMAX is INTEGER
+*> The maximum value permitted for M, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] XF
+*> \verbatim
+*> XF is COMPLEX array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is COMPLEX array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is COMPLEX array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is COMPLEX array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is COMPLEX array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If CLAROR returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCKCSD( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
$ MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
$ WORK, RWORK, NIN, NOUT, INFO )
- IMPLICIT NONE
*
-* Originally CCKGSV
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
-*
-* Adapted to CCKCSD
-* July 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
@@ -23,82 +203,6 @@
$ WORK( * ), X( * ), XF( * )
* ..
*
-* Purpose
-* =======
-*
-* CCKCSD tests CUNCSD:
-* the CSD for an M-by-M unitary matrix X partitioned as
-* [ X11 X12; X21 X22 ]. X11 is P-by-Q.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension P.
-*
-* QVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix column dimension Q.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* MMAX (input) INTEGER
-* The maximum value permitted for M, used in dimensioning the
-* work arrays.
-*
-* X (workspace) COMPLEX array, dimension (MMAX*MMAX)
-*
-* XF (workspace) COMPLEX array, dimension (MMAX*MMAX)
-*
-* U1 (workspace) COMPLEX array, dimension (MMAX*MMAX)
-*
-* U2 (workspace) COMPLEX array, dimension (MMAX*MMAX)
-*
-* V1T (workspace) COMPLEX array, dimension (MMAX*MMAX)
-*
-* V2T (workspace) COMPLEX array, dimension (MMAX*MMAX)
-*
-* THETA (workspace) REAL array, dimension (MMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (MMAX)
-*
-* WORK (workspace) COMPLEX array
-*
-* RWORK (workspace) REAL array
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If CLAROR returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cckglm.f b/TESTING/EIG/cckglm.f
index d507f0be..7c248a8b 100644
--- a/TESTING/EIG/cckglm.f
+++ b/TESTING/EIG/cckglm.f
@@ -1,10 +1,179 @@
+*> \brief \b CCKGLM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCKGLM( NN, NVAL, MVAL, PVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AF( * ), B( * ), BF( * ), WORK( * ),
+* $ X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCKGLM tests CGGGLM - subroutine for solving generalized linear
+*> model problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N, M and P contained in the vectors
+*> NVAL, MVAL and PVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row dimension N.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension P.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESID >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (4*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If CLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCKGLM( NN, NVAL, MVAL, PVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
@@ -17,76 +186,6 @@
$ X( * )
* ..
*
-* Purpose
-* =======
-*
-* CCKGLM tests CGGGLM - subroutine for solving generalized linear
-* model problem.
-*
-* Arguments
-* =========
-*
-* NN (input) INTEGER
-* The number of values of N, M and P contained in the vectors
-* NVAL, MVAL and PVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row dimension N.
-*
-* MVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension P.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESID >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* BF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* X (workspace) COMPLEX array, dimension (4*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If CLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cckgqr.f b/TESTING/EIG/cckgqr.f
index c439a98f..83b8e272 100644
--- a/TESTING/EIG/cckgqr.f
+++ b/TESTING/EIG/cckgqr.f
@@ -1,10 +1,222 @@
+*> \brief \b CCKGQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
+* THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
+* BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AF( * ), AQ( * ), AR( * ), B( * ),
+* $ BF( * ), BT( * ), BWK( * ), BZ( * ), TAUA( * ),
+* $ TAUB( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCKGQR tests
+*> CGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
+*> CGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row(column) dimension M.
+*> \endverbatim
+*>
+*> \param[in] NP
+*> \verbatim
+*> NP is INTEGER
+*> The number of values of P contained in the vector PVAL.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NP)
+*> The values of the matrix row(column) dimension P.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column(row) dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is COMPLEX array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BZ
+*> \verbatim
+*> BZ is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BT
+*> \verbatim
+*> BT is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is COMPLEX array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If CLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
$ THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
$ BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
@@ -18,94 +230,6 @@
$ TAUB( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CCKGQR tests
-* CGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
-* CGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row(column) dimension M.
-*
-* NP (input) INTEGER
-* The number of values of P contained in the vector PVAL.
-*
-* PVAL (input) INTEGER array, dimension (NP)
-* The values of the matrix row(column) dimension P.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column(row) dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AR (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* TAUA (workspace) COMPLEX array, dimension (NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* BF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* BZ (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* BT (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* BWK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* TAUB (workspace) COMPLEX array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If CLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cckgsv.f b/TESTING/EIG/cckgsv.f
index ea81f2e3..63306cad 100644
--- a/TESTING/EIG/cckgsv.f
+++ b/TESTING/EIG/cckgsv.f
@@ -1,10 +1,209 @@
+*> \brief \b CCKGSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCKGSV( NM, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, U, V, Q, ALPHA, BETA, R,
+* IWORK, WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, NMAX, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), NVAL( * ),
+* $ PVAL( * )
+* REAL ALPHA( * ), BETA( * ), RWORK( * )
+* COMPLEX A( * ), AF( * ), B( * ), BF( * ), Q( * ),
+* $ R( * ), U( * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCKGSV tests CGGSVD:
+*> the GSVD for M-by-N matrix A and P-by-N matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NP)
+*> The values of the matrix row dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If CLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCKGSV( NM, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, U, V, Q, ALPHA, BETA, R,
$ IWORK, WORK, RWORK, NIN, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, NMAX, NOUT
@@ -18,87 +217,6 @@
$ R( * ), U( * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CCKGSV tests CGGSVD:
-* the GSVD for M-by-N matrix A and P-by-N matrix B.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NP)
-* The values of the matrix row dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* BF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* U (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* V (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* Q (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* ALPHA (workspace) REAL array, dimension (NMAX)
-*
-* BETA (workspace) REAL array, dimension (NMAX)
-*
-* R (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If CLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ccklse.f b/TESTING/EIG/ccklse.f
index f03472c4..389113d3 100644
--- a/TESTING/EIG/ccklse.f
+++ b/TESTING/EIG/ccklse.f
@@ -1,10 +1,179 @@
+*> \brief \b CCKLSE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AF( * ), B( * ), BF( * ), WORK( * ),
+* $ X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCKLSE tests CGGLSE - a subroutine for solving linear equality
+*> constrained least square problem (LSE).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of (M,P,N) contained in the vectors
+*> (MVAL, PVAL, NVAL).
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row(column) dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row(column) dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column(row) dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (5*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If CLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
@@ -17,76 +186,6 @@
$ X( * )
* ..
*
-* Purpose
-* =======
-*
-* CCKLSE tests CGGLSE - a subroutine for solving linear equality
-* constrained least square problem (LSE).
-*
-* Arguments
-* =========
-*
-* NN (input) INTEGER
-* The number of values of (M,P,N) contained in the vectors
-* (MVAL, PVAL, NVAL).
-*
-* MVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row(column) dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row(column) dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column(row) dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* BF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* X (workspace) COMPLEX array, dimension (5*NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If CLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ccsdts.f b/TESTING/EIG/ccsdts.f
index e4362fa8..59a18d21 100644
--- a/TESTING/EIG/ccsdts.f
+++ b/TESTING/EIG/ccsdts.f
@@ -1,15 +1,215 @@
+*> \brief \b CCSDTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCSDTS( M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T,
+* LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDX, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RESULT( 9 ), RWORK( * ), THETA( * )
+* COMPLEX U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * ), WORK( LWORK ), X( LDX, * ),
+* $ XF( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCSDTS tests CUNCSD, which, given an M-by-M partitioned unitary
+*> matrix X,
+*> Q M-Q
+*> X = [ X11 X12 ] P ,
+*> [ X21 X22 ] M-P
+*>
+*> computes the CSD
+*>
+*> [ U1 ]**T * [ X11 X12 ] * [ V1 ]
+*> [ U2 ] [ X21 X22 ] [ V2 ]
+*>
+*> [ I 0 0 | 0 0 0 ]
+*> [ 0 C 0 | 0 -S 0 ]
+*> [ 0 0 0 | 0 0 -I ]
+*> = [---------------------] = [ D11 D12 ] .
+*> [ 0 0 0 | I 0 0 ] [ D21 D22 ]
+*> [ 0 S 0 | 0 C 0 ]
+*> [ 0 0 I | 0 0 0 ]
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix X11. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns of the matrix X11. Q >= 0.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,M)
+*> The M-by-M matrix X.
+*> \endverbatim
+*>
+*> \param[out] XF
+*> \verbatim
+*> XF is COMPLEX array, dimension (LDX,M)
+*> Details of the CSD of X, as returned by CUNCSD;
+*> see CUNCSD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the arrays X and XF.
+*> LDX >= max( 1,M ).
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is COMPLEX array, dimension(LDU1,P)
+*> The P-by-P unitary matrix U1.
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of the array U1. LDU >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is COMPLEX array, dimension(LDU2,M-P)
+*> The (M-P)-by-(M-P) unitary matrix U2.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2. LDU >= max(1,M-P).
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is COMPLEX array, dimension(LDV1T,Q)
+*> The Q-by-Q unitary matrix V1T.
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of the array V1T. LDV1T >=
+*> max(1,Q).
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is COMPLEX array, dimension(LDV2T,M-Q)
+*> The (M-Q)-by-(M-Q) unitary matrix V2T.
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of the array V2T. LDV2T >=
+*> max(1,M-Q).
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension MIN(P,M-P,Q,M-Q)
+*> The CS values of X; the essentially diagonal matrices C and
+*> S are constructed from THETA; see subroutine CUNCSD for
+*> details.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (9)
+*> The test ratios:
+*> RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
+*> RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
+*> RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
+*> RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
+*> RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
+*> RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
+*> RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
+*> RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
+*> RESULT(9) = 0 if THETA is in increasing order and
+*> all angles are in [0,pi/2];
+*> = ULPINV otherwise.
+*> ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CCSDTS( M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T,
$ LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK,
$ RWORK, RESULT )
- IMPLICIT NONE
*
-* Originally xGSVTS
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
-*
-* Adapted to CCSDTS by
-* July 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDX, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
@@ -22,106 +222,6 @@
$ XF( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CCSDTS tests CUNCSD, which, given an M-by-M partitioned unitary
-* matrix X,
-* Q M-Q
-* X = [ X11 X12 ] P ,
-* [ X21 X22 ] M-P
-*
-* computes the CSD
-*
-* [ U1 ]**T * [ X11 X12 ] * [ V1 ]
-* [ U2 ] [ X21 X22 ] [ V2 ]
-*
-* [ I 0 0 | 0 0 0 ]
-* [ 0 C 0 | 0 -S 0 ]
-* [ 0 0 0 | 0 0 -I ]
-* = [---------------------] = [ D11 D12 ] .
-* [ 0 0 0 | I 0 0 ] [ D21 D22 ]
-* [ 0 S 0 | 0 C 0 ]
-* [ 0 0 I | 0 0 0 ]
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix X11. P >= 0.
-*
-* Q (input) INTEGER
-* The number of columns of the matrix X11. Q >= 0.
-*
-* X (input) COMPLEX array, dimension (LDX,M)
-* The M-by-M matrix X.
-*
-* XF (output) COMPLEX array, dimension (LDX,M)
-* Details of the CSD of X, as returned by CUNCSD;
-* see CUNCSD for further details.
-*
-* LDX (input) INTEGER
-* The leading dimension of the arrays X and XF.
-* LDX >= max( 1,M ).
-*
-* U1 (output) COMPLEX array, dimension(LDU1,P)
-* The P-by-P unitary matrix U1.
-*
-* LDU1 (input) INTEGER
-* The leading dimension of the array U1. LDU >= max(1,P).
-*
-* U2 (output) COMPLEX array, dimension(LDU2,M-P)
-* The (M-P)-by-(M-P) unitary matrix U2.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2. LDU >= max(1,M-P).
-*
-* V1T (output) COMPLEX array, dimension(LDV1T,Q)
-* The Q-by-Q unitary matrix V1T.
-*
-* LDV1T (input) INTEGER
-* The leading dimension of the array V1T. LDV1T >=
-* max(1,Q).
-*
-* V2T (output) COMPLEX array, dimension(LDV2T,M-Q)
-* The (M-Q)-by-(M-Q) unitary matrix V2T.
-*
-* LDV2T (input) INTEGER
-* The leading dimension of the array V2T. LDV2T >=
-* max(1,M-Q).
-*
-* THETA (output) REAL array, dimension MIN(P,M-P,Q,M-Q)
-* The CS values of X; the essentially diagonal matrices C and
-* S are constructed from THETA; see subroutine CUNCSD for
-* details.
-*
-* IWORK (workspace) INTEGER array, dimension (M)
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK
-*
-* RWORK (workspace) REAL array
-*
-* RESULT (output) REAL array, dimension (9)
-* The test ratios:
-* RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
-* RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
-* RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
-* RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
-* RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
-* RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
-* RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
-* RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
-* RESULT(9) = 0 if THETA is in increasing order and
-* all angles are in [0,pi/2];
-* = ULPINV otherwise.
-* ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrges.f b/TESTING/EIG/cdrges.f
index f2f8558b..1d76f265 100644
--- a/TESTING/EIG/cdrges.f
+++ b/TESTING/EIG/cdrges.f
@@ -1,10 +1,393 @@
+*> \brief \b CDRGES
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRGES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, ALPHA,
+* BETA, WORK, LWORK, RWORK, RESULT, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL RESULT( 13 ), RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDA, * ),
+* $ BETA( * ), Q( LDQ, * ), S( LDA, * ),
+* $ T( LDA, * ), WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRGES checks the nonsymmetric generalized eigenvalue (Schur form)
+*> problem driver CGGES.
+*>
+*> CGGES factors A and B as Q*S*Z' and Q*T*Z' , where ' means conjugate
+*> transpose, S and T are upper triangular (i.e., in generalized Schur
+*> form), and Q and Z are unitary. It also computes the generalized
+*> eigenvalues (alpha(j),beta(j)), j=1,...,n. Thus,
+*> w(j) = alpha(j)/beta(j) is a root of the characteristic equation
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> Optionally it also reorder the eigenvalues so that a selected
+*> cluster of eigenvalues appears in the leading diagonal block of the
+*> Schur forms.
+*>
+*> When CDRGES is called, a number of matrix "sizes" ("N's") and a
+*> number of matrix "TYPES" are specified. For each size ("N")
+*> and each TYPE of matrix, a pair of matrices (A, B) will be generated
+*> and used for testing. For each matrix pair, the following 13 tests
+*> will be performed and compared with the threshhold THRESH except
+*> the tests (5), (11) and (13).
+*>
+*>
+*> (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues)
+*>
+*> (5) if A is in Schur form (i.e. triangular form) (no sorting of
+*> eigenvalues)
+*>
+*> (6) if eigenvalues = diagonal elements of the Schur form (S, T),
+*> i.e., test the maximum over j of D(j) where:
+*>
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> (no sorting of eigenvalues)
+*>
+*> (7) | (A,B) - Q (S,T) Z' | / ( |(A,B)| n ulp )
+*> (with sorting of eigenvalues).
+*>
+*> (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) if A is in Schur form (i.e. quasi-triangular form)
+*> (with sorting of eigenvalues).
+*>
+*> (11) if eigenvalues = diagonal elements of the Schur form (S, T),
+*> i.e. test the maximum over j of D(j) where:
+*>
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> (with sorting of eigenvalues).
+*>
+*> (12) if sorting worked and SDIM is the number of eigenvalues
+*> which were CELECTed.
+*>
+*> Test Matrices
+*> =============
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SDRGES does nothing. NSIZES >= 0.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. NN >= 0.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRGES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A on input.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRGES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. THRESH >= 0.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension(LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, and T.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension(LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is COMPLEX array, dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by CGGES. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by CGGES.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ, max(NN))
+*> The (left) orthogonal matrix computed by CGGES.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q and Z. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by CGGES.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by CGGES.
+*> ALPHA(k) / BETA(k) is the k-th generalized eigenvalue of A
+*> and B.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 3*N*N.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension ( 8*N )
+*> Real workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRGES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, ALPHA,
$ BETA, WORK, LWORK, RWORK, RESULT, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
@@ -19,270 +402,6 @@
$ T( LDA, * ), WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* CDRGES checks the nonsymmetric generalized eigenvalue (Schur form)
-* problem driver CGGES.
-*
-* CGGES factors A and B as Q*S*Z' and Q*T*Z' , where ' means conjugate
-* transpose, S and T are upper triangular (i.e., in generalized Schur
-* form), and Q and Z are unitary. It also computes the generalized
-* eigenvalues (alpha(j),beta(j)), j=1,...,n. Thus,
-* w(j) = alpha(j)/beta(j) is a root of the characteristic equation
-*
-* det( A - w(j) B ) = 0
-*
-* Optionally it also reorder the eigenvalues so that a selected
-* cluster of eigenvalues appears in the leading diagonal block of the
-* Schur forms.
-*
-* When CDRGES is called, a number of matrix "sizes" ("N's") and a
-* number of matrix "TYPES" are specified. For each size ("N")
-* and each TYPE of matrix, a pair of matrices (A, B) will be generated
-* and used for testing. For each matrix pair, the following 13 tests
-* will be performed and compared with the threshhold THRESH except
-* the tests (5), (11) and (13).
-*
-*
-* (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues)
-*
-*
-* (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues)
-*
-*
-* (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues)
-*
-*
-* (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues)
-*
-* (5) if A is in Schur form (i.e. triangular form) (no sorting of
-* eigenvalues)
-*
-* (6) if eigenvalues = diagonal elements of the Schur form (S, T),
-* i.e., test the maximum over j of D(j) where:
-*
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* (no sorting of eigenvalues)
-*
-* (7) | (A,B) - Q (S,T) Z' | / ( |(A,B)| n ulp )
-* (with sorting of eigenvalues).
-*
-* (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) if A is in Schur form (i.e. quasi-triangular form)
-* (with sorting of eigenvalues).
-*
-* (11) if eigenvalues = diagonal elements of the Schur form (S, T),
-* i.e. test the maximum over j of D(j) where:
-*
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* (with sorting of eigenvalues).
-*
-* (12) if sorting worked and SDIM is the number of eigenvalues
-* which were CELECTed.
-*
-* Test Matrices
-* =============
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SDRGES does nothing. NSIZES >= 0.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. NN >= 0.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRGES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A on input.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRGES to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. THRESH >= 0.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) COMPLEX array, dimension(LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, and T.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) COMPLEX array, dimension(LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The Schur form matrix computed from A by CGGES. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by CGGES.
-*
-* Q (workspace) COMPLEX array, dimension (LDQ, max(NN))
-* The (left) orthogonal matrix computed by CGGES.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q and Z. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) COMPLEX array, dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by CGGES.
-*
-* ALPHA (workspace) COMPLEX array, dimension (max(NN))
-* BETA (workspace) COMPLEX array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by CGGES.
-* ALPHA(k) / BETA(k) is the k-th generalized eigenvalue of A
-* and B.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 3*N*N.
-*
-* RWORK (workspace) REAL array, dimension ( 8*N )
-* Real workspace.
-*
-* RESULT (output) REAL array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrgev.f b/TESTING/EIG/cdrgev.f
index 67cfbb12..21cb4bf0 100644
--- a/TESTING/EIG/cdrgev.f
+++ b/TESTING/EIG/cdrgev.f
@@ -1,11 +1,412 @@
+*> \brief \b CDRGEV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRGEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, QE, LDQE,
+* ALPHA, BETA, ALPHA1, BETA1, WORK, LWORK, RWORK,
+* RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LDQE, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), ALPHA1( * ),
+* $ B( LDA, * ), BETA( * ), BETA1( * ),
+* $ Q( LDQ, * ), QE( LDQE, * ), S( LDA, * ),
+* $ T( LDA, * ), WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRGEV checks the nonsymmetric generalized eigenvalue problem driver
+*> routine CGGEV.
+*>
+*> CGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the
+*> generalized eigenvalues and, optionally, the left and right
+*> eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is reasonalbe
+*> interpretation for beta=0, and even for both being zero.
+*>
+*> A right generalized eigenvector corresponding to a generalized
+*> eigenvalue w for a pair of matrices (A,B) is a vector r such that
+*> (A - wB) * r = 0. A left generalized eigenvector is a vector l such
+*> that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l.
+*>
+*> When CDRGEV is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, a pair of matrices (A, B) will be generated
+*> and used for testing. For each matrix pair, the following tests
+*> will be performed and compared with the threshhold THRESH.
+*>
+*> Results from CGGEV:
+*>
+*> (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of
+*>
+*> | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) )
+*>
+*> where VL**H is the conjugate-transpose of VL.
+*>
+*> (2) | |VL(i)| - 1 | / ulp and whether largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of
+*>
+*> | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) )
+*>
+*> (4) | |VR(i)| - 1 | / ulp and whether largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (5) W(full) = W(partial)
+*> W(full) denotes the eigenvalues computed when both l and r
+*> are also computed, and W(partial) denotes the eigenvalues
+*> computed when only W, only W and r, or only W and l are
+*> computed.
+*>
+*> (6) VL(full) = VL(partial)
+*> VL(full) denotes the left eigenvectors computed when both l
+*> and r are computed, and VL(partial) denotes the result
+*> when only l is computed.
+*>
+*> (7) VR(full) = VR(partial)
+*> VR(full) denotes the right eigenvectors computed when both l
+*> and r are also computed, and VR(partial) denotes the result
+*> when only l is computed.
+*>
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CDRGES does nothing. NSIZES >= 0.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. NN >= 0.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CDRGEV
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRGES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IERR not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension(LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, and T.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension(LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is COMPLEX array, dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by CGGEV. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by CGGEV.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ, max(NN))
+*> The (left) eigenvectors matrix computed by CGGEV.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q and Z. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by CGGEV.
+*> \endverbatim
+*>
+*> \param[out] QE
+*> \verbatim
+*> QE is COMPLEX array, dimension( LDQ, max(NN) )
+*> QE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQE
+*> \verbatim
+*> LDQE is INTEGER
+*> The leading dimension of QE. LDQE >= max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by CGGEV.
+*> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
+*> generalized eigenvalue of A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHA1
+*> \verbatim
+*> ALPHA1 is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like ALPHAR, ALPHAI, BETA, these arrays contain the
+*> eigenvalues of A and B, but those computed when CGGEV only
+*> computes a partial eigendecomposition, i.e. not the
+*> eigenvalues and left and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. LWORK >= N*(N+1)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (8*N)
+*> Real workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRGEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, QE, LDQE,
$ ALPHA, BETA, ALPHA1, BETA1, WORK, LWORK, RWORK,
$ RESULT, INFO )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LDQE, LWORK, NOUNIT, NSIZES,
@@ -22,273 +423,6 @@
$ T( LDA, * ), WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* CDRGEV checks the nonsymmetric generalized eigenvalue problem driver
-* routine CGGEV.
-*
-* CGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the
-* generalized eigenvalues and, optionally, the left and right
-* eigenvectors.
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is reasonalbe
-* interpretation for beta=0, and even for both being zero.
-*
-* A right generalized eigenvector corresponding to a generalized
-* eigenvalue w for a pair of matrices (A,B) is a vector r such that
-* (A - wB) * r = 0. A left generalized eigenvector is a vector l such
-* that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l.
-*
-* When CDRGEV is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, a pair of matrices (A, B) will be generated
-* and used for testing. For each matrix pair, the following tests
-* will be performed and compared with the threshhold THRESH.
-*
-* Results from CGGEV:
-*
-* (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of
-*
-* | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) )
-*
-* where VL**H is the conjugate-transpose of VL.
-*
-* (2) | |VL(i)| - 1 | / ulp and whether largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of
-*
-* | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) )
-*
-* (4) | |VR(i)| - 1 | / ulp and whether largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (5) W(full) = W(partial)
-* W(full) denotes the eigenvalues computed when both l and r
-* are also computed, and W(partial) denotes the eigenvalues
-* computed when only W, only W and r, or only W and l are
-* computed.
-*
-* (6) VL(full) = VL(partial)
-* VL(full) denotes the left eigenvectors computed when both l
-* and r are computed, and VL(partial) denotes the result
-* when only l is computed.
-*
-* (7) VR(full) = VR(partial)
-* VR(full) denotes the right eigenvectors computed when both l
-* and r are also computed, and VR(partial) denotes the result
-* when only l is computed.
-*
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CDRGES does nothing. NSIZES >= 0.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. NN >= 0.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CDRGEV
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRGES to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IERR not equal to 0.)
-*
-* A (input/workspace) COMPLEX array, dimension(LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, and T.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) COMPLEX array, dimension(LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The Schur form matrix computed from A by CGGEV. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by CGGEV.
-*
-* Q (workspace) COMPLEX array, dimension (LDQ, max(NN))
-* The (left) eigenvectors matrix computed by CGGEV.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q and Z. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) COMPLEX array, dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by CGGEV.
-*
-* QE (workspace) COMPLEX array, dimension( LDQ, max(NN) )
-* QE holds the computed right or left eigenvectors.
-*
-* LDQE (input) INTEGER
-* The leading dimension of QE. LDQE >= max(1,max(NN)).
-*
-* ALPHA (workspace) COMPLEX array, dimension (max(NN))
-* BETA (workspace) COMPLEX array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by CGGEV.
-* ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
-* generalized eigenvalue of A and B.
-*
-* ALPHA1 (workspace) COMPLEX array, dimension (max(NN))
-* BETA1 (workspace) COMPLEX array, dimension (max(NN))
-* Like ALPHAR, ALPHAI, BETA, these arrays contain the
-* eigenvalues of A and B, but those computed when CGGEV only
-* computes a partial eigendecomposition, i.e. not the
-* eigenvalues and left and right eigenvectors.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. LWORK >= N*(N+1)
-*
-* RWORK (workspace) REAL array, dimension (8*N)
-* Real workspace.
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrgsx.f b/TESTING/EIG/cdrgsx.f
index 31057b72..d73f6683 100644
--- a/TESTING/EIG/cdrgsx.f
+++ b/TESTING/EIG/cdrgsx.f
@@ -1,10 +1,361 @@
+*> \brief \b CDRGSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B,
+* AI, BI, Z, Q, ALPHA, BETA, C, LDC, S, WORK,
+* LWORK, RWORK, IWORK, LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
+* $ NOUT, NSIZE
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( LDA, * ), AI( LDA, * ), ALPHA( * ),
+* $ B( LDA, * ), BETA( * ), BI( LDA, * ),
+* $ C( LDC, * ), Q( LDA, * ), WORK( * ),
+* $ Z( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRGSX checks the nonsymmetric generalized eigenvalue (Schur form)
+*> problem expert driver CGGESX.
+*>
+*> CGGES factors A and B as Q*S*Z' and Q*T*Z' , where ' means conjugate
+*> transpose, S and T are upper triangular (i.e., in generalized Schur
+*> form), and Q and Z are unitary. It also computes the generalized
+*> eigenvalues (alpha(j),beta(j)), j=1,...,n. Thus,
+*> w(j) = alpha(j)/beta(j) is a root of the characteristic equation
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> Optionally it also reorders the eigenvalues so that a selected
+*> cluster of eigenvalues appears in the leading diagonal block of the
+*> Schur forms; computes a reciprocal condition number for the average
+*> of the selected eigenvalues; and computes a reciprocal condition
+*> number for the right and left deflating subspaces corresponding to
+*> the selected eigenvalues.
+*>
+*> When CDRGSX is called with NSIZE > 0, five (5) types of built-in
+*> matrix pairs are used to test the routine CGGESX.
+*>
+*> When CDRGSX is called with NSIZE = 0, it reads in test matrix data
+*> to test CGGESX.
+*> (need more details on what kind of read-in data are needed).
+*>
+*> For each matrix pair, the following tests will be performed and
+*> compared with the threshhold THRESH except for the tests (7) and (9):
+*>
+*> (1) | A - Q S Z' | / ( |A| n ulp )
+*>
+*> (2) | B - Q T Z' | / ( |B| n ulp )
+*>
+*> (3) | I - QQ' | / ( n ulp )
+*>
+*> (4) | I - ZZ' | / ( n ulp )
+*>
+*> (5) if A is in Schur form (i.e. triangular form)
+*>
+*> (6) maximum over j of D(j) where:
+*>
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> (7) if sorting worked and SDIM is the number of eigenvalues
+*> which were selected.
+*>
+*> (8) the estimated value DIF does not differ from the true values of
+*> Difu and Difl more than a factor 10*THRESH. If the estimate DIF
+*> equals zero the corresponding true values of Difu and Difl
+*> should be less than EPS*norm(A, B). If the true value of Difu
+*> and Difl equal zero, the estimate DIF should be less than
+*> EPS*norm(A, B).
+*>
+*> (9) If INFO = N+3 is returned by CGGESX, the reordering "failed"
+*> and we check that DIF = PL = PR = 0 and that the true value of
+*> Difu and Difl is < EPS*norm(A, B). We count the events when
+*> INFO=N+3.
+*>
+*> For read-in test matrices, the same tests are run except that the
+*> exact value for DIF (and PL) is input data. Additionally, there is
+*> one more test run for read-in test matrices:
+*>
+*> (10) the estimated value PL does not differ from the true value of
+*> PLTRU more than a factor THRESH. If the estimate PL equals
+*> zero the corresponding true value of PLTRU should be less than
+*> EPS*norm(A, B). If the true value of PLTRU equal zero, the
+*> estimate PL should be less than EPS*norm(A, B).
+*>
+*> Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1)
+*> matrix pairs are generated and tested. NSIZE should be kept small.
+*>
+*> SVD (routine CGESVD) is used for computing the true value of DIF_u
+*> and DIF_l when testing the built-in test problems.
+*>
+*> Built-in Test Matrices
+*> ======================
+*>
+*> All built-in test matrices are the 2 by 2 block of triangular
+*> matrices
+*>
+*> A = [ A11 A12 ] and B = [ B11 B12 ]
+*> [ A22 ] [ B22 ]
+*>
+*> where for different type of A11 and A22 are given as the following.
+*> A12 and B12 are chosen so that the generalized Sylvester equation
+*>
+*> A11*R - L*A22 = -A12
+*> B11*R - L*B22 = -B12
+*>
+*> have prescribed solution R and L.
+*>
+*> Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1).
+*> B11 = I_m, B22 = I_k
+*> where J_k(a,b) is the k-by-k Jordan block with ``a'' on
+*> diagonal and ``b'' on superdiagonal.
+*>
+*> Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and
+*> B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m
+*> A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and
+*> B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
+*>
+*> Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each
+*> second diagonal block in A_11 and each third diagonal block
+*> in A_22 are made as 2 by 2 blocks.
+*>
+*> Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) )
+*> for i=1,...,m, j=1,...,m and
+*> A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) )
+*> for i=m+1,...,k, j=m+1,...,k
+*>
+*> Type 5: (A,B) and have potentially close or common eigenvalues and
+*> very large departure from block diagonality A_11 is chosen
+*> as the m x m leading submatrix of A_1:
+*> | 1 b |
+*> | -b 1 |
+*> | 1+d b |
+*> | -b 1+d |
+*> A_1 = | d 1 |
+*> | -1 d |
+*> | -d 1 |
+*> | -1 -d |
+*> | 1 |
+*> and A_22 is chosen as the k x k leading submatrix of A_2:
+*> | -1 b |
+*> | -b -1 |
+*> | 1-d b |
+*> | -b 1-d |
+*> A_2 = | d 1+b |
+*> | -1-b d |
+*> | -d 1+b |
+*> | -1+b -d |
+*> | 1-d |
+*> and matrix B are chosen as identity matrices (see SLATM5).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZE
+*> \verbatim
+*> NSIZE is INTEGER
+*> The maximum size of the matrices to use. NSIZE >= 0.
+*> If NSIZE = 0, no built-in tests matrices are used, but
+*> read-in test matrices are used to test SGGESX.
+*> \endverbatim
+*>
+*> \param[in] NCMAX
+*> \verbatim
+*> NCMAX is INTEGER
+*> Maximum allowable NMAX for generating Kroneker matrix
+*> in call to CLAKF2
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. THRESH >= 0.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, NSIZE)
+*> Used to store the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, AI, BI, Z and Q,
+*> LDA >= max( 1, NSIZE ). For the read-in test,
+*> LDA >= max( 1, N ), N is the size of the test matrices.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDA, NSIZE)
+*> Used to store the matrix whose eigenvalues are to be
+*> computed. On exit, B contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] AI
+*> \verbatim
+*> AI is COMPLEX array, dimension (LDA, NSIZE)
+*> Copy of A, modified by CGGESX.
+*> \endverbatim
+*>
+*> \param[out] BI
+*> \verbatim
+*> BI is COMPLEX array, dimension (LDA, NSIZE)
+*> Copy of B, modified by CGGESX.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDA, NSIZE)
+*> Z holds the left Schur vectors computed by CGGESX.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA, NSIZE)
+*> Q holds the right Schur vectors computed by CGGESX.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (NSIZE)
+*> \endverbatim
+*> \verbatim
+*> On exit, ALPHA/BETA are the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, LDC)
+*> Store the matrix generated by subroutine CLAKF2, this is the
+*> matrix formed by Kronecker products used for estimating
+*> DIF.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of C. LDC >= max(1, LDA*LDA/2 ).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (LDC)
+*> Singular values of C
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 3*NSIZE*NSIZE/2
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (5*NSIZE*NSIZE/2 - 4)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= NSIZE + 2.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B,
$ AI, BI, Z, Q, ALPHA, BETA, C, LDC, S, WORK,
$ LWORK, RWORK, IWORK, LIWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
@@ -21,233 +372,6 @@
$ Z( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CDRGSX checks the nonsymmetric generalized eigenvalue (Schur form)
-* problem expert driver CGGESX.
-*
-* CGGES factors A and B as Q*S*Z' and Q*T*Z' , where ' means conjugate
-* transpose, S and T are upper triangular (i.e., in generalized Schur
-* form), and Q and Z are unitary. It also computes the generalized
-* eigenvalues (alpha(j),beta(j)), j=1,...,n. Thus,
-* w(j) = alpha(j)/beta(j) is a root of the characteristic equation
-*
-* det( A - w(j) B ) = 0
-*
-* Optionally it also reorders the eigenvalues so that a selected
-* cluster of eigenvalues appears in the leading diagonal block of the
-* Schur forms; computes a reciprocal condition number for the average
-* of the selected eigenvalues; and computes a reciprocal condition
-* number for the right and left deflating subspaces corresponding to
-* the selected eigenvalues.
-*
-* When CDRGSX is called with NSIZE > 0, five (5) types of built-in
-* matrix pairs are used to test the routine CGGESX.
-*
-* When CDRGSX is called with NSIZE = 0, it reads in test matrix data
-* to test CGGESX.
-* (need more details on what kind of read-in data are needed).
-*
-* For each matrix pair, the following tests will be performed and
-* compared with the threshhold THRESH except for the tests (7) and (9):
-*
-* (1) | A - Q S Z' | / ( |A| n ulp )
-*
-* (2) | B - Q T Z' | / ( |B| n ulp )
-*
-* (3) | I - QQ' | / ( n ulp )
-*
-* (4) | I - ZZ' | / ( n ulp )
-*
-* (5) if A is in Schur form (i.e. triangular form)
-*
-* (6) maximum over j of D(j) where:
-*
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* (7) if sorting worked and SDIM is the number of eigenvalues
-* which were selected.
-*
-* (8) the estimated value DIF does not differ from the true values of
-* Difu and Difl more than a factor 10*THRESH. If the estimate DIF
-* equals zero the corresponding true values of Difu and Difl
-* should be less than EPS*norm(A, B). If the true value of Difu
-* and Difl equal zero, the estimate DIF should be less than
-* EPS*norm(A, B).
-*
-* (9) If INFO = N+3 is returned by CGGESX, the reordering "failed"
-* and we check that DIF = PL = PR = 0 and that the true value of
-* Difu and Difl is < EPS*norm(A, B). We count the events when
-* INFO=N+3.
-*
-* For read-in test matrices, the same tests are run except that the
-* exact value for DIF (and PL) is input data. Additionally, there is
-* one more test run for read-in test matrices:
-*
-* (10) the estimated value PL does not differ from the true value of
-* PLTRU more than a factor THRESH. If the estimate PL equals
-* zero the corresponding true value of PLTRU should be less than
-* EPS*norm(A, B). If the true value of PLTRU equal zero, the
-* estimate PL should be less than EPS*norm(A, B).
-*
-* Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1)
-* matrix pairs are generated and tested. NSIZE should be kept small.
-*
-* SVD (routine CGESVD) is used for computing the true value of DIF_u
-* and DIF_l when testing the built-in test problems.
-*
-* Built-in Test Matrices
-* ======================
-*
-* All built-in test matrices are the 2 by 2 block of triangular
-* matrices
-*
-* A = [ A11 A12 ] and B = [ B11 B12 ]
-* [ A22 ] [ B22 ]
-*
-* where for different type of A11 and A22 are given as the following.
-* A12 and B12 are chosen so that the generalized Sylvester equation
-*
-* A11*R - L*A22 = -A12
-* B11*R - L*B22 = -B12
-*
-* have prescribed solution R and L.
-*
-* Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1).
-* B11 = I_m, B22 = I_k
-* where J_k(a,b) is the k-by-k Jordan block with ``a'' on
-* diagonal and ``b'' on superdiagonal.
-*
-* Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and
-* B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m
-* A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and
-* B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
-*
-* Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each
-* second diagonal block in A_11 and each third diagonal block
-* in A_22 are made as 2 by 2 blocks.
-*
-* Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) )
-* for i=1,...,m, j=1,...,m and
-* A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) )
-* for i=m+1,...,k, j=m+1,...,k
-*
-* Type 5: (A,B) and have potentially close or common eigenvalues and
-* very large departure from block diagonality A_11 is chosen
-* as the m x m leading submatrix of A_1:
-* | 1 b |
-* | -b 1 |
-* | 1+d b |
-* | -b 1+d |
-* A_1 = | d 1 |
-* | -1 d |
-* | -d 1 |
-* | -1 -d |
-* | 1 |
-* and A_22 is chosen as the k x k leading submatrix of A_2:
-* | -1 b |
-* | -b -1 |
-* | 1-d b |
-* | -b 1-d |
-* A_2 = | d 1+b |
-* | -1-b d |
-* | -d 1+b |
-* | -1+b -d |
-* | 1-d |
-* and matrix B are chosen as identity matrices (see SLATM5).
-*
-*
-* Arguments
-* =========
-*
-* NSIZE (input) INTEGER
-* The maximum size of the matrices to use. NSIZE >= 0.
-* If NSIZE = 0, no built-in tests matrices are used, but
-* read-in test matrices are used to test SGGESX.
-*
-* NCMAX (input) INTEGER
-* Maximum allowable NMAX for generating Kroneker matrix
-* in call to CLAKF2
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. THRESH >= 0.
-*
-* NIN (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Used to store the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, AI, BI, Z and Q,
-* LDA >= max( 1, NSIZE ). For the read-in test,
-* LDA >= max( 1, N ), N is the size of the test matrices.
-*
-* B (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Used to store the matrix whose eigenvalues are to be
-* computed. On exit, B contains the last matrix actually used.
-*
-* AI (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Copy of A, modified by CGGESX.
-*
-* BI (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Copy of B, modified by CGGESX.
-*
-* Z (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Z holds the left Schur vectors computed by CGGESX.
-*
-* Q (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Q holds the right Schur vectors computed by CGGESX.
-*
-* ALPHA (workspace) COMPLEX array, dimension (NSIZE)
-* BETA (workspace) COMPLEX array, dimension (NSIZE)
-* On exit, ALPHA/BETA are the eigenvalues.
-*
-* C (workspace) COMPLEX array, dimension (LDC, LDC)
-* Store the matrix generated by subroutine CLAKF2, this is the
-* matrix formed by Kronecker products used for estimating
-* DIF.
-*
-* LDC (input) INTEGER
-* The leading dimension of C. LDC >= max(1, LDA*LDA/2 ).
-*
-* S (workspace) REAL array, dimension (LDC)
-* Singular values of C
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 3*NSIZE*NSIZE/2
-*
-* RWORK (workspace) REAL array,
-* dimension (5*NSIZE*NSIZE/2 - 4)
-*
-* IWORK (workspace) INTEGER array, dimension (LIWORK)
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= NSIZE + 2.
-*
-* BWORK (workspace) LOGICAL array, dimension (NSIZE)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrgvx.f b/TESTING/EIG/cdrgvx.f
index 79068561..23f897fa 100644
--- a/TESTING/EIG/cdrgvx.f
+++ b/TESTING/EIG/cdrgvx.f
@@ -1,11 +1,310 @@
+*> \brief \b CDRGVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRGVX( NSIZE, THRESH, NIN, NOUT, A, LDA, B, AI, BI,
+* ALPHA, BETA, VL, VR, ILO, IHI, LSCALE, RSCALE,
+* S, STRU, DIF, DIFTRU, WORK, LWORK, RWORK,
+* IWORK, LIWORK, RESULT, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LIWORK, LWORK, NIN, NOUT,
+* $ NSIZE
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL DIF( * ), DIFTRU( * ), LSCALE( * ),
+* $ RESULT( 4 ), RSCALE( * ), RWORK( * ), S( * ),
+* $ STRU( * )
+* COMPLEX A( LDA, * ), AI( LDA, * ), ALPHA( * ),
+* $ B( LDA, * ), BETA( * ), BI( LDA, * ),
+* $ VL( LDA, * ), VR( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRGVX checks the nonsymmetric generalized eigenvalue problem
+*> expert driver CGGEVX.
+*>
+*> CGGEVX computes the generalized eigenvalues, (optionally) the left
+*> and/or right eigenvectors, (optionally) computes a balancing
+*> transformation to improve the conditioning, and (optionally)
+*> reciprocal condition numbers for the eigenvalues and eigenvectors.
+*>
+*> When CDRGVX is called with NSIZE > 0, two types of test matrix pairs
+*> are generated by the subroutine SLATM6 and test the driver CGGEVX.
+*> The test matrices have the known exact condition numbers for
+*> eigenvalues. For the condition numbers of the eigenvectors
+*> corresponding the first and last eigenvalues are also know
+*> ``exactly'' (see CLATM6).
+*> For each matrix pair, the following tests will be performed and
+*> compared with the threshhold THRESH.
+*>
+*> (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> where l**H is the conjugate tranpose of l.
+*>
+*> (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> (3) The condition number S(i) of eigenvalues computed by CGGEVX
+*> differs less than a factor THRESH from the exact S(i) (see
+*> CLATM6).
+*>
+*> (4) DIF(i) computed by CTGSNA differs less than a factor 10*THRESH
+*> from the exact value (for the 1st and 5th vectors only).
+*>
+*> Test Matrices
+*> =============
+*>
+*> Two kinds of test matrix pairs
+*> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
+*> are used in the tests:
+*>
+*> 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
+*> 0 2+a 0 0 0 0 1 0 0 0
+*> 0 0 3+a 0 0 0 0 1 0 0
+*> 0 0 0 4+a 0 0 0 0 1 0
+*> 0 0 0 0 5+a , 0 0 0 0 1 , and
+*>
+*> 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
+*> 1 1 0 0 0 0 1 0 0 0
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1+a 1+b 0 0 0 1 0
+*> 0 0 0 -1-b 1+a , 0 0 0 0 1 .
+*>
+*> In both cases the same inverse(YH) and inverse(X) are used to compute
+*> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
+*>
+*> YH: = 1 0 -y y -y X = 1 0 -x -x x
+*> 0 1 -y y -y 0 1 x -x -x
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1 0 0 0 0 1 0
+*> 0 0 0 0 1, 0 0 0 0 1 , where
+*>
+*> a, b, x and y will have all values independently of each other from
+*> { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZE
+*> \verbatim
+*> NSIZE is INTEGER
+*> The number of sizes of matrices to use. NSIZE must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIN will be
+*> tested. If it is not zero, then N = 5.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, NSIZE)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, AI, BI, Ao, and Bo.
+*> It must be at least 1 and at least NSIZE.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDA, NSIZE)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, B contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] AI
+*> \verbatim
+*> AI is COMPLEX array, dimension (LDA, NSIZE)
+*> Copy of A, modified by CGGEVX.
+*> \endverbatim
+*>
+*> \param[out] BI
+*> \verbatim
+*> BI is COMPLEX array, dimension (LDA, NSIZE)
+*> Copy of B, modified by CGGEVX.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (NSIZE)
+*> \endverbatim
+*> \verbatim
+*> On exit, ALPHA/BETA are the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDA, NSIZE)
+*> VL holds the left eigenvectors computed by CGGEVX.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDA, NSIZE)
+*> VR holds the right eigenvectors computed by CGGEVX.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DTRU
+*> \verbatim
+*> DTRU is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DIFTRU
+*> \verbatim
+*> DIFTRU is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> Leading dimension of WORK. LWORK >= 2*N*N + 2*N
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (6*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> Leading dimension of IWORK. LIWORK >= N+2.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRGVX( NSIZE, THRESH, NIN, NOUT, A, LDA, B, AI, BI,
$ ALPHA, BETA, VL, VR, ILO, IHI, LSCALE, RSCALE,
$ S, STRU, DIF, DIFTRU, WORK, LWORK, RWORK,
$ IWORK, LIWORK, RESULT, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, ILO, INFO, LDA, LIWORK, LWORK, NIN, NOUT,
@@ -23,164 +322,6 @@
$ VL( LDA, * ), VR( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRGVX checks the nonsymmetric generalized eigenvalue problem
-* expert driver CGGEVX.
-*
-* CGGEVX computes the generalized eigenvalues, (optionally) the left
-* and/or right eigenvectors, (optionally) computes a balancing
-* transformation to improve the conditioning, and (optionally)
-* reciprocal condition numbers for the eigenvalues and eigenvectors.
-*
-* When CDRGVX is called with NSIZE > 0, two types of test matrix pairs
-* are generated by the subroutine SLATM6 and test the driver CGGEVX.
-* The test matrices have the known exact condition numbers for
-* eigenvalues. For the condition numbers of the eigenvectors
-* corresponding the first and last eigenvalues are also know
-* ``exactly'' (see CLATM6).
-* For each matrix pair, the following tests will be performed and
-* compared with the threshhold THRESH.
-*
-* (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* where l**H is the conjugate tranpose of l.
-*
-* (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* (3) The condition number S(i) of eigenvalues computed by CGGEVX
-* differs less than a factor THRESH from the exact S(i) (see
-* CLATM6).
-*
-* (4) DIF(i) computed by CTGSNA differs less than a factor 10*THRESH
-* from the exact value (for the 1st and 5th vectors only).
-*
-* Test Matrices
-* =============
-*
-* Two kinds of test matrix pairs
-* (A, B) = inverse(YH) * (Da, Db) * inverse(X)
-* are used in the tests:
-*
-* 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
-* 0 2+a 0 0 0 0 1 0 0 0
-* 0 0 3+a 0 0 0 0 1 0 0
-* 0 0 0 4+a 0 0 0 0 1 0
-* 0 0 0 0 5+a , 0 0 0 0 1 , and
-*
-* 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
-* 1 1 0 0 0 0 1 0 0 0
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1+a 1+b 0 0 0 1 0
-* 0 0 0 -1-b 1+a , 0 0 0 0 1 .
-*
-* In both cases the same inverse(YH) and inverse(X) are used to compute
-* (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
-*
-* YH: = 1 0 -y y -y X = 1 0 -x -x x
-* 0 1 -y y -y 0 1 x -x -x
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1 0 0 0 0 1 0
-* 0 0 0 0 1, 0 0 0 0 1 , where
-*
-* a, b, x and y will have all values independently of each other from
-* { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
-*
-* Arguments
-* =========
-*
-* NSIZE (input) INTEGER
-* The number of sizes of matrices to use. NSIZE must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIN will be
-* tested. If it is not zero, then N = 5.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIN (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, AI, BI, Ao, and Bo.
-* It must be at least 1 and at least NSIZE.
-*
-* B (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, B contains the last matrix actually used.
-*
-* AI (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Copy of A, modified by CGGEVX.
-*
-* BI (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* Copy of B, modified by CGGEVX.
-*
-* ALPHA (workspace) COMPLEX array, dimension (NSIZE)
-* BETA (workspace) COMPLEX array, dimension (NSIZE)
-* On exit, ALPHA/BETA are the eigenvalues.
-*
-* VL (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* VL holds the left eigenvectors computed by CGGEVX.
-*
-* VR (workspace) COMPLEX array, dimension (LDA, NSIZE)
-* VR holds the right eigenvectors computed by CGGEVX.
-*
-* ILO (output/workspace) INTEGER
-*
-* IHI (output/workspace) INTEGER
-*
-* LSCALE (output/workspace) REAL array, dimension (N)
-*
-* RSCALE (output/workspace) REAL array, dimension (N)
-*
-* S (output/workspace) REAL array, dimension (N)
-*
-* STRU (output/workspace) REAL array, dimension (N)
-*
-* DIF (output/workspace) REAL array, dimension (N)
-*
-* DIFTRU (output/workspace) REAL array, dimension (N)
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* Leading dimension of WORK. LWORK >= 2*N*N + 2*N
-*
-* RWORK (workspace) REAL array, dimension (6*N)
-*
-* IWORK (workspace) INTEGER array, dimension (LIWORK)
-*
-* LIWORK (input) INTEGER
-* Leading dimension of IWORK. LIWORK >= N+2.
-*
-* RESULT (output/workspace) REAL array, dimension (4)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrvbd.f b/TESTING/EIG/cdrvbd.f
index 7ff180a2..e7242e6b 100644
--- a/TESTING/EIG/cdrvbd.f
+++ b/TESTING/EIG/cdrvbd.f
@@ -1,11 +1,350 @@
+*> \brief \b CDRVBD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVBD( NSIZES, MM, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* A, LDA, U, LDU, VT, LDVT, ASAV, USAV, VTSAV, S,
+* SSAV, E, WORK, LWORK, RWORK, IWORK, NOUNIT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), MM( * ), NN( * )
+* REAL E( * ), RWORK( * ), S( * ), SSAV( * )
+* COMPLEX A( LDA, * ), ASAV( LDA, * ), U( LDU, * ),
+* $ USAV( LDU, * ), VT( LDVT, * ),
+* $ VTSAV( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVBD checks the singular value decomposition (SVD) driver CGESVD
+*> and CGESDD.
+*> CGESVD and CGESDD factors A = U diag(S) VT, where U and VT are
+*> unitary and diag(S) is diagonal with the entries of the array S on
+*> its diagonal. The entries of S are the singular values, nonnegative
+*> and stored in decreasing order. U and VT can be optionally not
+*> computed, overwritten on A, or computed partially.
+*>
+*> A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN.
+*> U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
+*>
+*> When CDRVBD is called, a number of matrix "sizes" (M's and N's)
+*> and a number of matrix "types" are specified. For each size (M,N)
+*> and each type of matrix, and for the minimal workspace as well as
+*> workspace adequate to permit blocking, an M x N matrix "A" will be
+*> generated and used to test the SVD routines. For each matrix, A will
+*> be factored as A = U diag(S) VT and the following 12 tests computed:
+*>
+*> Test for CGESVD:
+*>
+*> (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (2) | I - U'U | / ( M ulp )
+*>
+*> (3) | I - VT VT' | / ( N ulp )
+*>
+*> (4) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
+*> computed U.
+*>
+*> (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
+*> computed VT.
+*>
+*> (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
+*> vector of singular values from the partial SVD
+*>
+*> Test for CGESDD:
+*>
+*> (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (2) | I - U'U | / ( M ulp )
+*>
+*> (3) | I - VT VT' | / ( N ulp )
+*>
+*> (4) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
+*> computed U.
+*>
+*> (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
+*> computed VT.
+*>
+*> (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
+*> vector of singular values from the partial SVD
+*>
+*> The "sizes" are specified by the arrays MM(1:NSIZES) and
+*> NN(1:NSIZES); the value of each element pair (MM(j),NN(j))
+*> specifies one size. The "types" are specified by a logical array
+*> DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j"
+*> will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A matrix of the form U D V, where U and V are unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*> (4) Same as (3), but multiplied by the underflow-threshold / ULP.
+*> (5) Same as (3), but multiplied by the overflow-threshold * ULP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CDRVBD does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER array, dimension (NSIZES)
+*> An array containing the matrix "heights" to be used. For
+*> each j=1,...,NSIZES, if MM(j) is zero, then MM(j) and NN(j)
+*> will be ignored. The MM(j) values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the matrix "widths" to be used. For
+*> each j=1,...,NSIZES, if NN(j) is zero, then MM(j) and NN(j)
+*> will be ignored. The NN(j) values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CDRVBD
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrices are in A and B.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
+*> of type j will be generated. If NTYPES is smaller than the
+*> maximum number of types defined (PARAMETER MAXTYP), then
+*> types NTYPES+1 through MAXTYP will not be generated. If
+*> NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
+*> DOTYPE(NTYPES) will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRVBD to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,max(NN))
+*> Used to hold the matrix whose singular values are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( MM ).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,max(MM))
+*> Used to hold the computed matrix of right singular vectors.
+*> On exit, U contains the last such vectors actually computed.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. It must be at
+*> least 1 and at least max( MM ).
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is COMPLEX array, dimension (LDVT,max(NN))
+*> Used to hold the computed matrix of left singular vectors.
+*> On exit, VT contains the last such vectors actually computed.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of VT. It must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (LDA,max(NN))
+*> Used to hold a different copy of the matrix whose singular
+*> values are to be computed. On exit, A contains the last
+*> matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] USAV
+*> \verbatim
+*> USAV is COMPLEX array, dimension (LDU,max(MM))
+*> Used to hold a different copy of the computed matrix of
+*> right singular vectors. On exit, USAV contains the last such
+*> vectors actually computed.
+*> \endverbatim
+*>
+*> \param[out] VTSAV
+*> \verbatim
+*> VTSAV is COMPLEX array, dimension (LDVT,max(NN))
+*> Used to hold a different copy of the computed matrix of
+*> left singular vectors. On exit, VTSAV contains the last such
+*> vectors actually computed.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (max(min(MM,NN)))
+*> Contains the computed singular values.
+*> \endverbatim
+*>
+*> \param[out] SSAV
+*> \verbatim
+*> SSAV is REAL array, dimension (max(min(MM,NN)))
+*> Contains another copy of the computed singular values.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension (max(min(MM,NN)))
+*> Workspace for CGESVD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> MAX(3*MIN(M,N)+MAX(M,N)**2,5*MIN(M,N),3*MAX(M,N)) for all
+*> pairs (M,N)=(MM(j),NN(j))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension ( 5*max(max(MM,NN)) )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least 8*min(M,N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (7)
+*> The values computed by the 7 tests described above.
+*> The values are currently limited to 1/ULP, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some MM(j) < 0
+*> -3: Some NN(j) < 0
+*> -4: NTYPES < 0
+*> -7: THRESH < 0
+*> -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
+*> -12: LDU < 1 or LDU < MMAX.
+*> -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).
+*> -21: LWORK too small.
+*> If CLATMS, or CGESVD returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRVBD( NSIZES, MM, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ A, LDA, U, LDU, VT, LDVT, ASAV, USAV, VTSAV, S,
$ SSAV, E, WORK, LWORK, RWORK, IWORK, NOUNIT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LDVT, LWORK, NOUNIT, NSIZES,
@@ -21,218 +360,6 @@
$ VTSAV( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVBD checks the singular value decomposition (SVD) driver CGESVD
-* and CGESDD.
-* CGESVD and CGESDD factors A = U diag(S) VT, where U and VT are
-* unitary and diag(S) is diagonal with the entries of the array S on
-* its diagonal. The entries of S are the singular values, nonnegative
-* and stored in decreasing order. U and VT can be optionally not
-* computed, overwritten on A, or computed partially.
-*
-* A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN.
-* U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
-*
-* When CDRVBD is called, a number of matrix "sizes" (M's and N's)
-* and a number of matrix "types" are specified. For each size (M,N)
-* and each type of matrix, and for the minimal workspace as well as
-* workspace adequate to permit blocking, an M x N matrix "A" will be
-* generated and used to test the SVD routines. For each matrix, A will
-* be factored as A = U diag(S) VT and the following 12 tests computed:
-*
-* Test for CGESVD:
-*
-* (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (2) | I - U'U | / ( M ulp )
-*
-* (3) | I - VT VT' | / ( N ulp )
-*
-* (4) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
-* computed U.
-*
-* (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
-* computed VT.
-*
-* (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
-* vector of singular values from the partial SVD
-*
-* Test for CGESDD:
-*
-* (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (2) | I - U'U | / ( M ulp )
-*
-* (3) | I - VT VT' | / ( N ulp )
-*
-* (4) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
-* computed U.
-*
-* (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
-* computed VT.
-*
-* (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
-* vector of singular values from the partial SVD
-*
-* The "sizes" are specified by the arrays MM(1:NSIZES) and
-* NN(1:NSIZES); the value of each element pair (MM(j),NN(j))
-* specifies one size. The "types" are specified by a logical array
-* DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j"
-* will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A matrix of the form U D V, where U and V are unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-* (4) Same as (3), but multiplied by the underflow-threshold / ULP.
-* (5) Same as (3), but multiplied by the overflow-threshold * ULP.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CDRVBD does nothing. It must be at least zero.
-*
-* MM (input) INTEGER array, dimension (NSIZES)
-* An array containing the matrix "heights" to be used. For
-* each j=1,...,NSIZES, if MM(j) is zero, then MM(j) and NN(j)
-* will be ignored. The MM(j) values must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the matrix "widths" to be used. For
-* each j=1,...,NSIZES, if NN(j) is zero, then MM(j) and NN(j)
-* will be ignored. The NN(j) values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CDRVBD
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrices are in A and B.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
-* of type j will be generated. If NTYPES is smaller than the
-* maximum number of types defined (PARAMETER MAXTYP), then
-* types NTYPES+1 through MAXTYP will not be generated. If
-* NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
-* DOTYPE(NTYPES) will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRVBD to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (output) COMPLEX array, dimension (LDA,max(NN))
-* Used to hold the matrix whose singular values are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( MM ).
-*
-* U (output) COMPLEX array, dimension (LDU,max(MM))
-* Used to hold the computed matrix of right singular vectors.
-* On exit, U contains the last such vectors actually computed.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. It must be at
-* least 1 and at least max( MM ).
-*
-* VT (output) COMPLEX array, dimension (LDVT,max(NN))
-* Used to hold the computed matrix of left singular vectors.
-* On exit, VT contains the last such vectors actually computed.
-*
-* LDVT (input) INTEGER
-* The leading dimension of VT. It must be at
-* least 1 and at least max( NN ).
-*
-* ASAV (output) COMPLEX array, dimension (LDA,max(NN))
-* Used to hold a different copy of the matrix whose singular
-* values are to be computed. On exit, A contains the last
-* matrix actually used.
-*
-* USAV (output) COMPLEX array, dimension (LDU,max(MM))
-* Used to hold a different copy of the computed matrix of
-* right singular vectors. On exit, USAV contains the last such
-* vectors actually computed.
-*
-* VTSAV (output) COMPLEX array, dimension (LDVT,max(NN))
-* Used to hold a different copy of the computed matrix of
-* left singular vectors. On exit, VTSAV contains the last such
-* vectors actually computed.
-*
-* S (output) REAL array, dimension (max(min(MM,NN)))
-* Contains the computed singular values.
-*
-* SSAV (output) REAL array, dimension (max(min(MM,NN)))
-* Contains another copy of the computed singular values.
-*
-* E (output) REAL array, dimension (max(min(MM,NN)))
-* Workspace for CGESVD.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* MAX(3*MIN(M,N)+MAX(M,N)**2,5*MIN(M,N),3*MAX(M,N)) for all
-* pairs (M,N)=(MM(j),NN(j))
-*
-* RWORK (workspace) REAL array,
-* dimension ( 5*max(max(MM,NN)) )
-*
-* IWORK (workspace) INTEGER array, dimension at least 8*min(M,N)
-*
-* RESULT (output) REAL array, dimension (7)
-* The values computed by the 7 tests described above.
-* The values are currently limited to 1/ULP, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some MM(j) < 0
-* -3: Some NN(j) < 0
-* -4: NTYPES < 0
-* -7: THRESH < 0
-* -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
-* -12: LDU < 1 or LDU < MMAX.
-* -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).
-* -21: LWORK too small.
-* If CLATMS, or CGESVD returns an error code, the
-* absolute value of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrves.f b/TESTING/EIG/cdrves.f
index 0c14029d..152f97b9 100644
--- a/TESTING/EIG/cdrves.f
+++ b/TESTING/EIG/cdrves.f
@@ -1,10 +1,387 @@
+*> \brief \b CDRVES
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, HT, W, WT, VS, LDVS, RESULT,
+* WORK, NWORK, RWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL RESULT( 13 ), RWORK( * )
+* COMPLEX A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ VS( LDVS, * ), W( * ), WORK( * ), WT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVES checks the nonsymmetric eigenvalue (Schur form) problem
+*> driver CGEES.
+*>
+*> When CDRVES is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 13
+*> tests will be performed:
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CDRVES does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CDRVES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRVES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by CGEES.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is COMPLEX array, dimension (LDA, max(NN))
+*> Yet another copy of the test matrix A, modified by CGEES.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (max(NN))
+*> The computed eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] WT
+*> \verbatim
+*> WT is COMPLEX array, dimension (max(NN))
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when CGEES only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX array, dimension (LDVS, max(NN))
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (13)
+*> The values computed by the 13 tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 5*NN(j)+2*NN(j)**2 for all j.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -15: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ).
+*> -18: NWORK too small.
+*> If CLATMR, CLATMS, CLATME or CGEES returns an error code,
+*> the absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Select whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRVES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, HT, W, WT, VS, LDVS, RESULT,
$ WORK, NWORK, RWORK, IWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
@@ -18,271 +395,6 @@
$ VS( LDVS, * ), W( * ), WORK( * ), WT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVES checks the nonsymmetric eigenvalue (Schur form) problem
-* driver CGEES.
-*
-* When CDRVES is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 13
-* tests will be performed:
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CDRVES does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CDRVES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRVES to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max( NN ).
-*
-* H (workspace) COMPLEX array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by CGEES.
-*
-* HT (workspace) COMPLEX array, dimension (LDA, max(NN))
-* Yet another copy of the test matrix A, modified by CGEES.
-*
-* W (workspace) COMPLEX array, dimension (max(NN))
-* The computed eigenvalues of A.
-*
-* WT (workspace) COMPLEX array, dimension (max(NN))
-* Like W, this array contains the eigenvalues of A,
-* but those computed when CGEES only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* VS (workspace) COMPLEX array, dimension (LDVS, max(NN))
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1,max(NN)).
-*
-* RESULT (output) REAL array, dimension (13)
-* The values computed by the 13 tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) COMPLEX array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 5*NN(j)+2*NN(j)**2 for all j.
-*
-* RWORK (workspace) REAL array, dimension (max(NN))
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -15: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ).
-* -18: NWORK too small.
-* If CLATMR, CLATMS, CLATME or CGEES returns an error code,
-* the absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Select whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrvev.f b/TESTING/EIG/cdrvev.f
index 18b2197f..412554c1 100644
--- a/TESTING/EIG/cdrvev.f
+++ b/TESTING/EIG/cdrvev.f
@@ -1,11 +1,407 @@
+*> \brief \b CDRVEV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, W, W1, VL, LDVL, VR, LDVR,
+* LRE, LDLRE, RESULT, WORK, NWORK, RWORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NOUNIT, NSIZES,
+* $ NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL RESULT( 7 ), RWORK( * )
+* COMPLEX A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), W( * ), W1( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVEV checks the nonsymmetric eigenvalue problem driver CGEEV.
+*>
+*> When CDRVEV is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 7
+*> tests will be performed:
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a diagonal matrix with diagonal entries W(j).
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate-transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and whether largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and whether largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) W(full) = W(partial)
+*>
+*> W(full) denotes the eigenvalues computed when both VR and VL
+*> are also computed, and W(partial) denotes the eigenvalues
+*> computed when only W, only W and VR, or only W and VL are
+*> computed.
+*>
+*> (6) VR(full) = VR(partial)
+*>
+*> VR(full) denotes the right eigenvectors computed when both VR
+*> and VL are computed, and VR(partial) denotes the result
+*> when only VR is computed.
+*>
+*> (7) VL(full) = VL(partial)
+*>
+*> VL(full) denotes the left eigenvectors computed when both VR
+*> and VL are also computed, and VL(partial) denotes the result
+*> when only VL is computed.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random complex
+*> angles on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is unitary and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from |z| < 1
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CDRVEV does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CDRVEV
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRVEV to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max(NN).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by CGEEV.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (max(NN))
+*> The eigenvalues of A. On exit, W are the eigenvalues of
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] W1
+*> \verbatim
+*> W1 is COMPLEX array, dimension (max(NN))
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when CGEEV only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL, max(NN))
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR, max(NN))
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is COMPLEX array, dimension (LDLRE, max(NN))
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (7)
+*> The values computed by the seven tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 5*NN(j)+2*NN(j)**2 for all j.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*max(NN))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -14: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ).
+*> -18: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ).
+*> -21: NWORK too small.
+*> If CLATMR, CLATMS, CLATME or CGEEV returns an error code,
+*> the absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRVEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, W, W1, VL, LDVL, VR, LDVR,
$ LRE, LDLRE, RESULT, WORK, NWORK, RWORK, IWORK,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NOUNIT, NSIZES,
@@ -21,276 +417,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVEV checks the nonsymmetric eigenvalue problem driver CGEEV.
-*
-* When CDRVEV is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 7
-* tests will be performed:
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a diagonal matrix with diagonal entries W(j).
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate-transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and whether largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and whether largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) W(full) = W(partial)
-*
-* W(full) denotes the eigenvalues computed when both VR and VL
-* are also computed, and W(partial) denotes the eigenvalues
-* computed when only W, only W and VR, or only W and VL are
-* computed.
-*
-* (6) VR(full) = VR(partial)
-*
-* VR(full) denotes the right eigenvectors computed when both VR
-* and VL are computed, and VR(partial) denotes the result
-* when only VR is computed.
-*
-* (7) VL(full) = VL(partial)
-*
-* VL(full) denotes the left eigenvectors computed when both VR
-* and VL are also computed, and VL(partial) denotes the result
-* when only VL is computed.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random complex
-* angles on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is unitary and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from |z| < 1
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CDRVEV does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CDRVEV
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRVEV to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max(NN).
-*
-* H (workspace) COMPLEX array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by CGEEV.
-*
-* W (workspace) COMPLEX array, dimension (max(NN))
-* The eigenvalues of A. On exit, W are the eigenvalues of
-* the matrix in A.
-*
-* W1 (workspace) COMPLEX array, dimension (max(NN))
-* Like W, this array contains the eigenvalues of A,
-* but those computed when CGEEV only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) COMPLEX array, dimension (LDVL, max(NN))
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,max(NN)).
-*
-* VR (workspace) COMPLEX array, dimension (LDVR, max(NN))
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,max(NN)).
-*
-* LRE (workspace) COMPLEX array, dimension (LDLRE, max(NN))
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,max(NN)).
-*
-* RESULT (output) REAL array, dimension (7)
-* The values computed by the seven tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) COMPLEX array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 5*NN(j)+2*NN(j)**2 for all j.
-*
-* RWORK (workspace) REAL array, dimension (2*max(NN))
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -14: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ).
-* -16: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ).
-* -18: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ).
-* -21: NWORK too small.
-* If CLATMR, CLATMS, CLATME or CGEEV returns an error code,
-* the absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrvgg.f b/TESTING/EIG/cdrvgg.f
index 9fcef113..20dba2de 100644
--- a/TESTING/EIG/cdrvgg.f
+++ b/TESTING/EIG/cdrvgg.f
@@ -1,11 +1,435 @@
+*> \brief \b CDRVGG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* THRSHN, NOUNIT, A, LDA, B, S, T, S2, T2, Q,
+* LDQ, Z, ALPHA1, BETA1, ALPHA2, BETA2, VL, VR,
+* WORK, LWORK, RWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
+* REAL THRESH, THRSHN
+* ..
+* .. Array Arguments ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVGG checks the nonsymmetric generalized eigenvalue driver
+*> routines.
+*> T T T
+*> CGEGS factors A and B as Q S Z and Q T Z , where means
+*> transpose, T is upper triangular, S is in generalized Schur form
+*> (upper triangular), and Q and Z are unitary. It also
+*> computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)), where alpha(j)=S(j,j) and beta(j)=T(j,j) --
+*> thus, w(j) = alpha(j)/beta(j) is a root of the generalized
+*> eigenvalue problem
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
+*> problem
+*>
+*> det( m(j) A - B ) = 0
+*>
+*> CGEGV computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)), the matrix L whose columns contain the
+*> generalized left eigenvectors l, and the matrix R whose columns
+*> contain the generalized right eigenvectors r for the pair (A,B).
+*>
+*> When CDRVGG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 7
+*> tests will be performed and compared with the threshhold THRESH:
+*>
+*> Results from CGEGS:
+*>
+*> H
+*> (1) | A - Q S Z | / ( |A| n ulp )
+*>
+*> H
+*> (2) | B - Q T Z | / ( |B| n ulp )
+*>
+*> H
+*> (3) | I - QQ | / ( n ulp )
+*>
+*> H
+*> (4) | I - ZZ | / ( n ulp )
+*>
+*> (5) maximum over j of D(j) where:
+*>
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> Results from CGEGV:
+*>
+*> (6) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> where l**H is the conjugate tranpose of l.
+*>
+*> (7) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random unitary matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CDRVGG does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, CDRVGG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRVGG to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] THRSHN
+*> \verbatim
+*> THRSHN is REAL
+*> Threshhold for reporting eigenvector normalization error.
+*> If the normalization of any eigenvector differs from 1 by
+*> more than THRSHN*ulp, then a special error message will be
+*> printed. (This is handled separately from the other tests,
+*> since only a compiler or programming error should cause an
+*> error message, at least if THRSHN is at least 5--10.)
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, T, S2, and T2.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is COMPLEX array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from A by CGEGS.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by CGEGS.
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is COMPLEX array, dimension (LDA, max(NN))
+*> The matrix computed from A by CGEGV. This will be the
+*> Schur (upper triangular) form of some matrix related to A,
+*> but will not, in general, be the same as S.
+*> \endverbatim
+*>
+*> \param[out] T2
+*> \verbatim
+*> T2 is COMPLEX array, dimension (LDA, max(NN))
+*> The matrix computed from B by CGEGV. This will be the
+*> Schur form of some matrix related to B, but will not, in
+*> general, be the same as T.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ, max(NN))
+*> The (left) unitary matrix computed by CGEGS.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q, Z, VL, and VR. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDQ, max(NN))
+*> The (right) unitary matrix computed by CGEGS.
+*> \endverbatim
+*>
+*> \param[out] ALPHA1
+*> \verbatim
+*> ALPHA1 is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by CGEGS.
+*> ALPHA1(k) / BETA1(k) is the k-th generalized eigenvalue of
+*> the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHA2
+*> \verbatim
+*> ALPHA2 is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA2
+*> \verbatim
+*> BETA2 is COMPLEX array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by CGEGV.
+*> ALPHA2(k) / BETA2(k) is the k-th generalized eigenvalue of
+*> the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDQ, max(NN))
+*> The (lower triangular) left eigenvector matrix for the
+*> matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDQ, max(NN))
+*> The (upper triangular) right eigenvector matrix for the
+*> matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> MAX( 2*N, N*(NB+1), (k+1)*(2*k+N+1) ), where "k" is the
+*> sum of the blocksize and number-of-shifts for CHGEQZ, and
+*> NB is the greatest of the blocksizes for CGEQRF, CUNMQR,
+*> and CUNGQR. (The blocksizes and the number-of-shifts are
+*> retrieved through calls to ILAENV.)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (7)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRVGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ THRSHN, NOUNIT, A, LDA, B, S, T, S2, T2, Q,
$ LDQ, Z, ALPHA1, BETA1, ALPHA2, BETA2, VL, VR,
$ WORK, LWORK, RWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
@@ -13,296 +437,6 @@
* ..
* .. Array Arguments ..
*
-* Purpose
-* =======
-*
-* CDRVGG checks the nonsymmetric generalized eigenvalue driver
-* routines.
-* T T T
-* CGEGS factors A and B as Q S Z and Q T Z , where means
-* transpose, T is upper triangular, S is in generalized Schur form
-* (upper triangular), and Q and Z are unitary. It also
-* computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)), where alpha(j)=S(j,j) and beta(j)=T(j,j) --
-* thus, w(j) = alpha(j)/beta(j) is a root of the generalized
-* eigenvalue problem
-*
-* det( A - w(j) B ) = 0
-*
-* and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
-* problem
-*
-* det( m(j) A - B ) = 0
-*
-* CGEGV computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)), the matrix L whose columns contain the
-* generalized left eigenvectors l, and the matrix R whose columns
-* contain the generalized right eigenvectors r for the pair (A,B).
-*
-* When CDRVGG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 7
-* tests will be performed and compared with the threshhold THRESH:
-*
-* Results from CGEGS:
-*
-* H
-* (1) | A - Q S Z | / ( |A| n ulp )
-*
-* H
-* (2) | B - Q T Z | / ( |B| n ulp )
-*
-* H
-* (3) | I - QQ | / ( n ulp )
-*
-* H
-* (4) | I - ZZ | / ( n ulp )
-*
-* (5) maximum over j of D(j) where:
-*
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* Results from CGEGV:
-*
-* (6) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* where l**H is the conjugate tranpose of l.
-*
-* (7) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random unitary matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CDRVGG does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, CDRVGG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRVGG to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* THRSHN (input) REAL
-* Threshhold for reporting eigenvector normalization error.
-* If the normalization of any eigenvector differs from 1 by
-* more than THRSHN*ulp, then a special error message will be
-* printed. (This is handled separately from the other tests,
-* since only a compiler or programming error should cause an
-* error message, at least if THRSHN is at least 5--10.)
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) COMPLEX array, dimension (LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, T, S2, and T2.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) COMPLEX array, dimension (LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from A by CGEGS.
-*
-* T (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by CGEGS.
-*
-* S2 (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The matrix computed from A by CGEGV. This will be the
-* Schur (upper triangular) form of some matrix related to A,
-* but will not, in general, be the same as S.
-*
-* T2 (workspace) COMPLEX array, dimension (LDA, max(NN))
-* The matrix computed from B by CGEGV. This will be the
-* Schur form of some matrix related to B, but will not, in
-* general, be the same as T.
-*
-* Q (workspace) COMPLEX array, dimension (LDQ, max(NN))
-* The (left) unitary matrix computed by CGEGS.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q, Z, VL, and VR. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) COMPLEX array, dimension (LDQ, max(NN))
-* The (right) unitary matrix computed by CGEGS.
-*
-* ALPHA1 (workspace) COMPLEX array, dimension (max(NN))
-* BETA1 (workspace) COMPLEX array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by CGEGS.
-* ALPHA1(k) / BETA1(k) is the k-th generalized eigenvalue of
-* the matrices in A and B.
-*
-* ALPHA2 (workspace) COMPLEX array, dimension (max(NN))
-* BETA2 (workspace) COMPLEX array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by CGEGV.
-* ALPHA2(k) / BETA2(k) is the k-th generalized eigenvalue of
-* the matrices in A and B.
-*
-* VL (workspace) COMPLEX array, dimension (LDQ, max(NN))
-* The (lower triangular) left eigenvector matrix for the
-* matrices in A and B.
-*
-* VR (workspace) COMPLEX array, dimension (LDQ, max(NN))
-* The (upper triangular) right eigenvector matrix for the
-* matrices in A and B.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* MAX( 2*N, N*(NB+1), (k+1)*(2*k+N+1) ), where "k" is the
-* sum of the blocksize and number-of-shifts for CHGEQZ, and
-* NB is the greatest of the blocksizes for CGEQRF, CUNMQR,
-* and CUNGQR. (The blocksizes and the number-of-shifts are
-* retrieved through calls to ILAENV.)
-*
-* RWORK (workspace) REAL array, dimension (8*N)
-*
-* RESULT (output) REAL array, dimension (7)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
LOGICAL DOTYPE( * )
diff --git a/TESTING/EIG/cdrvsg.f b/TESTING/EIG/cdrvsg.f
index c71fe3a4..31d6fb67 100644
--- a/TESTING/EIG/cdrvsg.f
+++ b/TESTING/EIG/cdrvsg.f
@@ -1,20 +1,409 @@
+*> \brief \b CDRVSG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
+* BP, WORK, NWORK, RWORK, LRWORK, IWORK, LIWORK,
+* RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDZ, LIWORK, LRWORK, NOUNIT,
+* $ NSIZES, NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL D( * ), RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AB( LDA, * ), AP( * ),
+* $ B( LDB, * ), BB( LDB, * ), BP( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVSG checks the complex Hermitian generalized eigenproblem
+*> drivers.
+*>
+*> CHEGV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem.
+*>
+*> CHEGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem using a divide and conquer algorithm.
+*>
+*> CHEGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem.
+*>
+*> CHPGV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem in packed storage.
+*>
+*> CHPGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem in packed storage using a divide and
+*> conquer algorithm.
+*>
+*> CHPGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem in packed storage.
+*>
+*> CHBGV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite banded
+*> generalized eigenproblem.
+*>
+*> CHBGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite banded
+*> generalized eigenproblem using a divide and conquer
+*> algorithm.
+*>
+*> CHBGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite banded
+*> generalized eigenproblem.
+*>
+*> When CDRVSG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix A of the given type will be
+*> generated; a random well-conditioned matrix B is also generated
+*> and the pair (A,B) is used to test the drivers.
+*>
+*> For each pair (A,B), the following tests are performed:
+*>
+*> (1) CHEGV with ITYPE = 1 and UPLO ='U':
+*>
+*> | A Z - B Z D | / ( |A| |Z| n ulp )
+*>
+*> (2) as (1) but calling CHPGV
+*> (3) as (1) but calling CHBGV
+*> (4) as (1) but with UPLO = 'L'
+*> (5) as (4) but calling CHPGV
+*> (6) as (4) but calling CHBGV
+*>
+*> (7) CHEGV with ITYPE = 2 and UPLO ='U':
+*>
+*> | A B Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> (8) as (7) but calling CHPGV
+*> (9) as (7) but with UPLO = 'L'
+*> (10) as (9) but calling CHPGV
+*>
+*> (11) CHEGV with ITYPE = 3 and UPLO ='U':
+*>
+*> | B A Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> (12) as (11) but calling CHPGV
+*> (13) as (11) but with UPLO = 'L'
+*> (14) as (13) but calling CHPGV
+*>
+*> CHEGVD, CHPGVD and CHBGVD performed the same 14 tests.
+*>
+*> CHEGVX, CHPGVX and CHBGVX performed the above 14 tests with
+*> the parameter RANGE = 'A', 'N' and 'I', respectively.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> This type is used for the matrix A which has half-bandwidth KA.
+*> B is generated as a well-conditioned positive definite matrix
+*> with half-bandwidth KB (<= KA).
+*> Currently, the list of possible types for A is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is unitary and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is unitary and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Hermitian matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*> (16) Same as (8), but with KA = 1 and KB = 1
+*> (17) Same as (8), but with KA = 2 and KB = 1
+*> (18) Same as (8), but with KA = 2 and KB = 2
+*> (19) Same as (8), but with KA = 3 and KB = 1
+*> (20) Same as (8), but with KA = 3 and KB = 2
+*> (21) Same as (8), but with KA = 3 and KB = 3
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CDRVSG does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> The number of elements in DOTYPE. If it is zero, CDRVSG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRVSG to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A COMPLEX array, dimension (LDA , max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> B COMPLEX array, dimension (LDB , max(NN))
+*> Used to hold the Hermitian positive definite matrix for
+*> the generailzed problem.
+*> On exit, B contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDB INTEGER
+*> The leading dimension of B. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D REAL array, dimension (max(NN))
+*> The eigenvalues of A. On exit, the eigenvalues in D
+*> correspond with the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z COMPLEX array, dimension (LDZ, max(NN))
+*> The matrix of eigenvectors.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDZ INTEGER
+*> The leading dimension of ZZ. It must be at least 1 and
+*> at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> AB COMPLEX array, dimension (LDA, max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> BB COMPLEX array, dimension (LDB, max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> AP COMPLEX array, dimension (max(NN)**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> BP COMPLEX array, dimension (max(NN)**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK COMPLEX array, dimension (NWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> NWORK INTEGER
+*> The number of entries in WORK. This must be at least
+*> 2*N + N**2 where N = max( NN(j), 2 ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RWORK REAL array, dimension (LRWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LRWORK INTEGER
+*> The number of entries in RWORK. This must be at least
+*> max( 7*N, 1 + 4*N + 2*N*lg(N) + 3*N**2 ) where
+*> N = max( NN(j) ) and lg( N ) = smallest integer k such
+*> that 2**k >= N .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IWORK INTEGER array, dimension (LIWORK))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LIWORK INTEGER
+*> The number of entries in IWORK. This must be at least
+*> 2 + 5*max( NN(j) ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT REAL array, dimension (70)
+*> The values computed by the 70 tests described above.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDZ < 1 or LDZ < NMAX.
+*> -21: NWORK too small.
+*> -23: LRWORK too small.
+*> -25: LIWORK too small.
+*> If CLATMR, CLATMS, CHEGV, CHPGV, CHBGV, CHEGVD, CHPGVD,
+*> CHPGVD, CHEGVX, CHPGVX, CHBGVX returns an error code,
+*> the absolute value of it is returned.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests that have been run
+*> on this matrix.
+*> NTESTT The total number of tests for this call.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by SLAFTS).
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
$ BP, WORK, NWORK, RWORK, LRWORK, IWORK, LIWORK,
$ RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-**********************************************************************
-*
-* modified August 1997, a new parameter LRWORK and LIWORK are
-* added in the calling sequence.
-*
-* test routine CSGT01 is also modified
-*
-**********************************************************************
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LDZ, LIWORK, LRWORK, NOUNIT,
@@ -30,325 +419,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVSG checks the complex Hermitian generalized eigenproblem
-* drivers.
-*
-* CHEGV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem.
-*
-* CHEGVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem using a divide and conquer algorithm.
-*
-* CHEGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem.
-*
-* CHPGV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem in packed storage.
-*
-* CHPGVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem in packed storage using a divide and
-* conquer algorithm.
-*
-* CHPGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem in packed storage.
-*
-* CHBGV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite banded
-* generalized eigenproblem.
-*
-* CHBGVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite banded
-* generalized eigenproblem using a divide and conquer
-* algorithm.
-*
-* CHBGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite banded
-* generalized eigenproblem.
-*
-* When CDRVSG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix A of the given type will be
-* generated; a random well-conditioned matrix B is also generated
-* and the pair (A,B) is used to test the drivers.
-*
-* For each pair (A,B), the following tests are performed:
-*
-* (1) CHEGV with ITYPE = 1 and UPLO ='U':
-*
-* | A Z - B Z D | / ( |A| |Z| n ulp )
-*
-* (2) as (1) but calling CHPGV
-* (3) as (1) but calling CHBGV
-* (4) as (1) but with UPLO = 'L'
-* (5) as (4) but calling CHPGV
-* (6) as (4) but calling CHBGV
-*
-* (7) CHEGV with ITYPE = 2 and UPLO ='U':
-*
-* | A B Z - Z D | / ( |A| |Z| n ulp )
-*
-* (8) as (7) but calling CHPGV
-* (9) as (7) but with UPLO = 'L'
-* (10) as (9) but calling CHPGV
-*
-* (11) CHEGV with ITYPE = 3 and UPLO ='U':
-*
-* | B A Z - Z D | / ( |A| |Z| n ulp )
-*
-* (12) as (11) but calling CHPGV
-* (13) as (11) but with UPLO = 'L'
-* (14) as (13) but calling CHPGV
-*
-* CHEGVD, CHPGVD and CHBGVD performed the same 14 tests.
-*
-* CHEGVX, CHPGVX and CHBGVX performed the above 14 tests with
-* the parameter RANGE = 'A', 'N' and 'I', respectively.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* This type is used for the matrix A which has half-bandwidth KA.
-* B is generated as a well-conditioned positive definite matrix
-* with half-bandwidth KB (<= KA).
-* Currently, the list of possible types for A is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is unitary and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is unitary and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Hermitian matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* (16) Same as (8), but with KA = 1 and KB = 1
-* (17) Same as (8), but with KA = 2 and KB = 1
-* (18) Same as (8), but with KA = 2 and KB = 2
-* (19) Same as (8), but with KA = 3 and KB = 1
-* (20) Same as (8), but with KA = 3 and KB = 2
-* (21) Same as (8), but with KA = 3 and KB = 3
-*
-* Arguments
-* =========
-*
-* NSIZES INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CDRVSG does nothing. It must be at least zero.
-* Not modified.
-*
-* NN INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES INTEGER
-* The number of elements in DOTYPE. If it is zero, CDRVSG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRVSG to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A COMPLEX array, dimension (LDA , max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* B COMPLEX array, dimension (LDB , max(NN))
-* Used to hold the Hermitian positive definite matrix for
-* the generailzed problem.
-* On exit, B contains the last matrix actually
-* used.
-* Modified.
-*
-* LDB INTEGER
-* The leading dimension of B. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* D REAL array, dimension (max(NN))
-* The eigenvalues of A. On exit, the eigenvalues in D
-* correspond with the matrix in A.
-* Modified.
-*
-* Z COMPLEX array, dimension (LDZ, max(NN))
-* The matrix of eigenvectors.
-* Modified.
-*
-* LDZ INTEGER
-* The leading dimension of ZZ. It must be at least 1 and
-* at least max( NN ).
-* Not modified.
-*
-* AB COMPLEX array, dimension (LDA, max(NN))
-* Workspace.
-* Modified.
-*
-* BB COMPLEX array, dimension (LDB, max(NN))
-* Workspace.
-* Modified.
-*
-* AP COMPLEX array, dimension (max(NN)**2)
-* Workspace.
-* Modified.
-*
-* BP COMPLEX array, dimension (max(NN)**2)
-* Workspace.
-* Modified.
-*
-* WORK COMPLEX array, dimension (NWORK)
-* Workspace.
-* Modified.
-*
-* NWORK INTEGER
-* The number of entries in WORK. This must be at least
-* 2*N + N**2 where N = max( NN(j), 2 ).
-* Not modified.
-*
-* RWORK REAL array, dimension (LRWORK)
-* Workspace.
-* Modified.
-*
-* LRWORK INTEGER
-* The number of entries in RWORK. This must be at least
-* max( 7*N, 1 + 4*N + 2*N*lg(N) + 3*N**2 ) where
-* N = max( NN(j) ) and lg( N ) = smallest integer k such
-* that 2**k >= N .
-* Not modified.
-*
-* IWORK INTEGER array, dimension (LIWORK))
-* Workspace.
-* Modified.
-*
-* LIWORK INTEGER
-* The number of entries in IWORK. This must be at least
-* 2 + 5*max( NN(j) ).
-* Not modified.
-*
-* RESULT REAL array, dimension (70)
-* The values computed by the 70 tests described above.
-* Modified.
-*
-* INFO INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDZ < 1 or LDZ < NMAX.
-* -21: NWORK too small.
-* -23: LRWORK too small.
-* -25: LIWORK too small.
-* If CLATMR, CLATMS, CHEGV, CHPGV, CHBGV, CHEGVD, CHPGVD,
-* CHPGVD, CHEGVX, CHPGVX, CHBGVX returns an error code,
-* the absolute value of it is returned.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests that have been run
-* on this matrix.
-* NTESTT The total number of tests for this call.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by SLAFTS).
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrvst.f b/TESTING/EIG/cdrvst.f
index 7133b242..837341fe 100644
--- a/TESTING/EIG/cdrvst.f
+++ b/TESTING/EIG/cdrvst.f
@@ -1,11 +1,379 @@
+*> \brief \b CDRVST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, D1, D2, D3, WA1, WA2, WA3, U,
+* LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK,
+* IWORK, LIWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
+* $ NSIZES, NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL D1( * ), D2( * ), D3( * ), RESULT( * ),
+* $ RWORK( * ), WA1( * ), WA2( * ), WA3( * )
+* COMPLEX A( LDA, * ), TAU( * ), U( LDU, * ),
+* $ V( LDU, * ), WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVST checks the Hermitian eigenvalue problem drivers.
+*>
+*> CHEEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix,
+*> using a divide-and-conquer algorithm.
+*>
+*> CHEEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix.
+*>
+*> CHEEVR computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix
+*> using the Relatively Robust Representation where it can.
+*>
+*> CHPEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix in packed
+*> storage, using a divide-and-conquer algorithm.
+*>
+*> CHPEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix in packed
+*> storage.
+*>
+*> CHBEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian band matrix,
+*> using a divide-and-conquer algorithm.
+*>
+*> CHBEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian band matrix.
+*>
+*> CHEEV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix.
+*>
+*> CHPEV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix in packed
+*> storage.
+*>
+*> CHBEV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian band matrix.
+*>
+*> When CDRVST is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the appropriate drivers. For each matrix and each
+*> driver routine called, the following tests will be performed:
+*>
+*> (1) | A - Z D Z' | / ( |A| n ulp )
+*>
+*> (2) | I - Z Z' | / ( n ulp )
+*>
+*> (3) | D1 - D2 | / ( |D1| ulp )
+*>
+*> where Z is the matrix of eigenvectors returned when the
+*> eigenvector option is given and D1 and D2 are the eigenvalues
+*> returned with and without the eigenvector option.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is unitary and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is unitary and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*> (16) A band matrix with half bandwidth randomly chosen between
+*> 0 and N-1, with evenly spaced eigenvalues 1, ..., ULP
+*> with random signs.
+*> (17) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (18) Same as (16), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> CDRVST does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> The number of elements in DOTYPE. If it is zero, CDRVST
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRVST to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A COMPLEX array, dimension (LDA , max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D1 REAL array, dimension (max(NN))
+*> The eigenvalues of A, as computed by CSTEQR simlutaneously
+*> with Z. On exit, the eigenvalues in D1 correspond with the
+*> matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D2 REAL array, dimension (max(NN))
+*> The eigenvalues of A, as computed by CSTEQR if Z is not
+*> computed. On exit, the eigenvalues in D2 correspond with
+*> the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D3 REAL array, dimension (max(NN))
+*> The eigenvalues of A, as computed by SSTERF. On exit, the
+*> eigenvalues in D3 correspond with the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WA1 REAL array, dimension
+*> \endverbatim
+*> \verbatim
+*> WA2 REAL array, dimension
+*> \endverbatim
+*> \verbatim
+*> WA3 REAL array, dimension
+*> \endverbatim
+*> \verbatim
+*> U COMPLEX array, dimension (LDU, max(NN))
+*> The unitary matrix computed by CHETRD + CUNGC3.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDU INTEGER
+*> The leading dimension of U, Z, and V. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> V COMPLEX array, dimension (LDU, max(NN))
+*> The Housholder vectors computed by CHETRD in reducing A to
+*> tridiagonal form.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> TAU COMPLEX array, dimension (max(NN))
+*> The Householder factors computed by CHETRD in reducing A
+*> to tridiagonal form.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z COMPLEX array, dimension (LDU, max(NN))
+*> The unitary matrix of eigenvectors computed by CHEEVD,
+*> CHEEVX, CHPEVD, CHPEVX, CHBEVD, and CHBEVX.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK - COMPLEX array of dimension ( LWORK )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LWORK - INTEGER
+*> The number of entries in WORK. This must be at least
+*> 2*max( NN(j), 2 )**2.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RWORK REAL array, dimension (3*max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LRWORK - INTEGER
+*> The number of entries in RWORK.
+*> \endverbatim
+*> \verbatim
+*> IWORK INTEGER array, dimension (6*max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LIWORK - INTEGER
+*> The number of entries in IWORK.
+*> \endverbatim
+*> \verbatim
+*> RESULT REAL array, dimension (??)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDU < 1 or LDU < NMAX.
+*> -21: LWORK too small.
+*> If SLATMR, SLATMS, CHETRD, SORGC3, CSTEQR, SSTERF,
+*> or SORMC2 returns an error code, the
+*> absolute value of it is returned.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by SLAFTS).
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRVST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, D1, D2, D3, WA1, WA2, WA3, U,
$ LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK,
$ IWORK, LIWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
@@ -21,293 +389,6 @@
$ V( LDU, * ), WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVST checks the Hermitian eigenvalue problem drivers.
-*
-* CHEEVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix,
-* using a divide-and-conquer algorithm.
-*
-* CHEEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix.
-*
-* CHEEVR computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix
-* using the Relatively Robust Representation where it can.
-*
-* CHPEVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix in packed
-* storage, using a divide-and-conquer algorithm.
-*
-* CHPEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix in packed
-* storage.
-*
-* CHBEVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian band matrix,
-* using a divide-and-conquer algorithm.
-*
-* CHBEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian band matrix.
-*
-* CHEEV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix.
-*
-* CHPEV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix in packed
-* storage.
-*
-* CHBEV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian band matrix.
-*
-* When CDRVST is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the appropriate drivers. For each matrix and each
-* driver routine called, the following tests will be performed:
-*
-* (1) | A - Z D Z' | / ( |A| n ulp )
-*
-* (2) | I - Z Z' | / ( n ulp )
-*
-* (3) | D1 - D2 | / ( |D1| ulp )
-*
-* where Z is the matrix of eigenvectors returned when the
-* eigenvector option is given and D1 and D2 are the eigenvalues
-* returned with and without the eigenvector option.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is unitary and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is unitary and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-* (16) A band matrix with half bandwidth randomly chosen between
-* 0 and N-1, with evenly spaced eigenvalues 1, ..., ULP
-* with random signs.
-* (17) Same as (16), but multiplied by SQRT( overflow threshold )
-* (18) Same as (16), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* CDRVST does nothing. It must be at least zero.
-* Not modified.
-*
-* NN INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES INTEGER
-* The number of elements in DOTYPE. If it is zero, CDRVST
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRVST to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A COMPLEX array, dimension (LDA , max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* D1 REAL array, dimension (max(NN))
-* The eigenvalues of A, as computed by CSTEQR simlutaneously
-* with Z. On exit, the eigenvalues in D1 correspond with the
-* matrix in A.
-* Modified.
-*
-* D2 REAL array, dimension (max(NN))
-* The eigenvalues of A, as computed by CSTEQR if Z is not
-* computed. On exit, the eigenvalues in D2 correspond with
-* the matrix in A.
-* Modified.
-*
-* D3 REAL array, dimension (max(NN))
-* The eigenvalues of A, as computed by SSTERF. On exit, the
-* eigenvalues in D3 correspond with the matrix in A.
-* Modified.
-*
-* WA1 REAL array, dimension
-*
-* WA2 REAL array, dimension
-*
-* WA3 REAL array, dimension
-*
-* U COMPLEX array, dimension (LDU, max(NN))
-* The unitary matrix computed by CHETRD + CUNGC3.
-* Modified.
-*
-* LDU INTEGER
-* The leading dimension of U, Z, and V. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* V COMPLEX array, dimension (LDU, max(NN))
-* The Housholder vectors computed by CHETRD in reducing A to
-* tridiagonal form.
-* Modified.
-*
-* TAU COMPLEX array, dimension (max(NN))
-* The Householder factors computed by CHETRD in reducing A
-* to tridiagonal form.
-* Modified.
-*
-* Z COMPLEX array, dimension (LDU, max(NN))
-* The unitary matrix of eigenvectors computed by CHEEVD,
-* CHEEVX, CHPEVD, CHPEVX, CHBEVD, and CHBEVX.
-* Modified.
-*
-* WORK - COMPLEX array of dimension ( LWORK )
-* Workspace.
-* Modified.
-*
-* LWORK - INTEGER
-* The number of entries in WORK. This must be at least
-* 2*max( NN(j), 2 )**2.
-* Not modified.
-*
-* RWORK REAL array, dimension (3*max(NN))
-* Workspace.
-* Modified.
-*
-* LRWORK - INTEGER
-* The number of entries in RWORK.
-*
-* IWORK INTEGER array, dimension (6*max(NN))
-* Workspace.
-* Modified.
-*
-* LIWORK - INTEGER
-* The number of entries in IWORK.
-*
-* RESULT REAL array, dimension (??)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-* Modified.
-*
-* INFO INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDU < 1 or LDU < NMAX.
-* -21: LWORK too small.
-* If SLATMR, SLATMS, CHETRD, SORGC3, CSTEQR, SSTERF,
-* or SORMC2 returns an error code, the
-* absolute value of it is returned.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by SLAFTS).
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
*
diff --git a/TESTING/EIG/cdrvsx.f b/TESTING/EIG/cdrvsx.f
index ff72ac4a..9aafeed7 100644
--- a/TESTING/EIG/cdrvsx.f
+++ b/TESTING/EIG/cdrvsx.f
@@ -1,11 +1,449 @@
+*> \brief \b CDRVSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVSX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NIUNIT, NOUNIT, A, LDA, H, HT, W, WT, WTMP, VS,
+* LDVS, VS1, RESULT, WORK, LWORK, RWORK, BWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDVS, LWORK, NIUNIT, NOUNIT, NSIZES,
+* $ NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL RESULT( 17 ), RWORK( * )
+* COMPLEX A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ VS( LDVS, * ), VS1( LDVS, * ), W( * ),
+* $ WORK( * ), WT( * ), WTMP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
+*> expert driver CGEESX.
+*>
+*> CDRVSX uses both test matrices generated randomly depending on
+*> data supplied in the calling sequence, as well as on data
+*> read from an input file and including precomputed condition
+*> numbers to which it compares the ones it computes.
+*>
+*> When CDRVSX is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 15
+*> tests will be performed:
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare W with and
+*> without reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare T with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare VS with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*> If workspace sufficient, also compare SDIM with and
+*> without reciprocal condition numbers
+*>
+*> (14) if RCONDE the same no matter if VS and/or RCONDV computed
+*>
+*> (15) if RCONDV the same no matter if VS and/or RCONDE computed
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> In addition, an input file will be read from logical unit number
+*> NIUNIT. The file contains matrices along with precomputed
+*> eigenvalues and reciprocal condition numbers for the eigenvalue
+*> average and right invariant subspace. For these matrices, in
+*> addition to tests (1) to (15) we will compute the following two
+*> tests:
+*>
+*> (16) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal average eigenvalue condition number
+*> computed by CGEESX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*> (17) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right invariant subspace condition
+*> number computed by CGEESX and RCDVIN (the precomputed true
+*> value) is supplied as input. cond(RCONDV) is the condition
+*> number of RCONDV, and takes errors in computing RCONDV into
+*> account, so that the resulting quantity should be O(ULP).
+*> cond(RCONDV) is essentially given by norm(A)/RCONDE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. NSIZES must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIUNIT will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. NTYPES must be at least
+*> zero. If it is zero, no randomly generated test matrices
+*> are tested, but and test matrices read from NIUNIT will be
+*> tested. If it is MAXTYP+1 and NSIZES is 1, then an
+*> additional type, MAXTYP+1 is defined, which is to use
+*> whatever matrix is in A. This is only useful if
+*> DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRVSX to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIUNIT
+*> \verbatim
+*> NIUNIT is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by CGEESX.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is COMPLEX array, dimension (LDA, max(NN))
+*> Yet another copy of the test matrix A, modified by CGEESX.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (max(NN))
+*> The computed eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] WT
+*> \verbatim
+*> WT is COMPLEX array, dimension (max(NN))
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when CGEESX only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] WTMP
+*> \verbatim
+*> WTMP is COMPLEX array, dimension (max(NN))
+*> More temporary storage for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX array, dimension (LDVS, max(NN))
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] VS1
+*> \verbatim
+*> VS1 is COMPLEX array, dimension (LDVS, max(NN))
+*> VS1 holds another copy of the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (17)
+*> The values computed by the 17 tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(1,2*NN(j)**2) for all j.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> <0, input parameter -INFO is incorrect
+*> >0, CLATMR, CLATMS, CLATME or CGET24 returned an error
+*> code and INFO is its absolute value
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRVSX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NIUNIT, NOUNIT, A, LDA, H, HT, W, WT, WTMP, VS,
$ LDVS, VS1, RESULT, WORK, LWORK, RWORK, BWORK,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDVS, LWORK, NIUNIT, NOUNIT, NSIZES,
@@ -21,320 +459,6 @@
$ WORK( * ), WT( * ), WTMP( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
-* expert driver CGEESX.
-*
-* CDRVSX uses both test matrices generated randomly depending on
-* data supplied in the calling sequence, as well as on data
-* read from an input file and including precomputed condition
-* numbers to which it compares the ones it computes.
-*
-* When CDRVSX is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 15
-* tests will be performed:
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* If workspace sufficient, also compare W with and
-* without reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare T with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare VS with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-* If workspace sufficient, also compare SDIM with and
-* without reciprocal condition numbers
-*
-* (14) if RCONDE the same no matter if VS and/or RCONDV computed
-*
-* (15) if RCONDV the same no matter if VS and/or RCONDE computed
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* In addition, an input file will be read from logical unit number
-* NIUNIT. The file contains matrices along with precomputed
-* eigenvalues and reciprocal condition numbers for the eigenvalue
-* average and right invariant subspace. For these matrices, in
-* addition to tests (1) to (15) we will compute the following two
-* tests:
-*
-* (16) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal average eigenvalue condition number
-* computed by CGEESX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* (17) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right invariant subspace condition
-* number computed by CGEESX and RCDVIN (the precomputed true
-* value) is supplied as input. cond(RCONDV) is the condition
-* number of RCONDV, and takes errors in computing RCONDV into
-* account, so that the resulting quantity should be O(ULP).
-* cond(RCONDV) is essentially given by norm(A)/RCONDE.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. NSIZES must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIUNIT will be
-* tested.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. NTYPES must be at least
-* zero. If it is zero, no randomly generated test matrices
-* are tested, but and test matrices read from NIUNIT will be
-* tested. If it is MAXTYP+1 and NSIZES is 1, then an
-* additional type, MAXTYP+1 is defined, which is to use
-* whatever matrix is in A. This is only useful if
-* DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRVSX to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIUNIT (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max( NN ).
-*
-* H (workspace) COMPLEX array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by CGEESX.
-*
-* HT (workspace) COMPLEX array, dimension (LDA, max(NN))
-* Yet another copy of the test matrix A, modified by CGEESX.
-*
-* W (workspace) COMPLEX array, dimension (max(NN))
-* The computed eigenvalues of A.
-*
-* WT (workspace) COMPLEX array, dimension (max(NN))
-* Like W, this array contains the eigenvalues of A,
-* but those computed when CGEESX only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* WTMP (workspace) COMPLEX array, dimension (max(NN))
-* More temporary storage for eigenvalues.
-*
-* VS (workspace) COMPLEX array, dimension (LDVS, max(NN))
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1,max(NN)).
-*
-* VS1 (workspace) COMPLEX array, dimension (LDVS, max(NN))
-* VS1 holds another copy of the computed Schur vectors.
-*
-* RESULT (output) REAL array, dimension (17)
-* The values computed by the 17 tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(1,2*NN(j)**2) for all j.
-*
-* RWORK (workspace) REAL array, dimension (max(NN))
-*
-* BWORK (workspace) LOGICAL array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* <0, input parameter -INFO is incorrect
-* >0, CLATMR, CLATMS, CLATME or CGET24 returned an error
-* code and INFO is its absolute value
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cdrvvx.f b/TESTING/EIG/cdrvvx.f
index 7b6fe6e4..97e313c4 100644
--- a/TESTING/EIG/cdrvvx.f
+++ b/TESTING/EIG/cdrvvx.f
@@ -1,3 +1,446 @@
+*> \brief \b CDRVVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVVX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NIUNIT, NOUNIT, A, LDA, H, W, W1, VL, LDVL, VR,
+* LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
+* RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1, RESULT,
+* WORK, NWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
+* $ NSIZES, NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
+* $ RCNDV1( * ), RCONDE( * ), RCONDV( * ),
+* $ RESULT( 11 ), RWORK( * ), SCALE( * ),
+* $ SCALE1( * )
+* COMPLEX A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), W( * ), W1( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVVX checks the nonsymmetric eigenvalue problem expert driver
+*> CGEEVX.
+*>
+*> CDRVVX uses both test matrices generated randomly depending on
+*> data supplied in the calling sequence, as well as on data
+*> read from an input file and including precomputed condition
+*> numbers to which it compares the ones it computes.
+*>
+*> When CDRVVX is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified in the calling sequence.
+*> For each size ("n") and each type of matrix, one matrix will be
+*> generated and used to test the nonsymmetric eigenroutines. For
+*> each matrix, 9 tests will be performed:
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a diagonal matrix with diagonal entries W(j).
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) W(full) = W(partial)
+*>
+*> W(full) denotes the eigenvalues computed when VR, VL, RCONDV
+*> and RCONDE are also computed, and W(partial) denotes the
+*> eigenvalues computed when only some of VR, VL, RCONDV, and
+*> RCONDE are computed.
+*>
+*> (6) VR(full) = VR(partial)
+*>
+*> VR(full) denotes the right eigenvectors computed when VL, RCONDV
+*> and RCONDE are computed, and VR(partial) denotes the result
+*> when only some of VL and RCONDV are computed.
+*>
+*> (7) VL(full) = VL(partial)
+*>
+*> VL(full) denotes the left eigenvectors computed when VR, RCONDV
+*> and RCONDE are computed, and VL(partial) denotes the result
+*> when only some of VR and RCONDV are computed.
+*>
+*> (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
+*> SCALE, ILO, IHI, ABNRM (partial)
+*> 1/ulp otherwise
+*>
+*> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
+*> (full) is when VR, VL, RCONDE and RCONDV are also computed, and
+*> (partial) is when some are not computed.
+*>
+*> (9) RCONDV(full) = RCONDV(partial)
+*>
+*> RCONDV(full) denotes the reciprocal condition numbers of the
+*> right eigenvectors computed when VR, VL and RCONDE are also
+*> computed. RCONDV(partial) denotes the reciprocal condition
+*> numbers when only some of VR, VL and RCONDE are computed.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random complex
+*> angles on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is unitary and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from |z| < 1
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> In addition, an input file will be read from logical unit number
+*> NIUNIT. The file contains matrices along with precomputed
+*> eigenvalues and reciprocal condition numbers for the eigenvalues
+*> and right eigenvectors. For these matrices, in addition to tests
+*> (1) to (9) we will compute the following two tests:
+*>
+*> (10) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right eigenvector condition number
+*> computed by CGEEVX and RCDVIN (the precomputed true value)
+*> is supplied as input. cond(RCONDV) is the condition number of
+*> RCONDV, and takes errors in computing RCONDV into account, so
+*> that the resulting quantity should be O(ULP). cond(RCONDV) is
+*> essentially given by norm(A)/RCONDE.
+*>
+*> (11) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal eigenvalue condition number
+*> computed by CGEEVX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. NSIZES must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIUNIT will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. NTYPES must be at least
+*> zero. If it is zero, no randomly generated test matrices
+*> are tested, but and test matrices read from NIUNIT will be
+*> tested. If it is MAXTYP+1 and NSIZES is 1, then an
+*> additional type, MAXTYP+1 is defined, which is to use
+*> whatever matrix is in A. This is only useful if
+*> DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CDRVVX to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIUNIT
+*> \verbatim
+*> NIUNIT is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, max(NN,12))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max( NN, 12 ). (12 is the
+*> dimension of the largest matrix on the precomputed
+*> input file.)
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDA, max(NN,12))
+*> Another copy of the test matrix A, modified by CGEEVX.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (max(NN,12))
+*> Contains the eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] W1
+*> \verbatim
+*> W1 is COMPLEX array, dimension (max(NN,12))
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when CGEEVX only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL, max(NN,12))
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,max(NN,12)).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR, max(NN,12))
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,max(NN,12)).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is COMPLEX array, dimension (LDLRE, max(NN,12))
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (11)
+*> The values computed by the seven tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) =
+*> max( 360 ,6*NN(j)+2*NN(j)**2) for all j.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then successful exit.
+*> If <0, then input paramter -INFO is incorrect.
+*> If >0, CLATMR, CLATMS, CLATME or CGET23 returned an error
+*> code, and INFO is its absolute value.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN or 12.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CDRVVX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NIUNIT, NOUNIT, A, LDA, H, W, W1, VL, LDVL, VR,
$ LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
@@ -5,8 +448,9 @@
$ WORK, NWORK, RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
@@ -25,320 +469,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVVX checks the nonsymmetric eigenvalue problem expert driver
-* CGEEVX.
-*
-* CDRVVX uses both test matrices generated randomly depending on
-* data supplied in the calling sequence, as well as on data
-* read from an input file and including precomputed condition
-* numbers to which it compares the ones it computes.
-*
-* When CDRVVX is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified in the calling sequence.
-* For each size ("n") and each type of matrix, one matrix will be
-* generated and used to test the nonsymmetric eigenroutines. For
-* each matrix, 9 tests will be performed:
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a diagonal matrix with diagonal entries W(j).
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) W(full) = W(partial)
-*
-* W(full) denotes the eigenvalues computed when VR, VL, RCONDV
-* and RCONDE are also computed, and W(partial) denotes the
-* eigenvalues computed when only some of VR, VL, RCONDV, and
-* RCONDE are computed.
-*
-* (6) VR(full) = VR(partial)
-*
-* VR(full) denotes the right eigenvectors computed when VL, RCONDV
-* and RCONDE are computed, and VR(partial) denotes the result
-* when only some of VL and RCONDV are computed.
-*
-* (7) VL(full) = VL(partial)
-*
-* VL(full) denotes the left eigenvectors computed when VR, RCONDV
-* and RCONDE are computed, and VL(partial) denotes the result
-* when only some of VR and RCONDV are computed.
-*
-* (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
-* SCALE, ILO, IHI, ABNRM (partial)
-* 1/ulp otherwise
-*
-* SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
-* (full) is when VR, VL, RCONDE and RCONDV are also computed, and
-* (partial) is when some are not computed.
-*
-* (9) RCONDV(full) = RCONDV(partial)
-*
-* RCONDV(full) denotes the reciprocal condition numbers of the
-* right eigenvectors computed when VR, VL and RCONDE are also
-* computed. RCONDV(partial) denotes the reciprocal condition
-* numbers when only some of VR, VL and RCONDE are computed.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random complex
-* angles on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is unitary and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from |z| < 1
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* In addition, an input file will be read from logical unit number
-* NIUNIT. The file contains matrices along with precomputed
-* eigenvalues and reciprocal condition numbers for the eigenvalues
-* and right eigenvectors. For these matrices, in addition to tests
-* (1) to (9) we will compute the following two tests:
-*
-* (10) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right eigenvector condition number
-* computed by CGEEVX and RCDVIN (the precomputed true value)
-* is supplied as input. cond(RCONDV) is the condition number of
-* RCONDV, and takes errors in computing RCONDV into account, so
-* that the resulting quantity should be O(ULP). cond(RCONDV) is
-* essentially given by norm(A)/RCONDE.
-*
-* (11) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal eigenvalue condition number
-* computed by CGEEVX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. NSIZES must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIUNIT will be
-* tested.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. NTYPES must be at least
-* zero. If it is zero, no randomly generated test matrices
-* are tested, but and test matrices read from NIUNIT will be
-* tested. If it is MAXTYP+1 and NSIZES is 1, then an
-* additional type, MAXTYP+1 is defined, which is to use
-* whatever matrix is in A. This is only useful if
-* DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CDRVVX to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIUNIT (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX array, dimension (LDA, max(NN,12))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max( NN, 12 ). (12 is the
-* dimension of the largest matrix on the precomputed
-* input file.)
-*
-* H (workspace) COMPLEX array, dimension (LDA, max(NN,12))
-* Another copy of the test matrix A, modified by CGEEVX.
-*
-* W (workspace) COMPLEX array, dimension (max(NN,12))
-* Contains the eigenvalues of A.
-*
-* W1 (workspace) COMPLEX array, dimension (max(NN,12))
-* Like W, this array contains the eigenvalues of A,
-* but those computed when CGEEVX only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) COMPLEX array, dimension (LDVL, max(NN,12))
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,max(NN,12)).
-*
-* VR (workspace) COMPLEX array, dimension (LDVR, max(NN,12))
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,max(NN,12)).
-*
-* LRE (workspace) COMPLEX array, dimension (LDLRE, max(NN,12))
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,max(NN,12))
-*
-* RESULT (output) REAL array, dimension (11)
-* The values computed by the seven tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) COMPLEX array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) =
-* max( 360 ,6*NN(j)+2*NN(j)**2) for all j.
-*
-* RWORK (workspace) REAL array, dimension (2*max(NN,12))
-*
-* INFO (output) INTEGER
-* If 0, then successful exit.
-* If <0, then input paramter -INFO is incorrect.
-* If >0, CLATMR, CLATMS, CLATME or CGET23 returned an error
-* code, and INFO is its absolute value.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN or 12.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cerrbd.f b/TESTING/EIG/cerrbd.f
index 0d9d86ec..8563c61d 100644
--- a/TESTING/EIG/cerrbd.f
+++ b/TESTING/EIG/cerrbd.f
@@ -1,27 +1,70 @@
- SUBROUTINE CERRBD( PATH, NUNIT )
+*> \brief \b CERRBD
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CERRBD( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRBD tests the error exits for CGEBRD, CUNGBR, CUNMBR, and CBDSQR.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRBD tests the error exits for CGEBRD, CUNGBR, CUNMBR, and CBDSQR.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CERRBD( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cerrec.f b/TESTING/EIG/cerrec.f
index 5ca55765..85eba2e2 100644
--- a/TESTING/EIG/cerrec.f
+++ b/TESTING/EIG/cerrec.f
@@ -1,29 +1,72 @@
- SUBROUTINE CERREC( PATH, NUNIT )
+*> \brief \b CERREC
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CERREC( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERREC tests the error exits for the routines for eigen- condition
-* estimation for REAL matrices:
-* CTRSYL, CTREXC, CTRSNA and CTRSEN.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERREC tests the error exits for the routines for eigen- condition
+*> estimation for REAL matrices:
+*> CTRSYL, CTREXC, CTRSNA and CTRSEN.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CERREC( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cerred.f b/TESTING/EIG/cerred.f
index 8dfca850..48c6ab96 100644
--- a/TESTING/EIG/cerred.f
+++ b/TESTING/EIG/cerred.f
@@ -1,38 +1,81 @@
- SUBROUTINE CERRED( PATH, NUNIT )
+*> \brief \b CERRED
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CERRED( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRED tests the error exits for the eigenvalue driver routines for
-* REAL matrices:
-*
-* PATH driver description
-* ---- ------ -----------
-* CEV CGEEV find eigenvalues/eigenvectors for nonsymmetric A
-* CES CGEES find eigenvalues/Schur form for nonsymmetric A
-* CVX CGEEVX CGEEV + balancing and condition estimation
-* CSX CGEESX CGEES + balancing and condition estimation
-* CBD CGESVD compute SVD of an M-by-N matrix A
-* CGESDD compute SVD of an M-by-N matrix A(by divide and
-* conquer)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRED tests the error exits for the eigenvalue driver routines for
+*> REAL matrices:
+*>
+*> PATH driver description
+*> ---- ------ -----------
+*> CEV CGEEV find eigenvalues/eigenvectors for nonsymmetric A
+*> CES CGEES find eigenvalues/Schur form for nonsymmetric A
+*> CVX CGEEVX CGEEV + balancing and condition estimation
+*> CSX CGEESX CGEES + balancing and condition estimation
+*> CBD CGESVD compute SVD of an M-by-N matrix A
+*> CGESDD compute SVD of an M-by-N matrix A(by divide and
+*> conquer)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CERRED( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cerrgg.f b/TESTING/EIG/cerrgg.f
index 5da0ccbf..5e539357 100644
--- a/TESTING/EIG/cerrgg.f
+++ b/TESTING/EIG/cerrgg.f
@@ -1,29 +1,72 @@
- SUBROUTINE CERRGG( PATH, NUNIT )
+*> \brief \b CERRGG
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRGG( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRGG tests the error exits for CGGES, CGGESX, CGGEV, CGGEVX,
-* CGGGLM, CGGHRD, CGGLSE, CGGQRF, CGGRQF, CGGSVD, CGGSVP, CHGEQZ,
-* CTGEVC, CTGEXC, CTGSEN, CTGSJA, CTGSNA, and CTGSYL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRGG tests the error exits for CGGES, CGGESX, CGGEV, CGGEVX,
+*> CGGGLM, CGGHRD, CGGLSE, CGGQRF, CGGRQF, CGGSVD, CGGSVP, CHGEQZ,
+*> CTGEVC, CTGEXC, CTGSEN, CTGSJA, CTGSNA, and CTGSYL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CERRGG( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cerrhs.f b/TESTING/EIG/cerrhs.f
index c367675f..cc3bf60b 100644
--- a/TESTING/EIG/cerrhs.f
+++ b/TESTING/EIG/cerrhs.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRHS( PATH, NUNIT )
+*> \brief \b CERRHS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRHS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRHS tests the error exits for CGEBAK, CGEBAL, CGEHRD, CUNGHR,
-* CUNMHR, CHSEQR, CHSEIN, and CTREVC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRHS tests the error exits for CGEBAK, CGEBAL, CGEHRD, CUNGHR,
+*> CUNMHR, CHSEQR, CHSEIN, and CTREVC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CERRHS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cerrst.f b/TESTING/EIG/cerrst.f
index b5048b2e..58552bcc 100644
--- a/TESTING/EIG/cerrst.f
+++ b/TESTING/EIG/cerrst.f
@@ -1,30 +1,73 @@
- SUBROUTINE CERRST( PATH, NUNIT )
+*> \brief \b CERRST
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRST( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRST tests the error exits for CHETRD, CUNGTR, CUNMTR, CHPTRD,
-* CUNGTR, CUPMTR, CSTEQR, CSTEIN, CPTEQR, CHBTRD,
-* CHEEV, CHEEVX, CHEEVD, CHBEV, CHBEVX, CHBEVD,
-* CHPEV, CHPEVX, CHPEVD, and CSTEDC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRST tests the error exits for CHETRD, CUNGTR, CUNMTR, CHPTRD,
+*> CUNGTR, CUPMTR, CSTEQR, CSTEIN, CPTEQR, CHBTRD,
+*> CHEEV, CHEEVX, CHEEVD, CHBEV, CHBEVX, CHBEVD,
+*> CHPEV, CHPEVX, CHPEVD, and CSTEDC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CERRST( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cget02.f b/TESTING/EIG/cget02.f
index 21fdffc0..98beaad5 100644
--- a/TESTING/EIG/cget02.f
+++ b/TESTING/EIG/cget02.f
@@ -1,9 +1,144 @@
+*> \brief \b CGET02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET02 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A^T*x = b, where A^T is the transpose of A
+*> = 'C': A^H*x = b, where A^H is the conjugate transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGET02 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A^T*x = b, where A^T is the transpose of A
-* = 'C': A^H*x = b, where A^H is the conjugate transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cget10.f b/TESTING/EIG/cget10.f
index 31d19d1a..59c9dc3c 100644
--- a/TESTING/EIG/cget10.f
+++ b/TESTING/EIG/cget10.f
@@ -1,51 +1,119 @@
- SUBROUTINE CGET10( M, N, A, LDA, B, LDB, WORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, M, N
- REAL RESULT
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
-*
+*> \brief \b CGET10
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET10( M, N, A, LDA, B, LDB, WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, M, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGET10 compares two matrices A and B and computes the ratio
-* RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET10 compares two matrices A and B and computes the ratio
+*> RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and B.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m by n matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> The m by n matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is COMPLEX array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) COMPLEX array, dimension (LDB,N)
-* The m by n matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \ingroup complex_eig
*
-* WORK (workspace) COMPLEX array, dimension (M)
+* =====================================================================
+ SUBROUTINE CGET10( M, N, A, LDA, B, LDB, WORK, RWORK, RESULT )
*
-* RWORK (workspace) COMPLEX array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL
-* RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, M, N
+ REAL RESULT
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cget22.f b/TESTING/EIG/cget22.f
index 676df210..fd6f7644 100644
--- a/TESTING/EIG/cget22.f
+++ b/TESTING/EIG/cget22.f
@@ -1,86 +1,157 @@
- SUBROUTINE CGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
- $ WORK, RWORK, RESULT )
+*> \brief \b CGET22
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER TRANSA, TRANSE, TRANSW
- INTEGER LDA, LDE, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( 2 ), RWORK( * )
- COMPLEX A( LDA, * ), E( LDE, * ), W( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
+* WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSA, TRANSE, TRANSW
+* INTEGER LDA, LDE, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( 2 ), RWORK( * )
+* COMPLEX A( LDA, * ), E( LDE, * ), W( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGET22 does an eigenvector check.
-*
-* The basic test is:
-*
-* RESULT(1) = | A E - E W | / ( |A| |E| ulp )
-*
-* using the 1-norm. It also tests the normalization of E:
-*
-* RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
-* j
-*
-* where E(j) is the j-th eigenvector, and m-norm is the max-norm of a
-* vector. The max-norm of a complex n-vector x in this case is the
-* maximum of |re(x(i)| + |im(x(i)| over i = 1, ..., n.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET22 does an eigenvector check.
+*>
+*> The basic test is:
+*>
+*> RESULT(1) = | A E - E W | / ( |A| |E| ulp )
+*>
+*> using the 1-norm. It also tests the normalization of E:
+*>
+*> RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
+*> j
+*>
+*> where E(j) is the j-th eigenvector, and m-norm is the max-norm of a
+*> vector. The max-norm of a complex n-vector x in this case is the
+*> maximum of |re(x(i)| + |im(x(i)| over i = 1, ..., n.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANSA (input) CHARACTER*1
-* Specifies whether or not A is transposed.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* TRANSE (input) CHARACTER*1
-* Specifies whether or not E is transposed.
-* = 'N': No transpose, eigenvectors are in columns of E
-* = 'T': Transpose, eigenvectors are in rows of E
-* = 'C': Conjugate transpose, eigenvectors are in rows of E
-*
-* TRANSW (input) CHARACTER*1
-* Specifies whether or not W is transposed.
-* = 'N': No transpose
-* = 'T': Transpose, same as TRANSW = 'N'
-* = 'C': Conjugate transpose, use -WI(j) instead of WI(j)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The matrix whose eigenvectors are in E.
+* =========
+*
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> Specifies whether or not A is transposed.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] TRANSE
+*> \verbatim
+*> TRANSE is CHARACTER*1
+*> Specifies whether or not E is transposed.
+*> = 'N': No transpose, eigenvectors are in columns of E
+*> = 'T': Transpose, eigenvectors are in rows of E
+*> = 'C': Conjugate transpose, eigenvectors are in rows of E
+*> \endverbatim
+*>
+*> \param[in] TRANSW
+*> \verbatim
+*> TRANSW is CHARACTER*1
+*> Specifies whether or not W is transposed.
+*> = 'N': No transpose
+*> = 'T': Transpose, same as TRANSW = 'N'
+*> = 'C': Conjugate transpose, use -WI(j) instead of WI(j)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The matrix whose eigenvectors are in E.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (LDE,N)
+*> The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors
+*> are stored in the columns of E, if TRANSE = 'T' or 'C', the
+*> eigenvectors are stored in the rows of E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the array E. LDE >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> The eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input) COMPLEX array, dimension (LDE,N)
-* The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors
-* are stored in the columns of E, if TRANSE = 'T' or 'C', the
-* eigenvectors are stored in the rows of E.
+*> \date November 2011
*
-* LDE (input) INTEGER
-* The leading dimension of the array E. LDE >= max(1,N).
+*> \ingroup complex_eig
*
-* W (input) COMPLEX array, dimension (N)
-* The eigenvalues of A.
+* =====================================================================
+ SUBROUTINE CGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
+ $ WORK, RWORK, RESULT )
*
-* WORK (workspace) COMPLEX array, dimension (N*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (workspace) REAL array, dimension (N)
+* .. Scalar Arguments ..
+ CHARACTER TRANSA, TRANSE, TRANSW
+ INTEGER LDA, LDE, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( 2 ), RWORK( * )
+ COMPLEX A( LDA, * ), E( LDE, * ), W( * ), WORK( * )
+* ..
*
-* RESULT (output) REAL array, dimension (2)
-* RESULT(1) = | A E - E W | / ( |A| |E| ulp )
-* RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
-* j
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cget23.f b/TESTING/EIG/cget23.f
index c9be4d4f..ea8da36f 100644
--- a/TESTING/EIG/cget23.f
+++ b/TESTING/EIG/cget23.f
@@ -1,3 +1,369 @@
+*> \brief \b CGET23
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET23( COMP, ISRT, BALANC, JTYPE, THRESH, ISEED,
+* NOUNIT, N, A, LDA, H, W, W1, VL, LDVL, VR,
+* LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
+* RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1, RESULT,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL COMP
+* CHARACTER BALANC
+* INTEGER INFO, ISRT, JTYPE, LDA, LDLRE, LDVL, LDVR,
+* $ LWORK, N, NOUNIT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
+* $ RCNDV1( * ), RCONDE( * ), RCONDV( * ),
+* $ RESULT( 11 ), RWORK( * ), SCALE( * ),
+* $ SCALE1( * )
+* COMPLEX A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), W( * ), W1( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET23 checks the nonsymmetric eigenvalue problem driver CGEEVX.
+*> If COMP = .FALSE., the first 8 of the following tests will be
+*> performed on the input matrix A, and also test 9 if LWORK is
+*> sufficiently large.
+*> if COMP is .TRUE. all 11 tests will be performed.
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a diagonal matrix with diagonal entries W(j).
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) 0 if W(full) = W(partial), 1/ulp otherwise
+*>
+*> W(full) denotes the eigenvalues computed when VR, VL, RCONDV
+*> and RCONDE are also computed, and W(partial) denotes the
+*> eigenvalues computed when only some of VR, VL, RCONDV, and
+*> RCONDE are computed.
+*>
+*> (6) 0 if VR(full) = VR(partial), 1/ulp otherwise
+*>
+*> VR(full) denotes the right eigenvectors computed when VL, RCONDV
+*> and RCONDE are computed, and VR(partial) denotes the result
+*> when only some of VL and RCONDV are computed.
+*>
+*> (7) 0 if VL(full) = VL(partial), 1/ulp otherwise
+*>
+*> VL(full) denotes the left eigenvectors computed when VR, RCONDV
+*> and RCONDE are computed, and VL(partial) denotes the result
+*> when only some of VR and RCONDV are computed.
+*>
+*> (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
+*> SCALE, ILO, IHI, ABNRM (partial)
+*> 1/ulp otherwise
+*>
+*> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
+*> (full) is when VR, VL, RCONDE and RCONDV are also computed, and
+*> (partial) is when some are not computed.
+*>
+*> (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise
+*>
+*> RCONDV(full) denotes the reciprocal condition numbers of the
+*> right eigenvectors computed when VR, VL and RCONDE are also
+*> computed. RCONDV(partial) denotes the reciprocal condition
+*> numbers when only some of VR, VL and RCONDE are computed.
+*>
+*> (10) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right eigenvector condition number
+*> computed by CGEEVX and RCDVIN (the precomputed true value)
+*> is supplied as input. cond(RCONDV) is the condition number of
+*> RCONDV, and takes errors in computing RCONDV into account, so
+*> that the resulting quantity should be O(ULP). cond(RCONDV) is
+*> essentially given by norm(A)/RCONDE.
+*>
+*> (11) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal eigenvalue condition number
+*> computed by CGEEVX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMP
+*> \verbatim
+*> COMP is LOGICAL
+*> COMP describes which input tests to perform:
+*> = .FALSE. if the computed condition numbers are not to
+*> be tested against RCDVIN and RCDEIN
+*> = .TRUE. if they are to be compared
+*> \endverbatim
+*>
+*> \param[in] ISRT
+*> \verbatim
+*> ISRT is INTEGER
+*> If COMP = .TRUE., ISRT indicates in how the eigenvalues
+*> corresponding to values in RCDVIN and RCDEIN are ordered:
+*> = 0 means the eigenvalues are sorted by
+*> increasing real part
+*> = 1 means the eigenvalues are sorted by
+*> increasing imaginary part
+*> If COMP = .FALSE., ISRT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER
+*> Describes the balancing option to be tested.
+*> = 'N' for no permuting or diagonal scaling
+*> = 'P' for permuting but no diagonal scaling
+*> = 'S' for no permuting but diagonal scaling
+*> = 'B' for permuting and diagonal scaling
+*> \endverbatim
+*>
+*> \param[in] JTYPE
+*> \verbatim
+*> JTYPE is INTEGER
+*> Type of input matrix. Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> If COMP = .FALSE., the random number generator seed
+*> used to produce matrix.
+*> If COMP = .TRUE., ISEED(1) = the number of the example.
+*> Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of A. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least N.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDA,N)
+*> Another copy of the test matrix A, modified by CGEEVX.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> Contains the eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] W1
+*> \verbatim
+*> W1 is COMPLEX array, dimension (N)
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when CGEEVX only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX array, dimension (LDVL,N)
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX array, dimension (LDVR,N)
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is COMPLEX array, dimension (LDLRE,N)
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension (N)
+*> RCONDV holds the computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] RCNDV1
+*> \verbatim
+*> RCNDV1 is REAL array, dimension (N)
+*> RCNDV1 holds more computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RCDVIN
+*> \verbatim
+*> RCDVIN is REAL array, dimension (N)
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition numbers for eigenvectors to be compared with
+*> RCONDV.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension (N)
+*> RCONDE holds the computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] RCNDE1
+*> \verbatim
+*> RCNDE1 is REAL array, dimension (N)
+*> RCNDE1 holds more computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] RCDEIN
+*> \verbatim
+*> RCDEIN is REAL array, dimension (N)
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition numbers for eigenvalues to be compared with
+*> RCONDE.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL array, dimension (N)
+*> Holds information describing balancing of matrix.
+*> \endverbatim
+*>
+*> \param[out] SCALE1
+*> \verbatim
+*> SCALE1 is REAL array, dimension (N)
+*> Holds information describing balancing of matrix.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (11)
+*> The values computed by the 11 tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 2*N, and 2*N+N**2 if tests 9, 10 or 11 are to be performed.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> If <0, input parameter -INFO had an incorrect value.
+*> If >0, CGEEVX returned an error code, the absolute
+*> value of which is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGET23( COMP, ISRT, BALANC, JTYPE, THRESH, ISEED,
$ NOUNIT, N, A, LDA, H, W, W1, VL, LDVL, VR,
$ LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
@@ -5,8 +371,9 @@
$ WORK, LWORK, RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL COMP
@@ -26,223 +393,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGET23 checks the nonsymmetric eigenvalue problem driver CGEEVX.
-* If COMP = .FALSE., the first 8 of the following tests will be
-* performed on the input matrix A, and also test 9 if LWORK is
-* sufficiently large.
-* if COMP is .TRUE. all 11 tests will be performed.
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a diagonal matrix with diagonal entries W(j).
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) 0 if W(full) = W(partial), 1/ulp otherwise
-*
-* W(full) denotes the eigenvalues computed when VR, VL, RCONDV
-* and RCONDE are also computed, and W(partial) denotes the
-* eigenvalues computed when only some of VR, VL, RCONDV, and
-* RCONDE are computed.
-*
-* (6) 0 if VR(full) = VR(partial), 1/ulp otherwise
-*
-* VR(full) denotes the right eigenvectors computed when VL, RCONDV
-* and RCONDE are computed, and VR(partial) denotes the result
-* when only some of VL and RCONDV are computed.
-*
-* (7) 0 if VL(full) = VL(partial), 1/ulp otherwise
-*
-* VL(full) denotes the left eigenvectors computed when VR, RCONDV
-* and RCONDE are computed, and VL(partial) denotes the result
-* when only some of VR and RCONDV are computed.
-*
-* (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
-* SCALE, ILO, IHI, ABNRM (partial)
-* 1/ulp otherwise
-*
-* SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
-* (full) is when VR, VL, RCONDE and RCONDV are also computed, and
-* (partial) is when some are not computed.
-*
-* (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise
-*
-* RCONDV(full) denotes the reciprocal condition numbers of the
-* right eigenvectors computed when VR, VL and RCONDE are also
-* computed. RCONDV(partial) denotes the reciprocal condition
-* numbers when only some of VR, VL and RCONDE are computed.
-*
-* (10) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right eigenvector condition number
-* computed by CGEEVX and RCDVIN (the precomputed true value)
-* is supplied as input. cond(RCONDV) is the condition number of
-* RCONDV, and takes errors in computing RCONDV into account, so
-* that the resulting quantity should be O(ULP). cond(RCONDV) is
-* essentially given by norm(A)/RCONDE.
-*
-* (11) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal eigenvalue condition number
-* computed by CGEEVX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* Arguments
-* =========
-*
-* COMP (input) LOGICAL
-* COMP describes which input tests to perform:
-* = .FALSE. if the computed condition numbers are not to
-* be tested against RCDVIN and RCDEIN
-* = .TRUE. if they are to be compared
-*
-* ISRT (input) INTEGER
-* If COMP = .TRUE., ISRT indicates in how the eigenvalues
-* corresponding to values in RCDVIN and RCDEIN are ordered:
-* = 0 means the eigenvalues are sorted by
-* increasing real part
-* = 1 means the eigenvalues are sorted by
-* increasing imaginary part
-* If COMP = .FALSE., ISRT is not referenced.
-*
-* BALANC (input) CHARACTER
-* Describes the balancing option to be tested.
-* = 'N' for no permuting or diagonal scaling
-* = 'P' for permuting but no diagonal scaling
-* = 'S' for no permuting but diagonal scaling
-* = 'B' for permuting and diagonal scaling
-*
-* JTYPE (input) INTEGER
-* Type of input matrix. Used to label output if error occurs.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* ISEED (input) INTEGER array, dimension (4)
-* If COMP = .FALSE., the random number generator seed
-* used to produce matrix.
-* If COMP = .TRUE., ISEED(1) = the number of the example.
-* Used to label output if error occurs.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* N (input) INTEGER
-* The dimension of A. N must be at least 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least N.
-*
-* H (workspace) COMPLEX array, dimension (LDA,N)
-* Another copy of the test matrix A, modified by CGEEVX.
-*
-* W (workspace) COMPLEX array, dimension (N)
-* Contains the eigenvalues of A.
-*
-* W1 (workspace) COMPLEX array, dimension (N)
-* Like W, this array contains the eigenvalues of A,
-* but those computed when CGEEVX only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) COMPLEX array, dimension (LDVL,N)
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,N).
-*
-* VR (workspace) COMPLEX array, dimension (LDVR,N)
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,N).
-*
-* LRE (workspace) COMPLEX array, dimension (LDLRE,N)
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,N).
-*
-* RCONDV (workspace) REAL array, dimension (N)
-* RCONDV holds the computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCNDV1 (workspace) REAL array, dimension (N)
-* RCNDV1 holds more computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCDVIN (input) REAL array, dimension (N)
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition numbers for eigenvectors to be compared with
-* RCONDV.
-*
-* RCONDE (workspace) REAL array, dimension (N)
-* RCONDE holds the computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCNDE1 (workspace) REAL array, dimension (N)
-* RCNDE1 holds more computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCDEIN (input) REAL array, dimension (N)
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition numbers for eigenvalues to be compared with
-* RCONDE.
-*
-* SCALE (workspace) REAL array, dimension (N)
-* Holds information describing balancing of matrix.
-*
-* SCALE1 (workspace) REAL array, dimension (N)
-* Holds information describing balancing of matrix.
-*
-* RESULT (output) REAL array, dimension (11)
-* The values computed by the 11 tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 2*N, and 2*N+N**2 if tests 9, 10 or 11 are to be performed.
-*
-* RWORK (workspace) REAL array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* If <0, input parameter -INFO had an incorrect value.
-* If >0, CGEEVX returned an error code, the absolute
-* value of which is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cget24.f b/TESTING/EIG/cget24.f
index 78a3b296..ee604fcb 100644
--- a/TESTING/EIG/cget24.f
+++ b/TESTING/EIG/cget24.f
@@ -1,11 +1,346 @@
+*> \brief \b CGET24
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
+* H, HT, W, WT, WTMP, VS, LDVS, VS1, RCDEIN,
+* RCDVIN, NSLCT, ISLCT, ISRT, RESULT, WORK,
+* LWORK, RWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL COMP
+* INTEGER INFO, ISRT, JTYPE, LDA, LDVS, LWORK, N, NOUNIT,
+* $ NSLCT
+* REAL RCDEIN, RCDVIN, THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER ISEED( 4 ), ISLCT( * )
+* REAL RESULT( 17 ), RWORK( * )
+* COMPLEX A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ VS( LDVS, * ), VS1( LDVS, * ), W( * ),
+* $ WORK( * ), WT( * ), WTMP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET24 checks the nonsymmetric eigenvalue (Schur form) problem
+*> expert driver CGEESX.
+*>
+*> If COMP = .FALSE., the first 13 of the following tests will be
+*> be performed on the input matrix A, and also tests 14 and 15
+*> if LWORK is sufficiently large.
+*> If COMP = .TRUE., all 17 test will be performed.
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare W with and
+*> without reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare T with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare VS with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*> If workspace sufficient, also compare SDIM with and
+*> without reciprocal condition numbers
+*>
+*> (14) if RCONDE the same no matter if VS and/or RCONDV computed
+*>
+*> (15) if RCONDV the same no matter if VS and/or RCONDE computed
+*>
+*> (16) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal average eigenvalue condition number
+*> computed by CGEESX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*> (17) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right invariant subspace condition
+*> number computed by CGEESX and RCDVIN (the precomputed true
+*> value) is supplied as input. cond(RCONDV) is the condition
+*> number of RCONDV, and takes errors in computing RCONDV into
+*> account, so that the resulting quantity should be O(ULP).
+*> cond(RCONDV) is essentially given by norm(A)/RCONDE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMP
+*> \verbatim
+*> COMP is LOGICAL
+*> COMP describes which input tests to perform:
+*> = .FALSE. if the computed condition numbers are not to
+*> be tested against RCDVIN and RCDEIN
+*> = .TRUE. if they are to be compared
+*> \endverbatim
+*>
+*> \param[in] JTYPE
+*> \verbatim
+*> JTYPE is INTEGER
+*> Type of input matrix. Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> If COMP = .FALSE., the random number generator seed
+*> used to produce matrix.
+*> If COMP = .TRUE., ISEED(1) = the number of the example.
+*> Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of A. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least N.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDA, N)
+*> Another copy of the test matrix A, modified by CGEESX.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is COMPLEX array, dimension (LDA, N)
+*> Yet another copy of the test matrix A, modified by CGEESX.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX array, dimension (N)
+*> The computed eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] WT
+*> \verbatim
+*> WT is COMPLEX array, dimension (N)
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when CGEESX only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] WTMP
+*> \verbatim
+*> WTMP is COMPLEX array, dimension (N)
+*> Like W, this array contains the eigenvalues of A,
+*> but sorted by increasing real or imaginary part.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX array, dimension (LDVS, N)
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1, N).
+*> \endverbatim
+*>
+*> \param[out] VS1
+*> \verbatim
+*> VS1 is COMPLEX array, dimension (LDVS, N)
+*> VS1 holds another copy of the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] RCDEIN
+*> \verbatim
+*> RCDEIN is REAL
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition number for the average of selected eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] RCDVIN
+*> \verbatim
+*> RCDVIN is REAL
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition number for the selected right invariant subspace.
+*> \endverbatim
+*>
+*> \param[in] NSLCT
+*> \verbatim
+*> NSLCT is INTEGER
+*> When COMP = .TRUE. the number of selected eigenvalues
+*> corresponding to the precomputed values RCDEIN and RCDVIN.
+*> \endverbatim
+*>
+*> \param[in] ISLCT
+*> \verbatim
+*> ISLCT is INTEGER array, dimension (NSLCT)
+*> When COMP = .TRUE. ISLCT selects the eigenvalues of the
+*> input matrix corresponding to the precomputed values RCDEIN
+*> and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the
+*> eigenvalue with the J-th largest real or imaginary part is
+*> selected. The real part is used if ISRT = 0, and the
+*> imaginary part if ISRT = 1.
+*> Not referenced if COMP = .FALSE.
+*> \endverbatim
+*>
+*> \param[in] ISRT
+*> \verbatim
+*> ISRT is INTEGER
+*> When COMP = .TRUE., ISRT describes how ISLCT is used to
+*> choose a subset of the spectrum.
+*> Not referenced if COMP = .FALSE.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (17)
+*> The values computed by the 17 tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N*N)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK to be passed to CGEESX. This
+*> must be at least 2*N, and N*(N+1)/2 if tests 14--16 are to
+*> be performed.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> If <0, input parameter -INFO had an incorrect value.
+*> If >0, CGEESX returned an error code, the absolute
+*> value of which is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
$ H, HT, W, WT, WTMP, VS, LDVS, VS1, RCDEIN,
$ RCDVIN, NSLCT, ISLCT, ISRT, RESULT, WORK,
$ LWORK, RWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL COMP
@@ -22,210 +357,6 @@
$ WORK( * ), WT( * ), WTMP( * )
* ..
*
-* Purpose
-* =======
-*
-* CGET24 checks the nonsymmetric eigenvalue (Schur form) problem
-* expert driver CGEESX.
-*
-* If COMP = .FALSE., the first 13 of the following tests will be
-* be performed on the input matrix A, and also tests 14 and 15
-* if LWORK is sufficiently large.
-* If COMP = .TRUE., all 17 test will be performed.
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* If workspace sufficient, also compare W with and
-* without reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare T with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare VS with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-* If workspace sufficient, also compare SDIM with and
-* without reciprocal condition numbers
-*
-* (14) if RCONDE the same no matter if VS and/or RCONDV computed
-*
-* (15) if RCONDV the same no matter if VS and/or RCONDE computed
-*
-* (16) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal average eigenvalue condition number
-* computed by CGEESX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* (17) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right invariant subspace condition
-* number computed by CGEESX and RCDVIN (the precomputed true
-* value) is supplied as input. cond(RCONDV) is the condition
-* number of RCONDV, and takes errors in computing RCONDV into
-* account, so that the resulting quantity should be O(ULP).
-* cond(RCONDV) is essentially given by norm(A)/RCONDE.
-*
-* Arguments
-* =========
-*
-* COMP (input) LOGICAL
-* COMP describes which input tests to perform:
-* = .FALSE. if the computed condition numbers are not to
-* be tested against RCDVIN and RCDEIN
-* = .TRUE. if they are to be compared
-*
-* JTYPE (input) INTEGER
-* Type of input matrix. Used to label output if error occurs.
-*
-* ISEED (input) INTEGER array, dimension (4)
-* If COMP = .FALSE., the random number generator seed
-* used to produce matrix.
-* If COMP = .TRUE., ISEED(1) = the number of the example.
-* Used to label output if error occurs.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* N (input) INTEGER
-* The dimension of A. N must be at least 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA, N)
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least N.
-*
-* H (workspace) COMPLEX array, dimension (LDA, N)
-* Another copy of the test matrix A, modified by CGEESX.
-*
-* HT (workspace) COMPLEX array, dimension (LDA, N)
-* Yet another copy of the test matrix A, modified by CGEESX.
-*
-* W (workspace) COMPLEX array, dimension (N)
-* The computed eigenvalues of A.
-*
-* WT (workspace) COMPLEX array, dimension (N)
-* Like W, this array contains the eigenvalues of A,
-* but those computed when CGEESX only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* WTMP (workspace) COMPLEX array, dimension (N)
-* Like W, this array contains the eigenvalues of A,
-* but sorted by increasing real or imaginary part.
-*
-* VS (workspace) COMPLEX array, dimension (LDVS, N)
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1, N).
-*
-* VS1 (workspace) COMPLEX array, dimension (LDVS, N)
-* VS1 holds another copy of the computed Schur vectors.
-*
-* RCDEIN (input) REAL
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition number for the average of selected eigenvalues.
-*
-* RCDVIN (input) REAL
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition number for the selected right invariant subspace.
-*
-* NSLCT (input) INTEGER
-* When COMP = .TRUE. the number of selected eigenvalues
-* corresponding to the precomputed values RCDEIN and RCDVIN.
-*
-* ISLCT (input) INTEGER array, dimension (NSLCT)
-* When COMP = .TRUE. ISLCT selects the eigenvalues of the
-* input matrix corresponding to the precomputed values RCDEIN
-* and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the
-* eigenvalue with the J-th largest real or imaginary part is
-* selected. The real part is used if ISRT = 0, and the
-* imaginary part if ISRT = 1.
-* Not referenced if COMP = .FALSE.
-*
-* ISRT (input) INTEGER
-* When COMP = .TRUE., ISRT describes how ISLCT is used to
-* choose a subset of the spectrum.
-* Not referenced if COMP = .FALSE.
-*
-* RESULT (output) REAL array, dimension (17)
-* The values computed by the 17 tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N*N)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK to be passed to CGEESX. This
-* must be at least 2*N, and N*(N+1)/2 if tests 14--16 are to
-* be performed.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* If <0, input parameter -INFO had an incorrect value.
-* If >0, CGEESX returned an error code, the absolute
-* value of which is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cget35.f b/TESTING/EIG/cget35.f
index e227c9dc..c1cde658 100644
--- a/TESTING/EIG/cget35.f
+++ b/TESTING/EIG/cget35.f
@@ -1,48 +1,100 @@
- SUBROUTINE CGET35( RMAX, LMAX, NINFO, KNT, NIN )
+*> \brief \b CGET35
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NIN, NINFO
- REAL RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET35( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NIN, NINFO
+* REAL RMAX
+* ..
+*
* Purpose
* =======
*
-* CGET35 tests CTRSYL, a routine for solving the Sylvester matrix
-* equation
-*
-* op(A)*X + ISGN*X*op(B) = scale*C,
-*
-* A and B are assumed to be in Schur canonical form, op() represents an
-* optional transpose, and ISGN can be -1 or +1. Scale is an output
-* less than or equal to 1, chosen to avoid overflow in X.
-*
-* The test code verifies that the following residual is order 1:
-*
-* norm(op(A)*X + ISGN*X*op(B) - scale*C) /
-* (EPS*max(norm(A),norm(B))*norm(X))
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET35 tests CTRSYL, a routine for solving the Sylvester matrix
+*> equation
+*>
+*> op(A)*X + ISGN*X*op(B) = scale*C,
+*>
+*> A and B are assumed to be in Schur canonical form, op() represents an
+*> optional transpose, and ISGN can be -1 or +1. Scale is an output
+*> less than or equal to 1, chosen to avoid overflow in X.
+*>
+*> The test code verifies that the following residual is order 1:
+*>
+*> norm(op(A)*X + ISGN*X*op(B) - scale*C) /
+*> (EPS*max(norm(A),norm(B))*norm(X))
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples where INFO is nonzero.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RMAX (output) REAL
-* Value of the largest test ratio.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+*> \date November 2011
*
-* NINFO (output) INTEGER
-* Number of examples where INFO is nonzero.
+*> \ingroup complex_eig
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* =====================================================================
+ SUBROUTINE CGET35( RMAX, LMAX, NINFO, KNT, NIN )
*
-* NIN (input) INTEGER
-* Input logical unit number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NIN, NINFO
+ REAL RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cget36.f b/TESTING/EIG/cget36.f
index d41ee457..969ac57b 100644
--- a/TESTING/EIG/cget36.f
+++ b/TESTING/EIG/cget36.f
@@ -1,49 +1,101 @@
- SUBROUTINE CGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*> \brief \b CGET36
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NIN, NINFO
- REAL RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NIN, NINFO
+* REAL RMAX
+* ..
+*
* Purpose
* =======
*
-* CGET36 tests CTREXC, a routine for reordering diagonal entries of a
-* matrix in complex Schur form. Thus, CLAEXC computes a unitary matrix
-* Q such that
-*
-* Q' * T1 * Q = T2
-*
-* and where one of the diagonal blocks of T1 (the one at row IFST) has
-* been moved to position ILST.
-*
-* The test code verifies that the residual Q'*T1*Q-T2 is small, that T2
-* is in Schur form, and that the final position of the IFST block is
-* ILST.
-*
-* The test matrices are read from a file with logical unit number NIN.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET36 tests CTREXC, a routine for reordering diagonal entries of a
+*> matrix in complex Schur form. Thus, CLAEXC computes a unitary matrix
+*> Q such that
+*>
+*> Q' * T1 * Q = T2
+*>
+*> and where one of the diagonal blocks of T1 (the one at row IFST) has
+*> been moved to position ILST.
+*>
+*> The test code verifies that the residual Q'*T1*Q-T2 is small, that T2
+*> is in Schur form, and that the final position of the IFST block is
+*> ILST.
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples where INFO is nonzero.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RMAX (output) REAL
-* Value of the largest test ratio.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+*> \date November 2011
*
-* NINFO (output) INTEGER
-* Number of examples where INFO is nonzero.
+*> \ingroup complex_eig
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* =====================================================================
+ SUBROUTINE CGET36( RMAX, LMAX, NINFO, KNT, NIN )
*
-* NIN (input) INTEGER
-* Input logical unit number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NIN, NINFO
+ REAL RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cget37.f b/TESTING/EIG/cget37.f
index 3a45aa45..94e1a476 100644
--- a/TESTING/EIG/cget37.f
+++ b/TESTING/EIG/cget37.f
@@ -1,8 +1,101 @@
+*> \brief \b CGET37
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET37( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, NIN
+* ..
+* .. Array Arguments ..
+* INTEGER LMAX( 3 ), NINFO( 3 )
+* REAL RMAX( 3 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET37 tests CTRSNA, a routine for estimating condition numbers of
+*> eigenvalues and/or right eigenvectors of a matrix.
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL array, dimension (3)
+*> Value of the largest test ratio.
+*> RMAX(1) = largest ratio comparing different calls to CTRSNA
+*> RMAX(2) = largest error in reciprocal condition
+*> numbers taking their conditioning into account
+*> RMAX(3) = largest error in reciprocal condition
+*> numbers not taking their conditioning into
+*> account (may be larger than RMAX(2))
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER array, dimension (3)
+*> LMAX(i) is example number where largest test ratio
+*> RMAX(i) is achieved. Also:
+*> If CGEHRD returns INFO nonzero on example i, LMAX(1)=i
+*> If CHSEQR returns INFO nonzero on example i, LMAX(2)=i
+*> If CTRSNA returns INFO nonzero on example i, LMAX(3)=i
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = No. of times CGEHRD returned INFO nonzero
+*> NINFO(2) = No. of times CHSEQR returned INFO nonzero
+*> NINFO(3) = No. of times CTRSNA returned INFO nonzero
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGET37( RMAX, LMAX, NINFO, KNT, NIN )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KNT, NIN
@@ -12,44 +105,6 @@
REAL RMAX( 3 )
* ..
*
-* Purpose
-* =======
-*
-* CGET37 tests CTRSNA, a routine for estimating condition numbers of
-* eigenvalues and/or right eigenvectors of a matrix.
-*
-* The test matrices are read from a file with logical unit number NIN.
-*
-* Arguments
-* ==========
-*
-* RMAX (output) REAL array, dimension (3)
-* Value of the largest test ratio.
-* RMAX(1) = largest ratio comparing different calls to CTRSNA
-* RMAX(2) = largest error in reciprocal condition
-* numbers taking their conditioning into account
-* RMAX(3) = largest error in reciprocal condition
-* numbers not taking their conditioning into
-* account (may be larger than RMAX(2))
-*
-* LMAX (output) INTEGER array, dimension (3)
-* LMAX(i) is example number where largest test ratio
-* RMAX(i) is achieved. Also:
-* If CGEHRD returns INFO nonzero on example i, LMAX(1)=i
-* If CHSEQR returns INFO nonzero on example i, LMAX(2)=i
-* If CTRSNA returns INFO nonzero on example i, LMAX(3)=i
-*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = No. of times CGEHRD returned INFO nonzero
-* NINFO(2) = No. of times CHSEQR returned INFO nonzero
-* NINFO(3) = No. of times CTRSNA returned INFO nonzero
-*
-* KNT (output) INTEGER
-* Total number of examples tested.
-*
-* NIN (input) INTEGER
-* Input logical unit number
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cget38.f b/TESTING/EIG/cget38.f
index 88e3b933..54697ff7 100644
--- a/TESTING/EIG/cget38.f
+++ b/TESTING/EIG/cget38.f
@@ -1,8 +1,102 @@
+*> \brief \b CGET38
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET38( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, NIN
+* ..
+* .. Array Arguments ..
+* INTEGER LMAX( 3 ), NINFO( 3 )
+* REAL RMAX( 3 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET38 tests CTRSEN, a routine for estimating condition numbers of a
+*> cluster of eigenvalues and/or its associated right invariant subspace
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL array, dimension (3)
+*> Values of the largest test ratios.
+*> RMAX(1) = largest residuals from CHST01 or comparing
+*> different calls to CTRSEN
+*> RMAX(2) = largest error in reciprocal condition
+*> numbers taking their conditioning into account
+*> RMAX(3) = largest error in reciprocal condition
+*> numbers not taking their conditioning into
+*> account (may be larger than RMAX(2))
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER array, dimension (3)
+*> LMAX(i) is example number where largest test ratio
+*> RMAX(i) is achieved. Also:
+*> If CGEHRD returns INFO nonzero on example i, LMAX(1)=i
+*> If CHSEQR returns INFO nonzero on example i, LMAX(2)=i
+*> If CTRSEN returns INFO nonzero on example i, LMAX(3)=i
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = No. of times CGEHRD returned INFO nonzero
+*> NINFO(2) = No. of times CHSEQR returned INFO nonzero
+*> NINFO(3) = No. of times CTRSEN returned INFO nonzero
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGET38( RMAX, LMAX, NINFO, KNT, NIN )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KNT, NIN
@@ -12,45 +106,6 @@
REAL RMAX( 3 )
* ..
*
-* Purpose
-* =======
-*
-* CGET38 tests CTRSEN, a routine for estimating condition numbers of a
-* cluster of eigenvalues and/or its associated right invariant subspace
-*
-* The test matrices are read from a file with logical unit number NIN.
-*
-* Arguments
-* ==========
-*
-* RMAX (output) REAL array, dimension (3)
-* Values of the largest test ratios.
-* RMAX(1) = largest residuals from CHST01 or comparing
-* different calls to CTRSEN
-* RMAX(2) = largest error in reciprocal condition
-* numbers taking their conditioning into account
-* RMAX(3) = largest error in reciprocal condition
-* numbers not taking their conditioning into
-* account (may be larger than RMAX(2))
-*
-* LMAX (output) INTEGER array, dimension (3)
-* LMAX(i) is example number where largest test ratio
-* RMAX(i) is achieved. Also:
-* If CGEHRD returns INFO nonzero on example i, LMAX(1)=i
-* If CHSEQR returns INFO nonzero on example i, LMAX(2)=i
-* If CTRSEN returns INFO nonzero on example i, LMAX(3)=i
-*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = No. of times CGEHRD returned INFO nonzero
-* NINFO(2) = No. of times CHSEQR returned INFO nonzero
-* NINFO(3) = No. of times CTRSEN returned INFO nonzero
-*
-* KNT (output) INTEGER
-* Total number of examples tested.
-*
-* NIN (input) INTEGER
-* Input logical unit number.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cget51.f b/TESTING/EIG/cget51.f
index d7ca9695..99201d51 100644
--- a/TESTING/EIG/cget51.f
+++ b/TESTING/EIG/cget51.f
@@ -1,9 +1,165 @@
+*> \brief \b CGET51
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER ITYPE, LDA, LDB, LDU, LDV, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET51 generally checks a decomposition of the form
+*>
+*> A = U B VC>
+*> where * means conjugate transpose and U and V are unitary.
+*>
+*> Specifically, if ITYPE=1
+*>
+*> RESULT = | A - U B V* | / ( |A| n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT = | A - B | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT = | I - UU* | / ( n ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> =1: RESULT = | A - U B V* | / ( |A| n ulp )
+*> =2: RESULT = | A - B | / ( |A| n ulp )
+*> =3: RESULT = | I - UU* | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, CGET51 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The original (unfactored) matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> The factored matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU, N)
+*> The unitary matrix on the left-hand side in the
+*> decomposition.
+*> Not referenced if ITYPE=2
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV, N)
+*> The unitary matrix on the left-hand side in the
+*> decomposition.
+*> Not referenced if ITYPE=2
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> The values computed by the test specified by ITYPE. The
+*> value is currently limited to 1/ulp, to avoid overflow.
+*> Errors are flagged by RESULT=10/ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
$ RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ITYPE, LDA, LDB, LDU, LDV, N
@@ -15,81 +171,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGET51 generally checks a decomposition of the form
-*
-* A = U B V*
-*
-* where * means conjugate transpose and U and V are unitary.
-*
-* Specifically, if ITYPE=1
-*
-* RESULT = | A - U B V* | / ( |A| n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT = | A - B | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT = | I - UU* | / ( n ulp )
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* =1: RESULT = | A - U B V* | / ( |A| n ulp )
-* =2: RESULT = | A - B | / ( |A| n ulp )
-* =3: RESULT = | I - UU* | / ( n ulp )
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, CGET51 does nothing.
-* It must be at least zero.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* The original (unfactored) matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) COMPLEX array, dimension (LDB, N)
-* The factored matrix.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* U (input) COMPLEX array, dimension (LDU, N)
-* The unitary matrix on the left-hand side in the
-* decomposition.
-* Not referenced if ITYPE=2
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) COMPLEX array, dimension (LDV, N)
-* The unitary matrix on the left-hand side in the
-* decomposition.
-* Not referenced if ITYPE=2
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N**2)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESULT (output) REAL
-* The values computed by the test specified by ITYPE. The
-* value is currently limited to 1/ulp, to avoid overflow.
-* Errors are flagged by RESULT=10/ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cget52.f b/TESTING/EIG/cget52.f
index fd2d0d9f..f2670311 100644
--- a/TESTING/EIG/cget52.f
+++ b/TESTING/EIG/cget52.f
@@ -1,9 +1,172 @@
+*> \brief \b CGET52
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHA, BETA,
+* WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* LOGICAL LEFT
+* INTEGER LDA, LDB, LDE, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( 2 ), RWORK( * )
+* COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), E( LDE, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET52 does an eigenvector check for the generalized eigenvalue
+*> problem.
+*>
+*> The basic test for right eigenvectors is:
+*>
+*> | b(i) A E(i) - a(i) B E(i) |
+*> RESULT(1) = max -------------------------------
+*> i n ulp max( |b(i) A|, |a(i) B| )
+*>
+*> using the 1-norm. Here, a(i)/b(i) = w is the i-th generalized
+*> eigenvalue of A - w B, or, equivalently, b(i)/a(i) = m is the i-th
+*> generalized eigenvalue of m A - B.
+*>
+*> H H _ _
+*> For left eigenvectors, A , B , a, and b are used.
+*>
+*> CGET52 also tests the normalization of E. Each eigenvector is
+*> supposed to be normalized so that the maximum "absolute value"
+*> of its elements is 1, where in this case, "absolute value"
+*> of a complex value x is |Re(x)| + |Im(x)| ; let us call this
+*> maximum "absolute value" norm of a vector v M(v).
+*> if a(i)=b(i)=0, then the eigenvector is set to be the jth coordinate
+*> vector. The normalization test is:
+*>
+*> RESULT(2) = max | M(v(i)) - 1 | / ( n ulp )
+*> eigenvectors v(i)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LEFT
+*> \verbatim
+*> LEFT is LOGICAL
+*> =.TRUE.: The eigenvectors in the columns of E are assumed
+*> to be *left* eigenvectors.
+*> =.FALSE.: The eigenvectors in the columns of E are assumed
+*> to be *right* eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrices. If it is zero, CGET52 does
+*> nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> The matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (LDE, N)
+*> The matrix of eigenvectors. It must be O( 1 ).
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of E. It must be at least 1 and at
+*> least N.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX array, dimension (N)
+*> The values a(i) as described above, which, along with b(i),
+*> define the generalized eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX array, dimension (N)
+*> The values b(i) as described above, which, along with a(i),
+*> define the generalized eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the test described above. If A E or
+*> B E is likely to overflow, then RESULT(1:2) is set to
+*> 10 / ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGET52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHA, BETA,
$ WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LEFT
@@ -15,87 +178,6 @@
$ BETA( * ), E( LDE, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGET52 does an eigenvector check for the generalized eigenvalue
-* problem.
-*
-* The basic test for right eigenvectors is:
-*
-* | b(i) A E(i) - a(i) B E(i) |
-* RESULT(1) = max -------------------------------
-* i n ulp max( |b(i) A|, |a(i) B| )
-*
-* using the 1-norm. Here, a(i)/b(i) = w is the i-th generalized
-* eigenvalue of A - w B, or, equivalently, b(i)/a(i) = m is the i-th
-* generalized eigenvalue of m A - B.
-*
-* H H _ _
-* For left eigenvectors, A , B , a, and b are used.
-*
-* CGET52 also tests the normalization of E. Each eigenvector is
-* supposed to be normalized so that the maximum "absolute value"
-* of its elements is 1, where in this case, "absolute value"
-* of a complex value x is |Re(x)| + |Im(x)| ; let us call this
-* maximum "absolute value" norm of a vector v M(v).
-* if a(i)=b(i)=0, then the eigenvector is set to be the jth coordinate
-* vector. The normalization test is:
-*
-* RESULT(2) = max | M(v(i)) - 1 | / ( n ulp )
-* eigenvectors v(i)
-*
-* Arguments
-* =========
-*
-* LEFT (input) LOGICAL
-* =.TRUE.: The eigenvectors in the columns of E are assumed
-* to be *left* eigenvectors.
-* =.FALSE.: The eigenvectors in the columns of E are assumed
-* to be *right* eigenvectors.
-*
-* N (input) INTEGER
-* The size of the matrices. If it is zero, CGET52 does
-* nothing. It must be at least zero.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* The matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) COMPLEX array, dimension (LDB, N)
-* The matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* E (input) COMPLEX array, dimension (LDE, N)
-* The matrix of eigenvectors. It must be O( 1 ).
-*
-* LDE (input) INTEGER
-* The leading dimension of E. It must be at least 1 and at
-* least N.
-*
-* ALPHA (input) COMPLEX array, dimension (N)
-* The values a(i) as described above, which, along with b(i),
-* define the generalized eigenvalues.
-*
-* BETA (input) COMPLEX array, dimension (N)
-* The values b(i) as described above, which, along with a(i),
-* define the generalized eigenvalues.
-*
-* WORK (workspace) COMPLEX array, dimension (N**2)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the test described above. If A E or
-* B E is likely to overflow, then RESULT(1:2) is set to
-* 10 / ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cget54.f b/TESTING/EIG/cget54.f
index e7a437e6..724126b1 100644
--- a/TESTING/EIG/cget54.f
+++ b/TESTING/EIG/cget54.f
@@ -1,9 +1,167 @@
+*> \brief \b CGET54
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
+* LDV, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), S( LDS, * ),
+* $ T( LDT, * ), U( LDU, * ), V( LDV, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET54 checks a generalized decomposition of the form
+*>
+*> A = U*S*V' and B = U*T* V'
+*>
+*> where ' means conjugate transpose and U and V are unitary.
+*>
+*> Specifically,
+*>
+*> RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, SGET54 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The original (unfactored) matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> The original (unfactored) matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX array, dimension (LDS, N)
+*> The factored matrix S.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of S. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDT, N)
+*> The factored matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of T. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (3*N**2)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> The value RESULT, It is currently limited to 1/ulp, to
+*> avoid overflow. Errors are flagged by RESULT=10/ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGET54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
$ LDV, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
@@ -15,76 +173,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CGET54 checks a generalized decomposition of the form
-*
-* A = U*S*V' and B = U*T* V'
-*
-* where ' means conjugate transpose and U and V are unitary.
-*
-* Specifically,
-*
-* RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp )
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, SGET54 does nothing.
-* It must be at least zero.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* The original (unfactored) matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) COMPLEX array, dimension (LDB, N)
-* The original (unfactored) matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* S (input) COMPLEX array, dimension (LDS, N)
-* The factored matrix S.
-*
-* LDS (input) INTEGER
-* The leading dimension of S. It must be at least 1
-* and at least N.
-*
-* T (input) COMPLEX array, dimension (LDT, N)
-* The factored matrix T.
-*
-* LDT (input) INTEGER
-* The leading dimension of T. It must be at least 1
-* and at least N.
-*
-* U (input) COMPLEX array, dimension (LDU, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) COMPLEX array, dimension (LDV, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* WORK (workspace) COMPLEX array, dimension (3*N**2)
-*
-* RESULT (output) REAL
-* The value RESULT, It is currently limited to 1/ulp, to
-* avoid overflow. Errors are flagged by RESULT=10/ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cglmts.f b/TESTING/EIG/cglmts.f
index 84d6b8df..f3595285 100644
--- a/TESTING/EIG/cglmts.f
+++ b/TESTING/EIG/cglmts.f
@@ -1,9 +1,161 @@
+*> \brief \b CGLMTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF,
+* X, U, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, P, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), D( * ), DF( * ), U( * ),
+* $ WORK( LWORK ), X( * )
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGLMTS tests CGGGLM - a subroutine for solving the generalized
+*> linear model problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,M)
+*> The N-by-M matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF. LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,P)
+*> The N-by-P matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (LDB,P)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF. LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension( N )
+*> On input, the left hand side of the GLM.
+*> \endverbatim
+*>
+*> \param[out] DF
+*> \verbatim
+*> DF is COMPLEX array, dimension( N )
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension( M )
+*> solution vector X in the GLM problem.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension( P )
+*> solution vector U in the GLM problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> The test ratio:
+*> norm( d - A*x - B*u )
+*> RESULT = -----------------------------------------
+*> (norm(A)+norm(B))*(norm(x)+norm(u))*EPS
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF,
$ X, U, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, P, N
@@ -15,64 +167,6 @@
$ BF( LDB, * ), D( * ), DF( * ), U( * ),
$ WORK( LWORK ), X( * )
*
-* Purpose
-* =======
-*
-* CGLMTS tests CGGGLM - a subroutine for solving the generalized
-* linear model problem.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,M)
-* The N-by-M matrix A.
-*
-* AF (workspace) COMPLEX array, dimension (LDA,M)
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF. LDA >= max(M,N).
-*
-* B (input) COMPLEX array, dimension (LDB,P)
-* The N-by-P matrix A.
-*
-* BF (workspace) COMPLEX array, dimension (LDB,P)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF. LDB >= max(P,N).
-*
-* D (input) COMPLEX array, dimension( N )
-* On input, the left hand side of the GLM.
-*
-* DF (workspace) COMPLEX array, dimension( N )
-*
-* X (output) COMPLEX array, dimension( M )
-* solution vector X in the GLM problem.
-*
-* U (output) COMPLEX array, dimension( P )
-* solution vector U in the GLM problem.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESULT (output) REAL
-* The test ratio:
-* norm( d - A*x - B*u )
-* RESULT = -----------------------------------------
-* (norm(A)+norm(B))*(norm(x)+norm(u))*EPS
-*
* ====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cgqrts.f b/TESTING/EIG/cgqrts.f
index a367a5da..74573478 100644
--- a/TESTING/EIG/cgqrts.f
+++ b/TESTING/EIG/cgqrts.f
@@ -1,9 +1,187 @@
+*> \brief \b CGQRTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGQRTS( N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
+* BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, P, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), RESULT( 4 )
+* COMPLEX A( LDA, * ), AF( LDA, * ), R( LDA, * ),
+* $ Q( LDA, * ), B( LDB, * ), BF( LDB, * ),
+* $ T( LDB, * ), Z( LDB, * ), BWK( LDB, * ),
+* $ TAUA( * ), TAUB( * ), WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGQRTS tests CGGQRF, which computes the GQR factorization of an
+*> N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,M)
+*> The N-by-M matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by CGGQRF, see CGGQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> The M-by-M unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (LDA,MAX(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, R and Q.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by CGGQRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,P)
+*> On entry, the N-by-P matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (LDB,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by CGGQRF, see CGGQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDB,P)
+*> The P-by-P unitary matrix Z.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDB,max(P,N))
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is COMPLEX array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, Z and T.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is COMPLEX array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGGRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK, LWORK >= max(N,M,P)**2.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(N,M,P))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - Q'*Q ) / ( M*ULP )
+*> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGQRTS( N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
$ BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, P, N
@@ -16,80 +194,6 @@
$ TAUA( * ), TAUB( * ), WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* CGQRTS tests CGGQRF, which computes the GQR factorization of an
-* N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,M)
-* The N-by-M matrix A.
-*
-* AF (output) COMPLEX array, dimension (LDA,N)
-* Details of the GQR factorization of A and B, as returned
-* by CGGQRF, see CGGQRF for further details.
-*
-* Q (output) COMPLEX array, dimension (LDA,N)
-* The M-by-M unitary matrix Q.
-*
-* R (workspace) COMPLEX array, dimension (LDA,MAX(M,N))
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, R and Q.
-* LDA >= max(M,N).
-*
-* TAUA (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by CGGQRF.
-*
-* B (input) COMPLEX array, dimension (LDB,P)
-* On entry, the N-by-P matrix A.
-*
-* BF (output) COMPLEX array, dimension (LDB,N)
-* Details of the GQR factorization of A and B, as returned
-* by CGGQRF, see CGGQRF for further details.
-*
-* Z (output) COMPLEX array, dimension (LDB,P)
-* The P-by-P unitary matrix Z.
-*
-* T (workspace) COMPLEX array, dimension (LDB,max(P,N))
-*
-* BWK (workspace) COMPLEX array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, Z and T.
-* LDB >= max(P,N).
-*
-* TAUB (output) COMPLEX array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGGRQF.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK, LWORK >= max(N,M,P)**2.
-*
-* RWORK (workspace) REAL array, dimension (max(N,M,P))
-*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - Q'*Q ) / ( M*ULP )
-* RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cgrqts.f b/TESTING/EIG/cgrqts.f
index eaf684e8..69004f03 100644
--- a/TESTING/EIG/cgrqts.f
+++ b/TESTING/EIG/cgrqts.f
@@ -1,9 +1,187 @@
+*> \brief \b CGRQTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGRQTS( M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
+* BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, P, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( 4 ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), R( LDA, * ),
+* $ Q( LDA, * ), B( LDB, * ), BF( LDB, * ),
+* $ T( LDB, * ), Z( LDB, * ), BWK( LDB, * ),
+* $ TAUA( * ), TAUB( * ), WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGRQTS tests CGGRQF, which computes the GRQ factorization of an
+*> M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the GRQ factorization of A and B, as returned
+*> by CGGRQF, see CGGRQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> The N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (LDA,MAX(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, R and Q.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGGQRC.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> On entry, the P-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (LDB,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by CGGRQF, see CGGRQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDB,P)
+*> The P-by-P unitary matrix Z.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX array, dimension (LDB,max(P,N))
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is COMPLEX array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, Z and T.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is COMPLEX array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGGRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK, LWORK >= max(M,P,N)**2.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - Q'*Q ) / ( N*ULP )
+*> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGRQTS( M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
$ BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, P, N
@@ -16,80 +194,6 @@
$ TAUA( * ), TAUB( * ), WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* CGRQTS tests CGGRQF, which computes the GRQ factorization of an
-* M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* AF (output) COMPLEX array, dimension (LDA,N)
-* Details of the GRQ factorization of A and B, as returned
-* by CGGRQF, see CGGRQF for further details.
-*
-* Q (output) COMPLEX array, dimension (LDA,N)
-* The N-by-N unitary matrix Q.
-*
-* R (workspace) COMPLEX array, dimension (LDA,MAX(M,N))
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, R and Q.
-* LDA >= max(M,N).
-*
-* TAUA (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGGQRC.
-*
-* B (input) COMPLEX array, dimension (LDB,N)
-* On entry, the P-by-N matrix A.
-*
-* BF (output) COMPLEX array, dimension (LDB,N)
-* Details of the GQR factorization of A and B, as returned
-* by CGGRQF, see CGGRQF for further details.
-*
-* Z (output) REAL array, dimension (LDB,P)
-* The P-by-P unitary matrix Z.
-*
-* T (workspace) COMPLEX array, dimension (LDB,max(P,N))
-*
-* BWK (workspace) COMPLEX array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, Z and T.
-* LDB >= max(P,N).
-*
-* TAUB (output) COMPLEX array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGGRQF.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK, LWORK >= max(M,P,N)**2.
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - Q'*Q ) / ( N*ULP )
-* RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cgsvts.f b/TESTING/EIG/cgsvts.f
index c80495b4..89bcd753 100644
--- a/TESTING/EIG/cgsvts.f
+++ b/TESTING/EIG/cgsvts.f
@@ -1,10 +1,221 @@
+*> \brief \b CGSVTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGSVTS( M, P, N, A, AF, LDA, B, BF, LDB, U, LDU, V,
+* LDV, Q, LDQ, ALPHA, BETA, R, LDR, IWORK, WORK,
+* LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDQ, LDR, LDU, LDV, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL ALPHA( * ), BETA( * ), RESULT( 6 ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), Q( LDQ, * ), R( LDR, * ),
+* $ U( LDU, * ), V( LDV, * ), WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGSVTS tests CGGSVD, which computes the GSVD of an M-by-N matrix A
+*> and a P-by-N matrix B:
+*> U'*A*Q = D1*R and V'*B*Q = D2*R.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,M)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the GSVD of A and B, as returned by CGGSVD,
+*> see CGGSVD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> LDA >= max( 1,M ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,P)
+*> On entry, the P-by-N matrix B.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (LDB,N)
+*> Details of the GSVD of A and B, as returned by CGGSVD,
+*> see CGGSVD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B and BF.
+*> LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX array, dimension(LDU,M)
+*> The M by M unitary matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX array, dimension(LDV,M)
+*> The P by P unitary matrix V.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension(LDQ,N)
+*> The N by N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The generalized singular value pairs of A and B, the
+*> ``diagonal'' matrices D1 and D2 are constructed from
+*> ALPHA and BETA, see subroutine CGGSVD for details.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension(LDQ,N)
+*> The upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDR
+*> \verbatim
+*> LDR is INTEGER
+*> The leading dimension of the array R. LDR >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK,
+*> LWORK >= max(M,P,N)*max(M,P,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(M,P,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (5)
+*> The test ratios:
+*> RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - U'*U ) / ( M*ULP )
+*> RESULT(4) = norm( I - V'*V ) / ( P*ULP )
+*> RESULT(5) = norm( I - Q'*Q ) / ( N*ULP )
+*> RESULT(6) = 0 if ALPHA is in decreasing order;
+*> = ULPINV otherwise.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CGSVTS( M, P, N, A, AF, LDA, B, BF, LDB, U, LDU, V,
$ LDV, Q, LDQ, ALPHA, BETA, R, LDR, IWORK, WORK,
$ LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LDQ, LDR, LDU, LDV, LWORK, M, N, P
@@ -17,97 +228,6 @@
$ U( LDU, * ), V( LDV, * ), WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* CGSVTS tests CGGSVD, which computes the GSVD of an M-by-N matrix A
-* and a P-by-N matrix B:
-* U'*A*Q = D1*R and V'*B*Q = D2*R.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,M)
-* The M-by-N matrix A.
-*
-* AF (output) COMPLEX array, dimension (LDA,N)
-* Details of the GSVD of A and B, as returned by CGGSVD,
-* see CGGSVD for further details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
-* LDA >= max( 1,M ).
-*
-* B (input) COMPLEX array, dimension (LDB,P)
-* On entry, the P-by-N matrix B.
-*
-* BF (output) COMPLEX array, dimension (LDB,N)
-* Details of the GSVD of A and B, as returned by CGGSVD,
-* see CGGSVD for further details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B and BF.
-* LDB >= max(1,P).
-*
-* U (output) COMPLEX array, dimension(LDU,M)
-* The M by M unitary matrix U.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
-*
-* V (output) COMPLEX array, dimension(LDV,M)
-* The P by P unitary matrix V.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P).
-*
-* Q (output) COMPLEX array, dimension(LDQ,N)
-* The N by N unitary matrix Q.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* ALPHA (output) REAL array, dimension (N)
-* BETA (output) REAL array, dimension (N)
-* The generalized singular value pairs of A and B, the
-* ``diagonal'' matrices D1 and D2 are constructed from
-* ALPHA and BETA, see subroutine CGGSVD for details.
-*
-* R (output) COMPLEX array, dimension(LDQ,N)
-* The upper triangular matrix R.
-*
-* LDR (input) INTEGER
-* The leading dimension of the array R. LDR >= max(1,N).
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK,
-* LWORK >= max(M,P,N)*max(M,P,N).
-*
-* RWORK (workspace) REAL array, dimension (max(M,P,N))
-*
-* RESULT (output) REAL array, dimension (5)
-* The test ratios:
-* RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - U'*U ) / ( M*ULP )
-* RESULT(4) = norm( I - V'*V ) / ( P*ULP )
-* RESULT(5) = norm( I - Q'*Q ) / ( N*ULP )
-* RESULT(6) = 0 if ALPHA is in decreasing order;
-* = ULPINV otherwise.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/chbt21.f b/TESTING/EIG/chbt21.f
index 35683aee..34fc099e 100644
--- a/TESTING/EIG/chbt21.f
+++ b/TESTING/EIG/chbt21.f
@@ -1,91 +1,170 @@
- SUBROUTINE CHBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER KA, KS, LDA, LDU, N
-* ..
-* .. Array Arguments ..
- REAL D( * ), E( * ), RESULT( 2 ), RWORK( * )
- COMPLEX A( LDA, * ), U( LDU, * ), WORK( * )
-* ..
-*
+*> \brief \b CHBT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KA, KS, LDA, LDU, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), RESULT( 2 ), RWORK( * )
+* COMPLEX A( LDA, * ), U( LDU, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CHBT21 generally checks a decomposition of the form
-*
-* A = U S U*
-*
-* where * means conjugate transpose, A is hermitian banded, U is
-* unitary, and S is diagonal (if KS=0) or symmetric
-* tridiagonal (if KS=1).
-*
-* Specifically:
-*
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHBT21 generally checks a decomposition of the form
+*>
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian banded, U is
+*> unitary, and S is diagonal (if KS=0) or symmetric
+*> tridiagonal (if KS=1).
+*>
+*> Specifically:
+*>
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, CHBT21 does nothing.
-* It must be at least zero.
-*
-* KA (input) INTEGER
-* The bandwidth of the matrix A. It must be at least zero. If
-* it is larger than N-1, then max( 0, N-1 ) will be used.
-*
-* KS (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* The original (unfactored) matrix. It is assumed to be
-* hermitian, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least min( KA, N-1 ).
-*
-* D (input) REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, CHBT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The bandwidth of the matrix A. It must be at least zero. If
+*> it is larger than N-1, then max( 0, N-1 ) will be used.
+*> \endverbatim
+*>
+*> \param[in] KS
+*> \verbatim
+*> KS is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The original (unfactored) matrix. It is assumed to be
+*> hermitian, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least min( KA, N-1 ).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KS=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU, N)
+*> The unitary matrix in the decomposition, expressed as a
+*> dense matrix (i.e., not as a product of Householder
+*> transformations, Givens transformations, etc.)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) REAL array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KS=0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (input) COMPLEX array, dimension (LDU, N)
-* The unitary matrix in the decomposition, expressed as a
-* dense matrix (i.e., not as a product of Householder
-* transformations, Givens transformations, etc.)
+*> \date November 2011
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
+*> \ingroup complex_eig
*
-* WORK (workspace) COMPLEX array, dimension (N**2)
+* =====================================================================
+ SUBROUTINE CHBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER KA, KS, LDA, LDU, N
+* ..
+* .. Array Arguments ..
+ REAL D( * ), E( * ), RESULT( 2 ), RWORK( * )
+ COMPLEX A( LDA, * ), U( LDU, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/chet21.f b/TESTING/EIG/chet21.f
index e1c6c120..11f3fbab 100644
--- a/TESTING/EIG/chet21.f
+++ b/TESTING/EIG/chet21.f
@@ -1,9 +1,224 @@
+*> \brief \b CHET21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
+* LDV, TAU, WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDA, LDU, LDV, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), RESULT( 2 ), RWORK( * )
+* COMPLEX A( LDA, * ), TAU( * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHET21 generally checks a decomposition of the form
+*>
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian, U is unitary, and
+*> S is diagonal (if KBAND=0) or (real) symmetric tridiagonal (if
+*> KBAND=1).
+*>
+*> If ITYPE=1, then U is represented as a dense matrix; otherwise U is
+*> expressed as a product of Householder transformations, whose vectors
+*> are stored in the array "V" and whose scaling constants are in "TAU".
+*> We shall use the letter "V" to refer to the product of Householder
+*> transformations (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT(1) = | I - UV* | / ( n ulp )
+*>
+*> For ITYPE > 1, the transformation U is expressed as a product
+*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)C> and each
+*> vector v(j) has its first j elements 0 and the remaining n-j elements
+*> stored in V(j+1:n,j).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense unitary matrix:
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> 2: U expressed as a product V of Housholder transformations:
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> \endverbatim
+*> \verbatim
+*> 3: U expressed both as a dense unitary matrix and
+*> as a product of Housholder transformations:
+*> RESULT(1) = | I - UV* | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, CHET21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The original (unfactored) matrix. It is assumed to be
+*> hermitian, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KBAND=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the unitary matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV, N)
+*> If ITYPE=2 or 3, the columns of this array contain the
+*> Householder vectors used to describe the unitary matrix
+*> in the decomposition. If UPLO='L', then the vectors are in
+*> the lower triangle, if UPLO='U', then in the upper
+*> triangle.
+*> *NOTE* If ITYPE=2 or 3, V is modified and restored. The
+*> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
+*> is set to one, and later reset to its original value, during
+*> the course of the calculation.
+*> If ITYPE=1, then it is neither referenced nor modified.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)* in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if ITYPE=1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
$ LDV, TAU, WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,131 +230,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHET21 generally checks a decomposition of the form
-*
-* A = U S U*
-*
-* where * means conjugate transpose, A is hermitian, U is unitary, and
-* S is diagonal (if KBAND=0) or (real) symmetric tridiagonal (if
-* KBAND=1).
-*
-* If ITYPE=1, then U is represented as a dense matrix; otherwise U is
-* expressed as a product of Householder transformations, whose vectors
-* are stored in the array "V" and whose scaling constants are in "TAU".
-* We shall use the letter "V" to refer to the product of Householder
-* transformations (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT(1) = | A - V S V* | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT(1) = | I - UV* | / ( n ulp )
-*
-* For ITYPE > 1, the transformation U is expressed as a product
-* V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)* and each
-* vector v(j) has its first j elements 0 and the remaining n-j elements
-* stored in V(j+1:n,j).
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense unitary matrix:
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
-*
-* 2: U expressed as a product V of Housholder transformations:
-* RESULT(1) = | A - V S V* | / ( |A| n ulp )
-*
-* 3: U expressed both as a dense unitary matrix and
-* as a product of Housholder transformations:
-* RESULT(1) = | I - UV* | / ( n ulp )
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, CHET21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* The original (unfactored) matrix. It is assumed to be
-* hermitian, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-*
-* E (input) REAL array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KBAND=0.
-*
-* U (input) COMPLEX array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the unitary matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) COMPLEX array, dimension (LDV, N)
-* If ITYPE=2 or 3, the columns of this array contain the
-* Householder vectors used to describe the unitary matrix
-* in the decomposition. If UPLO='L', then the vectors are in
-* the lower triangle, if UPLO='U', then in the upper
-* triangle.
-* *NOTE* If ITYPE=2 or 3, V is modified and restored. The
-* subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
-* is set to one, and later reset to its original value, during
-* the course of the calculation.
-* If ITYPE=1, then it is neither referenced nor modified.
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* TAU (input) COMPLEX array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)* in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N**2)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if ITYPE=1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/chet22.f b/TESTING/EIG/chet22.f
index 70a31af5..db8a768b 100644
--- a/TESTING/EIG/chet22.f
+++ b/TESTING/EIG/chet22.f
@@ -1,9 +1,186 @@
+*> \brief \b CHET22
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHET22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
+* V, LDV, TAU, WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDA, LDU, LDV, M, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), RESULT( 2 ), RWORK( * )
+* COMPLEX A( LDA, * ), TAU( * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHET22 generally checks a decomposition of the form
+*>
+*> A U = U S
+*>
+*> where A is complex Hermitian, the columns of U are orthonormal,
+*> and S is diagonal (if KBAND=0) or symmetric tridiagonal (if
+*> KBAND=1). If ITYPE=1, then U is represented as a dense matrix,
+*> otherwise the U is expressed as a product of Householder
+*> transformations, whose vectors are stored in the array "V" and
+*> whose scaling constants are in "TAU"; we shall use the letter
+*> "V" to refer to the product of Householder transformations
+*> (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | U' A U - S | / ( |A| m ulp ) *andC> RESULT(2) = | I - U'U | / ( m ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> ITYPE INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense orthogonal matrix:
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> UPLO CHARACTER
+*> If UPLO='U', the upper triangle of A will be used and the
+*> (strictly) lower triangle will not be referenced. If
+*> UPLO='L', the lower triangle of A will be used and the
+*> (strictly) upper triangle will not be referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> N INTEGER
+*> The size of the matrix. If it is zero, CHET22 does nothing.
+*> It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> M INTEGER
+*> The number of columns of U. If it is zero, CHET22 does
+*> nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> KBAND INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A COMPLEX array, dimension (LDA , N)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> E REAL array, dimension (N)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc.
+*> Not referenced if KBAND=0.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> U COMPLEX array, dimension (LDU, N)
+*> If ITYPE=1, this contains the orthogonal matrix in
+*> the decomposition, expressed as a dense matrix.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDU INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> V COMPLEX array, dimension (LDV, N)
+*> If ITYPE=2 or 3, the lower triangle of this array contains
+*> the Householder vectors used to describe the orthogonal
+*> matrix in the decomposition. If ITYPE=1, then it is not
+*> referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDV INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> TAU COMPLEX array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)' in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> WORK COMPLEX array, dimension (2*N**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RWORK REAL array, dimension (N)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if LDU is at least N.
+*> Modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CHET22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
$ V, LDV, TAU, WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,124 +192,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHET22 generally checks a decomposition of the form
-*
-* A U = U S
-*
-* where A is complex Hermitian, the columns of U are orthonormal,
-* and S is diagonal (if KBAND=0) or symmetric tridiagonal (if
-* KBAND=1). If ITYPE=1, then U is represented as a dense matrix,
-* otherwise the U is expressed as a product of Householder
-* transformations, whose vectors are stored in the array "V" and
-* whose scaling constants are in "TAU"; we shall use the letter
-* "V" to refer to the product of Householder transformations
-* (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | U' A U - S | / ( |A| m ulp ) *and*
-* RESULT(2) = | I - U'U | / ( m ulp )
-*
-* Arguments
-* =========
-*
-* ITYPE INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense orthogonal matrix:
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* UPLO CHARACTER
-* If UPLO='U', the upper triangle of A will be used and the
-* (strictly) lower triangle will not be referenced. If
-* UPLO='L', the lower triangle of A will be used and the
-* (strictly) upper triangle will not be referenced.
-* Not modified.
-*
-* N INTEGER
-* The size of the matrix. If it is zero, CHET22 does nothing.
-* It must be at least zero.
-* Not modified.
-*
-* M INTEGER
-* The number of columns of U. If it is zero, CHET22 does
-* nothing. It must be at least zero.
-* Not modified.
-*
-* KBAND INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-* Not modified.
-*
-* A COMPLEX array, dimension (LDA , N)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-* Not modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-* Not modified.
-*
-* D REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-* Not modified.
-*
-* E REAL array, dimension (N)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc.
-* Not referenced if KBAND=0.
-* Not modified.
-*
-* U COMPLEX array, dimension (LDU, N)
-* If ITYPE=1, this contains the orthogonal matrix in
-* the decomposition, expressed as a dense matrix.
-* Not modified.
-*
-* LDU INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-* Not modified.
-*
-* V COMPLEX array, dimension (LDV, N)
-* If ITYPE=2 or 3, the lower triangle of this array contains
-* the Householder vectors used to describe the orthogonal
-* matrix in the decomposition. If ITYPE=1, then it is not
-* referenced.
-* Not modified.
-*
-* LDV INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-* Not modified.
-*
-* TAU COMPLEX array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)' in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-* Not modified.
-*
-* WORK COMPLEX array, dimension (2*N**2)
-* Workspace.
-* Modified.
-*
-* RWORK REAL array, dimension (N)
-* Workspace.
-* Modified.
-*
-* RESULT REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if LDU is at least N.
-* Modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/chkxer.f b/TESTING/EIG/chkxer.f
index 19caa75a..0a222273 100644
--- a/TESTING/EIG/chkxer.f
+++ b/TESTING/EIG/chkxer.f
@@ -1,12 +1,68 @@
- SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
+*> \brief \b CHKXER
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
+*
+* .. Scalar Arguments ..
+* LOGICAL LERR, OK
+* CHARACTER*(*) SRNAMT
+* INTEGER INFOT, NOUT
+* ..
+* .. Intrinsic Functions ..
+* INTRINSIC LEN_TRIM
+* ..
+* .. Executable Statements ..
+* IF( .NOT.LERR ) THEN
+* WRITE( NOUT, FMT = 9999 )INFOT,
+* $ SRNAMT( 1:LEN_TRIM( SRNAMT ) )
+* OK = .FALSE.
+* END IF
+* LERR = .FALSE.
+* RETURN
+*
+* 9999 FORMAT( ' *** Illegal value of parameter number ', I2,
+* $ ' not detected by ', A6, ' ***' )
+*
+* End of CHKXER.
+*
+* END
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>\endverbatim
*
-* Tests whether XERBLA has detected an error when it should.
+* Arguments
+* =========
*
-* Auxiliary routine for test program for Level 2 Blas.
*
-* -- Written on 10-August-1987.
-* Richard Hanson, Sandia National Labs.
-* Jeremy Du Croz, NAG Central Office.
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
+ SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LERR, OK
diff --git a/TESTING/EIG/chpt21.f b/TESTING/EIG/chpt21.f
index 9610bfe3..337af63f 100644
--- a/TESTING/EIG/chpt21.f
+++ b/TESTING/EIG/chpt21.f
@@ -1,9 +1,236 @@
+*> \brief \b CHPT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
+* TAU, WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), RESULT( 2 ), RWORK( * )
+* COMPLEX AP( * ), TAU( * ), U( LDU, * ), VP( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPT21 generally checks a decomposition of the form
+*>
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian, U is
+*> unitary, and S is diagonal (if KBAND=0) or (real) symmetric
+*> tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as
+*> a dense matrix, otherwise the U is expressed as a product of
+*> Householder transformations, whose vectors are stored in the
+*> array "V" and whose scaling constants are in "TAU"; we shall
+*> use the letter "V" to refer to the product of Householder
+*> transformations (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT(1) = | I - UV* | / ( n ulp )
+*>
+*> Packed storage means that, for example, if UPLO='U', then the columns
+*> of the upper triangle of A are stored one after another, so that
+*> A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if
+*> UPLO='L', then the columns of the lower triangle of A are stored one
+*> after another in AP, so that A(j+1,j+1) immediately follows A(n,j)
+*> in the array AP. This means that A(i,j) is stored in:
+*>
+*> AP( i + j*(j-1)/2 ) if UPLO='U'
+*>
+*> AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L'
+*>
+*> The array VP bears the same relation to the matrix V that A does to
+*> AP.
+*>
+*> For ITYPE > 1, the transformation U is expressed as a product
+*> of Householder transformations:
+*>
+*> If UPLO='U', then V = H(n-1)...H(1), where
+*>
+*> H(j) = I - tau(j) v(j) v(j)C>
+*> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
+*> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
+*> the j-th element is 1, and the last n-j elements are 0.
+*>
+*> If UPLO='L', then V = H(1)...H(n-1), where
+*>
+*> H(j) = I - tau(j) v(j) v(j)C>
+*> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
+*> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
+*> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense unitary matrix:
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> 2: U expressed as a product V of Housholder transformations:
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> \endverbatim
+*> \verbatim
+*> 3: U expressed both as a dense unitary matrix and
+*> as a product of Housholder transformations:
+*> RESULT(1) = | I - UV* | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, CHPT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The original (unfactored) matrix. It is assumed to be
+*> hermitian, and contains the columns of just the upper
+*> triangle (UPLO='U') or only the lower triangle (UPLO='L'),
+*> packed one after another.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KBAND=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the unitary matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] VP
+*> \verbatim
+*> VP is REAL array, dimension (N*(N+1)/2)
+*> If ITYPE=2 or 3, the columns of this array contain the
+*> Householder vectors used to describe the unitary matrix
+*> in the decomposition, as described in purpose.
+*> *NOTE* If ITYPE=2 or 3, V is modified and restored. The
+*> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
+*> is set to one, and later reset to its original value, during
+*> the course of the calculation.
+*> If ITYPE=1, then it is neither referenced nor modified.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)* in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N**2)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if ITYPE=1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
$ TAU, WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,151 +242,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CHPT21 generally checks a decomposition of the form
-*
-* A = U S U*
-*
-* where * means conjugate transpose, A is hermitian, U is
-* unitary, and S is diagonal (if KBAND=0) or (real) symmetric
-* tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as
-* a dense matrix, otherwise the U is expressed as a product of
-* Householder transformations, whose vectors are stored in the
-* array "V" and whose scaling constants are in "TAU"; we shall
-* use the letter "V" to refer to the product of Householder
-* transformations (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT(1) = | A - V S V* | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT(1) = | I - UV* | / ( n ulp )
-*
-* Packed storage means that, for example, if UPLO='U', then the columns
-* of the upper triangle of A are stored one after another, so that
-* A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if
-* UPLO='L', then the columns of the lower triangle of A are stored one
-* after another in AP, so that A(j+1,j+1) immediately follows A(n,j)
-* in the array AP. This means that A(i,j) is stored in:
-*
-* AP( i + j*(j-1)/2 ) if UPLO='U'
-*
-* AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L'
-*
-* The array VP bears the same relation to the matrix V that A does to
-* AP.
-*
-* For ITYPE > 1, the transformation U is expressed as a product
-* of Householder transformations:
-*
-* If UPLO='U', then V = H(n-1)...H(1), where
-*
-* H(j) = I - tau(j) v(j) v(j)*
-*
-* and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
-* (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
-* the j-th element is 1, and the last n-j elements are 0.
-*
-* If UPLO='L', then V = H(1)...H(n-1), where
-*
-* H(j) = I - tau(j) v(j) v(j)*
-*
-* and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
-* (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
-* in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense unitary matrix:
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
-*
-* 2: U expressed as a product V of Housholder transformations:
-* RESULT(1) = | A - V S V* | / ( |A| n ulp )
-*
-* 3: U expressed both as a dense unitary matrix and
-* as a product of Housholder transformations:
-* RESULT(1) = | I - UV* | / ( n ulp )
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, CHPT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original (unfactored) matrix. It is assumed to be
-* hermitian, and contains the columns of just the upper
-* triangle (UPLO='U') or only the lower triangle (UPLO='L'),
-* packed one after another.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-*
-* E (input) REAL array, dimension (N)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KBAND=0.
-*
-* U (input) COMPLEX array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the unitary matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* VP (input) REAL array, dimension (N*(N+1)/2)
-* If ITYPE=2 or 3, the columns of this array contain the
-* Householder vectors used to describe the unitary matrix
-* in the decomposition, as described in purpose.
-* *NOTE* If ITYPE=2 or 3, V is modified and restored. The
-* subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
-* is set to one, and later reset to its original value, during
-* the course of the calculation.
-* If ITYPE=1, then it is neither referenced nor modified.
-*
-* TAU (input) COMPLEX array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)* in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-*
-* WORK (workspace) COMPLEX array, dimension (N**2)
-* Workspace.
-*
-* RWORK (workspace) REAL array, dimension (N)
-* Workspace.
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if ITYPE=1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/chst01.f b/TESTING/EIG/chst01.f
index 037e8839..ad373917 100644
--- a/TESTING/EIG/chst01.f
+++ b/TESTING/EIG/chst01.f
@@ -1,77 +1,161 @@
- SUBROUTINE CHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
- $ LWORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( 2 ), RWORK( * )
- COMPLEX A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b CHST01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
+* LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( 2 ), RWORK( * )
+* COMPLEX A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CHST01 tests the reduction of a general matrix A to upper Hessenberg
-* form: A = Q*H*Q'. Two test ratios are computed;
-*
-* RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
-*
-* The matrix Q is assumed to be given explicitly as it would be
-* following CGEHRD + CUNGHR.
-*
-* In this version, ILO and IHI are not used, but they could be used
-* to save some work if this is desired.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHST01 tests the reduction of a general matrix A to upper Hessenberg
+*> form: A = Q*H*Q'. Two test ratios are computed;
+*>
+*> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+*>
+*> The matrix Q is assumed to be given explicitly as it would be
+*> following CGEHRD + CUNGHR.
+*>
+*> In this version, ILO and IHI are not used, but they could be used
+*> to save some work if this is desired.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* A is assumed to be upper triangular in rows and columns
-* 1:ILO-1 and IHI+1:N, so Q differs from the identity only in
-* rows and columns ILO+1:IHI.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original n by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* H (input) COMPLEX array, dimension (LDH,N)
-* The upper Hessenberg matrix H from the reduction A = Q*H*Q'
-* as computed by CGEHRD. H is assumed to be zero below the
-* first subdiagonal.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> \endverbatim
+*> \verbatim
+*> A is assumed to be upper triangular in rows and columns
+*> 1:ILO-1 and IHI+1:N, so Q differs from the identity only in
+*> rows and columns ILO+1:IHI.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original n by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is COMPLEX array, dimension (LDH,N)
+*> The upper Hessenberg matrix H from the reduction A = Q*H*Q'
+*> as computed by CGEHRD. H is assumed to be zero below the
+*> first subdiagonal.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDQ,N)
+*> The orthogonal matrix Q from the reduction A = Q*H*Q' as
+*> computed by CGEHRD + CUNGHR.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= 2*N*N.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Q (input) COMPLEX array, dimension (LDQ,N)
-* The orthogonal matrix Q from the reduction A = Q*H*Q' as
-* computed by CGEHRD + CUNGHR.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_eig
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= 2*N*N.
+* =====================================================================
+ SUBROUTINE CHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
+ $ LWORK, RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( 2 ), RWORK( * )
+ COMPLEX A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/clarfy.f b/TESTING/EIG/clarfy.f
index e696876a..29a0e8f9 100644
--- a/TESTING/EIG/clarfy.f
+++ b/TESTING/EIG/clarfy.f
@@ -1,63 +1,128 @@
- SUBROUTINE CLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INCV, LDC, N
- COMPLEX TAU
-* ..
-* .. Array Arguments ..
- COMPLEX C( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b CLARFY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCV, LDC, N
+* COMPLEX TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX C( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLARFY applies an elementary reflector, or Householder matrix, H,
-* to an n x n Hermitian matrix C, from both the left and the right.
-*
-* H is represented in the form
-*
-* H = I - tau * v * v'
-*
-* where tau is a scalar and v is a vector.
-*
-* If tau is zero, then H is taken to be the unit matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARFY applies an elementary reflector, or Householder matrix, H,
+*> to an n x n Hermitian matrix C, from both the left and the right.
+*>
+*> H is represented in the form
+*>
+*> H = I - tau * v * v'
+*>
+*> where tau is a scalar and v is a vector.
+*>
+*> If tau is zero, then H is taken to be the unit matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix C is stored.
-* = 'U': Upper triangle
-* = 'L': Lower triangle
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix C. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix C is stored.
+*> = 'U': Upper triangle
+*> = 'L': Lower triangle
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension
+*> (1 + (N-1)*abs(INCV))
+*> The vector v as described above.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between successive elements of v. INCV must
+*> not be zero.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX
+*> The value tau as described above.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, N)
+*> On entry, the matrix C.
+*> On exit, C is overwritten by H * C * H'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* V (input) COMPLEX array, dimension
-* (1 + (N-1)*abs(INCV))
-* The vector v as described above.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCV (input) INTEGER
-* The increment between successive elements of v. INCV must
-* not be zero.
+*> \date November 2011
*
-* TAU (input) COMPLEX
-* The value tau as described above.
+*> \ingroup complex_eig
*
-* C (input/output) COMPLEX array, dimension (LDC, N)
-* On entry, the matrix C.
-* On exit, C is overwritten by H * C * H'.
+* =====================================================================
+ SUBROUTINE CLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max( 1, N ).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) COMPLEX array, dimension (N)
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INCV, LDC, N
+ COMPLEX TAU
+* ..
+* .. Array Arguments ..
+ COMPLEX C( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/clarhs.f b/TESTING/EIG/clarhs.f
index 712c90d2..f861dc4e 100644
--- a/TESTING/EIG/clarhs.f
+++ b/TESTING/EIG/clarhs.f
@@ -1,9 +1,222 @@
+*> \brief \b CLARHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
+* A, LDA, X, LDX, B, LDB, ISEED, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, UPLO, XTYPE
+* CHARACTER*3 PATH
+* INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARHS chooses a set of NRHS random solution vectors and sets
+*> up the right hand sides for the linear system
+*> op( A ) * X = B,
+*> where op( A ) may be A, A**T (transpose of A), or A**H (conjugate
+*> transpose of A).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The type of the complex matrix A. PATH may be given in any
+*> combination of upper and lower case. Valid paths include
+*> xGE: General m x n matrix
+*> xGB: General banded matrix
+*> xPO: Hermitian positive definite, 2-D storage
+*> xPP: Hermitian positive definite packed
+*> xPB: Hermitian positive definite banded
+*> xHE: Hermitian indefinite, 2-D storage
+*> xHP: Hermitian indefinite packed
+*> xHB: Hermitian indefinite banded
+*> xSY: Symmetric indefinite, 2-D storage
+*> xSP: Symmetric indefinite packed
+*> xSB: Symmetric indefinite banded
+*> xTR: Triangular
+*> xTP: Triangular packed
+*> xTB: Triangular banded
+*> xQR: General m x n matrix
+*> xLQ: General m x n matrix
+*> xQL: General m x n matrix
+*> xRQ: General m x n matrix
+*> where the leading character indicates the precision.
+*> \endverbatim
+*>
+*> \param[in] XTYPE
+*> \verbatim
+*> XTYPE is CHARACTER*1
+*> Specifies how the exact solution X will be determined:
+*> = 'N': New solution; generate a random X.
+*> = 'C': Computed; use value of X on entry.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Used only if A is symmetric or triangular; specifies whether
+*> the upper or lower triangular part of the matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Used only if A is nonsymmetric; specifies the operation
+*> applied to the matrix A.
+*> = 'N': B := A * X
+*> = 'T': B := A**T * X
+*> = 'C': B := A**H * X
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Used only if A is a band matrix; specifies the number of
+*> subdiagonals of A if A is a general band matrix or if A is
+*> symmetric or triangular and UPLO = 'L'; specifies the number
+*> of superdiagonals of A if A is symmetric or triangular and
+*> UPLO = 'U'. 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Used only if A is a general band matrix or if A is
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xGB, specifies the number of superdiagonals of A,
+*> and 0 <= KU <= N-1.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xTR, xTP, or xTB, specifies whether or not the
+*> matrix has unit diagonal:
+*> = 1: matrix has non-unit diagonal (default)
+*> = 2: matrix has unit diagonal
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors in the system A*X = B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The test matrix whose type is given by PATH.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If PATH = xGB, LDA >= KL+KU+1.
+*> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
+*> Otherwise, LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is or output) COMPLEX array, dimension (LDX,NRHS)
+*> On entry, if XTYPE = 'C' (for 'Computed'), then X contains
+*> the exact solution to the system of linear equations.
+*> On exit, if XTYPE = 'N' (for 'New'), then X is initialized
+*> with random values.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vector(s) for the system of equations,
+*> computed from B = op(A) * X, where op(A) is determined by
+*> TRANS.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. If TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> CLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
$ A, LDA, X, LDX, B, LDB, ISEED, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS, UPLO, XTYPE
@@ -15,123 +228,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CLARHS chooses a set of NRHS random solution vectors and sets
-* up the right hand sides for the linear system
-* op( A ) * X = B,
-* where op( A ) may be A, A**T (transpose of A), or A**H (conjugate
-* transpose of A).
-*
-* Arguments
-* =========
-*
-* PATH (input) CHARACTER*3
-* The type of the complex matrix A. PATH may be given in any
-* combination of upper and lower case. Valid paths include
-* xGE: General m x n matrix
-* xGB: General banded matrix
-* xPO: Hermitian positive definite, 2-D storage
-* xPP: Hermitian positive definite packed
-* xPB: Hermitian positive definite banded
-* xHE: Hermitian indefinite, 2-D storage
-* xHP: Hermitian indefinite packed
-* xHB: Hermitian indefinite banded
-* xSY: Symmetric indefinite, 2-D storage
-* xSP: Symmetric indefinite packed
-* xSB: Symmetric indefinite banded
-* xTR: Triangular
-* xTP: Triangular packed
-* xTB: Triangular banded
-* xQR: General m x n matrix
-* xLQ: General m x n matrix
-* xQL: General m x n matrix
-* xRQ: General m x n matrix
-* where the leading character indicates the precision.
-*
-* XTYPE (input) CHARACTER*1
-* Specifies how the exact solution X will be determined:
-* = 'N': New solution; generate a random X.
-* = 'C': Computed; use value of X on entry.
-*
-* UPLO (input) CHARACTER*1
-* Used only if A is symmetric or triangular; specifies whether
-* the upper or lower triangular part of the matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Used only if A is nonsymmetric; specifies the operation
-* applied to the matrix A.
-* = 'N': B := A * X
-* = 'T': B := A**T * X
-* = 'C': B := A**H * X
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* Used only if A is a band matrix; specifies the number of
-* subdiagonals of A if A is a general band matrix or if A is
-* symmetric or triangular and UPLO = 'L'; specifies the number
-* of superdiagonals of A if A is symmetric or triangular and
-* UPLO = 'U'. 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* Used only if A is a general band matrix or if A is
-* triangular.
-*
-* If PATH = xGB, specifies the number of superdiagonals of A,
-* and 0 <= KU <= N-1.
-*
-* If PATH = xTR, xTP, or xTB, specifies whether or not the
-* matrix has unit diagonal:
-* = 1: matrix has non-unit diagonal (default)
-* = 2: matrix has unit diagonal
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors in the system A*X = B.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The test matrix whose type is given by PATH.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If PATH = xGB, LDA >= KL+KU+1.
-* If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
-* Otherwise, LDA >= max(1,M).
-*
-* X (input or output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, if XTYPE = 'C' (for 'Computed'), then X contains
-* the exact solution to the system of linear equations.
-* On exit, if XTYPE = 'N' (for 'New'), then X is initialized
-* with random values.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
-*
-* B (output) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vector(s) for the system of equations,
-* computed from B = op(A) * X, where op(A) is determined by
-* TRANS.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. If TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* CLATMS). Modified on exit.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/clatm4.f b/TESTING/EIG/clatm4.f
index c3e4cb2c..17ee2dc9 100644
--- a/TESTING/EIG/clatm4.f
+++ b/TESTING/EIG/clatm4.f
@@ -1,9 +1,184 @@
+*> \brief \b CLATM4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATM4( ITYPE, N, NZ1, NZ2, RSIGN, AMAGN, RCOND,
+* TRIANG, IDIST, ISEED, A, LDA )
+*
+* .. Scalar Arguments ..
+* LOGICAL RSIGN
+* INTEGER IDIST, ITYPE, LDA, N, NZ1, NZ2
+* REAL AMAGN, RCOND, TRIANG
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATM4 generates basic square matrices, which may later be
+*> multiplied by others in order to produce test matrices. It is
+*> intended mainly to be used to test the generalized eigenvalue
+*> routines.
+*>
+*> It first generates the diagonal and (possibly) subdiagonal,
+*> according to the value of ITYPE, NZ1, NZ2, RSIGN, AMAGN, and RCOND.
+*> It then fills in the upper triangle with random numbers, if TRIANG is
+*> non-zero.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> The "type" of matrix on the diagonal and sub-diagonal.
+*> If ITYPE < 0, then type abs(ITYPE) is generated and then
+*> swapped end for end (A(I,J) := A'(N-J,N-I).) See also
+*> the description of AMAGN and RSIGN.
+*> \endverbatim
+*> \verbatim
+*> Special types:
+*> = 0: the zero matrix.
+*> = 1: the identity.
+*> = 2: a transposed Jordan block.
+*> = 3: If N is odd, then a k+1 x k+1 transposed Jordan block
+*> followed by a k x k identity block, where k=(N-1)/2.
+*> If N is even, then k=(N-2)/2, and a zero diagonal entry
+*> is tacked onto the end.
+*> \endverbatim
+*> \verbatim
+*> Diagonal types. The diagonal consists of NZ1 zeros, then
+*> k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE
+*> specifies the nonzero diagonal entries as follows:
+*> = 4: 1, ..., k
+*> = 5: 1, RCOND, ..., RCOND
+*> = 6: 1, ..., 1, RCOND
+*> = 7: 1, a, a^2, ..., a^(k-1)=RCOND
+*> = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND
+*> = 9: random numbers chosen from (RCOND,1)
+*> = 10: random numbers with distribution IDIST (see CLARND.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] NZ1
+*> \verbatim
+*> NZ1 is INTEGER
+*> If abs(ITYPE) > 3, then the first NZ1 diagonal entries will
+*> be zero.
+*> \endverbatim
+*>
+*> \param[in] NZ2
+*> \verbatim
+*> NZ2 is INTEGER
+*> If abs(ITYPE) > 3, then the last NZ2 diagonal entries will
+*> be zero.
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is LOGICAL
+*> = .TRUE.: The diagonal and subdiagonal entries will be
+*> multiplied by random numbers of magnitude 1.
+*> = .FALSE.: The diagonal and subdiagonal entries will be
+*> left as they are (usually non-negative real.)
+*> \endverbatim
+*>
+*> \param[in] AMAGN
+*> \verbatim
+*> AMAGN is REAL
+*> The diagonal and subdiagonal entries will be multiplied by
+*> AMAGN.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> If abs(ITYPE) > 4, then the smallest diagonal entry will be
+*> RCOND. RCOND must be between 0 and 1.
+*> \endverbatim
+*>
+*> \param[in] TRIANG
+*> \verbatim
+*> TRIANG is REAL
+*> The entries above the diagonal will be random numbers with
+*> magnitude bounded by TRIANG (i.e., random numbers multiplied
+*> by TRIANG.)
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate a random matrix .
+*> = 1: real and imaginary parts each UNIFORM( 0, 1 )
+*> = 2: real and imaginary parts each UNIFORM( -1, 1 )
+*> = 3: real and imaginary parts each NORMAL( 0, 1 )
+*> = 4: complex number uniform in DISK( 0, 1 )
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The values of ISEED are changed on exit, and can
+*> be used in the next call to CLATM4 to continue the same
+*> random number sequence.
+*> Note: ISEED(4) should be odd, for the random number generator
+*> used at present.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> Array to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A. Must be at least 1 and at least N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CLATM4( ITYPE, N, NZ1, NZ2, RSIGN, AMAGN, RCOND,
$ TRIANG, IDIST, ISEED, A, LDA )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL RSIGN
@@ -15,100 +190,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CLATM4 generates basic square matrices, which may later be
-* multiplied by others in order to produce test matrices. It is
-* intended mainly to be used to test the generalized eigenvalue
-* routines.
-*
-* It first generates the diagonal and (possibly) subdiagonal,
-* according to the value of ITYPE, NZ1, NZ2, RSIGN, AMAGN, and RCOND.
-* It then fills in the upper triangle with random numbers, if TRIANG is
-* non-zero.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* The "type" of matrix on the diagonal and sub-diagonal.
-* If ITYPE < 0, then type abs(ITYPE) is generated and then
-* swapped end for end (A(I,J) := A'(N-J,N-I).) See also
-* the description of AMAGN and RSIGN.
-*
-* Special types:
-* = 0: the zero matrix.
-* = 1: the identity.
-* = 2: a transposed Jordan block.
-* = 3: If N is odd, then a k+1 x k+1 transposed Jordan block
-* followed by a k x k identity block, where k=(N-1)/2.
-* If N is even, then k=(N-2)/2, and a zero diagonal entry
-* is tacked onto the end.
-*
-* Diagonal types. The diagonal consists of NZ1 zeros, then
-* k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE
-* specifies the nonzero diagonal entries as follows:
-* = 4: 1, ..., k
-* = 5: 1, RCOND, ..., RCOND
-* = 6: 1, ..., 1, RCOND
-* = 7: 1, a, a^2, ..., a^(k-1)=RCOND
-* = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND
-* = 9: random numbers chosen from (RCOND,1)
-* = 10: random numbers with distribution IDIST (see CLARND.)
-*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* NZ1 (input) INTEGER
-* If abs(ITYPE) > 3, then the first NZ1 diagonal entries will
-* be zero.
-*
-* NZ2 (input) INTEGER
-* If abs(ITYPE) > 3, then the last NZ2 diagonal entries will
-* be zero.
-*
-* RSIGN (input) LOGICAL
-* = .TRUE.: The diagonal and subdiagonal entries will be
-* multiplied by random numbers of magnitude 1.
-* = .FALSE.: The diagonal and subdiagonal entries will be
-* left as they are (usually non-negative real.)
-*
-* AMAGN (input) REAL
-* The diagonal and subdiagonal entries will be multiplied by
-* AMAGN.
-*
-* RCOND (input) REAL
-* If abs(ITYPE) > 4, then the smallest diagonal entry will be
-* RCOND. RCOND must be between 0 and 1.
-*
-* TRIANG (input) REAL
-* The entries above the diagonal will be random numbers with
-* magnitude bounded by TRIANG (i.e., random numbers multiplied
-* by TRIANG.)
-*
-* IDIST (input) INTEGER
-* On entry, DIST specifies the type of distribution to be used
-* to generate a random matrix .
-* = 1: real and imaginary parts each UNIFORM( 0, 1 )
-* = 2: real and imaginary parts each UNIFORM( -1, 1 )
-* = 3: real and imaginary parts each NORMAL( 0, 1 )
-* = 4: complex number uniform in DISK( 0, 1 )
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The values of ISEED are changed on exit, and can
-* be used in the next call to CLATM4 to continue the same
-* random number sequence.
-* Note: ISEED(4) should be odd, for the random number generator
-* used at present.
-*
-* A (output) COMPLEX array, dimension (LDA, N)
-* Array to be computed.
-*
-* LDA (input) INTEGER
-* Leading dimension of A. Must be at least 1 and at least N.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/clctes.f b/TESTING/EIG/clctes.f
index 630210cb..baa72da5 100644
--- a/TESTING/EIG/clctes.f
+++ b/TESTING/EIG/clctes.f
@@ -1,31 +1,73 @@
- LOGICAL FUNCTION CLCTES( Z, D )
+*> \brief \b CLCTES
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX D, Z
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION CLCTES( Z, D )
+*
+* .. Scalar Arguments ..
+* COMPLEX D, Z
+* ..
+*
* Purpose
* =======
*
-* CLCTES returns .TRUE. if the eigenvalue Z/D is to be selected
-* (specifically, in this subroutine, if the real part of the
-* eigenvalue is negative), and otherwise it returns .FALSE..
-*
-* It is used by the test routine CDRGES to test whether the driver
-* routine CGGES succesfully sorts eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLCTES returns .TRUE. if the eigenvalue Z/D is to be selected
+*> (specifically, in this subroutine, if the real part of the
+*> eigenvalue is negative), and otherwise it returns .FALSE..
+*>
+*> It is used by the test routine CDRGES to test whether the driver
+*> routine CGGES succesfully sorts eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* Z (input) COMPLEX
-* The numerator part of a complex eigenvalue Z/D.
+*> \param[in] Z
+*> \verbatim
+*> Z is COMPLEX
+*> The numerator part of a complex eigenvalue Z/D.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX
+*> The denominator part of a complex eigenvalue Z/D.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) COMPLEX
-* The denominator part of a complex eigenvalue Z/D.
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION CLCTES( Z, D )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX D, Z
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/clctsx.f b/TESTING/EIG/clctsx.f
index c81fde9f..f9086aac 100644
--- a/TESTING/EIG/clctsx.f
+++ b/TESTING/EIG/clctsx.f
@@ -1,28 +1,70 @@
- LOGICAL FUNCTION CLCTSX( ALPHA, BETA )
+*> \brief \b CLCTSX
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX ALPHA, BETA
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION CLCTSX( ALPHA, BETA )
+*
+* .. Scalar Arguments ..
+* COMPLEX ALPHA, BETA
+* ..
+*
* Purpose
* =======
*
-* This function is used to determine what eigenvalues will be
-* selected. If this is part of the test driver CDRGSX, do not
-* change the code UNLESS you are testing input examples and not
-* using the built-in examples.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This function is used to determine what eigenvalues will be
+*> selected. If this is part of the test driver CDRGSX, do not
+*> change the code UNLESS you are testing input examples and not
+*> using the built-in examples.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ALPHA (input) COMPLEX
-* BETA (input) COMPLEX
-* parameters to decide whether the pair (ALPHA, BETA) is
-* selected.
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> parameters to decide whether the pair (ALPHA, BETA) is
+*> selected.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION CLCTSX( ALPHA, BETA )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX ALPHA, BETA
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/clsets.f b/TESTING/EIG/clsets.f
index 40133f66..dc7f74f3 100644
--- a/TESTING/EIG/clsets.f
+++ b/TESTING/EIG/clsets.f
@@ -1,79 +1,175 @@
- SUBROUTINE CLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF,
- $ D, DF, X, WORK, LWORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, P, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( 2 ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), B( LDB, * ),
- $ BF( LDB, * ), C( * ), D( * ), CF( * ),
- $ DF( * ), WORK( LWORK ), X( * )
-*
+*> \brief \b CLSETS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF,
+* D, DF, X, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, P, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( 2 ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), C( * ), D( * ), CF( * ),
+* $ DF( * ), WORK( LWORK ), X( * )
+*
* Purpose
* =======
*
-* CLSETS tests CGGLSE - a subroutine for solving linear equality
-* constrained least square problem (LSE).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLSETS tests CGGLSE - a subroutine for solving linear equality
+*> constrained least square problem (LSE).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* AF (workspace) COMPLEX array, dimension (LDA,N)
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
-*
-* B (input) COMPLEX array, dimension (LDB,N)
-* The P-by-N matrix A.
-*
-* BF (workspace) COMPLEX array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, V and S.
-* LDB >= max(P,N).
-*
-* C (input) COMPLEX array, dimension( M )
-* the vector C in the LSE problem.
-*
-* CF (workspace) COMPLEX array, dimension( M )
-*
-* D (input) COMPLEX array, dimension( P )
-* the vector D in the LSE problem.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,N)
+*> The P-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, V and S.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX array, dimension( M )
+*> the vector C in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] CF
+*> \verbatim
+*> CF is COMPLEX array, dimension( M )
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension( P )
+*> the vector D in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] DF
+*> \verbatim
+*> DF is COMPLEX array, dimension( P )
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension( N )
+*> solution vector X in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS
+*> RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DF (workspace) COMPLEX array, dimension( P )
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (output) COMPLEX array, dimension( N )
-* solution vector X in the LSE problem.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_eig
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF,
+ $ D, DF, X, WORK, LWORK, RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS
-* RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, P, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( 2 ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+ $ BF( LDB, * ), C( * ), D( * ), CF( * ),
+ $ DF( * ), WORK( LWORK ), X( * )
*
* ====================================================================
*
diff --git a/TESTING/EIG/csbmv.f b/TESTING/EIG/csbmv.f
index 87a30847..a0b6558d 100644
--- a/TESTING/EIG/csbmv.f
+++ b/TESTING/EIG/csbmv.f
@@ -1,9 +1,180 @@
+*> \brief \b CSBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSBMV( UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, INCY, K, LDA, N
+* COMPLEX ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSBMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric band matrix, with k super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the band matrix A is being supplied as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> K - INTEGER
+*> On entry, K specifies the number of super-diagonals of the
+*> matrix A. K must satisfy 0 .le. K.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> ALPHA - COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX array, dimension( LDA, N )
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer the upper
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer the lower
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> X - COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INCX - INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> BETA - COMPLEX
+*> On entry, BETA specifies the scalar beta.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Y - COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*> \verbatim
+*> INCY - INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CSBMV( UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y,
$ INCY )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,116 +185,6 @@
COMPLEX A( LDA, * ), X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* CSBMV performs the matrix-vector operation
-*
-* y := alpha*A*x + beta*y,
-*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric band matrix, with k super-diagonals.
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the band matrix A is being supplied as
-* follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* being supplied.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* being supplied.
-*
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER
-* On entry, K specifies the number of super-diagonals of the
-* matrix A. K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array, dimension( LDA, N )
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer the upper
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer the lower
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* Y - COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/csgt01.f b/TESTING/EIG/csgt01.f
index dc066113..c1a52a99 100644
--- a/TESTING/EIG/csgt01.f
+++ b/TESTING/EIG/csgt01.f
@@ -1,12 +1,163 @@
+*> \brief \b CSGT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
+* WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, LDA, LDB, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* REAL D( * ), RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSGT01 checks a decomposition of the form
+*>
+*> A Z = B Z D or
+*> A B Z = Z D or
+*> B A Z = Z D
+*>
+*> where A is a Hermitian matrix, B is Hermitian positive definite,
+*> Z is unitary, and D is diagonal.
+*>
+*> One of the following test ratios is computed:
+*>
+*> ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )
+*>
+*> ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> The form of the Hermitian generalized eigenproblem.
+*> = 1: A*z = (lambda)*B*z
+*> = 2: A*B*z = (lambda)*z
+*> = 3: B*A*z = (lambda)*z
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrices A and B is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenvalues found. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N)
+*> The original Hermitian positive definite matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is COMPLEX array, dimension (LDZ, M)
+*> The computed eigenvectors of the generalized eigenproblem.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (M)
+*> The computed eigenvalues of the generalized eigenproblem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (1)
+*> The test ratio as described above.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
$ WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* modified August 1997, a new parameter M is added to the calling
-* sequence.
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,75 +169,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CSGT01 checks a decomposition of the form
-*
-* A Z = B Z D or
-* A B Z = Z D or
-* B A Z = Z D
-*
-* where A is a Hermitian matrix, B is Hermitian positive definite,
-* Z is unitary, and D is diagonal.
-*
-* One of the following test ratios is computed:
-*
-* ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )
-*
-* ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )
-*
-* ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* The form of the Hermitian generalized eigenproblem.
-* = 1: A*z = (lambda)*B*z
-* = 2: A*B*z = (lambda)*z
-* = 3: B*A*z = (lambda)*z
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrices A and B is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* M (input) INTEGER
-* The number of eigenvalues found. M >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB, N)
-* The original Hermitian positive definite matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Z (input) COMPLEX array, dimension (LDZ, M)
-* The computed eigenvectors of the generalized eigenproblem.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* D (input) REAL array, dimension (M)
-* The computed eigenvalues of the generalized eigenproblem.
-*
-* WORK (workspace) COMPLEX array, dimension (N*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESULT (output) REAL array, dimension (1)
-* The test ratio as described above.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cslect.f b/TESTING/EIG/cslect.f
index b69abc27..649bc1d5 100644
--- a/TESTING/EIG/cslect.f
+++ b/TESTING/EIG/cslect.f
@@ -1,32 +1,71 @@
- LOGICAL FUNCTION CSLECT( Z )
+*> \brief \b CSLECT
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX Z
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION CSLECT( Z )
+*
+* .. Scalar Arguments ..
+* COMPLEX Z
+* ..
+*
* Purpose
* =======
*
-* CSLECT returns .TRUE. if the eigenvalue Z is to be selected,
-* otherwise it returns .FALSE.
-* It is used by CCHK41 to test if CGEES succesfully sorts eigenvalues,
-* and by CCHK43 to test if CGEESX succesfully sorts eigenvalues.
-*
-* The common block /SSLCT/ controls how eigenvalues are selected.
-* If SELOPT = 0, then CSLECT return .TRUE. when real(Z) is less than
-* zero, and .FALSE. otherwise.
-* If SELOPT is at least 1, CSLECT returns SELVAL(SELOPT) and adds 1
-* to SELOPT, cycling back to 1 at SELMAX.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSLECT returns .TRUE. if the eigenvalue Z is to be selected,
+*> otherwise it returns .FALSE.
+*> It is used by CCHK41 to test if CGEES succesfully sorts eigenvalues,
+*> and by CCHK43 to test if CGEESX succesfully sorts eigenvalues.
+*>
+*> The common block /SSLCT/ controls how eigenvalues are selected.
+*> If SELOPT = 0, then CSLECT return .TRUE. when real(Z) is less than
+*> zero, and .FALSE. otherwise.
+*> If SELOPT is at least 1, CSLECT returns SELVAL(SELOPT) and adds 1
+*> to SELOPT, cycling back to 1 at SELMAX.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* Z (input) COMPLEX
-* The eigenvalue Z.
+*> \param[in] Z
+*> \verbatim
+*> Z is COMPLEX
+*> The eigenvalue Z.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION CSLECT( Z )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX Z
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cstt21.f b/TESTING/EIG/cstt21.f
index 86878293..de7160c8 100644
--- a/TESTING/EIG/cstt21.f
+++ b/TESTING/EIG/cstt21.f
@@ -1,78 +1,152 @@
- SUBROUTINE CSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RWORK,
- $ RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KBAND, LDU, N
-* ..
-* .. Array Arguments ..
- REAL AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
- $ SD( * ), SE( * )
- COMPLEX U( LDU, * ), WORK( * )
-* ..
-*
+*> \brief \b CSTT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RWORK,
+* RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+* REAL AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
+* $ SD( * ), SE( * )
+* COMPLEX U( LDU, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CSTT21 checks a decomposition of the form
-*
-* A = U S U*
-*
-* where * means conjugate transpose, A is real symmetric tridiagonal,
-* U is unitary, and S is real and diagonal (if KBAND=0) or symmetric
-* tridiagonal (if KBAND=1). Two tests are performed:
-*
-* RESULT(1) = | A - U S U* | / ( |A| n ulp )
-*
-* RESULT(2) = | I - UU* | / ( n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSTT21 checks a decomposition of the form
+*>
+*> A = U S UC>
+*> where * means conjugate transpose, A is real symmetric tridiagonal,
+*> U is unitary, and S is real and diagonal (if KBAND=0) or symmetric
+*> tridiagonal (if KBAND=1). Two tests are performed:
+*>
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp )
+*>
+*> RESULT(2) = | I - UU* | / ( n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, CSTT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and SE is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AD (input) REAL array, dimension (N)
-* The diagonal of the original (unfactored) matrix A. A is
-* assumed to be real symmetric tridiagonal.
-*
-* AE (input) REAL array, dimension (N-1)
-* The off-diagonal of the original (unfactored) matrix A. A
-* is assumed to be symmetric tridiagonal. AE(1) is the (1,2)
-* and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc.
-*
-* SD (input) REAL array, dimension (N)
-* The diagonal of the real (symmetric tri-) diagonal matrix S.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, CSTT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and SE is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AD
+*> \verbatim
+*> AD is REAL array, dimension (N)
+*> The diagonal of the original (unfactored) matrix A. A is
+*> assumed to be real symmetric tridiagonal.
+*> \endverbatim
+*>
+*> \param[in] AE
+*> \verbatim
+*> AE is REAL array, dimension (N-1)
+*> The off-diagonal of the original (unfactored) matrix A. A
+*> is assumed to be symmetric tridiagonal. AE(1) is the (1,2)
+*> and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc.
+*> \endverbatim
+*>
+*> \param[in] SD
+*> \verbatim
+*> SD is REAL array, dimension (N)
+*> The diagonal of the real (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] SE
+*> \verbatim
+*> SE is REAL array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> Not referenced if KBSND=0. If KBAND=1, then AE(1) is the
+*> (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2)
+*> element, etc.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU, N)
+*> The unitary matrix in the decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SE (input) REAL array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* Not referenced if KBSND=0. If KBAND=1, then AE(1) is the
-* (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2)
-* element, etc.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (input) COMPLEX array, dimension (LDU, N)
-* The unitary matrix in the decomposition.
+*> \date November 2011
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N.
+*> \ingroup complex_eig
*
-* WORK (workspace) COMPLEX array, dimension (N**2)
+* =====================================================================
+ SUBROUTINE CSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RWORK,
+ $ RESULT )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified.
+* .. Scalar Arguments ..
+ INTEGER KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+ REAL AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
+ $ SD( * ), SE( * )
+ COMPLEX U( LDU, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cstt22.f b/TESTING/EIG/cstt22.f
index 52dea43e..5dbbe63b 100644
--- a/TESTING/EIG/cstt22.f
+++ b/TESTING/EIG/cstt22.f
@@ -1,84 +1,165 @@
- SUBROUTINE CSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
- $ LDWORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KBAND, LDU, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
- $ SD( * ), SE( * )
- COMPLEX U( LDU, * ), WORK( LDWORK, * )
-* ..
-*
+*> \brief \b CSTT22
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+* LDWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER KBAND, LDU, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
+* $ SD( * ), SE( * )
+* COMPLEX U( LDU, * ), WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* CSTT22 checks a set of M eigenvalues and eigenvectors,
-*
-* A U = U S
-*
-* where A is Hermitian tridiagonal, the columns of U are unitary,
-* and S is diagonal (if KBAND=0) or Hermitian tridiagonal (if KBAND=1).
-* Two tests are performed:
-*
-* RESULT(1) = | U* A U - S | / ( |A| m ulp )
-*
-* RESULT(2) = | I - U*U | / ( m ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSTT22 checks a set of M eigenvalues and eigenvectors,
+*>
+*> A U = U S
+*>
+*> where A is Hermitian tridiagonal, the columns of U are unitary,
+*> and S is diagonal (if KBAND=0) or Hermitian tridiagonal (if KBAND=1).
+*> Two tests are performed:
+*>
+*> RESULT(1) = | U* A U - S | / ( |A| m ulp )
+*>
+*> RESULT(2) = | I - U*U | / ( m ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, CSTT22 does nothing.
-* It must be at least zero.
-*
-* M (input) INTEGER
-* The number of eigenpairs to check. If it is zero, CSTT22
-* does nothing. It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and SE is not referenced. If
-* one, then S is Hermitian tri-diagonal.
-*
-* AD (input) REAL array, dimension (N)
-* The diagonal of the original (unfactored) matrix A. A is
-* assumed to be Hermitian tridiagonal.
-*
-* AE (input) REAL array, dimension (N)
-* The off-diagonal of the original (unfactored) matrix A. A
-* is assumed to be Hermitian tridiagonal. AE(1) is ignored,
-* AE(2) is the (1,2) and (2,1) element, etc.
-*
-* SD (input) REAL array, dimension (N)
-* The diagonal of the (Hermitian tri-) diagonal matrix S.
-*
-* SE (input) REAL array, dimension (N)
-* The off-diagonal of the (Hermitian tri-) diagonal matrix S.
-* Not referenced if KBSND=0. If KBAND=1, then AE(1) is
-* ignored, SE(2) is the (1,2) and (2,1) element, etc.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, CSTT22 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenpairs to check. If it is zero, CSTT22
+*> does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and SE is not referenced. If
+*> one, then S is Hermitian tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AD
+*> \verbatim
+*> AD is REAL array, dimension (N)
+*> The diagonal of the original (unfactored) matrix A. A is
+*> assumed to be Hermitian tridiagonal.
+*> \endverbatim
+*>
+*> \param[in] AE
+*> \verbatim
+*> AE is REAL array, dimension (N)
+*> The off-diagonal of the original (unfactored) matrix A. A
+*> is assumed to be Hermitian tridiagonal. AE(1) is ignored,
+*> AE(2) is the (1,2) and (2,1) element, etc.
+*> \endverbatim
+*>
+*> \param[in] SD
+*> \verbatim
+*> SD is REAL array, dimension (N)
+*> The diagonal of the (Hermitian tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] SE
+*> \verbatim
+*> SE is REAL array, dimension (N)
+*> The off-diagonal of the (Hermitian tri-) diagonal matrix S.
+*> Not referenced if KBSND=0. If KBAND=1, then AE(1) is
+*> ignored, SE(2) is the (1,2) and (2,1) element, etc.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> The unitary matrix in the decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK, M+1)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of WORK. LDWORK must be at least
+*> max(1,M).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* U (input) REAL array, dimension (LDU, N)
-* The unitary matrix in the decomposition.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LDWORK, M+1)
+*> \ingroup complex_eig
*
-* LDWORK (input) INTEGER
-* The leading dimension of WORK. LDWORK must be at least
-* max(1,M).
+* =====================================================================
+ SUBROUTINE CSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+ $ LDWORK, RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
+* .. Scalar Arguments ..
+ INTEGER KBAND, LDU, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
+ $ SD( * ), SE( * )
+ COMPLEX U( LDU, * ), WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/cunt01.f b/TESTING/EIG/cunt01.f
index 34d31e49..f7f15645 100644
--- a/TESTING/EIG/cunt01.f
+++ b/TESTING/EIG/cunt01.f
@@ -1,9 +1,137 @@
+*> \brief \b CUNT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CUNT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER ROWCOL
+* INTEGER LDU, LWORK, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX U( LDU, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNT01 checks that the matrix U is unitary by computing the ratio
+*>
+*> RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
+*> or
+*> RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
+*>
+*> Alternatively, if there isn't sufficient workspace to form
+*> I - U*U' or I - U'*U, the ratio is computed as
+*>
+*> RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
+*> or
+*> RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
+*>
+*> where EPS is the machine precision. ROWCOL is used only if m = n;
+*> if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
+*> assumed to be 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ROWCOL
+*> \verbatim
+*> ROWCOL is CHARACTER
+*> Specifies whether the rows or columns of U should be checked
+*> for orthogonality. Used only if M = N.
+*> = 'R': Check for orthogonal rows of U
+*> = 'C': Check for orthogonal columns of U
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix U.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix U.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,N)
+*> The unitary matrix U. U is checked for orthogonal columns
+*> if m > n or if m = n and ROWCOL = 'C'. U is checked for
+*> orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. For best performance, LWORK
+*> should be at least N*N if ROWCOL = 'C' or M*M if
+*> ROWCOL = 'R', but the test will be done even if LWORK is 0.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (min(M,N))
+*> Used only if LWORK is large enough to use the Level 3 BLAS
+*> code.
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
+*> RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_eig
+*
+* =====================================================================
SUBROUTINE CUNT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER ROWCOL
@@ -15,64 +143,6 @@
COMPLEX U( LDU, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CUNT01 checks that the matrix U is unitary by computing the ratio
-*
-* RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
-* or
-* RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
-* Alternatively, if there isn't sufficient workspace to form
-* I - U*U' or I - U'*U, the ratio is computed as
-*
-* RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
-* or
-* RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
-* where EPS is the machine precision. ROWCOL is used only if m = n;
-* if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
-* assumed to be 'R'.
-*
-* Arguments
-* =========
-*
-* ROWCOL (input) CHARACTER
-* Specifies whether the rows or columns of U should be checked
-* for orthogonality. Used only if M = N.
-* = 'R': Check for orthogonal rows of U
-* = 'C': Check for orthogonal columns of U
-*
-* M (input) INTEGER
-* The number of rows of the matrix U.
-*
-* N (input) INTEGER
-* The number of columns of the matrix U.
-*
-* U (input) COMPLEX array, dimension (LDU,N)
-* The unitary matrix U. U is checked for orthogonal columns
-* if m > n or if m = n and ROWCOL = 'C'. U is checked for
-* orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. For best performance, LWORK
-* should be at least N*N if ROWCOL = 'C' or M*M if
-* ROWCOL = 'R', but the test will be done even if LWORK is 0.
-*
-* RWORK (workspace) REAL array, dimension (min(M,N))
-* Used only if LWORK is large enough to use the Level 3 BLAS
-* code.
-*
-* RESID (output) REAL
-* RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
-* RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/cunt03.f b/TESTING/EIG/cunt03.f
index 1d2246aa..678fdc2e 100644
--- a/TESTING/EIG/cunt03.f
+++ b/TESTING/EIG/cunt03.f
@@ -1,98 +1,183 @@
- SUBROUTINE CUNT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
- $ RWORK, RESULT, INFO )
+*> \brief \b CUNT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*( * ) RC
- INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
- REAL RESULT
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX U( LDU, * ), V( LDV, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CUNT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
+* RWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER*( * ) RC
+* INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CUNT03 compares two unitary matrices U and V to see if their
-* corresponding rows or columns span the same spaces. The rows are
-* checked if RC = 'R', and the columns are checked if RC = 'C'.
-*
-* RESULT is the maximum of
-*
-* | V*V' - I | / ( MV ulp ), if RC = 'R', or
-*
-* | V'*V - I | / ( MV ulp ), if RC = 'C',
-*
-* and the maximum over rows (or columns) 1 to K of
-*
-* | U(i) - S*V(i) |/ ( N ulp )
-*
-* where abs(S) = 1 (chosen to minimize the expression), U(i) is the
-* i-th row (column) of U, and V(i) is the i-th row (column) of V.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CUNT03 compares two unitary matrices U and V to see if their
+*> corresponding rows or columns span the same spaces. The rows are
+*> checked if RC = 'R', and the columns are checked if RC = 'C'.
+*>
+*> RESULT is the maximum of
+*>
+*> | V*V' - I | / ( MV ulp ), if RC = 'R', or
+*>
+*> | V'*V - I | / ( MV ulp ), if RC = 'C',
+*>
+*> and the maximum over rows (or columns) 1 to K of
+*>
+*> | U(i) - S*V(i) |/ ( N ulp )
+*>
+*> where abs(S) = 1 (chosen to minimize the expression), U(i) is the
+*> i-th row (column) of U, and V(i) is the i-th row (column) of V.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* RC (input) CHARACTER*1
-* If RC = 'R' the rows of U and V are to be compared.
-* If RC = 'C' the columns of U and V are to be compared.
-*
-* MU (input) INTEGER
-* The number of rows of U if RC = 'R', and the number of
-* columns if RC = 'C'. If MU = 0 CUNT03 does nothing.
-* MU must be at least zero.
-*
-* MV (input) INTEGER
-* The number of rows of V if RC = 'R', and the number of
-* columns if RC = 'C'. If MV = 0 CUNT03 does nothing.
-* MV must be at least zero.
-*
-* N (input) INTEGER
-* If RC = 'R', the number of columns in the matrices U and V,
-* and if RC = 'C', the number of rows in U and V. If N = 0
-* CUNT03 does nothing. N must be at least zero.
-*
-* K (input) INTEGER
-* The number of rows or columns of U and V to compare.
-* 0 <= K <= max(MU,MV).
-*
-* U (input) COMPLEX array, dimension (LDU,N)
-* The first matrix to compare. If RC = 'R', U is MU by N, and
-* if RC = 'C', U is N by MU.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. If RC = 'R', LDU >= max(1,MU),
-* and if RC = 'C', LDU >= max(1,N).
-*
-* V (input) COMPLEX array, dimension (LDV,N)
-* The second matrix to compare. If RC = 'R', V is MV by N, and
-* if RC = 'C', V is N by MV.
+* =========
+*
+*> \param[in] RC
+*> \verbatim
+*> RC is CHARACTER*1
+*> If RC = 'R' the rows of U and V are to be compared.
+*> If RC = 'C' the columns of U and V are to be compared.
+*> \endverbatim
+*>
+*> \param[in] MU
+*> \verbatim
+*> MU is INTEGER
+*> The number of rows of U if RC = 'R', and the number of
+*> columns if RC = 'C'. If MU = 0 CUNT03 does nothing.
+*> MU must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> The number of rows of V if RC = 'R', and the number of
+*> columns if RC = 'C'. If MV = 0 CUNT03 does nothing.
+*> MV must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> If RC = 'R', the number of columns in the matrices U and V,
+*> and if RC = 'C', the number of rows in U and V. If N = 0
+*> CUNT03 does nothing. N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of rows or columns of U and V to compare.
+*> 0 <= K <= max(MU,MV).
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX array, dimension (LDU,N)
+*> The first matrix to compare. If RC = 'R', U is MU by N, and
+*> if RC = 'C', U is N by MU.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. If RC = 'R', LDU >= max(1,MU),
+*> and if RC = 'C', LDU >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX array, dimension (LDV,N)
+*> The second matrix to compare. If RC = 'R', V is MV by N, and
+*> if RC = 'C', V is N by MV.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. If RC = 'R', LDV >= max(1,MV),
+*> and if RC = 'C', LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. For best performance, LWORK
+*> should be at least N*N if RC = 'C' or M*M if RC = 'R', but
+*> the tests will be done even if LWORK is 0.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(MV,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> The value computed by the test described above. RESULT is
+*> limited to 1/ulp to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 indicates a successful exit
+*> -k indicates the k-th parameter had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of V. If RC = 'R', LDV >= max(1,MV),
-* and if RC = 'C', LDV >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \date November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. For best performance, LWORK
-* should be at least N*N if RC = 'C' or M*M if RC = 'R', but
-* the tests will be done even if LWORK is 0.
+*> \ingroup complex_eig
*
-* RWORK (workspace) REAL array, dimension (max(MV,N))
+* =====================================================================
+ SUBROUTINE CUNT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
+ $ RWORK, RESULT, INFO )
*
-* RESULT (output) REAL
-* The value computed by the test described above. RESULT is
-* limited to 1/ulp to avoid overflow.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* 0 indicates a successful exit
-* -k indicates the k-th parameter had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER*( * ) RC
+ INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
+ REAL RESULT
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dbdt01.f b/TESTING/EIG/dbdt01.f
index 8f0ddfe3..7850a1a7 100644
--- a/TESTING/EIG/dbdt01.f
+++ b/TESTING/EIG/dbdt01.f
@@ -1,79 +1,160 @@
- SUBROUTINE DBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KD, LDA, LDPT, LDQ, M, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), PT( LDPT, * ),
- $ Q( LDQ, * ), WORK( * )
-* ..
-*
+*> \brief \b DBDT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER KD, LDA, LDPT, LDQ, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), PT( LDPT, * ),
+* $ Q( LDQ, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DBDT01 reconstructs a general matrix A from its bidiagonal form
-* A = Q * B * P'
-* where Q (m by min(m,n)) and P' (min(m,n) by n) are orthogonal
-* matrices and B is bidiagonal.
-*
-* The test ratio to test the reduction is
-* RESID = norm( A - Q * B * PT ) / ( n * norm(A) * EPS )
-* where PT = P' and EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DBDT01 reconstructs a general matrix A from its bidiagonal form
+*> A = Q * B * P'
+*> where Q (m by min(m,n)) and P' (min(m,n) by n) are orthogonal
+*> matrices and B is bidiagonal.
+*>
+*> The test ratio to test the reduction is
+*> RESID = norm( A - Q * B * PT ) / ( n * norm(A) * EPS )
+*> where PT = P' and EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and Q.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and P'.
-*
-* KD (input) INTEGER
-* If KD = 0, B is diagonal and the array E is not referenced.
-* If KD = 1, the reduction was performed by xGEBRD; B is upper
-* bidiagonal if M >= N, and lower bidiagonal if M < N.
-* If KD = -1, the reduction was performed by xGBBRD; B is
-* always upper bidiagonal.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* Q (input) DOUBLE PRECISION array, dimension (LDQ,N)
-* The m by min(m,n) orthogonal matrix Q in the reduction
-* A = Q * B * P'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and P'.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> If KD = 0, B is diagonal and the array E is not referenced.
+*> If KD = 1, the reduction was performed by xGEBRD; B is upper
+*> bidiagonal if M >= N, and lower bidiagonal if M < N.
+*> If KD = -1, the reduction was performed by xGBBRD; B is
+*> always upper bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> The m by min(m,n) orthogonal matrix Q in the reduction
+*> A = Q * B * P'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (min(M,N)-1)
+*> The superdiagonal elements of the bidiagonal matrix B if
+*> m >= n, or the subdiagonal elements of B if m < n.
+*> \endverbatim
+*>
+*> \param[in] PT
+*> \verbatim
+*> PT is DOUBLE PRECISION array, dimension (LDPT,N)
+*> The min(m,n) by n orthogonal matrix P' in the reduction
+*> A = Q * B * P'.
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the array PT.
+*> LDPT >= max(1,min(M,N)).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (M+N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The test ratio: norm(A - Q * B * P') / ( n * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input) DOUBLE PRECISION array, dimension (min(M,N)-1)
-* The superdiagonal elements of the bidiagonal matrix B if
-* m >= n, or the subdiagonal elements of B if m < n.
+*> \date November 2011
*
-* PT (input) DOUBLE PRECISION array, dimension (LDPT,N)
-* The min(m,n) by n orthogonal matrix P' in the reduction
-* A = Q * B * P'.
+*> \ingroup double_eig
*
-* LDPT (input) INTEGER
-* The leading dimension of the array PT.
-* LDPT >= max(1,min(M,N)).
+* =====================================================================
+ SUBROUTINE DBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
+ $ RESID )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M+N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The test ratio: norm(A - Q * B * P') / ( n * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER KD, LDA, LDPT, LDQ, M, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), PT( LDPT, * ),
+ $ Q( LDQ, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dbdt02.f b/TESTING/EIG/dbdt02.f
index 8c51d7a7..b2ebec23 100644
--- a/TESTING/EIG/dbdt02.f
+++ b/TESTING/EIG/dbdt02.f
@@ -1,60 +1,131 @@
- SUBROUTINE DBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDC, LDU, M, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION B( LDB, * ), C( LDC, * ), U( LDU, * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b DBDT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDC, LDU, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), C( LDC, * ), U( LDU, * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DBDT02 tests the change of basis C = U' * B by computing the residual
-*
-* RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
-*
-* where B and C are M by N matrices, U is an M by M orthogonal matrix,
-* and EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DBDT02 tests the change of basis C = U' * B by computing the residual
+*>
+*> RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+*>
+*> where B and C are M by N matrices, U is an M by M orthogonal matrix,
+*> and EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices B and C and the order of
-* the matrix Q.
-*
-* N (input) INTEGER
-* The number of columns of the matrices B and C.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,N)
-* The m by n matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices B and C and the order of
+*> the matrix Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices B and C.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> The m by n matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> The m by n matrix C, assumed to contain U' * B.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,M)
+*> The m by m orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input) DOUBLE PRECISION array, dimension (LDC,N)
-* The m by n matrix C, assumed to contain U' * B.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* U (input) DOUBLE PRECISION array, dimension (LDU,M)
-* The m by m orthogonal matrix U.
+*> \ingroup double_eig
*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
+* =====================================================================
+ SUBROUTINE DBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+* .. Scalar Arguments ..
+ INTEGER LDB, LDC, LDU, M, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION B( LDB, * ), C( LDC, * ), U( LDU, * ),
+ $ WORK( * )
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/dbdt03.f b/TESTING/EIG/dbdt03.f
index 34112d32..834a961c 100644
--- a/TESTING/EIG/dbdt03.f
+++ b/TESTING/EIG/dbdt03.f
@@ -1,9 +1,146 @@
+*> \brief \b DBDT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DBDT03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDU, LDVT, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), S( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DBDT03 reconstructs a bidiagonal matrix B from its SVD:
+*> S = U' * B * V
+*> where U and V are orthogonal matrices and S is diagonal.
+*>
+*> The test ratio to test the singular value decomposition is
+*> RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS )
+*> where VT = V' and EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix B is upper or lower bidiagonal.
+*> = 'U': Upper bidiagonal
+*> = 'L': Lower bidiagonal
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The bandwidth of the bidiagonal matrix B. If KD = 1, the
+*> matrix B is bidiagonal, and if KD = 0, B is diagonal and E is
+*> not referenced. If KD is greater than 1, it is assumed to be
+*> 1, and if KD is less than 0, it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) superdiagonal elements of the bidiagonal matrix B
+*> if UPLO = 'U', or the (n-1) subdiagonal elements of B if
+*> UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,N)
+*> The n by n orthogonal matrix U in the reduction B = U'*A*P.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The singular values from the SVD of B, sorted in decreasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension (LDVT,N)
+*> The n by n orthogonal matrix V' in the reduction
+*> B = U * S * V'.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DBDT03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,64 +152,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DBDT03 reconstructs a bidiagonal matrix B from its SVD:
-* S = U' * B * V
-* where U and V are orthogonal matrices and S is diagonal.
-*
-* The test ratio to test the singular value decomposition is
-* RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS )
-* where VT = V' and EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix B is upper or lower bidiagonal.
-* = 'U': Upper bidiagonal
-* = 'L': Lower bidiagonal
-*
-* N (input) INTEGER
-* The order of the matrix B.
-*
-* KD (input) INTEGER
-* The bandwidth of the bidiagonal matrix B. If KD = 1, the
-* matrix B is bidiagonal, and if KD = 0, B is diagonal and E is
-* not referenced. If KD is greater than 1, it is assumed to be
-* 1, and if KD is less than 0, it is assumed to be 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the bidiagonal matrix B.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) superdiagonal elements of the bidiagonal matrix B
-* if UPLO = 'U', or the (n-1) subdiagonal elements of B if
-* UPLO = 'L'.
-*
-* U (input) DOUBLE PRECISION array, dimension (LDU,N)
-* The n by n orthogonal matrix U in the reduction B = U'*A*P.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,N)
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The singular values from the SVD of B, sorted in decreasing
-* order.
-*
-* VT (input) DOUBLE PRECISION array, dimension (LDVT,N)
-* The n by n orthogonal matrix V' in the reduction
-* B = U * S * V'.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* RESID (output) DOUBLE PRECISION
-* The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS )
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dchkbb.f b/TESTING/EIG/dchkbb.f
index 31825a5c..e040dc7b 100644
--- a/TESTING/EIG/dchkbb.f
+++ b/TESTING/EIG/dchkbb.f
@@ -1,11 +1,369 @@
+*> \brief \b DCHKBB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKBB( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
+* NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
+* BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
+* LWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
+* $ NRHS, NSIZES, NTYPES, NWDTHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), KK( * ), MVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( LDA, * ), AB( LDAB, * ), BD( * ), BE( * ),
+* $ C( LDC, * ), CC( LDC, * ), P( LDP, * ),
+* $ Q( LDQ, * ), RESULT( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKBB tests the reduction of a general real rectangular band
+*> matrix to bidiagonal form.
+*>
+*> DGBBRD factors a general band matrix A as Q B P* , where * means
+*> transpose, B is upper bidiagonal, and Q and P are orthogonal;
+*> DGBBRD can also overwrite a given matrix C with Q* C .
+*>
+*> For each pair of matrix dimensions (M,N) and each selected matrix
+*> type, an M by N matrix A and an M by NRHS matrix C are generated.
+*> The problem dimensions are as follows
+*> A: M x N
+*> Q: M x M
+*> P: N x N
+*> B: min(M,N) x min(M,N)
+*> C: M x NRHS
+*>
+*> For each generated matrix, 4 tests are performed:
+*>
+*> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
+*>
+*> (2) | I - Q' Q | / ( M ulp )
+*>
+*> (3) | I - PT PT' | / ( N ulp )
+*>
+*> (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
+*>
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> The possible matrix types are
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (3), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (3), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U D V, where U and V are orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U D V, where U and V are orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Rectangular matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of values of M and N contained in the vectors
+*> MVAL and NVAL. The matrix sizes are used in pairs (M,N).
+*> If NSIZES is zero, DCHKBB does nothing. NSIZES must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NSIZES)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NSIZES)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NWDTHS
+*> \verbatim
+*> NWDTHS is INTEGER
+*> The number of bandwidths to use. If it is zero,
+*> DCHKBB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KK
+*> \verbatim
+*> KK is INTEGER array, dimension (NWDTHS)
+*> An array containing the bandwidths to be used for the band
+*> matrices. The values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DCHKBB
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns in the "right-hand side" matrix C.
+*> If NRHS = 0, then the operations on the right-hand side will
+*> not be tested. NRHS must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DCHKBB to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN))
+*> Used to hold the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB, max(NN))
+*> Used to hold A in band storage format.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of AB. It must be at least 2 (not 1!)
+*> and at least max( KK )+1.
+*> \endverbatim
+*>
+*> \param[out] BD
+*> \verbatim
+*> BD is DOUBLE PRECISION array, dimension (max(NN))
+*> Used to hold the diagonal of the bidiagonal matrix computed
+*> by DGBBRD.
+*> \endverbatim
+*>
+*> \param[out] BE
+*> \verbatim
+*> BE is DOUBLE PRECISION array, dimension (max(NN))
+*> Used to hold the off-diagonal of the bidiagonal matrix
+*> computed by DGBBRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, max(NN))
+*> Used to hold the orthogonal matrix Q computed by DGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] P
+*> \verbatim
+*> P is DOUBLE PRECISION array, dimension (LDP, max(NN))
+*> Used to hold the orthogonal matrix P computed by DGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDP
+*> \verbatim
+*> LDP is INTEGER
+*> The leading dimension of P. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC, max(NN))
+*> Used to hold the matrix C updated by DGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of U. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is DOUBLE PRECISION array, dimension (LDC, max(NN))
+*> Used to hold a copy of the matrix C.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( LDA+1, max(NN)+1 )*max(NN).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCHKBB( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
$ NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
$ BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
$ LWORK, RESULT, INFO )
*
-* -- LAPACK test routine (release 2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
@@ -20,229 +378,6 @@
$ Q( LDQ, * ), RESULT( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKBB tests the reduction of a general real rectangular band
-* matrix to bidiagonal form.
-*
-* DGBBRD factors a general band matrix A as Q B P* , where * means
-* transpose, B is upper bidiagonal, and Q and P are orthogonal;
-* DGBBRD can also overwrite a given matrix C with Q* C .
-*
-* For each pair of matrix dimensions (M,N) and each selected matrix
-* type, an M by N matrix A and an M by NRHS matrix C are generated.
-* The problem dimensions are as follows
-* A: M x N
-* Q: M x M
-* P: N x N
-* B: min(M,N) x min(M,N)
-* C: M x NRHS
-*
-* For each generated matrix, 4 tests are performed:
-*
-* (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
-*
-* (2) | I - Q' Q | / ( M ulp )
-*
-* (3) | I - PT PT' | / ( N ulp )
-*
-* (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
-*
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* The possible matrix types are
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (3), but multiplied by SQRT( overflow threshold )
-* (7) Same as (3), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U D V, where U and V are orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U D V, where U and V are orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Rectangular matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of values of M and N contained in the vectors
-* MVAL and NVAL. The matrix sizes are used in pairs (M,N).
-* If NSIZES is zero, DCHKBB does nothing. NSIZES must be at
-* least zero.
-*
-* MVAL (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix row dimension M.
-*
-* NVAL (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix column dimension N.
-*
-* NWDTHS (input) INTEGER
-* The number of bandwidths to use. If it is zero,
-* DCHKBB does nothing. It must be at least zero.
-*
-* KK (input) INTEGER array, dimension (NWDTHS)
-* An array containing the bandwidths to be used for the band
-* matrices. The values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DCHKBB
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* NRHS (input) INTEGER
-* The number of columns in the "right-hand side" matrix C.
-* If NRHS = 0, then the operations on the right-hand side will
-* not be tested. NRHS must be at least 0.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DCHKBB to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN))
-* Used to hold the matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least max( NN ).
-*
-* AB (workspace) DOUBLE PRECISION array, dimension (LDAB, max(NN))
-* Used to hold A in band storage format.
-*
-* LDAB (input) INTEGER
-* The leading dimension of AB. It must be at least 2 (not 1!)
-* and at least max( KK )+1.
-*
-* BD (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Used to hold the diagonal of the bidiagonal matrix computed
-* by DGBBRD.
-*
-* BE (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Used to hold the off-diagonal of the bidiagonal matrix
-* computed by DGBBRD.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDQ, max(NN))
-* Used to hold the orthogonal matrix Q computed by DGBBRD.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q. It must be at least 1
-* and at least max( NN ).
-*
-* P (workspace) DOUBLE PRECISION array, dimension (LDP, max(NN))
-* Used to hold the orthogonal matrix P computed by DGBBRD.
-*
-* LDP (input) INTEGER
-* The leading dimension of P. It must be at least 1
-* and at least max( NN ).
-*
-* C (workspace) DOUBLE PRECISION array, dimension (LDC, max(NN))
-* Used to hold the matrix C updated by DGBBRD.
-*
-* LDC (input) INTEGER
-* The leading dimension of U. It must be at least 1
-* and at least max( NN ).
-*
-* CC (workspace) DOUBLE PRECISION array, dimension (LDC, max(NN))
-* Used to hold a copy of the matrix C.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( LDA+1, max(NN)+1 )*max(NN).
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dchkbd.f b/TESTING/EIG/dchkbd.f
index d4dd1ba5..78c9d786 100644
--- a/TESTING/EIG/dchkbd.f
+++ b/TESTING/EIG/dchkbd.f
@@ -1,11 +1,452 @@
+*> \brief \b DCHKBD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
+* ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
+* Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
+* IWORK, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
+* $ NSIZES, NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( LDA, * ), BD( * ), BE( * ), PT( LDPT, * ),
+* $ Q( LDQ, * ), S1( * ), S2( * ), U( LDPT, * ),
+* $ VT( LDPT, * ), WORK( * ), X( LDX, * ),
+* $ Y( LDX, * ), Z( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKBD checks the singular value decomposition (SVD) routines.
+*>
+*> DGEBRD reduces a real general m by n matrix A to upper or lower
+*> bidiagonal form B by an orthogonal transformation: Q' * A * P = B
+*> (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
+*> and lower bidiagonal if m < n.
+*>
+*> DORGBR generates the orthogonal matrices Q and P' from DGEBRD.
+*> Note that Q and P are not necessarily square.
+*>
+*> DBDSQR computes the singular value decomposition of the bidiagonal
+*> matrix B as B = U S V'. It is called three times to compute
+*> 1) B = U S1 V', where S1 is the diagonal matrix of singular
+*> values and the columns of the matrices U and V are the left
+*> and right singular vectors, respectively, of B.
+*> 2) Same as 1), but the singular values are stored in S2 and the
+*> singular vectors are not computed.
+*> 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
+*> In addition, DBDSQR has an option to apply the left orthogonal matrix
+*> U to a matrix X, useful in least squares applications.
+*>
+*> DBDSDC computes the singular value decomposition of the bidiagonal
+*> matrix B as B = U S V' using divide-and-conquer. It is called twice
+*> to compute
+*> 1) B = U S1 V', where S1 is the diagonal matrix of singular
+*> values and the columns of the matrices U and V are the left
+*> and right singular vectors, respectively, of B.
+*> 2) Same as 1), but the singular values are stored in S2 and the
+*> singular vectors are not computed.
+*>
+*> For each pair of matrix dimensions (M,N) and each selected matrix
+*> type, an M by N matrix A and an M by NRHS matrix X are generated.
+*> The problem dimensions are as follows
+*> A: M x N
+*> Q: M x min(M,N) (but M x M if NRHS > 0)
+*> P: min(M,N) x N
+*> B: min(M,N) x min(M,N)
+*> U, V: min(M,N) x min(M,N)
+*> S1, S2 diagonal, order min(M,N)
+*> X: M x NRHS
+*>
+*> For each generated matrix, 14 tests are performed:
+*>
+*> Test DGEBRD and DORGBR
+*>
+*> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
+*>
+*> (2) | I - Q' Q | / ( M ulp )
+*>
+*> (3) | I - PT PT' | / ( N ulp )
+*>
+*> Test DBDSQR on bidiagonal matrix B
+*>
+*> (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
+*>
+*> (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
+*> and Z = U' Y.
+*> (6) | I - U' U | / ( min(M,N) ulp )
+*>
+*> (7) | I - VT VT' | / ( min(M,N) ulp )
+*>
+*> (8) S1 contains min(M,N) nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (9) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
+*> computing U and V.
+*>
+*> (10) 0 if the true singular values of B are within THRESH of
+*> those in S1. 2*THRESH if they are not. (Tested using
+*> DSVDCH)
+*>
+*> Test DBDSQR on matrix A
+*>
+*> (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
+*>
+*> (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
+*>
+*> (13) | I - (QU)'(QU) | / ( M ulp )
+*>
+*> (14) | I - (VT PT) (PT'VT') | / ( N ulp )
+*>
+*> Test DBDSDC on bidiagonal matrix B
+*>
+*> (15) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
+*>
+*> (16) | I - U' U | / ( min(M,N) ulp )
+*>
+*> (17) | I - VT VT' | / ( min(M,N) ulp )
+*>
+*> (18) S1 contains min(M,N) nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (19) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
+*> computing U and V.
+*> The possible matrix types are
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (3), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (3), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U D V, where U and V are orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U D V, where U and V are orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Rectangular matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*> Special case:
+*> (16) A bidiagonal matrix with random entries chosen from a
+*> logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
+*> entry is e^x, where x is chosen uniformly on
+*> [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
+*> (a) DGEBRD is not called to reduce it to bidiagonal form.
+*> (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
+*> matrix will be lower bidiagonal, otherwise upper.
+*> (c) only tests 5--8 and 14 are performed.
+*>
+*> A subset of the full set of matrix types may be selected through
+*> the logical array DOTYPE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of values of M and N contained in the vectors
+*> MVAL and NVAL. The matrix sizes are used in pairs (M,N).
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NM)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DCHKBD
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrices are in A and B.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
+*> of type j will be generated. If NTYPES is smaller than the
+*> maximum number of types defined (PARAMETER MAXTYP), then
+*> types NTYPES+1 through MAXTYP will not be generated. If
+*> NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
+*> DOTYPE(NTYPES) will be ignored.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns in the "right-hand side" matrices X, Y,
+*> and Z, used in testing DBDSQR. If NRHS = 0, then the
+*> operations on the right-hand side will not be tested.
+*> NRHS must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The values of ISEED are changed on exit, and can be
+*> used in the next call to DCHKBD to continue the same random
+*> number sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0. Note that the
+*> expected value of the test ratios is O(1), so THRESH should
+*> be a reasonably small multiple of 1, e.g., 10 or 100.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> where NMAX is the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,MMAX),
+*> where MMAX is the maximum value of M in MVAL.
+*> \endverbatim
+*>
+*> \param[out] BD
+*> \verbatim
+*> BD is DOUBLE PRECISION array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] BE
+*> \verbatim
+*> BE is DOUBLE PRECISION array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] S1
+*> \verbatim
+*> S1 is DOUBLE PRECISION array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is DOUBLE PRECISION array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the arrays X, Y, and Z.
+*> LDX >= max(1,MMAX)
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,MMAX)
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,MMAX).
+*> \endverbatim
+*>
+*> \param[out] PT
+*> \verbatim
+*> PT is DOUBLE PRECISION array, dimension (LDPT,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the arrays PT, U, and V.
+*> LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension
+*> (LDPT,max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension
+*> (LDPT,max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all
+*> pairs (M,N)=(MM(j),NN(j))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least 8*min(M,N)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some MM(j) < 0
+*> -3: Some NN(j) < 0
+*> -4: NTYPES < 0
+*> -6: NRHS < 0
+*> -8: THRESH < 0
+*> -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
+*> -17: LDB < 1 or LDB < MMAX.
+*> -21: LDQ < 1 or LDQ < MMAX.
+*> -23: LDPT< 1 or LDPT< MNMAX.
+*> -27: LWORK too small.
+*> If DLATMR, SLATMS, DGEBRD, DORGBR, or DBDSQR,
+*> returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> MMAX Largest value in NN.
+*> NMAX Largest value in NN.
+*> MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal
+*> matrix.)
+*> MNMAX The maximum value of MNMIN for j=1,...,NSIZES.
+*> NFAIL The number of tests which have exceeded THRESH
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
$ ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
$ Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
$ IWORK, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
@@ -21,306 +462,6 @@
$ Y( LDX, * ), Z( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKBD checks the singular value decomposition (SVD) routines.
-*
-* DGEBRD reduces a real general m by n matrix A to upper or lower
-* bidiagonal form B by an orthogonal transformation: Q' * A * P = B
-* (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
-* and lower bidiagonal if m < n.
-*
-* DORGBR generates the orthogonal matrices Q and P' from DGEBRD.
-* Note that Q and P are not necessarily square.
-*
-* DBDSQR computes the singular value decomposition of the bidiagonal
-* matrix B as B = U S V'. It is called three times to compute
-* 1) B = U S1 V', where S1 is the diagonal matrix of singular
-* values and the columns of the matrices U and V are the left
-* and right singular vectors, respectively, of B.
-* 2) Same as 1), but the singular values are stored in S2 and the
-* singular vectors are not computed.
-* 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
-* In addition, DBDSQR has an option to apply the left orthogonal matrix
-* U to a matrix X, useful in least squares applications.
-*
-* DBDSDC computes the singular value decomposition of the bidiagonal
-* matrix B as B = U S V' using divide-and-conquer. It is called twice
-* to compute
-* 1) B = U S1 V', where S1 is the diagonal matrix of singular
-* values and the columns of the matrices U and V are the left
-* and right singular vectors, respectively, of B.
-* 2) Same as 1), but the singular values are stored in S2 and the
-* singular vectors are not computed.
-*
-* For each pair of matrix dimensions (M,N) and each selected matrix
-* type, an M by N matrix A and an M by NRHS matrix X are generated.
-* The problem dimensions are as follows
-* A: M x N
-* Q: M x min(M,N) (but M x M if NRHS > 0)
-* P: min(M,N) x N
-* B: min(M,N) x min(M,N)
-* U, V: min(M,N) x min(M,N)
-* S1, S2 diagonal, order min(M,N)
-* X: M x NRHS
-*
-* For each generated matrix, 14 tests are performed:
-*
-* Test DGEBRD and DORGBR
-*
-* (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
-*
-* (2) | I - Q' Q | / ( M ulp )
-*
-* (3) | I - PT PT' | / ( N ulp )
-*
-* Test DBDSQR on bidiagonal matrix B
-*
-* (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
-*
-* (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
-* and Z = U' Y.
-* (6) | I - U' U | / ( min(M,N) ulp )
-*
-* (7) | I - VT VT' | / ( min(M,N) ulp )
-*
-* (8) S1 contains min(M,N) nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (9) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
-* computing U and V.
-*
-* (10) 0 if the true singular values of B are within THRESH of
-* those in S1. 2*THRESH if they are not. (Tested using
-* DSVDCH)
-*
-* Test DBDSQR on matrix A
-*
-* (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
-*
-* (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
-*
-* (13) | I - (QU)'(QU) | / ( M ulp )
-*
-* (14) | I - (VT PT) (PT'VT') | / ( N ulp )
-*
-* Test DBDSDC on bidiagonal matrix B
-*
-* (15) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
-*
-* (16) | I - U' U | / ( min(M,N) ulp )
-*
-* (17) | I - VT VT' | / ( min(M,N) ulp )
-*
-* (18) S1 contains min(M,N) nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (19) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
-* computing U and V.
-* The possible matrix types are
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (3), but multiplied by SQRT( overflow threshold )
-* (7) Same as (3), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U D V, where U and V are orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U D V, where U and V are orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Rectangular matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Special case:
-* (16) A bidiagonal matrix with random entries chosen from a
-* logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
-* entry is e^x, where x is chosen uniformly on
-* [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
-* (a) DGEBRD is not called to reduce it to bidiagonal form.
-* (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
-* matrix will be lower bidiagonal, otherwise upper.
-* (c) only tests 5--8 and 14 are performed.
-*
-* A subset of the full set of matrix types may be selected through
-* the logical array DOTYPE.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of values of M and N contained in the vectors
-* MVAL and NVAL. The matrix sizes are used in pairs (M,N).
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix column dimension N.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DCHKBD
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrices are in A and B.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
-* of type j will be generated. If NTYPES is smaller than the
-* maximum number of types defined (PARAMETER MAXTYP), then
-* types NTYPES+1 through MAXTYP will not be generated. If
-* NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
-* DOTYPE(NTYPES) will be ignored.
-*
-* NRHS (input) INTEGER
-* The number of columns in the "right-hand side" matrices X, Y,
-* and Z, used in testing DBDSQR. If NRHS = 0, then the
-* operations on the right-hand side will not be tested.
-* NRHS must be at least 0.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The values of ISEED are changed on exit, and can be
-* used in the next call to DCHKBD to continue the same random
-* number sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0. Note that the
-* expected value of the test ratios is O(1), so THRESH should
-* be a reasonably small multiple of 1, e.g., 10 or 100.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
-* where NMAX is the maximum value of N in NVAL.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,MMAX),
-* where MMAX is the maximum value of M in MVAL.
-*
-* BD (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* BE (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* S1 (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* S2 (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* X (workspace) DOUBLE PRECISION array, dimension (LDX,NRHS)
-*
-* LDX (input) INTEGER
-* The leading dimension of the arrays X, Y, and Z.
-* LDX >= max(1,MMAX)
-*
-* Y (workspace) DOUBLE PRECISION array, dimension (LDX,NRHS)
-*
-* Z (workspace) DOUBLE PRECISION array, dimension (LDX,NRHS)
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDQ,MMAX)
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,MMAX).
-*
-* PT (workspace) DOUBLE PRECISION array, dimension (LDPT,NMAX)
-*
-* LDPT (input) INTEGER
-* The leading dimension of the arrays PT, U, and V.
-* LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).
-*
-* U (workspace) DOUBLE PRECISION array, dimension
-* (LDPT,max(min(MVAL(j),NVAL(j))))
-*
-* V (workspace) DOUBLE PRECISION array, dimension
-* (LDPT,max(min(MVAL(j),NVAL(j))))
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all
-* pairs (M,N)=(MM(j),NN(j))
-*
-* IWORK (workspace) INTEGER array, dimension at least 8*min(M,N)
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some MM(j) < 0
-* -3: Some NN(j) < 0
-* -4: NTYPES < 0
-* -6: NRHS < 0
-* -8: THRESH < 0
-* -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
-* -17: LDB < 1 or LDB < MMAX.
-* -21: LDQ < 1 or LDQ < MMAX.
-* -23: LDPT< 1 or LDPT< MNMAX.
-* -27: LWORK too small.
-* If DLATMR, SLATMS, DGEBRD, DORGBR, or DBDSQR,
-* returns an error code, the
-* absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* MMAX Largest value in NN.
-* NMAX Largest value in NN.
-* MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal
-* matrix.)
-* MNMAX The maximum value of MNMIN for j=1,...,NSIZES.
-* NFAIL The number of tests which have exceeded THRESH
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* ULP, ULPINV Finest relative precision and its inverse.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dchkbk.f b/TESTING/EIG/dchkbk.f
index e474fba2..d21c76a1 100644
--- a/TESTING/EIG/dchkbk.f
+++ b/TESTING/EIG/dchkbk.f
@@ -1,28 +1,70 @@
- SUBROUTINE DCHKBK( NIN, NOUT )
+*> \brief \b DCHKBK
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKBK( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* DCHKBK tests DGEBAK, a routine for backward transformation of
-* the computed right or left eigenvectors if the orginal matrix
-* was preprocessed by balance subroutine DGEBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKBK tests DGEBAK, a routine for backward transformation of
+*> the computed right or left eigenvectors if the orginal matrix
+*> was preprocessed by balance subroutine DGEBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DCHKBK( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/dchkbl.f b/TESTING/EIG/dchkbl.f
index a3c07499..92cf4f1a 100644
--- a/TESTING/EIG/dchkbl.f
+++ b/TESTING/EIG/dchkbl.f
@@ -1,27 +1,69 @@
- SUBROUTINE DCHKBL( NIN, NOUT )
+*> \brief \b DCHKBL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKBL( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* DCHKBL tests DGEBAL, a routine for balancing a general real
-* matrix and isolating some of its eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKBL tests DGEBAL, a routine for balancing a general real
+*> matrix and isolating some of its eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DCHKBL( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/dchkec.f b/TESTING/EIG/dchkec.f
index 1b57c8a8..387881e9 100644
--- a/TESTING/EIG/dchkec.f
+++ b/TESTING/EIG/dchkec.f
@@ -1,43 +1,93 @@
- SUBROUTINE DCHKEC( THRESH, TSTERR, NIN, NOUT )
+*> \brief \b DCHKEC
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL TSTERR
- INTEGER NIN, NOUT
- DOUBLE PRECISION THRESH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DCHKEC( THRESH, TSTERR, NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NIN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+*
* Purpose
* =======
*
-* DCHKEC tests eigen- condition estimation routines
-* DLALN2, DLASY2, DLANV2, DLAQTR, DLAEXC,
-* DTRSYL, DTREXC, DTRSNA, DTRSEN
-*
-* In all cases, the routine runs through a fixed set of numerical
-* examples, subjects them to various tests, and compares the test
-* results to a threshold THRESH. In addition, DTREXC, DTRSNA and DTRSEN
-* are tested by reading in precomputed examples from a file (on input
-* unit NIN). Output is written to output unit NOUT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKEC tests eigen- condition estimation routines
+*> DLALN2, DLASY2, DLANV2, DLAQTR, DLAEXC,
+*> DTRSYL, DTREXC, DTRSNA, DTRSEN
+*>
+*> In all cases, the routine runs through a fixed set of numerical
+*> examples, subjects them to various tests, and compares the test
+*> results to a threshold THRESH. In addition, DTREXC, DTRSNA and DTRSEN
+*> are tested by reading in precomputed examples from a file (on input
+*> unit NIN). Output is written to output unit NOUT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* THRESH (input) DOUBLE PRECISION
-* Threshold for residual tests. A computed test ratio passes
-* the threshold if it is less than THRESH.
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> Threshold for residual tests. A computed test ratio passes
+*> the threshold if it is less than THRESH.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
+*> \date November 2011
*
-* NIN (input) INTEGER
-* The logical unit number for input.
+*> \ingroup double_eig
*
-* NOUT (input) INTEGER
-* The logical unit number for output.
+* =====================================================================
+ SUBROUTINE DCHKEC( THRESH, TSTERR, NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NIN, NOUT
+ DOUBLE PRECISION THRESH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dchkee.f b/TESTING/EIG/dchkee.f
index 2df71a32..ba2d0d8a 100644
--- a/TESTING/EIG/dchkee.f
+++ b/TESTING/EIG/dchkee.f
@@ -1,1014 +1,1049 @@
- PROGRAM DCHKEE
-*
-* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
-*
-* Purpose
-* =======
-*
-* DCHKEE tests the DOUBLE PRECISION LAPACK subroutines for the matrix
-* eigenvalue problem. The test paths in this version are
-*
-* NEP (Nonsymmetric Eigenvalue Problem):
-* Test DGEHRD, DORGHR, DHSEQR, DTREVC, DHSEIN, and DORMHR
-*
-* SEP (Symmetric Eigenvalue Problem):
-* Test DSYTRD, DORGTR, DSTEQR, DSTERF, DSTEIN, DSTEDC,
-* and drivers DSYEV(X), DSBEV(X), DSPEV(X), DSTEV(X),
-* DSYEVD, DSBEVD, DSPEVD, DSTEVD
-*
-* SVD (Singular Value Decomposition):
-* Test DGEBRD, DORGBR, DBDSQR, DBDSDC
-* and the drivers DGESVD, DGESDD
-*
-* DEV (Nonsymmetric Eigenvalue/eigenvector Driver):
-* Test DGEEV
-*
-* DES (Nonsymmetric Schur form Driver):
-* Test DGEES
-*
-* DVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
-* Test DGEEVX
-*
-* DSX (Nonsymmetric Schur form Expert Driver):
-* Test DGEESX
-*
-* DGG (Generalized Nonsymmetric Eigenvalue Problem):
-* Test DGGHRD, DGGBAL, DGGBAK, DHGEQZ, and DTGEVC
-* and the driver routines DGEGS and DGEGV
-*
-* DGS (Generalized Nonsymmetric Schur form Driver):
-* Test DGGES
-*
-* DGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
-* Test DGGEV
-*
-* DGX (Generalized Nonsymmetric Schur form Expert Driver):
-* Test DGGESX
-*
-* DXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
-* Test DGGEVX
-*
-* DSG (Symmetric Generalized Eigenvalue Problem):
-* Test DSYGST, DSYGV, DSYGVD, DSYGVX, DSPGST, DSPGV, DSPGVD,
-* DSPGVX, DSBGST, DSBGV, DSBGVD, and DSBGVX
-*
-* DSB (Symmetric Band Eigenvalue Problem):
-* Test DSBTRD
-*
-* DBB (Band Singular Value Decomposition):
-* Test DGBBRD
-*
-* DEC (Eigencondition estimation):
-* Test DLALN2, DLASY2, DLAEQU, DLAEXC, DTRSYL, DTREXC, DTRSNA,
-* DTRSEN, and DLAQTR
-*
-* DBL (Balancing a general matrix)
-* Test DGEBAL
-*
-* DBK (Back transformation on a balanced matrix)
-* Test DGEBAK
-*
-* DGL (Balancing a matrix pair)
-* Test DGGBAL
-*
-* DGK (Back transformation on a matrix pair)
-* Test DGGBAK
-*
-* GLM (Generalized Linear Regression Model):
-* Tests DGGGLM
-*
-* GQR (Generalized QR and RQ factorizations):
-* Tests DGGQRF and DGGRQF
-*
-* GSV (Generalized Singular Value Decomposition):
-* Tests DGGSVD, DGGSVP, DTGSJA, DLAGS2, DLAPLL, and DLAPMT
-*
-* CSD (CS decomposition):
-* Tests DORCSD
-*
-* LSE (Constrained Linear Least Squares):
-* Tests DGGLSE
-*
-* Each test path has a different set of inputs, but the data sets for
-* the driver routines xEV, xES, xVX, and xSX can be concatenated in a
-* single input file. The first line of input should contain one of the
-* 3-character path names in columns 1-3. The number of remaining lines
-* depends on what is found on the first line.
-*
-* The number of matrix types used in testing is often controllable from
-* the input file. The number of matrix types for each path, and the
-* test routine that describes them, is as follows:
-*
-* Path name(s) Types Test routine
-*
-* DHS or NEP 21 DCHKHS
-* DST or SEP 21 DCHKST (routines)
-* 18 DDRVST (drivers)
-* DBD or SVD 16 DCHKBD (routines)
-* 5 DDRVBD (drivers)
-* DEV 21 DDRVEV
-* DES 21 DDRVES
-* DVX 21 DDRVVX
-* DSX 21 DDRVSX
-* DGG 26 DCHKGG (routines)
-* 26 DDRVGG (drivers)
-* DGS 26 DDRGES
-* DGX 5 DDRGSX
-* DGV 26 DDRGEV
-* DXV 2 DDRGVX
-* DSG 21 DDRVSG
-* DSB 15 DCHKSB
-* DBB 15 DCHKBB
-* DEC - DCHKEC
-* DBL - DCHKBL
-* DBK - DCHKBK
-* DGL - DCHKGL
-* DGK - DCHKGK
-* GLM 8 DCKGLM
-* GQR 8 DCKGQR
-* GSV 8 DCKGSV
-* CSD 3 DCKCSD
-* LSE 8 DCKLSE
-*
-*-----------------------------------------------------------------------
-*
-* NEP input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, NX, NS, and
-* MAXB.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 7: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 8: INMIN, INTEGER array, dimension (NPARMS)
-* LAHQR vs TTQRE crossover point, >= 11
-*
-* line 9: INWIN, INTEGER array, dimension (NPARMS)
-* recommended deflation window size
-*
-* line 10: INIBL, INTEGER array, dimension (NPARMS)
-* nibble crossover point
-*
-* line 11: ISHFTS, INTEGER array, dimension (NPARMS)
-* number of simultaneous shifts)
-*
-* line 12: IACC22, INTEGER array, dimension (NPARMS)
-* select structured matrix multiply: 0, 1 or 2)
-*
-* line 13: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold. To have all of the test
-* ratios printed, use THRESH = 0.0 .
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
-* the user to specify the matrix types. Each line contains
-* a 3-character path name in columns 1-3, and the number
-* of matrix types must be the first nonblank item in columns
-* 4-80. If the number of matrix types is at least 1 but is
-* less than the maximum number of possible types, a second
-* line will be read to get the numbers of the matrix types to
-* be used. For example,
-* NEP 21
-* requests all of the matrix types for the nonsymmetric
-* eigenvalue problem, while
-* NEP 4
-* 9 10 11 12
-* requests only matrices of type 9, 10, 11, and 12.
-*
-* The valid 3-character path names are 'NEP' or 'SHS' for the
-* nonsymmetric eigenvalue routines.
-*
-*-----------------------------------------------------------------------
-*
-* SEP or DSG input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, and NX.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 7: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 8: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 9: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 10: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 11: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 12: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 12 was 2:
-*
-* line 13: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 13-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path names are 'SEP' or 'SST' for the
-* symmetric eigenvalue routines and driver routines, and
-* 'DSG' for the routines for the symmetric generalized
-* eigenvalue problem.
-*
-*-----------------------------------------------------------------------
-*
-* SVD input file:
-*
-* line 2: NN, INTEGER
-* Number of values of M and N.
-*
-* line 3: MVAL, INTEGER array, dimension (NN)
-* The values for the matrix row dimension M.
-*
-* line 4: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix column dimension N.
-*
-* line 5: NPARMS, INTEGER
-* Number of values of the parameter NB, NBMIN, NX, and NRHS.
-*
-* line 6: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 7: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 8: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 9: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of right hand sides NRHS.
-*
-* line 10: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 11: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 12: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 13: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 15-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path names are 'SVD' or 'SBD' for both the
-* SVD routines and the SVD driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* DEV and DES data files:
-*
-* line 1: 'DEV' or 'DES' in columns 1 to 3.
-*
-* line 2: NSIZES, INTEGER
-* Number of sizes of matrices to use. Should be at least 0
-* and at most 20. If NSIZES = 0, no testing is done
-* (although the remaining 3 lines are still read).
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-* Dimensions of matrices to be tested.
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHSEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 5: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* If it is 0., all test case data will be printed.
-*
-* line 6: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9 and following: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'DEV' to test SGEEV, or
-* 'DES' to test SGEES.
-*
-*-----------------------------------------------------------------------
-*
-* The DVX data has two parts. The first part is identical to DEV,
-* and the second part consists of test matrices with precomputed
-* solutions.
-*
-* line 1: 'DVX' in columns 1-3.
-*
-* line 2: NSIZES, INTEGER
-* If NSIZES = 0, no testing of randomly generated examples
-* is done, but any precomputed examples are tested.
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-*
-* line 5: THRESH, REAL
-*
-* line 6: TSTERR, LOGICAL
-*
-* line 7: NEWSD, INTEGER
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-*
-* lines 9 and following: The first line contains 'DVX' in columns 1-3
-* followed by the number of matrix types, possibly with
-* a second line to specify certain matrix types.
-* If the number of matrix types = 0, no testing of randomly
-* generated examples is done, but any precomputed examples
-* are tested.
-*
-* remaining lines : Each matrix is stored on 1+2*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next N lines contain the matrix, one
-* row per line. The last N lines correspond to each
-* eigenvalue. Each of these last N lines contains 4 real
-* values: the real part of the eigenvalue, the imaginary
-* part of the eigenvalue, the reciprocal condition number of
-* the eigenvalues, and the reciprocal condition number of the
-* eigenvector. The end of data is indicated by dimension N=0.
-* Even if no data is to be tested, there must be at least one
-* line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* The DSX data is like DVX. The first part is identical to DEV, and the
-* second part consists of test matrices with precomputed solutions.
-*
-* line 1: 'DSX' in columns 1-3.
-*
-* line 2: NSIZES, INTEGER
-* If NSIZES = 0, no testing of randomly generated examples
-* is done, but any precomputed examples are tested.
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-*
-* line 5: THRESH, REAL
-*
-* line 6: TSTERR, LOGICAL
-*
-* line 7: NEWSD, INTEGER
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-*
-* lines 9 and following: The first line contains 'DSX' in columns 1-3
-* followed by the number of matrix types, possibly with
-* a second line to specify certain matrix types.
-* If the number of matrix types = 0, no testing of randomly
-* generated examples is done, but any precomputed examples
-* are tested.
-*
-* remaining lines : Each matrix is stored on 3+N lines, where N is its
-* dimension. The first line contains the dimension N and the
-* dimension M of an invariant subspace. The second line
-* contains M integers, identifying the eigenvalues in the
-* invariant subspace (by their position in a list of
-* eigenvalues ordered by increasing real part). The next N
-* lines contain the matrix. The last line contains the
-* reciprocal condition number for the average of the selected
-* eigenvalues, and the reciprocal condition number for the
-* corresponding right invariant subspace. The end of data is
-* indicated by a line containing N=0 and M=0. Even if no data
-* is to be tested, there must be at least one line containing
-* N=0 and M=0.
-*
-*-----------------------------------------------------------------------
-*
-* DGG input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, NS, MAXB, and
-* NBCOL.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for NBMIN, the minimum row dimension for blocks.
-*
-* line 7: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of shifts.
-*
-* line 8: MXBVAL, INTEGER array, dimension (NPARMS)
-* The values for MAXB, used in determining minimum blocksize.
-*
-* line 9: NBCOL, INTEGER array, dimension (NPARMS)
-* The values for NBCOL, the minimum column dimension for
-* blocks.
-*
-* line 10: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 11: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 12: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 13: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
+*> \brief \b DCHKEE
*
-* lines 15-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'DGG' for the generalized
-* eigenvalue problem routines and driver routines.
+* =========== DOCUMENTATION ===========
*
-*-----------------------------------------------------------------------
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* DGS and DGV input files:
+* Definition
+* ==========
*
-* line 1: 'DGS' or 'DGV' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension(NN)
-* Dimensions of matrices to be tested.
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 5: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* If it is 0., all test case data will be printed.
-*
-* line 6: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 17 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 7-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'DGS' for the generalized
-* eigenvalue problem routines and driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* DXV input files:
-*
-* line 1: 'DXV' in columns 1 to 3.
-*
-* line 2: N, INTEGER
-* Value of N.
-*
-* line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 4: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* Information will be printed about each test for which the
-* test ratio is greater than or equal to the threshold.
-*
-* line 5: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* If line 2 was 0:
-*
-* line 7-EOF: Precomputed examples are tested.
-*
-* remaining lines : Each example is stored on 3+2*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next N lines contain the matrix A, one
-* row per line. The next N lines contain the matrix B. The
-* next line contains the reciprocals of the eigenvalue
-* condition numbers. The last line contains the reciprocals of
-* the eigenvector condition numbers. The end of data is
-* indicated by dimension N=0. Even if no data is to be tested,
-* there must be at least one line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* DGX input files:
-*
-* line 1: 'DGX' in columns 1 to 3.
-*
-* line 2: N, INTEGER
-* Value of N.
-*
-* line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 4: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* Information will be printed about each test for which the
-* test ratio is greater than or equal to the threshold.
-*
-* line 5: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* If line 2 was 0:
-*
-* line 7-EOF: Precomputed examples are tested.
-*
-* remaining lines : Each example is stored on 3+2*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next line contains an integer k such
-* that only the last k eigenvalues will be selected and appear
-* in the leading diagonal blocks of $A$ and $B$. The next N
-* lines contain the matrix A, one row per line. The next N
-* lines contain the matrix B. The last line contains the
-* reciprocal of the eigenvalue cluster condition number and the
-* reciprocal of the deflating subspace (associated with the
-* selected eigencluster) condition number. The end of data is
-* indicated by dimension N=0. Even if no data is to be tested,
-* there must be at least one line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* DSB input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NK, INTEGER
-* Number of values of K.
-*
-* line 5: KVAL, INTEGER array, dimension (NK)
-* The values for the matrix dimension K.
-*
-* line 6: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 8-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'DSB'.
-*
-*-----------------------------------------------------------------------
-*
-* DBB input file:
-*
-* line 2: NN, INTEGER
-* Number of values of M and N.
-*
-* line 3: MVAL, INTEGER array, dimension (NN)
-* The values for the matrix row dimension M.
-*
-* line 4: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix column dimension N.
-*
-* line 4: NK, INTEGER
-* Number of values of K.
-*
-* line 5: KVAL, INTEGER array, dimension (NK)
-* The values for the matrix bandwidth K.
-*
-* line 6: NPARMS, INTEGER
-* Number of values of the parameter NRHS
-*
-* line 7: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of right hand sides NRHS.
-*
-* line 8: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 9: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 9 was 2:
-*
-* line 10: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 10-EOF: Lines specifying matrix types, as for SVD.
-* The 3-character path name is 'DBB'.
-*
-*-----------------------------------------------------------------------
-*
-* DEC input file:
-*
-* line 2: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* lines 3-EOF:
-*
-* Input for testing the eigencondition routines consists of a set of
-* specially constructed test cases and their solutions. The data
-* format is not intended to be modified by the user.
-*
-*-----------------------------------------------------------------------
-*
-* DBL and DBK input files:
-*
-* line 1: 'DBL' in columns 1-3 to test SGEBAL, or 'DBK' in
-* columns 1-3 to test SGEBAK.
-*
-* The remaining lines consist of specially constructed test cases.
-*
-*-----------------------------------------------------------------------
-*
-* DGL and DGK input files:
-*
-* line 1: 'DGL' in columns 1-3 to test DGGBAL, or 'DGK' in
-* columns 1-3 to test DGGBAK.
-*
-* The remaining lines consist of specially constructed test cases.
-*
-*-----------------------------------------------------------------------
-*
-* GLM data file:
-*
-* line 1: 'GLM' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M (row dimension).
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P (row dimension).
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N (column dimension), note M <= N <= M+P.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GLM' for the generalized
-* linear regression model routines.
-*
-*-----------------------------------------------------------------------
-*
-* GQR data file:
-*
-* line 1: 'GQR' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M.
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P.
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GQR' for the generalized
-* QR and RQ routines.
-*
-*-----------------------------------------------------------------------
-*
-* GSV data file:
-*
-* line 1: 'GSV' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M (row dimension).
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P (row dimension).
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N (column dimension).
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GSV' for the generalized
-* SVD routines.
-*
-*-----------------------------------------------------------------------
-*
-* CSD data file:
-*
-* line 1: 'CSD' in columns 1 to 3.
-*
-* line 2: NM, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NM)
-* Values of M (row and column dimension of orthogonal matrix).
-*
-* line 4: PVAL, INTEGER array, dimension(NM)
-* Values of P (row dimension of top-left block).
-*
-* line 5: NVAL, INTEGER array, dimension(NM)
-* Values of N (column dimension of top-left block).
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'CSD' for the CSD routine.
-*
-*-----------------------------------------------------------------------
-*
-* LSE data file:
-*
-* line 1: 'LSE' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M.
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P.
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N, note P <= N <= P+M.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
+* PROGRAM DCHKEE
+*
+* Purpose
+* =======
*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKEE tests the DOUBLE PRECISION LAPACK subroutines for the matrix
+*> eigenvalue problem. The test paths in this version are
+*>
+*> NEP (Nonsymmetric Eigenvalue Problem):
+*> Test DGEHRD, DORGHR, DHSEQR, DTREVC, DHSEIN, and DORMHR
+*>
+*> SEP (Symmetric Eigenvalue Problem):
+*> Test DSYTRD, DORGTR, DSTEQR, DSTERF, DSTEIN, DSTEDC,
+*> and drivers DSYEV(X), DSBEV(X), DSPEV(X), DSTEV(X),
+*> DSYEVD, DSBEVD, DSPEVD, DSTEVD
+*>
+*> SVD (Singular Value Decomposition):
+*> Test DGEBRD, DORGBR, DBDSQR, DBDSDC
+*> and the drivers DGESVD, DGESDD
+*>
+*> DEV (Nonsymmetric Eigenvalue/eigenvector Driver):
+*> Test DGEEV
+*>
+*> DES (Nonsymmetric Schur form Driver):
+*> Test DGEES
+*>
+*> DVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
+*> Test DGEEVX
+*>
+*> DSX (Nonsymmetric Schur form Expert Driver):
+*> Test DGEESX
+*>
+*> DGG (Generalized Nonsymmetric Eigenvalue Problem):
+*> Test DGGHRD, DGGBAL, DGGBAK, DHGEQZ, and DTGEVC
+*> and the driver routines DGEGS and DGEGV
+*>
+*> DGS (Generalized Nonsymmetric Schur form Driver):
+*> Test DGGES
+*>
+*> DGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
+*> Test DGGEV
+*>
+*> DGX (Generalized Nonsymmetric Schur form Expert Driver):
+*> Test DGGESX
+*>
+*> DXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
+*> Test DGGEVX
+*>
+*> DSG (Symmetric Generalized Eigenvalue Problem):
+*> Test DSYGST, DSYGV, DSYGVD, DSYGVX, DSPGST, DSPGV, DSPGVD,
+*> DSPGVX, DSBGST, DSBGV, DSBGVD, and DSBGVX
+*>
+*> DSB (Symmetric Band Eigenvalue Problem):
+*> Test DSBTRD
+*>
+*> DBB (Band Singular Value Decomposition):
+*> Test DGBBRD
+*>
+*> DEC (Eigencondition estimation):
+*> Test DLALN2, DLASY2, DLAEQU, DLAEXC, DTRSYL, DTREXC, DTRSNA,
+*> DTRSEN, and DLAQTR
+*>
+*> DBL (Balancing a general matrix)
+*> Test DGEBAL
+*>
+*> DBK (Back transformation on a balanced matrix)
+*> Test DGEBAK
+*>
+*> DGL (Balancing a matrix pair)
+*> Test DGGBAL
+*>
+*> DGK (Back transformation on a matrix pair)
+*> Test DGGBAK
+*>
+*> GLM (Generalized Linear Regression Model):
+*> Tests DGGGLM
+*>
+*> GQR (Generalized QR and RQ factorizations):
+*> Tests DGGQRF and DGGRQF
+*>
+*> GSV (Generalized Singular Value Decomposition):
+*> Tests DGGSVD, DGGSVP, DTGSJA, DLAGS2, DLAPLL, and DLAPMT
+*>
+*> CSD (CS decomposition):
+*> Tests DORCSD
+*>
+*> LSE (Constrained Linear Least Squares):
+*> Tests DGGLSE
+*>
+*> Each test path has a different set of inputs, but the data sets for
+*> the driver routines xEV, xES, xVX, and xSX can be concatenated in a
+*> single input file. The first line of input should contain one of the
+*> 3-character path names in columns 1-3. The number of remaining lines
+*> depends on what is found on the first line.
+*>
+*> The number of matrix types used in testing is often controllable from
+*> the input file. The number of matrix types for each path, and the
+*> test routine that describes them, is as follows:
+*>
+*> Path name(s) Types Test routine
+*>
+*> DHS or NEP 21 DCHKHS
+*> DST or SEP 21 DCHKST (routines)
+*> 18 DDRVST (drivers)
+*> DBD or SVD 16 DCHKBD (routines)
+*> 5 DDRVBD (drivers)
+*> DEV 21 DDRVEV
+*> DES 21 DDRVES
+*> DVX 21 DDRVVX
+*> DSX 21 DDRVSX
+*> DGG 26 DCHKGG (routines)
+*> 26 DDRVGG (drivers)
+*> DGS 26 DDRGES
+*> DGX 5 DDRGSX
+*> DGV 26 DDRGEV
+*> DXV 2 DDRGVX
+*> DSG 21 DDRVSG
+*> DSB 15 DCHKSB
+*> DBB 15 DCHKBB
+*> DEC - DCHKEC
+*> DBL - DCHKBL
+*> DBK - DCHKBK
+*> DGL - DCHKGL
+*> DGK - DCHKGK
+*> GLM 8 DCKGLM
+*> GQR 8 DCKGQR
+*> GSV 8 DCKGSV
+*> CSD 3 DCKCSD
+*> LSE 8 DCKLSE
+*>
+*>-----------------------------------------------------------------------
+*>
+*> NEP input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, NX, NS, and
+*> MAXB.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 7: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 8: INMIN, INTEGER array, dimension (NPARMS)
+*> LAHQR vs TTQRE crossover point, >= 11
+*>
+*> line 9: INWIN, INTEGER array, dimension (NPARMS)
+*> recommended deflation window size
+*>
+*> line 10: INIBL, INTEGER array, dimension (NPARMS)
+*> nibble crossover point
+*>
+*> line 11: ISHFTS, INTEGER array, dimension (NPARMS)
+*> number of simultaneous shifts)
+*>
+*> line 12: IACC22, INTEGER array, dimension (NPARMS)
+*> select structured matrix multiply: 0, 1 or 2)
+*>
+*> line 13: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold. To have all of the test
+*> ratios printed, use THRESH = 0.0 .
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
+*> the user to specify the matrix types. Each line contains
+*> a 3-character path name in columns 1-3, and the number
+*> of matrix types must be the first nonblank item in columns
+*> 4-80. If the number of matrix types is at least 1 but is
+*> less than the maximum number of possible types, a second
+*> line will be read to get the numbers of the matrix types to
+*> be used. For example,
+*> NEP 21
+*> requests all of the matrix types for the nonsymmetric
+*> eigenvalue problem, while
+*> NEP 4
+*> 9 10 11 12
+*> requests only matrices of type 9, 10, 11, and 12.
+*>
+*> The valid 3-character path names are 'NEP' or 'SHS' for the
+*> nonsymmetric eigenvalue routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SEP or DSG input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, and NX.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 7: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 8: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 9: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 10: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 11: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 12: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 12 was 2:
+*>
+*> line 13: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 13-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path names are 'SEP' or 'SST' for the
+*> symmetric eigenvalue routines and driver routines, and
+*> 'DSG' for the routines for the symmetric generalized
+*> eigenvalue problem.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SVD input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension (NN)
+*> The values for the matrix row dimension M.
+*>
+*> line 4: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix column dimension N.
+*>
+*> line 5: NPARMS, INTEGER
+*> Number of values of the parameter NB, NBMIN, NX, and NRHS.
+*>
+*> line 6: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 7: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 8: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 9: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of right hand sides NRHS.
+*>
+*> line 10: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 11: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 12: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 13: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path names are 'SVD' or 'SBD' for both the
+*> SVD routines and the SVD driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DEV and DES data files:
+*>
+*> line 1: 'DEV' or 'DES' in columns 1 to 3.
+*>
+*> line 2: NSIZES, INTEGER
+*> Number of sizes of matrices to use. Should be at least 0
+*> and at most 20. If NSIZES = 0, no testing is done
+*> (although the remaining 3 lines are still read).
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*> Dimensions of matrices to be tested.
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHSEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 5: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> If it is 0., all test case data will be printed.
+*>
+*> line 6: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9 and following: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'DEV' to test SGEEV, or
+*> 'DES' to test SGEES.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> The DVX data has two parts. The first part is identical to DEV,
+*> and the second part consists of test matrices with precomputed
+*> solutions.
+*>
+*> line 1: 'DVX' in columns 1-3.
+*>
+*> line 2: NSIZES, INTEGER
+*> If NSIZES = 0, no testing of randomly generated examples
+*> is done, but any precomputed examples are tested.
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*>
+*> line 5: THRESH, REAL
+*>
+*> line 6: TSTERR, LOGICAL
+*>
+*> line 7: NEWSD, INTEGER
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*>
+*> lines 9 and following: The first line contains 'DVX' in columns 1-3
+*> followed by the number of matrix types, possibly with
+*> a second line to specify certain matrix types.
+*> If the number of matrix types = 0, no testing of randomly
+*> generated examples is done, but any precomputed examples
+*> are tested.
+*>
+*> remaining lines : Each matrix is stored on 1+2*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next N lines contain the matrix, one
+*> row per line. The last N lines correspond to each
+*> eigenvalue. Each of these last N lines contains 4 real
+*> values: the real part of the eigenvalue, the imaginary
+*> part of the eigenvalue, the reciprocal condition number of
+*> the eigenvalues, and the reciprocal condition number of the
+*> eigenvector. The end of data is indicated by dimension N=0.
+*> Even if no data is to be tested, there must be at least one
+*> line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> The DSX data is like DVX. The first part is identical to DEV, and the
+*> second part consists of test matrices with precomputed solutions.
+*>
+*> line 1: 'DSX' in columns 1-3.
+*>
+*> line 2: NSIZES, INTEGER
+*> If NSIZES = 0, no testing of randomly generated examples
+*> is done, but any precomputed examples are tested.
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*>
+*> line 5: THRESH, REAL
+*>
+*> line 6: TSTERR, LOGICAL
+*>
+*> line 7: NEWSD, INTEGER
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*>
+*> lines 9 and following: The first line contains 'DSX' in columns 1-3
+*> followed by the number of matrix types, possibly with
+*> a second line to specify certain matrix types.
+*> If the number of matrix types = 0, no testing of randomly
+*> generated examples is done, but any precomputed examples
+*> are tested.
+*>
+*> remaining lines : Each matrix is stored on 3+N lines, where N is its
+*> dimension. The first line contains the dimension N and the
+*> dimension M of an invariant subspace. The second line
+*> contains M integers, identifying the eigenvalues in the
+*> invariant subspace (by their position in a list of
+*> eigenvalues ordered by increasing real part). The next N
+*> lines contain the matrix. The last line contains the
+*> reciprocal condition number for the average of the selected
+*> eigenvalues, and the reciprocal condition number for the
+*> corresponding right invariant subspace. The end of data is
+*> indicated by a line containing N=0 and M=0. Even if no data
+*> is to be tested, there must be at least one line containing
+*> N=0 and M=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DGG input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, NS, MAXB, and
+*> NBCOL.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for NBMIN, the minimum row dimension for blocks.
+*>
+*> line 7: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of shifts.
+*>
+*> line 8: MXBVAL, INTEGER array, dimension (NPARMS)
+*> The values for MAXB, used in determining minimum blocksize.
+*>
+*> line 9: NBCOL, INTEGER array, dimension (NPARMS)
+*> The values for NBCOL, the minimum column dimension for
+*> blocks.
+*>
+*> line 10: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 11: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 12: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 13: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'DGG' for the generalized
+*> eigenvalue problem routines and driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DGS and DGV input files:
+*>
+*> line 1: 'DGS' or 'DGV' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension(NN)
+*> Dimensions of matrices to be tested.
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 5: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> If it is 0., all test case data will be printed.
+*>
+*> line 6: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 17 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 7-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'DGS' for the generalized
+*> eigenvalue problem routines and driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DXV input files:
+*>
+*> line 1: 'DXV' in columns 1 to 3.
+*>
+*> line 2: N, INTEGER
+*> Value of N.
+*>
+*> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 4: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> Information will be printed about each test for which the
+*> test ratio is greater than or equal to the threshold.
+*>
+*> line 5: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> If line 2 was 0:
+*>
+*> line 7-EOF: Precomputed examples are tested.
+*>
+*> remaining lines : Each example is stored on 3+2*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next N lines contain the matrix A, one
+*> row per line. The next N lines contain the matrix B. The
+*> next line contains the reciprocals of the eigenvalue
+*> condition numbers. The last line contains the reciprocals of
+*> the eigenvector condition numbers. The end of data is
+*> indicated by dimension N=0. Even if no data is to be tested,
+*> there must be at least one line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DGX input files:
+*>
+*> line 1: 'DGX' in columns 1 to 3.
+*>
+*> line 2: N, INTEGER
+*> Value of N.
+*>
+*> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 4: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> Information will be printed about each test for which the
+*> test ratio is greater than or equal to the threshold.
+*>
+*> line 5: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> If line 2 was 0:
+*>
+*> line 7-EOF: Precomputed examples are tested.
+*>
+*> remaining lines : Each example is stored on 3+2*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next line contains an integer k such
+*> that only the last k eigenvalues will be selected and appear
+*> in the leading diagonal blocks of $A$ and $B$. The next N
+*> lines contain the matrix A, one row per line. The next N
+*> lines contain the matrix B. The last line contains the
+*> reciprocal of the eigenvalue cluster condition number and the
+*> reciprocal of the deflating subspace (associated with the
+*> selected eigencluster) condition number. The end of data is
+*> indicated by dimension N=0. Even if no data is to be tested,
+*> there must be at least one line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DSB input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NK, INTEGER
+*> Number of values of K.
+*>
+*> line 5: KVAL, INTEGER array, dimension (NK)
+*> The values for the matrix dimension K.
+*>
+*> line 6: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 8-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'DSB'.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DBB input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension (NN)
+*> The values for the matrix row dimension M.
+*>
+*> line 4: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix column dimension N.
+*>
+*> line 4: NK, INTEGER
+*> Number of values of K.
+*>
+*> line 5: KVAL, INTEGER array, dimension (NK)
+*> The values for the matrix bandwidth K.
+*>
+*> line 6: NPARMS, INTEGER
+*> Number of values of the parameter NRHS
+*>
+*> line 7: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of right hand sides NRHS.
+*>
+*> line 8: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 9: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 9 was 2:
+*>
+*> line 10: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 10-EOF: Lines specifying matrix types, as for SVD.
+*> The 3-character path name is 'DBB'.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DEC input file:
+*>
+*> line 2: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> lines 3-EOF:
+*>
+*> Input for testing the eigencondition routines consists of a set of
+*> specially constructed test cases and their solutions. The data
+*> format is not intended to be modified by the user.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DBL and DBK input files:
+*>
+*> line 1: 'DBL' in columns 1-3 to test SGEBAL, or 'DBK' in
+*> columns 1-3 to test SGEBAK.
+*>
+*> The remaining lines consist of specially constructed test cases.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> DGL and DGK input files:
+*>
+*> line 1: 'DGL' in columns 1-3 to test DGGBAL, or 'DGK' in
+*> columns 1-3 to test DGGBAK.
+*>
+*> The remaining lines consist of specially constructed test cases.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GLM data file:
+*>
+*> line 1: 'GLM' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M (row dimension).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P (row dimension).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N (column dimension), note M <= N <= M+P.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GLM' for the generalized
+*> linear regression model routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GQR data file:
+*>
+*> line 1: 'GQR' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M.
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P.
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GQR' for the generalized
+*> QR and RQ routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GSV data file:
+*>
+*> line 1: 'GSV' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M (row dimension).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P (row dimension).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N (column dimension).
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GSV' for the generalized
+*> SVD routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CSD data file:
+*>
+*> line 1: 'CSD' in columns 1 to 3.
+*>
+*> line 2: NM, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NM)
+*> Values of M (row and column dimension of orthogonal matrix).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NM)
+*> Values of P (row dimension of top-left block).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NM)
+*> Values of N (column dimension of top-left block).
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'CSD' for the CSD routine.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> LSE data file:
+*>
+*> line 1: 'LSE' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M.
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P.
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N, note P <= N <= P+M.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GSV' for the generalized
+*> SVD routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> NMAX is currently set to 132 and must be at least 12 for some of the
+*> precomputed examples, and LWORK = NMAX*(5*NMAX+5)+1 in the parameter
+*> statements below. For SVD, we assume NRHS may be as big as N. The
+*> parameter NEED is set to 14 to allow for 14 N-by-N matrices for DGG.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
*
-* If line 8 was 2:
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
+*> \date November 2011
*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GSV' for the generalized
-* SVD routines.
+*> \ingroup double_eig
*
-*-----------------------------------------------------------------------
+* =====================================================================
+ PROGRAM DCHKEE
*
-* NMAX is currently set to 132 and must be at least 12 for some of the
-* precomputed examples, and LWORK = NMAX*(5*NMAX+5)+1 in the parameter
-* statements below. For SVD, we assume NRHS may be as big as N. The
-* parameter NEED is set to 14 to allow for 14 N-by-N matrices for DGG.
+* -- LAPACK test routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/EIG/dchkgg.f b/TESTING/EIG/dchkgg.f
index edd30366..fe030bf9 100644
--- a/TESTING/EIG/dchkgg.f
+++ b/TESTING/EIG/dchkgg.f
@@ -1,3 +1,513 @@
+*> \brief \b DCHKGG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* TSTDIF, THRSHN, NOUNIT, A, LDA, B, H, T, S1,
+* S2, P1, P2, U, LDU, V, Q, Z, ALPHR1, ALPHI1,
+* BETA1, ALPHR3, ALPHI3, BETA3, EVECTL, EVECTR,
+* WORK, LWORK, LLWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTDIF
+* INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES
+* DOUBLE PRECISION THRESH, THRSHN
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * ), LLWORK( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHI1( * ), ALPHI3( * ),
+* $ ALPHR1( * ), ALPHR3( * ), B( LDA, * ),
+* $ BETA1( * ), BETA3( * ), EVECTL( LDU, * ),
+* $ EVECTR( LDU, * ), H( LDA, * ), P1( LDA, * ),
+* $ P2( LDA, * ), Q( LDU, * ), RESULT( 15 ),
+* $ S1( LDA, * ), S2( LDA, * ), T( LDA, * ),
+* $ U( LDU, * ), V( LDU, * ), WORK( * ),
+* $ Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKGG checks the nonsymmetric generalized eigenvalue problem
+*> routines.
+*> T T T
+*> DGGHRD factors A and B as U H V and U T V , where means
+*> transpose, H is hessenberg, T is triangular and U and V are
+*> orthogonal.
+*> T T
+*> DHGEQZ factors H and T as Q S Z and Q P Z , where P is upper
+*> triangular, S is in generalized Schur form (block upper triangular,
+*> with 1x1 and 2x2 blocks on the diagonal, the 2x2 blocks
+*> corresponding to complex conjugate pairs of generalized
+*> eigenvalues), and Q and Z are orthogonal. It also computes the
+*> generalized eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)),
+*> where alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus,
+*> w(j) = alpha(j)/beta(j) is a root of the generalized eigenvalue
+*> problem
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
+*> problem
+*>
+*> det( m(j) A - B ) = 0
+*>
+*> DTGEVC computes the matrix L of left eigenvectors and the matrix R
+*> of right eigenvectors for the matrix pair ( S, P ). In the
+*> description below, l and r are left and right eigenvectors
+*> corresponding to the generalized eigenvalues (alpha,beta).
+*>
+*> When DCHKGG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 15
+*> tests will be performed. The first twelve "test ratios" should be
+*> small -- O(1). They will be compared with the threshhold THRESH:
+*>
+*> T
+*> (1) | A - U H V | / ( |A| n ulp )
+*>
+*> T
+*> (2) | B - U T V | / ( |B| n ulp )
+*>
+*> T
+*> (3) | I - UU | / ( n ulp )
+*>
+*> T
+*> (4) | I - VV | / ( n ulp )
+*>
+*> T
+*> (5) | H - Q S Z | / ( |H| n ulp )
+*>
+*> T
+*> (6) | T - Q P Z | / ( |T| n ulp )
+*>
+*> T
+*> (7) | I - QQ | / ( n ulp )
+*>
+*> T
+*> (8) | I - ZZ | / ( n ulp )
+*>
+*> (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta S - alpha P) | / ( ulp max( |beta S|, |alpha P| ) )
+*>
+*> (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of
+*> T
+*> | l'**H * (beta H - alpha T) | / ( ulp max( |beta H|, |alpha T| ) )
+*>
+*> where the eigenvectors l' are the result of passing Q to
+*> DTGEVC and back transforming (HOWMNY='B').
+*>
+*> (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta S - alpha T) r | / ( ulp max( |beta S|, |alpha T| ) )
+*>
+*> (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of
+*>
+*> | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) )
+*>
+*> where the eigenvectors r' are the result of passing Z to
+*> DTGEVC and back transforming (HOWMNY='B').
+*>
+*> The last three test ratios will usually be small, but there is no
+*> mathematical requirement that they be so. They are therefore
+*> compared with THRESH only if TSTDIF is .TRUE.
+*>
+*> (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp )
+*>
+*> (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp )
+*>
+*> (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| ,
+*> |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp
+*>
+*> In addition, the normalization of L and R are checked, and compared
+*> with the threshhold THRSHN.
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) U ( J , J ) V where U and V are random orthogonal matrices.
+*>
+*> (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) U ( big*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) U ( small*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) U ( small*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) U ( big*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DCHKGG does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DCHKGG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DCHKGG to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] TSTDIF
+*> \verbatim
+*> TSTDIF is LOGICAL
+*> Specifies whether test ratios 13-15 will be computed and
+*> compared with THRESH.
+*> = .FALSE.: Only test ratios 1-12 will be computed and tested.
+*> Ratios 13-15 will be set to zero.
+*> = .TRUE.: All the test ratios 1-15 will be computed and
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] THRSHN
+*> \verbatim
+*> THRSHN is DOUBLE PRECISION
+*> Threshhold for reporting eigenvector normalization error.
+*> If the normalization of any eigenvector differs from 1 by
+*> more than THRSHN*ulp, then a special error message will be
+*> printed. (This is handled separately from the other tests,
+*> since only a compiler or programming error should cause an
+*> error message, at least if THRSHN is at least 5--10.)
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, H, T, S1, P1, S2, and P2.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The upper Hessenberg matrix computed from A by DGGHRD.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by DGGHRD.
+*> \endverbatim
+*>
+*> \param[out] S1
+*> \verbatim
+*> S1 is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The Schur (block upper triangular) matrix computed from H by
+*> DHGEQZ when Q and Z are also computed.
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The Schur (block upper triangular) matrix computed from H by
+*> DHGEQZ when Q and Z are not computed.
+*> \endverbatim
+*>
+*> \param[out] P1
+*> \verbatim
+*> P1 is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from T by DHGEQZ
+*> when Q and Z are also computed.
+*> \endverbatim
+*>
+*> \param[out] P2
+*> \verbatim
+*> P2 is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from T by DHGEQZ
+*> when Q and Z are not computed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The (left) orthogonal matrix computed by DGGHRD.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U, V, Q, Z, EVECTL, and EVEZTR. It
+*> must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The (right) orthogonal matrix computed by DGGHRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The (left) orthogonal matrix computed by DHGEQZ.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The (left) orthogonal matrix computed by DHGEQZ.
+*> \endverbatim
+*>
+*> \param[out] ALPHR1
+*> \verbatim
+*> ALPHR1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI1
+*> \verbatim
+*> ALPHI1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by DHGEQZ
+*> when Q, Z, and the full Schur matrices are computed.
+*> On exit, ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th
+*> generalized eigenvalue of the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHR3
+*> \verbatim
+*> ALPHR3 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI3
+*> \verbatim
+*> ALPHI3 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA3
+*> \verbatim
+*> BETA3 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] EVECTL
+*> \verbatim
+*> EVECTL is DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The (block lower triangular) left eigenvector matrix for
+*> the matrices in S1 and P1. (See DTGEVC for the format.)
+*> \endverbatim
+*>
+*> \param[out] EVEZTR
+*> \verbatim
+*> EVEZTR is DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The (block upper triangular) right eigenvector matrix for
+*> the matrices in S1 and P1. (See DTGEVC for the format.)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( 2 * N**2, 6*N, 1 ), for all N=NN(j).
+*> \endverbatim
+*>
+*> \param[out] LLWORK
+*> \verbatim
+*> LLWORK is LOGICAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCHKGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ TSTDIF, THRSHN, NOUNIT, A, LDA, B, H, T, S1,
$ S2, P1, P2, U, LDU, V, Q, Z, ALPHR1, ALPHI1,
@@ -5,8 +515,9 @@
$ WORK, LWORK, LLWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTDIF
@@ -26,350 +537,6 @@
$ Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKGG checks the nonsymmetric generalized eigenvalue problem
-* routines.
-* T T T
-* DGGHRD factors A and B as U H V and U T V , where means
-* transpose, H is hessenberg, T is triangular and U and V are
-* orthogonal.
-* T T
-* DHGEQZ factors H and T as Q S Z and Q P Z , where P is upper
-* triangular, S is in generalized Schur form (block upper triangular,
-* with 1x1 and 2x2 blocks on the diagonal, the 2x2 blocks
-* corresponding to complex conjugate pairs of generalized
-* eigenvalues), and Q and Z are orthogonal. It also computes the
-* generalized eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)),
-* where alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus,
-* w(j) = alpha(j)/beta(j) is a root of the generalized eigenvalue
-* problem
-*
-* det( A - w(j) B ) = 0
-*
-* and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
-* problem
-*
-* det( m(j) A - B ) = 0
-*
-* DTGEVC computes the matrix L of left eigenvectors and the matrix R
-* of right eigenvectors for the matrix pair ( S, P ). In the
-* description below, l and r are left and right eigenvectors
-* corresponding to the generalized eigenvalues (alpha,beta).
-*
-* When DCHKGG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 15
-* tests will be performed. The first twelve "test ratios" should be
-* small -- O(1). They will be compared with the threshhold THRESH:
-*
-* T
-* (1) | A - U H V | / ( |A| n ulp )
-*
-* T
-* (2) | B - U T V | / ( |B| n ulp )
-*
-* T
-* (3) | I - UU | / ( n ulp )
-*
-* T
-* (4) | I - VV | / ( n ulp )
-*
-* T
-* (5) | H - Q S Z | / ( |H| n ulp )
-*
-* T
-* (6) | T - Q P Z | / ( |T| n ulp )
-*
-* T
-* (7) | I - QQ | / ( n ulp )
-*
-* T
-* (8) | I - ZZ | / ( n ulp )
-*
-* (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta S - alpha P) | / ( ulp max( |beta S|, |alpha P| ) )
-*
-* (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of
-* T
-* | l'**H * (beta H - alpha T) | / ( ulp max( |beta H|, |alpha T| ) )
-*
-* where the eigenvectors l' are the result of passing Q to
-* DTGEVC and back transforming (HOWMNY='B').
-*
-* (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta S - alpha T) r | / ( ulp max( |beta S|, |alpha T| ) )
-*
-* (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of
-*
-* | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) )
-*
-* where the eigenvectors r' are the result of passing Z to
-* DTGEVC and back transforming (HOWMNY='B').
-*
-* The last three test ratios will usually be small, but there is no
-* mathematical requirement that they be so. They are therefore
-* compared with THRESH only if TSTDIF is .TRUE.
-*
-* (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp )
-*
-* (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp )
-*
-* (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| ,
-* |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp
-*
-* In addition, the normalization of L and R are checked, and compared
-* with the threshhold THRSHN.
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) U ( J , J ) V where U and V are random orthogonal matrices.
-*
-* (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) U ( big*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) U ( small*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) U ( small*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) U ( big*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular
-* matrices.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DCHKGG does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DCHKGG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DCHKGG to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* TSTDIF (input) LOGICAL
-* Specifies whether test ratios 13-15 will be computed and
-* compared with THRESH.
-* = .FALSE.: Only test ratios 1-12 will be computed and tested.
-* Ratios 13-15 will be set to zero.
-* = .TRUE.: All the test ratios 1-15 will be computed and
-* tested.
-*
-* THRSHN (input) DOUBLE PRECISION
-* Threshhold for reporting eigenvector normalization error.
-* If the normalization of any eigenvector differs from 1 by
-* more than THRSHN*ulp, then a special error message will be
-* printed. (This is handled separately from the other tests,
-* since only a compiler or programming error should cause an
-* error message, at least if THRSHN is at least 5--10.)
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, H, T, S1, P1, S2, and P2.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* H (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The upper Hessenberg matrix computed from A by DGGHRD.
-*
-* T (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by DGGHRD.
-*
-* S1 (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The Schur (block upper triangular) matrix computed from H by
-* DHGEQZ when Q and Z are also computed.
-*
-* S2 (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The Schur (block upper triangular) matrix computed from H by
-* DHGEQZ when Q and Z are not computed.
-*
-* P1 (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from T by DHGEQZ
-* when Q and Z are also computed.
-*
-* P2 (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from T by DHGEQZ
-* when Q and Z are not computed.
-*
-* U (workspace) DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The (left) orthogonal matrix computed by DGGHRD.
-*
-* LDU (input) INTEGER
-* The leading dimension of U, V, Q, Z, EVECTL, and EVEZTR. It
-* must be at least 1 and at least max( NN ).
-*
-* V (workspace) DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The (right) orthogonal matrix computed by DGGHRD.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The (left) orthogonal matrix computed by DHGEQZ.
-*
-* Z (workspace) DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The (left) orthogonal matrix computed by DHGEQZ.
-*
-* ALPHR1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* ALPHI1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* BETA1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-*
-* The generalized eigenvalues of (A,B) computed by DHGEQZ
-* when Q, Z, and the full Schur matrices are computed.
-* On exit, ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th
-* generalized eigenvalue of the matrices in A and B.
-*
-* ALPHR3 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* ALPHI3 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* BETA3 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-*
-* EVECTL (workspace) DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The (block lower triangular) left eigenvector matrix for
-* the matrices in S1 and P1. (See DTGEVC for the format.)
-*
-* EVEZTR (workspace) DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The (block upper triangular) right eigenvector matrix for
-* the matrices in S1 and P1. (See DTGEVC for the format.)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( 2 * N**2, 6*N, 1 ), for all N=NN(j).
-*
-* LLWORK (workspace) LOGICAL array, dimension (max(NN))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dchkgk.f b/TESTING/EIG/dchkgk.f
index dac8335d..911ab073 100644
--- a/TESTING/EIG/dchkgk.f
+++ b/TESTING/EIG/dchkgk.f
@@ -1,27 +1,69 @@
- SUBROUTINE DCHKGK( NIN, NOUT )
+*> \brief \b DCHKGK
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKGK( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* DCHKGK tests DGGBAK, a routine for backward balancing of
-* a matrix pair (A, B).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKGK tests DGGBAK, a routine for backward balancing of
+*> a matrix pair (A, B).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DCHKGK( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dchkgl.f b/TESTING/EIG/dchkgl.f
index 3466d0ea..d462140b 100644
--- a/TESTING/EIG/dchkgl.f
+++ b/TESTING/EIG/dchkgl.f
@@ -1,26 +1,68 @@
- SUBROUTINE DCHKGL( NIN, NOUT )
+*> \brief \b DCHKGL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKGL( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* DCHKGL tests DGGBAL, a routine for balancing a matrix pair (A, B).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKGL tests DGGBAL, a routine for balancing a matrix pair (A, B).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DCHKGL( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dchkhs.f b/TESTING/EIG/dchkhs.f
index 2a8ee823..d1cc39ab 100644
--- a/TESTING/EIG/dchkhs.f
+++ b/TESTING/EIG/dchkhs.f
@@ -1,3 +1,440 @@
+*> \brief \b DCHKHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, WR1,
+* WI1, WR3, WI3, EVECTL, EVECTR, EVECTY, EVECTX,
+* UU, TAU, WORK, NWORK, IWORK, SELECT, RESULT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * ), SELECT( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), EVECTL( LDU, * ),
+* $ EVECTR( LDU, * ), EVECTX( LDU, * ),
+* $ EVECTY( LDU, * ), H( LDA, * ), RESULT( 14 ),
+* $ T1( LDA, * ), T2( LDA, * ), TAU( * ),
+* $ U( LDU, * ), UU( LDU, * ), UZ( LDU, * ),
+* $ WI1( * ), WI3( * ), WORK( * ), WR1( * ),
+* $ WR3( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKHS checks the nonsymmetric eigenvalue problem routines.
+*>
+*> DGEHRD factors A as U H U' , where ' means transpose,
+*> H is hessenberg, and U is an orthogonal matrix.
+*>
+*> DORGHR generates the orthogonal matrix U.
+*>
+*> DORMHR multiplies a matrix by the orthogonal matrix U.
+*>
+*> DHSEQR factors H as Z T Z' , where Z is orthogonal and
+*> T is "quasi-triangular", and the eigenvalue vector W.
+*>
+*> DTREVC computes the left and right eigenvector matrices
+*> L and R for T.
+*>
+*> DHSEIN computes the left and right eigenvector matrices
+*> Y and X for H, using inverse iteration.
+*>
+*> When DCHKHS is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 14
+*> tests will be performed:
+*>
+*> (1) | A - U H U**T | / ( |A| n ulp )
+*>
+*> (2) | I - UU**T | / ( n ulp )
+*>
+*> (3) | H - Z T Z**T | / ( |H| n ulp )
+*>
+*> (4) | I - ZZ**T | / ( n ulp )
+*>
+*> (5) | A - UZ H (UZ)**T | / ( |A| n ulp )
+*>
+*> (6) | I - UZ (UZ)**T | / ( n ulp )
+*>
+*> (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp )
+*>
+*> (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp )
+*>
+*> (9) | TR - RW | / ( |T| |R| ulp )
+*>
+*> (10) | L**H T - W**H L | / ( |T| |L| ulp )
+*>
+*> (11) | HX - XW | / ( |H| |X| ulp )
+*>
+*> (12) | Y**H H - W**H Y | / ( |H| |Y| ulp )
+*>
+*> (13) | AX - XW | / ( |A| |X| ulp )
+*>
+*> (14) | Y**H A - W**H Y | / ( |A| |Y| ulp )
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (8) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (18) Same as (16), but multiplied by SQRT( underflow threshold )
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> (20) Same as (19), but multiplied by SQRT( overflow threshold )
+*> (21) Same as (19), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES - INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DCHKHS does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN - INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES - INTEGER
+*> The number of elements in DOTYPE. If it is zero, DCHKHS
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE - LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED - INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DCHKHS to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH - DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT - INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A - DOUBLE PRECISION array, dimension (LDA,max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> The leading dimension of A, H, T1 and T2. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> H - DOUBLE PRECISION array, dimension (LDA,max(NN))
+*> The upper hessenberg matrix computed by DGEHRD. On exit,
+*> H contains the Hessenberg form of the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> T1 - DOUBLE PRECISION array, dimension (LDA,max(NN))
+*> The Schur (="quasi-triangular") matrix computed by DHSEQR
+*> if Z is computed. On exit, T1 contains the Schur form of
+*> the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> T2 - DOUBLE PRECISION array, dimension (LDA,max(NN))
+*> The Schur matrix computed by DHSEQR when Z is not computed.
+*> This should be identical to T1.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDU - INTEGER
+*> The leading dimension of U, Z, UZ and UU. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> U - DOUBLE PRECISION array, dimension (LDU,max(NN))
+*> The orthogonal matrix computed by DGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z - DOUBLE PRECISION array, dimension (LDU,max(NN))
+*> The orthogonal matrix computed by DHSEQR.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> UZ - DOUBLE PRECISION array, dimension (LDU,max(NN))
+*> The product of U times Z.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WR1 - DOUBLE PRECISION array, dimension (max(NN))
+*> WI1 - DOUBLE PRECISION array, dimension (max(NN))
+*> The real and imaginary parts of the eigenvalues of A,
+*> as computed when Z is computed.
+*> On exit, WR1 + WI1*i are the eigenvalues of the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WR3 - DOUBLE PRECISION array, dimension (max(NN))
+*> WI3 - DOUBLE PRECISION array, dimension (max(NN))
+*> Like WR1, WI1, these arrays contain the eigenvalues of A,
+*> but those computed when DHSEQR only computes the
+*> eigenvalues, i.e., not the Schur vectors and no more of the
+*> Schur form than is necessary for computing the
+*> eigenvalues.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTL - DOUBLE PRECISION array, dimension (LDU,max(NN))
+*> The (upper triangular) left eigenvector matrix for the
+*> matrix in T1. For complex conjugate pairs, the real part
+*> is stored in one row and the imaginary part in the next.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVEZTR - DOUBLE PRECISION array, dimension (LDU,max(NN))
+*> The (upper triangular) right eigenvector matrix for the
+*> matrix in T1. For complex conjugate pairs, the real part
+*> is stored in one column and the imaginary part in the next.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTY - DOUBLE PRECISION array, dimension (LDU,max(NN))
+*> The left eigenvector matrix for the
+*> matrix in H. For complex conjugate pairs, the real part
+*> is stored in one row and the imaginary part in the next.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTX - DOUBLE PRECISION array, dimension (LDU,max(NN))
+*> The right eigenvector matrix for the
+*> matrix in H. For complex conjugate pairs, the real part
+*> is stored in one column and the imaginary part in the next.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> UU - DOUBLE PRECISION array, dimension (LDU,max(NN))
+*> Details of the orthogonal matrix computed by DGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> TAU - DOUBLE PRECISION array, dimension(max(NN))
+*> Further details of the orthogonal matrix computed by DGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK - DOUBLE PRECISION array, dimension (NWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> NWORK - INTEGER
+*> The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2.
+*> \endverbatim
+*> \verbatim
+*> IWORK - INTEGER array, dimension (max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> SELECT - LOGICAL array, dimension (max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT - DOUBLE PRECISION array, dimension (14)
+*> The values computed by the fourteen tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -14: LDU < 1 or LDU < NMAX.
+*> -28: NWORK too small.
+*> If DLATMR, SLATMS, or SLATME returns an error code, the
+*> absolute value of it is returned.
+*> If 1, then DHSEQR could not find all the shifts.
+*> If 2, then the EISPACK code (for small blocks) failed.
+*> If >2, then 30*N iterations were not enough to find an
+*> eigenvalue or to decompose the problem.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> MTEST The number of tests defined: care must be taken
+*> that (1) the size of RESULT, (2) the number of
+*> tests actually performed, and (3) MTEST agree.
+*> NTEST The number of tests performed on this matrix
+*> so far. This should be less than MTEST, and
+*> equal to it by the last test. It will be less
+*> if any of the routines being tested indicates
+*> that it could not compute the matrices that
+*> would be tested.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by DLAFTS).
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL,
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selects whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, WR1,
$ WI1, WR3, WI3, EVECTL, EVECTR, EVECTY, EVECTX,
@@ -5,8 +442,9 @@
$ INFO )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
@@ -24,356 +462,6 @@
$ WR3( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKHS checks the nonsymmetric eigenvalue problem routines.
-*
-* DGEHRD factors A as U H U' , where ' means transpose,
-* H is hessenberg, and U is an orthogonal matrix.
-*
-* DORGHR generates the orthogonal matrix U.
-*
-* DORMHR multiplies a matrix by the orthogonal matrix U.
-*
-* DHSEQR factors H as Z T Z' , where Z is orthogonal and
-* T is "quasi-triangular", and the eigenvalue vector W.
-*
-* DTREVC computes the left and right eigenvector matrices
-* L and R for T.
-*
-* DHSEIN computes the left and right eigenvector matrices
-* Y and X for H, using inverse iteration.
-*
-* When DCHKHS is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 14
-* tests will be performed:
-*
-* (1) | A - U H U**T | / ( |A| n ulp )
-*
-* (2) | I - UU**T | / ( n ulp )
-*
-* (3) | H - Z T Z**T | / ( |H| n ulp )
-*
-* (4) | I - ZZ**T | / ( n ulp )
-*
-* (5) | A - UZ H (UZ)**T | / ( |A| n ulp )
-*
-* (6) | I - UZ (UZ)**T | / ( n ulp )
-*
-* (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp )
-*
-* (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp )
-*
-* (9) | TR - RW | / ( |T| |R| ulp )
-*
-* (10) | L**H T - W**H L | / ( |T| |L| ulp )
-*
-* (11) | HX - XW | / ( |H| |X| ulp )
-*
-* (12) | Y**H H - W**H Y | / ( |H| |Y| ulp )
-*
-* (13) | AX - XW | / ( |A| |X| ulp )
-*
-* (14) | Y**H A - W**H Y | / ( |A| |Y| ulp )
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by SQRT( overflow threshold )
-* (8) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by SQRT( overflow threshold )
-* (18) Same as (16), but multiplied by SQRT( underflow threshold )
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* (20) Same as (19), but multiplied by SQRT( overflow threshold )
-* (21) Same as (19), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* ==========
-*
-* NSIZES - INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DCHKHS does nothing. It must be at least zero.
-* Not modified.
-*
-* NN - INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES - INTEGER
-* The number of elements in DOTYPE. If it is zero, DCHKHS
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE - LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED - INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DCHKHS to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH - DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT - INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A - DOUBLE PRECISION array, dimension (LDA,max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA - INTEGER
-* The leading dimension of A, H, T1 and T2. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* H - DOUBLE PRECISION array, dimension (LDA,max(NN))
-* The upper hessenberg matrix computed by DGEHRD. On exit,
-* H contains the Hessenberg form of the matrix in A.
-* Modified.
-*
-* T1 - DOUBLE PRECISION array, dimension (LDA,max(NN))
-* The Schur (="quasi-triangular") matrix computed by DHSEQR
-* if Z is computed. On exit, T1 contains the Schur form of
-* the matrix in A.
-* Modified.
-*
-* T2 - DOUBLE PRECISION array, dimension (LDA,max(NN))
-* The Schur matrix computed by DHSEQR when Z is not computed.
-* This should be identical to T1.
-* Modified.
-*
-* LDU - INTEGER
-* The leading dimension of U, Z, UZ and UU. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* U - DOUBLE PRECISION array, dimension (LDU,max(NN))
-* The orthogonal matrix computed by DGEHRD.
-* Modified.
-*
-* Z - DOUBLE PRECISION array, dimension (LDU,max(NN))
-* The orthogonal matrix computed by DHSEQR.
-* Modified.
-*
-* UZ - DOUBLE PRECISION array, dimension (LDU,max(NN))
-* The product of U times Z.
-* Modified.
-*
-* WR1 - DOUBLE PRECISION array, dimension (max(NN))
-* WI1 - DOUBLE PRECISION array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A,
-* as computed when Z is computed.
-* On exit, WR1 + WI1*i are the eigenvalues of the matrix in A.
-* Modified.
-*
-* WR3 - DOUBLE PRECISION array, dimension (max(NN))
-* WI3 - DOUBLE PRECISION array, dimension (max(NN))
-* Like WR1, WI1, these arrays contain the eigenvalues of A,
-* but those computed when DHSEQR only computes the
-* eigenvalues, i.e., not the Schur vectors and no more of the
-* Schur form than is necessary for computing the
-* eigenvalues.
-* Modified.
-*
-* EVECTL - DOUBLE PRECISION array, dimension (LDU,max(NN))
-* The (upper triangular) left eigenvector matrix for the
-* matrix in T1. For complex conjugate pairs, the real part
-* is stored in one row and the imaginary part in the next.
-* Modified.
-*
-* EVEZTR - DOUBLE PRECISION array, dimension (LDU,max(NN))
-* The (upper triangular) right eigenvector matrix for the
-* matrix in T1. For complex conjugate pairs, the real part
-* is stored in one column and the imaginary part in the next.
-* Modified.
-*
-* EVECTY - DOUBLE PRECISION array, dimension (LDU,max(NN))
-* The left eigenvector matrix for the
-* matrix in H. For complex conjugate pairs, the real part
-* is stored in one row and the imaginary part in the next.
-* Modified.
-*
-* EVECTX - DOUBLE PRECISION array, dimension (LDU,max(NN))
-* The right eigenvector matrix for the
-* matrix in H. For complex conjugate pairs, the real part
-* is stored in one column and the imaginary part in the next.
-* Modified.
-*
-* UU - DOUBLE PRECISION array, dimension (LDU,max(NN))
-* Details of the orthogonal matrix computed by DGEHRD.
-* Modified.
-*
-* TAU - DOUBLE PRECISION array, dimension(max(NN))
-* Further details of the orthogonal matrix computed by DGEHRD.
-* Modified.
-*
-* WORK - DOUBLE PRECISION array, dimension (NWORK)
-* Workspace.
-* Modified.
-*
-* NWORK - INTEGER
-* The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2.
-*
-* IWORK - INTEGER array, dimension (max(NN))
-* Workspace.
-* Modified.
-*
-* SELECT - LOGICAL array, dimension (max(NN))
-* Workspace.
-* Modified.
-*
-* RESULT - DOUBLE PRECISION array, dimension (14)
-* The values computed by the fourteen tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-* Modified.
-*
-* INFO - INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -14: LDU < 1 or LDU < NMAX.
-* -28: NWORK too small.
-* If DLATMR, SLATMS, or SLATME returns an error code, the
-* absolute value of it is returned.
-* If 1, then DHSEQR could not find all the shifts.
-* If 2, then the EISPACK code (for small blocks) failed.
-* If >2, then 30*N iterations were not enough to find an
-* eigenvalue or to decompose the problem.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* MTEST The number of tests defined: care must be taken
-* that (1) the size of RESULT, (2) the number of
-* tests actually performed, and (3) MTEST agree.
-* NTEST The number of tests performed on this matrix
-* so far. This should be less than MTEST, and
-* equal to it by the last test. It will be less
-* if any of the routines being tested indicates
-* that it could not compute the matrices that
-* would be tested.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by DLAFTS).
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL,
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selects whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dchksb.f b/TESTING/EIG/dchksb.f
index 101708d1..d3b12bd8 100644
--- a/TESTING/EIG/dchksb.f
+++ b/TESTING/EIG/dchksb.f
@@ -1,10 +1,307 @@
+*> \brief \b DCHKSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKSB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED,
+* THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK,
+* LWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
+* $ NWDTHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), KK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), RESULT( * ), SD( * ), SE( * ),
+* $ U( LDU, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKSB tests the reduction of a symmetric band matrix to tridiagonal
+*> form, used with the symmetric eigenvalue problem.
+*>
+*> DSBTRD factors a symmetric band matrix A as U S U' , where ' means
+*> transpose, S is symmetric tridiagonal, and U is orthogonal.
+*> DSBTRD can use either just the lower or just the upper triangle
+*> of A; DCHKSB checks both cases.
+*>
+*> When DCHKSB is called, a number of matrix "sizes" ("n's"), a number
+*> of bandwidths ("k's"), and a number of matrix "types" are
+*> specified. For each size ("n"), each bandwidth ("k") less than or
+*> equal to "n", and each type of matrix, one matrix will be generated
+*> and used to test the symmetric banded reduction routine. For each
+*> matrix, a number of tests will be performed:
+*>
+*> (1) | A - V S V' | / ( |A| n ulp ) computed by DSBTRD with
+*> UPLO='U'
+*>
+*> (2) | I - UU' | / ( n ulp )
+*>
+*> (3) | A - V S V' | / ( |A| n ulp ) computed by DSBTRD with
+*> UPLO='L'
+*>
+*> (4) | I - UU' | / ( n ulp )
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U' D U, where U is orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U' D U, where U is orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U' D U, where U is orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DCHKSB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NWDTHS
+*> \verbatim
+*> NWDTHS is INTEGER
+*> The number of bandwidths to use. If it is zero,
+*> DCHKSB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KK
+*> \verbatim
+*> KK is INTEGER array, dimension (NWDTHS)
+*> An array containing the bandwidths to be used for the band
+*> matrices. The values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DCHKSB
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DCHKSB to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 2 (not 1!)
+*> and at least max( KK )+1.
+*> \endverbatim
+*>
+*> \param[out] SD
+*> \verbatim
+*> SD is DOUBLE PRECISION array, dimension (max(NN))
+*> Used to hold the diagonal of the tridiagonal matrix computed
+*> by DSBTRD.
+*> \endverbatim
+*>
+*> \param[out] SE
+*> \verbatim
+*> SE is DOUBLE PRECISION array, dimension (max(NN))
+*> Used to hold the off-diagonal of the tridiagonal matrix
+*> computed by DSBTRD.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> Used to hold the orthogonal matrix computed by DSBTRD.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( LDA+1, max(NN)+1 )*max(NN).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCHKSB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED,
$ THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK,
$ LWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
@@ -18,197 +315,6 @@
$ U( LDU, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKSB tests the reduction of a symmetric band matrix to tridiagonal
-* form, used with the symmetric eigenvalue problem.
-*
-* DSBTRD factors a symmetric band matrix A as U S U' , where ' means
-* transpose, S is symmetric tridiagonal, and U is orthogonal.
-* DSBTRD can use either just the lower or just the upper triangle
-* of A; DCHKSB checks both cases.
-*
-* When DCHKSB is called, a number of matrix "sizes" ("n's"), a number
-* of bandwidths ("k's"), and a number of matrix "types" are
-* specified. For each size ("n"), each bandwidth ("k") less than or
-* equal to "n", and each type of matrix, one matrix will be generated
-* and used to test the symmetric banded reduction routine. For each
-* matrix, a number of tests will be performed:
-*
-* (1) | A - V S V' | / ( |A| n ulp ) computed by DSBTRD with
-* UPLO='U'
-*
-* (2) | I - UU' | / ( n ulp )
-*
-* (3) | A - V S V' | / ( |A| n ulp ) computed by DSBTRD with
-* UPLO='L'
-*
-* (4) | I - UU' | / ( n ulp )
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U' D U, where U is orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U' D U, where U is orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U' D U, where U is orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DCHKSB does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NWDTHS (input) INTEGER
-* The number of bandwidths to use. If it is zero,
-* DCHKSB does nothing. It must be at least zero.
-*
-* KK (input) INTEGER array, dimension (NWDTHS)
-* An array containing the bandwidths to be used for the band
-* matrices. The values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DCHKSB
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DCHKSB to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 2 (not 1!)
-* and at least max( KK )+1.
-*
-* SD (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Used to hold the diagonal of the tridiagonal matrix computed
-* by DSBTRD.
-*
-* SE (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Used to hold the off-diagonal of the tridiagonal matrix
-* computed by DSBTRD.
-*
-* U (workspace) DOUBLE PRECISION array, dimension (LDU, max(NN))
-* Used to hold the orthogonal matrix computed by DSBTRD.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. It must be at least 1
-* and at least max( NN ).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( LDA+1, max(NN)+1 )*max(NN).
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dchkst.f b/TESTING/EIG/dchkst.f
index 869f09f8..d40bf361 100644
--- a/TESTING/EIG/dchkst.f
+++ b/TESTING/EIG/dchkst.f
@@ -1,12 +1,541 @@
+*> \brief \b DCHKST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
+* WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
+* LWORK, IWORK, LIWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), AP( * ), D1( * ), D2( * ),
+* $ D3( * ), D4( * ), D5( * ), RESULT( * ),
+* $ SD( * ), SE( * ), TAU( * ), U( LDU, * ),
+* $ V( LDU, * ), VP( * ), WA1( * ), WA2( * ),
+* $ WA3( * ), WORK( * ), WR( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKST checks the symmetric eigenvalue problem routines.
+*>
+*> DSYTRD factors A as U S U' , where ' means transpose,
+*> S is symmetric tridiagonal, and U is orthogonal.
+*> DSYTRD can use either just the lower or just the upper triangle
+*> of A; DCHKST checks both cases.
+*> U is represented as a product of Householder
+*> transformations, whose vectors are stored in the first
+*> n-1 columns of V, and whose scale factors are in TAU.
+*>
+*> DSPTRD does the same as DSYTRD, except that A and V are stored
+*> in "packed" format.
+*>
+*> DORGTR constructs the matrix U from the contents of V and TAU.
+*>
+*> DOPGTR constructs the matrix U from the contents of VP and TAU.
+*>
+*> DSTEQR factors S as Z D1 Z' , where Z is the orthogonal
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal. D2 is the matrix of
+*> eigenvalues computed when Z is not computed.
+*>
+*> DSTERF computes D3, the matrix of eigenvalues, by the
+*> PWK method, which does not yield eigenvectors.
+*>
+*> DPTEQR factors S as Z4 D4 Z4' , for a
+*> symmetric positive definite tridiagonal matrix.
+*> D5 is the matrix of eigenvalues computed when Z is not
+*> computed.
+*>
+*> DSTEBZ computes selected eigenvalues. WA1, WA2, and
+*> WA3 will denote eigenvalues computed to high
+*> absolute accuracy, with different range options.
+*> WR will denote eigenvalues computed to high relative
+*> accuracy.
+*>
+*> DSTEIN computes Y, the eigenvectors of S, given the
+*> eigenvalues.
+*>
+*> DSTEDC factors S as Z D1 Z' , where Z is the orthogonal
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal ('I' option). It may also
+*> update an input orthogonal matrix, usually the output
+*> from DSYTRD/DORGTR or DSPTRD/DOPGTR ('V' option). It may
+*> also just compute eigenvalues ('N' option).
+*>
+*> DSTEMR factors S as Z D1 Z' , where Z is the orthogonal
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal ('I' option). DSTEMR
+*> uses the Relatively Robust Representation whenever possible.
+*>
+*> When DCHKST is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the symmetric eigenroutines. For each matrix, a number
+*> of tests will be performed:
+*>
+*> (1) | A - V S V' | / ( |A| n ulp ) DSYTRD( UPLO='U', ... )
+*>
+*> (2) | I - UV' | / ( n ulp ) DORGTR( UPLO='U', ... )
+*>
+*> (3) | A - V S V' | / ( |A| n ulp ) DSYTRD( UPLO='L', ... )
+*>
+*> (4) | I - UV' | / ( n ulp ) DORGTR( UPLO='L', ... )
+*>
+*> (5-8) Same as 1-4, but for DSPTRD and DOPGTR.
+*>
+*> (9) | S - Z D Z' | / ( |S| n ulp ) DSTEQR('V',...)
+*>
+*> (10) | I - ZZ' | / ( n ulp ) DSTEQR('V',...)
+*>
+*> (11) | D1 - D2 | / ( |D1| ulp ) DSTEQR('N',...)
+*>
+*> (12) | D1 - D3 | / ( |D1| ulp ) DSTERF
+*>
+*> (13) 0 if the true eigenvalues (computed by sturm count)
+*> of S are within THRESH of
+*> those in D1. 2*THRESH if they are not. (Tested using
+*> DSTECH)
+*>
+*> For S positive definite,
+*>
+*> (14) | S - Z4 D4 Z4' | / ( |S| n ulp ) DPTEQR('V',...)
+*>
+*> (15) | I - Z4 Z4' | / ( n ulp ) DPTEQR('V',...)
+*>
+*> (16) | D4 - D5 | / ( 100 |D4| ulp ) DPTEQR('N',...)
+*>
+*> When S is also diagonally dominant by the factor gamma < 1,
+*>
+*> (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> DSTEBZ( 'A', 'E', ...)
+*>
+*> (18) | WA1 - D3 | / ( |D3| ulp ) DSTEBZ( 'A', 'E', ...)
+*>
+*> (19) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> DSTEBZ( 'I', 'E', ...)
+*>
+*> (20) | S - Y WA1 Y' | / ( |S| n ulp ) DSTEBZ, SSTEIN
+*>
+*> (21) | I - Y Y' | / ( n ulp ) DSTEBZ, SSTEIN
+*>
+*> (22) | S - Z D Z' | / ( |S| n ulp ) DSTEDC('I')
+*>
+*> (23) | I - ZZ' | / ( n ulp ) DSTEDC('I')
+*>
+*> (24) | S - Z D Z' | / ( |S| n ulp ) DSTEDC('V')
+*>
+*> (25) | I - ZZ' | / ( n ulp ) DSTEDC('V')
+*>
+*> (26) | D1 - D2 | / ( |D1| ulp ) DSTEDC('V') and
+*> DSTEDC('N')
+*>
+*> Test 27 is disabled at the moment because DSTEMR does not
+*> guarantee high relatvie accuracy.
+*>
+*> (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> DSTEMR('V', 'A')
+*>
+*> (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> DSTEMR('V', 'I')
+*>
+*> Tests 29 through 34 are disable at present because DSTEMR
+*> does not handle partial specturm requests.
+*>
+*> (29) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'I')
+*>
+*> (30) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'I')
+*>
+*> (31) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> DSTEMR('N', 'I') vs. SSTEMR('V', 'I')
+*>
+*> (32) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'V')
+*>
+*> (33) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'V')
+*>
+*> (34) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> DSTEMR('N', 'V') vs. SSTEMR('V', 'V')
+*>
+*> (35) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'A')
+*>
+*> (36) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'A')
+*>
+*> (37) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> DSTEMR('N', 'A') vs. SSTEMR('V', 'A')
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U' D U, where U is orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U' D U, where U is orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U' D U, where U is orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*> (16) Same as (8), but diagonal elements are all positive.
+*> (17) Same as (9), but diagonal elements are all positive.
+*> (18) Same as (10), but diagonal elements are all positive.
+*> (19) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (20) Same as (16), but multiplied by SQRT( underflow threshold )
+*> (21) A diagonally dominant tridiagonal matrix with geometrically
+*> spaced diagonal entries 1, ..., ULP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DCHKST does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DCHKST
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DCHKST to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array of
+*> dimension ( LDA , max(NN) )
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array of
+*> dimension( max(NN)*max(NN+1)/2 )
+*> The matrix A stored in packed format.
+*> \endverbatim
+*>
+*> \param[out] SD
+*> \verbatim
+*> SD is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The diagonal of the tridiagonal matrix computed by DSYTRD.
+*> On exit, SD and SE contain the tridiagonal form of the
+*> matrix in A.
+*> \endverbatim
+*>
+*> \param[out] SE
+*> \verbatim
+*> SE is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The off-diagonal of the tridiagonal matrix computed by
+*> DSYTRD. On exit, SD and SE contain the tridiagonal form of
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D1
+*> \verbatim
+*> D1 is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by DSTEQR simlutaneously
+*> with Z. On exit, the eigenvalues in D1 correspond with the
+*> matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D2
+*> \verbatim
+*> D2 is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by DSTEQR if Z is not
+*> computed. On exit, the eigenvalues in D2 correspond with
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D3
+*> \verbatim
+*> D3 is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by DSTERF. On exit, the
+*> eigenvalues in D3 correspond with the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array of
+*> dimension( LDU, max(NN) ).
+*> The orthogonal matrix computed by DSYTRD + DORGTR.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U, Z, and V. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array of
+*> dimension( LDU, max(NN) ).
+*> The Housholder vectors computed by DSYTRD in reducing A to
+*> tridiagonal form. The vectors computed with UPLO='U' are
+*> in the upper triangle, and the vectors computed with UPLO='L'
+*> are in the lower triangle. (As described in DSYTRD, the
+*> sub- and superdiagonal are not set to 1, although the
+*> true Householder vector has a 1 in that position. The
+*> routines that use V, such as DORGTR, set those entries to
+*> 1 before using them, and then restore them later.)
+*> \endverbatim
+*>
+*> \param[out] VP
+*> \verbatim
+*> VP is DOUBLE PRECISION array of
+*> dimension( max(NN)*max(NN+1)/2 )
+*> The matrix V stored in packed format.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The Householder factors computed by DSYTRD in reducing A
+*> to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array of
+*> dimension( LDU, max(NN) ).
+*> The orthogonal matrix of eigenvectors computed by DSTEQR,
+*> DPTEQR, and DSTEIN.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array of
+*> dimension( LWORK )
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array,
+*> dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (26)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -23: LDU < 1 or LDU < NMAX.
+*> -29: LWORK too small.
+*> If DLATMR, SLATMS, DSYTRD, DORGTR, DSTEQR, SSTERF,
+*> or DORMC2 returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NBLOCK Blocksize as returned by ENVIR.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCHKST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
$ WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
$ LWORK, IWORK, LIWORK, RESULT, INFO )
- IMPLICIT NONE
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
@@ -23,405 +552,6 @@
$ WA3( * ), WORK( * ), WR( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKST checks the symmetric eigenvalue problem routines.
-*
-* DSYTRD factors A as U S U' , where ' means transpose,
-* S is symmetric tridiagonal, and U is orthogonal.
-* DSYTRD can use either just the lower or just the upper triangle
-* of A; DCHKST checks both cases.
-* U is represented as a product of Householder
-* transformations, whose vectors are stored in the first
-* n-1 columns of V, and whose scale factors are in TAU.
-*
-* DSPTRD does the same as DSYTRD, except that A and V are stored
-* in "packed" format.
-*
-* DORGTR constructs the matrix U from the contents of V and TAU.
-*
-* DOPGTR constructs the matrix U from the contents of VP and TAU.
-*
-* DSTEQR factors S as Z D1 Z' , where Z is the orthogonal
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal. D2 is the matrix of
-* eigenvalues computed when Z is not computed.
-*
-* DSTERF computes D3, the matrix of eigenvalues, by the
-* PWK method, which does not yield eigenvectors.
-*
-* DPTEQR factors S as Z4 D4 Z4' , for a
-* symmetric positive definite tridiagonal matrix.
-* D5 is the matrix of eigenvalues computed when Z is not
-* computed.
-*
-* DSTEBZ computes selected eigenvalues. WA1, WA2, and
-* WA3 will denote eigenvalues computed to high
-* absolute accuracy, with different range options.
-* WR will denote eigenvalues computed to high relative
-* accuracy.
-*
-* DSTEIN computes Y, the eigenvectors of S, given the
-* eigenvalues.
-*
-* DSTEDC factors S as Z D1 Z' , where Z is the orthogonal
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal ('I' option). It may also
-* update an input orthogonal matrix, usually the output
-* from DSYTRD/DORGTR or DSPTRD/DOPGTR ('V' option). It may
-* also just compute eigenvalues ('N' option).
-*
-* DSTEMR factors S as Z D1 Z' , where Z is the orthogonal
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal ('I' option). DSTEMR
-* uses the Relatively Robust Representation whenever possible.
-*
-* When DCHKST is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the symmetric eigenroutines. For each matrix, a number
-* of tests will be performed:
-*
-* (1) | A - V S V' | / ( |A| n ulp ) DSYTRD( UPLO='U', ... )
-*
-* (2) | I - UV' | / ( n ulp ) DORGTR( UPLO='U', ... )
-*
-* (3) | A - V S V' | / ( |A| n ulp ) DSYTRD( UPLO='L', ... )
-*
-* (4) | I - UV' | / ( n ulp ) DORGTR( UPLO='L', ... )
-*
-* (5-8) Same as 1-4, but for DSPTRD and DOPGTR.
-*
-* (9) | S - Z D Z' | / ( |S| n ulp ) DSTEQR('V',...)
-*
-* (10) | I - ZZ' | / ( n ulp ) DSTEQR('V',...)
-*
-* (11) | D1 - D2 | / ( |D1| ulp ) DSTEQR('N',...)
-*
-* (12) | D1 - D3 | / ( |D1| ulp ) DSTERF
-*
-* (13) 0 if the true eigenvalues (computed by sturm count)
-* of S are within THRESH of
-* those in D1. 2*THRESH if they are not. (Tested using
-* DSTECH)
-*
-* For S positive definite,
-*
-* (14) | S - Z4 D4 Z4' | / ( |S| n ulp ) DPTEQR('V',...)
-*
-* (15) | I - Z4 Z4' | / ( n ulp ) DPTEQR('V',...)
-*
-* (16) | D4 - D5 | / ( 100 |D4| ulp ) DPTEQR('N',...)
-*
-* When S is also diagonally dominant by the factor gamma < 1,
-*
-* (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* DSTEBZ( 'A', 'E', ...)
-*
-* (18) | WA1 - D3 | / ( |D3| ulp ) DSTEBZ( 'A', 'E', ...)
-*
-* (19) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* DSTEBZ( 'I', 'E', ...)
-*
-* (20) | S - Y WA1 Y' | / ( |S| n ulp ) DSTEBZ, SSTEIN
-*
-* (21) | I - Y Y' | / ( n ulp ) DSTEBZ, SSTEIN
-*
-* (22) | S - Z D Z' | / ( |S| n ulp ) DSTEDC('I')
-*
-* (23) | I - ZZ' | / ( n ulp ) DSTEDC('I')
-*
-* (24) | S - Z D Z' | / ( |S| n ulp ) DSTEDC('V')
-*
-* (25) | I - ZZ' | / ( n ulp ) DSTEDC('V')
-*
-* (26) | D1 - D2 | / ( |D1| ulp ) DSTEDC('V') and
-* DSTEDC('N')
-*
-* Test 27 is disabled at the moment because DSTEMR does not
-* guarantee high relatvie accuracy.
-*
-* (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* DSTEMR('V', 'A')
-*
-* (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* DSTEMR('V', 'I')
-*
-* Tests 29 through 34 are disable at present because DSTEMR
-* does not handle partial specturm requests.
-*
-* (29) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'I')
-*
-* (30) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'I')
-*
-* (31) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* DSTEMR('N', 'I') vs. SSTEMR('V', 'I')
-*
-* (32) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'V')
-*
-* (33) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'V')
-*
-* (34) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* DSTEMR('N', 'V') vs. SSTEMR('V', 'V')
-*
-* (35) | S - Z D Z' | / ( |S| n ulp ) DSTEMR('V', 'A')
-*
-* (36) | I - ZZ' | / ( n ulp ) DSTEMR('V', 'A')
-*
-* (37) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* DSTEMR('N', 'A') vs. SSTEMR('V', 'A')
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U' D U, where U is orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U' D U, where U is orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U' D U, where U is orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-* (16) Same as (8), but diagonal elements are all positive.
-* (17) Same as (9), but diagonal elements are all positive.
-* (18) Same as (10), but diagonal elements are all positive.
-* (19) Same as (16), but multiplied by SQRT( overflow threshold )
-* (20) Same as (16), but multiplied by SQRT( underflow threshold )
-* (21) A diagonally dominant tridiagonal matrix with geometrically
-* spaced diagonal entries 1, ..., ULP.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DCHKST does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DCHKST
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DCHKST to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace/output) DOUBLE PRECISION array of
-* dimension ( LDA , max(NN) )
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-*
-* AP (workspace) DOUBLE PRECISION array of
-* dimension( max(NN)*max(NN+1)/2 )
-* The matrix A stored in packed format.
-*
-* SD (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The diagonal of the tridiagonal matrix computed by DSYTRD.
-* On exit, SD and SE contain the tridiagonal form of the
-* matrix in A.
-*
-* SE (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The off-diagonal of the tridiagonal matrix computed by
-* DSYTRD. On exit, SD and SE contain the tridiagonal form of
-* the matrix in A.
-*
-* D1 (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by DSTEQR simlutaneously
-* with Z. On exit, the eigenvalues in D1 correspond with the
-* matrix in A.
-*
-* D2 (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by DSTEQR if Z is not
-* computed. On exit, the eigenvalues in D2 correspond with
-* the matrix in A.
-*
-* D3 (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by DSTERF. On exit, the
-* eigenvalues in D3 correspond with the matrix in A.
-*
-* U (workspace/output) DOUBLE PRECISION array of
-* dimension( LDU, max(NN) ).
-* The orthogonal matrix computed by DSYTRD + DORGTR.
-*
-* LDU (input) INTEGER
-* The leading dimension of U, Z, and V. It must be at least 1
-* and at least max( NN ).
-*
-* V (workspace/output) DOUBLE PRECISION array of
-* dimension( LDU, max(NN) ).
-* The Housholder vectors computed by DSYTRD in reducing A to
-* tridiagonal form. The vectors computed with UPLO='U' are
-* in the upper triangle, and the vectors computed with UPLO='L'
-* are in the lower triangle. (As described in DSYTRD, the
-* sub- and superdiagonal are not set to 1, although the
-* true Householder vector has a 1 in that position. The
-* routines that use V, such as DORGTR, set those entries to
-* 1 before using them, and then restore them later.)
-*
-* VP (workspace) DOUBLE PRECISION array of
-* dimension( max(NN)*max(NN+1)/2 )
-* The matrix V stored in packed format.
-*
-* TAU (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The Householder factors computed by DSYTRD in reducing A
-* to tridiagonal form.
-*
-* Z (workspace/output) DOUBLE PRECISION array of
-* dimension( LDU, max(NN) ).
-* The orthogonal matrix of eigenvectors computed by DSTEQR,
-* DPTEQR, and DSTEIN.
-*
-* WORK (workspace/output) DOUBLE PRECISION array of
-* dimension( LWORK )
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-*
-* IWORK (workspace/output) INTEGER array,
-* dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-* Workspace.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (26)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -23: LDU < 1 or LDU < NMAX.
-* -29: LWORK too small.
-* If DLATMR, SLATMS, DSYTRD, DORGTR, DSTEQR, SSTERF,
-* or DORMC2 returns an error code, the
-* absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NBLOCK Blocksize as returned by ENVIR.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dckcsd.f b/TESTING/EIG/dckcsd.f
index 9fdd5539..1bb4d9a3 100644
--- a/TESTING/EIG/dckcsd.f
+++ b/TESTING/EIG/dckcsd.f
@@ -1,15 +1,195 @@
+*> \brief \b DCKCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCKCSD( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
+* MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
+* WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), PVAL( * ),
+* $ QVAL( * )
+* DOUBLE PRECISION RWORK( * ), THETA( * )
+* DOUBLE PRECISION U1( * ), U2( * ), V1T( * ), V2T( * ),
+* $ WORK( * ), X( * ), XF( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCKCSD tests DORCSD:
+*> the CSD for an M-by-M orthogonal matrix X partitioned as
+*> [ X11 X12; X21 X22 ]. X11 is P-by-Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension P.
+*> \endverbatim
+*>
+*> \param[in] QVAL
+*> \verbatim
+*> QVAL is INTEGER array, dimension (NM)
+*> The values of the matrix column dimension Q.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] MMAX
+*> \verbatim
+*> MMAX is INTEGER
+*> The maximum value permitted for M, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] XF
+*> \verbatim
+*> XF is DOUBLE PRECISION array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is DOUBLE PRECISION array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is DOUBLE PRECISION array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is DOUBLE PRECISION array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is DOUBLE PRECISION array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If DLAROR returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCKCSD( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
$ MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
$ WORK, RWORK, NIN, NOUT, INFO )
- IMPLICIT NONE
*
-* Originally DCKGSV
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* Adapted to DCKCSD
-* July 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
@@ -23,82 +203,6 @@
$ WORK( * ), X( * ), XF( * )
* ..
*
-* Purpose
-* =======
-*
-* DCKCSD tests DORCSD:
-* the CSD for an M-by-M orthogonal matrix X partitioned as
-* [ X11 X12; X21 X22 ]. X11 is P-by-Q.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension P.
-*
-* QVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix column dimension Q.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* MMAX (input) INTEGER
-* The maximum value permitted for M, used in dimensioning the
-* work arrays.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (MMAX*MMAX)
-*
-* XF (workspace) DOUBLE PRECISION array, dimension (MMAX*MMAX)
-*
-* U1 (workspace) DOUBLE PRECISION array, dimension (MMAX*MMAX)
-*
-* U2 (workspace) DOUBLE PRECISION array, dimension (MMAX*MMAX)
-*
-* V1T (workspace) DOUBLE PRECISION array, dimension (MMAX*MMAX)
-*
-* V2T (workspace) DOUBLE PRECISION array, dimension (MMAX*MMAX)
-*
-* THETA (workspace) DOUBLE PRECISION array, dimension (MMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (MMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array
-*
-* RWORK (workspace) DOUBLE PRECISION array
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If DLAROR returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dckglm.f b/TESTING/EIG/dckglm.f
index cb9cb0c3..2a2c8d7f 100644
--- a/TESTING/EIG/dckglm.f
+++ b/TESTING/EIG/dckglm.f
@@ -1,10 +1,178 @@
+*> \brief \b DCKGLM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCKGLM( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* DOUBLE PRECISION A( * ), AF( * ), B( * ), BF( * ), RWORK( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCKGLM tests DGGGLM - subroutine for solving generalized linear
+*> model problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N, M and P contained in the vectors
+*> NVAL, MVAL and PVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESID >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (4*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If DLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCKGLM( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
@@ -16,76 +184,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DCKGLM tests DGGGLM - subroutine for solving generalized linear
-* model problem.
-*
-* Arguments
-* =========
-*
-* NN (input) INTEGER
-* The number of values of N, M and P contained in the vectors
-* NVAL, MVAL and PVAL.
-*
-* MVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESID >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* BF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (4*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If DLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dckgqr.f b/TESTING/EIG/dckgqr.f
index d60aeb69..c94e8d19 100644
--- a/TESTING/EIG/dckgqr.f
+++ b/TESTING/EIG/dckgqr.f
@@ -1,10 +1,221 @@
+*> \brief \b DCKGQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
+* THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
+* BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* DOUBLE PRECISION A( * ), AF( * ), AQ( * ), AR( * ), B( * ),
+* $ BF( * ), BT( * ), BWK( * ), BZ( * ),
+* $ RWORK( * ), TAUA( * ), TAUB( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCKGQR tests
+*> DGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
+*> DGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row(column) dimension M.
+*> \endverbatim
+*>
+*> \param[in] NP
+*> \verbatim
+*> NP is INTEGER
+*> The number of values of P contained in the vector PVAL.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NP)
+*> The values of the matrix row(column) dimension P.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column(row) dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BZ
+*> \verbatim
+*> BZ is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BT
+*> \verbatim
+*> BT is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If DLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
$ THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
$ BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
@@ -17,94 +228,6 @@
$ RWORK( * ), TAUA( * ), TAUB( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DCKGQR tests
-* DGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
-* DGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row(column) dimension M.
-*
-* NP (input) INTEGER
-* The number of values of P contained in the vector PVAL.
-*
-* PVAL (input) INTEGER array, dimension (NP)
-* The values of the matrix row(column) dimension P.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column(row) dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AR (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* TAUA (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* BF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* BZ (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* BT (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* BWK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* TAUB (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If DLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dckgsv.f b/TESTING/EIG/dckgsv.f
index 630d3607..6c349494 100644
--- a/TESTING/EIG/dckgsv.f
+++ b/TESTING/EIG/dckgsv.f
@@ -1,10 +1,209 @@
+*> \brief \b DCKGSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCKGSV( NM, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, U, V, Q, ALPHA, BETA, R,
+* IWORK, WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, NMAX, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), NVAL( * ),
+* $ PVAL( * )
+* DOUBLE PRECISION A( * ), AF( * ), ALPHA( * ), B( * ), BETA( * ),
+* $ BF( * ), Q( * ), R( * ), RWORK( * ), U( * ),
+* $ V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCKGSV tests DGGSVD:
+*> the GSVD for M-by-N matrix A and P-by-N matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NP)
+*> The values of the matrix row dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If DLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCKGSV( NM, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, U, V, Q, ALPHA, BETA, R,
$ IWORK, WORK, RWORK, NIN, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, NMAX, NOUT
@@ -18,87 +217,6 @@
$ V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DCKGSV tests DGGSVD:
-* the GSVD for M-by-N matrix A and P-by-N matrix B.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NP)
-* The values of the matrix row dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* BF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* U (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* V (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* ALPHA (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* BETA (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* R (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If DLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dcklse.f b/TESTING/EIG/dcklse.f
index 002528c7..da3161e4 100644
--- a/TESTING/EIG/dcklse.f
+++ b/TESTING/EIG/dcklse.f
@@ -1,10 +1,178 @@
+*> \brief \b DCKLSE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* DOUBLE PRECISION A( * ), AF( * ), B( * ), BF( * ), RWORK( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCKLSE tests DGGLSE - a subroutine for solving linear equality
+*> constrained least square problem (LSE).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of (M,P,N) contained in the vectors
+*> (MVAL, PVAL, NVAL).
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row(column) dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row(column) dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column(row) dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (5*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If DLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
@@ -16,76 +184,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DCKLSE tests DGGLSE - a subroutine for solving linear equality
-* constrained least square problem (LSE).
-*
-* Arguments
-* =========
-*
-* NN (input) INTEGER
-* The number of values of (M,P,N) contained in the vectors
-* (MVAL, PVAL, NVAL).
-*
-* MVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row(column) dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row(column) dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column(row) dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* BF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (5*NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If DLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dcsdts.f b/TESTING/EIG/dcsdts.f
index 3b6762f0..8c2d0062 100644
--- a/TESTING/EIG/dcsdts.f
+++ b/TESTING/EIG/dcsdts.f
@@ -1,15 +1,215 @@
+*> \brief \b DCSDTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCSDTS( M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T,
+* LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDX, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RESULT( 9 ), RWORK( * ), THETA( * )
+* DOUBLE PRECISION U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * ), WORK( LWORK ), X( LDX, * ),
+* $ XF( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCSDTS tests DORCSD, which, given an M-by-M partitioned orthogonal
+*> matrix X,
+*> Q M-Q
+*> X = [ X11 X12 ] P ,
+*> [ X21 X22 ] M-P
+*>
+*> computes the CSD
+*>
+*> [ U1 ]**T * [ X11 X12 ] * [ V1 ]
+*> [ U2 ] [ X21 X22 ] [ V2 ]
+*>
+*> [ I 0 0 | 0 0 0 ]
+*> [ 0 C 0 | 0 -S 0 ]
+*> [ 0 0 0 | 0 0 -I ]
+*> = [---------------------] = [ D11 D12 ] .
+*> [ 0 0 0 | I 0 0 ] [ D21 D22 ]
+*> [ 0 S 0 | 0 C 0 ]
+*> [ 0 0 I | 0 0 0 ]
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix X11. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns of the matrix X11. Q >= 0.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,M)
+*> The M-by-M matrix X.
+*> \endverbatim
+*>
+*> \param[out] XF
+*> \verbatim
+*> XF is DOUBLE PRECISION array, dimension (LDX,M)
+*> Details of the CSD of X, as returned by DORCSD;
+*> see DORCSD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the arrays X and XF.
+*> LDX >= max( 1,M ).
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is DOUBLE PRECISION array, dimension(LDU1,P)
+*> The P-by-P orthogonal matrix U1.
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of the array U1. LDU >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is DOUBLE PRECISION array, dimension(LDU2,M-P)
+*> The (M-P)-by-(M-P) orthogonal matrix U2.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2. LDU >= max(1,M-P).
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is DOUBLE PRECISION array, dimension(LDV1T,Q)
+*> The Q-by-Q orthogonal matrix V1T.
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of the array V1T. LDV1T >=
+*> max(1,Q).
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is DOUBLE PRECISION array, dimension(LDV2T,M-Q)
+*> The (M-Q)-by-(M-Q) orthogonal matrix V2T.
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of the array V2T. LDV2T >=
+*> max(1,M-Q).
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension MIN(P,M-P,Q,M-Q)
+*> The CS values of X; the essentially diagonal matrices C and
+*> S are constructed from THETA; see subroutine DORCSD for
+*> details.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (9)
+*> The test ratios:
+*> RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
+*> RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
+*> RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
+*> RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
+*> RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
+*> RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
+*> RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
+*> RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
+*> RESULT(9) = 0 if THETA is in increasing order and
+*> all angles are in [0,pi/2];
+*> = ULPINV otherwise.
+*> ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DCSDTS( M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T,
$ LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK,
$ RWORK, RESULT )
- IMPLICIT NONE
*
-* Originally xGSVTS
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* Adapted to DCSDTS
-* July 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDX, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
@@ -22,106 +222,6 @@
$ XF( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DCSDTS tests DORCSD, which, given an M-by-M partitioned orthogonal
-* matrix X,
-* Q M-Q
-* X = [ X11 X12 ] P ,
-* [ X21 X22 ] M-P
-*
-* computes the CSD
-*
-* [ U1 ]**T * [ X11 X12 ] * [ V1 ]
-* [ U2 ] [ X21 X22 ] [ V2 ]
-*
-* [ I 0 0 | 0 0 0 ]
-* [ 0 C 0 | 0 -S 0 ]
-* [ 0 0 0 | 0 0 -I ]
-* = [---------------------] = [ D11 D12 ] .
-* [ 0 0 0 | I 0 0 ] [ D21 D22 ]
-* [ 0 S 0 | 0 C 0 ]
-* [ 0 0 I | 0 0 0 ]
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix X11. P >= 0.
-*
-* Q (input) INTEGER
-* The number of columns of the matrix X11. Q >= 0.
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,M)
-* The M-by-M matrix X.
-*
-* XF (output) DOUBLE PRECISION array, dimension (LDX,M)
-* Details of the CSD of X, as returned by DORCSD;
-* see DORCSD for further details.
-*
-* LDX (input) INTEGER
-* The leading dimension of the arrays X and XF.
-* LDX >= max( 1,M ).
-*
-* U1 (output) DOUBLE PRECISION array, dimension(LDU1,P)
-* The P-by-P orthogonal matrix U1.
-*
-* LDU1 (input) INTEGER
-* The leading dimension of the array U1. LDU >= max(1,P).
-*
-* U2 (output) DOUBLE PRECISION array, dimension(LDU2,M-P)
-* The (M-P)-by-(M-P) orthogonal matrix U2.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2. LDU >= max(1,M-P).
-*
-* V1T (output) DOUBLE PRECISION array, dimension(LDV1T,Q)
-* The Q-by-Q orthogonal matrix V1T.
-*
-* LDV1T (input) INTEGER
-* The leading dimension of the array V1T. LDV1T >=
-* max(1,Q).
-*
-* V2T (output) DOUBLE PRECISION array, dimension(LDV2T,M-Q)
-* The (M-Q)-by-(M-Q) orthogonal matrix V2T.
-*
-* LDV2T (input) INTEGER
-* The leading dimension of the array V2T. LDV2T >=
-* max(1,M-Q).
-*
-* THETA (output) DOUBLE PRECISION array, dimension MIN(P,M-P,Q,M-Q)
-* The CS values of X; the essentially diagonal matrices C and
-* S are constructed from THETA; see subroutine DORCSD for
-* details.
-*
-* IWORK (workspace) INTEGER array, dimension (M)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK
-*
-* RWORK (workspace) DOUBLE PRECISION array
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (9)
-* The test ratios:
-* RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
-* RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
-* RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
-* RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
-* RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
-* RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
-* RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
-* RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
-* RESULT(9) = 0 if THETA is in increasing order and
-* all angles are in [0,pi/2];
-* = ULPINV otherwise.
-* ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrges.f b/TESTING/EIG/ddrges.f
index 540520ba..8eaec08e 100644
--- a/TESTING/EIG/ddrges.f
+++ b/TESTING/EIG/ddrges.f
@@ -1,11 +1,415 @@
+*> \brief \b DDRGES
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRGES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, ALPHAR,
+* ALPHAI, BETA, WORK, LWORK, RESULT, BWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDA, * ), BETA( * ), Q( LDQ, * ),
+* $ RESULT( 13 ), S( LDA, * ), T( LDA, * ),
+* $ WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRGES checks the nonsymmetric generalized eigenvalue (Schur form)
+*> problem driver DGGES.
+*>
+*> DGGES factors A and B as Q S Z' and Q T Z' , where ' means
+*> transpose, T is upper triangular, S is in generalized Schur form
+*> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
+*> the 2x2 blocks corresponding to complex conjugate pairs of
+*> generalized eigenvalues), and Q and Z are orthogonal. It also
+*> computes the generalized eigenvalues (alpha(j),beta(j)), j=1,...,n,
+*> Thus, w(j) = alpha(j)/beta(j) is a root of the characteristic
+*> equation
+*> det( A - w(j) B ) = 0
+*> Optionally it also reorder the eigenvalues so that a selected
+*> cluster of eigenvalues appears in the leading diagonal block of the
+*> Schur forms.
+*>
+*> When DDRGES is called, a number of matrix "sizes" ("N's") and a
+*> number of matrix "TYPES" are specified. For each size ("N")
+*> and each TYPE of matrix, a pair of matrices (A, B) will be generated
+*> and used for testing. For each matrix pair, the following 13 tests
+*> will be performed and compared with the threshhold THRESH except
+*> the tests (5), (11) and (13).
+*>
+*>
+*> (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues)
+*>
+*> (5) if A is in Schur form (i.e. quasi-triangular form)
+*> (no sorting of eigenvalues)
+*>
+*> (6) if eigenvalues = diagonal blocks of the Schur form (S, T),
+*> i.e., test the maximum over j of D(j) where:
+*>
+*> if alpha(j) is real:
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> if alpha(j) is complex:
+*> | det( s S - w T ) |
+*> D(j) = ---------------------------------------------------
+*> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
+*>
+*> and S and T are here the 2 x 2 diagonal blocks of S and T
+*> corresponding to the j-th and j+1-th eigenvalues.
+*> (no sorting of eigenvalues)
+*>
+*> (7) | (A,B) - Q (S,T) Z' | / ( | (A,B) | n ulp )
+*> (with sorting of eigenvalues).
+*>
+*> (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) if A is in Schur form (i.e. quasi-triangular form)
+*> (with sorting of eigenvalues).
+*>
+*> (11) if eigenvalues = diagonal blocks of the Schur form (S, T),
+*> i.e. test the maximum over j of D(j) where:
+*>
+*> if alpha(j) is real:
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> if alpha(j) is complex:
+*> | det( s S - w T ) |
+*> D(j) = ---------------------------------------------------
+*> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
+*>
+*> and S and T are here the 2 x 2 diagonal blocks of S and T
+*> corresponding to the j-th and j+1-th eigenvalues.
+*> (with sorting of eigenvalues).
+*>
+*> (12) if sorting worked and SDIM is the number of eigenvalues
+*> which were SELECTed.
+*>
+*> Test Matrices
+*> =============
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DDRGES does nothing. NSIZES >= 0.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. NN >= 0.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRGES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A on input.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRGES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. THRESH >= 0.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array,
+*> dimension(LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, and T.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array,
+*> dimension(LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by DGGES. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by DGGES.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, max(NN))
+*> The (left) orthogonal matrix computed by DGGES.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q and Z. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by DGGES.
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by DGGES.
+*> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
+*> generalized eigenvalue of A and B.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX( 10*(N+1), 3*N*N ), where N is the largest
+*> matrix dimension.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRGES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, ALPHAR,
$ ALPHAI, BETA, WORK, LWORK, RESULT, BWORK,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
@@ -20,289 +424,6 @@
$ WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* DDRGES checks the nonsymmetric generalized eigenvalue (Schur form)
-* problem driver DGGES.
-*
-* DGGES factors A and B as Q S Z' and Q T Z' , where ' means
-* transpose, T is upper triangular, S is in generalized Schur form
-* (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
-* the 2x2 blocks corresponding to complex conjugate pairs of
-* generalized eigenvalues), and Q and Z are orthogonal. It also
-* computes the generalized eigenvalues (alpha(j),beta(j)), j=1,...,n,
-* Thus, w(j) = alpha(j)/beta(j) is a root of the characteristic
-* equation
-* det( A - w(j) B ) = 0
-* Optionally it also reorder the eigenvalues so that a selected
-* cluster of eigenvalues appears in the leading diagonal block of the
-* Schur forms.
-*
-* When DDRGES is called, a number of matrix "sizes" ("N's") and a
-* number of matrix "TYPES" are specified. For each size ("N")
-* and each TYPE of matrix, a pair of matrices (A, B) will be generated
-* and used for testing. For each matrix pair, the following 13 tests
-* will be performed and compared with the threshhold THRESH except
-* the tests (5), (11) and (13).
-*
-*
-* (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues)
-*
-*
-* (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues)
-*
-*
-* (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues)
-*
-*
-* (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues)
-*
-* (5) if A is in Schur form (i.e. quasi-triangular form)
-* (no sorting of eigenvalues)
-*
-* (6) if eigenvalues = diagonal blocks of the Schur form (S, T),
-* i.e., test the maximum over j of D(j) where:
-*
-* if alpha(j) is real:
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* if alpha(j) is complex:
-* | det( s S - w T ) |
-* D(j) = ---------------------------------------------------
-* ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
-*
-* and S and T are here the 2 x 2 diagonal blocks of S and T
-* corresponding to the j-th and j+1-th eigenvalues.
-* (no sorting of eigenvalues)
-*
-* (7) | (A,B) - Q (S,T) Z' | / ( | (A,B) | n ulp )
-* (with sorting of eigenvalues).
-*
-* (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) if A is in Schur form (i.e. quasi-triangular form)
-* (with sorting of eigenvalues).
-*
-* (11) if eigenvalues = diagonal blocks of the Schur form (S, T),
-* i.e. test the maximum over j of D(j) where:
-*
-* if alpha(j) is real:
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* if alpha(j) is complex:
-* | det( s S - w T ) |
-* D(j) = ---------------------------------------------------
-* ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
-*
-* and S and T are here the 2 x 2 diagonal blocks of S and T
-* corresponding to the j-th and j+1-th eigenvalues.
-* (with sorting of eigenvalues).
-*
-* (12) if sorting worked and SDIM is the number of eigenvalues
-* which were SELECTed.
-*
-* Test Matrices
-* =============
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DDRGES does nothing. NSIZES >= 0.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. NN >= 0.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRGES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A on input.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRGES to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. THRESH >= 0.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) DOUBLE PRECISION array,
-* dimension(LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, and T.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) DOUBLE PRECISION array,
-* dimension(LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The Schur form matrix computed from A by DGGES. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by DGGES.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDQ, max(NN))
-* The (left) orthogonal matrix computed by DGGES.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q and Z. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) DOUBLE PRECISION array, dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by DGGES.
-*
-* ALPHAR (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* ALPHAI (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* BETA (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by DGGES.
-* ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
-* generalized eigenvalue of A and B.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX( 10*(N+1), 3*N*N ), where N is the largest
-* matrix dimension.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrgev.f b/TESTING/EIG/ddrgev.f
index 9a863ec9..45ba288f 100644
--- a/TESTING/EIG/ddrgev.f
+++ b/TESTING/EIG/ddrgev.f
@@ -1,11 +1,421 @@
+*> \brief \b DDRGEV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRGEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, QE, LDQE,
+* ALPHAR, ALPHAI, BETA, ALPHR1, ALPHI1, BETA1,
+* WORK, LWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LDQE, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ ALPHI1( * ), ALPHR1( * ), B( LDA, * ),
+* $ BETA( * ), BETA1( * ), Q( LDQ, * ),
+* $ QE( LDQE, * ), RESULT( * ), S( LDA, * ),
+* $ T( LDA, * ), WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRGEV checks the nonsymmetric generalized eigenvalue problem driver
+*> routine DGGEV.
+*>
+*> DGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the
+*> generalized eigenvalues and, optionally, the left and right
+*> eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is reasonalbe
+*> interpretation for beta=0, and even for both being zero.
+*>
+*> A right generalized eigenvector corresponding to a generalized
+*> eigenvalue w for a pair of matrices (A,B) is a vector r such that
+*> (A - wB) * r = 0. A left generalized eigenvector is a vector l such
+*> that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l.
+*>
+*> When DDRGEV is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, a pair of matrices (A, B) will be generated
+*> and used for testing. For each matrix pair, the following tests
+*> will be performed and compared with the threshhold THRESH.
+*>
+*> Results from DGGEV:
+*>
+*> (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of
+*>
+*> | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) )
+*>
+*> where VL**H is the conjugate-transpose of VL.
+*>
+*> (2) | |VL(i)| - 1 | / ulp and whether largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of
+*>
+*> | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) )
+*>
+*> (4) | |VR(i)| - 1 | / ulp and whether largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (5) W(full) = W(partial)
+*> W(full) denotes the eigenvalues computed when both l and r
+*> are also computed, and W(partial) denotes the eigenvalues
+*> computed when only W, only W and r, or only W and l are
+*> computed.
+*>
+*> (6) VL(full) = VL(partial)
+*> VL(full) denotes the left eigenvectors computed when both l
+*> and r are computed, and VL(partial) denotes the result
+*> when only l is computed.
+*>
+*> (7) VR(full) = VR(partial)
+*> VR(full) denotes the right eigenvectors computed when both l
+*> and r are also computed, and VR(partial) denotes the result
+*> when only l is computed.
+*>
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DDRGES does nothing. NSIZES >= 0.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. NN >= 0.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRGES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRGES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IERR not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array,
+*> dimension(LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, and T.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array,
+*> dimension(LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array,
+*> dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by DGGES. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array,
+*> dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by DGGES.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array,
+*> dimension (LDQ, max(NN))
+*> The (left) eigenvectors matrix computed by DGGEV.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q and Z. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by DGGES.
+*> \endverbatim
+*>
+*> \param[out] QE
+*> \verbatim
+*> QE is DOUBLE PRECISION array, dimension( LDQ, max(NN) )
+*> QE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQE
+*> \verbatim
+*> LDQE is INTEGER
+*> The leading dimension of QE. LDQE >= max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by DGGEV.
+*> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
+*> generalized eigenvalue of A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHR1
+*> \verbatim
+*> ALPHR1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI1
+*> \verbatim
+*> ALPHI1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like ALPHAR, ALPHAI, BETA, these arrays contain the
+*> eigenvalues of A and B, but those computed when DGGEV only
+*> computes a partial eigendecomposition, i.e. not the
+*> eigenvalues and left and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. LWORK >= MAX( 8*N, N*(N+1) ).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRGEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, QE, LDQE,
$ ALPHAR, ALPHAI, BETA, ALPHR1, ALPHI1, BETA1,
$ WORK, LWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LDQE, LWORK, NOUNIT, NSIZES,
@@ -22,277 +432,6 @@
$ T( LDA, * ), WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* DDRGEV checks the nonsymmetric generalized eigenvalue problem driver
-* routine DGGEV.
-*
-* DGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the
-* generalized eigenvalues and, optionally, the left and right
-* eigenvectors.
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is reasonalbe
-* interpretation for beta=0, and even for both being zero.
-*
-* A right generalized eigenvector corresponding to a generalized
-* eigenvalue w for a pair of matrices (A,B) is a vector r such that
-* (A - wB) * r = 0. A left generalized eigenvector is a vector l such
-* that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l.
-*
-* When DDRGEV is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, a pair of matrices (A, B) will be generated
-* and used for testing. For each matrix pair, the following tests
-* will be performed and compared with the threshhold THRESH.
-*
-* Results from DGGEV:
-*
-* (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of
-*
-* | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) )
-*
-* where VL**H is the conjugate-transpose of VL.
-*
-* (2) | |VL(i)| - 1 | / ulp and whether largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of
-*
-* | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) )
-*
-* (4) | |VR(i)| - 1 | / ulp and whether largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (5) W(full) = W(partial)
-* W(full) denotes the eigenvalues computed when both l and r
-* are also computed, and W(partial) denotes the eigenvalues
-* computed when only W, only W and r, or only W and l are
-* computed.
-*
-* (6) VL(full) = VL(partial)
-* VL(full) denotes the left eigenvectors computed when both l
-* and r are computed, and VL(partial) denotes the result
-* when only l is computed.
-*
-* (7) VR(full) = VR(partial)
-* VR(full) denotes the right eigenvectors computed when both l
-* and r are also computed, and VR(partial) denotes the result
-* when only l is computed.
-*
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DDRGES does nothing. NSIZES >= 0.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. NN >= 0.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRGES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRGES to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IERR not equal to 0.)
-*
-* A (input/workspace) DOUBLE PRECISION array,
-* dimension(LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, and T.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) DOUBLE PRECISION array,
-* dimension(LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) DOUBLE PRECISION array,
-* dimension (LDA, max(NN))
-* The Schur form matrix computed from A by DGGES. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) DOUBLE PRECISION array,
-* dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by DGGES.
-*
-* Q (workspace) DOUBLE PRECISION array,
-* dimension (LDQ, max(NN))
-* The (left) eigenvectors matrix computed by DGGEV.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q and Z. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) DOUBLE PRECISION array, dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by DGGES.
-*
-* QE (workspace) DOUBLE PRECISION array, dimension( LDQ, max(NN) )
-* QE holds the computed right or left eigenvectors.
-*
-* LDQE (input) INTEGER
-* The leading dimension of QE. LDQE >= max(1,max(NN)).
-*
-* ALPHAR (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* ALPHAI (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* BETA (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by DGGEV.
-* ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
-* generalized eigenvalue of A and B.
-*
-* ALPHR1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* ALPHI1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* BETA1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Like ALPHAR, ALPHAI, BETA, these arrays contain the
-* eigenvalues of A and B, but those computed when DGGEV only
-* computes a partial eigendecomposition, i.e. not the
-* eigenvalues and left and right eigenvectors.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. LWORK >= MAX( 8*N, N*(N+1) ).
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrgsx.f b/TESTING/EIG/ddrgsx.f
index 03442dd8..99e77861 100644
--- a/TESTING/EIG/ddrgsx.f
+++ b/TESTING/EIG/ddrgsx.f
@@ -1,10 +1,371 @@
+*> \brief \b DDRGSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B, AI,
+* BI, Z, Q, ALPHAR, ALPHAI, BETA, C, LDC, S,
+* WORK, LWORK, IWORK, LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
+* $ NOUT, NSIZE
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AI( LDA, * ), ALPHAI( * ),
+* $ ALPHAR( * ), B( LDA, * ), BETA( * ),
+* $ BI( LDA, * ), C( LDC, * ), Q( LDA, * ), S( * ),
+* $ WORK( * ), Z( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRGSX checks the nonsymmetric generalized eigenvalue (Schur form)
+*> problem expert driver DGGESX.
+*>
+*> DGGESX factors A and B as Q S Z' and Q T Z', where ' means
+*> transpose, T is upper triangular, S is in generalized Schur form
+*> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
+*> the 2x2 blocks corresponding to complex conjugate pairs of
+*> generalized eigenvalues), and Q and Z are orthogonal. It also
+*> computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)). Thus, w(j) = alpha(j)/beta(j) is a root of the
+*> characteristic equation
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> Optionally it also reorders the eigenvalues so that a selected
+*> cluster of eigenvalues appears in the leading diagonal block of the
+*> Schur forms; computes a reciprocal condition number for the average
+*> of the selected eigenvalues; and computes a reciprocal condition
+*> number for the right and left deflating subspaces corresponding to
+*> the selected eigenvalues.
+*>
+*> When DDRGSX is called with NSIZE > 0, five (5) types of built-in
+*> matrix pairs are used to test the routine DGGESX.
+*>
+*> When DDRGSX is called with NSIZE = 0, it reads in test matrix data
+*> to test DGGESX.
+*>
+*> For each matrix pair, the following tests will be performed and
+*> compared with the threshhold THRESH except for the tests (7) and (9):
+*>
+*> (1) | A - Q S Z' | / ( |A| n ulp )
+*>
+*> (2) | B - Q T Z' | / ( |B| n ulp )
+*>
+*> (3) | I - QQ' | / ( n ulp )
+*>
+*> (4) | I - ZZ' | / ( n ulp )
+*>
+*> (5) if A is in Schur form (i.e. quasi-triangular form)
+*>
+*> (6) maximum over j of D(j) where:
+*>
+*> if alpha(j) is real:
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> if alpha(j) is complex:
+*> | det( s S - w T ) |
+*> D(j) = ---------------------------------------------------
+*> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
+*>
+*> and S and T are here the 2 x 2 diagonal blocks of S and T
+*> corresponding to the j-th and j+1-th eigenvalues.
+*>
+*> (7) if sorting worked and SDIM is the number of eigenvalues
+*> which were selected.
+*>
+*> (8) the estimated value DIF does not differ from the true values of
+*> Difu and Difl more than a factor 10*THRESH. If the estimate DIF
+*> equals zero the corresponding true values of Difu and Difl
+*> should be less than EPS*norm(A, B). If the true value of Difu
+*> and Difl equal zero, the estimate DIF should be less than
+*> EPS*norm(A, B).
+*>
+*> (9) If INFO = N+3 is returned by DGGESX, the reordering "failed"
+*> and we check that DIF = PL = PR = 0 and that the true value of
+*> Difu and Difl is < EPS*norm(A, B). We count the events when
+*> INFO=N+3.
+*>
+*> For read-in test matrices, the above tests are run except that the
+*> exact value for DIF (and PL) is input data. Additionally, there is
+*> one more test run for read-in test matrices:
+*>
+*> (10) the estimated value PL does not differ from the true value of
+*> PLTRU more than a factor THRESH. If the estimate PL equals
+*> zero the corresponding true value of PLTRU should be less than
+*> EPS*norm(A, B). If the true value of PLTRU equal zero, the
+*> estimate PL should be less than EPS*norm(A, B).
+*>
+*> Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1)
+*> matrix pairs are generated and tested. NSIZE should be kept small.
+*>
+*> SVD (routine DGESVD) is used for computing the true value of DIF_u
+*> and DIF_l when testing the built-in test problems.
+*>
+*> Built-in Test Matrices
+*> ======================
+*>
+*> All built-in test matrices are the 2 by 2 block of triangular
+*> matrices
+*>
+*> A = [ A11 A12 ] and B = [ B11 B12 ]
+*> [ A22 ] [ B22 ]
+*>
+*> where for different type of A11 and A22 are given as the following.
+*> A12 and B12 are chosen so that the generalized Sylvester equation
+*>
+*> A11*R - L*A22 = -A12
+*> B11*R - L*B22 = -B12
+*>
+*> have prescribed solution R and L.
+*>
+*> Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1).
+*> B11 = I_m, B22 = I_k
+*> where J_k(a,b) is the k-by-k Jordan block with ``a'' on
+*> diagonal and ``b'' on superdiagonal.
+*>
+*> Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and
+*> B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m
+*> A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and
+*> B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
+*>
+*> Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each
+*> second diagonal block in A_11 and each third diagonal block
+*> in A_22 are made as 2 by 2 blocks.
+*>
+*> Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) )
+*> for i=1,...,m, j=1,...,m and
+*> A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) )
+*> for i=m+1,...,k, j=m+1,...,k
+*>
+*> Type 5: (A,B) and have potentially close or common eigenvalues and
+*> very large departure from block diagonality A_11 is chosen
+*> as the m x m leading submatrix of A_1:
+*> | 1 b |
+*> | -b 1 |
+*> | 1+d b |
+*> | -b 1+d |
+*> A_1 = | d 1 |
+*> | -1 d |
+*> | -d 1 |
+*> | -1 -d |
+*> | 1 |
+*> and A_22 is chosen as the k x k leading submatrix of A_2:
+*> | -1 b |
+*> | -b -1 |
+*> | 1-d b |
+*> | -b 1-d |
+*> A_2 = | d 1+b |
+*> | -1-b d |
+*> | -d 1+b |
+*> | -1+b -d |
+*> | 1-d |
+*> and matrix B are chosen as identity matrices (see DLATM5).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZE
+*> \verbatim
+*> NSIZE is INTEGER
+*> The maximum size of the matrices to use. NSIZE >= 0.
+*> If NSIZE = 0, no built-in tests matrices are used, but
+*> read-in test matrices are used to test DGGESX.
+*> \endverbatim
+*>
+*> \param[in] NCMAX
+*> \verbatim
+*> NCMAX is INTEGER
+*> Maximum allowable NMAX for generating Kroneker matrix
+*> in call to DLAKF2
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. THRESH >= 0.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Used to store the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, AI, BI, Z and Q,
+*> LDA >= max( 1, NSIZE ). For the read-in test,
+*> LDA >= max( 1, N ), N is the size of the test matrices.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Used to store the matrix whose eigenvalues are to be
+*> computed. On exit, B contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] AI
+*> \verbatim
+*> AI is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Copy of A, modified by DGGESX.
+*> \endverbatim
+*>
+*> \param[out] BI
+*> \verbatim
+*> BI is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Copy of B, modified by DGGESX.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Z holds the left Schur vectors computed by DGGESX.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Q holds the right Schur vectors computed by DGGESX.
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (NSIZE)
+*> \endverbatim
+*> \verbatim
+*> On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC, LDC)
+*> Store the matrix generated by subroutine DLAKF2, this is the
+*> matrix formed by Kronecker products used for estimating
+*> DIF.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of C. LDC >= max(1, LDA*LDA/2 ).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (LDC)
+*> Singular values of C
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX( 5*NSIZE*NSIZE/2 - 2, 10*(NSIZE+1) )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= NSIZE + 6.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (LDA)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B, AI,
$ BI, Z, Q, ALPHAR, ALPHAI, BETA, C, LDC, S,
$ WORK, LWORK, IWORK, LIWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
@@ -20,243 +381,6 @@
$ WORK( * ), Z( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DDRGSX checks the nonsymmetric generalized eigenvalue (Schur form)
-* problem expert driver DGGESX.
-*
-* DGGESX factors A and B as Q S Z' and Q T Z', where ' means
-* transpose, T is upper triangular, S is in generalized Schur form
-* (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
-* the 2x2 blocks corresponding to complex conjugate pairs of
-* generalized eigenvalues), and Q and Z are orthogonal. It also
-* computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)). Thus, w(j) = alpha(j)/beta(j) is a root of the
-* characteristic equation
-*
-* det( A - w(j) B ) = 0
-*
-* Optionally it also reorders the eigenvalues so that a selected
-* cluster of eigenvalues appears in the leading diagonal block of the
-* Schur forms; computes a reciprocal condition number for the average
-* of the selected eigenvalues; and computes a reciprocal condition
-* number for the right and left deflating subspaces corresponding to
-* the selected eigenvalues.
-*
-* When DDRGSX is called with NSIZE > 0, five (5) types of built-in
-* matrix pairs are used to test the routine DGGESX.
-*
-* When DDRGSX is called with NSIZE = 0, it reads in test matrix data
-* to test DGGESX.
-*
-* For each matrix pair, the following tests will be performed and
-* compared with the threshhold THRESH except for the tests (7) and (9):
-*
-* (1) | A - Q S Z' | / ( |A| n ulp )
-*
-* (2) | B - Q T Z' | / ( |B| n ulp )
-*
-* (3) | I - QQ' | / ( n ulp )
-*
-* (4) | I - ZZ' | / ( n ulp )
-*
-* (5) if A is in Schur form (i.e. quasi-triangular form)
-*
-* (6) maximum over j of D(j) where:
-*
-* if alpha(j) is real:
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* if alpha(j) is complex:
-* | det( s S - w T ) |
-* D(j) = ---------------------------------------------------
-* ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
-*
-* and S and T are here the 2 x 2 diagonal blocks of S and T
-* corresponding to the j-th and j+1-th eigenvalues.
-*
-* (7) if sorting worked and SDIM is the number of eigenvalues
-* which were selected.
-*
-* (8) the estimated value DIF does not differ from the true values of
-* Difu and Difl more than a factor 10*THRESH. If the estimate DIF
-* equals zero the corresponding true values of Difu and Difl
-* should be less than EPS*norm(A, B). If the true value of Difu
-* and Difl equal zero, the estimate DIF should be less than
-* EPS*norm(A, B).
-*
-* (9) If INFO = N+3 is returned by DGGESX, the reordering "failed"
-* and we check that DIF = PL = PR = 0 and that the true value of
-* Difu and Difl is < EPS*norm(A, B). We count the events when
-* INFO=N+3.
-*
-* For read-in test matrices, the above tests are run except that the
-* exact value for DIF (and PL) is input data. Additionally, there is
-* one more test run for read-in test matrices:
-*
-* (10) the estimated value PL does not differ from the true value of
-* PLTRU more than a factor THRESH. If the estimate PL equals
-* zero the corresponding true value of PLTRU should be less than
-* EPS*norm(A, B). If the true value of PLTRU equal zero, the
-* estimate PL should be less than EPS*norm(A, B).
-*
-* Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1)
-* matrix pairs are generated and tested. NSIZE should be kept small.
-*
-* SVD (routine DGESVD) is used for computing the true value of DIF_u
-* and DIF_l when testing the built-in test problems.
-*
-* Built-in Test Matrices
-* ======================
-*
-* All built-in test matrices are the 2 by 2 block of triangular
-* matrices
-*
-* A = [ A11 A12 ] and B = [ B11 B12 ]
-* [ A22 ] [ B22 ]
-*
-* where for different type of A11 and A22 are given as the following.
-* A12 and B12 are chosen so that the generalized Sylvester equation
-*
-* A11*R - L*A22 = -A12
-* B11*R - L*B22 = -B12
-*
-* have prescribed solution R and L.
-*
-* Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1).
-* B11 = I_m, B22 = I_k
-* where J_k(a,b) is the k-by-k Jordan block with ``a'' on
-* diagonal and ``b'' on superdiagonal.
-*
-* Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and
-* B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m
-* A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and
-* B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
-*
-* Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each
-* second diagonal block in A_11 and each third diagonal block
-* in A_22 are made as 2 by 2 blocks.
-*
-* Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) )
-* for i=1,...,m, j=1,...,m and
-* A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) )
-* for i=m+1,...,k, j=m+1,...,k
-*
-* Type 5: (A,B) and have potentially close or common eigenvalues and
-* very large departure from block diagonality A_11 is chosen
-* as the m x m leading submatrix of A_1:
-* | 1 b |
-* | -b 1 |
-* | 1+d b |
-* | -b 1+d |
-* A_1 = | d 1 |
-* | -1 d |
-* | -d 1 |
-* | -1 -d |
-* | 1 |
-* and A_22 is chosen as the k x k leading submatrix of A_2:
-* | -1 b |
-* | -b -1 |
-* | 1-d b |
-* | -b 1-d |
-* A_2 = | d 1+b |
-* | -1-b d |
-* | -d 1+b |
-* | -1+b -d |
-* | 1-d |
-* and matrix B are chosen as identity matrices (see DLATM5).
-*
-*
-* Arguments
-* =========
-*
-* NSIZE (input) INTEGER
-* The maximum size of the matrices to use. NSIZE >= 0.
-* If NSIZE = 0, no built-in tests matrices are used, but
-* read-in test matrices are used to test DGGESX.
-*
-* NCMAX (input) INTEGER
-* Maximum allowable NMAX for generating Kroneker matrix
-* in call to DLAKF2
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. THRESH >= 0.
-*
-* NIN (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Used to store the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, AI, BI, Z and Q,
-* LDA >= max( 1, NSIZE ). For the read-in test,
-* LDA >= max( 1, N ), N is the size of the test matrices.
-*
-* B (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Used to store the matrix whose eigenvalues are to be
-* computed. On exit, B contains the last matrix actually used.
-*
-* AI (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Copy of A, modified by DGGESX.
-*
-* BI (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Copy of B, modified by DGGESX.
-*
-* Z (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Z holds the left Schur vectors computed by DGGESX.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Q holds the right Schur vectors computed by DGGESX.
-*
-* ALPHAR (workspace) DOUBLE PRECISION array, dimension (NSIZE)
-* ALPHAI (workspace) DOUBLE PRECISION array, dimension (NSIZE)
-* BETA (workspace) DOUBLE PRECISION array, dimension (NSIZE)
-* On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
-*
-* C (workspace) DOUBLE PRECISION array, dimension (LDC, LDC)
-* Store the matrix generated by subroutine DLAKF2, this is the
-* matrix formed by Kronecker products used for estimating
-* DIF.
-*
-* LDC (input) INTEGER
-* The leading dimension of C. LDC >= max(1, LDA*LDA/2 ).
-*
-* S (workspace) DOUBLE PRECISION array, dimension (LDC)
-* Singular values of C
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX( 5*NSIZE*NSIZE/2 - 2, 10*(NSIZE+1) )
-*
-* IWORK (workspace) INTEGER array, dimension (LIWORK)
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= NSIZE + 6.
-*
-* BWORK (workspace) LOGICAL array, dimension (LDA)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrgvx.f b/TESTING/EIG/ddrgvx.f
index 0183c024..bebae73b 100644
--- a/TESTING/EIG/ddrgvx.f
+++ b/TESTING/EIG/ddrgvx.f
@@ -1,11 +1,312 @@
+*> \brief \b DDRGVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRGVX( NSIZE, THRESH, NIN, NOUT, A, LDA, B, AI, BI,
+* ALPHAR, ALPHAI, BETA, VL, VR, ILO, IHI, LSCALE,
+* RSCALE, S, DTRU, DIF, DIFTRU, WORK, LWORK,
+* IWORK, LIWORK, RESULT, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LIWORK, LWORK, NIN, NOUT,
+* $ NSIZE
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AI( LDA, * ), ALPHAI( * ),
+* $ ALPHAR( * ), B( LDA, * ), BETA( * ),
+* $ BI( LDA, * ), DIF( * ), DIFTRU( * ), DTRU( * ),
+* $ LSCALE( * ), RESULT( 4 ), RSCALE( * ), S( * ),
+* $ VL( LDA, * ), VR( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRGVX checks the nonsymmetric generalized eigenvalue problem
+*> expert driver DGGEVX.
+*>
+*> DGGEVX computes the generalized eigenvalues, (optionally) the left
+*> and/or right eigenvectors, (optionally) computes a balancing
+*> transformation to improve the conditioning, and (optionally)
+*> reciprocal condition numbers for the eigenvalues and eigenvectors.
+*>
+*> When DDRGVX is called with NSIZE > 0, two types of test matrix pairs
+*> are generated by the subroutine DLATM6 and test the driver DGGEVX.
+*> The test matrices have the known exact condition numbers for
+*> eigenvalues. For the condition numbers of the eigenvectors
+*> corresponding the first and last eigenvalues are also know
+*> ``exactly'' (see DLATM6).
+*>
+*> For each matrix pair, the following tests will be performed and
+*> compared with the threshhold THRESH.
+*>
+*> (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> where l**H is the conjugate tranpose of l.
+*>
+*> (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> (3) The condition number S(i) of eigenvalues computed by DGGEVX
+*> differs less than a factor THRESH from the exact S(i) (see
+*> DLATM6).
+*>
+*> (4) DIF(i) computed by DTGSNA differs less than a factor 10*THRESH
+*> from the exact value (for the 1st and 5th vectors only).
+*>
+*> Test Matrices
+*> =============
+*>
+*> Two kinds of test matrix pairs
+*>
+*> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
+*>
+*> are used in the tests:
+*>
+*> 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
+*> 0 2+a 0 0 0 0 1 0 0 0
+*> 0 0 3+a 0 0 0 0 1 0 0
+*> 0 0 0 4+a 0 0 0 0 1 0
+*> 0 0 0 0 5+a , 0 0 0 0 1 , and
+*>
+*> 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
+*> 1 1 0 0 0 0 1 0 0 0
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1+a 1+b 0 0 0 1 0
+*> 0 0 0 -1-b 1+a , 0 0 0 0 1 .
+*>
+*> In both cases the same inverse(YH) and inverse(X) are used to compute
+*> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
+*>
+*> YH: = 1 0 -y y -y X = 1 0 -x -x x
+*> 0 1 -y y -y 0 1 x -x -x
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1 0 0 0 0 1 0
+*> 0 0 0 0 1, 0 0 0 0 1 , where
+*>
+*> a, b, x and y will have all values independently of each other from
+*> { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZE
+*> \verbatim
+*> NSIZE is INTEGER
+*> The number of sizes of matrices to use. NSIZE must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIN will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, AI, BI, Ao, and Bo.
+*> It must be at least 1 and at least NSIZE.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, B contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] AI
+*> \verbatim
+*> AI is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Copy of A, modified by DGGEVX.
+*> \endverbatim
+*>
+*> \param[out] BI
+*> \verbatim
+*> BI is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> Copy of B, modified by DGGEVX.
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (NSIZE)
+*> \endverbatim
+*> \verbatim
+*> On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> VL holds the left eigenvectors computed by DGGEVX.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDA, NSIZE)
+*> VR holds the right eigenvectors computed by DGGEVX.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DTRU
+*> \verbatim
+*> DTRU is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DIFTRU
+*> \verbatim
+*> DIFTRU is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> Leading dimension of WORK. LWORK >= 2*N*N+12*N+16.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> Leading dimension of IWORK. Must be at least N+6.
+*> \endverbatim
+*> \verbatim
+*>
+*> \param[out] RESULT
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRGVX( NSIZE, THRESH, NIN, NOUT, A, LDA, B, AI, BI,
$ ALPHAR, ALPHAI, BETA, VL, VR, ILO, IHI, LSCALE,
$ RSCALE, S, DTRU, DIF, DIFTRU, WORK, LWORK,
$ IWORK, LIWORK, RESULT, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, ILO, INFO, LDA, LIWORK, LWORK, NIN, NOUT,
@@ -22,166 +323,6 @@
$ VL( LDA, * ), VR( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRGVX checks the nonsymmetric generalized eigenvalue problem
-* expert driver DGGEVX.
-*
-* DGGEVX computes the generalized eigenvalues, (optionally) the left
-* and/or right eigenvectors, (optionally) computes a balancing
-* transformation to improve the conditioning, and (optionally)
-* reciprocal condition numbers for the eigenvalues and eigenvectors.
-*
-* When DDRGVX is called with NSIZE > 0, two types of test matrix pairs
-* are generated by the subroutine DLATM6 and test the driver DGGEVX.
-* The test matrices have the known exact condition numbers for
-* eigenvalues. For the condition numbers of the eigenvectors
-* corresponding the first and last eigenvalues are also know
-* ``exactly'' (see DLATM6).
-*
-* For each matrix pair, the following tests will be performed and
-* compared with the threshhold THRESH.
-*
-* (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* where l**H is the conjugate tranpose of l.
-*
-* (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* (3) The condition number S(i) of eigenvalues computed by DGGEVX
-* differs less than a factor THRESH from the exact S(i) (see
-* DLATM6).
-*
-* (4) DIF(i) computed by DTGSNA differs less than a factor 10*THRESH
-* from the exact value (for the 1st and 5th vectors only).
-*
-* Test Matrices
-* =============
-*
-* Two kinds of test matrix pairs
-*
-* (A, B) = inverse(YH) * (Da, Db) * inverse(X)
-*
-* are used in the tests:
-*
-* 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
-* 0 2+a 0 0 0 0 1 0 0 0
-* 0 0 3+a 0 0 0 0 1 0 0
-* 0 0 0 4+a 0 0 0 0 1 0
-* 0 0 0 0 5+a , 0 0 0 0 1 , and
-*
-* 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
-* 1 1 0 0 0 0 1 0 0 0
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1+a 1+b 0 0 0 1 0
-* 0 0 0 -1-b 1+a , 0 0 0 0 1 .
-*
-* In both cases the same inverse(YH) and inverse(X) are used to compute
-* (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
-*
-* YH: = 1 0 -y y -y X = 1 0 -x -x x
-* 0 1 -y y -y 0 1 x -x -x
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1 0 0 0 0 1 0
-* 0 0 0 0 1, 0 0 0 0 1 , where
-*
-* a, b, x and y will have all values independently of each other from
-* { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
-*
-* Arguments
-* =========
-*
-* NSIZE (input) INTEGER
-* The number of sizes of matrices to use. NSIZE must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIN will be
-* tested.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIN (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, AI, BI, Ao, and Bo.
-* It must be at least 1 and at least NSIZE.
-*
-* B (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, B contains the last matrix actually used.
-*
-* AI (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Copy of A, modified by DGGEVX.
-*
-* BI (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* Copy of B, modified by DGGEVX.
-*
-* ALPHAR (workspace) DOUBLE PRECISION array, dimension (NSIZE)
-* ALPHAI (workspace) DOUBLE PRECISION array, dimension (NSIZE)
-* BETA (workspace) DOUBLE PRECISION array, dimension (NSIZE)
-* On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
-*
-* VL (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* VL holds the left eigenvectors computed by DGGEVX.
-*
-* VR (workspace) DOUBLE PRECISION array, dimension (LDA, NSIZE)
-* VR holds the right eigenvectors computed by DGGEVX.
-*
-* ILO (output/workspace) INTEGER
-*
-* IHI (output/workspace) INTEGER
-*
-* LSCALE (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RSCALE (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* S (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* DTRU (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* DIF (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* DIFTRU (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* Leading dimension of WORK. LWORK >= 2*N*N+12*N+16.
-*
-* IWORK (workspace) INTEGER array, dimension (LIWORK)
-*
-* LIWORK (input) INTEGER
-* Leading dimension of IWORK. Must be at least N+6.
-*
-* RESULT (output/workspace) DOUBLE PRECISION array, dimension (4)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrvbd.f b/TESTING/EIG/ddrvbd.f
index 7c6083a2..3db3b7dc 100644
--- a/TESTING/EIG/ddrvbd.f
+++ b/TESTING/EIG/ddrvbd.f
@@ -1,10 +1,330 @@
+*> \brief \b DDRVBD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVBD( NSIZES, MM, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* A, LDA, U, LDU, VT, LDVT, ASAV, USAV, VTSAV, S,
+* SSAV, E, WORK, LWORK, IWORK, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, NOUT, NSIZES,
+* $ NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), MM( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), ASAV( LDA, * ), E( * ), S( * ),
+* $ SSAV( * ), U( LDU, * ), USAV( LDU, * ),
+* $ VT( LDVT, * ), VTSAV( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVBD checks the singular value decomposition (SVD) drivers
+*> DGESVD, DGESDD, DGESVJ, and DGEJSV.
+*>
+*> Both DGESVD and DGESDD factor A = U diag(S) VT, where U and VT are
+*> orthogonal and diag(S) is diagonal with the entries of the array S
+*> on its diagonal. The entries of S are the singular values,
+*> nonnegative and stored in decreasing order. U and VT can be
+*> optionally not computed, overwritten on A, or computed partially.
+*>
+*> A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN.
+*> U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
+*>
+*> When DDRVBD is called, a number of matrix "sizes" (M's and N's)
+*> and a number of matrix "types" are specified. For each size (M,N)
+*> and each type of matrix, and for the minimal workspace as well as
+*> workspace adequate to permit blocking, an M x N matrix "A" will be
+*> generated and used to test the SVD routines. For each matrix, A will
+*> be factored as A = U diag(S) VT and the following 12 tests computed:
+*>
+*> Test for DGESVD:
+*>
+*> (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (2) | I - U'U | / ( M ulp )
+*>
+*> (3) | I - VT VT' | / ( N ulp )
+*>
+*> (4) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
+*> computed U.
+*>
+*> (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
+*> computed VT.
+*>
+*> (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
+*> vector of singular values from the partial SVD
+*>
+*> Test for DGESDD:
+*>
+*> (8) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (9) | I - U'U | / ( M ulp )
+*>
+*> (10) | I - VT VT' | / ( N ulp )
+*>
+*> (11) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (12) | U - Upartial | / ( M ulp ) where Upartial is a partially
+*> computed U.
+*>
+*> (13) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
+*> computed VT.
+*>
+*> (14) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
+*> vector of singular values from the partial SVD
+*>
+*> Test for SGESVJ:
+*>
+*> (15) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (16) | I - U'U | / ( M ulp )
+*>
+*> (17) | I - VT VT' | / ( N ulp )
+*>
+*> (18) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> Test for SGEJSV:
+*>
+*> (19) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (20) | I - U'U | / ( M ulp )
+*>
+*> (21) | I - VT VT' | / ( N ulp )
+*>
+*> (22) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> The "sizes" are specified by the arrays MM(1:NSIZES) and
+*> NN(1:NSIZES); the value of each element pair (MM(j),NN(j))
+*> specifies one size. The "types" are specified by a logical array
+*> DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j"
+*> will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*> (4) Same as (3), but multiplied by the underflow-threshold / ULP.
+*> (5) Same as (3), but multiplied by the overflow-threshold * ULP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of matrix sizes (M,N) contained in the vectors
+*> MM and NN.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER array, dimension (NSIZES)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRVBD
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrices are in A and B.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
+*> of type j will be generated. If NTYPES is smaller than the
+*> maximum number of types defined (PARAMETER MAXTYP), then
+*> types NTYPES+1 through MAXTYP will not be generated. If
+*> NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
+*> DOTYPE(NTYPES) will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095; if not they will be
+*> reduced mod 4096. Also, ISEED(4) must be odd.
+*> On exit, ISEED is changed and can be used in the next call to
+*> DDRVBD to continue the same random number sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. The test
+*> ratios are scaled to be O(1), so THRESH should be a small
+*> multiple of 1, e.g., 10 or 100. To have every test ratio
+*> printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> where NMAX is the maximum value of N in NN.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,MMAX),
+*> where MMAX is the maximum value of M in MM.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,MMAX)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,MMAX).
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is DOUBLE PRECISION array, dimension (LDVT,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] USAV
+*> \verbatim
+*> USAV is DOUBLE PRECISION array, dimension (LDU,MMAX)
+*> \endverbatim
+*>
+*> \param[out] VTSAV
+*> \verbatim
+*> VTSAV is DOUBLE PRECISION array, dimension (LDVT,NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (max(min(MM,NN)))
+*> \endverbatim
+*>
+*> \param[out] SSAV
+*> \verbatim
+*> SSAV is DOUBLE PRECISION array, dimension
+*> (max(min(MM,NN)))
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension
+*> (max(min(MM,NN)))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(3*MN+MX,5*MN-4)+2*MN**2 for all pairs
+*> pairs (MN,MX)=( min(MM(j),NN(j), max(MM(j),NN(j)) )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least 8*min(M,N)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some MM(j) < 0
+*> -3: Some NN(j) < 0
+*> -4: NTYPES < 0
+*> -7: THRESH < 0
+*> -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
+*> -12: LDU < 1 or LDU < MMAX.
+*> -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).
+*> -21: LWORK too small.
+*> If DLATMS, or DGESVD returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRVBD( NSIZES, MM, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ A, LDA, U, LDU, VT, LDVT, ASAV, USAV, VTSAV, S,
$ SSAV, E, WORK, LWORK, IWORK, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LDVT, LWORK, NOUT, NSIZES,
@@ -19,207 +339,6 @@
$ VT( LDVT, * ), VTSAV( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVBD checks the singular value decomposition (SVD) drivers
-* DGESVD, DGESDD, DGESVJ, and DGEJSV.
-*
-* Both DGESVD and DGESDD factor A = U diag(S) VT, where U and VT are
-* orthogonal and diag(S) is diagonal with the entries of the array S
-* on its diagonal. The entries of S are the singular values,
-* nonnegative and stored in decreasing order. U and VT can be
-* optionally not computed, overwritten on A, or computed partially.
-*
-* A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN.
-* U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
-*
-* When DDRVBD is called, a number of matrix "sizes" (M's and N's)
-* and a number of matrix "types" are specified. For each size (M,N)
-* and each type of matrix, and for the minimal workspace as well as
-* workspace adequate to permit blocking, an M x N matrix "A" will be
-* generated and used to test the SVD routines. For each matrix, A will
-* be factored as A = U diag(S) VT and the following 12 tests computed:
-*
-* Test for DGESVD:
-*
-* (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (2) | I - U'U | / ( M ulp )
-*
-* (3) | I - VT VT' | / ( N ulp )
-*
-* (4) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
-* computed U.
-*
-* (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
-* computed VT.
-*
-* (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
-* vector of singular values from the partial SVD
-*
-* Test for DGESDD:
-*
-* (8) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (9) | I - U'U | / ( M ulp )
-*
-* (10) | I - VT VT' | / ( N ulp )
-*
-* (11) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (12) | U - Upartial | / ( M ulp ) where Upartial is a partially
-* computed U.
-*
-* (13) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
-* computed VT.
-*
-* (14) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
-* vector of singular values from the partial SVD
-*
-* Test for SGESVJ:
-*
-* (15) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (16) | I - U'U | / ( M ulp )
-*
-* (17) | I - VT VT' | / ( N ulp )
-*
-* (18) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* Test for SGEJSV:
-*
-* (19) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (20) | I - U'U | / ( M ulp )
-*
-* (21) | I - VT VT' | / ( N ulp )
-*
-* (22) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* The "sizes" are specified by the arrays MM(1:NSIZES) and
-* NN(1:NSIZES); the value of each element pair (MM(j),NN(j))
-* specifies one size. The "types" are specified by a logical array
-* DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j"
-* will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-* (4) Same as (3), but multiplied by the underflow-threshold / ULP.
-* (5) Same as (3), but multiplied by the overflow-threshold * ULP.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of matrix sizes (M,N) contained in the vectors
-* MM and NN.
-*
-* MM (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix column dimension N.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRVBD
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrices are in A and B.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
-* of type j will be generated. If NTYPES is smaller than the
-* maximum number of types defined (PARAMETER MAXTYP), then
-* types NTYPES+1 through MAXTYP will not be generated. If
-* NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
-* DOTYPE(NTYPES) will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095; if not they will be
-* reduced mod 4096. Also, ISEED(4) must be odd.
-* On exit, ISEED is changed and can be used in the next call to
-* DDRVBD to continue the same random number sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. The test
-* ratios are scaled to be O(1), so THRESH should be a small
-* multiple of 1, e.g., 10 or 100. To have every test ratio
-* printed, use THRESH = 0.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
-* where NMAX is the maximum value of N in NN.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,MMAX),
-* where MMAX is the maximum value of M in MM.
-*
-* U (workspace) DOUBLE PRECISION array, dimension (LDU,MMAX)
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,MMAX).
-*
-* VT (workspace) DOUBLE PRECISION array, dimension (LDVT,NMAX)
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= max(1,NMAX).
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
-*
-* USAV (workspace) DOUBLE PRECISION array, dimension (LDU,MMAX)
-*
-* VTSAV (workspace) DOUBLE PRECISION array, dimension (LDVT,NMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MM,NN)))
-*
-* SSAV (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MM,NN)))
-*
-* E (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MM,NN)))
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(3*MN+MX,5*MN-4)+2*MN**2 for all pairs
-* pairs (MN,MX)=( min(MM(j),NN(j), max(MM(j),NN(j)) )
-*
-* IWORK (workspace) INTEGER array, dimension at least 8*min(M,N)
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some MM(j) < 0
-* -3: Some NN(j) < 0
-* -4: NTYPES < 0
-* -7: THRESH < 0
-* -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
-* -12: LDU < 1 or LDU < MMAX.
-* -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).
-* -21: LWORK too small.
-* If DLATMS, or DGESVD returns an error code, the
-* absolute value of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrves.f b/TESTING/EIG/ddrves.f
index f6b21457..ca8be704 100644
--- a/TESTING/EIG/ddrves.f
+++ b/TESTING/EIG/ddrves.f
@@ -1,10 +1,401 @@
+*> \brief \b DDRVES
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, HT, WR, WI, WRT, WIT, VS,
+* LDVS, RESULT, WORK, NWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ RESULT( 13 ), VS( LDVS, * ), WI( * ), WIT( * ),
+* $ WORK( * ), WR( * ), WRT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVES checks the nonsymmetric eigenvalue (Schur form) problem
+*> driver DGEES.
+*>
+*> When DDRVES is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 13
+*> tests will be performed:
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DDRVES does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRVES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRVES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max(NN).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by DGEES.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Yet another copy of the test matrix A, modified by DGEES.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WRT
+*> \verbatim
+*> WRT is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WIT
+*> \verbatim
+*> WIT is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when DGEES only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is DOUBLE PRECISION array, dimension (LDVS, max(NN))
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (13)
+*> The values computed by the 13 tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 5*NN(j)+2*NN(j)**2 for all j.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -17: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ).
+*> -20: NWORK too small.
+*> If DLATMR, SLATMS, SLATME or DGEES returns an error code,
+*> the absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRVES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, HT, WR, WI, WRT, WIT, VS,
$ LDVS, RESULT, WORK, NWORK, IWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
@@ -18,274 +409,6 @@
$ WORK( * ), WR( * ), WRT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVES checks the nonsymmetric eigenvalue (Schur form) problem
-* driver DGEES.
-*
-* When DDRVES is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 13
-* tests will be performed:
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DDRVES does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRVES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRVES to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max(NN).
-*
-* H (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by DGEES.
-*
-* HT (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Yet another copy of the test matrix A, modified by DGEES.
-*
-* WR (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* WI (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WRT (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* WIT (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when DGEES only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* VS (workspace) DOUBLE PRECISION array, dimension (LDVS, max(NN))
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1,max(NN)).
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (13)
-* The values computed by the 13 tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 5*NN(j)+2*NN(j)**2 for all j.
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -17: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ).
-* -20: NWORK too small.
-* If DLATMR, SLATMS, SLATME or DGEES returns an error code,
-* the absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrvev.f b/TESTING/EIG/ddrvev.f
index 8fbd9e63..b79b1fa0 100644
--- a/TESTING/EIG/ddrvev.f
+++ b/TESTING/EIG/ddrvev.f
@@ -1,11 +1,424 @@
+*> \brief \b DDRVEV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, WR, WI, WR1, WI1, VL, LDVL,
+* VR, LDVR, LRE, LDLRE, RESULT, WORK, NWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NOUNIT, NSIZES,
+* $ NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ RESULT( 7 ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WI( * ), WI1( * ), WORK( * ), WR( * ), WR1( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVEV checks the nonsymmetric eigenvalue problem driver DGEEV.
+*>
+*> When DDRVEV is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 7
+*> tests will be performed:
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a block diagonal matrix, with a 1x1 block for each
+*> real eigenvalue and a 2x2 block for each complex conjugate
+*> pair. If eigenvalues j and j+1 are a complex conjugate pair,
+*> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
+*> 2 x 2 block corresponding to the pair will be:
+*>
+*> ( wr wi )
+*> ( -wi wr )
+*>
+*> Such a block multiplying an n x 2 matrix ( ur ui ) on the
+*> right will be the same as multiplying ur + i*ui by wr + i*wi.
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and whether largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and whether largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) W(full) = W(partial)
+*>
+*> W(full) denotes the eigenvalues computed when both VR and VL
+*> are also computed, and W(partial) denotes the eigenvalues
+*> computed when only W, only W and VR, or only W and VL are
+*> computed.
+*>
+*> (6) VR(full) = VR(partial)
+*>
+*> VR(full) denotes the right eigenvectors computed when both VR
+*> and VL are computed, and VR(partial) denotes the result
+*> when only VR is computed.
+*>
+*> (7) VL(full) = VL(partial)
+*>
+*> VL(full) denotes the left eigenvectors computed when both VR
+*> and VL are also computed, and VL(partial) denotes the result
+*> when only VL is computed.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DDRVEV does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRVEV
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRVEV to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max(NN).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by DGEEV.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WR1
+*> \verbatim
+*> WR1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI1
+*> \verbatim
+*> WI1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when DGEEV only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL, max(NN))
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR, max(NN))
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is DOUBLE PRECISION array, dimension (LDLRE,max(NN))
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (7)
+*> The values computed by the seven tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 5*NN(j)+2*NN(j)**2 for all j.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ).
+*> -18: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ).
+*> -20: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ).
+*> -23: NWORK too small.
+*> If DLATMR, SLATMS, SLATME or DGEEV returns an error code,
+*> the absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRVEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, WR, WI, WR1, WI1, VL, LDVL,
$ VR, LDVR, LRE, LDLRE, RESULT, WORK, NWORK,
$ IWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NOUNIT, NSIZES,
@@ -20,285 +433,6 @@
$ WI( * ), WI1( * ), WORK( * ), WR( * ), WR1( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVEV checks the nonsymmetric eigenvalue problem driver DGEEV.
-*
-* When DDRVEV is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 7
-* tests will be performed:
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a block diagonal matrix, with a 1x1 block for each
-* real eigenvalue and a 2x2 block for each complex conjugate
-* pair. If eigenvalues j and j+1 are a complex conjugate pair,
-* so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
-* 2 x 2 block corresponding to the pair will be:
-*
-* ( wr wi )
-* ( -wi wr )
-*
-* Such a block multiplying an n x 2 matrix ( ur ui ) on the
-* right will be the same as multiplying ur + i*ui by wr + i*wi.
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and whether largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and whether largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) W(full) = W(partial)
-*
-* W(full) denotes the eigenvalues computed when both VR and VL
-* are also computed, and W(partial) denotes the eigenvalues
-* computed when only W, only W and VR, or only W and VL are
-* computed.
-*
-* (6) VR(full) = VR(partial)
-*
-* VR(full) denotes the right eigenvectors computed when both VR
-* and VL are computed, and VR(partial) denotes the result
-* when only VR is computed.
-*
-* (7) VL(full) = VL(partial)
-*
-* VL(full) denotes the left eigenvectors computed when both VR
-* and VL are also computed, and VL(partial) denotes the result
-* when only VL is computed.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DDRVEV does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRVEV
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRVEV to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max(NN).
-*
-* H (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by DGEEV.
-*
-* WR (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* WI (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WR1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* WI1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when DGEEV only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) DOUBLE PRECISION array, dimension (LDVL, max(NN))
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,max(NN)).
-*
-* VR (workspace) DOUBLE PRECISION array, dimension (LDVR, max(NN))
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,max(NN)).
-*
-* LRE (workspace) DOUBLE PRECISION array, dimension (LDLRE,max(NN))
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,max(NN)).
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (7)
-* The values computed by the seven tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 5*NN(j)+2*NN(j)**2 for all j.
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ).
-* -18: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ).
-* -20: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ).
-* -23: NWORK too small.
-* If DLATMR, SLATMS, SLATME or DGEEV returns an error code,
-* the absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrvgg.f b/TESTING/EIG/ddrvgg.f
index ab974fb7..e94d6b95 100644
--- a/TESTING/EIG/ddrvgg.f
+++ b/TESTING/EIG/ddrvgg.f
@@ -1,11 +1,465 @@
+*> \brief \b DDRVGG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* THRSHN, NOUNIT, A, LDA, B, S, T, S2, T2, Q,
+* LDQ, Z, ALPHR1, ALPHI1, BETA1, ALPHR2, ALPHI2,
+* BETA2, VL, VR, WORK, LWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
+* DOUBLE PRECISION THRESH, THRSHN
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), ALPHI1( * ), ALPHI2( * ),
+* $ ALPHR1( * ), ALPHR2( * ), B( LDA, * ),
+* $ BETA1( * ), BETA2( * ), Q( LDQ, * ),
+* $ RESULT( * ), S( LDA, * ), S2( LDA, * ),
+* $ T( LDA, * ), T2( LDA, * ), VL( LDQ, * ),
+* $ VR( LDQ, * ), WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVGG checks the nonsymmetric generalized eigenvalue driver
+*> routines.
+*> T T T
+*> DGEGS factors A and B as Q S Z and Q T Z , where means
+*> transpose, T is upper triangular, S is in generalized Schur form
+*> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
+*> the 2x2 blocks corresponding to complex conjugate pairs of
+*> generalized eigenvalues), and Q and Z are orthogonal. It also
+*> computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)), where alpha(j)=S(j,j) and beta(j)=P(j,j) --
+*> thus, w(j) = alpha(j)/beta(j) is a root of the generalized
+*> eigenvalue problem
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
+*> problem
+*>
+*> det( m(j) A - B ) = 0
+*>
+*> DGEGV computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)), the matrix L whose columns contain the
+*> generalized left eigenvectors l, and the matrix R whose columns
+*> contain the generalized right eigenvectors r for the pair (A,B).
+*>
+*> When DDRVGG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 7
+*> tests will be performed and compared with the threshhold THRESH:
+*>
+*> Results from DGEGS:
+*>
+*> T
+*> (1) | A - Q S Z | / ( |A| n ulp )
+*>
+*> T
+*> (2) | B - Q T Z | / ( |B| n ulp )
+*>
+*> T
+*> (3) | I - QQ | / ( n ulp )
+*>
+*> T
+*> (4) | I - ZZ | / ( n ulp )
+*>
+*> (5) maximum over j of D(j) where:
+*>
+*> if alpha(j) is real:
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> if alpha(j) is complex:
+*> | det( s S - w T ) |
+*> D(j) = ---------------------------------------------------
+*> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
+*>
+*> and S and T are here the 2 x 2 diagonal blocks of S and T
+*> corresponding to the j-th eigenvalue.
+*>
+*> Results from DGEGV:
+*>
+*> (6) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> where l**H is the conjugate tranpose of l.
+*>
+*> (7) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DDRVGG does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRVGG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRVGG to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] THRSHN
+*> \verbatim
+*> THRSHN is DOUBLE PRECISION
+*> Threshhold for reporting eigenvector normalization error.
+*> If the normalization of any eigenvector differs from 1 by
+*> more than THRSHN*ulp, then a special error message will be
+*> printed. (This is handled separately from the other tests,
+*> since only a compiler or programming error should cause an
+*> error message, at least if THRSHN is at least 5--10.)
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, T, S2, and T2.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by DGEGS. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by DGEGS.
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The matrix computed from A by DGEGV. This will be the
+*> Schur form of some matrix related to A, but will not, in
+*> general, be the same as S.
+*> \endverbatim
+*>
+*> \param[out] T2
+*> \verbatim
+*> T2 is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> The matrix computed from B by DGEGV. This will be the
+*> Schur form of some matrix related to B, but will not, in
+*> general, be the same as T.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ, max(NN))
+*> The (left) orthogonal matrix computed by DGEGS.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q, Z, VL, and VR. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array of
+*> dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by DGEGS.
+*> \endverbatim
+*>
+*> \param[out] ALPHR1
+*> \verbatim
+*> ALPHR1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI1
+*> \verbatim
+*> ALPHI1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by DGEGS.
+*> ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th
+*> generalized eigenvalue of the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHR2
+*> \verbatim
+*> ALPHR2 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI2
+*> \verbatim
+*> ALPHI2 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA2
+*> \verbatim
+*> BETA2 is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by DGEGV.
+*> ( ALPHR2(k)+ALPHI2(k)*i ) / BETA2(k) is the k-th
+*> generalized eigenvalue of the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDQ, max(NN))
+*> The (block lower triangular) left eigenvector matrix for
+*> the matrices in A and B. (See DTGEVC for the format.)
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDQ, max(NN))
+*> The (block upper triangular) right eigenvector matrix for
+*> the matrices in A and B. (See DTGEVC for the format.)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 2*N + MAX( 6*N, N*(NB+1), (k+1)*(2*k+N+1) ), where
+*> "k" is the sum of the blocksize and number-of-shifts for
+*> DHGEQZ, and NB is the greatest of the blocksizes for
+*> DGEQRF, DORMQR, and DORGQR. (The blocksizes and the
+*> number-of-shifts are retrieved through calls to ILAENV.)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRVGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ THRSHN, NOUNIT, A, LDA, B, S, T, S2, T2, Q,
$ LDQ, Z, ALPHR1, ALPHI1, BETA1, ALPHR2, ALPHI2,
$ BETA2, VL, VR, WORK, LWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
@@ -22,314 +476,6 @@
$ VR( LDQ, * ), WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVGG checks the nonsymmetric generalized eigenvalue driver
-* routines.
-* T T T
-* DGEGS factors A and B as Q S Z and Q T Z , where means
-* transpose, T is upper triangular, S is in generalized Schur form
-* (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
-* the 2x2 blocks corresponding to complex conjugate pairs of
-* generalized eigenvalues), and Q and Z are orthogonal. It also
-* computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)), where alpha(j)=S(j,j) and beta(j)=P(j,j) --
-* thus, w(j) = alpha(j)/beta(j) is a root of the generalized
-* eigenvalue problem
-*
-* det( A - w(j) B ) = 0
-*
-* and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
-* problem
-*
-* det( m(j) A - B ) = 0
-*
-* DGEGV computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)), the matrix L whose columns contain the
-* generalized left eigenvectors l, and the matrix R whose columns
-* contain the generalized right eigenvectors r for the pair (A,B).
-*
-* When DDRVGG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 7
-* tests will be performed and compared with the threshhold THRESH:
-*
-* Results from DGEGS:
-*
-* T
-* (1) | A - Q S Z | / ( |A| n ulp )
-*
-* T
-* (2) | B - Q T Z | / ( |B| n ulp )
-*
-* T
-* (3) | I - QQ | / ( n ulp )
-*
-* T
-* (4) | I - ZZ | / ( n ulp )
-*
-* (5) maximum over j of D(j) where:
-*
-* if alpha(j) is real:
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* if alpha(j) is complex:
-* | det( s S - w T ) |
-* D(j) = ---------------------------------------------------
-* ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
-*
-* and S and T are here the 2 x 2 diagonal blocks of S and T
-* corresponding to the j-th eigenvalue.
-*
-* Results from DGEGV:
-*
-* (6) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* where l**H is the conjugate tranpose of l.
-*
-* (7) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DDRVGG does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRVGG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRVGG to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* THRSHN (input) DOUBLE PRECISION
-* Threshhold for reporting eigenvector normalization error.
-* If the normalization of any eigenvector differs from 1 by
-* more than THRSHN*ulp, then a special error message will be
-* printed. (This is handled separately from the other tests,
-* since only a compiler or programming error should cause an
-* error message, at least if THRSHN is at least 5--10.)
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, T, S2, and T2.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The Schur form matrix computed from A by DGEGS. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by DGEGS.
-*
-* S2 (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The matrix computed from A by DGEGV. This will be the
-* Schur form of some matrix related to A, but will not, in
-* general, be the same as S.
-*
-* T2 (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* The matrix computed from B by DGEGV. This will be the
-* Schur form of some matrix related to B, but will not, in
-* general, be the same as T.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDQ, max(NN))
-* The (left) orthogonal matrix computed by DGEGS.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q, Z, VL, and VR. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) DOUBLE PRECISION array of
-* dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by DGEGS.
-*
-* ALPHR1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* ALPHI1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* BETA1 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-*
-* The generalized eigenvalues of (A,B) computed by DGEGS.
-* ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th
-* generalized eigenvalue of the matrices in A and B.
-*
-* ALPHR2 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* ALPHI2 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* BETA2 (workspace) DOUBLE PRECISION array, dimension (max(NN))
-*
-* The generalized eigenvalues of (A,B) computed by DGEGV.
-* ( ALPHR2(k)+ALPHI2(k)*i ) / BETA2(k) is the k-th
-* generalized eigenvalue of the matrices in A and B.
-*
-* VL (workspace) DOUBLE PRECISION array, dimension (LDQ, max(NN))
-* The (block lower triangular) left eigenvector matrix for
-* the matrices in A and B. (See DTGEVC for the format.)
-*
-* VR (workspace) DOUBLE PRECISION array, dimension (LDQ, max(NN))
-* The (block upper triangular) right eigenvector matrix for
-* the matrices in A and B. (See DTGEVC for the format.)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 2*N + MAX( 6*N, N*(NB+1), (k+1)*(2*k+N+1) ), where
-* "k" is the sum of the blocksize and number-of-shifts for
-* DHGEQZ, and NB is the greatest of the blocksizes for
-* DGEQRF, DORMQR, and DORGQR. (The blocksizes and the
-* number-of-shifts are retrieved through calls to ILAENV.)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrvsg.f b/TESTING/EIG/ddrvsg.f
index f9dd5c28..6afe70dc 100644
--- a/TESTING/EIG/ddrvsg.f
+++ b/TESTING/EIG/ddrvsg.f
@@ -1,19 +1,392 @@
- SUBROUTINE DDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
- $ NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
- $ BP, WORK, NWORK, IWORK, LIWORK, RESULT, INFO )
+*> \brief \b DDRVSG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
+* BP, WORK, NWORK, IWORK, LIWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDZ, LIWORK, NOUNIT, NSIZES,
+* $ NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), AB( LDA, * ), AP( * ),
+* $ B( LDB, * ), BB( LDB, * ), BP( * ), D( * ),
+* $ RESULT( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVSG checks the real symmetric generalized eigenproblem
+*> drivers.
+*>
+*> DSYGV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem.
+*>
+*> DSYGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem using a divide and conquer algorithm.
+*>
+*> DSYGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem.
+*>
+*> DSPGV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem in packed storage.
+*>
+*> DSPGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem in packed storage using a divide and
+*> conquer algorithm.
+*>
+*> DSPGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem in packed storage.
+*>
+*> DSBGV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite banded
+*> generalized eigenproblem.
+*>
+*> DSBGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite banded
+*> generalized eigenproblem using a divide and conquer
+*> algorithm.
+*>
+*> DSBGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite banded
+*> generalized eigenproblem.
+*>
+*> When DDRVSG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix A of the given type will be
+*> generated; a random well-conditioned matrix B is also generated
+*> and the pair (A,B) is used to test the drivers.
+*>
+*> For each pair (A,B), the following tests are performed:
+*>
+*> (1) DSYGV with ITYPE = 1 and UPLO ='U':
+*>
+*> | A Z - B Z D | / ( |A| |Z| n ulp )
+*>
+*> (2) as (1) but calling DSPGV
+*> (3) as (1) but calling DSBGV
+*> (4) as (1) but with UPLO = 'L'
+*> (5) as (4) but calling DSPGV
+*> (6) as (4) but calling DSBGV
+*>
+*> (7) DSYGV with ITYPE = 2 and UPLO ='U':
+*>
+*> | A B Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> (8) as (7) but calling DSPGV
+*> (9) as (7) but with UPLO = 'L'
+*> (10) as (9) but calling DSPGV
+*>
+*> (11) DSYGV with ITYPE = 3 and UPLO ='U':
+*>
+*> | B A Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> (12) as (11) but calling DSPGV
+*> (13) as (11) but with UPLO = 'L'
+*> (14) as (13) but calling DSPGV
+*>
+*> DSYGVD, DSPGVD and DSBGVD performed the same 14 tests.
+*>
+*> DSYGVX, DSPGVX and DSBGVX performed the above 14 tests with
+*> the parameter RANGE = 'A', 'N' and 'I', respectively.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value
+*> of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> This type is used for the matrix A which has half-bandwidth KA.
+*> B is generated as a well-conditioned positive definite matrix
+*> with half-bandwidth KB (<= KA).
+*> Currently, the list of possible types for A is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries
+*> 1, ULP, ..., ULP and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold)
+*>
+*> (16) Same as (8), but with KA = 1 and KB = 1
+*> (17) Same as (8), but with KA = 2 and KB = 1
+*> (18) Same as (8), but with KA = 2 and KB = 2
+*> (19) Same as (8), but with KA = 3 and KB = 1
+*> (20) Same as (8), but with KA = 3 and KB = 2
+*> (21) Same as (8), but with KA = 3 and KB = 3
+*>
+*>\endverbatim
*
-*******************************************************************
+* Arguments
+* =========
*
-* modified August 1997, a new parameter LIWORK is added
-* in the calling sequence.
+*> \verbatim
+*> NSIZES INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DDRVSG does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRVSG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRVSG to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A DOUBLE PRECISION array, dimension (LDA , max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A and AB. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> B DOUBLE PRECISION array, dimension (LDB , max(NN))
+*> Used to hold the symmetric positive definite matrix for
+*> the generailzed problem.
+*> On exit, B contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDB INTEGER
+*> The leading dimension of B and BB. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues of A. On exit, the eigenvalues in D
+*> correspond with the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z DOUBLE PRECISION array, dimension (LDZ, max(NN))
+*> The matrix of eigenvectors.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDZ INTEGER
+*> The leading dimension of Z. It must be at least 1 and
+*> at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> AB DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> BB DOUBLE PRECISION array, dimension (LDB, max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> AP DOUBLE PRECISION array, dimension (max(NN)**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> BP DOUBLE PRECISION array, dimension (max(NN)**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK DOUBLE PRECISION array, dimension (NWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> NWORK INTEGER
+*> The number of entries in WORK. This must be at least
+*> 1+5*N+2*N*lg(N)+3*N**2 where N = max( NN(j) ) and
+*> lg( N ) = smallest integer k such that 2**k >= N.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IWORK INTEGER array, dimension (LIWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LIWORK INTEGER
+*> The number of entries in WORK. This must be at least 6*N.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT DOUBLE PRECISION array, dimension (70)
+*> The values computed by the 70 tests described above.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDZ < 1 or LDZ < NMAX.
+*> -21: NWORK too small.
+*> -23: LIWORK too small.
+*> If DLATMR, SLATMS, DSYGV, DSPGV, DSBGV, SSYGVD, SSPGVD,
+*> DSBGVD, DSYGVX, DSPGVX or SSBGVX returns an error code,
+*> the absolute value of it is returned.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> ----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests that have been run
+*> on this matrix.
+*> NTESTT The total number of tests for this call.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by DLAFTS).
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* test routine DDGT01 is also modified
+*> \date November 2011
*
-*******************************************************************
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+ $ NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
+ $ BP, WORK, NWORK, IWORK, LIWORK, RESULT, INFO )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LDZ, LIWORK, NOUNIT, NSIZES,
@@ -28,313 +401,6 @@
$ RESULT( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVSG checks the real symmetric generalized eigenproblem
-* drivers.
-*
-* DSYGV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem.
-*
-* DSYGVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem using a divide and conquer algorithm.
-*
-* DSYGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem.
-*
-* DSPGV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem in packed storage.
-*
-* DSPGVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem in packed storage using a divide and
-* conquer algorithm.
-*
-* DSPGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem in packed storage.
-*
-* DSBGV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite banded
-* generalized eigenproblem.
-*
-* DSBGVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite banded
-* generalized eigenproblem using a divide and conquer
-* algorithm.
-*
-* DSBGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite banded
-* generalized eigenproblem.
-*
-* When DDRVSG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix A of the given type will be
-* generated; a random well-conditioned matrix B is also generated
-* and the pair (A,B) is used to test the drivers.
-*
-* For each pair (A,B), the following tests are performed:
-*
-* (1) DSYGV with ITYPE = 1 and UPLO ='U':
-*
-* | A Z - B Z D | / ( |A| |Z| n ulp )
-*
-* (2) as (1) but calling DSPGV
-* (3) as (1) but calling DSBGV
-* (4) as (1) but with UPLO = 'L'
-* (5) as (4) but calling DSPGV
-* (6) as (4) but calling DSBGV
-*
-* (7) DSYGV with ITYPE = 2 and UPLO ='U':
-*
-* | A B Z - Z D | / ( |A| |Z| n ulp )
-*
-* (8) as (7) but calling DSPGV
-* (9) as (7) but with UPLO = 'L'
-* (10) as (9) but calling DSPGV
-*
-* (11) DSYGV with ITYPE = 3 and UPLO ='U':
-*
-* | B A Z - Z D | / ( |A| |Z| n ulp )
-*
-* (12) as (11) but calling DSPGV
-* (13) as (11) but with UPLO = 'L'
-* (14) as (13) but calling DSPGV
-*
-* DSYGVD, DSPGVD and DSBGVD performed the same 14 tests.
-*
-* DSYGVX, DSPGVX and DSBGVX performed the above 14 tests with
-* the parameter RANGE = 'A', 'N' and 'I', respectively.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value
-* of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* This type is used for the matrix A which has half-bandwidth KA.
-* B is generated as a well-conditioned positive definite matrix
-* with half-bandwidth KB (<= KA).
-* Currently, the list of possible types for A is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries
-* 1, ULP, ..., ULP and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold)
-*
-* (16) Same as (8), but with KA = 1 and KB = 1
-* (17) Same as (8), but with KA = 2 and KB = 1
-* (18) Same as (8), but with KA = 2 and KB = 2
-* (19) Same as (8), but with KA = 3 and KB = 1
-* (20) Same as (8), but with KA = 3 and KB = 2
-* (21) Same as (8), but with KA = 3 and KB = 3
-*
-* Arguments
-* =========
-*
-* NSIZES INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DDRVSG does nothing. It must be at least zero.
-* Not modified.
-*
-* NN INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRVSG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRVSG to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A DOUBLE PRECISION array, dimension (LDA , max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA INTEGER
-* The leading dimension of A and AB. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* B DOUBLE PRECISION array, dimension (LDB , max(NN))
-* Used to hold the symmetric positive definite matrix for
-* the generailzed problem.
-* On exit, B contains the last matrix actually
-* used.
-* Modified.
-*
-* LDB INTEGER
-* The leading dimension of B and BB. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* D DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues of A. On exit, the eigenvalues in D
-* correspond with the matrix in A.
-* Modified.
-*
-* Z DOUBLE PRECISION array, dimension (LDZ, max(NN))
-* The matrix of eigenvectors.
-* Modified.
-*
-* LDZ INTEGER
-* The leading dimension of Z. It must be at least 1 and
-* at least max( NN ).
-* Not modified.
-*
-* AB DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Workspace.
-* Modified.
-*
-* BB DOUBLE PRECISION array, dimension (LDB, max(NN))
-* Workspace.
-* Modified.
-*
-* AP DOUBLE PRECISION array, dimension (max(NN)**2)
-* Workspace.
-* Modified.
-*
-* BP DOUBLE PRECISION array, dimension (max(NN)**2)
-* Workspace.
-* Modified.
-*
-* WORK DOUBLE PRECISION array, dimension (NWORK)
-* Workspace.
-* Modified.
-*
-* NWORK INTEGER
-* The number of entries in WORK. This must be at least
-* 1+5*N+2*N*lg(N)+3*N**2 where N = max( NN(j) ) and
-* lg( N ) = smallest integer k such that 2**k >= N.
-* Not modified.
-*
-* IWORK INTEGER array, dimension (LIWORK)
-* Workspace.
-* Modified.
-*
-* LIWORK INTEGER
-* The number of entries in WORK. This must be at least 6*N.
-* Not modified.
-*
-* RESULT DOUBLE PRECISION array, dimension (70)
-* The values computed by the 70 tests described above.
-* Modified.
-*
-* INFO INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDZ < 1 or LDZ < NMAX.
-* -21: NWORK too small.
-* -23: LIWORK too small.
-* If DLATMR, SLATMS, DSYGV, DSPGV, DSBGV, SSYGVD, SSPGVD,
-* DSBGVD, DSYGVX, DSPGVX or SSBGVX returns an error code,
-* the absolute value of it is returned.
-* Modified.
-*
-* ----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests that have been run
-* on this matrix.
-* NTESTT The total number of tests for this call.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by DLAFTS).
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrvst.f b/TESTING/EIG/ddrvst.f
index 07f80c78..623ea3d8 100644
--- a/TESTING/EIG/ddrvst.f
+++ b/TESTING/EIG/ddrvst.f
@@ -1,11 +1,498 @@
+*> \brief \b DDRVST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, D1, D2, D3, D4, EVEIGS, WA1,
+* WA2, WA3, U, LDU, V, TAU, Z, WORK, LWORK,
+* IWORK, LIWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), D1( * ), D2( * ), D3( * ),
+* $ D4( * ), EVEIGS( * ), RESULT( * ), TAU( * ),
+* $ U( LDU, * ), V( LDU, * ), WA1( * ), WA2( * ),
+* $ WA3( * ), WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVST checks the symmetric eigenvalue problem drivers.
+*>
+*> DSTEV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric tridiagonal matrix.
+*>
+*> DSTEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric tridiagonal matrix.
+*>
+*> DSTEVR computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric tridiagonal matrix
+*> using the Relatively Robust Representation where it can.
+*>
+*> DSYEV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix.
+*>
+*> DSYEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix.
+*>
+*> DSYEVR computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix
+*> using the Relatively Robust Representation where it can.
+*>
+*> DSPEV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix in packed
+*> storage.
+*>
+*> DSPEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix in packed
+*> storage.
+*>
+*> DSBEV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric band matrix.
+*>
+*> DSBEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric band matrix.
+*>
+*> DSYEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix using
+*> a divide and conquer algorithm.
+*>
+*> DSPEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix in packed
+*> storage, using a divide and conquer algorithm.
+*>
+*> DSBEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric band matrix,
+*> using a divide and conquer algorithm.
+*>
+*> When DDRVST is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the appropriate drivers. For each matrix and each
+*> driver routine called, the following tests will be performed:
+*>
+*> (1) | A - Z D Z' | / ( |A| n ulp )
+*>
+*> (2) | I - Z Z' | / ( n ulp )
+*>
+*> (3) | D1 - D2 | / ( |D1| ulp )
+*>
+*> where Z is the matrix of eigenvectors returned when the
+*> eigenvector option is given and D1 and D2 are the eigenvalues
+*> returned with and without the eigenvector option.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced eigenvalues
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced eigenvalues
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" eigenvalues
+*> 1, ULP, ..., ULP and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U' D U, where U is orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U' D U, where U is orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U' D U, where U is orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*> (16) A band matrix with half bandwidth randomly chosen between
+*> 0 and N-1, with evenly spaced eigenvalues 1, ..., ULP
+*> with random signs.
+*> (17) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (18) Same as (16), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DDRVST does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRVST
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRVST to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A DOUBLE PRECISION array, dimension (LDA , max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D1 DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues of A, as computed by DSTEQR simlutaneously
+*> with Z. On exit, the eigenvalues in D1 correspond with the
+*> matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D2 DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues of A, as computed by DSTEQR if Z is not
+*> computed. On exit, the eigenvalues in D2 correspond with
+*> the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D3 DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues of A, as computed by DSTERF. On exit, the
+*> eigenvalues in D3 correspond with the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D4 DOUBLE PRECISION array, dimension
+*> \endverbatim
+*> \verbatim
+*> EVEIGS DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues as computed by DSTEV('N', ... )
+*> (I reserve the right to change this to the output of
+*> whichever algorithm computes the most accurate eigenvalues).
+*> \endverbatim
+*> \verbatim
+*> WA1 DOUBLE PRECISION array, dimension
+*> \endverbatim
+*> \verbatim
+*> WA2 DOUBLE PRECISION array, dimension
+*> \endverbatim
+*> \verbatim
+*> WA3 DOUBLE PRECISION array, dimension
+*> \endverbatim
+*> \verbatim
+*> U DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The orthogonal matrix computed by DSYTRD + DORGTR.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDU INTEGER
+*> The leading dimension of U, Z, and V. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> V DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The Housholder vectors computed by DSYTRD in reducing A to
+*> tridiagonal form.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> TAU DOUBLE PRECISION array, dimension (max(NN))
+*> The Householder factors computed by DSYTRD in reducing A
+*> to tridiagonal form.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> The orthogonal matrix of eigenvectors computed by DSTEQR,
+*> DPTEQR, and DSTEIN.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK DOUBLE PRECISION array, dimension (LWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LWORK INTEGER
+*> The number of entries in WORK. This must be at least
+*> 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 4 * Nmax**2
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IWORK INTEGER array,
+*> dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT DOUBLE PRECISION array, dimension (105)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDU < 1 or LDU < NMAX.
+*> -21: LWORK too small.
+*> If DLATMR, DLATMS, DSYTRD, DORGTR, DSTEQR, DSTERF,
+*> or DORMTR returns an error code, the
+*> absolute value of it is returned.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by DLAFTS).
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*> \verbatim
+*> The tests performed are: Routine tested
+*> 1= | A - U S U' | / ( |A| n ulp ) DSTEV('V', ... )
+*> 2= | I - U U' | / ( n ulp ) DSTEV('V', ... )
+*> 3= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEV('N', ... )
+*> 4= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','A', ... )
+*> 5= | I - U U' | / ( n ulp ) DSTEVX('V','A', ... )
+*> 6= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVX('N','A', ... )
+*> 7= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','A', ... )
+*> 8= | I - U U' | / ( n ulp ) DSTEVR('V','A', ... )
+*> 9= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVR('N','A', ... )
+*> 10= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','I', ... )
+*> 11= | I - U U' | / ( n ulp ) DSTEVX('V','I', ... )
+*> 12= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVX('N','I', ... )
+*> 13= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','V', ... )
+*> 14= | I - U U' | / ( n ulp ) DSTEVX('V','V', ... )
+*> 15= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVX('N','V', ... )
+*> 16= | A - U S U' | / ( |A| n ulp ) DSTEVD('V', ... )
+*> 17= | I - U U' | / ( n ulp ) DSTEVD('V', ... )
+*> 18= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVD('N', ... )
+*> 19= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','I', ... )
+*> 20= | I - U U' | / ( n ulp ) DSTEVR('V','I', ... )
+*> 21= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVR('N','I', ... )
+*> 22= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','V', ... )
+*> 23= | I - U U' | / ( n ulp ) DSTEVR('V','V', ... )
+*> 24= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVR('N','V', ... )
+*> \endverbatim
+*> \verbatim
+*> 25= | A - U S U' | / ( |A| n ulp ) DSYEV('L','V', ... )
+*> 26= | I - U U' | / ( n ulp ) DSYEV('L','V', ... )
+*> 27= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEV('L','N', ... )
+*> 28= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','A', ... )
+*> 29= | I - U U' | / ( n ulp ) DSYEVX('L','V','A', ... )
+*> 30= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','A', ... )
+*> 31= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','I', ... )
+*> 32= | I - U U' | / ( n ulp ) DSYEVX('L','V','I', ... )
+*> 33= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','I', ... )
+*> 34= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','V', ... )
+*> 35= | I - U U' | / ( n ulp ) DSYEVX('L','V','V', ... )
+*> 36= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','V', ... )
+*> 37= | A - U S U' | / ( |A| n ulp ) DSPEV('L','V', ... )
+*> 38= | I - U U' | / ( n ulp ) DSPEV('L','V', ... )
+*> 39= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEV('L','N', ... )
+*> 40= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','A', ... )
+*> 41= | I - U U' | / ( n ulp ) DSPEVX('L','V','A', ... )
+*> 42= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','A', ... )
+*> 43= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','I', ... )
+*> 44= | I - U U' | / ( n ulp ) DSPEVX('L','V','I', ... )
+*> 45= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','I', ... )
+*> 46= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','V', ... )
+*> 47= | I - U U' | / ( n ulp ) DSPEVX('L','V','V', ... )
+*> 48= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','V', ... )
+*> 49= | A - U S U' | / ( |A| n ulp ) DSBEV('L','V', ... )
+*> 50= | I - U U' | / ( n ulp ) DSBEV('L','V', ... )
+*> 51= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEV('L','N', ... )
+*> 52= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','A', ... )
+*> 53= | I - U U' | / ( n ulp ) DSBEVX('L','V','A', ... )
+*> 54= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','A', ... )
+*> 55= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','I', ... )
+*> 56= | I - U U' | / ( n ulp ) DSBEVX('L','V','I', ... )
+*> 57= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','I', ... )
+*> 58= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','V', ... )
+*> 59= | I - U U' | / ( n ulp ) DSBEVX('L','V','V', ... )
+*> 60= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','V', ... )
+*> 61= | A - U S U' | / ( |A| n ulp ) DSYEVD('L','V', ... )
+*> 62= | I - U U' | / ( n ulp ) DSYEVD('L','V', ... )
+*> 63= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVD('L','N', ... )
+*> 64= | A - U S U' | / ( |A| n ulp ) DSPEVD('L','V', ... )
+*> 65= | I - U U' | / ( n ulp ) DSPEVD('L','V', ... )
+*> 66= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVD('L','N', ... )
+*> 67= | A - U S U' | / ( |A| n ulp ) DSBEVD('L','V', ... )
+*> 68= | I - U U' | / ( n ulp ) DSBEVD('L','V', ... )
+*> 69= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVD('L','N', ... )
+*> 70= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','A', ... )
+*> 71= | I - U U' | / ( n ulp ) DSYEVR('L','V','A', ... )
+*> 72= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','A', ... )
+*> 73= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','I', ... )
+*> 74= | I - U U' | / ( n ulp ) DSYEVR('L','V','I', ... )
+*> 75= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','I', ... )
+*> 76= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','V', ... )
+*> 77= | I - U U' | / ( n ulp ) DSYEVR('L','V','V', ... )
+*> 78= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','V', ... )
+*> \endverbatim
+*> \verbatim
+*> Tests 25 through 78 are repeated (as tests 79 through 132)
+*> with UPLO='U'
+*> \endverbatim
+*> \verbatim
+*> To be added in 1999
+*> \endverbatim
+*> \verbatim
+*> 79= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','A', ... )
+*> 80= | I - U U' | / ( n ulp ) DSPEVR('L','V','A', ... )
+*> 81= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','A', ... )
+*> 82= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','I', ... )
+*> 83= | I - U U' | / ( n ulp ) DSPEVR('L','V','I', ... )
+*> 84= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','I', ... )
+*> 85= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','V', ... )
+*> 86= | I - U U' | / ( n ulp ) DSPEVR('L','V','V', ... )
+*> 87= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','V', ... )
+*> 88= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','A', ... )
+*> 89= | I - U U' | / ( n ulp ) DSBEVR('L','V','A', ... )
+*> 90= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','A', ... )
+*> 91= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','I', ... )
+*> 92= | I - U U' | / ( n ulp ) DSBEVR('L','V','I', ... )
+*> 93= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','I', ... )
+*> 94= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','V', ... )
+*> 95= | I - U U' | / ( n ulp ) DSBEVR('L','V','V', ... )
+*> 96= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','V', ... )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRVST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, D1, D2, D3, D4, EVEIGS, WA1,
$ WA2, WA3, U, LDU, V, TAU, Z, WORK, LWORK,
$ IWORK, LIWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
@@ -21,409 +508,6 @@
$ WA3( * ), WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVST checks the symmetric eigenvalue problem drivers.
-*
-* DSTEV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric tridiagonal matrix.
-*
-* DSTEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric tridiagonal matrix.
-*
-* DSTEVR computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric tridiagonal matrix
-* using the Relatively Robust Representation where it can.
-*
-* DSYEV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix.
-*
-* DSYEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix.
-*
-* DSYEVR computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix
-* using the Relatively Robust Representation where it can.
-*
-* DSPEV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix in packed
-* storage.
-*
-* DSPEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix in packed
-* storage.
-*
-* DSBEV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric band matrix.
-*
-* DSBEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric band matrix.
-*
-* DSYEVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix using
-* a divide and conquer algorithm.
-*
-* DSPEVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix in packed
-* storage, using a divide and conquer algorithm.
-*
-* DSBEVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric band matrix,
-* using a divide and conquer algorithm.
-*
-* When DDRVST is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the appropriate drivers. For each matrix and each
-* driver routine called, the following tests will be performed:
-*
-* (1) | A - Z D Z' | / ( |A| n ulp )
-*
-* (2) | I - Z Z' | / ( n ulp )
-*
-* (3) | D1 - D2 | / ( |D1| ulp )
-*
-* where Z is the matrix of eigenvectors returned when the
-* eigenvector option is given and D1 and D2 are the eigenvalues
-* returned with and without the eigenvector option.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced eigenvalues
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced eigenvalues
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" eigenvalues
-* 1, ULP, ..., ULP and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U' D U, where U is orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U' D U, where U is orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U' D U, where U is orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-* (16) A band matrix with half bandwidth randomly chosen between
-* 0 and N-1, with evenly spaced eigenvalues 1, ..., ULP
-* with random signs.
-* (17) Same as (16), but multiplied by SQRT( overflow threshold )
-* (18) Same as (16), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DDRVST does nothing. It must be at least zero.
-* Not modified.
-*
-* NN INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRVST
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRVST to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A DOUBLE PRECISION array, dimension (LDA , max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* D1 DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues of A, as computed by DSTEQR simlutaneously
-* with Z. On exit, the eigenvalues in D1 correspond with the
-* matrix in A.
-* Modified.
-*
-* D2 DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues of A, as computed by DSTEQR if Z is not
-* computed. On exit, the eigenvalues in D2 correspond with
-* the matrix in A.
-* Modified.
-*
-* D3 DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues of A, as computed by DSTERF. On exit, the
-* eigenvalues in D3 correspond with the matrix in A.
-* Modified.
-*
-* D4 DOUBLE PRECISION array, dimension
-*
-* EVEIGS DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues as computed by DSTEV('N', ... )
-* (I reserve the right to change this to the output of
-* whichever algorithm computes the most accurate eigenvalues).
-*
-* WA1 DOUBLE PRECISION array, dimension
-*
-* WA2 DOUBLE PRECISION array, dimension
-*
-* WA3 DOUBLE PRECISION array, dimension
-*
-* U DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The orthogonal matrix computed by DSYTRD + DORGTR.
-* Modified.
-*
-* LDU INTEGER
-* The leading dimension of U, Z, and V. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* V DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The Housholder vectors computed by DSYTRD in reducing A to
-* tridiagonal form.
-* Modified.
-*
-* TAU DOUBLE PRECISION array, dimension (max(NN))
-* The Householder factors computed by DSYTRD in reducing A
-* to tridiagonal form.
-* Modified.
-*
-* Z DOUBLE PRECISION array, dimension (LDU, max(NN))
-* The orthogonal matrix of eigenvectors computed by DSTEQR,
-* DPTEQR, and DSTEIN.
-* Modified.
-*
-* WORK DOUBLE PRECISION array, dimension (LWORK)
-* Workspace.
-* Modified.
-*
-* LWORK INTEGER
-* The number of entries in WORK. This must be at least
-* 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 4 * Nmax**2
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-* Not modified.
-*
-* IWORK INTEGER array,
-* dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-* Workspace.
-* Modified.
-*
-* RESULT DOUBLE PRECISION array, dimension (105)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-* Modified.
-*
-* INFO INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDU < 1 or LDU < NMAX.
-* -21: LWORK too small.
-* If DLATMR, DLATMS, DSYTRD, DORGTR, DSTEQR, DSTERF,
-* or DORMTR returns an error code, the
-* absolute value of it is returned.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by DLAFTS).
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
-* The tests performed are: Routine tested
-* 1= | A - U S U' | / ( |A| n ulp ) DSTEV('V', ... )
-* 2= | I - U U' | / ( n ulp ) DSTEV('V', ... )
-* 3= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEV('N', ... )
-* 4= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','A', ... )
-* 5= | I - U U' | / ( n ulp ) DSTEVX('V','A', ... )
-* 6= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVX('N','A', ... )
-* 7= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','A', ... )
-* 8= | I - U U' | / ( n ulp ) DSTEVR('V','A', ... )
-* 9= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVR('N','A', ... )
-* 10= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','I', ... )
-* 11= | I - U U' | / ( n ulp ) DSTEVX('V','I', ... )
-* 12= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVX('N','I', ... )
-* 13= | A - U S U' | / ( |A| n ulp ) DSTEVX('V','V', ... )
-* 14= | I - U U' | / ( n ulp ) DSTEVX('V','V', ... )
-* 15= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVX('N','V', ... )
-* 16= | A - U S U' | / ( |A| n ulp ) DSTEVD('V', ... )
-* 17= | I - U U' | / ( n ulp ) DSTEVD('V', ... )
-* 18= |D(with Z) - EVEIGS| / (|D| ulp) DSTEVD('N', ... )
-* 19= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','I', ... )
-* 20= | I - U U' | / ( n ulp ) DSTEVR('V','I', ... )
-* 21= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVR('N','I', ... )
-* 22= | A - U S U' | / ( |A| n ulp ) DSTEVR('V','V', ... )
-* 23= | I - U U' | / ( n ulp ) DSTEVR('V','V', ... )
-* 24= |D(with Z) - D(w/o Z)| / (|D| ulp) DSTEVR('N','V', ... )
-*
-* 25= | A - U S U' | / ( |A| n ulp ) DSYEV('L','V', ... )
-* 26= | I - U U' | / ( n ulp ) DSYEV('L','V', ... )
-* 27= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEV('L','N', ... )
-* 28= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','A', ... )
-* 29= | I - U U' | / ( n ulp ) DSYEVX('L','V','A', ... )
-* 30= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','A', ... )
-* 31= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','I', ... )
-* 32= | I - U U' | / ( n ulp ) DSYEVX('L','V','I', ... )
-* 33= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','I', ... )
-* 34= | A - U S U' | / ( |A| n ulp ) DSYEVX('L','V','V', ... )
-* 35= | I - U U' | / ( n ulp ) DSYEVX('L','V','V', ... )
-* 36= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVX('L','N','V', ... )
-* 37= | A - U S U' | / ( |A| n ulp ) DSPEV('L','V', ... )
-* 38= | I - U U' | / ( n ulp ) DSPEV('L','V', ... )
-* 39= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEV('L','N', ... )
-* 40= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','A', ... )
-* 41= | I - U U' | / ( n ulp ) DSPEVX('L','V','A', ... )
-* 42= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','A', ... )
-* 43= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','I', ... )
-* 44= | I - U U' | / ( n ulp ) DSPEVX('L','V','I', ... )
-* 45= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','I', ... )
-* 46= | A - U S U' | / ( |A| n ulp ) DSPEVX('L','V','V', ... )
-* 47= | I - U U' | / ( n ulp ) DSPEVX('L','V','V', ... )
-* 48= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVX('L','N','V', ... )
-* 49= | A - U S U' | / ( |A| n ulp ) DSBEV('L','V', ... )
-* 50= | I - U U' | / ( n ulp ) DSBEV('L','V', ... )
-* 51= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEV('L','N', ... )
-* 52= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','A', ... )
-* 53= | I - U U' | / ( n ulp ) DSBEVX('L','V','A', ... )
-* 54= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','A', ... )
-* 55= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','I', ... )
-* 56= | I - U U' | / ( n ulp ) DSBEVX('L','V','I', ... )
-* 57= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','I', ... )
-* 58= | A - U S U' | / ( |A| n ulp ) DSBEVX('L','V','V', ... )
-* 59= | I - U U' | / ( n ulp ) DSBEVX('L','V','V', ... )
-* 60= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVX('L','N','V', ... )
-* 61= | A - U S U' | / ( |A| n ulp ) DSYEVD('L','V', ... )
-* 62= | I - U U' | / ( n ulp ) DSYEVD('L','V', ... )
-* 63= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVD('L','N', ... )
-* 64= | A - U S U' | / ( |A| n ulp ) DSPEVD('L','V', ... )
-* 65= | I - U U' | / ( n ulp ) DSPEVD('L','V', ... )
-* 66= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVD('L','N', ... )
-* 67= | A - U S U' | / ( |A| n ulp ) DSBEVD('L','V', ... )
-* 68= | I - U U' | / ( n ulp ) DSBEVD('L','V', ... )
-* 69= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVD('L','N', ... )
-* 70= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','A', ... )
-* 71= | I - U U' | / ( n ulp ) DSYEVR('L','V','A', ... )
-* 72= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','A', ... )
-* 73= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','I', ... )
-* 74= | I - U U' | / ( n ulp ) DSYEVR('L','V','I', ... )
-* 75= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','I', ... )
-* 76= | A - U S U' | / ( |A| n ulp ) DSYEVR('L','V','V', ... )
-* 77= | I - U U' | / ( n ulp ) DSYEVR('L','V','V', ... )
-* 78= |D(with Z) - D(w/o Z)| / (|D| ulp) DSYEVR('L','N','V', ... )
-*
-* Tests 25 through 78 are repeated (as tests 79 through 132)
-* with UPLO='U'
-*
-* To be added in 1999
-*
-* 79= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','A', ... )
-* 80= | I - U U' | / ( n ulp ) DSPEVR('L','V','A', ... )
-* 81= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','A', ... )
-* 82= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','I', ... )
-* 83= | I - U U' | / ( n ulp ) DSPEVR('L','V','I', ... )
-* 84= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','I', ... )
-* 85= | A - U S U' | / ( |A| n ulp ) DSPEVR('L','V','V', ... )
-* 86= | I - U U' | / ( n ulp ) DSPEVR('L','V','V', ... )
-* 87= |D(with Z) - D(w/o Z)| / (|D| ulp) DSPEVR('L','N','V', ... )
-* 88= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','A', ... )
-* 89= | I - U U' | / ( n ulp ) DSBEVR('L','V','A', ... )
-* 90= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','A', ... )
-* 91= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','I', ... )
-* 92= | I - U U' | / ( n ulp ) DSBEVR('L','V','I', ... )
-* 93= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','I', ... )
-* 94= | A - U S U' | / ( |A| n ulp ) DSBEVR('L','V','V', ... )
-* 95= | I - U U' | / ( n ulp ) DSBEVR('L','V','V', ... )
-* 96= |D(with Z) - D(w/o Z)| / (|D| ulp) DSBEVR('L','N','V', ... )
-*
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrvsx.f b/TESTING/EIG/ddrvsx.f
index e463fbf9..6db69830 100644
--- a/TESTING/EIG/ddrvsx.f
+++ b/TESTING/EIG/ddrvsx.f
@@ -1,11 +1,466 @@
+*> \brief \b DDRVSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVSX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NIUNIT, NOUNIT, A, LDA, H, HT, WR, WI, WRT,
+* WIT, WRTMP, WITMP, VS, LDVS, VS1, RESULT, WORK,
+* LWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDVS, LWORK, NIUNIT, NOUNIT, NSIZES,
+* $ NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ RESULT( 17 ), VS( LDVS, * ), VS1( LDVS, * ),
+* $ WI( * ), WIT( * ), WITMP( * ), WORK( * ),
+* $ WR( * ), WRT( * ), WRTMP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
+*> expert driver DGEESX.
+*>
+*> DDRVSX uses both test matrices generated randomly depending on
+*> data supplied in the calling sequence, as well as on data
+*> read from an input file and including precomputed condition
+*> numbers to which it compares the ones it computes.
+*>
+*> When DDRVSX is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 15
+*> tests will be performed:
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare WR, WI with and
+*> without reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare T with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare VS with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*> If workspace sufficient, also compare SDIM with and
+*> without reciprocal condition numbers
+*>
+*> (14) if RCONDE the same no matter if VS and/or RCONDV computed
+*>
+*> (15) if RCONDV the same no matter if VS and/or RCONDE computed
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> In addition, an input file will be read from logical unit number
+*> NIUNIT. The file contains matrices along with precomputed
+*> eigenvalues and reciprocal condition numbers for the eigenvalue
+*> average and right invariant subspace. For these matrices, in
+*> addition to tests (1) to (15) we will compute the following two
+*> tests:
+*>
+*> (16) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal average eigenvalue condition number
+*> computed by DGEESX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*> (17) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right invariant subspace condition
+*> number computed by DGEESX and RCDVIN (the precomputed true
+*> value) is supplied as input. cond(RCONDV) is the condition
+*> number of RCONDV, and takes errors in computing RCONDV into
+*> account, so that the resulting quantity should be O(ULP).
+*> cond(RCONDV) is essentially given by norm(A)/RCONDE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. NSIZES must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIUNIT will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. NTYPES must be at least
+*> zero. If it is zero, no randomly generated test matrices
+*> are tested, but and test matrices read from NIUNIT will be
+*> tested. If it is MAXTYP+1 and NSIZES is 1, then an
+*> additional type, MAXTYP+1 is defined, which is to use
+*> whatever matrix is in A. This is only useful if
+*> DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRVSX to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIUNIT
+*> \verbatim
+*> NIUNIT is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by DGEESX.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is DOUBLE PRECISION array, dimension (LDA, max(NN))
+*> Yet another copy of the test matrix A, modified by DGEESX.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WRT
+*> \verbatim
+*> WRT is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WIT
+*> \verbatim
+*> WIT is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when DGEESX only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] WRTMP
+*> \verbatim
+*> WRTMP is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WITMP
+*> \verbatim
+*> WITMP is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> More temporary storage for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is DOUBLE PRECISION array, dimension (LDVS, max(NN))
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] VS1
+*> \verbatim
+*> VS1 is DOUBLE PRECISION array, dimension (LDVS, max(NN))
+*> VS1 holds another copy of the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (17)
+*> The values computed by the 17 tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(3*NN(j),2*NN(j)**2) for all j.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN)*max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> <0, input parameter -INFO is incorrect
+*> >0, DLATMR, SLATMS, SLATME or DGET24 returned an error
+*> code and INFO is its absolute value
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRVSX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NIUNIT, NOUNIT, A, LDA, H, HT, WR, WI, WRT,
$ WIT, WRTMP, WITMP, VS, LDVS, VS1, RESULT, WORK,
$ LWORK, IWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDVS, LWORK, NIUNIT, NOUNIT, NSIZES,
@@ -21,322 +476,6 @@
$ WR( * ), WRT( * ), WRTMP( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
-* expert driver DGEESX.
-*
-* DDRVSX uses both test matrices generated randomly depending on
-* data supplied in the calling sequence, as well as on data
-* read from an input file and including precomputed condition
-* numbers to which it compares the ones it computes.
-*
-* When DDRVSX is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 15
-* tests will be performed:
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* If workspace sufficient, also compare WR, WI with and
-* without reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare T with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare VS with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-* If workspace sufficient, also compare SDIM with and
-* without reciprocal condition numbers
-*
-* (14) if RCONDE the same no matter if VS and/or RCONDV computed
-*
-* (15) if RCONDV the same no matter if VS and/or RCONDE computed
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* In addition, an input file will be read from logical unit number
-* NIUNIT. The file contains matrices along with precomputed
-* eigenvalues and reciprocal condition numbers for the eigenvalue
-* average and right invariant subspace. For these matrices, in
-* addition to tests (1) to (15) we will compute the following two
-* tests:
-*
-* (16) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal average eigenvalue condition number
-* computed by DGEESX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* (17) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right invariant subspace condition
-* number computed by DGEESX and RCDVIN (the precomputed true
-* value) is supplied as input. cond(RCONDV) is the condition
-* number of RCONDV, and takes errors in computing RCONDV into
-* account, so that the resulting quantity should be O(ULP).
-* cond(RCONDV) is essentially given by norm(A)/RCONDE.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. NSIZES must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIUNIT will be
-* tested.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. NTYPES must be at least
-* zero. If it is zero, no randomly generated test matrices
-* are tested, but and test matrices read from NIUNIT will be
-* tested. If it is MAXTYP+1 and NSIZES is 1, then an
-* additional type, MAXTYP+1 is defined, which is to use
-* whatever matrix is in A. This is only useful if
-* DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRVSX to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIUNIT (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max( NN ).
-*
-* H (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by DGEESX.
-*
-* HT (workspace) DOUBLE PRECISION array, dimension (LDA, max(NN))
-* Yet another copy of the test matrix A, modified by DGEESX.
-*
-* WR (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* WI (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WRT (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* WIT (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when DGEESX only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* WRTMP (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* WITMP (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* More temporary storage for eigenvalues.
-*
-* VS (workspace) DOUBLE PRECISION array, dimension (LDVS, max(NN))
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1,max(NN)).
-*
-* VS1 (workspace) DOUBLE PRECISION array, dimension (LDVS, max(NN))
-* VS1 holds another copy of the computed Schur vectors.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (17)
-* The values computed by the 17 tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(3*NN(j),2*NN(j)**2) for all j.
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN)*max(NN))
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* <0, input parameter -INFO is incorrect
-* >0, DLATMR, SLATMS, SLATME or DGET24 returned an error
-* code and INFO is its absolute value
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ddrvvx.f b/TESTING/EIG/ddrvvx.f
index 410f721c..a5ec7629 100644
--- a/TESTING/EIG/ddrvvx.f
+++ b/TESTING/EIG/ddrvvx.f
@@ -1,3 +1,517 @@
+*> \brief \b DDRVVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVVX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NIUNIT, NOUNIT, A, LDA, H, WR, WI, WR1, WI1,
+* VL, LDVL, VR, LDVR, LRE, LDLRE, RCONDV, RCNDV1,
+* RCDVIN, RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1,
+* RESULT, WORK, NWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
+* $ NSIZES, NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
+* $ RCNDV1( * ), RCONDE( * ), RCONDV( * ),
+* $ RESULT( 11 ), SCALE( * ), SCALE1( * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), WI( * ),
+* $ WI1( * ), WORK( * ), WR( * ), WR1( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVVX checks the nonsymmetric eigenvalue problem expert driver
+*> DGEEVX.
+*>
+*> DDRVVX uses both test matrices generated randomly depending on
+*> data supplied in the calling sequence, as well as on data
+*> read from an input file and including precomputed condition
+*> numbers to which it compares the ones it computes.
+*>
+*> When DDRVVX is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified in the calling sequence.
+*> For each size ("n") and each type of matrix, one matrix will be
+*> generated and used to test the nonsymmetric eigenroutines. For
+*> each matrix, 9 tests will be performed:
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a block diagonal matrix, with a 1x1 block for each
+*> real eigenvalue and a 2x2 block for each complex conjugate
+*> pair. If eigenvalues j and j+1 are a complex conjugate pair,
+*> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
+*> 2 x 2 block corresponding to the pair will be:
+*>
+*> ( wr wi )
+*> ( -wi wr )
+*>
+*> Such a block multiplying an n x 2 matrix ( ur ui ) on the
+*> right will be the same as multiplying ur + i*ui by wr + i*wi.
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) W(full) = W(partial)
+*>
+*> W(full) denotes the eigenvalues computed when VR, VL, RCONDV
+*> and RCONDE are also computed, and W(partial) denotes the
+*> eigenvalues computed when only some of VR, VL, RCONDV, and
+*> RCONDE are computed.
+*>
+*> (6) VR(full) = VR(partial)
+*>
+*> VR(full) denotes the right eigenvectors computed when VL, RCONDV
+*> and RCONDE are computed, and VR(partial) denotes the result
+*> when only some of VL and RCONDV are computed.
+*>
+*> (7) VL(full) = VL(partial)
+*>
+*> VL(full) denotes the left eigenvectors computed when VR, RCONDV
+*> and RCONDE are computed, and VL(partial) denotes the result
+*> when only some of VR and RCONDV are computed.
+*>
+*> (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
+*> SCALE, ILO, IHI, ABNRM (partial)
+*> 1/ulp otherwise
+*>
+*> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
+*> (full) is when VR, VL, RCONDE and RCONDV are also computed, and
+*> (partial) is when some are not computed.
+*>
+*> (9) RCONDV(full) = RCONDV(partial)
+*>
+*> RCONDV(full) denotes the reciprocal condition numbers of the
+*> right eigenvectors computed when VR, VL and RCONDE are also
+*> computed. RCONDV(partial) denotes the reciprocal condition
+*> numbers when only some of VR, VL and RCONDE are computed.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> In addition, an input file will be read from logical unit number
+*> NIUNIT. The file contains matrices along with precomputed
+*> eigenvalues and reciprocal condition numbers for the eigenvalues
+*> and right eigenvectors. For these matrices, in addition to tests
+*> (1) to (9) we will compute the following two tests:
+*>
+*> (10) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right eigenvector condition number
+*> computed by DGEEVX and RCDVIN (the precomputed true value)
+*> is supplied as input. cond(RCONDV) is the condition number of
+*> RCONDV, and takes errors in computing RCONDV into account, so
+*> that the resulting quantity should be O(ULP). cond(RCONDV) is
+*> essentially given by norm(A)/RCONDE.
+*>
+*> (11) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal eigenvalue condition number
+*> computed by DGEEVX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. NSIZES must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIUNIT will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. NTYPES must be at least
+*> zero. If it is zero, no randomly generated test matrices
+*> are tested, but and test matrices read from NIUNIT will be
+*> tested. If it is MAXTYP+1 and NSIZES is 1, then an
+*> additional type, MAXTYP+1 is defined, which is to use
+*> whatever matrix is in A. This is only useful if
+*> DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRVVX to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIUNIT
+*> \verbatim
+*> NIUNIT is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN,12))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and H.
+*> LDA >= max(NN,12), since 12 is the dimension of the largest
+*> matrix in the precomputed input file.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN,12))
+*> Another copy of the test matrix A, modified by DGEEVX.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WR1
+*> \verbatim
+*> WR1 is DOUBLE PRECISION array, dimension (max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] WI1
+*> \verbatim
+*> WI1 is DOUBLE PRECISION array, dimension (max(NN,12))
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when DGEEVX only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension
+*> (LDVL, max(NN,12))
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,max(NN,12)).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension
+*> (LDVR, max(NN,12))
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,max(NN,12)).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is DOUBLE PRECISION array, dimension
+*> (LDLRE, max(NN,12))
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension (N)
+*> RCONDV holds the computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] RCNDV1
+*> \verbatim
+*> RCNDV1 is DOUBLE PRECISION array, dimension (N)
+*> RCNDV1 holds more computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] RCDVIN
+*> \verbatim
+*> RCDVIN is DOUBLE PRECISION array, dimension (N)
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition numbers for eigenvectors to be compared with
+*> RCONDV.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension (N)
+*> RCONDE holds the computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] RCNDE1
+*> \verbatim
+*> RCNDE1 is DOUBLE PRECISION array, dimension (N)
+*> RCNDE1 holds more computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] RCDEIN
+*> \verbatim
+*> RCDEIN is DOUBLE PRECISION array, dimension (N)
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition numbers for eigenvalues to be compared with
+*> RCONDE.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (11)
+*> The values computed by the seven tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) =
+*> max( 360 ,6*NN(j)+2*NN(j)**2) for all j.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then successful exit.
+*> If <0, then input paramter -INFO is incorrect.
+*> If >0, DLATMR, SLATMS, SLATME or DGET23 returned an error
+*> code, and INFO is its absolute value.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN or 12.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DDRVVX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NIUNIT, NOUNIT, A, LDA, H, WR, WI, WR1, WI1,
$ VL, LDVL, VR, LDVR, LRE, LDLRE, RCONDV, RCNDV1,
@@ -5,8 +519,9 @@
$ RESULT, WORK, NWORK, IWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
@@ -24,362 +539,6 @@
$ WI1( * ), WORK( * ), WR( * ), WR1( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVVX checks the nonsymmetric eigenvalue problem expert driver
-* DGEEVX.
-*
-* DDRVVX uses both test matrices generated randomly depending on
-* data supplied in the calling sequence, as well as on data
-* read from an input file and including precomputed condition
-* numbers to which it compares the ones it computes.
-*
-* When DDRVVX is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified in the calling sequence.
-* For each size ("n") and each type of matrix, one matrix will be
-* generated and used to test the nonsymmetric eigenroutines. For
-* each matrix, 9 tests will be performed:
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a block diagonal matrix, with a 1x1 block for each
-* real eigenvalue and a 2x2 block for each complex conjugate
-* pair. If eigenvalues j and j+1 are a complex conjugate pair,
-* so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
-* 2 x 2 block corresponding to the pair will be:
-*
-* ( wr wi )
-* ( -wi wr )
-*
-* Such a block multiplying an n x 2 matrix ( ur ui ) on the
-* right will be the same as multiplying ur + i*ui by wr + i*wi.
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) W(full) = W(partial)
-*
-* W(full) denotes the eigenvalues computed when VR, VL, RCONDV
-* and RCONDE are also computed, and W(partial) denotes the
-* eigenvalues computed when only some of VR, VL, RCONDV, and
-* RCONDE are computed.
-*
-* (6) VR(full) = VR(partial)
-*
-* VR(full) denotes the right eigenvectors computed when VL, RCONDV
-* and RCONDE are computed, and VR(partial) denotes the result
-* when only some of VL and RCONDV are computed.
-*
-* (7) VL(full) = VL(partial)
-*
-* VL(full) denotes the left eigenvectors computed when VR, RCONDV
-* and RCONDE are computed, and VL(partial) denotes the result
-* when only some of VR and RCONDV are computed.
-*
-* (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
-* SCALE, ILO, IHI, ABNRM (partial)
-* 1/ulp otherwise
-*
-* SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
-* (full) is when VR, VL, RCONDE and RCONDV are also computed, and
-* (partial) is when some are not computed.
-*
-* (9) RCONDV(full) = RCONDV(partial)
-*
-* RCONDV(full) denotes the reciprocal condition numbers of the
-* right eigenvectors computed when VR, VL and RCONDE are also
-* computed. RCONDV(partial) denotes the reciprocal condition
-* numbers when only some of VR, VL and RCONDE are computed.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* In addition, an input file will be read from logical unit number
-* NIUNIT. The file contains matrices along with precomputed
-* eigenvalues and reciprocal condition numbers for the eigenvalues
-* and right eigenvectors. For these matrices, in addition to tests
-* (1) to (9) we will compute the following two tests:
-*
-* (10) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right eigenvector condition number
-* computed by DGEEVX and RCDVIN (the precomputed true value)
-* is supplied as input. cond(RCONDV) is the condition number of
-* RCONDV, and takes errors in computing RCONDV into account, so
-* that the resulting quantity should be O(ULP). cond(RCONDV) is
-* essentially given by norm(A)/RCONDE.
-*
-* (11) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal eigenvalue condition number
-* computed by DGEEVX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. NSIZES must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIUNIT will be
-* tested.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. NTYPES must be at least
-* zero. If it is zero, no randomly generated test matrices
-* are tested, but and test matrices read from NIUNIT will be
-* tested. If it is MAXTYP+1 and NSIZES is 1, then an
-* additional type, MAXTYP+1 is defined, which is to use
-* whatever matrix is in A. This is only useful if
-* DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRVVX to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIUNIT (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN,12))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and H.
-* LDA >= max(NN,12), since 12 is the dimension of the largest
-* matrix in the precomputed input file.
-*
-* H (workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN,12))
-* Another copy of the test matrix A, modified by DGEEVX.
-*
-* WR (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* WI (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WR1 (workspace) DOUBLE PRECISION array, dimension (max(NN,12))
-* WI1 (workspace) DOUBLE PRECISION array, dimension (max(NN,12))
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when DGEEVX only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) DOUBLE PRECISION array, dimension
-* (LDVL, max(NN,12))
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,max(NN,12)).
-*
-* VR (workspace) DOUBLE PRECISION array, dimension
-* (LDVR, max(NN,12))
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,max(NN,12)).
-*
-* LRE (workspace) DOUBLE PRECISION array, dimension
-* (LDLRE, max(NN,12))
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,max(NN,12))
-*
-* RCONDV (workspace) DOUBLE PRECISION array, dimension (N)
-* RCONDV holds the computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCNDV1 (workspace) DOUBLE PRECISION array, dimension (N)
-* RCNDV1 holds more computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCDVIN (workspace) DOUBLE PRECISION array, dimension (N)
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition numbers for eigenvectors to be compared with
-* RCONDV.
-*
-* RCONDE (workspace) DOUBLE PRECISION array, dimension (N)
-* RCONDE holds the computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCNDE1 (workspace) DOUBLE PRECISION array, dimension (N)
-* RCNDE1 holds more computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCDEIN (workspace) DOUBLE PRECISION array, dimension (N)
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition numbers for eigenvalues to be compared with
-* RCONDE.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (11)
-* The values computed by the seven tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) =
-* max( 360 ,6*NN(j)+2*NN(j)**2) for all j.
-*
-* IWORK (workspace) INTEGER array, dimension (2*max(NN,12))
-*
-* INFO (output) INTEGER
-* If 0, then successful exit.
-* If <0, then input paramter -INFO is incorrect.
-* If >0, DLATMR, SLATMS, SLATME or DGET23 returned an error
-* code, and INFO is its absolute value.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN or 12.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/derrbd.f b/TESTING/EIG/derrbd.f
index 6064a228..4735cfff 100644
--- a/TESTING/EIG/derrbd.f
+++ b/TESTING/EIG/derrbd.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRBD( PATH, NUNIT )
+*> \brief \b DERRBD
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRBD( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRBD tests the error exits for DGEBRD, DORGBR, DORMBR, DBDSQR and
-* DBDSDC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRBD tests the error exits for DGEBRD, DORGBR, DORMBR, DBDSQR and
+*> DBDSDC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DERRBD( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/derrec.f b/TESTING/EIG/derrec.f
index f01b34c5..da667649 100644
--- a/TESTING/EIG/derrec.f
+++ b/TESTING/EIG/derrec.f
@@ -1,29 +1,72 @@
- SUBROUTINE DERREC( PATH, NUNIT )
+*> \brief \b DERREC
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DERREC( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERREC tests the error exits for the routines for eigen- condition
-* estimation for DOUBLE PRECISION matrices:
-* DTRSYL, STREXC, STRSNA and STRSEN.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERREC tests the error exits for the routines for eigen- condition
+*> estimation for DOUBLE PRECISION matrices:
+*> DTRSYL, STREXC, STRSNA and STRSEN.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DERREC( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/derred.f b/TESTING/EIG/derred.f
index c0a69968..d88024fe 100644
--- a/TESTING/EIG/derred.f
+++ b/TESTING/EIG/derred.f
@@ -1,38 +1,81 @@
- SUBROUTINE DERRED( PATH, NUNIT )
+*> \brief \b DERRED
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DERRED( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRED tests the error exits for the eigenvalue driver routines for
-* DOUBLE PRECISION matrices:
-*
-* PATH driver description
-* ---- ------ -----------
-* SEV DGEEV find eigenvalues/eigenvectors for nonsymmetric A
-* SES DGEES find eigenvalues/Schur form for nonsymmetric A
-* SVX DGEEVX SGEEV + balancing and condition estimation
-* SSX DGEESX SGEES + balancing and condition estimation
-* DBD DGESVD compute SVD of an M-by-N matrix A
-* DGESDD compute SVD of an M-by-N matrix A (by divide and
-* conquer)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRED tests the error exits for the eigenvalue driver routines for
+*> DOUBLE PRECISION matrices:
+*>
+*> PATH driver description
+*> ---- ------ -----------
+*> SEV DGEEV find eigenvalues/eigenvectors for nonsymmetric A
+*> SES DGEES find eigenvalues/Schur form for nonsymmetric A
+*> SVX DGEEVX SGEEV + balancing and condition estimation
+*> SSX DGEESX SGEES + balancing and condition estimation
+*> DBD DGESVD compute SVD of an M-by-N matrix A
+*> DGESDD compute SVD of an M-by-N matrix A (by divide and
+*> conquer)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DERRED( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/derrgg.f b/TESTING/EIG/derrgg.f
index e53cb516..e2d46a2d 100644
--- a/TESTING/EIG/derrgg.f
+++ b/TESTING/EIG/derrgg.f
@@ -1,29 +1,72 @@
- SUBROUTINE DERRGG( PATH, NUNIT )
+*> \brief \b DERRGG
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRGG( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRGG tests the error exits for DGGES, DGGESX, DGGEV, DGGEVX,
-* DGGGLM, DGGHRD, DGGLSE, DGGQRF, DGGRQF, DGGSVD, DGGSVP, DHGEQZ,
-* DTGEVC, DTGEXC, DTGSEN, DTGSJA, DTGSNA, and DTGSYL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRGG tests the error exits for DGGES, DGGESX, DGGEV, DGGEVX,
+*> DGGGLM, DGGHRD, DGGLSE, DGGQRF, DGGRQF, DGGSVD, DGGSVP, DHGEQZ,
+*> DTGEVC, DTGEXC, DTGSEN, DTGSJA, DTGSNA, and DTGSYL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DERRGG( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/derrhs.f b/TESTING/EIG/derrhs.f
index 7a8a844b..6f678b9e 100644
--- a/TESTING/EIG/derrhs.f
+++ b/TESTING/EIG/derrhs.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRHS( PATH, NUNIT )
+*> \brief \b DERRHS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRHS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRHS tests the error exits for DGEBAK, SGEBAL, SGEHRD, DORGHR,
-* DORMHR, DHSEQR, SHSEIN, and DTREVC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRHS tests the error exits for DGEBAK, SGEBAL, SGEHRD, DORGHR,
+*> DORMHR, DHSEQR, SHSEIN, and DTREVC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DERRHS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/derrst.f b/TESTING/EIG/derrst.f
index 8c9b5954..ddb94541 100644
--- a/TESTING/EIG/derrst.f
+++ b/TESTING/EIG/derrst.f
@@ -1,30 +1,73 @@
- SUBROUTINE DERRST( PATH, NUNIT )
+*> \brief \b DERRST
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRST( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRST tests the error exits for DSYTRD, DORGTR, DORMTR, DSPTRD,
-* DOPGTR, DOPMTR, DSTEQR, SSTERF, SSTEBZ, SSTEIN, DPTEQR, DSBTRD,
-* DSYEV, SSYEVX, SSYEVD, DSBEV, SSBEVX, SSBEVD,
-* DSPEV, SSPEVX, SSPEVD, DSTEV, SSTEVX, SSTEVD, and SSTEDC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRST tests the error exits for DSYTRD, DORGTR, DORMTR, DSPTRD,
+*> DOPGTR, DOPMTR, DSTEQR, SSTERF, SSTEBZ, SSTEIN, DPTEQR, DSBTRD,
+*> DSYEV, SSYEVX, SSYEVD, DSBEV, SSBEVX, SSBEVD,
+*> DSPEV, SSPEVX, SSPEVD, DSTEV, SSTEVX, SSTEVD, and SSTEDC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_eig
+*
+* =====================================================================
+ SUBROUTINE DERRST( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget02.f b/TESTING/EIG/dget02.f
index d2e91700..dee1ae78 100644
--- a/TESTING/EIG/dget02.f
+++ b/TESTING/EIG/dget02.f
@@ -1,9 +1,144 @@
+*> \brief \b DGET02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET02 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGET02 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dget10.f b/TESTING/EIG/dget10.f
index 14f1fba6..0fe5e2a8 100644
--- a/TESTING/EIG/dget10.f
+++ b/TESTING/EIG/dget10.f
@@ -1,48 +1,112 @@
- SUBROUTINE DGET10( M, N, A, LDA, B, LDB, WORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, M, N
- DOUBLE PRECISION RESULT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
-*
+*> \brief \b DGET10
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET10( M, N, A, LDA, B, LDB, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, M, N
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGET10 compares two matrices A and B and computes the ratio
-* RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET10 compares two matrices A and B and computes the ratio
+*> RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and B.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> The m by n matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m by n matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* B (input) DOUBLE PRECISION array, dimension (LDB,N)
-* The m by n matrix B.
+*> \ingroup double_eig
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+* =====================================================================
+ SUBROUTINE DGET10( M, N, A, LDA, B, LDB, WORK, RESULT )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION
-* RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, M, N
+ DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget22.f b/TESTING/EIG/dget22.f
index 7e292c9d..8749c6f5 100644
--- a/TESTING/EIG/dget22.f
+++ b/TESTING/EIG/dget22.f
@@ -1,107 +1,188 @@
- SUBROUTINE DGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
- $ WI, WORK, RESULT )
+*> \brief \b DGET22
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER TRANSA, TRANSE, TRANSW
- INTEGER LDA, LDE, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), E( LDE, * ), RESULT( 2 ), WI( * ),
- $ WORK( * ), WR( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
+* WI, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSA, TRANSE, TRANSW
+* INTEGER LDA, LDE, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), E( LDE, * ), RESULT( 2 ), WI( * ),
+* $ WORK( * ), WR( * )
+* ..
+*
* Purpose
* =======
*
-* DGET22 does an eigenvector check.
-*
-* The basic test is:
-*
-* RESULT(1) = | A E - E W | / ( |A| |E| ulp )
-*
-* using the 1-norm. It also tests the normalization of E:
-*
-* RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
-* j
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET22 does an eigenvector check.
+*>
+*> The basic test is:
+*>
+*> RESULT(1) = | A E - E W | / ( |A| |E| ulp )
+*>
+*> using the 1-norm. It also tests the normalization of E:
+*>
+*> RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
+*> j
+*>
+*> where E(j) is the j-th eigenvector, and m-norm is the max-norm of a
+*> vector. If an eigenvector is complex, as determined from WI(j)
+*> nonzero, then the max-norm of the vector ( er + i*ei ) is the maximum
+*> of
+*> |er(1)| + |ei(1)|, ... , |er(n)| + |ei(n)|
+*>
+*> W is a block diagonal matrix, with a 1 by 1 block for each real
+*> eigenvalue and a 2 by 2 block for each complex conjugate pair.
+*> If eigenvalues j and j+1 are a complex conjugate pair, so that
+*> WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the 2 by 2
+*> block corresponding to the pair will be:
+*>
+*> ( wr wi )
+*> ( -wi wr )
+*>
+*> Such a block multiplying an n by 2 matrix ( ur ui ) on the right
+*> will be the same as multiplying ur + i*ui by wr + i*wi.
+*>
+*> To handle various schemes for storage of left eigenvectors, there are
+*> options to use A-transpose instead of A, E-transpose instead of E,
+*> and/or W-transpose instead of W.
+*>
+*>\endverbatim
*
-* where E(j) is the j-th eigenvector, and m-norm is the max-norm of a
-* vector. If an eigenvector is complex, as determined from WI(j)
-* nonzero, then the max-norm of the vector ( er + i*ei ) is the maximum
-* of
-* |er(1)| + |ei(1)|, ... , |er(n)| + |ei(n)|
+* Arguments
+* =========
+*
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> Specifies whether or not A is transposed.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= Transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANSE
+*> \verbatim
+*> TRANSE is CHARACTER*1
+*> Specifies whether or not E is transposed.
+*> = 'N': No transpose, eigenvectors are in columns of E
+*> = 'T': Transpose, eigenvectors are in rows of E
+*> = 'C': Conjugate transpose (= Transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANSW
+*> \verbatim
+*> TRANSW is CHARACTER*1
+*> Specifies whether or not W is transposed.
+*> = 'N': No transpose
+*> = 'T': Transpose, use -WI(j) instead of WI(j)
+*> = 'C': Conjugate transpose, use -WI(j) instead of WI(j)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The matrix whose eigenvectors are in E.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (LDE,N)
+*> The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors
+*> are stored in the columns of E, if TRANSE = 'T' or 'C', the
+*> eigenvectors are stored in the rows of E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the array E. LDE >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> Purely real eigenvalues are indicated by WI(j) = 0.
+*> Complex conjugate pairs are indicated by WR(j)=WR(j+1) and
+*> WI(j) = - WI(j+1) non-zero; the real part is assumed to be
+*> stored in the j-th row/column and the imaginary part in
+*> the (j+1)-th row/column.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N*(N+1))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> RESULT(1) = | A E - E W | / ( |A| |E| ulp )
+*> RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* W is a block diagonal matrix, with a 1 by 1 block for each real
-* eigenvalue and a 2 by 2 block for each complex conjugate pair.
-* If eigenvalues j and j+1 are a complex conjugate pair, so that
-* WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the 2 by 2
-* block corresponding to the pair will be:
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ( wr wi )
-* ( -wi wr )
+*> \date November 2011
*
-* Such a block multiplying an n by 2 matrix ( ur ui ) on the right
-* will be the same as multiplying ur + i*ui by wr + i*wi.
+*> \ingroup double_eig
*
-* To handle various schemes for storage of left eigenvectors, there are
-* options to use A-transpose instead of A, E-transpose instead of E,
-* and/or W-transpose instead of W.
+* =====================================================================
+ SUBROUTINE DGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
+ $ WI, WORK, RESULT )
*
-* Arguments
-* ==========
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* TRANSA (input) CHARACTER*1
-* Specifies whether or not A is transposed.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= Transpose)
-*
-* TRANSE (input) CHARACTER*1
-* Specifies whether or not E is transposed.
-* = 'N': No transpose, eigenvectors are in columns of E
-* = 'T': Transpose, eigenvectors are in rows of E
-* = 'C': Conjugate transpose (= Transpose)
-*
-* TRANSW (input) CHARACTER*1
-* Specifies whether or not W is transposed.
-* = 'N': No transpose
-* = 'T': Transpose, use -WI(j) instead of WI(j)
-* = 'C': Conjugate transpose, use -WI(j) instead of WI(j)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The matrix whose eigenvectors are in E.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* E (input) DOUBLE PRECISION array, dimension (LDE,N)
-* The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors
-* are stored in the columns of E, if TRANSE = 'T' or 'C', the
-* eigenvectors are stored in the rows of E.
-*
-* LDE (input) INTEGER
-* The leading dimension of the array E. LDE >= max(1,N).
-*
-* WR (input) DOUBLE PRECISION array, dimension (N)
-* WI (input) DOUBLE PRECISION array, dimension (N)
-* The real and imaginary parts of the eigenvalues of A.
-* Purely real eigenvalues are indicated by WI(j) = 0.
-* Complex conjugate pairs are indicated by WR(j)=WR(j+1) and
-* WI(j) = - WI(j+1) non-zero; the real part is assumed to be
-* stored in the j-th row/column and the imaginary part in
-* the (j+1)-th row/column.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N*(N+1))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* RESULT(1) = | A E - E W | / ( |A| |E| ulp )
-* RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
+* .. Scalar Arguments ..
+ CHARACTER TRANSA, TRANSE, TRANSW
+ INTEGER LDA, LDE, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), E( LDE, * ), RESULT( 2 ), WI( * ),
+ $ WORK( * ), WR( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget23.f b/TESTING/EIG/dget23.f
index 48a48271..bd1471dc 100644
--- a/TESTING/EIG/dget23.f
+++ b/TESTING/EIG/dget23.f
@@ -1,3 +1,381 @@
+*> \brief \b DGET23
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET23( COMP, BALANC, JTYPE, THRESH, ISEED, NOUNIT, N,
+* A, LDA, H, WR, WI, WR1, WI1, VL, LDVL, VR,
+* LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
+* RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1, RESULT,
+* WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL COMP
+* CHARACTER BALANC
+* INTEGER INFO, JTYPE, LDA, LDLRE, LDVL, LDVR, LWORK, N,
+* $ NOUNIT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
+* $ RCNDV1( * ), RCONDE( * ), RCONDV( * ),
+* $ RESULT( 11 ), SCALE( * ), SCALE1( * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), WI( * ),
+* $ WI1( * ), WORK( * ), WR( * ), WR1( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET23 checks the nonsymmetric eigenvalue problem driver SGEEVX.
+*> If COMP = .FALSE., the first 8 of the following tests will be
+*> performed on the input matrix A, and also test 9 if LWORK is
+*> sufficiently large.
+*> if COMP is .TRUE. all 11 tests will be performed.
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a block diagonal matrix, with a 1x1 block for each
+*> real eigenvalue and a 2x2 block for each complex conjugate
+*> pair. If eigenvalues j and j+1 are a complex conjugate pair,
+*> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
+*> 2 x 2 block corresponding to the pair will be:
+*>
+*> ( wr wi )
+*> ( -wi wr )
+*>
+*> Such a block multiplying an n x 2 matrix ( ur ui ) on the
+*> right will be the same as multiplying ur + i*ui by wr + i*wi.
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) 0 if W(full) = W(partial), 1/ulp otherwise
+*>
+*> W(full) denotes the eigenvalues computed when VR, VL, RCONDV
+*> and RCONDE are also computed, and W(partial) denotes the
+*> eigenvalues computed when only some of VR, VL, RCONDV, and
+*> RCONDE are computed.
+*>
+*> (6) 0 if VR(full) = VR(partial), 1/ulp otherwise
+*>
+*> VR(full) denotes the right eigenvectors computed when VL, RCONDV
+*> and RCONDE are computed, and VR(partial) denotes the result
+*> when only some of VL and RCONDV are computed.
+*>
+*> (7) 0 if VL(full) = VL(partial), 1/ulp otherwise
+*>
+*> VL(full) denotes the left eigenvectors computed when VR, RCONDV
+*> and RCONDE are computed, and VL(partial) denotes the result
+*> when only some of VR and RCONDV are computed.
+*>
+*> (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
+*> SCALE, ILO, IHI, ABNRM (partial)
+*> 1/ulp otherwise
+*>
+*> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
+*> (full) is when VR, VL, RCONDE and RCONDV are also computed, and
+*> (partial) is when some are not computed.
+*>
+*> (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise
+*>
+*> RCONDV(full) denotes the reciprocal condition numbers of the
+*> right eigenvectors computed when VR, VL and RCONDE are also
+*> computed. RCONDV(partial) denotes the reciprocal condition
+*> numbers when only some of VR, VL and RCONDE are computed.
+*>
+*> (10) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right eigenvector condition number
+*> computed by DGEEVX and RCDVIN (the precomputed true value)
+*> is supplied as input. cond(RCONDV) is the condition number of
+*> RCONDV, and takes errors in computing RCONDV into account, so
+*> that the resulting quantity should be O(ULP). cond(RCONDV) is
+*> essentially given by norm(A)/RCONDE.
+*>
+*> (11) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal eigenvalue condition number
+*> computed by DGEEVX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMP
+*> \verbatim
+*> COMP is LOGICAL
+*> COMP describes which input tests to perform:
+*> = .FALSE. if the computed condition numbers are not to
+*> be tested against RCDVIN and RCDEIN
+*> = .TRUE. if they are to be compared
+*> \endverbatim
+*>
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER
+*> Describes the balancing option to be tested.
+*> = 'N' for no permuting or diagonal scaling
+*> = 'P' for permuting but no diagonal scaling
+*> = 'S' for no permuting but diagonal scaling
+*> = 'B' for permuting and diagonal scaling
+*> \endverbatim
+*>
+*> \param[in] JTYPE
+*> \verbatim
+*> JTYPE is INTEGER
+*> Type of input matrix. Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> If COMP = .FALSE., the random number generator seed
+*> used to produce matrix.
+*> If COMP = .TRUE., ISEED(1) = the number of the example.
+*> Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of A. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least N.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDA,N)
+*> Another copy of the test matrix A, modified by DGEEVX.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WR1
+*> \verbatim
+*> WR1 is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI1
+*> \verbatim
+*> WI1 is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when DGEEVX only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is DOUBLE PRECISION array, dimension (LDVL,N)
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is DOUBLE PRECISION array, dimension (LDVR,N)
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is DOUBLE PRECISION array, dimension (LDLRE,N)
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension (N)
+*> RCONDV holds the computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] RCNDV1
+*> \verbatim
+*> RCNDV1 is DOUBLE PRECISION array, dimension (N)
+*> RCNDV1 holds more computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RCDVIN
+*> \verbatim
+*> RCDVIN is DOUBLE PRECISION array, dimension (N)
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition numbers for eigenvectors to be compared with
+*> RCONDV.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension (N)
+*> RCONDE holds the computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] RCNDE1
+*> \verbatim
+*> RCNDE1 is DOUBLE PRECISION array, dimension (N)
+*> RCNDE1 holds more computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] RCDEIN
+*> \verbatim
+*> RCDEIN is DOUBLE PRECISION array, dimension (N)
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition numbers for eigenvalues to be compared with
+*> RCONDE.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION array, dimension (N)
+*> Holds information describing balancing of matrix.
+*> \endverbatim
+*>
+*> \param[out] SCALE1
+*> \verbatim
+*> SCALE1 is DOUBLE PRECISION array, dimension (N)
+*> Holds information describing balancing of matrix.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (11)
+*> The values computed by the 11 tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 3*N, and 6*N+N**2 if tests 9, 10 or 11 are to be performed.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> If <0, input parameter -INFO had an incorrect value.
+*> If >0, DGEEVX returned an error code, the absolute
+*> value of which is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGET23( COMP, BALANC, JTYPE, THRESH, ISEED, NOUNIT, N,
$ A, LDA, H, WR, WI, WR1, WI1, VL, LDVL, VR,
$ LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
@@ -5,8 +383,9 @@
$ WORK, LWORK, IWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL COMP
@@ -25,227 +404,6 @@
$ WI1( * ), WORK( * ), WR( * ), WR1( * )
* ..
*
-* Purpose
-* =======
-*
-* DGET23 checks the nonsymmetric eigenvalue problem driver SGEEVX.
-* If COMP = .FALSE., the first 8 of the following tests will be
-* performed on the input matrix A, and also test 9 if LWORK is
-* sufficiently large.
-* if COMP is .TRUE. all 11 tests will be performed.
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a block diagonal matrix, with a 1x1 block for each
-* real eigenvalue and a 2x2 block for each complex conjugate
-* pair. If eigenvalues j and j+1 are a complex conjugate pair,
-* so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
-* 2 x 2 block corresponding to the pair will be:
-*
-* ( wr wi )
-* ( -wi wr )
-*
-* Such a block multiplying an n x 2 matrix ( ur ui ) on the
-* right will be the same as multiplying ur + i*ui by wr + i*wi.
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) 0 if W(full) = W(partial), 1/ulp otherwise
-*
-* W(full) denotes the eigenvalues computed when VR, VL, RCONDV
-* and RCONDE are also computed, and W(partial) denotes the
-* eigenvalues computed when only some of VR, VL, RCONDV, and
-* RCONDE are computed.
-*
-* (6) 0 if VR(full) = VR(partial), 1/ulp otherwise
-*
-* VR(full) denotes the right eigenvectors computed when VL, RCONDV
-* and RCONDE are computed, and VR(partial) denotes the result
-* when only some of VL and RCONDV are computed.
-*
-* (7) 0 if VL(full) = VL(partial), 1/ulp otherwise
-*
-* VL(full) denotes the left eigenvectors computed when VR, RCONDV
-* and RCONDE are computed, and VL(partial) denotes the result
-* when only some of VR and RCONDV are computed.
-*
-* (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
-* SCALE, ILO, IHI, ABNRM (partial)
-* 1/ulp otherwise
-*
-* SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
-* (full) is when VR, VL, RCONDE and RCONDV are also computed, and
-* (partial) is when some are not computed.
-*
-* (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise
-*
-* RCONDV(full) denotes the reciprocal condition numbers of the
-* right eigenvectors computed when VR, VL and RCONDE are also
-* computed. RCONDV(partial) denotes the reciprocal condition
-* numbers when only some of VR, VL and RCONDE are computed.
-*
-* (10) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right eigenvector condition number
-* computed by DGEEVX and RCDVIN (the precomputed true value)
-* is supplied as input. cond(RCONDV) is the condition number of
-* RCONDV, and takes errors in computing RCONDV into account, so
-* that the resulting quantity should be O(ULP). cond(RCONDV) is
-* essentially given by norm(A)/RCONDE.
-*
-* (11) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal eigenvalue condition number
-* computed by DGEEVX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* Arguments
-* =========
-*
-* COMP (input) LOGICAL
-* COMP describes which input tests to perform:
-* = .FALSE. if the computed condition numbers are not to
-* be tested against RCDVIN and RCDEIN
-* = .TRUE. if they are to be compared
-*
-* BALANC (input) CHARACTER
-* Describes the balancing option to be tested.
-* = 'N' for no permuting or diagonal scaling
-* = 'P' for permuting but no diagonal scaling
-* = 'S' for no permuting but diagonal scaling
-* = 'B' for permuting and diagonal scaling
-*
-* JTYPE (input) INTEGER
-* Type of input matrix. Used to label output if error occurs.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* ISEED (input) INTEGER array, dimension (4)
-* If COMP = .FALSE., the random number generator seed
-* used to produce matrix.
-* If COMP = .TRUE., ISEED(1) = the number of the example.
-* Used to label output if error occurs.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* N (input) INTEGER
-* The dimension of A. N must be at least 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least N.
-*
-* H (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-* Another copy of the test matrix A, modified by DGEEVX.
-*
-* WR (workspace) DOUBLE PRECISION array, dimension (N)
-* WI (workspace) DOUBLE PRECISION array, dimension (N)
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WR1 (workspace) DOUBLE PRECISION array, dimension (N)
-* WI1 (workspace) DOUBLE PRECISION array, dimension (N)
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when DGEEVX only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) DOUBLE PRECISION array, dimension (LDVL,N)
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,N).
-*
-* VR (workspace) DOUBLE PRECISION array, dimension (LDVR,N)
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,N).
-*
-* LRE (workspace) DOUBLE PRECISION array, dimension (LDLRE,N)
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,N).
-*
-* RCONDV (workspace) DOUBLE PRECISION array, dimension (N)
-* RCONDV holds the computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCNDV1 (workspace) DOUBLE PRECISION array, dimension (N)
-* RCNDV1 holds more computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCDVIN (input) DOUBLE PRECISION array, dimension (N)
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition numbers for eigenvectors to be compared with
-* RCONDV.
-*
-* RCONDE (workspace) DOUBLE PRECISION array, dimension (N)
-* RCONDE holds the computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCNDE1 (workspace) DOUBLE PRECISION array, dimension (N)
-* RCNDE1 holds more computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCDEIN (input) DOUBLE PRECISION array, dimension (N)
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition numbers for eigenvalues to be compared with
-* RCONDE.
-*
-* SCALE (workspace) DOUBLE PRECISION array, dimension (N)
-* Holds information describing balancing of matrix.
-*
-* SCALE1 (workspace) DOUBLE PRECISION array, dimension (N)
-* Holds information describing balancing of matrix.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (11)
-* The values computed by the 11 tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 3*N, and 6*N+N**2 if tests 9, 10 or 11 are to be performed.
-*
-* IWORK (workspace) INTEGER array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* If <0, input parameter -INFO had an incorrect value.
-* If >0, DGEEVX returned an error code, the absolute
-* value of which is returned.
-*
* =====================================================================
*
*
diff --git a/TESTING/EIG/dget24.f b/TESTING/EIG/dget24.f
index 655d365b..d5901759 100644
--- a/TESTING/EIG/dget24.f
+++ b/TESTING/EIG/dget24.f
@@ -1,11 +1,357 @@
+*> \brief \b DGET24
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
+* H, HT, WR, WI, WRT, WIT, WRTMP, WITMP, VS,
+* LDVS, VS1, RCDEIN, RCDVIN, NSLCT, ISLCT,
+* RESULT, WORK, LWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL COMP
+* INTEGER INFO, JTYPE, LDA, LDVS, LWORK, N, NOUNIT, NSLCT
+* DOUBLE PRECISION RCDEIN, RCDVIN, THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER ISEED( 4 ), ISLCT( * ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ RESULT( 17 ), VS( LDVS, * ), VS1( LDVS, * ),
+* $ WI( * ), WIT( * ), WITMP( * ), WORK( * ),
+* $ WR( * ), WRT( * ), WRTMP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET24 checks the nonsymmetric eigenvalue (Schur form) problem
+*> expert driver DGEESX.
+*>
+*> If COMP = .FALSE., the first 13 of the following tests will be
+*> be performed on the input matrix A, and also tests 14 and 15
+*> if LWORK is sufficiently large.
+*> If COMP = .TRUE., all 17 test will be performed.
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare WR, WI with and
+*> without reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare T with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare VS with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*> If workspace sufficient, also compare SDIM with and
+*> without reciprocal condition numbers
+*>
+*> (14) if RCONDE the same no matter if VS and/or RCONDV computed
+*>
+*> (15) if RCONDV the same no matter if VS and/or RCONDE computed
+*>
+*> (16) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal average eigenvalue condition number
+*> computed by DGEESX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*> (17) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right invariant subspace condition
+*> number computed by DGEESX and RCDVIN (the precomputed true
+*> value) is supplied as input. cond(RCONDV) is the condition
+*> number of RCONDV, and takes errors in computing RCONDV into
+*> account, so that the resulting quantity should be O(ULP).
+*> cond(RCONDV) is essentially given by norm(A)/RCONDE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMP
+*> \verbatim
+*> COMP is LOGICAL
+*> COMP describes which input tests to perform:
+*> = .FALSE. if the computed condition numbers are not to
+*> be tested against RCDVIN and RCDEIN
+*> = .TRUE. if they are to be compared
+*> \endverbatim
+*>
+*> \param[in] JTYPE
+*> \verbatim
+*> JTYPE is INTEGER
+*> Type of input matrix. Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> If COMP = .FALSE., the random number generator seed
+*> used to produce matrix.
+*> If COMP = .TRUE., ISEED(1) = the number of the example.
+*> Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of A. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least N.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDA, N)
+*> Another copy of the test matrix A, modified by DGEESX.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is DOUBLE PRECISION array, dimension (LDA, N)
+*> Yet another copy of the test matrix A, modified by DGEESX.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WRT
+*> \verbatim
+*> WRT is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WIT
+*> \verbatim
+*> WIT is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when DGEESX only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] WRTMP
+*> \verbatim
+*> WRTMP is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WITMP
+*> \verbatim
+*> WITMP is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but sorted by increasing real part.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is DOUBLE PRECISION array, dimension (LDVS, N)
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1, N).
+*> \endverbatim
+*>
+*> \param[out] VS1
+*> \verbatim
+*> VS1 is DOUBLE PRECISION array, dimension (LDVS, N)
+*> VS1 holds another copy of the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] RCDEIN
+*> \verbatim
+*> RCDEIN is DOUBLE PRECISION
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition number for the average of selected eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] RCDVIN
+*> \verbatim
+*> RCDVIN is DOUBLE PRECISION
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition number for the selected right invariant subspace.
+*> \endverbatim
+*>
+*> \param[in] NSLCT
+*> \verbatim
+*> NSLCT is INTEGER
+*> When COMP = .TRUE. the number of selected eigenvalues
+*> corresponding to the precomputed values RCDEIN and RCDVIN.
+*> \endverbatim
+*>
+*> \param[in] ISLCT
+*> \verbatim
+*> ISLCT is INTEGER array, dimension (NSLCT)
+*> When COMP = .TRUE. ISLCT selects the eigenvalues of the
+*> input matrix corresponding to the precomputed values RCDEIN
+*> and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the
+*> eigenvalue with the J-th largest real part is selected.
+*> Not referenced if COMP = .FALSE.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (17)
+*> The values computed by the 17 tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK to be passed to DGEESX. This
+*> must be at least 3*N, and N+N**2 if tests 14--16 are to
+*> be performed.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> If <0, input parameter -INFO had an incorrect value.
+*> If >0, DGEESX returned an error code, the absolute
+*> value of which is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
$ H, HT, WR, WI, WRT, WIT, WRTMP, WITMP, VS,
$ LDVS, VS1, RCDEIN, RCDVIN, NSLCT, ISLCT,
$ RESULT, WORK, LWORK, IWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL COMP
@@ -21,207 +367,6 @@
$ WR( * ), WRT( * ), WRTMP( * )
* ..
*
-* Purpose
-* =======
-*
-* DGET24 checks the nonsymmetric eigenvalue (Schur form) problem
-* expert driver DGEESX.
-*
-* If COMP = .FALSE., the first 13 of the following tests will be
-* be performed on the input matrix A, and also tests 14 and 15
-* if LWORK is sufficiently large.
-* If COMP = .TRUE., all 17 test will be performed.
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* If workspace sufficient, also compare WR, WI with and
-* without reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare T with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare VS with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-* If workspace sufficient, also compare SDIM with and
-* without reciprocal condition numbers
-*
-* (14) if RCONDE the same no matter if VS and/or RCONDV computed
-*
-* (15) if RCONDV the same no matter if VS and/or RCONDE computed
-*
-* (16) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal average eigenvalue condition number
-* computed by DGEESX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* (17) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right invariant subspace condition
-* number computed by DGEESX and RCDVIN (the precomputed true
-* value) is supplied as input. cond(RCONDV) is the condition
-* number of RCONDV, and takes errors in computing RCONDV into
-* account, so that the resulting quantity should be O(ULP).
-* cond(RCONDV) is essentially given by norm(A)/RCONDE.
-*
-* Arguments
-* =========
-*
-* COMP (input) LOGICAL
-* COMP describes which input tests to perform:
-* = .FALSE. if the computed condition numbers are not to
-* be tested against RCDVIN and RCDEIN
-* = .TRUE. if they are to be compared
-*
-* JTYPE (input) INTEGER
-* Type of input matrix. Used to label output if error occurs.
-*
-* ISEED (input) INTEGER array, dimension (4)
-* If COMP = .FALSE., the random number generator seed
-* used to produce matrix.
-* If COMP = .TRUE., ISEED(1) = the number of the example.
-* Used to label output if error occurs.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* N (input) INTEGER
-* The dimension of A. N must be at least 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least N.
-*
-* H (workspace) DOUBLE PRECISION array, dimension (LDA, N)
-* Another copy of the test matrix A, modified by DGEESX.
-*
-* HT (workspace) DOUBLE PRECISION array, dimension (LDA, N)
-* Yet another copy of the test matrix A, modified by DGEESX.
-*
-* WR (workspace) DOUBLE PRECISION array, dimension (N)
-* WI (workspace) DOUBLE PRECISION array, dimension (N)
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WRT (workspace) DOUBLE PRECISION array, dimension (N)
-* WIT (workspace) DOUBLE PRECISION array, dimension (N)
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when DGEESX only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* WRTMP (workspace) DOUBLE PRECISION array, dimension (N)
-* WITMP (workspace) DOUBLE PRECISION array, dimension (N)
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but sorted by increasing real part.
-*
-* VS (workspace) DOUBLE PRECISION array, dimension (LDVS, N)
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1, N).
-*
-* VS1 (workspace) DOUBLE PRECISION array, dimension (LDVS, N)
-* VS1 holds another copy of the computed Schur vectors.
-*
-* RCDEIN (input) DOUBLE PRECISION
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition number for the average of selected eigenvalues.
-*
-* RCDVIN (input) DOUBLE PRECISION
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition number for the selected right invariant subspace.
-*
-* NSLCT (input) INTEGER
-* When COMP = .TRUE. the number of selected eigenvalues
-* corresponding to the precomputed values RCDEIN and RCDVIN.
-*
-* ISLCT (input) INTEGER array, dimension (NSLCT)
-* When COMP = .TRUE. ISLCT selects the eigenvalues of the
-* input matrix corresponding to the precomputed values RCDEIN
-* and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the
-* eigenvalue with the J-th largest real part is selected.
-* Not referenced if COMP = .FALSE.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (17)
-* The values computed by the 17 tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK to be passed to DGEESX. This
-* must be at least 3*N, and N+N**2 if tests 14--16 are to
-* be performed.
-*
-* IWORK (workspace) INTEGER array, dimension (N*N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* If <0, input parameter -INFO had an incorrect value.
-* If >0, DGEESX returned an error code, the absolute
-* value of which is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dget31.f b/TESTING/EIG/dget31.f
index ec84459b..1f4723ed 100644
--- a/TESTING/EIG/dget31.f
+++ b/TESTING/EIG/dget31.f
@@ -1,58 +1,110 @@
- SUBROUTINE DGET31( RMAX, LMAX, NINFO, KNT )
+*> \brief \b DGET31
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX
- DOUBLE PRECISION RMAX
-* ..
-* .. Array Arguments ..
- INTEGER NINFO( 2 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGET31( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX
+* DOUBLE PRECISION RMAX
+* ..
+* .. Array Arguments ..
+* INTEGER NINFO( 2 )
+* ..
+*
* Purpose
* =======
*
-* DGET31 tests DLALN2, a routine for solving
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET31 tests DLALN2, a routine for solving
+*>
+*> (ca A - w D)X = sB
+*>
+*> where A is an NA by NA matrix (NA=1 or 2 only), w is a real (NW=1) or
+*> complex (NW=2) constant, ca is a real constant, D is an NA by NA real
+*> diagonal matrix, and B is an NA by NW matrix (when NW=2 the second
+*> column of B contains the imaginary part of the solution). The code
+*> returns X and s, where s is a scale factor, less than or equal to 1,
+*> which is chosen to avoid overflow in X.
+*>
+*> If any singular values of ca A-w D are less than another input
+*> parameter SMIN, they are perturbed up to SMIN.
+*>
+*> The test condition is that the scaled residual
+*>
+*> norm( (ca A-w D)*X - s*B ) /
+*> ( max( ulp*norm(ca A-w D), SMIN )*norm(X) )
+*>
+*> should be on the order of 1. Here, ulp is the machine precision.
+*> Also, it is verified that SCALE is less than or equal to 1, and that
+*> XNORM = infinity-norm(X).
+*>
+*>\endverbatim
*
-* (ca A - w D)X = sB
-*
-* where A is an NA by NA matrix (NA=1 or 2 only), w is a real (NW=1) or
-* complex (NW=2) constant, ca is a real constant, D is an NA by NA real
-* diagonal matrix, and B is an NA by NW matrix (when NW=2 the second
-* column of B contains the imaginary part of the solution). The code
-* returns X and s, where s is a scale factor, less than or equal to 1,
-* which is chosen to avoid overflow in X.
-*
-* If any singular values of ca A-w D are less than another input
-* parameter SMIN, they are perturbed up to SMIN.
+* Arguments
+* =========
*
-* The test condition is that the scaled residual
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = number of examples with INFO less than 0
+*> NINFO(2) = number of examples with INFO greater than 0
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
*
-* norm( (ca A-w D)*X - s*B ) /
-* ( max( ulp*norm(ca A-w D), SMIN )*norm(X) )
+* Authors
+* =======
*
-* should be on the order of 1. Here, ulp is the machine precision.
-* Also, it is verified that SCALE is less than or equal to 1, and that
-* XNORM = infinity-norm(X).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
+*> \ingroup double_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE DGET31( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = number of examples with INFO less than 0
-* NINFO(2) = number of examples with INFO greater than 0
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX
+ DOUBLE PRECISION RMAX
+* ..
+* .. Array Arguments ..
+ INTEGER NINFO( 2 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget32.f b/TESTING/EIG/dget32.f
index e8b0cbbd..1b0a5336 100644
--- a/TESTING/EIG/dget32.f
+++ b/TESTING/EIG/dget32.f
@@ -1,49 +1,98 @@
- SUBROUTINE DGET32( RMAX, LMAX, NINFO, KNT )
+*> \brief \b DGET32
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NINFO
- DOUBLE PRECISION RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGET32( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NINFO
+* DOUBLE PRECISION RMAX
+* ..
+*
* Purpose
* =======
*
-* DGET32 tests DLASY2, a routine for solving
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET32 tests DLASY2, a routine for solving
+*>
+*> op(TL)*X + ISGN*X*op(TR) = SCALE*B
+*>
+*> where TL is N1 by N1, TR is N2 by N2, and N1,N2 =1 or 2 only.
+*> X and B are N1 by N2, op() is an optional transpose, an
+*> ISGN = 1 or -1. SCALE is chosen less than or equal to 1 to
+*> avoid overflow in X.
+*>
+*> The test condition is that the scaled residual
+*>
+*> norm( op(TL)*X + ISGN*X*op(TR) = SCALE*B )
+*> / ( max( ulp*norm(TL), ulp*norm(TR)) * norm(X), SMLNUM )
+*>
+*> should be on the order of 1. Here, ulp is the machine precision.
+*> Also, it is verified that SCALE is less than or equal to 1, and
+*> that XNORM = infinity-norm(X).
+*>
+*>\endverbatim
*
-* op(TL)*X + ISGN*X*op(TR) = SCALE*B
-*
-* where TL is N1 by N1, TR is N2 by N2, and N1,N2 =1 or 2 only.
-* X and B are N1 by N2, op() is an optional transpose, an
-* ISGN = 1 or -1. SCALE is chosen less than or equal to 1 to
-* avoid overflow in X.
+* Arguments
+* =========
*
-* The test condition is that the scaled residual
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples returned with INFO.NE.0.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
*
-* norm( op(TL)*X + ISGN*X*op(TR) = SCALE*B )
-* / ( max( ulp*norm(TL), ulp*norm(TR)) * norm(X), SMLNUM )
+* Authors
+* =======
*
-* should be on the order of 1. Here, ulp is the machine precision.
-* Also, it is verified that SCALE is less than or equal to 1, and
-* that XNORM = infinity-norm(X).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
+*> \ingroup double_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE DGET32( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER
-* Number of examples returned with INFO.NE.0.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NINFO
+ DOUBLE PRECISION RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget33.f b/TESTING/EIG/dget33.f
index 347de14f..81f3614c 100644
--- a/TESTING/EIG/dget33.f
+++ b/TESTING/EIG/dget33.f
@@ -1,43 +1,92 @@
- SUBROUTINE DGET33( RMAX, LMAX, NINFO, KNT )
+*> \brief \b DGET33
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NINFO
- DOUBLE PRECISION RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGET33( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NINFO
+* DOUBLE PRECISION RMAX
+* ..
+*
* Purpose
* =======
*
-* DGET33 tests DLANV2, a routine for putting 2 by 2 blocks into
-* standard form. In other words, it computes a two by two rotation
-* [[C,S];[-S,C]] where in
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET33 tests DLANV2, a routine for putting 2 by 2 blocks into
+*> standard form. In other words, it computes a two by two rotation
+*> [[C,S];[-S,C]] where in
+*>
+*> [ C S ][T(1,1) T(1,2)][ C -S ] = [ T11 T12 ]
+*> [-S C ][T(2,1) T(2,2)][ S C ] [ T21 T22 ]
+*>
+*> either
+*> 1) T21=0 (real eigenvalues), or
+*> 2) T11=T22 and T21*T12<0 (complex conjugate eigenvalues).
+*> We also verify that the residual is small.
+*>
+*>\endverbatim
*
-* [ C S ][T(1,1) T(1,2)][ C -S ] = [ T11 T12 ]
-* [-S C ][T(2,1) T(2,2)][ S C ] [ T21 T22 ]
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples returned with INFO .NE. 0.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* either
-* 1) T21=0 (real eigenvalues), or
-* 2) T11=T22 and T21*T12<0 (complex conjugate eigenvalues).
-* We also verify that the residual is small.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
+*> \ingroup double_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE DGET33( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER
-* Number of examples returned with INFO .NE. 0.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NINFO
+ DOUBLE PRECISION RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget34.f b/TESTING/EIG/dget34.f
index 0630a5cc..c2c083e4 100644
--- a/TESTING/EIG/dget34.f
+++ b/TESTING/EIG/dget34.f
@@ -1,49 +1,101 @@
- SUBROUTINE DGET34( RMAX, LMAX, NINFO, KNT )
+*> \brief \b DGET34
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX
- DOUBLE PRECISION RMAX
-* ..
-* .. Array Arguments ..
- INTEGER NINFO( 2 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGET34( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX
+* DOUBLE PRECISION RMAX
+* ..
+* .. Array Arguments ..
+* INTEGER NINFO( 2 )
+* ..
+*
* Purpose
* =======
*
-* DGET34 tests DLAEXC, a routine for swapping adjacent blocks (either
-* 1 by 1 or 2 by 2) on the diagonal of a matrix in real Schur form.
-* Thus, DLAEXC computes an orthogonal matrix Q such that
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET34 tests DLAEXC, a routine for swapping adjacent blocks (either
+*> 1 by 1 or 2 by 2) on the diagonal of a matrix in real Schur form.
+*> Thus, DLAEXC computes an orthogonal matrix Q such that
+*>
+*> Q' * [ A B ] * Q = [ C1 B1 ]
+*> [ 0 C ] [ 0 A1 ]
+*>
+*> where C1 is similar to C and A1 is similar to A. Both A and C are
+*> assumed to be in standard form (equal diagonal entries and
+*> offdiagonal with differing signs) and A1 and C1 are returned with the
+*> same properties.
+*>
+*> The test code verifies these last last assertions, as well as that
+*> the residual in the above equation is small.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
*
-* Q' * [ A B ] * Q = [ C1 B1 ]
-* [ 0 C ] [ 0 A1 ]
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (2)
+*> NINFO(J) is the number of examples where INFO=J occurred.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
*
-* where C1 is similar to C and A1 is similar to A. Both A and C are
-* assumed to be in standard form (equal diagonal entries and
-* offdiagonal with differing signs) and A1 and C1 are returned with the
-* same properties.
+* Authors
+* =======
*
-* The test code verifies these last last assertions, as well as that
-* the residual in the above equation is small.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
+*> \ingroup double_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE DGET34( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER array, dimension (2)
-* NINFO(J) is the number of examples where INFO=J occurred.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX
+ DOUBLE PRECISION RMAX
+* ..
+* .. Array Arguments ..
+ INTEGER NINFO( 2 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget35.f b/TESTING/EIG/dget35.f
index f974e313..d9511420 100644
--- a/TESTING/EIG/dget35.f
+++ b/TESTING/EIG/dget35.f
@@ -1,45 +1,94 @@
- SUBROUTINE DGET35( RMAX, LMAX, NINFO, KNT )
+*> \brief \b DGET35
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NINFO
- DOUBLE PRECISION RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGET35( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NINFO
+* DOUBLE PRECISION RMAX
+* ..
+*
* Purpose
* =======
*
-* DGET35 tests DTRSYL, a routine for solving the Sylvester matrix
-* equation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET35 tests DTRSYL, a routine for solving the Sylvester matrix
+*> equation
+*>
+*> op(A)*X + ISGN*X*op(B) = scale*C,
+*>
+*> A and B are assumed to be in Schur canonical form, op() represents an
+*> optional transpose, and ISGN can be -1 or +1. Scale is an output
+*> less than or equal to 1, chosen to avoid overflow in X.
+*>
+*> The test code verifies that the following residual is order 1:
+*>
+*> norm(op(A)*X + ISGN*X*op(B) - scale*C) /
+*> (EPS*max(norm(A),norm(B))*norm(X))
+*>
+*>\endverbatim
*
-* op(A)*X + ISGN*X*op(B) = scale*C,
+* Arguments
+* =========
*
-* A and B are assumed to be in Schur canonical form, op() represents an
-* optional transpose, and ISGN can be -1 or +1. Scale is an output
-* less than or equal to 1, chosen to avoid overflow in X.
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples where INFO is nonzero.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
*
-* The test code verifies that the following residual is order 1:
+* Authors
+* =======
*
-* norm(op(A)*X + ISGN*X*op(B) - scale*C) /
-* (EPS*max(norm(A),norm(B))*norm(X))
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
+*> \ingroup double_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE DGET35( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER
-* Number of examples where INFO is nonzero.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NINFO
+ DOUBLE PRECISION RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget36.f b/TESTING/EIG/dget36.f
index fabbf645..b132fa3d 100644
--- a/TESTING/EIG/dget36.f
+++ b/TESTING/EIG/dget36.f
@@ -1,52 +1,107 @@
- SUBROUTINE DGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*> \brief \b DGET36
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NIN
- DOUBLE PRECISION RMAX
-* ..
-* .. Array Arguments ..
- INTEGER NINFO( 3 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NIN
+* DOUBLE PRECISION RMAX
+* ..
+* .. Array Arguments ..
+* INTEGER NINFO( 3 )
+* ..
+*
* Purpose
* =======
*
-* DGET36 tests DTREXC, a routine for moving blocks (either 1 by 1 or
-* 2 by 2) on the diagonal of a matrix in real Schur form. Thus, DLAEXC
-* computes an orthogonal matrix Q such that
-*
-* Q' * T1 * Q = T2
-*
-* and where one of the diagonal blocks of T1 (the one at row IFST) has
-* been moved to position ILST.
-*
-* The test code verifies that the residual Q'*T1*Q-T2 is small, that T2
-* is in Schur form, and that the final position of the IFST block is
-* ILST (within +-1).
-*
-* The test matrices are read from a file with logical unit number NIN.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET36 tests DTREXC, a routine for moving blocks (either 1 by 1 or
+*> 2 by 2) on the diagonal of a matrix in real Schur form. Thus, DLAEXC
+*> computes an orthogonal matrix Q such that
+*>
+*> Q' * T1 * Q = T2
+*>
+*> and where one of the diagonal blocks of T1 (the one at row IFST) has
+*> been moved to position ILST.
+*>
+*> The test code verifies that the residual Q'*T1*Q-T2 is small, that T2
+*> is in Schur form, and that the final position of the IFST block is
+*> ILST (within +-1).
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(J) is the number of examples where INFO=J.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+*> \date November 2011
*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(J) is the number of examples where INFO=J.
+*> \ingroup double_eig
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* =====================================================================
+ SUBROUTINE DGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* NIN (input) INTEGER
-* Input logical unit number.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NIN
+ DOUBLE PRECISION RMAX
+* ..
+* .. Array Arguments ..
+ INTEGER NINFO( 3 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget37.f b/TESTING/EIG/dget37.f
index 5b8f8dab..167d3212 100644
--- a/TESTING/EIG/dget37.f
+++ b/TESTING/EIG/dget37.f
@@ -1,8 +1,101 @@
+*> \brief \b DGET37
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET37( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, NIN
+* ..
+* .. Array Arguments ..
+* INTEGER LMAX( 3 ), NINFO( 3 )
+* DOUBLE PRECISION RMAX( 3 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET37 tests DTRSNA, a routine for estimating condition numbers of
+*> eigenvalues and/or right eigenvectors of a matrix.
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION array, dimension (3)
+*> Value of the largest test ratio.
+*> RMAX(1) = largest ratio comparing different calls to DTRSNA
+*> RMAX(2) = largest error in reciprocal condition
+*> numbers taking their conditioning into account
+*> RMAX(3) = largest error in reciprocal condition
+*> numbers not taking their conditioning into
+*> account (may be larger than RMAX(2))
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER array, dimension (3)
+*> LMAX(i) is example number where largest test ratio
+*> RMAX(i) is achieved. Also:
+*> If DGEHRD returns INFO nonzero on example i, LMAX(1)=i
+*> If DHSEQR returns INFO nonzero on example i, LMAX(2)=i
+*> If DTRSNA returns INFO nonzero on example i, LMAX(3)=i
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = No. of times DGEHRD returned INFO nonzero
+*> NINFO(2) = No. of times DHSEQR returned INFO nonzero
+*> NINFO(3) = No. of times DTRSNA returned INFO nonzero
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGET37( RMAX, LMAX, NINFO, KNT, NIN )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KNT, NIN
@@ -12,44 +105,6 @@
DOUBLE PRECISION RMAX( 3 )
* ..
*
-* Purpose
-* =======
-*
-* DGET37 tests DTRSNA, a routine for estimating condition numbers of
-* eigenvalues and/or right eigenvectors of a matrix.
-*
-* The test matrices are read from a file with logical unit number NIN.
-*
-* Arguments
-* ==========
-*
-* RMAX (output) DOUBLE PRECISION array, dimension (3)
-* Value of the largest test ratio.
-* RMAX(1) = largest ratio comparing different calls to DTRSNA
-* RMAX(2) = largest error in reciprocal condition
-* numbers taking their conditioning into account
-* RMAX(3) = largest error in reciprocal condition
-* numbers not taking their conditioning into
-* account (may be larger than RMAX(2))
-*
-* LMAX (output) INTEGER array, dimension (3)
-* LMAX(i) is example number where largest test ratio
-* RMAX(i) is achieved. Also:
-* If DGEHRD returns INFO nonzero on example i, LMAX(1)=i
-* If DHSEQR returns INFO nonzero on example i, LMAX(2)=i
-* If DTRSNA returns INFO nonzero on example i, LMAX(3)=i
-*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = No. of times DGEHRD returned INFO nonzero
-* NINFO(2) = No. of times DHSEQR returned INFO nonzero
-* NINFO(3) = No. of times DTRSNA returned INFO nonzero
-*
-* KNT (output) INTEGER
-* Total number of examples tested.
-*
-* NIN (input) INTEGER
-* Input logical unit number
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dget38.f b/TESTING/EIG/dget38.f
index a2568908..f098c0c6 100644
--- a/TESTING/EIG/dget38.f
+++ b/TESTING/EIG/dget38.f
@@ -1,8 +1,102 @@
+*> \brief \b DGET38
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET38( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, NIN
+* ..
+* .. Array Arguments ..
+* INTEGER LMAX( 3 ), NINFO( 3 )
+* DOUBLE PRECISION RMAX( 3 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET38 tests DTRSEN, a routine for estimating condition numbers of a
+*> cluster of eigenvalues and/or its associated right invariant subspace
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION array, dimension (3)
+*> Values of the largest test ratios.
+*> RMAX(1) = largest residuals from DHST01 or comparing
+*> different calls to DTRSEN
+*> RMAX(2) = largest error in reciprocal condition
+*> numbers taking their conditioning into account
+*> RMAX(3) = largest error in reciprocal condition
+*> numbers not taking their conditioning into
+*> account (may be larger than RMAX(2))
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER array, dimension (3)
+*> LMAX(i) is example number where largest test ratio
+*> RMAX(i) is achieved. Also:
+*> If DGEHRD returns INFO nonzero on example i, LMAX(1)=i
+*> If DHSEQR returns INFO nonzero on example i, LMAX(2)=i
+*> If DTRSEN returns INFO nonzero on example i, LMAX(3)=i
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = No. of times DGEHRD returned INFO nonzero
+*> NINFO(2) = No. of times DHSEQR returned INFO nonzero
+*> NINFO(3) = No. of times DTRSEN returned INFO nonzero
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGET38( RMAX, LMAX, NINFO, KNT, NIN )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KNT, NIN
@@ -12,45 +106,6 @@
DOUBLE PRECISION RMAX( 3 )
* ..
*
-* Purpose
-* =======
-*
-* DGET38 tests DTRSEN, a routine for estimating condition numbers of a
-* cluster of eigenvalues and/or its associated right invariant subspace
-*
-* The test matrices are read from a file with logical unit number NIN.
-*
-* Arguments
-* ==========
-*
-* RMAX (output) DOUBLE PRECISION array, dimension (3)
-* Values of the largest test ratios.
-* RMAX(1) = largest residuals from DHST01 or comparing
-* different calls to DTRSEN
-* RMAX(2) = largest error in reciprocal condition
-* numbers taking their conditioning into account
-* RMAX(3) = largest error in reciprocal condition
-* numbers not taking their conditioning into
-* account (may be larger than RMAX(2))
-*
-* LMAX (output) INTEGER array, dimension (3)
-* LMAX(i) is example number where largest test ratio
-* RMAX(i) is achieved. Also:
-* If DGEHRD returns INFO nonzero on example i, LMAX(1)=i
-* If DHSEQR returns INFO nonzero on example i, LMAX(2)=i
-* If DTRSEN returns INFO nonzero on example i, LMAX(3)=i
-*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = No. of times DGEHRD returned INFO nonzero
-* NINFO(2) = No. of times DHSEQR returned INFO nonzero
-* NINFO(3) = No. of times DTRSEN returned INFO nonzero
-*
-* KNT (output) INTEGER
-* Total number of examples tested.
-*
-* NIN (input) INTEGER
-* Input logical unit number.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dget39.f b/TESTING/EIG/dget39.f
index 327739bc..938638fd 100644
--- a/TESTING/EIG/dget39.f
+++ b/TESTING/EIG/dget39.f
@@ -1,70 +1,119 @@
- SUBROUTINE DGET39( RMAX, LMAX, NINFO, KNT )
+*> \brief \b DGET39
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NINFO
- DOUBLE PRECISION RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET39( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NINFO
+* DOUBLE PRECISION RMAX
+* ..
+*
* Purpose
* =======
*
-* DGET39 tests DLAQTR, a routine for solving the real or
-* special complex quasi upper triangular system
-*
-* op(T)*p = scale*c,
-* or
-* op(T + iB)*(p+iq) = scale*(c+id),
-*
-* in real arithmetic. T is upper quasi-triangular.
-* If it is complex, then the first diagonal block of T must be
-* 1 by 1, B has the special structure
-*
-* B = [ b(1) b(2) ... b(n) ]
-* [ w ]
-* [ w ]
-* [ . ]
-* [ w ]
-*
-* op(A) = A or A', where A' denotes the conjugate transpose of
-* the matrix A.
-*
-* On input, X = [ c ]. On output, X = [ p ].
-* [ d ] [ q ]
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET39 tests DLAQTR, a routine for solving the real or
+*> special complex quasi upper triangular system
+*>
+*> op(T)*p = scale*c,
+*> or
+*> op(T + iB)*(p+iq) = scale*(c+id),
+*>
+*> in real arithmetic. T is upper quasi-triangular.
+*> If it is complex, then the first diagonal block of T must be
+*> 1 by 1, B has the special structure
+*>
+*> B = [ b(1) b(2) ... b(n) ]
+*> [ w ]
+*> [ w ]
+*> [ . ]
+*> [ w ]
+*>
+*> op(A) = A or A', where A' denotes the conjugate transpose of
+*> the matrix A.
+*>
+*> On input, X = [ c ]. On output, X = [ p ].
+*> [ d ] [ q ]
+*>
+*> Scale is an output less than or equal to 1, chosen to avoid
+*> overflow in X.
+*> This subroutine is specially designed for the condition number
+*> estimation in the eigenproblem routine DTRSNA.
+*>
+*> The test code verifies that the following residual is order 1:
+*>
+*> ||(T+i*B)*(x1+i*x2) - scale*(d1+i*d2)||
+*> -----------------------------------------
+*> max(ulp*(||T||+||B||)*(||x1||+||x2||),
+*> (||T||+||B||)*smlnum/ulp,
+*> smlnum)
+*>
+*> (The (||T||+||B||)*smlnum/ulp term accounts for possible
+*> (gradual or nongradual) underflow in x1 and x2.)
+*>
+*>\endverbatim
*
-* Scale is an output less than or equal to 1, chosen to avoid
-* overflow in X.
-* This subroutine is specially designed for the condition number
-* estimation in the eigenproblem routine DTRSNA.
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples where INFO is nonzero.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* The test code verifies that the following residual is order 1:
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ||(T+i*B)*(x1+i*x2) - scale*(d1+i*d2)||
-* -----------------------------------------
-* max(ulp*(||T||+||B||)*(||x1||+||x2||),
-* (||T||+||B||)*smlnum/ulp,
-* smlnum)
+*> \date November 2011
*
-* (The (||T||+||B||)*smlnum/ulp term accounts for possible
-* (gradual or nongradual) underflow in x1 and x2.)
+*> \ingroup double_eig
*
-* Arguments
-* ==========
-*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
-*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE DGET39( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER
-* Number of examples where INFO is nonzero.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NINFO
+ DOUBLE PRECISION RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget51.f b/TESTING/EIG/dget51.f
index 75d1ac1d..42aea9f6 100644
--- a/TESTING/EIG/dget51.f
+++ b/TESTING/EIG/dget51.f
@@ -1,91 +1,169 @@
- SUBROUTINE DGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
- $ RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER ITYPE, LDA, LDB, LDU, LDV, N
- DOUBLE PRECISION RESULT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), U( LDU, * ),
- $ V( LDV, * ), WORK( * )
-* ..
-*
+*> \brief \b DGET51
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
+* RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER ITYPE, LDA, LDB, LDU, LDV, N
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGET51 generally checks a decomposition of the form
-*
-* A = U B V'
-*
-* where ' means transpose and U and V are orthogonal.
-*
-* Specifically, if ITYPE=1
-*
-* RESULT = | A - U B V' | / ( |A| n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT = | A - B | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT = | I - UU' | / ( n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET51 generally checks a decomposition of the form
+*>
+*> A = U B V'
+*>
+*> where ' means transpose and U and V are orthogonal.
+*>
+*> Specifically, if ITYPE=1
+*>
+*> RESULT = | A - U B V' | / ( |A| n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT = | A - B | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT = | I - UU' | / ( n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* =1: RESULT = | A - U B V' | / ( |A| n ulp )
-* =2: RESULT = | A - B | / ( |A| n ulp )
-* =3: RESULT = | I - UU' | / ( n ulp )
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, DGET51 does nothing.
-* It must be at least zero.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, N)
-* The original (unfactored) matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* The factored matrix.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> =1: RESULT = | A - U B V' | / ( |A| n ulp )
+*> =2: RESULT = | A - B | / ( |A| n ulp )
+*> =3: RESULT = | I - UU' | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, DGET51 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The original (unfactored) matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> The factored matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> Not referenced if ITYPE=2
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> Not referenced if ITYPE=2
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N**2)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> The values computed by the test specified by ITYPE. The
+*> value is currently limited to 1/ulp, to avoid overflow.
+*> Errors are flagged by RESULT=10/ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* U (input) DOUBLE PRECISION array, dimension (LDU, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-* Not referenced if ITYPE=2
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
+*> \date November 2011
*
-* V (input) DOUBLE PRECISION array, dimension (LDV, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-* Not referenced if ITYPE=2
+*> \ingroup double_eig
*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
+* =====================================================================
+ SUBROUTINE DGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
+ $ RESULT )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N**2)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION
-* The values computed by the test specified by ITYPE. The
-* value is currently limited to 1/ulp, to avoid overflow.
-* Errors are flagged by RESULT=10/ulp.
+* .. Scalar Arguments ..
+ INTEGER ITYPE, LDA, LDB, LDU, LDV, N
+ DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), U( LDU, * ),
+ $ V( LDV, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget52.f b/TESTING/EIG/dget52.f
index 13f65357..91314e4a 100644
--- a/TESTING/EIG/dget52.f
+++ b/TESTING/EIG/dget52.f
@@ -1,9 +1,210 @@
+*> \brief \b DGET52
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHAR,
+* ALPHAI, BETA, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* LOGICAL LEFT
+* INTEGER LDA, LDB, LDE, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), E( LDE, * ),
+* $ RESULT( 2 ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET52 does an eigenvector check for the generalized eigenvalue
+*> problem.
+*>
+*> The basic test for right eigenvectors is:
+*>
+*> | b(j) A E(j) - a(j) B E(j) |
+*> RESULT(1) = max -------------------------------
+*> j n ulp max( |b(j) A|, |a(j) B| )
+*>
+*> using the 1-norm. Here, a(j)/b(j) = w is the j-th generalized
+*> eigenvalue of A - w B, or, equivalently, b(j)/a(j) = m is the j-th
+*> generalized eigenvalue of m A - B.
+*>
+*> For real eigenvalues, the test is straightforward. For complex
+*> eigenvalues, E(j) and a(j) are complex, represented by
+*> Er(j) + i*Ei(j) and ar(j) + i*ai(j), resp., so the test for that
+*> eigenvector becomes
+*>
+*> max( |Wr|, |Wi| )
+*> --------------------------------------------
+*> n ulp max( |b(j) A|, (|ar(j)|+|ai(j)|) |B| )
+*>
+*> where
+*>
+*> Wr = b(j) A Er(j) - ar(j) B Er(j) + ai(j) B Ei(j)
+*>
+*> Wi = b(j) A Ei(j) - ai(j) B Er(j) - ar(j) B Ei(j)
+*>
+*> T T _
+*> For left eigenvectors, A , B , a, and b are used.
+*>
+*> DGET52 also tests the normalization of E. Each eigenvector is
+*> supposed to be normalized so that the maximum "absolute value"
+*> of its elements is 1, where in this case, "absolute value"
+*> of a complex value x is |Re(x)| + |Im(x)| ; let us call this
+*> maximum "absolute value" norm of a vector v M(v).
+*> if a(j)=b(j)=0, then the eigenvector is set to be the jth coordinate
+*> vector. The normalization test is:
+*>
+*> RESULT(2) = max | M(v(j)) - 1 | / ( n ulp )
+*> eigenvectors v(j)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LEFT
+*> \verbatim
+*> LEFT is LOGICAL
+*> =.TRUE.: The eigenvectors in the columns of E are assumed
+*> to be *left* eigenvectors.
+*> =.FALSE.: The eigenvectors in the columns of E are assumed
+*> to be *right* eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrices. If it is zero, DGET52 does
+*> nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> The matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (LDE, N)
+*> The matrix of eigenvectors. It must be O( 1 ). Complex
+*> eigenvalues and eigenvectors always come in pairs, the
+*> eigenvalue and its conjugate being stored in adjacent
+*> elements of ALPHAR, ALPHAI, and BETA. Thus, if a(j)/b(j)
+*> and a(j+1)/b(j+1) are a complex conjugate pair of
+*> generalized eigenvalues, then E(,j) contains the real part
+*> of the eigenvector and E(,j+1) contains the imaginary part.
+*> Note that whether E(,j) is a real eigenvector or part of a
+*> complex one is specified by whether ALPHAI(j) is zero or not.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of E. It must be at least 1 and at
+*> least N.
+*> \endverbatim
+*>
+*> \param[in] ALPHAR
+*> \verbatim
+*> ALPHAR is DOUBLE PRECISION array, dimension (N)
+*> The real parts of the values a(j) as described above, which,
+*> along with b(j), define the generalized eigenvalues.
+*> Complex eigenvalues always come in complex conjugate pairs
+*> a(j)/b(j) and a(j+1)/b(j+1), which are stored in adjacent
+*> elements in ALPHAR, ALPHAI, and BETA. Thus, if the j-th
+*> and (j+1)-st eigenvalues form a pair, ALPHAR(j+1)/BETA(j+1)
+*> is assumed to be equal to ALPHAR(j)/BETA(j).
+*> \endverbatim
+*>
+*> \param[in] ALPHAI
+*> \verbatim
+*> ALPHAI is DOUBLE PRECISION array, dimension (N)
+*> The imaginary parts of the values a(j) as described above,
+*> which, along with b(j), define the generalized eigenvalues.
+*> If ALPHAI(j)=0, then the eigenvalue is real, otherwise it
+*> is part of a complex conjugate pair. Complex eigenvalues
+*> always come in complex conjugate pairs a(j)/b(j) and
+*> a(j+1)/b(j+1), which are stored in adjacent elements in
+*> ALPHAR, ALPHAI, and BETA. Thus, if the j-th and (j+1)-st
+*> eigenvalues form a pair, ALPHAI(j+1)/BETA(j+1) is assumed to
+*> be equal to -ALPHAI(j)/BETA(j). Also, nonzero values in
+*> ALPHAI are assumed to always come in adjacent pairs.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> The values b(j) as described above, which, along with a(j),
+*> define the generalized eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N**2+N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the test described above. If A E or
+*> B E is likely to overflow, then RESULT(1:2) is set to
+*> 10 / ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGET52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHAR,
$ ALPHAI, BETA, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LEFT
@@ -15,125 +216,6 @@
$ RESULT( 2 ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGET52 does an eigenvector check for the generalized eigenvalue
-* problem.
-*
-* The basic test for right eigenvectors is:
-*
-* | b(j) A E(j) - a(j) B E(j) |
-* RESULT(1) = max -------------------------------
-* j n ulp max( |b(j) A|, |a(j) B| )
-*
-* using the 1-norm. Here, a(j)/b(j) = w is the j-th generalized
-* eigenvalue of A - w B, or, equivalently, b(j)/a(j) = m is the j-th
-* generalized eigenvalue of m A - B.
-*
-* For real eigenvalues, the test is straightforward. For complex
-* eigenvalues, E(j) and a(j) are complex, represented by
-* Er(j) + i*Ei(j) and ar(j) + i*ai(j), resp., so the test for that
-* eigenvector becomes
-*
-* max( |Wr|, |Wi| )
-* --------------------------------------------
-* n ulp max( |b(j) A|, (|ar(j)|+|ai(j)|) |B| )
-*
-* where
-*
-* Wr = b(j) A Er(j) - ar(j) B Er(j) + ai(j) B Ei(j)
-*
-* Wi = b(j) A Ei(j) - ai(j) B Er(j) - ar(j) B Ei(j)
-*
-* T T _
-* For left eigenvectors, A , B , a, and b are used.
-*
-* DGET52 also tests the normalization of E. Each eigenvector is
-* supposed to be normalized so that the maximum "absolute value"
-* of its elements is 1, where in this case, "absolute value"
-* of a complex value x is |Re(x)| + |Im(x)| ; let us call this
-* maximum "absolute value" norm of a vector v M(v).
-* if a(j)=b(j)=0, then the eigenvector is set to be the jth coordinate
-* vector. The normalization test is:
-*
-* RESULT(2) = max | M(v(j)) - 1 | / ( n ulp )
-* eigenvectors v(j)
-*
-* Arguments
-* =========
-*
-* LEFT (input) LOGICAL
-* =.TRUE.: The eigenvectors in the columns of E are assumed
-* to be *left* eigenvectors.
-* =.FALSE.: The eigenvectors in the columns of E are assumed
-* to be *right* eigenvectors.
-*
-* N (input) INTEGER
-* The size of the matrices. If it is zero, DGET52 does
-* nothing. It must be at least zero.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, N)
-* The matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* The matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* E (input) DOUBLE PRECISION array, dimension (LDE, N)
-* The matrix of eigenvectors. It must be O( 1 ). Complex
-* eigenvalues and eigenvectors always come in pairs, the
-* eigenvalue and its conjugate being stored in adjacent
-* elements of ALPHAR, ALPHAI, and BETA. Thus, if a(j)/b(j)
-* and a(j+1)/b(j+1) are a complex conjugate pair of
-* generalized eigenvalues, then E(,j) contains the real part
-* of the eigenvector and E(,j+1) contains the imaginary part.
-* Note that whether E(,j) is a real eigenvector or part of a
-* complex one is specified by whether ALPHAI(j) is zero or not.
-*
-* LDE (input) INTEGER
-* The leading dimension of E. It must be at least 1 and at
-* least N.
-*
-* ALPHAR (input) DOUBLE PRECISION array, dimension (N)
-* The real parts of the values a(j) as described above, which,
-* along with b(j), define the generalized eigenvalues.
-* Complex eigenvalues always come in complex conjugate pairs
-* a(j)/b(j) and a(j+1)/b(j+1), which are stored in adjacent
-* elements in ALPHAR, ALPHAI, and BETA. Thus, if the j-th
-* and (j+1)-st eigenvalues form a pair, ALPHAR(j+1)/BETA(j+1)
-* is assumed to be equal to ALPHAR(j)/BETA(j).
-*
-* ALPHAI (input) DOUBLE PRECISION array, dimension (N)
-* The imaginary parts of the values a(j) as described above,
-* which, along with b(j), define the generalized eigenvalues.
-* If ALPHAI(j)=0, then the eigenvalue is real, otherwise it
-* is part of a complex conjugate pair. Complex eigenvalues
-* always come in complex conjugate pairs a(j)/b(j) and
-* a(j+1)/b(j+1), which are stored in adjacent elements in
-* ALPHAR, ALPHAI, and BETA. Thus, if the j-th and (j+1)-st
-* eigenvalues form a pair, ALPHAI(j+1)/BETA(j+1) is assumed to
-* be equal to -ALPHAI(j)/BETA(j). Also, nonzero values in
-* ALPHAI are assumed to always come in adjacent pairs.
-*
-* BETA (input) DOUBLE PRECISION array, dimension (N)
-* The values b(j) as described above, which, along with a(j),
-* define the generalized eigenvalues.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N**2+N)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the test described above. If A E or
-* B E is likely to overflow, then RESULT(1:2) is set to
-* 10 / ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dget53.f b/TESTING/EIG/dget53.f
index 6a9a8f0b..55482a1d 100644
--- a/TESTING/EIG/dget53.f
+++ b/TESTING/EIG/dget53.f
@@ -1,78 +1,145 @@
- SUBROUTINE DGET53( A, LDA, B, LDB, SCALE, WR, WI, RESULT, INFO )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB
- DOUBLE PRECISION RESULT, SCALE, WI, WR
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DGET53
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET53( A, LDA, B, LDB, SCALE, WR, WI, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB
+* DOUBLE PRECISION RESULT, SCALE, WI, WR
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DGET53 checks the generalized eigenvalues computed by DLAG2.
-*
-* The basic test for an eigenvalue is:
-*
-* | det( s A - w B ) |
-* RESULT = ---------------------------------------------------
-* ulp max( s norm(A), |w| norm(B) )*norm( s A - w B )
-*
-* Two "safety checks" are performed:
-*
-* (1) ulp*max( s*norm(A), |w|*norm(B) ) must be at least
-* safe_minimum. This insures that the test performed is
-* not essentially det(0*A + 0*B)=0.
-*
-* (2) s*norm(A) + |w|*norm(B) must be less than 1/safe_minimum.
-* This insures that s*A - w*B will not overflow.
-*
-* If these tests are not passed, then s and w are scaled and
-* tested anyway, if this is possible.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET53 checks the generalized eigenvalues computed by DLAG2.
+*>
+*> The basic test for an eigenvalue is:
+*>
+*> | det( s A - w B ) |
+*> RESULT = ---------------------------------------------------
+*> ulp max( s norm(A), |w| norm(B) )*norm( s A - w B )
+*>
+*> Two "safety checks" are performed:
+*>
+*> (1) ulp*max( s*norm(A), |w|*norm(B) ) must be at least
+*> safe_minimum. This insures that the test performed is
+*> not essentially det(0*A + 0*B)=0.
+*>
+*> (2) s*norm(A) + |w|*norm(B) must be less than 1/safe_minimum.
+*> This insures that s*A - w*B will not overflow.
+*>
+*> If these tests are not passed, then s and w are scaled and
+*> tested anyway, if this is possible.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) DOUBLE PRECISION array, dimension (LDA, 2)
-* The 2x2 matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 2.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* The 2x2 upper-triangular matrix B.
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, 2)
+*> The 2x2 matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 2.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> The 2x2 upper-triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 2.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The "scale factor" s in the formula s A - w B . It is
+*> assumed to be non-negative.
+*> \endverbatim
+*>
+*> \param[in] WR
+*> \verbatim
+*> WR is DOUBLE PRECISION
+*> The real part of the eigenvalue w in the formula
+*> s A - w B .
+*> \endverbatim
+*>
+*> \param[in] WI
+*> \verbatim
+*> WI is DOUBLE PRECISION
+*> The imaginary part of the eigenvalue w in the formula
+*> s A - w B .
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> If INFO is 2 or less, the value computed by the test
+*> described above.
+*> If INFO=3, this will just be 1/ulp.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: The input data pass the "safety checks".
+*> =1: s*norm(A) + |w|*norm(B) > 1/safe_minimum.
+*> =2: ulp*max( s*norm(A), |w|*norm(B) ) < safe_minimum
+*> =3: same as INFO=2, but s and w could not be scaled so
+*> as to compute the test.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 2.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SCALE (input) DOUBLE PRECISION
-* The "scale factor" s in the formula s A - w B . It is
-* assumed to be non-negative.
+*> \date November 2011
*
-* WR (input) DOUBLE PRECISION
-* The real part of the eigenvalue w in the formula
-* s A - w B .
+*> \ingroup double_eig
*
-* WI (input) DOUBLE PRECISION
-* The imaginary part of the eigenvalue w in the formula
-* s A - w B .
+* =====================================================================
+ SUBROUTINE DGET53( A, LDA, B, LDB, SCALE, WR, WI, RESULT, INFO )
*
-* RESULT (output) DOUBLE PRECISION
-* If INFO is 2 or less, the value computed by the test
-* described above.
-* If INFO=3, this will just be 1/ulp.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* =0: The input data pass the "safety checks".
-* =1: s*norm(A) + |w|*norm(B) > 1/safe_minimum.
-* =2: ulp*max( s*norm(A), |w|*norm(B) ) < safe_minimum
-* =3: same as INFO=2, but s and w could not be scaled so
-* as to compute the test.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB
+ DOUBLE PRECISION RESULT, SCALE, WI, WR
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dget54.f b/TESTING/EIG/dget54.f
index c85e5769..cb34512d 100644
--- a/TESTING/EIG/dget54.f
+++ b/TESTING/EIG/dget54.f
@@ -1,9 +1,167 @@
+*> \brief \b DGET54
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
+* LDV, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( LDS, * ),
+* $ T( LDT, * ), U( LDU, * ), V( LDV, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET54 checks a generalized decomposition of the form
+*>
+*> A = U*S*V' and B = U*T* V'
+*>
+*> where ' means transpose and U and V are orthogonal.
+*>
+*> Specifically,
+*>
+*> RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, DGET54 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The original (unfactored) matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> The original (unfactored) matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (LDS, N)
+*> The factored matrix S.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of S. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDT, N)
+*> The factored matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of T. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N**2)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> The value RESULT, It is currently limited to 1/ulp, to
+*> avoid overflow. Errors are flagged by RESULT=10/ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGET54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
$ LDV, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
@@ -15,76 +173,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DGET54 checks a generalized decomposition of the form
-*
-* A = U*S*V' and B = U*T* V'
-*
-* where ' means transpose and U and V are orthogonal.
-*
-* Specifically,
-*
-* RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp )
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, DGET54 does nothing.
-* It must be at least zero.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, N)
-* The original (unfactored) matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* The original (unfactored) matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* S (input) DOUBLE PRECISION array, dimension (LDS, N)
-* The factored matrix S.
-*
-* LDS (input) INTEGER
-* The leading dimension of S. It must be at least 1
-* and at least N.
-*
-* T (input) DOUBLE PRECISION array, dimension (LDT, N)
-* The factored matrix T.
-*
-* LDT (input) INTEGER
-* The leading dimension of T. It must be at least 1
-* and at least N.
-*
-* U (input) DOUBLE PRECISION array, dimension (LDU, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) DOUBLE PRECISION array, dimension (LDV, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N**2)
-*
-* RESULT (output) DOUBLE PRECISION
-* The value RESULT, It is currently limited to 1/ulp, to
-* avoid overflow. Errors are flagged by RESULT=10/ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dglmts.f b/TESTING/EIG/dglmts.f
index 52830e8a..42fcee9a 100644
--- a/TESTING/EIG/dglmts.f
+++ b/TESTING/EIG/dglmts.f
@@ -1,73 +1,163 @@
- SUBROUTINE DGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF, X, U,
- $ WORK, LWORK, RWORK, RESULT )
+*> \brief \b DGLMTS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, N, P
- DOUBLE PRECISION RESULT
-* ..
-* .. Array Arguments ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF, X, U,
+* WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, P
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+*
* Purpose
* =======
*
-* DGLMTS tests DGGGLM - a subroutine for solving the generalized
-* linear model problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGLMTS tests DGGGLM - a subroutine for solving the generalized
+*> linear model problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,M)
-* The N-by-M matrix A.
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (LDA,M)
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF. LDA >= max(M,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,P)
-* The N-by-P matrix A.
-*
-* BF (workspace) DOUBLE PRECISION array, dimension (LDB,P)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF. LDB >= max(P,N).
-*
-* D (input) DOUBLE PRECISION array, dimension( N )
-* On input, the left hand side of the GLM.
-*
-* DF (workspace) DOUBLE PRECISION array, dimension( N )
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,M)
+*> The N-by-M matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF. LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,P)
+*> The N-by-P matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (LDB,P)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF. LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension( N )
+*> On input, the left hand side of the GLM.
+*> \endverbatim
+*>
+*> \param[out] DF
+*> \verbatim
+*> DF is DOUBLE PRECISION array, dimension( N )
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension( M )
+*> solution vector X in the GLM problem.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension( P )
+*> solution vector U in the GLM problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> The test ratio:
+*> norm( d - A*x - B*u )
+*> RESULT = -----------------------------------------
+*> (norm(A)+norm(B))*(norm(x)+norm(u))*EPS
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (output) DOUBLE PRECISION array, dimension( M )
-* solution vector X in the GLM problem.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (output) DOUBLE PRECISION array, dimension( P )
-* solution vector U in the GLM problem.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_eig
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF, X, U,
+ $ WORK, LWORK, RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION
-* The test ratio:
-* norm( d - A*x - B*u )
-* RESULT = -----------------------------------------
-* (norm(A)+norm(B))*(norm(x)+norm(u))*EPS
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, N, P
+ DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
*
* ====================================================================
*
diff --git a/TESTING/EIG/dgqrts.f b/TESTING/EIG/dgqrts.f
index da07cb48..99ac48b2 100644
--- a/TESTING/EIG/dgqrts.f
+++ b/TESTING/EIG/dgqrts.f
@@ -1,9 +1,187 @@
+*> \brief \b DGQRTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGQRTS( N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
+* BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), BWK( LDB, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( 4 ), RWORK( * ),
+* $ T( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( LWORK ), Z( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGQRTS tests DGGQRF, which computes the GQR factorization of an
+*> N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,M)
+*> The N-by-M matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by DGGQRF, see SGGQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-M orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (LDA,MAX(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, R and Q.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGGQRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,P)
+*> On entry, the N-by-P matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (LDB,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by DGGQRF, see SGGQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDB,P)
+*> The P-by-P orthogonal matrix Z.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDB,max(P,N))
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is DOUBLE PRECISION array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, Z and T.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is DOUBLE PRECISION array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGGRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK, LWORK >= max(N,M,P)**2.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(N,M,P))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - Q'*Q ) / ( M*ULP )
+*> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGQRTS( N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
$ BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, N, P
@@ -16,80 +194,6 @@
$ WORK( LWORK ), Z( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DGQRTS tests DGGQRF, which computes the GQR factorization of an
-* N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,M)
-* The N-by-M matrix A.
-*
-* AF (output) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the GQR factorization of A and B, as returned
-* by DGGQRF, see SGGQRF for further details.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-M orthogonal matrix Q.
-*
-* R (workspace) DOUBLE PRECISION array, dimension (LDA,MAX(M,N))
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, R and Q.
-* LDA >= max(M,N).
-*
-* TAUA (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGGQRF.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,P)
-* On entry, the N-by-P matrix A.
-*
-* BF (output) DOUBLE PRECISION array, dimension (LDB,N)
-* Details of the GQR factorization of A and B, as returned
-* by DGGQRF, see SGGQRF for further details.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDB,P)
-* The P-by-P orthogonal matrix Z.
-*
-* T (workspace) DOUBLE PRECISION array, dimension (LDB,max(P,N))
-*
-* BWK (workspace) DOUBLE PRECISION array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, Z and T.
-* LDB >= max(P,N).
-*
-* TAUB (output) DOUBLE PRECISION array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGGRQF.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK, LWORK >= max(N,M,P)**2.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(N,M,P))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - Q'*Q ) / ( M*ULP )
-* RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dgrqts.f b/TESTING/EIG/dgrqts.f
index b9917f0d..336c709a 100644
--- a/TESTING/EIG/dgrqts.f
+++ b/TESTING/EIG/dgrqts.f
@@ -1,9 +1,187 @@
+*> \brief \b DGRQTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGRQTS( M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
+* BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), BWK( LDB, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( 4 ), RWORK( * ),
+* $ T( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( LWORK ), Z( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGRQTS tests DGGRQF, which computes the GRQ factorization of an
+*> M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the GRQ factorization of A and B, as returned
+*> by DGGRQF, see SGGRQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> The N-by-N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (LDA,MAX(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, R and Q.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGGQRC.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> On entry, the P-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (LDB,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by DGGRQF, see SGGRQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDB,P)
+*> The P-by-P orthogonal matrix Z.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is DOUBLE PRECISION array, dimension (LDB,max(P,N))
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is DOUBLE PRECISION array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, Z and T.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is DOUBLE PRECISION array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGGRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK, LWORK >= max(M,P,N)**2.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - Q'*Q ) / ( N*ULP )
+*> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGRQTS( M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
$ BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, N, P
@@ -16,80 +194,6 @@
$ WORK( LWORK ), Z( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DGRQTS tests DGGRQF, which computes the GRQ factorization of an
-* M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* AF (output) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the GRQ factorization of A and B, as returned
-* by DGGRQF, see SGGRQF for further details.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The N-by-N orthogonal matrix Q.
-*
-* R (workspace) DOUBLE PRECISION array, dimension (LDA,MAX(M,N))
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, R and Q.
-* LDA >= max(M,N).
-*
-* TAUA (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGGQRC.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,N)
-* On entry, the P-by-N matrix A.
-*
-* BF (output) DOUBLE PRECISION array, dimension (LDB,N)
-* Details of the GQR factorization of A and B, as returned
-* by DGGRQF, see SGGRQF for further details.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDB,P)
-* The P-by-P orthogonal matrix Z.
-*
-* T (workspace) DOUBLE PRECISION array, dimension (LDB,max(P,N))
-*
-* BWK (workspace) DOUBLE PRECISION array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, Z and T.
-* LDB >= max(P,N).
-*
-* TAUB (output) DOUBLE PRECISION array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGGRQF.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK, LWORK >= max(M,P,N)**2.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - Q'*Q ) / ( N*ULP )
-* RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dgsvts.f b/TESTING/EIG/dgsvts.f
index 0982928c..8e410520 100644
--- a/TESTING/EIG/dgsvts.f
+++ b/TESTING/EIG/dgsvts.f
@@ -1,10 +1,222 @@
+*> \brief \b DGSVTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGSVTS( M, P, N, A, AF, LDA, B, BF, LDB, U, LDU, V,
+* LDV, Q, LDQ, ALPHA, BETA, R, LDR, IWORK, WORK,
+* LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDQ, LDR, LDU, LDV, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), ALPHA( * ),
+* $ B( LDB, * ), BETA( * ), BF( LDB, * ),
+* $ Q( LDQ, * ), R( LDR, * ), RESULT( 6 ),
+* $ RWORK( * ), U( LDU, * ), V( LDV, * ),
+* $ WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGSVTS tests DGGSVD, which computes the GSVD of an M-by-N matrix A
+*> and a P-by-N matrix B:
+*> U'*A*Q = D1*R and V'*B*Q = D2*R.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,M)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the GSVD of A and B, as returned by DGGSVD,
+*> see DGGSVD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> LDA >= max( 1,M ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,P)
+*> On entry, the P-by-N matrix B.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (LDB,N)
+*> Details of the GSVD of A and B, as returned by DGGSVD,
+*> see DGGSVD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B and BF.
+*> LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension(LDU,M)
+*> The M by M orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension(LDV,M)
+*> The P by P orthogonal matrix V.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension(LDQ,N)
+*> The N by N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The generalized singular value pairs of A and B, the
+*> ``diagonal'' matrices D1 and D2 are constructed from
+*> ALPHA and BETA, see subroutine DGGSVD for details.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension(LDQ,N)
+*> The upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDR
+*> \verbatim
+*> LDR is INTEGER
+*> The leading dimension of the array R. LDR >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK,
+*> LWORK >= max(M,P,N)*max(M,P,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(M,P,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (6)
+*> The test ratios:
+*> RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - U'*U ) / ( M*ULP )
+*> RESULT(4) = norm( I - V'*V ) / ( P*ULP )
+*> RESULT(5) = norm( I - Q'*Q ) / ( N*ULP )
+*> RESULT(6) = 0 if ALPHA is in decreasing order;
+*> = ULPINV otherwise.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DGSVTS( M, P, N, A, AF, LDA, B, BF, LDB, U, LDU, V,
$ LDV, Q, LDQ, ALPHA, BETA, R, LDR, IWORK, WORK,
$ LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LDQ, LDR, LDU, LDV, LWORK, M, N, P
@@ -18,97 +230,6 @@
$ WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* DGSVTS tests DGGSVD, which computes the GSVD of an M-by-N matrix A
-* and a P-by-N matrix B:
-* U'*A*Q = D1*R and V'*B*Q = D2*R.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,M)
-* The M-by-N matrix A.
-*
-* AF (output) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the GSVD of A and B, as returned by DGGSVD,
-* see DGGSVD for further details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
-* LDA >= max( 1,M ).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,P)
-* On entry, the P-by-N matrix B.
-*
-* BF (output) DOUBLE PRECISION array, dimension (LDB,N)
-* Details of the GSVD of A and B, as returned by DGGSVD,
-* see DGGSVD for further details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B and BF.
-* LDB >= max(1,P).
-*
-* U (output) DOUBLE PRECISION array, dimension(LDU,M)
-* The M by M orthogonal matrix U.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
-*
-* V (output) DOUBLE PRECISION array, dimension(LDV,M)
-* The P by P orthogonal matrix V.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P).
-*
-* Q (output) DOUBLE PRECISION array, dimension(LDQ,N)
-* The N by N orthogonal matrix Q.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* ALPHA (output) DOUBLE PRECISION array, dimension (N)
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* The generalized singular value pairs of A and B, the
-* ``diagonal'' matrices D1 and D2 are constructed from
-* ALPHA and BETA, see subroutine DGGSVD for details.
-*
-* R (output) DOUBLE PRECISION array, dimension(LDQ,N)
-* The upper triangular matrix R.
-*
-* LDR (input) INTEGER
-* The leading dimension of the array R. LDR >= max(1,N).
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK,
-* LWORK >= max(M,P,N)*max(M,P,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(M,P,N))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (6)
-* The test ratios:
-* RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - U'*U ) / ( M*ULP )
-* RESULT(4) = norm( I - V'*V ) / ( P*ULP )
-* RESULT(5) = norm( I - Q'*Q ) / ( N*ULP )
-* RESULT(6) = 0 if ALPHA is in decreasing order;
-* = ULPINV otherwise.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dhst01.f b/TESTING/EIG/dhst01.f
index f70b4d2d..5ddffc1a 100644
--- a/TESTING/EIG/dhst01.f
+++ b/TESTING/EIG/dhst01.f
@@ -1,74 +1,154 @@
- SUBROUTINE DHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
- $ LWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
- $ RESULT( 2 ), WORK( LWORK )
-* ..
-*
+*> \brief \b DHST01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
+* LWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
+* $ RESULT( 2 ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DHST01 tests the reduction of a general matrix A to upper Hessenberg
-* form: A = Q*H*Q'. Two test ratios are computed;
-*
-* RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
-*
-* The matrix Q is assumed to be given explicitly as it would be
-* following DGEHRD + DORGHR.
-*
-* In this version, ILO and IHI are not used and are assumed to be 1 and
-* N, respectively.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DHST01 tests the reduction of a general matrix A to upper Hessenberg
+*> form: A = Q*H*Q'. Two test ratios are computed;
+*>
+*> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+*>
+*> The matrix Q is assumed to be given explicitly as it would be
+*> following DGEHRD + DORGHR.
+*>
+*> In this version, ILO and IHI are not used and are assumed to be 1 and
+*> N, respectively.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* A is assumed to be upper triangular in rows and columns
-* 1:ILO-1 and IHI+1:N, so Q differs from the identity only in
-* rows and columns ILO+1:IHI.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original n by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* H (input) DOUBLE PRECISION array, dimension (LDH,N)
-* The upper Hessenberg matrix H from the reduction A = Q*H*Q'
-* as computed by DGEHRD. H is assumed to be zero below the
-* first subdiagonal.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> \endverbatim
+*> \verbatim
+*> A is assumed to be upper triangular in rows and columns
+*> 1:ILO-1 and IHI+1:N, so Q differs from the identity only in
+*> rows and columns ILO+1:IHI.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original n by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is DOUBLE PRECISION array, dimension (LDH,N)
+*> The upper Hessenberg matrix H from the reduction A = Q*H*Q'
+*> as computed by DGEHRD. H is assumed to be zero below the
+*> first subdiagonal.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDQ,N)
+*> The orthogonal matrix Q from the reduction A = Q*H*Q' as
+*> computed by DGEHRD + DORGHR.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= 2*N*N.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Q (input) DOUBLE PRECISION array, dimension (LDQ,N)
-* The orthogonal matrix Q from the reduction A = Q*H*Q' as
-* computed by DGEHRD + DORGHR.
+*> \date November 2011
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+*> \ingroup double_eig
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE DHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
+ $ LWORK, RESULT )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= 2*N*N.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
+ $ RESULT( 2 ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dlafts.f b/TESTING/EIG/dlafts.f
index 2c81eab4..a71a832a 100644
--- a/TESTING/EIG/dlafts.f
+++ b/TESTING/EIG/dlafts.f
@@ -1,9 +1,118 @@
+*> \brief \b DLAFTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAFTS( TYPE, M, N, IMAT, NTESTS, RESULT, ISEED,
+* THRESH, IOUNIT, IE )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER IE, IMAT, IOUNIT, M, N, NTESTS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION RESULT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAFTS tests the result vector against the threshold value to
+*> see which tests for this matrix type failed to pass the threshold.
+*> Output is to the file given by unit IOUNIT.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> TYPE - CHARACTER*3
+*> On entry, TYPE specifies the matrix type to be used in the
+*> printed messages.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the test matrix.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IMAT - INTEGER
+*> On entry, IMAT specifies the type of the test matrix.
+*> A listing of the different types is printed by DLAHD2
+*> to the output file if a test fails to pass the threshold.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTESTS - INTEGER
+*> On entry, NTESTS is the number of tests performed on the
+*> subroutines in the path given by TYPE.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT - DOUBLE PRECISION array of dimension( NTESTS )
+*> On entry, RESULT contains the test ratios from the tests
+*> performed in the calling program.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED - INTEGER array of dimension( 4 )
+*> Contains the random seed that generated the matrix used
+*> for the tests whose ratios are in RESULT.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH - DOUBLE PRECISION
+*> On entry, THRESH specifies the acceptable threshold of the
+*> test ratios. If RESULT( K ) > THRESH, then the K-th test
+*> did not pass the threshold and a message will be printed.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IOUNIT - INTEGER
+*> On entry, IOUNIT specifies the unit number of the file
+*> to which the messages are printed.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IE - INTEGER
+*> On entry, IE contains the number of tests which have
+*> failed to pass the threshold so far.
+*> Updated on exit if any of the ratios in RESULT also fail.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DLAFTS( TYPE, M, N, IMAT, NTESTS, RESULT, ISEED,
$ THRESH, IOUNIT, IE )
*
-* -- LAPACK auxiliary test routine (version 3.1.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK test routine (version 3.1.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER*3 TYPE
@@ -15,62 +124,6 @@
DOUBLE PRECISION RESULT( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAFTS tests the result vector against the threshold value to
-* see which tests for this matrix type failed to pass the threshold.
-* Output is to the file given by unit IOUNIT.
-*
-* Arguments
-* =========
-*
-* TYPE - CHARACTER*3
-* On entry, TYPE specifies the matrix type to be used in the
-* printed messages.
-* Not modified.
-*
-* N - INTEGER
-* On entry, N specifies the order of the test matrix.
-* Not modified.
-*
-* IMAT - INTEGER
-* On entry, IMAT specifies the type of the test matrix.
-* A listing of the different types is printed by DLAHD2
-* to the output file if a test fails to pass the threshold.
-* Not modified.
-*
-* NTESTS - INTEGER
-* On entry, NTESTS is the number of tests performed on the
-* subroutines in the path given by TYPE.
-* Not modified.
-*
-* RESULT - DOUBLE PRECISION array of dimension( NTESTS )
-* On entry, RESULT contains the test ratios from the tests
-* performed in the calling program.
-* Not modified.
-*
-* ISEED - INTEGER array of dimension( 4 )
-* Contains the random seed that generated the matrix used
-* for the tests whose ratios are in RESULT.
-* Not modified.
-*
-* THRESH - DOUBLE PRECISION
-* On entry, THRESH specifies the acceptable threshold of the
-* test ratios. If RESULT( K ) > THRESH, then the K-th test
-* did not pass the threshold and a message will be printed.
-* Not modified.
-*
-* IOUNIT - INTEGER
-* On entry, IOUNIT specifies the unit number of the file
-* to which the messages are printed.
-* Not modified.
-*
-* IE - INTEGER
-* On entry, IE contains the number of tests which have
-* failed to pass the threshold so far.
-* Updated on exit if any of the ratios in RESULT also fail.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/TESTING/EIG/dlahd2.f b/TESTING/EIG/dlahd2.f
index 9a81e7ad..33844fdf 100644
--- a/TESTING/EIG/dlahd2.f
+++ b/TESTING/EIG/dlahd2.f
@@ -1,38 +1,83 @@
- SUBROUTINE DLAHD2( IOUNIT, PATH )
+*> \brief \b DLAHD2
*
-* -- LAPACK auxiliary test routine (version 2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER IOUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DLAHD2( IOUNIT, PATH )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER IOUNIT
+* ..
+*
* Purpose
* =======
*
-* DLAHD2 prints header information for the different test paths.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAHD2 prints header information for the different test paths.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IOUNIT (input) INTEGER.
-* On entry, IOUNIT specifies the unit number to which the
-* header information should be printed.
+*> \param[in] IOUNIT
+*> \verbatim
+*> IOUNIT is INTEGER.
+*> On entry, IOUNIT specifies the unit number to which the
+*> header information should be printed.
+*> \endverbatim
+*>
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3.
+*> On entry, PATH contains the name of the path for which the
+*> header information is to be printed. Current paths are
+*> \endverbatim
+*> \verbatim
+*> DHS, ZHS: Non-symmetric eigenproblem.
+*> DST, ZST: Symmetric eigenproblem.
+*> DSG, ZSG: Symmetric Generalized eigenproblem.
+*> DBD, ZBD: Singular Value Decomposition (SVD)
+*> DBB, ZBB: General Banded reduction to bidiagonal form
+*> \endverbatim
+*> \verbatim
+*> These paths also are supplied in double precision (replace
+*> leading S by D and leading C by Z in path names).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* PATH (input) CHARACTER*3.
-* On entry, PATH contains the name of the path for which the
-* header information is to be printed. Current paths are
+*> \date November 2011
*
-* DHS, ZHS: Non-symmetric eigenproblem.
-* DST, ZST: Symmetric eigenproblem.
-* DSG, ZSG: Symmetric Generalized eigenproblem.
-* DBD, ZBD: Singular Value Decomposition (SVD)
-* DBB, ZBB: General Banded reduction to bidiagonal form
+*> \ingroup double_eig
*
-* These paths also are supplied in double precision (replace
-* leading S by D and leading C by Z in path names).
+* =====================================================================
+ SUBROUTINE DLAHD2( IOUNIT, PATH )
+*
+* -- LAPACK test routine (version 2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER IOUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dlarfy.f b/TESTING/EIG/dlarfy.f
index b5acc47f..5a75339b 100644
--- a/TESTING/EIG/dlarfy.f
+++ b/TESTING/EIG/dlarfy.f
@@ -1,63 +1,128 @@
- SUBROUTINE DLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INCV, LDC, N
- DOUBLE PRECISION TAU
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b DLARFY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCV, LDC, N
+* DOUBLE PRECISION TAU
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLARFY applies an elementary reflector, or Householder matrix, H,
-* to an n x n symmetric matrix C, from both the left and the right.
-*
-* H is represented in the form
-*
-* H = I - tau * v * v'
-*
-* where tau is a scalar and v is a vector.
-*
-* If tau is zero, then H is taken to be the unit matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARFY applies an elementary reflector, or Householder matrix, H,
+*> to an n x n symmetric matrix C, from both the left and the right.
+*>
+*> H is represented in the form
+*>
+*> H = I - tau * v * v'
+*>
+*> where tau is a scalar and v is a vector.
+*>
+*> If tau is zero, then H is taken to be the unit matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix C is stored.
-* = 'U': Upper triangle
-* = 'L': Lower triangle
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix C. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix C is stored.
+*> = 'U': Upper triangle
+*> = 'L': Lower triangle
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension
+*> (1 + (N-1)*abs(INCV))
+*> The vector v as described above.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between successive elements of v. INCV must
+*> not be zero.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION
+*> The value tau as described above.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC, N)
+*> On entry, the matrix C.
+*> On exit, C is overwritten by H * C * H'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* V (input) DOUBLE PRECISION array, dimension
-* (1 + (N-1)*abs(INCV))
-* The vector v as described above.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCV (input) INTEGER
-* The increment between successive elements of v. INCV must
-* not be zero.
+*> \date November 2011
*
-* TAU (input) DOUBLE PRECISION
-* The value tau as described above.
+*> \ingroup double_eig
*
-* C (input/output) DOUBLE PRECISION array, dimension (LDC, N)
-* On entry, the matrix C.
-* On exit, C is overwritten by H * C * H'.
+* =====================================================================
+ SUBROUTINE DLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max( 1, N ).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INCV, LDC, N
+ DOUBLE PRECISION TAU
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dlarhs.f b/TESTING/EIG/dlarhs.f
index 4677dfe0..c1331dad 100644
--- a/TESTING/EIG/dlarhs.f
+++ b/TESTING/EIG/dlarhs.f
@@ -1,9 +1,217 @@
+*> \brief \b DLARHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
+* A, LDA, X, LDX, B, LDB, ISEED, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, UPLO, XTYPE
+* CHARACTER*3 PATH
+* INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARHS chooses a set of NRHS random solution vectors and sets
+*> up the right hand sides for the linear system
+*> op( A ) * X = B,
+*> where op( A ) may be A or A' (transpose of A).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The type of the real matrix A. PATH may be given in any
+*> combination of upper and lower case. Valid types include
+*> xGE: General m x n matrix
+*> xGB: General banded matrix
+*> xPO: Symmetric positive definite, 2-D storage
+*> xPP: Symmetric positive definite packed
+*> xPB: Symmetric positive definite banded
+*> xSY: Symmetric indefinite, 2-D storage
+*> xSP: Symmetric indefinite packed
+*> xSB: Symmetric indefinite banded
+*> xTR: Triangular
+*> xTP: Triangular packed
+*> xTB: Triangular banded
+*> xQR: General m x n matrix
+*> xLQ: General m x n matrix
+*> xQL: General m x n matrix
+*> xRQ: General m x n matrix
+*> where the leading character indicates the precision.
+*> \endverbatim
+*>
+*> \param[in] XTYPE
+*> \verbatim
+*> XTYPE is CHARACTER*1
+*> Specifies how the exact solution X will be determined:
+*> = 'N': New solution; generate a random X.
+*> = 'C': Computed; use value of X on entry.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> matrix A is stored, if A is symmetric.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to the matrix A.
+*> = 'N': System is A * x = b
+*> = 'T': System is A'* x = b
+*> = 'C': System is A'* x = b
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number or rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Used only if A is a band matrix; specifies the number of
+*> subdiagonals of A if A is a general band matrix or if A is
+*> symmetric or triangular and UPLO = 'L'; specifies the number
+*> of superdiagonals of A if A is symmetric or triangular and
+*> UPLO = 'U'. 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Used only if A is a general band matrix or if A is
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xGB, specifies the number of superdiagonals of A,
+*> and 0 <= KU <= N-1.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xTR, xTP, or xTB, specifies whether or not the
+*> matrix has unit diagonal:
+*> = 1: matrix has non-unit diagonal (default)
+*> = 2: matrix has unit diagonal
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors in the system A*X = B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The test matrix whose type is given by PATH.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If PATH = xGB, LDA >= KL+KU+1.
+*> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
+*> Otherwise, LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is or output) DOUBLE PRECISION array, dimension(LDX,NRHS)
+*> On entry, if XTYPE = 'C' (for 'Computed'), then X contains
+*> the exact solution to the system of linear equations.
+*> On exit, if XTYPE = 'N' (for 'New'), then X is initialized
+*> with random values.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vector(s) for the system of equations,
+*> computed from B = op(A) * X, where op(A) is determined by
+*> TRANS.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. If TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> DLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
$ A, LDA, X, LDX, B, LDB, ISEED, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS, UPLO, XTYPE
@@ -15,118 +223,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DLARHS chooses a set of NRHS random solution vectors and sets
-* up the right hand sides for the linear system
-* op( A ) * X = B,
-* where op( A ) may be A or A' (transpose of A).
-*
-* Arguments
-* =========
-*
-* PATH (input) CHARACTER*3
-* The type of the real matrix A. PATH may be given in any
-* combination of upper and lower case. Valid types include
-* xGE: General m x n matrix
-* xGB: General banded matrix
-* xPO: Symmetric positive definite, 2-D storage
-* xPP: Symmetric positive definite packed
-* xPB: Symmetric positive definite banded
-* xSY: Symmetric indefinite, 2-D storage
-* xSP: Symmetric indefinite packed
-* xSB: Symmetric indefinite banded
-* xTR: Triangular
-* xTP: Triangular packed
-* xTB: Triangular banded
-* xQR: General m x n matrix
-* xLQ: General m x n matrix
-* xQL: General m x n matrix
-* xRQ: General m x n matrix
-* where the leading character indicates the precision.
-*
-* XTYPE (input) CHARACTER*1
-* Specifies how the exact solution X will be determined:
-* = 'N': New solution; generate a random X.
-* = 'C': Computed; use value of X on entry.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* matrix A is stored, if A is symmetric.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to the matrix A.
-* = 'N': System is A * x = b
-* = 'T': System is A'* x = b
-* = 'C': System is A'* x = b
-*
-* M (input) INTEGER
-* The number or rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* Used only if A is a band matrix; specifies the number of
-* subdiagonals of A if A is a general band matrix or if A is
-* symmetric or triangular and UPLO = 'L'; specifies the number
-* of superdiagonals of A if A is symmetric or triangular and
-* UPLO = 'U'. 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* Used only if A is a general band matrix or if A is
-* triangular.
-*
-* If PATH = xGB, specifies the number of superdiagonals of A,
-* and 0 <= KU <= N-1.
-*
-* If PATH = xTR, xTP, or xTB, specifies whether or not the
-* matrix has unit diagonal:
-* = 1: matrix has non-unit diagonal (default)
-* = 2: matrix has unit diagonal
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors in the system A*X = B.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The test matrix whose type is given by PATH.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If PATH = xGB, LDA >= KL+KU+1.
-* If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
-* Otherwise, LDA >= max(1,M).
-*
-* X (input or output) DOUBLE PRECISION array, dimension(LDX,NRHS)
-* On entry, if XTYPE = 'C' (for 'Computed'), then X contains
-* the exact solution to the system of linear equations.
-* On exit, if XTYPE = 'N' (for 'New'), then X is initialized
-* with random values.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
-*
-* B (output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vector(s) for the system of equations,
-* computed from B = op(A) * X, where op(A) is determined by
-* TRANS.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. If TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* DLATMS). Modified on exit.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dlasum.f b/TESTING/EIG/dlasum.f
index fa02cace..d44fc991 100644
--- a/TESTING/EIG/dlasum.f
+++ b/TESTING/EIG/dlasum.f
@@ -1,19 +1,59 @@
+*> \brief \b DLASUM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLASUM( TYPE, IOUNIT, IE, NRUN )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER IE, IOUNIT, NRUN
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLASUM prints a summary of the results from one of the test routines.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DLASUM( TYPE, IOUNIT, IE, NRUN )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER*3 TYPE
INTEGER IE, IOUNIT, NRUN
* ..
*
-* Purpose
-* =======
-*
-* DLASUM prints a summary of the results from one of the test routines.
-*
* =====================================================================
*
* .. Executable Statements ..
diff --git a/TESTING/EIG/dlatb9.f b/TESTING/EIG/dlatb9.f
index f7954288..1ffcdc46 100644
--- a/TESTING/EIG/dlatb9.f
+++ b/TESTING/EIG/dlatb9.f
@@ -1,66 +1,140 @@
- SUBROUTINE DLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA, KLB, KUB,
- $ ANORM, BNORM, MODEA, MODEB, CNDNMA, CNDNMB,
- $ DISTA, DISTB )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DISTA, DISTB, TYPE
- CHARACTER*3 PATH
- INTEGER IMAT, KLA, KLB, KUA, KUB, M, MODEA, MODEB, N, P
- DOUBLE PRECISION ANORM, BNORM, CNDNMA, CNDNMB
-* ..
-*
+*> \brief \b DLATB9
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA, KLB, KUB,
+* ANORM, BNORM, MODEA, MODEB, CNDNMA, CNDNMB,
+* DISTA, DISTB )
+*
+* .. Scalar Arguments ..
+* CHARACTER DISTA, DISTB, TYPE
+* CHARACTER*3 PATH
+* INTEGER IMAT, KLA, KLB, KUA, KUB, M, MODEA, MODEB, N, P
+* DOUBLE PRECISION ANORM, BNORM, CNDNMA, CNDNMB
+* ..
+*
* Purpose
* =======
*
-* DLATB9 sets parameters for the matrix generator based on the type of
-* matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATB9 sets parameters for the matrix generator based on the type of
+*> matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* M (input) INTEGER
-* The number of rows in the matrix to be generated.
-*
-* N (input) INTEGER
-* The number of columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix;
-* = 'P': symmetric positive (semi)definite matrix;
-* = 'N': nonsymmetric matrix.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix;
+*> = 'P': symmetric positive (semi)definite matrix;
+*> = 'N': nonsymmetric matrix.
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is DOUBLE PRECISION
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) DOUBLE PRECISION
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup double_eig
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE DLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA, KLB, KUB,
+ $ ANORM, BNORM, MODEA, MODEB, CNDNMA, CNDNMB,
+ $ DISTA, DISTB )
*
-* CNDNUM (output) DOUBLE PRECISION
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ CHARACTER DISTA, DISTB, TYPE
+ CHARACTER*3 PATH
+ INTEGER IMAT, KLA, KLB, KUA, KUB, M, MODEA, MODEB, N, P
+ DOUBLE PRECISION ANORM, BNORM, CNDNMA, CNDNMB
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dlatm4.f b/TESTING/EIG/dlatm4.f
index 915393fb..d692f067 100644
--- a/TESTING/EIG/dlatm4.f
+++ b/TESTING/EIG/dlatm4.f
@@ -1,9 +1,188 @@
+*> \brief \b DLATM4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATM4( ITYPE, N, NZ1, NZ2, ISIGN, AMAGN, RCOND,
+* TRIANG, IDIST, ISEED, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, ISIGN, ITYPE, LDA, N, NZ1, NZ2
+* DOUBLE PRECISION AMAGN, RCOND, TRIANG
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATM4 generates basic square matrices, which may later be
+*> multiplied by others in order to produce test matrices. It is
+*> intended mainly to be used to test the generalized eigenvalue
+*> routines.
+*>
+*> It first generates the diagonal and (possibly) subdiagonal,
+*> according to the value of ITYPE, NZ1, NZ2, ISIGN, AMAGN, and RCOND.
+*> It then fills in the upper triangle with random numbers, if TRIANG is
+*> non-zero.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> The "type" of matrix on the diagonal and sub-diagonal.
+*> If ITYPE < 0, then type abs(ITYPE) is generated and then
+*> swapped end for end (A(I,J) := A'(N-J,N-I).) See also
+*> the description of AMAGN and ISIGN.
+*> \endverbatim
+*> \verbatim
+*> Special types:
+*> = 0: the zero matrix.
+*> = 1: the identity.
+*> = 2: a transposed Jordan block.
+*> = 3: If N is odd, then a k+1 x k+1 transposed Jordan block
+*> followed by a k x k identity block, where k=(N-1)/2.
+*> If N is even, then k=(N-2)/2, and a zero diagonal entry
+*> is tacked onto the end.
+*> \endverbatim
+*> \verbatim
+*> Diagonal types. The diagonal consists of NZ1 zeros, then
+*> k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE
+*> specifies the nonzero diagonal entries as follows:
+*> = 4: 1, ..., k
+*> = 5: 1, RCOND, ..., RCOND
+*> = 6: 1, ..., 1, RCOND
+*> = 7: 1, a, a^2, ..., a^(k-1)=RCOND
+*> = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND
+*> = 9: random numbers chosen from (RCOND,1)
+*> = 10: random numbers with distribution IDIST (see DLARND.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] NZ1
+*> \verbatim
+*> NZ1 is INTEGER
+*> If abs(ITYPE) > 3, then the first NZ1 diagonal entries will
+*> be zero.
+*> \endverbatim
+*>
+*> \param[in] NZ2
+*> \verbatim
+*> NZ2 is INTEGER
+*> If abs(ITYPE) > 3, then the last NZ2 diagonal entries will
+*> be zero.
+*> \endverbatim
+*>
+*> \param[in] ISIGN
+*> \verbatim
+*> ISIGN is INTEGER
+*> = 0: The sign of the diagonal and subdiagonal entries will
+*> be left unchanged.
+*> = 1: The diagonal and subdiagonal entries will have their
+*> sign changed at random.
+*> = 2: If ITYPE is 2 or 3, then the same as ISIGN=1.
+*> Otherwise, with probability 0.5, odd-even pairs of
+*> diagonal entries A(2*j-1,2*j-1), A(2*j,2*j) will be
+*> converted to a 2x2 block by pre- and post-multiplying
+*> by distinct random orthogonal rotations. The remaining
+*> diagonal entries will have their sign changed at random.
+*> \endverbatim
+*>
+*> \param[in] AMAGN
+*> \verbatim
+*> AMAGN is DOUBLE PRECISION
+*> The diagonal and subdiagonal entries will be multiplied by
+*> AMAGN.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> If abs(ITYPE) > 4, then the smallest diagonal entry will be
+*> entry will be RCOND. RCOND must be between 0 and 1.
+*> \endverbatim
+*>
+*> \param[in] TRIANG
+*> \verbatim
+*> TRIANG is DOUBLE PRECISION
+*> The entries above the diagonal will be random numbers with
+*> magnitude bounded by TRIANG (i.e., random numbers multiplied
+*> by TRIANG.)
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the type of distribution to be used to generate a
+*> random matrix.
+*> = 1: UNIFORM( 0, 1 )
+*> = 2: UNIFORM( -1, 1 )
+*> = 3: NORMAL ( 0, 1 )
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The values of ISEED are changed on exit, and can
+*> be used in the next call to DLATM4 to continue the same
+*> random number sequence.
+*> Note: ISEED(4) should be odd, for the random number generator
+*> used at present.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> Array to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A. Must be at least 1 and at least N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DLATM4( ITYPE, N, NZ1, NZ2, ISIGN, AMAGN, RCOND,
$ TRIANG, IDIST, ISEED, A, LDA )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IDIST, ISIGN, ITYPE, LDA, N, NZ1, NZ2
@@ -14,105 +193,6 @@
DOUBLE PRECISION A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* DLATM4 generates basic square matrices, which may later be
-* multiplied by others in order to produce test matrices. It is
-* intended mainly to be used to test the generalized eigenvalue
-* routines.
-*
-* It first generates the diagonal and (possibly) subdiagonal,
-* according to the value of ITYPE, NZ1, NZ2, ISIGN, AMAGN, and RCOND.
-* It then fills in the upper triangle with random numbers, if TRIANG is
-* non-zero.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* The "type" of matrix on the diagonal and sub-diagonal.
-* If ITYPE < 0, then type abs(ITYPE) is generated and then
-* swapped end for end (A(I,J) := A'(N-J,N-I).) See also
-* the description of AMAGN and ISIGN.
-*
-* Special types:
-* = 0: the zero matrix.
-* = 1: the identity.
-* = 2: a transposed Jordan block.
-* = 3: If N is odd, then a k+1 x k+1 transposed Jordan block
-* followed by a k x k identity block, where k=(N-1)/2.
-* If N is even, then k=(N-2)/2, and a zero diagonal entry
-* is tacked onto the end.
-*
-* Diagonal types. The diagonal consists of NZ1 zeros, then
-* k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE
-* specifies the nonzero diagonal entries as follows:
-* = 4: 1, ..., k
-* = 5: 1, RCOND, ..., RCOND
-* = 6: 1, ..., 1, RCOND
-* = 7: 1, a, a^2, ..., a^(k-1)=RCOND
-* = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND
-* = 9: random numbers chosen from (RCOND,1)
-* = 10: random numbers with distribution IDIST (see DLARND.)
-*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* NZ1 (input) INTEGER
-* If abs(ITYPE) > 3, then the first NZ1 diagonal entries will
-* be zero.
-*
-* NZ2 (input) INTEGER
-* If abs(ITYPE) > 3, then the last NZ2 diagonal entries will
-* be zero.
-*
-* ISIGN (input) INTEGER
-* = 0: The sign of the diagonal and subdiagonal entries will
-* be left unchanged.
-* = 1: The diagonal and subdiagonal entries will have their
-* sign changed at random.
-* = 2: If ITYPE is 2 or 3, then the same as ISIGN=1.
-* Otherwise, with probability 0.5, odd-even pairs of
-* diagonal entries A(2*j-1,2*j-1), A(2*j,2*j) will be
-* converted to a 2x2 block by pre- and post-multiplying
-* by distinct random orthogonal rotations. The remaining
-* diagonal entries will have their sign changed at random.
-*
-* AMAGN (input) DOUBLE PRECISION
-* The diagonal and subdiagonal entries will be multiplied by
-* AMAGN.
-*
-* RCOND (input) DOUBLE PRECISION
-* If abs(ITYPE) > 4, then the smallest diagonal entry will be
-* entry will be RCOND. RCOND must be between 0 and 1.
-*
-* TRIANG (input) DOUBLE PRECISION
-* The entries above the diagonal will be random numbers with
-* magnitude bounded by TRIANG (i.e., random numbers multiplied
-* by TRIANG.)
-*
-* IDIST (input) INTEGER
-* Specifies the type of distribution to be used to generate a
-* random matrix.
-* = 1: UNIFORM( 0, 1 )
-* = 2: UNIFORM( -1, 1 )
-* = 3: NORMAL ( 0, 1 )
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The values of ISEED are changed on exit, and can
-* be used in the next call to DLATM4 to continue the same
-* random number sequence.
-* Note: ISEED(4) should be odd, for the random number generator
-* used at present.
-*
-* A (output) DOUBLE PRECISION array, dimension (LDA, N)
-* Array to be computed.
-*
-* LDA (input) INTEGER
-* Leading dimension of A. Must be at least 1 and at least N.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dlctes.f b/TESTING/EIG/dlctes.f
index c7999d78..7c292680 100644
--- a/TESTING/EIG/dlctes.f
+++ b/TESTING/EIG/dlctes.f
@@ -1,38 +1,83 @@
- LOGICAL FUNCTION DLCTES( ZR, ZI, D )
+*> \brief \b DLCTES
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION D, ZI, ZR
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION DLCTES( ZR, ZI, D )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION D, ZI, ZR
+* ..
+*
* Purpose
* =======
*
-* DLCTES returns .TRUE. if the eigenvalue (ZR/D) + sqrt(-1)*(ZI/D)
-* is to be selected (specifically, in this subroutine, if the real
-* part of the eigenvalue is negative), and otherwise it returns
-* .FALSE..
-*
-* It is used by the test routine DDRGES to test whether the driver
-* routine DGGES succesfully sorts eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLCTES returns .TRUE. if the eigenvalue (ZR/D) + sqrt(-1)*(ZI/D)
+*> is to be selected (specifically, in this subroutine, if the real
+*> part of the eigenvalue is negative), and otherwise it returns
+*> .FALSE..
+*>
+*> It is used by the test routine DDRGES to test whether the driver
+*> routine DGGES succesfully sorts eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ZR (input) DOUBLE PRECISION
-* The numerator of the real part of a complex eigenvalue
-* (ZR/D) + i*(ZI/D).
+*> \param[in] ZR
+*> \verbatim
+*> ZR is DOUBLE PRECISION
+*> The numerator of the real part of a complex eigenvalue
+*> (ZR/D) + i*(ZI/D).
+*> \endverbatim
+*>
+*> \param[in] ZI
+*> \verbatim
+*> ZI is DOUBLE PRECISION
+*> The numerator of the imaginary part of a complex eigenvalue
+*> (ZR/D) + i*(ZI).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION
+*> The denominator part of a complex eigenvalue
+*> (ZR/D) + i*(ZI/D).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ZI (input) DOUBLE PRECISION
-* The numerator of the imaginary part of a complex eigenvalue
-* (ZR/D) + i*(ZI).
+*> \date November 2011
*
-* D (input) DOUBLE PRECISION
-* The denominator part of a complex eigenvalue
-* (ZR/D) + i*(ZI/D).
+*> \ingroup double_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION DLCTES( ZR, ZI, D )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION D, ZI, ZR
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dlctsx.f b/TESTING/EIG/dlctsx.f
index 9d9a87ac..b1064910 100644
--- a/TESTING/EIG/dlctsx.f
+++ b/TESTING/EIG/dlctsx.f
@@ -1,35 +1,80 @@
- LOGICAL FUNCTION DLCTSX( AR, AI, BETA )
+*> \brief \b DLCTSX
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION AI, AR, BETA
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION DLCTSX( AR, AI, BETA )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION AI, AR, BETA
+* ..
+*
* Purpose
* =======
*
-* This function is used to determine what eigenvalues will be
-* selected. If this is part of the test driver DDRGSX, do not
-* change the code UNLESS you are testing input examples and not
-* using the built-in examples.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This function is used to determine what eigenvalues will be
+*> selected. If this is part of the test driver DDRGSX, do not
+*> change the code UNLESS you are testing input examples and not
+*> using the built-in examples.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* AR (input) DOUBLE PRECISION
-* The numerator of the real part of a complex eigenvalue
-* (AR/BETA) + i*(AI/BETA).
+*> \param[in] AR
+*> \verbatim
+*> AR is DOUBLE PRECISION
+*> The numerator of the real part of a complex eigenvalue
+*> (AR/BETA) + i*(AI/BETA).
+*> \endverbatim
+*>
+*> \param[in] AI
+*> \verbatim
+*> AI is DOUBLE PRECISION
+*> The numerator of the imaginary part of a complex eigenvalue
+*> (AR/BETA) + i*(AI).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> The denominator part of a complex eigenvalue
+*> (AR/BETA) + i*(AI/BETA).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AI (input) DOUBLE PRECISION
-* The numerator of the imaginary part of a complex eigenvalue
-* (AR/BETA) + i*(AI).
+*> \date November 2011
*
-* BETA (input) DOUBLE PRECISION
-* The denominator part of a complex eigenvalue
-* (AR/BETA) + i*(AI/BETA).
+*> \ingroup double_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION DLCTSX( AR, AI, BETA )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION AI, AR, BETA
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dlsets.f b/TESTING/EIG/dlsets.f
index a52c61c9..75c364ff 100644
--- a/TESTING/EIG/dlsets.f
+++ b/TESTING/EIG/dlsets.f
@@ -1,75 +1,167 @@
- SUBROUTINE DLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF, D, DF,
- $ X, WORK, LWORK, RWORK, RESULT )
+*> \brief \b DLSETS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF, D, DF,
+* X, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+*
* Purpose
* =======
*
-* DLSETS tests DGGLSE - a subroutine for solving linear equality
-* constrained least square problem (LSE).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLSETS tests DGGLSE - a subroutine for solving linear equality
+*> constrained least square problem (LSE).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,N)
-* The P-by-N matrix A.
-*
-* BF (workspace) DOUBLE PRECISION array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, V and S.
-* LDB >= max(P,N).
-*
-* C (input) DOUBLE PRECISION array, dimension( M )
-* the vector C in the LSE problem.
-*
-* CF (workspace) DOUBLE PRECISION array, dimension( M )
-*
-* D (input) DOUBLE PRECISION array, dimension( P )
-* the vector D in the LSE problem.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,N)
+*> The P-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is DOUBLE PRECISION array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, V and S.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension( M )
+*> the vector C in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] CF
+*> \verbatim
+*> CF is DOUBLE PRECISION array, dimension( M )
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension( P )
+*> the vector D in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] DF
+*> \verbatim
+*> DF is DOUBLE PRECISION array, dimension( P )
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension( N )
+*> solution vector X in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS
+*> RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DF (workspace) DOUBLE PRECISION array, dimension( P )
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (output) DOUBLE PRECISION array, dimension( N )
-* solution vector X in the LSE problem.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_eig
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF, D, DF,
+ $ X, WORK, LWORK, RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS
-* RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
*
* ====================================================================
*
diff --git a/TESTING/EIG/dort01.f b/TESTING/EIG/dort01.f
index 2e53e33f..1c23a8a4 100644
--- a/TESTING/EIG/dort01.f
+++ b/TESTING/EIG/dort01.f
@@ -1,71 +1,136 @@
- SUBROUTINE DORT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER ROWCOL
- INTEGER LDU, LWORK, M, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION U( LDU, * ), WORK( * )
-* ..
-*
+*> \brief \b DORT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DORT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER ROWCOL
+* INTEGER LDU, LWORK, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION U( LDU, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORT01 checks that the matrix U is orthogonal by computing the ratio
-*
-* RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
-* or
-* RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
-* Alternatively, if there isn't sufficient workspace to form
-* I - U*U' or I - U'*U, the ratio is computed as
-*
-* RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
-* or
-* RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
-* where EPS is the machine precision. ROWCOL is used only if m = n;
-* if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
-* assumed to be 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORT01 checks that the matrix U is orthogonal by computing the ratio
+*>
+*> RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
+*> or
+*> RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
+*>
+*> Alternatively, if there isn't sufficient workspace to form
+*> I - U*U' or I - U'*U, the ratio is computed as
+*>
+*> RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
+*> or
+*> RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
+*>
+*> where EPS is the machine precision. ROWCOL is used only if m = n;
+*> if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
+*> assumed to be 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ROWCOL (input) CHARACTER
-* Specifies whether the rows or columns of U should be checked
-* for orthogonality. Used only if M = N.
-* = 'R': Check for orthogonal rows of U
-* = 'C': Check for orthogonal columns of U
-*
-* M (input) INTEGER
-* The number of rows of the matrix U.
+*> \param[in] ROWCOL
+*> \verbatim
+*> ROWCOL is CHARACTER
+*> Specifies whether the rows or columns of U should be checked
+*> for orthogonality. Used only if M = N.
+*> = 'R': Check for orthogonal rows of U
+*> = 'C': Check for orthogonal columns of U
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix U.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix U.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,N)
+*> The orthogonal matrix U. U is checked for orthogonal columns
+*> if m > n or if m = n and ROWCOL = 'C'. U is checked for
+*> orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. For best performance, LWORK
+*> should be at least N*(N+1) if ROWCOL = 'C' or M*(M+1) if
+*> ROWCOL = 'R', but the test will be done even if LWORK is 0.
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
+*> RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix U.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (input) DOUBLE PRECISION array, dimension (LDU,N)
-* The orthogonal matrix U. U is checked for orthogonal columns
-* if m > n or if m = n and ROWCOL = 'C'. U is checked for
-* orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
+*> \date November 2011
*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
+*> \ingroup double_eig
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE DORT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. For best performance, LWORK
-* should be at least N*(N+1) if ROWCOL = 'C' or M*(M+1) if
-* ROWCOL = 'R', but the test will be done even if LWORK is 0.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
-* RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
+* .. Scalar Arguments ..
+ CHARACTER ROWCOL
+ INTEGER LDU, LWORK, M, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION U( LDU, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dort03.f b/TESTING/EIG/dort03.f
index fb2b29d5..c6172bed 100644
--- a/TESTING/EIG/dort03.f
+++ b/TESTING/EIG/dort03.f
@@ -1,95 +1,176 @@
- SUBROUTINE DORT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
- $ RESULT, INFO )
+*> \brief \b DORT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*( * ) RC
- INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
- DOUBLE PRECISION RESULT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION U( LDU, * ), V( LDV, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DORT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
+* RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER*( * ) RC
+* INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DORT03 compares two orthogonal matrices U and V to see if their
-* corresponding rows or columns span the same spaces. The rows are
-* checked if RC = 'R', and the columns are checked if RC = 'C'.
-*
-* RESULT is the maximum of
-*
-* | V*V' - I | / ( MV ulp ), if RC = 'R', or
-*
-* | V'*V - I | / ( MV ulp ), if RC = 'C',
-*
-* and the maximum over rows (or columns) 1 to K of
-*
-* | U(i) - S*V(i) |/ ( N ulp )
-*
-* where S is +-1 (chosen to minimize the expression), U(i) is the i-th
-* row (column) of U, and V(i) is the i-th row (column) of V.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DORT03 compares two orthogonal matrices U and V to see if their
+*> corresponding rows or columns span the same spaces. The rows are
+*> checked if RC = 'R', and the columns are checked if RC = 'C'.
+*>
+*> RESULT is the maximum of
+*>
+*> | V*V' - I | / ( MV ulp ), if RC = 'R', or
+*>
+*> | V'*V - I | / ( MV ulp ), if RC = 'C',
+*>
+*> and the maximum over rows (or columns) 1 to K of
+*>
+*> | U(i) - S*V(i) |/ ( N ulp )
+*>
+*> where S is +-1 (chosen to minimize the expression), U(i) is the i-th
+*> row (column) of U, and V(i) is the i-th row (column) of V.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* RC (input) CHARACTER*1
-* If RC = 'R' the rows of U and V are to be compared.
-* If RC = 'C' the columns of U and V are to be compared.
-*
-* MU (input) INTEGER
-* The number of rows of U if RC = 'R', and the number of
-* columns if RC = 'C'. If MU = 0 DORT03 does nothing.
-* MU must be at least zero.
-*
-* MV (input) INTEGER
-* The number of rows of V if RC = 'R', and the number of
-* columns if RC = 'C'. If MV = 0 DORT03 does nothing.
-* MV must be at least zero.
-*
-* N (input) INTEGER
-* If RC = 'R', the number of columns in the matrices U and V,
-* and if RC = 'C', the number of rows in U and V. If N = 0
-* DORT03 does nothing. N must be at least zero.
-*
-* K (input) INTEGER
-* The number of rows or columns of U and V to compare.
-* 0 <= K <= max(MU,MV).
-*
-* U (input) DOUBLE PRECISION array, dimension (LDU,N)
-* The first matrix to compare. If RC = 'R', U is MU by N, and
-* if RC = 'C', U is N by MU.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. If RC = 'R', LDU >= max(1,MU),
-* and if RC = 'C', LDU >= max(1,N).
+* =========
+*
+*> \param[in] RC
+*> \verbatim
+*> RC is CHARACTER*1
+*> If RC = 'R' the rows of U and V are to be compared.
+*> If RC = 'C' the columns of U and V are to be compared.
+*> \endverbatim
+*>
+*> \param[in] MU
+*> \verbatim
+*> MU is INTEGER
+*> The number of rows of U if RC = 'R', and the number of
+*> columns if RC = 'C'. If MU = 0 DORT03 does nothing.
+*> MU must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> The number of rows of V if RC = 'R', and the number of
+*> columns if RC = 'C'. If MV = 0 DORT03 does nothing.
+*> MV must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> If RC = 'R', the number of columns in the matrices U and V,
+*> and if RC = 'C', the number of rows in U and V. If N = 0
+*> DORT03 does nothing. N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of rows or columns of U and V to compare.
+*> 0 <= K <= max(MU,MV).
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU,N)
+*> The first matrix to compare. If RC = 'R', U is MU by N, and
+*> if RC = 'C', U is N by MU.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. If RC = 'R', LDU >= max(1,MU),
+*> and if RC = 'C', LDU >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV,N)
+*> The second matrix to compare. If RC = 'R', V is MV by N, and
+*> if RC = 'C', V is N by MV.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. If RC = 'R', LDV >= max(1,MV),
+*> and if RC = 'C', LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. For best performance, LWORK
+*> should be at least N*N if RC = 'C' or M*M if RC = 'R', but
+*> the tests will be done even if LWORK is 0.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> The value computed by the test described above. RESULT is
+*> limited to 1/ulp to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 indicates a successful exit
+*> -k indicates the k-th parameter had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* V (input) DOUBLE PRECISION array, dimension (LDV,N)
-* The second matrix to compare. If RC = 'R', V is MV by N, and
-* if RC = 'C', V is N by MV.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDV (input) INTEGER
-* The leading dimension of V. If RC = 'R', LDV >= max(1,MV),
-* and if RC = 'C', LDV >= max(1,N).
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_eig
*
-* LWORK (input) INTEGER
-* The length of the array WORK. For best performance, LWORK
-* should be at least N*N if RC = 'C' or M*M if RC = 'R', but
-* the tests will be done even if LWORK is 0.
+* =====================================================================
+ SUBROUTINE DORT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
+ $ RESULT, INFO )
*
-* RESULT (output) DOUBLE PRECISION
-* The value computed by the test described above. RESULT is
-* limited to 1/ulp to avoid overflow.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* 0 indicates a successful exit
-* -k indicates the k-th parameter had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER*( * ) RC
+ INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
+ DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dsbt21.f b/TESTING/EIG/dsbt21.f
index cd7f6cde..c9f9eaed 100644
--- a/TESTING/EIG/dsbt21.f
+++ b/TESTING/EIG/dsbt21.f
@@ -1,9 +1,157 @@
+*> \brief \b DSBT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
+* RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KA, KS, LDA, LDU, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), RESULT( 2 ),
+* $ U( LDU, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSBT21 generally checks a decomposition of the form
+*>
+*> A = U S U'
+*>
+*> where ' means transpose, A is symmetric banded, U is
+*> orthogonal, and S is diagonal (if KS=0) or symmetric
+*> tridiagonal (if KS=1).
+*>
+*> Specifically:
+*>
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, DSBT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The bandwidth of the matrix A. It must be at least zero. If
+*> it is larger than N-1, then max( 0, N-1 ) will be used.
+*> \endverbatim
+*>
+*> \param[in] KS
+*> \verbatim
+*> KS is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least min( KA, N-1 ).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KS=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> The orthogonal matrix in the decomposition, expressed as a
+*> dense matrix (i.e., not as a product of Householder
+*> transformations, Givens transformations, etc.)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N**2+N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DSBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
$ RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,77 +162,6 @@
$ U( LDU, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSBT21 generally checks a decomposition of the form
-*
-* A = U S U'
-*
-* where ' means transpose, A is symmetric banded, U is
-* orthogonal, and S is diagonal (if KS=0) or symmetric
-* tridiagonal (if KS=1).
-*
-* Specifically:
-*
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, DSBT21 does nothing.
-* It must be at least zero.
-*
-* KA (input) INTEGER
-* The bandwidth of the matrix A. It must be at least zero. If
-* it is larger than N-1, then max( 0, N-1 ) will be used.
-*
-* KS (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, N)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least min( KA, N-1 ).
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix S.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KS=0.
-*
-* U (input) DOUBLE PRECISION array, dimension (LDU, N)
-* The orthogonal matrix in the decomposition, expressed as a
-* dense matrix (i.e., not as a product of Householder
-* transformations, Givens transformations, etc.)
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N**2+N)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dsgt01.f b/TESTING/EIG/dsgt01.f
index 351f414e..5b678d0b 100644
--- a/TESTING/EIG/dsgt01.f
+++ b/TESTING/EIG/dsgt01.f
@@ -1,88 +1,166 @@
- SUBROUTINE DSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
- $ WORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* modified August 1997, a new parameter M is added to the calling
-* sequence.
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER ITYPE, LDA, LDB, LDZ, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), D( * ), RESULT( * ),
- $ WORK( * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b DSGT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
+* WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, LDA, LDB, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), D( * ), RESULT( * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* DDGT01 checks a decomposition of the form
-*
-* A Z = B Z D or
-* A B Z = Z D or
-* B A Z = Z D
-*
-* where A is a symmetric matrix, B is
-* symmetric positive definite, Z is orthogonal, and D is diagonal.
-*
-* One of the following test ratios is computed:
-*
-* ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )
-*
-* ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )
-*
-* ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDGT01 checks a decomposition of the form
+*>
+*> A Z = B Z D or
+*> A B Z = Z D or
+*> B A Z = Z D
+*>
+*> where A is a symmetric matrix, B is
+*> symmetric positive definite, Z is orthogonal, and D is diagonal.
+*>
+*> One of the following test ratios is computed:
+*>
+*> ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )
+*>
+*> ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* The form of the symmetric generalized eigenproblem.
-* = 1: A*z = (lambda)*B*z
-* = 2: A*B*z = (lambda)*z
-* = 3: B*A*z = (lambda)*z
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrices A and B is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* M (input) INTEGER
-* The number of eigenvalues found. 0 <= M <= N.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB, N)
-* The original symmetric positive definite matrix B.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> The form of the symmetric generalized eigenproblem.
+*> = 1: A*z = (lambda)*B*z
+*> = 2: A*B*z = (lambda)*z
+*> = 3: B*A*z = (lambda)*z
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrices A and B is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenvalues found. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N)
+*> The original symmetric positive definite matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDZ, M)
+*> The computed eigenvectors of the generalized eigenproblem.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (M)
+*> The computed eigenvalues of the generalized eigenproblem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (1)
+*> The test ratio as described above.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Z (input) DOUBLE PRECISION array, dimension (LDZ, M)
-* The computed eigenvectors of the generalized eigenproblem.
+*> \date November 2011
*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
+*> \ingroup double_eig
*
-* D (input) DOUBLE PRECISION array, dimension (M)
-* The computed eigenvalues of the generalized eigenproblem.
+* =====================================================================
+ SUBROUTINE DSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
+ $ WORK, RESULT )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (1)
-* The test ratio as described above.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER ITYPE, LDA, LDB, LDZ, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), D( * ), RESULT( * ),
+ $ WORK( * ), Z( LDZ, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dslect.f b/TESTING/EIG/dslect.f
index 595f418b..fedb29da 100644
--- a/TESTING/EIG/dslect.f
+++ b/TESTING/EIG/dslect.f
@@ -1,35 +1,77 @@
- LOGICAL FUNCTION DSLECT( ZR, ZI )
+*> \brief \b DSLECT
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION ZI, ZR
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION DSLECT( ZR, ZI )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ZI, ZR
+* ..
+*
* Purpose
* =======
*
-* DSLECT returns .TRUE. if the eigenvalue ZR+sqrt(-1)*ZI is to be
-* selected, and otherwise it returns .FALSE.
-* It is used by DCHK41 to test if DGEES succesfully sorts eigenvalues,
-* and by DCHK43 to test if DGEESX succesfully sorts eigenvalues.
-*
-* The common block /SSLCT/ controls how eigenvalues are selected.
-* If SELOPT = 0, then DSLECT return .TRUE. when ZR is less than zero,
-* and .FALSE. otherwise.
-* If SELOPT is at least 1, DSLECT returns SELVAL(SELOPT) and adds 1
-* to SELOPT, cycling back to 1 at SELMAX.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSLECT returns .TRUE. if the eigenvalue ZR+sqrt(-1)*ZI is to be
+*> selected, and otherwise it returns .FALSE.
+*> It is used by DCHK41 to test if DGEES succesfully sorts eigenvalues,
+*> and by DCHK43 to test if DGEESX succesfully sorts eigenvalues.
+*>
+*> The common block /SSLCT/ controls how eigenvalues are selected.
+*> If SELOPT = 0, then DSLECT return .TRUE. when ZR is less than zero,
+*> and .FALSE. otherwise.
+*> If SELOPT is at least 1, DSLECT returns SELVAL(SELOPT) and adds 1
+*> to SELOPT, cycling back to 1 at SELMAX.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ZR (input) DOUBLE PRECISION
-* The real part of a complex eigenvalue ZR + i*ZI.
+*> \param[in] ZR
+*> \verbatim
+*> ZR is DOUBLE PRECISION
+*> The real part of a complex eigenvalue ZR + i*ZI.
+*> \endverbatim
+*>
+*> \param[in] ZI
+*> \verbatim
+*> ZI is DOUBLE PRECISION
+*> The imaginary part of a complex eigenvalue ZR + i*ZI.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ZI (input) DOUBLE PRECISION
-* The imaginary part of a complex eigenvalue ZR + i*ZI.
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION DSLECT( ZR, ZI )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ZI, ZR
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dspt21.f b/TESTING/EIG/dspt21.f
index ddd276e9..f310bb26 100644
--- a/TESTING/EIG/dspt21.f
+++ b/TESTING/EIG/dspt21.f
@@ -1,9 +1,232 @@
+*> \brief \b DSPT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
+* TAU, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), D( * ), E( * ), RESULT( 2 ), TAU( * ),
+* $ U( LDU, * ), VP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPT21 generally checks a decomposition of the form
+*>
+*> A = U S U'
+*>
+*> where ' means transpose, A is symmetric (stored in packed format), U
+*> is orthogonal, and S is diagonal (if KBAND=0) or symmetric
+*> tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as a
+*> dense matrix, otherwise the U is expressed as a product of
+*> Householder transformations, whose vectors are stored in the array
+*> "V" and whose scaling constants are in "TAU"; we shall use the
+*> letter "V" to refer to the product of Householder transformations
+*> (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT(1) = | A - V S V' | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT(1) = | I - VU' | / ( n ulp )
+*>
+*> Packed storage means that, for example, if UPLO='U', then the columns
+*> of the upper triangle of A are stored one after another, so that
+*> A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if
+*> UPLO='L', then the columns of the lower triangle of A are stored one
+*> after another in AP, so that A(j+1,j+1) immediately follows A(n,j)
+*> in the array AP. This means that A(i,j) is stored in:
+*>
+*> AP( i + j*(j-1)/2 ) if UPLO='U'
+*>
+*> AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L'
+*>
+*> The array VP bears the same relation to the matrix V that A does to
+*> AP.
+*>
+*> For ITYPE > 1, the transformation U is expressed as a product
+*> of Householder transformations:
+*>
+*> If UPLO='U', then V = H(n-1)...H(1), where
+*>
+*> H(j) = I - tau(j) v(j) v(j)'
+*>
+*> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
+*> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
+*> the j-th element is 1, and the last n-j elements are 0.
+*>
+*> If UPLO='L', then V = H(1)...H(n-1), where
+*>
+*> H(j) = I - tau(j) v(j) v(j)'
+*>
+*> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
+*> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
+*> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense orthogonal matrix:
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> 2: U expressed as a product V of Housholder transformations:
+*> RESULT(1) = | A - V S V' | / ( |A| n ulp )
+*> \endverbatim
+*> \verbatim
+*> 3: U expressed both as a dense orthogonal matrix and
+*> as a product of Housholder transformations:
+*> RESULT(1) = | I - VU' | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', AP and VP are considered to contain the upper
+*> triangle of A and V.
+*> If UPLO='L', AP and VP are considered to contain the lower
+*> triangle of A and V.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, DSPT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and contains the columns of just the upper
+*> triangle (UPLO='U') or only the lower triangle (UPLO='L'),
+*> packed one after another.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KBAND=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the orthogonal matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] VP
+*> \verbatim
+*> VP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> If ITYPE=2 or 3, the columns of this array contain the
+*> Householder vectors used to describe the orthogonal matrix
+*> in the decomposition, as described in purpose.
+*> *NOTE* If ITYPE=2 or 3, V is modified and restored. The
+*> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
+*> is set to one, and later reset to its original value, during
+*> the course of the calculation.
+*> If ITYPE=1, then it is neither referenced nor modified.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)' in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N**2+N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if ITYPE=1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DSPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
$ TAU, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,148 +237,6 @@
$ U( LDU, * ), VP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSPT21 generally checks a decomposition of the form
-*
-* A = U S U'
-*
-* where ' means transpose, A is symmetric (stored in packed format), U
-* is orthogonal, and S is diagonal (if KBAND=0) or symmetric
-* tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as a
-* dense matrix, otherwise the U is expressed as a product of
-* Householder transformations, whose vectors are stored in the array
-* "V" and whose scaling constants are in "TAU"; we shall use the
-* letter "V" to refer to the product of Householder transformations
-* (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT(1) = | A - V S V' | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT(1) = | I - VU' | / ( n ulp )
-*
-* Packed storage means that, for example, if UPLO='U', then the columns
-* of the upper triangle of A are stored one after another, so that
-* A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if
-* UPLO='L', then the columns of the lower triangle of A are stored one
-* after another in AP, so that A(j+1,j+1) immediately follows A(n,j)
-* in the array AP. This means that A(i,j) is stored in:
-*
-* AP( i + j*(j-1)/2 ) if UPLO='U'
-*
-* AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L'
-*
-* The array VP bears the same relation to the matrix V that A does to
-* AP.
-*
-* For ITYPE > 1, the transformation U is expressed as a product
-* of Householder transformations:
-*
-* If UPLO='U', then V = H(n-1)...H(1), where
-*
-* H(j) = I - tau(j) v(j) v(j)'
-*
-* and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
-* (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
-* the j-th element is 1, and the last n-j elements are 0.
-*
-* If UPLO='L', then V = H(1)...H(n-1), where
-*
-* H(j) = I - tau(j) v(j) v(j)'
-*
-* and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
-* (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
-* in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense orthogonal matrix:
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* 2: U expressed as a product V of Housholder transformations:
-* RESULT(1) = | A - V S V' | / ( |A| n ulp )
-*
-* 3: U expressed both as a dense orthogonal matrix and
-* as a product of Housholder transformations:
-* RESULT(1) = | I - VU' | / ( n ulp )
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', AP and VP are considered to contain the upper
-* triangle of A and V.
-* If UPLO='L', AP and VP are considered to contain the lower
-* triangle of A and V.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, DSPT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and contains the columns of just the upper
-* triangle (UPLO='U') or only the lower triangle (UPLO='L'),
-* packed one after another.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KBAND=0.
-*
-* U (input) DOUBLE PRECISION array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the orthogonal matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* VP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* If ITYPE=2 or 3, the columns of this array contain the
-* Householder vectors used to describe the orthogonal matrix
-* in the decomposition, as described in purpose.
-* *NOTE* If ITYPE=2 or 3, V is modified and restored. The
-* subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
-* is set to one, and later reset to its original value, during
-* the course of the calculation.
-* If ITYPE=1, then it is neither referenced nor modified.
-*
-* TAU (input) DOUBLE PRECISION array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)' in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N**2+N)
-* Workspace.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if ITYPE=1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dstech.f b/TESTING/EIG/dstech.f
index 57a52654..c702f6b0 100644
--- a/TESTING/EIG/dstech.f
+++ b/TESTING/EIG/dstech.f
@@ -1,59 +1,120 @@
- SUBROUTINE DSTECH( N, A, B, EIG, TOL, WORK, INFO )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- DOUBLE PRECISION TOL
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( * ), B( * ), EIG( * ), WORK( * )
-* ..
-*
+*> \brief \b DSTECH
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTECH( N, A, B, EIG, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* DOUBLE PRECISION TOL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( * ), B( * ), EIG( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* Let T be the tridiagonal matrix with diagonal entries A(1) ,...,
-* A(N) and offdiagonal entries B(1) ,..., B(N-1)). DSTECH checks to
-* see if EIG(1) ,..., EIG(N) are indeed accurate eigenvalues of T.
-* It does this by expanding each EIG(I) into an interval
-* [SVD(I) - EPS, SVD(I) + EPS], merging overlapping intervals if
-* any, and using Sturm sequences to count and verify whether each
-* resulting interval has the correct number of eigenvalues (using
-* DSTECT). Here EPS = TOL*MAZHEPS*MAXEIG, where MACHEPS is the
-* machine precision and MAXEIG is the absolute value of the largest
-* eigenvalue. If each interval contains the correct number of
-* eigenvalues, INFO = 0 is returned, otherwise INFO is the index of
-* the first eigenvalue in the first bad interval.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Let T be the tridiagonal matrix with diagonal entries A(1) ,...,
+*> A(N) and offdiagonal entries B(1) ,..., B(N-1)). DSTECH checks to
+*> see if EIG(1) ,..., EIG(N) are indeed accurate eigenvalues of T.
+*> It does this by expanding each EIG(I) into an interval
+*> [SVD(I) - EPS, SVD(I) + EPS], merging overlapping intervals if
+*> any, and using Sturm sequences to count and verify whether each
+*> resulting interval has the correct number of eigenvalues (using
+*> DSTECT). Here EPS = TOL*MAZHEPS*MAXEIG, where MACHEPS is the
+*> machine precision and MAXEIG is the absolute value of the largest
+*> eigenvalue. If each interval contains the correct number of
+*> eigenvalues, INFO = 0 is returned, otherwise INFO is the index of
+*> the first eigenvalue in the first bad interval.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the tridiagonal matrix T.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N)
+*> The diagonal entries of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (N-1)
+*> The offdiagonal entries of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] EIG
+*> \verbatim
+*> EIG is DOUBLE PRECISION array, dimension (N)
+*> The purported eigenvalues to be checked.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> Error tolerance for checking, a multiple of the
+*> machine precision.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 if the eigenvalues are all correct (to within
+*> 1 +- TOL*MAZHEPS*MAXEIG)
+*> >0 if the interval containing the INFO-th eigenvalue
+*> contains the incorrect number of eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal entries of the tridiagonal matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) DOUBLE PRECISION array, dimension (N-1)
-* The offdiagonal entries of the tridiagonal matrix T.
+*> \date November 2011
*
-* EIG (input) DOUBLE PRECISION array, dimension (N)
-* The purported eigenvalues to be checked.
+*> \ingroup double_eig
*
-* TOL (input) DOUBLE PRECISION
-* Error tolerance for checking, a multiple of the
-* machine precision.
+* =====================================================================
+ SUBROUTINE DSTECH( N, A, B, EIG, TOL, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* 0 if the eigenvalues are all correct (to within
-* 1 +- TOL*MAZHEPS*MAXEIG)
-* >0 if the interval containing the INFO-th eigenvalue
-* contains the incorrect number of eigenvalues.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ DOUBLE PRECISION TOL
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( * ), B( * ), EIG( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dstect.f b/TESTING/EIG/dstect.f
index bd00ebcf..e73ecf4b 100644
--- a/TESTING/EIG/dstect.f
+++ b/TESTING/EIG/dstect.f
@@ -1,46 +1,101 @@
- SUBROUTINE DSTECT( N, A, B, SHIFT, NUM )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N, NUM
- DOUBLE PRECISION SHIFT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( * ), B( * )
-* ..
-*
+*> \brief \b DSTECT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTECT( N, A, B, SHIFT, NUM )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NUM
+* DOUBLE PRECISION SHIFT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( * ), B( * )
+* ..
+*
* Purpose
* =======
*
-* DSTECT counts the number NUM of eigenvalues of a tridiagonal
-* matrix T which are less than or equal to SHIFT. T has
-* diagonal entries A(1), ... , A(N), and offdiagonal entries
-* B(1), ..., B(N-1).
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTECT counts the number NUM of eigenvalues of a tridiagonal
+*> matrix T which are less than or equal to SHIFT. T has
+*> diagonal entries A(1), ... , A(N), and offdiagonal entries
+*> B(1), ..., B(N-1).
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the tridiagonal matrix T.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N)
+*> The diagonal entries of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (N-1)
+*> The offdiagonal entries of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] SHIFT
+*> \verbatim
+*> SHIFT is DOUBLE PRECISION
+*> The shift, used as described under Purpose.
+*> \endverbatim
+*>
+*> \param[out] NUM
+*> \verbatim
+*> NUM is INTEGER
+*> The number of eigenvalues of T less than or equal
+*> to SHIFT.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal entries of the tridiagonal matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) DOUBLE PRECISION array, dimension (N-1)
-* The offdiagonal entries of the tridiagonal matrix T.
+*> \date November 2011
*
-* SHIFT (input) DOUBLE PRECISION
-* The shift, used as described under Purpose.
+*> \ingroup double_eig
*
-* NUM (output) INTEGER
-* The number of eigenvalues of T less than or equal
-* to SHIFT.
+* =====================================================================
+ SUBROUTINE DSTECT( N, A, B, SHIFT, NUM )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N, NUM
+ DOUBLE PRECISION SHIFT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( * ), B( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dstt21.f b/TESTING/EIG/dstt21.f
index 51b53c63..a166a5a6 100644
--- a/TESTING/EIG/dstt21.f
+++ b/TESTING/EIG/dstt21.f
@@ -1,75 +1,146 @@
- SUBROUTINE DSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
- $ RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KBAND, LDU, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
- $ SE( * ), U( LDU, * ), WORK( * )
-* ..
-*
+*> \brief \b DSTT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+* RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
+* $ SE( * ), U( LDU, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DSTT21 checks a decomposition of the form
-*
-* A = U S U'
-*
-* where ' means transpose, A is symmetric tridiagonal, U is orthogonal,
-* and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
-* Two tests are performed:
-*
-* RESULT(1) = | A - U S U' | / ( |A| n ulp )
-*
-* RESULT(2) = | I - UU' | / ( n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTT21 checks a decomposition of the form
+*>
+*> A = U S U'
+*>
+*> where ' means transpose, A is symmetric tridiagonal, U is orthogonal,
+*> and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
+*> Two tests are performed:
+*>
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp )
+*>
+*> RESULT(2) = | I - UU' | / ( n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, DSTT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and SE is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AD (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the original (unfactored) matrix A. A is
-* assumed to be symmetric tridiagonal.
-*
-* AE (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the original (unfactored) matrix A. A
-* is assumed to be symmetric tridiagonal. AE(1) is the (1,2)
-* and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, DSTT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and SE is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AD
+*> \verbatim
+*> AD is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the original (unfactored) matrix A. A is
+*> assumed to be symmetric tridiagonal.
+*> \endverbatim
+*>
+*> \param[in] AE
+*> \verbatim
+*> AE is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the original (unfactored) matrix A. A
+*> is assumed to be symmetric tridiagonal. AE(1) is the (1,2)
+*> and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc.
+*> \endverbatim
+*>
+*> \param[in] SD
+*> \verbatim
+*> SD is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] SE
+*> \verbatim
+*> SE is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> Not referenced if KBSND=0. If KBAND=1, then AE(1) is the
+*> (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2)
+*> element, etc.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> The orthogonal matrix in the decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N*(N+1))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SD (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SE (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* Not referenced if KBSND=0. If KBAND=1, then AE(1) is the
-* (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2)
-* element, etc.
+*> \date November 2011
*
-* U (input) DOUBLE PRECISION array, dimension (LDU, N)
-* The orthogonal matrix in the decomposition.
+*> \ingroup double_eig
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N.
+* =====================================================================
+ SUBROUTINE DSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+ $ RESULT )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N*(N+1))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified.
+* .. Scalar Arguments ..
+ INTEGER KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
+ $ SE( * ), U( LDU, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dstt22.f b/TESTING/EIG/dstt22.f
index b6a6487e..376510f2 100644
--- a/TESTING/EIG/dstt22.f
+++ b/TESTING/EIG/dstt22.f
@@ -1,81 +1,158 @@
- SUBROUTINE DSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
- $ LDWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KBAND, LDU, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
- $ SE( * ), U( LDU, * ), WORK( LDWORK, * )
-* ..
-*
+*> \brief \b DSTT22
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+* LDWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER KBAND, LDU, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
+* $ SE( * ), U( LDU, * ), WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* DSTT22 checks a set of M eigenvalues and eigenvectors,
-*
-* A U = U S
-*
-* where A is symmetric tridiagonal, the columns of U are orthogonal,
-* and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
-* Two tests are performed:
-*
-* RESULT(1) = | U' A U - S | / ( |A| m ulp )
-*
-* RESULT(2) = | I - U'U | / ( m ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSTT22 checks a set of M eigenvalues and eigenvectors,
+*>
+*> A U = U S
+*>
+*> where A is symmetric tridiagonal, the columns of U are orthogonal,
+*> and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
+*> Two tests are performed:
+*>
+*> RESULT(1) = | U' A U - S | / ( |A| m ulp )
+*>
+*> RESULT(2) = | I - U'U | / ( m ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, DSTT22 does nothing.
-* It must be at least zero.
-*
-* M (input) INTEGER
-* The number of eigenpairs to check. If it is zero, DSTT22
-* does nothing. It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and SE is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AD (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the original (unfactored) matrix A. A is
-* assumed to be symmetric tridiagonal.
-*
-* AE (input) DOUBLE PRECISION array, dimension (N)
-* The off-diagonal of the original (unfactored) matrix A. A
-* is assumed to be symmetric tridiagonal. AE(1) is ignored,
-* AE(2) is the (1,2) and (2,1) element, etc.
-*
-* SD (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, DSTT22 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenpairs to check. If it is zero, DSTT22
+*> does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and SE is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AD
+*> \verbatim
+*> AD is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the original (unfactored) matrix A. A is
+*> assumed to be symmetric tridiagonal.
+*> \endverbatim
+*>
+*> \param[in] AE
+*> \verbatim
+*> AE is DOUBLE PRECISION array, dimension (N)
+*> The off-diagonal of the original (unfactored) matrix A. A
+*> is assumed to be symmetric tridiagonal. AE(1) is ignored,
+*> AE(2) is the (1,2) and (2,1) element, etc.
+*> \endverbatim
+*>
+*> \param[in] SD
+*> \verbatim
+*> SD is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] SE
+*> \verbatim
+*> SE is DOUBLE PRECISION array, dimension (N)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> Not referenced if KBSND=0. If KBAND=1, then AE(1) is
+*> ignored, SE(2) is the (1,2) and (2,1) element, etc.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> The orthogonal matrix in the decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LDWORK, M+1)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of WORK. LDWORK must be at least
+*> max(1,M).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SE (input) DOUBLE PRECISION array, dimension (N)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* Not referenced if KBSND=0. If KBAND=1, then AE(1) is
-* ignored, SE(2) is the (1,2) and (2,1) element, etc.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (input) DOUBLE PRECISION array, dimension (LDU, N)
-* The orthogonal matrix in the decomposition.
+*> \date November 2011
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N.
+*> \ingroup double_eig
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK, M+1)
+* =====================================================================
+ SUBROUTINE DSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+ $ LDWORK, RESULT )
*
-* LDWORK (input) INTEGER
-* The leading dimension of WORK. LDWORK must be at least
-* max(1,M).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
+* .. Scalar Arguments ..
+ INTEGER KBAND, LDU, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), SD( * ),
+ $ SE( * ), U( LDU, * ), WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dsvdch.f b/TESTING/EIG/dsvdch.f
index 12faafde..9eb4577d 100644
--- a/TESTING/EIG/dsvdch.f
+++ b/TESTING/EIG/dsvdch.f
@@ -1,58 +1,116 @@
- SUBROUTINE DSVDCH( N, S, E, SVD, TOL, INFO )
+*> \brief \b DSVDCH
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- DOUBLE PRECISION TOL
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION E( * ), S( * ), SVD( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSVDCH( N, S, E, SVD, TOL, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* DOUBLE PRECISION TOL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION E( * ), S( * ), SVD( * )
+* ..
+*
* Purpose
* =======
*
-* DSVDCH checks to see if SVD(1) ,..., SVD(N) are accurate singular
-* values of the bidiagonal matrix B with diagonal entries
-* S(1) ,..., S(N) and superdiagonal entries E(1) ,..., E(N-1)).
-* It does this by expanding each SVD(I) into an interval
-* [SVD(I) * (1-EPS) , SVD(I) * (1+EPS)], merging overlapping intervals
-* if any, and using Sturm sequences to count and verify whether each
-* resulting interval has the correct number of singular values (using
-* DSVDCT). Here EPS=TOL*MAX(N/10,1)*MAZHEP, where MACHEP is the
-* machine precision. The routine assumes the singular values are sorted
-* with SVD(1) the largest and SVD(N) smallest. If each interval
-* contains the correct number of singular values, INFO = 0 is returned,
-* otherwise INFO is the index of the first singular value in the first
-* bad interval.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSVDCH checks to see if SVD(1) ,..., SVD(N) are accurate singular
+*> values of the bidiagonal matrix B with diagonal entries
+*> S(1) ,..., S(N) and superdiagonal entries E(1) ,..., E(N-1)).
+*> It does this by expanding each SVD(I) into an interval
+*> [SVD(I) * (1-EPS) , SVD(I) * (1+EPS)], merging overlapping intervals
+*> if any, and using Sturm sequences to count and verify whether each
+*> resulting interval has the correct number of singular values (using
+*> DSVDCT). Here EPS=TOL*MAX(N/10,1)*MAZHEP, where MACHEP is the
+*> machine precision. The routine assumes the singular values are sorted
+*> with SVD(1) the largest and SVD(N) smallest. If each interval
+*> contains the correct number of singular values, INFO = 0 is returned,
+*> otherwise INFO is the index of the first singular value in the first
+*> bad interval.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The diagonal entries of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The superdiagonal entries of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] SVD
+*> \verbatim
+*> SVD is DOUBLE PRECISION array, dimension (N)
+*> The computed singular values to be checked.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is DOUBLE PRECISION
+*> Error tolerance for checking, a multiplier of the
+*> machine precision.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0 if the singular values are all correct (to within
+*> 1 +- TOL*MAZHEPS)
+*> >0 if the interval containing the INFO-th singular value
+*> contains the incorrect number of singular values.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The dimension of the bidiagonal matrix B.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal entries of the bidiagonal matrix B.
+*> \date November 2011
*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The superdiagonal entries of the bidiagonal matrix B.
+*> \ingroup double_eig
*
-* SVD (input) DOUBLE PRECISION array, dimension (N)
-* The computed singular values to be checked.
+* =====================================================================
+ SUBROUTINE DSVDCH( N, S, E, SVD, TOL, INFO )
*
-* TOL (input) DOUBLE PRECISION
-* Error tolerance for checking, a multiplier of the
-* machine precision.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* =0 if the singular values are all correct (to within
-* 1 +- TOL*MAZHEPS)
-* >0 if the interval containing the INFO-th singular value
-* contains the incorrect number of singular values.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ DOUBLE PRECISION TOL
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION E( * ), S( * ), SVD( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dsvdct.f b/TESTING/EIG/dsvdct.f
index 943b1f86..fa22a10a 100644
--- a/TESTING/EIG/dsvdct.f
+++ b/TESTING/EIG/dsvdct.f
@@ -1,51 +1,106 @@
- SUBROUTINE DSVDCT( N, S, E, SHIFT, NUM )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N, NUM
- DOUBLE PRECISION SHIFT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION E( * ), S( * )
-* ..
-*
+*> \brief \b DSVDCT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSVDCT( N, S, E, SHIFT, NUM )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NUM
+* DOUBLE PRECISION SHIFT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION E( * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* DSVDCT counts the number NUM of eigenvalues of a 2*N by 2*N
-* tridiagonal matrix T which are less than or equal to SHIFT. T is
-* formed by putting zeros on the diagonal and making the off-diagonals
-* equal to S(1), E(1), S(2), E(2), ... , E(N-1), S(N). If SHIFT is
-* positive, NUM is equal to N plus the number of singular values of a
-* bidiagonal matrix B less than or equal to SHIFT. Here B has diagonal
-* entries S(1), ..., S(N) and superdiagonal entries E(1), ... E(N-1).
-* If SHIFT is negative, NUM is equal to the number of singular values
-* of B greater than or equal to -SHIFT.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford University,
-* July 21, 1966
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSVDCT counts the number NUM of eigenvalues of a 2*N by 2*N
+*> tridiagonal matrix T which are less than or equal to SHIFT. T is
+*> formed by putting zeros on the diagonal and making the off-diagonals
+*> equal to S(1), E(1), S(2), E(2), ... , E(N-1), S(N). If SHIFT is
+*> positive, NUM is equal to N plus the number of singular values of a
+*> bidiagonal matrix B less than or equal to SHIFT. Here B has diagonal
+*> entries S(1), ..., S(N) and superdiagonal entries E(1), ... E(N-1).
+*> If SHIFT is negative, NUM is equal to the number of singular values
+*> of B greater than or equal to -SHIFT.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford University,
+*> July 21, 1966
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the bidiagonal matrix B.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The diagonal entries of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array of dimension (N-1)
+*> The superdiagonal entries of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] SHIFT
+*> \verbatim
+*> SHIFT is DOUBLE PRECISION
+*> The shift, used as described under Purpose.
+*> \endverbatim
+*>
+*> \param[out] NUM
+*> \verbatim
+*> NUM is INTEGER
+*> The number of eigenvalues of T less than or equal to SHIFT.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal entries of the bidiagonal matrix B.
+*> \date November 2011
*
-* E (input) DOUBLE PRECISION array of dimension (N-1)
-* The superdiagonal entries of the bidiagonal matrix B.
+*> \ingroup double_eig
*
-* SHIFT (input) DOUBLE PRECISION
-* The shift, used as described under Purpose.
+* =====================================================================
+ SUBROUTINE DSVDCT( N, S, E, SHIFT, NUM )
*
-* NUM (output) INTEGER
-* The number of eigenvalues of T less than or equal to SHIFT.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N, NUM
+ DOUBLE PRECISION SHIFT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION E( * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dsxt1.f b/TESTING/EIG/dsxt1.f
index 632cc97e..256fcfb5 100644
--- a/TESTING/EIG/dsxt1.f
+++ b/TESTING/EIG/dsxt1.f
@@ -1,60 +1,125 @@
- DOUBLE PRECISION FUNCTION DSXT1( IJOB, D1, N1, D2, N2, ABSTOL,
- $ ULP, UNFL )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IJOB, N1, N2
- DOUBLE PRECISION ABSTOL, ULP, UNFL
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D1( * ), D2( * )
-* ..
-*
+*> \brief \b DSXT1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DSXT1( IJOB, D1, N1, D2, N2, ABSTOL,
+* ULP, UNFL )
+*
+* .. Scalar Arguments ..
+* INTEGER IJOB, N1, N2
+* DOUBLE PRECISION ABSTOL, ULP, UNFL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D1( * ), D2( * )
+* ..
+*
* Purpose
* =======
*
-* DSXT1 computes the difference between a set of eigenvalues.
-* The result is returned as the function value.
-*
-* IJOB = 1: Computes max { min | D1(i)-D2(j) | }
-* i j
-*
-* IJOB = 2: Computes max { min | D1(i)-D2(j) | /
-* i j
-* ( ABSTOL + |D1(i)|*ULP ) }
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSXT1 computes the difference between a set of eigenvalues.
+*> The result is returned as the function value.
+*>
+*> IJOB = 1: Computes max { min | D1(i)-D2(j) | }
+*> i j
+*>
+*> IJOB = 2: Computes max { min | D1(i)-D2(j) | /
+*> i j
+*> ( ABSTOL + |D1(i)|*ULP ) }
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed. (See above.)
-*
-* D1 (input) DOUBLE PRECISION array, dimension (N1)
-* The first array. D1 should be in increasing order, i.e.,
-* D1(j) <= D1(j+1).
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed. (See above.)
+*> \endverbatim
+*>
+*> \param[in] D1
+*> \verbatim
+*> D1 is DOUBLE PRECISION array, dimension (N1)
+*> The first array. D1 should be in increasing order, i.e.,
+*> D1(j) <= D1(j+1).
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The length of D1.
+*> \endverbatim
+*>
+*> \param[in] D2
+*> \verbatim
+*> D2 is DOUBLE PRECISION array, dimension (N2)
+*> The second array. D2 should be in increasing order, i.e.,
+*> D2(j) <= D2(j+1).
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> The length of D2.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is DOUBLE PRECISION
+*> The absolute tolerance, used as a measure of the error.
+*> \endverbatim
+*>
+*> \param[in] ULP
+*> \verbatim
+*> ULP is DOUBLE PRECISION
+*> Machine precision.
+*> \endverbatim
+*>
+*> \param[in] UNFL
+*> \verbatim
+*> UNFL is DOUBLE PRECISION
+*> The smallest positive number whose reciprocal does not
+*> overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N1 (input) INTEGER
-* The length of D1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D2 (input) DOUBLE PRECISION array, dimension (N2)
-* The second array. D2 should be in increasing order, i.e.,
-* D2(j) <= D2(j+1).
+*> \date November 2011
*
-* N2 (input) INTEGER
-* The length of D2.
+*> \ingroup double_eig
*
-* ABSTOL (input) DOUBLE PRECISION
-* The absolute tolerance, used as a measure of the error.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DSXT1( IJOB, D1, N1, D2, N2, ABSTOL,
+ $ ULP, UNFL )
*
-* ULP (input) DOUBLE PRECISION
-* Machine precision.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* UNFL (input) DOUBLE PRECISION
-* The smallest positive number whose reciprocal does not
-* overflow.
+* .. Scalar Arguments ..
+ INTEGER IJOB, N1, N2
+ DOUBLE PRECISION ABSTOL, ULP, UNFL
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D1( * ), D2( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/dsyt21.f b/TESTING/EIG/dsyt21.f
index f8a3a91e..c908b3cd 100644
--- a/TESTING/EIG/dsyt21.f
+++ b/TESTING/EIG/dsyt21.f
@@ -1,9 +1,218 @@
+*> \brief \b DSYT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYT21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
+* LDV, TAU, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDA, LDU, LDV, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), RESULT( 2 ),
+* $ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYT21 generally checks a decomposition of the form
+*>
+*> A = U S U'
+*>
+*> where ' means transpose, A is symmetric, U is orthogonal, and S is
+*> diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
+*>
+*> If ITYPE=1, then U is represented as a dense matrix; otherwise U is
+*> expressed as a product of Householder transformations, whose vectors
+*> are stored in the array "V" and whose scaling constants are in "TAU".
+*> We shall use the letter "V" to refer to the product of Householder
+*> transformations (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT(1) = | A - V S V' | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT(1) = | I - VU' | / ( n ulp )
+*>
+*> For ITYPE > 1, the transformation U is expressed as a product
+*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)' and each
+*> vector v(j) has its first j elements 0 and the remaining n-j elements
+*> stored in V(j+1:n,j).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense orthogonal matrix:
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> 2: U expressed as a product V of Housholder transformations:
+*> RESULT(1) = | A - V S V' | / ( |A| n ulp )
+*> \endverbatim
+*> \verbatim
+*> 3: U expressed both as a dense orthogonal matrix and
+*> as a product of Housholder transformations:
+*> RESULT(1) = | I - VU' | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, DSYT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KBAND=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the orthogonal matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is DOUBLE PRECISION array, dimension (LDV, N)
+*> If ITYPE=2 or 3, the columns of this array contain the
+*> Householder vectors used to describe the orthogonal matrix
+*> in the decomposition. If UPLO='L', then the vectors are in
+*> the lower triangle, if UPLO='U', then in the upper
+*> triangle.
+*> *NOTE* If ITYPE=2 or 3, V is modified and restored. The
+*> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
+*> is set to one, and later reset to its original value, during
+*> the course of the calculation.
+*> If ITYPE=1, then it is neither referenced nor modified.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)' in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N**2)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if ITYPE=1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DSYT21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
$ LDV, TAU, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,128 +223,6 @@
$ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYT21 generally checks a decomposition of the form
-*
-* A = U S U'
-*
-* where ' means transpose, A is symmetric, U is orthogonal, and S is
-* diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
-*
-* If ITYPE=1, then U is represented as a dense matrix; otherwise U is
-* expressed as a product of Householder transformations, whose vectors
-* are stored in the array "V" and whose scaling constants are in "TAU".
-* We shall use the letter "V" to refer to the product of Householder
-* transformations (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT(1) = | A - V S V' | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT(1) = | I - VU' | / ( n ulp )
-*
-* For ITYPE > 1, the transformation U is expressed as a product
-* V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)' and each
-* vector v(j) has its first j elements 0 and the remaining n-j elements
-* stored in V(j+1:n,j).
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense orthogonal matrix:
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* 2: U expressed as a product V of Housholder transformations:
-* RESULT(1) = | A - V S V' | / ( |A| n ulp )
-*
-* 3: U expressed both as a dense orthogonal matrix and
-* as a product of Housholder transformations:
-* RESULT(1) = | I - VU' | / ( n ulp )
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, DSYT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, N)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KBAND=0.
-*
-* U (input) DOUBLE PRECISION array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the orthogonal matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) DOUBLE PRECISION array, dimension (LDV, N)
-* If ITYPE=2 or 3, the columns of this array contain the
-* Householder vectors used to describe the orthogonal matrix
-* in the decomposition. If UPLO='L', then the vectors are in
-* the lower triangle, if UPLO='U', then in the upper
-* triangle.
-* *NOTE* If ITYPE=2 or 3, V is modified and restored. The
-* subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
-* is set to one, and later reset to its original value, during
-* the course of the calculation.
-* If ITYPE=1, then it is neither referenced nor modified.
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* TAU (input) DOUBLE PRECISION array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)' in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N**2)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if ITYPE=1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/dsyt22.f b/TESTING/EIG/dsyt22.f
index 4d4afbb9..23ecdbf5 100644
--- a/TESTING/EIG/dsyt22.f
+++ b/TESTING/EIG/dsyt22.f
@@ -1,9 +1,181 @@
+*> \brief \b DSYT22
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYT22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
+* V, LDV, TAU, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDA, LDU, LDV, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), RESULT( 2 ),
+* $ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYT22 generally checks a decomposition of the form
+*>
+*> A U = U S
+*>
+*> where A is symmetric, the columns of U are orthonormal, and S
+*> is diagonal (if KBAND=0) or symmetric tridiagonal (if
+*> KBAND=1). If ITYPE=1, then U is represented as a dense matrix,
+*> otherwise the U is expressed as a product of Householder
+*> transformations, whose vectors are stored in the array "V" and
+*> whose scaling constants are in "TAU"; we shall use the letter
+*> "V" to refer to the product of Householder transformations
+*> (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | U' A U - S | / ( |A| m ulp ) *andC> RESULT(2) = | I - U'U | / ( m ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> ITYPE INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense orthogonal matrix:
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> UPLO CHARACTER
+*> If UPLO='U', the upper triangle of A will be used and the
+*> (strictly) lower triangle will not be referenced. If
+*> UPLO='L', the lower triangle of A will be used and the
+*> (strictly) upper triangle will not be referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> N INTEGER
+*> The size of the matrix. If it is zero, DSYT22 does nothing.
+*> It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> M INTEGER
+*> The number of columns of U. If it is zero, DSYT22 does
+*> nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> KBAND INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A DOUBLE PRECISION array, dimension (LDA , N)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> E DOUBLE PRECISION array, dimension (N)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc.
+*> Not referenced if KBAND=0.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> U DOUBLE PRECISION array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the orthogonal matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDU INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> V DOUBLE PRECISION array, dimension (LDV, N)
+*> If ITYPE=2 or 3, the lower triangle of this array contains
+*> the Householder vectors used to describe the orthogonal
+*> matrix in the decomposition. If ITYPE=1, then it is not
+*> referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDV INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> TAU DOUBLE PRECISION array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)' in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> WORK DOUBLE PRECISION array, dimension (2*N**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if LDU is at least N.
+*> Modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_eig
+*
+* =====================================================================
SUBROUTINE DSYT22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
$ V, LDV, TAU, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,121 +186,6 @@
$ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYT22 generally checks a decomposition of the form
-*
-* A U = U S
-*
-* where A is symmetric, the columns of U are orthonormal, and S
-* is diagonal (if KBAND=0) or symmetric tridiagonal (if
-* KBAND=1). If ITYPE=1, then U is represented as a dense matrix,
-* otherwise the U is expressed as a product of Householder
-* transformations, whose vectors are stored in the array "V" and
-* whose scaling constants are in "TAU"; we shall use the letter
-* "V" to refer to the product of Householder transformations
-* (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | U' A U - S | / ( |A| m ulp ) *and*
-* RESULT(2) = | I - U'U | / ( m ulp )
-*
-* Arguments
-* =========
-*
-* ITYPE INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense orthogonal matrix:
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* UPLO CHARACTER
-* If UPLO='U', the upper triangle of A will be used and the
-* (strictly) lower triangle will not be referenced. If
-* UPLO='L', the lower triangle of A will be used and the
-* (strictly) upper triangle will not be referenced.
-* Not modified.
-*
-* N INTEGER
-* The size of the matrix. If it is zero, DSYT22 does nothing.
-* It must be at least zero.
-* Not modified.
-*
-* M INTEGER
-* The number of columns of U. If it is zero, DSYT22 does
-* nothing. It must be at least zero.
-* Not modified.
-*
-* KBAND INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-* Not modified.
-*
-* A DOUBLE PRECISION array, dimension (LDA , N)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-* Not modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-* Not modified.
-*
-* D DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-* Not modified.
-*
-* E DOUBLE PRECISION array, dimension (N)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc.
-* Not referenced if KBAND=0.
-* Not modified.
-*
-* U DOUBLE PRECISION array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the orthogonal matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-* Not modified.
-*
-* LDU INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-* Not modified.
-*
-* V DOUBLE PRECISION array, dimension (LDV, N)
-* If ITYPE=2 or 3, the lower triangle of this array contains
-* the Householder vectors used to describe the orthogonal
-* matrix in the decomposition. If ITYPE=1, then it is not
-* referenced.
-* Not modified.
-*
-* LDV INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-* Not modified.
-*
-* TAU DOUBLE PRECISION array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)' in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-* Not modified.
-*
-* WORK DOUBLE PRECISION array, dimension (2*N**2)
-* Workspace.
-* Modified.
-*
-* RESULT DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if LDU is at least N.
-* Modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ilaenv.f b/TESTING/EIG/ilaenv.f
index 3d0f863e..edbd030d 100644
--- a/TESTING/EIG/ilaenv.f
+++ b/TESTING/EIG/ilaenv.f
@@ -1,100 +1,173 @@
- INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
- $ N4 )
+*> \brief \b ILAENV
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*( * ) NAME, OPTS
- INTEGER ISPEC, N1, N2, N3, N4
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
+* N4 )
+*
+* .. Scalar Arguments ..
+* CHARACTER*( * ) NAME, OPTS
+* INTEGER ISPEC, N1, N2, N3, N4
+* ..
+*
* Purpose
* =======
*
-* ILAENV returns problem-dependent parameters for the local
-* environment. See ISPEC for a description of the parameters.
-*
-* In this version, the problem-dependent parameters are contained in
-* the integer array IPARMS in the common block CLAENV and the value
-* with index ISPEC is copied to ILAENV. This version of ILAENV is
-* to be used in conjunction with XLAENV in TESTING and TIMING.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILAENV returns problem-dependent parameters for the local
+*> environment. See ISPEC for a description of the parameters.
+*>
+*> In this version, the problem-dependent parameters are contained in
+*> the integer array IPARMS in the common block CLAENV and the value
+*> with index ISPEC is copied to ILAENV. This version of ILAENV is
+*> to be used in conjunction with XLAENV in TESTING and TIMING.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISPEC (input) INTEGER
-* Specifies the parameter to be returned as the value of
-* ILAENV.
-* = 1: the optimal blocksize; if this value is 1, an unblocked
-* algorithm will give the best performance.
-* = 2: the minimum block size for which the block routine
-* should be used; if the usable block size is less than
-* this value, an unblocked routine should be used.
-* = 3: the crossover point (in a block routine, for N less
-* than this value, an unblocked routine should be used)
-* = 4: the number of shifts, used in the nonsymmetric
-* eigenvalue routines
-* = 5: the minimum column dimension for blocking to be used;
-* rectangular blocks must have dimension at least k by m,
-* where k is given by ILAENV(2,...) and m by ILAENV(5,...)
-* = 6: the crossover point for the SVD (when reducing an m by n
-* matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
-* this value, a QR factorization is used first to reduce
-* the matrix to a triangular form.)
-* = 7: the number of processors
-* = 8: the crossover point for the multishift QR and QZ methods
-* for nonsymmetric eigenvalue problems.
-* = 9: maximum size of the subproblems at the bottom of the
-* computation tree in the divide-and-conquer algorithm
-* =10: ieee NaN arithmetic can be trusted not to trap
-* =11: infinity arithmetic can be trusted not to trap
-* 12 <= ISPEC <= 16:
-* xHSEQR or one of its subroutines,
-* see IPARMQ for detailed explanation
-*
-* Other specifications (up to 100) can be added later.
-*
-* NAME (input) CHARACTER*(*)
-* The name of the calling subroutine.
-*
-* OPTS (input) CHARACTER*(*)
-* The character options to the subroutine NAME, concatenated
-* into a single character string. For example, UPLO = 'U',
-* TRANS = 'T', and DIAG = 'N' for a triangular routine would
-* be specified as OPTS = 'UTN'.
-*
-* N1 (input) INTEGER
-* N2 (input) INTEGER
-* N3 (input) INTEGER
-* N4 (input) INTEGER
-* Problem dimensions for the subroutine NAME; these may not all
-* be required.
-*
-* (ILAENV) (output) INTEGER
-* >= 0: the value of the parameter specified by ISPEC
-* < 0: if ILAENV = -k, the k-th argument had an illegal value.
+*> \param[in] ISPEC
+*> \verbatim
+*> ISPEC is INTEGER
+*> Specifies the parameter to be returned as the value of
+*> ILAENV.
+*> = 1: the optimal blocksize; if this value is 1, an unblocked
+*> algorithm will give the best performance.
+*> = 2: the minimum block size for which the block routine
+*> should be used; if the usable block size is less than
+*> this value, an unblocked routine should be used.
+*> = 3: the crossover point (in a block routine, for N less
+*> than this value, an unblocked routine should be used)
+*> = 4: the number of shifts, used in the nonsymmetric
+*> eigenvalue routines
+*> = 5: the minimum column dimension for blocking to be used;
+*> rectangular blocks must have dimension at least k by m,
+*> where k is given by ILAENV(2,...) and m by ILAENV(5,...)
+*> = 6: the crossover point for the SVD (when reducing an m by n
+*> matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
+*> this value, a QR factorization is used first to reduce
+*> the matrix to a triangular form.)
+*> = 7: the number of processors
+*> = 8: the crossover point for the multishift QR and QZ methods
+*> for nonsymmetric eigenvalue problems.
+*> = 9: maximum size of the subproblems at the bottom of the
+*> computation tree in the divide-and-conquer algorithm
+*> =10: ieee NaN arithmetic can be trusted not to trap
+*> =11: infinity arithmetic can be trusted not to trap
+*> 12 <= ISPEC <= 16:
+*> xHSEQR or one of its subroutines,
+*> see IPARMQ for detailed explanation
+*> \endverbatim
+*> \verbatim
+*> Other specifications (up to 100) can be added later.
+*> \endverbatim
+*>
+*> \param[in] NAME
+*> \verbatim
+*> NAME is CHARACTER*(*)
+*> The name of the calling subroutine.
+*> \endverbatim
+*>
+*> \param[in] OPTS
+*> \verbatim
+*> OPTS is CHARACTER*(*)
+*> The character options to the subroutine NAME, concatenated
+*> into a single character string. For example, UPLO = 'U',
+*> TRANS = 'T', and DIAG = 'N' for a triangular routine would
+*> be specified as OPTS = 'UTN'.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N3
+*> \verbatim
+*> N3 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N4
+*> \verbatim
+*> N4 is INTEGER
+*> \endverbatim
+*> \verbatim
+*> Problem dimensions for the subroutine NAME; these may not all
+*> be required.
+*> \endverbatim
+*>
+*> \param[out] (ILAENV)
+*> \verbatim
+*> (ILAENV) is INTEGER
+*> >= 0: the value of the parameter specified by ISPEC
+*> < 0: if ILAENV = -k, the k-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_eig
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The following conventions have been used when calling ILAENV from the
+*> LAPACK routines:
+*> 1) OPTS is a concatenation of all of the character options to
+*> subroutine NAME, in the same order that they appear in the
+*> argument list for NAME, even if they are not used in determining
+*> the value of the parameter specified by ISPEC.
+*> 2) The problem dimensions N1, N2, N3, N4 are specified in the order
+*> that they appear in the argument list for NAME. N1 is used
+*> first, N2 second, and so on, and unused problem dimensions are
+*> passed a value of -1.
+*> 3) The parameter value returned by ILAENV is checked for validity in
+*> the calling subroutine. For example, ILAENV is used to retrieve
+*> the optimal blocksize for STRTRI as follows:
+*>
+*> NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
+*> IF( NB.LE.1 ) NB = MAX( 1, N )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
+ $ N4 )
*
-* The following conventions have been used when calling ILAENV from the
-* LAPACK routines:
-* 1) OPTS is a concatenation of all of the character options to
-* subroutine NAME, in the same order that they appear in the
-* argument list for NAME, even if they are not used in determining
-* the value of the parameter specified by ISPEC.
-* 2) The problem dimensions N1, N2, N3, N4 are specified in the order
-* that they appear in the argument list for NAME. N1 is used
-* first, N2 second, and so on, and unused problem dimensions are
-* passed a value of -1.
-* 3) The parameter value returned by ILAENV is checked for validity in
-* the calling subroutine. For example, ILAENV is used to retrieve
-* the optimal blocksize for STRTRI as follows:
-*
-* NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
-* IF( NB.LE.1 ) NB = MAX( 1, N )
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*( * ) NAME, OPTS
+ INTEGER ISPEC, N1, N2, N3, N4
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sbdt01.f b/TESTING/EIG/sbdt01.f
index ec05b34c..66d47ad2 100644
--- a/TESTING/EIG/sbdt01.f
+++ b/TESTING/EIG/sbdt01.f
@@ -1,79 +1,160 @@
- SUBROUTINE SBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KD, LDA, LDPT, LDQ, M, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), D( * ), E( * ), PT( LDPT, * ),
- $ Q( LDQ, * ), WORK( * )
-* ..
-*
+*> \brief \b SBDT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER KD, LDA, LDPT, LDQ, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), PT( LDPT, * ),
+* $ Q( LDQ, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SBDT01 reconstructs a general matrix A from its bidiagonal form
-* A = Q * B * P'
-* where Q (m by min(m,n)) and P' (min(m,n) by n) are orthogonal
-* matrices and B is bidiagonal.
-*
-* The test ratio to test the reduction is
-* RESID = norm( A - Q * B * PT ) / ( n * norm(A) * EPS )
-* where PT = P' and EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SBDT01 reconstructs a general matrix A from its bidiagonal form
+*> A = Q * B * P'
+*> where Q (m by min(m,n)) and P' (min(m,n) by n) are orthogonal
+*> matrices and B is bidiagonal.
+*>
+*> The test ratio to test the reduction is
+*> RESID = norm( A - Q * B * PT ) / ( n * norm(A) * EPS )
+*> where PT = P' and EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and Q.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and P'.
-*
-* KD (input) INTEGER
-* If KD = 0, B is diagonal and the array E is not referenced.
-* If KD = 1, the reduction was performed by xGEBRD; B is upper
-* bidiagonal if M >= N, and lower bidiagonal if M < N.
-* If KD = -1, the reduction was performed by xGBBRD; B is
-* always upper bidiagonal.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* Q (input) REAL array, dimension (LDQ,N)
-* The m by min(m,n) orthogonal matrix Q in the reduction
-* A = Q * B * P'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and P'.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> If KD = 0, B is diagonal and the array E is not referenced.
+*> If KD = 1, the reduction was performed by xGEBRD; B is upper
+*> bidiagonal if M >= N, and lower bidiagonal if M < N.
+*> If KD = -1, the reduction was performed by xGBBRD; B is
+*> always upper bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> The m by min(m,n) orthogonal matrix Q in the reduction
+*> A = Q * B * P'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (min(M,N)-1)
+*> The superdiagonal elements of the bidiagonal matrix B if
+*> m >= n, or the subdiagonal elements of B if m < n.
+*> \endverbatim
+*>
+*> \param[in] PT
+*> \verbatim
+*> PT is REAL array, dimension (LDPT,N)
+*> The min(m,n) by n orthogonal matrix P' in the reduction
+*> A = Q * B * P'.
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the array PT.
+*> LDPT >= max(1,min(M,N)).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (M+N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The test ratio: norm(A - Q * B * P') / ( n * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input) REAL array, dimension (min(M,N)-1)
-* The superdiagonal elements of the bidiagonal matrix B if
-* m >= n, or the subdiagonal elements of B if m < n.
+*> \date November 2011
*
-* PT (input) REAL array, dimension (LDPT,N)
-* The min(m,n) by n orthogonal matrix P' in the reduction
-* A = Q * B * P'.
+*> \ingroup single_eig
*
-* LDPT (input) INTEGER
-* The leading dimension of the array PT.
-* LDPT >= max(1,min(M,N)).
+* =====================================================================
+ SUBROUTINE SBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
+ $ RESID )
*
-* WORK (workspace) REAL array, dimension (M+N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The test ratio: norm(A - Q * B * P') / ( n * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER KD, LDA, LDPT, LDQ, M, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), D( * ), E( * ), PT( LDPT, * ),
+ $ Q( LDQ, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sbdt02.f b/TESTING/EIG/sbdt02.f
index e90357b0..55629e77 100644
--- a/TESTING/EIG/sbdt02.f
+++ b/TESTING/EIG/sbdt02.f
@@ -1,60 +1,131 @@
- SUBROUTINE SBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDC, LDU, M, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL B( LDB, * ), C( LDC, * ), U( LDU, * ),
- $ WORK( * )
-* ..
-*
+*> \brief \b SBDT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDC, LDU, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), C( LDC, * ), U( LDU, * ),
+* $ WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SBDT02 tests the change of basis C = U' * B by computing the residual
-*
-* RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
-*
-* where B and C are M by N matrices, U is an M by M orthogonal matrix,
-* and EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SBDT02 tests the change of basis C = U' * B by computing the residual
+*>
+*> RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+*>
+*> where B and C are M by N matrices, U is an M by M orthogonal matrix,
+*> and EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices B and C and the order of
-* the matrix Q.
-*
-* N (input) INTEGER
-* The number of columns of the matrices B and C.
-*
-* B (input) REAL array, dimension (LDB,N)
-* The m by n matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices B and C and the order of
+*> the matrix Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices B and C.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> The m by n matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> The m by n matrix C, assumed to contain U' * B.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,M)
+*> The m by m orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* C (input) REAL array, dimension (LDC,N)
-* The m by n matrix C, assumed to contain U' * B.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
+*> \date November 2011
*
-* U (input) REAL array, dimension (LDU,M)
-* The m by m orthogonal matrix U.
+*> \ingroup single_eig
*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
+* =====================================================================
+ SUBROUTINE SBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RESID )
*
-* WORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+* .. Scalar Arguments ..
+ INTEGER LDB, LDC, LDU, M, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL B( LDB, * ), C( LDC, * ), U( LDU, * ),
+ $ WORK( * )
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/sbdt03.f b/TESTING/EIG/sbdt03.f
index ac676dba..4578ea1e 100644
--- a/TESTING/EIG/sbdt03.f
+++ b/TESTING/EIG/sbdt03.f
@@ -1,9 +1,146 @@
+*> \brief \b SBDT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SBDT03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDU, LDVT, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL D( * ), E( * ), S( * ), U( LDU, * ),
+* $ VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SBDT03 reconstructs a bidiagonal matrix B from its SVD:
+*> S = U' * B * V
+*> where U and V are orthogonal matrices and S is diagonal.
+*>
+*> The test ratio to test the singular value decomposition is
+*> RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS )
+*> where VT = V' and EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix B is upper or lower bidiagonal.
+*> = 'U': Upper bidiagonal
+*> = 'L': Lower bidiagonal
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The bandwidth of the bidiagonal matrix B. If KD = 1, the
+*> matrix B is bidiagonal, and if KD = 0, B is diagonal and E is
+*> not referenced. If KD is greater than 1, it is assumed to be
+*> 1, and if KD is less than 0, it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) superdiagonal elements of the bidiagonal matrix B
+*> if UPLO = 'U', or the (n-1) subdiagonal elements of B if
+*> UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,N)
+*> The n by n orthogonal matrix U in the reduction B = U'*A*P.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The singular values from the SVD of B, sorted in decreasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT,N)
+*> The n by n orthogonal matrix V' in the reduction
+*> B = U * S * V'.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SBDT03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,64 +152,6 @@
$ VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SBDT03 reconstructs a bidiagonal matrix B from its SVD:
-* S = U' * B * V
-* where U and V are orthogonal matrices and S is diagonal.
-*
-* The test ratio to test the singular value decomposition is
-* RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS )
-* where VT = V' and EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix B is upper or lower bidiagonal.
-* = 'U': Upper bidiagonal
-* = 'L': Lower bidiagonal
-*
-* N (input) INTEGER
-* The order of the matrix B.
-*
-* KD (input) INTEGER
-* The bandwidth of the bidiagonal matrix B. If KD = 1, the
-* matrix B is bidiagonal, and if KD = 0, B is diagonal and E is
-* not referenced. If KD is greater than 1, it is assumed to be
-* 1, and if KD is less than 0, it is assumed to be 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the bidiagonal matrix B.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) superdiagonal elements of the bidiagonal matrix B
-* if UPLO = 'U', or the (n-1) subdiagonal elements of B if
-* UPLO = 'L'.
-*
-* U (input) REAL array, dimension (LDU,N)
-* The n by n orthogonal matrix U in the reduction B = U'*A*P.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,N)
-*
-* S (input) REAL array, dimension (N)
-* The singular values from the SVD of B, sorted in decreasing
-* order.
-*
-* VT (input) REAL array, dimension (LDVT,N)
-* The n by n orthogonal matrix V' in the reduction
-* B = U * S * V'.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT.
-*
-* WORK (workspace) REAL array, dimension (2*N)
-*
-* RESID (output) REAL
-* The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS )
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/schkbb.f b/TESTING/EIG/schkbb.f
index a28106c3..a13ff601 100644
--- a/TESTING/EIG/schkbb.f
+++ b/TESTING/EIG/schkbb.f
@@ -1,11 +1,369 @@
+*> \brief \b SCHKBB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKBB( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
+* NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
+* BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
+* LWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
+* $ NRHS, NSIZES, NTYPES, NWDTHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), KK( * ), MVAL( * ), NVAL( * )
+* REAL A( LDA, * ), AB( LDAB, * ), BD( * ), BE( * ),
+* $ C( LDC, * ), CC( LDC, * ), P( LDP, * ),
+* $ Q( LDQ, * ), RESULT( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKBB tests the reduction of a general real rectangular band
+*> matrix to bidiagonal form.
+*>
+*> SGBBRD factors a general band matrix A as Q B P* , where * means
+*> transpose, B is upper bidiagonal, and Q and P are orthogonal;
+*> SGBBRD can also overwrite a given matrix C with Q* C .
+*>
+*> For each pair of matrix dimensions (M,N) and each selected matrix
+*> type, an M by N matrix A and an M by NRHS matrix C are generated.
+*> The problem dimensions are as follows
+*> A: M x N
+*> Q: M x M
+*> P: N x N
+*> B: min(M,N) x min(M,N)
+*> C: M x NRHS
+*>
+*> For each generated matrix, 4 tests are performed:
+*>
+*> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
+*>
+*> (2) | I - Q' Q | / ( M ulp )
+*>
+*> (3) | I - PT PT' | / ( N ulp )
+*>
+*> (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
+*>
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> The possible matrix types are
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (3), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (3), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U D V, where U and V are orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U D V, where U and V are orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Rectangular matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of values of M and N contained in the vectors
+*> MVAL and NVAL. The matrix sizes are used in pairs (M,N).
+*> If NSIZES is zero, SCHKBB does nothing. NSIZES must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NSIZES)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NSIZES)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NWDTHS
+*> \verbatim
+*> NWDTHS is INTEGER
+*> The number of bandwidths to use. If it is zero,
+*> SCHKBB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KK
+*> \verbatim
+*> KK is INTEGER array, dimension (NWDTHS)
+*> An array containing the bandwidths to be used for the band
+*> matrices. The values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SCHKBB
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns in the "right-hand side" matrix C.
+*> If NRHS = 0, then the operations on the right-hand side will
+*> not be tested. NRHS must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SCHKBB to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA, max(NN))
+*> Used to hold the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB, max(NN))
+*> Used to hold A in band storage format.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of AB. It must be at least 2 (not 1!)
+*> and at least max( KK )+1.
+*> \endverbatim
+*>
+*> \param[out] BD
+*> \verbatim
+*> BD is REAL array, dimension (max(NN))
+*> Used to hold the diagonal of the bidiagonal matrix computed
+*> by SGBBRD.
+*> \endverbatim
+*>
+*> \param[out] BE
+*> \verbatim
+*> BE is REAL array, dimension (max(NN))
+*> Used to hold the off-diagonal of the bidiagonal matrix
+*> computed by SGBBRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, max(NN))
+*> Used to hold the orthogonal matrix Q computed by SGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] P
+*> \verbatim
+*> P is REAL array, dimension (LDP, max(NN))
+*> Used to hold the orthogonal matrix P computed by SGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDP
+*> \verbatim
+*> LDP is INTEGER
+*> The leading dimension of P. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC, max(NN))
+*> Used to hold the matrix C updated by SGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of U. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is REAL array, dimension (LDC, max(NN))
+*> Used to hold a copy of the matrix C.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( LDA+1, max(NN)+1 )*max(NN).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCHKBB( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
$ NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
$ BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
$ LWORK, RESULT, INFO )
*
-* -- LAPACK test routine (release 2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
@@ -20,229 +378,6 @@
$ Q( LDQ, * ), RESULT( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKBB tests the reduction of a general real rectangular band
-* matrix to bidiagonal form.
-*
-* SGBBRD factors a general band matrix A as Q B P* , where * means
-* transpose, B is upper bidiagonal, and Q and P are orthogonal;
-* SGBBRD can also overwrite a given matrix C with Q* C .
-*
-* For each pair of matrix dimensions (M,N) and each selected matrix
-* type, an M by N matrix A and an M by NRHS matrix C are generated.
-* The problem dimensions are as follows
-* A: M x N
-* Q: M x M
-* P: N x N
-* B: min(M,N) x min(M,N)
-* C: M x NRHS
-*
-* For each generated matrix, 4 tests are performed:
-*
-* (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
-*
-* (2) | I - Q' Q | / ( M ulp )
-*
-* (3) | I - PT PT' | / ( N ulp )
-*
-* (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
-*
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* The possible matrix types are
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (3), but multiplied by SQRT( overflow threshold )
-* (7) Same as (3), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U D V, where U and V are orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U D V, where U and V are orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Rectangular matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of values of M and N contained in the vectors
-* MVAL and NVAL. The matrix sizes are used in pairs (M,N).
-* If NSIZES is zero, SCHKBB does nothing. NSIZES must be at
-* least zero.
-*
-* MVAL (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix row dimension M.
-*
-* NVAL (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix column dimension N.
-*
-* NWDTHS (input) INTEGER
-* The number of bandwidths to use. If it is zero,
-* SCHKBB does nothing. It must be at least zero.
-*
-* KK (input) INTEGER array, dimension (NWDTHS)
-* An array containing the bandwidths to be used for the band
-* matrices. The values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SCHKBB
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* NRHS (input) INTEGER
-* The number of columns in the "right-hand side" matrix C.
-* If NRHS = 0, then the operations on the right-hand side will
-* not be tested. NRHS must be at least 0.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SCHKBB to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) REAL array, dimension
-* (LDA, max(NN))
-* Used to hold the matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least max( NN ).
-*
-* AB (workspace) REAL array, dimension (LDAB, max(NN))
-* Used to hold A in band storage format.
-*
-* LDAB (input) INTEGER
-* The leading dimension of AB. It must be at least 2 (not 1!)
-* and at least max( KK )+1.
-*
-* BD (workspace) REAL array, dimension (max(NN))
-* Used to hold the diagonal of the bidiagonal matrix computed
-* by SGBBRD.
-*
-* BE (workspace) REAL array, dimension (max(NN))
-* Used to hold the off-diagonal of the bidiagonal matrix
-* computed by SGBBRD.
-*
-* Q (workspace) REAL array, dimension (LDQ, max(NN))
-* Used to hold the orthogonal matrix Q computed by SGBBRD.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q. It must be at least 1
-* and at least max( NN ).
-*
-* P (workspace) REAL array, dimension (LDP, max(NN))
-* Used to hold the orthogonal matrix P computed by SGBBRD.
-*
-* LDP (input) INTEGER
-* The leading dimension of P. It must be at least 1
-* and at least max( NN ).
-*
-* C (workspace) REAL array, dimension (LDC, max(NN))
-* Used to hold the matrix C updated by SGBBRD.
-*
-* LDC (input) INTEGER
-* The leading dimension of U. It must be at least 1
-* and at least max( NN ).
-*
-* CC (workspace) REAL array, dimension (LDC, max(NN))
-* Used to hold a copy of the matrix C.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( LDA+1, max(NN)+1 )*max(NN).
-*
-* RESULT (output) REAL array, dimension (4)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/schkbd.f b/TESTING/EIG/schkbd.f
index 384c2639..e20d44ef 100644
--- a/TESTING/EIG/schkbd.f
+++ b/TESTING/EIG/schkbd.f
@@ -1,11 +1,452 @@
+*> \brief \b SCHKBD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
+* ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
+* Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
+* IWORK, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
+* $ NSIZES, NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), NVAL( * )
+* REAL A( LDA, * ), BD( * ), BE( * ), PT( LDPT, * ),
+* $ Q( LDQ, * ), S1( * ), S2( * ), U( LDPT, * ),
+* $ VT( LDPT, * ), WORK( * ), X( LDX, * ),
+* $ Y( LDX, * ), Z( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKBD checks the singular value decomposition (SVD) routines.
+*>
+*> SGEBRD reduces a real general m by n matrix A to upper or lower
+*> bidiagonal form B by an orthogonal transformation: Q' * A * P = B
+*> (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
+*> and lower bidiagonal if m < n.
+*>
+*> SORGBR generates the orthogonal matrices Q and P' from SGEBRD.
+*> Note that Q and P are not necessarily square.
+*>
+*> SBDSQR computes the singular value decomposition of the bidiagonal
+*> matrix B as B = U S V'. It is called three times to compute
+*> 1) B = U S1 V', where S1 is the diagonal matrix of singular
+*> values and the columns of the matrices U and V are the left
+*> and right singular vectors, respectively, of B.
+*> 2) Same as 1), but the singular values are stored in S2 and the
+*> singular vectors are not computed.
+*> 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
+*> In addition, SBDSQR has an option to apply the left orthogonal matrix
+*> U to a matrix X, useful in least squares applications.
+*>
+*> SBDSDC computes the singular value decomposition of the bidiagonal
+*> matrix B as B = U S V' using divide-and-conquer. It is called twice
+*> to compute
+*> 1) B = U S1 V', where S1 is the diagonal matrix of singular
+*> values and the columns of the matrices U and V are the left
+*> and right singular vectors, respectively, of B.
+*> 2) Same as 1), but the singular values are stored in S2 and the
+*> singular vectors are not computed.
+*>
+*> For each pair of matrix dimensions (M,N) and each selected matrix
+*> type, an M by N matrix A and an M by NRHS matrix X are generated.
+*> The problem dimensions are as follows
+*> A: M x N
+*> Q: M x min(M,N) (but M x M if NRHS > 0)
+*> P: min(M,N) x N
+*> B: min(M,N) x min(M,N)
+*> U, V: min(M,N) x min(M,N)
+*> S1, S2 diagonal, order min(M,N)
+*> X: M x NRHS
+*>
+*> For each generated matrix, 14 tests are performed:
+*>
+*> Test SGEBRD and SORGBR
+*>
+*> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
+*>
+*> (2) | I - Q' Q | / ( M ulp )
+*>
+*> (3) | I - PT PT' | / ( N ulp )
+*>
+*> Test SBDSQR on bidiagonal matrix B
+*>
+*> (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
+*>
+*> (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
+*> and Z = U' Y.
+*> (6) | I - U' U | / ( min(M,N) ulp )
+*>
+*> (7) | I - VT VT' | / ( min(M,N) ulp )
+*>
+*> (8) S1 contains min(M,N) nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (9) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
+*> computing U and V.
+*>
+*> (10) 0 if the true singular values of B are within THRESH of
+*> those in S1. 2*THRESH if they are not. (Tested using
+*> SSVDCH)
+*>
+*> Test SBDSQR on matrix A
+*>
+*> (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
+*>
+*> (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
+*>
+*> (13) | I - (QU)'(QU) | / ( M ulp )
+*>
+*> (14) | I - (VT PT) (PT'VT') | / ( N ulp )
+*>
+*> Test SBDSDC on bidiagonal matrix B
+*>
+*> (15) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
+*>
+*> (16) | I - U' U | / ( min(M,N) ulp )
+*>
+*> (17) | I - VT VT' | / ( min(M,N) ulp )
+*>
+*> (18) S1 contains min(M,N) nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (19) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
+*> computing U and V.
+*> The possible matrix types are
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (3), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (3), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U D V, where U and V are orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U D V, where U and V are orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Rectangular matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*> Special case:
+*> (16) A bidiagonal matrix with random entries chosen from a
+*> logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
+*> entry is e^x, where x is chosen uniformly on
+*> [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
+*> (a) SGEBRD is not called to reduce it to bidiagonal form.
+*> (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
+*> matrix will be lower bidiagonal, otherwise upper.
+*> (c) only tests 5--8 and 14 are performed.
+*>
+*> A subset of the full set of matrix types may be selected through
+*> the logical array DOTYPE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of values of M and N contained in the vectors
+*> MVAL and NVAL. The matrix sizes are used in pairs (M,N).
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NM)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SCHKBD
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrices are in A and B.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
+*> of type j will be generated. If NTYPES is smaller than the
+*> maximum number of types defined (PARAMETER MAXTYP), then
+*> types NTYPES+1 through MAXTYP will not be generated. If
+*> NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
+*> DOTYPE(NTYPES) will be ignored.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns in the "right-hand side" matrices X, Y,
+*> and Z, used in testing SBDSQR. If NRHS = 0, then the
+*> operations on the right-hand side will not be tested.
+*> NRHS must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The values of ISEED are changed on exit, and can be
+*> used in the next call to SCHKBD to continue the same random
+*> number sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0. Note that the
+*> expected value of the test ratios is O(1), so THRESH should
+*> be a reasonably small multiple of 1, e.g., 10 or 100.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,NMAX)
+*> where NMAX is the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,MMAX),
+*> where MMAX is the maximum value of M in MVAL.
+*> \endverbatim
+*>
+*> \param[out] BD
+*> \verbatim
+*> BD is REAL array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] BE
+*> \verbatim
+*> BE is REAL array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] S1
+*> \verbatim
+*> S1 is REAL array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is REAL array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the arrays X, Y, and Z.
+*> LDX >= max(1,MMAX)
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*> Y is REAL array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,MMAX)
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,MMAX).
+*> \endverbatim
+*>
+*> \param[out] PT
+*> \verbatim
+*> PT is REAL array, dimension (LDPT,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the arrays PT, U, and V.
+*> LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension
+*> (LDPT,max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension
+*> (LDPT,max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all
+*> pairs (M,N)=(MM(j),NN(j))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least 8*min(M,N)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some MM(j) < 0
+*> -3: Some NN(j) < 0
+*> -4: NTYPES < 0
+*> -6: NRHS < 0
+*> -8: THRESH < 0
+*> -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
+*> -17: LDB < 1 or LDB < MMAX.
+*> -21: LDQ < 1 or LDQ < MMAX.
+*> -23: LDPT< 1 or LDPT< MNMAX.
+*> -27: LWORK too small.
+*> If SLATMR, SLATMS, SGEBRD, SORGBR, or SBDSQR,
+*> returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> MMAX Largest value in NN.
+*> NMAX Largest value in NN.
+*> MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal
+*> matrix.)
+*> MNMAX The maximum value of MNMIN for j=1,...,NSIZES.
+*> NFAIL The number of tests which have exceeded THRESH
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
$ ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
$ Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
$ IWORK, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
@@ -21,306 +462,6 @@
$ Y( LDX, * ), Z( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKBD checks the singular value decomposition (SVD) routines.
-*
-* SGEBRD reduces a real general m by n matrix A to upper or lower
-* bidiagonal form B by an orthogonal transformation: Q' * A * P = B
-* (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
-* and lower bidiagonal if m < n.
-*
-* SORGBR generates the orthogonal matrices Q and P' from SGEBRD.
-* Note that Q and P are not necessarily square.
-*
-* SBDSQR computes the singular value decomposition of the bidiagonal
-* matrix B as B = U S V'. It is called three times to compute
-* 1) B = U S1 V', where S1 is the diagonal matrix of singular
-* values and the columns of the matrices U and V are the left
-* and right singular vectors, respectively, of B.
-* 2) Same as 1), but the singular values are stored in S2 and the
-* singular vectors are not computed.
-* 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
-* In addition, SBDSQR has an option to apply the left orthogonal matrix
-* U to a matrix X, useful in least squares applications.
-*
-* SBDSDC computes the singular value decomposition of the bidiagonal
-* matrix B as B = U S V' using divide-and-conquer. It is called twice
-* to compute
-* 1) B = U S1 V', where S1 is the diagonal matrix of singular
-* values and the columns of the matrices U and V are the left
-* and right singular vectors, respectively, of B.
-* 2) Same as 1), but the singular values are stored in S2 and the
-* singular vectors are not computed.
-*
-* For each pair of matrix dimensions (M,N) and each selected matrix
-* type, an M by N matrix A and an M by NRHS matrix X are generated.
-* The problem dimensions are as follows
-* A: M x N
-* Q: M x min(M,N) (but M x M if NRHS > 0)
-* P: min(M,N) x N
-* B: min(M,N) x min(M,N)
-* U, V: min(M,N) x min(M,N)
-* S1, S2 diagonal, order min(M,N)
-* X: M x NRHS
-*
-* For each generated matrix, 14 tests are performed:
-*
-* Test SGEBRD and SORGBR
-*
-* (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
-*
-* (2) | I - Q' Q | / ( M ulp )
-*
-* (3) | I - PT PT' | / ( N ulp )
-*
-* Test SBDSQR on bidiagonal matrix B
-*
-* (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
-*
-* (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
-* and Z = U' Y.
-* (6) | I - U' U | / ( min(M,N) ulp )
-*
-* (7) | I - VT VT' | / ( min(M,N) ulp )
-*
-* (8) S1 contains min(M,N) nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (9) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
-* computing U and V.
-*
-* (10) 0 if the true singular values of B are within THRESH of
-* those in S1. 2*THRESH if they are not. (Tested using
-* SSVDCH)
-*
-* Test SBDSQR on matrix A
-*
-* (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
-*
-* (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
-*
-* (13) | I - (QU)'(QU) | / ( M ulp )
-*
-* (14) | I - (VT PT) (PT'VT') | / ( N ulp )
-*
-* Test SBDSDC on bidiagonal matrix B
-*
-* (15) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
-*
-* (16) | I - U' U | / ( min(M,N) ulp )
-*
-* (17) | I - VT VT' | / ( min(M,N) ulp )
-*
-* (18) S1 contains min(M,N) nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (19) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
-* computing U and V.
-* The possible matrix types are
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (3), but multiplied by SQRT( overflow threshold )
-* (7) Same as (3), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U D V, where U and V are orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U D V, where U and V are orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Rectangular matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Special case:
-* (16) A bidiagonal matrix with random entries chosen from a
-* logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
-* entry is e^x, where x is chosen uniformly on
-* [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
-* (a) SGEBRD is not called to reduce it to bidiagonal form.
-* (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
-* matrix will be lower bidiagonal, otherwise upper.
-* (c) only tests 5--8 and 14 are performed.
-*
-* A subset of the full set of matrix types may be selected through
-* the logical array DOTYPE.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of values of M and N contained in the vectors
-* MVAL and NVAL. The matrix sizes are used in pairs (M,N).
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix column dimension N.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SCHKBD
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrices are in A and B.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
-* of type j will be generated. If NTYPES is smaller than the
-* maximum number of types defined (PARAMETER MAXTYP), then
-* types NTYPES+1 through MAXTYP will not be generated. If
-* NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
-* DOTYPE(NTYPES) will be ignored.
-*
-* NRHS (input) INTEGER
-* The number of columns in the "right-hand side" matrices X, Y,
-* and Z, used in testing SBDSQR. If NRHS = 0, then the
-* operations on the right-hand side will not be tested.
-* NRHS must be at least 0.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The values of ISEED are changed on exit, and can be
-* used in the next call to SCHKBD to continue the same random
-* number sequence.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0. Note that the
-* expected value of the test ratios is O(1), so THRESH should
-* be a reasonably small multiple of 1, e.g., 10 or 100.
-*
-* A (workspace) REAL array, dimension (LDA,NMAX)
-* where NMAX is the maximum value of N in NVAL.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,MMAX),
-* where MMAX is the maximum value of M in MVAL.
-*
-* BD (workspace) REAL array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* BE (workspace) REAL array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* S1 (workspace) REAL array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* S2 (workspace) REAL array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* X (workspace) REAL array, dimension (LDX,NRHS)
-*
-* LDX (input) INTEGER
-* The leading dimension of the arrays X, Y, and Z.
-* LDX >= max(1,MMAX)
-*
-* Y (workspace) REAL array, dimension (LDX,NRHS)
-*
-* Z (workspace) REAL array, dimension (LDX,NRHS)
-*
-* Q (workspace) REAL array, dimension (LDQ,MMAX)
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,MMAX).
-*
-* PT (workspace) REAL array, dimension (LDPT,NMAX)
-*
-* LDPT (input) INTEGER
-* The leading dimension of the arrays PT, U, and V.
-* LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).
-*
-* U (workspace) REAL array, dimension
-* (LDPT,max(min(MVAL(j),NVAL(j))))
-*
-* V (workspace) REAL array, dimension
-* (LDPT,max(min(MVAL(j),NVAL(j))))
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all
-* pairs (M,N)=(MM(j),NN(j))
-*
-* IWORK (workspace) INTEGER array, dimension at least 8*min(M,N)
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some MM(j) < 0
-* -3: Some NN(j) < 0
-* -4: NTYPES < 0
-* -6: NRHS < 0
-* -8: THRESH < 0
-* -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
-* -17: LDB < 1 or LDB < MMAX.
-* -21: LDQ < 1 or LDQ < MMAX.
-* -23: LDPT< 1 or LDPT< MNMAX.
-* -27: LWORK too small.
-* If SLATMR, SLATMS, SGEBRD, SORGBR, or SBDSQR,
-* returns an error code, the
-* absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* MMAX Largest value in NN.
-* NMAX Largest value in NN.
-* MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal
-* matrix.)
-* MNMAX The maximum value of MNMIN for j=1,...,NSIZES.
-* NFAIL The number of tests which have exceeded THRESH
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* ULP, ULPINV Finest relative precision and its inverse.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/schkbk.f b/TESTING/EIG/schkbk.f
index 9cd4884c..ebffb637 100644
--- a/TESTING/EIG/schkbk.f
+++ b/TESTING/EIG/schkbk.f
@@ -1,28 +1,70 @@
- SUBROUTINE SCHKBK( NIN, NOUT )
+*> \brief \b SCHKBK
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKBK( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* SCHKBK tests SGEBAK, a routine for backward transformation of
-* the computed right or left eigenvectors if the orginal matrix
-* was preprocessed by balance subroutine SGEBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKBK tests SGEBAK, a routine for backward transformation of
+*> the computed right or left eigenvectors if the orginal matrix
+*> was preprocessed by balance subroutine SGEBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SCHKBK( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/schkbl.f b/TESTING/EIG/schkbl.f
index 2f378f80..a8e2e53d 100644
--- a/TESTING/EIG/schkbl.f
+++ b/TESTING/EIG/schkbl.f
@@ -1,27 +1,69 @@
- SUBROUTINE SCHKBL( NIN, NOUT )
+*> \brief \b SCHKBL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKBL( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* SCHKBL tests SGEBAL, a routine for balancing a general real
-* matrix and isolating some of its eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKBL tests SGEBAL, a routine for balancing a general real
+*> matrix and isolating some of its eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SCHKBL( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/schkec.f b/TESTING/EIG/schkec.f
index 7fe98f4e..c60fede3 100644
--- a/TESTING/EIG/schkec.f
+++ b/TESTING/EIG/schkec.f
@@ -1,43 +1,93 @@
- SUBROUTINE SCHKEC( THRESH, TSTERR, NIN, NOUT )
+*> \brief \b SCHKEC
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL TSTERR
- INTEGER NIN, NOUT
- REAL THRESH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SCHKEC( THRESH, TSTERR, NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NIN, NOUT
+* REAL THRESH
+* ..
+*
* Purpose
* =======
*
-* SCHKEC tests eigen- condition estimation routines
-* SLALN2, SLASY2, SLANV2, SLAQTR, SLAEXC,
-* STRSYL, STREXC, STRSNA, STRSEN
-*
-* In all cases, the routine runs through a fixed set of numerical
-* examples, subjects them to various tests, and compares the test
-* results to a threshold THRESH. In addition, STREXC, STRSNA and STRSEN
-* are tested by reading in precomputed examples from a file (on input
-* unit NIN). Output is written to output unit NOUT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKEC tests eigen- condition estimation routines
+*> SLALN2, SLASY2, SLANV2, SLAQTR, SLAEXC,
+*> STRSYL, STREXC, STRSNA, STRSEN
+*>
+*> In all cases, the routine runs through a fixed set of numerical
+*> examples, subjects them to various tests, and compares the test
+*> results to a threshold THRESH. In addition, STREXC, STRSNA and STRSEN
+*> are tested by reading in precomputed examples from a file (on input
+*> unit NIN). Output is written to output unit NOUT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* THRESH (input) REAL
-* Threshold for residual tests. A computed test ratio passes
-* the threshold if it is less than THRESH.
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> Threshold for residual tests. A computed test ratio passes
+*> the threshold if it is less than THRESH.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
+*> \date November 2011
*
-* NIN (input) INTEGER
-* The logical unit number for input.
+*> \ingroup single_eig
*
-* NOUT (input) INTEGER
-* The logical unit number for output.
+* =====================================================================
+ SUBROUTINE SCHKEC( THRESH, TSTERR, NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NIN, NOUT
+ REAL THRESH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/schkee.f b/TESTING/EIG/schkee.f
index e5184009..f3644650 100644
--- a/TESTING/EIG/schkee.f
+++ b/TESTING/EIG/schkee.f
@@ -1,1014 +1,1049 @@
- PROGRAM SCHKEE
-*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
-*
-* Purpose
-* =======
-*
-* SCHKEE tests the REAL LAPACK subroutines for the matrix
-* eigenvalue problem. The test paths in this version are
-*
-* NEP (Nonsymmetric Eigenvalue Problem):
-* Test SGEHRD, SORGHR, SHSEQR, STREVC, SHSEIN, and SORMHR
-*
-* SEP (Symmetric Eigenvalue Problem):
-* Test SSYTRD, SORGTR, SSTEQR, SSTERF, SSTEIN, SSTEDC,
-* and drivers SSYEV(X), SSBEV(X), SSPEV(X), SSTEV(X),
-* SSYEVD, SSBEVD, SSPEVD, SSTEVD
-*
-* SVD (Singular Value Decomposition):
-* Test SGEBRD, SORGBR, SBDSQR, SBDSDC
-* and the drivers SGESVD, SGESDD
-*
-* SEV (Nonsymmetric Eigenvalue/eigenvector Driver):
-* Test SGEEV
-*
-* SES (Nonsymmetric Schur form Driver):
-* Test SGEES
-*
-* SVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
-* Test SGEEVX
-*
-* SSX (Nonsymmetric Schur form Expert Driver):
-* Test SGEESX
-*
-* SGG (Generalized Nonsymmetric Eigenvalue Problem):
-* Test SGGHRD, SGGBAL, SGGBAK, SHGEQZ, and STGEVC
-* and the driver routines SGEGS and SGEGV
-*
-* SGS (Generalized Nonsymmetric Schur form Driver):
-* Test SGGES
-*
-* SGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
-* Test SGGEV
-*
-* SGX (Generalized Nonsymmetric Schur form Expert Driver):
-* Test SGGESX
-*
-* SXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
-* Test SGGEVX
-*
-* SSG (Symmetric Generalized Eigenvalue Problem):
-* Test SSYGST, SSYGV, SSYGVD, SSYGVX, SSPGST, SSPGV, SSPGVD,
-* SSPGVX, SSBGST, SSBGV, SSBGVD, and SSBGVX
-*
-* SSB (Symmetric Band Eigenvalue Problem):
-* Test SSBTRD
-*
-* SBB (Band Singular Value Decomposition):
-* Test SGBBRD
-*
-* SEC (Eigencondition estimation):
-* Test SLALN2, SLASY2, SLAEQU, SLAEXC, STRSYL, STREXC, STRSNA,
-* STRSEN, and SLAQTR
-*
-* SBL (Balancing a general matrix)
-* Test SGEBAL
-*
-* SBK (Back transformation on a balanced matrix)
-* Test SGEBAK
-*
-* SGL (Balancing a matrix pair)
-* Test SGGBAL
-*
-* SGK (Back transformation on a matrix pair)
-* Test SGGBAK
-*
-* GLM (Generalized Linear Regression Model):
-* Tests SGGGLM
-*
-* GQR (Generalized QR and RQ factorizations):
-* Tests SGGQRF and SGGRQF
-*
-* GSV (Generalized Singular Value Decomposition):
-* Tests SGGSVD, SGGSVP, STGSJA, SLAGS2, SLAPLL, and SLAPMT
-*
-* CSD (CS decomposition):
-* Tests SORCSD
-*
-* LSE (Constrained Linear Least Squares):
-* Tests SGGLSE
-*
-* Each test path has a different set of inputs, but the data sets for
-* the driver routines xEV, xES, xVX, and xSX can be concatenated in a
-* single input file. The first line of input should contain one of the
-* 3-character path names in columns 1-3. The number of remaining lines
-* depends on what is found on the first line.
-*
-* The number of matrix types used in testing is often controllable from
-* the input file. The number of matrix types for each path, and the
-* test routine that describes them, is as follows:
-*
-* Path name(s) Types Test routine
-*
-* SHS or NEP 21 SCHKHS
-* SST or SEP 21 SCHKST (routines)
-* 18 SDRVST (drivers)
-* SBD or SVD 16 SCHKBD (routines)
-* 5 SDRVBD (drivers)
-* SEV 21 SDRVEV
-* SES 21 SDRVES
-* SVX 21 SDRVVX
-* SSX 21 SDRVSX
-* SGG 26 SCHKGG (routines)
-* 26 SDRVGG (drivers)
-* SGS 26 SDRGES
-* SGX 5 SDRGSX
-* SGV 26 SDRGEV
-* SXV 2 SDRGVX
-* SSG 21 SDRVSG
-* SSB 15 SCHKSB
-* SBB 15 SCHKBB
-* SEC - SCHKEC
-* SBL - SCHKBL
-* SBK - SCHKBK
-* SGL - SCHKGL
-* SGK - SCHKGK
-* GLM 8 SCKGLM
-* GQR 8 SCKGQR
-* GSV 8 SCKGSV
-* CSD 3 SCKCSD
-* LSE 8 SCKLSE
-*
-*-----------------------------------------------------------------------
-*
-* NEP input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, NX, NS, and
-* MAXB.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 7: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 8: INMIN, INTEGER array, dimension (NPARMS)
-* LAHQR vs TTQRE crossover point, >= 11
-*
-* line 9: INWIN, INTEGER array, dimension (NPARMS)
-* recommended deflation window size
-*
-* line 10: INIBL, INTEGER array, dimension (NPARMS)
-* nibble crossover point
-*
-* line 11: ISHFTS, INTEGER array, dimension (NPARMS)
-* number of simultaneous shifts)
-*
-* line 12: IACC22, INTEGER array, dimension (NPARMS)
-* select structured matrix multiply: 0, 1 or 2)
-*
-* line 13: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold. To have all of the test
-* ratios printed, use THRESH = 0.0 .
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
-* the user to specify the matrix types. Each line contains
-* a 3-character path name in columns 1-3, and the number
-* of matrix types must be the first nonblank item in columns
-* 4-80. If the number of matrix types is at least 1 but is
-* less than the maximum number of possible types, a second
-* line will be read to get the numbers of the matrix types to
-* be used. For example,
-* NEP 21
-* requests all of the matrix types for the nonsymmetric
-* eigenvalue problem, while
-* NEP 4
-* 9 10 11 12
-* requests only matrices of type 9, 10, 11, and 12.
-*
-* The valid 3-character path names are 'NEP' or 'SHS' for the
-* nonsymmetric eigenvalue routines.
-*
-*-----------------------------------------------------------------------
-*
-* SEP or SSG input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, and NX.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 7: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 8: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 9: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 10: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 11: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 12: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 12 was 2:
-*
-* line 13: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 13-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path names are 'SEP' or 'SST' for the
-* symmetric eigenvalue routines and driver routines, and
-* 'SSG' for the routines for the symmetric generalized
-* eigenvalue problem.
-*
-*-----------------------------------------------------------------------
-*
-* SVD input file:
-*
-* line 2: NN, INTEGER
-* Number of values of M and N.
-*
-* line 3: MVAL, INTEGER array, dimension (NN)
-* The values for the matrix row dimension M.
-*
-* line 4: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix column dimension N.
-*
-* line 5: NPARMS, INTEGER
-* Number of values of the parameter NB, NBMIN, NX, and NRHS.
-*
-* line 6: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 7: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 8: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 9: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of right hand sides NRHS.
-*
-* line 10: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 11: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 12: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 13: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 15-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path names are 'SVD' or 'SBD' for both the
-* SVD routines and the SVD driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* SEV and SES data files:
-*
-* line 1: 'SEV' or 'SES' in columns 1 to 3.
-*
-* line 2: NSIZES, INTEGER
-* Number of sizes of matrices to use. Should be at least 0
-* and at most 20. If NSIZES = 0, no testing is done
-* (although the remaining 3 lines are still read).
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-* Dimensions of matrices to be tested.
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHSEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 5: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* If it is 0., all test case data will be printed.
-*
-* line 6: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9 and following: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'SEV' to test SGEEV, or
-* 'SES' to test SGEES.
-*
-*-----------------------------------------------------------------------
-*
-* The SVX data has two parts. The first part is identical to SEV,
-* and the second part consists of test matrices with precomputed
-* solutions.
-*
-* line 1: 'SVX' in columns 1-3.
-*
-* line 2: NSIZES, INTEGER
-* If NSIZES = 0, no testing of randomly generated examples
-* is done, but any precomputed examples are tested.
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-*
-* line 5: THRESH, REAL
-*
-* line 6: TSTERR, LOGICAL
-*
-* line 7: NEWSD, INTEGER
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-*
-* lines 9 and following: The first line contains 'SVX' in columns 1-3
-* followed by the number of matrix types, possibly with
-* a second line to specify certain matrix types.
-* If the number of matrix types = 0, no testing of randomly
-* generated examples is done, but any precomputed examples
-* are tested.
-*
-* remaining lines : Each matrix is stored on 1+2*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next N lines contain the matrix, one
-* row per line. The last N lines correspond to each
-* eigenvalue. Each of these last N lines contains 4 real
-* values: the real part of the eigenvalue, the imaginary
-* part of the eigenvalue, the reciprocal condition number of
-* the eigenvalues, and the reciprocal condition number of the
-* eigenvector. The end of data is indicated by dimension N=0.
-* Even if no data is to be tested, there must be at least one
-* line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* The SSX data is like SVX. The first part is identical to SEV, and the
-* second part consists of test matrices with precomputed solutions.
-*
-* line 1: 'SSX' in columns 1-3.
-*
-* line 2: NSIZES, INTEGER
-* If NSIZES = 0, no testing of randomly generated examples
-* is done, but any precomputed examples are tested.
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-*
-* line 5: THRESH, REAL
-*
-* line 6: TSTERR, LOGICAL
-*
-* line 7: NEWSD, INTEGER
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-*
-* lines 9 and following: The first line contains 'SSX' in columns 1-3
-* followed by the number of matrix types, possibly with
-* a second line to specify certain matrix types.
-* If the number of matrix types = 0, no testing of randomly
-* generated examples is done, but any precomputed examples
-* are tested.
-*
-* remaining lines : Each matrix is stored on 3+N lines, where N is its
-* dimension. The first line contains the dimension N and the
-* dimension M of an invariant subspace. The second line
-* contains M integers, identifying the eigenvalues in the
-* invariant subspace (by their position in a list of
-* eigenvalues ordered by increasing real part). The next N
-* lines contain the matrix. The last line contains the
-* reciprocal condition number for the average of the selected
-* eigenvalues, and the reciprocal condition number for the
-* corresponding right invariant subspace. The end of data is
-* indicated by a line containing N=0 and M=0. Even if no data
-* is to be tested, there must be at least one line containing
-* N=0 and M=0.
-*
-*-----------------------------------------------------------------------
-*
-* SGG input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, NS, MAXB, and
-* NBCOL.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for NBMIN, the minimum row dimension for blocks.
-*
-* line 7: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of shifts.
-*
-* line 8: MXBVAL, INTEGER array, dimension (NPARMS)
-* The values for MAXB, used in determining minimum blocksize.
-*
-* line 9: NBCOL, INTEGER array, dimension (NPARMS)
-* The values for NBCOL, the minimum column dimension for
-* blocks.
-*
-* line 10: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 11: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 12: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 13: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
+*> \brief \b SCHKEE
*
-* lines 15-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'SGG' for the generalized
-* eigenvalue problem routines and driver routines.
+* =========== DOCUMENTATION ===========
*
-*-----------------------------------------------------------------------
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* SGS and SGV input files:
+* Definition
+* ==========
*
-* line 1: 'SGS' or 'SGV' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension(NN)
-* Dimensions of matrices to be tested.
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 5: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* If it is 0., all test case data will be printed.
-*
-* line 6: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 17 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 7-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'SGS' for the generalized
-* eigenvalue problem routines and driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* SXV input files:
-*
-* line 1: 'SXV' in columns 1 to 3.
-*
-* line 2: N, INTEGER
-* Value of N.
-*
-* line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 4: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* Information will be printed about each test for which the
-* test ratio is greater than or equal to the threshold.
-*
-* line 5: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* If line 2 was 0:
-*
-* line 7-EOF: Precomputed examples are tested.
-*
-* remaining lines : Each example is stored on 3+2*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next N lines contain the matrix A, one
-* row per line. The next N lines contain the matrix B. The
-* next line contains the reciprocals of the eigenvalue
-* condition numbers. The last line contains the reciprocals of
-* the eigenvector condition numbers. The end of data is
-* indicated by dimension N=0. Even if no data is to be tested,
-* there must be at least one line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* SGX input files:
-*
-* line 1: 'SGX' in columns 1 to 3.
-*
-* line 2: N, INTEGER
-* Value of N.
-*
-* line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 4: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* Information will be printed about each test for which the
-* test ratio is greater than or equal to the threshold.
-*
-* line 5: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* If line 2 was 0:
-*
-* line 7-EOF: Precomputed examples are tested.
-*
-* remaining lines : Each example is stored on 3+2*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next line contains an integer k such
-* that only the last k eigenvalues will be selected and appear
-* in the leading diagonal blocks of $A$ and $B$. The next N
-* lines contain the matrix A, one row per line. The next N
-* lines contain the matrix B. The last line contains the
-* reciprocal of the eigenvalue cluster condition number and the
-* reciprocal of the deflating subspace (associated with the
-* selected eigencluster) condition number. The end of data is
-* indicated by dimension N=0. Even if no data is to be tested,
-* there must be at least one line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* SSB input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NK, INTEGER
-* Number of values of K.
-*
-* line 5: KVAL, INTEGER array, dimension (NK)
-* The values for the matrix dimension K.
-*
-* line 6: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 8-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'SSB'.
-*
-*-----------------------------------------------------------------------
-*
-* SBB input file:
-*
-* line 2: NN, INTEGER
-* Number of values of M and N.
-*
-* line 3: MVAL, INTEGER array, dimension (NN)
-* The values for the matrix row dimension M.
-*
-* line 4: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix column dimension N.
-*
-* line 4: NK, INTEGER
-* Number of values of K.
-*
-* line 5: KVAL, INTEGER array, dimension (NK)
-* The values for the matrix bandwidth K.
-*
-* line 6: NPARMS, INTEGER
-* Number of values of the parameter NRHS
-*
-* line 7: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of right hand sides NRHS.
-*
-* line 8: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 9: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 9 was 2:
-*
-* line 10: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 10-EOF: Lines specifying matrix types, as for SVD.
-* The 3-character path name is 'SBB'.
-*
-*-----------------------------------------------------------------------
-*
-* SEC input file:
-*
-* line 2: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* lines 3-EOF:
-*
-* Input for testing the eigencondition routines consists of a set of
-* specially constructed test cases and their solutions. The data
-* format is not intended to be modified by the user.
-*
-*-----------------------------------------------------------------------
-*
-* SBL and SBK input files:
-*
-* line 1: 'SBL' in columns 1-3 to test SGEBAL, or 'SBK' in
-* columns 1-3 to test SGEBAK.
-*
-* The remaining lines consist of specially constructed test cases.
-*
-*-----------------------------------------------------------------------
-*
-* SGL and SGK input files:
-*
-* line 1: 'SGL' in columns 1-3 to test SGGBAL, or 'SGK' in
-* columns 1-3 to test SGGBAK.
-*
-* The remaining lines consist of specially constructed test cases.
-*
-*-----------------------------------------------------------------------
-*
-* GLM data file:
-*
-* line 1: 'GLM' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M (row dimension).
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P (row dimension).
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N (column dimension), note M <= N <= M+P.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GLM' for the generalized
-* linear regression model routines.
-*
-*-----------------------------------------------------------------------
-*
-* GQR data file:
-*
-* line 1: 'GQR' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M.
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P.
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GQR' for the generalized
-* QR and RQ routines.
-*
-*-----------------------------------------------------------------------
-*
-* GSV data file:
-*
-* line 1: 'GSV' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M (row dimension).
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P (row dimension).
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N (column dimension).
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GSV' for the generalized
-* SVD routines.
-*
-*-----------------------------------------------------------------------
-*
-* CSD data file:
-*
-* line 1: 'CSD' in columns 1 to 3.
-*
-* line 2: NM, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NM)
-* Values of M (row and column dimension of orthogonal matrix).
-*
-* line 4: PVAL, INTEGER array, dimension(NM)
-* Values of P (row dimension of top-left block).
-*
-* line 5: NVAL, INTEGER array, dimension(NM)
-* Values of N (column dimension of top-left block).
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'CSD' for the CSD routine.
-*
-*-----------------------------------------------------------------------
-*
-* LSE data file:
-*
-* line 1: 'LSE' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M.
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P.
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N, note P <= N <= P+M.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
+* PROGRAM SCHKEE
+*
+* Purpose
+* =======
*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKEE tests the REAL LAPACK subroutines for the matrix
+*> eigenvalue problem. The test paths in this version are
+*>
+*> NEP (Nonsymmetric Eigenvalue Problem):
+*> Test SGEHRD, SORGHR, SHSEQR, STREVC, SHSEIN, and SORMHR
+*>
+*> SEP (Symmetric Eigenvalue Problem):
+*> Test SSYTRD, SORGTR, SSTEQR, SSTERF, SSTEIN, SSTEDC,
+*> and drivers SSYEV(X), SSBEV(X), SSPEV(X), SSTEV(X),
+*> SSYEVD, SSBEVD, SSPEVD, SSTEVD
+*>
+*> SVD (Singular Value Decomposition):
+*> Test SGEBRD, SORGBR, SBDSQR, SBDSDC
+*> and the drivers SGESVD, SGESDD
+*>
+*> SEV (Nonsymmetric Eigenvalue/eigenvector Driver):
+*> Test SGEEV
+*>
+*> SES (Nonsymmetric Schur form Driver):
+*> Test SGEES
+*>
+*> SVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
+*> Test SGEEVX
+*>
+*> SSX (Nonsymmetric Schur form Expert Driver):
+*> Test SGEESX
+*>
+*> SGG (Generalized Nonsymmetric Eigenvalue Problem):
+*> Test SGGHRD, SGGBAL, SGGBAK, SHGEQZ, and STGEVC
+*> and the driver routines SGEGS and SGEGV
+*>
+*> SGS (Generalized Nonsymmetric Schur form Driver):
+*> Test SGGES
+*>
+*> SGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
+*> Test SGGEV
+*>
+*> SGX (Generalized Nonsymmetric Schur form Expert Driver):
+*> Test SGGESX
+*>
+*> SXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
+*> Test SGGEVX
+*>
+*> SSG (Symmetric Generalized Eigenvalue Problem):
+*> Test SSYGST, SSYGV, SSYGVD, SSYGVX, SSPGST, SSPGV, SSPGVD,
+*> SSPGVX, SSBGST, SSBGV, SSBGVD, and SSBGVX
+*>
+*> SSB (Symmetric Band Eigenvalue Problem):
+*> Test SSBTRD
+*>
+*> SBB (Band Singular Value Decomposition):
+*> Test SGBBRD
+*>
+*> SEC (Eigencondition estimation):
+*> Test SLALN2, SLASY2, SLAEQU, SLAEXC, STRSYL, STREXC, STRSNA,
+*> STRSEN, and SLAQTR
+*>
+*> SBL (Balancing a general matrix)
+*> Test SGEBAL
+*>
+*> SBK (Back transformation on a balanced matrix)
+*> Test SGEBAK
+*>
+*> SGL (Balancing a matrix pair)
+*> Test SGGBAL
+*>
+*> SGK (Back transformation on a matrix pair)
+*> Test SGGBAK
+*>
+*> GLM (Generalized Linear Regression Model):
+*> Tests SGGGLM
+*>
+*> GQR (Generalized QR and RQ factorizations):
+*> Tests SGGQRF and SGGRQF
+*>
+*> GSV (Generalized Singular Value Decomposition):
+*> Tests SGGSVD, SGGSVP, STGSJA, SLAGS2, SLAPLL, and SLAPMT
+*>
+*> CSD (CS decomposition):
+*> Tests SORCSD
+*>
+*> LSE (Constrained Linear Least Squares):
+*> Tests SGGLSE
+*>
+*> Each test path has a different set of inputs, but the data sets for
+*> the driver routines xEV, xES, xVX, and xSX can be concatenated in a
+*> single input file. The first line of input should contain one of the
+*> 3-character path names in columns 1-3. The number of remaining lines
+*> depends on what is found on the first line.
+*>
+*> The number of matrix types used in testing is often controllable from
+*> the input file. The number of matrix types for each path, and the
+*> test routine that describes them, is as follows:
+*>
+*> Path name(s) Types Test routine
+*>
+*> SHS or NEP 21 SCHKHS
+*> SST or SEP 21 SCHKST (routines)
+*> 18 SDRVST (drivers)
+*> SBD or SVD 16 SCHKBD (routines)
+*> 5 SDRVBD (drivers)
+*> SEV 21 SDRVEV
+*> SES 21 SDRVES
+*> SVX 21 SDRVVX
+*> SSX 21 SDRVSX
+*> SGG 26 SCHKGG (routines)
+*> 26 SDRVGG (drivers)
+*> SGS 26 SDRGES
+*> SGX 5 SDRGSX
+*> SGV 26 SDRGEV
+*> SXV 2 SDRGVX
+*> SSG 21 SDRVSG
+*> SSB 15 SCHKSB
+*> SBB 15 SCHKBB
+*> SEC - SCHKEC
+*> SBL - SCHKBL
+*> SBK - SCHKBK
+*> SGL - SCHKGL
+*> SGK - SCHKGK
+*> GLM 8 SCKGLM
+*> GQR 8 SCKGQR
+*> GSV 8 SCKGSV
+*> CSD 3 SCKCSD
+*> LSE 8 SCKLSE
+*>
+*>-----------------------------------------------------------------------
+*>
+*> NEP input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, NX, NS, and
+*> MAXB.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 7: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 8: INMIN, INTEGER array, dimension (NPARMS)
+*> LAHQR vs TTQRE crossover point, >= 11
+*>
+*> line 9: INWIN, INTEGER array, dimension (NPARMS)
+*> recommended deflation window size
+*>
+*> line 10: INIBL, INTEGER array, dimension (NPARMS)
+*> nibble crossover point
+*>
+*> line 11: ISHFTS, INTEGER array, dimension (NPARMS)
+*> number of simultaneous shifts)
+*>
+*> line 12: IACC22, INTEGER array, dimension (NPARMS)
+*> select structured matrix multiply: 0, 1 or 2)
+*>
+*> line 13: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold. To have all of the test
+*> ratios printed, use THRESH = 0.0 .
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
+*> the user to specify the matrix types. Each line contains
+*> a 3-character path name in columns 1-3, and the number
+*> of matrix types must be the first nonblank item in columns
+*> 4-80. If the number of matrix types is at least 1 but is
+*> less than the maximum number of possible types, a second
+*> line will be read to get the numbers of the matrix types to
+*> be used. For example,
+*> NEP 21
+*> requests all of the matrix types for the nonsymmetric
+*> eigenvalue problem, while
+*> NEP 4
+*> 9 10 11 12
+*> requests only matrices of type 9, 10, 11, and 12.
+*>
+*> The valid 3-character path names are 'NEP' or 'SHS' for the
+*> nonsymmetric eigenvalue routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SEP or SSG input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, and NX.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 7: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 8: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 9: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 10: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 11: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 12: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 12 was 2:
+*>
+*> line 13: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 13-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path names are 'SEP' or 'SST' for the
+*> symmetric eigenvalue routines and driver routines, and
+*> 'SSG' for the routines for the symmetric generalized
+*> eigenvalue problem.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SVD input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension (NN)
+*> The values for the matrix row dimension M.
+*>
+*> line 4: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix column dimension N.
+*>
+*> line 5: NPARMS, INTEGER
+*> Number of values of the parameter NB, NBMIN, NX, and NRHS.
+*>
+*> line 6: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 7: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 8: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 9: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of right hand sides NRHS.
+*>
+*> line 10: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 11: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 12: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 13: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path names are 'SVD' or 'SBD' for both the
+*> SVD routines and the SVD driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SEV and SES data files:
+*>
+*> line 1: 'SEV' or 'SES' in columns 1 to 3.
+*>
+*> line 2: NSIZES, INTEGER
+*> Number of sizes of matrices to use. Should be at least 0
+*> and at most 20. If NSIZES = 0, no testing is done
+*> (although the remaining 3 lines are still read).
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*> Dimensions of matrices to be tested.
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHSEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 5: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> If it is 0., all test case data will be printed.
+*>
+*> line 6: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9 and following: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'SEV' to test SGEEV, or
+*> 'SES' to test SGEES.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> The SVX data has two parts. The first part is identical to SEV,
+*> and the second part consists of test matrices with precomputed
+*> solutions.
+*>
+*> line 1: 'SVX' in columns 1-3.
+*>
+*> line 2: NSIZES, INTEGER
+*> If NSIZES = 0, no testing of randomly generated examples
+*> is done, but any precomputed examples are tested.
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*>
+*> line 5: THRESH, REAL
+*>
+*> line 6: TSTERR, LOGICAL
+*>
+*> line 7: NEWSD, INTEGER
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*>
+*> lines 9 and following: The first line contains 'SVX' in columns 1-3
+*> followed by the number of matrix types, possibly with
+*> a second line to specify certain matrix types.
+*> If the number of matrix types = 0, no testing of randomly
+*> generated examples is done, but any precomputed examples
+*> are tested.
+*>
+*> remaining lines : Each matrix is stored on 1+2*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next N lines contain the matrix, one
+*> row per line. The last N lines correspond to each
+*> eigenvalue. Each of these last N lines contains 4 real
+*> values: the real part of the eigenvalue, the imaginary
+*> part of the eigenvalue, the reciprocal condition number of
+*> the eigenvalues, and the reciprocal condition number of the
+*> eigenvector. The end of data is indicated by dimension N=0.
+*> Even if no data is to be tested, there must be at least one
+*> line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> The SSX data is like SVX. The first part is identical to SEV, and the
+*> second part consists of test matrices with precomputed solutions.
+*>
+*> line 1: 'SSX' in columns 1-3.
+*>
+*> line 2: NSIZES, INTEGER
+*> If NSIZES = 0, no testing of randomly generated examples
+*> is done, but any precomputed examples are tested.
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*>
+*> line 5: THRESH, REAL
+*>
+*> line 6: TSTERR, LOGICAL
+*>
+*> line 7: NEWSD, INTEGER
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*>
+*> lines 9 and following: The first line contains 'SSX' in columns 1-3
+*> followed by the number of matrix types, possibly with
+*> a second line to specify certain matrix types.
+*> If the number of matrix types = 0, no testing of randomly
+*> generated examples is done, but any precomputed examples
+*> are tested.
+*>
+*> remaining lines : Each matrix is stored on 3+N lines, where N is its
+*> dimension. The first line contains the dimension N and the
+*> dimension M of an invariant subspace. The second line
+*> contains M integers, identifying the eigenvalues in the
+*> invariant subspace (by their position in a list of
+*> eigenvalues ordered by increasing real part). The next N
+*> lines contain the matrix. The last line contains the
+*> reciprocal condition number for the average of the selected
+*> eigenvalues, and the reciprocal condition number for the
+*> corresponding right invariant subspace. The end of data is
+*> indicated by a line containing N=0 and M=0. Even if no data
+*> is to be tested, there must be at least one line containing
+*> N=0 and M=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SGG input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, NS, MAXB, and
+*> NBCOL.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for NBMIN, the minimum row dimension for blocks.
+*>
+*> line 7: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of shifts.
+*>
+*> line 8: MXBVAL, INTEGER array, dimension (NPARMS)
+*> The values for MAXB, used in determining minimum blocksize.
+*>
+*> line 9: NBCOL, INTEGER array, dimension (NPARMS)
+*> The values for NBCOL, the minimum column dimension for
+*> blocks.
+*>
+*> line 10: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 11: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 12: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 13: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'SGG' for the generalized
+*> eigenvalue problem routines and driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SGS and SGV input files:
+*>
+*> line 1: 'SGS' or 'SGV' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension(NN)
+*> Dimensions of matrices to be tested.
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 5: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> If it is 0., all test case data will be printed.
+*>
+*> line 6: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 17 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 7-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'SGS' for the generalized
+*> eigenvalue problem routines and driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SXV input files:
+*>
+*> line 1: 'SXV' in columns 1 to 3.
+*>
+*> line 2: N, INTEGER
+*> Value of N.
+*>
+*> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 4: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> Information will be printed about each test for which the
+*> test ratio is greater than or equal to the threshold.
+*>
+*> line 5: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> If line 2 was 0:
+*>
+*> line 7-EOF: Precomputed examples are tested.
+*>
+*> remaining lines : Each example is stored on 3+2*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next N lines contain the matrix A, one
+*> row per line. The next N lines contain the matrix B. The
+*> next line contains the reciprocals of the eigenvalue
+*> condition numbers. The last line contains the reciprocals of
+*> the eigenvector condition numbers. The end of data is
+*> indicated by dimension N=0. Even if no data is to be tested,
+*> there must be at least one line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SGX input files:
+*>
+*> line 1: 'SGX' in columns 1 to 3.
+*>
+*> line 2: N, INTEGER
+*> Value of N.
+*>
+*> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 4: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> Information will be printed about each test for which the
+*> test ratio is greater than or equal to the threshold.
+*>
+*> line 5: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> If line 2 was 0:
+*>
+*> line 7-EOF: Precomputed examples are tested.
+*>
+*> remaining lines : Each example is stored on 3+2*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next line contains an integer k such
+*> that only the last k eigenvalues will be selected and appear
+*> in the leading diagonal blocks of $A$ and $B$. The next N
+*> lines contain the matrix A, one row per line. The next N
+*> lines contain the matrix B. The last line contains the
+*> reciprocal of the eigenvalue cluster condition number and the
+*> reciprocal of the deflating subspace (associated with the
+*> selected eigencluster) condition number. The end of data is
+*> indicated by dimension N=0. Even if no data is to be tested,
+*> there must be at least one line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SSB input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NK, INTEGER
+*> Number of values of K.
+*>
+*> line 5: KVAL, INTEGER array, dimension (NK)
+*> The values for the matrix dimension K.
+*>
+*> line 6: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 8-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'SSB'.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SBB input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension (NN)
+*> The values for the matrix row dimension M.
+*>
+*> line 4: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix column dimension N.
+*>
+*> line 4: NK, INTEGER
+*> Number of values of K.
+*>
+*> line 5: KVAL, INTEGER array, dimension (NK)
+*> The values for the matrix bandwidth K.
+*>
+*> line 6: NPARMS, INTEGER
+*> Number of values of the parameter NRHS
+*>
+*> line 7: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of right hand sides NRHS.
+*>
+*> line 8: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 9: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 9 was 2:
+*>
+*> line 10: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 10-EOF: Lines specifying matrix types, as for SVD.
+*> The 3-character path name is 'SBB'.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SEC input file:
+*>
+*> line 2: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> lines 3-EOF:
+*>
+*> Input for testing the eigencondition routines consists of a set of
+*> specially constructed test cases and their solutions. The data
+*> format is not intended to be modified by the user.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SBL and SBK input files:
+*>
+*> line 1: 'SBL' in columns 1-3 to test SGEBAL, or 'SBK' in
+*> columns 1-3 to test SGEBAK.
+*>
+*> The remaining lines consist of specially constructed test cases.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SGL and SGK input files:
+*>
+*> line 1: 'SGL' in columns 1-3 to test SGGBAL, or 'SGK' in
+*> columns 1-3 to test SGGBAK.
+*>
+*> The remaining lines consist of specially constructed test cases.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GLM data file:
+*>
+*> line 1: 'GLM' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M (row dimension).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P (row dimension).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N (column dimension), note M <= N <= M+P.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GLM' for the generalized
+*> linear regression model routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GQR data file:
+*>
+*> line 1: 'GQR' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M.
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P.
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GQR' for the generalized
+*> QR and RQ routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GSV data file:
+*>
+*> line 1: 'GSV' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M (row dimension).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P (row dimension).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N (column dimension).
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GSV' for the generalized
+*> SVD routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CSD data file:
+*>
+*> line 1: 'CSD' in columns 1 to 3.
+*>
+*> line 2: NM, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NM)
+*> Values of M (row and column dimension of orthogonal matrix).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NM)
+*> Values of P (row dimension of top-left block).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NM)
+*> Values of N (column dimension of top-left block).
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'CSD' for the CSD routine.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> LSE data file:
+*>
+*> line 1: 'LSE' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M.
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P.
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N, note P <= N <= P+M.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GSV' for the generalized
+*> SVD routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> NMAX is currently set to 132 and must be at least 12 for some of the
+*> precomputed examples, and LWORK = NMAX*(5*NMAX+5)+1 in the parameter
+*> statements below. For SVD, we assume NRHS may be as big as N. The
+*> parameter NEED is set to 14 to allow for 14 N-by-N matrices for SGG.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
*
-* If line 8 was 2:
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
+*> \date November 2011
*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GSV' for the generalized
-* SVD routines.
+*> \ingroup single_eig
*
-*-----------------------------------------------------------------------
+* =====================================================================
+ PROGRAM SCHKEE
*
-* NMAX is currently set to 132 and must be at least 12 for some of the
-* precomputed examples, and LWORK = NMAX*(5*NMAX+5)+1 in the parameter
-* statements below. For SVD, we assume NRHS may be as big as N. The
-* parameter NEED is set to 14 to allow for 14 N-by-N matrices for SGG.
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/EIG/schkgg.f b/TESTING/EIG/schkgg.f
index b8f4e349..ef04fd8d 100644
--- a/TESTING/EIG/schkgg.f
+++ b/TESTING/EIG/schkgg.f
@@ -1,3 +1,513 @@
+*> \brief \b SCHKGG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* TSTDIF, THRSHN, NOUNIT, A, LDA, B, H, T, S1,
+* S2, P1, P2, U, LDU, V, Q, Z, ALPHR1, ALPHI1,
+* BETA1, ALPHR3, ALPHI3, BETA3, EVECTL, EVECTR,
+* WORK, LWORK, LLWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTDIF
+* INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES
+* REAL THRESH, THRSHN
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * ), LLWORK( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL A( LDA, * ), ALPHI1( * ), ALPHI3( * ),
+* $ ALPHR1( * ), ALPHR3( * ), B( LDA, * ),
+* $ BETA1( * ), BETA3( * ), EVECTL( LDU, * ),
+* $ EVECTR( LDU, * ), H( LDA, * ), P1( LDA, * ),
+* $ P2( LDA, * ), Q( LDU, * ), RESULT( 15 ),
+* $ S1( LDA, * ), S2( LDA, * ), T( LDA, * ),
+* $ U( LDU, * ), V( LDU, * ), WORK( * ),
+* $ Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKGG checks the nonsymmetric generalized eigenvalue problem
+*> routines.
+*> T T T
+*> SGGHRD factors A and B as U H V and U T V , where means
+*> transpose, H is hessenberg, T is triangular and U and V are
+*> orthogonal.
+*> T T
+*> SHGEQZ factors H and T as Q S Z and Q P Z , where P is upper
+*> triangular, S is in generalized Schur form (block upper triangular,
+*> with 1x1 and 2x2 blocks on the diagonal, the 2x2 blocks
+*> corresponding to complex conjugate pairs of generalized
+*> eigenvalues), and Q and Z are orthogonal. It also computes the
+*> generalized eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)),
+*> where alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus,
+*> w(j) = alpha(j)/beta(j) is a root of the generalized eigenvalue
+*> problem
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
+*> problem
+*>
+*> det( m(j) A - B ) = 0
+*>
+*> STGEVC computes the matrix L of left eigenvectors and the matrix R
+*> of right eigenvectors for the matrix pair ( S, P ). In the
+*> description below, l and r are left and right eigenvectors
+*> corresponding to the generalized eigenvalues (alpha,beta).
+*>
+*> When SCHKGG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 15
+*> tests will be performed. The first twelve "test ratios" should be
+*> small -- O(1). They will be compared with the threshhold THRESH:
+*>
+*> T
+*> (1) | A - U H V | / ( |A| n ulp )
+*>
+*> T
+*> (2) | B - U T V | / ( |B| n ulp )
+*>
+*> T
+*> (3) | I - UU | / ( n ulp )
+*>
+*> T
+*> (4) | I - VV | / ( n ulp )
+*>
+*> T
+*> (5) | H - Q S Z | / ( |H| n ulp )
+*>
+*> T
+*> (6) | T - Q P Z | / ( |T| n ulp )
+*>
+*> T
+*> (7) | I - QQ | / ( n ulp )
+*>
+*> T
+*> (8) | I - ZZ | / ( n ulp )
+*>
+*> (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta S - alpha P) | / ( ulp max( |beta S|, |alpha P| ) )
+*>
+*> (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of
+*> T
+*> | l'**H * (beta H - alpha T) | / ( ulp max( |beta H|, |alpha T| ) )
+*>
+*> where the eigenvectors l' are the result of passing Q to
+*> STGEVC and back transforming (HOWMNY='B').
+*>
+*> (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta S - alpha T) r | / ( ulp max( |beta S|, |alpha T| ) )
+*>
+*> (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of
+*>
+*> | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) )
+*>
+*> where the eigenvectors r' are the result of passing Z to
+*> STGEVC and back transforming (HOWMNY='B').
+*>
+*> The last three test ratios will usually be small, but there is no
+*> mathematical requirement that they be so. They are therefore
+*> compared with THRESH only if TSTDIF is .TRUE.
+*>
+*> (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp )
+*>
+*> (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp )
+*>
+*> (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| ,
+*> |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp
+*>
+*> In addition, the normalization of L and R are checked, and compared
+*> with the threshhold THRSHN.
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) U ( J , J ) V where U and V are random orthogonal matrices.
+*>
+*> (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) U ( big*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) U ( small*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) U ( small*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) U ( big*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SCHKGG does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SCHKGG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SCHKGG to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] TSTDIF
+*> \verbatim
+*> TSTDIF is LOGICAL
+*> Specifies whether test ratios 13-15 will be computed and
+*> compared with THRESH.
+*> = .FALSE.: Only test ratios 1-12 will be computed and tested.
+*> Ratios 13-15 will be set to zero.
+*> = .TRUE.: All the test ratios 1-15 will be computed and
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] THRSHN
+*> \verbatim
+*> THRSHN is REAL
+*> Threshhold for reporting eigenvector normalization error.
+*> If the normalization of any eigenvector differs from 1 by
+*> more than THRSHN*ulp, then a special error message will be
+*> printed. (This is handled separately from the other tests,
+*> since only a compiler or programming error should cause an
+*> error message, at least if THRSHN is at least 5--10.)
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, H, T, S1, P1, S2, and P2.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension
+*> (LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is REAL array, dimension (LDA, max(NN))
+*> The upper Hessenberg matrix computed from A by SGGHRD.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by SGGHRD.
+*> \endverbatim
+*>
+*> \param[out] S1
+*> \verbatim
+*> S1 is REAL array, dimension (LDA, max(NN))
+*> The Schur (block upper triangular) matrix computed from H by
+*> SHGEQZ when Q and Z are also computed.
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is REAL array, dimension (LDA, max(NN))
+*> The Schur (block upper triangular) matrix computed from H by
+*> SHGEQZ when Q and Z are not computed.
+*> \endverbatim
+*>
+*> \param[out] P1
+*> \verbatim
+*> P1 is REAL array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from T by SHGEQZ
+*> when Q and Z are also computed.
+*> \endverbatim
+*>
+*> \param[out] P2
+*> \verbatim
+*> P2 is REAL array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from T by SHGEQZ
+*> when Q and Z are not computed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, max(NN))
+*> The (left) orthogonal matrix computed by SGGHRD.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U, V, Q, Z, EVECTL, and EVECTR. It
+*> must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension (LDU, max(NN))
+*> The (right) orthogonal matrix computed by SGGHRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDU, max(NN))
+*> The (left) orthogonal matrix computed by SHGEQZ.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDU, max(NN))
+*> The (left) orthogonal matrix computed by SHGEQZ.
+*> \endverbatim
+*>
+*> \param[out] ALPHR1
+*> \verbatim
+*> ALPHR1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI1
+*> \verbatim
+*> ALPHI1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by SHGEQZ
+*> when Q, Z, and the full Schur matrices are computed.
+*> On exit, ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th
+*> generalized eigenvalue of the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHR3
+*> \verbatim
+*> ALPHR3 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI3
+*> \verbatim
+*> ALPHI3 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA3
+*> \verbatim
+*> BETA3 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] EVECTL
+*> \verbatim
+*> EVECTL is REAL array, dimension (LDU, max(NN))
+*> The (block lower triangular) left eigenvector matrix for
+*> the matrices in S1 and P1. (See STGEVC for the format.)
+*> \endverbatim
+*>
+*> \param[out] EVECTR
+*> \verbatim
+*> EVECTR is REAL array, dimension (LDU, max(NN))
+*> The (block upper triangular) right eigenvector matrix for
+*> the matrices in S1 and P1. (See STGEVC for the format.)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( 2 * N**2, 6*N, 1 ), for all N=NN(j).
+*> \endverbatim
+*>
+*> \param[out] LLWORK
+*> \verbatim
+*> LLWORK is LOGICAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCHKGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ TSTDIF, THRSHN, NOUNIT, A, LDA, B, H, T, S1,
$ S2, P1, P2, U, LDU, V, Q, Z, ALPHR1, ALPHI1,
@@ -5,8 +515,9 @@
$ WORK, LWORK, LLWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTDIF
@@ -26,350 +537,6 @@
$ Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKGG checks the nonsymmetric generalized eigenvalue problem
-* routines.
-* T T T
-* SGGHRD factors A and B as U H V and U T V , where means
-* transpose, H is hessenberg, T is triangular and U and V are
-* orthogonal.
-* T T
-* SHGEQZ factors H and T as Q S Z and Q P Z , where P is upper
-* triangular, S is in generalized Schur form (block upper triangular,
-* with 1x1 and 2x2 blocks on the diagonal, the 2x2 blocks
-* corresponding to complex conjugate pairs of generalized
-* eigenvalues), and Q and Z are orthogonal. It also computes the
-* generalized eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)),
-* where alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus,
-* w(j) = alpha(j)/beta(j) is a root of the generalized eigenvalue
-* problem
-*
-* det( A - w(j) B ) = 0
-*
-* and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
-* problem
-*
-* det( m(j) A - B ) = 0
-*
-* STGEVC computes the matrix L of left eigenvectors and the matrix R
-* of right eigenvectors for the matrix pair ( S, P ). In the
-* description below, l and r are left and right eigenvectors
-* corresponding to the generalized eigenvalues (alpha,beta).
-*
-* When SCHKGG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 15
-* tests will be performed. The first twelve "test ratios" should be
-* small -- O(1). They will be compared with the threshhold THRESH:
-*
-* T
-* (1) | A - U H V | / ( |A| n ulp )
-*
-* T
-* (2) | B - U T V | / ( |B| n ulp )
-*
-* T
-* (3) | I - UU | / ( n ulp )
-*
-* T
-* (4) | I - VV | / ( n ulp )
-*
-* T
-* (5) | H - Q S Z | / ( |H| n ulp )
-*
-* T
-* (6) | T - Q P Z | / ( |T| n ulp )
-*
-* T
-* (7) | I - QQ | / ( n ulp )
-*
-* T
-* (8) | I - ZZ | / ( n ulp )
-*
-* (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta S - alpha P) | / ( ulp max( |beta S|, |alpha P| ) )
-*
-* (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of
-* T
-* | l'**H * (beta H - alpha T) | / ( ulp max( |beta H|, |alpha T| ) )
-*
-* where the eigenvectors l' are the result of passing Q to
-* STGEVC and back transforming (HOWMNY='B').
-*
-* (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta S - alpha T) r | / ( ulp max( |beta S|, |alpha T| ) )
-*
-* (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of
-*
-* | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) )
-*
-* where the eigenvectors r' are the result of passing Z to
-* STGEVC and back transforming (HOWMNY='B').
-*
-* The last three test ratios will usually be small, but there is no
-* mathematical requirement that they be so. They are therefore
-* compared with THRESH only if TSTDIF is .TRUE.
-*
-* (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp )
-*
-* (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp )
-*
-* (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| ,
-* |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp
-*
-* In addition, the normalization of L and R are checked, and compared
-* with the threshhold THRSHN.
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) U ( J , J ) V where U and V are random orthogonal matrices.
-*
-* (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) U ( big*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) U ( small*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) U ( small*T1, small*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) U ( big*T1, big*T2 ) V diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular
-* matrices.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SCHKGG does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SCHKGG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SCHKGG to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* TSTDIF (input) LOGICAL
-* Specifies whether test ratios 13-15 will be computed and
-* compared with THRESH.
-* = .FALSE.: Only test ratios 1-12 will be computed and tested.
-* Ratios 13-15 will be set to zero.
-* = .TRUE.: All the test ratios 1-15 will be computed and
-* tested.
-*
-* THRSHN (input) REAL
-* Threshhold for reporting eigenvector normalization error.
-* If the normalization of any eigenvector differs from 1 by
-* more than THRSHN*ulp, then a special error message will be
-* printed. (This is handled separately from the other tests,
-* since only a compiler or programming error should cause an
-* error message, at least if THRSHN is at least 5--10.)
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) REAL array, dimension
-* (LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, H, T, S1, P1, S2, and P2.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) REAL array, dimension
-* (LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* H (workspace) REAL array, dimension (LDA, max(NN))
-* The upper Hessenberg matrix computed from A by SGGHRD.
-*
-* T (workspace) REAL array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by SGGHRD.
-*
-* S1 (workspace) REAL array, dimension (LDA, max(NN))
-* The Schur (block upper triangular) matrix computed from H by
-* SHGEQZ when Q and Z are also computed.
-*
-* S2 (workspace) REAL array, dimension (LDA, max(NN))
-* The Schur (block upper triangular) matrix computed from H by
-* SHGEQZ when Q and Z are not computed.
-*
-* P1 (workspace) REAL array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from T by SHGEQZ
-* when Q and Z are also computed.
-*
-* P2 (workspace) REAL array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from T by SHGEQZ
-* when Q and Z are not computed.
-*
-* U (workspace) REAL array, dimension (LDU, max(NN))
-* The (left) orthogonal matrix computed by SGGHRD.
-*
-* LDU (input) INTEGER
-* The leading dimension of U, V, Q, Z, EVECTL, and EVECTR. It
-* must be at least 1 and at least max( NN ).
-*
-* V (workspace) REAL array, dimension (LDU, max(NN))
-* The (right) orthogonal matrix computed by SGGHRD.
-*
-* Q (workspace) REAL array, dimension (LDU, max(NN))
-* The (left) orthogonal matrix computed by SHGEQZ.
-*
-* Z (workspace) REAL array, dimension (LDU, max(NN))
-* The (left) orthogonal matrix computed by SHGEQZ.
-*
-* ALPHR1 (workspace) REAL array, dimension (max(NN))
-* ALPHI1 (workspace) REAL array, dimension (max(NN))
-* BETA1 (workspace) REAL array, dimension (max(NN))
-*
-* The generalized eigenvalues of (A,B) computed by SHGEQZ
-* when Q, Z, and the full Schur matrices are computed.
-* On exit, ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th
-* generalized eigenvalue of the matrices in A and B.
-*
-* ALPHR3 (workspace) REAL array, dimension (max(NN))
-* ALPHI3 (workspace) REAL array, dimension (max(NN))
-* BETA3 (workspace) REAL array, dimension (max(NN))
-*
-* EVECTL (workspace) REAL array, dimension (LDU, max(NN))
-* The (block lower triangular) left eigenvector matrix for
-* the matrices in S1 and P1. (See STGEVC for the format.)
-*
-* EVECTR (workspace) REAL array, dimension (LDU, max(NN))
-* The (block upper triangular) right eigenvector matrix for
-* the matrices in S1 and P1. (See STGEVC for the format.)
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( 2 * N**2, 6*N, 1 ), for all N=NN(j).
-*
-* LLWORK (workspace) LOGICAL array, dimension (max(NN))
-*
-* RESULT (output) REAL array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/schkgk.f b/TESTING/EIG/schkgk.f
index f3de362a..b52eace4 100644
--- a/TESTING/EIG/schkgk.f
+++ b/TESTING/EIG/schkgk.f
@@ -1,27 +1,69 @@
- SUBROUTINE SCHKGK( NIN, NOUT )
+*> \brief \b SCHKGK
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKGK( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* SCHKGK tests SGGBAK, a routine for backward balancing of
-* a matrix pair (A, B).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKGK tests SGGBAK, a routine for backward balancing of
+*> a matrix pair (A, B).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SCHKGK( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/schkgl.f b/TESTING/EIG/schkgl.f
index 889f422f..b82ccb4f 100644
--- a/TESTING/EIG/schkgl.f
+++ b/TESTING/EIG/schkgl.f
@@ -1,26 +1,68 @@
- SUBROUTINE SCHKGL( NIN, NOUT )
+*> \brief \b SCHKGL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKGL( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* SCHKGL tests SGGBAL, a routine for balancing a matrix pair (A, B).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKGL tests SGGBAL, a routine for balancing a matrix pair (A, B).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SCHKGL( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/schkhs.f b/TESTING/EIG/schkhs.f
index 1b4ec78e..60043c2d 100644
--- a/TESTING/EIG/schkhs.f
+++ b/TESTING/EIG/schkhs.f
@@ -1,3 +1,440 @@
+*> \brief \b SCHKHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, WR1,
+* WI1, WR3, WI3, EVECTL, EVECTR, EVECTY, EVECTX,
+* UU, TAU, WORK, NWORK, IWORK, SELECT, RESULT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * ), SELECT( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL A( LDA, * ), EVECTL( LDU, * ),
+* $ EVECTR( LDU, * ), EVECTX( LDU, * ),
+* $ EVECTY( LDU, * ), H( LDA, * ), RESULT( 14 ),
+* $ T1( LDA, * ), T2( LDA, * ), TAU( * ),
+* $ U( LDU, * ), UU( LDU, * ), UZ( LDU, * ),
+* $ WI1( * ), WI3( * ), WORK( * ), WR1( * ),
+* $ WR3( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKHS checks the nonsymmetric eigenvalue problem routines.
+*>
+*> SGEHRD factors A as U H U' , where ' means transpose,
+*> H is hessenberg, and U is an orthogonal matrix.
+*>
+*> SORGHR generates the orthogonal matrix U.
+*>
+*> SORMHR multiplies a matrix by the orthogonal matrix U.
+*>
+*> SHSEQR factors H as Z T Z' , where Z is orthogonal and
+*> T is "quasi-triangular", and the eigenvalue vector W.
+*>
+*> STREVC computes the left and right eigenvector matrices
+*> L and R for T.
+*>
+*> SHSEIN computes the left and right eigenvector matrices
+*> Y and X for H, using inverse iteration.
+*>
+*> When SCHKHS is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 14
+*> tests will be performed:
+*>
+*> (1) | A - U H U**T | / ( |A| n ulp )
+*>
+*> (2) | I - UU**T | / ( n ulp )
+*>
+*> (3) | H - Z T Z**T | / ( |H| n ulp )
+*>
+*> (4) | I - ZZ**T | / ( n ulp )
+*>
+*> (5) | A - UZ H (UZ)**T | / ( |A| n ulp )
+*>
+*> (6) | I - UZ (UZ)**T | / ( n ulp )
+*>
+*> (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp )
+*>
+*> (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp )
+*>
+*> (9) | TR - RW | / ( |T| |R| ulp )
+*>
+*> (10) | L**H T - W**H L | / ( |T| |L| ulp )
+*>
+*> (11) | HX - XW | / ( |H| |X| ulp )
+*>
+*> (12) | Y**H H - W**H Y | / ( |H| |Y| ulp )
+*>
+*> (13) | AX - XW | / ( |A| |X| ulp )
+*>
+*> (14) | Y**H A - W**H Y | / ( |A| |Y| ulp )
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (8) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (18) Same as (16), but multiplied by SQRT( underflow threshold )
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> (20) Same as (19), but multiplied by SQRT( overflow threshold )
+*> (21) Same as (19), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES - INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SCHKHS does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN - INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES - INTEGER
+*> The number of elements in DOTYPE. If it is zero, SCHKHS
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE - LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED - INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SCHKHS to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH - REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT - INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A - REAL array, dimension (LDA,max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> The leading dimension of A, H, T1 and T2. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> H - REAL array, dimension (LDA,max(NN))
+*> The upper hessenberg matrix computed by SGEHRD. On exit,
+*> H contains the Hessenberg form of the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> T1 - REAL array, dimension (LDA,max(NN))
+*> The Schur (="quasi-triangular") matrix computed by SHSEQR
+*> if Z is computed. On exit, T1 contains the Schur form of
+*> the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> T2 - REAL array, dimension (LDA,max(NN))
+*> The Schur matrix computed by SHSEQR when Z is not computed.
+*> This should be identical to T1.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDU - INTEGER
+*> The leading dimension of U, Z, UZ and UU. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> U - REAL array, dimension (LDU,max(NN))
+*> The orthogonal matrix computed by SGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z - REAL array, dimension (LDU,max(NN))
+*> The orthogonal matrix computed by SHSEQR.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> UZ - REAL array, dimension (LDU,max(NN))
+*> The product of U times Z.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WR1 - REAL array, dimension (max(NN))
+*> WI1 - REAL array, dimension (max(NN))
+*> The real and imaginary parts of the eigenvalues of A,
+*> as computed when Z is computed.
+*> On exit, WR1 + WI1*i are the eigenvalues of the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WR3 - REAL array, dimension (max(NN))
+*> WI3 - REAL array, dimension (max(NN))
+*> Like WR1, WI1, these arrays contain the eigenvalues of A,
+*> but those computed when SHSEQR only computes the
+*> eigenvalues, i.e., not the Schur vectors and no more of the
+*> Schur form than is necessary for computing the
+*> eigenvalues.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTL - REAL array, dimension (LDU,max(NN))
+*> The (upper triangular) left eigenvector matrix for the
+*> matrix in T1. For complex conjugate pairs, the real part
+*> is stored in one row and the imaginary part in the next.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTR - REAL array, dimension (LDU,max(NN))
+*> The (upper triangular) right eigenvector matrix for the
+*> matrix in T1. For complex conjugate pairs, the real part
+*> is stored in one column and the imaginary part in the next.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTY - REAL array, dimension (LDU,max(NN))
+*> The left eigenvector matrix for the
+*> matrix in H. For complex conjugate pairs, the real part
+*> is stored in one row and the imaginary part in the next.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTX - REAL array, dimension (LDU,max(NN))
+*> The right eigenvector matrix for the
+*> matrix in H. For complex conjugate pairs, the real part
+*> is stored in one column and the imaginary part in the next.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> UU - REAL array, dimension (LDU,max(NN))
+*> Details of the orthogonal matrix computed by SGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> TAU - REAL array, dimension(max(NN))
+*> Further details of the orthogonal matrix computed by SGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK - REAL array, dimension (NWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> NWORK - INTEGER
+*> The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2.
+*> \endverbatim
+*> \verbatim
+*> IWORK - INTEGER array, dimension (max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> SELECT - LOGICAL array, dimension (max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT - REAL array, dimension (14)
+*> The values computed by the fourteen tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -14: LDU < 1 or LDU < NMAX.
+*> -28: NWORK too small.
+*> If SLATMR, SLATMS, or SLATME returns an error code, the
+*> absolute value of it is returned.
+*> If 1, then SHSEQR could not find all the shifts.
+*> If 2, then the EISPACK code (for small blocks) failed.
+*> If >2, then 30*N iterations were not enough to find an
+*> eigenvalue or to decompose the problem.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> MTEST The number of tests defined: care must be taken
+*> that (1) the size of RESULT, (2) the number of
+*> tests actually performed, and (3) MTEST agree.
+*> NTEST The number of tests performed on this matrix
+*> so far. This should be less than MTEST, and
+*> equal to it by the last test. It will be less
+*> if any of the routines being tested indicates
+*> that it could not compute the matrices that
+*> would be tested.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by SLAFTS).
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL,
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selects whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, WR1,
$ WI1, WR3, WI3, EVECTL, EVECTR, EVECTY, EVECTX,
@@ -5,8 +442,9 @@
$ INFO )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
@@ -24,356 +462,6 @@
$ WR3( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKHS checks the nonsymmetric eigenvalue problem routines.
-*
-* SGEHRD factors A as U H U' , where ' means transpose,
-* H is hessenberg, and U is an orthogonal matrix.
-*
-* SORGHR generates the orthogonal matrix U.
-*
-* SORMHR multiplies a matrix by the orthogonal matrix U.
-*
-* SHSEQR factors H as Z T Z' , where Z is orthogonal and
-* T is "quasi-triangular", and the eigenvalue vector W.
-*
-* STREVC computes the left and right eigenvector matrices
-* L and R for T.
-*
-* SHSEIN computes the left and right eigenvector matrices
-* Y and X for H, using inverse iteration.
-*
-* When SCHKHS is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 14
-* tests will be performed:
-*
-* (1) | A - U H U**T | / ( |A| n ulp )
-*
-* (2) | I - UU**T | / ( n ulp )
-*
-* (3) | H - Z T Z**T | / ( |H| n ulp )
-*
-* (4) | I - ZZ**T | / ( n ulp )
-*
-* (5) | A - UZ H (UZ)**T | / ( |A| n ulp )
-*
-* (6) | I - UZ (UZ)**T | / ( n ulp )
-*
-* (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp )
-*
-* (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp )
-*
-* (9) | TR - RW | / ( |T| |R| ulp )
-*
-* (10) | L**H T - W**H L | / ( |T| |L| ulp )
-*
-* (11) | HX - XW | / ( |H| |X| ulp )
-*
-* (12) | Y**H H - W**H Y | / ( |H| |Y| ulp )
-*
-* (13) | AX - XW | / ( |A| |X| ulp )
-*
-* (14) | Y**H A - W**H Y | / ( |A| |Y| ulp )
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by SQRT( overflow threshold )
-* (8) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by SQRT( overflow threshold )
-* (18) Same as (16), but multiplied by SQRT( underflow threshold )
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* (20) Same as (19), but multiplied by SQRT( overflow threshold )
-* (21) Same as (19), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* ==========
-*
-* NSIZES - INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SCHKHS does nothing. It must be at least zero.
-* Not modified.
-*
-* NN - INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES - INTEGER
-* The number of elements in DOTYPE. If it is zero, SCHKHS
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE - LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED - INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SCHKHS to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH - REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT - INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A - REAL array, dimension (LDA,max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA - INTEGER
-* The leading dimension of A, H, T1 and T2. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* H - REAL array, dimension (LDA,max(NN))
-* The upper hessenberg matrix computed by SGEHRD. On exit,
-* H contains the Hessenberg form of the matrix in A.
-* Modified.
-*
-* T1 - REAL array, dimension (LDA,max(NN))
-* The Schur (="quasi-triangular") matrix computed by SHSEQR
-* if Z is computed. On exit, T1 contains the Schur form of
-* the matrix in A.
-* Modified.
-*
-* T2 - REAL array, dimension (LDA,max(NN))
-* The Schur matrix computed by SHSEQR when Z is not computed.
-* This should be identical to T1.
-* Modified.
-*
-* LDU - INTEGER
-* The leading dimension of U, Z, UZ and UU. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* U - REAL array, dimension (LDU,max(NN))
-* The orthogonal matrix computed by SGEHRD.
-* Modified.
-*
-* Z - REAL array, dimension (LDU,max(NN))
-* The orthogonal matrix computed by SHSEQR.
-* Modified.
-*
-* UZ - REAL array, dimension (LDU,max(NN))
-* The product of U times Z.
-* Modified.
-*
-* WR1 - REAL array, dimension (max(NN))
-* WI1 - REAL array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A,
-* as computed when Z is computed.
-* On exit, WR1 + WI1*i are the eigenvalues of the matrix in A.
-* Modified.
-*
-* WR3 - REAL array, dimension (max(NN))
-* WI3 - REAL array, dimension (max(NN))
-* Like WR1, WI1, these arrays contain the eigenvalues of A,
-* but those computed when SHSEQR only computes the
-* eigenvalues, i.e., not the Schur vectors and no more of the
-* Schur form than is necessary for computing the
-* eigenvalues.
-* Modified.
-*
-* EVECTL - REAL array, dimension (LDU,max(NN))
-* The (upper triangular) left eigenvector matrix for the
-* matrix in T1. For complex conjugate pairs, the real part
-* is stored in one row and the imaginary part in the next.
-* Modified.
-*
-* EVECTR - REAL array, dimension (LDU,max(NN))
-* The (upper triangular) right eigenvector matrix for the
-* matrix in T1. For complex conjugate pairs, the real part
-* is stored in one column and the imaginary part in the next.
-* Modified.
-*
-* EVECTY - REAL array, dimension (LDU,max(NN))
-* The left eigenvector matrix for the
-* matrix in H. For complex conjugate pairs, the real part
-* is stored in one row and the imaginary part in the next.
-* Modified.
-*
-* EVECTX - REAL array, dimension (LDU,max(NN))
-* The right eigenvector matrix for the
-* matrix in H. For complex conjugate pairs, the real part
-* is stored in one column and the imaginary part in the next.
-* Modified.
-*
-* UU - REAL array, dimension (LDU,max(NN))
-* Details of the orthogonal matrix computed by SGEHRD.
-* Modified.
-*
-* TAU - REAL array, dimension(max(NN))
-* Further details of the orthogonal matrix computed by SGEHRD.
-* Modified.
-*
-* WORK - REAL array, dimension (NWORK)
-* Workspace.
-* Modified.
-*
-* NWORK - INTEGER
-* The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2.
-*
-* IWORK - INTEGER array, dimension (max(NN))
-* Workspace.
-* Modified.
-*
-* SELECT - LOGICAL array, dimension (max(NN))
-* Workspace.
-* Modified.
-*
-* RESULT - REAL array, dimension (14)
-* The values computed by the fourteen tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-* Modified.
-*
-* INFO - INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -14: LDU < 1 or LDU < NMAX.
-* -28: NWORK too small.
-* If SLATMR, SLATMS, or SLATME returns an error code, the
-* absolute value of it is returned.
-* If 1, then SHSEQR could not find all the shifts.
-* If 2, then the EISPACK code (for small blocks) failed.
-* If >2, then 30*N iterations were not enough to find an
-* eigenvalue or to decompose the problem.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* MTEST The number of tests defined: care must be taken
-* that (1) the size of RESULT, (2) the number of
-* tests actually performed, and (3) MTEST agree.
-* NTEST The number of tests performed on this matrix
-* so far. This should be less than MTEST, and
-* equal to it by the last test. It will be less
-* if any of the routines being tested indicates
-* that it could not compute the matrices that
-* would be tested.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by SLAFTS).
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL,
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selects whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/schksb.f b/TESTING/EIG/schksb.f
index a15eb901..128428fd 100644
--- a/TESTING/EIG/schksb.f
+++ b/TESTING/EIG/schksb.f
@@ -1,10 +1,307 @@
+*> \brief \b SCHKSB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKSB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED,
+* THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK,
+* LWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
+* $ NWDTHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), KK( * ), NN( * )
+* REAL A( LDA, * ), RESULT( * ), SD( * ), SE( * ),
+* $ U( LDU, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKSB tests the reduction of a symmetric band matrix to tridiagonal
+*> form, used with the symmetric eigenvalue problem.
+*>
+*> SSBTRD factors a symmetric band matrix A as U S U' , where ' means
+*> transpose, S is symmetric tridiagonal, and U is orthogonal.
+*> SSBTRD can use either just the lower or just the upper triangle
+*> of A; SCHKSB checks both cases.
+*>
+*> When SCHKSB is called, a number of matrix "sizes" ("n's"), a number
+*> of bandwidths ("k's"), and a number of matrix "types" are
+*> specified. For each size ("n"), each bandwidth ("k") less than or
+*> equal to "n", and each type of matrix, one matrix will be generated
+*> and used to test the symmetric banded reduction routine. For each
+*> matrix, a number of tests will be performed:
+*>
+*> (1) | A - V S V' | / ( |A| n ulp ) computed by SSBTRD with
+*> UPLO='U'
+*>
+*> (2) | I - UU' | / ( n ulp )
+*>
+*> (3) | A - V S V' | / ( |A| n ulp ) computed by SSBTRD with
+*> UPLO='L'
+*>
+*> (4) | I - UU' | / ( n ulp )
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U' D U, where U is orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U' D U, where U is orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U' D U, where U is orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SCHKSB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NWDTHS
+*> \verbatim
+*> NWDTHS is INTEGER
+*> The number of bandwidths to use. If it is zero,
+*> SCHKSB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KK
+*> \verbatim
+*> KK is INTEGER array, dimension (NWDTHS)
+*> An array containing the bandwidths to be used for the band
+*> matrices. The values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SCHKSB
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SCHKSB to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 2 (not 1!)
+*> and at least max( KK )+1.
+*> \endverbatim
+*>
+*> \param[out] SD
+*> \verbatim
+*> SD is REAL array, dimension (max(NN))
+*> Used to hold the diagonal of the tridiagonal matrix computed
+*> by SSBTRD.
+*> \endverbatim
+*>
+*> \param[out] SE
+*> \verbatim
+*> SE is REAL array, dimension (max(NN))
+*> Used to hold the off-diagonal of the tridiagonal matrix
+*> computed by SSBTRD.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, max(NN))
+*> Used to hold the orthogonal matrix computed by SSBTRD.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( LDA+1, max(NN)+1 )*max(NN).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCHKSB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED,
$ THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK,
$ LWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
@@ -18,197 +315,6 @@
$ U( LDU, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKSB tests the reduction of a symmetric band matrix to tridiagonal
-* form, used with the symmetric eigenvalue problem.
-*
-* SSBTRD factors a symmetric band matrix A as U S U' , where ' means
-* transpose, S is symmetric tridiagonal, and U is orthogonal.
-* SSBTRD can use either just the lower or just the upper triangle
-* of A; SCHKSB checks both cases.
-*
-* When SCHKSB is called, a number of matrix "sizes" ("n's"), a number
-* of bandwidths ("k's"), and a number of matrix "types" are
-* specified. For each size ("n"), each bandwidth ("k") less than or
-* equal to "n", and each type of matrix, one matrix will be generated
-* and used to test the symmetric banded reduction routine. For each
-* matrix, a number of tests will be performed:
-*
-* (1) | A - V S V' | / ( |A| n ulp ) computed by SSBTRD with
-* UPLO='U'
-*
-* (2) | I - UU' | / ( n ulp )
-*
-* (3) | A - V S V' | / ( |A| n ulp ) computed by SSBTRD with
-* UPLO='L'
-*
-* (4) | I - UU' | / ( n ulp )
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U' D U, where U is orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U' D U, where U is orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U' D U, where U is orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SCHKSB does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NWDTHS (input) INTEGER
-* The number of bandwidths to use. If it is zero,
-* SCHKSB does nothing. It must be at least zero.
-*
-* KK (input) INTEGER array, dimension (NWDTHS)
-* An array containing the bandwidths to be used for the band
-* matrices. The values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SCHKSB
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SCHKSB to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) REAL array, dimension
-* (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 2 (not 1!)
-* and at least max( KK )+1.
-*
-* SD (workspace) REAL array, dimension (max(NN))
-* Used to hold the diagonal of the tridiagonal matrix computed
-* by SSBTRD.
-*
-* SE (workspace) REAL array, dimension (max(NN))
-* Used to hold the off-diagonal of the tridiagonal matrix
-* computed by SSBTRD.
-*
-* U (workspace) REAL array, dimension (LDU, max(NN))
-* Used to hold the orthogonal matrix computed by SSBTRD.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. It must be at least 1
-* and at least max( NN ).
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( LDA+1, max(NN)+1 )*max(NN).
-*
-* RESULT (output) REAL array, dimension (4)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/schkst.f b/TESTING/EIG/schkst.f
index 1cf5e298..5933e850 100644
--- a/TESTING/EIG/schkst.f
+++ b/TESTING/EIG/schkst.f
@@ -1,12 +1,541 @@
+*> \brief \b SCHKST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
+* WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
+* LWORK, IWORK, LIWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL A( LDA, * ), AP( * ), D1( * ), D2( * ),
+* $ D3( * ), D4( * ), D5( * ), RESULT( * ),
+* $ SD( * ), SE( * ), TAU( * ), U( LDU, * ),
+* $ V( LDU, * ), VP( * ), WA1( * ), WA2( * ),
+* $ WA3( * ), WORK( * ), WR( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKST checks the symmetric eigenvalue problem routines.
+*>
+*> SSYTRD factors A as U S U' , where ' means transpose,
+*> S is symmetric tridiagonal, and U is orthogonal.
+*> SSYTRD can use either just the lower or just the upper triangle
+*> of A; SCHKST checks both cases.
+*> U is represented as a product of Householder
+*> transformations, whose vectors are stored in the first
+*> n-1 columns of V, and whose scale factors are in TAU.
+*>
+*> SSPTRD does the same as SSYTRD, except that A and V are stored
+*> in "packed" format.
+*>
+*> SORGTR constructs the matrix U from the contents of V and TAU.
+*>
+*> SOPGTR constructs the matrix U from the contents of VP and TAU.
+*>
+*> SSTEQR factors S as Z D1 Z' , where Z is the orthogonal
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal. D2 is the matrix of
+*> eigenvalues computed when Z is not computed.
+*>
+*> SSTERF computes D3, the matrix of eigenvalues, by the
+*> PWK method, which does not yield eigenvectors.
+*>
+*> SPTEQR factors S as Z4 D4 Z4' , for a
+*> symmetric positive definite tridiagonal matrix.
+*> D5 is the matrix of eigenvalues computed when Z is not
+*> computed.
+*>
+*> SSTEBZ computes selected eigenvalues. WA1, WA2, and
+*> WA3 will denote eigenvalues computed to high
+*> absolute accuracy, with different range options.
+*> WR will denote eigenvalues computed to high relative
+*> accuracy.
+*>
+*> SSTEIN computes Y, the eigenvectors of S, given the
+*> eigenvalues.
+*>
+*> SSTEDC factors S as Z D1 Z' , where Z is the orthogonal
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal ('I' option). It may also
+*> update an input orthogonal matrix, usually the output
+*> from SSYTRD/SORGTR or SSPTRD/SOPGTR ('V' option). It may
+*> also just compute eigenvalues ('N' option).
+*>
+*> SSTEMR factors S as Z D1 Z' , where Z is the orthogonal
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal ('I' option). SSTEMR
+*> uses the Relatively Robust Representation whenever possible.
+*>
+*> When SCHKST is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the symmetric eigenroutines. For each matrix, a number
+*> of tests will be performed:
+*>
+*> (1) | A - V S V' | / ( |A| n ulp ) SSYTRD( UPLO='U', ... )
+*>
+*> (2) | I - UV' | / ( n ulp ) SORGTR( UPLO='U', ... )
+*>
+*> (3) | A - V S V' | / ( |A| n ulp ) SSYTRD( UPLO='L', ... )
+*>
+*> (4) | I - UV' | / ( n ulp ) SORGTR( UPLO='L', ... )
+*>
+*> (5-8) Same as 1-4, but for SSPTRD and SOPGTR.
+*>
+*> (9) | S - Z D Z' | / ( |S| n ulp ) SSTEQR('V',...)
+*>
+*> (10) | I - ZZ' | / ( n ulp ) SSTEQR('V',...)
+*>
+*> (11) | D1 - D2 | / ( |D1| ulp ) SSTEQR('N',...)
+*>
+*> (12) | D1 - D3 | / ( |D1| ulp ) SSTERF
+*>
+*> (13) 0 if the true eigenvalues (computed by sturm count)
+*> of S are within THRESH of
+*> those in D1. 2*THRESH if they are not. (Tested using
+*> SSTECH)
+*>
+*> For S positive definite,
+*>
+*> (14) | S - Z4 D4 Z4' | / ( |S| n ulp ) SPTEQR('V',...)
+*>
+*> (15) | I - Z4 Z4' | / ( n ulp ) SPTEQR('V',...)
+*>
+*> (16) | D4 - D5 | / ( 100 |D4| ulp ) SPTEQR('N',...)
+*>
+*> When S is also diagonally dominant by the factor gamma < 1,
+*>
+*> (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> SSTEBZ( 'A', 'E', ...)
+*>
+*> (18) | WA1 - D3 | / ( |D3| ulp ) SSTEBZ( 'A', 'E', ...)
+*>
+*> (19) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> SSTEBZ( 'I', 'E', ...)
+*>
+*> (20) | S - Y WA1 Y' | / ( |S| n ulp ) SSTEBZ, SSTEIN
+*>
+*> (21) | I - Y Y' | / ( n ulp ) SSTEBZ, SSTEIN
+*>
+*> (22) | S - Z D Z' | / ( |S| n ulp ) SSTEDC('I')
+*>
+*> (23) | I - ZZ' | / ( n ulp ) SSTEDC('I')
+*>
+*> (24) | S - Z D Z' | / ( |S| n ulp ) SSTEDC('V')
+*>
+*> (25) | I - ZZ' | / ( n ulp ) SSTEDC('V')
+*>
+*> (26) | D1 - D2 | / ( |D1| ulp ) SSTEDC('V') and
+*> SSTEDC('N')
+*>
+*> Test 27 is disabled at the moment because SSTEMR does not
+*> guarantee high relatvie accuracy.
+*>
+*> (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> SSTEMR('V', 'A')
+*>
+*> (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> SSTEMR('V', 'I')
+*>
+*> Tests 29 through 34 are disable at present because SSTEMR
+*> does not handle partial specturm requests.
+*>
+*> (29) | S - Z D Z' | / ( |S| n ulp ) SSTEMR('V', 'I')
+*>
+*> (30) | I - ZZ' | / ( n ulp ) SSTEMR('V', 'I')
+*>
+*> (31) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> SSTEMR('N', 'I') vs. SSTEMR('V', 'I')
+*>
+*> (32) | S - Z D Z' | / ( |S| n ulp ) SSTEMR('V', 'V')
+*>
+*> (33) | I - ZZ' | / ( n ulp ) SSTEMR('V', 'V')
+*>
+*> (34) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> SSTEMR('N', 'V') vs. SSTEMR('V', 'V')
+*>
+*> (35) | S - Z D Z' | / ( |S| n ulp ) SSTEMR('V', 'A')
+*>
+*> (36) | I - ZZ' | / ( n ulp ) SSTEMR('V', 'A')
+*>
+*> (37) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> SSTEMR('N', 'A') vs. SSTEMR('V', 'A')
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U' D U, where U is orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U' D U, where U is orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U' D U, where U is orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*> (16) Same as (8), but diagonal elements are all positive.
+*> (17) Same as (9), but diagonal elements are all positive.
+*> (18) Same as (10), but diagonal elements are all positive.
+*> (19) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (20) Same as (16), but multiplied by SQRT( underflow threshold )
+*> (21) A diagonally dominant tridiagonal matrix with geometrically
+*> spaced diagonal entries 1, ..., ULP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SCHKST does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SCHKST
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SCHKST to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array of
+*> dimension ( LDA , max(NN) )
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is REAL array of
+*> dimension( max(NN)*max(NN+1)/2 )
+*> The matrix A stored in packed format.
+*> \endverbatim
+*>
+*> \param[out] SD
+*> \verbatim
+*> SD is REAL array of
+*> dimension( max(NN) )
+*> The diagonal of the tridiagonal matrix computed by SSYTRD.
+*> On exit, SD and SE contain the tridiagonal form of the
+*> matrix in A.
+*> \endverbatim
+*>
+*> \param[out] SE
+*> \verbatim
+*> SE is REAL array of
+*> dimension( max(NN) )
+*> The off-diagonal of the tridiagonal matrix computed by
+*> SSYTRD. On exit, SD and SE contain the tridiagonal form of
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D1
+*> \verbatim
+*> D1 is REAL array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by SSTEQR simlutaneously
+*> with Z. On exit, the eigenvalues in D1 correspond with the
+*> matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D2
+*> \verbatim
+*> D2 is REAL array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by SSTEQR if Z is not
+*> computed. On exit, the eigenvalues in D2 correspond with
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D3
+*> \verbatim
+*> D3 is REAL array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by SSTERF. On exit, the
+*> eigenvalues in D3 correspond with the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array of
+*> dimension( LDU, max(NN) ).
+*> The orthogonal matrix computed by SSYTRD + SORGTR.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U, Z, and V. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array of
+*> dimension( LDU, max(NN) ).
+*> The Housholder vectors computed by SSYTRD in reducing A to
+*> tridiagonal form. The vectors computed with UPLO='U' are
+*> in the upper triangle, and the vectors computed with UPLO='L'
+*> are in the lower triangle. (As described in SSYTRD, the
+*> sub- and superdiagonal are not set to 1, although the
+*> true Householder vector has a 1 in that position. The
+*> routines that use V, such as SORGTR, set those entries to
+*> 1 before using them, and then restore them later.)
+*> \endverbatim
+*>
+*> \param[out] VP
+*> \verbatim
+*> VP is REAL array of
+*> dimension( max(NN)*max(NN+1)/2 )
+*> The matrix V stored in packed format.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array of
+*> dimension( max(NN) )
+*> The Householder factors computed by SSYTRD in reducing A
+*> to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array of
+*> dimension( LDU, max(NN) ).
+*> The orthogonal matrix of eigenvectors computed by SSTEQR,
+*> SPTEQR, and SSTEIN.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array of
+*> dimension( LWORK )
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array,
+*> dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (26)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -23: LDU < 1 or LDU < NMAX.
+*> -29: LWORK too small.
+*> If SLATMR, SLATMS, SSYTRD, SORGTR, SSTEQR, SSTERF,
+*> or SORMC2 returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NBLOCK Blocksize as returned by ENVIR.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCHKST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
$ WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
$ LWORK, IWORK, LIWORK, RESULT, INFO )
- IMPLICIT NONE
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
@@ -23,405 +552,6 @@
$ WA3( * ), WORK( * ), WR( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKST checks the symmetric eigenvalue problem routines.
-*
-* SSYTRD factors A as U S U' , where ' means transpose,
-* S is symmetric tridiagonal, and U is orthogonal.
-* SSYTRD can use either just the lower or just the upper triangle
-* of A; SCHKST checks both cases.
-* U is represented as a product of Householder
-* transformations, whose vectors are stored in the first
-* n-1 columns of V, and whose scale factors are in TAU.
-*
-* SSPTRD does the same as SSYTRD, except that A and V are stored
-* in "packed" format.
-*
-* SORGTR constructs the matrix U from the contents of V and TAU.
-*
-* SOPGTR constructs the matrix U from the contents of VP and TAU.
-*
-* SSTEQR factors S as Z D1 Z' , where Z is the orthogonal
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal. D2 is the matrix of
-* eigenvalues computed when Z is not computed.
-*
-* SSTERF computes D3, the matrix of eigenvalues, by the
-* PWK method, which does not yield eigenvectors.
-*
-* SPTEQR factors S as Z4 D4 Z4' , for a
-* symmetric positive definite tridiagonal matrix.
-* D5 is the matrix of eigenvalues computed when Z is not
-* computed.
-*
-* SSTEBZ computes selected eigenvalues. WA1, WA2, and
-* WA3 will denote eigenvalues computed to high
-* absolute accuracy, with different range options.
-* WR will denote eigenvalues computed to high relative
-* accuracy.
-*
-* SSTEIN computes Y, the eigenvectors of S, given the
-* eigenvalues.
-*
-* SSTEDC factors S as Z D1 Z' , where Z is the orthogonal
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal ('I' option). It may also
-* update an input orthogonal matrix, usually the output
-* from SSYTRD/SORGTR or SSPTRD/SOPGTR ('V' option). It may
-* also just compute eigenvalues ('N' option).
-*
-* SSTEMR factors S as Z D1 Z' , where Z is the orthogonal
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal ('I' option). SSTEMR
-* uses the Relatively Robust Representation whenever possible.
-*
-* When SCHKST is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the symmetric eigenroutines. For each matrix, a number
-* of tests will be performed:
-*
-* (1) | A - V S V' | / ( |A| n ulp ) SSYTRD( UPLO='U', ... )
-*
-* (2) | I - UV' | / ( n ulp ) SORGTR( UPLO='U', ... )
-*
-* (3) | A - V S V' | / ( |A| n ulp ) SSYTRD( UPLO='L', ... )
-*
-* (4) | I - UV' | / ( n ulp ) SORGTR( UPLO='L', ... )
-*
-* (5-8) Same as 1-4, but for SSPTRD and SOPGTR.
-*
-* (9) | S - Z D Z' | / ( |S| n ulp ) SSTEQR('V',...)
-*
-* (10) | I - ZZ' | / ( n ulp ) SSTEQR('V',...)
-*
-* (11) | D1 - D2 | / ( |D1| ulp ) SSTEQR('N',...)
-*
-* (12) | D1 - D3 | / ( |D1| ulp ) SSTERF
-*
-* (13) 0 if the true eigenvalues (computed by sturm count)
-* of S are within THRESH of
-* those in D1. 2*THRESH if they are not. (Tested using
-* SSTECH)
-*
-* For S positive definite,
-*
-* (14) | S - Z4 D4 Z4' | / ( |S| n ulp ) SPTEQR('V',...)
-*
-* (15) | I - Z4 Z4' | / ( n ulp ) SPTEQR('V',...)
-*
-* (16) | D4 - D5 | / ( 100 |D4| ulp ) SPTEQR('N',...)
-*
-* When S is also diagonally dominant by the factor gamma < 1,
-*
-* (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* SSTEBZ( 'A', 'E', ...)
-*
-* (18) | WA1 - D3 | / ( |D3| ulp ) SSTEBZ( 'A', 'E', ...)
-*
-* (19) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* SSTEBZ( 'I', 'E', ...)
-*
-* (20) | S - Y WA1 Y' | / ( |S| n ulp ) SSTEBZ, SSTEIN
-*
-* (21) | I - Y Y' | / ( n ulp ) SSTEBZ, SSTEIN
-*
-* (22) | S - Z D Z' | / ( |S| n ulp ) SSTEDC('I')
-*
-* (23) | I - ZZ' | / ( n ulp ) SSTEDC('I')
-*
-* (24) | S - Z D Z' | / ( |S| n ulp ) SSTEDC('V')
-*
-* (25) | I - ZZ' | / ( n ulp ) SSTEDC('V')
-*
-* (26) | D1 - D2 | / ( |D1| ulp ) SSTEDC('V') and
-* SSTEDC('N')
-*
-* Test 27 is disabled at the moment because SSTEMR does not
-* guarantee high relatvie accuracy.
-*
-* (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* SSTEMR('V', 'A')
-*
-* (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* SSTEMR('V', 'I')
-*
-* Tests 29 through 34 are disable at present because SSTEMR
-* does not handle partial specturm requests.
-*
-* (29) | S - Z D Z' | / ( |S| n ulp ) SSTEMR('V', 'I')
-*
-* (30) | I - ZZ' | / ( n ulp ) SSTEMR('V', 'I')
-*
-* (31) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* SSTEMR('N', 'I') vs. SSTEMR('V', 'I')
-*
-* (32) | S - Z D Z' | / ( |S| n ulp ) SSTEMR('V', 'V')
-*
-* (33) | I - ZZ' | / ( n ulp ) SSTEMR('V', 'V')
-*
-* (34) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* SSTEMR('N', 'V') vs. SSTEMR('V', 'V')
-*
-* (35) | S - Z D Z' | / ( |S| n ulp ) SSTEMR('V', 'A')
-*
-* (36) | I - ZZ' | / ( n ulp ) SSTEMR('V', 'A')
-*
-* (37) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* SSTEMR('N', 'A') vs. SSTEMR('V', 'A')
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U' D U, where U is orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U' D U, where U is orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U' D U, where U is orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-* (16) Same as (8), but diagonal elements are all positive.
-* (17) Same as (9), but diagonal elements are all positive.
-* (18) Same as (10), but diagonal elements are all positive.
-* (19) Same as (16), but multiplied by SQRT( overflow threshold )
-* (20) Same as (16), but multiplied by SQRT( underflow threshold )
-* (21) A diagonally dominant tridiagonal matrix with geometrically
-* spaced diagonal entries 1, ..., ULP.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SCHKST does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SCHKST
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SCHKST to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace/output) REAL array of
-* dimension ( LDA , max(NN) )
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-*
-* AP (workspace) REAL array of
-* dimension( max(NN)*max(NN+1)/2 )
-* The matrix A stored in packed format.
-*
-* SD (workspace/output) REAL array of
-* dimension( max(NN) )
-* The diagonal of the tridiagonal matrix computed by SSYTRD.
-* On exit, SD and SE contain the tridiagonal form of the
-* matrix in A.
-*
-* SE (workspace/output) REAL array of
-* dimension( max(NN) )
-* The off-diagonal of the tridiagonal matrix computed by
-* SSYTRD. On exit, SD and SE contain the tridiagonal form of
-* the matrix in A.
-*
-* D1 (workspace/output) REAL array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by SSTEQR simlutaneously
-* with Z. On exit, the eigenvalues in D1 correspond with the
-* matrix in A.
-*
-* D2 (workspace/output) REAL array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by SSTEQR if Z is not
-* computed. On exit, the eigenvalues in D2 correspond with
-* the matrix in A.
-*
-* D3 (workspace/output) REAL array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by SSTERF. On exit, the
-* eigenvalues in D3 correspond with the matrix in A.
-*
-* U (workspace/output) REAL array of
-* dimension( LDU, max(NN) ).
-* The orthogonal matrix computed by SSYTRD + SORGTR.
-*
-* LDU (input) INTEGER
-* The leading dimension of U, Z, and V. It must be at least 1
-* and at least max( NN ).
-*
-* V (workspace/output) REAL array of
-* dimension( LDU, max(NN) ).
-* The Housholder vectors computed by SSYTRD in reducing A to
-* tridiagonal form. The vectors computed with UPLO='U' are
-* in the upper triangle, and the vectors computed with UPLO='L'
-* are in the lower triangle. (As described in SSYTRD, the
-* sub- and superdiagonal are not set to 1, although the
-* true Householder vector has a 1 in that position. The
-* routines that use V, such as SORGTR, set those entries to
-* 1 before using them, and then restore them later.)
-*
-* VP (workspace) REAL array of
-* dimension( max(NN)*max(NN+1)/2 )
-* The matrix V stored in packed format.
-*
-* TAU (workspace/output) REAL array of
-* dimension( max(NN) )
-* The Householder factors computed by SSYTRD in reducing A
-* to tridiagonal form.
-*
-* Z (workspace/output) REAL array of
-* dimension( LDU, max(NN) ).
-* The orthogonal matrix of eigenvectors computed by SSTEQR,
-* SPTEQR, and SSTEIN.
-*
-* WORK (workspace/output) REAL array of
-* dimension( LWORK )
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-*
-* IWORK (workspace/output) INTEGER array,
-* dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-* Workspace.
-*
-* RESULT (output) REAL array, dimension (26)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -23: LDU < 1 or LDU < NMAX.
-* -29: LWORK too small.
-* If SLATMR, SLATMS, SSYTRD, SORGTR, SSTEQR, SSTERF,
-* or SORMC2 returns an error code, the
-* absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NBLOCK Blocksize as returned by ENVIR.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sckcsd.f b/TESTING/EIG/sckcsd.f
index d6f4c22c..e4281d14 100644
--- a/TESTING/EIG/sckcsd.f
+++ b/TESTING/EIG/sckcsd.f
@@ -1,15 +1,195 @@
+*> \brief \b SCKCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCKCSD( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
+* MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
+* WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), PVAL( * ),
+* $ QVAL( * )
+* REAL RWORK( * ), THETA( * )
+* REAL U1( * ), U2( * ), V1T( * ), V2T( * ),
+* $ WORK( * ), X( * ), XF( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCKCSD tests SORCSD:
+*> the CSD for an M-by-M orthogonal matrix X partitioned as
+*> [ X11 X12; X21 X22 ]. X11 is P-by-Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension P.
+*> \endverbatim
+*>
+*> \param[in] QVAL
+*> \verbatim
+*> QVAL is INTEGER array, dimension (NM)
+*> The values of the matrix column dimension Q.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] MMAX
+*> \verbatim
+*> MMAX is INTEGER
+*> The maximum value permitted for M, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] XF
+*> \verbatim
+*> XF is REAL array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is REAL array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is REAL array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is REAL array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is REAL array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If SLAROR returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCKCSD( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
$ MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
$ WORK, RWORK, NIN, NOUT, INFO )
- IMPLICIT NONE
*
-* Originally SCKGSV
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* Adapted to SCKCSD
-* July 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
@@ -23,82 +203,6 @@
$ WORK( * ), X( * ), XF( * )
* ..
*
-* Purpose
-* =======
-*
-* SCKCSD tests SORCSD:
-* the CSD for an M-by-M orthogonal matrix X partitioned as
-* [ X11 X12; X21 X22 ]. X11 is P-by-Q.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension P.
-*
-* QVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix column dimension Q.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* MMAX (input) INTEGER
-* The maximum value permitted for M, used in dimensioning the
-* work arrays.
-*
-* X (workspace) REAL array, dimension (MMAX*MMAX)
-*
-* XF (workspace) REAL array, dimension (MMAX*MMAX)
-*
-* U1 (workspace) REAL array, dimension (MMAX*MMAX)
-*
-* U2 (workspace) REAL array, dimension (MMAX*MMAX)
-*
-* V1T (workspace) REAL array, dimension (MMAX*MMAX)
-*
-* V2T (workspace) REAL array, dimension (MMAX*MMAX)
-*
-* THETA (workspace) REAL array, dimension (MMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (MMAX)
-*
-* WORK (workspace) REAL array
-*
-* RWORK (workspace) REAL array
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If SLAROR returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sckglm.f b/TESTING/EIG/sckglm.f
index 81325e9d..2ce0b7a2 100644
--- a/TESTING/EIG/sckglm.f
+++ b/TESTING/EIG/sckglm.f
@@ -1,10 +1,178 @@
+*> \brief \b SCKGLM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCKGLM( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* REAL A( * ), AF( * ), B( * ), BF( * ), RWORK( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCKGLM tests SGGGLM - subroutine for solving generalized linear
+*> model problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N, M and P contained in the vectors
+*> NVAL, MVAL and PVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESID >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (4*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If SLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCKGLM( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
@@ -16,76 +184,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* SCKGLM tests SGGGLM - subroutine for solving generalized linear
-* model problem.
-*
-* Arguments
-* =========
-*
-* NN (input) INTEGER
-* The number of values of N, M and P contained in the vectors
-* NVAL, MVAL and PVAL.
-*
-* MVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESID >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* BF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* X (workspace) REAL array, dimension (4*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If SLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sckgqr.f b/TESTING/EIG/sckgqr.f
index 5a9f1108..ca543be0 100644
--- a/TESTING/EIG/sckgqr.f
+++ b/TESTING/EIG/sckgqr.f
@@ -1,10 +1,221 @@
+*> \brief \b SCKGQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
+* THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
+* BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* REAL A( * ), AF( * ), AQ( * ), AR( * ), B( * ),
+* $ BF( * ), BT( * ), BWK( * ), BZ( * ),
+* $ RWORK( * ), TAUA( * ), TAUB( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCKGQR tests
+*> SGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
+*> SGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row(column) dimension M.
+*> \endverbatim
+*>
+*> \param[in] NP
+*> \verbatim
+*> NP is INTEGER
+*> The number of values of P contained in the vector PVAL.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NP)
+*> The values of the matrix row(column) dimension P.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column(row) dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BZ
+*> \verbatim
+*> BZ is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BT
+*> \verbatim
+*> BT is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If SLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
$ THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
$ BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
@@ -17,94 +228,6 @@
$ RWORK( * ), TAUA( * ), TAUB( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SCKGQR tests
-* SGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
-* SGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row(column) dimension M.
-*
-* NP (input) INTEGER
-* The number of values of P contained in the vector PVAL.
-*
-* PVAL (input) INTEGER array, dimension (NP)
-* The values of the matrix row(column) dimension P.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column(row) dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AR (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* TAUA (workspace) REAL array, dimension (NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* BF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* BZ (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* BT (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* BWK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* TAUB (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If SLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sckgsv.f b/TESTING/EIG/sckgsv.f
index 79e32fe0..20e6ca9c 100644
--- a/TESTING/EIG/sckgsv.f
+++ b/TESTING/EIG/sckgsv.f
@@ -1,10 +1,209 @@
+*> \brief \b SCKGSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCKGSV( NM, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, U, V, Q, ALPHA, BETA, R,
+* IWORK, WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, NMAX, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), NVAL( * ),
+* $ PVAL( * )
+* REAL A( * ), AF( * ), ALPHA( * ), B( * ), BETA( * ),
+* $ BF( * ), Q( * ), R( * ), RWORK( * ), U( * ),
+* $ V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCKGSV tests SGGSVD:
+*> the GSVD for M-by-N matrix A and P-by-N matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NP)
+*> The values of the matrix row dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If SLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCKGSV( NM, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, U, V, Q, ALPHA, BETA, R,
$ IWORK, WORK, RWORK, NIN, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, NMAX, NOUT
@@ -18,87 +217,6 @@
$ V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SCKGSV tests SGGSVD:
-* the GSVD for M-by-N matrix A and P-by-N matrix B.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NP)
-* The values of the matrix row dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* BF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* U (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* V (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* Q (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* ALPHA (workspace) REAL array, dimension (NMAX)
-*
-* BETA (workspace) REAL array, dimension (NMAX)
-*
-* R (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If SLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/scklse.f b/TESTING/EIG/scklse.f
index 17d92ad8..e8a830b4 100644
--- a/TESTING/EIG/scklse.f
+++ b/TESTING/EIG/scklse.f
@@ -1,10 +1,178 @@
+*> \brief \b SCKLSE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* REAL A( * ), AF( * ), B( * ), BF( * ), RWORK( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCKLSE tests SGGLSE - a subroutine for solving linear equality
+*> constrained least square problem (LSE).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of (M,P,N) contained in the vectors
+*> (MVAL, PVAL, NVAL).
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row(column) dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row(column) dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column(row) dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (5*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If SLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
@@ -16,76 +184,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* SCKLSE tests SGGLSE - a subroutine for solving linear equality
-* constrained least square problem (LSE).
-*
-* Arguments
-* =========
-*
-* NN (input) INTEGER
-* The number of values of (M,P,N) contained in the vectors
-* (MVAL, PVAL, NVAL).
-*
-* MVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row(column) dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row(column) dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column(row) dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* BF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* X (workspace) REAL array, dimension (5*NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If SLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/scsdts.f b/TESTING/EIG/scsdts.f
index 390c4354..1a9ba8f7 100644
--- a/TESTING/EIG/scsdts.f
+++ b/TESTING/EIG/scsdts.f
@@ -1,15 +1,215 @@
+*> \brief \b SCSDTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCSDTS( M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T,
+* LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDX, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL RESULT( 9 ), RWORK( * ), THETA( * )
+* REAL U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * ), WORK( LWORK ), X( LDX, * ),
+* $ XF( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCSDTS tests SORCSD, which, given an M-by-M partitioned orthogonal
+*> matrix X,
+*> Q M-Q
+*> X = [ X11 X12 ] P ,
+*> [ X21 X22 ] M-P
+*>
+*> computes the CSD
+*>
+*> [ U1 ]**T * [ X11 X12 ] * [ V1 ]
+*> [ U2 ] [ X21 X22 ] [ V2 ]
+*>
+*> [ I 0 0 | 0 0 0 ]
+*> [ 0 C 0 | 0 -S 0 ]
+*> [ 0 0 0 | 0 0 -I ]
+*> = [---------------------] = [ D11 D12 ] .
+*> [ 0 0 0 | I 0 0 ] [ D21 D22 ]
+*> [ 0 S 0 | 0 C 0 ]
+*> [ 0 0 I | 0 0 0 ]
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix X11. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns of the matrix X11. Q >= 0.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,M)
+*> The M-by-M matrix X.
+*> \endverbatim
+*>
+*> \param[out] XF
+*> \verbatim
+*> XF is REAL array, dimension (LDX,M)
+*> Details of the CSD of X, as returned by SORCSD;
+*> see SORCSD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the arrays X and XF.
+*> LDX >= max( 1,M ).
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is REAL array, dimension(LDU1,P)
+*> The P-by-P orthogonal matrix U1.
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of the array U1. LDU >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is REAL array, dimension(LDU2,M-P)
+*> The (M-P)-by-(M-P) orthogonal matrix U2.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2. LDU >= max(1,M-P).
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is REAL array, dimension(LDV1T,Q)
+*> The Q-by-Q orthogonal matrix V1T.
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of the array V1T. LDV1T >=
+*> max(1,Q).
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is REAL array, dimension(LDV2T,M-Q)
+*> The (M-Q)-by-(M-Q) orthogonal matrix V2T.
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of the array V2T. LDV2T >=
+*> max(1,M-Q).
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is REAL array, dimension MIN(P,M-P,Q,M-Q)
+*> The CS values of X; the essentially diagonal matrices C and
+*> S are constructed from THETA; see subroutine SORCSD for
+*> details.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (9)
+*> The test ratios:
+*> RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
+*> RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
+*> RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
+*> RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
+*> RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
+*> RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
+*> RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
+*> RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
+*> RESULT(9) = 0 if THETA is in increasing order and
+*> all angles are in [0,pi/2];
+*> = ULPINV otherwise.
+*> ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SCSDTS( M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T,
$ LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK,
$ RWORK, RESULT )
- IMPLICIT NONE
*
-* Originally xGSVTS
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* Adapted to SCSDTS
-* July 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDX, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
@@ -22,106 +222,6 @@
$ XF( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SCSDTS tests SORCSD, which, given an M-by-M partitioned orthogonal
-* matrix X,
-* Q M-Q
-* X = [ X11 X12 ] P ,
-* [ X21 X22 ] M-P
-*
-* computes the CSD
-*
-* [ U1 ]**T * [ X11 X12 ] * [ V1 ]
-* [ U2 ] [ X21 X22 ] [ V2 ]
-*
-* [ I 0 0 | 0 0 0 ]
-* [ 0 C 0 | 0 -S 0 ]
-* [ 0 0 0 | 0 0 -I ]
-* = [---------------------] = [ D11 D12 ] .
-* [ 0 0 0 | I 0 0 ] [ D21 D22 ]
-* [ 0 S 0 | 0 C 0 ]
-* [ 0 0 I | 0 0 0 ]
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix X11. P >= 0.
-*
-* Q (input) INTEGER
-* The number of columns of the matrix X11. Q >= 0.
-*
-* X (input) REAL array, dimension (LDX,M)
-* The M-by-M matrix X.
-*
-* XF (output) REAL array, dimension (LDX,M)
-* Details of the CSD of X, as returned by SORCSD;
-* see SORCSD for further details.
-*
-* LDX (input) INTEGER
-* The leading dimension of the arrays X and XF.
-* LDX >= max( 1,M ).
-*
-* U1 (output) REAL array, dimension(LDU1,P)
-* The P-by-P orthogonal matrix U1.
-*
-* LDU1 (input) INTEGER
-* The leading dimension of the array U1. LDU >= max(1,P).
-*
-* U2 (output) REAL array, dimension(LDU2,M-P)
-* The (M-P)-by-(M-P) orthogonal matrix U2.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2. LDU >= max(1,M-P).
-*
-* V1T (output) REAL array, dimension(LDV1T,Q)
-* The Q-by-Q orthogonal matrix V1T.
-*
-* LDV1T (input) INTEGER
-* The leading dimension of the array V1T. LDV1T >=
-* max(1,Q).
-*
-* V2T (output) REAL array, dimension(LDV2T,M-Q)
-* The (M-Q)-by-(M-Q) orthogonal matrix V2T.
-*
-* LDV2T (input) INTEGER
-* The leading dimension of the array V2T. LDV2T >=
-* max(1,M-Q).
-*
-* THETA (output) REAL array, dimension MIN(P,M-P,Q,M-Q)
-* The CS values of X; the essentially diagonal matrices C and
-* S are constructed from THETA; see subroutine SORCSD for
-* details.
-*
-* IWORK (workspace) INTEGER array, dimension (M)
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK
-*
-* RWORK (workspace) REAL array
-*
-* RESULT (output) REAL array, dimension (9)
-* The test ratios:
-* RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
-* RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
-* RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
-* RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
-* RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
-* RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
-* RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
-* RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
-* RESULT(9) = 0 if THETA is in increasing order and
-* all angles are in [0,pi/2];
-* = ULPINV otherwise.
-* ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrges.f b/TESTING/EIG/sdrges.f
index fd334541..f4823667 100644
--- a/TESTING/EIG/sdrges.f
+++ b/TESTING/EIG/sdrges.f
@@ -1,11 +1,415 @@
+*> \brief \b SDRGES
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRGES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, ALPHAR,
+* ALPHAI, BETA, WORK, LWORK, RESULT, BWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDA, * ), BETA( * ), Q( LDQ, * ),
+* $ RESULT( 13 ), S( LDA, * ), T( LDA, * ),
+* $ WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRGES checks the nonsymmetric generalized eigenvalue (Schur form)
+*> problem driver SGGES.
+*>
+*> SGGES factors A and B as Q S Z' and Q T Z' , where ' means
+*> transpose, T is upper triangular, S is in generalized Schur form
+*> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
+*> the 2x2 blocks corresponding to complex conjugate pairs of
+*> generalized eigenvalues), and Q and Z are orthogonal. It also
+*> computes the generalized eigenvalues (alpha(j),beta(j)), j=1,...,n,
+*> Thus, w(j) = alpha(j)/beta(j) is a root of the characteristic
+*> equation
+*> det( A - w(j) B ) = 0
+*> Optionally it also reorder the eigenvalues so that a selected
+*> cluster of eigenvalues appears in the leading diagonal block of the
+*> Schur forms.
+*>
+*> When SDRGES is called, a number of matrix "sizes" ("N's") and a
+*> number of matrix "TYPES" are specified. For each size ("N")
+*> and each TYPE of matrix, a pair of matrices (A, B) will be generated
+*> and used for testing. For each matrix pair, the following 13 tests
+*> will be performed and compared with the threshhold THRESH except
+*> the tests (5), (11) and (13).
+*>
+*>
+*> (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues)
+*>
+*> (5) if A is in Schur form (i.e. quasi-triangular form)
+*> (no sorting of eigenvalues)
+*>
+*> (6) if eigenvalues = diagonal blocks of the Schur form (S, T),
+*> i.e., test the maximum over j of D(j) where:
+*>
+*> if alpha(j) is real:
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> if alpha(j) is complex:
+*> | det( s S - w T ) |
+*> D(j) = ---------------------------------------------------
+*> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
+*>
+*> and S and T are here the 2 x 2 diagonal blocks of S and T
+*> corresponding to the j-th and j+1-th eigenvalues.
+*> (no sorting of eigenvalues)
+*>
+*> (7) | (A,B) - Q (S,T) Z' | / ( | (A,B) | n ulp )
+*> (with sorting of eigenvalues).
+*>
+*> (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) if A is in Schur form (i.e. quasi-triangular form)
+*> (with sorting of eigenvalues).
+*>
+*> (11) if eigenvalues = diagonal blocks of the Schur form (S, T),
+*> i.e. test the maximum over j of D(j) where:
+*>
+*> if alpha(j) is real:
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> if alpha(j) is complex:
+*> | det( s S - w T ) |
+*> D(j) = ---------------------------------------------------
+*> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
+*>
+*> and S and T are here the 2 x 2 diagonal blocks of S and T
+*> corresponding to the j-th and j+1-th eigenvalues.
+*> (with sorting of eigenvalues).
+*>
+*> (12) if sorting worked and SDIM is the number of eigenvalues
+*> which were SELECTed.
+*>
+*> Test Matrices
+*> =============
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SDRGES does nothing. NSIZES >= 0.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. NN >= 0.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRGES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A on input.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRGES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. THRESH >= 0.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array,
+*> dimension(LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, and T.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array,
+*> dimension(LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by SGGES. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by SGGES.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, max(NN))
+*> The (left) orthogonal matrix computed by SGGES.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q and Z. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by SGGES.
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by SGGES.
+*> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
+*> generalized eigenvalue of A and B.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX( 10*(N+1), 3*N*N ), where N is the largest
+*> matrix dimension.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRGES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, ALPHAR,
$ ALPHAI, BETA, WORK, LWORK, RESULT, BWORK,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
@@ -20,289 +424,6 @@
$ WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* SDRGES checks the nonsymmetric generalized eigenvalue (Schur form)
-* problem driver SGGES.
-*
-* SGGES factors A and B as Q S Z' and Q T Z' , where ' means
-* transpose, T is upper triangular, S is in generalized Schur form
-* (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
-* the 2x2 blocks corresponding to complex conjugate pairs of
-* generalized eigenvalues), and Q and Z are orthogonal. It also
-* computes the generalized eigenvalues (alpha(j),beta(j)), j=1,...,n,
-* Thus, w(j) = alpha(j)/beta(j) is a root of the characteristic
-* equation
-* det( A - w(j) B ) = 0
-* Optionally it also reorder the eigenvalues so that a selected
-* cluster of eigenvalues appears in the leading diagonal block of the
-* Schur forms.
-*
-* When SDRGES is called, a number of matrix "sizes" ("N's") and a
-* number of matrix "TYPES" are specified. For each size ("N")
-* and each TYPE of matrix, a pair of matrices (A, B) will be generated
-* and used for testing. For each matrix pair, the following 13 tests
-* will be performed and compared with the threshhold THRESH except
-* the tests (5), (11) and (13).
-*
-*
-* (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues)
-*
-*
-* (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues)
-*
-*
-* (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues)
-*
-*
-* (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues)
-*
-* (5) if A is in Schur form (i.e. quasi-triangular form)
-* (no sorting of eigenvalues)
-*
-* (6) if eigenvalues = diagonal blocks of the Schur form (S, T),
-* i.e., test the maximum over j of D(j) where:
-*
-* if alpha(j) is real:
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* if alpha(j) is complex:
-* | det( s S - w T ) |
-* D(j) = ---------------------------------------------------
-* ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
-*
-* and S and T are here the 2 x 2 diagonal blocks of S and T
-* corresponding to the j-th and j+1-th eigenvalues.
-* (no sorting of eigenvalues)
-*
-* (7) | (A,B) - Q (S,T) Z' | / ( | (A,B) | n ulp )
-* (with sorting of eigenvalues).
-*
-* (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) if A is in Schur form (i.e. quasi-triangular form)
-* (with sorting of eigenvalues).
-*
-* (11) if eigenvalues = diagonal blocks of the Schur form (S, T),
-* i.e. test the maximum over j of D(j) where:
-*
-* if alpha(j) is real:
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* if alpha(j) is complex:
-* | det( s S - w T ) |
-* D(j) = ---------------------------------------------------
-* ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
-*
-* and S and T are here the 2 x 2 diagonal blocks of S and T
-* corresponding to the j-th and j+1-th eigenvalues.
-* (with sorting of eigenvalues).
-*
-* (12) if sorting worked and SDIM is the number of eigenvalues
-* which were SELECTed.
-*
-* Test Matrices
-* =============
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SDRGES does nothing. NSIZES >= 0.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. NN >= 0.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRGES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A on input.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRGES to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. THRESH >= 0.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) REAL array,
-* dimension(LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, and T.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) REAL array,
-* dimension(LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) REAL array, dimension (LDA, max(NN))
-* The Schur form matrix computed from A by SGGES. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) REAL array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by SGGES.
-*
-* Q (workspace) REAL array, dimension (LDQ, max(NN))
-* The (left) orthogonal matrix computed by SGGES.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q and Z. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) REAL array, dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by SGGES.
-*
-* ALPHAR (workspace) REAL array, dimension (max(NN))
-* ALPHAI (workspace) REAL array, dimension (max(NN))
-* BETA (workspace) REAL array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by SGGES.
-* ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
-* generalized eigenvalue of A and B.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX( 10*(N+1), 3*N*N ), where N is the largest
-* matrix dimension.
-*
-* RESULT (output) REAL array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrgev.f b/TESTING/EIG/sdrgev.f
index 4e2b85be..c926dcc3 100644
--- a/TESTING/EIG/sdrgev.f
+++ b/TESTING/EIG/sdrgev.f
@@ -1,11 +1,420 @@
+*> \brief \b SDRGEV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRGEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, QE, LDQE,
+* ALPHAR, ALPHAI, BETA, ALPHR1, ALPHI1, BETA1,
+* WORK, LWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LDQE, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL A( LDA, * ), ALPHAI( * ), ALPHI1( * ),
+* $ ALPHAR( * ), ALPHR1( * ), B( LDA, * ),
+* $ BETA( * ), BETA1( * ), Q( LDQ, * ),
+* $ QE( LDQE, * ), RESULT( * ), S( LDA, * ),
+* $ T( LDA, * ), WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRGEV checks the nonsymmetric generalized eigenvalue problem driver
+*> routine SGGEV.
+*>
+*> SGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the
+*> generalized eigenvalues and, optionally, the left and right
+*> eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is reasonalbe
+*> interpretation for beta=0, and even for both being zero.
+*>
+*> A right generalized eigenvector corresponding to a generalized
+*> eigenvalue w for a pair of matrices (A,B) is a vector r such that
+*> (A - wB) * r = 0. A left generalized eigenvector is a vector l such
+*> that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l.
+*>
+*> When SDRGEV is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, a pair of matrices (A, B) will be generated
+*> and used for testing. For each matrix pair, the following tests
+*> will be performed and compared with the threshhold THRESH.
+*>
+*> Results from SGGEV:
+*>
+*> (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of
+*>
+*> | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) )
+*>
+*> where VL**H is the conjugate-transpose of VL.
+*>
+*> (2) | |VL(i)| - 1 | / ulp and whether largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of
+*>
+*> | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) )
+*>
+*> (4) | |VR(i)| - 1 | / ulp and whether largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (5) W(full) = W(partial)
+*> W(full) denotes the eigenvalues computed when both l and r
+*> are also computed, and W(partial) denotes the eigenvalues
+*> computed when only W, only W and r, or only W and l are
+*> computed.
+*>
+*> (6) VL(full) = VL(partial)
+*> VL(full) denotes the left eigenvectors computed when both l
+*> and r are computed, and VL(partial) denotes the result
+*> when only l is computed.
+*>
+*> (7) VR(full) = VR(partial)
+*> VR(full) denotes the right eigenvectors computed when both l
+*> and r are also computed, and VR(partial) denotes the result
+*> when only l is computed.
+*>
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SDRGES does nothing. NSIZES >= 0.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. NN >= 0.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRGES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRGES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IERR not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array,
+*> dimension(LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, and T.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array,
+*> dimension(LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array,
+*> dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by SGGES. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array,
+*> dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by SGGES.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array,
+*> dimension (LDQ, max(NN))
+*> The (left) eigenvectors matrix computed by SGGEV.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q and Z. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by SGGES.
+*> \endverbatim
+*>
+*> \param[out] QE
+*> \verbatim
+*> QE is REAL array, dimension( LDQ, max(NN) )
+*> QE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQE
+*> \verbatim
+*> LDQE is INTEGER
+*> The leading dimension of QE. LDQE >= max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (max(NN))
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by SGGEV.
+*> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
+*> generalized eigenvalue of A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHR1
+*> \verbatim
+*> ALPHR1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI1
+*> \verbatim
+*> ALPHI1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like ALPHAR, ALPHAI, BETA, these arrays contain the
+*> eigenvalues of A and B, but those computed when SGGEV only
+*> computes a partial eigendecomposition, i.e. not the
+*> eigenvalues and left and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. LWORK >= MAX( 8*N, N*(N+1) ).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRGEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, QE, LDQE,
$ ALPHAR, ALPHAI, BETA, ALPHR1, ALPHI1, BETA1,
$ WORK, LWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LDQE, LWORK, NOUNIT, NSIZES,
@@ -22,277 +431,6 @@
$ T( LDA, * ), WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* SDRGEV checks the nonsymmetric generalized eigenvalue problem driver
-* routine SGGEV.
-*
-* SGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the
-* generalized eigenvalues and, optionally, the left and right
-* eigenvectors.
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is reasonalbe
-* interpretation for beta=0, and even for both being zero.
-*
-* A right generalized eigenvector corresponding to a generalized
-* eigenvalue w for a pair of matrices (A,B) is a vector r such that
-* (A - wB) * r = 0. A left generalized eigenvector is a vector l such
-* that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l.
-*
-* When SDRGEV is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, a pair of matrices (A, B) will be generated
-* and used for testing. For each matrix pair, the following tests
-* will be performed and compared with the threshhold THRESH.
-*
-* Results from SGGEV:
-*
-* (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of
-*
-* | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) )
-*
-* where VL**H is the conjugate-transpose of VL.
-*
-* (2) | |VL(i)| - 1 | / ulp and whether largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of
-*
-* | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) )
-*
-* (4) | |VR(i)| - 1 | / ulp and whether largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (5) W(full) = W(partial)
-* W(full) denotes the eigenvalues computed when both l and r
-* are also computed, and W(partial) denotes the eigenvalues
-* computed when only W, only W and r, or only W and l are
-* computed.
-*
-* (6) VL(full) = VL(partial)
-* VL(full) denotes the left eigenvectors computed when both l
-* and r are computed, and VL(partial) denotes the result
-* when only l is computed.
-*
-* (7) VR(full) = VR(partial)
-* VR(full) denotes the right eigenvectors computed when both l
-* and r are also computed, and VR(partial) denotes the result
-* when only l is computed.
-*
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SDRGES does nothing. NSIZES >= 0.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. NN >= 0.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRGES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRGES to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IERR not equal to 0.)
-*
-* A (input/workspace) REAL array,
-* dimension(LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, and T.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) REAL array,
-* dimension(LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) REAL array,
-* dimension (LDA, max(NN))
-* The Schur form matrix computed from A by SGGES. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) REAL array,
-* dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by SGGES.
-*
-* Q (workspace) REAL array,
-* dimension (LDQ, max(NN))
-* The (left) eigenvectors matrix computed by SGGEV.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q and Z. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) REAL array, dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by SGGES.
-*
-* QE (workspace) REAL array, dimension( LDQ, max(NN) )
-* QE holds the computed right or left eigenvectors.
-*
-* LDQE (input) INTEGER
-* The leading dimension of QE. LDQE >= max(1,max(NN)).
-*
-* ALPHAR (workspace) REAL array, dimension (max(NN))
-* ALPHAI (workspace) REAL array, dimension (max(NN))
-* BETA (workspace) REAL array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by SGGEV.
-* ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
-* generalized eigenvalue of A and B.
-*
-* ALPHR1 (workspace) REAL array, dimension (max(NN))
-* ALPHI1 (workspace) REAL array, dimension (max(NN))
-* BETA1 (workspace) REAL array, dimension (max(NN))
-* Like ALPHAR, ALPHAI, BETA, these arrays contain the
-* eigenvalues of A and B, but those computed when SGGEV only
-* computes a partial eigendecomposition, i.e. not the
-* eigenvalues and left and right eigenvectors.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. LWORK >= MAX( 8*N, N*(N+1) ).
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrgsx.f b/TESTING/EIG/sdrgsx.f
index cb5d6e87..b0e96a89 100644
--- a/TESTING/EIG/sdrgsx.f
+++ b/TESTING/EIG/sdrgsx.f
@@ -1,10 +1,370 @@
+*> \brief \b SDRGSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B,
+* AI, BI, Z, Q, ALPHAR, ALPHAI, BETA, C, LDC, S,
+* WORK, LWORK, IWORK, LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
+* $ NOUT, NSIZE
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), AI( LDA, * ), ALPHAI( * ),
+* $ ALPHAR( * ), B( LDA, * ), BETA( * ),
+* $ BI( LDA, * ), C( LDC, * ), Q( LDA, * ), S( * ),
+* $ WORK( * ), Z( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRGSX checks the nonsymmetric generalized eigenvalue (Schur form)
+*> problem expert driver SGGESX.
+*>
+*> SGGESX factors A and B as Q S Z' and Q T Z', where ' means
+*> transpose, T is upper triangular, S is in generalized Schur form
+*> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
+*> the 2x2 blocks corresponding to complex conjugate pairs of
+*> generalized eigenvalues), and Q and Z are orthogonal. It also
+*> computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)). Thus, w(j) = alpha(j)/beta(j) is a root of the
+*> characteristic equation
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> Optionally it also reorders the eigenvalues so that a selected
+*> cluster of eigenvalues appears in the leading diagonal block of the
+*> Schur forms; computes a reciprocal condition number for the average
+*> of the selected eigenvalues; and computes a reciprocal condition
+*> number for the right and left deflating subspaces corresponding to
+*> the selected eigenvalues.
+*>
+*> When SDRGSX is called with NSIZE > 0, five (5) types of built-in
+*> matrix pairs are used to test the routine SGGESX.
+*>
+*> When SDRGSX is called with NSIZE = 0, it reads in test matrix data
+*> to test SGGESX.
+*>
+*> For each matrix pair, the following tests will be performed and
+*> compared with the threshhold THRESH except for the tests (7) and (9):
+*>
+*> (1) | A - Q S Z' | / ( |A| n ulp )
+*>
+*> (2) | B - Q T Z' | / ( |B| n ulp )
+*>
+*> (3) | I - QQ' | / ( n ulp )
+*>
+*> (4) | I - ZZ' | / ( n ulp )
+*>
+*> (5) if A is in Schur form (i.e. quasi-triangular form)
+*>
+*> (6) maximum over j of D(j) where:
+*>
+*> if alpha(j) is real:
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> if alpha(j) is complex:
+*> | det( s S - w T ) |
+*> D(j) = ---------------------------------------------------
+*> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
+*>
+*> and S and T are here the 2 x 2 diagonal blocks of S and T
+*> corresponding to the j-th and j+1-th eigenvalues.
+*>
+*> (7) if sorting worked and SDIM is the number of eigenvalues
+*> which were selected.
+*>
+*> (8) the estimated value DIF does not differ from the true values of
+*> Difu and Difl more than a factor 10*THRESH. If the estimate DIF
+*> equals zero the corresponding true values of Difu and Difl
+*> should be less than EPS*norm(A, B). If the true value of Difu
+*> and Difl equal zero, the estimate DIF should be less than
+*> EPS*norm(A, B).
+*>
+*> (9) If INFO = N+3 is returned by SGGESX, the reordering "failed"
+*> and we check that DIF = PL = PR = 0 and that the true value of
+*> Difu and Difl is < EPS*norm(A, B). We count the events when
+*> INFO=N+3.
+*>
+*> For read-in test matrices, the above tests are run except that the
+*> exact value for DIF (and PL) is input data. Additionally, there is
+*> one more test run for read-in test matrices:
+*>
+*> (10) the estimated value PL does not differ from the true value of
+*> PLTRU more than a factor THRESH. If the estimate PL equals
+*> zero the corresponding true value of PLTRU should be less than
+*> EPS*norm(A, B). If the true value of PLTRU equal zero, the
+*> estimate PL should be less than EPS*norm(A, B).
+*>
+*> Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1)
+*> matrix pairs are generated and tested. NSIZE should be kept small.
+*>
+*> SVD (routine SGESVD) is used for computing the true value of DIF_u
+*> and DIF_l when testing the built-in test problems.
+*>
+*> Built-in Test Matrices
+*> ======================
+*>
+*> All built-in test matrices are the 2 by 2 block of triangular
+*> matrices
+*>
+*> A = [ A11 A12 ] and B = [ B11 B12 ]
+*> [ A22 ] [ B22 ]
+*>
+*> where for different type of A11 and A22 are given as the following.
+*> A12 and B12 are chosen so that the generalized Sylvester equation
+*>
+*> A11*R - L*A22 = -A12
+*> B11*R - L*B22 = -B12
+*>
+*> have prescribed solution R and L.
+*>
+*> Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1).
+*> B11 = I_m, B22 = I_k
+*> where J_k(a,b) is the k-by-k Jordan block with ``a'' on
+*> diagonal and ``b'' on superdiagonal.
+*>
+*> Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and
+*> B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m
+*> A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and
+*> B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
+*>
+*> Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each
+*> second diagonal block in A_11 and each third diagonal block
+*> in A_22 are made as 2 by 2 blocks.
+*>
+*> Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) )
+*> for i=1,...,m, j=1,...,m and
+*> A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) )
+*> for i=m+1,...,k, j=m+1,...,k
+*>
+*> Type 5: (A,B) and have potentially close or common eigenvalues and
+*> very large departure from block diagonality A_11 is chosen
+*> as the m x m leading submatrix of A_1:
+*> | 1 b |
+*> | -b 1 |
+*> | 1+d b |
+*> | -b 1+d |
+*> A_1 = | d 1 |
+*> | -1 d |
+*> | -d 1 |
+*> | -1 -d |
+*> | 1 |
+*> and A_22 is chosen as the k x k leading submatrix of A_2:
+*> | -1 b |
+*> | -b -1 |
+*> | 1-d b |
+*> | -b 1-d |
+*> A_2 = | d 1+b |
+*> | -1-b d |
+*> | -d 1+b |
+*> | -1+b -d |
+*> | 1-d |
+*> and matrix B are chosen as identity matrices (see SLATM5).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZE
+*> \verbatim
+*> NSIZE is INTEGER
+*> The maximum size of the matrices to use. NSIZE >= 0.
+*> If NSIZE = 0, no built-in tests matrices are used, but
+*> read-in test matrices are used to test SGGESX.
+*> \endverbatim
+*>
+*> \param[in] NCMAX
+*> \verbatim
+*> NCMAX is INTEGER
+*> Maximum allowable NMAX for generating Kroneker matrix
+*> in call to SLAKF2
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. THRESH >= 0.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, NSIZE)
+*> Used to store the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, AI, BI, Z and Q,
+*> LDA >= max( 1, NSIZE ). For the read-in test,
+*> LDA >= max( 1, N ), N is the size of the test matrices.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDA, NSIZE)
+*> Used to store the matrix whose eigenvalues are to be
+*> computed. On exit, B contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] AI
+*> \verbatim
+*> AI is REAL array, dimension (LDA, NSIZE)
+*> Copy of A, modified by SGGESX.
+*> \endverbatim
+*>
+*> \param[out] BI
+*> \verbatim
+*> BI is REAL array, dimension (LDA, NSIZE)
+*> Copy of B, modified by SGGESX.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDA, NSIZE)
+*> Z holds the left Schur vectors computed by SGGESX.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA, NSIZE)
+*> Q holds the right Schur vectors computed by SGGESX.
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (NSIZE)
+*> \verbatim
+*> On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC, LDC)
+*> Store the matrix generated by subroutine SLAKF2, this is the
+*> matrix formed by Kronecker products used for estimating
+*> DIF.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of C. LDC >= max(1, LDA*LDA/2 ).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (LDC)
+*> Singular values of C
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> LWORK >= MAX( 5*NSIZE*NSIZE/2 - 2, 10*(NSIZE+1) )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= NSIZE + 6.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (LDA)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B,
$ AI, BI, Z, Q, ALPHAR, ALPHAI, BETA, C, LDC, S,
$ WORK, LWORK, IWORK, LIWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
@@ -20,243 +380,6 @@
$ WORK( * ), Z( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SDRGSX checks the nonsymmetric generalized eigenvalue (Schur form)
-* problem expert driver SGGESX.
-*
-* SGGESX factors A and B as Q S Z' and Q T Z', where ' means
-* transpose, T is upper triangular, S is in generalized Schur form
-* (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
-* the 2x2 blocks corresponding to complex conjugate pairs of
-* generalized eigenvalues), and Q and Z are orthogonal. It also
-* computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)). Thus, w(j) = alpha(j)/beta(j) is a root of the
-* characteristic equation
-*
-* det( A - w(j) B ) = 0
-*
-* Optionally it also reorders the eigenvalues so that a selected
-* cluster of eigenvalues appears in the leading diagonal block of the
-* Schur forms; computes a reciprocal condition number for the average
-* of the selected eigenvalues; and computes a reciprocal condition
-* number for the right and left deflating subspaces corresponding to
-* the selected eigenvalues.
-*
-* When SDRGSX is called with NSIZE > 0, five (5) types of built-in
-* matrix pairs are used to test the routine SGGESX.
-*
-* When SDRGSX is called with NSIZE = 0, it reads in test matrix data
-* to test SGGESX.
-*
-* For each matrix pair, the following tests will be performed and
-* compared with the threshhold THRESH except for the tests (7) and (9):
-*
-* (1) | A - Q S Z' | / ( |A| n ulp )
-*
-* (2) | B - Q T Z' | / ( |B| n ulp )
-*
-* (3) | I - QQ' | / ( n ulp )
-*
-* (4) | I - ZZ' | / ( n ulp )
-*
-* (5) if A is in Schur form (i.e. quasi-triangular form)
-*
-* (6) maximum over j of D(j) where:
-*
-* if alpha(j) is real:
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* if alpha(j) is complex:
-* | det( s S - w T ) |
-* D(j) = ---------------------------------------------------
-* ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
-*
-* and S and T are here the 2 x 2 diagonal blocks of S and T
-* corresponding to the j-th and j+1-th eigenvalues.
-*
-* (7) if sorting worked and SDIM is the number of eigenvalues
-* which were selected.
-*
-* (8) the estimated value DIF does not differ from the true values of
-* Difu and Difl more than a factor 10*THRESH. If the estimate DIF
-* equals zero the corresponding true values of Difu and Difl
-* should be less than EPS*norm(A, B). If the true value of Difu
-* and Difl equal zero, the estimate DIF should be less than
-* EPS*norm(A, B).
-*
-* (9) If INFO = N+3 is returned by SGGESX, the reordering "failed"
-* and we check that DIF = PL = PR = 0 and that the true value of
-* Difu and Difl is < EPS*norm(A, B). We count the events when
-* INFO=N+3.
-*
-* For read-in test matrices, the above tests are run except that the
-* exact value for DIF (and PL) is input data. Additionally, there is
-* one more test run for read-in test matrices:
-*
-* (10) the estimated value PL does not differ from the true value of
-* PLTRU more than a factor THRESH. If the estimate PL equals
-* zero the corresponding true value of PLTRU should be less than
-* EPS*norm(A, B). If the true value of PLTRU equal zero, the
-* estimate PL should be less than EPS*norm(A, B).
-*
-* Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1)
-* matrix pairs are generated and tested. NSIZE should be kept small.
-*
-* SVD (routine SGESVD) is used for computing the true value of DIF_u
-* and DIF_l when testing the built-in test problems.
-*
-* Built-in Test Matrices
-* ======================
-*
-* All built-in test matrices are the 2 by 2 block of triangular
-* matrices
-*
-* A = [ A11 A12 ] and B = [ B11 B12 ]
-* [ A22 ] [ B22 ]
-*
-* where for different type of A11 and A22 are given as the following.
-* A12 and B12 are chosen so that the generalized Sylvester equation
-*
-* A11*R - L*A22 = -A12
-* B11*R - L*B22 = -B12
-*
-* have prescribed solution R and L.
-*
-* Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1).
-* B11 = I_m, B22 = I_k
-* where J_k(a,b) is the k-by-k Jordan block with ``a'' on
-* diagonal and ``b'' on superdiagonal.
-*
-* Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and
-* B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m
-* A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and
-* B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
-*
-* Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each
-* second diagonal block in A_11 and each third diagonal block
-* in A_22 are made as 2 by 2 blocks.
-*
-* Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) )
-* for i=1,...,m, j=1,...,m and
-* A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) )
-* for i=m+1,...,k, j=m+1,...,k
-*
-* Type 5: (A,B) and have potentially close or common eigenvalues and
-* very large departure from block diagonality A_11 is chosen
-* as the m x m leading submatrix of A_1:
-* | 1 b |
-* | -b 1 |
-* | 1+d b |
-* | -b 1+d |
-* A_1 = | d 1 |
-* | -1 d |
-* | -d 1 |
-* | -1 -d |
-* | 1 |
-* and A_22 is chosen as the k x k leading submatrix of A_2:
-* | -1 b |
-* | -b -1 |
-* | 1-d b |
-* | -b 1-d |
-* A_2 = | d 1+b |
-* | -1-b d |
-* | -d 1+b |
-* | -1+b -d |
-* | 1-d |
-* and matrix B are chosen as identity matrices (see SLATM5).
-*
-*
-* Arguments
-* =========
-*
-* NSIZE (input) INTEGER
-* The maximum size of the matrices to use. NSIZE >= 0.
-* If NSIZE = 0, no built-in tests matrices are used, but
-* read-in test matrices are used to test SGGESX.
-*
-* NCMAX (input) INTEGER
-* Maximum allowable NMAX for generating Kroneker matrix
-* in call to SLAKF2
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. THRESH >= 0.
-*
-* NIN (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (workspace) REAL array, dimension (LDA, NSIZE)
-* Used to store the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, AI, BI, Z and Q,
-* LDA >= max( 1, NSIZE ). For the read-in test,
-* LDA >= max( 1, N ), N is the size of the test matrices.
-*
-* B (workspace) REAL array, dimension (LDA, NSIZE)
-* Used to store the matrix whose eigenvalues are to be
-* computed. On exit, B contains the last matrix actually used.
-*
-* AI (workspace) REAL array, dimension (LDA, NSIZE)
-* Copy of A, modified by SGGESX.
-*
-* BI (workspace) REAL array, dimension (LDA, NSIZE)
-* Copy of B, modified by SGGESX.
-*
-* Z (workspace) REAL array, dimension (LDA, NSIZE)
-* Z holds the left Schur vectors computed by SGGESX.
-*
-* Q (workspace) REAL array, dimension (LDA, NSIZE)
-* Q holds the right Schur vectors computed by SGGESX.
-*
-* ALPHAR (workspace) REAL array, dimension (NSIZE)
-* ALPHAI (workspace) REAL array, dimension (NSIZE)
-* BETA (workspace) REAL array, dimension (NSIZE)
-* On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
-*
-* C (workspace) REAL array, dimension (LDC, LDC)
-* Store the matrix generated by subroutine SLAKF2, this is the
-* matrix formed by Kronecker products used for estimating
-* DIF.
-*
-* LDC (input) INTEGER
-* The leading dimension of C. LDC >= max(1, LDA*LDA/2 ).
-*
-* S (workspace) REAL array, dimension (LDC)
-* Singular values of C
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
-* LWORK >= MAX( 5*NSIZE*NSIZE/2 - 2, 10*(NSIZE+1) )
-*
-* IWORK (workspace) INTEGER array, dimension (LIWORK)
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= NSIZE + 6.
-*
-* BWORK (workspace) LOGICAL array, dimension (LDA)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrgvx.f b/TESTING/EIG/sdrgvx.f
index 2bca65db..d6ffb42a 100644
--- a/TESTING/EIG/sdrgvx.f
+++ b/TESTING/EIG/sdrgvx.f
@@ -1,11 +1,313 @@
+*> \brief \b SDRGVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRGVX( NSIZE, THRESH, NIN, NOUT, A, LDA, B, AI, BI,
+* ALPHAR, ALPHAI, BETA, VL, VR, ILO, IHI, LSCALE,
+* RSCALE, S, STRU, DIF, DIFTRU, WORK, LWORK,
+* IWORK, LIWORK, RESULT, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LIWORK, LWORK, NIN, NOUT,
+* $ NSIZE
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), AI( LDA, * ), ALPHAI( * ),
+* $ ALPHAR( * ), B( LDA, * ), BETA( * ),
+* $ BI( LDA, * ), DIF( * ), DIFTRU( * ),
+* $ LSCALE( * ), RESULT( 4 ), RSCALE( * ), S( * ),
+* $ STRU( * ), VL( LDA, * ), VR( LDA, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRGVX checks the nonsymmetric generalized eigenvalue problem
+*> expert driver SGGEVX.
+*>
+*> SGGEVX computes the generalized eigenvalues, (optionally) the left
+*> and/or right eigenvectors, (optionally) computes a balancing
+*> transformation to improve the conditioning, and (optionally)
+*> reciprocal condition numbers for the eigenvalues and eigenvectors.
+*>
+*> When SDRGVX is called with NSIZE > 0, two types of test matrix pairs
+*> are generated by the subroutine SLATM6 and test the driver SGGEVX.
+*> The test matrices have the known exact condition numbers for
+*> eigenvalues. For the condition numbers of the eigenvectors
+*> corresponding the first and last eigenvalues are also know
+*> ``exactly'' (see SLATM6).
+*>
+*> For each matrix pair, the following tests will be performed and
+*> compared with the threshhold THRESH.
+*>
+*> (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> where l**H is the conjugate tranpose of l.
+*>
+*> (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> (3) The condition number S(i) of eigenvalues computed by SGGEVX
+*> differs less than a factor THRESH from the exact S(i) (see
+*> SLATM6).
+*>
+*> (4) DIF(i) computed by STGSNA differs less than a factor 10*THRESH
+*> from the exact value (for the 1st and 5th vectors only).
+*>
+*> Test Matrices
+*> =============
+*>
+*> Two kinds of test matrix pairs
+*>
+*> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
+*>
+*> are used in the tests:
+*>
+*> 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
+*> 0 2+a 0 0 0 0 1 0 0 0
+*> 0 0 3+a 0 0 0 0 1 0 0
+*> 0 0 0 4+a 0 0 0 0 1 0
+*> 0 0 0 0 5+a , 0 0 0 0 1 , and
+*>
+*> 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
+*> 1 1 0 0 0 0 1 0 0 0
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1+a 1+b 0 0 0 1 0
+*> 0 0 0 -1-b 1+a , 0 0 0 0 1 .
+*>
+*> In both cases the same inverse(YH) and inverse(X) are used to compute
+*> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
+*>
+*> YH: = 1 0 -y y -y X = 1 0 -x -x x
+*> 0 1 -y y -y 0 1 x -x -x
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1 0 0 0 0 1 0
+*> 0 0 0 0 1, 0 0 0 0 1 , where
+*>
+*> a, b, x and y will have all values independently of each other from
+*> { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZE
+*> \verbatim
+*> NSIZE is INTEGER
+*> The number of sizes of matrices to use. NSIZE must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIN will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, NSIZE)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, AI, BI, Ao, and Bo.
+*> It must be at least 1 and at least NSIZE.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDA, NSIZE)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, B contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] AI
+*> \verbatim
+*> AI is REAL array, dimension (LDA, NSIZE)
+*> Copy of A, modified by SGGEVX.
+*> \endverbatim
+*>
+*> \param[out] BI
+*> \verbatim
+*> BI is REAL array, dimension (LDA, NSIZE)
+*> Copy of B, modified by SGGEVX.
+*> \endverbatim
+*>
+*> \param[out] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (NSIZE)
+*> \endverbatim
+*> \verbatim
+*> On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDA, NSIZE)
+*> VL holds the left eigenvectors computed by SGGEVX.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDA, NSIZE)
+*> VR holds the right eigenvectors computed by SGGEVX.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DTRU
+*> \verbatim
+*> DTRU is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DIFTRU
+*> \verbatim
+*> DIFTRU is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> Leading dimension of WORK. LWORK >= 2*N*N+12*N+16.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> Leading dimension of IWORK. Must be at least N+6.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRGVX( NSIZE, THRESH, NIN, NOUT, A, LDA, B, AI, BI,
$ ALPHAR, ALPHAI, BETA, VL, VR, ILO, IHI, LSCALE,
$ RSCALE, S, STRU, DIF, DIFTRU, WORK, LWORK,
$ IWORK, LIWORK, RESULT, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, ILO, INFO, LDA, LIWORK, LWORK, NIN, NOUT,
@@ -23,166 +325,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRGVX checks the nonsymmetric generalized eigenvalue problem
-* expert driver SGGEVX.
-*
-* SGGEVX computes the generalized eigenvalues, (optionally) the left
-* and/or right eigenvectors, (optionally) computes a balancing
-* transformation to improve the conditioning, and (optionally)
-* reciprocal condition numbers for the eigenvalues and eigenvectors.
-*
-* When SDRGVX is called with NSIZE > 0, two types of test matrix pairs
-* are generated by the subroutine SLATM6 and test the driver SGGEVX.
-* The test matrices have the known exact condition numbers for
-* eigenvalues. For the condition numbers of the eigenvectors
-* corresponding the first and last eigenvalues are also know
-* ``exactly'' (see SLATM6).
-*
-* For each matrix pair, the following tests will be performed and
-* compared with the threshhold THRESH.
-*
-* (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* where l**H is the conjugate tranpose of l.
-*
-* (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* (3) The condition number S(i) of eigenvalues computed by SGGEVX
-* differs less than a factor THRESH from the exact S(i) (see
-* SLATM6).
-*
-* (4) DIF(i) computed by STGSNA differs less than a factor 10*THRESH
-* from the exact value (for the 1st and 5th vectors only).
-*
-* Test Matrices
-* =============
-*
-* Two kinds of test matrix pairs
-*
-* (A, B) = inverse(YH) * (Da, Db) * inverse(X)
-*
-* are used in the tests:
-*
-* 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
-* 0 2+a 0 0 0 0 1 0 0 0
-* 0 0 3+a 0 0 0 0 1 0 0
-* 0 0 0 4+a 0 0 0 0 1 0
-* 0 0 0 0 5+a , 0 0 0 0 1 , and
-*
-* 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
-* 1 1 0 0 0 0 1 0 0 0
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1+a 1+b 0 0 0 1 0
-* 0 0 0 -1-b 1+a , 0 0 0 0 1 .
-*
-* In both cases the same inverse(YH) and inverse(X) are used to compute
-* (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
-*
-* YH: = 1 0 -y y -y X = 1 0 -x -x x
-* 0 1 -y y -y 0 1 x -x -x
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1 0 0 0 0 1 0
-* 0 0 0 0 1, 0 0 0 0 1 , where
-*
-* a, b, x and y will have all values independently of each other from
-* { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
-*
-* Arguments
-* =========
-*
-* NSIZE (input) INTEGER
-* The number of sizes of matrices to use. NSIZE must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIN will be
-* tested.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIN (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (workspace) REAL array, dimension (LDA, NSIZE)
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, AI, BI, Ao, and Bo.
-* It must be at least 1 and at least NSIZE.
-*
-* B (workspace) REAL array, dimension (LDA, NSIZE)
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, B contains the last matrix actually used.
-*
-* AI (workspace) REAL array, dimension (LDA, NSIZE)
-* Copy of A, modified by SGGEVX.
-*
-* BI (workspace) REAL array, dimension (LDA, NSIZE)
-* Copy of B, modified by SGGEVX.
-*
-* ALPHAR (workspace) REAL array, dimension (NSIZE)
-* ALPHAI (workspace) REAL array, dimension (NSIZE)
-* BETA (workspace) REAL array, dimension (NSIZE)
-* On exit, (ALPHAR + ALPHAI*i)/BETA are the eigenvalues.
-*
-* VL (workspace) REAL array, dimension (LDA, NSIZE)
-* VL holds the left eigenvectors computed by SGGEVX.
-*
-* VR (workspace) REAL array, dimension (LDA, NSIZE)
-* VR holds the right eigenvectors computed by SGGEVX.
-*
-* ILO (output/workspace) INTEGER
-*
-* IHI (output/workspace) INTEGER
-*
-* LSCALE (output/workspace) REAL array, dimension (N)
-*
-* RSCALE (output/workspace) REAL array, dimension (N)
-*
-* S (output/workspace) REAL array, dimension (N)
-*
-* STRU (output/workspace) REAL array, dimension (N)
-*
-* DIF (output/workspace) REAL array, dimension (N)
-*
-* DIFTRU (output/workspace) REAL array, dimension (N)
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* Leading dimension of WORK. LWORK >= 2*N*N+12*N+16.
-*
-* IWORK (workspace) INTEGER array, dimension (LIWORK)
-*
-* LIWORK (input) INTEGER
-* Leading dimension of IWORK. Must be at least N+6.
-*
-* RESULT (output/workspace) REAL array, dimension (4)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrvbd.f b/TESTING/EIG/sdrvbd.f
index 6453aead..c03e343b 100644
--- a/TESTING/EIG/sdrvbd.f
+++ b/TESTING/EIG/sdrvbd.f
@@ -1,10 +1,330 @@
+*> \brief \b SDRVBD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVBD( NSIZES, MM, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* A, LDA, U, LDU, VT, LDVT, ASAV, USAV, VTSAV, S,
+* SSAV, E, WORK, LWORK, IWORK, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, NOUT, NSIZES,
+* $ NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), MM( * ), NN( * )
+* REAL A( LDA, * ), ASAV( LDA, * ), E( * ), S( * ),
+* $ SSAV( * ), U( LDU, * ), USAV( LDU, * ),
+* $ VT( LDVT, * ), VTSAV( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVBD checks the singular value decomposition (SVD) drivers
+*> SGESVD, SGESDD, SGESVJ, and SGEJSV.
+*>
+*> Both SGESVD and SGESDD factor A = U diag(S) VT, where U and VT are
+*> orthogonal and diag(S) is diagonal with the entries of the array S
+*> on its diagonal. The entries of S are the singular values,
+*> nonnegative and stored in decreasing order. U and VT can be
+*> optionally not computed, overwritten on A, or computed partially.
+*>
+*> A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN.
+*> U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
+*>
+*> When SDRVBD is called, a number of matrix "sizes" (M's and N's)
+*> and a number of matrix "types" are specified. For each size (M,N)
+*> and each type of matrix, and for the minimal workspace as well as
+*> workspace adequate to permit blocking, an M x N matrix "A" will be
+*> generated and used to test the SVD routines. For each matrix, A will
+*> be factored as A = U diag(S) VT and the following 12 tests computed:
+*>
+*> Test for SGESVD:
+*>
+*> (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (2) | I - U'U | / ( M ulp )
+*>
+*> (3) | I - VT VT' | / ( N ulp )
+*>
+*> (4) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
+*> computed U.
+*>
+*> (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
+*> computed VT.
+*>
+*> (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
+*> vector of singular values from the partial SVD
+*>
+*> Test for SGESDD:
+*>
+*> (8) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (9) | I - U'U | / ( M ulp )
+*>
+*> (10) | I - VT VT' | / ( N ulp )
+*>
+*> (11) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (12) | U - Upartial | / ( M ulp ) where Upartial is a partially
+*> computed U.
+*>
+*> (13) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
+*> computed VT.
+*>
+*> (14) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
+*> vector of singular values from the partial SVD
+*>
+*> Test for SGESVJ:
+*>
+*> (15) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (16) | I - U'U | / ( M ulp )
+*>
+*> (17) | I - VT VT' | / ( N ulp )
+*>
+*> (18) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> Test for SGEJSV:
+*>
+*> (19) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (20) | I - U'U | / ( M ulp )
+*>
+*> (21) | I - VT VT' | / ( N ulp )
+*>
+*> (22) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> The "sizes" are specified by the arrays MM(1:NSIZES) and
+*> NN(1:NSIZES); the value of each element pair (MM(j),NN(j))
+*> specifies one size. The "types" are specified by a logical array
+*> DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j"
+*> will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*> (4) Same as (3), but multiplied by the underflow-threshold / ULP.
+*> (5) Same as (3), but multiplied by the overflow-threshold * ULP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of matrix sizes (M,N) contained in the vectors
+*> MM and NN.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER array, dimension (NSIZES)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRVBD
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrices are in A and B.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
+*> of type j will be generated. If NTYPES is smaller than the
+*> maximum number of types defined (PARAMETER MAXTYP), then
+*> types NTYPES+1 through MAXTYP will not be generated. If
+*> NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
+*> DOTYPE(NTYPES) will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095; if not they will be
+*> reduced mod 4096. Also, ISEED(4) must be odd.
+*> On exit, ISEED is changed and can be used in the next call to
+*> SDRVBD to continue the same random number sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. The test
+*> ratios are scaled to be O(1), so THRESH should be a small
+*> multiple of 1, e.g., 10 or 100. To have every test ratio
+*> printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,NMAX)
+*> where NMAX is the maximum value of N in NN.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,MMAX),
+*> where MMAX is the maximum value of M in MM.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,MMAX)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,MMAX).
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is REAL array, dimension (LDVT,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT. LDVT >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] USAV
+*> \verbatim
+*> USAV is REAL array, dimension (LDU,MMAX)
+*> \endverbatim
+*>
+*> \param[out] VTSAV
+*> \verbatim
+*> VTSAV is REAL array, dimension (LDVT,NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (max(min(MM,NN)))
+*> \endverbatim
+*>
+*> \param[out] SSAV
+*> \verbatim
+*> SSAV is REAL array, dimension
+*> (max(min(MM,NN)))
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension
+*> (max(min(MM,NN)))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(3*MN+MX,5*MN-4)+2*MN**2 for all pairs
+*> pairs (MN,MX)=( min(MM(j),NN(j), max(MM(j),NN(j)) )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least 8*min(M,N)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some MM(j) < 0
+*> -3: Some NN(j) < 0
+*> -4: NTYPES < 0
+*> -7: THRESH < 0
+*> -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
+*> -12: LDU < 1 or LDU < MMAX.
+*> -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).
+*> -21: LWORK too small.
+*> If SLATMS, or SGESVD returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRVBD( NSIZES, MM, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ A, LDA, U, LDU, VT, LDVT, ASAV, USAV, VTSAV, S,
$ SSAV, E, WORK, LWORK, IWORK, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LDVT, LWORK, NOUT, NSIZES,
@@ -19,207 +339,6 @@
$ VT( LDVT, * ), VTSAV( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVBD checks the singular value decomposition (SVD) drivers
-* SGESVD, SGESDD, SGESVJ, and SGEJSV.
-*
-* Both SGESVD and SGESDD factor A = U diag(S) VT, where U and VT are
-* orthogonal and diag(S) is diagonal with the entries of the array S
-* on its diagonal. The entries of S are the singular values,
-* nonnegative and stored in decreasing order. U and VT can be
-* optionally not computed, overwritten on A, or computed partially.
-*
-* A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN.
-* U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
-*
-* When SDRVBD is called, a number of matrix "sizes" (M's and N's)
-* and a number of matrix "types" are specified. For each size (M,N)
-* and each type of matrix, and for the minimal workspace as well as
-* workspace adequate to permit blocking, an M x N matrix "A" will be
-* generated and used to test the SVD routines. For each matrix, A will
-* be factored as A = U diag(S) VT and the following 12 tests computed:
-*
-* Test for SGESVD:
-*
-* (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (2) | I - U'U | / ( M ulp )
-*
-* (3) | I - VT VT' | / ( N ulp )
-*
-* (4) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
-* computed U.
-*
-* (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
-* computed VT.
-*
-* (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
-* vector of singular values from the partial SVD
-*
-* Test for SGESDD:
-*
-* (8) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (9) | I - U'U | / ( M ulp )
-*
-* (10) | I - VT VT' | / ( N ulp )
-*
-* (11) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (12) | U - Upartial | / ( M ulp ) where Upartial is a partially
-* computed U.
-*
-* (13) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
-* computed VT.
-*
-* (14) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
-* vector of singular values from the partial SVD
-*
-* Test for SGESVJ:
-*
-* (15) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (16) | I - U'U | / ( M ulp )
-*
-* (17) | I - VT VT' | / ( N ulp )
-*
-* (18) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* Test for SGEJSV:
-*
-* (19) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (20) | I - U'U | / ( M ulp )
-*
-* (21) | I - VT VT' | / ( N ulp )
-*
-* (22) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* The "sizes" are specified by the arrays MM(1:NSIZES) and
-* NN(1:NSIZES); the value of each element pair (MM(j),NN(j))
-* specifies one size. The "types" are specified by a logical array
-* DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j"
-* will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-* (4) Same as (3), but multiplied by the underflow-threshold / ULP.
-* (5) Same as (3), but multiplied by the overflow-threshold * ULP.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of matrix sizes (M,N) contained in the vectors
-* MM and NN.
-*
-* MM (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix column dimension N.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRVBD
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrices are in A and B.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
-* of type j will be generated. If NTYPES is smaller than the
-* maximum number of types defined (PARAMETER MAXTYP), then
-* types NTYPES+1 through MAXTYP will not be generated. If
-* NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
-* DOTYPE(NTYPES) will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095; if not they will be
-* reduced mod 4096. Also, ISEED(4) must be odd.
-* On exit, ISEED is changed and can be used in the next call to
-* SDRVBD to continue the same random number sequence.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. The test
-* ratios are scaled to be O(1), so THRESH should be a small
-* multiple of 1, e.g., 10 or 100. To have every test ratio
-* printed, use THRESH = 0.
-*
-* A (workspace) REAL array, dimension (LDA,NMAX)
-* where NMAX is the maximum value of N in NN.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,MMAX),
-* where MMAX is the maximum value of M in MM.
-*
-* U (workspace) REAL array, dimension (LDU,MMAX)
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,MMAX).
-*
-* VT (workspace) REAL array, dimension (LDVT,NMAX)
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT. LDVT >= max(1,NMAX).
-*
-* ASAV (workspace) REAL array, dimension (LDA,NMAX)
-*
-* USAV (workspace) REAL array, dimension (LDU,MMAX)
-*
-* VTSAV (workspace) REAL array, dimension (LDVT,NMAX)
-*
-* S (workspace) REAL array, dimension
-* (max(min(MM,NN)))
-*
-* SSAV (workspace) REAL array, dimension
-* (max(min(MM,NN)))
-*
-* E (workspace) REAL array, dimension
-* (max(min(MM,NN)))
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(3*MN+MX,5*MN-4)+2*MN**2 for all pairs
-* pairs (MN,MX)=( min(MM(j),NN(j), max(MM(j),NN(j)) )
-*
-* IWORK (workspace) INTEGER array, dimension at least 8*min(M,N)
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some MM(j) < 0
-* -3: Some NN(j) < 0
-* -4: NTYPES < 0
-* -7: THRESH < 0
-* -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
-* -12: LDU < 1 or LDU < MMAX.
-* -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).
-* -21: LWORK too small.
-* If SLATMS, or SGESVD returns an error code, the
-* absolute value of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrves.f b/TESTING/EIG/sdrves.f
index 84921de9..e17ec3a4 100644
--- a/TESTING/EIG/sdrves.f
+++ b/TESTING/EIG/sdrves.f
@@ -1,10 +1,401 @@
+*> \brief \b SDRVES
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, HT, WR, WI, WRT, WIT, VS,
+* LDVS, RESULT, WORK, NWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ RESULT( 13 ), VS( LDVS, * ), WI( * ), WIT( * ),
+* $ WORK( * ), WR( * ), WRT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVES checks the nonsymmetric eigenvalue (Schur form) problem
+*> driver SGEES.
+*>
+*> When SDRVES is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 13
+*> tests will be performed:
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SDRVES does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRVES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRVES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max(NN).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is REAL array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by SGEES.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is REAL array, dimension (LDA, max(NN))
+*> Yet another copy of the test matrix A, modified by SGEES.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WRT
+*> \verbatim
+*> WRT is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WIT
+*> \verbatim
+*> WIT is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when SGEES only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is REAL array, dimension (LDVS, max(NN))
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (13)
+*> The values computed by the 13 tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 5*NN(j)+2*NN(j)**2 for all j.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -17: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ).
+*> -20: NWORK too small.
+*> If SLATMR, SLATMS, SLATME or SGEES returns an error code,
+*> the absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRVES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, HT, WR, WI, WRT, WIT, VS,
$ LDVS, RESULT, WORK, NWORK, IWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
@@ -18,274 +409,6 @@
$ WORK( * ), WR( * ), WRT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVES checks the nonsymmetric eigenvalue (Schur form) problem
-* driver SGEES.
-*
-* When SDRVES is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 13
-* tests will be performed:
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SDRVES does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRVES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRVES to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) REAL array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max(NN).
-*
-* H (workspace) REAL array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by SGEES.
-*
-* HT (workspace) REAL array, dimension (LDA, max(NN))
-* Yet another copy of the test matrix A, modified by SGEES.
-*
-* WR (workspace) REAL array, dimension (max(NN))
-* WI (workspace) REAL array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WRT (workspace) REAL array, dimension (max(NN))
-* WIT (workspace) REAL array, dimension (max(NN))
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when SGEES only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* VS (workspace) REAL array, dimension (LDVS, max(NN))
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1,max(NN)).
-*
-* RESULT (output) REAL array, dimension (13)
-* The values computed by the 13 tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) REAL array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 5*NN(j)+2*NN(j)**2 for all j.
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -17: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ).
-* -20: NWORK too small.
-* If SLATMR, SLATMS, SLATME or SGEES returns an error code,
-* the absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrvev.f b/TESTING/EIG/sdrvev.f
index 9565f4e4..aa97cc53 100644
--- a/TESTING/EIG/sdrvev.f
+++ b/TESTING/EIG/sdrvev.f
@@ -1,11 +1,424 @@
+*> \brief \b SDRVEV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, WR, WI, WR1, WI1, VL, LDVL,
+* VR, LDVR, LRE, LDLRE, RESULT, WORK, NWORK,
+* IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NOUNIT, NSIZES,
+* $ NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ RESULT( 7 ), VL( LDVL, * ), VR( LDVR, * ),
+* $ WI( * ), WI1( * ), WORK( * ), WR( * ), WR1( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVEV checks the nonsymmetric eigenvalue problem driver SGEEV.
+*>
+*> When SDRVEV is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 7
+*> tests will be performed:
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a block diagonal matrix, with a 1x1 block for each
+*> real eigenvalue and a 2x2 block for each complex conjugate
+*> pair. If eigenvalues j and j+1 are a complex conjugate pair,
+*> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
+*> 2 x 2 block corresponding to the pair will be:
+*>
+*> ( wr wi )
+*> ( -wi wr )
+*>
+*> Such a block multiplying an n x 2 matrix ( ur ui ) on the
+*> right will be the same as multiplying ur + i*ui by wr + i*wi.
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and whether largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and whether largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) W(full) = W(partial)
+*>
+*> W(full) denotes the eigenvalues computed when both VR and VL
+*> are also computed, and W(partial) denotes the eigenvalues
+*> computed when only W, only W and VR, or only W and VL are
+*> computed.
+*>
+*> (6) VR(full) = VR(partial)
+*>
+*> VR(full) denotes the right eigenvectors computed when both VR
+*> and VL are computed, and VR(partial) denotes the result
+*> when only VR is computed.
+*>
+*> (7) VL(full) = VL(partial)
+*>
+*> VL(full) denotes the left eigenvectors computed when both VR
+*> and VL are also computed, and VL(partial) denotes the result
+*> when only VL is computed.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SDRVEV does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRVEV
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRVEV to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max(NN).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is REAL array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by SGEEV.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WR1
+*> \verbatim
+*> WR1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI1
+*> \verbatim
+*> WI1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when SGEEV only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL, max(NN))
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR, max(NN))
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is REAL array, dimension (LDLRE,max(NN))
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (7)
+*> The values computed by the seven tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 5*NN(j)+2*NN(j)**2 for all j.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ).
+*> -18: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ).
+*> -20: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ).
+*> -23: NWORK too small.
+*> If SLATMR, SLATMS, SLATME or SGEEV returns an error code,
+*> the absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRVEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, WR, WI, WR1, WI1, VL, LDVL,
$ VR, LDVR, LRE, LDLRE, RESULT, WORK, NWORK,
$ IWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NOUNIT, NSIZES,
@@ -20,285 +433,6 @@
$ WI( * ), WI1( * ), WORK( * ), WR( * ), WR1( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVEV checks the nonsymmetric eigenvalue problem driver SGEEV.
-*
-* When SDRVEV is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 7
-* tests will be performed:
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a block diagonal matrix, with a 1x1 block for each
-* real eigenvalue and a 2x2 block for each complex conjugate
-* pair. If eigenvalues j and j+1 are a complex conjugate pair,
-* so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
-* 2 x 2 block corresponding to the pair will be:
-*
-* ( wr wi )
-* ( -wi wr )
-*
-* Such a block multiplying an n x 2 matrix ( ur ui ) on the
-* right will be the same as multiplying ur + i*ui by wr + i*wi.
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and whether largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and whether largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) W(full) = W(partial)
-*
-* W(full) denotes the eigenvalues computed when both VR and VL
-* are also computed, and W(partial) denotes the eigenvalues
-* computed when only W, only W and VR, or only W and VL are
-* computed.
-*
-* (6) VR(full) = VR(partial)
-*
-* VR(full) denotes the right eigenvectors computed when both VR
-* and VL are computed, and VR(partial) denotes the result
-* when only VR is computed.
-*
-* (7) VL(full) = VL(partial)
-*
-* VL(full) denotes the left eigenvectors computed when both VR
-* and VL are also computed, and VL(partial) denotes the result
-* when only VL is computed.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SDRVEV does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRVEV
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRVEV to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) REAL array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max(NN).
-*
-* H (workspace) REAL array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by SGEEV.
-*
-* WR (workspace) REAL array, dimension (max(NN))
-* WI (workspace) REAL array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WR1 (workspace) REAL array, dimension (max(NN))
-* WI1 (workspace) REAL array, dimension (max(NN))
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when SGEEV only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) REAL array, dimension (LDVL, max(NN))
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,max(NN)).
-*
-* VR (workspace) REAL array, dimension (LDVR, max(NN))
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,max(NN)).
-*
-* LRE (workspace) REAL array, dimension (LDLRE,max(NN))
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,max(NN)).
-*
-* RESULT (output) REAL array, dimension (7)
-* The values computed by the seven tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) REAL array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 5*NN(j)+2*NN(j)**2 for all j.
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ).
-* -18: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ).
-* -20: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ).
-* -23: NWORK too small.
-* If SLATMR, SLATMS, SLATME or SGEEV returns an error code,
-* the absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrvgg.f b/TESTING/EIG/sdrvgg.f
index be71c144..88d33d8e 100644
--- a/TESTING/EIG/sdrvgg.f
+++ b/TESTING/EIG/sdrvgg.f
@@ -1,11 +1,465 @@
+*> \brief \b SDRVGG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* THRSHN, NOUNIT, A, LDA, B, S, T, S2, T2, Q,
+* LDQ, Z, ALPHR1, ALPHI1, BETA1, ALPHR2, ALPHI2,
+* BETA2, VL, VR, WORK, LWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
+* REAL THRESH, THRSHN
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* REAL A( LDA, * ), ALPHI1( * ), ALPHI2( * ),
+* $ ALPHR1( * ), ALPHR2( * ), B( LDA, * ),
+* $ BETA1( * ), BETA2( * ), Q( LDQ, * ),
+* $ RESULT( * ), S( LDA, * ), S2( LDA, * ),
+* $ T( LDA, * ), T2( LDA, * ), VL( LDQ, * ),
+* $ VR( LDQ, * ), WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVGG checks the nonsymmetric generalized eigenvalue driver
+*> routines.
+*> T T T
+*> SGEGS factors A and B as Q S Z and Q T Z , where means
+*> transpose, T is upper triangular, S is in generalized Schur form
+*> (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
+*> the 2x2 blocks corresponding to complex conjugate pairs of
+*> generalized eigenvalues), and Q and Z are orthogonal. It also
+*> computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)), where alpha(j)=S(j,j) and beta(j)=P(j,j) --
+*> thus, w(j) = alpha(j)/beta(j) is a root of the generalized
+*> eigenvalue problem
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
+*> problem
+*>
+*> det( m(j) A - B ) = 0
+*>
+*> SGEGV computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)), the matrix L whose columns contain the
+*> generalized left eigenvectors l, and the matrix R whose columns
+*> contain the generalized right eigenvectors r for the pair (A,B).
+*>
+*> When SDRVGG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 7
+*> tests will be performed and compared with the threshhold THRESH:
+*>
+*> Results from SGEGS:
+*>
+*> T
+*> (1) | A - Q S Z | / ( |A| n ulp )
+*>
+*> T
+*> (2) | B - Q T Z | / ( |B| n ulp )
+*>
+*> T
+*> (3) | I - QQ | / ( n ulp )
+*>
+*> T
+*> (4) | I - ZZ | / ( n ulp )
+*>
+*> (5) maximum over j of D(j) where:
+*>
+*> if alpha(j) is real:
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> if alpha(j) is complex:
+*> | det( s S - w T ) |
+*> D(j) = ---------------------------------------------------
+*> ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
+*>
+*> and S and T are here the 2 x 2 diagonal blocks of S and T
+*> corresponding to the j-th eigenvalue.
+*>
+*> Results from SGEGV:
+*>
+*> (6) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> where l**H is the conjugate tranpose of l.
+*>
+*> (7) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SDRVGG does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRVGG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRVGG to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] THRSHN
+*> \verbatim
+*> THRSHN is REAL
+*> Threshhold for reporting eigenvector normalization error.
+*> If the normalization of any eigenvector differs from 1 by
+*> more than THRSHN*ulp, then a special error message will be
+*> printed. (This is handled separately from the other tests,
+*> since only a compiler or programming error should cause an
+*> error message, at least if THRSHN is at least 5--10.)
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, T, S2, and T2.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension
+*> (LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by SGEGS. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by SGEGS.
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is REAL array, dimension (LDA, max(NN))
+*> The matrix computed from A by SGEGV. This will be the
+*> Schur form of some matrix related to A, but will not, in
+*> general, be the same as S.
+*> \endverbatim
+*>
+*> \param[out] T2
+*> \verbatim
+*> T2 is REAL array, dimension (LDA, max(NN))
+*> The matrix computed from B by SGEGV. This will be the
+*> Schur form of some matrix related to B, but will not, in
+*> general, be the same as T.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ, max(NN))
+*> The (left) orthogonal matrix computed by SGEGS.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q, Z, VL, and VR. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array of
+*> dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by SGEGS.
+*> \endverbatim
+*>
+*> \param[out] ALPHR1
+*> \verbatim
+*> ALPHR1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI1
+*> \verbatim
+*> ALPHI1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by SGEGS.
+*> ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th
+*> generalized eigenvalue of the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHR2
+*> \verbatim
+*> ALPHR2 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] ALPHI2
+*> \verbatim
+*> ALPHI2 is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA2
+*> \verbatim
+*> BETA2 is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by SGEGV.
+*> ( ALPHR2(k)+ALPHI2(k)*i ) / BETA2(k) is the k-th
+*> generalized eigenvalue of the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDQ, max(NN))
+*> The (block lower triangular) left eigenvector matrix for
+*> the matrices in A and B. (See STGEVC for the format.)
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDQ, max(NN))
+*> The (block upper triangular) right eigenvector matrix for
+*> the matrices in A and B. (See STGEVC for the format.)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 2*N + MAX( 6*N, N*(NB+1), (k+1)*(2*k+N+1) ), where
+*> "k" is the sum of the blocksize and number-of-shifts for
+*> SHGEQZ, and NB is the greatest of the blocksizes for
+*> SGEQRF, SORMQR, and SORGQR. (The blocksizes and the
+*> number-of-shifts are retrieved through calls to ILAENV.)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRVGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ THRSHN, NOUNIT, A, LDA, B, S, T, S2, T2, Q,
$ LDQ, Z, ALPHR1, ALPHI1, BETA1, ALPHR2, ALPHI2,
$ BETA2, VL, VR, WORK, LWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
@@ -22,314 +476,6 @@
$ VR( LDQ, * ), WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVGG checks the nonsymmetric generalized eigenvalue driver
-* routines.
-* T T T
-* SGEGS factors A and B as Q S Z and Q T Z , where means
-* transpose, T is upper triangular, S is in generalized Schur form
-* (block upper triangular, with 1x1 and 2x2 blocks on the diagonal,
-* the 2x2 blocks corresponding to complex conjugate pairs of
-* generalized eigenvalues), and Q and Z are orthogonal. It also
-* computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)), where alpha(j)=S(j,j) and beta(j)=P(j,j) --
-* thus, w(j) = alpha(j)/beta(j) is a root of the generalized
-* eigenvalue problem
-*
-* det( A - w(j) B ) = 0
-*
-* and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
-* problem
-*
-* det( m(j) A - B ) = 0
-*
-* SGEGV computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)), the matrix L whose columns contain the
-* generalized left eigenvectors l, and the matrix R whose columns
-* contain the generalized right eigenvectors r for the pair (A,B).
-*
-* When SDRVGG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 7
-* tests will be performed and compared with the threshhold THRESH:
-*
-* Results from SGEGS:
-*
-* T
-* (1) | A - Q S Z | / ( |A| n ulp )
-*
-* T
-* (2) | B - Q T Z | / ( |B| n ulp )
-*
-* T
-* (3) | I - QQ | / ( n ulp )
-*
-* T
-* (4) | I - ZZ | / ( n ulp )
-*
-* (5) maximum over j of D(j) where:
-*
-* if alpha(j) is real:
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* if alpha(j) is complex:
-* | det( s S - w T ) |
-* D(j) = ---------------------------------------------------
-* ulp max( s norm(S), |w| norm(T) )*norm( s S - w T )
-*
-* and S and T are here the 2 x 2 diagonal blocks of S and T
-* corresponding to the j-th eigenvalue.
-*
-* Results from SGEGV:
-*
-* (6) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* where l**H is the conjugate tranpose of l.
-*
-* (7) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SDRVGG does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRVGG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRVGG to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* THRSHN (input) REAL
-* Threshhold for reporting eigenvector normalization error.
-* If the normalization of any eigenvector differs from 1 by
-* more than THRSHN*ulp, then a special error message will be
-* printed. (This is handled separately from the other tests,
-* since only a compiler or programming error should cause an
-* error message, at least if THRSHN is at least 5--10.)
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) REAL array, dimension
-* (LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, T, S2, and T2.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) REAL array, dimension
-* (LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) REAL array, dimension (LDA, max(NN))
-* The Schur form matrix computed from A by SGEGS. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) REAL array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by SGEGS.
-*
-* S2 (workspace) REAL array, dimension (LDA, max(NN))
-* The matrix computed from A by SGEGV. This will be the
-* Schur form of some matrix related to A, but will not, in
-* general, be the same as S.
-*
-* T2 (workspace) REAL array, dimension (LDA, max(NN))
-* The matrix computed from B by SGEGV. This will be the
-* Schur form of some matrix related to B, but will not, in
-* general, be the same as T.
-*
-* Q (workspace) REAL array, dimension (LDQ, max(NN))
-* The (left) orthogonal matrix computed by SGEGS.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q, Z, VL, and VR. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) REAL array of
-* dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by SGEGS.
-*
-* ALPHR1 (workspace) REAL array, dimension (max(NN))
-* ALPHI1 (workspace) REAL array, dimension (max(NN))
-* BETA1 (workspace) REAL array, dimension (max(NN))
-*
-* The generalized eigenvalues of (A,B) computed by SGEGS.
-* ( ALPHR1(k)+ALPHI1(k)*i ) / BETA1(k) is the k-th
-* generalized eigenvalue of the matrices in A and B.
-*
-* ALPHR2 (workspace) REAL array, dimension (max(NN))
-* ALPHI2 (workspace) REAL array, dimension (max(NN))
-* BETA2 (workspace) REAL array, dimension (max(NN))
-*
-* The generalized eigenvalues of (A,B) computed by SGEGV.
-* ( ALPHR2(k)+ALPHI2(k)*i ) / BETA2(k) is the k-th
-* generalized eigenvalue of the matrices in A and B.
-*
-* VL (workspace) REAL array, dimension (LDQ, max(NN))
-* The (block lower triangular) left eigenvector matrix for
-* the matrices in A and B. (See STGEVC for the format.)
-*
-* VR (workspace) REAL array, dimension (LDQ, max(NN))
-* The (block upper triangular) right eigenvector matrix for
-* the matrices in A and B. (See STGEVC for the format.)
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 2*N + MAX( 6*N, N*(NB+1), (k+1)*(2*k+N+1) ), where
-* "k" is the sum of the blocksize and number-of-shifts for
-* SHGEQZ, and NB is the greatest of the blocksizes for
-* SGEQRF, SORMQR, and SORGQR. (The blocksizes and the
-* number-of-shifts are retrieved through calls to ILAENV.)
-*
-* RESULT (output) REAL array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrvsg.f b/TESTING/EIG/sdrvsg.f
index bc98d3fc..5b25720b 100644
--- a/TESTING/EIG/sdrvsg.f
+++ b/TESTING/EIG/sdrvsg.f
@@ -1,19 +1,392 @@
- SUBROUTINE SDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
- $ NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
- $ BP, WORK, NWORK, IWORK, LIWORK, RESULT, INFO )
+*> \brief \b SDRVSG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
+* BP, WORK, NWORK, IWORK, LIWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDZ, LIWORK, NOUNIT, NSIZES,
+* $ NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL A( LDA, * ), AB( LDA, * ), AP( * ),
+* $ B( LDB, * ), BB( LDB, * ), BP( * ), D( * ),
+* $ RESULT( * ), WORK( * ), Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVSG checks the real symmetric generalized eigenproblem
+*> drivers.
+*>
+*> SSYGV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem.
+*>
+*> SSYGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem using a divide and conquer algorithm.
+*>
+*> SSYGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem.
+*>
+*> SSPGV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem in packed storage.
+*>
+*> SSPGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem in packed storage using a divide and
+*> conquer algorithm.
+*>
+*> SSPGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite generalized
+*> eigenproblem in packed storage.
+*>
+*> SSBGV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite banded
+*> generalized eigenproblem.
+*>
+*> SSBGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite banded
+*> generalized eigenproblem using a divide and conquer
+*> algorithm.
+*>
+*> SSBGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric-definite banded
+*> generalized eigenproblem.
+*>
+*> When SDRVSG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix A of the given type will be
+*> generated; a random well-conditioned matrix B is also generated
+*> and the pair (A,B) is used to test the drivers.
+*>
+*> For each pair (A,B), the following tests are performed:
+*>
+*> (1) SSYGV with ITYPE = 1 and UPLO ='U':
+*>
+*> | A Z - B Z D | / ( |A| |Z| n ulp )
+*>
+*> (2) as (1) but calling SSPGV
+*> (3) as (1) but calling SSBGV
+*> (4) as (1) but with UPLO = 'L'
+*> (5) as (4) but calling SSPGV
+*> (6) as (4) but calling SSBGV
+*>
+*> (7) SSYGV with ITYPE = 2 and UPLO ='U':
+*>
+*> | A B Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> (8) as (7) but calling SSPGV
+*> (9) as (7) but with UPLO = 'L'
+*> (10) as (9) but calling SSPGV
+*>
+*> (11) SSYGV with ITYPE = 3 and UPLO ='U':
+*>
+*> | B A Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> (12) as (11) but calling SSPGV
+*> (13) as (11) but with UPLO = 'L'
+*> (14) as (13) but calling SSPGV
+*>
+*> SSYGVD, SSPGVD and SSBGVD performed the same 14 tests.
+*>
+*> SSYGVX, SSPGVX and SSBGVX performed the above 14 tests with
+*> the parameter RANGE = 'A', 'N' and 'I', respectively.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value
+*> of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> This type is used for the matrix A which has half-bandwidth KA.
+*> B is generated as a well-conditioned positive definite matrix
+*> with half-bandwidth KB (<= KA).
+*> Currently, the list of possible types for A is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries
+*> 1, ULP, ..., ULP and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold)
+*>
+*> (16) Same as (8), but with KA = 1 and KB = 1
+*> (17) Same as (8), but with KA = 2 and KB = 1
+*> (18) Same as (8), but with KA = 2 and KB = 2
+*> (19) Same as (8), but with KA = 3 and KB = 1
+*> (20) Same as (8), but with KA = 3 and KB = 2
+*> (21) Same as (8), but with KA = 3 and KB = 3
+*>
+*>\endverbatim
*
-*******************************************************************
+* Arguments
+* =========
*
-* modified August 1997, a new parameter LIWORK is added
-* in the calling sequence.
+*> \verbatim
+*> NSIZES INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SDRVSG does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRVSG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRVSG to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A REAL array, dimension (LDA , max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A and AB. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> B REAL array, dimension (LDB , max(NN))
+*> Used to hold the symmetric positive definite matrix for
+*> the generailzed problem.
+*> On exit, B contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDB INTEGER
+*> The leading dimension of B and BB. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D REAL array, dimension (max(NN))
+*> The eigenvalues of A. On exit, the eigenvalues in D
+*> correspond with the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z REAL array, dimension (LDZ, max(NN))
+*> The matrix of eigenvectors.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDZ INTEGER
+*> The leading dimension of Z. It must be at least 1 and
+*> at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> AB REAL array, dimension (LDA, max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> BB REAL array, dimension (LDB, max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> AP REAL array, dimension (max(NN)**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> BP REAL array, dimension (max(NN)**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK REAL array, dimension (NWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> NWORK INTEGER
+*> The number of entries in WORK. This must be at least
+*> 1+5*N+2*N*lg(N)+3*N**2 where N = max( NN(j) ) and
+*> lg( N ) = smallest integer k such that 2**k >= N.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IWORK INTEGER array, dimension (LIWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LIWORK INTEGER
+*> The number of entries in WORK. This must be at least 6*N.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT REAL array, dimension (70)
+*> The values computed by the 70 tests described above.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDZ < 1 or LDZ < NMAX.
+*> -21: NWORK too small.
+*> -23: LIWORK too small.
+*> If SLATMR, SLATMS, SSYGV, SSPGV, SSBGV, SSYGVD, SSPGVD,
+*> SSBGVD, SSYGVX, SSPGVX or SSBGVX returns an error code,
+*> the absolute value of it is returned.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> ----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests that have been run
+*> on this matrix.
+*> NTESTT The total number of tests for this call.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by SLAFTS).
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* test routine SSGT01 is also modified
+*> \date November 2011
*
-*******************************************************************
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+ $ NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
+ $ BP, WORK, NWORK, IWORK, LIWORK, RESULT, INFO )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LDZ, LIWORK, NOUNIT, NSIZES,
@@ -28,313 +401,6 @@
$ RESULT( * ), WORK( * ), Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVSG checks the real symmetric generalized eigenproblem
-* drivers.
-*
-* SSYGV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem.
-*
-* SSYGVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem using a divide and conquer algorithm.
-*
-* SSYGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem.
-*
-* SSPGV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem in packed storage.
-*
-* SSPGVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem in packed storage using a divide and
-* conquer algorithm.
-*
-* SSPGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite generalized
-* eigenproblem in packed storage.
-*
-* SSBGV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite banded
-* generalized eigenproblem.
-*
-* SSBGVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite banded
-* generalized eigenproblem using a divide and conquer
-* algorithm.
-*
-* SSBGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric-definite banded
-* generalized eigenproblem.
-*
-* When SDRVSG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix A of the given type will be
-* generated; a random well-conditioned matrix B is also generated
-* and the pair (A,B) is used to test the drivers.
-*
-* For each pair (A,B), the following tests are performed:
-*
-* (1) SSYGV with ITYPE = 1 and UPLO ='U':
-*
-* | A Z - B Z D | / ( |A| |Z| n ulp )
-*
-* (2) as (1) but calling SSPGV
-* (3) as (1) but calling SSBGV
-* (4) as (1) but with UPLO = 'L'
-* (5) as (4) but calling SSPGV
-* (6) as (4) but calling SSBGV
-*
-* (7) SSYGV with ITYPE = 2 and UPLO ='U':
-*
-* | A B Z - Z D | / ( |A| |Z| n ulp )
-*
-* (8) as (7) but calling SSPGV
-* (9) as (7) but with UPLO = 'L'
-* (10) as (9) but calling SSPGV
-*
-* (11) SSYGV with ITYPE = 3 and UPLO ='U':
-*
-* | B A Z - Z D | / ( |A| |Z| n ulp )
-*
-* (12) as (11) but calling SSPGV
-* (13) as (11) but with UPLO = 'L'
-* (14) as (13) but calling SSPGV
-*
-* SSYGVD, SSPGVD and SSBGVD performed the same 14 tests.
-*
-* SSYGVX, SSPGVX and SSBGVX performed the above 14 tests with
-* the parameter RANGE = 'A', 'N' and 'I', respectively.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value
-* of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* This type is used for the matrix A which has half-bandwidth KA.
-* B is generated as a well-conditioned positive definite matrix
-* with half-bandwidth KB (<= KA).
-* Currently, the list of possible types for A is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries
-* 1, ULP, ..., ULP and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold)
-*
-* (16) Same as (8), but with KA = 1 and KB = 1
-* (17) Same as (8), but with KA = 2 and KB = 1
-* (18) Same as (8), but with KA = 2 and KB = 2
-* (19) Same as (8), but with KA = 3 and KB = 1
-* (20) Same as (8), but with KA = 3 and KB = 2
-* (21) Same as (8), but with KA = 3 and KB = 3
-*
-* Arguments
-* =========
-*
-* NSIZES INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SDRVSG does nothing. It must be at least zero.
-* Not modified.
-*
-* NN INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRVSG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRVSG to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A REAL array, dimension (LDA , max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA INTEGER
-* The leading dimension of A and AB. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* B REAL array, dimension (LDB , max(NN))
-* Used to hold the symmetric positive definite matrix for
-* the generailzed problem.
-* On exit, B contains the last matrix actually
-* used.
-* Modified.
-*
-* LDB INTEGER
-* The leading dimension of B and BB. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* D REAL array, dimension (max(NN))
-* The eigenvalues of A. On exit, the eigenvalues in D
-* correspond with the matrix in A.
-* Modified.
-*
-* Z REAL array, dimension (LDZ, max(NN))
-* The matrix of eigenvectors.
-* Modified.
-*
-* LDZ INTEGER
-* The leading dimension of Z. It must be at least 1 and
-* at least max( NN ).
-* Not modified.
-*
-* AB REAL array, dimension (LDA, max(NN))
-* Workspace.
-* Modified.
-*
-* BB REAL array, dimension (LDB, max(NN))
-* Workspace.
-* Modified.
-*
-* AP REAL array, dimension (max(NN)**2)
-* Workspace.
-* Modified.
-*
-* BP REAL array, dimension (max(NN)**2)
-* Workspace.
-* Modified.
-*
-* WORK REAL array, dimension (NWORK)
-* Workspace.
-* Modified.
-*
-* NWORK INTEGER
-* The number of entries in WORK. This must be at least
-* 1+5*N+2*N*lg(N)+3*N**2 where N = max( NN(j) ) and
-* lg( N ) = smallest integer k such that 2**k >= N.
-* Not modified.
-*
-* IWORK INTEGER array, dimension (LIWORK)
-* Workspace.
-* Modified.
-*
-* LIWORK INTEGER
-* The number of entries in WORK. This must be at least 6*N.
-* Not modified.
-*
-* RESULT REAL array, dimension (70)
-* The values computed by the 70 tests described above.
-* Modified.
-*
-* INFO INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDZ < 1 or LDZ < NMAX.
-* -21: NWORK too small.
-* -23: LIWORK too small.
-* If SLATMR, SLATMS, SSYGV, SSPGV, SSBGV, SSYGVD, SSPGVD,
-* SSBGVD, SSYGVX, SSPGVX or SSBGVX returns an error code,
-* the absolute value of it is returned.
-* Modified.
-*
-* ----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests that have been run
-* on this matrix.
-* NTESTT The total number of tests for this call.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by SLAFTS).
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrvst.f b/TESTING/EIG/sdrvst.f
index 8098776e..7f603c21 100644
--- a/TESTING/EIG/sdrvst.f
+++ b/TESTING/EIG/sdrvst.f
@@ -1,11 +1,498 @@
+*> \brief \b SDRVST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, D1, D2, D3, D4, EVEIGS, WA1,
+* WA2, WA3, U, LDU, V, TAU, Z, WORK, LWORK,
+* IWORK, LIWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL A( LDA, * ), D1( * ), D2( * ), D3( * ),
+* $ D4( * ), EVEIGS( * ), RESULT( * ), TAU( * ),
+* $ U( LDU, * ), V( LDU, * ), WA1( * ), WA2( * ),
+* $ WA3( * ), WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVST checks the symmetric eigenvalue problem drivers.
+*>
+*> SSTEV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric tridiagonal matrix.
+*>
+*> SSTEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric tridiagonal matrix.
+*>
+*> SSTEVR computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric tridiagonal matrix
+*> using the Relatively Robust Representation where it can.
+*>
+*> SSYEV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix.
+*>
+*> SSYEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix.
+*>
+*> SSYEVR computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix
+*> using the Relatively Robust Representation where it can.
+*>
+*> SSPEV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix in packed
+*> storage.
+*>
+*> SSPEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix in packed
+*> storage.
+*>
+*> SSBEV computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric band matrix.
+*>
+*> SSBEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a real symmetric band matrix.
+*>
+*> SSYEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix using
+*> a divide and conquer algorithm.
+*>
+*> SSPEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric matrix in packed
+*> storage, using a divide and conquer algorithm.
+*>
+*> SSBEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a real symmetric band matrix,
+*> using a divide and conquer algorithm.
+*>
+*> When SDRVST is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the appropriate drivers. For each matrix and each
+*> driver routine called, the following tests will be performed:
+*>
+*> (1) | A - Z D Z' | / ( |A| n ulp )
+*>
+*> (2) | I - Z Z' | / ( n ulp )
+*>
+*> (3) | D1 - D2 | / ( |D1| ulp )
+*>
+*> where Z is the matrix of eigenvectors returned when the
+*> eigenvector option is given and D1 and D2 are the eigenvalues
+*> returned with and without the eigenvector option.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced eigenvalues
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced eigenvalues
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" eigenvalues
+*> 1, ULP, ..., ULP and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U' D U, where U is orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U' D U, where U is orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U' D U, where U is orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*> (16) A band matrix with half bandwidth randomly chosen between
+*> 0 and N-1, with evenly spaced eigenvalues 1, ..., ULP
+*> with random signs.
+*> (17) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (18) Same as (16), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> SDRVST does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> The number of elements in DOTYPE. If it is zero, SDRVST
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRVST to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A REAL array, dimension (LDA , max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D1 REAL array, dimension (max(NN))
+*> The eigenvalues of A, as computed by SSTEQR simlutaneously
+*> with Z. On exit, the eigenvalues in D1 correspond with the
+*> matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D2 REAL array, dimension (max(NN))
+*> The eigenvalues of A, as computed by SSTEQR if Z is not
+*> computed. On exit, the eigenvalues in D2 correspond with
+*> the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D3 REAL array, dimension (max(NN))
+*> The eigenvalues of A, as computed by SSTERF. On exit, the
+*> eigenvalues in D3 correspond with the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D4 REAL array, dimension
+*> \endverbatim
+*> \verbatim
+*> EVEIGS REAL array, dimension (max(NN))
+*> The eigenvalues as computed by SSTEV('N', ... )
+*> (I reserve the right to change this to the output of
+*> whichever algorithm computes the most accurate eigenvalues).
+*> \endverbatim
+*> \verbatim
+*> WA1 REAL array, dimension
+*> \endverbatim
+*> \verbatim
+*> WA2 REAL array, dimension
+*> \endverbatim
+*> \verbatim
+*> WA3 REAL array, dimension
+*> \endverbatim
+*> \verbatim
+*> U REAL array, dimension (LDU, max(NN))
+*> The orthogonal matrix computed by SSYTRD + SORGTR.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDU INTEGER
+*> The leading dimension of U, Z, and V. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> V REAL array, dimension (LDU, max(NN))
+*> The Housholder vectors computed by SSYTRD in reducing A to
+*> tridiagonal form.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> TAU REAL array, dimension (max(NN))
+*> The Householder factors computed by SSYTRD in reducing A
+*> to tridiagonal form.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z REAL array, dimension (LDU, max(NN))
+*> The orthogonal matrix of eigenvectors computed by SSTEQR,
+*> SPTEQR, and SSTEIN.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK REAL array, dimension (LWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LWORK INTEGER
+*> The number of entries in WORK. This must be at least
+*> 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 4 * Nmax**2
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IWORK INTEGER array,
+*> dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT REAL array, dimension (105)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDU < 1 or LDU < NMAX.
+*> -21: LWORK too small.
+*> If SLATMR, SLATMS, SSYTRD, SORGTR, SSTEQR, SSTERF,
+*> or SORMTR returns an error code, the
+*> absolute value of it is returned.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by SLAFTS).
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*> \verbatim
+*> The tests performed are: Routine tested
+*> 1= | A - U S U' | / ( |A| n ulp ) SSTEV('V', ... )
+*> 2= | I - U U' | / ( n ulp ) SSTEV('V', ... )
+*> 3= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEV('N', ... )
+*> 4= | A - U S U' | / ( |A| n ulp ) SSTEVX('V','A', ... )
+*> 5= | I - U U' | / ( n ulp ) SSTEVX('V','A', ... )
+*> 6= |D(with Z) - EVEIGS| / (|D| ulp) SSTEVX('N','A', ... )
+*> 7= | A - U S U' | / ( |A| n ulp ) SSTEVR('V','A', ... )
+*> 8= | I - U U' | / ( n ulp ) SSTEVR('V','A', ... )
+*> 9= |D(with Z) - EVEIGS| / (|D| ulp) SSTEVR('N','A', ... )
+*> 10= | A - U S U' | / ( |A| n ulp ) SSTEVX('V','I', ... )
+*> 11= | I - U U' | / ( n ulp ) SSTEVX('V','I', ... )
+*> 12= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEVX('N','I', ... )
+*> 13= | A - U S U' | / ( |A| n ulp ) SSTEVX('V','V', ... )
+*> 14= | I - U U' | / ( n ulp ) SSTEVX('V','V', ... )
+*> 15= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEVX('N','V', ... )
+*> 16= | A - U S U' | / ( |A| n ulp ) SSTEVD('V', ... )
+*> 17= | I - U U' | / ( n ulp ) SSTEVD('V', ... )
+*> 18= |D(with Z) - EVEIGS| / (|D| ulp) SSTEVD('N', ... )
+*> 19= | A - U S U' | / ( |A| n ulp ) SSTEVR('V','I', ... )
+*> 20= | I - U U' | / ( n ulp ) SSTEVR('V','I', ... )
+*> 21= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEVR('N','I', ... )
+*> 22= | A - U S U' | / ( |A| n ulp ) SSTEVR('V','V', ... )
+*> 23= | I - U U' | / ( n ulp ) SSTEVR('V','V', ... )
+*> 24= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEVR('N','V', ... )
+*> \endverbatim
+*> \verbatim
+*> 25= | A - U S U' | / ( |A| n ulp ) SSYEV('L','V', ... )
+*> 26= | I - U U' | / ( n ulp ) SSYEV('L','V', ... )
+*> 27= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEV('L','N', ... )
+*> 28= | A - U S U' | / ( |A| n ulp ) SSYEVX('L','V','A', ... )
+*> 29= | I - U U' | / ( n ulp ) SSYEVX('L','V','A', ... )
+*> 30= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVX('L','N','A', ... )
+*> 31= | A - U S U' | / ( |A| n ulp ) SSYEVX('L','V','I', ... )
+*> 32= | I - U U' | / ( n ulp ) SSYEVX('L','V','I', ... )
+*> 33= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVX('L','N','I', ... )
+*> 34= | A - U S U' | / ( |A| n ulp ) SSYEVX('L','V','V', ... )
+*> 35= | I - U U' | / ( n ulp ) SSYEVX('L','V','V', ... )
+*> 36= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVX('L','N','V', ... )
+*> 37= | A - U S U' | / ( |A| n ulp ) SSPEV('L','V', ... )
+*> 38= | I - U U' | / ( n ulp ) SSPEV('L','V', ... )
+*> 39= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEV('L','N', ... )
+*> 40= | A - U S U' | / ( |A| n ulp ) SSPEVX('L','V','A', ... )
+*> 41= | I - U U' | / ( n ulp ) SSPEVX('L','V','A', ... )
+*> 42= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVX('L','N','A', ... )
+*> 43= | A - U S U' | / ( |A| n ulp ) SSPEVX('L','V','I', ... )
+*> 44= | I - U U' | / ( n ulp ) SSPEVX('L','V','I', ... )
+*> 45= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVX('L','N','I', ... )
+*> 46= | A - U S U' | / ( |A| n ulp ) SSPEVX('L','V','V', ... )
+*> 47= | I - U U' | / ( n ulp ) SSPEVX('L','V','V', ... )
+*> 48= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVX('L','N','V', ... )
+*> 49= | A - U S U' | / ( |A| n ulp ) SSBEV('L','V', ... )
+*> 50= | I - U U' | / ( n ulp ) SSBEV('L','V', ... )
+*> 51= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEV('L','N', ... )
+*> 52= | A - U S U' | / ( |A| n ulp ) SSBEVX('L','V','A', ... )
+*> 53= | I - U U' | / ( n ulp ) SSBEVX('L','V','A', ... )
+*> 54= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVX('L','N','A', ... )
+*> 55= | A - U S U' | / ( |A| n ulp ) SSBEVX('L','V','I', ... )
+*> 56= | I - U U' | / ( n ulp ) SSBEVX('L','V','I', ... )
+*> 57= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVX('L','N','I', ... )
+*> 58= | A - U S U' | / ( |A| n ulp ) SSBEVX('L','V','V', ... )
+*> 59= | I - U U' | / ( n ulp ) SSBEVX('L','V','V', ... )
+*> 60= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVX('L','N','V', ... )
+*> 61= | A - U S U' | / ( |A| n ulp ) SSYEVD('L','V', ... )
+*> 62= | I - U U' | / ( n ulp ) SSYEVD('L','V', ... )
+*> 63= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVD('L','N', ... )
+*> 64= | A - U S U' | / ( |A| n ulp ) SSPEVD('L','V', ... )
+*> 65= | I - U U' | / ( n ulp ) SSPEVD('L','V', ... )
+*> 66= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVD('L','N', ... )
+*> 67= | A - U S U' | / ( |A| n ulp ) SSBEVD('L','V', ... )
+*> 68= | I - U U' | / ( n ulp ) SSBEVD('L','V', ... )
+*> 69= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVD('L','N', ... )
+*> 70= | A - U S U' | / ( |A| n ulp ) SSYEVR('L','V','A', ... )
+*> 71= | I - U U' | / ( n ulp ) SSYEVR('L','V','A', ... )
+*> 72= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVR('L','N','A', ... )
+*> 73= | A - U S U' | / ( |A| n ulp ) SSYEVR('L','V','I', ... )
+*> 74= | I - U U' | / ( n ulp ) SSYEVR('L','V','I', ... )
+*> 75= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVR('L','N','I', ... )
+*> 76= | A - U S U' | / ( |A| n ulp ) SSYEVR('L','V','V', ... )
+*> 77= | I - U U' | / ( n ulp ) SSYEVR('L','V','V', ... )
+*> 78= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVR('L','N','V', ... )
+*> \endverbatim
+*> \verbatim
+*> Tests 25 through 78 are repeated (as tests 79 through 132)
+*> with UPLO='U'
+*> \endverbatim
+*> \verbatim
+*> To be added in 1999
+*> \endverbatim
+*> \verbatim
+*> 79= | A - U S U' | / ( |A| n ulp ) SSPEVR('L','V','A', ... )
+*> 80= | I - U U' | / ( n ulp ) SSPEVR('L','V','A', ... )
+*> 81= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVR('L','N','A', ... )
+*> 82= | A - U S U' | / ( |A| n ulp ) SSPEVR('L','V','I', ... )
+*> 83= | I - U U' | / ( n ulp ) SSPEVR('L','V','I', ... )
+*> 84= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVR('L','N','I', ... )
+*> 85= | A - U S U' | / ( |A| n ulp ) SSPEVR('L','V','V', ... )
+*> 86= | I - U U' | / ( n ulp ) SSPEVR('L','V','V', ... )
+*> 87= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVR('L','N','V', ... )
+*> 88= | A - U S U' | / ( |A| n ulp ) SSBEVR('L','V','A', ... )
+*> 89= | I - U U' | / ( n ulp ) SSBEVR('L','V','A', ... )
+*> 90= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVR('L','N','A', ... )
+*> 91= | A - U S U' | / ( |A| n ulp ) SSBEVR('L','V','I', ... )
+*> 92= | I - U U' | / ( n ulp ) SSBEVR('L','V','I', ... )
+*> 93= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVR('L','N','I', ... )
+*> 94= | A - U S U' | / ( |A| n ulp ) SSBEVR('L','V','V', ... )
+*> 95= | I - U U' | / ( n ulp ) SSBEVR('L','V','V', ... )
+*> 96= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVR('L','N','V', ... )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRVST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, D1, D2, D3, D4, EVEIGS, WA1,
$ WA2, WA3, U, LDU, V, TAU, Z, WORK, LWORK,
$ IWORK, LIWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LIWORK, LWORK, NOUNIT, NSIZES,
@@ -21,409 +508,6 @@
$ WA3( * ), WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVST checks the symmetric eigenvalue problem drivers.
-*
-* SSTEV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric tridiagonal matrix.
-*
-* SSTEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric tridiagonal matrix.
-*
-* SSTEVR computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric tridiagonal matrix
-* using the Relatively Robust Representation where it can.
-*
-* SSYEV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix.
-*
-* SSYEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix.
-*
-* SSYEVR computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix
-* using the Relatively Robust Representation where it can.
-*
-* SSPEV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix in packed
-* storage.
-*
-* SSPEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix in packed
-* storage.
-*
-* SSBEV computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric band matrix.
-*
-* SSBEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a real symmetric band matrix.
-*
-* SSYEVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix using
-* a divide and conquer algorithm.
-*
-* SSPEVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric matrix in packed
-* storage, using a divide and conquer algorithm.
-*
-* SSBEVD computes all eigenvalues and, optionally,
-* eigenvectors of a real symmetric band matrix,
-* using a divide and conquer algorithm.
-*
-* When SDRVST is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the appropriate drivers. For each matrix and each
-* driver routine called, the following tests will be performed:
-*
-* (1) | A - Z D Z' | / ( |A| n ulp )
-*
-* (2) | I - Z Z' | / ( n ulp )
-*
-* (3) | D1 - D2 | / ( |D1| ulp )
-*
-* where Z is the matrix of eigenvectors returned when the
-* eigenvector option is given and D1 and D2 are the eigenvalues
-* returned with and without the eigenvector option.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced eigenvalues
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced eigenvalues
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" eigenvalues
-* 1, ULP, ..., ULP and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U' D U, where U is orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U' D U, where U is orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U' D U, where U is orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-* (16) A band matrix with half bandwidth randomly chosen between
-* 0 and N-1, with evenly spaced eigenvalues 1, ..., ULP
-* with random signs.
-* (17) Same as (16), but multiplied by SQRT( overflow threshold )
-* (18) Same as (16), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* SDRVST does nothing. It must be at least zero.
-* Not modified.
-*
-* NN INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES INTEGER
-* The number of elements in DOTYPE. If it is zero, SDRVST
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRVST to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A REAL array, dimension (LDA , max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* D1 REAL array, dimension (max(NN))
-* The eigenvalues of A, as computed by SSTEQR simlutaneously
-* with Z. On exit, the eigenvalues in D1 correspond with the
-* matrix in A.
-* Modified.
-*
-* D2 REAL array, dimension (max(NN))
-* The eigenvalues of A, as computed by SSTEQR if Z is not
-* computed. On exit, the eigenvalues in D2 correspond with
-* the matrix in A.
-* Modified.
-*
-* D3 REAL array, dimension (max(NN))
-* The eigenvalues of A, as computed by SSTERF. On exit, the
-* eigenvalues in D3 correspond with the matrix in A.
-* Modified.
-*
-* D4 REAL array, dimension
-*
-* EVEIGS REAL array, dimension (max(NN))
-* The eigenvalues as computed by SSTEV('N', ... )
-* (I reserve the right to change this to the output of
-* whichever algorithm computes the most accurate eigenvalues).
-*
-* WA1 REAL array, dimension
-*
-* WA2 REAL array, dimension
-*
-* WA3 REAL array, dimension
-*
-* U REAL array, dimension (LDU, max(NN))
-* The orthogonal matrix computed by SSYTRD + SORGTR.
-* Modified.
-*
-* LDU INTEGER
-* The leading dimension of U, Z, and V. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* V REAL array, dimension (LDU, max(NN))
-* The Housholder vectors computed by SSYTRD in reducing A to
-* tridiagonal form.
-* Modified.
-*
-* TAU REAL array, dimension (max(NN))
-* The Householder factors computed by SSYTRD in reducing A
-* to tridiagonal form.
-* Modified.
-*
-* Z REAL array, dimension (LDU, max(NN))
-* The orthogonal matrix of eigenvectors computed by SSTEQR,
-* SPTEQR, and SSTEIN.
-* Modified.
-*
-* WORK REAL array, dimension (LWORK)
-* Workspace.
-* Modified.
-*
-* LWORK INTEGER
-* The number of entries in WORK. This must be at least
-* 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 4 * Nmax**2
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-* Not modified.
-*
-* IWORK INTEGER array,
-* dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-* Workspace.
-* Modified.
-*
-* RESULT REAL array, dimension (105)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-* Modified.
-*
-* INFO INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDU < 1 or LDU < NMAX.
-* -21: LWORK too small.
-* If SLATMR, SLATMS, SSYTRD, SORGTR, SSTEQR, SSTERF,
-* or SORMTR returns an error code, the
-* absolute value of it is returned.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by SLAFTS).
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
-* The tests performed are: Routine tested
-* 1= | A - U S U' | / ( |A| n ulp ) SSTEV('V', ... )
-* 2= | I - U U' | / ( n ulp ) SSTEV('V', ... )
-* 3= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEV('N', ... )
-* 4= | A - U S U' | / ( |A| n ulp ) SSTEVX('V','A', ... )
-* 5= | I - U U' | / ( n ulp ) SSTEVX('V','A', ... )
-* 6= |D(with Z) - EVEIGS| / (|D| ulp) SSTEVX('N','A', ... )
-* 7= | A - U S U' | / ( |A| n ulp ) SSTEVR('V','A', ... )
-* 8= | I - U U' | / ( n ulp ) SSTEVR('V','A', ... )
-* 9= |D(with Z) - EVEIGS| / (|D| ulp) SSTEVR('N','A', ... )
-* 10= | A - U S U' | / ( |A| n ulp ) SSTEVX('V','I', ... )
-* 11= | I - U U' | / ( n ulp ) SSTEVX('V','I', ... )
-* 12= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEVX('N','I', ... )
-* 13= | A - U S U' | / ( |A| n ulp ) SSTEVX('V','V', ... )
-* 14= | I - U U' | / ( n ulp ) SSTEVX('V','V', ... )
-* 15= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEVX('N','V', ... )
-* 16= | A - U S U' | / ( |A| n ulp ) SSTEVD('V', ... )
-* 17= | I - U U' | / ( n ulp ) SSTEVD('V', ... )
-* 18= |D(with Z) - EVEIGS| / (|D| ulp) SSTEVD('N', ... )
-* 19= | A - U S U' | / ( |A| n ulp ) SSTEVR('V','I', ... )
-* 20= | I - U U' | / ( n ulp ) SSTEVR('V','I', ... )
-* 21= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEVR('N','I', ... )
-* 22= | A - U S U' | / ( |A| n ulp ) SSTEVR('V','V', ... )
-* 23= | I - U U' | / ( n ulp ) SSTEVR('V','V', ... )
-* 24= |D(with Z) - D(w/o Z)| / (|D| ulp) SSTEVR('N','V', ... )
-*
-* 25= | A - U S U' | / ( |A| n ulp ) SSYEV('L','V', ... )
-* 26= | I - U U' | / ( n ulp ) SSYEV('L','V', ... )
-* 27= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEV('L','N', ... )
-* 28= | A - U S U' | / ( |A| n ulp ) SSYEVX('L','V','A', ... )
-* 29= | I - U U' | / ( n ulp ) SSYEVX('L','V','A', ... )
-* 30= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVX('L','N','A', ... )
-* 31= | A - U S U' | / ( |A| n ulp ) SSYEVX('L','V','I', ... )
-* 32= | I - U U' | / ( n ulp ) SSYEVX('L','V','I', ... )
-* 33= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVX('L','N','I', ... )
-* 34= | A - U S U' | / ( |A| n ulp ) SSYEVX('L','V','V', ... )
-* 35= | I - U U' | / ( n ulp ) SSYEVX('L','V','V', ... )
-* 36= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVX('L','N','V', ... )
-* 37= | A - U S U' | / ( |A| n ulp ) SSPEV('L','V', ... )
-* 38= | I - U U' | / ( n ulp ) SSPEV('L','V', ... )
-* 39= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEV('L','N', ... )
-* 40= | A - U S U' | / ( |A| n ulp ) SSPEVX('L','V','A', ... )
-* 41= | I - U U' | / ( n ulp ) SSPEVX('L','V','A', ... )
-* 42= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVX('L','N','A', ... )
-* 43= | A - U S U' | / ( |A| n ulp ) SSPEVX('L','V','I', ... )
-* 44= | I - U U' | / ( n ulp ) SSPEVX('L','V','I', ... )
-* 45= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVX('L','N','I', ... )
-* 46= | A - U S U' | / ( |A| n ulp ) SSPEVX('L','V','V', ... )
-* 47= | I - U U' | / ( n ulp ) SSPEVX('L','V','V', ... )
-* 48= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVX('L','N','V', ... )
-* 49= | A - U S U' | / ( |A| n ulp ) SSBEV('L','V', ... )
-* 50= | I - U U' | / ( n ulp ) SSBEV('L','V', ... )
-* 51= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEV('L','N', ... )
-* 52= | A - U S U' | / ( |A| n ulp ) SSBEVX('L','V','A', ... )
-* 53= | I - U U' | / ( n ulp ) SSBEVX('L','V','A', ... )
-* 54= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVX('L','N','A', ... )
-* 55= | A - U S U' | / ( |A| n ulp ) SSBEVX('L','V','I', ... )
-* 56= | I - U U' | / ( n ulp ) SSBEVX('L','V','I', ... )
-* 57= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVX('L','N','I', ... )
-* 58= | A - U S U' | / ( |A| n ulp ) SSBEVX('L','V','V', ... )
-* 59= | I - U U' | / ( n ulp ) SSBEVX('L','V','V', ... )
-* 60= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVX('L','N','V', ... )
-* 61= | A - U S U' | / ( |A| n ulp ) SSYEVD('L','V', ... )
-* 62= | I - U U' | / ( n ulp ) SSYEVD('L','V', ... )
-* 63= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVD('L','N', ... )
-* 64= | A - U S U' | / ( |A| n ulp ) SSPEVD('L','V', ... )
-* 65= | I - U U' | / ( n ulp ) SSPEVD('L','V', ... )
-* 66= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVD('L','N', ... )
-* 67= | A - U S U' | / ( |A| n ulp ) SSBEVD('L','V', ... )
-* 68= | I - U U' | / ( n ulp ) SSBEVD('L','V', ... )
-* 69= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVD('L','N', ... )
-* 70= | A - U S U' | / ( |A| n ulp ) SSYEVR('L','V','A', ... )
-* 71= | I - U U' | / ( n ulp ) SSYEVR('L','V','A', ... )
-* 72= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVR('L','N','A', ... )
-* 73= | A - U S U' | / ( |A| n ulp ) SSYEVR('L','V','I', ... )
-* 74= | I - U U' | / ( n ulp ) SSYEVR('L','V','I', ... )
-* 75= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVR('L','N','I', ... )
-* 76= | A - U S U' | / ( |A| n ulp ) SSYEVR('L','V','V', ... )
-* 77= | I - U U' | / ( n ulp ) SSYEVR('L','V','V', ... )
-* 78= |D(with Z) - D(w/o Z)| / (|D| ulp) SSYEVR('L','N','V', ... )
-*
-* Tests 25 through 78 are repeated (as tests 79 through 132)
-* with UPLO='U'
-*
-* To be added in 1999
-*
-* 79= | A - U S U' | / ( |A| n ulp ) SSPEVR('L','V','A', ... )
-* 80= | I - U U' | / ( n ulp ) SSPEVR('L','V','A', ... )
-* 81= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVR('L','N','A', ... )
-* 82= | A - U S U' | / ( |A| n ulp ) SSPEVR('L','V','I', ... )
-* 83= | I - U U' | / ( n ulp ) SSPEVR('L','V','I', ... )
-* 84= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVR('L','N','I', ... )
-* 85= | A - U S U' | / ( |A| n ulp ) SSPEVR('L','V','V', ... )
-* 86= | I - U U' | / ( n ulp ) SSPEVR('L','V','V', ... )
-* 87= |D(with Z) - D(w/o Z)| / (|D| ulp) SSPEVR('L','N','V', ... )
-* 88= | A - U S U' | / ( |A| n ulp ) SSBEVR('L','V','A', ... )
-* 89= | I - U U' | / ( n ulp ) SSBEVR('L','V','A', ... )
-* 90= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVR('L','N','A', ... )
-* 91= | A - U S U' | / ( |A| n ulp ) SSBEVR('L','V','I', ... )
-* 92= | I - U U' | / ( n ulp ) SSBEVR('L','V','I', ... )
-* 93= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVR('L','N','I', ... )
-* 94= | A - U S U' | / ( |A| n ulp ) SSBEVR('L','V','V', ... )
-* 95= | I - U U' | / ( n ulp ) SSBEVR('L','V','V', ... )
-* 96= |D(with Z) - D(w/o Z)| / (|D| ulp) SSBEVR('L','N','V', ... )
-*
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrvsx.f b/TESTING/EIG/sdrvsx.f
index 8c9a7da2..52db48d0 100644
--- a/TESTING/EIG/sdrvsx.f
+++ b/TESTING/EIG/sdrvsx.f
@@ -1,11 +1,466 @@
+*> \brief \b SDRVSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVSX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NIUNIT, NOUNIT, A, LDA, H, HT, WR, WI, WRT,
+* WIT, WRTMP, WITMP, VS, LDVS, VS1, RESULT, WORK,
+* LWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDVS, LWORK, NIUNIT, NOUNIT, NSIZES,
+* $ NTYPES
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ RESULT( 17 ), VS( LDVS, * ), VS1( LDVS, * ),
+* $ WI( * ), WIT( * ), WITMP( * ), WORK( * ),
+* $ WR( * ), WRT( * ), WRTMP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
+*> expert driver SGEESX.
+*>
+*> SDRVSX uses both test matrices generated randomly depending on
+*> data supplied in the calling sequence, as well as on data
+*> read from an input file and including precomputed condition
+*> numbers to which it compares the ones it computes.
+*>
+*> When SDRVSX is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 15
+*> tests will be performed:
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare WR, WI with and
+*> without reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare T with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare VS with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*> If workspace sufficient, also compare SDIM with and
+*> without reciprocal condition numbers
+*>
+*> (14) if RCONDE the same no matter if VS and/or RCONDV computed
+*>
+*> (15) if RCONDV the same no matter if VS and/or RCONDE computed
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> In addition, an input file will be read from logical unit number
+*> NIUNIT. The file contains matrices along with precomputed
+*> eigenvalues and reciprocal condition numbers for the eigenvalue
+*> average and right invariant subspace. For these matrices, in
+*> addition to tests (1) to (15) we will compute the following two
+*> tests:
+*>
+*> (16) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal average eigenvalue condition number
+*> computed by SGEESX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*> (17) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right invariant subspace condition
+*> number computed by SGEESX and RCDVIN (the precomputed true
+*> value) is supplied as input. cond(RCONDV) is the condition
+*> number of RCONDV, and takes errors in computing RCONDV into
+*> account, so that the resulting quantity should be O(ULP).
+*> cond(RCONDV) is essentially given by norm(A)/RCONDE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. NSIZES must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIUNIT will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. NTYPES must be at least
+*> zero. If it is zero, no randomly generated test matrices
+*> are tested, but and test matrices read from NIUNIT will be
+*> tested. If it is MAXTYP+1 and NSIZES is 1, then an
+*> additional type, MAXTYP+1 is defined, which is to use
+*> whatever matrix is in A. This is only useful if
+*> DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRVSX to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIUNIT
+*> \verbatim
+*> NIUNIT is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is REAL array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by SGEESX.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is REAL array, dimension (LDA, max(NN))
+*> Yet another copy of the test matrix A, modified by SGEESX.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WRT
+*> \verbatim
+*> WRT is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WIT
+*> \verbatim
+*> WIT is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when SGEESX only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] WRTMP
+*> \verbatim
+*> WRTMP is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WITMP
+*> \verbatim
+*> WITMP is REAL array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> More temporary storage for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is REAL array, dimension (LDVS, max(NN))
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] VS1
+*> \verbatim
+*> VS1 is REAL array, dimension (LDVS, max(NN))
+*> VS1 holds another copy of the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (17)
+*> The values computed by the 17 tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(3*NN(j),2*NN(j)**2) for all j.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN)*max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> <0, input parameter -INFO is incorrect
+*> >0, SLATMR, SLATMS, SLATME or SGET24 returned an error
+*> code and INFO is its absolute value
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRVSX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NIUNIT, NOUNIT, A, LDA, H, HT, WR, WI, WRT,
$ WIT, WRTMP, WITMP, VS, LDVS, VS1, RESULT, WORK,
$ LWORK, IWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDVS, LWORK, NIUNIT, NOUNIT, NSIZES,
@@ -21,322 +476,6 @@
$ WR( * ), WRT( * ), WRTMP( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
-* expert driver SGEESX.
-*
-* SDRVSX uses both test matrices generated randomly depending on
-* data supplied in the calling sequence, as well as on data
-* read from an input file and including precomputed condition
-* numbers to which it compares the ones it computes.
-*
-* When SDRVSX is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 15
-* tests will be performed:
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* If workspace sufficient, also compare WR, WI with and
-* without reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare T with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare VS with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-* If workspace sufficient, also compare SDIM with and
-* without reciprocal condition numbers
-*
-* (14) if RCONDE the same no matter if VS and/or RCONDV computed
-*
-* (15) if RCONDV the same no matter if VS and/or RCONDE computed
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* In addition, an input file will be read from logical unit number
-* NIUNIT. The file contains matrices along with precomputed
-* eigenvalues and reciprocal condition numbers for the eigenvalue
-* average and right invariant subspace. For these matrices, in
-* addition to tests (1) to (15) we will compute the following two
-* tests:
-*
-* (16) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal average eigenvalue condition number
-* computed by SGEESX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* (17) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right invariant subspace condition
-* number computed by SGEESX and RCDVIN (the precomputed true
-* value) is supplied as input. cond(RCONDV) is the condition
-* number of RCONDV, and takes errors in computing RCONDV into
-* account, so that the resulting quantity should be O(ULP).
-* cond(RCONDV) is essentially given by norm(A)/RCONDE.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. NSIZES must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIUNIT will be
-* tested.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. NTYPES must be at least
-* zero. If it is zero, no randomly generated test matrices
-* are tested, but and test matrices read from NIUNIT will be
-* tested. If it is MAXTYP+1 and NSIZES is 1, then an
-* additional type, MAXTYP+1 is defined, which is to use
-* whatever matrix is in A. This is only useful if
-* DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRVSX to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIUNIT (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) REAL array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max( NN ).
-*
-* H (workspace) REAL array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by SGEESX.
-*
-* HT (workspace) REAL array, dimension (LDA, max(NN))
-* Yet another copy of the test matrix A, modified by SGEESX.
-*
-* WR (workspace) REAL array, dimension (max(NN))
-* WI (workspace) REAL array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WRT (workspace) REAL array, dimension (max(NN))
-* WIT (workspace) REAL array, dimension (max(NN))
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when SGEESX only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* WRTMP (workspace) REAL array, dimension (max(NN))
-* WITMP (workspace) REAL array, dimension (max(NN))
-* More temporary storage for eigenvalues.
-*
-* VS (workspace) REAL array, dimension (LDVS, max(NN))
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1,max(NN)).
-*
-* VS1 (workspace) REAL array, dimension (LDVS, max(NN))
-* VS1 holds another copy of the computed Schur vectors.
-*
-* RESULT (output) REAL array, dimension (17)
-* The values computed by the 17 tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(3*NN(j),2*NN(j)**2) for all j.
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN)*max(NN))
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* <0, input parameter -INFO is incorrect
-* >0, SLATMR, SLATMS, SLATME or SGET24 returned an error
-* code and INFO is its absolute value
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sdrvvx.f b/TESTING/EIG/sdrvvx.f
index 15e923bd..0a54ebe9 100644
--- a/TESTING/EIG/sdrvvx.f
+++ b/TESTING/EIG/sdrvvx.f
@@ -1,3 +1,515 @@
+*> \brief \b SDRVVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVVX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NIUNIT, NOUNIT, A, LDA, H, WR, WI, WR1, WI1,
+* VL, LDVL, VR, LDVR, LRE, LDLRE, RCONDV, RCNDV1,
+* RCDVIN, RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1,
+* RESULT, WORK, NWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
+* $ NSIZES, NTYPES, NWORK
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* REAL A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
+* $ RCNDV1( * ), RCONDE( * ), RCONDV( * ),
+* $ RESULT( 11 ), SCALE( * ), SCALE1( * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), WI( * ),
+* $ WI1( * ), WORK( * ), WR( * ), WR1( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVVX checks the nonsymmetric eigenvalue problem expert driver
+*> SGEEVX.
+*>
+*> SDRVVX uses both test matrices generated randomly depending on
+*> data supplied in the calling sequence, as well as on data
+*> read from an input file and including precomputed condition
+*> numbers to which it compares the ones it computes.
+*>
+*> When SDRVVX is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified in the calling sequence.
+*> For each size ("n") and each type of matrix, one matrix will be
+*> generated and used to test the nonsymmetric eigenroutines. For
+*> each matrix, 9 tests will be performed:
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a block diagonal matrix, with a 1x1 block for each
+*> real eigenvalue and a 2x2 block for each complex conjugate
+*> pair. If eigenvalues j and j+1 are a complex conjugate pair,
+*> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
+*> 2 x 2 block corresponding to the pair will be:
+*>
+*> ( wr wi )
+*> ( -wi wr )
+*>
+*> Such a block multiplying an n x 2 matrix ( ur ui ) on the
+*> right will be the same as multiplying ur + i*ui by wr + i*wi.
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) W(full) = W(partial)
+*>
+*> W(full) denotes the eigenvalues computed when VR, VL, RCONDV
+*> and RCONDE are also computed, and W(partial) denotes the
+*> eigenvalues computed when only some of VR, VL, RCONDV, and
+*> RCONDE are computed.
+*>
+*> (6) VR(full) = VR(partial)
+*>
+*> VR(full) denotes the right eigenvectors computed when VL, RCONDV
+*> and RCONDE are computed, and VR(partial) denotes the result
+*> when only some of VL and RCONDV are computed.
+*>
+*> (7) VL(full) = VL(partial)
+*>
+*> VL(full) denotes the left eigenvectors computed when VR, RCONDV
+*> and RCONDE are computed, and VL(partial) denotes the result
+*> when only some of VR and RCONDV are computed.
+*>
+*> (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
+*> SCALE, ILO, IHI, ABNRM (partial)
+*> 1/ulp otherwise
+*>
+*> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
+*> (full) is when VR, VL, RCONDE and RCONDV are also computed, and
+*> (partial) is when some are not computed.
+*>
+*> (9) RCONDV(full) = RCONDV(partial)
+*>
+*> RCONDV(full) denotes the reciprocal condition numbers of the
+*> right eigenvectors computed when VR, VL and RCONDE are also
+*> computed. RCONDV(partial) denotes the reciprocal condition
+*> numbers when only some of VR, VL and RCONDE are computed.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is orthogonal and
+*> T has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is orthogonal and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is orthogonal and
+*> T has real or complex conjugate paired eigenvalues randomly
+*> chosen from ( ULP, 1 ) and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random signs on the diagonal and random
+*> O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random signs on the diagonal and random O(1) entries
+*> in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has real or complex conjugate paired
+*> eigenvalues randomly chosen from ( ULP, 1 ) and random
+*> O(1) entries in the upper triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> In addition, an input file will be read from logical unit number
+*> NIUNIT. The file contains matrices along with precomputed
+*> eigenvalues and reciprocal condition numbers for the eigenvalues
+*> and right eigenvectors. For these matrices, in addition to tests
+*> (1) to (9) we will compute the following two tests:
+*>
+*> (10) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right eigenvector condition number
+*> computed by SGEEVX and RCDVIN (the precomputed true value)
+*> is supplied as input. cond(RCONDV) is the condition number of
+*> RCONDV, and takes errors in computing RCONDV into account, so
+*> that the resulting quantity should be O(ULP). cond(RCONDV) is
+*> essentially given by norm(A)/RCONDE.
+*>
+*> (11) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal eigenvalue condition number
+*> computed by SGEEVX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. NSIZES must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIUNIT will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. NTYPES must be at least
+*> zero. If it is zero, no randomly generated test matrices
+*> are tested, but and test matrices read from NIUNIT will be
+*> tested. If it is MAXTYP+1 and NSIZES is 1, then an
+*> additional type, MAXTYP+1 is defined, which is to use
+*> whatever matrix is in A. This is only useful if
+*> DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SDRVVX to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIUNIT
+*> \verbatim
+*> NIUNIT is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (LDA, max(NN,12))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and H.
+*> LDA >= max(NN,12), since 12 is the dimension of the largest
+*> matrix in the precomputed input file.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is REAL array, dimension
+*> (LDA, max(NN,12))
+*> Another copy of the test matrix A, modified by SGEEVX.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (max(NN))
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WR1
+*> \verbatim
+*> WR1 is REAL array, dimension (max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] WI1
+*> \verbatim
+*> WI1 is REAL array, dimension (max(NN,12))
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when SGEEVX only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension
+*> (LDVL, max(NN,12))
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,max(NN,12)).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension
+*> (LDVR, max(NN,12))
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,max(NN,12)).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is REAL array, dimension
+*> (LDLRE, max(NN,12))
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension (N)
+*> RCONDV holds the computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] RCNDV1
+*> \verbatim
+*> RCNDV1 is REAL array, dimension (N)
+*> RCNDV1 holds more computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] RCDVIN
+*> \verbatim
+*> RCDVIN is REAL array, dimension (N)
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition numbers for eigenvectors to be compared with
+*> RCONDV.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension (N)
+*> RCONDE holds the computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] RCNDE1
+*> \verbatim
+*> RCNDE1 is REAL array, dimension (N)
+*> RCNDE1 holds more computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] RCDEIN
+*> \verbatim
+*> RCDEIN is REAL array, dimension (N)
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition numbers for eigenvalues to be compared with
+*> RCONDE.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (11)
+*> The values computed by the seven tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) =
+*> max( 360 ,6*NN(j)+2*NN(j)**2) for all j.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then successful exit.
+*> If <0, then input paramter -INFO is incorrect.
+*> If >0, SLATMR, SLATMS, SLATME or SGET23 returned an error
+*> code, and INFO is its absolute value.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN or 12.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SDRVVX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NIUNIT, NOUNIT, A, LDA, H, WR, WI, WR1, WI1,
$ VL, LDVL, VR, LDVR, LRE, LDLRE, RCONDV, RCNDV1,
@@ -5,8 +517,9 @@
$ RESULT, WORK, NWORK, IWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
@@ -24,362 +537,6 @@
$ WI1( * ), WORK( * ), WR( * ), WR1( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVVX checks the nonsymmetric eigenvalue problem expert driver
-* SGEEVX.
-*
-* SDRVVX uses both test matrices generated randomly depending on
-* data supplied in the calling sequence, as well as on data
-* read from an input file and including precomputed condition
-* numbers to which it compares the ones it computes.
-*
-* When SDRVVX is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified in the calling sequence.
-* For each size ("n") and each type of matrix, one matrix will be
-* generated and used to test the nonsymmetric eigenroutines. For
-* each matrix, 9 tests will be performed:
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a block diagonal matrix, with a 1x1 block for each
-* real eigenvalue and a 2x2 block for each complex conjugate
-* pair. If eigenvalues j and j+1 are a complex conjugate pair,
-* so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
-* 2 x 2 block corresponding to the pair will be:
-*
-* ( wr wi )
-* ( -wi wr )
-*
-* Such a block multiplying an n x 2 matrix ( ur ui ) on the
-* right will be the same as multiplying ur + i*ui by wr + i*wi.
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) W(full) = W(partial)
-*
-* W(full) denotes the eigenvalues computed when VR, VL, RCONDV
-* and RCONDE are also computed, and W(partial) denotes the
-* eigenvalues computed when only some of VR, VL, RCONDV, and
-* RCONDE are computed.
-*
-* (6) VR(full) = VR(partial)
-*
-* VR(full) denotes the right eigenvectors computed when VL, RCONDV
-* and RCONDE are computed, and VR(partial) denotes the result
-* when only some of VL and RCONDV are computed.
-*
-* (7) VL(full) = VL(partial)
-*
-* VL(full) denotes the left eigenvectors computed when VR, RCONDV
-* and RCONDE are computed, and VL(partial) denotes the result
-* when only some of VR and RCONDV are computed.
-*
-* (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
-* SCALE, ILO, IHI, ABNRM (partial)
-* 1/ulp otherwise
-*
-* SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
-* (full) is when VR, VL, RCONDE and RCONDV are also computed, and
-* (partial) is when some are not computed.
-*
-* (9) RCONDV(full) = RCONDV(partial)
-*
-* RCONDV(full) denotes the reciprocal condition numbers of the
-* right eigenvectors computed when VR, VL and RCONDE are also
-* computed. RCONDV(partial) denotes the reciprocal condition
-* numbers when only some of VR, VL and RCONDE are computed.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is orthogonal and
-* T has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is orthogonal and
-* T has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (12) A matrix of the form U' T U, where U is orthogonal and
-* T has real or complex conjugate paired eigenvalues randomly
-* chosen from ( ULP, 1 ) and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random signs on the diagonal and random
-* O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random signs on the diagonal and random O(1) entries
-* in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has real or complex conjugate paired
-* eigenvalues randomly chosen from ( ULP, 1 ) and random
-* O(1) entries in the upper triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* In addition, an input file will be read from logical unit number
-* NIUNIT. The file contains matrices along with precomputed
-* eigenvalues and reciprocal condition numbers for the eigenvalues
-* and right eigenvectors. For these matrices, in addition to tests
-* (1) to (9) we will compute the following two tests:
-*
-* (10) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right eigenvector condition number
-* computed by SGEEVX and RCDVIN (the precomputed true value)
-* is supplied as input. cond(RCONDV) is the condition number of
-* RCONDV, and takes errors in computing RCONDV into account, so
-* that the resulting quantity should be O(ULP). cond(RCONDV) is
-* essentially given by norm(A)/RCONDE.
-*
-* (11) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal eigenvalue condition number
-* computed by SGEEVX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. NSIZES must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIUNIT will be
-* tested.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. NTYPES must be at least
-* zero. If it is zero, no randomly generated test matrices
-* are tested, but and test matrices read from NIUNIT will be
-* tested. If it is MAXTYP+1 and NSIZES is 1, then an
-* additional type, MAXTYP+1 is defined, which is to use
-* whatever matrix is in A. This is only useful if
-* DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SDRVVX to continue the same random number
-* sequence.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIUNIT (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) REAL array, dimension
-* (LDA, max(NN,12))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and H.
-* LDA >= max(NN,12), since 12 is the dimension of the largest
-* matrix in the precomputed input file.
-*
-* H (workspace) REAL array, dimension
-* (LDA, max(NN,12))
-* Another copy of the test matrix A, modified by SGEEVX.
-*
-* WR (workspace) REAL array, dimension (max(NN))
-* WI (workspace) REAL array, dimension (max(NN))
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WR1 (workspace) REAL array, dimension (max(NN,12))
-* WI1 (workspace) REAL array, dimension (max(NN,12))
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when SGEEVX only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) REAL array, dimension
-* (LDVL, max(NN,12))
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,max(NN,12)).
-*
-* VR (workspace) REAL array, dimension
-* (LDVR, max(NN,12))
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,max(NN,12)).
-*
-* LRE (workspace) REAL array, dimension
-* (LDLRE, max(NN,12))
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,max(NN,12))
-*
-* RCONDV (workspace) REAL array, dimension (N)
-* RCONDV holds the computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCNDV1 (workspace) REAL array, dimension (N)
-* RCNDV1 holds more computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCDVIN (workspace) REAL array, dimension (N)
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition numbers for eigenvectors to be compared with
-* RCONDV.
-*
-* RCONDE (workspace) REAL array, dimension (N)
-* RCONDE holds the computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCNDE1 (workspace) REAL array, dimension (N)
-* RCNDE1 holds more computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCDEIN (workspace) REAL array, dimension (N)
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition numbers for eigenvalues to be compared with
-* RCONDE.
-*
-* RESULT (output) REAL array, dimension (11)
-* The values computed by the seven tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) REAL array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) =
-* max( 360 ,6*NN(j)+2*NN(j)**2) for all j.
-*
-* IWORK (workspace) INTEGER array, dimension (2*max(NN,12))
-*
-* INFO (output) INTEGER
-* If 0, then successful exit.
-* If <0, then input paramter -INFO is incorrect.
-* If >0, SLATMR, SLATMS, SLATME or SGET23 returned an error
-* code, and INFO is its absolute value.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN or 12.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/serrbd.f b/TESTING/EIG/serrbd.f
index 0e67440d..3ce15374 100644
--- a/TESTING/EIG/serrbd.f
+++ b/TESTING/EIG/serrbd.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRBD( PATH, NUNIT )
+*> \brief \b SERRBD
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRBD( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRBD tests the error exits for SGEBRD, SORGBR, SORMBR, SBDSQR and
-* SBDSDC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRBD tests the error exits for SGEBRD, SORGBR, SORMBR, SBDSQR and
+*> SBDSDC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SERRBD( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/serrec.f b/TESTING/EIG/serrec.f
index 78f6324e..539b417d 100644
--- a/TESTING/EIG/serrec.f
+++ b/TESTING/EIG/serrec.f
@@ -1,29 +1,72 @@
- SUBROUTINE SERREC( PATH, NUNIT )
+*> \brief \b SERREC
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SERREC( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERREC tests the error exits for the routines for eigen- condition
-* estimation for REAL matrices:
-* STRSYL, STREXC, STRSNA and STRSEN.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERREC tests the error exits for the routines for eigen- condition
+*> estimation for REAL matrices:
+*> STRSYL, STREXC, STRSNA and STRSEN.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SERREC( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/serred.f b/TESTING/EIG/serred.f
index 4d01c76a..6566a307 100644
--- a/TESTING/EIG/serred.f
+++ b/TESTING/EIG/serred.f
@@ -1,38 +1,81 @@
- SUBROUTINE SERRED( PATH, NUNIT )
+*> \brief \b SERRED
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SERRED( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRED tests the error exits for the eigenvalue driver routines for
-* REAL matrices:
-*
-* PATH driver description
-* ---- ------ -----------
-* SEV SGEEV find eigenvalues/eigenvectors for nonsymmetric A
-* SES SGEES find eigenvalues/Schur form for nonsymmetric A
-* SVX SGEEVX SGEEV + balancing and condition estimation
-* SSX SGEESX SGEES + balancing and condition estimation
-* SBD SGESVD compute SVD of an M-by-N matrix A
-* SGESDD compute SVD of an M-by-N matrix A (by divide and
-* conquer)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRED tests the error exits for the eigenvalue driver routines for
+*> REAL matrices:
+*>
+*> PATH driver description
+*> ---- ------ -----------
+*> SEV SGEEV find eigenvalues/eigenvectors for nonsymmetric A
+*> SES SGEES find eigenvalues/Schur form for nonsymmetric A
+*> SVX SGEEVX SGEEV + balancing and condition estimation
+*> SSX SGEESX SGEES + balancing and condition estimation
+*> SBD SGESVD compute SVD of an M-by-N matrix A
+*> SGESDD compute SVD of an M-by-N matrix A (by divide and
+*> conquer)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SERRED( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/serrgg.f b/TESTING/EIG/serrgg.f
index c6d50f21..2cf52907 100644
--- a/TESTING/EIG/serrgg.f
+++ b/TESTING/EIG/serrgg.f
@@ -1,29 +1,72 @@
- SUBROUTINE SERRGG( PATH, NUNIT )
+*> \brief \b SERRGG
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRGG( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRGG tests the error exits for SGGES, SGGESX, SGGEV, SGGEVX,
-* SGGGLM, SGGHRD, SGGLSE, SGGQRF, SGGRQF, SGGSVD, SGGSVP, SHGEQZ,
-* STGEVC, STGEXC, STGSEN, STGSJA, STGSNA, and STGSYL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRGG tests the error exits for SGGES, SGGESX, SGGEV, SGGEVX,
+*> SGGGLM, SGGHRD, SGGLSE, SGGQRF, SGGRQF, SGGSVD, SGGSVP, SHGEQZ,
+*> STGEVC, STGEXC, STGSEN, STGSJA, STGSNA, and STGSYL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SERRGG( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/serrhs.f b/TESTING/EIG/serrhs.f
index fc335494..677104a0 100644
--- a/TESTING/EIG/serrhs.f
+++ b/TESTING/EIG/serrhs.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRHS( PATH, NUNIT )
+*> \brief \b SERRHS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRHS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRHS tests the error exits for SGEBAK, SGEBAL, SGEHRD, SORGHR,
-* SORMHR, SHSEQR, SHSEIN, and STREVC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRHS tests the error exits for SGEBAK, SGEBAL, SGEHRD, SORGHR,
+*> SORMHR, SHSEQR, SHSEIN, and STREVC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SERRHS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/serrst.f b/TESTING/EIG/serrst.f
index 7db1cf1c..145a2c7e 100644
--- a/TESTING/EIG/serrst.f
+++ b/TESTING/EIG/serrst.f
@@ -1,30 +1,73 @@
- SUBROUTINE SERRST( PATH, NUNIT )
+*> \brief \b SERRST
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRST( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRST tests the error exits for SSYTRD, SORGTR, SORMTR, SSPTRD,
-* SOPGTR, SOPMTR, SSTEQR, SSTERF, SSTEBZ, SSTEIN, SPTEQR, SSBTRD,
-* SSYEV, SSYEVX, SSYEVD, SSBEV, SSBEVX, SSBEVD,
-* SSPEV, SSPEVX, SSPEVD, SSTEV, SSTEVX, SSTEVD, and SSTEDC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRST tests the error exits for SSYTRD, SORGTR, SORMTR, SSPTRD,
+*> SOPGTR, SOPMTR, SSTEQR, SSTERF, SSTEBZ, SSTEIN, SPTEQR, SSBTRD,
+*> SSYEV, SSYEVX, SSYEVD, SSBEV, SSBEVX, SSBEVD,
+*> SSPEV, SSPEVX, SSPEVD, SSTEV, SSTEVX, SSTEVD, and SSTEDC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_eig
+*
+* =====================================================================
+ SUBROUTINE SERRST( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget02.f b/TESTING/EIG/sget02.f
index 962173d3..2dc6ab26 100644
--- a/TESTING/EIG/sget02.f
+++ b/TESTING/EIG/sget02.f
@@ -1,9 +1,144 @@
+*> \brief \b SGET02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET02 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGET02 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sget10.f b/TESTING/EIG/sget10.f
index dd672ac8..5925e481 100644
--- a/TESTING/EIG/sget10.f
+++ b/TESTING/EIG/sget10.f
@@ -1,48 +1,112 @@
- SUBROUTINE SGET10( M, N, A, LDA, B, LDB, WORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, M, N
- REAL RESULT
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
-*
+*> \brief \b SGET10
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET10( M, N, A, LDA, B, LDB, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, M, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGET10 compares two matrices A and B and computes the ratio
-* RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET10 compares two matrices A and B and computes the ratio
+*> RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and B.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> The m by n matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The m by n matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \date November 2011
*
-* B (input) REAL array, dimension (LDB,N)
-* The m by n matrix B.
+*> \ingroup single_eig
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+* =====================================================================
+ SUBROUTINE SGET10( M, N, A, LDA, B, LDB, WORK, RESULT )
*
-* WORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL
-* RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, M, N
+ REAL RESULT
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget22.f b/TESTING/EIG/sget22.f
index 6143cd05..96359a13 100644
--- a/TESTING/EIG/sget22.f
+++ b/TESTING/EIG/sget22.f
@@ -1,107 +1,188 @@
- SUBROUTINE SGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
- $ WI, WORK, RESULT )
+*> \brief \b SGET22
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER TRANSA, TRANSE, TRANSW
- INTEGER LDA, LDE, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), E( LDE, * ), RESULT( 2 ), WI( * ),
- $ WORK( * ), WR( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
+* WI, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSA, TRANSE, TRANSW
+* INTEGER LDA, LDE, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), E( LDE, * ), RESULT( 2 ), WI( * ),
+* $ WORK( * ), WR( * )
+* ..
+*
* Purpose
* =======
*
-* SGET22 does an eigenvector check.
-*
-* The basic test is:
-*
-* RESULT(1) = | A E - E W | / ( |A| |E| ulp )
-*
-* using the 1-norm. It also tests the normalization of E:
-*
-* RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
-* j
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET22 does an eigenvector check.
+*>
+*> The basic test is:
+*>
+*> RESULT(1) = | A E - E W | / ( |A| |E| ulp )
+*>
+*> using the 1-norm. It also tests the normalization of E:
+*>
+*> RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
+*> j
+*>
+*> where E(j) is the j-th eigenvector, and m-norm is the max-norm of a
+*> vector. If an eigenvector is complex, as determined from WI(j)
+*> nonzero, then the max-norm of the vector ( er + i*ei ) is the maximum
+*> of
+*> |er(1)| + |ei(1)|, ... , |er(n)| + |ei(n)|
+*>
+*> W is a block diagonal matrix, with a 1 by 1 block for each real
+*> eigenvalue and a 2 by 2 block for each complex conjugate pair.
+*> If eigenvalues j and j+1 are a complex conjugate pair, so that
+*> WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the 2 by 2
+*> block corresponding to the pair will be:
+*>
+*> ( wr wi )
+*> ( -wi wr )
+*>
+*> Such a block multiplying an n by 2 matrix ( ur ui ) on the right
+*> will be the same as multiplying ur + i*ui by wr + i*wi.
+*>
+*> To handle various schemes for storage of left eigenvectors, there are
+*> options to use A-transpose instead of A, E-transpose instead of E,
+*> and/or W-transpose instead of W.
+*>
+*>\endverbatim
*
-* where E(j) is the j-th eigenvector, and m-norm is the max-norm of a
-* vector. If an eigenvector is complex, as determined from WI(j)
-* nonzero, then the max-norm of the vector ( er + i*ei ) is the maximum
-* of
-* |er(1)| + |ei(1)|, ... , |er(n)| + |ei(n)|
+* Arguments
+* =========
+*
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> Specifies whether or not A is transposed.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= Transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANSE
+*> \verbatim
+*> TRANSE is CHARACTER*1
+*> Specifies whether or not E is transposed.
+*> = 'N': No transpose, eigenvectors are in columns of E
+*> = 'T': Transpose, eigenvectors are in rows of E
+*> = 'C': Conjugate transpose (= Transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANSW
+*> \verbatim
+*> TRANSW is CHARACTER*1
+*> Specifies whether or not W is transposed.
+*> = 'N': No transpose
+*> = 'T': Transpose, use -WI(j) instead of WI(j)
+*> = 'C': Conjugate transpose, use -WI(j) instead of WI(j)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The matrix whose eigenvectors are in E.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (LDE,N)
+*> The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors
+*> are stored in the columns of E, if TRANSE = 'T' or 'C', the
+*> eigenvectors are stored in the rows of E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the array E. LDE >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[in] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> Purely real eigenvalues are indicated by WI(j) = 0.
+*> Complex conjugate pairs are indicated by WR(j)=WR(j+1) and
+*> WI(j) = - WI(j+1) non-zero; the real part is assumed to be
+*> stored in the j-th row/column and the imaginary part in
+*> the (j+1)-th row/column.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N*(N+1))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> RESULT(1) = | A E - E W | / ( |A| |E| ulp )
+*> RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* W is a block diagonal matrix, with a 1 by 1 block for each real
-* eigenvalue and a 2 by 2 block for each complex conjugate pair.
-* If eigenvalues j and j+1 are a complex conjugate pair, so that
-* WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the 2 by 2
-* block corresponding to the pair will be:
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ( wr wi )
-* ( -wi wr )
+*> \date November 2011
*
-* Such a block multiplying an n by 2 matrix ( ur ui ) on the right
-* will be the same as multiplying ur + i*ui by wr + i*wi.
+*> \ingroup single_eig
*
-* To handle various schemes for storage of left eigenvectors, there are
-* options to use A-transpose instead of A, E-transpose instead of E,
-* and/or W-transpose instead of W.
+* =====================================================================
+ SUBROUTINE SGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, WR,
+ $ WI, WORK, RESULT )
*
-* Arguments
-* ==========
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* TRANSA (input) CHARACTER*1
-* Specifies whether or not A is transposed.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= Transpose)
-*
-* TRANSE (input) CHARACTER*1
-* Specifies whether or not E is transposed.
-* = 'N': No transpose, eigenvectors are in columns of E
-* = 'T': Transpose, eigenvectors are in rows of E
-* = 'C': Conjugate transpose (= Transpose)
-*
-* TRANSW (input) CHARACTER*1
-* Specifies whether or not W is transposed.
-* = 'N': No transpose
-* = 'T': Transpose, use -WI(j) instead of WI(j)
-* = 'C': Conjugate transpose, use -WI(j) instead of WI(j)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The matrix whose eigenvectors are in E.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* E (input) REAL array, dimension (LDE,N)
-* The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors
-* are stored in the columns of E, if TRANSE = 'T' or 'C', the
-* eigenvectors are stored in the rows of E.
-*
-* LDE (input) INTEGER
-* The leading dimension of the array E. LDE >= max(1,N).
-*
-* WR (input) REAL array, dimension (N)
-* WI (input) REAL array, dimension (N)
-* The real and imaginary parts of the eigenvalues of A.
-* Purely real eigenvalues are indicated by WI(j) = 0.
-* Complex conjugate pairs are indicated by WR(j)=WR(j+1) and
-* WI(j) = - WI(j+1) non-zero; the real part is assumed to be
-* stored in the j-th row/column and the imaginary part in
-* the (j+1)-th row/column.
-*
-* WORK (workspace) REAL array, dimension (N*(N+1))
-*
-* RESULT (output) REAL array, dimension (2)
-* RESULT(1) = | A E - E W | / ( |A| |E| ulp )
-* RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
+* .. Scalar Arguments ..
+ CHARACTER TRANSA, TRANSE, TRANSW
+ INTEGER LDA, LDE, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), E( LDE, * ), RESULT( 2 ), WI( * ),
+ $ WORK( * ), WR( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget23.f b/TESTING/EIG/sget23.f
index 317061cc..5311eca9 100644
--- a/TESTING/EIG/sget23.f
+++ b/TESTING/EIG/sget23.f
@@ -1,3 +1,381 @@
+*> \brief \b SGET23
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET23( COMP, BALANC, JTYPE, THRESH, ISEED, NOUNIT, N,
+* A, LDA, H, WR, WI, WR1, WI1, VL, LDVL, VR,
+* LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
+* RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1, RESULT,
+* WORK, LWORK, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL COMP
+* CHARACTER BALANC
+* INTEGER INFO, JTYPE, LDA, LDLRE, LDVL, LDVR, LWORK, N,
+* $ NOUNIT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * )
+* REAL A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
+* $ RCNDV1( * ), RCONDE( * ), RCONDV( * ),
+* $ RESULT( 11 ), SCALE( * ), SCALE1( * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), WI( * ),
+* $ WI1( * ), WORK( * ), WR( * ), WR1( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET23 checks the nonsymmetric eigenvalue problem driver SGEEVX.
+*> If COMP = .FALSE., the first 8 of the following tests will be
+*> performed on the input matrix A, and also test 9 if LWORK is
+*> sufficiently large.
+*> if COMP is .TRUE. all 11 tests will be performed.
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a block diagonal matrix, with a 1x1 block for each
+*> real eigenvalue and a 2x2 block for each complex conjugate
+*> pair. If eigenvalues j and j+1 are a complex conjugate pair,
+*> so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
+*> 2 x 2 block corresponding to the pair will be:
+*>
+*> ( wr wi )
+*> ( -wi wr )
+*>
+*> Such a block multiplying an n x 2 matrix ( ur ui ) on the
+*> right will be the same as multiplying ur + i*ui by wr + i*wi.
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) 0 if W(full) = W(partial), 1/ulp otherwise
+*>
+*> W(full) denotes the eigenvalues computed when VR, VL, RCONDV
+*> and RCONDE are also computed, and W(partial) denotes the
+*> eigenvalues computed when only some of VR, VL, RCONDV, and
+*> RCONDE are computed.
+*>
+*> (6) 0 if VR(full) = VR(partial), 1/ulp otherwise
+*>
+*> VR(full) denotes the right eigenvectors computed when VL, RCONDV
+*> and RCONDE are computed, and VR(partial) denotes the result
+*> when only some of VL and RCONDV are computed.
+*>
+*> (7) 0 if VL(full) = VL(partial), 1/ulp otherwise
+*>
+*> VL(full) denotes the left eigenvectors computed when VR, RCONDV
+*> and RCONDE are computed, and VL(partial) denotes the result
+*> when only some of VR and RCONDV are computed.
+*>
+*> (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
+*> SCALE, ILO, IHI, ABNRM (partial)
+*> 1/ulp otherwise
+*>
+*> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
+*> (full) is when VR, VL, RCONDE and RCONDV are also computed, and
+*> (partial) is when some are not computed.
+*>
+*> (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise
+*>
+*> RCONDV(full) denotes the reciprocal condition numbers of the
+*> right eigenvectors computed when VR, VL and RCONDE are also
+*> computed. RCONDV(partial) denotes the reciprocal condition
+*> numbers when only some of VR, VL and RCONDE are computed.
+*>
+*> (10) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right eigenvector condition number
+*> computed by SGEEVX and RCDVIN (the precomputed true value)
+*> is supplied as input. cond(RCONDV) is the condition number of
+*> RCONDV, and takes errors in computing RCONDV into account, so
+*> that the resulting quantity should be O(ULP). cond(RCONDV) is
+*> essentially given by norm(A)/RCONDE.
+*>
+*> (11) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal eigenvalue condition number
+*> computed by SGEEVX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMP
+*> \verbatim
+*> COMP is LOGICAL
+*> COMP describes which input tests to perform:
+*> = .FALSE. if the computed condition numbers are not to
+*> be tested against RCDVIN and RCDEIN
+*> = .TRUE. if they are to be compared
+*> \endverbatim
+*>
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER
+*> Describes the balancing option to be tested.
+*> = 'N' for no permuting or diagonal scaling
+*> = 'P' for permuting but no diagonal scaling
+*> = 'S' for no permuting but diagonal scaling
+*> = 'B' for permuting and diagonal scaling
+*> \endverbatim
+*>
+*> \param[in] JTYPE
+*> \verbatim
+*> JTYPE is INTEGER
+*> Type of input matrix. Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> If COMP = .FALSE., the random number generator seed
+*> used to produce matrix.
+*> If COMP = .TRUE., ISEED(1) = the number of the example.
+*> Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of A. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least N.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is REAL array, dimension (LDA,N)
+*> Another copy of the test matrix A, modified by SGEEVX.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WR1
+*> \verbatim
+*> WR1 is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI1
+*> \verbatim
+*> WI1 is REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when SGEEVX only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is REAL array, dimension (LDVL,N)
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is REAL array, dimension (LDVR,N)
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is REAL array, dimension (LDLRE,N)
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is REAL array, dimension (N)
+*> RCONDV holds the computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] RCNDV1
+*> \verbatim
+*> RCNDV1 is REAL array, dimension (N)
+*> RCNDV1 holds more computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RCDVIN
+*> \verbatim
+*> RCDVIN is REAL array, dimension (N)
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition numbers for eigenvectors to be compared with
+*> RCONDV.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is REAL array, dimension (N)
+*> RCONDE holds the computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] RCNDE1
+*> \verbatim
+*> RCNDE1 is REAL array, dimension (N)
+*> RCNDE1 holds more computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] RCDEIN
+*> \verbatim
+*> RCDEIN is REAL array, dimension (N)
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition numbers for eigenvalues to be compared with
+*> RCONDE.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is REAL array, dimension (N)
+*> Holds information describing balancing of matrix.
+*> \endverbatim
+*>
+*> \param[out] SCALE1
+*> \verbatim
+*> SCALE1 is REAL array, dimension (N)
+*> Holds information describing balancing of matrix.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (11)
+*> The values computed by the 11 tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 3*N, and 6*N+N**2 if tests 9, 10 or 11 are to be performed.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> If <0, input parameter -INFO had an incorrect value.
+*> If >0, SGEEVX returned an error code, the absolute
+*> value of which is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGET23( COMP, BALANC, JTYPE, THRESH, ISEED, NOUNIT, N,
$ A, LDA, H, WR, WI, WR1, WI1, VL, LDVL, VR,
$ LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
@@ -5,8 +383,9 @@
$ WORK, LWORK, IWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL COMP
@@ -25,227 +404,6 @@
$ WI1( * ), WORK( * ), WR( * ), WR1( * )
* ..
*
-* Purpose
-* =======
-*
-* SGET23 checks the nonsymmetric eigenvalue problem driver SGEEVX.
-* If COMP = .FALSE., the first 8 of the following tests will be
-* performed on the input matrix A, and also test 9 if LWORK is
-* sufficiently large.
-* if COMP is .TRUE. all 11 tests will be performed.
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a block diagonal matrix, with a 1x1 block for each
-* real eigenvalue and a 2x2 block for each complex conjugate
-* pair. If eigenvalues j and j+1 are a complex conjugate pair,
-* so WR(j) = WR(j+1) = wr and WI(j) = - WI(j+1) = wi, then the
-* 2 x 2 block corresponding to the pair will be:
-*
-* ( wr wi )
-* ( -wi wr )
-*
-* Such a block multiplying an n x 2 matrix ( ur ui ) on the
-* right will be the same as multiplying ur + i*ui by wr + i*wi.
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) 0 if W(full) = W(partial), 1/ulp otherwise
-*
-* W(full) denotes the eigenvalues computed when VR, VL, RCONDV
-* and RCONDE are also computed, and W(partial) denotes the
-* eigenvalues computed when only some of VR, VL, RCONDV, and
-* RCONDE are computed.
-*
-* (6) 0 if VR(full) = VR(partial), 1/ulp otherwise
-*
-* VR(full) denotes the right eigenvectors computed when VL, RCONDV
-* and RCONDE are computed, and VR(partial) denotes the result
-* when only some of VL and RCONDV are computed.
-*
-* (7) 0 if VL(full) = VL(partial), 1/ulp otherwise
-*
-* VL(full) denotes the left eigenvectors computed when VR, RCONDV
-* and RCONDE are computed, and VL(partial) denotes the result
-* when only some of VR and RCONDV are computed.
-*
-* (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
-* SCALE, ILO, IHI, ABNRM (partial)
-* 1/ulp otherwise
-*
-* SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
-* (full) is when VR, VL, RCONDE and RCONDV are also computed, and
-* (partial) is when some are not computed.
-*
-* (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise
-*
-* RCONDV(full) denotes the reciprocal condition numbers of the
-* right eigenvectors computed when VR, VL and RCONDE are also
-* computed. RCONDV(partial) denotes the reciprocal condition
-* numbers when only some of VR, VL and RCONDE are computed.
-*
-* (10) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right eigenvector condition number
-* computed by SGEEVX and RCDVIN (the precomputed true value)
-* is supplied as input. cond(RCONDV) is the condition number of
-* RCONDV, and takes errors in computing RCONDV into account, so
-* that the resulting quantity should be O(ULP). cond(RCONDV) is
-* essentially given by norm(A)/RCONDE.
-*
-* (11) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal eigenvalue condition number
-* computed by SGEEVX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* Arguments
-* =========
-*
-* COMP (input) LOGICAL
-* COMP describes which input tests to perform:
-* = .FALSE. if the computed condition numbers are not to
-* be tested against RCDVIN and RCDEIN
-* = .TRUE. if they are to be compared
-*
-* BALANC (input) CHARACTER
-* Describes the balancing option to be tested.
-* = 'N' for no permuting or diagonal scaling
-* = 'P' for permuting but no diagonal scaling
-* = 'S' for no permuting but diagonal scaling
-* = 'B' for permuting and diagonal scaling
-*
-* JTYPE (input) INTEGER
-* Type of input matrix. Used to label output if error occurs.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* ISEED (input) INTEGER array, dimension (4)
-* If COMP = .FALSE., the random number generator seed
-* used to produce matrix.
-* If COMP = .TRUE., ISEED(1) = the number of the example.
-* Used to label output if error occurs.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* N (input) INTEGER
-* The dimension of A. N must be at least 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least N.
-*
-* H (workspace) REAL array, dimension (LDA,N)
-* Another copy of the test matrix A, modified by SGEEVX.
-*
-* WR (workspace) REAL array, dimension (N)
-* WI (workspace) REAL array, dimension (N)
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WR1 (workspace) REAL array, dimension (N)
-* WI1 (workspace) REAL array, dimension (N)
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when SGEEVX only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) REAL array, dimension (LDVL,N)
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,N).
-*
-* VR (workspace) REAL array, dimension (LDVR,N)
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,N).
-*
-* LRE (workspace) REAL array, dimension (LDLRE,N)
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,N).
-*
-* RCONDV (workspace) REAL array, dimension (N)
-* RCONDV holds the computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCNDV1 (workspace) REAL array, dimension (N)
-* RCNDV1 holds more computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCDVIN (input) REAL array, dimension (N)
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition numbers for eigenvectors to be compared with
-* RCONDV.
-*
-* RCONDE (workspace) REAL array, dimension (N)
-* RCONDE holds the computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCNDE1 (workspace) REAL array, dimension (N)
-* RCNDE1 holds more computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCDEIN (input) REAL array, dimension (N)
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition numbers for eigenvalues to be compared with
-* RCONDE.
-*
-* SCALE (workspace) REAL array, dimension (N)
-* Holds information describing balancing of matrix.
-*
-* SCALE1 (workspace) REAL array, dimension (N)
-* Holds information describing balancing of matrix.
-*
-* RESULT (output) REAL array, dimension (11)
-* The values computed by the 11 tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 3*N, and 6*N+N**2 if tests 9, 10 or 11 are to be performed.
-*
-* IWORK (workspace) INTEGER array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* If <0, input parameter -INFO had an incorrect value.
-* If >0, SGEEVX returned an error code, the absolute
-* value of which is returned.
-*
* =====================================================================
*
*
diff --git a/TESTING/EIG/sget24.f b/TESTING/EIG/sget24.f
index 01fe95dd..5bc08f99 100644
--- a/TESTING/EIG/sget24.f
+++ b/TESTING/EIG/sget24.f
@@ -1,11 +1,357 @@
+*> \brief \b SGET24
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
+* H, HT, WR, WI, WRT, WIT, WRTMP, WITMP, VS,
+* LDVS, VS1, RCDEIN, RCDVIN, NSLCT, ISLCT,
+* RESULT, WORK, LWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL COMP
+* INTEGER INFO, JTYPE, LDA, LDVS, LWORK, N, NOUNIT, NSLCT
+* REAL RCDEIN, RCDVIN, THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER ISEED( 4 ), ISLCT( * ), IWORK( * )
+* REAL A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ RESULT( 17 ), VS( LDVS, * ), VS1( LDVS, * ),
+* $ WI( * ), WIT( * ), WITMP( * ), WORK( * ),
+* $ WR( * ), WRT( * ), WRTMP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET24 checks the nonsymmetric eigenvalue (Schur form) problem
+*> expert driver SGEESX.
+*>
+*> If COMP = .FALSE., the first 13 of the following tests will be
+*> be performed on the input matrix A, and also tests 14 and 15
+*> if LWORK is sufficiently large.
+*> If COMP = .TRUE., all 17 test will be performed.
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare WR, WI with and
+*> without reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare T with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare VS with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*> If workspace sufficient, also compare SDIM with and
+*> without reciprocal condition numbers
+*>
+*> (14) if RCONDE the same no matter if VS and/or RCONDV computed
+*>
+*> (15) if RCONDV the same no matter if VS and/or RCONDE computed
+*>
+*> (16) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal average eigenvalue condition number
+*> computed by SGEESX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*> (17) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right invariant subspace condition
+*> number computed by SGEESX and RCDVIN (the precomputed true
+*> value) is supplied as input. cond(RCONDV) is the condition
+*> number of RCONDV, and takes errors in computing RCONDV into
+*> account, so that the resulting quantity should be O(ULP).
+*> cond(RCONDV) is essentially given by norm(A)/RCONDE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMP
+*> \verbatim
+*> COMP is LOGICAL
+*> COMP describes which input tests to perform:
+*> = .FALSE. if the computed condition numbers are not to
+*> be tested against RCDVIN and RCDEIN
+*> = .TRUE. if they are to be compared
+*> \endverbatim
+*>
+*> \param[in] JTYPE
+*> \verbatim
+*> JTYPE is INTEGER
+*> Type of input matrix. Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> If COMP = .FALSE., the random number generator seed
+*> used to produce matrix.
+*> If COMP = .TRUE., ISEED(1) = the number of the example.
+*> Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of A. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least N.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is REAL array, dimension (LDA, N)
+*> Another copy of the test matrix A, modified by SGEESX.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is REAL array, dimension (LDA, N)
+*> Yet another copy of the test matrix A, modified by SGEESX.
+*> \endverbatim
+*>
+*> \param[out] WR
+*> \verbatim
+*> WR is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WI
+*> \verbatim
+*> WI is REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The real and imaginary parts of the eigenvalues of A.
+*> On exit, WR + WI*i are the eigenvalues of the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] WRT
+*> \verbatim
+*> WRT is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WIT
+*> \verbatim
+*> WIT is REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but those computed when SGEESX only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] WRTMP
+*> \verbatim
+*> WRTMP is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WITMP
+*> \verbatim
+*> WITMP is REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> Like WR, WI, these arrays contain the eigenvalues of A,
+*> but sorted by increasing real part.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is REAL array, dimension (LDVS, N)
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1, N).
+*> \endverbatim
+*>
+*> \param[out] VS1
+*> \verbatim
+*> VS1 is REAL array, dimension (LDVS, N)
+*> VS1 holds another copy of the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] RCDEIN
+*> \verbatim
+*> RCDEIN is REAL
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition number for the average of selected eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] RCDVIN
+*> \verbatim
+*> RCDVIN is REAL
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition number for the selected right invariant subspace.
+*> \endverbatim
+*>
+*> \param[in] NSLCT
+*> \verbatim
+*> NSLCT is INTEGER
+*> When COMP = .TRUE. the number of selected eigenvalues
+*> corresponding to the precomputed values RCDEIN and RCDVIN.
+*> \endverbatim
+*>
+*> \param[in] ISLCT
+*> \verbatim
+*> ISLCT is INTEGER array, dimension (NSLCT)
+*> When COMP = .TRUE. ISLCT selects the eigenvalues of the
+*> input matrix corresponding to the precomputed values RCDEIN
+*> and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the
+*> eigenvalue with the J-th largest real part is selected.
+*> Not referenced if COMP = .FALSE.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (17)
+*> The values computed by the 17 tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK to be passed to SGEESX. This
+*> must be at least 3*N, and N+N**2 if tests 14--16 are to
+*> be performed.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> If <0, input parameter -INFO had an incorrect value.
+*> If >0, SGEESX returned an error code, the absolute
+*> value of which is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
$ H, HT, WR, WI, WRT, WIT, WRTMP, WITMP, VS,
$ LDVS, VS1, RCDEIN, RCDVIN, NSLCT, ISLCT,
$ RESULT, WORK, LWORK, IWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL COMP
@@ -21,207 +367,6 @@
$ WR( * ), WRT( * ), WRTMP( * )
* ..
*
-* Purpose
-* =======
-*
-* SGET24 checks the nonsymmetric eigenvalue (Schur form) problem
-* expert driver SGEESX.
-*
-* If COMP = .FALSE., the first 13 of the following tests will be
-* be performed on the input matrix A, and also tests 14 and 15
-* if LWORK is sufficiently large.
-* If COMP = .TRUE., all 17 test will be performed.
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if WR+sqrt(-1)*WI are eigenvalues of T
-* 1/ulp otherwise
-* If workspace sufficient, also compare WR, WI with and
-* without reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare T with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare VS with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-* If workspace sufficient, also compare SDIM with and
-* without reciprocal condition numbers
-*
-* (14) if RCONDE the same no matter if VS and/or RCONDV computed
-*
-* (15) if RCONDV the same no matter if VS and/or RCONDE computed
-*
-* (16) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal average eigenvalue condition number
-* computed by SGEESX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* (17) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right invariant subspace condition
-* number computed by SGEESX and RCDVIN (the precomputed true
-* value) is supplied as input. cond(RCONDV) is the condition
-* number of RCONDV, and takes errors in computing RCONDV into
-* account, so that the resulting quantity should be O(ULP).
-* cond(RCONDV) is essentially given by norm(A)/RCONDE.
-*
-* Arguments
-* =========
-*
-* COMP (input) LOGICAL
-* COMP describes which input tests to perform:
-* = .FALSE. if the computed condition numbers are not to
-* be tested against RCDVIN and RCDEIN
-* = .TRUE. if they are to be compared
-*
-* JTYPE (input) INTEGER
-* Type of input matrix. Used to label output if error occurs.
-*
-* ISEED (input) INTEGER array, dimension (4)
-* If COMP = .FALSE., the random number generator seed
-* used to produce matrix.
-* If COMP = .TRUE., ISEED(1) = the number of the example.
-* Used to label output if error occurs.
-*
-* THRESH (input) REAL
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* N (input) INTEGER
-* The dimension of A. N must be at least 0.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least N.
-*
-* H (workspace) REAL array, dimension (LDA, N)
-* Another copy of the test matrix A, modified by SGEESX.
-*
-* HT (workspace) REAL array, dimension (LDA, N)
-* Yet another copy of the test matrix A, modified by SGEESX.
-*
-* WR (workspace) REAL array, dimension (N)
-* WI (workspace) REAL array, dimension (N)
-* The real and imaginary parts of the eigenvalues of A.
-* On exit, WR + WI*i are the eigenvalues of the matrix in A.
-*
-* WRT (workspace) REAL array, dimension (N)
-* WIT (workspace) REAL array, dimension (N)
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but those computed when SGEESX only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* WRTMP (workspace) REAL array, dimension (N)
-* WITMP (workspace) REAL array, dimension (N)
-* Like WR, WI, these arrays contain the eigenvalues of A,
-* but sorted by increasing real part.
-*
-* VS (workspace) REAL array, dimension (LDVS, N)
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1, N).
-*
-* VS1 (workspace) REAL array, dimension (LDVS, N)
-* VS1 holds another copy of the computed Schur vectors.
-*
-* RCDEIN (input) REAL
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition number for the average of selected eigenvalues.
-*
-* RCDVIN (input) REAL
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition number for the selected right invariant subspace.
-*
-* NSLCT (input) INTEGER
-* When COMP = .TRUE. the number of selected eigenvalues
-* corresponding to the precomputed values RCDEIN and RCDVIN.
-*
-* ISLCT (input) INTEGER array, dimension (NSLCT)
-* When COMP = .TRUE. ISLCT selects the eigenvalues of the
-* input matrix corresponding to the precomputed values RCDEIN
-* and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the
-* eigenvalue with the J-th largest real part is selected.
-* Not referenced if COMP = .FALSE.
-*
-* RESULT (output) REAL array, dimension (17)
-* The values computed by the 17 tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK to be passed to SGEESX. This
-* must be at least 3*N, and N+N**2 if tests 14--16 are to
-* be performed.
-*
-* IWORK (workspace) INTEGER array, dimension (N*N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* If <0, input parameter -INFO had an incorrect value.
-* If >0, SGEESX returned an error code, the absolute
-* value of which is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sget31.f b/TESTING/EIG/sget31.f
index 88628bc2..f2a166f7 100644
--- a/TESTING/EIG/sget31.f
+++ b/TESTING/EIG/sget31.f
@@ -1,58 +1,110 @@
- SUBROUTINE SGET31( RMAX, LMAX, NINFO, KNT )
+*> \brief \b SGET31
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX
- REAL RMAX
-* ..
-* .. Array Arguments ..
- INTEGER NINFO( 2 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGET31( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX
+* REAL RMAX
+* ..
+* .. Array Arguments ..
+* INTEGER NINFO( 2 )
+* ..
+*
* Purpose
* =======
*
-* SGET31 tests SLALN2, a routine for solving
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET31 tests SLALN2, a routine for solving
+*>
+*> (ca A - w D)X = sB
+*>
+*> where A is an NA by NA matrix (NA=1 or 2 only), w is a real (NW=1) or
+*> complex (NW=2) constant, ca is a real constant, D is an NA by NA real
+*> diagonal matrix, and B is an NA by NW matrix (when NW=2 the second
+*> column of B contains the imaginary part of the solution). The code
+*> returns X and s, where s is a scale factor, less than or equal to 1,
+*> which is chosen to avoid overflow in X.
+*>
+*> If any singular values of ca A-w D are less than another input
+*> parameter SMIN, they are perturbed up to SMIN.
+*>
+*> The test condition is that the scaled residual
+*>
+*> norm( (ca A-w D)*X - s*B ) /
+*> ( max( ulp*norm(ca A-w D), SMIN )*norm(X) )
+*>
+*> should be on the order of 1. Here, ulp is the machine precision.
+*> Also, it is verified that SCALE is less than or equal to 1, and that
+*> XNORM = infinity-norm(X).
+*>
+*>\endverbatim
*
-* (ca A - w D)X = sB
-*
-* where A is an NA by NA matrix (NA=1 or 2 only), w is a real (NW=1) or
-* complex (NW=2) constant, ca is a real constant, D is an NA by NA real
-* diagonal matrix, and B is an NA by NW matrix (when NW=2 the second
-* column of B contains the imaginary part of the solution). The code
-* returns X and s, where s is a scale factor, less than or equal to 1,
-* which is chosen to avoid overflow in X.
-*
-* If any singular values of ca A-w D are less than another input
-* parameter SMIN, they are perturbed up to SMIN.
+* Arguments
+* =========
*
-* The test condition is that the scaled residual
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = number of examples with INFO less than 0
+*> NINFO(2) = number of examples with INFO greater than 0
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
*
-* norm( (ca A-w D)*X - s*B ) /
-* ( max( ulp*norm(ca A-w D), SMIN )*norm(X) )
+* Authors
+* =======
*
-* should be on the order of 1. Here, ulp is the machine precision.
-* Also, it is verified that SCALE is less than or equal to 1, and that
-* XNORM = infinity-norm(X).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) REAL
-* Value of the largest test ratio.
+*> \ingroup single_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE SGET31( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = number of examples with INFO less than 0
-* NINFO(2) = number of examples with INFO greater than 0
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX
+ REAL RMAX
+* ..
+* .. Array Arguments ..
+ INTEGER NINFO( 2 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget32.f b/TESTING/EIG/sget32.f
index 94f2387c..394323aa 100644
--- a/TESTING/EIG/sget32.f
+++ b/TESTING/EIG/sget32.f
@@ -1,49 +1,98 @@
- SUBROUTINE SGET32( RMAX, LMAX, NINFO, KNT )
+*> \brief \b SGET32
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NINFO
- REAL RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGET32( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NINFO
+* REAL RMAX
+* ..
+*
* Purpose
* =======
*
-* SGET32 tests SLASY2, a routine for solving
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET32 tests SLASY2, a routine for solving
+*>
+*> op(TL)*X + ISGN*X*op(TR) = SCALE*B
+*>
+*> where TL is N1 by N1, TR is N2 by N2, and N1,N2 =1 or 2 only.
+*> X and B are N1 by N2, op() is an optional transpose, an
+*> ISGN = 1 or -1. SCALE is chosen less than or equal to 1 to
+*> avoid overflow in X.
+*>
+*> The test condition is that the scaled residual
+*>
+*> norm( op(TL)*X + ISGN*X*op(TR) = SCALE*B )
+*> / ( max( ulp*norm(TL), ulp*norm(TR)) * norm(X), SMLNUM )
+*>
+*> should be on the order of 1. Here, ulp is the machine precision.
+*> Also, it is verified that SCALE is less than or equal to 1, and
+*> that XNORM = infinity-norm(X).
+*>
+*>\endverbatim
*
-* op(TL)*X + ISGN*X*op(TR) = SCALE*B
-*
-* where TL is N1 by N1, TR is N2 by N2, and N1,N2 =1 or 2 only.
-* X and B are N1 by N2, op() is an optional transpose, an
-* ISGN = 1 or -1. SCALE is chosen less than or equal to 1 to
-* avoid overflow in X.
+* Arguments
+* =========
*
-* The test condition is that the scaled residual
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples returned with INFO.NE.0.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
*
-* norm( op(TL)*X + ISGN*X*op(TR) = SCALE*B )
-* / ( max( ulp*norm(TL), ulp*norm(TR)) * norm(X), SMLNUM )
+* Authors
+* =======
*
-* should be on the order of 1. Here, ulp is the machine precision.
-* Also, it is verified that SCALE is less than or equal to 1, and
-* that XNORM = infinity-norm(X).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) REAL
-* Value of the largest test ratio.
+*> \ingroup single_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE SGET32( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER
-* Number of examples returned with INFO.NE.0.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NINFO
+ REAL RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget33.f b/TESTING/EIG/sget33.f
index 92a3abc5..5777b65d 100644
--- a/TESTING/EIG/sget33.f
+++ b/TESTING/EIG/sget33.f
@@ -1,43 +1,92 @@
- SUBROUTINE SGET33( RMAX, LMAX, NINFO, KNT )
+*> \brief \b SGET33
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NINFO
- REAL RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGET33( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NINFO
+* REAL RMAX
+* ..
+*
* Purpose
* =======
*
-* SGET33 tests SLANV2, a routine for putting 2 by 2 blocks into
-* standard form. In other words, it computes a two by two rotation
-* [[C,S];[-S,C]] where in
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET33 tests SLANV2, a routine for putting 2 by 2 blocks into
+*> standard form. In other words, it computes a two by two rotation
+*> [[C,S];[-S,C]] where in
+*>
+*> [ C S ][T(1,1) T(1,2)][ C -S ] = [ T11 T12 ]
+*> [-S C ][T(2,1) T(2,2)][ S C ] [ T21 T22 ]
+*>
+*> either
+*> 1) T21=0 (real eigenvalues), or
+*> 2) T11=T22 and T21*T12<0 (complex conjugate eigenvalues).
+*> We also verify that the residual is small.
+*>
+*>\endverbatim
*
-* [ C S ][T(1,1) T(1,2)][ C -S ] = [ T11 T12 ]
-* [-S C ][T(2,1) T(2,2)][ S C ] [ T21 T22 ]
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples returned with INFO .NE. 0.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* either
-* 1) T21=0 (real eigenvalues), or
-* 2) T11=T22 and T21*T12<0 (complex conjugate eigenvalues).
-* We also verify that the residual is small.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) REAL
-* Value of the largest test ratio.
+*> \ingroup single_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE SGET33( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER
-* Number of examples returned with INFO .NE. 0.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NINFO
+ REAL RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget34.f b/TESTING/EIG/sget34.f
index 3d16b25b..74d646c4 100644
--- a/TESTING/EIG/sget34.f
+++ b/TESTING/EIG/sget34.f
@@ -1,49 +1,101 @@
- SUBROUTINE SGET34( RMAX, LMAX, NINFO, KNT )
+*> \brief \b SGET34
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX
- REAL RMAX
-* ..
-* .. Array Arguments ..
- INTEGER NINFO( 2 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGET34( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX
+* REAL RMAX
+* ..
+* .. Array Arguments ..
+* INTEGER NINFO( 2 )
+* ..
+*
* Purpose
* =======
*
-* SGET34 tests SLAEXC, a routine for swapping adjacent blocks (either
-* 1 by 1 or 2 by 2) on the diagonal of a matrix in real Schur form.
-* Thus, SLAEXC computes an orthogonal matrix Q such that
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET34 tests SLAEXC, a routine for swapping adjacent blocks (either
+*> 1 by 1 or 2 by 2) on the diagonal of a matrix in real Schur form.
+*> Thus, SLAEXC computes an orthogonal matrix Q such that
+*>
+*> Q' * [ A B ] * Q = [ C1 B1 ]
+*> [ 0 C ] [ 0 A1 ]
+*>
+*> where C1 is similar to C and A1 is similar to A. Both A and C are
+*> assumed to be in standard form (equal diagonal entries and
+*> offdiagonal with differing signs) and A1 and C1 are returned with the
+*> same properties.
+*>
+*> The test code verifies these last last assertions, as well as that
+*> the residual in the above equation is small.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
*
-* Q' * [ A B ] * Q = [ C1 B1 ]
-* [ 0 C ] [ 0 A1 ]
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (2)
+*> NINFO(J) is the number of examples where INFO=J occurred.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
*
-* where C1 is similar to C and A1 is similar to A. Both A and C are
-* assumed to be in standard form (equal diagonal entries and
-* offdiagonal with differing signs) and A1 and C1 are returned with the
-* same properties.
+* Authors
+* =======
*
-* The test code verifies these last last assertions, as well as that
-* the residual in the above equation is small.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) REAL
-* Value of the largest test ratio.
+*> \ingroup single_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE SGET34( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER array, dimension (2)
-* NINFO(J) is the number of examples where INFO=J occurred.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX
+ REAL RMAX
+* ..
+* .. Array Arguments ..
+ INTEGER NINFO( 2 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget35.f b/TESTING/EIG/sget35.f
index 63af9d6d..b48b5335 100644
--- a/TESTING/EIG/sget35.f
+++ b/TESTING/EIG/sget35.f
@@ -1,45 +1,94 @@
- SUBROUTINE SGET35( RMAX, LMAX, NINFO, KNT )
+*> \brief \b SGET35
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NINFO
- REAL RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGET35( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NINFO
+* REAL RMAX
+* ..
+*
* Purpose
* =======
*
-* SGET35 tests STRSYL, a routine for solving the Sylvester matrix
-* equation
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET35 tests STRSYL, a routine for solving the Sylvester matrix
+*> equation
+*>
+*> op(A)*X + ISGN*X*op(B) = scale*C,
+*>
+*> A and B are assumed to be in Schur canonical form, op() represents an
+*> optional transpose, and ISGN can be -1 or +1. Scale is an output
+*> less than or equal to 1, chosen to avoid overflow in X.
+*>
+*> The test code verifies that the following residual is order 1:
+*>
+*> norm(op(A)*X + ISGN*X*op(B) - scale*C) /
+*> (EPS*max(norm(A),norm(B))*norm(X))
+*>
+*>\endverbatim
*
-* op(A)*X + ISGN*X*op(B) = scale*C,
+* Arguments
+* =========
*
-* A and B are assumed to be in Schur canonical form, op() represents an
-* optional transpose, and ISGN can be -1 or +1. Scale is an output
-* less than or equal to 1, chosen to avoid overflow in X.
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples where INFO is nonzero.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
*
-* The test code verifies that the following residual is order 1:
+* Authors
+* =======
*
-* norm(op(A)*X + ISGN*X*op(B) - scale*C) /
-* (EPS*max(norm(A),norm(B))*norm(X))
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Arguments
-* ==========
+*> \date November 2011
*
-* RMAX (output) REAL
-* Value of the largest test ratio.
+*> \ingroup single_eig
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE SGET35( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER
-* Number of examples where INFO is nonzero.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NINFO
+ REAL RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget36.f b/TESTING/EIG/sget36.f
index 54af77da..e6cb609a 100644
--- a/TESTING/EIG/sget36.f
+++ b/TESTING/EIG/sget36.f
@@ -1,52 +1,107 @@
- SUBROUTINE SGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*> \brief \b SGET36
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NIN
- REAL RMAX
-* ..
-* .. Array Arguments ..
- INTEGER NINFO( 3 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NIN
+* REAL RMAX
+* ..
+* .. Array Arguments ..
+* INTEGER NINFO( 3 )
+* ..
+*
* Purpose
* =======
*
-* SGET36 tests STREXC, a routine for moving blocks (either 1 by 1 or
-* 2 by 2) on the diagonal of a matrix in real Schur form. Thus, SLAEXC
-* computes an orthogonal matrix Q such that
-*
-* Q' * T1 * Q = T2
-*
-* and where one of the diagonal blocks of T1 (the one at row IFST) has
-* been moved to position ILST.
-*
-* The test code verifies that the residual Q'*T1*Q-T2 is small, that T2
-* is in Schur form, and that the final position of the IFST block is
-* ILST (within +-1).
-*
-* The test matrices are read from a file with logical unit number NIN.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET36 tests STREXC, a routine for moving blocks (either 1 by 1 or
+*> 2 by 2) on the diagonal of a matrix in real Schur form. Thus, SLAEXC
+*> computes an orthogonal matrix Q such that
+*>
+*> Q' * T1 * Q = T2
+*>
+*> and where one of the diagonal blocks of T1 (the one at row IFST) has
+*> been moved to position ILST.
+*>
+*> The test code verifies that the residual Q'*T1*Q-T2 is small, that T2
+*> is in Schur form, and that the final position of the IFST block is
+*> ILST (within +-1).
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(J) is the number of examples where INFO=J.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RMAX (output) REAL
-* Value of the largest test ratio.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+*> \date November 2011
*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(J) is the number of examples where INFO=J.
+*> \ingroup single_eig
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* =====================================================================
+ SUBROUTINE SGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* NIN (input) INTEGER
-* Input logical unit number.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NIN
+ REAL RMAX
+* ..
+* .. Array Arguments ..
+ INTEGER NINFO( 3 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget37.f b/TESTING/EIG/sget37.f
index 2ab7735f..63a1a3f9 100644
--- a/TESTING/EIG/sget37.f
+++ b/TESTING/EIG/sget37.f
@@ -1,8 +1,101 @@
+*> \brief \b SGET37
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET37( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, NIN
+* ..
+* .. Array Arguments ..
+* INTEGER LMAX( 3 ), NINFO( 3 )
+* REAL RMAX( 3 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET37 tests STRSNA, a routine for estimating condition numbers of
+*> eigenvalues and/or right eigenvectors of a matrix.
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL array, dimension (3)
+*> Value of the largest test ratio.
+*> RMAX(1) = largest ratio comparing different calls to STRSNA
+*> RMAX(2) = largest error in reciprocal condition
+*> numbers taking their conditioning into account
+*> RMAX(3) = largest error in reciprocal condition
+*> numbers not taking their conditioning into
+*> account (may be larger than RMAX(2))
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER array, dimension (3)
+*> LMAX(i) is example number where largest test ratio
+*> RMAX(i) is achieved. Also:
+*> If SGEHRD returns INFO nonzero on example i, LMAX(1)=i
+*> If SHSEQR returns INFO nonzero on example i, LMAX(2)=i
+*> If STRSNA returns INFO nonzero on example i, LMAX(3)=i
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = No. of times SGEHRD returned INFO nonzero
+*> NINFO(2) = No. of times SHSEQR returned INFO nonzero
+*> NINFO(3) = No. of times STRSNA returned INFO nonzero
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGET37( RMAX, LMAX, NINFO, KNT, NIN )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KNT, NIN
@@ -12,44 +105,6 @@
REAL RMAX( 3 )
* ..
*
-* Purpose
-* =======
-*
-* SGET37 tests STRSNA, a routine for estimating condition numbers of
-* eigenvalues and/or right eigenvectors of a matrix.
-*
-* The test matrices are read from a file with logical unit number NIN.
-*
-* Arguments
-* ==========
-*
-* RMAX (output) REAL array, dimension (3)
-* Value of the largest test ratio.
-* RMAX(1) = largest ratio comparing different calls to STRSNA
-* RMAX(2) = largest error in reciprocal condition
-* numbers taking their conditioning into account
-* RMAX(3) = largest error in reciprocal condition
-* numbers not taking their conditioning into
-* account (may be larger than RMAX(2))
-*
-* LMAX (output) INTEGER array, dimension (3)
-* LMAX(i) is example number where largest test ratio
-* RMAX(i) is achieved. Also:
-* If SGEHRD returns INFO nonzero on example i, LMAX(1)=i
-* If SHSEQR returns INFO nonzero on example i, LMAX(2)=i
-* If STRSNA returns INFO nonzero on example i, LMAX(3)=i
-*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = No. of times SGEHRD returned INFO nonzero
-* NINFO(2) = No. of times SHSEQR returned INFO nonzero
-* NINFO(3) = No. of times STRSNA returned INFO nonzero
-*
-* KNT (output) INTEGER
-* Total number of examples tested.
-*
-* NIN (input) INTEGER
-* Input logical unit number
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sget38.f b/TESTING/EIG/sget38.f
index a452c231..d89ca064 100644
--- a/TESTING/EIG/sget38.f
+++ b/TESTING/EIG/sget38.f
@@ -1,8 +1,102 @@
+*> \brief \b SGET38
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET38( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, NIN
+* ..
+* .. Array Arguments ..
+* INTEGER LMAX( 3 ), NINFO( 3 )
+* REAL RMAX( 3 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET38 tests STRSEN, a routine for estimating condition numbers of a
+*> cluster of eigenvalues and/or its associated right invariant subspace
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL array, dimension (3)
+*> Values of the largest test ratios.
+*> RMAX(1) = largest residuals from SHST01 or comparing
+*> different calls to STRSEN
+*> RMAX(2) = largest error in reciprocal condition
+*> numbers taking their conditioning into account
+*> RMAX(3) = largest error in reciprocal condition
+*> numbers not taking their conditioning into
+*> account (may be larger than RMAX(2))
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER array, dimension (3)
+*> LMAX(i) is example number where largest test ratio
+*> RMAX(i) is achieved. Also:
+*> If SGEHRD returns INFO nonzero on example i, LMAX(1)=i
+*> If SHSEQR returns INFO nonzero on example i, LMAX(2)=i
+*> If STRSEN returns INFO nonzero on example i, LMAX(3)=i
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = No. of times SGEHRD returned INFO nonzero
+*> NINFO(2) = No. of times SHSEQR returned INFO nonzero
+*> NINFO(3) = No. of times STRSEN returned INFO nonzero
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGET38( RMAX, LMAX, NINFO, KNT, NIN )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KNT, NIN
@@ -12,45 +106,6 @@
REAL RMAX( 3 )
* ..
*
-* Purpose
-* =======
-*
-* SGET38 tests STRSEN, a routine for estimating condition numbers of a
-* cluster of eigenvalues and/or its associated right invariant subspace
-*
-* The test matrices are read from a file with logical unit number NIN.
-*
-* Arguments
-* ==========
-*
-* RMAX (output) REAL array, dimension (3)
-* Values of the largest test ratios.
-* RMAX(1) = largest residuals from SHST01 or comparing
-* different calls to STRSEN
-* RMAX(2) = largest error in reciprocal condition
-* numbers taking their conditioning into account
-* RMAX(3) = largest error in reciprocal condition
-* numbers not taking their conditioning into
-* account (may be larger than RMAX(2))
-*
-* LMAX (output) INTEGER array, dimension (3)
-* LMAX(i) is example number where largest test ratio
-* RMAX(i) is achieved. Also:
-* If SGEHRD returns INFO nonzero on example i, LMAX(1)=i
-* If SHSEQR returns INFO nonzero on example i, LMAX(2)=i
-* If STRSEN returns INFO nonzero on example i, LMAX(3)=i
-*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = No. of times SGEHRD returned INFO nonzero
-* NINFO(2) = No. of times SHSEQR returned INFO nonzero
-* NINFO(3) = No. of times STRSEN returned INFO nonzero
-*
-* KNT (output) INTEGER
-* Total number of examples tested.
-*
-* NIN (input) INTEGER
-* Input logical unit number.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sget39.f b/TESTING/EIG/sget39.f
index d6180bcc..8c23cbad 100644
--- a/TESTING/EIG/sget39.f
+++ b/TESTING/EIG/sget39.f
@@ -1,70 +1,119 @@
- SUBROUTINE SGET39( RMAX, LMAX, NINFO, KNT )
+*> \brief \b SGET39
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NINFO
- REAL RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET39( RMAX, LMAX, NINFO, KNT )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NINFO
+* REAL RMAX
+* ..
+*
* Purpose
* =======
*
-* SGET39 tests SLAQTR, a routine for solving the real or
-* special complex quasi upper triangular system
-*
-* op(T)*p = scale*c,
-* or
-* op(T + iB)*(p+iq) = scale*(c+id),
-*
-* in real arithmetic. T is upper quasi-triangular.
-* If it is complex, then the first diagonal block of T must be
-* 1 by 1, B has the special structure
-*
-* B = [ b(1) b(2) ... b(n) ]
-* [ w ]
-* [ w ]
-* [ . ]
-* [ w ]
-*
-* op(A) = A or A', where A' denotes the conjugate transpose of
-* the matrix A.
-*
-* On input, X = [ c ]. On output, X = [ p ].
-* [ d ] [ q ]
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET39 tests SLAQTR, a routine for solving the real or
+*> special complex quasi upper triangular system
+*>
+*> op(T)*p = scale*c,
+*> or
+*> op(T + iB)*(p+iq) = scale*(c+id),
+*>
+*> in real arithmetic. T is upper quasi-triangular.
+*> If it is complex, then the first diagonal block of T must be
+*> 1 by 1, B has the special structure
+*>
+*> B = [ b(1) b(2) ... b(n) ]
+*> [ w ]
+*> [ w ]
+*> [ . ]
+*> [ w ]
+*>
+*> op(A) = A or A', where A' denotes the conjugate transpose of
+*> the matrix A.
+*>
+*> On input, X = [ c ]. On output, X = [ p ].
+*> [ d ] [ q ]
+*>
+*> Scale is an output less than or equal to 1, chosen to avoid
+*> overflow in X.
+*> This subroutine is specially designed for the condition number
+*> estimation in the eigenproblem routine STRSNA.
+*>
+*> The test code verifies that the following residual is order 1:
+*>
+*> ||(T+i*B)*(x1+i*x2) - scale*(d1+i*d2)||
+*> -----------------------------------------
+*> max(ulp*(||T||+||B||)*(||x1||+||x2||),
+*> (||T||+||B||)*smlnum/ulp,
+*> smlnum)
+*>
+*> (The (||T||+||B||)*smlnum/ulp term accounts for possible
+*> (gradual or nongradual) underflow in x1 and x2.)
+*>
+*>\endverbatim
*
-* Scale is an output less than or equal to 1, chosen to avoid
-* overflow in X.
-* This subroutine is specially designed for the condition number
-* estimation in the eigenproblem routine STRSNA.
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is REAL
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples where INFO is nonzero.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* The test code verifies that the following residual is order 1:
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ||(T+i*B)*(x1+i*x2) - scale*(d1+i*d2)||
-* -----------------------------------------
-* max(ulp*(||T||+||B||)*(||x1||+||x2||),
-* (||T||+||B||)*smlnum/ulp,
-* smlnum)
+*> \date November 2011
*
-* (The (||T||+||B||)*smlnum/ulp term accounts for possible
-* (gradual or nongradual) underflow in x1 and x2.)
+*> \ingroup single_eig
*
-* Arguments
-* ==========
-*
-* RMAX (output) REAL
-* Value of the largest test ratio.
-*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+* =====================================================================
+ SUBROUTINE SGET39( RMAX, LMAX, NINFO, KNT )
*
-* NINFO (output) INTEGER
-* Number of examples where INFO is nonzero.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NINFO
+ REAL RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget51.f b/TESTING/EIG/sget51.f
index 0cb69d4d..549d59b0 100644
--- a/TESTING/EIG/sget51.f
+++ b/TESTING/EIG/sget51.f
@@ -1,91 +1,169 @@
- SUBROUTINE SGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
- $ RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER ITYPE, LDA, LDB, LDU, LDV, N
- REAL RESULT
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), U( LDU, * ),
- $ V( LDV, * ), WORK( * )
-* ..
-*
+*> \brief \b SGET51
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
+* RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER ITYPE, LDA, LDB, LDU, LDV, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGET51 generally checks a decomposition of the form
-*
-* A = U B V'
-*
-* where ' means transpose and U and V are orthogonal.
-*
-* Specifically, if ITYPE=1
-*
-* RESULT = | A - U B V' | / ( |A| n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT = | A - B | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT = | I - UU' | / ( n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET51 generally checks a decomposition of the form
+*>
+*> A = U B V'
+*>
+*> where ' means transpose and U and V are orthogonal.
+*>
+*> Specifically, if ITYPE=1
+*>
+*> RESULT = | A - U B V' | / ( |A| n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT = | A - B | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT = | I - UU' | / ( n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* =1: RESULT = | A - U B V' | / ( |A| n ulp )
-* =2: RESULT = | A - B | / ( |A| n ulp )
-* =3: RESULT = | I - UU' | / ( n ulp )
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, SGET51 does nothing.
-* It must be at least zero.
-*
-* A (input) REAL array, dimension (LDA, N)
-* The original (unfactored) matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) REAL array, dimension (LDB, N)
-* The factored matrix.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> =1: RESULT = | A - U B V' | / ( |A| n ulp )
+*> =2: RESULT = | A - B | / ( |A| n ulp )
+*> =3: RESULT = | I - UU' | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, SGET51 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The original (unfactored) matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> The factored matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> Not referenced if ITYPE=2
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension (LDV, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> Not referenced if ITYPE=2
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N**2)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> The values computed by the test specified by ITYPE. The
+*> value is currently limited to 1/ulp, to avoid overflow.
+*> Errors are flagged by RESULT=10/ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* U (input) REAL array, dimension (LDU, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-* Not referenced if ITYPE=2
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
+*> \date November 2011
*
-* V (input) REAL array, dimension (LDV, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-* Not referenced if ITYPE=2
+*> \ingroup single_eig
*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
+* =====================================================================
+ SUBROUTINE SGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
+ $ RESULT )
*
-* WORK (workspace) REAL array, dimension (2*N**2)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL
-* The values computed by the test specified by ITYPE. The
-* value is currently limited to 1/ulp, to avoid overflow.
-* Errors are flagged by RESULT=10/ulp.
+* .. Scalar Arguments ..
+ INTEGER ITYPE, LDA, LDB, LDU, LDV, N
+ REAL RESULT
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), U( LDU, * ),
+ $ V( LDV, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget52.f b/TESTING/EIG/sget52.f
index 6d4456eb..a044fa4f 100644
--- a/TESTING/EIG/sget52.f
+++ b/TESTING/EIG/sget52.f
@@ -1,9 +1,210 @@
+*> \brief \b SGET52
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHAR,
+* ALPHAI, BETA, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* LOGICAL LEFT
+* INTEGER LDA, LDB, LDE, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
+* $ B( LDB, * ), BETA( * ), E( LDE, * ),
+* $ RESULT( 2 ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET52 does an eigenvector check for the generalized eigenvalue
+*> problem.
+*>
+*> The basic test for right eigenvectors is:
+*>
+*> | b(j) A E(j) - a(j) B E(j) |
+*> RESULT(1) = max -------------------------------
+*> j n ulp max( |b(j) A|, |a(j) B| )
+*>
+*> using the 1-norm. Here, a(j)/b(j) = w is the j-th generalized
+*> eigenvalue of A - w B, or, equivalently, b(j)/a(j) = m is the j-th
+*> generalized eigenvalue of m A - B.
+*>
+*> For real eigenvalues, the test is straightforward. For complex
+*> eigenvalues, E(j) and a(j) are complex, represented by
+*> Er(j) + i*Ei(j) and ar(j) + i*ai(j), resp., so the test for that
+*> eigenvector becomes
+*>
+*> max( |Wr|, |Wi| )
+*> --------------------------------------------
+*> n ulp max( |b(j) A|, (|ar(j)|+|ai(j)|) |B| )
+*>
+*> where
+*>
+*> Wr = b(j) A Er(j) - ar(j) B Er(j) + ai(j) B Ei(j)
+*>
+*> Wi = b(j) A Ei(j) - ai(j) B Er(j) - ar(j) B Ei(j)
+*>
+*> T T _
+*> For left eigenvectors, A , B , a, and b are used.
+*>
+*> SGET52 also tests the normalization of E. Each eigenvector is
+*> supposed to be normalized so that the maximum "absolute value"
+*> of its elements is 1, where in this case, "absolute value"
+*> of a complex value x is |Re(x)| + |Im(x)| ; let us call this
+*> maximum "absolute value" norm of a vector v M(v).
+*> if a(j)=b(j)=0, then the eigenvector is set to be the jth coordinate
+*> vector. The normalization test is:
+*>
+*> RESULT(2) = max | M(v(j)) - 1 | / ( n ulp )
+*> eigenvectors v(j)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LEFT
+*> \verbatim
+*> LEFT is LOGICAL
+*> =.TRUE.: The eigenvectors in the columns of E are assumed
+*> to be *left* eigenvectors.
+*> =.FALSE.: The eigenvectors in the columns of E are assumed
+*> to be *right* eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrices. If it is zero, SGET52 does
+*> nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> The matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (LDE, N)
+*> The matrix of eigenvectors. It must be O( 1 ). Complex
+*> eigenvalues and eigenvectors always come in pairs, the
+*> eigenvalue and its conjugate being stored in adjacent
+*> elements of ALPHAR, ALPHAI, and BETA. Thus, if a(j)/b(j)
+*> and a(j+1)/b(j+1) are a complex conjugate pair of
+*> generalized eigenvalues, then E(,j) contains the real part
+*> of the eigenvector and E(,j+1) contains the imaginary part.
+*> Note that whether E(,j) is a real eigenvector or part of a
+*> complex one is specified by whether ALPHAI(j) is zero or not.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of E. It must be at least 1 and at
+*> least N.
+*> \endverbatim
+*>
+*> \param[in] ALPHAR
+*> \verbatim
+*> ALPHAR is REAL array, dimension (N)
+*> The real parts of the values a(j) as described above, which,
+*> along with b(j), define the generalized eigenvalues.
+*> Complex eigenvalues always come in complex conjugate pairs
+*> a(j)/b(j) and a(j+1)/b(j+1), which are stored in adjacent
+*> elements in ALPHAR, ALPHAI, and BETA. Thus, if the j-th
+*> and (j+1)-st eigenvalues form a pair, ALPHAR(j+1)/BETA(j+1)
+*> is assumed to be equal to ALPHAR(j)/BETA(j).
+*> \endverbatim
+*>
+*> \param[in] ALPHAI
+*> \verbatim
+*> ALPHAI is REAL array, dimension (N)
+*> The imaginary parts of the values a(j) as described above,
+*> which, along with b(j), define the generalized eigenvalues.
+*> If ALPHAI(j)=0, then the eigenvalue is real, otherwise it
+*> is part of a complex conjugate pair. Complex eigenvalues
+*> always come in complex conjugate pairs a(j)/b(j) and
+*> a(j+1)/b(j+1), which are stored in adjacent elements in
+*> ALPHAR, ALPHAI, and BETA. Thus, if the j-th and (j+1)-st
+*> eigenvalues form a pair, ALPHAI(j+1)/BETA(j+1) is assumed to
+*> be equal to -ALPHAI(j)/BETA(j). Also, nonzero values in
+*> ALPHAI are assumed to always come in adjacent pairs.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> The values b(j) as described above, which, along with a(j),
+*> define the generalized eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N**2+N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the test described above. If A E or
+*> B E is likely to overflow, then RESULT(1:2) is set to
+*> 10 / ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGET52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHAR,
$ ALPHAI, BETA, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LEFT
@@ -15,125 +216,6 @@
$ RESULT( 2 ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGET52 does an eigenvector check for the generalized eigenvalue
-* problem.
-*
-* The basic test for right eigenvectors is:
-*
-* | b(j) A E(j) - a(j) B E(j) |
-* RESULT(1) = max -------------------------------
-* j n ulp max( |b(j) A|, |a(j) B| )
-*
-* using the 1-norm. Here, a(j)/b(j) = w is the j-th generalized
-* eigenvalue of A - w B, or, equivalently, b(j)/a(j) = m is the j-th
-* generalized eigenvalue of m A - B.
-*
-* For real eigenvalues, the test is straightforward. For complex
-* eigenvalues, E(j) and a(j) are complex, represented by
-* Er(j) + i*Ei(j) and ar(j) + i*ai(j), resp., so the test for that
-* eigenvector becomes
-*
-* max( |Wr|, |Wi| )
-* --------------------------------------------
-* n ulp max( |b(j) A|, (|ar(j)|+|ai(j)|) |B| )
-*
-* where
-*
-* Wr = b(j) A Er(j) - ar(j) B Er(j) + ai(j) B Ei(j)
-*
-* Wi = b(j) A Ei(j) - ai(j) B Er(j) - ar(j) B Ei(j)
-*
-* T T _
-* For left eigenvectors, A , B , a, and b are used.
-*
-* SGET52 also tests the normalization of E. Each eigenvector is
-* supposed to be normalized so that the maximum "absolute value"
-* of its elements is 1, where in this case, "absolute value"
-* of a complex value x is |Re(x)| + |Im(x)| ; let us call this
-* maximum "absolute value" norm of a vector v M(v).
-* if a(j)=b(j)=0, then the eigenvector is set to be the jth coordinate
-* vector. The normalization test is:
-*
-* RESULT(2) = max | M(v(j)) - 1 | / ( n ulp )
-* eigenvectors v(j)
-*
-* Arguments
-* =========
-*
-* LEFT (input) LOGICAL
-* =.TRUE.: The eigenvectors in the columns of E are assumed
-* to be *left* eigenvectors.
-* =.FALSE.: The eigenvectors in the columns of E are assumed
-* to be *right* eigenvectors.
-*
-* N (input) INTEGER
-* The size of the matrices. If it is zero, SGET52 does
-* nothing. It must be at least zero.
-*
-* A (input) REAL array, dimension (LDA, N)
-* The matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) REAL array, dimension (LDB, N)
-* The matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* E (input) REAL array, dimension (LDE, N)
-* The matrix of eigenvectors. It must be O( 1 ). Complex
-* eigenvalues and eigenvectors always come in pairs, the
-* eigenvalue and its conjugate being stored in adjacent
-* elements of ALPHAR, ALPHAI, and BETA. Thus, if a(j)/b(j)
-* and a(j+1)/b(j+1) are a complex conjugate pair of
-* generalized eigenvalues, then E(,j) contains the real part
-* of the eigenvector and E(,j+1) contains the imaginary part.
-* Note that whether E(,j) is a real eigenvector or part of a
-* complex one is specified by whether ALPHAI(j) is zero or not.
-*
-* LDE (input) INTEGER
-* The leading dimension of E. It must be at least 1 and at
-* least N.
-*
-* ALPHAR (input) REAL array, dimension (N)
-* The real parts of the values a(j) as described above, which,
-* along with b(j), define the generalized eigenvalues.
-* Complex eigenvalues always come in complex conjugate pairs
-* a(j)/b(j) and a(j+1)/b(j+1), which are stored in adjacent
-* elements in ALPHAR, ALPHAI, and BETA. Thus, if the j-th
-* and (j+1)-st eigenvalues form a pair, ALPHAR(j+1)/BETA(j+1)
-* is assumed to be equal to ALPHAR(j)/BETA(j).
-*
-* ALPHAI (input) REAL array, dimension (N)
-* The imaginary parts of the values a(j) as described above,
-* which, along with b(j), define the generalized eigenvalues.
-* If ALPHAI(j)=0, then the eigenvalue is real, otherwise it
-* is part of a complex conjugate pair. Complex eigenvalues
-* always come in complex conjugate pairs a(j)/b(j) and
-* a(j+1)/b(j+1), which are stored in adjacent elements in
-* ALPHAR, ALPHAI, and BETA. Thus, if the j-th and (j+1)-st
-* eigenvalues form a pair, ALPHAI(j+1)/BETA(j+1) is assumed to
-* be equal to -ALPHAI(j)/BETA(j). Also, nonzero values in
-* ALPHAI are assumed to always come in adjacent pairs.
-*
-* BETA (input) REAL array, dimension (N)
-* The values b(j) as described above, which, along with a(j),
-* define the generalized eigenvalues.
-*
-* WORK (workspace) REAL array, dimension (N**2+N)
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the test described above. If A E or
-* B E is likely to overflow, then RESULT(1:2) is set to
-* 10 / ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sget53.f b/TESTING/EIG/sget53.f
index 1b0b3287..c3fdd99d 100644
--- a/TESTING/EIG/sget53.f
+++ b/TESTING/EIG/sget53.f
@@ -1,78 +1,145 @@
- SUBROUTINE SGET53( A, LDA, B, LDB, SCALE, WR, WI, RESULT, INFO )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB
- REAL RESULT, SCALE, WI, WR
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SGET53
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET53( A, LDA, B, LDB, SCALE, WR, WI, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB
+* REAL RESULT, SCALE, WI, WR
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SGET53 checks the generalized eigenvalues computed by SLAG2.
-*
-* The basic test for an eigenvalue is:
-*
-* | det( s A - w B ) |
-* RESULT = ---------------------------------------------------
-* ulp max( s norm(A), |w| norm(B) )*norm( s A - w B )
-*
-* Two "safety checks" are performed:
-*
-* (1) ulp*max( s*norm(A), |w|*norm(B) ) must be at least
-* safe_minimum. This insures that the test performed is
-* not essentially det(0*A + 0*B)=0.
-*
-* (2) s*norm(A) + |w|*norm(B) must be less than 1/safe_minimum.
-* This insures that s*A - w*B will not overflow.
-*
-* If these tests are not passed, then s and w are scaled and
-* tested anyway, if this is possible.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET53 checks the generalized eigenvalues computed by SLAG2.
+*>
+*> The basic test for an eigenvalue is:
+*>
+*> | det( s A - w B ) |
+*> RESULT = ---------------------------------------------------
+*> ulp max( s norm(A), |w| norm(B) )*norm( s A - w B )
+*>
+*> Two "safety checks" are performed:
+*>
+*> (1) ulp*max( s*norm(A), |w|*norm(B) ) must be at least
+*> safe_minimum. This insures that the test performed is
+*> not essentially det(0*A + 0*B)=0.
+*>
+*> (2) s*norm(A) + |w|*norm(B) must be less than 1/safe_minimum.
+*> This insures that s*A - w*B will not overflow.
+*>
+*> If these tests are not passed, then s and w are scaled and
+*> tested anyway, if this is possible.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* A (input) REAL array, dimension (LDA, 2)
-* The 2x2 matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 2.
-*
-* B (input) REAL array, dimension (LDB, N)
-* The 2x2 upper-triangular matrix B.
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, 2)
+*> The 2x2 matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 2.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> The 2x2 upper-triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 2.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The "scale factor" s in the formula s A - w B . It is
+*> assumed to be non-negative.
+*> \endverbatim
+*>
+*> \param[in] WR
+*> \verbatim
+*> WR is REAL
+*> The real part of the eigenvalue w in the formula
+*> s A - w B .
+*> \endverbatim
+*>
+*> \param[in] WI
+*> \verbatim
+*> WI is REAL
+*> The imaginary part of the eigenvalue w in the formula
+*> s A - w B .
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> If INFO is 2 or less, the value computed by the test
+*> described above.
+*> If INFO=3, this will just be 1/ulp.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0: The input data pass the "safety checks".
+*> =1: s*norm(A) + |w|*norm(B) > 1/safe_minimum.
+*> =2: ulp*max( s*norm(A), |w|*norm(B) ) < safe_minimum
+*> =3: same as INFO=2, but s and w could not be scaled so
+*> as to compute the test.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 2.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SCALE (input) REAL
-* The "scale factor" s in the formula s A - w B . It is
-* assumed to be non-negative.
+*> \date November 2011
*
-* WR (input) REAL
-* The real part of the eigenvalue w in the formula
-* s A - w B .
+*> \ingroup single_eig
*
-* WI (input) REAL
-* The imaginary part of the eigenvalue w in the formula
-* s A - w B .
+* =====================================================================
+ SUBROUTINE SGET53( A, LDA, B, LDB, SCALE, WR, WI, RESULT, INFO )
*
-* RESULT (output) REAL
-* If INFO is 2 or less, the value computed by the test
-* described above.
-* If INFO=3, this will just be 1/ulp.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* =0: The input data pass the "safety checks".
-* =1: s*norm(A) + |w|*norm(B) > 1/safe_minimum.
-* =2: ulp*max( s*norm(A), |w|*norm(B) ) < safe_minimum
-* =3: same as INFO=2, but s and w could not be scaled so
-* as to compute the test.
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB
+ REAL RESULT, SCALE, WI, WR
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sget54.f b/TESTING/EIG/sget54.f
index a9fddfd6..0001fd85 100644
--- a/TESTING/EIG/sget54.f
+++ b/TESTING/EIG/sget54.f
@@ -1,9 +1,167 @@
+*> \brief \b SGET54
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
+* LDV, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), S( LDS, * ),
+* $ T( LDT, * ), U( LDU, * ), V( LDV, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET54 checks a generalized decomposition of the form
+*>
+*> A = U*S*V' and B = U*T* V'
+*>
+*> where ' means transpose and U and V are orthogonal.
+*>
+*> Specifically,
+*>
+*> RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, SGET54 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The original (unfactored) matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> The original (unfactored) matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (LDS, N)
+*> The factored matrix S.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of S. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is REAL array, dimension (LDT, N)
+*> The factored matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of T. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension (LDV, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N**2)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> The value RESULT, It is currently limited to 1/ulp, to
+*> avoid overflow. Errors are flagged by RESULT=10/ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGET54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
$ LDV, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
@@ -15,76 +173,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SGET54 checks a generalized decomposition of the form
-*
-* A = U*S*V' and B = U*T* V'
-*
-* where ' means transpose and U and V are orthogonal.
-*
-* Specifically,
-*
-* RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp )
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, SGET54 does nothing.
-* It must be at least zero.
-*
-* A (input) REAL array, dimension (LDA, N)
-* The original (unfactored) matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) REAL array, dimension (LDB, N)
-* The original (unfactored) matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* S (input) REAL array, dimension (LDS, N)
-* The factored matrix S.
-*
-* LDS (input) INTEGER
-* The leading dimension of S. It must be at least 1
-* and at least N.
-*
-* T (input) REAL array, dimension (LDT, N)
-* The factored matrix T.
-*
-* LDT (input) INTEGER
-* The leading dimension of T. It must be at least 1
-* and at least N.
-*
-* U (input) REAL array, dimension (LDU, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) REAL array, dimension (LDV, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* WORK (workspace) REAL array, dimension (3*N**2)
-*
-* RESULT (output) REAL
-* The value RESULT, It is currently limited to 1/ulp, to
-* avoid overflow. Errors are flagged by RESULT=10/ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sglmts.f b/TESTING/EIG/sglmts.f
index 536cdf72..41655718 100644
--- a/TESTING/EIG/sglmts.f
+++ b/TESTING/EIG/sglmts.f
@@ -1,76 +1,169 @@
- SUBROUTINE SGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF,
- $ X, U, WORK, LWORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, P, N
- REAL RESULT
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), B( LDB, * ),
- $ BF( LDB, * ), RWORK( * ), D( * ), DF( * ),
- $ U( * ), WORK( LWORK ), X( * )
-*
+*> \brief \b SGLMTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF,
+* X, U, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, P, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), RWORK( * ), D( * ), DF( * ),
+* $ U( * ), WORK( LWORK ), X( * )
+*
* Purpose
* =======
*
-* SGLMTS tests SGGGLM - a subroutine for solving the generalized
-* linear model problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGLMTS tests SGGGLM - a subroutine for solving the generalized
+*> linear model problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
-*
-* A (input) REAL array, dimension (LDA,M)
-* The N-by-M matrix A.
-*
-* AF (workspace) REAL array, dimension (LDA,M)
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF. LDA >= max(M,N).
-*
-* B (input) REAL array, dimension (LDB,P)
-* The N-by-P matrix A.
-*
-* BF (workspace) REAL array, dimension (LDB,P)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF. LDB >= max(P,N).
-*
-* D (input) REAL array, dimension( N )
-* On input, the left hand side of the GLM.
-*
-* DF (workspace) REAL array, dimension( N )
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,M)
+*> The N-by-M matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF. LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,P)
+*> The N-by-P matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (LDB,P)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF. LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension( N )
+*> On input, the left hand side of the GLM.
+*> \endverbatim
+*>
+*> \param[out] DF
+*> \verbatim
+*> DF is REAL array, dimension( N )
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension( M )
+*> solution vector X in the GLM problem.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension( P )
+*> solution vector U in the GLM problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> The test ratio:
+*> norm( d - A*x - B*u )
+*> RESULT = -----------------------------------------
+*> (norm(A)+norm(B))*(norm(x)+norm(u))*EPS
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (output) REAL array, dimension( M )
-* solution vector X in the GLM problem.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (output) REAL array, dimension( P )
-* solution vector U in the GLM problem.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_eig
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF,
+ $ X, U, WORK, LWORK, RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL
-* The test ratio:
-* norm( d - A*x - B*u )
-* RESULT = -----------------------------------------
-* (norm(A)+norm(B))*(norm(x)+norm(u))*EPS
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, P, N
+ REAL RESULT
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+ $ BF( LDB, * ), RWORK( * ), D( * ), DF( * ),
+ $ U( * ), WORK( LWORK ), X( * )
*
* ====================================================================
*
diff --git a/TESTING/EIG/sgqrts.f b/TESTING/EIG/sgqrts.f
index 3622d4f8..0fa14d47 100644
--- a/TESTING/EIG/sgqrts.f
+++ b/TESTING/EIG/sgqrts.f
@@ -1,9 +1,187 @@
+*> \brief \b SGQRTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGQRTS( N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
+* BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, P, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), R( LDA, * ),
+* $ Q( LDA, * ), B( LDB, * ), BF( LDB, * ),
+* $ T( LDB, * ), Z( LDB, * ), BWK( LDB, * ),
+* $ TAUA( * ), TAUB( * ), RESULT( 4 ),
+* $ RWORK( * ), WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGQRTS tests SGGQRF, which computes the GQR factorization of an
+*> N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,M)
+*> The N-by-M matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by SGGQRF, see SGGQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> The M-by-M orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (LDA,MAX(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, R and Q.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGGQRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,P)
+*> On entry, the N-by-P matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (LDB,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by SGGQRF, see SGGQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDB,P)
+*> The P-by-P orthogonal matrix Z.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDB,max(P,N))
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is REAL array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, Z and T.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is REAL array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGGRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK, LWORK >= max(N,M,P)**2.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(N,M,P))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - Q'*Q ) / ( M*ULP )
+*> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGQRTS( N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
$ BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, P, N
@@ -16,80 +194,6 @@
$ RWORK( * ), WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* SGQRTS tests SGGQRF, which computes the GQR factorization of an
-* N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
-*
-* A (input) REAL array, dimension (LDA,M)
-* The N-by-M matrix A.
-*
-* AF (output) REAL array, dimension (LDA,N)
-* Details of the GQR factorization of A and B, as returned
-* by SGGQRF, see SGGQRF for further details.
-*
-* Q (output) REAL array, dimension (LDA,N)
-* The M-by-M orthogonal matrix Q.
-*
-* R (workspace) REAL array, dimension (LDA,MAX(M,N))
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, R and Q.
-* LDA >= max(M,N).
-*
-* TAUA (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGGQRF.
-*
-* B (input) REAL array, dimension (LDB,P)
-* On entry, the N-by-P matrix A.
-*
-* BF (output) REAL array, dimension (LDB,N)
-* Details of the GQR factorization of A and B, as returned
-* by SGGQRF, see SGGQRF for further details.
-*
-* Z (output) REAL array, dimension (LDB,P)
-* The P-by-P orthogonal matrix Z.
-*
-* T (workspace) REAL array, dimension (LDB,max(P,N))
-*
-* BWK (workspace) REAL array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, Z and T.
-* LDB >= max(P,N).
-*
-* TAUB (output) REAL array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGGRQF.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK, LWORK >= max(N,M,P)**2.
-*
-* RWORK (workspace) REAL array, dimension (max(N,M,P))
-*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - Q'*Q ) / ( M*ULP )
-* RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sgrqts.f b/TESTING/EIG/sgrqts.f
index df591c90..aae24a0f 100644
--- a/TESTING/EIG/sgrqts.f
+++ b/TESTING/EIG/sgrqts.f
@@ -1,9 +1,188 @@
+*> \brief \b SGRQTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGRQTS( M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
+* BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, P, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), R( LDA, * ),
+* $ Q( LDA, * ),
+* $ B( LDB, * ), BF( LDB, * ), T( LDB, * ),
+* $ Z( LDB, * ), BWK( LDB, * ),
+* $ TAUA( * ), TAUB( * ),
+* $ RESULT( 4 ), RWORK( * ), WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGRQTS tests SGGRQF, which computes the GRQ factorization of an
+*> M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the GRQ factorization of A and B, as returned
+*> by SGGRQF, see SGGRQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> The N-by-N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (LDA,MAX(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, R and Q.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGGQRC.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> On entry, the P-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (LDB,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by SGGRQF, see SGGRQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDB,P)
+*> The P-by-P orthogonal matrix Z.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is REAL array, dimension (LDB,max(P,N))
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is REAL array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, Z and T.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is REAL array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGGRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK, LWORK >= max(M,P,N)**2.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - Q'*Q ) / ( N*ULP )
+*> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGRQTS( M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
$ BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, P, N
@@ -17,80 +196,6 @@
$ RESULT( 4 ), RWORK( * ), WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* SGRQTS tests SGGRQF, which computes the GRQ factorization of an
-* M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* AF (output) REAL array, dimension (LDA,N)
-* Details of the GRQ factorization of A and B, as returned
-* by SGGRQF, see SGGRQF for further details.
-*
-* Q (output) REAL array, dimension (LDA,N)
-* The N-by-N orthogonal matrix Q.
-*
-* R (workspace) REAL array, dimension (LDA,MAX(M,N))
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, R and Q.
-* LDA >= max(M,N).
-*
-* TAUA (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGGQRC.
-*
-* B (input) REAL array, dimension (LDB,N)
-* On entry, the P-by-N matrix A.
-*
-* BF (output) REAL array, dimension (LDB,N)
-* Details of the GQR factorization of A and B, as returned
-* by SGGRQF, see SGGRQF for further details.
-*
-* Z (output) REAL array, dimension (LDB,P)
-* The P-by-P orthogonal matrix Z.
-*
-* T (workspace) REAL array, dimension (LDB,max(P,N))
-*
-* BWK (workspace) REAL array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, Z and T.
-* LDB >= max(P,N).
-*
-* TAUB (output) REAL array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGGRQF.
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK, LWORK >= max(M,P,N)**2.
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - Q'*Q ) / ( N*ULP )
-* RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sgsvts.f b/TESTING/EIG/sgsvts.f
index 37c18adc..14418f54 100644
--- a/TESTING/EIG/sgsvts.f
+++ b/TESTING/EIG/sgsvts.f
@@ -1,10 +1,222 @@
+*> \brief \b SGSVTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGSVTS( M, P, N, A, AF, LDA, B, BF, LDB, U, LDU, V,
+* LDV, Q, LDQ, ALPHA, BETA, R, LDR, IWORK, WORK,
+* LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDQ, LDR, LDU, LDV, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* REAL A( LDA, * ), AF( LDA, * ), ALPHA( * ),
+* $ B( LDB, * ), BETA( * ), BF( LDB, * ),
+* $ Q( LDQ, * ), R( LDR, * ), RESULT( 6 ),
+* $ RWORK( * ), U( LDU, * ), V( LDV, * ),
+* $ WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGSVTS tests SGGSVD, which computes the GSVD of an M-by-N matrix A
+*> and a P-by-N matrix B:
+*> U'*A*Q = D1*R and V'*B*Q = D2*R.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,M)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the GSVD of A and B, as returned by SGGSVD,
+*> see SGGSVD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> LDA >= max( 1,M ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,P)
+*> On entry, the P-by-N matrix B.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (LDB,N)
+*> Details of the GSVD of A and B, as returned by SGGSVD,
+*> see SGGSVD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B and BF.
+*> LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is REAL array, dimension(LDU,M)
+*> The M by M orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is REAL array, dimension(LDV,M)
+*> The P by P orthogonal matrix V.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension(LDQ,N)
+*> The N by N orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is REAL array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The generalized singular value pairs of A and B, the
+*> ``diagonal'' matrices D1 and D2 are constructed from
+*> ALPHA and BETA, see subroutine SGGSVD for details.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension(LDQ,N)
+*> The upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDR
+*> \verbatim
+*> LDR is INTEGER
+*> The leading dimension of the array R. LDR >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK,
+*> LWORK >= max(M,P,N)*max(M,P,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(M,P,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (6)
+*> The test ratios:
+*> RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - U'*U ) / ( M*ULP )
+*> RESULT(4) = norm( I - V'*V ) / ( P*ULP )
+*> RESULT(5) = norm( I - Q'*Q ) / ( N*ULP )
+*> RESULT(6) = 0 if ALPHA is in decreasing order;
+*> = ULPINV otherwise.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SGSVTS( M, P, N, A, AF, LDA, B, BF, LDB, U, LDU, V,
$ LDV, Q, LDQ, ALPHA, BETA, R, LDR, IWORK, WORK,
$ LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LDQ, LDR, LDU, LDV, LWORK, M, N, P
@@ -18,97 +230,6 @@
$ WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* SGSVTS tests SGGSVD, which computes the GSVD of an M-by-N matrix A
-* and a P-by-N matrix B:
-* U'*A*Q = D1*R and V'*B*Q = D2*R.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,M)
-* The M-by-N matrix A.
-*
-* AF (output) REAL array, dimension (LDA,N)
-* Details of the GSVD of A and B, as returned by SGGSVD,
-* see SGGSVD for further details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
-* LDA >= max( 1,M ).
-*
-* B (input) REAL array, dimension (LDB,P)
-* On entry, the P-by-N matrix B.
-*
-* BF (output) REAL array, dimension (LDB,N)
-* Details of the GSVD of A and B, as returned by SGGSVD,
-* see SGGSVD for further details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B and BF.
-* LDB >= max(1,P).
-*
-* U (output) REAL array, dimension(LDU,M)
-* The M by M orthogonal matrix U.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
-*
-* V (output) REAL array, dimension(LDV,M)
-* The P by P orthogonal matrix V.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P).
-*
-* Q (output) REAL array, dimension(LDQ,N)
-* The N by N orthogonal matrix Q.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* ALPHA (output) REAL array, dimension (N)
-* BETA (output) REAL array, dimension (N)
-* The generalized singular value pairs of A and B, the
-* ``diagonal'' matrices D1 and D2 are constructed from
-* ALPHA and BETA, see subroutine SGGSVD for details.
-*
-* R (output) REAL array, dimension(LDQ,N)
-* The upper triangular matrix R.
-*
-* LDR (input) INTEGER
-* The leading dimension of the array R. LDR >= max(1,N).
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* WORK (workspace) REAL array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK,
-* LWORK >= max(M,P,N)*max(M,P,N).
-*
-* RWORK (workspace) REAL array, dimension (max(M,P,N))
-*
-* RESULT (output) REAL array, dimension (6)
-* The test ratios:
-* RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - U'*U ) / ( M*ULP )
-* RESULT(4) = norm( I - V'*V ) / ( P*ULP )
-* RESULT(5) = norm( I - Q'*Q ) / ( N*ULP )
-* RESULT(6) = 0 if ALPHA is in decreasing order;
-* = ULPINV otherwise.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/shst01.f b/TESTING/EIG/shst01.f
index 3c3b326b..b6937948 100644
--- a/TESTING/EIG/shst01.f
+++ b/TESTING/EIG/shst01.f
@@ -1,74 +1,154 @@
- SUBROUTINE SHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
- $ LWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
- $ RESULT( 2 ), WORK( LWORK )
-* ..
-*
+*> \brief \b SHST01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
+* LWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
+* $ RESULT( 2 ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SHST01 tests the reduction of a general matrix A to upper Hessenberg
-* form: A = Q*H*Q'. Two test ratios are computed;
-*
-* RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
-*
-* The matrix Q is assumed to be given explicitly as it would be
-* following SGEHRD + SORGHR.
-*
-* In this version, ILO and IHI are not used and are assumed to be 1 and
-* N, respectively.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SHST01 tests the reduction of a general matrix A to upper Hessenberg
+*> form: A = Q*H*Q'. Two test ratios are computed;
+*>
+*> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+*>
+*> The matrix Q is assumed to be given explicitly as it would be
+*> following SGEHRD + SORGHR.
+*>
+*> In this version, ILO and IHI are not used and are assumed to be 1 and
+*> N, respectively.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* A is assumed to be upper triangular in rows and columns
-* 1:ILO-1 and IHI+1:N, so Q differs from the identity only in
-* rows and columns ILO+1:IHI.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original n by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* H (input) REAL array, dimension (LDH,N)
-* The upper Hessenberg matrix H from the reduction A = Q*H*Q'
-* as computed by SGEHRD. H is assumed to be zero below the
-* first subdiagonal.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> \endverbatim
+*> \verbatim
+*> A is assumed to be upper triangular in rows and columns
+*> 1:ILO-1 and IHI+1:N, so Q differs from the identity only in
+*> rows and columns ILO+1:IHI.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original n by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is REAL array, dimension (LDH,N)
+*> The upper Hessenberg matrix H from the reduction A = Q*H*Q'
+*> as computed by SGEHRD. H is assumed to be zero below the
+*> first subdiagonal.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDQ,N)
+*> The orthogonal matrix Q from the reduction A = Q*H*Q' as
+*> computed by SGEHRD + SORGHR.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= 2*N*N.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Q (input) REAL array, dimension (LDQ,N)
-* The orthogonal matrix Q from the reduction A = Q*H*Q' as
-* computed by SGEHRD + SORGHR.
+*> \date November 2011
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+*> \ingroup single_eig
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE SHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
+ $ LWORK, RESULT )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= 2*N*N.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
+ $ RESULT( 2 ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/slafts.f b/TESTING/EIG/slafts.f
index d36e0e9d..1566b3dd 100644
--- a/TESTING/EIG/slafts.f
+++ b/TESTING/EIG/slafts.f
@@ -1,9 +1,118 @@
+*> \brief \b SLAFTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAFTS( TYPE, M, N, IMAT, NTESTS, RESULT, ISEED,
+* THRESH, IOUNIT, IE )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER IE, IMAT, IOUNIT, M, N, NTESTS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL RESULT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAFTS tests the result vector against the threshold value to
+*> see which tests for this matrix type failed to pass the threshold.
+*> Output is to the file given by unit IOUNIT.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> TYPE - CHARACTER*3
+*> On entry, TYPE specifies the matrix type to be used in the
+*> printed messages.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the test matrix.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IMAT - INTEGER
+*> On entry, IMAT specifies the type of the test matrix.
+*> A listing of the different types is printed by SLAHD2
+*> to the output file if a test fails to pass the threshold.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTESTS - INTEGER
+*> On entry, NTESTS is the number of tests performed on the
+*> subroutines in the path given by TYPE.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT - REAL array of dimension( NTESTS )
+*> On entry, RESULT contains the test ratios from the tests
+*> performed in the calling program.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED - INTEGER array of dimension( 4 )
+*> Contains the random seed that generated the matrix used
+*> for the tests whose ratios are in RESULT.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH - REAL
+*> On entry, THRESH specifies the acceptable threshold of the
+*> test ratios. If RESULT( K ) > THRESH, then the K-th test
+*> did not pass the threshold and a message will be printed.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IOUNIT - INTEGER
+*> On entry, IOUNIT specifies the unit number of the file
+*> to which the messages are printed.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IE - INTEGER
+*> On entry, IE contains the number of tests which have
+*> failed to pass the threshold so far.
+*> Updated on exit if any of the ratios in RESULT also fail.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SLAFTS( TYPE, M, N, IMAT, NTESTS, RESULT, ISEED,
$ THRESH, IOUNIT, IE )
*
-* -- LAPACK auxiliary test routine (version 3.1.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK test routine (version 3.1.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER*3 TYPE
@@ -15,62 +124,6 @@
REAL RESULT( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAFTS tests the result vector against the threshold value to
-* see which tests for this matrix type failed to pass the threshold.
-* Output is to the file given by unit IOUNIT.
-*
-* Arguments
-* =========
-*
-* TYPE - CHARACTER*3
-* On entry, TYPE specifies the matrix type to be used in the
-* printed messages.
-* Not modified.
-*
-* N - INTEGER
-* On entry, N specifies the order of the test matrix.
-* Not modified.
-*
-* IMAT - INTEGER
-* On entry, IMAT specifies the type of the test matrix.
-* A listing of the different types is printed by SLAHD2
-* to the output file if a test fails to pass the threshold.
-* Not modified.
-*
-* NTESTS - INTEGER
-* On entry, NTESTS is the number of tests performed on the
-* subroutines in the path given by TYPE.
-* Not modified.
-*
-* RESULT - REAL array of dimension( NTESTS )
-* On entry, RESULT contains the test ratios from the tests
-* performed in the calling program.
-* Not modified.
-*
-* ISEED - INTEGER array of dimension( 4 )
-* Contains the random seed that generated the matrix used
-* for the tests whose ratios are in RESULT.
-* Not modified.
-*
-* THRESH - REAL
-* On entry, THRESH specifies the acceptable threshold of the
-* test ratios. If RESULT( K ) > THRESH, then the K-th test
-* did not pass the threshold and a message will be printed.
-* Not modified.
-*
-* IOUNIT - INTEGER
-* On entry, IOUNIT specifies the unit number of the file
-* to which the messages are printed.
-* Not modified.
-*
-* IE - INTEGER
-* On entry, IE contains the number of tests which have
-* failed to pass the threshold so far.
-* Updated on exit if any of the ratios in RESULT also fail.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/TESTING/EIG/slahd2.f b/TESTING/EIG/slahd2.f
index 56045106..325a9731 100644
--- a/TESTING/EIG/slahd2.f
+++ b/TESTING/EIG/slahd2.f
@@ -1,38 +1,83 @@
- SUBROUTINE SLAHD2( IOUNIT, PATH )
+*> \brief \b SLAHD2
*
-* -- LAPACK auxiliary test routine (version 2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER IOUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLAHD2( IOUNIT, PATH )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER IOUNIT
+* ..
+*
* Purpose
* =======
*
-* SLAHD2 prints header information for the different test paths.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAHD2 prints header information for the different test paths.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IOUNIT (input) INTEGER.
-* On entry, IOUNIT specifies the unit number to which the
-* header information should be printed.
+*> \param[in] IOUNIT
+*> \verbatim
+*> IOUNIT is INTEGER.
+*> On entry, IOUNIT specifies the unit number to which the
+*> header information should be printed.
+*> \endverbatim
+*>
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3.
+*> On entry, PATH contains the name of the path for which the
+*> header information is to be printed. Current paths are
+*> \endverbatim
+*> \verbatim
+*> SHS, CHS: Non-symmetric eigenproblem.
+*> SST, CST: Symmetric eigenproblem.
+*> SSG, CSG: Symmetric Generalized eigenproblem.
+*> SBD, CBD: Singular Value Decomposition (SVD)
+*> SBB, CBB: General Banded reduction to bidiagonal form
+*> \endverbatim
+*> \verbatim
+*> These paths also are supplied in double precision (replace
+*> leading S by D and leading C by Z in path names).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* PATH (input) CHARACTER*3.
-* On entry, PATH contains the name of the path for which the
-* header information is to be printed. Current paths are
+*> \date November 2011
*
-* SHS, CHS: Non-symmetric eigenproblem.
-* SST, CST: Symmetric eigenproblem.
-* SSG, CSG: Symmetric Generalized eigenproblem.
-* SBD, CBD: Singular Value Decomposition (SVD)
-* SBB, CBB: General Banded reduction to bidiagonal form
+*> \ingroup single_eig
*
-* These paths also are supplied in double precision (replace
-* leading S by D and leading C by Z in path names).
+* =====================================================================
+ SUBROUTINE SLAHD2( IOUNIT, PATH )
+*
+* -- LAPACK test routine (version 2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER IOUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/slarfy.f b/TESTING/EIG/slarfy.f
index 05a74d75..56b7b860 100644
--- a/TESTING/EIG/slarfy.f
+++ b/TESTING/EIG/slarfy.f
@@ -1,63 +1,128 @@
- SUBROUTINE SLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INCV, LDC, N
- REAL TAU
-* ..
-* .. Array Arguments ..
- REAL C( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b SLARFY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCV, LDC, N
+* REAL TAU
+* ..
+* .. Array Arguments ..
+* REAL C( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLARFY applies an elementary reflector, or Householder matrix, H,
-* to an n x n symmetric matrix C, from both the left and the right.
-*
-* H is represented in the form
-*
-* H = I - tau * v * v'
-*
-* where tau is a scalar and v is a vector.
-*
-* If tau is zero, then H is taken to be the unit matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARFY applies an elementary reflector, or Householder matrix, H,
+*> to an n x n symmetric matrix C, from both the left and the right.
+*>
+*> H is represented in the form
+*>
+*> H = I - tau * v * v'
+*>
+*> where tau is a scalar and v is a vector.
+*>
+*> If tau is zero, then H is taken to be the unit matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix C is stored.
-* = 'U': Upper triangle
-* = 'L': Lower triangle
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix C. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix C is stored.
+*> = 'U': Upper triangle
+*> = 'L': Lower triangle
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension
+*> (1 + (N-1)*abs(INCV))
+*> The vector v as described above.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between successive elements of v. INCV must
+*> not be zero.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL
+*> The value tau as described above.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC, N)
+*> On entry, the matrix C.
+*> On exit, C is overwritten by H * C * H'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* V (input) REAL array, dimension
-* (1 + (N-1)*abs(INCV))
-* The vector v as described above.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCV (input) INTEGER
-* The increment between successive elements of v. INCV must
-* not be zero.
+*> \date November 2011
*
-* TAU (input) REAL
-* The value tau as described above.
+*> \ingroup single_eig
*
-* C (input/output) REAL array, dimension (LDC, N)
-* On entry, the matrix C.
-* On exit, C is overwritten by H * C * H'.
+* =====================================================================
+ SUBROUTINE SLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max( 1, N ).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension (N)
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INCV, LDC, N
+ REAL TAU
+* ..
+* .. Array Arguments ..
+ REAL C( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/slarhs.f b/TESTING/EIG/slarhs.f
index 7d1996c9..d6df8fd2 100644
--- a/TESTING/EIG/slarhs.f
+++ b/TESTING/EIG/slarhs.f
@@ -1,9 +1,217 @@
+*> \brief \b SLARHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
+* A, LDA, X, LDX, B, LDB, ISEED, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, UPLO, XTYPE
+* CHARACTER*3 PATH
+* INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARHS chooses a set of NRHS random solution vectors and sets
+*> up the right hand sides for the linear system
+*> op( A ) * X = B,
+*> where op( A ) may be A or A' (transpose of A).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The type of the real matrix A. PATH may be given in any
+*> combination of upper and lower case. Valid types include
+*> xGE: General m x n matrix
+*> xGB: General banded matrix
+*> xPO: Symmetric positive definite, 2-D storage
+*> xPP: Symmetric positive definite packed
+*> xPB: Symmetric positive definite banded
+*> xSY: Symmetric indefinite, 2-D storage
+*> xSP: Symmetric indefinite packed
+*> xSB: Symmetric indefinite banded
+*> xTR: Triangular
+*> xTP: Triangular packed
+*> xTB: Triangular banded
+*> xQR: General m x n matrix
+*> xLQ: General m x n matrix
+*> xQL: General m x n matrix
+*> xRQ: General m x n matrix
+*> where the leading character indicates the precision.
+*> \endverbatim
+*>
+*> \param[in] XTYPE
+*> \verbatim
+*> XTYPE is CHARACTER*1
+*> Specifies how the exact solution X will be determined:
+*> = 'N': New solution; generate a random X.
+*> = 'C': Computed; use value of X on entry.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> matrix A is stored, if A is symmetric.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to the matrix A.
+*> = 'N': System is A * x = b
+*> = 'T': System is A'* x = b
+*> = 'C': System is A'* x = b
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number or rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Used only if A is a band matrix; specifies the number of
+*> subdiagonals of A if A is a general band matrix or if A is
+*> symmetric or triangular and UPLO = 'L'; specifies the number
+*> of superdiagonals of A if A is symmetric or triangular and
+*> UPLO = 'U'. 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Used only if A is a general band matrix or if A is
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xGB, specifies the number of superdiagonals of A,
+*> and 0 <= KU <= N-1.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xTR, xTP, or xTB, specifies whether or not the
+*> matrix has unit diagonal:
+*> = 1: matrix has non-unit diagonal (default)
+*> = 2: matrix has unit diagonal
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors in the system A*X = B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The test matrix whose type is given by PATH.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If PATH = xGB, LDA >= KL+KU+1.
+*> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
+*> Otherwise, LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is or output) REAL array, dimension(LDX,NRHS)
+*> On entry, if XTYPE = 'C' (for 'Computed'), then X contains
+*> the exact solution to the system of linear equations.
+*> On exit, if XTYPE = 'N' (for 'New'), then X is initialized
+*> with random values.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vector(s) for the system of equations,
+*> computed from B = op(A) * X, where op(A) is determined by
+*> TRANS.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. If TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> SLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
$ A, LDA, X, LDX, B, LDB, ISEED, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS, UPLO, XTYPE
@@ -15,118 +223,6 @@
REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SLARHS chooses a set of NRHS random solution vectors and sets
-* up the right hand sides for the linear system
-* op( A ) * X = B,
-* where op( A ) may be A or A' (transpose of A).
-*
-* Arguments
-* =========
-*
-* PATH (input) CHARACTER*3
-* The type of the real matrix A. PATH may be given in any
-* combination of upper and lower case. Valid types include
-* xGE: General m x n matrix
-* xGB: General banded matrix
-* xPO: Symmetric positive definite, 2-D storage
-* xPP: Symmetric positive definite packed
-* xPB: Symmetric positive definite banded
-* xSY: Symmetric indefinite, 2-D storage
-* xSP: Symmetric indefinite packed
-* xSB: Symmetric indefinite banded
-* xTR: Triangular
-* xTP: Triangular packed
-* xTB: Triangular banded
-* xQR: General m x n matrix
-* xLQ: General m x n matrix
-* xQL: General m x n matrix
-* xRQ: General m x n matrix
-* where the leading character indicates the precision.
-*
-* XTYPE (input) CHARACTER*1
-* Specifies how the exact solution X will be determined:
-* = 'N': New solution; generate a random X.
-* = 'C': Computed; use value of X on entry.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* matrix A is stored, if A is symmetric.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to the matrix A.
-* = 'N': System is A * x = b
-* = 'T': System is A'* x = b
-* = 'C': System is A'* x = b
-*
-* M (input) INTEGER
-* The number or rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* Used only if A is a band matrix; specifies the number of
-* subdiagonals of A if A is a general band matrix or if A is
-* symmetric or triangular and UPLO = 'L'; specifies the number
-* of superdiagonals of A if A is symmetric or triangular and
-* UPLO = 'U'. 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* Used only if A is a general band matrix or if A is
-* triangular.
-*
-* If PATH = xGB, specifies the number of superdiagonals of A,
-* and 0 <= KU <= N-1.
-*
-* If PATH = xTR, xTP, or xTB, specifies whether or not the
-* matrix has unit diagonal:
-* = 1: matrix has non-unit diagonal (default)
-* = 2: matrix has unit diagonal
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors in the system A*X = B.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The test matrix whose type is given by PATH.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If PATH = xGB, LDA >= KL+KU+1.
-* If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
-* Otherwise, LDA >= max(1,M).
-*
-* X (input or output) REAL array, dimension(LDX,NRHS)
-* On entry, if XTYPE = 'C' (for 'Computed'), then X contains
-* the exact solution to the system of linear equations.
-* On exit, if XTYPE = 'N' (for 'New'), then X is initialized
-* with random values.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
-*
-* B (output) REAL array, dimension (LDB,NRHS)
-* The right hand side vector(s) for the system of equations,
-* computed from B = op(A) * X, where op(A) is determined by
-* TRANS.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. If TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* SLATMS). Modified on exit.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/slasum.f b/TESTING/EIG/slasum.f
index fb36d1de..b2e22e15 100644
--- a/TESTING/EIG/slasum.f
+++ b/TESTING/EIG/slasum.f
@@ -1,22 +1,57 @@
- SUBROUTINE SLASUM( TYPE, IOUNIT, IE, NRUN )
+*> \brief \b SLASUM
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 TYPE
- INTEGER IE, IOUNIT, NRUN
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SLASUM( TYPE, IOUNIT, IE, NRUN )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER IE, IOUNIT, NRUN
+* ..
+*
* Purpose
* =======
*
-* SLASUM prints a summary of the results from one of the test routines.
+*\details \b Purpose:
+*\verbatim
+*
+* SLASUM prints a summary of the results from one of the test routines.
+*
+* =====================================================================
+*
+* Authors
+* =======
+*
+* \author Univ. of Tennessee
+* \author Univ. of California Berkeley
+* \author Univ. of Colorado Denver
+* \author NAG Ltd.
+*
+* \date November 2011
+*
+* \ingroup single_eig
*
* =====================================================================
+ SUBROUTINE SLASUM( TYPE, IOUNIT, IE, NRUN )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 TYPE
+ INTEGER IE, IOUNIT, NRUN
+* ..
+*
*
-* .. Executable Statements ..
+* .. Executable Statements ..
*
IF( IE.GT.0 ) THEN
WRITE( IOUNIT, FMT = 9999 )TYPE, ': ', IE, ' out of ', NRUN,
@@ -29,6 +64,6 @@
9998 FORMAT( / 1X, A14, A3, A24, I5, A11 )
RETURN
*
-* End of SLASUM
+* End of SLASUM
*
END
diff --git a/TESTING/EIG/slatb9.f b/TESTING/EIG/slatb9.f
index 0bda052e..db2f8307 100644
--- a/TESTING/EIG/slatb9.f
+++ b/TESTING/EIG/slatb9.f
@@ -1,66 +1,140 @@
- SUBROUTINE SLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA,
- $ KLB, KUB, ANORM, BNORM, MODEA, MODEB,
- $ CNDNMA, CNDNMB, DISTA, DISTB )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DISTA, DISTB, TYPE
- CHARACTER*3 PATH
- INTEGER IMAT, KLA, KUA, KLB, KUB, M, P, MODEA, MODEB, N
- REAL ANORM, BNORM, CNDNMA, CNDNMB
-* ..
-*
+*> \brief \b SLATB9
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA,
+* KLB, KUB, ANORM, BNORM, MODEA, MODEB,
+* CNDNMA, CNDNMB, DISTA, DISTB )
+*
+* .. Scalar Arguments ..
+* CHARACTER DISTA, DISTB, TYPE
+* CHARACTER*3 PATH
+* INTEGER IMAT, KLA, KUA, KLB, KUB, M, P, MODEA, MODEB, N
+* REAL ANORM, BNORM, CNDNMA, CNDNMB
+* ..
+*
* Purpose
* =======
*
-* SLATB9 sets parameters for the matrix generator based on the type of
-* matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATB9 sets parameters for the matrix generator based on the type of
+*> matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* M (input) INTEGER
-* The number of rows in the matrix to be generated.
-*
-* N (input) INTEGER
-* The number of columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix;
-* = 'P': symmetric positive (semi)definite matrix;
-* = 'N': nonsymmetric matrix.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix;
+*> = 'P': symmetric positive (semi)definite matrix;
+*> = 'N': nonsymmetric matrix.
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is REAL
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) REAL
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup single_eig
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE SLATB9( PATH, IMAT, M, P, N, TYPE, KLA, KUA,
+ $ KLB, KUB, ANORM, BNORM, MODEA, MODEB,
+ $ CNDNMA, CNDNMB, DISTA, DISTB )
*
-* CNDNUM (output) REAL
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ CHARACTER DISTA, DISTB, TYPE
+ CHARACTER*3 PATH
+ INTEGER IMAT, KLA, KUA, KLB, KUB, M, P, MODEA, MODEB, N
+ REAL ANORM, BNORM, CNDNMA, CNDNMB
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/slatm4.f b/TESTING/EIG/slatm4.f
index fdd4eb50..d3ea61e3 100644
--- a/TESTING/EIG/slatm4.f
+++ b/TESTING/EIG/slatm4.f
@@ -1,9 +1,188 @@
+*> \brief \b SLATM4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATM4( ITYPE, N, NZ1, NZ2, ISIGN, AMAGN, RCOND,
+* TRIANG, IDIST, ISEED, A, LDA )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, ISIGN, ITYPE, LDA, N, NZ1, NZ2
+* REAL AMAGN, RCOND, TRIANG
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATM4 generates basic square matrices, which may later be
+*> multiplied by others in order to produce test matrices. It is
+*> intended mainly to be used to test the generalized eigenvalue
+*> routines.
+*>
+*> It first generates the diagonal and (possibly) subdiagonal,
+*> according to the value of ITYPE, NZ1, NZ2, ISIGN, AMAGN, and RCOND.
+*> It then fills in the upper triangle with random numbers, if TRIANG is
+*> non-zero.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> The "type" of matrix on the diagonal and sub-diagonal.
+*> If ITYPE < 0, then type abs(ITYPE) is generated and then
+*> swapped end for end (A(I,J) := A'(N-J,N-I).) See also
+*> the description of AMAGN and ISIGN.
+*> \endverbatim
+*> \verbatim
+*> Special types:
+*> = 0: the zero matrix.
+*> = 1: the identity.
+*> = 2: a transposed Jordan block.
+*> = 3: If N is odd, then a k+1 x k+1 transposed Jordan block
+*> followed by a k x k identity block, where k=(N-1)/2.
+*> If N is even, then k=(N-2)/2, and a zero diagonal entry
+*> is tacked onto the end.
+*> \endverbatim
+*> \verbatim
+*> Diagonal types. The diagonal consists of NZ1 zeros, then
+*> k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE
+*> specifies the nonzero diagonal entries as follows:
+*> = 4: 1, ..., k
+*> = 5: 1, RCOND, ..., RCOND
+*> = 6: 1, ..., 1, RCOND
+*> = 7: 1, a, a^2, ..., a^(k-1)=RCOND
+*> = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND
+*> = 9: random numbers chosen from (RCOND,1)
+*> = 10: random numbers with distribution IDIST (see SLARND.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] NZ1
+*> \verbatim
+*> NZ1 is INTEGER
+*> If abs(ITYPE) > 3, then the first NZ1 diagonal entries will
+*> be zero.
+*> \endverbatim
+*>
+*> \param[in] NZ2
+*> \verbatim
+*> NZ2 is INTEGER
+*> If abs(ITYPE) > 3, then the last NZ2 diagonal entries will
+*> be zero.
+*> \endverbatim
+*>
+*> \param[in] ISIGN
+*> \verbatim
+*> ISIGN is INTEGER
+*> = 0: The sign of the diagonal and subdiagonal entries will
+*> be left unchanged.
+*> = 1: The diagonal and subdiagonal entries will have their
+*> sign changed at random.
+*> = 2: If ITYPE is 2 or 3, then the same as ISIGN=1.
+*> Otherwise, with probability 0.5, odd-even pairs of
+*> diagonal entries A(2*j-1,2*j-1), A(2*j,2*j) will be
+*> converted to a 2x2 block by pre- and post-multiplying
+*> by distinct random orthogonal rotations. The remaining
+*> diagonal entries will have their sign changed at random.
+*> \endverbatim
+*>
+*> \param[in] AMAGN
+*> \verbatim
+*> AMAGN is REAL
+*> The diagonal and subdiagonal entries will be multiplied by
+*> AMAGN.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> If abs(ITYPE) > 4, then the smallest diagonal entry will be
+*> entry will be RCOND. RCOND must be between 0 and 1.
+*> \endverbatim
+*>
+*> \param[in] TRIANG
+*> \verbatim
+*> TRIANG is REAL
+*> The entries above the diagonal will be random numbers with
+*> magnitude bounded by TRIANG (i.e., random numbers multiplied
+*> by TRIANG.)
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the type of distribution to be used to generate a
+*> random matrix.
+*> = 1: UNIFORM( 0, 1 )
+*> = 2: UNIFORM( -1, 1 )
+*> = 3: NORMAL ( 0, 1 )
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The values of ISEED are changed on exit, and can
+*> be used in the next call to SLATM4 to continue the same
+*> random number sequence.
+*> Note: ISEED(4) should be odd, for the random number generator
+*> used at present.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> Array to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A. Must be at least 1 and at least N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SLATM4( ITYPE, N, NZ1, NZ2, ISIGN, AMAGN, RCOND,
$ TRIANG, IDIST, ISEED, A, LDA )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IDIST, ISIGN, ITYPE, LDA, N, NZ1, NZ2
@@ -14,105 +193,6 @@
REAL A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* SLATM4 generates basic square matrices, which may later be
-* multiplied by others in order to produce test matrices. It is
-* intended mainly to be used to test the generalized eigenvalue
-* routines.
-*
-* It first generates the diagonal and (possibly) subdiagonal,
-* according to the value of ITYPE, NZ1, NZ2, ISIGN, AMAGN, and RCOND.
-* It then fills in the upper triangle with random numbers, if TRIANG is
-* non-zero.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* The "type" of matrix on the diagonal and sub-diagonal.
-* If ITYPE < 0, then type abs(ITYPE) is generated and then
-* swapped end for end (A(I,J) := A'(N-J,N-I).) See also
-* the description of AMAGN and ISIGN.
-*
-* Special types:
-* = 0: the zero matrix.
-* = 1: the identity.
-* = 2: a transposed Jordan block.
-* = 3: If N is odd, then a k+1 x k+1 transposed Jordan block
-* followed by a k x k identity block, where k=(N-1)/2.
-* If N is even, then k=(N-2)/2, and a zero diagonal entry
-* is tacked onto the end.
-*
-* Diagonal types. The diagonal consists of NZ1 zeros, then
-* k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE
-* specifies the nonzero diagonal entries as follows:
-* = 4: 1, ..., k
-* = 5: 1, RCOND, ..., RCOND
-* = 6: 1, ..., 1, RCOND
-* = 7: 1, a, a^2, ..., a^(k-1)=RCOND
-* = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND
-* = 9: random numbers chosen from (RCOND,1)
-* = 10: random numbers with distribution IDIST (see SLARND.)
-*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* NZ1 (input) INTEGER
-* If abs(ITYPE) > 3, then the first NZ1 diagonal entries will
-* be zero.
-*
-* NZ2 (input) INTEGER
-* If abs(ITYPE) > 3, then the last NZ2 diagonal entries will
-* be zero.
-*
-* ISIGN (input) INTEGER
-* = 0: The sign of the diagonal and subdiagonal entries will
-* be left unchanged.
-* = 1: The diagonal and subdiagonal entries will have their
-* sign changed at random.
-* = 2: If ITYPE is 2 or 3, then the same as ISIGN=1.
-* Otherwise, with probability 0.5, odd-even pairs of
-* diagonal entries A(2*j-1,2*j-1), A(2*j,2*j) will be
-* converted to a 2x2 block by pre- and post-multiplying
-* by distinct random orthogonal rotations. The remaining
-* diagonal entries will have their sign changed at random.
-*
-* AMAGN (input) REAL
-* The diagonal and subdiagonal entries will be multiplied by
-* AMAGN.
-*
-* RCOND (input) REAL
-* If abs(ITYPE) > 4, then the smallest diagonal entry will be
-* entry will be RCOND. RCOND must be between 0 and 1.
-*
-* TRIANG (input) REAL
-* The entries above the diagonal will be random numbers with
-* magnitude bounded by TRIANG (i.e., random numbers multiplied
-* by TRIANG.)
-*
-* IDIST (input) INTEGER
-* Specifies the type of distribution to be used to generate a
-* random matrix.
-* = 1: UNIFORM( 0, 1 )
-* = 2: UNIFORM( -1, 1 )
-* = 3: NORMAL ( 0, 1 )
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The values of ISEED are changed on exit, and can
-* be used in the next call to SLATM4 to continue the same
-* random number sequence.
-* Note: ISEED(4) should be odd, for the random number generator
-* used at present.
-*
-* A (output) REAL array, dimension (LDA, N)
-* Array to be computed.
-*
-* LDA (input) INTEGER
-* Leading dimension of A. Must be at least 1 and at least N.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/slctes.f b/TESTING/EIG/slctes.f
index d5288e2d..44ecb89f 100644
--- a/TESTING/EIG/slctes.f
+++ b/TESTING/EIG/slctes.f
@@ -1,38 +1,83 @@
- LOGICAL FUNCTION SLCTES( ZR, ZI, D )
+*> \brief \b SLCTES
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL D, ZI, ZR
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION SLCTES( ZR, ZI, D )
+*
+* .. Scalar Arguments ..
+* REAL D, ZI, ZR
+* ..
+*
* Purpose
* =======
*
-* SLCTES returns .TRUE. if the eigenvalue (ZR/D) + sqrt(-1)*(ZI/D)
-* is to be selected (specifically, in this subroutine, if the real
-* part of the eigenvalue is negative), and otherwise it returns
-* .FALSE..
-*
-* It is used by the test routine SDRGES to test whether the driver
-* routine SGGES succesfully sorts eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLCTES returns .TRUE. if the eigenvalue (ZR/D) + sqrt(-1)*(ZI/D)
+*> is to be selected (specifically, in this subroutine, if the real
+*> part of the eigenvalue is negative), and otherwise it returns
+*> .FALSE..
+*>
+*> It is used by the test routine SDRGES to test whether the driver
+*> routine SGGES succesfully sorts eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ZR (input) REAL
-* The numerator of the real part of a complex eigenvalue
-* (ZR/D) + i*(ZI/D).
+*> \param[in] ZR
+*> \verbatim
+*> ZR is REAL
+*> The numerator of the real part of a complex eigenvalue
+*> (ZR/D) + i*(ZI/D).
+*> \endverbatim
+*>
+*> \param[in] ZI
+*> \verbatim
+*> ZI is REAL
+*> The numerator of the imaginary part of a complex eigenvalue
+*> (ZR/D) + i*(ZI).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL
+*> The denominator part of a complex eigenvalue
+*> (ZR/D) + i*(ZI/D).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ZI (input) REAL
-* The numerator of the imaginary part of a complex eigenvalue
-* (ZR/D) + i*(ZI).
+*> \date November 2011
*
-* D (input) REAL
-* The denominator part of a complex eigenvalue
-* (ZR/D) + i*(ZI/D).
+*> \ingroup single_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION SLCTES( ZR, ZI, D )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL D, ZI, ZR
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/slctsx.f b/TESTING/EIG/slctsx.f
index 902046b1..286bf183 100644
--- a/TESTING/EIG/slctsx.f
+++ b/TESTING/EIG/slctsx.f
@@ -1,35 +1,80 @@
- LOGICAL FUNCTION SLCTSX( AR, AI, BETA )
+*> \brief \b SLCTSX
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL AI, AR, BETA
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION SLCTSX( AR, AI, BETA )
+*
+* .. Scalar Arguments ..
+* REAL AI, AR, BETA
+* ..
+*
* Purpose
* =======
*
-* This function is used to determine what eigenvalues will be
-* selected. If this is part of the test driver SDRGSX, do not
-* change the code UNLESS you are testing input examples and not
-* using the built-in examples.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This function is used to determine what eigenvalues will be
+*> selected. If this is part of the test driver SDRGSX, do not
+*> change the code UNLESS you are testing input examples and not
+*> using the built-in examples.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* AR (input) REAL
-* The numerator of the real part of a complex eigenvalue
-* (AR/BETA) + i*(AI/BETA).
+*> \param[in] AR
+*> \verbatim
+*> AR is REAL
+*> The numerator of the real part of a complex eigenvalue
+*> (AR/BETA) + i*(AI/BETA).
+*> \endverbatim
+*>
+*> \param[in] AI
+*> \verbatim
+*> AI is REAL
+*> The numerator of the imaginary part of a complex eigenvalue
+*> (AR/BETA) + i*(AI).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> The denominator part of a complex eigenvalue
+*> (AR/BETA) + i*(AI/BETA).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AI (input) REAL
-* The numerator of the imaginary part of a complex eigenvalue
-* (AR/BETA) + i*(AI).
+*> \date November 2011
*
-* BETA (input) REAL
-* The denominator part of a complex eigenvalue
-* (AR/BETA) + i*(AI/BETA).
+*> \ingroup single_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION SLCTSX( AR, AI, BETA )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL AI, AR, BETA
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/slsets.f b/TESTING/EIG/slsets.f
index c6e619b8..c58f2246 100644
--- a/TESTING/EIG/slsets.f
+++ b/TESTING/EIG/slsets.f
@@ -1,79 +1,175 @@
- SUBROUTINE SLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF,
- $ D, DF, X, WORK, LWORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, P, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), B( LDB, * ),
- $ BF( LDB, * ), RESULT( 2 ), RWORK( * ),
- $ C( * ), D( * ), CF( * ), DF( * ),
- $ WORK( LWORK ), X( * )
-*
+*> \brief \b SLSETS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF,
+* D, DF, X, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, P, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), RESULT( 2 ), RWORK( * ),
+* $ C( * ), D( * ), CF( * ), DF( * ),
+* $ WORK( LWORK ), X( * )
+*
* Purpose
* =======
*
-* SLSETS tests SGGLSE - a subroutine for solving linear equality
-* constrained least square problem (LSE).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLSETS tests SGGLSE - a subroutine for solving linear equality
+*> constrained least square problem (LSE).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* AF (workspace) REAL array, dimension (LDA,N)
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
-*
-* B (input) REAL array, dimension (LDB,N)
-* The P-by-N matrix A.
-*
-* BF (workspace) REAL array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, V and S.
-* LDB >= max(P,N).
-*
-* C (input) REAL array, dimension( M )
-* the vector C in the LSE problem.
-*
-* CF (workspace) REAL array, dimension( M )
-*
-* D (input) REAL array, dimension( P )
-* the vector D in the LSE problem.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,N)
+*> The P-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is REAL array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, V and S.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is REAL array, dimension( M )
+*> the vector C in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] CF
+*> \verbatim
+*> CF is REAL array, dimension( M )
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension( P )
+*> the vector D in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] DF
+*> \verbatim
+*> DF is REAL array, dimension( P )
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension( N )
+*> solution vector X in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS
+*> RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DF (workspace) REAL array, dimension( P )
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (output) REAL array, dimension( N )
-* solution vector X in the LSE problem.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_eig
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF,
+ $ D, DF, X, WORK, LWORK, RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS
-* RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, P, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+ $ BF( LDB, * ), RESULT( 2 ), RWORK( * ),
+ $ C( * ), D( * ), CF( * ), DF( * ),
+ $ WORK( LWORK ), X( * )
*
* ====================================================================
*
diff --git a/TESTING/EIG/sort01.f b/TESTING/EIG/sort01.f
index 6e71c1a6..ee279573 100644
--- a/TESTING/EIG/sort01.f
+++ b/TESTING/EIG/sort01.f
@@ -1,71 +1,136 @@
- SUBROUTINE SORT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER ROWCOL
- INTEGER LDU, LWORK, M, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL U( LDU, * ), WORK( * )
-* ..
-*
+*> \brief \b SORT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SORT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER ROWCOL
+* INTEGER LDU, LWORK, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL U( LDU, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORT01 checks that the matrix U is orthogonal by computing the ratio
-*
-* RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
-* or
-* RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
-* Alternatively, if there isn't sufficient workspace to form
-* I - U*U' or I - U'*U, the ratio is computed as
-*
-* RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
-* or
-* RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
-* where EPS is the machine precision. ROWCOL is used only if m = n;
-* if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
-* assumed to be 'R'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORT01 checks that the matrix U is orthogonal by computing the ratio
+*>
+*> RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
+*> or
+*> RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
+*>
+*> Alternatively, if there isn't sufficient workspace to form
+*> I - U*U' or I - U'*U, the ratio is computed as
+*>
+*> RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
+*> or
+*> RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
+*>
+*> where EPS is the machine precision. ROWCOL is used only if m = n;
+*> if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
+*> assumed to be 'R'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ROWCOL (input) CHARACTER
-* Specifies whether the rows or columns of U should be checked
-* for orthogonality. Used only if M = N.
-* = 'R': Check for orthogonal rows of U
-* = 'C': Check for orthogonal columns of U
-*
-* M (input) INTEGER
-* The number of rows of the matrix U.
+*> \param[in] ROWCOL
+*> \verbatim
+*> ROWCOL is CHARACTER
+*> Specifies whether the rows or columns of U should be checked
+*> for orthogonality. Used only if M = N.
+*> = 'R': Check for orthogonal rows of U
+*> = 'C': Check for orthogonal columns of U
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix U.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix U.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,N)
+*> The orthogonal matrix U. U is checked for orthogonal columns
+*> if m > n or if m = n and ROWCOL = 'C'. U is checked for
+*> orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. For best performance, LWORK
+*> should be at least N*(N+1) if ROWCOL = 'C' or M*(M+1) if
+*> ROWCOL = 'R', but the test will be done even if LWORK is 0.
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
+*> RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix U.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (input) REAL array, dimension (LDU,N)
-* The orthogonal matrix U. U is checked for orthogonal columns
-* if m > n or if m = n and ROWCOL = 'C'. U is checked for
-* orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
+*> \date November 2011
*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
+*> \ingroup single_eig
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE SORT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RESID )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. For best performance, LWORK
-* should be at least N*(N+1) if ROWCOL = 'C' or M*(M+1) if
-* ROWCOL = 'R', but the test will be done even if LWORK is 0.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
-* RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
+* .. Scalar Arguments ..
+ CHARACTER ROWCOL
+ INTEGER LDU, LWORK, M, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL U( LDU, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sort03.f b/TESTING/EIG/sort03.f
index 5b500540..a7511bbd 100644
--- a/TESTING/EIG/sort03.f
+++ b/TESTING/EIG/sort03.f
@@ -1,95 +1,176 @@
- SUBROUTINE SORT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
- $ RESULT, INFO )
+*> \brief \b SORT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*( * ) RC
- INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
- REAL RESULT
-* ..
-* .. Array Arguments ..
- REAL U( LDU, * ), V( LDV, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SORT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
+* RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER*( * ) RC
+* INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
+* REAL RESULT
+* ..
+* .. Array Arguments ..
+* REAL U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SORT03 compares two orthogonal matrices U and V to see if their
-* corresponding rows or columns span the same spaces. The rows are
-* checked if RC = 'R', and the columns are checked if RC = 'C'.
-*
-* RESULT is the maximum of
-*
-* | V*V' - I | / ( MV ulp ), if RC = 'R', or
-*
-* | V'*V - I | / ( MV ulp ), if RC = 'C',
-*
-* and the maximum over rows (or columns) 1 to K of
-*
-* | U(i) - S*V(i) |/ ( N ulp )
-*
-* where S is +-1 (chosen to minimize the expression), U(i) is the i-th
-* row (column) of U, and V(i) is the i-th row (column) of V.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SORT03 compares two orthogonal matrices U and V to see if their
+*> corresponding rows or columns span the same spaces. The rows are
+*> checked if RC = 'R', and the columns are checked if RC = 'C'.
+*>
+*> RESULT is the maximum of
+*>
+*> | V*V' - I | / ( MV ulp ), if RC = 'R', or
+*>
+*> | V'*V - I | / ( MV ulp ), if RC = 'C',
+*>
+*> and the maximum over rows (or columns) 1 to K of
+*>
+*> | U(i) - S*V(i) |/ ( N ulp )
+*>
+*> where S is +-1 (chosen to minimize the expression), U(i) is the i-th
+*> row (column) of U, and V(i) is the i-th row (column) of V.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* RC (input) CHARACTER*1
-* If RC = 'R' the rows of U and V are to be compared.
-* If RC = 'C' the columns of U and V are to be compared.
-*
-* MU (input) INTEGER
-* The number of rows of U if RC = 'R', and the number of
-* columns if RC = 'C'. If MU = 0 SORT03 does nothing.
-* MU must be at least zero.
-*
-* MV (input) INTEGER
-* The number of rows of V if RC = 'R', and the number of
-* columns if RC = 'C'. If MV = 0 SORT03 does nothing.
-* MV must be at least zero.
-*
-* N (input) INTEGER
-* If RC = 'R', the number of columns in the matrices U and V,
-* and if RC = 'C', the number of rows in U and V. If N = 0
-* SORT03 does nothing. N must be at least zero.
-*
-* K (input) INTEGER
-* The number of rows or columns of U and V to compare.
-* 0 <= K <= max(MU,MV).
-*
-* U (input) REAL array, dimension (LDU,N)
-* The first matrix to compare. If RC = 'R', U is MU by N, and
-* if RC = 'C', U is N by MU.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. If RC = 'R', LDU >= max(1,MU),
-* and if RC = 'C', LDU >= max(1,N).
+* =========
+*
+*> \param[in] RC
+*> \verbatim
+*> RC is CHARACTER*1
+*> If RC = 'R' the rows of U and V are to be compared.
+*> If RC = 'C' the columns of U and V are to be compared.
+*> \endverbatim
+*>
+*> \param[in] MU
+*> \verbatim
+*> MU is INTEGER
+*> The number of rows of U if RC = 'R', and the number of
+*> columns if RC = 'C'. If MU = 0 SORT03 does nothing.
+*> MU must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> The number of rows of V if RC = 'R', and the number of
+*> columns if RC = 'C'. If MV = 0 SORT03 does nothing.
+*> MV must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> If RC = 'R', the number of columns in the matrices U and V,
+*> and if RC = 'C', the number of rows in U and V. If N = 0
+*> SORT03 does nothing. N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of rows or columns of U and V to compare.
+*> 0 <= K <= max(MU,MV).
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU,N)
+*> The first matrix to compare. If RC = 'R', U is MU by N, and
+*> if RC = 'C', U is N by MU.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. If RC = 'R', LDU >= max(1,MU),
+*> and if RC = 'C', LDU >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension (LDV,N)
+*> The second matrix to compare. If RC = 'R', V is MV by N, and
+*> if RC = 'C', V is N by MV.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. If RC = 'R', LDV >= max(1,MV),
+*> and if RC = 'C', LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. For best performance, LWORK
+*> should be at least N*N if RC = 'C' or M*M if RC = 'R', but
+*> the tests will be done even if LWORK is 0.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL
+*> The value computed by the test described above. RESULT is
+*> limited to 1/ulp to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 indicates a successful exit
+*> -k indicates the k-th parameter had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* V (input) REAL array, dimension (LDV,N)
-* The second matrix to compare. If RC = 'R', V is MV by N, and
-* if RC = 'C', V is N by MV.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDV (input) INTEGER
-* The leading dimension of V. If RC = 'R', LDV >= max(1,MV),
-* and if RC = 'C', LDV >= max(1,N).
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_eig
*
-* LWORK (input) INTEGER
-* The length of the array WORK. For best performance, LWORK
-* should be at least N*N if RC = 'C' or M*M if RC = 'R', but
-* the tests will be done even if LWORK is 0.
+* =====================================================================
+ SUBROUTINE SORT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
+ $ RESULT, INFO )
*
-* RESULT (output) REAL
-* The value computed by the test described above. RESULT is
-* limited to 1/ulp to avoid overflow.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* 0 indicates a successful exit
-* -k indicates the k-th parameter had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER*( * ) RC
+ INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
+ REAL RESULT
+* ..
+* .. Array Arguments ..
+ REAL U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/ssbt21.f b/TESTING/EIG/ssbt21.f
index 709e6673..3c67a170 100644
--- a/TESTING/EIG/ssbt21.f
+++ b/TESTING/EIG/ssbt21.f
@@ -1,9 +1,157 @@
+*> \brief \b SSBT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
+* RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KA, KS, LDA, LDU, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), RESULT( 2 ),
+* $ U( LDU, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSBT21 generally checks a decomposition of the form
+*>
+*> A = U S U'
+*>
+*> where ' means transpose, A is symmetric banded, U is
+*> orthogonal, and S is diagonal (if KS=0) or symmetric
+*> tridiagonal (if KS=1).
+*>
+*> Specifically:
+*>
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, SSBT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The bandwidth of the matrix A. It must be at least zero. If
+*> it is larger than N-1, then max( 0, N-1 ) will be used.
+*> \endverbatim
+*>
+*> \param[in] KS
+*> \verbatim
+*> KS is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least min( KA, N-1 ).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KS=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> The orthogonal matrix in the decomposition, expressed as a
+*> dense matrix (i.e., not as a product of Householder
+*> transformations, Givens transformations, etc.)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N**2+N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SSBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
$ RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,77 +162,6 @@
$ U( LDU, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSBT21 generally checks a decomposition of the form
-*
-* A = U S U'
-*
-* where ' means transpose, A is symmetric banded, U is
-* orthogonal, and S is diagonal (if KS=0) or symmetric
-* tridiagonal (if KS=1).
-*
-* Specifically:
-*
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, SSBT21 does nothing.
-* It must be at least zero.
-*
-* KA (input) INTEGER
-* The bandwidth of the matrix A. It must be at least zero. If
-* it is larger than N-1, then max( 0, N-1 ) will be used.
-*
-* KS (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* A (input) REAL array, dimension (LDA, N)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least min( KA, N-1 ).
-*
-* D (input) REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix S.
-*
-* E (input) REAL array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KS=0.
-*
-* U (input) REAL array, dimension (LDU, N)
-* The orthogonal matrix in the decomposition, expressed as a
-* dense matrix (i.e., not as a product of Householder
-* transformations, Givens transformations, etc.)
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* WORK (workspace) REAL array, dimension (N**2+N)
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ssgt01.f b/TESTING/EIG/ssgt01.f
index aad6f520..c24d4484 100644
--- a/TESTING/EIG/ssgt01.f
+++ b/TESTING/EIG/ssgt01.f
@@ -1,88 +1,166 @@
- SUBROUTINE SSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
- $ WORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* modified August 1997, a new parameter M is added to the calling
-* sequence.
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER ITYPE, LDA, LDB, LDZ, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), D( * ), RESULT( * ),
- $ WORK( * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b SSGT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
+* WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, LDA, LDB, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), D( * ), RESULT( * ),
+* $ WORK( * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* SSGT01 checks a decomposition of the form
-*
-* A Z = B Z D or
-* A B Z = Z D or
-* B A Z = Z D
-*
-* where A is a symmetric matrix, B is
-* symmetric positive definite, Z is orthogonal, and D is diagonal.
-*
-* One of the following test ratios is computed:
-*
-* ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )
-*
-* ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )
-*
-* ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSGT01 checks a decomposition of the form
+*>
+*> A Z = B Z D or
+*> A B Z = Z D or
+*> B A Z = Z D
+*>
+*> where A is a symmetric matrix, B is
+*> symmetric positive definite, Z is orthogonal, and D is diagonal.
+*>
+*> One of the following test ratios is computed:
+*>
+*> ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )
+*>
+*> ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* The form of the symmetric generalized eigenproblem.
-* = 1: A*z = (lambda)*B*z
-* = 2: A*B*z = (lambda)*z
-* = 3: B*A*z = (lambda)*z
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrices A and B is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* M (input) INTEGER
-* The number of eigenvalues found. 0 <= M <= N.
-*
-* A (input) REAL array, dimension (LDA, N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB, N)
-* The original symmetric positive definite matrix B.
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> The form of the symmetric generalized eigenproblem.
+*> = 1: A*z = (lambda)*B*z
+*> = 2: A*B*z = (lambda)*z
+*> = 3: B*A*z = (lambda)*z
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrices A and B is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenvalues found. 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N)
+*> The original symmetric positive definite matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is REAL array, dimension (LDZ, M)
+*> The computed eigenvectors of the generalized eigenproblem.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (M)
+*> The computed eigenvalues of the generalized eigenproblem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (1)
+*> The test ratio as described above.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* Z (input) REAL array, dimension (LDZ, M)
-* The computed eigenvectors of the generalized eigenproblem.
+*> \date November 2011
*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
+*> \ingroup single_eig
*
-* D (input) REAL array, dimension (M)
-* The computed eigenvalues of the generalized eigenproblem.
+* =====================================================================
+ SUBROUTINE SSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
+ $ WORK, RESULT )
*
-* WORK (workspace) REAL array, dimension (N*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (1)
-* The test ratio as described above.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER ITYPE, LDA, LDB, LDZ, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), D( * ), RESULT( * ),
+ $ WORK( * ), Z( LDZ, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sslect.f b/TESTING/EIG/sslect.f
index 57b24c1f..2114d6e7 100644
--- a/TESTING/EIG/sslect.f
+++ b/TESTING/EIG/sslect.f
@@ -1,35 +1,77 @@
- LOGICAL FUNCTION SSLECT( ZR, ZI )
+*> \brief \b SSLECT
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL ZI, ZR
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION SSLECT( ZR, ZI )
+*
+* .. Scalar Arguments ..
+* REAL ZI, ZR
+* ..
+*
* Purpose
* =======
*
-* SSLECT returns .TRUE. if the eigenvalue ZR+sqrt(-1)*ZI is to be
-* selected, and otherwise it returns .FALSE.
-* It is used by SCHK41 to test if SGEES succesfully sorts eigenvalues,
-* and by SCHK43 to test if SGEESX succesfully sorts eigenvalues.
-*
-* The common block /SSLCT/ controls how eigenvalues are selected.
-* If SELOPT = 0, then SSLECT return .TRUE. when ZR is less than zero,
-* and .FALSE. otherwise.
-* If SELOPT is at least 1, SSLECT returns SELVAL(SELOPT) and adds 1
-* to SELOPT, cycling back to 1 at SELMAX.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSLECT returns .TRUE. if the eigenvalue ZR+sqrt(-1)*ZI is to be
+*> selected, and otherwise it returns .FALSE.
+*> It is used by SCHK41 to test if SGEES succesfully sorts eigenvalues,
+*> and by SCHK43 to test if SGEESX succesfully sorts eigenvalues.
+*>
+*> The common block /SSLCT/ controls how eigenvalues are selected.
+*> If SELOPT = 0, then SSLECT return .TRUE. when ZR is less than zero,
+*> and .FALSE. otherwise.
+*> If SELOPT is at least 1, SSLECT returns SELVAL(SELOPT) and adds 1
+*> to SELOPT, cycling back to 1 at SELMAX.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ZR (input) REAL
-* The real part of a complex eigenvalue ZR + i*ZI.
+*> \param[in] ZR
+*> \verbatim
+*> ZR is REAL
+*> The real part of a complex eigenvalue ZR + i*ZI.
+*> \endverbatim
+*>
+*> \param[in] ZI
+*> \verbatim
+*> ZI is REAL
+*> The imaginary part of a complex eigenvalue ZR + i*ZI.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ZI (input) REAL
-* The imaginary part of a complex eigenvalue ZR + i*ZI.
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION SSLECT( ZR, ZI )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL ZI, ZR
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sspt21.f b/TESTING/EIG/sspt21.f
index b43e3c5b..3387ada7 100644
--- a/TESTING/EIG/sspt21.f
+++ b/TESTING/EIG/sspt21.f
@@ -1,9 +1,232 @@
+*> \brief \b SSPT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
+* TAU, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), D( * ), E( * ), RESULT( 2 ), TAU( * ),
+* $ U( LDU, * ), VP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPT21 generally checks a decomposition of the form
+*>
+*> A = U S U'
+*>
+*> where ' means transpose, A is symmetric (stored in packed format), U
+*> is orthogonal, and S is diagonal (if KBAND=0) or symmetric
+*> tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as a
+*> dense matrix, otherwise the U is expressed as a product of
+*> Householder transformations, whose vectors are stored in the array
+*> "V" and whose scaling constants are in "TAU"; we shall use the
+*> letter "V" to refer to the product of Householder transformations
+*> (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT(1) = | A - V S V' | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT(1) = | I - VU' | / ( n ulp )
+*>
+*> Packed storage means that, for example, if UPLO='U', then the columns
+*> of the upper triangle of A are stored one after another, so that
+*> A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if
+*> UPLO='L', then the columns of the lower triangle of A are stored one
+*> after another in AP, so that A(j+1,j+1) immediately follows A(n,j)
+*> in the array AP. This means that A(i,j) is stored in:
+*>
+*> AP( i + j*(j-1)/2 ) if UPLO='U'
+*>
+*> AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L'
+*>
+*> The array VP bears the same relation to the matrix V that A does to
+*> AP.
+*>
+*> For ITYPE > 1, the transformation U is expressed as a product
+*> of Householder transformations:
+*>
+*> If UPLO='U', then V = H(n-1)...H(1), where
+*>
+*> H(j) = I - tau(j) v(j) v(j)'
+*>
+*> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
+*> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
+*> the j-th element is 1, and the last n-j elements are 0.
+*>
+*> If UPLO='L', then V = H(1)...H(n-1), where
+*>
+*> H(j) = I - tau(j) v(j) v(j)'
+*>
+*> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
+*> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
+*> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense orthogonal matrix:
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> 2: U expressed as a product V of Housholder transformations:
+*> RESULT(1) = | A - V S V' | / ( |A| n ulp )
+*> \endverbatim
+*> \verbatim
+*> 3: U expressed both as a dense orthogonal matrix and
+*> as a product of Housholder transformations:
+*> RESULT(1) = | I - VU' | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', AP and VP are considered to contain the upper
+*> triangle of A and V.
+*> If UPLO='L', AP and VP are considered to contain the lower
+*> triangle of A and V.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, SSPT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and contains the columns of just the upper
+*> triangle (UPLO='U') or only the lower triangle (UPLO='L'),
+*> packed one after another.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KBAND=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the orthogonal matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] VP
+*> \verbatim
+*> VP is REAL array, dimension (N*(N+1)/2)
+*> If ITYPE=2 or 3, the columns of this array contain the
+*> Householder vectors used to describe the orthogonal matrix
+*> in the decomposition, as described in purpose.
+*> *NOTE* If ITYPE=2 or 3, V is modified and restored. The
+*> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
+*> is set to one, and later reset to its original value, during
+*> the course of the calculation.
+*> If ITYPE=1, then it is neither referenced nor modified.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)' in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N**2+N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if ITYPE=1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SSPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
$ TAU, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,148 +237,6 @@
$ U( LDU, * ), VP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSPT21 generally checks a decomposition of the form
-*
-* A = U S U'
-*
-* where ' means transpose, A is symmetric (stored in packed format), U
-* is orthogonal, and S is diagonal (if KBAND=0) or symmetric
-* tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as a
-* dense matrix, otherwise the U is expressed as a product of
-* Householder transformations, whose vectors are stored in the array
-* "V" and whose scaling constants are in "TAU"; we shall use the
-* letter "V" to refer to the product of Householder transformations
-* (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT(1) = | A - V S V' | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT(1) = | I - VU' | / ( n ulp )
-*
-* Packed storage means that, for example, if UPLO='U', then the columns
-* of the upper triangle of A are stored one after another, so that
-* A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if
-* UPLO='L', then the columns of the lower triangle of A are stored one
-* after another in AP, so that A(j+1,j+1) immediately follows A(n,j)
-* in the array AP. This means that A(i,j) is stored in:
-*
-* AP( i + j*(j-1)/2 ) if UPLO='U'
-*
-* AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L'
-*
-* The array VP bears the same relation to the matrix V that A does to
-* AP.
-*
-* For ITYPE > 1, the transformation U is expressed as a product
-* of Householder transformations:
-*
-* If UPLO='U', then V = H(n-1)...H(1), where
-*
-* H(j) = I - tau(j) v(j) v(j)'
-*
-* and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
-* (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
-* the j-th element is 1, and the last n-j elements are 0.
-*
-* If UPLO='L', then V = H(1)...H(n-1), where
-*
-* H(j) = I - tau(j) v(j) v(j)'
-*
-* and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
-* (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
-* in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense orthogonal matrix:
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* 2: U expressed as a product V of Housholder transformations:
-* RESULT(1) = | A - V S V' | / ( |A| n ulp )
-*
-* 3: U expressed both as a dense orthogonal matrix and
-* as a product of Housholder transformations:
-* RESULT(1) = | I - VU' | / ( n ulp )
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', AP and VP are considered to contain the upper
-* triangle of A and V.
-* If UPLO='L', AP and VP are considered to contain the lower
-* triangle of A and V.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, SSPT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and contains the columns of just the upper
-* triangle (UPLO='U') or only the lower triangle (UPLO='L'),
-* packed one after another.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-*
-* E (input) REAL array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KBAND=0.
-*
-* U (input) REAL array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the orthogonal matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* VP (input) REAL array, dimension (N*(N+1)/2)
-* If ITYPE=2 or 3, the columns of this array contain the
-* Householder vectors used to describe the orthogonal matrix
-* in the decomposition, as described in purpose.
-* *NOTE* If ITYPE=2 or 3, V is modified and restored. The
-* subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
-* is set to one, and later reset to its original value, during
-* the course of the calculation.
-* If ITYPE=1, then it is neither referenced nor modified.
-*
-* TAU (input) REAL array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)' in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-*
-* WORK (workspace) REAL array, dimension (N**2+N)
-* Workspace.
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if ITYPE=1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/sstech.f b/TESTING/EIG/sstech.f
index 9f5e0e31..bcaa3926 100644
--- a/TESTING/EIG/sstech.f
+++ b/TESTING/EIG/sstech.f
@@ -1,59 +1,120 @@
- SUBROUTINE SSTECH( N, A, B, EIG, TOL, WORK, INFO )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- REAL TOL
-* ..
-* .. Array Arguments ..
- REAL A( * ), B( * ), EIG( * ), WORK( * )
-* ..
-*
+*> \brief \b SSTECH
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTECH( N, A, B, EIG, TOL, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* REAL TOL
+* ..
+* .. Array Arguments ..
+* REAL A( * ), B( * ), EIG( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* Let T be the tridiagonal matrix with diagonal entries A(1) ,...,
-* A(N) and offdiagonal entries B(1) ,..., B(N-1)). SSTECH checks to
-* see if EIG(1) ,..., EIG(N) are indeed accurate eigenvalues of T.
-* It does this by expanding each EIG(I) into an interval
-* [SVD(I) - EPS, SVD(I) + EPS], merging overlapping intervals if
-* any, and using Sturm sequences to count and verify whether each
-* resulting interval has the correct number of eigenvalues (using
-* SSTECT). Here EPS = TOL*MACHEPS*MAXEIG, where MACHEPS is the
-* machine precision and MAXEIG is the absolute value of the largest
-* eigenvalue. If each interval contains the correct number of
-* eigenvalues, INFO = 0 is returned, otherwise INFO is the index of
-* the first eigenvalue in the first bad interval.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Let T be the tridiagonal matrix with diagonal entries A(1) ,...,
+*> A(N) and offdiagonal entries B(1) ,..., B(N-1)). SSTECH checks to
+*> see if EIG(1) ,..., EIG(N) are indeed accurate eigenvalues of T.
+*> It does this by expanding each EIG(I) into an interval
+*> [SVD(I) - EPS, SVD(I) + EPS], merging overlapping intervals if
+*> any, and using Sturm sequences to count and verify whether each
+*> resulting interval has the correct number of eigenvalues (using
+*> SSTECT). Here EPS = TOL*MACHEPS*MAXEIG, where MACHEPS is the
+*> machine precision and MAXEIG is the absolute value of the largest
+*> eigenvalue. If each interval contains the correct number of
+*> eigenvalues, INFO = 0 is returned, otherwise INFO is the index of
+*> the first eigenvalue in the first bad interval.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the tridiagonal matrix T.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N)
+*> The diagonal entries of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (N-1)
+*> The offdiagonal entries of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] EIG
+*> \verbatim
+*> EIG is REAL array, dimension (N)
+*> The purported eigenvalues to be checked.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> Error tolerance for checking, a multiple of the
+*> machine precision.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 if the eigenvalues are all correct (to within
+*> 1 +- TOL*MACHEPS*MAXEIG)
+*> >0 if the interval containing the INFO-th eigenvalue
+*> contains the incorrect number of eigenvalues.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (N)
-* The diagonal entries of the tridiagonal matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) REAL array, dimension (N-1)
-* The offdiagonal entries of the tridiagonal matrix T.
+*> \date November 2011
*
-* EIG (input) REAL array, dimension (N)
-* The purported eigenvalues to be checked.
+*> \ingroup single_eig
*
-* TOL (input) REAL
-* Error tolerance for checking, a multiple of the
-* machine precision.
+* =====================================================================
+ SUBROUTINE SSTECH( N, A, B, EIG, TOL, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* 0 if the eigenvalues are all correct (to within
-* 1 +- TOL*MACHEPS*MAXEIG)
-* >0 if the interval containing the INFO-th eigenvalue
-* contains the incorrect number of eigenvalues.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ REAL TOL
+* ..
+* .. Array Arguments ..
+ REAL A( * ), B( * ), EIG( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sstect.f b/TESTING/EIG/sstect.f
index 5bbabfee..f90232bc 100644
--- a/TESTING/EIG/sstect.f
+++ b/TESTING/EIG/sstect.f
@@ -1,46 +1,101 @@
- SUBROUTINE SSTECT( N, A, B, SHIFT, NUM )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N, NUM
- REAL SHIFT
-* ..
-* .. Array Arguments ..
- REAL A( * ), B( * )
-* ..
-*
+*> \brief \b SSTECT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTECT( N, A, B, SHIFT, NUM )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NUM
+* REAL SHIFT
+* ..
+* .. Array Arguments ..
+* REAL A( * ), B( * )
+* ..
+*
* Purpose
* =======
*
-* SSTECT counts the number NUM of eigenvalues of a tridiagonal
-* matrix T which are less than or equal to SHIFT. T has
-* diagonal entries A(1), ... , A(N), and offdiagonal entries
-* B(1), ..., B(N-1).
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford
-* University, July 21, 1966
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTECT counts the number NUM of eigenvalues of a tridiagonal
+*> matrix T which are less than or equal to SHIFT. T has
+*> diagonal entries A(1), ... , A(N), and offdiagonal entries
+*> B(1), ..., B(N-1).
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford
+*> University, July 21, 1966
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the tridiagonal matrix T.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N)
+*> The diagonal entries of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (N-1)
+*> The offdiagonal entries of the tridiagonal matrix T.
+*> \endverbatim
+*>
+*> \param[in] SHIFT
+*> \verbatim
+*> SHIFT is REAL
+*> The shift, used as described under Purpose.
+*> \endverbatim
+*>
+*> \param[out] NUM
+*> \verbatim
+*> NUM is INTEGER
+*> The number of eigenvalues of T less than or equal
+*> to SHIFT.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (N)
-* The diagonal entries of the tridiagonal matrix T.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) REAL array, dimension (N-1)
-* The offdiagonal entries of the tridiagonal matrix T.
+*> \date November 2011
*
-* SHIFT (input) REAL
-* The shift, used as described under Purpose.
+*> \ingroup single_eig
*
-* NUM (output) INTEGER
-* The number of eigenvalues of T less than or equal
-* to SHIFT.
+* =====================================================================
+ SUBROUTINE SSTECT( N, A, B, SHIFT, NUM )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N, NUM
+ REAL SHIFT
+* ..
+* .. Array Arguments ..
+ REAL A( * ), B( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sstt21.f b/TESTING/EIG/sstt21.f
index 3be5362b..3fc0b571 100644
--- a/TESTING/EIG/sstt21.f
+++ b/TESTING/EIG/sstt21.f
@@ -1,75 +1,146 @@
- SUBROUTINE SSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
- $ RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KBAND, LDU, N
-* ..
-* .. Array Arguments ..
- REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
- $ SE( * ), U( LDU, * ), WORK( * )
-* ..
-*
+*> \brief \b SSTT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+* RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+* REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
+* $ SE( * ), U( LDU, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SSTT21 checks a decomposition of the form
-*
-* A = U S U'
-*
-* where ' means transpose, A is symmetric tridiagonal, U is orthogonal,
-* and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
-* Two tests are performed:
-*
-* RESULT(1) = | A - U S U' | / ( |A| n ulp )
-*
-* RESULT(2) = | I - UU' | / ( n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTT21 checks a decomposition of the form
+*>
+*> A = U S U'
+*>
+*> where ' means transpose, A is symmetric tridiagonal, U is orthogonal,
+*> and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
+*> Two tests are performed:
+*>
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp )
+*>
+*> RESULT(2) = | I - UU' | / ( n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, SSTT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and SE is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AD (input) REAL array, dimension (N)
-* The diagonal of the original (unfactored) matrix A. A is
-* assumed to be symmetric tridiagonal.
-*
-* AE (input) REAL array, dimension (N-1)
-* The off-diagonal of the original (unfactored) matrix A. A
-* is assumed to be symmetric tridiagonal. AE(1) is the (1,2)
-* and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, SSTT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and SE is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AD
+*> \verbatim
+*> AD is REAL array, dimension (N)
+*> The diagonal of the original (unfactored) matrix A. A is
+*> assumed to be symmetric tridiagonal.
+*> \endverbatim
+*>
+*> \param[in] AE
+*> \verbatim
+*> AE is REAL array, dimension (N-1)
+*> The off-diagonal of the original (unfactored) matrix A. A
+*> is assumed to be symmetric tridiagonal. AE(1) is the (1,2)
+*> and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc.
+*> \endverbatim
+*>
+*> \param[in] SD
+*> \verbatim
+*> SD is REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] SE
+*> \verbatim
+*> SE is REAL array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> Not referenced if KBSND=0. If KBAND=1, then AE(1) is the
+*> (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2)
+*> element, etc.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> The orthogonal matrix in the decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N*(N+1))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SD (input) REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* SE (input) REAL array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* Not referenced if KBSND=0. If KBAND=1, then AE(1) is the
-* (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2)
-* element, etc.
+*> \date November 2011
*
-* U (input) REAL array, dimension (LDU, N)
-* The orthogonal matrix in the decomposition.
+*> \ingroup single_eig
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N.
+* =====================================================================
+ SUBROUTINE SSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+ $ RESULT )
*
-* WORK (workspace) REAL array, dimension (N*(N+1))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified.
+* .. Scalar Arguments ..
+ INTEGER KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+ REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
+ $ SE( * ), U( LDU, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/sstt22.f b/TESTING/EIG/sstt22.f
index 7aac2af7..90f83cfe 100644
--- a/TESTING/EIG/sstt22.f
+++ b/TESTING/EIG/sstt22.f
@@ -1,81 +1,158 @@
- SUBROUTINE SSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
- $ LDWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KBAND, LDU, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
- $ SE( * ), U( LDU, * ), WORK( LDWORK, * )
-* ..
-*
+*> \brief \b SSTT22
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+* LDWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER KBAND, LDU, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
+* $ SE( * ), U( LDU, * ), WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* SSTT22 checks a set of M eigenvalues and eigenvectors,
-*
-* A U = U S
-*
-* where A is symmetric tridiagonal, the columns of U are orthogonal,
-* and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
-* Two tests are performed:
-*
-* RESULT(1) = | U' A U - S | / ( |A| m ulp )
-*
-* RESULT(2) = | I - U'U | / ( m ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSTT22 checks a set of M eigenvalues and eigenvectors,
+*>
+*> A U = U S
+*>
+*> where A is symmetric tridiagonal, the columns of U are orthogonal,
+*> and S is diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
+*> Two tests are performed:
+*>
+*> RESULT(1) = | U' A U - S | / ( |A| m ulp )
+*>
+*> RESULT(2) = | I - U'U | / ( m ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, SSTT22 does nothing.
-* It must be at least zero.
-*
-* M (input) INTEGER
-* The number of eigenpairs to check. If it is zero, SSTT22
-* does nothing. It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and SE is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AD (input) REAL array, dimension (N)
-* The diagonal of the original (unfactored) matrix A. A is
-* assumed to be symmetric tridiagonal.
-*
-* AE (input) REAL array, dimension (N)
-* The off-diagonal of the original (unfactored) matrix A. A
-* is assumed to be symmetric tridiagonal. AE(1) is ignored,
-* AE(2) is the (1,2) and (2,1) element, etc.
-*
-* SD (input) REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, SSTT22 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenpairs to check. If it is zero, SSTT22
+*> does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and SE is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AD
+*> \verbatim
+*> AD is REAL array, dimension (N)
+*> The diagonal of the original (unfactored) matrix A. A is
+*> assumed to be symmetric tridiagonal.
+*> \endverbatim
+*>
+*> \param[in] AE
+*> \verbatim
+*> AE is REAL array, dimension (N)
+*> The off-diagonal of the original (unfactored) matrix A. A
+*> is assumed to be symmetric tridiagonal. AE(1) is ignored,
+*> AE(2) is the (1,2) and (2,1) element, etc.
+*> \endverbatim
+*>
+*> \param[in] SD
+*> \verbatim
+*> SD is REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] SE
+*> \verbatim
+*> SE is REAL array, dimension (N)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> Not referenced if KBSND=0. If KBAND=1, then AE(1) is
+*> ignored, SE(2) is the (1,2) and (2,1) element, etc.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> The orthogonal matrix in the decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LDWORK, M+1)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of WORK. LDWORK must be at least
+*> max(1,M).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SE (input) REAL array, dimension (N)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* Not referenced if KBSND=0. If KBAND=1, then AE(1) is
-* ignored, SE(2) is the (1,2) and (2,1) element, etc.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (input) REAL array, dimension (LDU, N)
-* The orthogonal matrix in the decomposition.
+*> \date November 2011
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N.
+*> \ingroup single_eig
*
-* WORK (workspace) REAL array, dimension (LDWORK, M+1)
+* =====================================================================
+ SUBROUTINE SSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+ $ LDWORK, RESULT )
*
-* LDWORK (input) INTEGER
-* The leading dimension of WORK. LDWORK must be at least
-* max(1,M).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
+* .. Scalar Arguments ..
+ INTEGER KBAND, LDU, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL AD( * ), AE( * ), RESULT( 2 ), SD( * ),
+ $ SE( * ), U( LDU, * ), WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/ssvdch.f b/TESTING/EIG/ssvdch.f
index 9751acdf..6de9e393 100644
--- a/TESTING/EIG/ssvdch.f
+++ b/TESTING/EIG/ssvdch.f
@@ -1,58 +1,116 @@
- SUBROUTINE SSVDCH( N, S, E, SVD, TOL, INFO )
+*> \brief \b SSVDCH
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INFO, N
- REAL TOL
-* ..
-* .. Array Arguments ..
- REAL E( * ), S( * ), SVD( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSVDCH( N, S, E, SVD, TOL, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, N
+* REAL TOL
+* ..
+* .. Array Arguments ..
+* REAL E( * ), S( * ), SVD( * )
+* ..
+*
* Purpose
* =======
*
-* SSVDCH checks to see if SVD(1) ,..., SVD(N) are accurate singular
-* values of the bidiagonal matrix B with diagonal entries
-* S(1) ,..., S(N) and superdiagonal entries E(1) ,..., E(N-1)).
-* It does this by expanding each SVD(I) into an interval
-* [SVD(I) * (1-EPS) , SVD(I) * (1+EPS)], merging overlapping intervals
-* if any, and using Sturm sequences to count and verify whether each
-* resulting interval has the correct number of singular values (using
-* SSVDCT). Here EPS=TOL*MAX(N/10,1)*MACHEP, where MACHEP is the
-* machine precision. The routine assumes the singular values are sorted
-* with SVD(1) the largest and SVD(N) smallest. If each interval
-* contains the correct number of singular values, INFO = 0 is returned,
-* otherwise INFO is the index of the first singular value in the first
-* bad interval.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSVDCH checks to see if SVD(1) ,..., SVD(N) are accurate singular
+*> values of the bidiagonal matrix B with diagonal entries
+*> S(1) ,..., S(N) and superdiagonal entries E(1) ,..., E(N-1)).
+*> It does this by expanding each SVD(I) into an interval
+*> [SVD(I) * (1-EPS) , SVD(I) * (1+EPS)], merging overlapping intervals
+*> if any, and using Sturm sequences to count and verify whether each
+*> resulting interval has the correct number of singular values (using
+*> SSVDCT). Here EPS=TOL*MAX(N/10,1)*MACHEP, where MACHEP is the
+*> machine precision. The routine assumes the singular values are sorted
+*> with SVD(1) the largest and SVD(N) smallest. If each interval
+*> contains the correct number of singular values, INFO = 0 is returned,
+*> otherwise INFO is the index of the first singular value in the first
+*> bad interval.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The diagonal entries of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The superdiagonal entries of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] SVD
+*> \verbatim
+*> SVD is REAL array, dimension (N)
+*> The computed singular values to be checked.
+*> \endverbatim
+*>
+*> \param[in] TOL
+*> \verbatim
+*> TOL is REAL
+*> Error tolerance for checking, a multiplier of the
+*> machine precision.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> =0 if the singular values are all correct (to within
+*> 1 +- TOL*MACHEPS)
+*> >0 if the interval containing the INFO-th singular value
+*> contains the incorrect number of singular values.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The dimension of the bidiagonal matrix B.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S (input) REAL array, dimension (N)
-* The diagonal entries of the bidiagonal matrix B.
+*> \date November 2011
*
-* E (input) REAL array, dimension (N-1)
-* The superdiagonal entries of the bidiagonal matrix B.
+*> \ingroup single_eig
*
-* SVD (input) REAL array, dimension (N)
-* The computed singular values to be checked.
+* =====================================================================
+ SUBROUTINE SSVDCH( N, S, E, SVD, TOL, INFO )
*
-* TOL (input) REAL
-* Error tolerance for checking, a multiplier of the
-* machine precision.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* =0 if the singular values are all correct (to within
-* 1 +- TOL*MACHEPS)
-* >0 if the interval containing the INFO-th singular value
-* contains the incorrect number of singular values.
+* .. Scalar Arguments ..
+ INTEGER INFO, N
+ REAL TOL
+* ..
+* .. Array Arguments ..
+ REAL E( * ), S( * ), SVD( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/ssvdct.f b/TESTING/EIG/ssvdct.f
index 7cc33e28..89232692 100644
--- a/TESTING/EIG/ssvdct.f
+++ b/TESTING/EIG/ssvdct.f
@@ -1,51 +1,106 @@
- SUBROUTINE SSVDCT( N, S, E, SHIFT, NUM )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N, NUM
- REAL SHIFT
-* ..
-* .. Array Arguments ..
- REAL E( * ), S( * )
-* ..
-*
+*> \brief \b SSVDCT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSVDCT( N, S, E, SHIFT, NUM )
+*
+* .. Scalar Arguments ..
+* INTEGER N, NUM
+* REAL SHIFT
+* ..
+* .. Array Arguments ..
+* REAL E( * ), S( * )
+* ..
+*
* Purpose
* =======
*
-* SSVDCT counts the number NUM of eigenvalues of a 2*N by 2*N
-* tridiagonal matrix T which are less than or equal to SHIFT. T is
-* formed by putting zeros on the diagonal and making the off-diagonals
-* equal to S(1), E(1), S(2), E(2), ... , E(N-1), S(N). If SHIFT is
-* positive, NUM is equal to N plus the number of singular values of a
-* bidiagonal matrix B less than or equal to SHIFT. Here B has diagonal
-* entries S(1), ..., S(N) and superdiagonal entries E(1), ... E(N-1).
-* If SHIFT is negative, NUM is equal to the number of singular values
-* of B greater than or equal to -SHIFT.
-*
-* See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
-* Matrix", Report CS41, Computer Science Dept., Stanford University,
-* July 21, 1966
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSVDCT counts the number NUM of eigenvalues of a 2*N by 2*N
+*> tridiagonal matrix T which are less than or equal to SHIFT. T is
+*> formed by putting zeros on the diagonal and making the off-diagonals
+*> equal to S(1), E(1), S(2), E(2), ... , E(N-1), S(N). If SHIFT is
+*> positive, NUM is equal to N plus the number of singular values of a
+*> bidiagonal matrix B less than or equal to SHIFT. Here B has diagonal
+*> entries S(1), ..., S(N) and superdiagonal entries E(1), ... E(N-1).
+*> If SHIFT is negative, NUM is equal to the number of singular values
+*> of B greater than or equal to -SHIFT.
+*>
+*> See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal
+*> Matrix", Report CS41, Computer Science Dept., Stanford University,
+*> July 21, 1966
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The dimension of the bidiagonal matrix B.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> The diagonal entries of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array of dimension (N-1)
+*> The superdiagonal entries of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] SHIFT
+*> \verbatim
+*> SHIFT is REAL
+*> The shift, used as described under Purpose.
+*> \endverbatim
+*>
+*> \param[out] NUM
+*> \verbatim
+*> NUM is INTEGER
+*> The number of eigenvalues of T less than or equal to SHIFT.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* S (input) REAL array, dimension (N)
-* The diagonal entries of the bidiagonal matrix B.
+*> \date November 2011
*
-* E (input) REAL array of dimension (N-1)
-* The superdiagonal entries of the bidiagonal matrix B.
+*> \ingroup single_eig
*
-* SHIFT (input) REAL
-* The shift, used as described under Purpose.
+* =====================================================================
+ SUBROUTINE SSVDCT( N, S, E, SHIFT, NUM )
*
-* NUM (output) INTEGER
-* The number of eigenvalues of T less than or equal to SHIFT.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER N, NUM
+ REAL SHIFT
+* ..
+* .. Array Arguments ..
+ REAL E( * ), S( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/ssxt1.f b/TESTING/EIG/ssxt1.f
index 8adc9c1c..edbc641d 100644
--- a/TESTING/EIG/ssxt1.f
+++ b/TESTING/EIG/ssxt1.f
@@ -1,60 +1,125 @@
- REAL FUNCTION SSXT1( IJOB, D1, N1, D2, N2, ABSTOL,
- $ ULP, UNFL )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IJOB, N1, N2
- REAL ABSTOL, ULP, UNFL
-* ..
-* .. Array Arguments ..
- REAL D1( * ), D2( * )
-* ..
-*
+*> \brief \b SSXT1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SSXT1( IJOB, D1, N1, D2, N2, ABSTOL,
+* ULP, UNFL )
+*
+* .. Scalar Arguments ..
+* INTEGER IJOB, N1, N2
+* REAL ABSTOL, ULP, UNFL
+* ..
+* .. Array Arguments ..
+* REAL D1( * ), D2( * )
+* ..
+*
* Purpose
* =======
*
-* SSXT1 computes the difference between a set of eigenvalues.
-* The result is returned as the function value.
-*
-* IJOB = 1: Computes max { min | D1(i)-D2(j) | }
-* i j
-*
-* IJOB = 2: Computes max { min | D1(i)-D2(j) | /
-* i j
-* ( ABSTOL + |D1(i)|*ULP ) }
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSXT1 computes the difference between a set of eigenvalues.
+*> The result is returned as the function value.
+*>
+*> IJOB = 1: Computes max { min | D1(i)-D2(j) | }
+*> i j
+*>
+*> IJOB = 2: Computes max { min | D1(i)-D2(j) | /
+*> i j
+*> ( ABSTOL + |D1(i)|*ULP ) }
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed. (See above.)
-*
-* D1 (input) REAL array, dimension (N1)
-* The first array. D1 should be in increasing order, i.e.,
-* D1(j) <= D1(j+1).
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed. (See above.)
+*> \endverbatim
+*>
+*> \param[in] D1
+*> \verbatim
+*> D1 is REAL array, dimension (N1)
+*> The first array. D1 should be in increasing order, i.e.,
+*> D1(j) <= D1(j+1).
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> The length of D1.
+*> \endverbatim
+*>
+*> \param[in] D2
+*> \verbatim
+*> D2 is REAL array, dimension (N2)
+*> The second array. D2 should be in increasing order, i.e.,
+*> D2(j) <= D2(j+1).
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> The length of D2.
+*> \endverbatim
+*>
+*> \param[in] ABSTOL
+*> \verbatim
+*> ABSTOL is REAL
+*> The absolute tolerance, used as a measure of the error.
+*> \endverbatim
+*>
+*> \param[in] ULP
+*> \verbatim
+*> ULP is REAL
+*> Machine precision.
+*> \endverbatim
+*>
+*> \param[in] UNFL
+*> \verbatim
+*> UNFL is REAL
+*> The smallest positive number whose reciprocal does not
+*> overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N1 (input) INTEGER
-* The length of D1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D2 (input) REAL array, dimension (N2)
-* The second array. D2 should be in increasing order, i.e.,
-* D2(j) <= D2(j+1).
+*> \date November 2011
*
-* N2 (input) INTEGER
-* The length of D2.
+*> \ingroup single_eig
*
-* ABSTOL (input) REAL
-* The absolute tolerance, used as a measure of the error.
+* =====================================================================
+ REAL FUNCTION SSXT1( IJOB, D1, N1, D2, N2, ABSTOL,
+ $ ULP, UNFL )
*
-* ULP (input) REAL
-* Machine precision.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* UNFL (input) REAL
-* The smallest positive number whose reciprocal does not
-* overflow.
+* .. Scalar Arguments ..
+ INTEGER IJOB, N1, N2
+ REAL ABSTOL, ULP, UNFL
+* ..
+* .. Array Arguments ..
+ REAL D1( * ), D2( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/ssyt21.f b/TESTING/EIG/ssyt21.f
index f5a5d0c7..3b38f33a 100644
--- a/TESTING/EIG/ssyt21.f
+++ b/TESTING/EIG/ssyt21.f
@@ -1,9 +1,218 @@
+*> \brief \b SSYT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYT21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
+* LDV, TAU, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDA, LDU, LDV, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), RESULT( 2 ),
+* $ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYT21 generally checks a decomposition of the form
+*>
+*> A = U S U'
+*>
+*> where ' means transpose, A is symmetric, U is orthogonal, and S is
+*> diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
+*>
+*> If ITYPE=1, then U is represented as a dense matrix; otherwise U is
+*> expressed as a product of Householder transformations, whose vectors
+*> are stored in the array "V" and whose scaling constants are in "TAU".
+*> We shall use the letter "V" to refer to the product of Householder
+*> transformations (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT(1) = | A - V S V' | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT(1) = | I - VU' | / ( n ulp )
+*>
+*> For ITYPE > 1, the transformation U is expressed as a product
+*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)' and each
+*> vector v(j) has its first j elements 0 and the remaining n-j elements
+*> stored in V(j+1:n,j).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense orthogonal matrix:
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> 2: U expressed as a product V of Housholder transformations:
+*> RESULT(1) = | A - V S V' | / ( |A| n ulp )
+*> \endverbatim
+*> \verbatim
+*> 3: U expressed both as a dense orthogonal matrix and
+*> as a product of Housholder transformations:
+*> RESULT(1) = | I - VU' | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, SSYT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KBAND=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is REAL array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the orthogonal matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is REAL array, dimension (LDV, N)
+*> If ITYPE=2 or 3, the columns of this array contain the
+*> Householder vectors used to describe the orthogonal matrix
+*> in the decomposition. If UPLO='L', then the vectors are in
+*> the lower triangle, if UPLO='U', then in the upper
+*> triangle.
+*> *NOTE* If ITYPE=2 or 3, V is modified and restored. The
+*> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
+*> is set to one, and later reset to its original value, during
+*> the course of the calculation.
+*> If ITYPE=1, then it is neither referenced nor modified.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)' in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N**2)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if ITYPE=1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SSYT21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
$ LDV, TAU, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,128 +223,6 @@
$ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYT21 generally checks a decomposition of the form
-*
-* A = U S U'
-*
-* where ' means transpose, A is symmetric, U is orthogonal, and S is
-* diagonal (if KBAND=0) or symmetric tridiagonal (if KBAND=1).
-*
-* If ITYPE=1, then U is represented as a dense matrix; otherwise U is
-* expressed as a product of Householder transformations, whose vectors
-* are stored in the array "V" and whose scaling constants are in "TAU".
-* We shall use the letter "V" to refer to the product of Householder
-* transformations (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT(1) = | A - V S V' | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT(1) = | I - VU' | / ( n ulp )
-*
-* For ITYPE > 1, the transformation U is expressed as a product
-* V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)' and each
-* vector v(j) has its first j elements 0 and the remaining n-j elements
-* stored in V(j+1:n,j).
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense orthogonal matrix:
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* 2: U expressed as a product V of Housholder transformations:
-* RESULT(1) = | A - V S V' | / ( |A| n ulp )
-*
-* 3: U expressed both as a dense orthogonal matrix and
-* as a product of Housholder transformations:
-* RESULT(1) = | I - VU' | / ( n ulp )
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, SSYT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* A (input) REAL array, dimension (LDA, N)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-*
-* E (input) REAL array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KBAND=0.
-*
-* U (input) REAL array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the orthogonal matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) REAL array, dimension (LDV, N)
-* If ITYPE=2 or 3, the columns of this array contain the
-* Householder vectors used to describe the orthogonal matrix
-* in the decomposition. If UPLO='L', then the vectors are in
-* the lower triangle, if UPLO='U', then in the upper
-* triangle.
-* *NOTE* If ITYPE=2 or 3, V is modified and restored. The
-* subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
-* is set to one, and later reset to its original value, during
-* the course of the calculation.
-* If ITYPE=1, then it is neither referenced nor modified.
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* TAU (input) REAL array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)' in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-*
-* WORK (workspace) REAL array, dimension (2*N**2)
-*
-* RESULT (output) REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if ITYPE=1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/ssyt22.f b/TESTING/EIG/ssyt22.f
index 36151d56..33a54a78 100644
--- a/TESTING/EIG/ssyt22.f
+++ b/TESTING/EIG/ssyt22.f
@@ -1,9 +1,181 @@
+*> \brief \b SSYT22
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYT22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
+* V, LDV, TAU, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDA, LDU, LDV, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), E( * ), RESULT( 2 ),
+* $ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYT22 generally checks a decomposition of the form
+*>
+*> A U = U S
+*>
+*> where A is symmetric, the columns of U are orthonormal, and S
+*> is diagonal (if KBAND=0) or symmetric tridiagonal (if
+*> KBAND=1). If ITYPE=1, then U is represented as a dense matrix,
+*> otherwise the U is expressed as a product of Householder
+*> transformations, whose vectors are stored in the array "V" and
+*> whose scaling constants are in "TAU"; we shall use the letter
+*> "V" to refer to the product of Householder transformations
+*> (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | U' A U - S | / ( |A| m ulp ) *andC> RESULT(2) = | I - U'U | / ( m ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> ITYPE INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense orthogonal matrix:
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> UPLO CHARACTER
+*> If UPLO='U', the upper triangle of A will be used and the
+*> (strictly) lower triangle will not be referenced. If
+*> UPLO='L', the lower triangle of A will be used and the
+*> (strictly) upper triangle will not be referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> N INTEGER
+*> The size of the matrix. If it is zero, SSYT22 does nothing.
+*> It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> M INTEGER
+*> The number of columns of U. If it is zero, SSYT22 does
+*> nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> KBAND INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A REAL array, dimension (LDA , N)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D REAL array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> E REAL array, dimension (N)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc.
+*> Not referenced if KBAND=0.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> U REAL array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the orthogonal matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDU INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> V REAL array, dimension (LDV, N)
+*> If ITYPE=2 or 3, the lower triangle of this array contains
+*> the Householder vectors used to describe the orthogonal
+*> matrix in the decomposition. If ITYPE=1, then it is not
+*> referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDV INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> TAU REAL array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)' in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> WORK REAL array, dimension (2*N**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT REAL array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if LDU is at least N.
+*> Modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_eig
+*
+* =====================================================================
SUBROUTINE SSYT22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
$ V, LDV, TAU, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,121 +186,6 @@
$ TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYT22 generally checks a decomposition of the form
-*
-* A U = U S
-*
-* where A is symmetric, the columns of U are orthonormal, and S
-* is diagonal (if KBAND=0) or symmetric tridiagonal (if
-* KBAND=1). If ITYPE=1, then U is represented as a dense matrix,
-* otherwise the U is expressed as a product of Householder
-* transformations, whose vectors are stored in the array "V" and
-* whose scaling constants are in "TAU"; we shall use the letter
-* "V" to refer to the product of Householder transformations
-* (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | U' A U - S | / ( |A| m ulp ) *and*
-* RESULT(2) = | I - U'U | / ( m ulp )
-*
-* Arguments
-* =========
-*
-* ITYPE INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense orthogonal matrix:
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* UPLO CHARACTER
-* If UPLO='U', the upper triangle of A will be used and the
-* (strictly) lower triangle will not be referenced. If
-* UPLO='L', the lower triangle of A will be used and the
-* (strictly) upper triangle will not be referenced.
-* Not modified.
-*
-* N INTEGER
-* The size of the matrix. If it is zero, SSYT22 does nothing.
-* It must be at least zero.
-* Not modified.
-*
-* M INTEGER
-* The number of columns of U. If it is zero, SSYT22 does
-* nothing. It must be at least zero.
-* Not modified.
-*
-* KBAND INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-* Not modified.
-*
-* A REAL array, dimension (LDA , N)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-* Not modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-* Not modified.
-*
-* D REAL array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-* Not modified.
-*
-* E REAL array, dimension (N)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc.
-* Not referenced if KBAND=0.
-* Not modified.
-*
-* U REAL array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the orthogonal matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-* Not modified.
-*
-* LDU INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-* Not modified.
-*
-* V REAL array, dimension (LDV, N)
-* If ITYPE=2 or 3, the lower triangle of this array contains
-* the Householder vectors used to describe the orthogonal
-* matrix in the decomposition. If ITYPE=1, then it is not
-* referenced.
-* Not modified.
-*
-* LDV INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-* Not modified.
-*
-* TAU REAL array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)' in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-* Not modified.
-*
-* WORK REAL array, dimension (2*N**2)
-* Workspace.
-* Modified.
-*
-* RESULT REAL array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if LDU is at least N.
-* Modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/xerbla.f b/TESTING/EIG/xerbla.f
index c2e3c11b..fcce9e6b 100644
--- a/TESTING/EIG/xerbla.f
+++ b/TESTING/EIG/xerbla.f
@@ -1,46 +1,95 @@
- SUBROUTINE XERBLA( SRNAME, INFO )
+*> \brief \b XERBLA
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*(*) SRNAME
- INTEGER INFO
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE XERBLA( SRNAME, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER*(*) SRNAME
+* INTEGER INFO
+* ..
+*
* Purpose
* =======
*
-* This is a special version of XERBLA to be used only as part of
-* the test program for testing error exits from the LAPACK routines.
-* Error messages are printed if INFO.NE.INFOT or if SRNAME.NE.SRNAMT,
-* where INFOT and SRNAMT are values stored in COMMON.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This is a special version of XERBLA to be used only as part of
+*> the test program for testing error exits from the LAPACK routines.
+*> Error messages are printed if INFO.NE.INFOT or if SRNAME.NE.SRNAMT,
+*> where INFOT and SRNAMT are values stored in COMMON.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SRNAME (input) CHARACTER*(*)
-* The name of the subroutine calling XERBLA. This name should
-* match the COMMON variable SRNAMT.
+*> \param[in] SRNAME
+*> \verbatim
+*> SRNAME is CHARACTER*(*)
+*> The name of the subroutine calling XERBLA. This name should
+*> match the COMMON variable SRNAMT.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The error return code from the calling subroutine. INFO
+*> should equal the COMMON variable INFOT.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_eig
*
-* INFO (input) INTEGER
-* The error return code from the calling subroutine. INFO
-* should equal the COMMON variable INFOT.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The following variables are passed via the common blocks INFOC and
+*> SRNAMC:
+*>
+*> INFOT INTEGER Expected integer return code
+*> NOUT INTEGER Unit number for printing error messages
+*> OK LOGICAL Set to .TRUE. if INFO = INFOT and
+*> SRNAME = SRNAMT, otherwise set to .FALSE.
+*> LERR LOGICAL Set to .TRUE., indicating that XERBLA was called
+*> SRNAMT CHARACTER*(*) Expected name of calling subroutine
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE XERBLA( SRNAME, INFO )
*
-* The following variables are passed via the common blocks INFOC and
-* SRNAMC:
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFOT INTEGER Expected integer return code
-* NOUT INTEGER Unit number for printing error messages
-* OK LOGICAL Set to .TRUE. if INFO = INFOT and
-* SRNAME = SRNAMT, otherwise set to .FALSE.
-* LERR LOGICAL Set to .TRUE., indicating that XERBLA was called
-* SRNAMT CHARACTER*(*) Expected name of calling subroutine
+* .. Scalar Arguments ..
+ CHARACTER*(*) SRNAME
+ INTEGER INFO
+* ..
*
+* =====================================================================
*
* .. Scalars in Common ..
LOGICAL LERR, OK
diff --git a/TESTING/EIG/xlaenv.f b/TESTING/EIG/xlaenv.f
index a31565f3..6389fabf 100644
--- a/TESTING/EIG/xlaenv.f
+++ b/TESTING/EIG/xlaenv.f
@@ -1,54 +1,96 @@
- SUBROUTINE XLAENV( ISPEC, NVALUE )
+*> \brief \b XLAENV
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER ISPEC, NVALUE
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE XLAENV( ISPEC, NVALUE )
+*
+* .. Scalar Arguments ..
+* INTEGER ISPEC, NVALUE
+* ..
+*
* Purpose
* =======
*
-* XLAENV sets certain machine- and problem-dependent quantities
-* which will later be retrieved by ILAENV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> XLAENV sets certain machine- and problem-dependent quantities
+*> which will later be retrieved by ILAENV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISPEC (input) INTEGER
-* Specifies the parameter to be set in the COMMON array IPARMS.
-* = 1: the optimal blocksize; if this value is 1, an unblocked
-* algorithm will give the best performance.
-* = 2: the minimum block size for which the block routine
-* should be used; if the usable block size is less than
-* this value, an unblocked routine should be used.
-* = 3: the crossover point (in a block routine, for N less
-* than this value, an unblocked routine should be used)
-* = 4: the number of shifts, used in the nonsymmetric
-* eigenvalue routines
-* = 5: the minimum column dimension for blocking to be used;
-* rectangular blocks must have dimension at least k by m,
-* where k is given by ILAENV(2,...) and m by ILAENV(5,...)
-* = 6: the crossover point for the SVD (when reducing an m by n
-* matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
-* this value, a QR factorization is used first to reduce
-* the matrix to a triangular form)
-* = 7: the number of processors
-* = 8: another crossover point, for the multishift QR and QZ
-* methods for nonsymmetric eigenvalue problems.
-* = 9: maximum size of the subproblems at the bottom of the
-* computation tree in the divide-and-conquer algorithm
-* (used by xGELSD and xGESDD)
-* =10: ieee NaN arithmetic can be trusted not to trap
-* =11: infinity arithmetic can be trusted not to trap
-* 12 <= ISPEC <= 16:
-* xHSEQR or one of its subroutines,
-* see IPARMQ for detailed explanation
-*
-* NVALUE (input) INTEGER
-* The value of the parameter specified by ISPEC.
+*> \param[in] ISPEC
+*> \verbatim
+*> ISPEC is INTEGER
+*> Specifies the parameter to be set in the COMMON array IPARMS.
+*> = 1: the optimal blocksize; if this value is 1, an unblocked
+*> algorithm will give the best performance.
+*> = 2: the minimum block size for which the block routine
+*> should be used; if the usable block size is less than
+*> this value, an unblocked routine should be used.
+*> = 3: the crossover point (in a block routine, for N less
+*> than this value, an unblocked routine should be used)
+*> = 4: the number of shifts, used in the nonsymmetric
+*> eigenvalue routines
+*> = 5: the minimum column dimension for blocking to be used;
+*> rectangular blocks must have dimension at least k by m,
+*> where k is given by ILAENV(2,...) and m by ILAENV(5,...)
+*> = 6: the crossover point for the SVD (when reducing an m by n
+*> matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
+*> this value, a QR factorization is used first to reduce
+*> the matrix to a triangular form)
+*> = 7: the number of processors
+*> = 8: another crossover point, for the multishift QR and QZ
+*> methods for nonsymmetric eigenvalue problems.
+*> = 9: maximum size of the subproblems at the bottom of the
+*> computation tree in the divide-and-conquer algorithm
+*> (used by xGELSD and xGESDD)
+*> =10: ieee NaN arithmetic can be trusted not to trap
+*> =11: infinity arithmetic can be trusted not to trap
+*> 12 <= ISPEC <= 16:
+*> xHSEQR or one of its subroutines,
+*> see IPARMQ for detailed explanation
+*> \endverbatim
+*>
+*> \param[in] NVALUE
+*> \verbatim
+*> NVALUE is INTEGER
+*> The value of the parameter specified by ISPEC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_eig
+*
+* =====================================================================
+ SUBROUTINE XLAENV( ISPEC, NVALUE )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER ISPEC, NVALUE
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zbdt01.f b/TESTING/EIG/zbdt01.f
index ddf520e2..10eb6016 100644
--- a/TESTING/EIG/zbdt01.f
+++ b/TESTING/EIG/zbdt01.f
@@ -1,9 +1,157 @@
+*> \brief \b ZBDT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER KD, LDA, LDPT, LDQ, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), PT( LDPT, * ), Q( LDQ, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZBDT01 reconstructs a general matrix A from its bidiagonal form
+*> A = Q * B * P'
+*> where Q (m by min(m,n)) and P' (min(m,n) by n) are unitary
+*> matrices and B is bidiagonal.
+*>
+*> The test ratio to test the reduction is
+*> RESID = norm( A - Q * B * PT ) / ( n * norm(A) * EPS )
+*> where PT = P' and EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and P'.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> If KD = 0, B is diagonal and the array E is not referenced.
+*> If KD = 1, the reduction was performed by xGEBRD; B is upper
+*> bidiagonal if M >= N, and lower bidiagonal if M < N.
+*> If KD = -1, the reduction was performed by xGBBRD; B is
+*> always upper bidiagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> The m by min(m,n) unitary matrix Q in the reduction
+*> A = Q * B * P'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (min(M,N)-1)
+*> The superdiagonal elements of the bidiagonal matrix B if
+*> m >= n, or the subdiagonal elements of B if m < n.
+*> \endverbatim
+*>
+*> \param[in] PT
+*> \verbatim
+*> PT is COMPLEX*16 array, dimension (LDPT,N)
+*> The min(m,n) by n unitary matrix P' in the reduction
+*> A = Q * B * P'.
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the array PT.
+*> LDPT >= max(1,min(M,N)).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (M+N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The test ratio: norm(A - Q * B * P') / ( n * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZBDT01( M, N, KD, A, LDA, Q, LDQ, D, E, PT, LDPT, WORK,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KD, LDA, LDPT, LDQ, M, N
@@ -15,69 +163,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZBDT01 reconstructs a general matrix A from its bidiagonal form
-* A = Q * B * P'
-* where Q (m by min(m,n)) and P' (min(m,n) by n) are unitary
-* matrices and B is bidiagonal.
-*
-* The test ratio to test the reduction is
-* RESID = norm( A - Q * B * PT ) / ( n * norm(A) * EPS )
-* where PT = P' and EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrices A and Q.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and P'.
-*
-* KD (input) INTEGER
-* If KD = 0, B is diagonal and the array E is not referenced.
-* If KD = 1, the reduction was performed by xGEBRD; B is upper
-* bidiagonal if M >= N, and lower bidiagonal if M < N.
-* If KD = -1, the reduction was performed by xGBBRD; B is
-* always upper bidiagonal.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* Q (input) COMPLEX*16 array, dimension (LDQ,N)
-* The m by min(m,n) unitary matrix Q in the reduction
-* A = Q * B * P'.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,M).
-*
-* D (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the bidiagonal matrix B.
-*
-* E (input) DOUBLE PRECISION array, dimension (min(M,N)-1)
-* The superdiagonal elements of the bidiagonal matrix B if
-* m >= n, or the subdiagonal elements of B if m < n.
-*
-* PT (input) COMPLEX*16 array, dimension (LDPT,N)
-* The min(m,n) by n unitary matrix P' in the reduction
-* A = Q * B * P'.
-*
-* LDPT (input) INTEGER
-* The leading dimension of the array PT.
-* LDPT >= max(1,min(M,N)).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (M+N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The test ratio: norm(A - Q * B * P') / ( n * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zbdt02.f b/TESTING/EIG/zbdt02.f
index e5d4203c..0a0bea2a 100644
--- a/TESTING/EIG/zbdt02.f
+++ b/TESTING/EIG/zbdt02.f
@@ -1,9 +1,130 @@
+*> \brief \b ZBDT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDC, LDU, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 B( LDB, * ), C( LDC, * ), U( LDU, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZBDT02 tests the change of basis C = U' * B by computing the residual
+*>
+*> RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+*>
+*> where B and C are M by N matrices, U is an M by M orthogonal matrix,
+*> and EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices B and C and the order of
+*> the matrix Q.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices B and C.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> The m by n matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> The m by n matrix C, assumed to contain U' * B.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,M)
+*> The m by m orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZBDT02( M, N, B, LDB, C, LDC, U, LDU, WORK, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDB, LDC, LDU, M, N
@@ -15,51 +136,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZBDT02 tests the change of basis C = U' * B by computing the residual
-*
-* RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
-*
-* where B and C are M by N matrices, U is an M by M orthogonal matrix,
-* and EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrices B and C and the order of
-* the matrix Q.
-*
-* N (input) INTEGER
-* The number of columns of the matrices B and C.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,N)
-* The m by n matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
-*
-* C (input) COMPLEX*16 array, dimension (LDC,N)
-* The m by n matrix C, assumed to contain U' * B.
-*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max(1,M).
-*
-* U (input) COMPLEX*16 array, dimension (LDU,M)
-* The m by m orthogonal matrix U.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (M)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* RESID = norm( B - U * C ) / ( max(m,n) * norm(B) * EPS ),
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zbdt03.f b/TESTING/EIG/zbdt03.f
index 16f4a725..3827761c 100644
--- a/TESTING/EIG/zbdt03.f
+++ b/TESTING/EIG/zbdt03.f
@@ -1,9 +1,146 @@
+*> \brief \b ZBDT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZBDT03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDU, LDVT, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), S( * )
+* COMPLEX*16 U( LDU, * ), VT( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZBDT03 reconstructs a bidiagonal matrix B from its SVD:
+*> S = U' * B * V
+*> where U and V are orthogonal matrices and S is diagonal.
+*>
+*> The test ratio to test the singular value decomposition is
+*> RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS )
+*> where VT = V' and EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix B is upper or lower bidiagonal.
+*> = 'U': Upper bidiagonal
+*> = 'L': Lower bidiagonal
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix B.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The bandwidth of the bidiagonal matrix B. If KD = 1, the
+*> matrix B is bidiagonal, and if KD = 0, B is diagonal and E is
+*> not referenced. If KD is greater than 1, it is assumed to be
+*> 1, and if KD is less than 0, it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the bidiagonal matrix B.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) superdiagonal elements of the bidiagonal matrix B
+*> if UPLO = 'U', or the (n-1) subdiagonal elements of B if
+*> UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,N)
+*> The n by n orthogonal matrix U in the reduction B = U'*A*P.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> The singular values from the SVD of B, sorted in decreasing
+*> order.
+*> \endverbatim
+*>
+*> \param[in] VT
+*> \verbatim
+*> VT is COMPLEX*16 array, dimension (LDVT,N)
+*> The n by n orthogonal matrix V' in the reduction
+*> B = U * S * V'.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of the array VT.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZBDT03( UPLO, N, KD, D, E, U, LDU, S, VT, LDVT, WORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,64 +152,6 @@
COMPLEX*16 U( LDU, * ), VT( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZBDT03 reconstructs a bidiagonal matrix B from its SVD:
-* S = U' * B * V
-* where U and V are orthogonal matrices and S is diagonal.
-*
-* The test ratio to test the singular value decomposition is
-* RESID = norm( B - U * S * VT ) / ( n * norm(B) * EPS )
-* where VT = V' and EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix B is upper or lower bidiagonal.
-* = 'U': Upper bidiagonal
-* = 'L': Lower bidiagonal
-*
-* N (input) INTEGER
-* The order of the matrix B.
-*
-* KD (input) INTEGER
-* The bandwidth of the bidiagonal matrix B. If KD = 1, the
-* matrix B is bidiagonal, and if KD = 0, B is diagonal and E is
-* not referenced. If KD is greater than 1, it is assumed to be
-* 1, and if KD is less than 0, it is assumed to be 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the bidiagonal matrix B.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) superdiagonal elements of the bidiagonal matrix B
-* if UPLO = 'U', or the (n-1) subdiagonal elements of B if
-* UPLO = 'L'.
-*
-* U (input) COMPLEX*16 array, dimension (LDU,N)
-* The n by n orthogonal matrix U in the reduction B = U'*A*P.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,N)
-*
-* S (input) DOUBLE PRECISION array, dimension (N)
-* The singular values from the SVD of B, sorted in decreasing
-* order.
-*
-* VT (input) COMPLEX*16 array, dimension (LDVT,N)
-* The n by n orthogonal matrix V' in the reduction
-* B = U * S * V'.
-*
-* LDVT (input) INTEGER
-* The leading dimension of the array VT.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RESID (output) DOUBLE PRECISION
-* The test ratio: norm(B - U * S * V') / ( n * norm(A) * EPS )
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zchkbb.f b/TESTING/EIG/zchkbb.f
index d97fec6e..fd3173e5 100644
--- a/TESTING/EIG/zchkbb.f
+++ b/TESTING/EIG/zchkbb.f
@@ -1,11 +1,375 @@
+*> \brief \b ZCHKBB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKBB( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
+* NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
+* BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
+* LWORK, RWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
+* $ NRHS, NSIZES, NTYPES, NWDTHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), KK( * ), MVAL( * ), NVAL( * )
+* DOUBLE PRECISION BD( * ), BE( * ), RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AB( LDAB, * ), C( LDC, * ),
+* $ CC( LDC, * ), P( LDP, * ), Q( LDQ, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKBB tests the reduction of a general complex rectangular band
+*> matrix to real bidiagonal form.
+*>
+*> ZGBBRD factors a general band matrix A as Q B P* , where * means
+*> conjugate transpose, B is upper bidiagonal, and Q and P are unitary;
+*> ZGBBRD can also overwrite a given matrix C with Q* C .
+*>
+*> For each pair of matrix dimensions (M,N) and each selected matrix
+*> type, an M by N matrix A and an M by NRHS matrix C are generated.
+*> The problem dimensions are as follows
+*> A: M x N
+*> Q: M x M
+*> P: N x N
+*> B: min(M,N) x min(M,N)
+*> C: M x NRHS
+*>
+*> For each generated matrix, 4 tests are performed:
+*>
+*> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
+*>
+*> (2) | I - Q' Q | / ( M ulp )
+*>
+*> (3) | I - PT PT' | / ( N ulp )
+*>
+*> (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
+*>
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> The possible matrix types are
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (3), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (3), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U D V, where U and V are orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U D V, where U and V are orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Rectangular matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of values of M and N contained in the vectors
+*> MVAL and NVAL. The matrix sizes are used in pairs (M,N).
+*> If NSIZES is zero, ZCHKBB does nothing. NSIZES must be at
+*> least zero.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NSIZES)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NSIZES)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NWDTHS
+*> \verbatim
+*> NWDTHS is INTEGER
+*> The number of bandwidths to use. If it is zero,
+*> ZCHKBB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KK
+*> \verbatim
+*> KK is INTEGER array, dimension (NWDTHS)
+*> An array containing the bandwidths to be used for the band
+*> matrices. The values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZCHKBB
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns in the "right-hand side" matrix C.
+*> If NRHS = 0, then the operations on the right-hand side will
+*> not be tested. NRHS must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZCHKBB to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN))
+*> Used to hold the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB, max(NN))
+*> Used to hold A in band storage format.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of AB. It must be at least 2 (not 1!)
+*> and at least max( KK )+1.
+*> \endverbatim
+*>
+*> \param[out] BD
+*> \verbatim
+*> BD is DOUBLE PRECISION array, dimension (max(NN))
+*> Used to hold the diagonal of the bidiagonal matrix computed
+*> by ZGBBRD.
+*> \endverbatim
+*>
+*> \param[out] BE
+*> \verbatim
+*> BE is DOUBLE PRECISION array, dimension (max(NN))
+*> Used to hold the off-diagonal of the bidiagonal matrix
+*> computed by ZGBBRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ, max(NN))
+*> Used to hold the unitary matrix Q computed by ZGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] P
+*> \verbatim
+*> P is COMPLEX*16 array, dimension (LDP, max(NN))
+*> Used to hold the unitary matrix P computed by ZGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDP
+*> \verbatim
+*> LDP is INTEGER
+*> The leading dimension of P. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, max(NN))
+*> Used to hold the matrix C updated by ZGBBRD.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of U. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX*16 array, dimension (LDC, max(NN))
+*> Used to hold a copy of the matrix C.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( LDA+1, max(NN)+1 )*max(NN).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCHKBB( NSIZES, MVAL, NVAL, NWDTHS, KK, NTYPES, DOTYPE,
$ NRHS, ISEED, THRESH, NOUNIT, A, LDA, AB, LDAB,
$ BD, BE, Q, LDQ, P, LDP, C, LDC, CC, WORK,
$ LWORK, RWORK, RESULT, INFO )
*
-* -- LAPACK test routine (new routine for release 2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDAB, LDC, LDP, LDQ, LWORK, NOUNIT,
@@ -21,231 +385,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKBB tests the reduction of a general complex rectangular band
-* matrix to real bidiagonal form.
-*
-* ZGBBRD factors a general band matrix A as Q B P* , where * means
-* conjugate transpose, B is upper bidiagonal, and Q and P are unitary;
-* ZGBBRD can also overwrite a given matrix C with Q* C .
-*
-* For each pair of matrix dimensions (M,N) and each selected matrix
-* type, an M by N matrix A and an M by NRHS matrix C are generated.
-* The problem dimensions are as follows
-* A: M x N
-* Q: M x M
-* P: N x N
-* B: min(M,N) x min(M,N)
-* C: M x NRHS
-*
-* For each generated matrix, 4 tests are performed:
-*
-* (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
-*
-* (2) | I - Q' Q | / ( M ulp )
-*
-* (3) | I - PT PT' | / ( N ulp )
-*
-* (4) | Y - Q' C | / ( |Y| max(M,NRHS) ulp ), where Y = Q' C.
-*
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* The possible matrix types are
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (3), but multiplied by SQRT( overflow threshold )
-* (7) Same as (3), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U D V, where U and V are orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U D V, where U and V are orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Rectangular matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of values of M and N contained in the vectors
-* MVAL and NVAL. The matrix sizes are used in pairs (M,N).
-* If NSIZES is zero, ZCHKBB does nothing. NSIZES must be at
-* least zero.
-*
-* MVAL (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix row dimension M.
-*
-* NVAL (input) INTEGER array, dimension (NSIZES)
-* The values of the matrix column dimension N.
-*
-* NWDTHS (input) INTEGER
-* The number of bandwidths to use. If it is zero,
-* ZCHKBB does nothing. It must be at least zero.
-*
-* KK (input) INTEGER array, dimension (NWDTHS)
-* An array containing the bandwidths to be used for the band
-* matrices. The values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZCHKBB
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* NRHS (input) INTEGER
-* The number of columns in the "right-hand side" matrix C.
-* If NRHS = 0, then the operations on the right-hand side will
-* not be tested. NRHS must be at least 0.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZCHKBB to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN))
-* Used to hold the matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least max( NN ).
-*
-* AB (workspace) DOUBLE PRECISION array, dimension (LDAB, max(NN))
-* Used to hold A in band storage format.
-*
-* LDAB (input) INTEGER
-* The leading dimension of AB. It must be at least 2 (not 1!)
-* and at least max( KK )+1.
-*
-* BD (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Used to hold the diagonal of the bidiagonal matrix computed
-* by ZGBBRD.
-*
-* BE (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Used to hold the off-diagonal of the bidiagonal matrix
-* computed by ZGBBRD.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDQ, max(NN))
-* Used to hold the unitary matrix Q computed by ZGBBRD.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q. It must be at least 1
-* and at least max( NN ).
-*
-* P (workspace) COMPLEX*16 array, dimension (LDP, max(NN))
-* Used to hold the unitary matrix P computed by ZGBBRD.
-*
-* LDP (input) INTEGER
-* The leading dimension of P. It must be at least 1
-* and at least max( NN ).
-*
-* C (workspace) COMPLEX*16 array, dimension (LDC, max(NN))
-* Used to hold the matrix C updated by ZGBBRD.
-*
-* LDC (input) INTEGER
-* The leading dimension of U. It must be at least 1
-* and at least max( NN ).
-*
-* CC (workspace) COMPLEX*16 array, dimension (LDC, max(NN))
-* Used to hold a copy of the matrix C.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( LDA+1, max(NN)+1 )*max(NN).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(NN))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zchkbd.f b/TESTING/EIG/zchkbd.f
index 92e4fb34..297540f2 100644
--- a/TESTING/EIG/zchkbd.f
+++ b/TESTING/EIG/zchkbd.f
@@ -1,11 +1,431 @@
+*> \brief \b ZCHKBD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
+* ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
+* Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
+* RWORK, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
+* $ NSIZES, NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * )
+* DOUBLE PRECISION BD( * ), BE( * ), RWORK( * ), S1( * ), S2( * )
+* COMPLEX*16 A( LDA, * ), PT( LDPT, * ), Q( LDQ, * ),
+* $ U( LDPT, * ), VT( LDPT, * ), WORK( * ),
+* $ X( LDX, * ), Y( LDX, * ), Z( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKBD checks the singular value decomposition (SVD) routines.
+*>
+*> ZGEBRD reduces a complex general m by n matrix A to real upper or
+*> lower bidiagonal form by an orthogonal transformation: Q' * A * P = B
+*> (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
+*> and lower bidiagonal if m < n.
+*>
+*> ZUNGBR generates the orthogonal matrices Q and P' from ZGEBRD.
+*> Note that Q and P are not necessarily square.
+*>
+*> ZBDSQR computes the singular value decomposition of the bidiagonal
+*> matrix B as B = U S V'. It is called three times to compute
+*> 1) B = U S1 V', where S1 is the diagonal matrix of singular
+*> values and the columns of the matrices U and V are the left
+*> and right singular vectors, respectively, of B.
+*> 2) Same as 1), but the singular values are stored in S2 and the
+*> singular vectors are not computed.
+*> 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
+*> In addition, ZBDSQR has an option to apply the left orthogonal matrix
+*> U to a matrix X, useful in least squares applications.
+*>
+*> For each pair of matrix dimensions (M,N) and each selected matrix
+*> type, an M by N matrix A and an M by NRHS matrix X are generated.
+*> The problem dimensions are as follows
+*> A: M x N
+*> Q: M x min(M,N) (but M x M if NRHS > 0)
+*> P: min(M,N) x N
+*> B: min(M,N) x min(M,N)
+*> U, V: min(M,N) x min(M,N)
+*> S1, S2 diagonal, order min(M,N)
+*> X: M x NRHS
+*>
+*> For each generated matrix, 14 tests are performed:
+*>
+*> Test ZGEBRD and ZUNGBR
+*>
+*> (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
+*>
+*> (2) | I - Q' Q | / ( M ulp )
+*>
+*> (3) | I - PT PT' | / ( N ulp )
+*>
+*> Test ZBDSQR on bidiagonal matrix B
+*>
+*> (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
+*>
+*> (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
+*> and Z = U' Y.
+*> (6) | I - U' U | / ( min(M,N) ulp )
+*>
+*> (7) | I - VT VT' | / ( min(M,N) ulp )
+*>
+*> (8) S1 contains min(M,N) nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (9) 0 if the true singular values of B are within THRESH of
+*> those in S1. 2*THRESH if they are not. (Tested using
+*> DSVDCH)
+*>
+*> (10) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
+*> computing U and V.
+*>
+*> Test ZBDSQR on matrix A
+*>
+*> (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
+*>
+*> (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
+*>
+*> (13) | I - (QU)'(QU) | / ( M ulp )
+*>
+*> (14) | I - (VT PT) (PT'VT') | / ( N ulp )
+*>
+*> The possible matrix types are
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (3), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (3), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U D V, where U and V are orthogonal and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U D V, where U and V are orthogonal and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U D V, where U and V are orthogonal and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Rectangular matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*> Special case:
+*> (16) A bidiagonal matrix with random entries chosen from a
+*> logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
+*> entry is e^x, where x is chosen uniformly on
+*> [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
+*> (a) ZGEBRD is not called to reduce it to bidiagonal form.
+*> (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
+*> matrix will be lower bidiagonal, otherwise upper.
+*> (c) only tests 5--8 and 14 are performed.
+*>
+*> A subset of the full set of matrix types may be selected through
+*> the logical array DOTYPE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of values of M and N contained in the vectors
+*> MVAL and NVAL. The matrix sizes are used in pairs (M,N).
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NM)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZCHKBD
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrices are in A and B.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
+*> of type j will be generated. If NTYPES is smaller than the
+*> maximum number of types defined (PARAMETER MAXTYP), then
+*> types NTYPES+1 through MAXTYP will not be generated. If
+*> NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
+*> DOTYPE(NTYPES) will be ignored.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns in the "right-hand side" matrices X, Y,
+*> and Z, used in testing ZBDSQR. If NRHS = 0, then the
+*> operations on the right-hand side will not be tested.
+*> NRHS must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The values of ISEED are changed on exit, and can be
+*> used in the next call to ZCHKBD to continue the same random
+*> number sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0. Note that the
+*> expected value of the test ratios is O(1), so THRESH should
+*> be a reasonably small multiple of 1, e.g., 10 or 100.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,NMAX)
+*> where NMAX is the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,MMAX),
+*> where MMAX is the maximum value of M in MVAL.
+*> \endverbatim
+*>
+*> \param[out] BD
+*> \verbatim
+*> BD is DOUBLE PRECISION array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] BE
+*> \verbatim
+*> BE is DOUBLE PRECISION array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] S1
+*> \verbatim
+*> S1 is DOUBLE PRECISION array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is DOUBLE PRECISION array, dimension
+*> (max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the arrays X, Y, and Z.
+*> LDX >= max(1,MMAX).
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDX,NRHS)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,MMAX)
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,MMAX).
+*> \endverbatim
+*>
+*> \param[out] PT
+*> \verbatim
+*> PT is COMPLEX*16 array, dimension (LDPT,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDPT
+*> \verbatim
+*> LDPT is INTEGER
+*> The leading dimension of the arrays PT, U, and V.
+*> LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension
+*> (LDPT,max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension
+*> (LDPT,max(min(MVAL(j),NVAL(j))))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all
+*> pairs (M,N)=(MM(j),NN(j))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (5*max(min(M,N)))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some MM(j) < 0
+*> -3: Some NN(j) < 0
+*> -4: NTYPES < 0
+*> -6: NRHS < 0
+*> -8: THRESH < 0
+*> -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
+*> -17: LDB < 1 or LDB < MMAX.
+*> -21: LDQ < 1 or LDQ < MMAX.
+*> -23: LDP < 1 or LDP < MNMAX.
+*> -27: LWORK too small.
+*> If ZLATMR, CLATMS, ZGEBRD, ZUNGBR, or ZBDSQR,
+*> returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> MMAX Largest value in NN.
+*> NMAX Largest value in NN.
+*> MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal
+*> matrix.)
+*> MNMAX The maximum value of MNMIN for j=1,...,NSIZES.
+*> NFAIL The number of tests which have exceeded THRESH
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCHKBD( NSIZES, MVAL, NVAL, NTYPES, DOTYPE, NRHS,
$ ISEED, THRESH, A, LDA, BD, BE, S1, S2, X, LDX,
$ Y, Z, Q, LDQ, PT, LDPT, U, VT, WORK, LWORK,
$ RWORK, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDPT, LDQ, LDX, LWORK, NOUT, NRHS,
@@ -21,285 +441,6 @@
$ X( LDX, * ), Y( LDX, * ), Z( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKBD checks the singular value decomposition (SVD) routines.
-*
-* ZGEBRD reduces a complex general m by n matrix A to real upper or
-* lower bidiagonal form by an orthogonal transformation: Q' * A * P = B
-* (or A = Q * B * P'). The matrix B is upper bidiagonal if m >= n
-* and lower bidiagonal if m < n.
-*
-* ZUNGBR generates the orthogonal matrices Q and P' from ZGEBRD.
-* Note that Q and P are not necessarily square.
-*
-* ZBDSQR computes the singular value decomposition of the bidiagonal
-* matrix B as B = U S V'. It is called three times to compute
-* 1) B = U S1 V', where S1 is the diagonal matrix of singular
-* values and the columns of the matrices U and V are the left
-* and right singular vectors, respectively, of B.
-* 2) Same as 1), but the singular values are stored in S2 and the
-* singular vectors are not computed.
-* 3) A = (UQ) S (P'V'), the SVD of the original matrix A.
-* In addition, ZBDSQR has an option to apply the left orthogonal matrix
-* U to a matrix X, useful in least squares applications.
-*
-* For each pair of matrix dimensions (M,N) and each selected matrix
-* type, an M by N matrix A and an M by NRHS matrix X are generated.
-* The problem dimensions are as follows
-* A: M x N
-* Q: M x min(M,N) (but M x M if NRHS > 0)
-* P: min(M,N) x N
-* B: min(M,N) x min(M,N)
-* U, V: min(M,N) x min(M,N)
-* S1, S2 diagonal, order min(M,N)
-* X: M x NRHS
-*
-* For each generated matrix, 14 tests are performed:
-*
-* Test ZGEBRD and ZUNGBR
-*
-* (1) | A - Q B PT | / ( |A| max(M,N) ulp ), PT = P'
-*
-* (2) | I - Q' Q | / ( M ulp )
-*
-* (3) | I - PT PT' | / ( N ulp )
-*
-* Test ZBDSQR on bidiagonal matrix B
-*
-* (4) | B - U S1 VT | / ( |B| min(M,N) ulp ), VT = V'
-*
-* (5) | Y - U Z | / ( |Y| max(min(M,N),k) ulp ), where Y = Q' X
-* and Z = U' Y.
-* (6) | I - U' U | / ( min(M,N) ulp )
-*
-* (7) | I - VT VT' | / ( min(M,N) ulp )
-*
-* (8) S1 contains min(M,N) nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (9) 0 if the true singular values of B are within THRESH of
-* those in S1. 2*THRESH if they are not. (Tested using
-* DSVDCH)
-*
-* (10) | S1 - S2 | / ( |S1| ulp ), where S2 is computed without
-* computing U and V.
-*
-* Test ZBDSQR on matrix A
-*
-* (11) | A - (QU) S (VT PT) | / ( |A| max(M,N) ulp )
-*
-* (12) | X - (QU) Z | / ( |X| max(M,k) ulp )
-*
-* (13) | I - (QU)'(QU) | / ( M ulp )
-*
-* (14) | I - (VT PT) (PT'VT') | / ( N ulp )
-*
-* The possible matrix types are
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (3), but multiplied by SQRT( overflow threshold )
-* (7) Same as (3), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U D V, where U and V are orthogonal and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U D V, where U and V are orthogonal and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U D V, where U and V are orthogonal and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Rectangular matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Special case:
-* (16) A bidiagonal matrix with random entries chosen from a
-* logarithmic distribution on [ulp^2,ulp^(-2)] (I.e., each
-* entry is e^x, where x is chosen uniformly on
-* [ 2 log(ulp), -2 log(ulp) ] .) For *this* type:
-* (a) ZGEBRD is not called to reduce it to bidiagonal form.
-* (b) the bidiagonal is min(M,N) x min(M,N); if M<N, the
-* matrix will be lower bidiagonal, otherwise upper.
-* (c) only tests 5--8 and 14 are performed.
-*
-* A subset of the full set of matrix types may be selected through
-* the logical array DOTYPE.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of values of M and N contained in the vectors
-* MVAL and NVAL. The matrix sizes are used in pairs (M,N).
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix column dimension N.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZCHKBD
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrices are in A and B.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
-* of type j will be generated. If NTYPES is smaller than the
-* maximum number of types defined (PARAMETER MAXTYP), then
-* types NTYPES+1 through MAXTYP will not be generated. If
-* NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
-* DOTYPE(NTYPES) will be ignored.
-*
-* NRHS (input) INTEGER
-* The number of columns in the "right-hand side" matrices X, Y,
-* and Z, used in testing ZBDSQR. If NRHS = 0, then the
-* operations on the right-hand side will not be tested.
-* NRHS must be at least 0.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The values of ISEED are changed on exit, and can be
-* used in the next call to ZCHKBD to continue the same random
-* number sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0. Note that the
-* expected value of the test ratios is O(1), so THRESH should
-* be a reasonably small multiple of 1, e.g., 10 or 100.
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
-* where NMAX is the maximum value of N in NVAL.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,MMAX),
-* where MMAX is the maximum value of M in MVAL.
-*
-* BD (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* BE (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* S1 (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* S2 (workspace) DOUBLE PRECISION array, dimension
-* (max(min(MVAL(j),NVAL(j))))
-*
-* X (workspace) COMPLEX*16 array, dimension (LDX,NRHS)
-*
-* LDX (input) INTEGER
-* The leading dimension of the arrays X, Y, and Z.
-* LDX >= max(1,MMAX).
-*
-* Y (workspace) COMPLEX*16 array, dimension (LDX,NRHS)
-*
-* Z (workspace) COMPLEX*16 array, dimension (LDX,NRHS)
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDQ,MMAX)
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,MMAX).
-*
-* PT (workspace) COMPLEX*16 array, dimension (LDPT,NMAX)
-*
-* LDPT (input) INTEGER
-* The leading dimension of the arrays PT, U, and V.
-* LDPT >= max(1, max(min(MVAL(j),NVAL(j)))).
-*
-* U (workspace) COMPLEX*16 array, dimension
-* (LDPT,max(min(MVAL(j),NVAL(j))))
-*
-* V (workspace) COMPLEX*16 array, dimension
-* (LDPT,max(min(MVAL(j),NVAL(j))))
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 3(M+N) and M(M + max(M,N,k) + 1) + N*min(M,N) for all
-* pairs (M,N)=(MM(j),NN(j))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (5*max(min(M,N)))
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some MM(j) < 0
-* -3: Some NN(j) < 0
-* -4: NTYPES < 0
-* -6: NRHS < 0
-* -8: THRESH < 0
-* -11: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
-* -17: LDB < 1 or LDB < MMAX.
-* -21: LDQ < 1 or LDQ < MMAX.
-* -23: LDP < 1 or LDP < MNMAX.
-* -27: LWORK too small.
-* If ZLATMR, CLATMS, ZGEBRD, ZUNGBR, or ZBDSQR,
-* returns an error code, the
-* absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* MMAX Largest value in NN.
-* NMAX Largest value in NN.
-* MNMIN min(MM(j), NN(j)) (the dimension of the bidiagonal
-* matrix.)
-* MNMAX The maximum value of MNMIN for j=1,...,NSIZES.
-* NFAIL The number of tests which have exceeded THRESH
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* ULP, ULPINV Finest relative precision and its inverse.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* ======================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zchkbk.f b/TESTING/EIG/zchkbk.f
index 4a735772..7960e136 100644
--- a/TESTING/EIG/zchkbk.f
+++ b/TESTING/EIG/zchkbk.f
@@ -1,28 +1,70 @@
- SUBROUTINE ZCHKBK( NIN, NOUT )
+*> \brief \b ZCHKBK
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKBK( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* ZCHKBK tests ZGEBAK, a routine for backward transformation of
-* the computed right or left eigenvectors if the orginal matrix
-* was preprocessed by balance subroutine ZGEBAL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKBK tests ZGEBAK, a routine for backward transformation of
+*> the computed right or left eigenvectors if the orginal matrix
+*> was preprocessed by balance subroutine ZGEBAL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZCHKBK( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/zchkbl.f b/TESTING/EIG/zchkbl.f
index 40e34ca5..a6aa0705 100644
--- a/TESTING/EIG/zchkbl.f
+++ b/TESTING/EIG/zchkbl.f
@@ -1,27 +1,69 @@
- SUBROUTINE ZCHKBL( NIN, NOUT )
+*> \brief \b ZCHKBL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKBL( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* ZCHKBL tests ZGEBAL, a routine for balancing a general complex
-* matrix and isolating some of its eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKBL tests ZGEBAL, a routine for balancing a general complex
+*> matrix and isolating some of its eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZCHKBL( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* ======================================================================
*
diff --git a/TESTING/EIG/zchkec.f b/TESTING/EIG/zchkec.f
index 1644aa1a..3cad2834 100644
--- a/TESTING/EIG/zchkec.f
+++ b/TESTING/EIG/zchkec.f
@@ -1,42 +1,92 @@
- SUBROUTINE ZCHKEC( THRESH, TSTERR, NIN, NOUT )
+*> \brief \b ZCHKEC
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL TSTERR
- INTEGER NIN, NOUT
- DOUBLE PRECISION THRESH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZCHKEC( THRESH, TSTERR, NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NIN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+*
* Purpose
* =======
*
-* ZCHKEC tests eigen- condition estimation routines
-* ZTRSYL, CTREXC, CTRSNA, CTRSEN
-*
-* In all cases, the routine runs through a fixed set of numerical
-* examples, subjects them to various tests, and compares the test
-* results to a threshold THRESH. In addition, ZTRSNA and CTRSEN are
-* tested by reading in precomputed examples from a file (on input unit
-* NIN). Output is written to output unit NOUT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKEC tests eigen- condition estimation routines
+*> ZTRSYL, CTREXC, CTRSNA, CTRSEN
+*>
+*> In all cases, the routine runs through a fixed set of numerical
+*> examples, subjects them to various tests, and compares the test
+*> results to a threshold THRESH. In addition, ZTRSNA and CTRSEN are
+*> tested by reading in precomputed examples from a file (on input unit
+*> NIN). Output is written to output unit NOUT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* THRESH (input) DOUBLE PRECISION
-* Threshold for residual tests. A computed test ratio passes
-* the threshold if it is less than THRESH.
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> Threshold for residual tests. A computed test ratio passes
+*> the threshold if it is less than THRESH.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
+*> \date November 2011
*
-* NIN (input) INTEGER
-* The logical unit number for input.
+*> \ingroup complex16_eig
*
-* NOUT (input) INTEGER
-* The logical unit number for output.
+* =====================================================================
+ SUBROUTINE ZCHKEC( THRESH, TSTERR, NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL TSTERR
+ INTEGER NIN, NOUT
+ DOUBLE PRECISION THRESH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zchkee.f b/TESTING/EIG/zchkee.f
index 51f6a79b..dd394d2f 100644
--- a/TESTING/EIG/zchkee.f
+++ b/TESTING/EIG/zchkee.f
@@ -1,1008 +1,1043 @@
- PROGRAM ZCHKEE
-*
-* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
-*
-* Purpose
-* =======
-*
-* ZCHKEE tests the COMPLEX*16 LAPACK subroutines for the matrix
-* eigenvalue problem. The test paths in this version are
-*
-* NEP (Nonsymmetric Eigenvalue Problem):
-* Test ZGEHRD, ZUNGHR, ZHSEQR, ZTREVC, ZHSEIN, and ZUNMHR
-*
-* SEP (Hermitian Eigenvalue Problem):
-* Test ZHETRD, ZUNGTR, ZSTEQR, ZSTERF, ZSTEIN, ZSTEDC,
-* and drivers ZHEEV(X), ZHBEV(X), ZHPEV(X),
-* ZHEEVD, ZHBEVD, ZHPEVD
-*
-* SVD (Singular Value Decomposition):
-* Test ZGEBRD, ZUNGBR, and ZBDSQR
-* and the drivers ZGESVD, ZGESDD
-*
-* ZEV (Nonsymmetric Eigenvalue/eigenvector Driver):
-* Test ZGEEV
-*
-* ZES (Nonsymmetric Schur form Driver):
-* Test ZGEES
-*
-* ZVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
-* Test ZGEEVX
-*
-* ZSX (Nonsymmetric Schur form Expert Driver):
-* Test ZGEESX
-*
-* ZGG (Generalized Nonsymmetric Eigenvalue Problem):
-* Test ZGGHRD, ZGGBAL, ZGGBAK, ZHGEQZ, and ZTGEVC
-* and the driver routines ZGEGS and ZGEGV
-*
-* ZGS (Generalized Nonsymmetric Schur form Driver):
-* Test ZGGES
-*
-* ZGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
-* Test ZGGEV
-*
-* ZGX (Generalized Nonsymmetric Schur form Expert Driver):
-* Test ZGGESX
-*
-* ZXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
-* Test ZGGEVX
-*
-* ZSG (Hermitian Generalized Eigenvalue Problem):
-* Test ZHEGST, ZHEGV, ZHEGVD, ZHEGVX, ZHPGST, ZHPGV, ZHPGVD,
-* ZHPGVX, ZHBGST, ZHBGV, ZHBGVD, and ZHBGVX
-*
-* ZHB (Hermitian Band Eigenvalue Problem):
-* Test ZHBTRD
-*
-* ZBB (Band Singular Value Decomposition):
-* Test ZGBBRD
-*
-* ZEC (Eigencondition estimation):
-* Test ZTRSYL, ZTREXC, ZTRSNA, and ZTRSEN
-*
-* ZBL (Balancing a general matrix)
-* Test ZGEBAL
-*
-* ZBK (Back transformation on a balanced matrix)
-* Test ZGEBAK
-*
-* ZGL (Balancing a matrix pair)
-* Test ZGGBAL
-*
-* ZGK (Back transformation on a matrix pair)
-* Test ZGGBAK
-*
-* GLM (Generalized Linear Regression Model):
-* Tests ZGGGLM
-*
-* GQR (Generalized QR and RQ factorizations):
-* Tests ZGGQRF and ZGGRQF
-*
-* GSV (Generalized Singular Value Decomposition):
-* Tests ZGGSVD, ZGGSVP, ZTGSJA, ZLAGS2, ZLAPLL, and ZLAPMT
-*
-* CSD (CS decomposition):
-* Tests ZUNCSD
-*
-* LSE (Constrained Linear Least Squares):
-* Tests ZGGLSE
-*
-* Each test path has a different set of inputs, but the data sets for
-* the driver routines xEV, xES, xVX, and xSX can be concatenated in a
-* single input file. The first line of input should contain one of the
-* 3-character path names in columns 1-3. The number of remaining lines
-* depends on what is found on the first line.
-*
-* The number of matrix types used in testing is often controllable from
-* the input file. The number of matrix types for each path, and the
-* test routine that describes them, is as follows:
-*
-* Path name(s) Types Test routine
-*
-* ZHS or NEP 21 ZCHKHS
-* ZST or SEP 21 ZCHKST (routines)
-* 18 ZDRVST (drivers)
-* ZBD or SVD 16 ZCHKBD (routines)
-* 5 ZDRVBD (drivers)
-* ZEV 21 ZDRVEV
-* ZES 21 ZDRVES
-* ZVX 21 ZDRVVX
-* ZSX 21 ZDRVSX
-* ZGG 26 ZCHKGG (routines)
-* 26 ZDRVGG (drivers)
-* ZGS 26 ZDRGES
-* ZGX 5 ZDRGSX
-* ZGV 26 ZDRGEV
-* ZXV 2 ZDRGVX
-* ZSG 21 ZDRVSG
-* ZHB 15 ZCHKHB
-* ZBB 15 ZCHKBB
-* ZEC - ZCHKEC
-* ZBL - ZCHKBL
-* ZBK - ZCHKBK
-* ZGL - ZCHKGL
-* ZGK - ZCHKGK
-* GLM 8 ZCKGLM
-* GQR 8 ZCKGQR
-* GSV 8 ZCKGSV
-* CSD 3 ZCKCSD
-* LSE 8 ZCKLSE
-*
-*-----------------------------------------------------------------------
-*
-* NEP input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, NX, NS, and
-* MAXB.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 7: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 8: INMIN, INTEGER array, dimension (NPARMS)
-* LAHQR vs TTQRE crossover point, >= 11
-*
-* line 9: INWIN, INTEGER array, dimension (NPARMS)
-* recommended deflation window size
-*
-* line 10: INIBL, INTEGER array, dimension (NPARMS)
-* nibble crossover point
-*
-* line 11: ISHFTS, INTEGER array, dimension (NPARMS)
-* number of simultaneous shifts)
-*
-* line 12: IACC22, INTEGER array, dimension (NPARMS)
-* select structured matrix multiply: 0, 1 or 2)
-*
-* line 13: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold. To have all of the test
-* ratios printed, use THRESH = 0.0 .
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
-* the user to specify the matrix types. Each line contains
-* a 3-character path name in columns 1-3, and the number
-* of matrix types must be the first nonblank item in columns
-* 4-80. If the number of matrix types is at least 1 but is
-* less than the maximum number of possible types, a second
-* line will be read to get the numbers of the matrix types to
-* be used. For example,
-* NEP 21
-* requests all of the matrix types for the nonsymmetric
-* eigenvalue problem, while
-* NEP 4
-* 9 10 11 12
-* requests only matrices of type 9, 10, 11, and 12.
-*
-* The valid 3-character path names are 'NEP' or 'ZHS' for the
-* nonsymmetric eigenvalue routines.
-*
-*-----------------------------------------------------------------------
-*
-* SEP or ZSG input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, and NX.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 7: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 8: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 9: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 10: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 11: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 12: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 12 was 2:
-*
-* line 13: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 13-EOF: Lines specifying matrix types, as for NEP.
-* The valid 3-character path names are 'SEP' or 'ZST' for the
-* Hermitian eigenvalue routines and driver routines, and
-* 'ZSG' for the routines for the Hermitian generalized
-* eigenvalue problem.
-*
-*-----------------------------------------------------------------------
-*
-* SVD input file:
-*
-* line 2: NN, INTEGER
-* Number of values of M and N.
-*
-* line 3: MVAL, INTEGER array, dimension (NN)
-* The values for the matrix row dimension M.
-*
-* line 4: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix column dimension N.
-*
-* line 5: NPARMS, INTEGER
-* Number of values of the parameter NB, NBMIN, NX, and NRHS.
-*
-* line 6: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 7: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for the minimum blocksize NBMIN.
-*
-* line 8: NXVAL, INTEGER array, dimension (NPARMS)
-* The values for the crossover point NX.
-*
-* line 9: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of right hand sides NRHS.
-*
-* line 10: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 11: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
-*
-* line 12: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
-*
-* line 13: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 15-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path names are 'SVD' or 'ZBD' for both the
-* SVD routines and the SVD driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* ZEV and ZES data files:
-*
-* line 1: 'ZEV' or 'ZES' in columns 1 to 3.
-*
-* line 2: NSIZES, INTEGER
-* Number of sizes of matrices to use. Should be at least 0
-* and at most 20. If NSIZES = 0, no testing is done
-* (although the remaining 3 lines are still read).
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-* Dimensions of matrices to be tested.
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHSEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 5: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* If it is 0., all test case data will be printed.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 8 and following: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'ZEV' to test CGEEV, or
-* 'ZES' to test CGEES.
-*
-*-----------------------------------------------------------------------
-*
-* The ZVX data has two parts. The first part is identical to ZEV,
-* and the second part consists of test matrices with precomputed
-* solutions.
-*
-* line 1: 'ZVX' in columns 1-3.
-*
-* line 2: NSIZES, INTEGER
-* If NSIZES = 0, no testing of randomly generated examples
-* is done, but any precomputed examples are tested.
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-*
-* line 5: THRESH, REAL
-*
-* line 6: NEWSD, INTEGER
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-*
-* lines 8 and following: The first line contains 'ZVX' in columns 1-3
-* followed by the number of matrix types, possibly with
-* a second line to specify certain matrix types.
-* If the number of matrix types = 0, no testing of randomly
-* generated examples is done, but any precomputed examples
-* are tested.
-*
-* remaining lines : Each matrix is stored on 1+N+N**2 lines, where N is
-* its dimension. The first line contains the dimension N and
-* ISRT (two integers). ISRT indicates whether the last N lines
-* are sorted by increasing real part of the eigenvalue
-* (ISRT=0) or by increasing imaginary part (ISRT=1). The next
-* N**2 lines contain the matrix rowwise, one entry per line.
-* The last N lines correspond to each eigenvalue. Each of
-* these last N lines contains 4 real values: the real part of
-* the eigenvalues, the imaginary part of the eigenvalue, the
-* reciprocal condition number of the eigenvalues, and the
-* reciprocal condition number of the vector eigenvector. The
-* end of data is indicated by dimension N=0. Even if no data
-* is to be tested, there must be at least one line containing
-* N=0.
-*
-*-----------------------------------------------------------------------
-*
-* The ZSX data is like ZVX. The first part is identical to ZEV, and the
-* second part consists of test matrices with precomputed solutions.
-*
-* line 1: 'ZSX' in columns 1-3.
-*
-* line 2: NSIZES, INTEGER
-* If NSIZES = 0, no testing of randomly generated examples
-* is done, but any precomputed examples are tested.
-*
-* line 3: NN, INTEGER array, dimension(NSIZES)
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-*
-* line 5: THRESH, REAL
-*
-* line 6: NEWSD, INTEGER
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-*
-* lines 8 and following: The first line contains 'ZSX' in columns 1-3
-* followed by the number of matrix types, possibly with
-* a second line to specify certain matrix types.
-* If the number of matrix types = 0, no testing of randomly
-* generated examples is done, but any precomputed examples
-* are tested.
-*
-* remaining lines : Each matrix is stored on 3+N**2 lines, where N is
-* its dimension. The first line contains the dimension N, the
-* dimension M of an invariant subspace, and ISRT. The second
-* line contains M integers, identifying the eigenvalues in the
-* invariant subspace (by their position in a list of
-* eigenvalues ordered by increasing real part (if ISRT=0) or
-* by increasing imaginary part (if ISRT=1)). The next N**2
-* lines contain the matrix rowwise. The last line contains the
-* reciprocal condition number for the average of the selected
-* eigenvalues, and the reciprocal condition number for the
-* corresponding right invariant subspace. The end of data in
-* indicated by a line containing N=0, M=0, and ISRT = 0. Even
-* if no data is to be tested, there must be at least one line
-* containing N=0, M=0 and ISRT=0.
-*
-*-----------------------------------------------------------------------
-*
-* ZGG input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NPARMS, INTEGER
-* Number of values of the parameters NB, NBMIN, NBCOL, NS, and
-* MAXB.
-*
-* line 5: NBVAL, INTEGER array, dimension (NPARMS)
-* The values for the blocksize NB.
-*
-* line 6: NBMIN, INTEGER array, dimension (NPARMS)
-* The values for NBMIN, the minimum row dimension for blocks.
-*
-* line 7: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of shifts.
-*
-* line 8: MXBVAL, INTEGER array, dimension (NPARMS)
-* The values for MAXB, used in determining minimum blocksize.
-*
-* line 9: NBCOL, INTEGER array, dimension (NPARMS)
-* The values for NBCOL, the minimum column dimension for
-* blocks.
-*
-* line 10: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 11: TSTCHK, LOGICAL
-* Flag indicating whether or not to test the LAPACK routines.
+*> \brief \b ZCHKEE
*
-* line 12: TSTDRV, LOGICAL
-* Flag indicating whether or not to test the driver routines.
+* =========== DOCUMENTATION ===========
*
-* line 13: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* line 14: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
+* Definition
+* ==========
*
-* If line 14 was 2:
-*
-* line 15: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 16-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'ZGG' for the generalized
-* eigenvalue problem routines and driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* ZGS and ZGV input files:
-*
-* line 1: 'ZGS' or 'ZGV' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension(NN)
-* Dimensions of matrices to be tested.
-*
-* line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 5: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* If it is 0., all test case data will be printed.
-*
-* line 6: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 17 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 7-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'ZGS' for the generalized
-* eigenvalue problem routines and driver routines.
-*
-*-----------------------------------------------------------------------
-*
-* ZGX input file:
-* line 1: 'ZGX' in columns 1 to 3.
-*
-* line 2: N, INTEGER
-* Value of N.
-*
-* line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 4: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* Information will be printed about each test for which the
-* test ratio is greater than or equal to the threshold.
-*
-* line 5: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* If line 2 was 0:
-*
-* line 7-EOF: Precomputed examples are tested.
-*
-* remaining lines : Each example is stored on 3+2*N*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next line contains an integer k such
-* that only the last k eigenvalues will be selected and appear
-* in the leading diagonal blocks of $A$ and $B$. The next N*N
-* lines contain the matrix A, one element per line. The next N*N
-* lines contain the matrix B. The last line contains the
-* reciprocal of the eigenvalue cluster condition number and the
-* reciprocal of the deflating subspace (associated with the
-* selected eigencluster) condition number. The end of data is
-* indicated by dimension N=0. Even if no data is to be tested,
-* there must be at least one line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* ZXV input files:
-* line 1: 'ZXV' in columns 1 to 3.
-*
-* line 2: N, INTEGER
-* Value of N.
-*
-* line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
-* These integer parameters determine how blocking is done
-* (see ILAENV for details)
-* NB : block size
-* NBMIN : minimum block size
-* NX : minimum dimension for blocking
-* NS : number of shifts in xHGEQR
-* NBCOL : minimum column dimension for blocking
-*
-* line 4: THRESH, REAL
-* The test threshold against which computed residuals are
-* compared. Should generally be in the range from 10. to 20.
-* Information will be printed about each test for which the
-* test ratio is greater than or equal to the threshold.
-*
-* line 5: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 6: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 6 was 2:
-*
-* line 7: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* If line 2 was 0:
-*
-* line 7-EOF: Precomputed examples are tested.
-*
-* remaining lines : Each example is stored on 3+2*N*N lines, where N is
-* its dimension. The first line contains the dimension (a
-* single integer). The next N*N lines contain the matrix A, one
-* element per line. The next N*N lines contain the matrix B.
-* The next line contains the reciprocals of the eigenvalue
-* condition numbers. The last line contains the reciprocals of
-* the eigenvector condition numbers. The end of data is
-* indicated by dimension N=0. Even if no data is to be tested,
-* there must be at least one line containing N=0.
-*
-*-----------------------------------------------------------------------
-*
-* ZHB input file:
-*
-* line 2: NN, INTEGER
-* Number of values of N.
-*
-* line 3: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix dimension N.
-*
-* line 4: NK, INTEGER
-* Number of values of K.
-*
-* line 5: KVAL, INTEGER array, dimension (NK)
-* The values for the matrix dimension K.
-*
-* line 6: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 7 was 2:
-*
-* line 8: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 8-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'ZHB'.
-*
-*-----------------------------------------------------------------------
-*
-* ZBB input file:
-*
-* line 2: NN, INTEGER
-* Number of values of M and N.
-*
-* line 3: MVAL, INTEGER array, dimension (NN)
-* The values for the matrix row dimension M.
-*
-* line 4: NVAL, INTEGER array, dimension (NN)
-* The values for the matrix column dimension N.
-*
-* line 4: NK, INTEGER
-* Number of values of K.
-*
-* line 5: KVAL, INTEGER array, dimension (NK)
-* The values for the matrix bandwidth K.
-*
-* line 6: NPARMS, INTEGER
-* Number of values of the parameter NRHS
-*
-* line 7: NSVAL, INTEGER array, dimension (NPARMS)
-* The values for the number of right hand sides NRHS.
-*
-* line 8: THRESH
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 9: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 9 was 2:
-*
-* line 10: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 10-EOF: Lines specifying matrix types, as for SVD.
-* The 3-character path name is 'ZBB'.
-*
-*-----------------------------------------------------------------------
-*
-* ZEC input file:
-*
-* line 2: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* lines 3-EOF:
-*
-* Input for testing the eigencondition routines consists of a set of
-* specially constructed test cases and their solutions. The data
-* format is not intended to be modified by the user.
-*
-*-----------------------------------------------------------------------
-*
-* ZBL and ZBK input files:
-*
-* line 1: 'ZBL' in columns 1-3 to test CGEBAL, or 'ZBK' in
-* columns 1-3 to test CGEBAK.
-*
-* The remaining lines consist of specially constructed test cases.
-*
-*-----------------------------------------------------------------------
-*
-* ZGL and ZGK input files:
-*
-* line 1: 'ZGL' in columns 1-3 to test ZGGBAL, or 'ZGK' in
-* columns 1-3 to test ZGGBAK.
-*
-* The remaining lines consist of specially constructed test cases.
-*
-*-----------------------------------------------------------------------
-*
-* GLM data file:
-*
-* line 1: 'GLM' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M (row dimension).
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P (row dimension).
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N (column dimension), note M <= N <= M+P.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GLM' for the generalized
-* linear regression model routines.
-*
-*-----------------------------------------------------------------------
-*
-* GQR data file:
-*
-* line 1: 'GQR' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M.
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P.
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GQR' for the generalized
-* QR and RQ routines.
-*
-*-----------------------------------------------------------------------
-*
-* GSV data file:
-*
-* line 1: 'GSV' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M (row dimension).
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P (row dimension).
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N (column dimension).
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GSV' for the generalized
-* SVD routines.
-*
-*-----------------------------------------------------------------------
-*
-* CSD data file:
-*
-* line 1: 'CSD' in columns 1 to 3.
-*
-* line 2: NM, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NM)
-* Values of M (row and column dimension of orthogonal matrix).
-*
-* line 4: PVAL, INTEGER array, dimension(NM)
-* Values of P (row dimension of top-left block).
-*
-* line 5: NVAL, INTEGER array, dimension(NM)
-* Values of N (column dimension of top-left block).
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
-*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
-*
-* If line 8 was 2:
-*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
-*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'CSD' for the CSD routine.
-*
-*-----------------------------------------------------------------------
-*
-* LSE data file:
-*
-* line 1: 'LSE' in columns 1 to 3.
-*
-* line 2: NN, INTEGER
-* Number of values of M, P, and N.
-*
-* line 3: MVAL, INTEGER array, dimension(NN)
-* Values of M.
-*
-* line 4: PVAL, INTEGER array, dimension(NN)
-* Values of P.
-*
-* line 5: NVAL, INTEGER array, dimension(NN)
-* Values of N, note P <= N <= P+M.
-*
-* line 6: THRESH, REAL
-* Threshold value for the test ratios. Information will be
-* printed about each test for which the test ratio is greater
-* than or equal to the threshold.
-*
-* line 7: TSTERR, LOGICAL
-* Flag indicating whether or not to test the error exits for
-* the LAPACK routines and driver routines.
+* PROGRAM ZCHKEE
+*
+* Purpose
+* =======
*
-* line 8: NEWSD, INTEGER
-* A code indicating how to set the random number seed.
-* = 0: Set the seed to a default value before each run
-* = 1: Initialize the seed to a default value only before the
-* first run
-* = 2: Like 1, but use the seed values on the next line
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKEE tests the COMPLEX*16 LAPACK subroutines for the matrix
+*> eigenvalue problem. The test paths in this version are
+*>
+*> NEP (Nonsymmetric Eigenvalue Problem):
+*> Test ZGEHRD, ZUNGHR, ZHSEQR, ZTREVC, ZHSEIN, and ZUNMHR
+*>
+*> SEP (Hermitian Eigenvalue Problem):
+*> Test ZHETRD, ZUNGTR, ZSTEQR, ZSTERF, ZSTEIN, ZSTEDC,
+*> and drivers ZHEEV(X), ZHBEV(X), ZHPEV(X),
+*> ZHEEVD, ZHBEVD, ZHPEVD
+*>
+*> SVD (Singular Value Decomposition):
+*> Test ZGEBRD, ZUNGBR, and ZBDSQR
+*> and the drivers ZGESVD, ZGESDD
+*>
+*> ZEV (Nonsymmetric Eigenvalue/eigenvector Driver):
+*> Test ZGEEV
+*>
+*> ZES (Nonsymmetric Schur form Driver):
+*> Test ZGEES
+*>
+*> ZVX (Nonsymmetric Eigenvalue/eigenvector Expert Driver):
+*> Test ZGEEVX
+*>
+*> ZSX (Nonsymmetric Schur form Expert Driver):
+*> Test ZGEESX
+*>
+*> ZGG (Generalized Nonsymmetric Eigenvalue Problem):
+*> Test ZGGHRD, ZGGBAL, ZGGBAK, ZHGEQZ, and ZTGEVC
+*> and the driver routines ZGEGS and ZGEGV
+*>
+*> ZGS (Generalized Nonsymmetric Schur form Driver):
+*> Test ZGGES
+*>
+*> ZGV (Generalized Nonsymmetric Eigenvalue/eigenvector Driver):
+*> Test ZGGEV
+*>
+*> ZGX (Generalized Nonsymmetric Schur form Expert Driver):
+*> Test ZGGESX
+*>
+*> ZXV (Generalized Nonsymmetric Eigenvalue/eigenvector Expert Driver):
+*> Test ZGGEVX
+*>
+*> ZSG (Hermitian Generalized Eigenvalue Problem):
+*> Test ZHEGST, ZHEGV, ZHEGVD, ZHEGVX, ZHPGST, ZHPGV, ZHPGVD,
+*> ZHPGVX, ZHBGST, ZHBGV, ZHBGVD, and ZHBGVX
+*>
+*> ZHB (Hermitian Band Eigenvalue Problem):
+*> Test ZHBTRD
+*>
+*> ZBB (Band Singular Value Decomposition):
+*> Test ZGBBRD
+*>
+*> ZEC (Eigencondition estimation):
+*> Test ZTRSYL, ZTREXC, ZTRSNA, and ZTRSEN
+*>
+*> ZBL (Balancing a general matrix)
+*> Test ZGEBAL
+*>
+*> ZBK (Back transformation on a balanced matrix)
+*> Test ZGEBAK
+*>
+*> ZGL (Balancing a matrix pair)
+*> Test ZGGBAL
+*>
+*> ZGK (Back transformation on a matrix pair)
+*> Test ZGGBAK
+*>
+*> GLM (Generalized Linear Regression Model):
+*> Tests ZGGGLM
+*>
+*> GQR (Generalized QR and RQ factorizations):
+*> Tests ZGGQRF and ZGGRQF
+*>
+*> GSV (Generalized Singular Value Decomposition):
+*> Tests ZGGSVD, ZGGSVP, ZTGSJA, ZLAGS2, ZLAPLL, and ZLAPMT
+*>
+*> CSD (CS decomposition):
+*> Tests ZUNCSD
+*>
+*> LSE (Constrained Linear Least Squares):
+*> Tests ZGGLSE
+*>
+*> Each test path has a different set of inputs, but the data sets for
+*> the driver routines xEV, xES, xVX, and xSX can be concatenated in a
+*> single input file. The first line of input should contain one of the
+*> 3-character path names in columns 1-3. The number of remaining lines
+*> depends on what is found on the first line.
+*>
+*> The number of matrix types used in testing is often controllable from
+*> the input file. The number of matrix types for each path, and the
+*> test routine that describes them, is as follows:
+*>
+*> Path name(s) Types Test routine
+*>
+*> ZHS or NEP 21 ZCHKHS
+*> ZST or SEP 21 ZCHKST (routines)
+*> 18 ZDRVST (drivers)
+*> ZBD or SVD 16 ZCHKBD (routines)
+*> 5 ZDRVBD (drivers)
+*> ZEV 21 ZDRVEV
+*> ZES 21 ZDRVES
+*> ZVX 21 ZDRVVX
+*> ZSX 21 ZDRVSX
+*> ZGG 26 ZCHKGG (routines)
+*> 26 ZDRVGG (drivers)
+*> ZGS 26 ZDRGES
+*> ZGX 5 ZDRGSX
+*> ZGV 26 ZDRGEV
+*> ZXV 2 ZDRGVX
+*> ZSG 21 ZDRVSG
+*> ZHB 15 ZCHKHB
+*> ZBB 15 ZCHKBB
+*> ZEC - ZCHKEC
+*> ZBL - ZCHKBL
+*> ZBK - ZCHKBK
+*> ZGL - ZCHKGL
+*> ZGK - ZCHKGK
+*> GLM 8 ZCKGLM
+*> GQR 8 ZCKGQR
+*> GSV 8 ZCKGSV
+*> CSD 3 ZCKCSD
+*> LSE 8 ZCKLSE
+*>
+*>-----------------------------------------------------------------------
+*>
+*> NEP input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, NX, NS, and
+*> MAXB.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 7: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 8: INMIN, INTEGER array, dimension (NPARMS)
+*> LAHQR vs TTQRE crossover point, >= 11
+*>
+*> line 9: INWIN, INTEGER array, dimension (NPARMS)
+*> recommended deflation window size
+*>
+*> line 10: INIBL, INTEGER array, dimension (NPARMS)
+*> nibble crossover point
+*>
+*> line 11: ISHFTS, INTEGER array, dimension (NPARMS)
+*> number of simultaneous shifts)
+*>
+*> line 12: IACC22, INTEGER array, dimension (NPARMS)
+*> select structured matrix multiply: 0, 1 or 2)
+*>
+*> line 13: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold. To have all of the test
+*> ratios printed, use THRESH = 0.0 .
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: The remaining lines occur in sets of 1 or 2 and allow
+*> the user to specify the matrix types. Each line contains
+*> a 3-character path name in columns 1-3, and the number
+*> of matrix types must be the first nonblank item in columns
+*> 4-80. If the number of matrix types is at least 1 but is
+*> less than the maximum number of possible types, a second
+*> line will be read to get the numbers of the matrix types to
+*> be used. For example,
+*> NEP 21
+*> requests all of the matrix types for the nonsymmetric
+*> eigenvalue problem, while
+*> NEP 4
+*> 9 10 11 12
+*> requests only matrices of type 9, 10, 11, and 12.
+*>
+*> The valid 3-character path names are 'NEP' or 'ZHS' for the
+*> nonsymmetric eigenvalue routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SEP or ZSG input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, and NX.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 7: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 8: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 9: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 10: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 11: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 12: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 12 was 2:
+*>
+*> line 13: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 13-EOF: Lines specifying matrix types, as for NEP.
+*> The valid 3-character path names are 'SEP' or 'ZST' for the
+*> Hermitian eigenvalue routines and driver routines, and
+*> 'ZSG' for the routines for the Hermitian generalized
+*> eigenvalue problem.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> SVD input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension (NN)
+*> The values for the matrix row dimension M.
+*>
+*> line 4: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix column dimension N.
+*>
+*> line 5: NPARMS, INTEGER
+*> Number of values of the parameter NB, NBMIN, NX, and NRHS.
+*>
+*> line 6: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 7: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for the minimum blocksize NBMIN.
+*>
+*> line 8: NXVAL, INTEGER array, dimension (NPARMS)
+*> The values for the crossover point NX.
+*>
+*> line 9: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of right hand sides NRHS.
+*>
+*> line 10: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 11: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 12: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 13: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 15-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path names are 'SVD' or 'ZBD' for both the
+*> SVD routines and the SVD driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZEV and ZES data files:
+*>
+*> line 1: 'ZEV' or 'ZES' in columns 1 to 3.
+*>
+*> line 2: NSIZES, INTEGER
+*> Number of sizes of matrices to use. Should be at least 0
+*> and at most 20. If NSIZES = 0, no testing is done
+*> (although the remaining 3 lines are still read).
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*> Dimensions of matrices to be tested.
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHSEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 5: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> If it is 0., all test case data will be printed.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 8 and following: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'ZEV' to test CGEEV, or
+*> 'ZES' to test CGEES.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> The ZVX data has two parts. The first part is identical to ZEV,
+*> and the second part consists of test matrices with precomputed
+*> solutions.
+*>
+*> line 1: 'ZVX' in columns 1-3.
+*>
+*> line 2: NSIZES, INTEGER
+*> If NSIZES = 0, no testing of randomly generated examples
+*> is done, but any precomputed examples are tested.
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*>
+*> line 5: THRESH, REAL
+*>
+*> line 6: NEWSD, INTEGER
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*>
+*> lines 8 and following: The first line contains 'ZVX' in columns 1-3
+*> followed by the number of matrix types, possibly with
+*> a second line to specify certain matrix types.
+*> If the number of matrix types = 0, no testing of randomly
+*> generated examples is done, but any precomputed examples
+*> are tested.
+*>
+*> remaining lines : Each matrix is stored on 1+N+N**2 lines, where N is
+*> its dimension. The first line contains the dimension N and
+*> ISRT (two integers). ISRT indicates whether the last N lines
+*> are sorted by increasing real part of the eigenvalue
+*> (ISRT=0) or by increasing imaginary part (ISRT=1). The next
+*> N**2 lines contain the matrix rowwise, one entry per line.
+*> The last N lines correspond to each eigenvalue. Each of
+*> these last N lines contains 4 real values: the real part of
+*> the eigenvalues, the imaginary part of the eigenvalue, the
+*> reciprocal condition number of the eigenvalues, and the
+*> reciprocal condition number of the vector eigenvector. The
+*> end of data is indicated by dimension N=0. Even if no data
+*> is to be tested, there must be at least one line containing
+*> N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> The ZSX data is like ZVX. The first part is identical to ZEV, and the
+*> second part consists of test matrices with precomputed solutions.
+*>
+*> line 1: 'ZSX' in columns 1-3.
+*>
+*> line 2: NSIZES, INTEGER
+*> If NSIZES = 0, no testing of randomly generated examples
+*> is done, but any precomputed examples are tested.
+*>
+*> line 3: NN, INTEGER array, dimension(NSIZES)
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*>
+*> line 5: THRESH, REAL
+*>
+*> line 6: NEWSD, INTEGER
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*>
+*> lines 8 and following: The first line contains 'ZSX' in columns 1-3
+*> followed by the number of matrix types, possibly with
+*> a second line to specify certain matrix types.
+*> If the number of matrix types = 0, no testing of randomly
+*> generated examples is done, but any precomputed examples
+*> are tested.
+*>
+*> remaining lines : Each matrix is stored on 3+N**2 lines, where N is
+*> its dimension. The first line contains the dimension N, the
+*> dimension M of an invariant subspace, and ISRT. The second
+*> line contains M integers, identifying the eigenvalues in the
+*> invariant subspace (by their position in a list of
+*> eigenvalues ordered by increasing real part (if ISRT=0) or
+*> by increasing imaginary part (if ISRT=1)). The next N**2
+*> lines contain the matrix rowwise. The last line contains the
+*> reciprocal condition number for the average of the selected
+*> eigenvalues, and the reciprocal condition number for the
+*> corresponding right invariant subspace. The end of data in
+*> indicated by a line containing N=0, M=0, and ISRT = 0. Even
+*> if no data is to be tested, there must be at least one line
+*> containing N=0, M=0 and ISRT=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZGG input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NPARMS, INTEGER
+*> Number of values of the parameters NB, NBMIN, NBCOL, NS, and
+*> MAXB.
+*>
+*> line 5: NBVAL, INTEGER array, dimension (NPARMS)
+*> The values for the blocksize NB.
+*>
+*> line 6: NBMIN, INTEGER array, dimension (NPARMS)
+*> The values for NBMIN, the minimum row dimension for blocks.
+*>
+*> line 7: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of shifts.
+*>
+*> line 8: MXBVAL, INTEGER array, dimension (NPARMS)
+*> The values for MAXB, used in determining minimum blocksize.
+*>
+*> line 9: NBCOL, INTEGER array, dimension (NPARMS)
+*> The values for NBCOL, the minimum column dimension for
+*> blocks.
+*>
+*> line 10: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 11: TSTCHK, LOGICAL
+*> Flag indicating whether or not to test the LAPACK routines.
+*>
+*> line 12: TSTDRV, LOGICAL
+*> Flag indicating whether or not to test the driver routines.
+*>
+*> line 13: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 14: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 14 was 2:
+*>
+*> line 15: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 16-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'ZGG' for the generalized
+*> eigenvalue problem routines and driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZGS and ZGV input files:
+*>
+*> line 1: 'ZGS' or 'ZGV' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension(NN)
+*> Dimensions of matrices to be tested.
+*>
+*> line 4: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 5: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> If it is 0., all test case data will be printed.
+*>
+*> line 6: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 17 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 7-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'ZGS' for the generalized
+*> eigenvalue problem routines and driver routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZGX input file:
+*> line 1: 'ZGX' in columns 1 to 3.
+*>
+*> line 2: N, INTEGER
+*> Value of N.
+*>
+*> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 4: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> Information will be printed about each test for which the
+*> test ratio is greater than or equal to the threshold.
+*>
+*> line 5: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> If line 2 was 0:
+*>
+*> line 7-EOF: Precomputed examples are tested.
+*>
+*> remaining lines : Each example is stored on 3+2*N*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next line contains an integer k such
+*> that only the last k eigenvalues will be selected and appear
+*> in the leading diagonal blocks of $A$ and $B$. The next N*N
+*> lines contain the matrix A, one element per line. The next N*N
+*> lines contain the matrix B. The last line contains the
+*> reciprocal of the eigenvalue cluster condition number and the
+*> reciprocal of the deflating subspace (associated with the
+*> selected eigencluster) condition number. The end of data is
+*> indicated by dimension N=0. Even if no data is to be tested,
+*> there must be at least one line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZXV input files:
+*> line 1: 'ZXV' in columns 1 to 3.
+*>
+*> line 2: N, INTEGER
+*> Value of N.
+*>
+*> line 3: NB, NBMIN, NX, NS, NBCOL, INTEGERs
+*> These integer parameters determine how blocking is done
+*> (see ILAENV for details)
+*> NB : block size
+*> NBMIN : minimum block size
+*> NX : minimum dimension for blocking
+*> NS : number of shifts in xHGEQR
+*> NBCOL : minimum column dimension for blocking
+*>
+*> line 4: THRESH, REAL
+*> The test threshold against which computed residuals are
+*> compared. Should generally be in the range from 10. to 20.
+*> Information will be printed about each test for which the
+*> test ratio is greater than or equal to the threshold.
+*>
+*> line 5: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 6: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 6 was 2:
+*>
+*> line 7: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> If line 2 was 0:
+*>
+*> line 7-EOF: Precomputed examples are tested.
+*>
+*> remaining lines : Each example is stored on 3+2*N*N lines, where N is
+*> its dimension. The first line contains the dimension (a
+*> single integer). The next N*N lines contain the matrix A, one
+*> element per line. The next N*N lines contain the matrix B.
+*> The next line contains the reciprocals of the eigenvalue
+*> condition numbers. The last line contains the reciprocals of
+*> the eigenvector condition numbers. The end of data is
+*> indicated by dimension N=0. Even if no data is to be tested,
+*> there must be at least one line containing N=0.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZHB input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of N.
+*>
+*> line 3: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix dimension N.
+*>
+*> line 4: NK, INTEGER
+*> Number of values of K.
+*>
+*> line 5: KVAL, INTEGER array, dimension (NK)
+*> The values for the matrix dimension K.
+*>
+*> line 6: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 7 was 2:
+*>
+*> line 8: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 8-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'ZHB'.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZBB input file:
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension (NN)
+*> The values for the matrix row dimension M.
+*>
+*> line 4: NVAL, INTEGER array, dimension (NN)
+*> The values for the matrix column dimension N.
+*>
+*> line 4: NK, INTEGER
+*> Number of values of K.
+*>
+*> line 5: KVAL, INTEGER array, dimension (NK)
+*> The values for the matrix bandwidth K.
+*>
+*> line 6: NPARMS, INTEGER
+*> Number of values of the parameter NRHS
+*>
+*> line 7: NSVAL, INTEGER array, dimension (NPARMS)
+*> The values for the number of right hand sides NRHS.
+*>
+*> line 8: THRESH
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 9: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 9 was 2:
+*>
+*> line 10: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 10-EOF: Lines specifying matrix types, as for SVD.
+*> The 3-character path name is 'ZBB'.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZEC input file:
+*>
+*> line 2: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> lines 3-EOF:
+*>
+*> Input for testing the eigencondition routines consists of a set of
+*> specially constructed test cases and their solutions. The data
+*> format is not intended to be modified by the user.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZBL and ZBK input files:
+*>
+*> line 1: 'ZBL' in columns 1-3 to test CGEBAL, or 'ZBK' in
+*> columns 1-3 to test CGEBAK.
+*>
+*> The remaining lines consist of specially constructed test cases.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> ZGL and ZGK input files:
+*>
+*> line 1: 'ZGL' in columns 1-3 to test ZGGBAL, or 'ZGK' in
+*> columns 1-3 to test ZGGBAK.
+*>
+*> The remaining lines consist of specially constructed test cases.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GLM data file:
+*>
+*> line 1: 'GLM' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M (row dimension).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P (row dimension).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N (column dimension), note M <= N <= M+P.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GLM' for the generalized
+*> linear regression model routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GQR data file:
+*>
+*> line 1: 'GQR' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M.
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P.
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GQR' for the generalized
+*> QR and RQ routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> GSV data file:
+*>
+*> line 1: 'GSV' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M (row dimension).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P (row dimension).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N (column dimension).
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GSV' for the generalized
+*> SVD routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> CSD data file:
+*>
+*> line 1: 'CSD' in columns 1 to 3.
+*>
+*> line 2: NM, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NM)
+*> Values of M (row and column dimension of orthogonal matrix).
+*>
+*> line 4: PVAL, INTEGER array, dimension(NM)
+*> Values of P (row dimension of top-left block).
+*>
+*> line 5: NVAL, INTEGER array, dimension(NM)
+*> Values of N (column dimension of top-left block).
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'CSD' for the CSD routine.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> LSE data file:
+*>
+*> line 1: 'LSE' in columns 1 to 3.
+*>
+*> line 2: NN, INTEGER
+*> Number of values of M, P, and N.
+*>
+*> line 3: MVAL, INTEGER array, dimension(NN)
+*> Values of M.
+*>
+*> line 4: PVAL, INTEGER array, dimension(NN)
+*> Values of P.
+*>
+*> line 5: NVAL, INTEGER array, dimension(NN)
+*> Values of N, note P <= N <= P+M.
+*>
+*> line 6: THRESH, REAL
+*> Threshold value for the test ratios. Information will be
+*> printed about each test for which the test ratio is greater
+*> than or equal to the threshold.
+*>
+*> line 7: TSTERR, LOGICAL
+*> Flag indicating whether or not to test the error exits for
+*> the LAPACK routines and driver routines.
+*>
+*> line 8: NEWSD, INTEGER
+*> A code indicating how to set the random number seed.
+*> = 0: Set the seed to a default value before each run
+*> = 1: Initialize the seed to a default value only before the
+*> first run
+*> = 2: Like 1, but use the seed values on the next line
+*>
+*> If line 8 was 2:
+*>
+*> line 9: INTEGER array, dimension (4)
+*> Four integer values for the random number seed.
+*>
+*> lines 9-EOF: Lines specifying matrix types, as for NEP.
+*> The 3-character path name is 'GSV' for the generalized
+*> SVD routines.
+*>
+*>-----------------------------------------------------------------------
+*>
+*> NMAX is currently set to 132 and must be at least 12 for some of the
+*> precomputed examples, and LWORK = NMAX*(5*NMAX+20) in the parameter
+*> statements below. For SVD, we assume NRHS may be as big as N. The
+*> parameter NEED is set to 14 to allow for 14 N-by-N matrices for ZGG.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
*
-* If line 8 was 2:
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* line 9: INTEGER array, dimension (4)
-* Four integer values for the random number seed.
+*> \date November 2011
*
-* lines 9-EOF: Lines specifying matrix types, as for NEP.
-* The 3-character path name is 'GSV' for the generalized
-* SVD routines.
+*> \ingroup complex16_eig
*
-*-----------------------------------------------------------------------
+* =====================================================================
+ PROGRAM ZCHKEE
*
-* NMAX is currently set to 132 and must be at least 12 for some of the
-* precomputed examples, and LWORK = NMAX*(5*NMAX+20) in the parameter
-* statements below. For SVD, we assume NRHS may be as big as N. The
-* parameter NEED is set to 14 to allow for 14 N-by-N matrices for ZGG.
+* -- LAPACK test routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/EIG/zchkgg.f b/TESTING/EIG/zchkgg.f
index c4f9a50f..f919ee74 100644
--- a/TESTING/EIG/zchkgg.f
+++ b/TESTING/EIG/zchkgg.f
@@ -1,3 +1,504 @@
+*> \brief \b ZCHKGG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* TSTDIF, THRSHN, NOUNIT, A, LDA, B, H, T, S1,
+* S2, P1, P2, U, LDU, V, Q, Z, ALPHA1, BETA1,
+* ALPHA3, BETA3, EVECTL, EVECTR, WORK, LWORK,
+* RWORK, LLWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTDIF
+* INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES
+* DOUBLE PRECISION THRESH, THRSHN
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * ), LLWORK( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION RESULT( 15 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA1( * ), ALPHA3( * ),
+* $ B( LDA, * ), BETA1( * ), BETA3( * ),
+* $ EVECTL( LDU, * ), EVECTR( LDU, * ),
+* $ H( LDA, * ), P1( LDA, * ), P2( LDA, * ),
+* $ Q( LDU, * ), S1( LDA, * ), S2( LDA, * ),
+* $ T( LDA, * ), U( LDU, * ), V( LDU, * ),
+* $ WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKGG checks the nonsymmetric generalized eigenvalue problem
+*> routines.
+*> H H H
+*> ZGGHRD factors A and B as U H V and U T V , where means conjugate
+*> transpose, H is hessenberg, T is triangular and U and V are unitary.
+*>
+*> H H
+*> ZHGEQZ factors H and T as Q S Z and Q P Z , where P and S are upper
+*> triangular and Q and Z are unitary. It also computes the generalized
+*> eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)), where
+*> alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus, w(j) = alpha(j)/beta(j)
+*> is a root of the generalized eigenvalue problem
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
+*> problem
+*>
+*> det( m(j) A - B ) = 0
+*>
+*> ZTGEVC computes the matrix L of left eigenvectors and the matrix R
+*> of right eigenvectors for the matrix pair ( S, P ). In the
+*> description below, l and r are left and right eigenvectors
+*> corresponding to the generalized eigenvalues (alpha,beta).
+*>
+*> When ZCHKGG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 13
+*> tests will be performed. The first twelve "test ratios" should be
+*> small -- O(1). They will be compared with the threshhold THRESH:
+*>
+*> H
+*> (1) | A - U H V | / ( |A| n ulp )
+*>
+*> H
+*> (2) | B - U T V | / ( |B| n ulp )
+*>
+*> H
+*> (3) | I - UU | / ( n ulp )
+*>
+*> H
+*> (4) | I - VV | / ( n ulp )
+*>
+*> H
+*> (5) | H - Q S Z | / ( |H| n ulp )
+*>
+*> H
+*> (6) | T - Q P Z | / ( |T| n ulp )
+*>
+*> H
+*> (7) | I - QQ | / ( n ulp )
+*>
+*> H
+*> (8) | I - ZZ | / ( n ulp )
+*>
+*> (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*> H
+*> | (beta A - alpha B) l | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of
+*> H
+*> | (beta H - alpha T) l' | / ( ulp max( |beta H|, |alpha T| ) )
+*>
+*> where the eigenvectors l' are the result of passing Q to
+*> DTGEVC and back transforming (JOB='B').
+*>
+*> (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of
+*>
+*> | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) )
+*>
+*> where the eigenvectors r' are the result of passing Z to
+*> DTGEVC and back transforming (JOB='B').
+*>
+*> The last three test ratios will usually be small, but there is no
+*> mathematical requirement that they be so. They are therefore
+*> compared with THRESH only if TSTDIF is .TRUE.
+*>
+*> (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp )
+*>
+*> (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp )
+*>
+*> (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| ,
+*> |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp
+*>
+*> In addition, the normalization of L and R are checked, and compared
+*> with the threshhold THRSHN.
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is P*D1, P is a random unitary diagonal
+*> matrix (i.e., with random magnitude 1 entries
+*> on the diagonal), and D1=diag( 0, 1,..., N-1 )
+*> (i.e., a diagonal matrix with D1(1,1)=0,
+*> D1(2,2)=1, ..., D1(N,N)=N-1.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1=P*diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2=Q*diag( 0, N-3, N-4,..., 1, 0, 0 ), and
+*> P and Q are random unitary diagonal matrices.
+*> t t
+*> (16) U ( J , J ) V where U and V are random unitary matrices.
+*>
+*> (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> P*( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> Q*( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) U ( big*T1, small*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) U ( small*T1, big*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) U ( small*T1, small*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) U ( big*T1, big*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZCHKGG does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZCHKGG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZCHKGG to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] TSTDIF
+*> \verbatim
+*> TSTDIF is LOGICAL
+*> Specifies whether test ratios 13-15 will be computed and
+*> compared with THRESH.
+*> = .FALSE.: Only test ratios 1-12 will be computed and tested.
+*> Ratios 13-15 will be set to zero.
+*> = .TRUE.: All the test ratios 1-15 will be computed and
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] THRSHN
+*> \verbatim
+*> THRSHN is DOUBLE PRECISION
+*> Threshhold for reporting eigenvector normalization error.
+*> If the normalization of any eigenvector differs from 1 by
+*> more than THRSHN*ulp, then a special error message will be
+*> printed. (This is handled separately from the other tests,
+*> since only a compiler or programming error should cause an
+*> error message, at least if THRSHN is at least 5--10.)
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, H, T, S1, P1, S2, and P2.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The upper Hessenberg matrix computed from A by ZGGHRD.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by ZGGHRD.
+*> \endverbatim
+*>
+*> \param[out] S1
+*> \verbatim
+*> S1 is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The Schur (upper triangular) matrix computed from H by ZHGEQZ
+*> when Q and Z are also computed.
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The Schur (upper triangular) matrix computed from H by ZHGEQZ
+*> when Q and Z are not computed.
+*> \endverbatim
+*>
+*> \param[out] P1
+*> \verbatim
+*> P1 is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from T by ZHGEQZ
+*> when Q and Z are also computed.
+*> \endverbatim
+*>
+*> \param[out] P2
+*> \verbatim
+*> P2 is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from T by ZHGEQZ
+*> when Q and Z are not computed.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU, max(NN))
+*> The (left) unitary matrix computed by ZGGHRD.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U, V, Q, Z, EVECTL, and EVEZTR. It
+*> must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDU, max(NN))
+*> The (right) unitary matrix computed by ZGGHRD.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDU, max(NN))
+*> The (left) unitary matrix computed by ZHGEQZ.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDU, max(NN))
+*> The (left) unitary matrix computed by ZHGEQZ.
+*> \endverbatim
+*>
+*> \param[out] ALPHA1
+*> \verbatim
+*> ALPHA1 is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is COMPLEX*16 array, dimension (max(NN))
+*> The generalized eigenvalues of (A,B) computed by ZHGEQZ
+*> when Q, Z, and the full Schur matrices are computed.
+*> \endverbatim
+*>
+*> \param[out] ALPHA3
+*> \verbatim
+*> ALPHA3 is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA3
+*> \verbatim
+*> BETA3 is COMPLEX*16 array, dimension (max(NN))
+*> The generalized eigenvalues of (A,B) computed by ZHGEQZ
+*> when neither Q, Z, nor the Schur matrices are computed.
+*> \endverbatim
+*>
+*> \param[out] EVECTL
+*> \verbatim
+*> EVECTL is COMPLEX*16 array, dimension (LDU, max(NN))
+*> The (lower triangular) left eigenvector matrix for the
+*> matrices in S1 and P1.
+*> \endverbatim
+*>
+*> \param[out] EVEZTR
+*> \verbatim
+*> EVEZTR is COMPLEX*16 array, dimension (LDU, max(NN))
+*> The (upper triangular) right eigenvector matrix for the
+*> matrices in S1 and P1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( 4*N, 2 * N**2, 1 ), for all N=NN(j).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*max(NN))
+*> \endverbatim
+*>
+*> \param[out] LLWORK
+*> \verbatim
+*> LLWORK is LOGICAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit.
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCHKGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ TSTDIF, THRSHN, NOUNIT, A, LDA, B, H, T, S1,
$ S2, P1, P2, U, LDU, V, Q, Z, ALPHA1, BETA1,
@@ -5,8 +506,9 @@
$ RWORK, LLWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTDIF
@@ -26,347 +528,6 @@
$ WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKGG checks the nonsymmetric generalized eigenvalue problem
-* routines.
-* H H H
-* ZGGHRD factors A and B as U H V and U T V , where means conjugate
-* transpose, H is hessenberg, T is triangular and U and V are unitary.
-*
-* H H
-* ZHGEQZ factors H and T as Q S Z and Q P Z , where P and S are upper
-* triangular and Q and Z are unitary. It also computes the generalized
-* eigenvalues (alpha(1),beta(1)),...,(alpha(n),beta(n)), where
-* alpha(j)=S(j,j) and beta(j)=P(j,j) -- thus, w(j) = alpha(j)/beta(j)
-* is a root of the generalized eigenvalue problem
-*
-* det( A - w(j) B ) = 0
-*
-* and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
-* problem
-*
-* det( m(j) A - B ) = 0
-*
-* ZTGEVC computes the matrix L of left eigenvectors and the matrix R
-* of right eigenvectors for the matrix pair ( S, P ). In the
-* description below, l and r are left and right eigenvectors
-* corresponding to the generalized eigenvalues (alpha,beta).
-*
-* When ZCHKGG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 13
-* tests will be performed. The first twelve "test ratios" should be
-* small -- O(1). They will be compared with the threshhold THRESH:
-*
-* H
-* (1) | A - U H V | / ( |A| n ulp )
-*
-* H
-* (2) | B - U T V | / ( |B| n ulp )
-*
-* H
-* (3) | I - UU | / ( n ulp )
-*
-* H
-* (4) | I - VV | / ( n ulp )
-*
-* H
-* (5) | H - Q S Z | / ( |H| n ulp )
-*
-* H
-* (6) | T - Q P Z | / ( |T| n ulp )
-*
-* H
-* (7) | I - QQ | / ( n ulp )
-*
-* H
-* (8) | I - ZZ | / ( n ulp )
-*
-* (9) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-* H
-* | (beta A - alpha B) l | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* (10) max over all left eigenvalue/-vector pairs (beta/alpha,l') of
-* H
-* | (beta H - alpha T) l' | / ( ulp max( |beta H|, |alpha T| ) )
-*
-* where the eigenvectors l' are the result of passing Q to
-* DTGEVC and back transforming (JOB='B').
-*
-* (11) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* (12) max over all right eigenvalue/-vector pairs (beta/alpha,r') of
-*
-* | (beta H - alpha T) r' | / ( ulp max( |beta H|, |alpha T| ) )
-*
-* where the eigenvectors r' are the result of passing Z to
-* DTGEVC and back transforming (JOB='B').
-*
-* The last three test ratios will usually be small, but there is no
-* mathematical requirement that they be so. They are therefore
-* compared with THRESH only if TSTDIF is .TRUE.
-*
-* (13) | S(Q,Z computed) - S(Q,Z not computed) | / ( |S| ulp )
-*
-* (14) | P(Q,Z computed) - P(Q,Z not computed) | / ( |P| ulp )
-*
-* (15) max( |alpha(Q,Z computed) - alpha(Q,Z not computed)|/|S| ,
-* |beta(Q,Z computed) - beta(Q,Z not computed)|/|P| ) / ulp
-*
-* In addition, the normalization of L and R are checked, and compared
-* with the threshhold THRSHN.
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is P*D1, P is a random unitary diagonal
-* matrix (i.e., with random magnitude 1 entries
-* on the diagonal), and D1=diag( 0, 1,..., N-1 )
-* (i.e., a diagonal matrix with D1(1,1)=0,
-* D1(2,2)=1, ..., D1(N,N)=N-1.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1=P*diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2=Q*diag( 0, N-3, N-4,..., 1, 0, 0 ), and
-* P and Q are random unitary diagonal matrices.
-* t t
-* (16) U ( J , J ) V where U and V are random unitary matrices.
-*
-* (17) U ( T1, T2 ) V where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* P*( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* Q*( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) U ( T1, T2 ) V diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) U ( T1, T2 ) V diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) U ( T1, T2 ) V diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) U ( big*T1, small*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) U ( small*T1, big*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) U ( small*T1, small*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) U ( big*T1, big*T2 ) V diag(T1) = P*( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) U ( T1, T2 ) V where T1 and T2 are random upper-triangular
-* matrices.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZCHKGG does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZCHKGG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZCHKGG to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* TSTDIF (input) LOGICAL
-* Specifies whether test ratios 13-15 will be computed and
-* compared with THRESH.
-* = .FALSE.: Only test ratios 1-12 will be computed and tested.
-* Ratios 13-15 will be set to zero.
-* = .TRUE.: All the test ratios 1-15 will be computed and
-* tested.
-*
-* THRSHN (input) DOUBLE PRECISION
-* Threshhold for reporting eigenvector normalization error.
-* If the normalization of any eigenvector differs from 1 by
-* more than THRSHN*ulp, then a special error message will be
-* printed. (This is handled separately from the other tests,
-* since only a compiler or programming error should cause an
-* error message, at least if THRSHN is at least 5--10.)
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, H, T, S1, P1, S2, and P2.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* H (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The upper Hessenberg matrix computed from A by ZGGHRD.
-*
-* T (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by ZGGHRD.
-*
-* S1 (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The Schur (upper triangular) matrix computed from H by ZHGEQZ
-* when Q and Z are also computed.
-*
-* S2 (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The Schur (upper triangular) matrix computed from H by ZHGEQZ
-* when Q and Z are not computed.
-*
-* P1 (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from T by ZHGEQZ
-* when Q and Z are also computed.
-*
-* P2 (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from T by ZHGEQZ
-* when Q and Z are not computed.
-*
-* U (workspace) COMPLEX*16 array, dimension (LDU, max(NN))
-* The (left) unitary matrix computed by ZGGHRD.
-*
-* LDU (input) INTEGER
-* The leading dimension of U, V, Q, Z, EVECTL, and EVEZTR. It
-* must be at least 1 and at least max( NN ).
-*
-* V (workspace) COMPLEX*16 array, dimension (LDU, max(NN))
-* The (right) unitary matrix computed by ZGGHRD.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDU, max(NN))
-* The (left) unitary matrix computed by ZHGEQZ.
-*
-* Z (workspace) COMPLEX*16 array, dimension (LDU, max(NN))
-* The (left) unitary matrix computed by ZHGEQZ.
-*
-* ALPHA1 (workspace) COMPLEX*16 array, dimension (max(NN))
-* BETA1 (workspace) COMPLEX*16 array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by ZHGEQZ
-* when Q, Z, and the full Schur matrices are computed.
-*
-* ALPHA3 (workspace) COMPLEX*16 array, dimension (max(NN))
-* BETA3 (workspace) COMPLEX*16 array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by ZHGEQZ
-* when neither Q, Z, nor the Schur matrices are computed.
-*
-* EVECTL (workspace) COMPLEX*16 array, dimension (LDU, max(NN))
-* The (lower triangular) left eigenvector matrix for the
-* matrices in S1 and P1.
-*
-* EVEZTR (workspace) COMPLEX*16 array, dimension (LDU, max(NN))
-* The (upper triangular) right eigenvector matrix for the
-* matrices in S1 and P1.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( 4*N, 2 * N**2, 1 ), for all N=NN(j).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*max(NN))
-*
-* LLWORK (workspace) LOGICAL array, dimension (max(NN))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit.
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zchkgk.f b/TESTING/EIG/zchkgk.f
index fe1d24bf..c4f19220 100644
--- a/TESTING/EIG/zchkgk.f
+++ b/TESTING/EIG/zchkgk.f
@@ -1,27 +1,69 @@
- SUBROUTINE ZCHKGK( NIN, NOUT )
+*> \brief \b ZCHKGK
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKGK( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* ZCHKGK tests ZGGBAK, a routine for backward balancing of
-* a matrix pair (A, B).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKGK tests ZGGBAK, a routine for backward balancing of
+*> a matrix pair (A, B).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZCHKGK( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zchkgl.f b/TESTING/EIG/zchkgl.f
index 3752fad3..71bbe0cd 100644
--- a/TESTING/EIG/zchkgl.f
+++ b/TESTING/EIG/zchkgl.f
@@ -1,26 +1,68 @@
- SUBROUTINE ZCHKGL( NIN, NOUT )
+*> \brief \b ZCHKGL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NIN, NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKGL( NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NIN, NOUT
+* ..
+*
* Purpose
* =======
*
-* ZCHKGL tests ZGGBAL, a routine for balancing a matrix pair (A, B).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKGL tests ZGGBAL, a routine for balancing a matrix pair (A, B).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NIN (input) INTEGER
-* The logical unit number for input. NIN > 0.
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The logical unit number for input. NIN > 0.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The logical unit number for output. NOUT > 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The logical unit number for output. NOUT > 0.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZCHKGL( NIN, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NIN, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zchkhb.f b/TESTING/EIG/zchkhb.f
index ca123292..3e37f7cf 100644
--- a/TESTING/EIG/zchkhb.f
+++ b/TESTING/EIG/zchkhb.f
@@ -1,10 +1,307 @@
+*> \brief \b ZCHKHB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKHB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED,
+* THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK,
+* LWORK, RWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
+* $ NWDTHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), KK( * ), NN( * )
+* DOUBLE PRECISION RESULT( * ), RWORK( * ), SD( * ), SE( * )
+* COMPLEX*16 A( LDA, * ), U( LDU, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKHB tests the reduction of a Hermitian band matrix to tridiagonal
+*> from, used with the Hermitian eigenvalue problem.
+*>
+*> ZHBTRD factors a Hermitian band matrix A as U S U* , where * means
+*> conjugate transpose, S is symmetric tridiagonal, and U is unitary.
+*> ZHBTRD can use either just the lower or just the upper triangle
+*> of A; ZCHKHB checks both cases.
+*>
+*> When ZCHKHB is called, a number of matrix "sizes" ("n's"), a number
+*> of bandwidths ("k's"), and a number of matrix "types" are
+*> specified. For each size ("n"), each bandwidth ("k") less than or
+*> equal to "n", and each type of matrix, one matrix will be generated
+*> and used to test the hermitian banded reduction routine. For each
+*> matrix, a number of tests will be performed:
+*>
+*> (1) | A - V S V* | / ( |A| n ulp ) computed by ZHBTRD with
+*> UPLO='U'
+*>
+*> (2) | I - UU* | / ( n ulp )
+*>
+*> (3) | A - V S V* | / ( |A| n ulp ) computed by ZHBTRD with
+*> UPLO='L'
+*>
+*> (4) | I - UU* | / ( n ulp )
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is unitary and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is unitary and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Hermitian matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZCHKHB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NWDTHS
+*> \verbatim
+*> NWDTHS is INTEGER
+*> The number of bandwidths to use. If it is zero,
+*> ZCHKHB does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KK
+*> \verbatim
+*> KK is INTEGER array, dimension (NWDTHS)
+*> An array containing the bandwidths to be used for the band
+*> matrices. The values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZCHKHB
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZCHKHB to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 2 (not 1!)
+*> and at least max( KK )+1.
+*> \endverbatim
+*>
+*> \param[out] SD
+*> \verbatim
+*> SD is DOUBLE PRECISION array, dimension (max(NN))
+*> Used to hold the diagonal of the tridiagonal matrix computed
+*> by ZHBTRD.
+*> \endverbatim
+*>
+*> \param[out] SE
+*> \verbatim
+*> SE is DOUBLE PRECISION array, dimension (max(NN))
+*> Used to hold the off-diagonal of the tridiagonal matrix
+*> computed by ZHBTRD.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, max(NN))
+*> Used to hold the unitary matrix computed by ZHBTRD.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max( LDA+1, max(NN)+1 )*max(NN).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCHKHB( NSIZES, NN, NWDTHS, KK, NTYPES, DOTYPE, ISEED,
$ THRESH, NOUNIT, A, LDA, SD, SE, U, LDU, WORK,
$ LWORK, RWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LWORK, NOUNIT, NSIZES, NTYPES,
@@ -18,197 +315,6 @@
COMPLEX*16 A( LDA, * ), U( LDU, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKHB tests the reduction of a Hermitian band matrix to tridiagonal
-* from, used with the Hermitian eigenvalue problem.
-*
-* ZHBTRD factors a Hermitian band matrix A as U S U* , where * means
-* conjugate transpose, S is symmetric tridiagonal, and U is unitary.
-* ZHBTRD can use either just the lower or just the upper triangle
-* of A; ZCHKHB checks both cases.
-*
-* When ZCHKHB is called, a number of matrix "sizes" ("n's"), a number
-* of bandwidths ("k's"), and a number of matrix "types" are
-* specified. For each size ("n"), each bandwidth ("k") less than or
-* equal to "n", and each type of matrix, one matrix will be generated
-* and used to test the hermitian banded reduction routine. For each
-* matrix, a number of tests will be performed:
-*
-* (1) | A - V S V* | / ( |A| n ulp ) computed by ZHBTRD with
-* UPLO='U'
-*
-* (2) | I - UU* | / ( n ulp )
-*
-* (3) | A - V S V* | / ( |A| n ulp ) computed by ZHBTRD with
-* UPLO='L'
-*
-* (4) | I - UU* | / ( n ulp )
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is unitary and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is unitary and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Hermitian matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZCHKHB does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NWDTHS (input) INTEGER
-* The number of bandwidths to use. If it is zero,
-* ZCHKHB does nothing. It must be at least zero.
-*
-* KK (input) INTEGER array, dimension (NWDTHS)
-* An array containing the bandwidths to be used for the band
-* matrices. The values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZCHKHB
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZCHKHB to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) DOUBLE PRECISION array, dimension
-* (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 2 (not 1!)
-* and at least max( KK )+1.
-*
-* SD (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Used to hold the diagonal of the tridiagonal matrix computed
-* by ZHBTRD.
-*
-* SE (workspace) DOUBLE PRECISION array, dimension (max(NN))
-* Used to hold the off-diagonal of the tridiagonal matrix
-* computed by ZHBTRD.
-*
-* U (workspace) DOUBLE PRECISION array, dimension (LDU, max(NN))
-* Used to hold the unitary matrix computed by ZHBTRD.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. It must be at least 1
-* and at least max( NN ).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max( LDA+1, max(NN)+1 )*max(NN).
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zchkhs.f b/TESTING/EIG/zchkhs.f
index a04be2f6..cdf951e4 100644
--- a/TESTING/EIG/zchkhs.f
+++ b/TESTING/EIG/zchkhs.f
@@ -1,3 +1,448 @@
+*> \brief \b ZCHKHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, W1,
+* W3, EVECTL, EVECTR, EVECTY, EVECTX, UU, TAU,
+* WORK, NWORK, RWORK, IWORK, SELECT, RESULT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * ), SELECT( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION RESULT( 14 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), EVECTL( LDU, * ),
+* $ EVECTR( LDU, * ), EVECTX( LDU, * ),
+* $ EVECTY( LDU, * ), H( LDA, * ), T1( LDA, * ),
+* $ T2( LDA, * ), TAU( * ), U( LDU, * ),
+* $ UU( LDU, * ), UZ( LDU, * ), W1( * ), W3( * ),
+* $ WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKHS checks the nonsymmetric eigenvalue problem routines.
+*>
+*> ZGEHRD factors A as U H U' , where ' means conjugate
+*> transpose, H is hessenberg, and U is unitary.
+*>
+*> ZUNGHR generates the unitary matrix U.
+*>
+*> ZUNMHR multiplies a matrix by the unitary matrix U.
+*>
+*> ZHSEQR factors H as Z T Z' , where Z is unitary and T
+*> is upper triangular. It also computes the eigenvalues,
+*> w(1), ..., w(n); we define a diagonal matrix W whose
+*> (diagonal) entries are the eigenvalues.
+*>
+*> ZTREVC computes the left eigenvector matrix L and the
+*> right eigenvector matrix R for the matrix T. The
+*> columns of L are the complex conjugates of the left
+*> eigenvectors of T. The columns of R are the right
+*> eigenvectors of T. L is lower triangular, and R is
+*> upper triangular.
+*>
+*> ZHSEIN computes the left eigenvector matrix Y and the
+*> right eigenvector matrix X for the matrix H. The
+*> columns of Y are the complex conjugates of the left
+*> eigenvectors of H. The columns of X are the right
+*> eigenvectors of H. Y is lower triangular, and X is
+*> upper triangular.
+*>
+*> When ZCHKHS is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 14
+*> tests will be performed:
+*>
+*> (1) | A - U H U**H | / ( |A| n ulp )
+*>
+*> (2) | I - UU**H | / ( n ulp )
+*>
+*> (3) | H - Z T Z**H | / ( |H| n ulp )
+*>
+*> (4) | I - ZZ**H | / ( n ulp )
+*>
+*> (5) | A - UZ H (UZ)**H | / ( |A| n ulp )
+*>
+*> (6) | I - UZ (UZ)**H | / ( n ulp )
+*>
+*> (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp )
+*>
+*> (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp )
+*>
+*> (9) | TR - RW | / ( |T| |R| ulp )
+*>
+*> (10) | L**H T - W**H L | / ( |T| |L| ulp )
+*>
+*> (11) | HX - XW | / ( |H| |X| ulp )
+*>
+*> (12) | Y**H H - W**H Y | / ( |H| |Y| ulp )
+*>
+*> (13) | AX - XW | / ( |A| |X| ulp )
+*>
+*> (14) | Y**H A - W**H Y | / ( |A| |Y| ulp )
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (8) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random complex
+*> angles on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is unitary and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (18) Same as (16), but multiplied by SQRT( underflow threshold )
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from |z| < 1
+*> (20) Same as (19), but multiplied by SQRT( overflow threshold )
+*> (21) Same as (19), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES - INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZCHKHS does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN - INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES - INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZCHKHS
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE - LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED - INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZCHKHS to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH - DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT - INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX*16 array, dimension (LDA,max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> The leading dimension of A, H, T1 and T2. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> H - COMPLEX*16 array, dimension (LDA,max(NN))
+*> The upper hessenberg matrix computed by ZGEHRD. On exit,
+*> H contains the Hessenberg form of the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> T1 - COMPLEX*16 array, dimension (LDA,max(NN))
+*> The Schur (="quasi-triangular") matrix computed by ZHSEQR
+*> if Z is computed. On exit, T1 contains the Schur form of
+*> the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> T2 - COMPLEX*16 array, dimension (LDA,max(NN))
+*> The Schur matrix computed by ZHSEQR when Z is not computed.
+*> This should be identical to T1.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDU - INTEGER
+*> The leading dimension of U, Z, UZ and UU. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> U - COMPLEX*16 array, dimension (LDU,max(NN))
+*> The unitary matrix computed by ZGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z - COMPLEX*16 array, dimension (LDU,max(NN))
+*> The unitary matrix computed by ZHSEQR.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> UZ - COMPLEX*16 array, dimension (LDU,max(NN))
+*> The product of U times Z.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> W1 - COMPLEX*16 array, dimension (max(NN))
+*> The eigenvalues of A, as computed by a full Schur
+*> decomposition H = Z T Z'. On exit, W1 contains the
+*> eigenvalues of the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> W3 - COMPLEX*16 array, dimension (max(NN))
+*> The eigenvalues of A, as computed by a partial Schur
+*> decomposition (Z not computed, T only computed as much
+*> as is necessary for determining eigenvalues). On exit,
+*> W3 contains the eigenvalues of the matrix in A, possibly
+*> perturbed by ZHSEIN.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTL - COMPLEX*16 array, dimension (LDU,max(NN))
+*> The conjugate transpose of the (upper triangular) left
+*> eigenvector matrix for the matrix in T1.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVEZTR - COMPLEX*16 array, dimension (LDU,max(NN))
+*> The (upper triangular) right eigenvector matrix for the
+*> matrix in T1.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTY - COMPLEX*16 array, dimension (LDU,max(NN))
+*> The conjugate transpose of the left eigenvector matrix
+*> for the matrix in H.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> EVECTX - COMPLEX*16 array, dimension (LDU,max(NN))
+*> The right eigenvector matrix for the matrix in H.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> UU - COMPLEX*16 array, dimension (LDU,max(NN))
+*> Details of the unitary matrix computed by ZGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> TAU - COMPLEX*16 array, dimension (max(NN))
+*> Further details of the unitary matrix computed by ZGEHRD.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK - COMPLEX*16 array, dimension (NWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> NWORK - INTEGER
+*> The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2.
+*> \endverbatim
+*> \verbatim
+*> RWORK - DOUBLE PRECISION array, dimension (max(NN))
+*> Workspace. Could be equivalenced to IWORK, but not SELECT.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> IWORK - INTEGER array, dimension (max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> SELECT - LOGICAL array, dimension (max(NN))
+*> Workspace. Could be equivalenced to IWORK, but not RWORK.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT - DOUBLE PRECISION array, dimension (14)
+*> The values computed by the fourteen tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -14: LDU < 1 or LDU < NMAX.
+*> -26: NWORK too small.
+*> If ZLATMR, CLATMS, or CLATME returns an error code, the
+*> absolute value of it is returned.
+*> If 1, then ZHSEQR could not find all the shifts.
+*> If 2, then the EISPACK code (for small blocks) failed.
+*> If >2, then 30*N iterations were not enough to find an
+*> eigenvalue or to decompose the problem.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> MTEST The number of tests defined: care must be taken
+*> that (1) the size of RESULT, (2) the number of
+*> tests actually performed, and (3) MTEST agree.
+*> NTEST The number of tests performed on this matrix
+*> so far. This should be less than MTEST, and
+*> equal to it by the last test. It will be less
+*> if any of the routines being tested indicates
+*> that it could not compute the matrices that
+*> would be tested.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by DLAFTS).
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL,
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selects whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCHKHS( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, T1, T2, U, LDU, Z, UZ, W1,
$ W3, EVECTL, EVECTR, EVECTY, EVECTX, UU, TAU,
@@ -5,8 +450,9 @@
$ INFO )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, NOUNIT, NSIZES, NTYPES, NWORK
@@ -24,363 +470,6 @@
$ WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKHS checks the nonsymmetric eigenvalue problem routines.
-*
-* ZGEHRD factors A as U H U' , where ' means conjugate
-* transpose, H is hessenberg, and U is unitary.
-*
-* ZUNGHR generates the unitary matrix U.
-*
-* ZUNMHR multiplies a matrix by the unitary matrix U.
-*
-* ZHSEQR factors H as Z T Z' , where Z is unitary and T
-* is upper triangular. It also computes the eigenvalues,
-* w(1), ..., w(n); we define a diagonal matrix W whose
-* (diagonal) entries are the eigenvalues.
-*
-* ZTREVC computes the left eigenvector matrix L and the
-* right eigenvector matrix R for the matrix T. The
-* columns of L are the complex conjugates of the left
-* eigenvectors of T. The columns of R are the right
-* eigenvectors of T. L is lower triangular, and R is
-* upper triangular.
-*
-* ZHSEIN computes the left eigenvector matrix Y and the
-* right eigenvector matrix X for the matrix H. The
-* columns of Y are the complex conjugates of the left
-* eigenvectors of H. The columns of X are the right
-* eigenvectors of H. Y is lower triangular, and X is
-* upper triangular.
-*
-* When ZCHKHS is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 14
-* tests will be performed:
-*
-* (1) | A - U H U**H | / ( |A| n ulp )
-*
-* (2) | I - UU**H | / ( n ulp )
-*
-* (3) | H - Z T Z**H | / ( |H| n ulp )
-*
-* (4) | I - ZZ**H | / ( n ulp )
-*
-* (5) | A - UZ H (UZ)**H | / ( |A| n ulp )
-*
-* (6) | I - UZ (UZ)**H | / ( n ulp )
-*
-* (7) | T(Z computed) - T(Z not computed) | / ( |T| ulp )
-*
-* (8) | W(Z computed) - W(Z not computed) | / ( |W| ulp )
-*
-* (9) | TR - RW | / ( |T| |R| ulp )
-*
-* (10) | L**H T - W**H L | / ( |T| |L| ulp )
-*
-* (11) | HX - XW | / ( |H| |X| ulp )
-*
-* (12) | Y**H H - W**H Y | / ( |H| |Y| ulp )
-*
-* (13) | AX - XW | / ( |A| |X| ulp )
-*
-* (14) | Y**H A - W**H Y | / ( |A| |Y| ulp )
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by SQRT( overflow threshold )
-* (8) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random complex
-* angles on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is unitary and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by SQRT( overflow threshold )
-* (18) Same as (16), but multiplied by SQRT( underflow threshold )
-*
-* (19) Nonsymmetric matrix with random entries chosen from |z| < 1
-* (20) Same as (19), but multiplied by SQRT( overflow threshold )
-* (21) Same as (19), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* ==========
-*
-* NSIZES - INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZCHKHS does nothing. It must be at least zero.
-* Not modified.
-*
-* NN - INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES - INTEGER
-* The number of elements in DOTYPE. If it is zero, ZCHKHS
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE - LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED - INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZCHKHS to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH - DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT - INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A - COMPLEX*16 array, dimension (LDA,max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA - INTEGER
-* The leading dimension of A, H, T1 and T2. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* H - COMPLEX*16 array, dimension (LDA,max(NN))
-* The upper hessenberg matrix computed by ZGEHRD. On exit,
-* H contains the Hessenberg form of the matrix in A.
-* Modified.
-*
-* T1 - COMPLEX*16 array, dimension (LDA,max(NN))
-* The Schur (="quasi-triangular") matrix computed by ZHSEQR
-* if Z is computed. On exit, T1 contains the Schur form of
-* the matrix in A.
-* Modified.
-*
-* T2 - COMPLEX*16 array, dimension (LDA,max(NN))
-* The Schur matrix computed by ZHSEQR when Z is not computed.
-* This should be identical to T1.
-* Modified.
-*
-* LDU - INTEGER
-* The leading dimension of U, Z, UZ and UU. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* U - COMPLEX*16 array, dimension (LDU,max(NN))
-* The unitary matrix computed by ZGEHRD.
-* Modified.
-*
-* Z - COMPLEX*16 array, dimension (LDU,max(NN))
-* The unitary matrix computed by ZHSEQR.
-* Modified.
-*
-* UZ - COMPLEX*16 array, dimension (LDU,max(NN))
-* The product of U times Z.
-* Modified.
-*
-* W1 - COMPLEX*16 array, dimension (max(NN))
-* The eigenvalues of A, as computed by a full Schur
-* decomposition H = Z T Z'. On exit, W1 contains the
-* eigenvalues of the matrix in A.
-* Modified.
-*
-* W3 - COMPLEX*16 array, dimension (max(NN))
-* The eigenvalues of A, as computed by a partial Schur
-* decomposition (Z not computed, T only computed as much
-* as is necessary for determining eigenvalues). On exit,
-* W3 contains the eigenvalues of the matrix in A, possibly
-* perturbed by ZHSEIN.
-* Modified.
-*
-* EVECTL - COMPLEX*16 array, dimension (LDU,max(NN))
-* The conjugate transpose of the (upper triangular) left
-* eigenvector matrix for the matrix in T1.
-* Modified.
-*
-* EVEZTR - COMPLEX*16 array, dimension (LDU,max(NN))
-* The (upper triangular) right eigenvector matrix for the
-* matrix in T1.
-* Modified.
-*
-* EVECTY - COMPLEX*16 array, dimension (LDU,max(NN))
-* The conjugate transpose of the left eigenvector matrix
-* for the matrix in H.
-* Modified.
-*
-* EVECTX - COMPLEX*16 array, dimension (LDU,max(NN))
-* The right eigenvector matrix for the matrix in H.
-* Modified.
-*
-* UU - COMPLEX*16 array, dimension (LDU,max(NN))
-* Details of the unitary matrix computed by ZGEHRD.
-* Modified.
-*
-* TAU - COMPLEX*16 array, dimension (max(NN))
-* Further details of the unitary matrix computed by ZGEHRD.
-* Modified.
-*
-* WORK - COMPLEX*16 array, dimension (NWORK)
-* Workspace.
-* Modified.
-*
-* NWORK - INTEGER
-* The number of entries in WORK. NWORK >= 4*NN(j)*NN(j) + 2.
-*
-* RWORK - DOUBLE PRECISION array, dimension (max(NN))
-* Workspace. Could be equivalenced to IWORK, but not SELECT.
-* Modified.
-*
-* IWORK - INTEGER array, dimension (max(NN))
-* Workspace.
-* Modified.
-*
-* SELECT - LOGICAL array, dimension (max(NN))
-* Workspace. Could be equivalenced to IWORK, but not RWORK.
-* Modified.
-*
-* RESULT - DOUBLE PRECISION array, dimension (14)
-* The values computed by the fourteen tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-* Modified.
-*
-* INFO - INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -14: LDU < 1 or LDU < NMAX.
-* -26: NWORK too small.
-* If ZLATMR, CLATMS, or CLATME returns an error code, the
-* absolute value of it is returned.
-* If 1, then ZHSEQR could not find all the shifts.
-* If 2, then the EISPACK code (for small blocks) failed.
-* If >2, then 30*N iterations were not enough to find an
-* eigenvalue or to decompose the problem.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* MTEST The number of tests defined: care must be taken
-* that (1) the size of RESULT, (2) the number of
-* tests actually performed, and (3) MTEST agree.
-* NTEST The number of tests performed on this matrix
-* so far. This should be less than MTEST, and
-* equal to it by the last test. It will be less
-* if any of the routines being tested indicates
-* that it could not compute the matrices that
-* would be tested.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by DLAFTS).
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL,
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selects whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zchkst.f b/TESTING/EIG/zchkst.f
index 28c2583f..00d7271e 100644
--- a/TESTING/EIG/zchkst.f
+++ b/TESTING/EIG/zchkst.f
@@ -1,13 +1,549 @@
+*> \brief \b ZCHKST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
+* WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
+* LWORK, RWORK, LRWORK, IWORK, LIWORK, RESULT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
+* $ NSIZES, NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION D1( * ), D2( * ), D3( * ), D4( * ), D5( * ),
+* $ RESULT( * ), RWORK( * ), SD( * ), SE( * ),
+* $ WA1( * ), WA2( * ), WA3( * ), WR( * )
+* COMPLEX*16 A( LDA, * ), AP( * ), TAU( * ), U( LDU, * ),
+* $ V( LDU, * ), VP( * ), WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKST checks the Hermitian eigenvalue problem routines.
+*>
+*> ZHETRD factors A as U S U* , where * means conjugate transpose,
+*> S is real symmetric tridiagonal, and U is unitary.
+*> ZHETRD can use either just the lower or just the upper triangle
+*> of A; ZCHKST checks both cases.
+*> U is represented as a product of Householder
+*> transformations, whose vectors are stored in the first
+*> n-1 columns of V, and whose scale factors are in TAU.
+*>
+*> ZHPTRD does the same as ZHETRD, except that A and V are stored
+*> in "packed" format.
+*>
+*> ZUNGTR constructs the matrix U from the contents of V and TAU.
+*>
+*> ZUPGTR constructs the matrix U from the contents of VP and TAU.
+*>
+*> ZSTEQR factors S as Z D1 Z* , where Z is the unitary
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal. D2 is the matrix of
+*> eigenvalues computed when Z is not computed.
+*>
+*> DSTERF computes D3, the matrix of eigenvalues, by the
+*> PWK method, which does not yield eigenvectors.
+*>
+*> ZPTEQR factors S as Z4 D4 Z4* , for a
+*> Hermitian positive definite tridiagonal matrix.
+*> D5 is the matrix of eigenvalues computed when Z is not
+*> computed.
+*>
+*> DSTEBZ computes selected eigenvalues. WA1, WA2, and
+*> WA3 will denote eigenvalues computed to high
+*> absolute accuracy, with different range options.
+*> WR will denote eigenvalues computed to high relative
+*> accuracy.
+*>
+*> ZSTEIN computes Y, the eigenvectors of S, given the
+*> eigenvalues.
+*>
+*> ZSTEDC factors S as Z D1 Z* , where Z is the unitary
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal ('I' option). It may also
+*> update an input unitary matrix, usually the output
+*> from ZHETRD/ZUNGTR or ZHPTRD/ZUPGTR ('V' option). It may
+*> also just compute eigenvalues ('N' option).
+*>
+*> ZSTEMR factors S as Z D1 Z* , where Z is the unitary
+*> matrix of eigenvectors and D1 is a diagonal matrix with
+*> the eigenvalues on the diagonal ('I' option). ZSTEMR
+*> uses the Relatively Robust Representation whenever possible.
+*>
+*> When ZCHKST is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the Hermitian eigenroutines. For each matrix, a number
+*> of tests will be performed:
+*>
+*> (1) | A - V S V* | / ( |A| n ulp ) ZHETRD( UPLO='U', ... )
+*>
+*> (2) | I - UV* | / ( n ulp ) ZUNGTR( UPLO='U', ... )
+*>
+*> (3) | A - V S V* | / ( |A| n ulp ) ZHETRD( UPLO='L', ... )
+*>
+*> (4) | I - UV* | / ( n ulp ) ZUNGTR( UPLO='L', ... )
+*>
+*> (5-8) Same as 1-4, but for ZHPTRD and ZUPGTR.
+*>
+*> (9) | S - Z D Z* | / ( |S| n ulp ) ZSTEQR('V',...)
+*>
+*> (10) | I - ZZ* | / ( n ulp ) ZSTEQR('V',...)
+*>
+*> (11) | D1 - D2 | / ( |D1| ulp ) ZSTEQR('N',...)
+*>
+*> (12) | D1 - D3 | / ( |D1| ulp ) DSTERF
+*>
+*> (13) 0 if the true eigenvalues (computed by sturm count)
+*> of S are within THRESH of
+*> those in D1. 2*THRESH if they are not. (Tested using
+*> DSTECH)
+*>
+*> For S positive definite,
+*>
+*> (14) | S - Z4 D4 Z4* | / ( |S| n ulp ) ZPTEQR('V',...)
+*>
+*> (15) | I - Z4 Z4* | / ( n ulp ) ZPTEQR('V',...)
+*>
+*> (16) | D4 - D5 | / ( 100 |D4| ulp ) ZPTEQR('N',...)
+*>
+*> When S is also diagonally dominant by the factor gamma < 1,
+*>
+*> (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> DSTEBZ( 'A', 'E', ...)
+*>
+*> (18) | WA1 - D3 | / ( |D3| ulp ) DSTEBZ( 'A', 'E', ...)
+*>
+*> (19) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> DSTEBZ( 'I', 'E', ...)
+*>
+*> (20) | S - Y WA1 Y* | / ( |S| n ulp ) DSTEBZ, ZSTEIN
+*>
+*> (21) | I - Y Y* | / ( n ulp ) DSTEBZ, ZSTEIN
+*>
+*> (22) | S - Z D Z* | / ( |S| n ulp ) ZSTEDC('I')
+*>
+*> (23) | I - ZZ* | / ( n ulp ) ZSTEDC('I')
+*>
+*> (24) | S - Z D Z* | / ( |S| n ulp ) ZSTEDC('V')
+*>
+*> (25) | I - ZZ* | / ( n ulp ) ZSTEDC('V')
+*>
+*> (26) | D1 - D2 | / ( |D1| ulp ) ZSTEDC('V') and
+*> ZSTEDC('N')
+*>
+*> Test 27 is disabled at the moment because ZSTEMR does not
+*> guarantee high relatvie accuracy.
+*>
+*> (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> ZSTEMR('V', 'A')
+*>
+*> (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
+*> i
+*> omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
+*> ZSTEMR('V', 'I')
+*>
+*> Tests 29 through 34 are disable at present because ZSTEMR
+*> does not handle partial specturm requests.
+*>
+*> (29) | S - Z D Z* | / ( |S| n ulp ) ZSTEMR('V', 'I')
+*>
+*> (30) | I - ZZ* | / ( n ulp ) ZSTEMR('V', 'I')
+*>
+*> (31) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> ZSTEMR('N', 'I') vs. CSTEMR('V', 'I')
+*>
+*> (32) | S - Z D Z* | / ( |S| n ulp ) ZSTEMR('V', 'V')
+*>
+*> (33) | I - ZZ* | / ( n ulp ) ZSTEMR('V', 'V')
+*>
+*> (34) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> ZSTEMR('N', 'V') vs. CSTEMR('V', 'V')
+*>
+*> (35) | S - Z D Z* | / ( |S| n ulp ) ZSTEMR('V', 'A')
+*>
+*> (36) | I - ZZ* | / ( n ulp ) ZSTEMR('V', 'A')
+*>
+*> (37) ( max { min | WA2(i)-WA3(j) | } +
+*> i j
+*> max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
+*> i j
+*> ZSTEMR('N', 'A') vs. CSTEMR('V', 'A')
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is unitary and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is unitary and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Hermitian matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*> (16) Same as (8), but diagonal elements are all positive.
+*> (17) Same as (9), but diagonal elements are all positive.
+*> (18) Same as (10), but diagonal elements are all positive.
+*> (19) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (20) Same as (16), but multiplied by SQRT( underflow threshold )
+*> (21) A diagonally dominant tridiagonal matrix with geometrically
+*> spaced diagonal entries 1, ..., ULP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZCHKST does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZCHKST
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZCHKST to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array of
+*> dimension ( LDA , max(NN) )
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array of
+*> dimension( max(NN)*max(NN+1)/2 )
+*> The matrix A stored in packed format.
+*> \endverbatim
+*>
+*> \param[out] SD
+*> \verbatim
+*> SD is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The diagonal of the tridiagonal matrix computed by ZHETRD.
+*> On exit, SD and SE contain the tridiagonal form of the
+*> matrix in A.
+*> \endverbatim
+*>
+*> \param[out] SE
+*> \verbatim
+*> SE is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The off-diagonal of the tridiagonal matrix computed by
+*> ZHETRD. On exit, SD and SE contain the tridiagonal form of
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D1
+*> \verbatim
+*> D1 is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by ZSTEQR simlutaneously
+*> with Z. On exit, the eigenvalues in D1 correspond with the
+*> matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D2
+*> \verbatim
+*> D2 is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by ZSTEQR if Z is not
+*> computed. On exit, the eigenvalues in D2 correspond with
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] D3
+*> \verbatim
+*> D3 is DOUBLE PRECISION array of
+*> dimension( max(NN) )
+*> The eigenvalues of A, as computed by DSTERF. On exit, the
+*> eigenvalues in D3 correspond with the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array of
+*> dimension( LDU, max(NN) ).
+*> The unitary matrix computed by ZHETRD + ZUNGTR.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U, Z, and V. It must be at least 1
+*> and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array of
+*> dimension( LDU, max(NN) ).
+*> The Housholder vectors computed by ZHETRD in reducing A to
+*> tridiagonal form. The vectors computed with UPLO='U' are
+*> in the upper triangle, and the vectors computed with UPLO='L'
+*> are in the lower triangle. (As described in ZHETRD, the
+*> sub- and superdiagonal are not set to 1, although the
+*> true Householder vector has a 1 in that position. The
+*> routines that use V, such as ZUNGTR, set those entries to
+*> 1 before using them, and then restore them later.)
+*> \endverbatim
+*>
+*> \param[out] VP
+*> \verbatim
+*> VP is COMPLEX*16 array of
+*> dimension( max(NN)*max(NN+1)/2 )
+*> The matrix V stored in packed format.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array of
+*> dimension( max(NN) )
+*> The Householder factors computed by ZHETRD in reducing A
+*> to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array of
+*> dimension( LDU, max(NN) ).
+*> The unitary matrix of eigenvectors computed by ZSTEQR,
+*> ZPTEQR, and ZSTEIN.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array of
+*> dimension( LWORK )
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array,
+*> dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
+*> where Nmax = max( NN(j), 2 ) and lg = log base 2.
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array of
+*> dimension( ??? )
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (26)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -23: LDU < 1 or LDU < NMAX.
+*> -29: LWORK too small.
+*> If ZLATMR, CLATMS, ZHETRD, ZUNGTR, ZSTEQR, DSTERF,
+*> or ZUNMC2 returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NBLOCK Blocksize as returned by ENVIR.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far.
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCHKST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, AP, SD, SE, D1, D2, D3, D4, D5,
$ WA1, WA2, WA3, WR, U, LDU, V, VP, TAU, Z, WORK,
$ LWORK, RWORK, LRWORK, IWORK, LIWORK, RESULT,
$ INFO )
- IMPLICIT NONE
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
@@ -24,408 +560,6 @@
$ V( LDU, * ), VP( * ), WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKST checks the Hermitian eigenvalue problem routines.
-*
-* ZHETRD factors A as U S U* , where * means conjugate transpose,
-* S is real symmetric tridiagonal, and U is unitary.
-* ZHETRD can use either just the lower or just the upper triangle
-* of A; ZCHKST checks both cases.
-* U is represented as a product of Householder
-* transformations, whose vectors are stored in the first
-* n-1 columns of V, and whose scale factors are in TAU.
-*
-* ZHPTRD does the same as ZHETRD, except that A and V are stored
-* in "packed" format.
-*
-* ZUNGTR constructs the matrix U from the contents of V and TAU.
-*
-* ZUPGTR constructs the matrix U from the contents of VP and TAU.
-*
-* ZSTEQR factors S as Z D1 Z* , where Z is the unitary
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal. D2 is the matrix of
-* eigenvalues computed when Z is not computed.
-*
-* DSTERF computes D3, the matrix of eigenvalues, by the
-* PWK method, which does not yield eigenvectors.
-*
-* ZPTEQR factors S as Z4 D4 Z4* , for a
-* Hermitian positive definite tridiagonal matrix.
-* D5 is the matrix of eigenvalues computed when Z is not
-* computed.
-*
-* DSTEBZ computes selected eigenvalues. WA1, WA2, and
-* WA3 will denote eigenvalues computed to high
-* absolute accuracy, with different range options.
-* WR will denote eigenvalues computed to high relative
-* accuracy.
-*
-* ZSTEIN computes Y, the eigenvectors of S, given the
-* eigenvalues.
-*
-* ZSTEDC factors S as Z D1 Z* , where Z is the unitary
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal ('I' option). It may also
-* update an input unitary matrix, usually the output
-* from ZHETRD/ZUNGTR or ZHPTRD/ZUPGTR ('V' option). It may
-* also just compute eigenvalues ('N' option).
-*
-* ZSTEMR factors S as Z D1 Z* , where Z is the unitary
-* matrix of eigenvectors and D1 is a diagonal matrix with
-* the eigenvalues on the diagonal ('I' option). ZSTEMR
-* uses the Relatively Robust Representation whenever possible.
-*
-* When ZCHKST is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the Hermitian eigenroutines. For each matrix, a number
-* of tests will be performed:
-*
-* (1) | A - V S V* | / ( |A| n ulp ) ZHETRD( UPLO='U', ... )
-*
-* (2) | I - UV* | / ( n ulp ) ZUNGTR( UPLO='U', ... )
-*
-* (3) | A - V S V* | / ( |A| n ulp ) ZHETRD( UPLO='L', ... )
-*
-* (4) | I - UV* | / ( n ulp ) ZUNGTR( UPLO='L', ... )
-*
-* (5-8) Same as 1-4, but for ZHPTRD and ZUPGTR.
-*
-* (9) | S - Z D Z* | / ( |S| n ulp ) ZSTEQR('V',...)
-*
-* (10) | I - ZZ* | / ( n ulp ) ZSTEQR('V',...)
-*
-* (11) | D1 - D2 | / ( |D1| ulp ) ZSTEQR('N',...)
-*
-* (12) | D1 - D3 | / ( |D1| ulp ) DSTERF
-*
-* (13) 0 if the true eigenvalues (computed by sturm count)
-* of S are within THRESH of
-* those in D1. 2*THRESH if they are not. (Tested using
-* DSTECH)
-*
-* For S positive definite,
-*
-* (14) | S - Z4 D4 Z4* | / ( |S| n ulp ) ZPTEQR('V',...)
-*
-* (15) | I - Z4 Z4* | / ( n ulp ) ZPTEQR('V',...)
-*
-* (16) | D4 - D5 | / ( 100 |D4| ulp ) ZPTEQR('N',...)
-*
-* When S is also diagonally dominant by the factor gamma < 1,
-*
-* (17) max | D4(i) - WR(i) | / ( |D4(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* DSTEBZ( 'A', 'E', ...)
-*
-* (18) | WA1 - D3 | / ( |D3| ulp ) DSTEBZ( 'A', 'E', ...)
-*
-* (19) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* DSTEBZ( 'I', 'E', ...)
-*
-* (20) | S - Y WA1 Y* | / ( |S| n ulp ) DSTEBZ, ZSTEIN
-*
-* (21) | I - Y Y* | / ( n ulp ) DSTEBZ, ZSTEIN
-*
-* (22) | S - Z D Z* | / ( |S| n ulp ) ZSTEDC('I')
-*
-* (23) | I - ZZ* | / ( n ulp ) ZSTEDC('I')
-*
-* (24) | S - Z D Z* | / ( |S| n ulp ) ZSTEDC('V')
-*
-* (25) | I - ZZ* | / ( n ulp ) ZSTEDC('V')
-*
-* (26) | D1 - D2 | / ( |D1| ulp ) ZSTEDC('V') and
-* ZSTEDC('N')
-*
-* Test 27 is disabled at the moment because ZSTEMR does not
-* guarantee high relatvie accuracy.
-*
-* (27) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* ZSTEMR('V', 'A')
-*
-* (28) max | D6(i) - WR(i) | / ( |D6(i)| omega ) ,
-* i
-* omega = 2 (2n-1) ULP (1 + 8 gamma**2) / (1 - gamma)**4
-* ZSTEMR('V', 'I')
-*
-* Tests 29 through 34 are disable at present because ZSTEMR
-* does not handle partial specturm requests.
-*
-* (29) | S - Z D Z* | / ( |S| n ulp ) ZSTEMR('V', 'I')
-*
-* (30) | I - ZZ* | / ( n ulp ) ZSTEMR('V', 'I')
-*
-* (31) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* ZSTEMR('N', 'I') vs. CSTEMR('V', 'I')
-*
-* (32) | S - Z D Z* | / ( |S| n ulp ) ZSTEMR('V', 'V')
-*
-* (33) | I - ZZ* | / ( n ulp ) ZSTEMR('V', 'V')
-*
-* (34) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* ZSTEMR('N', 'V') vs. CSTEMR('V', 'V')
-*
-* (35) | S - Z D Z* | / ( |S| n ulp ) ZSTEMR('V', 'A')
-*
-* (36) | I - ZZ* | / ( n ulp ) ZSTEMR('V', 'A')
-*
-* (37) ( max { min | WA2(i)-WA3(j) | } +
-* i j
-* max { min | WA3(i)-WA2(j) | } ) / ( |D3| ulp )
-* i j
-* ZSTEMR('N', 'A') vs. CSTEMR('V', 'A')
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is unitary and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is unitary and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Hermitian matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-* (16) Same as (8), but diagonal elements are all positive.
-* (17) Same as (9), but diagonal elements are all positive.
-* (18) Same as (10), but diagonal elements are all positive.
-* (19) Same as (16), but multiplied by SQRT( overflow threshold )
-* (20) Same as (16), but multiplied by SQRT( underflow threshold )
-* (21) A diagonally dominant tridiagonal matrix with geometrically
-* spaced diagonal entries 1, ..., ULP.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZCHKST does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZCHKST
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZCHKST to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace/output) COMPLEX*16 array of
-* dimension ( LDA , max(NN) )
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-*
-* AP (workspace) COMPLEX*16 array of
-* dimension( max(NN)*max(NN+1)/2 )
-* The matrix A stored in packed format.
-*
-* SD (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The diagonal of the tridiagonal matrix computed by ZHETRD.
-* On exit, SD and SE contain the tridiagonal form of the
-* matrix in A.
-*
-* SE (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The off-diagonal of the tridiagonal matrix computed by
-* ZHETRD. On exit, SD and SE contain the tridiagonal form of
-* the matrix in A.
-*
-* D1 (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by ZSTEQR simlutaneously
-* with Z. On exit, the eigenvalues in D1 correspond with the
-* matrix in A.
-*
-* D2 (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by ZSTEQR if Z is not
-* computed. On exit, the eigenvalues in D2 correspond with
-* the matrix in A.
-*
-* D3 (workspace/output) DOUBLE PRECISION array of
-* dimension( max(NN) )
-* The eigenvalues of A, as computed by DSTERF. On exit, the
-* eigenvalues in D3 correspond with the matrix in A.
-*
-* U (workspace/output) COMPLEX*16 array of
-* dimension( LDU, max(NN) ).
-* The unitary matrix computed by ZHETRD + ZUNGTR.
-*
-* LDU (input) INTEGER
-* The leading dimension of U, Z, and V. It must be at least 1
-* and at least max( NN ).
-*
-* V (workspace/output) COMPLEX*16 array of
-* dimension( LDU, max(NN) ).
-* The Housholder vectors computed by ZHETRD in reducing A to
-* tridiagonal form. The vectors computed with UPLO='U' are
-* in the upper triangle, and the vectors computed with UPLO='L'
-* are in the lower triangle. (As described in ZHETRD, the
-* sub- and superdiagonal are not set to 1, although the
-* true Householder vector has a 1 in that position. The
-* routines that use V, such as ZUNGTR, set those entries to
-* 1 before using them, and then restore them later.)
-*
-* VP (workspace) COMPLEX*16 array of
-* dimension( max(NN)*max(NN+1)/2 )
-* The matrix V stored in packed format.
-*
-* TAU (workspace/output) COMPLEX*16 array of
-* dimension( max(NN) )
-* The Householder factors computed by ZHETRD in reducing A
-* to tridiagonal form.
-*
-* Z (workspace/output) COMPLEX*16 array of
-* dimension( LDU, max(NN) ).
-* The unitary matrix of eigenvectors computed by ZSTEQR,
-* ZPTEQR, and ZSTEIN.
-*
-* WORK (workspace/output) COMPLEX*16 array of
-* dimension( LWORK )
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 1 + 4 * Nmax + 2 * Nmax * lg Nmax + 3 * Nmax**2
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-*
-* IWORK (workspace/output) INTEGER array,
-* dimension (6 + 6*Nmax + 5 * Nmax * lg Nmax )
-* where Nmax = max( NN(j), 2 ) and lg = log base 2.
-* Workspace.
-*
-* RWORK (workspace/output) DOUBLE PRECISION array of
-* dimension( ??? )
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (26)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -23: LDU < 1 or LDU < NMAX.
-* -29: LWORK too small.
-* If ZLATMR, CLATMS, ZHETRD, ZUNGTR, ZSTEQR, DSTERF,
-* or ZUNMC2 returns an error code, the
-* absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NBLOCK Blocksize as returned by ENVIR.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far.
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zckcsd.f b/TESTING/EIG/zckcsd.f
index 83b63045..8506da67 100644
--- a/TESTING/EIG/zckcsd.f
+++ b/TESTING/EIG/zckcsd.f
@@ -1,15 +1,195 @@
+*> \brief \b ZCKCSD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCKCSD( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
+* MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
+* WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), PVAL( * ),
+* $ QVAL( * )
+* DOUBLE PRECISION RWORK( * ), THETA( * )
+* COMPLEX*16 U1( * ), U2( * ), V1T( * ), V2T( * ),
+* $ WORK( * ), X( * ), XF( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCKCSD tests ZUNCSD:
+*> the CSD for an M-by-M unitary matrix X partitioned as
+*> [ X11 X12; X21 X22 ]. X11 is P-by-Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension P.
+*> \endverbatim
+*>
+*> \param[in] QVAL
+*> \verbatim
+*> QVAL is INTEGER array, dimension (NM)
+*> The values of the matrix column dimension Q.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] MMAX
+*> \verbatim
+*> MMAX is INTEGER
+*> The maximum value permitted for M, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] XF
+*> \verbatim
+*> XF is COMPLEX*16 array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is COMPLEX*16 array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is COMPLEX*16 array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is COMPLEX*16 array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is COMPLEX*16 array, dimension (MMAX*MMAX)
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If ZLAROR returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCKCSD( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
$ MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK,
$ WORK, RWORK, NIN, NOUT, INFO )
- IMPLICIT NONE
*
-* Originally ZCKGSV
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
-*
-* Adapted to ZCKCSD
-* July 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, MMAX, NOUT
@@ -23,82 +203,6 @@
$ WORK( * ), X( * ), XF( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCKCSD tests ZUNCSD:
-* the CSD for an M-by-M unitary matrix X partitioned as
-* [ X11 X12; X21 X22 ]. X11 is P-by-Q.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension P.
-*
-* QVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix column dimension Q.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* MMAX (input) INTEGER
-* The maximum value permitted for M, used in dimensioning the
-* work arrays.
-*
-* X (workspace) COMPLEX*16 array, dimension (MMAX*MMAX)
-*
-* XF (workspace) COMPLEX*16 array, dimension (MMAX*MMAX)
-*
-* U1 (workspace) COMPLEX*16 array, dimension (MMAX*MMAX)
-*
-* U2 (workspace) COMPLEX*16 array, dimension (MMAX*MMAX)
-*
-* V1T (workspace) COMPLEX*16 array, dimension (MMAX*MMAX)
-*
-* V2T (workspace) COMPLEX*16 array, dimension (MMAX*MMAX)
-*
-* THETA (workspace) DOUBLE PRECISION array, dimension (MMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (MMAX)
-*
-* WORK (workspace) COMPLEX*16 array
-*
-* RWORK (workspace) DOUBLE PRECISION array
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If ZLAROR returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zckglm.f b/TESTING/EIG/zckglm.f
index 6fe609e8..9ceca677 100644
--- a/TESTING/EIG/zckglm.f
+++ b/TESTING/EIG/zckglm.f
@@ -1,10 +1,179 @@
+*> \brief \b ZCKGLM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCKGLM( NN, NVAL, MVAL, PVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AF( * ), B( * ), BF( * ), WORK( * ),
+* $ X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCKGLM tests ZGGGLM - subroutine for solving generalized linear
+*> model problem.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N, M and P contained in the vectors
+*> NVAL, MVAL and PVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row dimension N.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension P.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESID >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (4*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If ZLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCKGLM( NN, NVAL, MVAL, PVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
@@ -17,76 +186,6 @@
$ X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCKGLM tests ZGGGLM - subroutine for solving generalized linear
-* model problem.
-*
-* Arguments
-* =========
-*
-* NN (input) INTEGER
-* The number of values of N, M and P contained in the vectors
-* NVAL, MVAL and PVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row dimension N.
-*
-* MVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension P.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESID >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* BF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* X (workspace) COMPLEX*16 array, dimension (4*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If ZLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zckgqr.f b/TESTING/EIG/zckgqr.f
index 305fadc3..1d7a07c0 100644
--- a/TESTING/EIG/zckgqr.f
+++ b/TESTING/EIG/zckgqr.f
@@ -1,10 +1,222 @@
+*> \brief \b ZCKGQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
+* THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
+* BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AF( * ), AQ( * ), AR( * ), B( * ),
+* $ BF( * ), BT( * ), BWK( * ), BZ( * ), TAUA( * ),
+* $ TAUB( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCKGQR tests
+*> ZGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
+*> ZGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row(column) dimension M.
+*> \endverbatim
+*>
+*> \param[in] NP
+*> \verbatim
+*> NP is INTEGER
+*> The number of values of P contained in the vector PVAL.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NP)
+*> The values of the matrix row(column) dimension P.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column(row) dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is COMPLEX*16 array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BZ
+*> \verbatim
+*> BZ is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BT
+*> \verbatim
+*> BT is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is COMPLEX*16 array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If ZLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCKGQR( NM, MVAL, NP, PVAL, NN, NVAL, NMATS, ISEED,
$ THRESH, NMAX, A, AF, AQ, AR, TAUA, B, BF, BZ,
$ BT, BWK, TAUB, WORK, RWORK, NIN, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, NMAX, NN, NOUT, NP
@@ -18,94 +230,6 @@
$ TAUB( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCKGQR tests
-* ZGGQRF: GQR factorization for N-by-M matrix A and N-by-P matrix B,
-* ZGGRQF: GRQ factorization for M-by-N matrix A and P-by-N matrix B.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row(column) dimension M.
-*
-* NP (input) INTEGER
-* The number of values of P contained in the vector PVAL.
-*
-* PVAL (input) INTEGER array, dimension (NP)
-* The values of the matrix row(column) dimension P.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column(row) dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AR (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* TAUA (workspace) COMPLEX*16 array, dimension (NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* BF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* BZ (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* BT (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* BWK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* TAUB (workspace) COMPLEX*16 array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If ZLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zckgsv.f b/TESTING/EIG/zckgsv.f
index 0a16db9c..3d42a7e0 100644
--- a/TESTING/EIG/zckgsv.f
+++ b/TESTING/EIG/zckgsv.f
@@ -1,10 +1,209 @@
+*> \brief \b ZCKGSV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCKGSV( NM, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, U, V, Q, ALPHA, BETA, R,
+* IWORK, WORK, RWORK, NIN, NOUT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NM, NMATS, NMAX, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), IWORK( * ), MVAL( * ), NVAL( * ),
+* $ PVAL( * )
+* DOUBLE PRECISION ALPHA( * ), BETA( * ), RWORK( * )
+* COMPLEX*16 A( * ), AF( * ), B( * ), BF( * ), Q( * ),
+* $ R( * ), U( * ), V( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCKGSV tests ZGGSVD:
+*> the GSVD for M-by-N matrix A and P-by-N matrix B.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NP)
+*> The values of the matrix row dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If ZLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCKGSV( NM, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, U, V, Q, ALPHA, BETA, R,
$ IWORK, WORK, RWORK, NIN, NOUT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NM, NMATS, NMAX, NOUT
@@ -18,87 +217,6 @@
$ R( * ), U( * ), V( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCKGSV tests ZGGSVD:
-* the GSVD for M-by-N matrix A and P-by-N matrix B.
-*
-* Arguments
-* =========
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NP)
-* The values of the matrix row dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* BF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* U (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* V (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* Q (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* ALPHA (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* BETA (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* R (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If ZLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zcklse.f b/TESTING/EIG/zcklse.f
index 6fdbaf16..c8151977 100644
--- a/TESTING/EIG/zcklse.f
+++ b/TESTING/EIG/zcklse.f
@@ -1,10 +1,179 @@
+*> \brief \b ZCKLSE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
+* NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 ), MVAL( * ), NVAL( * ), PVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AF( * ), B( * ), BF( * ), WORK( * ),
+* $ X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCKLSE tests ZGGLSE - a subroutine for solving linear equality
+*> constrained least square problem (LSE).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of (M,P,N) contained in the vectors
+*> (MVAL, PVAL, NVAL).
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row(column) dimension M.
+*> \endverbatim
+*>
+*> \param[in] PVAL
+*> \verbatim
+*> PVAL is INTEGER array, dimension (NN)
+*> The values of the matrix row(column) dimension P.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column(row) dimension N.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be tested for each combination
+*> of matrix dimensions. If NMATS >= NTYPES (the maximum
+*> number of matrix types), then all the different types are
+*> generated for testing. If NMATS < NTYPES, another input line
+*> is read to get the numbers of the matrix types to be used.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator. The array
+*> elements should be between 0 and 4095, otherwise they will be
+*> reduced mod 4096, and ISEED(4) must be odd.
+*> On exit, the next seed in the random number sequence after
+*> all the test matrices have been generated.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (5*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0 : successful exit
+*> > 0 : If ZLATMS returns an error code, the absolute value
+*> of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCKLSE( NN, MVAL, PVAL, NVAL, NMATS, ISEED, THRESH,
$ NMAX, A, AF, B, BF, X, WORK, RWORK, NIN, NOUT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, NIN, NMATS, NMAX, NN, NOUT
@@ -17,76 +186,6 @@
$ X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCKLSE tests ZGGLSE - a subroutine for solving linear equality
-* constrained least square problem (LSE).
-*
-* Arguments
-* =========
-*
-* NN (input) INTEGER
-* The number of values of (M,P,N) contained in the vectors
-* (MVAL, PVAL, NVAL).
-*
-* MVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row(column) dimension M.
-*
-* PVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix row(column) dimension P.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column(row) dimension N.
-*
-* NMATS (input) INTEGER
-* The number of matrix types to be tested for each combination
-* of matrix dimensions. If NMATS >= NTYPES (the maximum
-* number of matrix types), then all the different types are
-* generated for testing. If NMATS < NTYPES, another input line
-* is read to get the numbers of the matrix types to be used.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator. The array
-* elements should be between 0 and 4095, otherwise they will be
-* reduced mod 4096, and ISEED(4) must be odd.
-* On exit, the next seed in the random number sequence after
-* all the test matrices have been generated.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* BF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* X (workspace) COMPLEX*16 array, dimension (5*NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NIN (input) INTEGER
-* The unit number for input.
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* INFO (output) INTEGER
-* = 0 : successful exit
-* > 0 : If ZLATMS returns an error code, the absolute value
-* of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zcsdts.f b/TESTING/EIG/zcsdts.f
index 2aa7c448..d336b50b 100644
--- a/TESTING/EIG/zcsdts.f
+++ b/TESTING/EIG/zcsdts.f
@@ -1,15 +1,215 @@
+*> \brief \b ZCSDTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCSDTS( M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T,
+* LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDX, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RESULT( 9 ), RWORK( * ), THETA( * )
+* COMPLEX*16 U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
+* $ V2T( LDV2T, * ), WORK( LWORK ), X( LDX, * ),
+* $ XF( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCSDTS tests ZUNCSD, which, given an M-by-M partitioned unitary
+*> matrix X,
+*> Q M-Q
+*> X = [ X11 X12 ] P ,
+*> [ X21 X22 ] M-P
+*>
+*> computes the CSD
+*>
+*> [ U1 ]**T * [ X11 X12 ] * [ V1 ]
+*> [ U2 ] [ X21 X22 ] [ V2 ]
+*>
+*> [ I 0 0 | 0 0 0 ]
+*> [ 0 C 0 | 0 -S 0 ]
+*> [ 0 0 0 | 0 0 -I ]
+*> = [---------------------] = [ D11 D12 ] .
+*> [ 0 0 0 | I 0 0 ] [ D21 D22 ]
+*> [ 0 S 0 | 0 C 0 ]
+*> [ 0 0 I | 0 0 0 ]
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix X. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix X11. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is INTEGER
+*> The number of columns of the matrix X11. Q >= 0.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,M)
+*> The M-by-M matrix X.
+*> \endverbatim
+*>
+*> \param[out] XF
+*> \verbatim
+*> XF is COMPLEX*16 array, dimension (LDX,M)
+*> Details of the CSD of X, as returned by ZUNCSD;
+*> see ZUNCSD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the arrays X and XF.
+*> LDX >= max( 1,M ).
+*> \endverbatim
+*>
+*> \param[out] U1
+*> \verbatim
+*> U1 is COMPLEX*16 array, dimension(LDU1,P)
+*> The P-by-P unitary matrix U1.
+*> \endverbatim
+*>
+*> \param[in] LDU1
+*> \verbatim
+*> LDU1 is INTEGER
+*> The leading dimension of the array U1. LDU >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] U2
+*> \verbatim
+*> U2 is COMPLEX*16 array, dimension(LDU2,M-P)
+*> The (M-P)-by-(M-P) unitary matrix U2.
+*> \endverbatim
+*>
+*> \param[in] LDU2
+*> \verbatim
+*> LDU2 is INTEGER
+*> The leading dimension of the array U2. LDU >= max(1,M-P).
+*> \endverbatim
+*>
+*> \param[out] V1T
+*> \verbatim
+*> V1T is COMPLEX*16 array, dimension(LDV1T,Q)
+*> The Q-by-Q unitary matrix V1T.
+*> \endverbatim
+*>
+*> \param[in] LDV1T
+*> \verbatim
+*> LDV1T is INTEGER
+*> The leading dimension of the array V1T. LDV1T >=
+*> max(1,Q).
+*> \endverbatim
+*>
+*> \param[out] V2T
+*> \verbatim
+*> V2T is COMPLEX*16 array, dimension(LDV2T,M-Q)
+*> The (M-Q)-by-(M-Q) unitary matrix V2T.
+*> \endverbatim
+*>
+*> \param[in] LDV2T
+*> \verbatim
+*> LDV2T is INTEGER
+*> The leading dimension of the array V2T. LDV2T >=
+*> max(1,M-Q).
+*> \endverbatim
+*>
+*> \param[out] THETA
+*> \verbatim
+*> THETA is DOUBLE PRECISION array, dimension MIN(P,M-P,Q,M-Q)
+*> The CS values of X; the essentially diagonal matrices C and
+*> S are constructed from THETA; see subroutine ZUNCSD for
+*> details.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (9)
+*> The test ratios:
+*> RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
+*> RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
+*> RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
+*> RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
+*> RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
+*> RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
+*> RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
+*> RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
+*> RESULT(9) = 0 if THETA is in increasing order and
+*> all angles are in [0,pi/2];
+*> = ULPINV otherwise.
+*> ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZCSDTS( M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T,
$ LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK,
$ RWORK, RESULT )
- IMPLICIT NONE
*
-* Originally xGSVTS
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
-*
-* Adapted to ZCSDTS
-* July 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDX, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
@@ -22,106 +222,6 @@
$ XF( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZCSDTS tests ZUNCSD, which, given an M-by-M partitioned unitary
-* matrix X,
-* Q M-Q
-* X = [ X11 X12 ] P ,
-* [ X21 X22 ] M-P
-*
-* computes the CSD
-*
-* [ U1 ]**T * [ X11 X12 ] * [ V1 ]
-* [ U2 ] [ X21 X22 ] [ V2 ]
-*
-* [ I 0 0 | 0 0 0 ]
-* [ 0 C 0 | 0 -S 0 ]
-* [ 0 0 0 | 0 0 -I ]
-* = [---------------------] = [ D11 D12 ] .
-* [ 0 0 0 | I 0 0 ] [ D21 D22 ]
-* [ 0 S 0 | 0 C 0 ]
-* [ 0 0 I | 0 0 0 ]
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix X. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix X11. P >= 0.
-*
-* Q (input) INTEGER
-* The number of columns of the matrix X11. Q >= 0.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,M)
-* The M-by-M matrix X.
-*
-* XF (output) COMPLEX*16 array, dimension (LDX,M)
-* Details of the CSD of X, as returned by ZUNCSD;
-* see ZUNCSD for further details.
-*
-* LDX (input) INTEGER
-* The leading dimension of the arrays X and XF.
-* LDX >= max( 1,M ).
-*
-* U1 (output) COMPLEX*16 array, dimension(LDU1,P)
-* The P-by-P unitary matrix U1.
-*
-* LDU1 (input) INTEGER
-* The leading dimension of the array U1. LDU >= max(1,P).
-*
-* U2 (output) COMPLEX*16 array, dimension(LDU2,M-P)
-* The (M-P)-by-(M-P) unitary matrix U2.
-*
-* LDU2 (input) INTEGER
-* The leading dimension of the array U2. LDU >= max(1,M-P).
-*
-* V1T (output) COMPLEX*16 array, dimension(LDV1T,Q)
-* The Q-by-Q unitary matrix V1T.
-*
-* LDV1T (input) INTEGER
-* The leading dimension of the array V1T. LDV1T >=
-* max(1,Q).
-*
-* V2T (output) COMPLEX*16 array, dimension(LDV2T,M-Q)
-* The (M-Q)-by-(M-Q) unitary matrix V2T.
-*
-* LDV2T (input) INTEGER
-* The leading dimension of the array V2T. LDV2T >=
-* max(1,M-Q).
-*
-* THETA (output) DOUBLE PRECISION array, dimension MIN(P,M-P,Q,M-Q)
-* The CS values of X; the essentially diagonal matrices C and
-* S are constructed from THETA; see subroutine ZUNCSD for
-* details.
-*
-* IWORK (workspace) INTEGER array, dimension (M)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK
-*
-* RWORK (workspace) DOUBLE PRECISION array
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (9)
-* The test ratios:
-* RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
-* RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
-* RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
-* RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
-* RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
-* RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
-* RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
-* RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
-* RESULT(9) = 0 if THETA is in increasing order and
-* all angles are in [0,pi/2];
-* = ULPINV otherwise.
-* ( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrges.f b/TESTING/EIG/zdrges.f
index 59f87323..db51af7e 100644
--- a/TESTING/EIG/zdrges.f
+++ b/TESTING/EIG/zdrges.f
@@ -1,10 +1,393 @@
+*> \brief \b ZDRGES
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRGES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, ALPHA,
+* BETA, WORK, LWORK, RWORK, RESULT, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION RESULT( 13 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDA, * ),
+* $ BETA( * ), Q( LDQ, * ), S( LDA, * ),
+* $ T( LDA, * ), WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRGES checks the nonsymmetric generalized eigenvalue (Schur form)
+*> problem driver ZGGES.
+*>
+*> ZGGES factors A and B as Q*S*Z' and Q*T*Z' , where ' means conjugate
+*> transpose, S and T are upper triangular (i.e., in generalized Schur
+*> form), and Q and Z are unitary. It also computes the generalized
+*> eigenvalues (alpha(j),beta(j)), j=1,...,n. Thus,
+*> w(j) = alpha(j)/beta(j) is a root of the characteristic equation
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> Optionally it also reorder the eigenvalues so that a selected
+*> cluster of eigenvalues appears in the leading diagonal block of the
+*> Schur forms.
+*>
+*> When ZDRGES is called, a number of matrix "sizes" ("N's") and a
+*> number of matrix "TYPES" are specified. For each size ("N")
+*> and each TYPE of matrix, a pair of matrices (A, B) will be generated
+*> and used for testing. For each matrix pair, the following 13 tests
+*> will be performed and compared with the threshhold THRESH except
+*> the tests (5), (11) and (13).
+*>
+*>
+*> (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues)
+*>
+*>
+*> (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues)
+*>
+*> (5) if A is in Schur form (i.e. triangular form) (no sorting of
+*> eigenvalues)
+*>
+*> (6) if eigenvalues = diagonal elements of the Schur form (S, T),
+*> i.e., test the maximum over j of D(j) where:
+*>
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> (no sorting of eigenvalues)
+*>
+*> (7) | (A,B) - Q (S,T) Z' | / ( |(A,B)| n ulp )
+*> (with sorting of eigenvalues).
+*>
+*> (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) if A is in Schur form (i.e. quasi-triangular form)
+*> (with sorting of eigenvalues).
+*>
+*> (11) if eigenvalues = diagonal elements of the Schur form (S, T),
+*> i.e. test the maximum over j of D(j) where:
+*>
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> (with sorting of eigenvalues).
+*>
+*> (12) if sorting worked and SDIM is the number of eigenvalues
+*> which were CELECTed.
+*>
+*> Test Matrices
+*> =============
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> DDRGES does nothing. NSIZES >= 0.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. NN >= 0.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, DDRGES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A on input.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DDRGES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. THRESH >= 0.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension(LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, and T.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension(LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by ZGGES. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by ZGGES.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ, max(NN))
+*> The (left) orthogonal matrix computed by ZGGES.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q and Z. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by ZGGES.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by ZGGES.
+*> ALPHA(k) / BETA(k) is the k-th generalized eigenvalue of A
+*> and B.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 3*N*N.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension ( 8*N )
+*> Real workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (15)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRGES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, ALPHA,
$ BETA, WORK, LWORK, RWORK, RESULT, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
@@ -19,270 +402,6 @@
$ T( LDA, * ), WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRGES checks the nonsymmetric generalized eigenvalue (Schur form)
-* problem driver ZGGES.
-*
-* ZGGES factors A and B as Q*S*Z' and Q*T*Z' , where ' means conjugate
-* transpose, S and T are upper triangular (i.e., in generalized Schur
-* form), and Q and Z are unitary. It also computes the generalized
-* eigenvalues (alpha(j),beta(j)), j=1,...,n. Thus,
-* w(j) = alpha(j)/beta(j) is a root of the characteristic equation
-*
-* det( A - w(j) B ) = 0
-*
-* Optionally it also reorder the eigenvalues so that a selected
-* cluster of eigenvalues appears in the leading diagonal block of the
-* Schur forms.
-*
-* When ZDRGES is called, a number of matrix "sizes" ("N's") and a
-* number of matrix "TYPES" are specified. For each size ("N")
-* and each TYPE of matrix, a pair of matrices (A, B) will be generated
-* and used for testing. For each matrix pair, the following 13 tests
-* will be performed and compared with the threshhold THRESH except
-* the tests (5), (11) and (13).
-*
-*
-* (1) | A - Q S Z' | / ( |A| n ulp ) (no sorting of eigenvalues)
-*
-*
-* (2) | B - Q T Z' | / ( |B| n ulp ) (no sorting of eigenvalues)
-*
-*
-* (3) | I - QQ' | / ( n ulp ) (no sorting of eigenvalues)
-*
-*
-* (4) | I - ZZ' | / ( n ulp ) (no sorting of eigenvalues)
-*
-* (5) if A is in Schur form (i.e. triangular form) (no sorting of
-* eigenvalues)
-*
-* (6) if eigenvalues = diagonal elements of the Schur form (S, T),
-* i.e., test the maximum over j of D(j) where:
-*
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* (no sorting of eigenvalues)
-*
-* (7) | (A,B) - Q (S,T) Z' | / ( |(A,B)| n ulp )
-* (with sorting of eigenvalues).
-*
-* (8) | I - QQ' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (9) | I - ZZ' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) if A is in Schur form (i.e. quasi-triangular form)
-* (with sorting of eigenvalues).
-*
-* (11) if eigenvalues = diagonal elements of the Schur form (S, T),
-* i.e. test the maximum over j of D(j) where:
-*
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* (with sorting of eigenvalues).
-*
-* (12) if sorting worked and SDIM is the number of eigenvalues
-* which were CELECTed.
-*
-* Test Matrices
-* =============
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* DDRGES does nothing. NSIZES >= 0.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. NN >= 0.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, DDRGES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A on input.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DDRGES to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. THRESH >= 0.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) COMPLEX*16 array, dimension(LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, and T.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) COMPLEX*16 array, dimension(LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The Schur form matrix computed from A by ZGGES. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by ZGGES.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDQ, max(NN))
-* The (left) orthogonal matrix computed by ZGGES.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q and Z. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) COMPLEX*16 array, dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by ZGGES.
-*
-* ALPHA (workspace) COMPLEX*16 array, dimension (max(NN))
-* BETA (workspace) COMPLEX*16 array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by ZGGES.
-* ALPHA(k) / BETA(k) is the k-th generalized eigenvalue of A
-* and B.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 3*N*N.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension ( 8*N )
-* Real workspace.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (15)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrgev.f b/TESTING/EIG/zdrgev.f
index 4c679715..e02b8c88 100644
--- a/TESTING/EIG/zdrgev.f
+++ b/TESTING/EIG/zdrgev.f
@@ -1,11 +1,412 @@
+*> \brief \b ZDRGEV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRGEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, QE, LDQE,
+* ALPHA, BETA, ALPHA1, BETA1, WORK, LWORK, RWORK,
+* RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LDQE, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), ALPHA1( * ),
+* $ B( LDA, * ), BETA( * ), BETA1( * ),
+* $ Q( LDQ, * ), QE( LDQE, * ), S( LDA, * ),
+* $ T( LDA, * ), WORK( * ), Z( LDQ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRGEV checks the nonsymmetric generalized eigenvalue problem driver
+*> routine ZGGEV.
+*>
+*> ZGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the
+*> generalized eigenvalues and, optionally, the left and right
+*> eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that A - w*B is singular. It is
+*> usually represented as the pair (alpha,beta), as there is reasonalbe
+*> interpretation for beta=0, and even for both being zero.
+*>
+*> A right generalized eigenvector corresponding to a generalized
+*> eigenvalue w for a pair of matrices (A,B) is a vector r such that
+*> (A - wB) * r = 0. A left generalized eigenvector is a vector l such
+*> that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l.
+*>
+*> When ZDRGEV is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, a pair of matrices (A, B) will be generated
+*> and used for testing. For each matrix pair, the following tests
+*> will be performed and compared with the threshhold THRESH.
+*>
+*> Results from ZGGEV:
+*>
+*> (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of
+*>
+*> | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) )
+*>
+*> where VL**H is the conjugate-transpose of VL.
+*>
+*> (2) | |VL(i)| - 1 | / ulp and whether largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of
+*>
+*> | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) )
+*>
+*> (4) | |VR(i)| - 1 | / ulp and whether largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (5) W(full) = W(partial)
+*> W(full) denotes the eigenvalues computed when both l and r
+*> are also computed, and W(partial) denotes the eigenvalues
+*> computed when only W, only W and r, or only W and l are
+*> computed.
+*>
+*> (6) VL(full) = VL(partial)
+*> VL(full) denotes the left eigenvectors computed when both l
+*> and r are computed, and VL(partial) denotes the result
+*> when only l is computed.
+*>
+*> (7) VR(full) = VR(partial)
+*> VR(full) denotes the right eigenvectors computed when both l
+*> and r are also computed, and VR(partial) denotes the result
+*> when only l is computed.
+*>
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZDRGES does nothing. NSIZES >= 0.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. NN >= 0.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZDRGEV
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRGES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IERR not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension(LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, and T.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension(LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The Schur form matrix computed from A by ZGGEV. On exit, S
+*> contains the Schur form matrix corresponding to the matrix
+*> in A.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by ZGGEV.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ, max(NN))
+*> The (left) eigenvectors matrix computed by ZGGEV.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q and Z. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension( LDQ, max(NN) )
+*> The (right) orthogonal matrix computed by ZGGEV.
+*> \endverbatim
+*>
+*> \param[out] QE
+*> \verbatim
+*> QE is COMPLEX*16 array, dimension( LDQ, max(NN) )
+*> QE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDQE
+*> \verbatim
+*> LDQE is INTEGER
+*> The leading dimension of QE. LDQE >= max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by ZGGEV.
+*> ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
+*> generalized eigenvalue of A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHA1
+*> \verbatim
+*> ALPHA1 is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> Like ALPHAR, ALPHAI, BETA, these arrays contain the
+*> eigenvalues of A and B, but those computed when ZGGEV only
+*> computes a partial eigendecomposition, i.e. not the
+*> eigenvalues and left and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. LWORK >= N*(N+1)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (8*N)
+*> Real workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRGEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, S, T, Q, LDQ, Z, QE, LDQE,
$ ALPHA, BETA, ALPHA1, BETA1, WORK, LWORK, RWORK,
$ RESULT, INFO )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LDQE, LWORK, NOUNIT, NSIZES,
@@ -22,273 +423,6 @@
$ T( LDA, * ), WORK( * ), Z( LDQ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRGEV checks the nonsymmetric generalized eigenvalue problem driver
-* routine ZGGEV.
-*
-* ZGGEV computes for a pair of n-by-n nonsymmetric matrices (A,B) the
-* generalized eigenvalues and, optionally, the left and right
-* eigenvectors.
-*
-* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
-* or a ratio alpha/beta = w, such that A - w*B is singular. It is
-* usually represented as the pair (alpha,beta), as there is reasonalbe
-* interpretation for beta=0, and even for both being zero.
-*
-* A right generalized eigenvector corresponding to a generalized
-* eigenvalue w for a pair of matrices (A,B) is a vector r such that
-* (A - wB) * r = 0. A left generalized eigenvector is a vector l such
-* that l**H * (A - wB) = 0, where l**H is the conjugate-transpose of l.
-*
-* When ZDRGEV is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, a pair of matrices (A, B) will be generated
-* and used for testing. For each matrix pair, the following tests
-* will be performed and compared with the threshhold THRESH.
-*
-* Results from ZGGEV:
-*
-* (1) max over all left eigenvalue/-vector pairs (alpha/beta,l) of
-*
-* | VL**H * (beta A - alpha B) |/( ulp max(|beta A|, |alpha B|) )
-*
-* where VL**H is the conjugate-transpose of VL.
-*
-* (2) | |VL(i)| - 1 | / ulp and whether largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (3) max over all left eigenvalue/-vector pairs (alpha/beta,r) of
-*
-* | (beta A - alpha B) * VR | / ( ulp max(|beta A|, |alpha B|) )
-*
-* (4) | |VR(i)| - 1 | / ulp and whether largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (5) W(full) = W(partial)
-* W(full) denotes the eigenvalues computed when both l and r
-* are also computed, and W(partial) denotes the eigenvalues
-* computed when only W, only W and r, or only W and l are
-* computed.
-*
-* (6) VL(full) = VL(partial)
-* VL(full) denotes the left eigenvectors computed when both l
-* and r are computed, and VL(partial) denotes the result
-* when only l is computed.
-*
-* (7) VR(full) = VR(partial)
-* VR(full) denotes the right eigenvectors computed when both l
-* and r are also computed, and VR(partial) denotes the result
-* when only l is computed.
-*
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random orthogonal matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZDRGES does nothing. NSIZES >= 0.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. NN >= 0.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZDRGEV
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRGES to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IERR not equal to 0.)
-*
-* A (input/workspace) COMPLEX*16 array, dimension(LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, and T.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) COMPLEX*16 array, dimension(LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The Schur form matrix computed from A by ZGGEV. On exit, S
-* contains the Schur form matrix corresponding to the matrix
-* in A.
-*
-* T (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by ZGGEV.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDQ, max(NN))
-* The (left) eigenvectors matrix computed by ZGGEV.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q and Z. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) COMPLEX*16 array, dimension( LDQ, max(NN) )
-* The (right) orthogonal matrix computed by ZGGEV.
-*
-* QE (workspace) COMPLEX*16 array, dimension( LDQ, max(NN) )
-* QE holds the computed right or left eigenvectors.
-*
-* LDQE (input) INTEGER
-* The leading dimension of QE. LDQE >= max(1,max(NN)).
-*
-* ALPHA (workspace) COMPLEX*16 array, dimension (max(NN))
-* BETA (workspace) COMPLEX*16 array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by ZGGEV.
-* ( ALPHAR(k)+ALPHAI(k)*i ) / BETA(k) is the k-th
-* generalized eigenvalue of A and B.
-*
-* ALPHA1 (workspace) COMPLEX*16 array, dimension (max(NN))
-* BETA1 (workspace) COMPLEX*16 array, dimension (max(NN))
-* Like ALPHAR, ALPHAI, BETA, these arrays contain the
-* eigenvalues of A and B, but those computed when ZGGEV only
-* computes a partial eigendecomposition, i.e. not the
-* eigenvalues and left and right eigenvectors.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. LWORK >= N*(N+1)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (8*N)
-* Real workspace.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrgsx.f b/TESTING/EIG/zdrgsx.f
index 27fdc8a1..bd82889c 100644
--- a/TESTING/EIG/zdrgsx.f
+++ b/TESTING/EIG/zdrgsx.f
@@ -1,10 +1,361 @@
+*> \brief \b ZDRGSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B, AI,
+* BI, Z, Q, ALPHA, BETA, C, LDC, S, WORK, LWORK,
+* RWORK, IWORK, LIWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
+* $ NOUT, NSIZE
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( LDA, * ), AI( LDA, * ), ALPHA( * ),
+* $ B( LDA, * ), BETA( * ), BI( LDA, * ),
+* $ C( LDC, * ), Q( LDA, * ), WORK( * ),
+* $ Z( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRGSX checks the nonsymmetric generalized eigenvalue (Schur form)
+*> problem expert driver ZGGESX.
+*>
+*> ZGGES factors A and B as Q*S*Z' and Q*T*Z' , where ' means conjugate
+*> transpose, S and T are upper triangular (i.e., in generalized Schur
+*> form), and Q and Z are unitary. It also computes the generalized
+*> eigenvalues (alpha(j),beta(j)), j=1,...,n. Thus,
+*> w(j) = alpha(j)/beta(j) is a root of the characteristic equation
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> Optionally it also reorders the eigenvalues so that a selected
+*> cluster of eigenvalues appears in the leading diagonal block of the
+*> Schur forms; computes a reciprocal condition number for the average
+*> of the selected eigenvalues; and computes a reciprocal condition
+*> number for the right and left deflating subspaces corresponding to
+*> the selected eigenvalues.
+*>
+*> When ZDRGSX is called with NSIZE > 0, five (5) types of built-in
+*> matrix pairs are used to test the routine ZGGESX.
+*>
+*> When ZDRGSX is called with NSIZE = 0, it reads in test matrix data
+*> to test ZGGESX.
+*> (need more details on what kind of read-in data are needed).
+*>
+*> For each matrix pair, the following tests will be performed and
+*> compared with the threshhold THRESH except for the tests (7) and (9):
+*>
+*> (1) | A - Q S Z' | / ( |A| n ulp )
+*>
+*> (2) | B - Q T Z' | / ( |B| n ulp )
+*>
+*> (3) | I - QQ' | / ( n ulp )
+*>
+*> (4) | I - ZZ' | / ( n ulp )
+*>
+*> (5) if A is in Schur form (i.e. triangular form)
+*>
+*> (6) maximum over j of D(j) where:
+*>
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> (7) if sorting worked and SDIM is the number of eigenvalues
+*> which were selected.
+*>
+*> (8) the estimated value DIF does not differ from the true values of
+*> Difu and Difl more than a factor 10*THRESH. If the estimate DIF
+*> equals zero the corresponding true values of Difu and Difl
+*> should be less than EPS*norm(A, B). If the true value of Difu
+*> and Difl equal zero, the estimate DIF should be less than
+*> EPS*norm(A, B).
+*>
+*> (9) If INFO = N+3 is returned by ZGGESX, the reordering "failed"
+*> and we check that DIF = PL = PR = 0 and that the true value of
+*> Difu and Difl is < EPS*norm(A, B). We count the events when
+*> INFO=N+3.
+*>
+*> For read-in test matrices, the same tests are run except that the
+*> exact value for DIF (and PL) is input data. Additionally, there is
+*> one more test run for read-in test matrices:
+*>
+*> (10) the estimated value PL does not differ from the true value of
+*> PLTRU more than a factor THRESH. If the estimate PL equals
+*> zero the corresponding true value of PLTRU should be less than
+*> EPS*norm(A, B). If the true value of PLTRU equal zero, the
+*> estimate PL should be less than EPS*norm(A, B).
+*>
+*> Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1)
+*> matrix pairs are generated and tested. NSIZE should be kept small.
+*>
+*> SVD (routine ZGESVD) is used for computing the true value of DIF_u
+*> and DIF_l when testing the built-in test problems.
+*>
+*> Built-in Test Matrices
+*> ======================
+*>
+*> All built-in test matrices are the 2 by 2 block of triangular
+*> matrices
+*>
+*> A = [ A11 A12 ] and B = [ B11 B12 ]
+*> [ A22 ] [ B22 ]
+*>
+*> where for different type of A11 and A22 are given as the following.
+*> A12 and B12 are chosen so that the generalized Sylvester equation
+*>
+*> A11*R - L*A22 = -A12
+*> B11*R - L*B22 = -B12
+*>
+*> have prescribed solution R and L.
+*>
+*> Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1).
+*> B11 = I_m, B22 = I_k
+*> where J_k(a,b) is the k-by-k Jordan block with ``a'' on
+*> diagonal and ``b'' on superdiagonal.
+*>
+*> Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and
+*> B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m
+*> A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and
+*> B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
+*>
+*> Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each
+*> second diagonal block in A_11 and each third diagonal block
+*> in A_22 are made as 2 by 2 blocks.
+*>
+*> Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) )
+*> for i=1,...,m, j=1,...,m and
+*> A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) )
+*> for i=m+1,...,k, j=m+1,...,k
+*>
+*> Type 5: (A,B) and have potentially close or common eigenvalues and
+*> very large departure from block diagonality A_11 is chosen
+*> as the m x m leading submatrix of A_1:
+*> | 1 b |
+*> | -b 1 |
+*> | 1+d b |
+*> | -b 1+d |
+*> A_1 = | d 1 |
+*> | -1 d |
+*> | -d 1 |
+*> | -1 -d |
+*> | 1 |
+*> and A_22 is chosen as the k x k leading submatrix of A_2:
+*> | -1 b |
+*> | -b -1 |
+*> | 1-d b |
+*> | -b 1-d |
+*> A_2 = | d 1+b |
+*> | -1-b d |
+*> | -d 1+b |
+*> | -1+b -d |
+*> | 1-d |
+*> and matrix B are chosen as identity matrices (see DLATM5).
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZE
+*> \verbatim
+*> NSIZE is INTEGER
+*> The maximum size of the matrices to use. NSIZE >= 0.
+*> If NSIZE = 0, no built-in tests matrices are used, but
+*> read-in test matrices are used to test DGGESX.
+*> \endverbatim
+*>
+*> \param[in] NCMAX
+*> \verbatim
+*> NCMAX is INTEGER
+*> Maximum allowable NMAX for generating Kroneker matrix
+*> in call to ZLAKF2
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. THRESH >= 0.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Used to store the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, AI, BI, Z and Q,
+*> LDA >= max( 1, NSIZE ). For the read-in test,
+*> LDA >= max( 1, N ), N is the size of the test matrices.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Used to store the matrix whose eigenvalues are to be
+*> computed. On exit, B contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] AI
+*> \verbatim
+*> AI is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Copy of A, modified by ZGGESX.
+*> \endverbatim
+*>
+*> \param[out] BI
+*> \verbatim
+*> BI is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Copy of B, modified by ZGGESX.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Z holds the left Schur vectors computed by ZGGESX.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Q holds the right Schur vectors computed by ZGGESX.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (NSIZE)
+*> \endverbatim
+*> \verbatim
+*> On exit, ALPHA/BETA are the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, LDC)
+*> Store the matrix generated by subroutine ZLAKF2, this is the
+*> matrix formed by Kronecker products used for estimating
+*> DIF.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of C. LDC >= max(1, LDA*LDA/2 ).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (LDC)
+*> Singular values of C
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK. LWORK >= 3*NSIZE*NSIZE/2
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (5*NSIZE*NSIZE/2 - 4)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> The dimension of the array IWORK. LIWORK >= NSIZE + 2.
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRGSX( NSIZE, NCMAX, THRESH, NIN, NOUT, A, LDA, B, AI,
$ BI, Z, Q, ALPHA, BETA, C, LDC, S, WORK, LWORK,
$ RWORK, IWORK, LIWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDC, LIWORK, LWORK, NCMAX, NIN,
@@ -21,233 +372,6 @@
$ Z( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRGSX checks the nonsymmetric generalized eigenvalue (Schur form)
-* problem expert driver ZGGESX.
-*
-* ZGGES factors A and B as Q*S*Z' and Q*T*Z' , where ' means conjugate
-* transpose, S and T are upper triangular (i.e., in generalized Schur
-* form), and Q and Z are unitary. It also computes the generalized
-* eigenvalues (alpha(j),beta(j)), j=1,...,n. Thus,
-* w(j) = alpha(j)/beta(j) is a root of the characteristic equation
-*
-* det( A - w(j) B ) = 0
-*
-* Optionally it also reorders the eigenvalues so that a selected
-* cluster of eigenvalues appears in the leading diagonal block of the
-* Schur forms; computes a reciprocal condition number for the average
-* of the selected eigenvalues; and computes a reciprocal condition
-* number for the right and left deflating subspaces corresponding to
-* the selected eigenvalues.
-*
-* When ZDRGSX is called with NSIZE > 0, five (5) types of built-in
-* matrix pairs are used to test the routine ZGGESX.
-*
-* When ZDRGSX is called with NSIZE = 0, it reads in test matrix data
-* to test ZGGESX.
-* (need more details on what kind of read-in data are needed).
-*
-* For each matrix pair, the following tests will be performed and
-* compared with the threshhold THRESH except for the tests (7) and (9):
-*
-* (1) | A - Q S Z' | / ( |A| n ulp )
-*
-* (2) | B - Q T Z' | / ( |B| n ulp )
-*
-* (3) | I - QQ' | / ( n ulp )
-*
-* (4) | I - ZZ' | / ( n ulp )
-*
-* (5) if A is in Schur form (i.e. triangular form)
-*
-* (6) maximum over j of D(j) where:
-*
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* (7) if sorting worked and SDIM is the number of eigenvalues
-* which were selected.
-*
-* (8) the estimated value DIF does not differ from the true values of
-* Difu and Difl more than a factor 10*THRESH. If the estimate DIF
-* equals zero the corresponding true values of Difu and Difl
-* should be less than EPS*norm(A, B). If the true value of Difu
-* and Difl equal zero, the estimate DIF should be less than
-* EPS*norm(A, B).
-*
-* (9) If INFO = N+3 is returned by ZGGESX, the reordering "failed"
-* and we check that DIF = PL = PR = 0 and that the true value of
-* Difu and Difl is < EPS*norm(A, B). We count the events when
-* INFO=N+3.
-*
-* For read-in test matrices, the same tests are run except that the
-* exact value for DIF (and PL) is input data. Additionally, there is
-* one more test run for read-in test matrices:
-*
-* (10) the estimated value PL does not differ from the true value of
-* PLTRU more than a factor THRESH. If the estimate PL equals
-* zero the corresponding true value of PLTRU should be less than
-* EPS*norm(A, B). If the true value of PLTRU equal zero, the
-* estimate PL should be less than EPS*norm(A, B).
-*
-* Note that for the built-in tests, a total of 10*NSIZE*(NSIZE-1)
-* matrix pairs are generated and tested. NSIZE should be kept small.
-*
-* SVD (routine ZGESVD) is used for computing the true value of DIF_u
-* and DIF_l when testing the built-in test problems.
-*
-* Built-in Test Matrices
-* ======================
-*
-* All built-in test matrices are the 2 by 2 block of triangular
-* matrices
-*
-* A = [ A11 A12 ] and B = [ B11 B12 ]
-* [ A22 ] [ B22 ]
-*
-* where for different type of A11 and A22 are given as the following.
-* A12 and B12 are chosen so that the generalized Sylvester equation
-*
-* A11*R - L*A22 = -A12
-* B11*R - L*B22 = -B12
-*
-* have prescribed solution R and L.
-*
-* Type 1: A11 = J_m(1,-1) and A_22 = J_k(1-a,1).
-* B11 = I_m, B22 = I_k
-* where J_k(a,b) is the k-by-k Jordan block with ``a'' on
-* diagonal and ``b'' on superdiagonal.
-*
-* Type 2: A11 = (a_ij) = ( 2(.5-sin(i)) ) and
-* B11 = (b_ij) = ( 2(.5-sin(ij)) ) for i=1,...,m, j=i,...,m
-* A22 = (a_ij) = ( 2(.5-sin(i+j)) ) and
-* B22 = (b_ij) = ( 2(.5-sin(ij)) ) for i=m+1,...,k, j=i,...,k
-*
-* Type 3: A11, A22 and B11, B22 are chosen as for Type 2, but each
-* second diagonal block in A_11 and each third diagonal block
-* in A_22 are made as 2 by 2 blocks.
-*
-* Type 4: A11 = ( 20(.5 - sin(ij)) ) and B22 = ( 2(.5 - sin(i+j)) )
-* for i=1,...,m, j=1,...,m and
-* A22 = ( 20(.5 - sin(i+j)) ) and B22 = ( 2(.5 - sin(ij)) )
-* for i=m+1,...,k, j=m+1,...,k
-*
-* Type 5: (A,B) and have potentially close or common eigenvalues and
-* very large departure from block diagonality A_11 is chosen
-* as the m x m leading submatrix of A_1:
-* | 1 b |
-* | -b 1 |
-* | 1+d b |
-* | -b 1+d |
-* A_1 = | d 1 |
-* | -1 d |
-* | -d 1 |
-* | -1 -d |
-* | 1 |
-* and A_22 is chosen as the k x k leading submatrix of A_2:
-* | -1 b |
-* | -b -1 |
-* | 1-d b |
-* | -b 1-d |
-* A_2 = | d 1+b |
-* | -1-b d |
-* | -d 1+b |
-* | -1+b -d |
-* | 1-d |
-* and matrix B are chosen as identity matrices (see DLATM5).
-*
-*
-* Arguments
-* =========
-*
-* NSIZE (input) INTEGER
-* The maximum size of the matrices to use. NSIZE >= 0.
-* If NSIZE = 0, no built-in tests matrices are used, but
-* read-in test matrices are used to test DGGESX.
-*
-* NCMAX (input) INTEGER
-* Maximum allowable NMAX for generating Kroneker matrix
-* in call to ZLAKF2
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. THRESH >= 0.
-*
-* NIN (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Used to store the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, AI, BI, Z and Q,
-* LDA >= max( 1, NSIZE ). For the read-in test,
-* LDA >= max( 1, N ), N is the size of the test matrices.
-*
-* B (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Used to store the matrix whose eigenvalues are to be
-* computed. On exit, B contains the last matrix actually used.
-*
-* AI (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Copy of A, modified by ZGGESX.
-*
-* BI (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Copy of B, modified by ZGGESX.
-*
-* Z (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Z holds the left Schur vectors computed by ZGGESX.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Q holds the right Schur vectors computed by ZGGESX.
-*
-* ALPHA (workspace) COMPLEX*16 array, dimension (NSIZE)
-* BETA (workspace) COMPLEX*16 array, dimension (NSIZE)
-* On exit, ALPHA/BETA are the eigenvalues.
-*
-* C (workspace) COMPLEX*16 array, dimension (LDC, LDC)
-* Store the matrix generated by subroutine ZLAKF2, this is the
-* matrix formed by Kronecker products used for estimating
-* DIF.
-*
-* LDC (input) INTEGER
-* The leading dimension of C. LDC >= max(1, LDA*LDA/2 ).
-*
-* S (workspace) DOUBLE PRECISION array, dimension (LDC)
-* Singular values of C
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK. LWORK >= 3*NSIZE*NSIZE/2
-*
-* RWORK (workspace) DOUBLE PRECISION array,
-* dimension (5*NSIZE*NSIZE/2 - 4)
-*
-* IWORK (workspace) INTEGER array, dimension (LIWORK)
-*
-* LIWORK (input) INTEGER
-* The dimension of the array IWORK. LIWORK >= NSIZE + 2.
-*
-* BWORK (workspace) LOGICAL array, dimension (NSIZE)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrgvx.f b/TESTING/EIG/zdrgvx.f
index 7a6e2097..86e32712 100644
--- a/TESTING/EIG/zdrgvx.f
+++ b/TESTING/EIG/zdrgvx.f
@@ -1,11 +1,309 @@
+*> \brief \b ZDRGVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRGVX( NSIZE, THRESH, NIN, NOUT, A, LDA, B, AI, BI,
+* ALPHA, BETA, VL, VR, ILO, IHI, LSCALE, RSCALE,
+* S, DTRU, DIF, DIFTRU, WORK, LWORK, RWORK,
+* IWORK, LIWORK, RESULT, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, INFO, LDA, LIWORK, LWORK, NIN, NOUT,
+* $ NSIZE
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER IWORK( * )
+* DOUBLE PRECISION DIF( * ), DIFTRU( * ), DTRU( * ), LSCALE( * ),
+* $ RESULT( 4 ), RSCALE( * ), RWORK( * ), S( * )
+* COMPLEX*16 A( LDA, * ), AI( LDA, * ), ALPHA( * ),
+* $ B( LDA, * ), BETA( * ), BI( LDA, * ),
+* $ VL( LDA, * ), VR( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRGVX checks the nonsymmetric generalized eigenvalue problem
+*> expert driver ZGGEVX.
+*>
+*> ZGGEVX computes the generalized eigenvalues, (optionally) the left
+*> and/or right eigenvectors, (optionally) computes a balancing
+*> transformation to improve the conditioning, and (optionally)
+*> reciprocal condition numbers for the eigenvalues and eigenvectors.
+*>
+*> When ZDRGVX is called with NSIZE > 0, two types of test matrix pairs
+*> are generated by the subroutine DLATM6 and test the driver ZGGEVX.
+*> The test matrices have the known exact condition numbers for
+*> eigenvalues. For the condition numbers of the eigenvectors
+*> corresponding the first and last eigenvalues are also know
+*> ``exactly'' (see ZLATM6).
+*> For each matrix pair, the following tests will be performed and
+*> compared with the threshhold THRESH.
+*>
+*> (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> where l**H is the conjugate tranpose of l.
+*>
+*> (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> (3) The condition number S(i) of eigenvalues computed by ZGGEVX
+*> differs less than a factor THRESH from the exact S(i) (see
+*> ZLATM6).
+*>
+*> (4) DIF(i) computed by ZTGSNA differs less than a factor 10*THRESH
+*> from the exact value (for the 1st and 5th vectors only).
+*>
+*> Test Matrices
+*> =============
+*>
+*> Two kinds of test matrix pairs
+*> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
+*> are used in the tests:
+*>
+*> 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
+*> 0 2+a 0 0 0 0 1 0 0 0
+*> 0 0 3+a 0 0 0 0 1 0 0
+*> 0 0 0 4+a 0 0 0 0 1 0
+*> 0 0 0 0 5+a , 0 0 0 0 1 , and
+*>
+*> 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
+*> 1 1 0 0 0 0 1 0 0 0
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1+a 1+b 0 0 0 1 0
+*> 0 0 0 -1-b 1+a , 0 0 0 0 1 .
+*>
+*> In both cases the same inverse(YH) and inverse(X) are used to compute
+*> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
+*>
+*> YH: = 1 0 -y y -y X = 1 0 -x -x x
+*> 0 1 -y y -y 0 1 x -x -x
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1 0 0 0 0 1 0
+*> 0 0 0 0 1, 0 0 0 0 1 , where
+*>
+*> a, b, x and y will have all values independently of each other from
+*> { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZE
+*> \verbatim
+*> NSIZE is INTEGER
+*> The number of sizes of matrices to use. NSIZE must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIN will be
+*> tested. If it is not zero, then N = 5.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, AI, BI, Ao, and Bo.
+*> It must be at least 1 and at least NSIZE.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, B contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] AI
+*> \verbatim
+*> AI is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Copy of A, modified by ZGGEVX.
+*> \endverbatim
+*>
+*> \param[out] BI
+*> \verbatim
+*> BI is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> Copy of B, modified by ZGGEVX.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (NSIZE)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (NSIZE)
+*> \endverbatim
+*> \verbatim
+*> On exit, ALPHA/BETA are the eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> VL holds the left eigenvectors computed by ZGGEVX.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDA, NSIZE)
+*> VR holds the right eigenvectors computed by ZGGEVX.
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*> LSCALE is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*> RSCALE is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DTRU
+*> \verbatim
+*> DTRU is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] DIFTRU
+*> \verbatim
+*> DIFTRU is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> Leading dimension of WORK. LWORK >= 2*N*N + 2*N
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (6*N)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (LIWORK)
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*> LIWORK is INTEGER
+*> Leading dimension of IWORK. LIWORK >= N+2.
+*> \endverbatim
+*> \verbatim
+*>
+*> \param[out] RESULT
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRGVX( NSIZE, THRESH, NIN, NOUT, A, LDA, B, AI, BI,
$ ALPHA, BETA, VL, VR, ILO, IHI, LSCALE, RSCALE,
$ S, DTRU, DIF, DIFTRU, WORK, LWORK, RWORK,
$ IWORK, LIWORK, RESULT, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IHI, ILO, INFO, LDA, LIWORK, LWORK, NIN, NOUT,
@@ -22,164 +320,6 @@
$ VL( LDA, * ), VR( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRGVX checks the nonsymmetric generalized eigenvalue problem
-* expert driver ZGGEVX.
-*
-* ZGGEVX computes the generalized eigenvalues, (optionally) the left
-* and/or right eigenvectors, (optionally) computes a balancing
-* transformation to improve the conditioning, and (optionally)
-* reciprocal condition numbers for the eigenvalues and eigenvectors.
-*
-* When ZDRGVX is called with NSIZE > 0, two types of test matrix pairs
-* are generated by the subroutine DLATM6 and test the driver ZGGEVX.
-* The test matrices have the known exact condition numbers for
-* eigenvalues. For the condition numbers of the eigenvectors
-* corresponding the first and last eigenvalues are also know
-* ``exactly'' (see ZLATM6).
-* For each matrix pair, the following tests will be performed and
-* compared with the threshhold THRESH.
-*
-* (1) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* where l**H is the conjugate tranpose of l.
-*
-* (2) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* (3) The condition number S(i) of eigenvalues computed by ZGGEVX
-* differs less than a factor THRESH from the exact S(i) (see
-* ZLATM6).
-*
-* (4) DIF(i) computed by ZTGSNA differs less than a factor 10*THRESH
-* from the exact value (for the 1st and 5th vectors only).
-*
-* Test Matrices
-* =============
-*
-* Two kinds of test matrix pairs
-* (A, B) = inverse(YH) * (Da, Db) * inverse(X)
-* are used in the tests:
-*
-* 1: Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
-* 0 2+a 0 0 0 0 1 0 0 0
-* 0 0 3+a 0 0 0 0 1 0 0
-* 0 0 0 4+a 0 0 0 0 1 0
-* 0 0 0 0 5+a , 0 0 0 0 1 , and
-*
-* 2: Da = 1 -1 0 0 0 Db = 1 0 0 0 0
-* 1 1 0 0 0 0 1 0 0 0
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1+a 1+b 0 0 0 1 0
-* 0 0 0 -1-b 1+a , 0 0 0 0 1 .
-*
-* In both cases the same inverse(YH) and inverse(X) are used to compute
-* (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
-*
-* YH: = 1 0 -y y -y X = 1 0 -x -x x
-* 0 1 -y y -y 0 1 x -x -x
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1 0 0 0 0 1 0
-* 0 0 0 0 1, 0 0 0 0 1 , where
-*
-* a, b, x and y will have all values independently of each other from
-* { sqrt(sqrt(ULP)), 0.1, 1, 10, 1/sqrt(sqrt(ULP)) }.
-*
-* Arguments
-* =========
-*
-* NSIZE (input) INTEGER
-* The number of sizes of matrices to use. NSIZE must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIN will be
-* tested. If it is not zero, then N = 5.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIN (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, AI, BI, Ao, and Bo.
-* It must be at least 1 and at least NSIZE.
-*
-* B (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, B contains the last matrix actually used.
-*
-* AI (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Copy of A, modified by ZGGEVX.
-*
-* BI (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* Copy of B, modified by ZGGEVX.
-*
-* ALPHA (workspace) COMPLEX*16 array, dimension (NSIZE)
-* BETA (workspace) COMPLEX*16 array, dimension (NSIZE)
-* On exit, ALPHA/BETA are the eigenvalues.
-*
-* VL (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* VL holds the left eigenvectors computed by ZGGEVX.
-*
-* VR (workspace) COMPLEX*16 array, dimension (LDA, NSIZE)
-* VR holds the right eigenvectors computed by ZGGEVX.
-*
-* ILO (output/workspace) INTEGER
-*
-* IHI (output/workspace) INTEGER
-*
-* LSCALE (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RSCALE (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* S (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* DTRU (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* DIF (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* DIFTRU (output/workspace) DOUBLE PRECISION array, dimension (N)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* Leading dimension of WORK. LWORK >= 2*N*N + 2*N
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (6*N)
-*
-* IWORK (workspace) INTEGER array, dimension (LIWORK)
-*
-* LIWORK (input) INTEGER
-* Leading dimension of IWORK. LIWORK >= N+2.
-*
-* RESULT (output/workspace) DOUBLE PRECISION array, dimension (4)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrvbd.f b/TESTING/EIG/zdrvbd.f
index 3605cf75..fa6b8e04 100644
--- a/TESTING/EIG/zdrvbd.f
+++ b/TESTING/EIG/zdrvbd.f
@@ -1,11 +1,350 @@
+*> \brief \b ZDRVBD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVBD( NSIZES, MM, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* A, LDA, U, LDU, VT, LDVT, ASAV, USAV, VTSAV, S,
+* SSAV, E, WORK, LWORK, RWORK, IWORK, NOUNIT,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LDVT, LWORK, NOUNIT, NSIZES,
+* $ NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), MM( * ), NN( * )
+* DOUBLE PRECISION E( * ), RWORK( * ), S( * ), SSAV( * )
+* COMPLEX*16 A( LDA, * ), ASAV( LDA, * ), U( LDU, * ),
+* $ USAV( LDU, * ), VT( LDVT, * ),
+* $ VTSAV( LDVT, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVBD checks the singular value decomposition (SVD) driver ZGESVD
+*> and ZGESDD.
+*> ZGESVD and CGESDD factors A = U diag(S) VT, where U and VT are
+*> unitary and diag(S) is diagonal with the entries of the array S on
+*> its diagonal. The entries of S are the singular values, nonnegative
+*> and stored in decreasing order. U and VT can be optionally not
+*> computed, overwritten on A, or computed partially.
+*>
+*> A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN.
+*> U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
+*>
+*> When ZDRVBD is called, a number of matrix "sizes" (M's and N's)
+*> and a number of matrix "types" are specified. For each size (M,N)
+*> and each type of matrix, and for the minimal workspace as well as
+*> workspace adequate to permit blocking, an M x N matrix "A" will be
+*> generated and used to test the SVD routines. For each matrix, A will
+*> be factored as A = U diag(S) VT and the following 12 tests computed:
+*>
+*> Test for ZGESVD:
+*>
+*> (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (2) | I - U'U | / ( M ulp )
+*>
+*> (3) | I - VT VT' | / ( N ulp )
+*>
+*> (4) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
+*> computed U.
+*>
+*> (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
+*> computed VT.
+*>
+*> (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
+*> vector of singular values from the partial SVD
+*>
+*> Test for ZGESDD:
+*>
+*> (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
+*>
+*> (2) | I - U'U | / ( M ulp )
+*>
+*> (3) | I - VT VT' | / ( N ulp )
+*>
+*> (4) S contains MNMIN nonnegative values in decreasing order.
+*> (Return 0 if true, 1/ULP if false.)
+*>
+*> (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
+*> computed U.
+*>
+*> (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
+*> computed VT.
+*>
+*> (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
+*> vector of singular values from the partial SVD
+*>
+*> The "sizes" are specified by the arrays MM(1:NSIZES) and
+*> NN(1:NSIZES); the value of each element pair (MM(j),NN(j))
+*> specifies one size. The "types" are specified by a logical array
+*> DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j"
+*> will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A matrix of the form U D V, where U and V are unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*> (4) Same as (3), but multiplied by the underflow-threshold / ULP.
+*> (5) Same as (3), but multiplied by the overflow-threshold * ULP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZDRVBD does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*> MM is INTEGER array, dimension (NSIZES)
+*> An array containing the matrix "heights" to be used. For
+*> each j=1,...,NSIZES, if MM(j) is zero, then MM(j) and NN(j)
+*> will be ignored. The MM(j) values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the matrix "widths" to be used. For
+*> each j=1,...,NSIZES, if NN(j) is zero, then MM(j) and NN(j)
+*> will be ignored. The NN(j) values must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZDRVBD
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrices are in A and B.
+*> This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
+*> of type j will be generated. If NTYPES is smaller than the
+*> maximum number of types defined (PARAMETER MAXTYP), then
+*> types NTYPES+1 through MAXTYP will not be generated. If
+*> NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
+*> DOTYPE(NTYPES) will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRVBD to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,max(NN))
+*> Used to hold the matrix whose singular values are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( MM ).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,max(MM))
+*> Used to hold the computed matrix of right singular vectors.
+*> On exit, U contains the last such vectors actually computed.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. It must be at
+*> least 1 and at least max( MM ).
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*> VT is COMPLEX*16 array, dimension (LDVT,max(NN))
+*> Used to hold the computed matrix of left singular vectors.
+*> On exit, VT contains the last such vectors actually computed.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*> LDVT is INTEGER
+*> The leading dimension of VT. It must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (LDA,max(NN))
+*> Used to hold a different copy of the matrix whose singular
+*> values are to be computed. On exit, A contains the last
+*> matrix actually used.
+*> \endverbatim
+*>
+*> \param[out] USAV
+*> \verbatim
+*> USAV is COMPLEX*16 array, dimension (LDU,max(MM))
+*> Used to hold a different copy of the computed matrix of
+*> right singular vectors. On exit, USAV contains the last such
+*> vectors actually computed.
+*> \endverbatim
+*>
+*> \param[out] VTSAV
+*> \verbatim
+*> VTSAV is COMPLEX*16 array, dimension (LDVT,max(NN))
+*> Used to hold a different copy of the computed matrix of
+*> left singular vectors. On exit, VTSAV contains the last such
+*> vectors actually computed.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (max(min(MM,NN)))
+*> Contains the computed singular values.
+*> \endverbatim
+*>
+*> \param[out] SSAV
+*> \verbatim
+*> SSAV is DOUBLE PRECISION array, dimension (max(min(MM,NN)))
+*> Contains another copy of the computed singular values.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (max(min(MM,NN)))
+*> Workspace for ZGESVD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> MAX(3*MIN(M,N)+MAX(M,N)**2,5*MIN(M,N),3*MAX(M,N)) for all
+*> pairs (M,N)=(MM(j),NN(j))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension ( 5*max(max(MM,NN)) )
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension at least 8*min(M,N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (7)
+*> The values computed by the 7 tests described above.
+*> The values are currently limited to 1/ULP, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some MM(j) < 0
+*> -3: Some NN(j) < 0
+*> -4: NTYPES < 0
+*> -7: THRESH < 0
+*> -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
+*> -12: LDU < 1 or LDU < MMAX.
+*> -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).
+*> -21: LWORK too small.
+*> If ZLATMS, or ZGESVD returns an error code, the
+*> absolute value of it is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRVBD( NSIZES, MM, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ A, LDA, U, LDU, VT, LDVT, ASAV, USAV, VTSAV, S,
$ SSAV, E, WORK, LWORK, RWORK, IWORK, NOUNIT,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LDVT, LWORK, NOUNIT, NSIZES,
@@ -21,218 +360,6 @@
$ VTSAV( LDVT, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVBD checks the singular value decomposition (SVD) driver ZGESVD
-* and ZGESDD.
-* ZGESVD and CGESDD factors A = U diag(S) VT, where U and VT are
-* unitary and diag(S) is diagonal with the entries of the array S on
-* its diagonal. The entries of S are the singular values, nonnegative
-* and stored in decreasing order. U and VT can be optionally not
-* computed, overwritten on A, or computed partially.
-*
-* A is M by N. Let MNMIN = min( M, N ). S has dimension MNMIN.
-* U can be M by M or M by MNMIN. VT can be N by N or MNMIN by N.
-*
-* When ZDRVBD is called, a number of matrix "sizes" (M's and N's)
-* and a number of matrix "types" are specified. For each size (M,N)
-* and each type of matrix, and for the minimal workspace as well as
-* workspace adequate to permit blocking, an M x N matrix "A" will be
-* generated and used to test the SVD routines. For each matrix, A will
-* be factored as A = U diag(S) VT and the following 12 tests computed:
-*
-* Test for ZGESVD:
-*
-* (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (2) | I - U'U | / ( M ulp )
-*
-* (3) | I - VT VT' | / ( N ulp )
-*
-* (4) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
-* computed U.
-*
-* (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
-* computed VT.
-*
-* (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
-* vector of singular values from the partial SVD
-*
-* Test for ZGESDD:
-*
-* (1) | A - U diag(S) VT | / ( |A| max(M,N) ulp )
-*
-* (2) | I - U'U | / ( M ulp )
-*
-* (3) | I - VT VT' | / ( N ulp )
-*
-* (4) S contains MNMIN nonnegative values in decreasing order.
-* (Return 0 if true, 1/ULP if false.)
-*
-* (5) | U - Upartial | / ( M ulp ) where Upartial is a partially
-* computed U.
-*
-* (6) | VT - VTpartial | / ( N ulp ) where VTpartial is a partially
-* computed VT.
-*
-* (7) | S - Spartial | / ( MNMIN ulp |S| ) where Spartial is the
-* vector of singular values from the partial SVD
-*
-* The "sizes" are specified by the arrays MM(1:NSIZES) and
-* NN(1:NSIZES); the value of each element pair (MM(j),NN(j))
-* specifies one size. The "types" are specified by a logical array
-* DOTYPE( 1:NTYPES ); if DOTYPE(j) is .TRUE., then matrix type "j"
-* will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A matrix of the form U D V, where U and V are unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-* (4) Same as (3), but multiplied by the underflow-threshold / ULP.
-* (5) Same as (3), but multiplied by the overflow-threshold * ULP.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZDRVBD does nothing. It must be at least zero.
-*
-* MM (input) INTEGER array, dimension (NSIZES)
-* An array containing the matrix "heights" to be used. For
-* each j=1,...,NSIZES, if MM(j) is zero, then MM(j) and NN(j)
-* will be ignored. The MM(j) values must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the matrix "widths" to be used. For
-* each j=1,...,NSIZES, if NN(j) is zero, then MM(j) and NN(j)
-* will be ignored. The NN(j) values must be at least zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZDRVBD
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrices are in A and B.
-* This is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size (m,n), a matrix
-* of type j will be generated. If NTYPES is smaller than the
-* maximum number of types defined (PARAMETER MAXTYP), then
-* types NTYPES+1 through MAXTYP will not be generated. If
-* NTYPES is larger than MAXTYP, DOTYPE(MAXTYP+1) through
-* DOTYPE(NTYPES) will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRVBD to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (output) COMPLEX*16 array, dimension (LDA,max(NN))
-* Used to hold the matrix whose singular values are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( MM ).
-*
-* U (output) COMPLEX*16 array, dimension (LDU,max(MM))
-* Used to hold the computed matrix of right singular vectors.
-* On exit, U contains the last such vectors actually computed.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. It must be at
-* least 1 and at least max( MM ).
-*
-* VT (output) COMPLEX*16 array, dimension (LDVT,max(NN))
-* Used to hold the computed matrix of left singular vectors.
-* On exit, VT contains the last such vectors actually computed.
-*
-* LDVT (input) INTEGER
-* The leading dimension of VT. It must be at
-* least 1 and at least max( NN ).
-*
-* ASAV (output) COMPLEX*16 array, dimension (LDA,max(NN))
-* Used to hold a different copy of the matrix whose singular
-* values are to be computed. On exit, A contains the last
-* matrix actually used.
-*
-* USAV (output) COMPLEX*16 array, dimension (LDU,max(MM))
-* Used to hold a different copy of the computed matrix of
-* right singular vectors. On exit, USAV contains the last such
-* vectors actually computed.
-*
-* VTSAV (output) COMPLEX*16 array, dimension (LDVT,max(NN))
-* Used to hold a different copy of the computed matrix of
-* left singular vectors. On exit, VTSAV contains the last such
-* vectors actually computed.
-*
-* S (output) DOUBLE PRECISION array, dimension (max(min(MM,NN)))
-* Contains the computed singular values.
-*
-* SSAV (output) DOUBLE PRECISION array, dimension (max(min(MM,NN)))
-* Contains another copy of the computed singular values.
-*
-* E (output) DOUBLE PRECISION array, dimension (max(min(MM,NN)))
-* Workspace for ZGESVD.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* MAX(3*MIN(M,N)+MAX(M,N)**2,5*MIN(M,N),3*MAX(M,N)) for all
-* pairs (M,N)=(MM(j),NN(j))
-*
-* RWORK (workspace) DOUBLE PRECISION array,
-* dimension ( 5*max(max(MM,NN)) )
-*
-* IWORK (workspace) INTEGER array, dimension at least 8*min(M,N)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (7)
-* The values computed by the 7 tests described above.
-* The values are currently limited to 1/ULP, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some MM(j) < 0
-* -3: Some NN(j) < 0
-* -4: NTYPES < 0
-* -7: THRESH < 0
-* -10: LDA < 1 or LDA < MMAX, where MMAX is max( MM(j) ).
-* -12: LDU < 1 or LDU < MMAX.
-* -14: LDVT < 1 or LDVT < NMAX, where NMAX is max( NN(j) ).
-* -21: LWORK too small.
-* If ZLATMS, or ZGESVD returns an error code, the
-* absolute value of it is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrves.f b/TESTING/EIG/zdrves.f
index d0becd53..ab14b840 100644
--- a/TESTING/EIG/zdrves.f
+++ b/TESTING/EIG/zdrves.f
@@ -1,10 +1,387 @@
+*> \brief \b ZDRVES
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, HT, W, WT, VS, LDVS, RESULT,
+* WORK, NWORK, RWORK, IWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION RESULT( 13 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ VS( LDVS, * ), W( * ), WORK( * ), WT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVES checks the nonsymmetric eigenvalue (Schur form) problem
+*> driver ZGEES.
+*>
+*> When ZDRVES is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 13
+*> tests will be performed:
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZDRVES does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZDRVES
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRVES to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by ZGEES.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Yet another copy of the test matrix A, modified by ZGEES.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (max(NN))
+*> The computed eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] WT
+*> \verbatim
+*> WT is COMPLEX*16 array, dimension (max(NN))
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when ZGEES only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX*16 array, dimension (LDVS, max(NN))
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (13)
+*> The values computed by the 13 tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 5*NN(j)+2*NN(j)**2 for all j.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -15: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ).
+*> -18: NWORK too small.
+*> If ZLATMR, CLATMS, CLATME or ZGEES returns an error code,
+*> the absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Select whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRVES( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, HT, W, WT, VS, LDVS, RESULT,
$ WORK, NWORK, RWORK, IWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDVS, NOUNIT, NSIZES, NTYPES, NWORK
@@ -18,271 +395,6 @@
$ VS( LDVS, * ), W( * ), WORK( * ), WT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVES checks the nonsymmetric eigenvalue (Schur form) problem
-* driver ZGEES.
-*
-* When ZDRVES is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 13
-* tests will be performed:
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZDRVES does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZDRVES
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRVES to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max( NN ).
-*
-* H (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by ZGEES.
-*
-* HT (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Yet another copy of the test matrix A, modified by ZGEES.
-*
-* W (workspace) COMPLEX*16 array, dimension (max(NN))
-* The computed eigenvalues of A.
-*
-* WT (workspace) COMPLEX*16 array, dimension (max(NN))
-* Like W, this array contains the eigenvalues of A,
-* but those computed when ZGEES only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* VS (workspace) COMPLEX*16 array, dimension (LDVS, max(NN))
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1,max(NN)).
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (13)
-* The values computed by the 13 tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 5*NN(j)+2*NN(j)**2 for all j.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(NN))
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -15: LDVS < 1 or LDVS < NMAX, where NMAX is max( NN(j) ).
-* -18: NWORK too small.
-* If ZLATMR, CLATMS, CLATME or ZGEES returns an error code,
-* the absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Select whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrvev.f b/TESTING/EIG/zdrvev.f
index 281b976d..227b4e1a 100644
--- a/TESTING/EIG/zdrvev.f
+++ b/TESTING/EIG/zdrvev.f
@@ -1,11 +1,407 @@
+*> \brief \b ZDRVEV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, H, W, W1, VL, LDVL, VR, LDVR,
+* LRE, LDLRE, RESULT, WORK, NWORK, RWORK, IWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NOUNIT, NSIZES,
+* $ NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION RESULT( 7 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), W( * ), W1( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVEV checks the nonsymmetric eigenvalue problem driver ZGEEV.
+*>
+*> When ZDRVEV is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 7
+*> tests will be performed:
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a diagonal matrix with diagonal entries W(j).
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate-transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and whether largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and whether largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) W(full) = W(partial)
+*>
+*> W(full) denotes the eigenvalues computed when both VR and VL
+*> are also computed, and W(partial) denotes the eigenvalues
+*> computed when only W, only W and VR, or only W and VL are
+*> computed.
+*>
+*> (6) VR(full) = VR(partial)
+*>
+*> VR(full) denotes the right eigenvectors computed when both VR
+*> and VL are computed, and VR(partial) denotes the result
+*> when only VR is computed.
+*>
+*> (7) VL(full) = VL(partial)
+*>
+*> VL(full) denotes the left eigenvectors computed when both VR
+*> and VL are also computed, and VL(partial) denotes the result
+*> when only VL is computed.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random complex
+*> angles on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is unitary and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from |z| < 1
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZDRVEV does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZDRVEV
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRVEV to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max(NN).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by ZGEEV.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (max(NN))
+*> The eigenvalues of A. On exit, W are the eigenvalues of
+*> the matrix in A.
+*> \endverbatim
+*>
+*> \param[out] W1
+*> \verbatim
+*> W1 is COMPLEX*16 array, dimension (max(NN))
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when ZGEEV only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL, max(NN))
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR, max(NN))
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is COMPLEX*16 array, dimension (LDLRE, max(NN))
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (7)
+*> The values computed by the seven tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 5*NN(j)+2*NN(j)**2 for all j.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*max(NN))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -6: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -14: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ).
+*> -18: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ).
+*> -21: NWORK too small.
+*> If ZLATMR, CLATMS, CLATME or ZGEEV returns an error code,
+*> the absolute value of it is returned.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRVEV( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, H, W, W1, VL, LDVL, VR, LDVR,
$ LRE, LDLRE, RESULT, WORK, NWORK, RWORK, IWORK,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NOUNIT, NSIZES,
@@ -21,276 +417,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVEV checks the nonsymmetric eigenvalue problem driver ZGEEV.
-*
-* When ZDRVEV is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 7
-* tests will be performed:
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a diagonal matrix with diagonal entries W(j).
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate-transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and whether largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and whether largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) W(full) = W(partial)
-*
-* W(full) denotes the eigenvalues computed when both VR and VL
-* are also computed, and W(partial) denotes the eigenvalues
-* computed when only W, only W and VR, or only W and VL are
-* computed.
-*
-* (6) VR(full) = VR(partial)
-*
-* VR(full) denotes the right eigenvectors computed when both VR
-* and VL are computed, and VR(partial) denotes the result
-* when only VR is computed.
-*
-* (7) VL(full) = VL(partial)
-*
-* VL(full) denotes the left eigenvectors computed when both VR
-* and VL are also computed, and VL(partial) denotes the result
-* when only VL is computed.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random complex
-* angles on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is unitary and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from |z| < 1
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZDRVEV does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZDRVEV
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRVEV to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max(NN).
-*
-* H (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by ZGEEV.
-*
-* W (workspace) COMPLEX*16 array, dimension (max(NN))
-* The eigenvalues of A. On exit, W are the eigenvalues of
-* the matrix in A.
-*
-* W1 (workspace) COMPLEX*16 array, dimension (max(NN))
-* Like W, this array contains the eigenvalues of A,
-* but those computed when ZGEEV only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) COMPLEX*16 array, dimension (LDVL, max(NN))
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,max(NN)).
-*
-* VR (workspace) COMPLEX*16 array, dimension (LDVR, max(NN))
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,max(NN)).
-*
-* LRE (workspace) COMPLEX*16 array, dimension (LDLRE, max(NN))
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,max(NN)).
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (7)
-* The values computed by the seven tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 5*NN(j)+2*NN(j)**2 for all j.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*max(NN))
-*
-* IWORK (workspace) INTEGER array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -6: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -14: LDVL < 1 or LDVL < NMAX, where NMAX is max( NN(j) ).
-* -16: LDVR < 1 or LDVR < NMAX, where NMAX is max( NN(j) ).
-* -18: LDLRE < 1 or LDLRE < NMAX, where NMAX is max( NN(j) ).
-* -21: NWORK too small.
-* If ZLATMR, CLATMS, CLATME or ZGEEV returns an error code,
-* the absolute value of it is returned.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrvgg.f b/TESTING/EIG/zdrvgg.f
index 0741d027..26c6b430 100644
--- a/TESTING/EIG/zdrvgg.f
+++ b/TESTING/EIG/zdrvgg.f
@@ -1,11 +1,435 @@
+*> \brief \b ZDRVGG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* THRSHN, NOUNIT, A, LDA, B, S, T, S2, T2, Q,
+* LDQ, Z, ALPHA1, BETA1, ALPHA2, BETA2, VL, VR,
+* WORK, LWORK, RWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
+* DOUBLE PRECISION THRESH, THRSHN
+* ..
+* .. Array Arguments ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVGG checks the nonsymmetric generalized eigenvalue driver
+*> routines.
+*> T T T
+*> ZGEGS factors A and B as Q S Z and Q T Z , where means
+*> transpose, T is upper triangular, S is in generalized Schur form
+*> (upper triangular), and Q and Z are unitary. It also
+*> computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)), where alpha(j)=S(j,j) and beta(j)=T(j,j) --
+*> thus, w(j) = alpha(j)/beta(j) is a root of the generalized
+*> eigenvalue problem
+*>
+*> det( A - w(j) B ) = 0
+*>
+*> and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
+*> problem
+*>
+*> det( m(j) A - B ) = 0
+*>
+*> ZGEGV computes the generalized eigenvalues (alpha(1),beta(1)), ...,
+*> (alpha(n),beta(n)), the matrix L whose columns contain the
+*> generalized left eigenvectors l, and the matrix R whose columns
+*> contain the generalized right eigenvectors r for the pair (A,B).
+*>
+*> When ZDRVGG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 7
+*> tests will be performed and compared with the threshhold THRESH:
+*>
+*> Results from ZGEGS:
+*>
+*> H
+*> (1) | A - Q S Z | / ( |A| n ulp )
+*>
+*> H
+*> (2) | B - Q T Z | / ( |B| n ulp )
+*>
+*> H
+*> (3) | I - QQ | / ( n ulp )
+*>
+*> H
+*> (4) | I - ZZ | / ( n ulp )
+*>
+*> (5) maximum over j of D(j) where:
+*>
+*> |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
+*> D(j) = ------------------------ + -----------------------
+*> max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
+*>
+*> Results from ZGEGV:
+*>
+*> (6) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
+*>
+*> | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> where l**H is the conjugate tranpose of l.
+*>
+*> (7) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
+*>
+*> | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
+*>
+*> Test Matrices
+*> ---- --------
+*>
+*> The sizes of the test matrices are specified by an array
+*> NN(1:NSIZES); the value of each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
+*> DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) ( 0, 0 ) (a pair of zero matrices)
+*>
+*> (2) ( I, 0 ) (an identity and a zero matrix)
+*>
+*> (3) ( 0, I ) (an identity and a zero matrix)
+*>
+*> (4) ( I, I ) (a pair of identity matrices)
+*>
+*> t t
+*> (5) ( J , J ) (a pair of transposed Jordan blocks)
+*>
+*> t ( I 0 )
+*> (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
+*> ( 0 I ) ( 0 J )
+*> and I is a k x k identity and J a (k+1)x(k+1)
+*> Jordan block; k=(N-1)/2
+*>
+*> (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
+*> matrix with those diagonal entries.)
+*> (8) ( I, D )
+*>
+*> (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
+*>
+*> (10) ( small*D, big*I )
+*>
+*> (11) ( big*I, small*D )
+*>
+*> (12) ( small*I, big*D )
+*>
+*> (13) ( big*D, big*I )
+*>
+*> (14) ( small*D, small*I )
+*>
+*> (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
+*> D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
+*> t t
+*> (16) Q ( J , J ) Z where Q and Z are random unitary matrices.
+*>
+*> (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
+*> with random O(1) entries above the diagonal
+*> and diagonal entries diag(T1) =
+*> ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
+*> ( 0, N-3, N-4,..., 1, 0, 0 )
+*>
+*> (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
+*> s = machine precision.
+*>
+*> (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
+*>
+*> N-5
+*> (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*>
+*> (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
+*> diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
+*> where r1,..., r(N-4) are random.
+*>
+*> (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
+*> diag(T2) = ( 0, 1, ..., 1, 0, 0 )
+*>
+*> (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
+*> matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZDRVGG does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZDRVGG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRVGG to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error is
+*> scaled to be O(1), so THRESH should be a reasonably small
+*> multiple of 1, e.g., 10 or 100. In particular, it should
+*> not depend on the precision (single vs. double) or the size
+*> of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] THRSHN
+*> \verbatim
+*> THRSHN is DOUBLE PRECISION
+*> Threshhold for reporting eigenvector normalization error.
+*> If the normalization of any eigenvector differs from 1 by
+*> more than THRSHN*ulp, then a special error message will be
+*> printed. (This is handled separately from the other tests,
+*> since only a compiler or programming error should cause an
+*> error message, at least if THRSHN is at least 5--10.)
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Used to hold the original A matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, S, T, S2, and T2.
+*> It must be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Used to hold the original B matrix. Used as input only
+*> if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
+*> DOTYPE(MAXTYP+1)=.TRUE.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from A by ZGEGS.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The upper triangular matrix computed from B by ZGEGS.
+*> \endverbatim
+*>
+*> \param[out] S2
+*> \verbatim
+*> S2 is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The matrix computed from A by ZGEGV. This will be the
+*> Schur (upper triangular) form of some matrix related to A,
+*> but will not, in general, be the same as S.
+*> \endverbatim
+*>
+*> \param[out] T2
+*> \verbatim
+*> T2 is COMPLEX*16 array, dimension (LDA, max(NN))
+*> The matrix computed from B by ZGEGV. This will be the
+*> Schur form of some matrix related to B, but will not, in
+*> general, be the same as T.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ, max(NN))
+*> The (left) unitary matrix computed by ZGEGS.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of Q, Z, VL, and VR. It must
+*> be at least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDQ, max(NN))
+*> The (right) unitary matrix computed by ZGEGS.
+*> \endverbatim
+*>
+*> \param[out] ALPHA1
+*> \verbatim
+*> ALPHA1 is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA1
+*> \verbatim
+*> BETA1 is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by ZGEGS.
+*> ALPHA1(k) / BETA1(k) is the k-th generalized eigenvalue of
+*> the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] ALPHA2
+*> \verbatim
+*> ALPHA2 is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BETA2
+*> \verbatim
+*> BETA2 is COMPLEX*16 array, dimension (max(NN))
+*> \endverbatim
+*> \verbatim
+*> The generalized eigenvalues of (A,B) computed by ZGEGV.
+*> ALPHA2(k) / BETA2(k) is the k-th generalized eigenvalue of
+*> the matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDQ, max(NN))
+*> The (lower triangular) left eigenvector matrix for the
+*> matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDQ, max(NN))
+*> The (upper triangular) right eigenvector matrix for the
+*> matrices in A and B.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> MAX( 2*N, N*(NB+1), (k+1)*(2*k+N+1) ), where "k" is the
+*> sum of the blocksize and number-of-shifts for ZHGEQZ, and
+*> NB is the greatest of the blocksizes for ZGEQRF, ZUNMQR,
+*> and ZUNGQR. (The blocksizes and the number-of-shifts are
+*> retrieved through calls to ILAENV.)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (7)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value.
+*> > 0: A routine returned an error code. INFO is the
+*> absolute value of the INFO value returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRVGG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ THRSHN, NOUNIT, A, LDA, B, S, T, S2, T2, Q,
$ LDQ, Z, ALPHA1, BETA1, ALPHA2, BETA2, VL, VR,
$ WORK, LWORK, RWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDQ, LWORK, NOUNIT, NSIZES, NTYPES
@@ -13,296 +437,6 @@
* ..
* .. Array Arguments ..
*
-* Purpose
-* =======
-*
-* ZDRVGG checks the nonsymmetric generalized eigenvalue driver
-* routines.
-* T T T
-* ZGEGS factors A and B as Q S Z and Q T Z , where means
-* transpose, T is upper triangular, S is in generalized Schur form
-* (upper triangular), and Q and Z are unitary. It also
-* computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)), where alpha(j)=S(j,j) and beta(j)=T(j,j) --
-* thus, w(j) = alpha(j)/beta(j) is a root of the generalized
-* eigenvalue problem
-*
-* det( A - w(j) B ) = 0
-*
-* and m(j) = beta(j)/alpha(j) is a root of the essentially equivalent
-* problem
-*
-* det( m(j) A - B ) = 0
-*
-* ZGEGV computes the generalized eigenvalues (alpha(1),beta(1)), ...,
-* (alpha(n),beta(n)), the matrix L whose columns contain the
-* generalized left eigenvectors l, and the matrix R whose columns
-* contain the generalized right eigenvectors r for the pair (A,B).
-*
-* When ZDRVGG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 7
-* tests will be performed and compared with the threshhold THRESH:
-*
-* Results from ZGEGS:
-*
-* H
-* (1) | A - Q S Z | / ( |A| n ulp )
-*
-* H
-* (2) | B - Q T Z | / ( |B| n ulp )
-*
-* H
-* (3) | I - QQ | / ( n ulp )
-*
-* H
-* (4) | I - ZZ | / ( n ulp )
-*
-* (5) maximum over j of D(j) where:
-*
-* |alpha(j) - S(j,j)| |beta(j) - T(j,j)|
-* D(j) = ------------------------ + -----------------------
-* max(|alpha(j)|,|S(j,j)|) max(|beta(j)|,|T(j,j)|)
-*
-* Results from ZGEGV:
-*
-* (6) max over all left eigenvalue/-vector pairs (beta/alpha,l) of
-*
-* | l**H * (beta A - alpha B) | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* where l**H is the conjugate tranpose of l.
-*
-* (7) max over all right eigenvalue/-vector pairs (beta/alpha,r) of
-*
-* | (beta A - alpha B) r | / ( ulp max( |beta A|, |alpha B| ) )
-*
-* Test Matrices
-* ---- --------
-*
-* The sizes of the test matrices are specified by an array
-* NN(1:NSIZES); the value of each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES ); if
-* DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) ( 0, 0 ) (a pair of zero matrices)
-*
-* (2) ( I, 0 ) (an identity and a zero matrix)
-*
-* (3) ( 0, I ) (an identity and a zero matrix)
-*
-* (4) ( I, I ) (a pair of identity matrices)
-*
-* t t
-* (5) ( J , J ) (a pair of transposed Jordan blocks)
-*
-* t ( I 0 )
-* (6) ( X, Y ) where X = ( J 0 ) and Y = ( t )
-* ( 0 I ) ( 0 J )
-* and I is a k x k identity and J a (k+1)x(k+1)
-* Jordan block; k=(N-1)/2
-*
-* (7) ( D, I ) where D is diag( 0, 1,..., N-1 ) (a diagonal
-* matrix with those diagonal entries.)
-* (8) ( I, D )
-*
-* (9) ( big*D, small*I ) where "big" is near overflow and small=1/big
-*
-* (10) ( small*D, big*I )
-*
-* (11) ( big*I, small*D )
-*
-* (12) ( small*I, big*D )
-*
-* (13) ( big*D, big*I )
-*
-* (14) ( small*D, small*I )
-*
-* (15) ( D1, D2 ) where D1 is diag( 0, 0, 1, ..., N-3, 0 ) and
-* D2 is diag( 0, N-3, N-4,..., 1, 0, 0 )
-* t t
-* (16) Q ( J , J ) Z where Q and Z are random unitary matrices.
-*
-* (17) Q ( T1, T2 ) Z where T1 and T2 are upper triangular matrices
-* with random O(1) entries above the diagonal
-* and diagonal entries diag(T1) =
-* ( 0, 0, 1, ..., N-3, 0 ) and diag(T2) =
-* ( 0, N-3, N-4,..., 1, 0, 0 )
-*
-* (18) Q ( T1, T2 ) Z diag(T1) = ( 0, 0, 1, 1, s, ..., s, 0 )
-* diag(T2) = ( 0, 1, 0, 1,..., 1, 0 )
-* s = machine precision.
-*
-* (19) Q ( T1, T2 ) Z diag(T1)=( 0,0,1,1, 1-d, ..., 1-(N-5)*d=s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0 )
-*
-* N-5
-* (20) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, 1, a, ..., a =s, 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-*
-* (21) Q ( T1, T2 ) Z diag(T1)=( 0, 0, 1, r1, r2, ..., r(N-4), 0 )
-* diag(T2) = ( 0, 1, 0, 1, ..., 1, 0, 0 )
-* where r1,..., r(N-4) are random.
-*
-* (22) Q ( big*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (23) Q ( small*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (24) Q ( small*T1, small*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (25) Q ( big*T1, big*T2 ) Z diag(T1) = ( 0, 0, 1, ..., N-3, 0 )
-* diag(T2) = ( 0, 1, ..., 1, 0, 0 )
-*
-* (26) Q ( T1, T2 ) Z where T1 and T2 are random upper-triangular
-* matrices.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZDRVGG does nothing. It must be at least zero.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. If it is zero, ZDRVGG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRVGG to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error is
-* scaled to be O(1), so THRESH should be a reasonably small
-* multiple of 1, e.g., 10 or 100. In particular, it should
-* not depend on the precision (single vs. double) or the size
-* of the matrix. It must be at least zero.
-*
-* THRSHN (input) DOUBLE PRECISION
-* Threshhold for reporting eigenvector normalization error.
-* If the normalization of any eigenvector differs from 1 by
-* more than THRSHN*ulp, then a special error message will be
-* printed. (This is handled separately from the other tests,
-* since only a compiler or programming error should cause an
-* error message, at least if THRSHN is at least 5--10.)
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-*
-* A (input/workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Used to hold the original A matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, B, S, T, S2, and T2.
-* It must be at least 1 and at least max( NN ).
-*
-* B (input/workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Used to hold the original B matrix. Used as input only
-* if NTYPES=MAXTYP+1, DOTYPE(1:MAXTYP)=.FALSE., and
-* DOTYPE(MAXTYP+1)=.TRUE.
-*
-* S (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from A by ZGEGS.
-*
-* T (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The upper triangular matrix computed from B by ZGEGS.
-*
-* S2 (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The matrix computed from A by ZGEGV. This will be the
-* Schur (upper triangular) form of some matrix related to A,
-* but will not, in general, be the same as S.
-*
-* T2 (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* The matrix computed from B by ZGEGV. This will be the
-* Schur form of some matrix related to B, but will not, in
-* general, be the same as T.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDQ, max(NN))
-* The (left) unitary matrix computed by ZGEGS.
-*
-* LDQ (input) INTEGER
-* The leading dimension of Q, Z, VL, and VR. It must
-* be at least 1 and at least max( NN ).
-*
-* Z (workspace) COMPLEX*16 array, dimension (LDQ, max(NN))
-* The (right) unitary matrix computed by ZGEGS.
-*
-* ALPHA1 (workspace) COMPLEX*16 array, dimension (max(NN))
-* BETA1 (workspace) COMPLEX*16 array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by ZGEGS.
-* ALPHA1(k) / BETA1(k) is the k-th generalized eigenvalue of
-* the matrices in A and B.
-*
-* ALPHA2 (workspace) COMPLEX*16 array, dimension (max(NN))
-* BETA2 (workspace) COMPLEX*16 array, dimension (max(NN))
-* The generalized eigenvalues of (A,B) computed by ZGEGV.
-* ALPHA2(k) / BETA2(k) is the k-th generalized eigenvalue of
-* the matrices in A and B.
-*
-* VL (workspace) COMPLEX*16 array, dimension (LDQ, max(NN))
-* The (lower triangular) left eigenvector matrix for the
-* matrices in A and B.
-*
-* VR (workspace) COMPLEX*16 array, dimension (LDQ, max(NN))
-* The (upper triangular) right eigenvector matrix for the
-* matrices in A and B.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* MAX( 2*N, N*(NB+1), (k+1)*(2*k+N+1) ), where "k" is the
-* sum of the blocksize and number-of-shifts for ZHGEQZ, and
-* NB is the greatest of the blocksizes for ZGEQRF, ZUNMQR,
-* and ZUNGQR. (The blocksizes and the number-of-shifts are
-* retrieved through calls to ILAENV.)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (8*N)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (7)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value.
-* > 0: A routine returned an error code. INFO is the
-* absolute value of the INFO value returned.
-*
* =====================================================================
*
LOGICAL DOTYPE( * )
diff --git a/TESTING/EIG/zdrvsg.f b/TESTING/EIG/zdrvsg.f
index d406b855..10cb0b37 100644
--- a/TESTING/EIG/zdrvsg.f
+++ b/TESTING/EIG/zdrvsg.f
@@ -1,20 +1,409 @@
+*> \brief \b ZDRVSG
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
+* BP, WORK, NWORK, RWORK, LRWORK, IWORK, LIWORK,
+* RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LDZ, LIWORK, LRWORK, NOUNIT,
+* $ NSIZES, NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION D( * ), RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AB( LDA, * ), AP( * ),
+* $ B( LDB, * ), BB( LDB, * ), BP( * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVSG checks the complex Hermitian generalized eigenproblem
+*> drivers.
+*>
+*> ZHEGV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem.
+*>
+*> ZHEGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem using a divide and conquer algorithm.
+*>
+*> ZHEGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem.
+*>
+*> ZHPGV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem in packed storage.
+*>
+*> ZHPGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem in packed storage using a divide and
+*> conquer algorithm.
+*>
+*> ZHPGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite generalized
+*> eigenproblem in packed storage.
+*>
+*> ZHBGV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite banded
+*> generalized eigenproblem.
+*>
+*> ZHBGVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite banded
+*> generalized eigenproblem using a divide and conquer
+*> algorithm.
+*>
+*> ZHBGVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian-definite banded
+*> generalized eigenproblem.
+*>
+*> When ZDRVSG is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix A of the given type will be
+*> generated; a random well-conditioned matrix B is also generated
+*> and the pair (A,B) is used to test the drivers.
+*>
+*> For each pair (A,B), the following tests are performed:
+*>
+*> (1) ZHEGV with ITYPE = 1 and UPLO ='U':
+*>
+*> | A Z - B Z D | / ( |A| |Z| n ulp )
+*>
+*> (2) as (1) but calling ZHPGV
+*> (3) as (1) but calling ZHBGV
+*> (4) as (1) but with UPLO = 'L'
+*> (5) as (4) but calling ZHPGV
+*> (6) as (4) but calling ZHBGV
+*>
+*> (7) ZHEGV with ITYPE = 2 and UPLO ='U':
+*>
+*> | A B Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> (8) as (7) but calling ZHPGV
+*> (9) as (7) but with UPLO = 'L'
+*> (10) as (9) but calling ZHPGV
+*>
+*> (11) ZHEGV with ITYPE = 3 and UPLO ='U':
+*>
+*> | B A Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> (12) as (11) but calling ZHPGV
+*> (13) as (11) but with UPLO = 'L'
+*> (14) as (13) but calling ZHPGV
+*>
+*> ZHEGVD, ZHPGVD and ZHBGVD performed the same 14 tests.
+*>
+*> ZHEGVX, ZHPGVX and ZHBGVX performed the above 14 tests with
+*> the parameter RANGE = 'A', 'N' and 'I', respectively.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> This type is used for the matrix A which has half-bandwidth KA.
+*> B is generated as a well-conditioned positive definite matrix
+*> with half-bandwidth KB (<= KA).
+*> Currently, the list of possible types for A is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is unitary and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is unitary and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Hermitian matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*>
+*> (16) Same as (8), but with KA = 1 and KB = 1
+*> (17) Same as (8), but with KA = 2 and KB = 1
+*> (18) Same as (8), but with KA = 2 and KB = 2
+*> (19) Same as (8), but with KA = 3 and KB = 1
+*> (20) Same as (8), but with KA = 3 and KB = 2
+*> (21) Same as (8), but with KA = 3 and KB = 3
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZDRVSG does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZDRVSG
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRVSG to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A COMPLEX*16 array, dimension (LDA , max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> B COMPLEX*16 array, dimension (LDB , max(NN))
+*> Used to hold the Hermitian positive definite matrix for
+*> the generailzed problem.
+*> On exit, B contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDB INTEGER
+*> The leading dimension of B. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues of A. On exit, the eigenvalues in D
+*> correspond with the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z COMPLEX*16 array, dimension (LDZ, max(NN))
+*> The matrix of eigenvectors.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDZ INTEGER
+*> The leading dimension of ZZ. It must be at least 1 and
+*> at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> AB COMPLEX*16 array, dimension (LDA, max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> BB COMPLEX*16 array, dimension (LDB, max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> AP COMPLEX*16 array, dimension (max(NN)**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> BP COMPLEX*16 array, dimension (max(NN)**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK COMPLEX*16 array, dimension (NWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> NWORK INTEGER
+*> The number of entries in WORK. This must be at least
+*> 2*N + N**2 where N = max( NN(j), 2 ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RWORK DOUBLE PRECISION array, dimension (LRWORK)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LRWORK INTEGER
+*> The number of entries in RWORK. This must be at least
+*> max( 7*N, 1 + 4*N + 2*N*lg(N) + 3*N**2 ) where
+*> N = max( NN(j) ) and lg( N ) = smallest integer k such
+*> that 2**k >= N .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> IWORK INTEGER array, dimension (LIWORK))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LIWORK INTEGER
+*> The number of entries in IWORK. This must be at least
+*> 2 + 5*max( NN(j) ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT DOUBLE PRECISION array, dimension (70)
+*> The values computed by the 70 tests described above.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDZ < 1 or LDZ < NMAX.
+*> -21: NWORK too small.
+*> -23: LRWORK too small.
+*> -25: LIWORK too small.
+*> If ZLATMR, CLATMS, ZHEGV, ZHPGV, ZHBGV, CHEGVD, CHPGVD,
+*> ZHPGVD, ZHEGVX, CHPGVX, ZHBGVX returns an error code,
+*> the absolute value of it is returned.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests that have been run
+*> on this matrix.
+*> NTESTT The total number of tests for this call.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by DLAFTS).
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRVSG( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, B, LDB, D, Z, LDZ, AB, BB, AP,
$ BP, WORK, NWORK, RWORK, LRWORK, IWORK, LIWORK,
$ RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-**********************************************************************
-*
-* modified August 1997, a new parameter LRWORK and LIWORK are
-* added in the calling sequence.
-*
-* test routine CDGT01 is also modified
-*
-**********************************************************************
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDB, LDZ, LIWORK, LRWORK, NOUNIT,
@@ -30,325 +419,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVSG checks the complex Hermitian generalized eigenproblem
-* drivers.
-*
-* ZHEGV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem.
-*
-* ZHEGVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem using a divide and conquer algorithm.
-*
-* ZHEGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem.
-*
-* ZHPGV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem in packed storage.
-*
-* ZHPGVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem in packed storage using a divide and
-* conquer algorithm.
-*
-* ZHPGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite generalized
-* eigenproblem in packed storage.
-*
-* ZHBGV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite banded
-* generalized eigenproblem.
-*
-* ZHBGVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite banded
-* generalized eigenproblem using a divide and conquer
-* algorithm.
-*
-* ZHBGVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian-definite banded
-* generalized eigenproblem.
-*
-* When ZDRVSG is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix A of the given type will be
-* generated; a random well-conditioned matrix B is also generated
-* and the pair (A,B) is used to test the drivers.
-*
-* For each pair (A,B), the following tests are performed:
-*
-* (1) ZHEGV with ITYPE = 1 and UPLO ='U':
-*
-* | A Z - B Z D | / ( |A| |Z| n ulp )
-*
-* (2) as (1) but calling ZHPGV
-* (3) as (1) but calling ZHBGV
-* (4) as (1) but with UPLO = 'L'
-* (5) as (4) but calling ZHPGV
-* (6) as (4) but calling ZHBGV
-*
-* (7) ZHEGV with ITYPE = 2 and UPLO ='U':
-*
-* | A B Z - Z D | / ( |A| |Z| n ulp )
-*
-* (8) as (7) but calling ZHPGV
-* (9) as (7) but with UPLO = 'L'
-* (10) as (9) but calling ZHPGV
-*
-* (11) ZHEGV with ITYPE = 3 and UPLO ='U':
-*
-* | B A Z - Z D | / ( |A| |Z| n ulp )
-*
-* (12) as (11) but calling ZHPGV
-* (13) as (11) but with UPLO = 'L'
-* (14) as (13) but calling ZHPGV
-*
-* ZHEGVD, ZHPGVD and ZHBGVD performed the same 14 tests.
-*
-* ZHEGVX, ZHPGVX and ZHBGVX performed the above 14 tests with
-* the parameter RANGE = 'A', 'N' and 'I', respectively.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* This type is used for the matrix A which has half-bandwidth KA.
-* B is generated as a well-conditioned positive definite matrix
-* with half-bandwidth KB (<= KA).
-* Currently, the list of possible types for A is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is unitary and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is unitary and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Hermitian matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-*
-* (16) Same as (8), but with KA = 1 and KB = 1
-* (17) Same as (8), but with KA = 2 and KB = 1
-* (18) Same as (8), but with KA = 2 and KB = 2
-* (19) Same as (8), but with KA = 3 and KB = 1
-* (20) Same as (8), but with KA = 3 and KB = 2
-* (21) Same as (8), but with KA = 3 and KB = 3
-*
-* Arguments
-* =========
-*
-* NSIZES INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZDRVSG does nothing. It must be at least zero.
-* Not modified.
-*
-* NN INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES INTEGER
-* The number of elements in DOTYPE. If it is zero, ZDRVSG
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRVSG to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A COMPLEX*16 array, dimension (LDA , max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* B COMPLEX*16 array, dimension (LDB , max(NN))
-* Used to hold the Hermitian positive definite matrix for
-* the generailzed problem.
-* On exit, B contains the last matrix actually
-* used.
-* Modified.
-*
-* LDB INTEGER
-* The leading dimension of B. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* D DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues of A. On exit, the eigenvalues in D
-* correspond with the matrix in A.
-* Modified.
-*
-* Z COMPLEX*16 array, dimension (LDZ, max(NN))
-* The matrix of eigenvectors.
-* Modified.
-*
-* LDZ INTEGER
-* The leading dimension of ZZ. It must be at least 1 and
-* at least max( NN ).
-* Not modified.
-*
-* AB COMPLEX*16 array, dimension (LDA, max(NN))
-* Workspace.
-* Modified.
-*
-* BB COMPLEX*16 array, dimension (LDB, max(NN))
-* Workspace.
-* Modified.
-*
-* AP COMPLEX*16 array, dimension (max(NN)**2)
-* Workspace.
-* Modified.
-*
-* BP COMPLEX*16 array, dimension (max(NN)**2)
-* Workspace.
-* Modified.
-*
-* WORK COMPLEX*16 array, dimension (NWORK)
-* Workspace.
-* Modified.
-*
-* NWORK INTEGER
-* The number of entries in WORK. This must be at least
-* 2*N + N**2 where N = max( NN(j), 2 ).
-* Not modified.
-*
-* RWORK DOUBLE PRECISION array, dimension (LRWORK)
-* Workspace.
-* Modified.
-*
-* LRWORK INTEGER
-* The number of entries in RWORK. This must be at least
-* max( 7*N, 1 + 4*N + 2*N*lg(N) + 3*N**2 ) where
-* N = max( NN(j) ) and lg( N ) = smallest integer k such
-* that 2**k >= N .
-* Not modified.
-*
-* IWORK INTEGER array, dimension (LIWORK))
-* Workspace.
-* Modified.
-*
-* LIWORK INTEGER
-* The number of entries in IWORK. This must be at least
-* 2 + 5*max( NN(j) ).
-* Not modified.
-*
-* RESULT DOUBLE PRECISION array, dimension (70)
-* The values computed by the 70 tests described above.
-* Modified.
-*
-* INFO INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDZ < 1 or LDZ < NMAX.
-* -21: NWORK too small.
-* -23: LRWORK too small.
-* -25: LIWORK too small.
-* If ZLATMR, CLATMS, ZHEGV, ZHPGV, ZHBGV, CHEGVD, CHPGVD,
-* ZHPGVD, ZHEGVX, CHPGVX, ZHBGVX returns an error code,
-* the absolute value of it is returned.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests that have been run
-* on this matrix.
-* NTESTT The total number of tests for this call.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by DLAFTS).
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrvst.f b/TESTING/EIG/zdrvst.f
index a9cbdaca..ddc7774f 100644
--- a/TESTING/EIG/zdrvst.f
+++ b/TESTING/EIG/zdrvst.f
@@ -1,11 +1,379 @@
+*> \brief \b ZDRVST
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NOUNIT, A, LDA, D1, D2, D3, WA1, WA2, WA3, U,
+* LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK,
+* IWORK, LIWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
+* $ NSIZES, NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), IWORK( * ), NN( * )
+* DOUBLE PRECISION D1( * ), D2( * ), D3( * ), RESULT( * ),
+* $ RWORK( * ), WA1( * ), WA2( * ), WA3( * )
+* COMPLEX*16 A( LDA, * ), TAU( * ), U( LDU, * ),
+* $ V( LDU, * ), WORK( * ), Z( LDU, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVST checks the Hermitian eigenvalue problem drivers.
+*>
+*> ZHEEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix,
+*> using a divide-and-conquer algorithm.
+*>
+*> ZHEEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix.
+*>
+*> ZHEEVR computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix
+*> using the Relatively Robust Representation where it can.
+*>
+*> ZHPEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix in packed
+*> storage, using a divide-and-conquer algorithm.
+*>
+*> ZHPEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix in packed
+*> storage.
+*>
+*> ZHBEVD computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian band matrix,
+*> using a divide-and-conquer algorithm.
+*>
+*> ZHBEVX computes selected eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian band matrix.
+*>
+*> ZHEEV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix.
+*>
+*> ZHPEV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian matrix in packed
+*> storage.
+*>
+*> ZHBEV computes all eigenvalues and, optionally,
+*> eigenvectors of a complex Hermitian band matrix.
+*>
+*> When ZDRVST is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the appropriate drivers. For each matrix and each
+*> driver routine called, the following tests will be performed:
+*>
+*> (1) | A - Z D Z' | / ( |A| n ulp )
+*>
+*> (2) | I - Z Z' | / ( n ulp )
+*>
+*> (3) | D1 - D2 | / ( |D1| ulp )
+*>
+*> where Z is the matrix of eigenvectors returned when the
+*> eigenvector option is given and D1 and D2 are the eigenvalues
+*> returned with and without the eigenvector option.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*>
+*> (3) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random signs.
+*> (ULP = (first number larger than 1) - 1 )
+*> (4) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random signs.
+*> (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random signs.
+*>
+*> (6) Same as (4), but multiplied by SQRT( overflow threshold )
+*> (7) Same as (4), but multiplied by SQRT( underflow threshold )
+*>
+*> (8) A matrix of the form U* D U, where U is unitary and
+*> D has evenly spaced entries 1, ..., ULP with random signs
+*> on the diagonal.
+*>
+*> (9) A matrix of the form U* D U, where U is unitary and
+*> D has geometrically spaced entries 1, ..., ULP with random
+*> signs on the diagonal.
+*>
+*> (10) A matrix of the form U* D U, where U is unitary and
+*> D has "clustered" entries 1, ULP,..., ULP with random
+*> signs on the diagonal.
+*>
+*> (11) Same as (8), but multiplied by SQRT( overflow threshold )
+*> (12) Same as (8), but multiplied by SQRT( underflow threshold )
+*>
+*> (13) Symmetric matrix with random entries chosen from (-1,1).
+*> (14) Same as (13), but multiplied by SQRT( overflow threshold )
+*> (15) Same as (13), but multiplied by SQRT( underflow threshold )
+*> (16) A band matrix with half bandwidth randomly chosen between
+*> 0 and N-1, with evenly spaced eigenvalues 1, ..., ULP
+*> with random signs.
+*> (17) Same as (16), but multiplied by SQRT( overflow threshold )
+*> (18) Same as (16), but multiplied by SQRT( underflow threshold )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NSIZES INTEGER
+*> The number of sizes of matrices to use. If it is zero,
+*> ZDRVST does nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NN INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> The number of elements in DOTYPE. If it is zero, ZDRVST
+*> does nothing. It must be at least zero. If it is MAXTYP+1
+*> and NSIZES is 1, then an additional type, MAXTYP+1 is
+*> defined, which is to use whatever matrix is in A. This
+*> is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
+*> DOTYPE(MAXTYP+1) is .TRUE. .
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> DOTYPE LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRVST to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> THRESH DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NOUNIT INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns IINFO not equal to 0.)
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A COMPLEX*16 array, dimension (LDA , max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually
+*> used.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D1 DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues of A, as computed by ZSTEQR simlutaneously
+*> with Z. On exit, the eigenvalues in D1 correspond with the
+*> matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D2 DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues of A, as computed by ZSTEQR if Z is not
+*> computed. On exit, the eigenvalues in D2 correspond with
+*> the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> D3 DOUBLE PRECISION array, dimension (max(NN))
+*> The eigenvalues of A, as computed by DSTERF. On exit, the
+*> eigenvalues in D3 correspond with the matrix in A.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WA1 DOUBLE PRECISION array, dimension
+*> \endverbatim
+*> \verbatim
+*> WA2 DOUBLE PRECISION array, dimension
+*> \endverbatim
+*> \verbatim
+*> WA3 DOUBLE PRECISION array, dimension
+*> \endverbatim
+*> \verbatim
+*> U COMPLEX*16 array, dimension (LDU, max(NN))
+*> The unitary matrix computed by ZHETRD + ZUNGC3.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LDU INTEGER
+*> The leading dimension of U, Z, and V. It must be at
+*> least 1 and at least max( NN ).
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> V COMPLEX*16 array, dimension (LDU, max(NN))
+*> The Housholder vectors computed by ZHETRD in reducing A to
+*> tridiagonal form.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> TAU COMPLEX*16 array, dimension (max(NN))
+*> The Householder factors computed by ZHETRD in reducing A
+*> to tridiagonal form.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> Z COMPLEX*16 array, dimension (LDU, max(NN))
+*> The unitary matrix of eigenvectors computed by ZHEEVD,
+*> ZHEEVX, ZHPEVD, CHPEVX, ZHBEVD, and CHBEVX.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> WORK - COMPLEX*16 array of dimension ( LWORK )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LWORK - INTEGER
+*> The number of entries in WORK. This must be at least
+*> 2*max( NN(j), 2 )**2.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> RWORK DOUBLE PRECISION array, dimension (3*max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LRWORK - INTEGER
+*> The number of entries in RWORK.
+*> \endverbatim
+*> \verbatim
+*> IWORK INTEGER array, dimension (6*max(NN))
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> LIWORK - INTEGER
+*> The number of entries in IWORK.
+*> \endverbatim
+*> \verbatim
+*> RESULT DOUBLE PRECISION array, dimension (??)
+*> The values computed by the tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> INFO INTEGER
+*> If 0, then everything ran OK.
+*> -1: NSIZES < 0
+*> -2: Some NN(j) < 0
+*> -3: NTYPES < 0
+*> -5: THRESH < 0
+*> -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
+*> -16: LDU < 1 or LDU < NMAX.
+*> -21: LWORK too small.
+*> If DLATMR, SLATMS, ZHETRD, DORGC3, ZSTEQR, DSTERF,
+*> or DORMC2 returns an error code, the
+*> absolute value of it is returned.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NTEST The number of tests performed, or which can
+*> be performed so far, for the current matrix.
+*> NTESTT The total number of tests performed so far.
+*> NMAX Largest value in NN.
+*> NMATS The number of matrices generated so far.
+*> NERRS The number of tests which have exceeded THRESH
+*> so far (computed by DLAFTS).
+*> COND, IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTOVFL, RTUNFL Square roots of the previous 2 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRVST( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NOUNIT, A, LDA, D1, D2, D3, WA1, WA2, WA3, U,
$ LDU, V, TAU, Z, WORK, LWORK, RWORK, LRWORK,
$ IWORK, LIWORK, RESULT, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDU, LIWORK, LRWORK, LWORK, NOUNIT,
@@ -21,293 +389,6 @@
$ V( LDU, * ), WORK( * ), Z( LDU, * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVST checks the Hermitian eigenvalue problem drivers.
-*
-* ZHEEVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix,
-* using a divide-and-conquer algorithm.
-*
-* ZHEEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix.
-*
-* ZHEEVR computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix
-* using the Relatively Robust Representation where it can.
-*
-* ZHPEVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix in packed
-* storage, using a divide-and-conquer algorithm.
-*
-* ZHPEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix in packed
-* storage.
-*
-* ZHBEVD computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian band matrix,
-* using a divide-and-conquer algorithm.
-*
-* ZHBEVX computes selected eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian band matrix.
-*
-* ZHEEV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix.
-*
-* ZHPEV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian matrix in packed
-* storage.
-*
-* ZHBEV computes all eigenvalues and, optionally,
-* eigenvectors of a complex Hermitian band matrix.
-*
-* When ZDRVST is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the appropriate drivers. For each matrix and each
-* driver routine called, the following tests will be performed:
-*
-* (1) | A - Z D Z' | / ( |A| n ulp )
-*
-* (2) | I - Z Z' | / ( n ulp )
-*
-* (3) | D1 - D2 | / ( |D1| ulp )
-*
-* where Z is the matrix of eigenvectors returned when the
-* eigenvector option is given and D1 and D2 are the eigenvalues
-* returned with and without the eigenvector option.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-*
-* (3) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random signs.
-* (ULP = (first number larger than 1) - 1 )
-* (4) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random signs.
-* (5) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random signs.
-*
-* (6) Same as (4), but multiplied by SQRT( overflow threshold )
-* (7) Same as (4), but multiplied by SQRT( underflow threshold )
-*
-* (8) A matrix of the form U* D U, where U is unitary and
-* D has evenly spaced entries 1, ..., ULP with random signs
-* on the diagonal.
-*
-* (9) A matrix of the form U* D U, where U is unitary and
-* D has geometrically spaced entries 1, ..., ULP with random
-* signs on the diagonal.
-*
-* (10) A matrix of the form U* D U, where U is unitary and
-* D has "clustered" entries 1, ULP,..., ULP with random
-* signs on the diagonal.
-*
-* (11) Same as (8), but multiplied by SQRT( overflow threshold )
-* (12) Same as (8), but multiplied by SQRT( underflow threshold )
-*
-* (13) Symmetric matrix with random entries chosen from (-1,1).
-* (14) Same as (13), but multiplied by SQRT( overflow threshold )
-* (15) Same as (13), but multiplied by SQRT( underflow threshold )
-* (16) A band matrix with half bandwidth randomly chosen between
-* 0 and N-1, with evenly spaced eigenvalues 1, ..., ULP
-* with random signs.
-* (17) Same as (16), but multiplied by SQRT( overflow threshold )
-* (18) Same as (16), but multiplied by SQRT( underflow threshold )
-*
-* Arguments
-* =========
-*
-* NSIZES INTEGER
-* The number of sizes of matrices to use. If it is zero,
-* ZDRVST does nothing. It must be at least zero.
-* Not modified.
-*
-* NN INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-* Not modified.
-*
-* NTYPES INTEGER
-* The number of elements in DOTYPE. If it is zero, ZDRVST
-* does nothing. It must be at least zero. If it is MAXTYP+1
-* and NSIZES is 1, then an additional type, MAXTYP+1 is
-* defined, which is to use whatever matrix is in A. This
-* is only useful if DOTYPE(1:MAXTYP) is .FALSE. and
-* DOTYPE(MAXTYP+1) is .TRUE. .
-* Not modified.
-*
-* DOTYPE LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-* Not modified.
-*
-* ISEED INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRVST to continue the same random number
-* sequence.
-* Modified.
-*
-* THRESH DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-* Not modified.
-*
-* NOUNIT INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns IINFO not equal to 0.)
-* Not modified.
-*
-* A COMPLEX*16 array, dimension (LDA , max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually
-* used.
-* Modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* D1 DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues of A, as computed by ZSTEQR simlutaneously
-* with Z. On exit, the eigenvalues in D1 correspond with the
-* matrix in A.
-* Modified.
-*
-* D2 DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues of A, as computed by ZSTEQR if Z is not
-* computed. On exit, the eigenvalues in D2 correspond with
-* the matrix in A.
-* Modified.
-*
-* D3 DOUBLE PRECISION array, dimension (max(NN))
-* The eigenvalues of A, as computed by DSTERF. On exit, the
-* eigenvalues in D3 correspond with the matrix in A.
-* Modified.
-*
-* WA1 DOUBLE PRECISION array, dimension
-*
-* WA2 DOUBLE PRECISION array, dimension
-*
-* WA3 DOUBLE PRECISION array, dimension
-*
-* U COMPLEX*16 array, dimension (LDU, max(NN))
-* The unitary matrix computed by ZHETRD + ZUNGC3.
-* Modified.
-*
-* LDU INTEGER
-* The leading dimension of U, Z, and V. It must be at
-* least 1 and at least max( NN ).
-* Not modified.
-*
-* V COMPLEX*16 array, dimension (LDU, max(NN))
-* The Housholder vectors computed by ZHETRD in reducing A to
-* tridiagonal form.
-* Modified.
-*
-* TAU COMPLEX*16 array, dimension (max(NN))
-* The Householder factors computed by ZHETRD in reducing A
-* to tridiagonal form.
-* Modified.
-*
-* Z COMPLEX*16 array, dimension (LDU, max(NN))
-* The unitary matrix of eigenvectors computed by ZHEEVD,
-* ZHEEVX, ZHPEVD, CHPEVX, ZHBEVD, and CHBEVX.
-* Modified.
-*
-* WORK - COMPLEX*16 array of dimension ( LWORK )
-* Workspace.
-* Modified.
-*
-* LWORK - INTEGER
-* The number of entries in WORK. This must be at least
-* 2*max( NN(j), 2 )**2.
-* Not modified.
-*
-* RWORK DOUBLE PRECISION array, dimension (3*max(NN))
-* Workspace.
-* Modified.
-*
-* LRWORK - INTEGER
-* The number of entries in RWORK.
-*
-* IWORK INTEGER array, dimension (6*max(NN))
-* Workspace.
-* Modified.
-*
-* LIWORK - INTEGER
-* The number of entries in IWORK.
-*
-* RESULT DOUBLE PRECISION array, dimension (??)
-* The values computed by the tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-* Modified.
-*
-* INFO INTEGER
-* If 0, then everything ran OK.
-* -1: NSIZES < 0
-* -2: Some NN(j) < 0
-* -3: NTYPES < 0
-* -5: THRESH < 0
-* -9: LDA < 1 or LDA < NMAX, where NMAX is max( NN(j) ).
-* -16: LDU < 1 or LDU < NMAX.
-* -21: LWORK too small.
-* If DLATMR, SLATMS, ZHETRD, DORGC3, ZSTEQR, DSTERF,
-* or DORMC2 returns an error code, the
-* absolute value of it is returned.
-* Modified.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NTEST The number of tests performed, or which can
-* be performed so far, for the current matrix.
-* NTESTT The total number of tests performed so far.
-* NMAX Largest value in NN.
-* NMATS The number of matrices generated so far.
-* NERRS The number of tests which have exceeded THRESH
-* so far (computed by DLAFTS).
-* COND, IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTOVFL, RTUNFL Square roots of the previous 2 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-*
* =====================================================================
*
*
diff --git a/TESTING/EIG/zdrvsx.f b/TESTING/EIG/zdrvsx.f
index cd8b5fa6..4b8f5578 100644
--- a/TESTING/EIG/zdrvsx.f
+++ b/TESTING/EIG/zdrvsx.f
@@ -1,11 +1,449 @@
+*> \brief \b ZDRVSX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVSX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NIUNIT, NOUNIT, A, LDA, H, HT, W, WT, WTMP, VS,
+* LDVS, VS1, RESULT, WORK, LWORK, RWORK, BWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDVS, LWORK, NIUNIT, NOUNIT, NSIZES,
+* $ NTYPES
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * ), DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION RESULT( 17 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ VS( LDVS, * ), VS1( LDVS, * ), W( * ),
+* $ WORK( * ), WT( * ), WTMP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
+*> expert driver ZGEESX.
+*>
+*> ZDRVSX uses both test matrices generated randomly depending on
+*> data supplied in the calling sequence, as well as on data
+*> read from an input file and including precomputed condition
+*> numbers to which it compares the ones it computes.
+*>
+*> When ZDRVSX is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified. For each size ("n")
+*> and each type of matrix, one matrix will be generated and used
+*> to test the nonsymmetric eigenroutines. For each matrix, 15
+*> tests will be performed:
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare W with and
+*> without reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare T with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare VS with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*> If workspace sufficient, also compare SDIM with and
+*> without reciprocal condition numbers
+*>
+*> (14) if RCONDE the same no matter if VS and/or RCONDV computed
+*>
+*> (15) if RCONDV the same no matter if VS and/or RCONDE computed
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is orthogonal and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from (-1,1).
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> In addition, an input file will be read from logical unit number
+*> NIUNIT. The file contains matrices along with precomputed
+*> eigenvalues and reciprocal condition numbers for the eigenvalue
+*> average and right invariant subspace. For these matrices, in
+*> addition to tests (1) to (15) we will compute the following two
+*> tests:
+*>
+*> (16) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal average eigenvalue condition number
+*> computed by ZGEESX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*> (17) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right invariant subspace condition
+*> number computed by ZGEESX and RCDVIN (the precomputed true
+*> value) is supplied as input. cond(RCONDV) is the condition
+*> number of RCONDV, and takes errors in computing RCONDV into
+*> account, so that the resulting quantity should be O(ULP).
+*> cond(RCONDV) is essentially given by norm(A)/RCONDE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. NSIZES must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIUNIT will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. NTYPES must be at least
+*> zero. If it is zero, no randomly generated test matrices
+*> are tested, but and test matrices read from NIUNIT will be
+*> tested. If it is MAXTYP+1 and NSIZES is 1, then an
+*> additional type, MAXTYP+1 is defined, which is to use
+*> whatever matrix is in A. This is only useful if
+*> DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRVSX to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIUNIT
+*> \verbatim
+*> NIUNIT is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max( NN ).
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Another copy of the test matrix A, modified by ZGEESX.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is COMPLEX*16 array, dimension (LDA, max(NN))
+*> Yet another copy of the test matrix A, modified by ZGEESX.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (max(NN))
+*> The computed eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] WT
+*> \verbatim
+*> WT is COMPLEX*16 array, dimension (max(NN))
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when ZGEESX only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] WTMP
+*> \verbatim
+*> WTMP is COMPLEX*16 array, dimension (max(NN))
+*> More temporary storage for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX*16 array, dimension (LDVS, max(NN))
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1,max(NN)).
+*> \endverbatim
+*>
+*> \param[out] VS1
+*> \verbatim
+*> VS1 is COMPLEX*16 array, dimension (LDVS, max(NN))
+*> VS1 holds another copy of the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (17)
+*> The values computed by the 17 tests described above.
+*> The values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(1,2*NN(j)**2) for all j.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (max(NN))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> <0, input parameter -INFO is incorrect
+*> >0, ZLATMR, CLATMS, CLATME or ZGET24 returned an error
+*> code and INFO is its absolute value
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRVSX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NIUNIT, NOUNIT, A, LDA, H, HT, W, WT, WTMP, VS,
$ LDVS, VS1, RESULT, WORK, LWORK, RWORK, BWORK,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDVS, LWORK, NIUNIT, NOUNIT, NSIZES,
@@ -21,320 +459,6 @@
$ WORK( * ), WT( * ), WTMP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVSX checks the nonsymmetric eigenvalue (Schur form) problem
-* expert driver ZGEESX.
-*
-* ZDRVSX uses both test matrices generated randomly depending on
-* data supplied in the calling sequence, as well as on data
-* read from an input file and including precomputed condition
-* numbers to which it compares the ones it computes.
-*
-* When ZDRVSX is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified. For each size ("n")
-* and each type of matrix, one matrix will be generated and used
-* to test the nonsymmetric eigenroutines. For each matrix, 15
-* tests will be performed:
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* If workspace sufficient, also compare W with and
-* without reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare T with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare VS with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-* If workspace sufficient, also compare SDIM with and
-* without reciprocal condition numbers
-*
-* (14) if RCONDE the same no matter if VS and/or RCONDV computed
-*
-* (15) if RCONDV the same no matter if VS and/or RCONDE computed
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is orthogonal and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from (-1,1).
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* In addition, an input file will be read from logical unit number
-* NIUNIT. The file contains matrices along with precomputed
-* eigenvalues and reciprocal condition numbers for the eigenvalue
-* average and right invariant subspace. For these matrices, in
-* addition to tests (1) to (15) we will compute the following two
-* tests:
-*
-* (16) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal average eigenvalue condition number
-* computed by ZGEESX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* (17) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right invariant subspace condition
-* number computed by ZGEESX and RCDVIN (the precomputed true
-* value) is supplied as input. cond(RCONDV) is the condition
-* number of RCONDV, and takes errors in computing RCONDV into
-* account, so that the resulting quantity should be O(ULP).
-* cond(RCONDV) is essentially given by norm(A)/RCONDE.
-*
-* Arguments
-* =========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. NSIZES must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIUNIT will be
-* tested.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. NTYPES must be at least
-* zero. If it is zero, no randomly generated test matrices
-* are tested, but and test matrices read from NIUNIT will be
-* tested. If it is MAXTYP+1 and NSIZES is 1, then an
-* additional type, MAXTYP+1 is defined, which is to use
-* whatever matrix is in A. This is only useful if
-* DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRVSX to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIUNIT (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max( NN ).
-*
-* H (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Another copy of the test matrix A, modified by ZGEESX.
-*
-* HT (workspace) COMPLEX*16 array, dimension (LDA, max(NN))
-* Yet another copy of the test matrix A, modified by ZGEESX.
-*
-* W (workspace) COMPLEX*16 array, dimension (max(NN))
-* The computed eigenvalues of A.
-*
-* WT (workspace) COMPLEX*16 array, dimension (max(NN))
-* Like W, this array contains the eigenvalues of A,
-* but those computed when ZGEESX only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* WTMP (workspace) COMPLEX*16 array, dimension (max(NN))
-* More temporary storage for eigenvalues.
-*
-* VS (workspace) COMPLEX*16 array, dimension (LDVS, max(NN))
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1,max(NN)).
-*
-* VS1 (workspace) COMPLEX*16 array, dimension (LDVS, max(NN))
-* VS1 holds another copy of the computed Schur vectors.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (17)
-* The values computed by the 17 tests described above.
-* The values are currently limited to 1/ulp, to avoid overflow.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(1,2*NN(j)**2) for all j.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(NN))
-*
-* BWORK (workspace) LOGICAL array, dimension (max(NN))
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* <0, input parameter -INFO is incorrect
-* >0, ZLATMR, CLATMS, CLATME or ZGET24 returned an error
-* code and INFO is its absolute value
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zdrvvx.f b/TESTING/EIG/zdrvvx.f
index c92bc1c0..e1125b7a 100644
--- a/TESTING/EIG/zdrvvx.f
+++ b/TESTING/EIG/zdrvvx.f
@@ -1,3 +1,446 @@
+*> \brief \b ZDRVVX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVVX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
+* NIUNIT, NOUNIT, A, LDA, H, W, W1, VL, LDVL, VR,
+* LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
+* RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1, RESULT,
+* WORK, NWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
+* $ NSIZES, NTYPES, NWORK
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER ISEED( 4 ), NN( * )
+* DOUBLE PRECISION RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
+* $ RCNDV1( * ), RCONDE( * ), RCONDV( * ),
+* $ RESULT( 11 ), RWORK( * ), SCALE( * ),
+* $ SCALE1( * )
+* COMPLEX*16 A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), W( * ), W1( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVVX checks the nonsymmetric eigenvalue problem expert driver
+*> ZGEEVX.
+*>
+*> ZDRVVX uses both test matrices generated randomly depending on
+*> data supplied in the calling sequence, as well as on data
+*> read from an input file and including precomputed condition
+*> numbers to which it compares the ones it computes.
+*>
+*> When ZDRVVX is called, a number of matrix "sizes" ("n's") and a
+*> number of matrix "types" are specified in the calling sequence.
+*> For each size ("n") and each type of matrix, one matrix will be
+*> generated and used to test the nonsymmetric eigenroutines. For
+*> each matrix, 9 tests will be performed:
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a diagonal matrix with diagonal entries W(j).
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) W(full) = W(partial)
+*>
+*> W(full) denotes the eigenvalues computed when VR, VL, RCONDV
+*> and RCONDE are also computed, and W(partial) denotes the
+*> eigenvalues computed when only some of VR, VL, RCONDV, and
+*> RCONDE are computed.
+*>
+*> (6) VR(full) = VR(partial)
+*>
+*> VR(full) denotes the right eigenvectors computed when VL, RCONDV
+*> and RCONDE are computed, and VR(partial) denotes the result
+*> when only some of VL and RCONDV are computed.
+*>
+*> (7) VL(full) = VL(partial)
+*>
+*> VL(full) denotes the left eigenvectors computed when VR, RCONDV
+*> and RCONDE are computed, and VL(partial) denotes the result
+*> when only some of VR and RCONDV are computed.
+*>
+*> (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
+*> SCALE, ILO, IHI, ABNRM (partial)
+*> 1/ulp otherwise
+*>
+*> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
+*> (full) is when VR, VL, RCONDE and RCONDV are also computed, and
+*> (partial) is when some are not computed.
+*>
+*> (9) RCONDV(full) = RCONDV(partial)
+*>
+*> RCONDV(full) denotes the reciprocal condition numbers of the
+*> right eigenvectors computed when VR, VL and RCONDE are also
+*> computed. RCONDV(partial) denotes the reciprocal condition
+*> numbers when only some of VR, VL and RCONDE are computed.
+*>
+*> The "sizes" are specified by an array NN(1:NSIZES); the value of
+*> each element NN(j) specifies one size.
+*> The "types" are specified by a logical array DOTYPE( 1:NTYPES );
+*> if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
+*> Currently, the list of possible types is:
+*>
+*> (1) The zero matrix.
+*> (2) The identity matrix.
+*> (3) A (transposed) Jordan block, with 1's on the diagonal.
+*>
+*> (4) A diagonal matrix with evenly spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (ULP = (first number larger than 1) - 1 )
+*> (5) A diagonal matrix with geometrically spaced entries
+*> 1, ..., ULP and random complex angles.
+*> (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
+*> and random complex angles.
+*>
+*> (7) Same as (4), but multiplied by a constant near
+*> the overflow threshold
+*> (8) Same as (4), but multiplied by a constant near
+*> the underflow threshold
+*>
+*> (9) A matrix of the form U' T U, where U is unitary and
+*> T has evenly spaced entries 1, ..., ULP with random complex
+*> angles on the diagonal and random O(1) entries in the upper
+*> triangle.
+*>
+*> (10) A matrix of the form U' T U, where U is unitary and
+*> T has geometrically spaced entries 1, ..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (11) A matrix of the form U' T U, where U is unitary and
+*> T has "clustered" entries 1, ULP,..., ULP with random
+*> complex angles on the diagonal and random O(1) entries in
+*> the upper triangle.
+*>
+*> (12) A matrix of the form U' T U, where U is unitary and
+*> T has complex eigenvalues randomly chosen from
+*> ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (13) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (14) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has geometrically spaced entries
+*> 1, ..., ULP with random complex angles on the diagonal
+*> and random O(1) entries in the upper triangle.
+*>
+*> (15) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
+*> with random complex angles on the diagonal and random O(1)
+*> entries in the upper triangle.
+*>
+*> (16) A matrix of the form X' T X, where X has condition
+*> SQRT( ULP ) and T has complex eigenvalues randomly chosen
+*> from ULP < |z| < 1 and random O(1) entries in the upper
+*> triangle.
+*>
+*> (17) Same as (16), but multiplied by a constant
+*> near the overflow threshold
+*> (18) Same as (16), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> (19) Nonsymmetric matrix with random entries chosen from |z| < 1
+*> If N is at least 4, all entries in first two rows and last
+*> row, and first column and last two columns are zero.
+*> (20) Same as (19), but multiplied by a constant
+*> near the overflow threshold
+*> (21) Same as (19), but multiplied by a constant
+*> near the underflow threshold
+*>
+*> In addition, an input file will be read from logical unit number
+*> NIUNIT. The file contains matrices along with precomputed
+*> eigenvalues and reciprocal condition numbers for the eigenvalues
+*> and right eigenvectors. For these matrices, in addition to tests
+*> (1) to (9) we will compute the following two tests:
+*>
+*> (10) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right eigenvector condition number
+*> computed by ZGEEVX and RCDVIN (the precomputed true value)
+*> is supplied as input. cond(RCONDV) is the condition number of
+*> RCONDV, and takes errors in computing RCONDV into account, so
+*> that the resulting quantity should be O(ULP). cond(RCONDV) is
+*> essentially given by norm(A)/RCONDE.
+*>
+*> (11) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal eigenvalue condition number
+*> computed by ZGEEVX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NSIZES
+*> \verbatim
+*> NSIZES is INTEGER
+*> The number of sizes of matrices to use. NSIZES must be at
+*> least zero. If it is zero, no randomly generated matrices
+*> are tested, but any test matrices read from NIUNIT will be
+*> tested.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER array, dimension (NSIZES)
+*> An array containing the sizes to be used for the matrices.
+*> Zero values will be skipped. The values must be at least
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The number of elements in DOTYPE. NTYPES must be at least
+*> zero. If it is zero, no randomly generated test matrices
+*> are tested, but and test matrices read from NIUNIT will be
+*> tested. If it is MAXTYP+1 and NSIZES is 1, then an
+*> additional type, MAXTYP+1 is defined, which is to use
+*> whatever matrix is in A. This is only useful if
+*> DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
+*> \endverbatim
+*>
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> If DOTYPE(j) is .TRUE., then for each size in NN a
+*> matrix of that size and of type j will be generated.
+*> If NTYPES is smaller than the maximum number of types
+*> defined (PARAMETER MAXTYP), then types NTYPES+1 through
+*> MAXTYP will not be generated. If NTYPES is larger
+*> than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
+*> will be ignored.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZDRVVX to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NIUNIT
+*> \verbatim
+*> NIUNIT is INTEGER
+*> The FORTRAN unit number for reading in the data file of
+*> problems to solve.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, max(NN,12))
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed. On exit, A contains the last matrix actually used.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least max( NN, 12 ). (12 is the
+*> dimension of the largest matrix on the precomputed
+*> input file.)
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDA, max(NN,12))
+*> Another copy of the test matrix A, modified by ZGEEVX.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (max(NN,12))
+*> Contains the eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] W1
+*> \verbatim
+*> W1 is COMPLEX*16 array, dimension (max(NN,12))
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when ZGEEVX only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL, max(NN,12))
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,max(NN,12)).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR, max(NN,12))
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,max(NN,12)).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is COMPLEX*16 array, dimension (LDLRE, max(NN,12))
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (11)
+*> The values computed by the seven tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NWORK)
+*> \endverbatim
+*>
+*> \param[in] NWORK
+*> \verbatim
+*> NWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) =
+*> max( 360 ,6*NN(j)+2*NN(j)**2) for all j.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*max(NN,12))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, then successful exit.
+*> If <0, then input paramter -INFO is incorrect.
+*> If >0, ZLATMR, CLATMS, CLATME or ZGET23 returned an error
+*> code, and INFO is its absolute value.
+*> \endverbatim
+*> \verbatim
+*>-----------------------------------------------------------------------
+*> \endverbatim
+*> \verbatim
+*> Some Local Variables and Parameters:
+*> ---- ----- --------- --- ----------
+*> \endverbatim
+*> \verbatim
+*> ZERO, ONE Real 0 and 1.
+*> MAXTYP The number of types defined.
+*> NMAX Largest value in NN or 12.
+*> NERRS The number of tests which have exceeded THRESH
+*> COND, CONDS,
+*> IMODE Values to be passed to the matrix generators.
+*> ANORM Norm of A; passed to matrix generators.
+*> \endverbatim
+*> \verbatim
+*> OVFL, UNFL Overflow and underflow thresholds.
+*> ULP, ULPINV Finest relative precision and its inverse.
+*> RTULP, RTULPI Square roots of the previous 4 values.
+*> \endverbatim
+*> \verbatim
+*> The following four arrays decode JTYPE:
+*> KTYPE(j) The general type (1-10) for type "j".
+*> KMODE(j) The MODE value to be passed to the matrix
+*> generator for type "j".
+*> KMAGN(j) The order of magnitude ( O(1),
+*> O(overflow^(1/2) ), O(underflow^(1/2) )
+*> KCONDS(j) Selectw whether CONDS is to be 1 or
+*> 1/sqrt(ulp). (0 means irrelevant.)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZDRVVX( NSIZES, NN, NTYPES, DOTYPE, ISEED, THRESH,
$ NIUNIT, NOUNIT, A, LDA, H, W, W1, VL, LDVL, VR,
$ LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
@@ -5,8 +448,9 @@
$ WORK, NWORK, RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER INFO, LDA, LDLRE, LDVL, LDVR, NIUNIT, NOUNIT,
@@ -25,320 +469,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVVX checks the nonsymmetric eigenvalue problem expert driver
-* ZGEEVX.
-*
-* ZDRVVX uses both test matrices generated randomly depending on
-* data supplied in the calling sequence, as well as on data
-* read from an input file and including precomputed condition
-* numbers to which it compares the ones it computes.
-*
-* When ZDRVVX is called, a number of matrix "sizes" ("n's") and a
-* number of matrix "types" are specified in the calling sequence.
-* For each size ("n") and each type of matrix, one matrix will be
-* generated and used to test the nonsymmetric eigenroutines. For
-* each matrix, 9 tests will be performed:
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a diagonal matrix with diagonal entries W(j).
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) W(full) = W(partial)
-*
-* W(full) denotes the eigenvalues computed when VR, VL, RCONDV
-* and RCONDE are also computed, and W(partial) denotes the
-* eigenvalues computed when only some of VR, VL, RCONDV, and
-* RCONDE are computed.
-*
-* (6) VR(full) = VR(partial)
-*
-* VR(full) denotes the right eigenvectors computed when VL, RCONDV
-* and RCONDE are computed, and VR(partial) denotes the result
-* when only some of VL and RCONDV are computed.
-*
-* (7) VL(full) = VL(partial)
-*
-* VL(full) denotes the left eigenvectors computed when VR, RCONDV
-* and RCONDE are computed, and VL(partial) denotes the result
-* when only some of VR and RCONDV are computed.
-*
-* (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
-* SCALE, ILO, IHI, ABNRM (partial)
-* 1/ulp otherwise
-*
-* SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
-* (full) is when VR, VL, RCONDE and RCONDV are also computed, and
-* (partial) is when some are not computed.
-*
-* (9) RCONDV(full) = RCONDV(partial)
-*
-* RCONDV(full) denotes the reciprocal condition numbers of the
-* right eigenvectors computed when VR, VL and RCONDE are also
-* computed. RCONDV(partial) denotes the reciprocal condition
-* numbers when only some of VR, VL and RCONDE are computed.
-*
-* The "sizes" are specified by an array NN(1:NSIZES); the value of
-* each element NN(j) specifies one size.
-* The "types" are specified by a logical array DOTYPE( 1:NTYPES );
-* if DOTYPE(j) is .TRUE., then matrix type "j" will be generated.
-* Currently, the list of possible types is:
-*
-* (1) The zero matrix.
-* (2) The identity matrix.
-* (3) A (transposed) Jordan block, with 1's on the diagonal.
-*
-* (4) A diagonal matrix with evenly spaced entries
-* 1, ..., ULP and random complex angles.
-* (ULP = (first number larger than 1) - 1 )
-* (5) A diagonal matrix with geometrically spaced entries
-* 1, ..., ULP and random complex angles.
-* (6) A diagonal matrix with "clustered" entries 1, ULP, ..., ULP
-* and random complex angles.
-*
-* (7) Same as (4), but multiplied by a constant near
-* the overflow threshold
-* (8) Same as (4), but multiplied by a constant near
-* the underflow threshold
-*
-* (9) A matrix of the form U' T U, where U is unitary and
-* T has evenly spaced entries 1, ..., ULP with random complex
-* angles on the diagonal and random O(1) entries in the upper
-* triangle.
-*
-* (10) A matrix of the form U' T U, where U is unitary and
-* T has geometrically spaced entries 1, ..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (11) A matrix of the form U' T U, where U is unitary and
-* T has "clustered" entries 1, ULP,..., ULP with random
-* complex angles on the diagonal and random O(1) entries in
-* the upper triangle.
-*
-* (12) A matrix of the form U' T U, where U is unitary and
-* T has complex eigenvalues randomly chosen from
-* ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (13) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has evenly spaced entries 1, ..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (14) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has geometrically spaced entries
-* 1, ..., ULP with random complex angles on the diagonal
-* and random O(1) entries in the upper triangle.
-*
-* (15) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has "clustered" entries 1, ULP,..., ULP
-* with random complex angles on the diagonal and random O(1)
-* entries in the upper triangle.
-*
-* (16) A matrix of the form X' T X, where X has condition
-* SQRT( ULP ) and T has complex eigenvalues randomly chosen
-* from ULP < |z| < 1 and random O(1) entries in the upper
-* triangle.
-*
-* (17) Same as (16), but multiplied by a constant
-* near the overflow threshold
-* (18) Same as (16), but multiplied by a constant
-* near the underflow threshold
-*
-* (19) Nonsymmetric matrix with random entries chosen from |z| < 1
-* If N is at least 4, all entries in first two rows and last
-* row, and first column and last two columns are zero.
-* (20) Same as (19), but multiplied by a constant
-* near the overflow threshold
-* (21) Same as (19), but multiplied by a constant
-* near the underflow threshold
-*
-* In addition, an input file will be read from logical unit number
-* NIUNIT. The file contains matrices along with precomputed
-* eigenvalues and reciprocal condition numbers for the eigenvalues
-* and right eigenvectors. For these matrices, in addition to tests
-* (1) to (9) we will compute the following two tests:
-*
-* (10) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right eigenvector condition number
-* computed by ZGEEVX and RCDVIN (the precomputed true value)
-* is supplied as input. cond(RCONDV) is the condition number of
-* RCONDV, and takes errors in computing RCONDV into account, so
-* that the resulting quantity should be O(ULP). cond(RCONDV) is
-* essentially given by norm(A)/RCONDE.
-*
-* (11) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal eigenvalue condition number
-* computed by ZGEEVX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* Arguments
-* ==========
-*
-* NSIZES (input) INTEGER
-* The number of sizes of matrices to use. NSIZES must be at
-* least zero. If it is zero, no randomly generated matrices
-* are tested, but any test matrices read from NIUNIT will be
-* tested.
-*
-* NN (input) INTEGER array, dimension (NSIZES)
-* An array containing the sizes to be used for the matrices.
-* Zero values will be skipped. The values must be at least
-* zero.
-*
-* NTYPES (input) INTEGER
-* The number of elements in DOTYPE. NTYPES must be at least
-* zero. If it is zero, no randomly generated test matrices
-* are tested, but and test matrices read from NIUNIT will be
-* tested. If it is MAXTYP+1 and NSIZES is 1, then an
-* additional type, MAXTYP+1 is defined, which is to use
-* whatever matrix is in A. This is only useful if
-* DOTYPE(1:MAXTYP) is .FALSE. and DOTYPE(MAXTYP+1) is .TRUE. .
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* If DOTYPE(j) is .TRUE., then for each size in NN a
-* matrix of that size and of type j will be generated.
-* If NTYPES is smaller than the maximum number of types
-* defined (PARAMETER MAXTYP), then types NTYPES+1 through
-* MAXTYP will not be generated. If NTYPES is larger
-* than MAXTYP, DOTYPE(MAXTYP+1) through DOTYPE(NTYPES)
-* will be ignored.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZDRVVX to continue the same random number
-* sequence.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NIUNIT (input) INTEGER
-* The FORTRAN unit number for reading in the data file of
-* problems to solve.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA, max(NN,12))
-* Used to hold the matrix whose eigenvalues are to be
-* computed. On exit, A contains the last matrix actually used.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least max( NN, 12 ). (12 is the
-* dimension of the largest matrix on the precomputed
-* input file.)
-*
-* H (workspace) COMPLEX*16 array, dimension (LDA, max(NN,12))
-* Another copy of the test matrix A, modified by ZGEEVX.
-*
-* W (workspace) COMPLEX*16 array, dimension (max(NN,12))
-* Contains the eigenvalues of A.
-*
-* W1 (workspace) COMPLEX*16 array, dimension (max(NN,12))
-* Like W, this array contains the eigenvalues of A,
-* but those computed when ZGEEVX only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) COMPLEX*16 array, dimension (LDVL, max(NN,12))
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,max(NN,12)).
-*
-* VR (workspace) COMPLEX*16 array, dimension (LDVR, max(NN,12))
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,max(NN,12)).
-*
-* LRE (workspace) COMPLEX*16 array, dimension (LDLRE, max(NN,12))
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,max(NN,12))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (11)
-* The values computed by the seven tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NWORK)
-*
-* NWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* max(6*12+2*12**2,6*NN(j)+2*NN(j)**2) =
-* max( 360 ,6*NN(j)+2*NN(j)**2) for all j.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*max(NN,12))
-*
-* INFO (output) INTEGER
-* If 0, then successful exit.
-* If <0, then input paramter -INFO is incorrect.
-* If >0, ZLATMR, CLATMS, CLATME or ZGET23 returned an error
-* code, and INFO is its absolute value.
-*
-*-----------------------------------------------------------------------
-*
-* Some Local Variables and Parameters:
-* ---- ----- --------- --- ----------
-*
-* ZERO, ONE Real 0 and 1.
-* MAXTYP The number of types defined.
-* NMAX Largest value in NN or 12.
-* NERRS The number of tests which have exceeded THRESH
-* COND, CONDS,
-* IMODE Values to be passed to the matrix generators.
-* ANORM Norm of A; passed to matrix generators.
-*
-* OVFL, UNFL Overflow and underflow thresholds.
-* ULP, ULPINV Finest relative precision and its inverse.
-* RTULP, RTULPI Square roots of the previous 4 values.
-*
-* The following four arrays decode JTYPE:
-* KTYPE(j) The general type (1-10) for type "j".
-* KMODE(j) The MODE value to be passed to the matrix
-* generator for type "j".
-* KMAGN(j) The order of magnitude ( O(1),
-* O(overflow^(1/2) ), O(underflow^(1/2) )
-* KCONDS(j) Selectw whether CONDS is to be 1 or
-* 1/sqrt(ulp). (0 means irrelevant.)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zerrbd.f b/TESTING/EIG/zerrbd.f
index afe9e732..2ad1b3bd 100644
--- a/TESTING/EIG/zerrbd.f
+++ b/TESTING/EIG/zerrbd.f
@@ -1,27 +1,70 @@
- SUBROUTINE ZERRBD( PATH, NUNIT )
+*> \brief \b ZERRBD
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRBD( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRBD tests the error exits for ZGEBRD, ZUNGBR, ZUNMBR, and ZBDSQR.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRBD tests the error exits for ZGEBRD, ZUNGBR, ZUNMBR, and ZBDSQR.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZERRBD( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zerrec.f b/TESTING/EIG/zerrec.f
index c826717b..a2dee08a 100644
--- a/TESTING/EIG/zerrec.f
+++ b/TESTING/EIG/zerrec.f
@@ -1,29 +1,72 @@
- SUBROUTINE ZERREC( PATH, NUNIT )
+*> \brief \b ZERREC
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERREC( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERREC tests the error exits for the routines for eigen- condition
-* estimation for DOUBLE PRECISION matrices:
-* ZTRSYL, CTREXC, CTRSNA and CTRSEN.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERREC tests the error exits for the routines for eigen- condition
+*> estimation for DOUBLE PRECISION matrices:
+*> ZTRSYL, CTREXC, CTRSNA and CTRSEN.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZERREC( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zerred.f b/TESTING/EIG/zerred.f
index c61056f0..48faa5ad 100644
--- a/TESTING/EIG/zerred.f
+++ b/TESTING/EIG/zerred.f
@@ -1,38 +1,81 @@
- SUBROUTINE ZERRED( PATH, NUNIT )
+*> \brief \b ZERRED
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRED( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRED tests the error exits for the eigenvalue driver routines for
-* DOUBLE PRECISION matrices:
-*
-* PATH driver description
-* ---- ------ -----------
-* ZEV ZGEEV find eigenvalues/eigenvectors for nonsymmetric A
-* ZES ZGEES find eigenvalues/Schur form for nonsymmetric A
-* ZVX ZGEEVX ZGEEV + balancing and condition estimation
-* ZSX ZGEESX ZGEES + balancing and condition estimation
-* ZBD ZGESVD compute SVD of an M-by-N matrix A
-* ZGESDD compute SVD of an M-by-N matrix A(by divide and
-* conquer)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRED tests the error exits for the eigenvalue driver routines for
+*> DOUBLE PRECISION matrices:
+*>
+*> PATH driver description
+*> ---- ------ -----------
+*> ZEV ZGEEV find eigenvalues/eigenvectors for nonsymmetric A
+*> ZES ZGEES find eigenvalues/Schur form for nonsymmetric A
+*> ZVX ZGEEVX ZGEEV + balancing and condition estimation
+*> ZSX ZGEESX ZGEES + balancing and condition estimation
+*> ZBD ZGESVD compute SVD of an M-by-N matrix A
+*> ZGESDD compute SVD of an M-by-N matrix A(by divide and
+*> conquer)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZERRED( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zerrgg.f b/TESTING/EIG/zerrgg.f
index a3d36fd6..d8859f70 100644
--- a/TESTING/EIG/zerrgg.f
+++ b/TESTING/EIG/zerrgg.f
@@ -1,29 +1,72 @@
- SUBROUTINE ZERRGG( PATH, NUNIT )
+*> \brief \b ZERRGG
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRGG( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRGG tests the error exits for ZGGES, ZGGESX, ZGGEV, ZGGEVX,
-* ZGGGLM, ZGGHRD, ZGGLSE, ZGGQRF, ZGGRQF, ZGGSVD, ZGGSVP, ZHGEQZ,
-* ZTGEVC, ZTGEXC, ZTGSEN, ZTGSJA, ZTGSNA, and ZTGSYL.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRGG tests the error exits for ZGGES, ZGGESX, ZGGEV, ZGGEVX,
+*> ZGGGLM, ZGGHRD, ZGGLSE, ZGGQRF, ZGGRQF, ZGGSVD, ZGGSVP, ZHGEQZ,
+*> ZTGEVC, ZTGEXC, ZTGSEN, ZTGSJA, ZTGSNA, and ZTGSYL.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZERRGG( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zerrhs.f b/TESTING/EIG/zerrhs.f
index dadf235e..815c16fc 100644
--- a/TESTING/EIG/zerrhs.f
+++ b/TESTING/EIG/zerrhs.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRHS( PATH, NUNIT )
+*> \brief \b ZERRHS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRHS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRHS tests the error exits for ZGEBAK, CGEBAL, CGEHRD, ZUNGHR,
-* ZUNMHR, ZHSEQR, CHSEIN, and ZTREVC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRHS tests the error exits for ZGEBAK, CGEBAL, CGEHRD, ZUNGHR,
+*> ZUNMHR, ZHSEQR, CHSEIN, and ZTREVC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZERRHS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zerrst.f b/TESTING/EIG/zerrst.f
index e9ba144b..1f7c2fe2 100644
--- a/TESTING/EIG/zerrst.f
+++ b/TESTING/EIG/zerrst.f
@@ -1,30 +1,73 @@
- SUBROUTINE ZERRST( PATH, NUNIT )
+*> \brief \b ZERRST
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRST( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRST tests the error exits for ZHETRD, ZUNGTR, CUNMTR, ZHPTRD,
-* ZUNGTR, ZUPMTR, ZSTEQR, CSTEIN, ZPTEQR, ZHBTRD,
-* ZHEEV, CHEEVX, CHEEVD, ZHBEV, CHBEVX, CHBEVD,
-* ZHPEV, CHPEVX, CHPEVD, and ZSTEDC.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRST tests the error exits for ZHETRD, ZUNGTR, CUNMTR, ZHPTRD,
+*> ZUNGTR, ZUPMTR, ZSTEQR, CSTEIN, ZPTEQR, ZHBTRD,
+*> ZHEEV, CHEEVX, CHEEVD, ZHBEV, CHBEVX, CHBEVD,
+*> ZHPEV, CHPEVX, CHPEVD, and ZSTEDC.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ SUBROUTINE ZERRST( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zget02.f b/TESTING/EIG/zget02.f
index 9730c035..118c4a04 100644
--- a/TESTING/EIG/zget02.f
+++ b/TESTING/EIG/zget02.f
@@ -1,9 +1,144 @@
+*> \brief \b ZGET02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET02 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A^T*x = b, where A^T is the transpose of A
+*> = 'C': A^H*x = b, where A^H is the conjugate transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET02 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A^T*x = b, where A^T is the transpose of A
-* = 'C': A^H*x = b, where A^H is the conjugate transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zget10.f b/TESTING/EIG/zget10.f
index 474fd6f5..f4582d59 100644
--- a/TESTING/EIG/zget10.f
+++ b/TESTING/EIG/zget10.f
@@ -1,51 +1,119 @@
- SUBROUTINE ZGET10( M, N, A, LDA, B, LDB, WORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, M, N
- DOUBLE PRECISION RESULT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
-* ..
-*
+*> \brief \b ZGET10
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET10( M, N, A, LDA, B, LDB, WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, M, N
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGET10 compares two matrices A and B and computes the ratio
-* RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET10 compares two matrices A and B and computes the ratio
+*> RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and B.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m by n matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> The m by n matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) COMPLEX*16 array, dimension (LDB,N)
-* The m by n matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,M).
+*> \ingroup complex16_eig
*
-* WORK (workspace) COMPLEX*16 array, dimension (M)
+* =====================================================================
+ SUBROUTINE ZGET10( M, N, A, LDA, B, LDB, WORK, RWORK, RESULT )
*
-* RWORK (workspace) COMPLEX*16 array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION
-* RESULT = norm( A - B ) / ( norm(A) * M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, M, N
+ DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zget22.f b/TESTING/EIG/zget22.f
index a7d80c6c..804b9352 100644
--- a/TESTING/EIG/zget22.f
+++ b/TESTING/EIG/zget22.f
@@ -1,86 +1,157 @@
- SUBROUTINE ZGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
- $ WORK, RWORK, RESULT )
+*> \brief \b ZGET22
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER TRANSA, TRANSE, TRANSW
- INTEGER LDA, LDE, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( 2 ), RWORK( * )
- COMPLEX*16 A( LDA, * ), E( LDE, * ), W( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
+* WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANSA, TRANSE, TRANSW
+* INTEGER LDA, LDE, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( 2 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), E( LDE, * ), W( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGET22 does an eigenvector check.
-*
-* The basic test is:
-*
-* RESULT(1) = | A E - E W | / ( |A| |E| ulp )
-*
-* using the 1-norm. It also tests the normalization of E:
-*
-* RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
-* j
-*
-* where E(j) is the j-th eigenvector, and m-norm is the max-norm of a
-* vector. The max-norm of a complex n-vector x in this case is the
-* maximum of |re(x(i)| + |im(x(i)| over i = 1, ..., n.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET22 does an eigenvector check.
+*>
+*> The basic test is:
+*>
+*> RESULT(1) = | A E - E W | / ( |A| |E| ulp )
+*>
+*> using the 1-norm. It also tests the normalization of E:
+*>
+*> RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
+*> j
+*>
+*> where E(j) is the j-th eigenvector, and m-norm is the max-norm of a
+*> vector. The max-norm of a complex n-vector x in this case is the
+*> maximum of |re(x(i)| + |im(x(i)| over i = 1, ..., n.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* TRANSA (input) CHARACTER*1
-* Specifies whether or not A is transposed.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* TRANSE (input) CHARACTER*1
-* Specifies whether or not E is transposed.
-* = 'N': No transpose, eigenvectors are in columns of E
-* = 'T': Transpose, eigenvectors are in rows of E
-* = 'C': Conjugate transpose, eigenvectors are in rows of E
-*
-* TRANSW (input) CHARACTER*1
-* Specifies whether or not W is transposed.
-* = 'N': No transpose
-* = 'T': Transpose, same as TRANSW = 'N'
-* = 'C': Conjugate transpose, use -WI(j) instead of WI(j)
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The matrix whose eigenvectors are in E.
+* =========
+*
+*> \param[in] TRANSA
+*> \verbatim
+*> TRANSA is CHARACTER*1
+*> Specifies whether or not A is transposed.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[in] TRANSE
+*> \verbatim
+*> TRANSE is CHARACTER*1
+*> Specifies whether or not E is transposed.
+*> = 'N': No transpose, eigenvectors are in columns of E
+*> = 'T': Transpose, eigenvectors are in rows of E
+*> = 'C': Conjugate transpose, eigenvectors are in rows of E
+*> \endverbatim
+*>
+*> \param[in] TRANSW
+*> \verbatim
+*> TRANSW is CHARACTER*1
+*> Specifies whether or not W is transposed.
+*> = 'N': No transpose
+*> = 'T': Transpose, same as TRANSW = 'N'
+*> = 'C': Conjugate transpose, use -WI(j) instead of WI(j)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The matrix whose eigenvectors are in E.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (LDE,N)
+*> The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors
+*> are stored in the columns of E, if TRANSE = 'T' or 'C', the
+*> eigenvectors are stored in the rows of E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of the array E. LDE >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> The eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input) COMPLEX*16 array, dimension (LDE,N)
-* The matrix of eigenvectors. If TRANSE = 'N', the eigenvectors
-* are stored in the columns of E, if TRANSE = 'T' or 'C', the
-* eigenvectors are stored in the rows of E.
+*> \date November 2011
*
-* LDE (input) INTEGER
-* The leading dimension of the array E. LDE >= max(1,N).
+*> \ingroup complex16_eig
*
-* W (input) COMPLEX*16 array, dimension (N)
-* The eigenvalues of A.
+* =====================================================================
+ SUBROUTINE ZGET22( TRANSA, TRANSE, TRANSW, N, A, LDA, E, LDE, W,
+ $ WORK, RWORK, RESULT )
*
-* WORK (workspace) COMPLEX*16 array, dimension (N*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* .. Scalar Arguments ..
+ CHARACTER TRANSA, TRANSE, TRANSW
+ INTEGER LDA, LDE, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( 2 ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), E( LDE, * ), W( * ), WORK( * )
+* ..
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* RESULT(1) = | A E - E W | / ( |A| |E| ulp )
-* RESULT(2) = max | m-norm(E(j)) - 1 | / ( n ulp )
-* j
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zget23.f b/TESTING/EIG/zget23.f
index f7827425..4a5682e7 100644
--- a/TESTING/EIG/zget23.f
+++ b/TESTING/EIG/zget23.f
@@ -1,3 +1,369 @@
+*> \brief \b ZGET23
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET23( COMP, ISRT, BALANC, JTYPE, THRESH, ISEED,
+* NOUNIT, N, A, LDA, H, W, W1, VL, LDVL, VR,
+* LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
+* RCONDE, RCNDE1, RCDEIN, SCALE, SCALE1, RESULT,
+* WORK, LWORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL COMP
+* CHARACTER BALANC
+* INTEGER INFO, ISRT, JTYPE, LDA, LDLRE, LDVL, LDVR,
+* $ LWORK, N, NOUNIT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION RCDEIN( * ), RCDVIN( * ), RCNDE1( * ),
+* $ RCNDV1( * ), RCONDE( * ), RCONDV( * ),
+* $ RESULT( 11 ), RWORK( * ), SCALE( * ),
+* $ SCALE1( * )
+* COMPLEX*16 A( LDA, * ), H( LDA, * ), LRE( LDLRE, * ),
+* $ VL( LDVL, * ), VR( LDVR, * ), W( * ), W1( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET23 checks the nonsymmetric eigenvalue problem driver CGEEVX.
+*> If COMP = .FALSE., the first 8 of the following tests will be
+*> performed on the input matrix A, and also test 9 if LWORK is
+*> sufficiently large.
+*> if COMP is .TRUE. all 11 tests will be performed.
+*>
+*> (1) | A * VR - VR * W | / ( n |A| ulp )
+*>
+*> Here VR is the matrix of unit right eigenvectors.
+*> W is a diagonal matrix with diagonal entries W(j).
+*>
+*> (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
+*>
+*> Here VL is the matrix of unit left eigenvectors, A**H is the
+*> conjugate transpose of A, and W is as above.
+*>
+*> (3) | |VR(i)| - 1 | / ulp and largest component real
+*>
+*> VR(i) denotes the i-th column of VR.
+*>
+*> (4) | |VL(i)| - 1 | / ulp and largest component real
+*>
+*> VL(i) denotes the i-th column of VL.
+*>
+*> (5) 0 if W(full) = W(partial), 1/ulp otherwise
+*>
+*> W(full) denotes the eigenvalues computed when VR, VL, RCONDV
+*> and RCONDE are also computed, and W(partial) denotes the
+*> eigenvalues computed when only some of VR, VL, RCONDV, and
+*> RCONDE are computed.
+*>
+*> (6) 0 if VR(full) = VR(partial), 1/ulp otherwise
+*>
+*> VR(full) denotes the right eigenvectors computed when VL, RCONDV
+*> and RCONDE are computed, and VR(partial) denotes the result
+*> when only some of VL and RCONDV are computed.
+*>
+*> (7) 0 if VL(full) = VL(partial), 1/ulp otherwise
+*>
+*> VL(full) denotes the left eigenvectors computed when VR, RCONDV
+*> and RCONDE are computed, and VL(partial) denotes the result
+*> when only some of VR and RCONDV are computed.
+*>
+*> (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
+*> SCALE, ILO, IHI, ABNRM (partial)
+*> 1/ulp otherwise
+*>
+*> SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
+*> (full) is when VR, VL, RCONDE and RCONDV are also computed, and
+*> (partial) is when some are not computed.
+*>
+*> (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise
+*>
+*> RCONDV(full) denotes the reciprocal condition numbers of the
+*> right eigenvectors computed when VR, VL and RCONDE are also
+*> computed. RCONDV(partial) denotes the reciprocal condition
+*> numbers when only some of VR, VL and RCONDE are computed.
+*>
+*> (10) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right eigenvector condition number
+*> computed by ZGEEVX and RCDVIN (the precomputed true value)
+*> is supplied as input. cond(RCONDV) is the condition number of
+*> RCONDV, and takes errors in computing RCONDV into account, so
+*> that the resulting quantity should be O(ULP). cond(RCONDV) is
+*> essentially given by norm(A)/RCONDE.
+*>
+*> (11) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal eigenvalue condition number
+*> computed by ZGEEVX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMP
+*> \verbatim
+*> COMP is LOGICAL
+*> COMP describes which input tests to perform:
+*> = .FALSE. if the computed condition numbers are not to
+*> be tested against RCDVIN and RCDEIN
+*> = .TRUE. if they are to be compared
+*> \endverbatim
+*>
+*> \param[in] ISRT
+*> \verbatim
+*> ISRT is INTEGER
+*> If COMP = .TRUE., ISRT indicates in how the eigenvalues
+*> corresponding to values in RCDVIN and RCDEIN are ordered:
+*> = 0 means the eigenvalues are sorted by
+*> increasing real part
+*> = 1 means the eigenvalues are sorted by
+*> increasing imaginary part
+*> If COMP = .FALSE., ISRT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] BALANC
+*> \verbatim
+*> BALANC is CHARACTER
+*> Describes the balancing option to be tested.
+*> = 'N' for no permuting or diagonal scaling
+*> = 'P' for permuting but no diagonal scaling
+*> = 'S' for no permuting but diagonal scaling
+*> = 'B' for permuting and diagonal scaling
+*> \endverbatim
+*>
+*> \param[in] JTYPE
+*> \verbatim
+*> JTYPE is INTEGER
+*> Type of input matrix. Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> If COMP = .FALSE., the random number generator seed
+*> used to produce matrix.
+*> If COMP = .TRUE., ISEED(1) = the number of the example.
+*> Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of A. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least N.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDA,N)
+*> Another copy of the test matrix A, modified by ZGEEVX.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> Contains the eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] W1
+*> \verbatim
+*> W1 is COMPLEX*16 array, dimension (N)
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when ZGEEVX only computes a partial
+*> eigendecomposition, i.e. not the eigenvalues and left
+*> and right eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*> VL is COMPLEX*16 array, dimension (LDVL,N)
+*> VL holds the computed left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*> LDVL is INTEGER
+*> Leading dimension of VL. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*> VR is COMPLEX*16 array, dimension (LDVR,N)
+*> VR holds the computed right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*> LDVR is INTEGER
+*> Leading dimension of VR. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] LRE
+*> \verbatim
+*> LRE is COMPLEX*16 array, dimension (LDLRE,N)
+*> LRE holds the computed right or left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDLRE
+*> \verbatim
+*> LDLRE is INTEGER
+*> Leading dimension of LRE. Must be at least max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCONDV
+*> \verbatim
+*> RCONDV is DOUBLE PRECISION array, dimension (N)
+*> RCONDV holds the computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[out] RCNDV1
+*> \verbatim
+*> RCNDV1 is DOUBLE PRECISION array, dimension (N)
+*> RCNDV1 holds more computed reciprocal condition numbers
+*> for eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] RCDVIN
+*> \verbatim
+*> RCDVIN is DOUBLE PRECISION array, dimension (N)
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition numbers for eigenvectors to be compared with
+*> RCONDV.
+*> \endverbatim
+*>
+*> \param[out] RCONDE
+*> \verbatim
+*> RCONDE is DOUBLE PRECISION array, dimension (N)
+*> RCONDE holds the computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] RCNDE1
+*> \verbatim
+*> RCNDE1 is DOUBLE PRECISION array, dimension (N)
+*> RCNDE1 holds more computed reciprocal condition numbers
+*> for eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] RCDEIN
+*> \verbatim
+*> RCDEIN is DOUBLE PRECISION array, dimension (N)
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition numbers for eigenvalues to be compared with
+*> RCONDE.
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION array, dimension (N)
+*> Holds information describing balancing of matrix.
+*> \endverbatim
+*>
+*> \param[out] SCALE1
+*> \verbatim
+*> SCALE1 is DOUBLE PRECISION array, dimension (N)
+*> Holds information describing balancing of matrix.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (11)
+*> The values computed by the 11 tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK. This must be at least
+*> 2*N, and 2*N+N**2 if tests 9, 10 or 11 are to be performed.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> If <0, input parameter -INFO had an incorrect value.
+*> If >0, ZGEEVX returned an error code, the absolute
+*> value of which is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGET23( COMP, ISRT, BALANC, JTYPE, THRESH, ISEED,
$ NOUNIT, N, A, LDA, H, W, W1, VL, LDVL, VR,
$ LDVR, LRE, LDLRE, RCONDV, RCNDV1, RCDVIN,
@@ -5,8 +371,9 @@
$ WORK, LWORK, RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL COMP
@@ -26,223 +393,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET23 checks the nonsymmetric eigenvalue problem driver CGEEVX.
-* If COMP = .FALSE., the first 8 of the following tests will be
-* performed on the input matrix A, and also test 9 if LWORK is
-* sufficiently large.
-* if COMP is .TRUE. all 11 tests will be performed.
-*
-* (1) | A * VR - VR * W | / ( n |A| ulp )
-*
-* Here VR is the matrix of unit right eigenvectors.
-* W is a diagonal matrix with diagonal entries W(j).
-*
-* (2) | A**H * VL - VL * W**H | / ( n |A| ulp )
-*
-* Here VL is the matrix of unit left eigenvectors, A**H is the
-* conjugate transpose of A, and W is as above.
-*
-* (3) | |VR(i)| - 1 | / ulp and largest component real
-*
-* VR(i) denotes the i-th column of VR.
-*
-* (4) | |VL(i)| - 1 | / ulp and largest component real
-*
-* VL(i) denotes the i-th column of VL.
-*
-* (5) 0 if W(full) = W(partial), 1/ulp otherwise
-*
-* W(full) denotes the eigenvalues computed when VR, VL, RCONDV
-* and RCONDE are also computed, and W(partial) denotes the
-* eigenvalues computed when only some of VR, VL, RCONDV, and
-* RCONDE are computed.
-*
-* (6) 0 if VR(full) = VR(partial), 1/ulp otherwise
-*
-* VR(full) denotes the right eigenvectors computed when VL, RCONDV
-* and RCONDE are computed, and VR(partial) denotes the result
-* when only some of VL and RCONDV are computed.
-*
-* (7) 0 if VL(full) = VL(partial), 1/ulp otherwise
-*
-* VL(full) denotes the left eigenvectors computed when VR, RCONDV
-* and RCONDE are computed, and VL(partial) denotes the result
-* when only some of VR and RCONDV are computed.
-*
-* (8) 0 if SCALE, ILO, IHI, ABNRM (full) =
-* SCALE, ILO, IHI, ABNRM (partial)
-* 1/ulp otherwise
-*
-* SCALE, ILO, IHI and ABNRM describe how the matrix is balanced.
-* (full) is when VR, VL, RCONDE and RCONDV are also computed, and
-* (partial) is when some are not computed.
-*
-* (9) 0 if RCONDV(full) = RCONDV(partial), 1/ulp otherwise
-*
-* RCONDV(full) denotes the reciprocal condition numbers of the
-* right eigenvectors computed when VR, VL and RCONDE are also
-* computed. RCONDV(partial) denotes the reciprocal condition
-* numbers when only some of VR, VL and RCONDE are computed.
-*
-* (10) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right eigenvector condition number
-* computed by ZGEEVX and RCDVIN (the precomputed true value)
-* is supplied as input. cond(RCONDV) is the condition number of
-* RCONDV, and takes errors in computing RCONDV into account, so
-* that the resulting quantity should be O(ULP). cond(RCONDV) is
-* essentially given by norm(A)/RCONDE.
-*
-* (11) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal eigenvalue condition number
-* computed by ZGEEVX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* Arguments
-* =========
-*
-* COMP (input) LOGICAL
-* COMP describes which input tests to perform:
-* = .FALSE. if the computed condition numbers are not to
-* be tested against RCDVIN and RCDEIN
-* = .TRUE. if they are to be compared
-*
-* ISRT (input) INTEGER
-* If COMP = .TRUE., ISRT indicates in how the eigenvalues
-* corresponding to values in RCDVIN and RCDEIN are ordered:
-* = 0 means the eigenvalues are sorted by
-* increasing real part
-* = 1 means the eigenvalues are sorted by
-* increasing imaginary part
-* If COMP = .FALSE., ISRT is not referenced.
-*
-* BALANC (input) CHARACTER
-* Describes the balancing option to be tested.
-* = 'N' for no permuting or diagonal scaling
-* = 'P' for permuting but no diagonal scaling
-* = 'S' for no permuting but diagonal scaling
-* = 'B' for permuting and diagonal scaling
-*
-* JTYPE (input) INTEGER
-* Type of input matrix. Used to label output if error occurs.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* ISEED (input) INTEGER array, dimension (4)
-* If COMP = .FALSE., the random number generator seed
-* used to produce matrix.
-* If COMP = .TRUE., ISEED(1) = the number of the example.
-* Used to label output if error occurs.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* N (input) INTEGER
-* The dimension of A. N must be at least 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least N.
-*
-* H (workspace) COMPLEX*16 array, dimension (LDA,N)
-* Another copy of the test matrix A, modified by ZGEEVX.
-*
-* W (workspace) COMPLEX*16 array, dimension (N)
-* Contains the eigenvalues of A.
-*
-* W1 (workspace) COMPLEX*16 array, dimension (N)
-* Like W, this array contains the eigenvalues of A,
-* but those computed when ZGEEVX only computes a partial
-* eigendecomposition, i.e. not the eigenvalues and left
-* and right eigenvectors.
-*
-* VL (workspace) COMPLEX*16 array, dimension (LDVL,N)
-* VL holds the computed left eigenvectors.
-*
-* LDVL (input) INTEGER
-* Leading dimension of VL. Must be at least max(1,N).
-*
-* VR (workspace) COMPLEX*16 array, dimension (LDVR,N)
-* VR holds the computed right eigenvectors.
-*
-* LDVR (input) INTEGER
-* Leading dimension of VR. Must be at least max(1,N).
-*
-* LRE (workspace) COMPLEX*16 array, dimension (LDLRE,N)
-* LRE holds the computed right or left eigenvectors.
-*
-* LDLRE (input) INTEGER
-* Leading dimension of LRE. Must be at least max(1,N).
-*
-* RCONDV (workspace) DOUBLE PRECISION array, dimension (N)
-* RCONDV holds the computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCNDV1 (workspace) DOUBLE PRECISION array, dimension (N)
-* RCNDV1 holds more computed reciprocal condition numbers
-* for eigenvectors.
-*
-* RCDVIN (input) DOUBLE PRECISION array, dimension (N)
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition numbers for eigenvectors to be compared with
-* RCONDV.
-*
-* RCONDE (workspace) DOUBLE PRECISION array, dimension (N)
-* RCONDE holds the computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCNDE1 (workspace) DOUBLE PRECISION array, dimension (N)
-* RCNDE1 holds more computed reciprocal condition numbers
-* for eigenvalues.
-*
-* RCDEIN (input) DOUBLE PRECISION array, dimension (N)
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition numbers for eigenvalues to be compared with
-* RCONDE.
-*
-* SCALE (workspace) DOUBLE PRECISION array, dimension (N)
-* Holds information describing balancing of matrix.
-*
-* SCALE1 (workspace) DOUBLE PRECISION array, dimension (N)
-* Holds information describing balancing of matrix.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (11)
-* The values computed by the 11 tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK. This must be at least
-* 2*N, and 2*N+N**2 if tests 9, 10 or 11 are to be performed.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N)
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* If <0, input parameter -INFO had an incorrect value.
-* If >0, ZGEEVX returned an error code, the absolute
-* value of which is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zget24.f b/TESTING/EIG/zget24.f
index d65dfb82..b68b008b 100644
--- a/TESTING/EIG/zget24.f
+++ b/TESTING/EIG/zget24.f
@@ -1,11 +1,346 @@
+*> \brief \b ZGET24
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
+* H, HT, W, WT, WTMP, VS, LDVS, VS1, RCDEIN,
+* RCDVIN, NSLCT, ISLCT, ISRT, RESULT, WORK,
+* LWORK, RWORK, BWORK, INFO )
+*
+* .. Scalar Arguments ..
+* LOGICAL COMP
+* INTEGER INFO, ISRT, JTYPE, LDA, LDVS, LWORK, N, NOUNIT,
+* $ NSLCT
+* DOUBLE PRECISION RCDEIN, RCDVIN, THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL BWORK( * )
+* INTEGER ISEED( 4 ), ISLCT( * )
+* DOUBLE PRECISION RESULT( 17 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), H( LDA, * ), HT( LDA, * ),
+* $ VS( LDVS, * ), VS1( LDVS, * ), W( * ),
+* $ WORK( * ), WT( * ), WTMP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET24 checks the nonsymmetric eigenvalue (Schur form) problem
+*> expert driver ZGEESX.
+*>
+*> If COMP = .FALSE., the first 13 of the following tests will be
+*> be performed on the input matrix A, and also tests 14 and 15
+*> if LWORK is sufficiently large.
+*> If COMP = .TRUE., all 17 test will be performed.
+*>
+*> (1) 0 if T is in Schur form, 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (2) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (no sorting of eigenvalues).
+*>
+*> (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
+*>
+*> (4) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (5) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> (no sorting of eigenvalues)
+*>
+*> (7) 0 if T is in Schur form, 1/ulp otherwise
+*> (with sorting of eigenvalues)
+*>
+*> (8) | A - VS T VS' | / ( n |A| ulp )
+*>
+*> Here VS is the matrix of Schur eigenvectors, and T is in Schur
+*> form (with sorting of eigenvalues).
+*>
+*> (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
+*>
+*> (10) 0 if W are eigenvalues of T
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare W with and
+*> without reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (11) 0 if T(with VS) = T(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare T with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
+*> 1/ulp otherwise
+*> If workspace sufficient, also compare VS with and without
+*> reciprocal condition numbers
+*> (with sorting of eigenvalues)
+*>
+*> (13) if sorting worked and SDIM is the number of
+*> eigenvalues which were SELECTed
+*> If workspace sufficient, also compare SDIM with and
+*> without reciprocal condition numbers
+*>
+*> (14) if RCONDE the same no matter if VS and/or RCONDV computed
+*>
+*> (15) if RCONDV the same no matter if VS and/or RCONDE computed
+*>
+*> (16) |RCONDE - RCDEIN| / cond(RCONDE)
+*>
+*> RCONDE is the reciprocal average eigenvalue condition number
+*> computed by ZGEESX and RCDEIN (the precomputed true value)
+*> is supplied as input. cond(RCONDE) is the condition number
+*> of RCONDE, and takes errors in computing RCONDE into account,
+*> so that the resulting quantity should be O(ULP). cond(RCONDE)
+*> is essentially given by norm(A)/RCONDV.
+*>
+*> (17) |RCONDV - RCDVIN| / cond(RCONDV)
+*>
+*> RCONDV is the reciprocal right invariant subspace condition
+*> number computed by ZGEESX and RCDVIN (the precomputed true
+*> value) is supplied as input. cond(RCONDV) is the condition
+*> number of RCONDV, and takes errors in computing RCONDV into
+*> account, so that the resulting quantity should be O(ULP).
+*> cond(RCONDV) is essentially given by norm(A)/RCONDE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] COMP
+*> \verbatim
+*> COMP is LOGICAL
+*> COMP describes which input tests to perform:
+*> = .FALSE. if the computed condition numbers are not to
+*> be tested against RCDVIN and RCDEIN
+*> = .TRUE. if they are to be compared
+*> \endverbatim
+*>
+*> \param[in] JTYPE
+*> \verbatim
+*> JTYPE is INTEGER
+*> Type of input matrix. Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> If COMP = .FALSE., the random number generator seed
+*> used to produce matrix.
+*> If COMP = .TRUE., ISEED(1) = the number of the example.
+*> Used to label output if error occurs.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> A test will count as "failed" if the "error", computed as
+*> described above, exceeds THRESH. Note that the error
+*> is scaled to be O(1), so THRESH should be a reasonably
+*> small multiple of 1, e.g., 10 or 100. In particular,
+*> it should not depend on the precision (single vs. double)
+*> or the size of the matrix. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] NOUNIT
+*> \verbatim
+*> NOUNIT is INTEGER
+*> The FORTRAN unit number for printing out error messages
+*> (e.g., if a routine returns INFO not equal to 0.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of A. N must be at least 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> Used to hold the matrix whose eigenvalues are to be
+*> computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, and H. LDA must be at
+*> least 1 and at least N.
+*> \endverbatim
+*>
+*> \param[out] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDA, N)
+*> Another copy of the test matrix A, modified by ZGEESX.
+*> \endverbatim
+*>
+*> \param[out] HT
+*> \verbatim
+*> HT is COMPLEX*16 array, dimension (LDA, N)
+*> Yet another copy of the test matrix A, modified by ZGEESX.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*> W is COMPLEX*16 array, dimension (N)
+*> The computed eigenvalues of A.
+*> \endverbatim
+*>
+*> \param[out] WT
+*> \verbatim
+*> WT is COMPLEX*16 array, dimension (N)
+*> Like W, this array contains the eigenvalues of A,
+*> but those computed when ZGEESX only computes a partial
+*> eigendecomposition, i.e. not Schur vectors
+*> \endverbatim
+*>
+*> \param[out] WTMP
+*> \verbatim
+*> WTMP is COMPLEX*16 array, dimension (N)
+*> Like W, this array contains the eigenvalues of A,
+*> but sorted by increasing real or imaginary part.
+*> \endverbatim
+*>
+*> \param[out] VS
+*> \verbatim
+*> VS is COMPLEX*16 array, dimension (LDVS, N)
+*> VS holds the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] LDVS
+*> \verbatim
+*> LDVS is INTEGER
+*> Leading dimension of VS. Must be at least max(1, N).
+*> \endverbatim
+*>
+*> \param[out] VS1
+*> \verbatim
+*> VS1 is COMPLEX*16 array, dimension (LDVS, N)
+*> VS1 holds another copy of the computed Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] RCDEIN
+*> \verbatim
+*> RCDEIN is DOUBLE PRECISION
+*> When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
+*> condition number for the average of selected eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] RCDVIN
+*> \verbatim
+*> RCDVIN is DOUBLE PRECISION
+*> When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
+*> condition number for the selected right invariant subspace.
+*> \endverbatim
+*>
+*> \param[in] NSLCT
+*> \verbatim
+*> NSLCT is INTEGER
+*> When COMP = .TRUE. the number of selected eigenvalues
+*> corresponding to the precomputed values RCDEIN and RCDVIN.
+*> \endverbatim
+*>
+*> \param[in] ISLCT
+*> \verbatim
+*> ISLCT is INTEGER array, dimension (NSLCT)
+*> When COMP = .TRUE. ISLCT selects the eigenvalues of the
+*> input matrix corresponding to the precomputed values RCDEIN
+*> and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the
+*> eigenvalue with the J-th largest real or imaginary part is
+*> selected. The real part is used if ISRT = 0, and the
+*> imaginary part if ISRT = 1.
+*> Not referenced if COMP = .FALSE.
+*> \endverbatim
+*>
+*> \param[in] ISRT
+*> \verbatim
+*> ISRT is INTEGER
+*> When COMP = .TRUE., ISRT describes how ISLCT is used to
+*> choose a subset of the spectrum.
+*> Not referenced if COMP = .FALSE.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (17)
+*> The values computed by the 17 tests described above.
+*> The values are currently limited to 1/ulp, to avoid
+*> overflow.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N*N)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The number of entries in WORK to be passed to ZGEESX. This
+*> must be at least 2*N, and N*(N+1)/2 if tests 14--16 are to
+*> be performed.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*> BWORK is LOGICAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> If 0, successful exit.
+*> If <0, input parameter -INFO had an incorrect value.
+*> If >0, ZGEESX returned an error code, the absolute
+*> value of which is returned.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGET24( COMP, JTYPE, THRESH, ISEED, NOUNIT, N, A, LDA,
$ H, HT, W, WT, WTMP, VS, LDVS, VS1, RCDEIN,
$ RCDVIN, NSLCT, ISLCT, ISRT, RESULT, WORK,
$ LWORK, RWORK, BWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL COMP
@@ -22,210 +357,6 @@
$ WORK( * ), WT( * ), WTMP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET24 checks the nonsymmetric eigenvalue (Schur form) problem
-* expert driver ZGEESX.
-*
-* If COMP = .FALSE., the first 13 of the following tests will be
-* be performed on the input matrix A, and also tests 14 and 15
-* if LWORK is sufficiently large.
-* If COMP = .TRUE., all 17 test will be performed.
-*
-* (1) 0 if T is in Schur form, 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (2) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (no sorting of eigenvalues).
-*
-* (3) | I - VS VS' | / ( n ulp ) (no sorting of eigenvalues).
-*
-* (4) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (5) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (6) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* (no sorting of eigenvalues)
-*
-* (7) 0 if T is in Schur form, 1/ulp otherwise
-* (with sorting of eigenvalues)
-*
-* (8) | A - VS T VS' | / ( n |A| ulp )
-*
-* Here VS is the matrix of Schur eigenvectors, and T is in Schur
-* form (with sorting of eigenvalues).
-*
-* (9) | I - VS VS' | / ( n ulp ) (with sorting of eigenvalues).
-*
-* (10) 0 if W are eigenvalues of T
-* 1/ulp otherwise
-* If workspace sufficient, also compare W with and
-* without reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (11) 0 if T(with VS) = T(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare T with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (12) 0 if eigenvalues(with VS) = eigenvalues(without VS),
-* 1/ulp otherwise
-* If workspace sufficient, also compare VS with and without
-* reciprocal condition numbers
-* (with sorting of eigenvalues)
-*
-* (13) if sorting worked and SDIM is the number of
-* eigenvalues which were SELECTed
-* If workspace sufficient, also compare SDIM with and
-* without reciprocal condition numbers
-*
-* (14) if RCONDE the same no matter if VS and/or RCONDV computed
-*
-* (15) if RCONDV the same no matter if VS and/or RCONDE computed
-*
-* (16) |RCONDE - RCDEIN| / cond(RCONDE)
-*
-* RCONDE is the reciprocal average eigenvalue condition number
-* computed by ZGEESX and RCDEIN (the precomputed true value)
-* is supplied as input. cond(RCONDE) is the condition number
-* of RCONDE, and takes errors in computing RCONDE into account,
-* so that the resulting quantity should be O(ULP). cond(RCONDE)
-* is essentially given by norm(A)/RCONDV.
-*
-* (17) |RCONDV - RCDVIN| / cond(RCONDV)
-*
-* RCONDV is the reciprocal right invariant subspace condition
-* number computed by ZGEESX and RCDVIN (the precomputed true
-* value) is supplied as input. cond(RCONDV) is the condition
-* number of RCONDV, and takes errors in computing RCONDV into
-* account, so that the resulting quantity should be O(ULP).
-* cond(RCONDV) is essentially given by norm(A)/RCONDE.
-*
-* Arguments
-* =========
-*
-* COMP (input) LOGICAL
-* COMP describes which input tests to perform:
-* = .FALSE. if the computed condition numbers are not to
-* be tested against RCDVIN and RCDEIN
-* = .TRUE. if they are to be compared
-*
-* JTYPE (input) INTEGER
-* Type of input matrix. Used to label output if error occurs.
-*
-* ISEED (input) INTEGER array, dimension (4)
-* If COMP = .FALSE., the random number generator seed
-* used to produce matrix.
-* If COMP = .TRUE., ISEED(1) = the number of the example.
-* Used to label output if error occurs.
-*
-* THRESH (input) DOUBLE PRECISION
-* A test will count as "failed" if the "error", computed as
-* described above, exceeds THRESH. Note that the error
-* is scaled to be O(1), so THRESH should be a reasonably
-* small multiple of 1, e.g., 10 or 100. In particular,
-* it should not depend on the precision (single vs. double)
-* or the size of the matrix. It must be at least zero.
-*
-* NOUNIT (input) INTEGER
-* The FORTRAN unit number for printing out error messages
-* (e.g., if a routine returns INFO not equal to 0.)
-*
-* N (input) INTEGER
-* The dimension of A. N must be at least 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA, N)
-* Used to hold the matrix whose eigenvalues are to be
-* computed.
-*
-* LDA (input) INTEGER
-* The leading dimension of A, and H. LDA must be at
-* least 1 and at least N.
-*
-* H (workspace) COMPLEX*16 array, dimension (LDA, N)
-* Another copy of the test matrix A, modified by ZGEESX.
-*
-* HT (workspace) COMPLEX*16 array, dimension (LDA, N)
-* Yet another copy of the test matrix A, modified by ZGEESX.
-*
-* W (workspace) COMPLEX*16 array, dimension (N)
-* The computed eigenvalues of A.
-*
-* WT (workspace) COMPLEX*16 array, dimension (N)
-* Like W, this array contains the eigenvalues of A,
-* but those computed when ZGEESX only computes a partial
-* eigendecomposition, i.e. not Schur vectors
-*
-* WTMP (workspace) COMPLEX*16 array, dimension (N)
-* Like W, this array contains the eigenvalues of A,
-* but sorted by increasing real or imaginary part.
-*
-* VS (workspace) COMPLEX*16 array, dimension (LDVS, N)
-* VS holds the computed Schur vectors.
-*
-* LDVS (input) INTEGER
-* Leading dimension of VS. Must be at least max(1, N).
-*
-* VS1 (workspace) COMPLEX*16 array, dimension (LDVS, N)
-* VS1 holds another copy of the computed Schur vectors.
-*
-* RCDEIN (input) DOUBLE PRECISION
-* When COMP = .TRUE. RCDEIN holds the precomputed reciprocal
-* condition number for the average of selected eigenvalues.
-*
-* RCDVIN (input) DOUBLE PRECISION
-* When COMP = .TRUE. RCDVIN holds the precomputed reciprocal
-* condition number for the selected right invariant subspace.
-*
-* NSLCT (input) INTEGER
-* When COMP = .TRUE. the number of selected eigenvalues
-* corresponding to the precomputed values RCDEIN and RCDVIN.
-*
-* ISLCT (input) INTEGER array, dimension (NSLCT)
-* When COMP = .TRUE. ISLCT selects the eigenvalues of the
-* input matrix corresponding to the precomputed values RCDEIN
-* and RCDVIN. For I=1, ... ,NSLCT, if ISLCT(I) = J, then the
-* eigenvalue with the J-th largest real or imaginary part is
-* selected. The real part is used if ISRT = 0, and the
-* imaginary part if ISRT = 1.
-* Not referenced if COMP = .FALSE.
-*
-* ISRT (input) INTEGER
-* When COMP = .TRUE., ISRT describes how ISLCT is used to
-* choose a subset of the spectrum.
-* Not referenced if COMP = .FALSE.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (17)
-* The values computed by the 17 tests described above.
-* The values are currently limited to 1/ulp, to avoid
-* overflow.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N*N)
-*
-* LWORK (input) INTEGER
-* The number of entries in WORK to be passed to ZGEESX. This
-* must be at least 2*N, and N*(N+1)/2 if tests 14--16 are to
-* be performed.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* BWORK (workspace) LOGICAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* If 0, successful exit.
-* If <0, input parameter -INFO had an incorrect value.
-* If >0, ZGEESX returned an error code, the absolute
-* value of which is returned.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zget35.f b/TESTING/EIG/zget35.f
index 0c18ca82..d89cf547 100644
--- a/TESTING/EIG/zget35.f
+++ b/TESTING/EIG/zget35.f
@@ -1,48 +1,100 @@
- SUBROUTINE ZGET35( RMAX, LMAX, NINFO, KNT, NIN )
+*> \brief \b ZGET35
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NIN, NINFO
- DOUBLE PRECISION RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET35( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NIN, NINFO
+* DOUBLE PRECISION RMAX
+* ..
+*
* Purpose
* =======
*
-* ZGET35 tests ZTRSYL, a routine for solving the Sylvester matrix
-* equation
-*
-* op(A)*X + ISGN*X*op(B) = scale*C,
-*
-* A and B are assumed to be in Schur canonical form, op() represents an
-* optional transpose, and ISGN can be -1 or +1. Scale is an output
-* less than or equal to 1, chosen to avoid overflow in X.
-*
-* The test code verifies that the following residual is order 1:
-*
-* norm(op(A)*X + ISGN*X*op(B) - scale*C) /
-* (EPS*max(norm(A),norm(B))*norm(X))
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET35 tests ZTRSYL, a routine for solving the Sylvester matrix
+*> equation
+*>
+*> op(A)*X + ISGN*X*op(B) = scale*C,
+*>
+*> A and B are assumed to be in Schur canonical form, op() represents an
+*> optional transpose, and ISGN can be -1 or +1. Scale is an output
+*> less than or equal to 1, chosen to avoid overflow in X.
+*>
+*> The test code verifies that the following residual is order 1:
+*>
+*> norm(op(A)*X + ISGN*X*op(B) - scale*C) /
+*> (EPS*max(norm(A),norm(B))*norm(X))
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples where INFO is nonzero.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+*> \date November 2011
*
-* NINFO (output) INTEGER
-* Number of examples where INFO is nonzero.
+*> \ingroup complex16_eig
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* =====================================================================
+ SUBROUTINE ZGET35( RMAX, LMAX, NINFO, KNT, NIN )
*
-* NIN (input) INTEGER
-* Input logical unit number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NIN, NINFO
+ DOUBLE PRECISION RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zget36.f b/TESTING/EIG/zget36.f
index ecfe7ce0..d4628fae 100644
--- a/TESTING/EIG/zget36.f
+++ b/TESTING/EIG/zget36.f
@@ -1,49 +1,101 @@
- SUBROUTINE ZGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*> \brief \b ZGET36
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER KNT, LMAX, NIN, NINFO
- DOUBLE PRECISION RMAX
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET36( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, LMAX, NIN, NINFO
+* DOUBLE PRECISION RMAX
+* ..
+*
* Purpose
* =======
*
-* ZGET36 tests ZTREXC, a routine for reordering diagonal entries of a
-* matrix in complex Schur form. Thus, ZLAEXC computes a unitary matrix
-* Q such that
-*
-* Q' * T1 * Q = T2
-*
-* and where one of the diagonal blocks of T1 (the one at row IFST) has
-* been moved to position ILST.
-*
-* The test code verifies that the residual Q'*T1*Q-T2 is small, that T2
-* is in Schur form, and that the final position of the IFST block is
-* ILST.
-*
-* The test matrices are read from a file with logical unit number NIN.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET36 tests ZTREXC, a routine for reordering diagonal entries of a
+*> matrix in complex Schur form. Thus, ZLAEXC computes a unitary matrix
+*> Q such that
+*>
+*> Q' * T1 * Q = T2
+*>
+*> and where one of the diagonal blocks of T1 (the one at row IFST) has
+*> been moved to position ILST.
+*>
+*> The test code verifies that the residual Q'*T1*Q-T2 is small, that T2
+*> is in Schur form, and that the final position of the IFST block is
+*> ILST.
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION
+*> Value of the largest test ratio.
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER
+*> Example number where largest test ratio achieved.
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER
+*> Number of examples where INFO is nonzero.
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RMAX (output) DOUBLE PRECISION
-* Value of the largest test ratio.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LMAX (output) INTEGER
-* Example number where largest test ratio achieved.
+*> \date November 2011
*
-* NINFO (output) INTEGER
-* Number of examples where INFO is nonzero.
+*> \ingroup complex16_eig
*
-* KNT (output) INTEGER
-* Total number of examples tested.
+* =====================================================================
+ SUBROUTINE ZGET36( RMAX, LMAX, NINFO, KNT, NIN )
*
-* NIN (input) INTEGER
-* Input logical unit number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER KNT, LMAX, NIN, NINFO
+ DOUBLE PRECISION RMAX
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zget37.f b/TESTING/EIG/zget37.f
index 5744ab28..eeffa46d 100644
--- a/TESTING/EIG/zget37.f
+++ b/TESTING/EIG/zget37.f
@@ -1,8 +1,101 @@
+*> \brief \b ZGET37
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET37( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, NIN
+* ..
+* .. Array Arguments ..
+* INTEGER LMAX( 3 ), NINFO( 3 )
+* DOUBLE PRECISION RMAX( 3 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET37 tests ZTRSNA, a routine for estimating condition numbers of
+*> eigenvalues and/or right eigenvectors of a matrix.
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION array, dimension (3)
+*> Value of the largest test ratio.
+*> RMAX(1) = largest ratio comparing different calls to ZTRSNA
+*> RMAX(2) = largest error in reciprocal condition
+*> numbers taking their conditioning into account
+*> RMAX(3) = largest error in reciprocal condition
+*> numbers not taking their conditioning into
+*> account (may be larger than RMAX(2))
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER array, dimension (3)
+*> LMAX(i) is example number where largest test ratio
+*> RMAX(i) is achieved. Also:
+*> If ZGEHRD returns INFO nonzero on example i, LMAX(1)=i
+*> If ZHSEQR returns INFO nonzero on example i, LMAX(2)=i
+*> If ZTRSNA returns INFO nonzero on example i, LMAX(3)=i
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = No. of times ZGEHRD returned INFO nonzero
+*> NINFO(2) = No. of times ZHSEQR returned INFO nonzero
+*> NINFO(3) = No. of times ZTRSNA returned INFO nonzero
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGET37( RMAX, LMAX, NINFO, KNT, NIN )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KNT, NIN
@@ -12,44 +105,6 @@
DOUBLE PRECISION RMAX( 3 )
* ..
*
-* Purpose
-* =======
-*
-* ZGET37 tests ZTRSNA, a routine for estimating condition numbers of
-* eigenvalues and/or right eigenvectors of a matrix.
-*
-* The test matrices are read from a file with logical unit number NIN.
-*
-* Arguments
-* ==========
-*
-* RMAX (output) DOUBLE PRECISION array, dimension (3)
-* Value of the largest test ratio.
-* RMAX(1) = largest ratio comparing different calls to ZTRSNA
-* RMAX(2) = largest error in reciprocal condition
-* numbers taking their conditioning into account
-* RMAX(3) = largest error in reciprocal condition
-* numbers not taking their conditioning into
-* account (may be larger than RMAX(2))
-*
-* LMAX (output) INTEGER array, dimension (3)
-* LMAX(i) is example number where largest test ratio
-* RMAX(i) is achieved. Also:
-* If ZGEHRD returns INFO nonzero on example i, LMAX(1)=i
-* If ZHSEQR returns INFO nonzero on example i, LMAX(2)=i
-* If ZTRSNA returns INFO nonzero on example i, LMAX(3)=i
-*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = No. of times ZGEHRD returned INFO nonzero
-* NINFO(2) = No. of times ZHSEQR returned INFO nonzero
-* NINFO(3) = No. of times ZTRSNA returned INFO nonzero
-*
-* KNT (output) INTEGER
-* Total number of examples tested.
-*
-* NIN (input) INTEGER
-* Input logical unit number
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zget38.f b/TESTING/EIG/zget38.f
index f1995e71..d7573d72 100644
--- a/TESTING/EIG/zget38.f
+++ b/TESTING/EIG/zget38.f
@@ -1,8 +1,102 @@
+*> \brief \b ZGET38
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET38( RMAX, LMAX, NINFO, KNT, NIN )
+*
+* .. Scalar Arguments ..
+* INTEGER KNT, NIN
+* ..
+* .. Array Arguments ..
+* INTEGER LMAX( 3 ), NINFO( 3 )
+* DOUBLE PRECISION RMAX( 3 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET38 tests ZTRSEN, a routine for estimating condition numbers of a
+*> cluster of eigenvalues and/or its associated right invariant subspace
+*>
+*> The test matrices are read from a file with logical unit number NIN.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[out] RMAX
+*> \verbatim
+*> RMAX is DOUBLE PRECISION array, dimension (3)
+*> Values of the largest test ratios.
+*> RMAX(1) = largest residuals from ZHST01 or comparing
+*> different calls to ZTRSEN
+*> RMAX(2) = largest error in reciprocal condition
+*> numbers taking their conditioning into account
+*> RMAX(3) = largest error in reciprocal condition
+*> numbers not taking their conditioning into
+*> account (may be larger than RMAX(2))
+*> \endverbatim
+*>
+*> \param[out] LMAX
+*> \verbatim
+*> LMAX is INTEGER array, dimension (3)
+*> LMAX(i) is example number where largest test ratio
+*> RMAX(i) is achieved. Also:
+*> If ZGEHRD returns INFO nonzero on example i, LMAX(1)=i
+*> If ZHSEQR returns INFO nonzero on example i, LMAX(2)=i
+*> If ZTRSEN returns INFO nonzero on example i, LMAX(3)=i
+*> \endverbatim
+*>
+*> \param[out] NINFO
+*> \verbatim
+*> NINFO is INTEGER array, dimension (3)
+*> NINFO(1) = No. of times ZGEHRD returned INFO nonzero
+*> NINFO(2) = No. of times ZHSEQR returned INFO nonzero
+*> NINFO(3) = No. of times ZTRSEN returned INFO nonzero
+*> \endverbatim
+*>
+*> \param[out] KNT
+*> \verbatim
+*> KNT is INTEGER
+*> Total number of examples tested.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> Input logical unit number.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGET38( RMAX, LMAX, NINFO, KNT, NIN )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER KNT, NIN
@@ -12,45 +106,6 @@
DOUBLE PRECISION RMAX( 3 )
* ..
*
-* Purpose
-* =======
-*
-* ZGET38 tests ZTRSEN, a routine for estimating condition numbers of a
-* cluster of eigenvalues and/or its associated right invariant subspace
-*
-* The test matrices are read from a file with logical unit number NIN.
-*
-* Arguments
-* ==========
-*
-* RMAX (output) DOUBLE PRECISION array, dimension (3)
-* Values of the largest test ratios.
-* RMAX(1) = largest residuals from ZHST01 or comparing
-* different calls to ZTRSEN
-* RMAX(2) = largest error in reciprocal condition
-* numbers taking their conditioning into account
-* RMAX(3) = largest error in reciprocal condition
-* numbers not taking their conditioning into
-* account (may be larger than RMAX(2))
-*
-* LMAX (output) INTEGER array, dimension (3)
-* LMAX(i) is example number where largest test ratio
-* RMAX(i) is achieved. Also:
-* If ZGEHRD returns INFO nonzero on example i, LMAX(1)=i
-* If ZHSEQR returns INFO nonzero on example i, LMAX(2)=i
-* If ZTRSEN returns INFO nonzero on example i, LMAX(3)=i
-*
-* NINFO (output) INTEGER array, dimension (3)
-* NINFO(1) = No. of times ZGEHRD returned INFO nonzero
-* NINFO(2) = No. of times ZHSEQR returned INFO nonzero
-* NINFO(3) = No. of times ZTRSEN returned INFO nonzero
-*
-* KNT (output) INTEGER
-* Total number of examples tested.
-*
-* NIN (input) INTEGER
-* Input logical unit number.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zget51.f b/TESTING/EIG/zget51.f
index fbdcbd88..abc858ab 100644
--- a/TESTING/EIG/zget51.f
+++ b/TESTING/EIG/zget51.f
@@ -1,9 +1,165 @@
+*> \brief \b ZGET51
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER ITYPE, LDA, LDB, LDU, LDV, N
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET51 generally checks a decomposition of the form
+*>
+*> A = U B VC>
+*> where * means conjugate transpose and U and V are unitary.
+*>
+*> Specifically, if ITYPE=1
+*>
+*> RESULT = | A - U B V* | / ( |A| n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT = | A - B | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT = | I - UU* | / ( n ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> =1: RESULT = | A - U B V* | / ( |A| n ulp )
+*> =2: RESULT = | A - B | / ( |A| n ulp )
+*> =3: RESULT = | I - UU* | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, ZGET51 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> The original (unfactored) matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> The factored matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU, N)
+*> The unitary matrix on the left-hand side in the
+*> decomposition.
+*> Not referenced if ITYPE=2
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV, N)
+*> The unitary matrix on the left-hand side in the
+*> decomposition.
+*> Not referenced if ITYPE=2
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> The values computed by the test specified by ITYPE. The
+*> value is currently limited to 1/ulp, to avoid overflow.
+*> Errors are flagged by RESULT=10/ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGET51( ITYPE, N, A, LDA, B, LDB, U, LDU, V, LDV, WORK,
$ RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER ITYPE, LDA, LDB, LDU, LDV, N
@@ -15,81 +171,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET51 generally checks a decomposition of the form
-*
-* A = U B V*
-*
-* where * means conjugate transpose and U and V are unitary.
-*
-* Specifically, if ITYPE=1
-*
-* RESULT = | A - U B V* | / ( |A| n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT = | A - B | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT = | I - UU* | / ( n ulp )
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* =1: RESULT = | A - U B V* | / ( |A| n ulp )
-* =2: RESULT = | A - B | / ( |A| n ulp )
-* =3: RESULT = | I - UU* | / ( n ulp )
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, ZGET51 does nothing.
-* It must be at least zero.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* The original (unfactored) matrix.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) COMPLEX*16 array, dimension (LDB, N)
-* The factored matrix.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* U (input) COMPLEX*16 array, dimension (LDU, N)
-* The unitary matrix on the left-hand side in the
-* decomposition.
-* Not referenced if ITYPE=2
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) COMPLEX*16 array, dimension (LDV, N)
-* The unitary matrix on the left-hand side in the
-* decomposition.
-* Not referenced if ITYPE=2
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N**2)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESULT (output) DOUBLE PRECISION
-* The values computed by the test specified by ITYPE. The
-* value is currently limited to 1/ulp, to avoid overflow.
-* Errors are flagged by RESULT=10/ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zget52.f b/TESTING/EIG/zget52.f
index 6501461a..be83c5f7 100644
--- a/TESTING/EIG/zget52.f
+++ b/TESTING/EIG/zget52.f
@@ -1,9 +1,173 @@
+*> \brief \b ZGET52
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHA, BETA,
+* WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* LOGICAL LEFT
+* INTEGER LDA, LDB, LDE, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( 2 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ),
+* $ BETA( * ), E( LDE, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET52 does an eigenvector check for the generalized eigenvalue
+*> problem.
+*>
+*> The basic test for right eigenvectors is:
+*>
+*> | b(i) A E(i) - a(i) B E(i) |
+*> RESULT(1) = max -------------------------------
+*> i n ulp max( |b(i) A|, |a(i) B| )
+*>
+*> using the 1-norm. Here, a(i)/b(i) = w is the i-th generalized
+*> eigenvalue of A - w B, or, equivalently, b(i)/a(i) = m is the i-th
+*> generalized eigenvalue of m A - B.
+*>
+*> H H _ _
+*> For left eigenvectors, A , B , a, and b are used.
+*>
+*> ZGET52 also tests the normalization of E. Each eigenvector is
+*> supposed to be normalized so that the maximum "absolute value"
+*> of its elements is 1, where in this case, "absolute value"
+*> of a complex value x is |Re(x)| + |Im(x)| ; let us call this
+*> maximum "absolute value" norm of a vector v M(v).
+*> If a(i)=b(i)=0, then the eigenvector is set to be the jth coordinate
+*> vector. The normalization test is:
+*>
+*> RESULT(2) = max | M(v(i)) - 1 | / ( n ulp )
+*> eigenvectors v(i)
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] LEFT
+*> \verbatim
+*> LEFT is LOGICAL
+*> =.TRUE.: The eigenvectors in the columns of E are assumed
+*> to be *left* eigenvectors.
+*> =.FALSE.: The eigenvectors in the columns of E are assumed
+*> to be *right* eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrices. If it is zero, ZGET52 does
+*> nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> The matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> The matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (LDE, N)
+*> The matrix of eigenvectors. It must be O( 1 ).
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of E. It must be at least 1 and at
+*> least N.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16 array, dimension (N)
+*> The values a(i) as described above, which, along with b(i),
+*> define the generalized eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16 array, dimension (N)
+*> The values b(i) as described above, which, along with a(i),
+*> define the generalized eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the test described above. If A E or
+*> B E is likely to overflow, then RESULT(1:2) is set to
+*> 10 / ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGET52( LEFT, N, A, LDA, B, LDB, E, LDE, ALPHA, BETA,
$ WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LEFT
@@ -15,88 +179,6 @@
$ BETA( * ), E( LDE, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET52 does an eigenvector check for the generalized eigenvalue
-* problem.
-*
-* The basic test for right eigenvectors is:
-*
-* | b(i) A E(i) - a(i) B E(i) |
-* RESULT(1) = max -------------------------------
-* i n ulp max( |b(i) A|, |a(i) B| )
-*
-* using the 1-norm. Here, a(i)/b(i) = w is the i-th generalized
-* eigenvalue of A - w B, or, equivalently, b(i)/a(i) = m is the i-th
-* generalized eigenvalue of m A - B.
-*
-* H H _ _
-* For left eigenvectors, A , B , a, and b are used.
-*
-* ZGET52 also tests the normalization of E. Each eigenvector is
-* supposed to be normalized so that the maximum "absolute value"
-* of its elements is 1, where in this case, "absolute value"
-* of a complex value x is |Re(x)| + |Im(x)| ; let us call this
-* maximum "absolute value" norm of a vector v M(v).
-* If a(i)=b(i)=0, then the eigenvector is set to be the jth coordinate
-* vector. The normalization test is:
-*
-* RESULT(2) = max | M(v(i)) - 1 | / ( n ulp )
-* eigenvectors v(i)
-*
-*
-* Arguments
-* =========
-*
-* LEFT (input) LOGICAL
-* =.TRUE.: The eigenvectors in the columns of E are assumed
-* to be *left* eigenvectors.
-* =.FALSE.: The eigenvectors in the columns of E are assumed
-* to be *right* eigenvectors.
-*
-* N (input) INTEGER
-* The size of the matrices. If it is zero, ZGET52 does
-* nothing. It must be at least zero.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* The matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) COMPLEX*16 array, dimension (LDB, N)
-* The matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* E (input) COMPLEX*16 array, dimension (LDE, N)
-* The matrix of eigenvectors. It must be O( 1 ).
-*
-* LDE (input) INTEGER
-* The leading dimension of E. It must be at least 1 and at
-* least N.
-*
-* ALPHA (input) COMPLEX*16 array, dimension (N)
-* The values a(i) as described above, which, along with b(i),
-* define the generalized eigenvalues.
-*
-* BETA (input) COMPLEX*16 array, dimension (N)
-* The values b(i) as described above, which, along with a(i),
-* define the generalized eigenvalues.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N**2)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the test described above. If A E or
-* B E is likely to overflow, then RESULT(1:2) is set to
-* 10 / ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zget54.f b/TESTING/EIG/zget54.f
index 01a665d4..4b84c52a 100644
--- a/TESTING/EIG/zget54.f
+++ b/TESTING/EIG/zget54.f
@@ -1,9 +1,167 @@
+*> \brief \b ZGET54
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
+* LDV, WORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), S( LDS, * ),
+* $ T( LDT, * ), U( LDU, * ), V( LDV, * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET54 checks a generalized decomposition of the form
+*>
+*> A = U*S*V' and B = U*T* V'
+*>
+*> where ' means conjugate transpose and U and V are unitary.
+*>
+*> Specifically,
+*>
+*> RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, DGET54 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> The original (unfactored) matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> The original (unfactored) matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is COMPLEX*16 array, dimension (LDS, N)
+*> The factored matrix S.
+*> \endverbatim
+*>
+*> \param[in] LDS
+*> \verbatim
+*> LDS is INTEGER
+*> The leading dimension of S. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDT, N)
+*> The factored matrix T.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*> LDT is INTEGER
+*> The leading dimension of T. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV, N)
+*> The orthogonal matrix on the left-hand side in the
+*> decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (3*N**2)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> The value RESULT, It is currently limited to 1/ulp, to
+*> avoid overflow. Errors are flagged by RESULT=10/ulp.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGET54( N, A, LDA, B, LDB, S, LDS, T, LDT, U, LDU, V,
$ LDV, WORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LDS, LDT, LDU, LDV, N
@@ -15,76 +173,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET54 checks a generalized decomposition of the form
-*
-* A = U*S*V' and B = U*T* V'
-*
-* where ' means conjugate transpose and U and V are unitary.
-*
-* Specifically,
-*
-* RESULT = ||( A - U*S*V', B - U*T*V' )|| / (||( A, B )||*n*ulp )
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, DGET54 does nothing.
-* It must be at least zero.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* The original (unfactored) matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* B (input) COMPLEX*16 array, dimension (LDB, N)
-* The original (unfactored) matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of B. It must be at least 1
-* and at least N.
-*
-* S (input) COMPLEX*16 array, dimension (LDS, N)
-* The factored matrix S.
-*
-* LDS (input) INTEGER
-* The leading dimension of S. It must be at least 1
-* and at least N.
-*
-* T (input) COMPLEX*16 array, dimension (LDT, N)
-* The factored matrix T.
-*
-* LDT (input) INTEGER
-* The leading dimension of T. It must be at least 1
-* and at least N.
-*
-* U (input) COMPLEX*16 array, dimension (LDU, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) COMPLEX*16 array, dimension (LDV, N)
-* The orthogonal matrix on the left-hand side in the
-* decomposition.
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (3*N**2)
-*
-* RESULT (output) DOUBLE PRECISION
-* The value RESULT, It is currently limited to 1/ulp, to
-* avoid overflow. Errors are flagged by RESULT=10/ulp.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zglmts.f b/TESTING/EIG/zglmts.f
index 95200947..fce74816 100644
--- a/TESTING/EIG/zglmts.f
+++ b/TESTING/EIG/zglmts.f
@@ -1,73 +1,163 @@
- SUBROUTINE ZGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF, X, U,
- $ WORK, LWORK, RWORK, RESULT )
+*> \brief \b ZGLMTS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, N, P
- DOUBLE PRECISION RESULT
-* ..
-* .. Array Arguments ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF, X, U,
+* WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, P
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+*
* Purpose
* =======
*
-* ZGLMTS tests ZGGGLM - a subroutine for solving the generalized
-* linear model problem.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGLMTS tests ZGGGLM - a subroutine for solving the generalized
+*> linear model problem.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,M)
-* The N-by-M matrix A.
-*
-* AF (workspace) COMPLEX*16 array, dimension (LDA,M)
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF. LDA >= max(M,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,P)
-* The N-by-P matrix A.
-*
-* BF (workspace) COMPLEX*16 array, dimension (LDB,P)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF. LDB >= max(P,N).
-*
-* D (input) COMPLEX*16 array, dimension( N )
-* On input, the left hand side of the GLM.
-*
-* DF (workspace) COMPLEX*16 array, dimension( N )
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,M)
+*> The N-by-M matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF. LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,P)
+*> The N-by-P matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (LDB,P)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF. LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension( N )
+*> On input, the left hand side of the GLM.
+*> \endverbatim
+*>
+*> \param[out] DF
+*> \verbatim
+*> DF is COMPLEX*16 array, dimension( N )
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension( M )
+*> solution vector X in the GLM problem.
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension( P )
+*> solution vector U in the GLM problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> The test ratio:
+*> norm( d - A*x - B*u )
+*> RESULT = -----------------------------------------
+*> (norm(A)+norm(B))*(norm(x)+norm(u))*EPS
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (output) COMPLEX*16 array, dimension( M )
-* solution vector X in the GLM problem.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (output) COMPLEX*16 array, dimension( P )
-* solution vector U in the GLM problem.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_eig
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZGLMTS( N, M, P, A, AF, LDA, B, BF, LDB, D, DF, X, U,
+ $ WORK, LWORK, RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION
-* The test ratio:
-* norm( d - A*x - B*u )
-* RESULT = -----------------------------------------
-* (norm(A)+norm(B))*(norm(x)+norm(u))*EPS
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, N, P
+ DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
*
* ====================================================================
*
diff --git a/TESTING/EIG/zgqrts.f b/TESTING/EIG/zgqrts.f
index 85633dd4..3cac1673 100644
--- a/TESTING/EIG/zgqrts.f
+++ b/TESTING/EIG/zgqrts.f
@@ -1,9 +1,187 @@
+*> \brief \b ZGQRTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGQRTS( N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
+* BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( 4 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), BWK( LDB, * ), Q( LDA, * ),
+* $ R( LDA, * ), T( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( LWORK ), Z( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGQRTS tests ZGGQRF, which computes the GQR factorization of an
+*> N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of columns of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of columns of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,M)
+*> The N-by-M matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by ZGGQRF, see CGGQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-M unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (LDA,MAX(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, R and Q.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by ZGGQRF.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,P)
+*> On entry, the N-by-P matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (LDB,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by ZGGQRF, see CGGQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDB,P)
+*> The P-by-P unitary matrix Z.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDB,max(P,N))
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is COMPLEX*16 array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, Z and T.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is COMPLEX*16 array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGGRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK, LWORK >= max(N,M,P)**2.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(N,M,P))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - Q'*Q ) / ( M*ULP )
+*> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGQRTS( N, M, P, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
$ BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, N, P
@@ -16,80 +194,6 @@
$ WORK( LWORK ), Z( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGQRTS tests ZGGQRF, which computes the GQR factorization of an
-* N-by-M matrix A and a N-by-P matrix B: A = Q*R and B = Q*T*Z.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of rows of the matrices A and B. N >= 0.
-*
-* M (input) INTEGER
-* The number of columns of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of columns of the matrix B. P >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,M)
-* The N-by-M matrix A.
-*
-* AF (output) COMPLEX*16 array, dimension (LDA,N)
-* Details of the GQR factorization of A and B, as returned
-* by ZGGQRF, see CGGQRF for further details.
-*
-* Q (output) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-M unitary matrix Q.
-*
-* R (workspace) COMPLEX*16 array, dimension (LDA,MAX(M,N))
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, R and Q.
-* LDA >= max(M,N).
-*
-* TAUA (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by ZGGQRF.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,P)
-* On entry, the N-by-P matrix A.
-*
-* BF (output) COMPLEX*16 array, dimension (LDB,N)
-* Details of the GQR factorization of A and B, as returned
-* by ZGGQRF, see CGGQRF for further details.
-*
-* Z (output) COMPLEX*16 array, dimension (LDB,P)
-* The P-by-P unitary matrix Z.
-*
-* T (workspace) COMPLEX*16 array, dimension (LDB,max(P,N))
-*
-* BWK (workspace) COMPLEX*16 array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, Z and T.
-* LDB >= max(P,N).
-*
-* TAUB (output) COMPLEX*16 array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGGRQF.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK, LWORK >= max(N,M,P)**2.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(N,M,P))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( T*Z - Q'*B ) / (MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - Q'*Q ) / ( M*ULP )
-* RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zgrqts.f b/TESTING/EIG/zgrqts.f
index b001f7b3..18bd7816 100644
--- a/TESTING/EIG/zgrqts.f
+++ b/TESTING/EIG/zgrqts.f
@@ -1,9 +1,187 @@
+*> \brief \b ZGRQTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGRQTS( M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
+* BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( 4 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), BWK( LDB, * ), Q( LDA, * ),
+* $ R( LDA, * ), T( LDB, * ), TAUA( * ), TAUB( * ),
+* $ WORK( LWORK ), Z( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGRQTS tests ZGGRQF, which computes the GRQ factorization of an
+*> M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the GRQ factorization of A and B, as returned
+*> by ZGGRQF, see CGGRQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> The N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (LDA,MAX(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, R and Q.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAUA
+*> \verbatim
+*> TAUA is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGGQRC.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> On entry, the P-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (LDB,N)
+*> Details of the GQR factorization of A and B, as returned
+*> by ZGGRQF, see CGGRQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION array, dimension (LDB,P)
+*> The P-by-P unitary matrix Z.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*> T is COMPLEX*16 array, dimension (LDB,max(P,N))
+*> \endverbatim
+*>
+*> \param[out] BWK
+*> \verbatim
+*> BWK is COMPLEX*16 array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, Z and T.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[out] TAUB
+*> \verbatim
+*> TAUB is COMPLEX*16 array, dimension (min(P,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGGRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK, LWORK >= max(M,P,N)**2.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - Q'*Q ) / ( N*ULP )
+*> RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGRQTS( M, P, N, A, AF, Q, R, LDA, TAUA, B, BF, Z, T,
$ BWK, LDB, TAUB, WORK, LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, N, P
@@ -16,80 +194,6 @@
$ WORK( LWORK ), Z( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGRQTS tests ZGGRQF, which computes the GRQ factorization of an
-* M-by-N matrix A and a P-by-N matrix B: A = R*Q and B = Z*T*Q.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* AF (output) COMPLEX*16 array, dimension (LDA,N)
-* Details of the GRQ factorization of A and B, as returned
-* by ZGGRQF, see CGGRQF for further details.
-*
-* Q (output) COMPLEX*16 array, dimension (LDA,N)
-* The N-by-N unitary matrix Q.
-*
-* R (workspace) COMPLEX*16 array, dimension (LDA,MAX(M,N))
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, R and Q.
-* LDA >= max(M,N).
-*
-* TAUA (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGGQRC.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,N)
-* On entry, the P-by-N matrix A.
-*
-* BF (output) COMPLEX*16 array, dimension (LDB,N)
-* Details of the GQR factorization of A and B, as returned
-* by ZGGRQF, see CGGRQF for further details.
-*
-* Z (output) DOUBLE PRECISION array, dimension (LDB,P)
-* The P-by-P unitary matrix Z.
-*
-* T (workspace) COMPLEX*16 array, dimension (LDB,max(P,N))
-*
-* BWK (workspace) COMPLEX*16 array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, Z and T.
-* LDB >= max(P,N).
-*
-* TAUB (output) COMPLEX*16 array, dimension (min(P,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGGRQF.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK, LWORK >= max(M,P,N)**2.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( T*Q - Z'*B ) / (MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - Q'*Q ) / ( N*ULP )
-* RESULT(4) = norm( I - Z'*Z ) / ( P*ULP )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zgsvts.f b/TESTING/EIG/zgsvts.f
index 4fa77b63..e4b6ef31 100644
--- a/TESTING/EIG/zgsvts.f
+++ b/TESTING/EIG/zgsvts.f
@@ -1,10 +1,221 @@
+*> \brief \b ZGSVTS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGSVTS( M, P, N, A, AF, LDA, B, BF, LDB, U, LDU, V,
+* LDV, Q, LDQ, ALPHA, BETA, R, LDR, IWORK, WORK,
+* LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDQ, LDR, LDU, LDV, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+* INTEGER IWORK( * )
+* DOUBLE PRECISION ALPHA( * ), BETA( * ), RESULT( 6 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), B( LDB, * ),
+* $ BF( LDB, * ), Q( LDQ, * ), R( LDR, * ),
+* $ U( LDU, * ), V( LDV, * ), WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGSVTS tests ZGGSVD, which computes the GSVD of an M-by-N matrix A
+*> and a P-by-N matrix B:
+*> U'*A*Q = D1*R and V'*B*Q = D2*R.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,M)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the GSVD of A and B, as returned by ZGGSVD,
+*> see ZGGSVD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> LDA >= max( 1,M ).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,P)
+*> On entry, the P-by-N matrix B.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (LDB,N)
+*> Details of the GSVD of A and B, as returned by ZGGSVD,
+*> see ZGGSVD for further details.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B and BF.
+*> LDB >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension(LDU,M)
+*> The M by M unitary matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension(LDV,M)
+*> The P by P unitary matrix V.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of the array V. LDV >= max(1,P).
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension(LDQ,N)
+*> The N by N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*> \verbatim
+*> The generalized singular value pairs of A and B, the
+*> ``diagonal'' matrices D1 and D2 are constructed from
+*> ALPHA and BETA, see subroutine ZGGSVD for details.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension(LDQ,N)
+*> The upper triangular matrix R.
+*> \endverbatim
+*>
+*> \param[in] LDR
+*> \verbatim
+*> LDR is INTEGER
+*> The leading dimension of the array R. LDR >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK,
+*> LWORK >= max(M,P,N)*max(M,P,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(M,P,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (5)
+*> The test ratios:
+*> RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP)
+*> RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP)
+*> RESULT(3) = norm( I - U'*U ) / ( M*ULP )
+*> RESULT(4) = norm( I - V'*V ) / ( P*ULP )
+*> RESULT(5) = norm( I - Q'*Q ) / ( N*ULP )
+*> RESULT(6) = 0 if ALPHA is in decreasing order;
+*> = ULPINV otherwise.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZGSVTS( M, P, N, A, AF, LDA, B, BF, LDB, U, LDU, V,
$ LDV, Q, LDQ, ALPHA, BETA, R, LDR, IWORK, WORK,
$ LWORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LDQ, LDR, LDU, LDV, LWORK, M, N, P
@@ -17,97 +228,6 @@
$ U( LDU, * ), V( LDV, * ), WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* ZGSVTS tests ZGGSVD, which computes the GSVD of an M-by-N matrix A
-* and a P-by-N matrix B:
-* U'*A*Q = D1*R and V'*B*Q = D2*R.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,M)
-* The M-by-N matrix A.
-*
-* AF (output) COMPLEX*16 array, dimension (LDA,N)
-* Details of the GSVD of A and B, as returned by ZGGSVD,
-* see ZGGSVD for further details.
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
-* LDA >= max( 1,M ).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,P)
-* On entry, the P-by-N matrix B.
-*
-* BF (output) COMPLEX*16 array, dimension (LDB,N)
-* Details of the GSVD of A and B, as returned by ZGGSVD,
-* see ZGGSVD for further details.
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B and BF.
-* LDB >= max(1,P).
-*
-* U (output) COMPLEX*16 array, dimension(LDU,M)
-* The M by M unitary matrix U.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
-*
-* V (output) COMPLEX*16 array, dimension(LDV,M)
-* The P by P unitary matrix V.
-*
-* LDV (input) INTEGER
-* The leading dimension of the array V. LDV >= max(1,P).
-*
-* Q (output) COMPLEX*16 array, dimension(LDQ,N)
-* The N by N unitary matrix Q.
-*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
-*
-* ALPHA (output) DOUBLE PRECISION array, dimension (N)
-* BETA (output) DOUBLE PRECISION array, dimension (N)
-* The generalized singular value pairs of A and B, the
-* ``diagonal'' matrices D1 and D2 are constructed from
-* ALPHA and BETA, see subroutine ZGGSVD for details.
-*
-* R (output) COMPLEX*16 array, dimension(LDQ,N)
-* The upper triangular matrix R.
-*
-* LDR (input) INTEGER
-* The leading dimension of the array R. LDR >= max(1,N).
-*
-* IWORK (workspace) INTEGER array, dimension (N)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The dimension of the array WORK,
-* LWORK >= max(M,P,N)*max(M,P,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(M,P,N))
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (5)
-* The test ratios:
-* RESULT(1) = norm( U'*A*Q - D1*R ) / ( MAX(M,N)*norm(A)*ULP)
-* RESULT(2) = norm( V'*B*Q - D2*R ) / ( MAX(P,N)*norm(B)*ULP)
-* RESULT(3) = norm( I - U'*U ) / ( M*ULP )
-* RESULT(4) = norm( I - V'*V ) / ( P*ULP )
-* RESULT(5) = norm( I - Q'*Q ) / ( N*ULP )
-* RESULT(6) = 0 if ALPHA is in decreasing order;
-* = ULPINV otherwise.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zhbt21.f b/TESTING/EIG/zhbt21.f
index c7a50cd0..3be21b5a 100644
--- a/TESTING/EIG/zhbt21.f
+++ b/TESTING/EIG/zhbt21.f
@@ -1,91 +1,170 @@
- SUBROUTINE ZHBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER KA, KS, LDA, LDU, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), E( * ), RESULT( 2 ), RWORK( * )
- COMPLEX*16 A( LDA, * ), U( LDU, * ), WORK( * )
-* ..
-*
+*> \brief \b ZHBT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KA, KS, LDA, LDU, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), RESULT( 2 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), U( LDU, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZHBT21 generally checks a decomposition of the form
-*
-* A = U S U*
-*
-* where * means conjugate transpose, A is hermitian banded, U is
-* unitary, and S is diagonal (if KS=0) or symmetric
-* tridiagonal (if KS=1).
-*
-* Specifically:
-*
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHBT21 generally checks a decomposition of the form
+*>
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian banded, U is
+*> unitary, and S is diagonal (if KS=0) or symmetric
+*> tridiagonal (if KS=1).
+*>
+*> Specifically:
+*>
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, ZHBT21 does nothing.
-* It must be at least zero.
-*
-* KA (input) INTEGER
-* The bandwidth of the matrix A. It must be at least zero. If
-* it is larger than N-1, then max( 0, N-1 ) will be used.
-*
-* KS (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* The original (unfactored) matrix. It is assumed to be
-* hermitian, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least min( KA, N-1 ).
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, ZHBT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KA
+*> \verbatim
+*> KA is INTEGER
+*> The bandwidth of the matrix A. It must be at least zero. If
+*> it is larger than N-1, then max( 0, N-1 ) will be used.
+*> \endverbatim
+*>
+*> \param[in] KS
+*> \verbatim
+*> KS is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> The original (unfactored) matrix. It is assumed to be
+*> hermitian, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least min( KA, N-1 ).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KS=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU, N)
+*> The unitary matrix in the decomposition, expressed as a
+*> dense matrix (i.e., not as a product of Householder
+*> transformations, Givens transformations, etc.)
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KS=0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (input) COMPLEX*16 array, dimension (LDU, N)
-* The unitary matrix in the decomposition, expressed as a
-* dense matrix (i.e., not as a product of Householder
-* transformations, Givens transformations, etc.)
+*> \date November 2011
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
+*> \ingroup complex16_eig
*
-* WORK (workspace) COMPLEX*16 array, dimension (N**2)
+* =====================================================================
+ SUBROUTINE ZHBT21( UPLO, N, KA, KS, A, LDA, D, E, U, LDU, WORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER KA, KS, LDA, LDU, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), E( * ), RESULT( 2 ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), U( LDU, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zhet21.f b/TESTING/EIG/zhet21.f
index 16ab5539..0457a014 100644
--- a/TESTING/EIG/zhet21.f
+++ b/TESTING/EIG/zhet21.f
@@ -1,9 +1,224 @@
+*> \brief \b ZHET21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
+* LDV, TAU, WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDA, LDU, LDV, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), RESULT( 2 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), TAU( * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHET21 generally checks a decomposition of the form
+*>
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian, U is unitary, and
+*> S is diagonal (if KBAND=0) or (real) symmetric tridiagonal (if
+*> KBAND=1).
+*>
+*> If ITYPE=1, then U is represented as a dense matrix; otherwise U is
+*> expressed as a product of Householder transformations, whose vectors
+*> are stored in the array "V" and whose scaling constants are in "TAU".
+*> We shall use the letter "V" to refer to the product of Householder
+*> transformations (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT(1) = | I - UV* | / ( n ulp )
+*>
+*> For ITYPE > 1, the transformation U is expressed as a product
+*> V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)C> and each
+*> vector v(j) has its first j elements 0 and the remaining n-j elements
+*> stored in V(j+1:n,j).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense unitary matrix:
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> 2: U expressed as a product V of Housholder transformations:
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> \endverbatim
+*> \verbatim
+*> 3: U expressed both as a dense unitary matrix and
+*> as a product of Housholder transformations:
+*> RESULT(1) = | I - UV* | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, ZHET21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> The original (unfactored) matrix. It is assumed to be
+*> hermitian, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KBAND=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the unitary matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV, N)
+*> If ITYPE=2 or 3, the columns of this array contain the
+*> Householder vectors used to describe the unitary matrix
+*> in the decomposition. If UPLO='L', then the vectors are in
+*> the lower triangle, if UPLO='U', then in the upper
+*> triangle.
+*> *NOTE* If ITYPE=2 or 3, V is modified and restored. The
+*> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
+*> is set to one, and later reset to its original value, during
+*> the course of the calculation.
+*> If ITYPE=1, then it is neither referenced nor modified.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)* in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if ITYPE=1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZHET21( ITYPE, UPLO, N, KBAND, A, LDA, D, E, U, LDU, V,
$ LDV, TAU, WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,131 +230,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHET21 generally checks a decomposition of the form
-*
-* A = U S U*
-*
-* where * means conjugate transpose, A is hermitian, U is unitary, and
-* S is diagonal (if KBAND=0) or (real) symmetric tridiagonal (if
-* KBAND=1).
-*
-* If ITYPE=1, then U is represented as a dense matrix; otherwise U is
-* expressed as a product of Householder transformations, whose vectors
-* are stored in the array "V" and whose scaling constants are in "TAU".
-* We shall use the letter "V" to refer to the product of Householder
-* transformations (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT(1) = | A - V S V* | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT(1) = | I - UV* | / ( n ulp )
-*
-* For ITYPE > 1, the transformation U is expressed as a product
-* V = H(1)...H(n-2), where H(j) = I - tau(j) v(j) v(j)* and each
-* vector v(j) has its first j elements 0 and the remaining n-j elements
-* stored in V(j+1:n,j).
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense unitary matrix:
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
-*
-* 2: U expressed as a product V of Housholder transformations:
-* RESULT(1) = | A - V S V* | / ( |A| n ulp )
-*
-* 3: U expressed both as a dense unitary matrix and
-* as a product of Housholder transformations:
-* RESULT(1) = | I - UV* | / ( n ulp )
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, ZHET21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* The original (unfactored) matrix. It is assumed to be
-* hermitian, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KBAND=0.
-*
-* U (input) COMPLEX*16 array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the unitary matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* V (input) COMPLEX*16 array, dimension (LDV, N)
-* If ITYPE=2 or 3, the columns of this array contain the
-* Householder vectors used to describe the unitary matrix
-* in the decomposition. If UPLO='L', then the vectors are in
-* the lower triangle, if UPLO='U', then in the upper
-* triangle.
-* *NOTE* If ITYPE=2 or 3, V is modified and restored. The
-* subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
-* is set to one, and later reset to its original value, during
-* the course of the calculation.
-* If ITYPE=1, then it is neither referenced nor modified.
-*
-* LDV (input) INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-*
-* TAU (input) COMPLEX*16 array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)* in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N**2)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if ITYPE=1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zhet22.f b/TESTING/EIG/zhet22.f
index e2cf70b9..42d2b68b 100644
--- a/TESTING/EIG/zhet22.f
+++ b/TESTING/EIG/zhet22.f
@@ -1,9 +1,186 @@
+*> \brief \b ZHET22
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHET22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
+* V, LDV, TAU, WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDA, LDU, LDV, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), RESULT( 2 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), TAU( * ), U( LDU, * ),
+* $ V( LDV, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHET22 generally checks a decomposition of the form
+*>
+*> A U = U S
+*>
+*> where A is complex Hermitian, the columns of U are orthonormal,
+*> and S is diagonal (if KBAND=0) or symmetric tridiagonal (if
+*> KBAND=1). If ITYPE=1, then U is represented as a dense matrix,
+*> otherwise the U is expressed as a product of Householder
+*> transformations, whose vectors are stored in the array "V" and
+*> whose scaling constants are in "TAU"; we shall use the letter
+*> "V" to refer to the product of Householder transformations
+*> (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | U' A U - S | / ( |A| m ulp ) *andC> RESULT(2) = | I - U'U | / ( m ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> ITYPE INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense orthogonal matrix:
+*> RESULT(1) = | A - U S U' | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU' | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> UPLO CHARACTER
+*> If UPLO='U', the upper triangle of A will be used and the
+*> (strictly) lower triangle will not be referenced. If
+*> UPLO='L', the lower triangle of A will be used and the
+*> (strictly) upper triangle will not be referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> N INTEGER
+*> The size of the matrix. If it is zero, ZHET22 does nothing.
+*> It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> M INTEGER
+*> The number of columns of U. If it is zero, ZHET22 does
+*> nothing. It must be at least zero.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> KBAND INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A COMPLEX*16 array, dimension (LDA , N)
+*> The original (unfactored) matrix. It is assumed to be
+*> symmetric, and only the upper (UPLO='U') or only the lower
+*> (UPLO='L') will be referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDA INTEGER
+*> The leading dimension of A. It must be at least 1
+*> and at least N.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> D DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> E DOUBLE PRECISION array, dimension (N)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc.
+*> Not referenced if KBAND=0.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> U COMPLEX*16 array, dimension (LDU, N)
+*> If ITYPE=1, this contains the orthogonal matrix in
+*> the decomposition, expressed as a dense matrix.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDU INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> V COMPLEX*16 array, dimension (LDV, N)
+*> If ITYPE=2 or 3, the lower triangle of this array contains
+*> the Householder vectors used to describe the orthogonal
+*> matrix in the decomposition. If ITYPE=1, then it is not
+*> referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LDV INTEGER
+*> The leading dimension of V. LDV must be at least N and
+*> at least 1.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> TAU COMPLEX*16 array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)' in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> WORK COMPLEX*16 array, dimension (2*N**2)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RWORK DOUBLE PRECISION array, dimension (N)
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*> \verbatim
+*> RESULT DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if LDU is at least N.
+*> Modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZHET22( ITYPE, UPLO, N, M, KBAND, A, LDA, D, E, U, LDU,
$ V, LDV, TAU, WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,124 +192,6 @@
$ V( LDV, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHET22 generally checks a decomposition of the form
-*
-* A U = U S
-*
-* where A is complex Hermitian, the columns of U are orthonormal,
-* and S is diagonal (if KBAND=0) or symmetric tridiagonal (if
-* KBAND=1). If ITYPE=1, then U is represented as a dense matrix,
-* otherwise the U is expressed as a product of Householder
-* transformations, whose vectors are stored in the array "V" and
-* whose scaling constants are in "TAU"; we shall use the letter
-* "V" to refer to the product of Householder transformations
-* (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | U' A U - S | / ( |A| m ulp ) *and*
-* RESULT(2) = | I - U'U | / ( m ulp )
-*
-* Arguments
-* =========
-*
-* ITYPE INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense orthogonal matrix:
-* RESULT(1) = | A - U S U' | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU' | / ( n ulp )
-*
-* UPLO CHARACTER
-* If UPLO='U', the upper triangle of A will be used and the
-* (strictly) lower triangle will not be referenced. If
-* UPLO='L', the lower triangle of A will be used and the
-* (strictly) upper triangle will not be referenced.
-* Not modified.
-*
-* N INTEGER
-* The size of the matrix. If it is zero, ZHET22 does nothing.
-* It must be at least zero.
-* Not modified.
-*
-* M INTEGER
-* The number of columns of U. If it is zero, ZHET22 does
-* nothing. It must be at least zero.
-* Not modified.
-*
-* KBAND INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-* Not modified.
-*
-* A COMPLEX*16 array, dimension (LDA , N)
-* The original (unfactored) matrix. It is assumed to be
-* symmetric, and only the upper (UPLO='U') or only the lower
-* (UPLO='L') will be referenced.
-* Not modified.
-*
-* LDA INTEGER
-* The leading dimension of A. It must be at least 1
-* and at least N.
-* Not modified.
-*
-* D DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-* Not modified.
-*
-* E DOUBLE PRECISION array, dimension (N)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is ignored, E(2) is the (1,2) and (2,1) element, etc.
-* Not referenced if KBAND=0.
-* Not modified.
-*
-* U COMPLEX*16 array, dimension (LDU, N)
-* If ITYPE=1, this contains the orthogonal matrix in
-* the decomposition, expressed as a dense matrix.
-* Not modified.
-*
-* LDU INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-* Not modified.
-*
-* V COMPLEX*16 array, dimension (LDV, N)
-* If ITYPE=2 or 3, the lower triangle of this array contains
-* the Householder vectors used to describe the orthogonal
-* matrix in the decomposition. If ITYPE=1, then it is not
-* referenced.
-* Not modified.
-*
-* LDV INTEGER
-* The leading dimension of V. LDV must be at least N and
-* at least 1.
-* Not modified.
-*
-* TAU COMPLEX*16 array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)' in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-* Not modified.
-*
-* WORK COMPLEX*16 array, dimension (2*N**2)
-* Workspace.
-* Modified.
-*
-* RWORK DOUBLE PRECISION array, dimension (N)
-* Workspace.
-* Modified.
-*
-* RESULT DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if LDU is at least N.
-* Modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zhpt21.f b/TESTING/EIG/zhpt21.f
index 7419fc8e..63f3828c 100644
--- a/TESTING/EIG/zhpt21.f
+++ b/TESTING/EIG/zhpt21.f
@@ -1,9 +1,236 @@
+*> \brief \b ZHPT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
+* TAU, WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), E( * ), RESULT( 2 ), RWORK( * )
+* COMPLEX*16 AP( * ), TAU( * ), U( LDU, * ), VP( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPT21 generally checks a decomposition of the form
+*>
+*> A = U S UC>
+*> where * means conjugate transpose, A is hermitian, U is
+*> unitary, and S is diagonal (if KBAND=0) or (real) symmetric
+*> tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as
+*> a dense matrix, otherwise the U is expressed as a product of
+*> Householder transformations, whose vectors are stored in the
+*> array "V" and whose scaling constants are in "TAU"; we shall
+*> use the letter "V" to refer to the product of Householder
+*> transformations (which should be equal to U).
+*>
+*> Specifically, if ITYPE=1, then:
+*>
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*>
+*> If ITYPE=2, then:
+*>
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*>
+*> If ITYPE=3, then:
+*>
+*> RESULT(1) = | I - UV* | / ( n ulp )
+*>
+*> Packed storage means that, for example, if UPLO='U', then the columns
+*> of the upper triangle of A are stored one after another, so that
+*> A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if
+*> UPLO='L', then the columns of the lower triangle of A are stored one
+*> after another in AP, so that A(j+1,j+1) immediately follows A(n,j)
+*> in the array AP. This means that A(i,j) is stored in:
+*>
+*> AP( i + j*(j-1)/2 ) if UPLO='U'
+*>
+*> AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L'
+*>
+*> The array VP bears the same relation to the matrix V that A does to
+*> AP.
+*>
+*> For ITYPE > 1, the transformation U is expressed as a product
+*> of Householder transformations:
+*>
+*> If UPLO='U', then V = H(n-1)...H(1), where
+*>
+*> H(j) = I - tau(j) v(j) v(j)C>
+*> and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
+*> (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
+*> the j-th element is 1, and the last n-j elements are 0.
+*>
+*> If UPLO='L', then V = H(1)...H(n-1), where
+*>
+*> H(j) = I - tau(j) v(j) v(j)C>
+*> and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
+*> (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
+*> in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> Specifies the type of tests to be performed.
+*> 1: U expressed as a dense unitary matrix:
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp ) *andC> RESULT(2) = | I - UU* | / ( n ulp )
+*> \endverbatim
+*> \verbatim
+*> 2: U expressed as a product V of Housholder transformations:
+*> RESULT(1) = | A - V S V* | / ( |A| n ulp )
+*> \endverbatim
+*> \verbatim
+*> 3: U expressed both as a dense unitary matrix and
+*> as a product of Housholder transformations:
+*> RESULT(1) = | I - UV* | / ( n ulp )
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> If UPLO='U', the upper triangle of A and V will be used and
+*> the (strictly) lower triangle will not be referenced.
+*> If UPLO='L', the lower triangle of A and V will be used and
+*> the (strictly) upper triangle will not be referenced.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, ZHPT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix. It may only be zero or one.
+*> If zero, then S is diagonal, and E is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original (unfactored) matrix. It is assumed to be
+*> hermitian, and contains the columns of just the upper
+*> triangle (UPLO='U') or only the lower triangle (UPLO='L'),
+*> packed one after another.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (symmetric tri-) diagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix.
+*> E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
+*> (3,2) element, etc.
+*> Not referenced if KBAND=0.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU, N)
+*> If ITYPE=1 or 3, this contains the unitary matrix in
+*> the decomposition, expressed as a dense matrix. If ITYPE=2,
+*> then it is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N and
+*> at least 1.
+*> \endverbatim
+*>
+*> \param[in] VP
+*> \verbatim
+*> VP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> If ITYPE=2 or 3, the columns of this array contain the
+*> Householder vectors used to describe the unitary matrix
+*> in the decomposition, as described in purpose.
+*> *NOTE* If ITYPE=2 or 3, V is modified and restored. The
+*> subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
+*> is set to one, and later reset to its original value, during
+*> the course of the calculation.
+*> If ITYPE=1, then it is neither referenced nor modified.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N)
+*> If ITYPE >= 2, then TAU(j) is the scalar factor of
+*> v(j) v(j)* in the Householder transformation H(j) of
+*> the product U = H(1)...H(n-2)
+*> If ITYPE < 2, then TAU is not referenced.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N**2)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> Workspace.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified. RESULT(2) is modified only
+*> if ITYPE=1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZHPT21( ITYPE, UPLO, N, KBAND, AP, D, E, U, LDU, VP,
$ TAU, WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,151 +242,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZHPT21 generally checks a decomposition of the form
-*
-* A = U S U*
-*
-* where * means conjugate transpose, A is hermitian, U is
-* unitary, and S is diagonal (if KBAND=0) or (real) symmetric
-* tridiagonal (if KBAND=1). If ITYPE=1, then U is represented as
-* a dense matrix, otherwise the U is expressed as a product of
-* Householder transformations, whose vectors are stored in the
-* array "V" and whose scaling constants are in "TAU"; we shall
-* use the letter "V" to refer to the product of Householder
-* transformations (which should be equal to U).
-*
-* Specifically, if ITYPE=1, then:
-*
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
-*
-* If ITYPE=2, then:
-*
-* RESULT(1) = | A - V S V* | / ( |A| n ulp )
-*
-* If ITYPE=3, then:
-*
-* RESULT(1) = | I - UV* | / ( n ulp )
-*
-* Packed storage means that, for example, if UPLO='U', then the columns
-* of the upper triangle of A are stored one after another, so that
-* A(1,j+1) immediately follows A(j,j) in the array AP. Similarly, if
-* UPLO='L', then the columns of the lower triangle of A are stored one
-* after another in AP, so that A(j+1,j+1) immediately follows A(n,j)
-* in the array AP. This means that A(i,j) is stored in:
-*
-* AP( i + j*(j-1)/2 ) if UPLO='U'
-*
-* AP( i + (2*n-j)*(j-1)/2 ) if UPLO='L'
-*
-* The array VP bears the same relation to the matrix V that A does to
-* AP.
-*
-* For ITYPE > 1, the transformation U is expressed as a product
-* of Householder transformations:
-*
-* If UPLO='U', then V = H(n-1)...H(1), where
-*
-* H(j) = I - tau(j) v(j) v(j)*
-*
-* and the first j-1 elements of v(j) are stored in V(1:j-1,j+1),
-* (i.e., VP( j*(j+1)/2 + 1 : j*(j+1)/2 + j-1 ) ),
-* the j-th element is 1, and the last n-j elements are 0.
-*
-* If UPLO='L', then V = H(1)...H(n-1), where
-*
-* H(j) = I - tau(j) v(j) v(j)*
-*
-* and the first j elements of v(j) are 0, the (j+1)-st is 1, and the
-* (j+2)-nd through n-th elements are stored in V(j+2:n,j) (i.e.,
-* in VP( (2*n-j)*(j-1)/2 + j+2 : (2*n-j)*(j-1)/2 + n ) .)
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* Specifies the type of tests to be performed.
-* 1: U expressed as a dense unitary matrix:
-* RESULT(1) = | A - U S U* | / ( |A| n ulp ) *and*
-* RESULT(2) = | I - UU* | / ( n ulp )
-*
-* 2: U expressed as a product V of Housholder transformations:
-* RESULT(1) = | A - V S V* | / ( |A| n ulp )
-*
-* 3: U expressed both as a dense unitary matrix and
-* as a product of Housholder transformations:
-* RESULT(1) = | I - UV* | / ( n ulp )
-*
-* UPLO (input) CHARACTER
-* If UPLO='U', the upper triangle of A and V will be used and
-* the (strictly) lower triangle will not be referenced.
-* If UPLO='L', the lower triangle of A and V will be used and
-* the (strictly) upper triangle will not be referenced.
-*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, ZHPT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix. It may only be zero or one.
-* If zero, then S is diagonal, and E is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original (unfactored) matrix. It is assumed to be
-* hermitian, and contains the columns of just the upper
-* triangle (UPLO='U') or only the lower triangle (UPLO='L'),
-* packed one after another.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (symmetric tri-) diagonal matrix.
-*
-* E (input) DOUBLE PRECISION array, dimension (N)
-* The off-diagonal of the (symmetric tri-) diagonal matrix.
-* E(1) is the (1,2) and (2,1) element, E(2) is the (2,3) and
-* (3,2) element, etc.
-* Not referenced if KBAND=0.
-*
-* U (input) COMPLEX*16 array, dimension (LDU, N)
-* If ITYPE=1 or 3, this contains the unitary matrix in
-* the decomposition, expressed as a dense matrix. If ITYPE=2,
-* then it is not referenced.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N and
-* at least 1.
-*
-* VP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* If ITYPE=2 or 3, the columns of this array contain the
-* Householder vectors used to describe the unitary matrix
-* in the decomposition, as described in purpose.
-* *NOTE* If ITYPE=2 or 3, V is modified and restored. The
-* subdiagonal (if UPLO='L') or the superdiagonal (if UPLO='U')
-* is set to one, and later reset to its original value, during
-* the course of the calculation.
-* If ITYPE=1, then it is neither referenced nor modified.
-*
-* TAU (input) COMPLEX*16 array, dimension (N)
-* If ITYPE >= 2, then TAU(j) is the scalar factor of
-* v(j) v(j)* in the Householder transformation H(j) of
-* the product U = H(1)...H(n-2)
-* If ITYPE < 2, then TAU is not referenced.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N**2)
-* Workspace.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-* Workspace.
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified. RESULT(2) is modified only
-* if ITYPE=1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zhst01.f b/TESTING/EIG/zhst01.f
index bd468fcc..051d4f03 100644
--- a/TESTING/EIG/zhst01.f
+++ b/TESTING/EIG/zhst01.f
@@ -1,77 +1,161 @@
- SUBROUTINE ZHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
- $ LWORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( 2 ), RWORK( * )
- COMPLEX*16 A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b ZHST01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
+* LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( 2 ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZHST01 tests the reduction of a general matrix A to upper Hessenberg
-* form: A = Q*H*Q'. Two test ratios are computed;
-*
-* RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
-*
-* The matrix Q is assumed to be given explicitly as it would be
-* following ZGEHRD + ZUNGHR.
-*
-* In this version, ILO and IHI are not used, but they could be used
-* to save some work if this is desired.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHST01 tests the reduction of a general matrix A to upper Hessenberg
+*> form: A = Q*H*Q'. Two test ratios are computed;
+*>
+*> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+*>
+*> The matrix Q is assumed to be given explicitly as it would be
+*> following ZGEHRD + ZUNGHR.
+*>
+*> In this version, ILO and IHI are not used, but they could be used
+*> to save some work if this is desired.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* ILO (input) INTEGER
-* IHI (input) INTEGER
-* A is assumed to be upper triangular in rows and columns
-* 1:ILO-1 and IHI+1:N, so Q differs from the identity only in
-* rows and columns ILO+1:IHI.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original n by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* H (input) COMPLEX*16 array, dimension (LDH,N)
-* The upper Hessenberg matrix H from the reduction A = Q*H*Q'
-* as computed by ZGEHRD. H is assumed to be zero below the
-* first subdiagonal.
-*
-* LDH (input) INTEGER
-* The leading dimension of the array H. LDH >= max(1,N).
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*> ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*> IHI is INTEGER
+*> \endverbatim
+*> \verbatim
+*> A is assumed to be upper triangular in rows and columns
+*> 1:ILO-1 and IHI+1:N, so Q differs from the identity only in
+*> rows and columns ILO+1:IHI.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original n by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] H
+*> \verbatim
+*> H is COMPLEX*16 array, dimension (LDH,N)
+*> The upper Hessenberg matrix H from the reduction A = Q*H*Q'
+*> as computed by ZGEHRD. H is assumed to be zero below the
+*> first subdiagonal.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*> LDH is INTEGER
+*> The leading dimension of the array H. LDH >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDQ,N)
+*> The orthogonal matrix Q from the reduction A = Q*H*Q' as
+*> computed by ZGEHRD + ZUNGHR.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*> LDQ is INTEGER
+*> The leading dimension of the array Q. LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= 2*N*N.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* Q (input) COMPLEX*16 array, dimension (LDQ,N)
-* The orthogonal matrix Q from the reduction A = Q*H*Q' as
-* computed by ZGEHRD + ZUNGHR.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDQ (input) INTEGER
-* The leading dimension of the array Q. LDQ >= max(1,N).
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_eig
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= 2*N*N.
+* =====================================================================
+ SUBROUTINE ZHST01( N, ILO, IHI, A, LDA, H, LDH, Q, LDQ, WORK,
+ $ LWORK, RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* RESULT(1) = norm( A - Q*H*Q' ) / ( norm(A) * N * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER IHI, ILO, LDA, LDH, LDQ, LWORK, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( 2 ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), H( LDH, * ), Q( LDQ, * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zlarfy.f b/TESTING/EIG/zlarfy.f
index 146fe6b7..abcef80b 100644
--- a/TESTING/EIG/zlarfy.f
+++ b/TESTING/EIG/zlarfy.f
@@ -1,63 +1,128 @@
- SUBROUTINE ZLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER INCV, LDC, N
- COMPLEX*16 TAU
-* ..
-* .. Array Arguments ..
- COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
-* ..
-*
+*> \brief \b ZLARFY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCV, LDC, N
+* COMPLEX*16 TAU
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLARFY applies an elementary reflector, or Householder matrix, H,
-* to an n x n Hermitian matrix C, from both the left and the right.
-*
-* H is represented in the form
-*
-* H = I - tau * v * v'
-*
-* where tau is a scalar and v is a vector.
-*
-* If tau is zero, then H is taken to be the unit matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARFY applies an elementary reflector, or Householder matrix, H,
+*> to an n x n Hermitian matrix C, from both the left and the right.
+*>
+*> H is represented in the form
+*>
+*> H = I - tau * v * v'
+*>
+*> where tau is a scalar and v is a vector.
+*>
+*> If tau is zero, then H is taken to be the unit matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix C is stored.
-* = 'U': Upper triangle
-* = 'L': Lower triangle
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix C. N >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix C is stored.
+*> = 'U': Upper triangle
+*> = 'L': Lower triangle
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension
+*> (1 + (N-1)*abs(INCV))
+*> The vector v as described above.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*> INCV is INTEGER
+*> The increment between successive elements of v. INCV must
+*> not be zero.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16
+*> The value tau as described above.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, N)
+*> On entry, the matrix C.
+*> On exit, C is overwritten by H * C * H'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array C. LDC >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* V (input) COMPLEX*16 array, dimension
-* (1 + (N-1)*abs(INCV))
-* The vector v as described above.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCV (input) INTEGER
-* The increment between successive elements of v. INCV must
-* not be zero.
+*> \date November 2011
*
-* TAU (input) COMPLEX*16
-* The value tau as described above.
+*> \ingroup complex16_eig
*
-* C (input/output) COMPLEX*16 array, dimension (LDC, N)
-* On entry, the matrix C.
-* On exit, C is overwritten by H * C * H'.
+* =====================================================================
+ SUBROUTINE ZLARFY( UPLO, N, V, INCV, TAU, C, LDC, WORK )
*
-* LDC (input) INTEGER
-* The leading dimension of the array C. LDC >= max( 1, N ).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER INCV, LDC, N
+ COMPLEX*16 TAU
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 C( LDC, * ), V( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zlarhs.f b/TESTING/EIG/zlarhs.f
index 5436af30..fdeccbbf 100644
--- a/TESTING/EIG/zlarhs.f
+++ b/TESTING/EIG/zlarhs.f
@@ -1,9 +1,222 @@
+*> \brief \b ZLARHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
+* A, LDA, X, LDX, B, LDB, ISEED, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, UPLO, XTYPE
+* CHARACTER*3 PATH
+* INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARHS chooses a set of NRHS random solution vectors and sets
+*> up the right hand sides for the linear system
+*> op( A ) * X = B,
+*> where op( A ) may be A, A**T (transpose of A), or A**H (conjugate
+*> transpose of A).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The type of the complex matrix A. PATH may be given in any
+*> combination of upper and lower case. Valid paths include
+*> xGE: General m x n matrix
+*> xGB: General banded matrix
+*> xPO: Hermitian positive definite, 2-D storage
+*> xPP: Hermitian positive definite packed
+*> xPB: Hermitian positive definite banded
+*> xHE: Hermitian indefinite, 2-D storage
+*> xHP: Hermitian indefinite packed
+*> xHB: Hermitian indefinite banded
+*> xSY: Symmetric indefinite, 2-D storage
+*> xSP: Symmetric indefinite packed
+*> xSB: Symmetric indefinite banded
+*> xTR: Triangular
+*> xTP: Triangular packed
+*> xTB: Triangular banded
+*> xQR: General m x n matrix
+*> xLQ: General m x n matrix
+*> xQL: General m x n matrix
+*> xRQ: General m x n matrix
+*> where the leading character indicates the precision.
+*> \endverbatim
+*>
+*> \param[in] XTYPE
+*> \verbatim
+*> XTYPE is CHARACTER*1
+*> Specifies how the exact solution X will be determined:
+*> = 'N': New solution; generate a random X.
+*> = 'C': Computed; use value of X on entry.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Used only if A is symmetric or triangular; specifies whether
+*> the upper or lower triangular part of the matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Used only if A is nonsymmetric; specifies the operation
+*> applied to the matrix A.
+*> = 'N': B := A * X
+*> = 'T': B := A**T * X
+*> = 'C': B := A**H * X
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Used only if A is a band matrix; specifies the number of
+*> subdiagonals of A if A is a general band matrix or if A is
+*> symmetric or triangular and UPLO = 'L'; specifies the number
+*> of superdiagonals of A if A is symmetric or triangular and
+*> UPLO = 'U'. 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Used only if A is a general band matrix or if A is
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xGB, specifies the number of superdiagonals of A,
+*> and 0 <= KU <= N-1.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xTR, xTP, or xTB, specifies whether or not the
+*> matrix has unit diagonal:
+*> = 1: matrix has non-unit diagonal (default)
+*> = 2: matrix has unit diagonal
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors in the system A*X = B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The test matrix whose type is given by PATH.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If PATH = xGB, LDA >= KL+KU+1.
+*> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
+*> Otherwise, LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is or output) COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, if XTYPE = 'C' (for 'Computed'), then X contains
+*> the exact solution to the system of linear equations.
+*> On exit, if XTYPE = 'N' (for 'New'), then X is initialized
+*> with random values.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vector(s) for the system of equations,
+*> computed from B = op(A) * X, where op(A) is determined by
+*> TRANS.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. If TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> ZLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
$ A, LDA, X, LDX, B, LDB, ISEED, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS, UPLO, XTYPE
@@ -15,123 +228,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLARHS chooses a set of NRHS random solution vectors and sets
-* up the right hand sides for the linear system
-* op( A ) * X = B,
-* where op( A ) may be A, A**T (transpose of A), or A**H (conjugate
-* transpose of A).
-*
-* Arguments
-* =========
-*
-* PATH (input) CHARACTER*3
-* The type of the complex matrix A. PATH may be given in any
-* combination of upper and lower case. Valid paths include
-* xGE: General m x n matrix
-* xGB: General banded matrix
-* xPO: Hermitian positive definite, 2-D storage
-* xPP: Hermitian positive definite packed
-* xPB: Hermitian positive definite banded
-* xHE: Hermitian indefinite, 2-D storage
-* xHP: Hermitian indefinite packed
-* xHB: Hermitian indefinite banded
-* xSY: Symmetric indefinite, 2-D storage
-* xSP: Symmetric indefinite packed
-* xSB: Symmetric indefinite banded
-* xTR: Triangular
-* xTP: Triangular packed
-* xTB: Triangular banded
-* xQR: General m x n matrix
-* xLQ: General m x n matrix
-* xQL: General m x n matrix
-* xRQ: General m x n matrix
-* where the leading character indicates the precision.
-*
-* XTYPE (input) CHARACTER*1
-* Specifies how the exact solution X will be determined:
-* = 'N': New solution; generate a random X.
-* = 'C': Computed; use value of X on entry.
-*
-* UPLO (input) CHARACTER*1
-* Used only if A is symmetric or triangular; specifies whether
-* the upper or lower triangular part of the matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Used only if A is nonsymmetric; specifies the operation
-* applied to the matrix A.
-* = 'N': B := A * X
-* = 'T': B := A**T * X
-* = 'C': B := A**H * X
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* Used only if A is a band matrix; specifies the number of
-* subdiagonals of A if A is a general band matrix or if A is
-* symmetric or triangular and UPLO = 'L'; specifies the number
-* of superdiagonals of A if A is symmetric or triangular and
-* UPLO = 'U'. 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* Used only if A is a general band matrix or if A is
-* triangular.
-*
-* If PATH = xGB, specifies the number of superdiagonals of A,
-* and 0 <= KU <= N-1.
-*
-* If PATH = xTR, xTP, or xTB, specifies whether or not the
-* matrix has unit diagonal:
-* = 1: matrix has non-unit diagonal (default)
-* = 2: matrix has unit diagonal
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors in the system A*X = B.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The test matrix whose type is given by PATH.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If PATH = xGB, LDA >= KL+KU+1.
-* If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
-* Otherwise, LDA >= max(1,M).
-*
-* X (input or output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, if XTYPE = 'C' (for 'Computed'), then X contains
-* the exact solution to the system of linear equations.
-* On exit, if XTYPE = 'N' (for 'New'), then X is initialized
-* with random values.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
-*
-* B (output) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vector(s) for the system of equations,
-* computed from B = op(A) * X, where op(A) is determined by
-* TRANS.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. If TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* ZLATMS). Modified on exit.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zlatm4.f b/TESTING/EIG/zlatm4.f
index 1accf1d1..1153b1c3 100644
--- a/TESTING/EIG/zlatm4.f
+++ b/TESTING/EIG/zlatm4.f
@@ -1,9 +1,184 @@
+*> \brief \b ZLATM4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATM4( ITYPE, N, NZ1, NZ2, RSIGN, AMAGN, RCOND,
+* TRIANG, IDIST, ISEED, A, LDA )
+*
+* .. Scalar Arguments ..
+* LOGICAL RSIGN
+* INTEGER IDIST, ITYPE, LDA, N, NZ1, NZ2
+* DOUBLE PRECISION AMAGN, RCOND, TRIANG
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATM4 generates basic square matrices, which may later be
+*> multiplied by others in order to produce test matrices. It is
+*> intended mainly to be used to test the generalized eigenvalue
+*> routines.
+*>
+*> It first generates the diagonal and (possibly) subdiagonal,
+*> according to the value of ITYPE, NZ1, NZ2, RSIGN, AMAGN, and RCOND.
+*> It then fills in the upper triangle with random numbers, if TRIANG is
+*> non-zero.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> The "type" of matrix on the diagonal and sub-diagonal.
+*> If ITYPE < 0, then type abs(ITYPE) is generated and then
+*> swapped end for end (A(I,J) := A'(N-J,N-I).) See also
+*> the description of AMAGN and RSIGN.
+*> \endverbatim
+*> \verbatim
+*> Special types:
+*> = 0: the zero matrix.
+*> = 1: the identity.
+*> = 2: a transposed Jordan block.
+*> = 3: If N is odd, then a k+1 x k+1 transposed Jordan block
+*> followed by a k x k identity block, where k=(N-1)/2.
+*> If N is even, then k=(N-2)/2, and a zero diagonal entry
+*> is tacked onto the end.
+*> \endverbatim
+*> \verbatim
+*> Diagonal types. The diagonal consists of NZ1 zeros, then
+*> k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE
+*> specifies the nonzero diagonal entries as follows:
+*> = 4: 1, ..., k
+*> = 5: 1, RCOND, ..., RCOND
+*> = 6: 1, ..., 1, RCOND
+*> = 7: 1, a, a^2, ..., a^(k-1)=RCOND
+*> = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND
+*> = 9: random numbers chosen from (RCOND,1)
+*> = 10: random numbers with distribution IDIST (see ZLARND.)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix.
+*> \endverbatim
+*>
+*> \param[in] NZ1
+*> \verbatim
+*> NZ1 is INTEGER
+*> If abs(ITYPE) > 3, then the first NZ1 diagonal entries will
+*> be zero.
+*> \endverbatim
+*>
+*> \param[in] NZ2
+*> \verbatim
+*> NZ2 is INTEGER
+*> If abs(ITYPE) > 3, then the last NZ2 diagonal entries will
+*> be zero.
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is LOGICAL
+*> = .TRUE.: The diagonal and subdiagonal entries will be
+*> multiplied by random numbers of magnitude 1.
+*> = .FALSE.: The diagonal and subdiagonal entries will be
+*> left as they are (usually non-negative real.)
+*> \endverbatim
+*>
+*> \param[in] AMAGN
+*> \verbatim
+*> AMAGN is DOUBLE PRECISION
+*> The diagonal and subdiagonal entries will be multiplied by
+*> AMAGN.
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> If abs(ITYPE) > 4, then the smallest diagonal entry will be
+*> RCOND. RCOND must be between 0 and 1.
+*> \endverbatim
+*>
+*> \param[in] TRIANG
+*> \verbatim
+*> TRIANG is DOUBLE PRECISION
+*> The entries above the diagonal will be random numbers with
+*> magnitude bounded by TRIANG (i.e., random numbers multiplied
+*> by TRIANG.)
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate a random matrix .
+*> = 1: real and imaginary parts each UNIFORM( 0, 1 )
+*> = 2: real and imaginary parts each UNIFORM( -1, 1 )
+*> = 3: real and imaginary parts each NORMAL( 0, 1 )
+*> = 4: complex number uniform in DISK( 0, 1 )
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The values of ISEED are changed on exit, and can
+*> be used in the next call to ZLATM4 to continue the same
+*> random number sequence.
+*> Note: ISEED(4) should be odd, for the random number generator
+*> used at present.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> Array to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A. Must be at least 1 and at least N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZLATM4( ITYPE, N, NZ1, NZ2, RSIGN, AMAGN, RCOND,
$ TRIANG, IDIST, ISEED, A, LDA )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL RSIGN
@@ -15,100 +190,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATM4 generates basic square matrices, which may later be
-* multiplied by others in order to produce test matrices. It is
-* intended mainly to be used to test the generalized eigenvalue
-* routines.
-*
-* It first generates the diagonal and (possibly) subdiagonal,
-* according to the value of ITYPE, NZ1, NZ2, RSIGN, AMAGN, and RCOND.
-* It then fills in the upper triangle with random numbers, if TRIANG is
-* non-zero.
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* The "type" of matrix on the diagonal and sub-diagonal.
-* If ITYPE < 0, then type abs(ITYPE) is generated and then
-* swapped end for end (A(I,J) := A'(N-J,N-I).) See also
-* the description of AMAGN and RSIGN.
-*
-* Special types:
-* = 0: the zero matrix.
-* = 1: the identity.
-* = 2: a transposed Jordan block.
-* = 3: If N is odd, then a k+1 x k+1 transposed Jordan block
-* followed by a k x k identity block, where k=(N-1)/2.
-* If N is even, then k=(N-2)/2, and a zero diagonal entry
-* is tacked onto the end.
-*
-* Diagonal types. The diagonal consists of NZ1 zeros, then
-* k=N-NZ1-NZ2 nonzeros. The subdiagonal is zero. ITYPE
-* specifies the nonzero diagonal entries as follows:
-* = 4: 1, ..., k
-* = 5: 1, RCOND, ..., RCOND
-* = 6: 1, ..., 1, RCOND
-* = 7: 1, a, a^2, ..., a^(k-1)=RCOND
-* = 8: 1, 1-d, 1-2*d, ..., 1-(k-1)*d=RCOND
-* = 9: random numbers chosen from (RCOND,1)
-* = 10: random numbers with distribution IDIST (see ZLARND.)
-*
-* N (input) INTEGER
-* The order of the matrix.
-*
-* NZ1 (input) INTEGER
-* If abs(ITYPE) > 3, then the first NZ1 diagonal entries will
-* be zero.
-*
-* NZ2 (input) INTEGER
-* If abs(ITYPE) > 3, then the last NZ2 diagonal entries will
-* be zero.
-*
-* RSIGN (input) LOGICAL
-* = .TRUE.: The diagonal and subdiagonal entries will be
-* multiplied by random numbers of magnitude 1.
-* = .FALSE.: The diagonal and subdiagonal entries will be
-* left as they are (usually non-negative real.)
-*
-* AMAGN (input) DOUBLE PRECISION
-* The diagonal and subdiagonal entries will be multiplied by
-* AMAGN.
-*
-* RCOND (input) DOUBLE PRECISION
-* If abs(ITYPE) > 4, then the smallest diagonal entry will be
-* RCOND. RCOND must be between 0 and 1.
-*
-* TRIANG (input) DOUBLE PRECISION
-* The entries above the diagonal will be random numbers with
-* magnitude bounded by TRIANG (i.e., random numbers multiplied
-* by TRIANG.)
-*
-* IDIST (input) INTEGER
-* On entry, DIST specifies the type of distribution to be used
-* to generate a random matrix .
-* = 1: real and imaginary parts each UNIFORM( 0, 1 )
-* = 2: real and imaginary parts each UNIFORM( -1, 1 )
-* = 3: real and imaginary parts each NORMAL( 0, 1 )
-* = 4: complex number uniform in DISK( 0, 1 )
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The values of ISEED are changed on exit, and can
-* be used in the next call to ZLATM4 to continue the same
-* random number sequence.
-* Note: ISEED(4) should be odd, for the random number generator
-* used at present.
-*
-* A (output) COMPLEX*16 array, dimension (LDA, N)
-* Array to be computed.
-*
-* LDA (input) INTEGER
-* Leading dimension of A. Must be at least 1 and at least N.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zlctes.f b/TESTING/EIG/zlctes.f
index f143cb0c..239abe40 100644
--- a/TESTING/EIG/zlctes.f
+++ b/TESTING/EIG/zlctes.f
@@ -1,31 +1,73 @@
- LOGICAL FUNCTION ZLCTES( Z, D )
+*> \brief \b ZLCTES
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX*16 D, Z
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION ZLCTES( Z, D )
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 D, Z
+* ..
+*
* Purpose
* =======
*
-* ZLCTES returns .TRUE. if the eigenvalue Z/D is to be selected
-* (specifically, in this subroutine, if the real part of the
-* eigenvalue is negative), and otherwise it returns .FALSE..
-*
-* It is used by the test routine ZDRGES to test whether the driver
-* routine ZGGES succesfully sorts eigenvalues.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLCTES returns .TRUE. if the eigenvalue Z/D is to be selected
+*> (specifically, in this subroutine, if the real part of the
+*> eigenvalue is negative), and otherwise it returns .FALSE..
+*>
+*> It is used by the test routine ZDRGES to test whether the driver
+*> routine ZGGES succesfully sorts eigenvalues.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* Z (input) COMPLEX*16
-* The numerator part of a complex eigenvalue Z/D.
+*> \param[in] Z
+*> \verbatim
+*> Z is COMPLEX*16
+*> The numerator part of a complex eigenvalue Z/D.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16
+*> The denominator part of a complex eigenvalue Z/D.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* D (input) COMPLEX*16
-* The denominator part of a complex eigenvalue Z/D.
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION ZLCTES( Z, D )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX*16 D, Z
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zlctsx.f b/TESTING/EIG/zlctsx.f
index d7103391..756e79e0 100644
--- a/TESTING/EIG/zlctsx.f
+++ b/TESTING/EIG/zlctsx.f
@@ -1,28 +1,70 @@
- LOGICAL FUNCTION ZLCTSX( ALPHA, BETA )
+*> \brief \b ZLCTSX
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX*16 ALPHA, BETA
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* LOGICAL FUNCTION ZLCTSX( ALPHA, BETA )
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 ALPHA, BETA
+* ..
+*
* Purpose
* =======
*
-* This function is used to determine what eigenvalues will be
-* selected. If this is part of the test driver ZDRGSX, do not
-* change the code UNLESS you are testing input examples and not
-* using the built-in examples.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This function is used to determine what eigenvalues will be
+*> selected. If this is part of the test driver ZDRGSX, do not
+*> change the code UNLESS you are testing input examples and not
+*> using the built-in examples.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ALPHA (input) COMPLEX*16
-* BETA (input) COMPLEX*16
-* parameters to decide whether the pair (ALPHA, BETA) is
-* selected.
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> parameters to decide whether the pair (ALPHA, BETA) is
+*> selected.
+*> \endverbatim
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION ZLCTSX( ALPHA, BETA )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX*16 ALPHA, BETA
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zlsets.f b/TESTING/EIG/zlsets.f
index e443a263..c86895f4 100644
--- a/TESTING/EIG/zlsets.f
+++ b/TESTING/EIG/zlsets.f
@@ -1,75 +1,167 @@
- SUBROUTINE ZLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF, D, DF,
- $ X, WORK, LWORK, RWORK, RESULT )
+*> \brief \b ZLSETS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, N, P
-* ..
-* .. Array Arguments ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF, D, DF,
+* X, WORK, LWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
+*
* Purpose
* =======
*
-* ZLSETS tests ZGGLSE - a subroutine for solving linear equality
-* constrained least square problem (LSE).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLSETS tests ZGGLSE - a subroutine for solving linear equality
+*> constrained least square problem (LSE).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* P (input) INTEGER
-* The number of rows of the matrix B. P >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and B. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* AF (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,N)
-* The P-by-N matrix A.
-*
-* BF (workspace) COMPLEX*16 array, dimension (LDB,N)
-*
-* LDB (input) INTEGER
-* The leading dimension of the arrays B, BF, V and S.
-* LDB >= max(P,N).
-*
-* C (input) COMPLEX*16 array, dimension( M )
-* the vector C in the LSE problem.
-*
-* CF (workspace) COMPLEX*16 array, dimension( M )
-*
-* D (input) COMPLEX*16 array, dimension( P )
-* the vector D in the LSE problem.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] P
+*> \verbatim
+*> P is INTEGER
+*> The number of rows of the matrix B. P >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and B. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,N)
+*> The P-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[out] BF
+*> \verbatim
+*> BF is COMPLEX*16 array, dimension (LDB,N)
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the arrays B, BF, V and S.
+*> LDB >= max(P,N).
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension( M )
+*> the vector C in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] CF
+*> \verbatim
+*> CF is COMPLEX*16 array, dimension( M )
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension( P )
+*> the vector D in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] DF
+*> \verbatim
+*> DF is COMPLEX*16 array, dimension( P )
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension( N )
+*> solution vector X in the LSE problem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS
+*> RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* DF (workspace) COMPLEX*16 array, dimension( P )
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (output) COMPLEX*16 array, dimension( N )
-* solution vector X in the LSE problem.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_eig
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZLSETS( M, P, N, A, AF, LDA, B, BF, LDB, C, CF, D, DF,
+ $ X, WORK, LWORK, RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( A*x - c )/ norm(A)*norm(X)*EPS
-* RESULT(2) = norm( B*x - d )/ norm(B)*norm(X)*EPS
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, N, P
+* ..
+* .. Array Arguments ..
*
* ====================================================================
*
diff --git a/TESTING/EIG/zsbmv.f b/TESTING/EIG/zsbmv.f
index 1d527d0e..03193b61 100644
--- a/TESTING/EIG/zsbmv.f
+++ b/TESTING/EIG/zsbmv.f
@@ -1,9 +1,180 @@
+*> \brief \b ZSBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSBMV( UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, INCY, K, LDA, N
+* COMPLEX*16 ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSBMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric band matrix, with k super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the band matrix A is being supplied as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> K - INTEGER
+*> On entry, K specifies the number of super-diagonals of the
+*> matrix A. K must satisfy 0 .le. K.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> ALPHA - COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX*16 array, dimension( LDA, N )
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer the upper
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer the lower
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> X - COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INCX - INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> BETA - COMPLEX*16
+*> On entry, BETA specifies the scalar beta.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Y - COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*> \verbatim
+*> INCY - INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZSBMV( UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y,
$ INCY )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,116 +185,6 @@
COMPLEX*16 A( LDA, * ), X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSBMV performs the matrix-vector operation
-*
-* y := alpha*A*x + beta*y,
-*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric band matrix, with k super-diagonals.
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the band matrix A is being supplied as
-* follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* being supplied.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* being supplied.
-*
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER
-* On entry, K specifies the number of super-diagonals of the
-* matrix A. K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array, dimension( LDA, N )
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer the upper
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer the lower
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zsgt01.f b/TESTING/EIG/zsgt01.f
index 9db81602..c863d770 100644
--- a/TESTING/EIG/zsgt01.f
+++ b/TESTING/EIG/zsgt01.f
@@ -1,12 +1,163 @@
+*> \brief \b ZSGT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
+* WORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER ITYPE, LDA, LDB, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ Z( LDZ, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDGT01 checks a decomposition of the form
+*>
+*> A Z = B Z D or
+*> A B Z = Z D or
+*> B A Z = Z D
+*>
+*> where A is a Hermitian matrix, B is Hermitian positive definite,
+*> Z is unitary, and D is diagonal.
+*>
+*> One of the following test ratios is computed:
+*>
+*> ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )
+*>
+*> ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )
+*>
+*> ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ITYPE
+*> \verbatim
+*> ITYPE is INTEGER
+*> The form of the Hermitian generalized eigenproblem.
+*> = 1: A*z = (lambda)*B*z
+*> = 2: A*B*z = (lambda)*z
+*> = 3: B*A*z = (lambda)*z
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrices A and B is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenvalues found. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N)
+*> The original Hermitian positive definite matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*> Z is COMPLEX*16 array, dimension (LDZ, M)
+*> The computed eigenvectors of the generalized eigenproblem.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of the array Z. LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (M)
+*> The computed eigenvalues of the generalized eigenproblem.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (1)
+*> The test ratio as described above.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZSGT01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
$ WORK, RWORK, RESULT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* modified August 1997, a new parameter M is added to the calling
-* sequence.
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -18,75 +169,6 @@
$ Z( LDZ, * )
* ..
*
-* Purpose
-* =======
-*
-* CDGT01 checks a decomposition of the form
-*
-* A Z = B Z D or
-* A B Z = Z D or
-* B A Z = Z D
-*
-* where A is a Hermitian matrix, B is Hermitian positive definite,
-* Z is unitary, and D is diagonal.
-*
-* One of the following test ratios is computed:
-*
-* ITYPE = 1: RESULT(1) = | A Z - B Z D | / ( |A| |Z| n ulp )
-*
-* ITYPE = 2: RESULT(1) = | A B Z - Z D | / ( |A| |Z| n ulp )
-*
-* ITYPE = 3: RESULT(1) = | B A Z - Z D | / ( |A| |Z| n ulp )
-*
-* Arguments
-* =========
-*
-* ITYPE (input) INTEGER
-* The form of the Hermitian generalized eigenproblem.
-* = 1: A*z = (lambda)*B*z
-* = 2: A*B*z = (lambda)*z
-* = 3: B*A*z = (lambda)*z
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrices A and B is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* M (input) INTEGER
-* The number of eigenvalues found. M >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB, N)
-* The original Hermitian positive definite matrix B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* Z (input) COMPLEX*16 array, dimension (LDZ, M)
-* The computed eigenvectors of the generalized eigenproblem.
-*
-* LDZ (input) INTEGER
-* The leading dimension of the array Z. LDZ >= max(1,N).
-*
-* D (input) DOUBLE PRECISION array, dimension (M)
-* The computed eigenvalues of the generalized eigenproblem.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESULT (output) DOUBLE PRECISION array, dimension (1)
-* The test ratio as described above.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zslect.f b/TESTING/EIG/zslect.f
index fd94dbe6..386c1c37 100644
--- a/TESTING/EIG/zslect.f
+++ b/TESTING/EIG/zslect.f
@@ -1,32 +1,71 @@
- LOGICAL FUNCTION ZSLECT( Z )
+*> \brief \b ZSLECT
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- COMPLEX*16 Z
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION ZSLECT( Z )
+*
+* .. Scalar Arguments ..
+* COMPLEX*16 Z
+* ..
+*
* Purpose
* =======
*
-* ZSLECT returns .TRUE. if the eigenvalue Z is to be selected,
-* otherwise it returns .FALSE.
-* It is used by ZCHK41 to test if ZGEES succesfully sorts eigenvalues,
-* and by ZCHK43 to test if ZGEESX succesfully sorts eigenvalues.
-*
-* The common block /SSLCT/ controls how eigenvalues are selected.
-* If SELOPT = 0, then ZSLECT return .TRUE. when real(Z) is less than
-* zero, and .FALSE. otherwise.
-* If SELOPT is at least 1, ZSLECT returns SELVAL(SELOPT) and adds 1
-* to SELOPT, cycling back to 1 at SELMAX.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSLECT returns .TRUE. if the eigenvalue Z is to be selected,
+*> otherwise it returns .FALSE.
+*> It is used by ZCHK41 to test if ZGEES succesfully sorts eigenvalues,
+*> and by ZCHK43 to test if ZGEESX succesfully sorts eigenvalues.
+*>
+*> The common block /SSLCT/ controls how eigenvalues are selected.
+*> If SELOPT = 0, then ZSLECT return .TRUE. when real(Z) is less than
+*> zero, and .FALSE. otherwise.
+*> If SELOPT is at least 1, ZSLECT returns SELVAL(SELOPT) and adds 1
+*> to SELOPT, cycling back to 1 at SELMAX.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* Z (input) COMPLEX*16
-* The eigenvalue Z.
+*> \param[in] Z
+*> \verbatim
+*> Z is COMPLEX*16
+*> The eigenvalue Z.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
+ LOGICAL FUNCTION ZSLECT( Z )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ COMPLEX*16 Z
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zstt21.f b/TESTING/EIG/zstt21.f
index 703eb0d4..02f4dd77 100644
--- a/TESTING/EIG/zstt21.f
+++ b/TESTING/EIG/zstt21.f
@@ -1,78 +1,152 @@
- SUBROUTINE ZSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RWORK,
- $ RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KBAND, LDU, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
- $ SD( * ), SE( * )
- COMPLEX*16 U( LDU, * ), WORK( * )
-* ..
-*
+*> \brief \b ZSTT21
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RWORK,
+* RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
+* $ SD( * ), SE( * )
+* COMPLEX*16 U( LDU, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZSTT21 checks a decomposition of the form
-*
-* A = U S U*
-*
-* where * means conjugate transpose, A is real symmetric tridiagonal,
-* U is unitary, and S is real and diagonal (if KBAND=0) or symmetric
-* tridiagonal (if KBAND=1). Two tests are performed:
-*
-* RESULT(1) = | A - U S U* | / ( |A| n ulp )
-*
-* RESULT(2) = | I - UU* | / ( n ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSTT21 checks a decomposition of the form
+*>
+*> A = U S UC>
+*> where * means conjugate transpose, A is real symmetric tridiagonal,
+*> U is unitary, and S is real and diagonal (if KBAND=0) or symmetric
+*> tridiagonal (if KBAND=1). Two tests are performed:
+*>
+*> RESULT(1) = | A - U S U* | / ( |A| n ulp )
+*>
+*> RESULT(2) = | I - UU* | / ( n ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, ZSTT21 does nothing.
-* It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and SE is not referenced. If
-* one, then S is symmetric tri-diagonal.
-*
-* AD (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the original (unfactored) matrix A. A is
-* assumed to be real symmetric tridiagonal.
-*
-* AE (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the original (unfactored) matrix A. A
-* is assumed to be symmetric tridiagonal. AE(1) is the (1,2)
-* and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc.
-*
-* SD (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the real (symmetric tri-) diagonal matrix S.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, ZSTT21 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and SE is not referenced. If
+*> one, then S is symmetric tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AD
+*> \verbatim
+*> AD is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the original (unfactored) matrix A. A is
+*> assumed to be real symmetric tridiagonal.
+*> \endverbatim
+*>
+*> \param[in] AE
+*> \verbatim
+*> AE is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the original (unfactored) matrix A. A
+*> is assumed to be symmetric tridiagonal. AE(1) is the (1,2)
+*> and (2,1) element, AE(2) is the (2,3) and (3,2) element, etc.
+*> \endverbatim
+*>
+*> \param[in] SD
+*> \verbatim
+*> SD is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the real (symmetric tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] SE
+*> \verbatim
+*> SE is DOUBLE PRECISION array, dimension (N-1)
+*> The off-diagonal of the (symmetric tri-) diagonal matrix S.
+*> Not referenced if KBSND=0. If KBAND=1, then AE(1) is the
+*> (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2)
+*> element, etc.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU, N)
+*> The unitary matrix in the decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N**2)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> RESULT(1) is always modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SE (input) DOUBLE PRECISION array, dimension (N-1)
-* The off-diagonal of the (symmetric tri-) diagonal matrix S.
-* Not referenced if KBSND=0. If KBAND=1, then AE(1) is the
-* (1,2) and (2,1) element, SE(2) is the (2,3) and (3,2)
-* element, etc.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* U (input) COMPLEX*16 array, dimension (LDU, N)
-* The unitary matrix in the decomposition.
+*> \date November 2011
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N.
+*> \ingroup complex16_eig
*
-* WORK (workspace) COMPLEX*16 array, dimension (N**2)
+* =====================================================================
+ SUBROUTINE ZSTT21( N, KBAND, AD, AE, SD, SE, U, LDU, WORK, RWORK,
+ $ RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
-* RESULT(1) is always modified.
+* .. Scalar Arguments ..
+ INTEGER KBAND, LDU, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
+ $ SD( * ), SE( * )
+ COMPLEX*16 U( LDU, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zstt22.f b/TESTING/EIG/zstt22.f
index f7dcf925..b123c8b1 100644
--- a/TESTING/EIG/zstt22.f
+++ b/TESTING/EIG/zstt22.f
@@ -1,84 +1,165 @@
- SUBROUTINE ZSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
- $ LDWORK, RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KBAND, LDU, LDWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
- $ SD( * ), SE( * )
- COMPLEX*16 U( LDU, * ), WORK( LDWORK, * )
-* ..
-*
+*> \brief \b ZSTT22
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+* LDWORK, RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER KBAND, LDU, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
+* $ SD( * ), SE( * )
+* COMPLEX*16 U( LDU, * ), WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* ZSTT22 checks a set of M eigenvalues and eigenvectors,
-*
-* A U = U S
-*
-* where A is Hermitian tridiagonal, the columns of U are unitary,
-* and S is diagonal (if KBAND=0) or Hermitian tridiagonal (if KBAND=1).
-* Two tests are performed:
-*
-* RESULT(1) = | U* A U - S | / ( |A| m ulp )
-*
-* RESULT(2) = | I - U*U | / ( m ulp )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSTT22 checks a set of M eigenvalues and eigenvectors,
+*>
+*> A U = U S
+*>
+*> where A is Hermitian tridiagonal, the columns of U are unitary,
+*> and S is diagonal (if KBAND=0) or Hermitian tridiagonal (if KBAND=1).
+*> Two tests are performed:
+*>
+*> RESULT(1) = | U* A U - S | / ( |A| m ulp )
+*>
+*> RESULT(2) = | I - U*U | / ( m ulp )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The size of the matrix. If it is zero, ZSTT22 does nothing.
-* It must be at least zero.
-*
-* M (input) INTEGER
-* The number of eigenpairs to check. If it is zero, ZSTT22
-* does nothing. It must be at least zero.
-*
-* KBAND (input) INTEGER
-* The bandwidth of the matrix S. It may only be zero or one.
-* If zero, then S is diagonal, and SE is not referenced. If
-* one, then S is Hermitian tri-diagonal.
-*
-* AD (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the original (unfactored) matrix A. A is
-* assumed to be Hermitian tridiagonal.
-*
-* AE (input) DOUBLE PRECISION array, dimension (N)
-* The off-diagonal of the original (unfactored) matrix A. A
-* is assumed to be Hermitian tridiagonal. AE(1) is ignored,
-* AE(2) is the (1,2) and (2,1) element, etc.
-*
-* SD (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal of the (Hermitian tri-) diagonal matrix S.
-*
-* SE (input) DOUBLE PRECISION array, dimension (N)
-* The off-diagonal of the (Hermitian tri-) diagonal matrix S.
-* Not referenced if KBSND=0. If KBAND=1, then AE(1) is
-* ignored, SE(2) is the (1,2) and (2,1) element, etc.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The size of the matrix. If it is zero, ZSTT22 does nothing.
+*> It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of eigenpairs to check. If it is zero, ZSTT22
+*> does nothing. It must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] KBAND
+*> \verbatim
+*> KBAND is INTEGER
+*> The bandwidth of the matrix S. It may only be zero or one.
+*> If zero, then S is diagonal, and SE is not referenced. If
+*> one, then S is Hermitian tri-diagonal.
+*> \endverbatim
+*>
+*> \param[in] AD
+*> \verbatim
+*> AD is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the original (unfactored) matrix A. A is
+*> assumed to be Hermitian tridiagonal.
+*> \endverbatim
+*>
+*> \param[in] AE
+*> \verbatim
+*> AE is DOUBLE PRECISION array, dimension (N)
+*> The off-diagonal of the original (unfactored) matrix A. A
+*> is assumed to be Hermitian tridiagonal. AE(1) is ignored,
+*> AE(2) is the (1,2) and (2,1) element, etc.
+*> \endverbatim
+*>
+*> \param[in] SD
+*> \verbatim
+*> SD is DOUBLE PRECISION array, dimension (N)
+*> The diagonal of the (Hermitian tri-) diagonal matrix S.
+*> \endverbatim
+*>
+*> \param[in] SE
+*> \verbatim
+*> SE is DOUBLE PRECISION array, dimension (N)
+*> The off-diagonal of the (Hermitian tri-) diagonal matrix S.
+*> Not referenced if KBSND=0. If KBAND=1, then AE(1) is
+*> ignored, SE(2) is the (1,2) and (2,1) element, etc.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is DOUBLE PRECISION array, dimension (LDU, N)
+*> The unitary matrix in the decomposition.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. LDU must be at least N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK, M+1)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of WORK. LDWORK must be at least
+*> max(1,M).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The values computed by the two tests described above. The
+*> values are currently limited to 1/ulp, to avoid overflow.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* U (input) DOUBLE PRECISION array, dimension (LDU, N)
-* The unitary matrix in the decomposition.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDU (input) INTEGER
-* The leading dimension of U. LDU must be at least N.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK, M+1)
+*> \ingroup complex16_eig
*
-* LDWORK (input) INTEGER
-* The leading dimension of WORK. LDWORK must be at least
-* max(1,M).
+* =====================================================================
+ SUBROUTINE ZSTT22( N, M, KBAND, AD, AE, SD, SE, U, LDU, WORK,
+ $ LDWORK, RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The values computed by the two tests described above. The
-* values are currently limited to 1/ulp, to avoid overflow.
+* .. Scalar Arguments ..
+ INTEGER KBAND, LDU, LDWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AD( * ), AE( * ), RESULT( 2 ), RWORK( * ),
+ $ SD( * ), SE( * )
+ COMPLEX*16 U( LDU, * ), WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/EIG/zunt01.f b/TESTING/EIG/zunt01.f
index 9f1c8c8c..eb2b7fd7 100644
--- a/TESTING/EIG/zunt01.f
+++ b/TESTING/EIG/zunt01.f
@@ -1,9 +1,137 @@
+*> \brief \b ZUNT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZUNT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER ROWCOL
+* INTEGER LDU, LWORK, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 U( LDU, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNT01 checks that the matrix U is unitary by computing the ratio
+*>
+*> RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
+*> or
+*> RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
+*>
+*> Alternatively, if there isn't sufficient workspace to form
+*> I - U*U' or I - U'*U, the ratio is computed as
+*>
+*> RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
+*> or
+*> RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
+*>
+*> where EPS is the machine precision. ROWCOL is used only if m = n;
+*> if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
+*> assumed to be 'R'.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] ROWCOL
+*> \verbatim
+*> ROWCOL is CHARACTER
+*> Specifies whether the rows or columns of U should be checked
+*> for orthogonality. Used only if M = N.
+*> = 'R': Check for orthogonal rows of U
+*> = 'C': Check for orthogonal columns of U
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix U.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix U.
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,N)
+*> The unitary matrix U. U is checked for orthogonal columns
+*> if m > n or if m = n and ROWCOL = 'C'. U is checked for
+*> orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of the array U. LDU >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. For best performance, LWORK
+*> should be at least N*N if ROWCOL = 'C' or M*M if
+*> ROWCOL = 'R', but the test will be done even if LWORK is 0.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (min(M,N))
+*> Used only if LWORK is large enough to use the Level 3 BLAS
+*> code.
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
+*> RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_eig
+*
+* =====================================================================
SUBROUTINE ZUNT01( ROWCOL, M, N, U, LDU, WORK, LWORK, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER ROWCOL
@@ -15,64 +143,6 @@
COMPLEX*16 U( LDU, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZUNT01 checks that the matrix U is unitary by computing the ratio
-*
-* RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
-* or
-* RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
-* Alternatively, if there isn't sufficient workspace to form
-* I - U*U' or I - U'*U, the ratio is computed as
-*
-* RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
-* or
-* RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
-* where EPS is the machine precision. ROWCOL is used only if m = n;
-* if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
-* assumed to be 'R'.
-*
-* Arguments
-* =========
-*
-* ROWCOL (input) CHARACTER
-* Specifies whether the rows or columns of U should be checked
-* for orthogonality. Used only if M = N.
-* = 'R': Check for orthogonal rows of U
-* = 'C': Check for orthogonal columns of U
-*
-* M (input) INTEGER
-* The number of rows of the matrix U.
-*
-* N (input) INTEGER
-* The number of columns of the matrix U.
-*
-* U (input) COMPLEX*16 array, dimension (LDU,N)
-* The unitary matrix U. U is checked for orthogonal columns
-* if m > n or if m = n and ROWCOL = 'C'. U is checked for
-* orthogonal rows if m < n or if m = n and ROWCOL = 'R'.
-*
-* LDU (input) INTEGER
-* The leading dimension of the array U. LDU >= max(1,M).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* The length of the array WORK. For best performance, LWORK
-* should be at least N*N if ROWCOL = 'C' or M*M if
-* ROWCOL = 'R', but the test will be done even if LWORK is 0.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (min(M,N))
-* Used only if LWORK is large enough to use the Level 3 BLAS
-* code.
-*
-* RESID (output) DOUBLE PRECISION
-* RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
-* RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/EIG/zunt03.f b/TESTING/EIG/zunt03.f
index 7c205ba7..a03a2a23 100644
--- a/TESTING/EIG/zunt03.f
+++ b/TESTING/EIG/zunt03.f
@@ -1,98 +1,183 @@
- SUBROUTINE ZUNT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
- $ RWORK, RESULT, INFO )
+*> \brief \b ZUNT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*( * ) RC
- INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
- DOUBLE PRECISION RESULT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 U( LDU, * ), V( LDV, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZUNT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
+* RWORK, RESULT, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER*( * ) RC
+* INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
+* DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZUNT03 compares two unitary matrices U and V to see if their
-* corresponding rows or columns span the same spaces. The rows are
-* checked if RC = 'R', and the columns are checked if RC = 'C'.
-*
-* RESULT is the maximum of
-*
-* | V*V' - I | / ( MV ulp ), if RC = 'R', or
-*
-* | V'*V - I | / ( MV ulp ), if RC = 'C',
-*
-* and the maximum over rows (or columns) 1 to K of
-*
-* | U(i) - S*V(i) |/ ( N ulp )
-*
-* where abs(S) = 1 (chosen to minimize the expression), U(i) is the
-* i-th row (column) of U, and V(i) is the i-th row (column) of V.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZUNT03 compares two unitary matrices U and V to see if their
+*> corresponding rows or columns span the same spaces. The rows are
+*> checked if RC = 'R', and the columns are checked if RC = 'C'.
+*>
+*> RESULT is the maximum of
+*>
+*> | V*V' - I | / ( MV ulp ), if RC = 'R', or
+*>
+*> | V'*V - I | / ( MV ulp ), if RC = 'C',
+*>
+*> and the maximum over rows (or columns) 1 to K of
+*>
+*> | U(i) - S*V(i) |/ ( N ulp )
+*>
+*> where abs(S) = 1 (chosen to minimize the expression), U(i) is the
+*> i-th row (column) of U, and V(i) is the i-th row (column) of V.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* RC (input) CHARACTER*1
-* If RC = 'R' the rows of U and V are to be compared.
-* If RC = 'C' the columns of U and V are to be compared.
-*
-* MU (input) INTEGER
-* The number of rows of U if RC = 'R', and the number of
-* columns if RC = 'C'. If MU = 0 ZUNT03 does nothing.
-* MU must be at least zero.
-*
-* MV (input) INTEGER
-* The number of rows of V if RC = 'R', and the number of
-* columns if RC = 'C'. If MV = 0 ZUNT03 does nothing.
-* MV must be at least zero.
-*
-* N (input) INTEGER
-* If RC = 'R', the number of columns in the matrices U and V,
-* and if RC = 'C', the number of rows in U and V. If N = 0
-* ZUNT03 does nothing. N must be at least zero.
-*
-* K (input) INTEGER
-* The number of rows or columns of U and V to compare.
-* 0 <= K <= max(MU,MV).
-*
-* U (input) COMPLEX*16 array, dimension (LDU,N)
-* The first matrix to compare. If RC = 'R', U is MU by N, and
-* if RC = 'C', U is N by MU.
-*
-* LDU (input) INTEGER
-* The leading dimension of U. If RC = 'R', LDU >= max(1,MU),
-* and if RC = 'C', LDU >= max(1,N).
-*
-* V (input) COMPLEX*16 array, dimension (LDV,N)
-* The second matrix to compare. If RC = 'R', V is MV by N, and
-* if RC = 'C', V is N by MV.
+* =========
+*
+*> \param[in] RC
+*> \verbatim
+*> RC is CHARACTER*1
+*> If RC = 'R' the rows of U and V are to be compared.
+*> If RC = 'C' the columns of U and V are to be compared.
+*> \endverbatim
+*>
+*> \param[in] MU
+*> \verbatim
+*> MU is INTEGER
+*> The number of rows of U if RC = 'R', and the number of
+*> columns if RC = 'C'. If MU = 0 ZUNT03 does nothing.
+*> MU must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] MV
+*> \verbatim
+*> MV is INTEGER
+*> The number of rows of V if RC = 'R', and the number of
+*> columns if RC = 'C'. If MV = 0 ZUNT03 does nothing.
+*> MV must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> If RC = 'R', the number of columns in the matrices U and V,
+*> and if RC = 'C', the number of rows in U and V. If N = 0
+*> ZUNT03 does nothing. N must be at least zero.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of rows or columns of U and V to compare.
+*> 0 <= K <= max(MU,MV).
+*> \endverbatim
+*>
+*> \param[in] U
+*> \verbatim
+*> U is COMPLEX*16 array, dimension (LDU,N)
+*> The first matrix to compare. If RC = 'R', U is MU by N, and
+*> if RC = 'C', U is N by MU.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*> LDU is INTEGER
+*> The leading dimension of U. If RC = 'R', LDU >= max(1,MU),
+*> and if RC = 'C', LDU >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*> V is COMPLEX*16 array, dimension (LDV,N)
+*> The second matrix to compare. If RC = 'R', V is MV by N, and
+*> if RC = 'C', V is N by MV.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*> LDV is INTEGER
+*> The leading dimension of V. If RC = 'R', LDV >= max(1,MV),
+*> and if RC = 'C', LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. For best performance, LWORK
+*> should be at least N*N if RC = 'C' or M*M if RC = 'R', but
+*> the tests will be done even if LWORK is 0.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(MV,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION
+*> The value computed by the test described above. RESULT is
+*> limited to 1/ulp to avoid overflow.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 indicates a successful exit
+*> -k indicates the k-th parameter had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDV (input) INTEGER
-* The leading dimension of V. If RC = 'R', LDV >= max(1,MV),
-* and if RC = 'C', LDV >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \date November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. For best performance, LWORK
-* should be at least N*N if RC = 'C' or M*M if RC = 'R', but
-* the tests will be done even if LWORK is 0.
+*> \ingroup complex16_eig
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(MV,N))
+* =====================================================================
+ SUBROUTINE ZUNT03( RC, MU, MV, N, K, U, LDU, V, LDV, WORK, LWORK,
+ $ RWORK, RESULT, INFO )
*
-* RESULT (output) DOUBLE PRECISION
-* The value computed by the test described above. RESULT is
-* limited to 1/ulp to avoid overflow.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* 0 indicates a successful exit
-* -k indicates the k-th parameter had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER*( * ) RC
+ INTEGER INFO, K, LDU, LDV, LWORK, MU, MV, N
+ DOUBLE PRECISION RESULT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 U( LDU, * ), V( LDV, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/aladhd.f b/TESTING/LIN/aladhd.f
index 44365935..4669c9a5 100644
--- a/TESTING/LIN/aladhd.f
+++ b/TESTING/LIN/aladhd.f
@@ -1,43 +1,88 @@
- SUBROUTINE ALADHD( IOUNIT, PATH )
+*> \brief \b ALADHD
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER IOUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ALADHD( IOUNIT, PATH )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER IOUNIT
+* ..
+*
* Purpose
* =======
*
-* ALADHD prints header information for the driver routines test paths.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALADHD prints header information for the driver routines test paths.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IOUNIT (input) INTEGER
-* The unit number to which the header information should be
-* printed.
-*
-* PATH (input) CHARACTER*3
-* The name of the path for which the header information is to
-* be printed. Current paths are
-* _GE: General matrices
-* _GB: General band
-* _GT: General Tridiagonal
-* _PO: Symmetric or Hermitian positive definite
-* _PS: Symmetric or Hermitian positive semi-definite
-* _PP: Symmetric or Hermitian positive definite packed
-* _PB: Symmetric or Hermitian positive definite band
-* _PT: Symmetric or Hermitian positive definite tridiagonal
-* _SY: Symmetric indefinite
-* _SP: Symmetric indefinite packed
-* _HE: (complex) Hermitian indefinite
-* _HP: (complex) Hermitian indefinite packed
-* The first character must be one of S, D, C, or Z (C or Z only
-* if complex).
+*> \param[in] IOUNIT
+*> \verbatim
+*> IOUNIT is INTEGER
+*> The unit number to which the header information should be
+*> printed.
+*> \endverbatim
+*>
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The name of the path for which the header information is to
+*> be printed. Current paths are
+*> _GE: General matrices
+*> _GB: General band
+*> _GT: General Tridiagonal
+*> _PO: Symmetric or Hermitian positive definite
+*> _PS: Symmetric or Hermitian positive semi-definite
+*> _PP: Symmetric or Hermitian positive definite packed
+*> _PB: Symmetric or Hermitian positive definite band
+*> _PT: Symmetric or Hermitian positive definite tridiagonal
+*> _SY: Symmetric indefinite
+*> _SP: Symmetric indefinite packed
+*> _HE: (complex) Hermitian indefinite
+*> _HP: (complex) Hermitian indefinite packed
+*> The first character must be one of S, D, C, or Z (C or Z only
+*> if complex).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_lin
+*
+* =====================================================================
+ SUBROUTINE ALADHD( IOUNIT, PATH )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER IOUNIT
+* ..
+*
+* =====================================================================
*
* .. Local Scalars ..
LOGICAL CORZ, SORD
diff --git a/TESTING/LIN/alaerh.f b/TESTING/LIN/alaerh.f
index 1edb12c2..0b310346 100644
--- a/TESTING/LIN/alaerh.f
+++ b/TESTING/LIN/alaerh.f
@@ -1,83 +1,166 @@
- SUBROUTINE ALAERH( PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU,
- $ N5, IMAT, NFAIL, NERRS, NOUT )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- CHARACTER*( * ) SUBNAM
- CHARACTER*( * ) OPTS
- INTEGER IMAT, INFO, INFOE, KL, KU, M, N, N5, NERRS,
- $ NFAIL, NOUT
-* ..
-*
+*> \brief \b ALAERH
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ALAERH( PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU,
+* N5, IMAT, NFAIL, NERRS, NOUT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* CHARACTER*( * ) SUBNAM
+* CHARACTER*( * ) OPTS
+* INTEGER IMAT, INFO, INFOE, KL, KU, M, N, N5, NERRS,
+* $ NFAIL, NOUT
+* ..
+*
* Purpose
* =======
*
-* ALAERH is an error handler for the LAPACK routines. It prints the
-* header if this is the first error message and prints the error code
-* and form of recovery, if any. The character evaluations in this
-* routine may make it slow, but it should not be called once the LAPACK
-* routines are fully debugged.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALAERH is an error handler for the LAPACK routines. It prints the
+*> header if this is the first error message and prints the error code
+*> and form of recovery, if any. The character evaluations in this
+*> routine may make it slow, but it should not be called once the LAPACK
+*> routines are fully debugged.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name of subroutine SUBNAM.
-*
-* SUBNAM (input) CHARACTER*(*)
-* The name of the subroutine that returned an error code.
-*
-* INFO (input) INTEGER
-* The error code returned from routine SUBNAM.
-*
-* INFOE (input) INTEGER
-* The expected error code from routine SUBNAM, if SUBNAM were
-* error-free. If INFOE = 0, an error message is printed, but
-* if INFOE.NE.0, we assume only the return code INFO is wrong.
-*
-* OPTS (input) CHARACTER*(*)
-* The character options to the subroutine SUBNAM, concatenated
-* into a single character string. For example, UPLO = 'U',
-* TRANS = 'T', and DIAG = 'N' for a triangular routine would
-* be specified as OPTS = 'UTN'.
-*
-* M (input) INTEGER
-* The matrix row dimension.
-*
-* N (input) INTEGER
-* The matrix column dimension. Accessed only if PATH = xGE or
-* xGB.
-*
-* KL (input) INTEGER
-* The number of sub-diagonals of the matrix. Accessed only if
-* PATH = xGB, xPB, or xTB. Also used for NRHS for PATH = xLS.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name of subroutine SUBNAM.
+*> \endverbatim
+*>
+*> \param[in] SUBNAM
+*> \verbatim
+*> SUBNAM is CHARACTER*(*)
+*> The name of the subroutine that returned an error code.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The error code returned from routine SUBNAM.
+*> \endverbatim
+*>
+*> \param[in] INFOE
+*> \verbatim
+*> INFOE is INTEGER
+*> The expected error code from routine SUBNAM, if SUBNAM were
+*> error-free. If INFOE = 0, an error message is printed, but
+*> if INFOE.NE.0, we assume only the return code INFO is wrong.
+*> \endverbatim
+*>
+*> \param[in] OPTS
+*> \verbatim
+*> OPTS is CHARACTER*(*)
+*> The character options to the subroutine SUBNAM, concatenated
+*> into a single character string. For example, UPLO = 'U',
+*> TRANS = 'T', and DIAG = 'N' for a triangular routine would
+*> be specified as OPTS = 'UTN'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The matrix row dimension.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The matrix column dimension. Accessed only if PATH = xGE or
+*> xGB.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of sub-diagonals of the matrix. Accessed only if
+*> PATH = xGB, xPB, or xTB. Also used for NRHS for PATH = xLS.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of super-diagonals of the matrix. Accessed only
+*> if PATH = xGB.
+*> \endverbatim
+*>
+*> \param[in] N5
+*> \verbatim
+*> N5 is INTEGER
+*> A fifth integer parameter, may be the blocksize NB or the
+*> number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> The matrix type.
+*> \endverbatim
+*>
+*> \param[in] NFAIL
+*> \verbatim
+*> NFAIL is INTEGER
+*> The number of prior tests that did not pass the threshold;
+*> used to determine if the header should be printed.
+*> \endverbatim
+*>
+*> \param[in,out] NERRS
+*> \verbatim
+*> NERRS is INTEGER
+*> On entry, the number of errors already detected; used to
+*> determine if the header should be printed.
+*> On exit, NERRS is increased by 1.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number on which results are to be printed.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KU (input) INTEGER
-* The number of super-diagonals of the matrix. Accessed only
-* if PATH = xGB.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N5 (input) INTEGER
-* A fifth integer parameter, may be the blocksize NB or the
-* number of right hand sides NRHS.
+*> \date November 2011
*
-* IMAT (input) INTEGER
-* The matrix type.
+*> \ingroup aux_lin
*
-* NFAIL (input) INTEGER
-* The number of prior tests that did not pass the threshold;
-* used to determine if the header should be printed.
+* =====================================================================
+ SUBROUTINE ALAERH( PATH, SUBNAM, INFO, INFOE, OPTS, M, N, KL, KU,
+ $ N5, IMAT, NFAIL, NERRS, NOUT )
*
-* NERRS (input/output) INTEGER
-* On entry, the number of errors already detected; used to
-* determine if the header should be printed.
-* On exit, NERRS is increased by 1.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* NOUT (input) INTEGER
-* The unit number on which results are to be printed.
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ CHARACTER*( * ) SUBNAM
+ CHARACTER*( * ) OPTS
+ INTEGER IMAT, INFO, INFOE, KL, KU, M, N, N5, NERRS,
+ $ NFAIL, NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/alaesm.f b/TESTING/LIN/alaesm.f
index bcc6bc24..c8c5b916 100644
--- a/TESTING/LIN/alaesm.f
+++ b/TESTING/LIN/alaesm.f
@@ -1,33 +1,80 @@
- SUBROUTINE ALAESM( PATH, OK, NOUT )
+*> \brief \b ALAESM
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- LOGICAL OK
- CHARACTER*3 PATH
- INTEGER NOUT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ALAESM( PATH, OK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL OK
+* CHARACTER*3 PATH
+* INTEGER NOUT
+* ..
+*
* Purpose
* =======
*
-* ALAESM prints a summary of results from one of the -ERR- routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALAESM prints a summary of results from one of the -ERR- routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] OK
+*> \verbatim
+*> OK is LOGICAL
+*> The flag from CHKXER that indicates whether or not the tests
+*> of error exits passed.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number on which results are to be printed.
+*> NOUT >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* OK (input) LOGICAL
-* The flag from CHKXER that indicates whether or not the tests
-* of error exits passed.
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The unit number on which results are to be printed.
-* NOUT >= 0.
+*> \ingroup aux_lin
+*
+* =====================================================================
+ SUBROUTINE ALAESM( PATH, OK, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ LOGICAL OK
+ CHARACTER*3 PATH
+ INTEGER NOUT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/alahd.f b/TESTING/LIN/alahd.f
index a8aa21f0..07dd4a9b 100644
--- a/TESTING/LIN/alahd.f
+++ b/TESTING/LIN/alahd.f
@@ -1,56 +1,99 @@
- SUBROUTINE ALAHD( IOUNIT, PATH )
+*> \brief \b ALAHD
*
-* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER IOUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ALAHD( IOUNIT, PATH )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER IOUNIT
+* ..
+*
* Purpose
* =======
*
-* ALAHD prints header information for the different test paths.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALAHD prints header information for the different test paths.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IOUNIT (input) INTEGER
-* The unit number to which the header information should be
-* printed.
-*
-* PATH (input) CHARACTER*3
-* The name of the path for which the header information is to
-* be printed. Current paths are
-* _GE: General matrices
-* _GB: General band
-* _GT: General Tridiagonal
-* _PO: Symmetric or Hermitian positive definite
-* _PS: Symmetric or Hermitian positive semi-definite
-* _PP: Symmetric or Hermitian positive definite packed
-* _PB: Symmetric or Hermitian positive definite band
-* _PT: Symmetric or Hermitian positive definite tridiagonal
-* _SY: Symmetric indefinite
-* _SP: Symmetric indefinite packed
-* _HE: (complex) Hermitian indefinite
-* _HP: (complex) Hermitian indefinite packed
-* _TR: Triangular
-* _TP: Triangular packed
-* _TB: Triangular band
-* _QR: QR (general matrices)
-* _LQ: LQ (general matrices)
-* _QL: QL (general matrices)
-* _RQ: RQ (general matrices)
-* _QP: QR with column pivoting
-* _TZ: Trapezoidal
-* _LS: Least Squares driver routines
-* _LU: LU variants
-* _CH: Cholesky variants
-* _QS: QR variants
-* The first character must be one of S, D, C, or Z (C or Z only
-* if complex).
+*> \param[in] IOUNIT
+*> \verbatim
+*> IOUNIT is INTEGER
+*> The unit number to which the header information should be
+*> printed.
+*> \endverbatim
+*>
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The name of the path for which the header information is to
+*> be printed. Current paths are
+*> _GE: General matrices
+*> _GB: General band
+*> _GT: General Tridiagonal
+*> _PO: Symmetric or Hermitian positive definite
+*> _PS: Symmetric or Hermitian positive semi-definite
+*> _PP: Symmetric or Hermitian positive definite packed
+*> _PB: Symmetric or Hermitian positive definite band
+*> _PT: Symmetric or Hermitian positive definite tridiagonal
+*> _SY: Symmetric indefinite
+*> _SP: Symmetric indefinite packed
+*> _HE: (complex) Hermitian indefinite
+*> _HP: (complex) Hermitian indefinite packed
+*> _TR: Triangular
+*> _TP: Triangular packed
+*> _TB: Triangular band
+*> _QR: QR (general matrices)
+*> _LQ: LQ (general matrices)
+*> _QL: QL (general matrices)
+*> _RQ: RQ (general matrices)
+*> _QP: QR with column pivoting
+*> _TZ: Trapezoidal
+*> _LS: Least Squares driver routines
+*> _LU: LU variants
+*> _CH: Cholesky variants
+*> _QS: QR variants
+*> The first character must be one of S, D, C, or Z (C or Z only
+*> if complex).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_lin
+*
+* =====================================================================
+ SUBROUTINE ALAHD( IOUNIT, PATH )
+*
+* -- LAPACK test routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER IOUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/alareq.f b/TESTING/LIN/alareq.f
index b42cb20e..6acaed1f 100644
--- a/TESTING/LIN/alareq.f
+++ b/TESTING/LIN/alareq.f
@@ -1,51 +1,109 @@
- SUBROUTINE ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NIN, NMATS, NOUT, NTYPES
-* ..
-* .. Array Arguments ..
- LOGICAL DOTYPE( * )
-* ..
-*
+*> \brief \b ALAREQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NIN, NMATS, NOUT, NTYPES
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* ..
+*
* Purpose
* =======
*
-* ALAREQ handles input for the LAPACK test program. It is called
-* to evaluate the input line which requested NMATS matrix types for
-* PATH. The flow of control is as follows:
-*
-* If NMATS = NTYPES then
-* DOTYPE(1:NTYPES) = .TRUE.
-* else
-* Read the next input line for NMATS matrix types
-* Set DOTYPE(I) = .TRUE. for each valid type I
-* endif
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALAREQ handles input for the LAPACK test program. It is called
+*> to evaluate the input line which requested NMATS matrix types for
+*> PATH. The flow of control is as follows:
+*>
+*> If NMATS = NTYPES then
+*> DOTYPE(1:NTYPES) = .TRUE.
+*> else
+*> Read the next input line for NMATS matrix types
+*> Set DOTYPE(I) = .TRUE. for each valid type I
+*> endif
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* An LAPACK path name for testing.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> An LAPACK path name for testing.
+*> \endverbatim
+*>
+*> \param[in] NMATS
+*> \verbatim
+*> NMATS is INTEGER
+*> The number of matrix types to be used in testing this path.
+*> \endverbatim
+*>
+*> \param[out] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The vector of flags indicating if each type will be tested.
+*> \endverbatim
+*>
+*> \param[in] NTYPES
+*> \verbatim
+*> NTYPES is INTEGER
+*> The maximum number of matrix types for this path.
+*> \endverbatim
+*>
+*> \param[in] NIN
+*> \verbatim
+*> NIN is INTEGER
+*> The unit number for input. NIN >= 1.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output. NOUT >= 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NMATS (input) INTEGER
-* The number of matrix types to be used in testing this path.
+*> \date November 2011
*
-* DOTYPE (output) LOGICAL array, dimension (NTYPES)
-* The vector of flags indicating if each type will be tested.
+*> \ingroup aux_lin
*
-* NTYPES (input) INTEGER
-* The maximum number of matrix types for this path.
+* =====================================================================
+ SUBROUTINE ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT )
*
-* NIN (input) INTEGER
-* The unit number for input. NIN >= 1.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* NOUT (input) INTEGER
-* The unit number for output. NOUT >= 1.
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NIN, NMATS, NOUT, NTYPES
+* ..
+* .. Array Arguments ..
+ LOGICAL DOTYPE( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/alasum.f b/TESTING/LIN/alasum.f
index 057da15e..e0159d15 100644
--- a/TESTING/LIN/alasum.f
+++ b/TESTING/LIN/alasum.f
@@ -1,37 +1,89 @@
- SUBROUTINE ALASUM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*> \brief \b ALASUM
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 TYPE
- INTEGER NFAIL, NOUT, NRUN, NERRS
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ALASUM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
+*
* Purpose
* =======
*
-* ALASUM prints a summary of results from one of the -CHK- routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALASUM prints a summary of results from one of the -CHK- routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) CHARACTER*3
-* The LAPACK path name.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number on which results are to be printed.
+*> NOUT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NFAIL
+*> \verbatim
+*> NFAIL is INTEGER
+*> The number of tests which did not pass the threshold ratio.
+*> \endverbatim
+*>
+*> \param[in] NRUN
+*> \verbatim
+*> NRUN is INTEGER
+*> The total number of tests.
+*> \endverbatim
+*>
+*> \param[in] NERRS
+*> \verbatim
+*> NERRS is INTEGER
+*> The number of error messages recorded.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NOUT (input) INTEGER
-* The unit number on which results are to be printed.
-* NOUT >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NFAIL (input) INTEGER
-* The number of tests which did not pass the threshold ratio.
+*> \date November 2011
*
-* NRUN (input) INTEGER
-* The total number of tests.
+*> \ingroup aux_lin
*
-* NERRS (input) INTEGER
-* The number of error messages recorded.
+* =====================================================================
+ SUBROUTINE ALASUM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 TYPE
+ INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/alasvm.f b/TESTING/LIN/alasvm.f
index 123e2183..17adf186 100644
--- a/TESTING/LIN/alasvm.f
+++ b/TESTING/LIN/alasvm.f
@@ -1,37 +1,89 @@
- SUBROUTINE ALASVM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*> \brief \b ALASVM
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 TYPE
- INTEGER NFAIL, NOUT, NRUN, NERRS
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ALASVM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 TYPE
+* INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
+*
* Purpose
* =======
*
-* ALASVM prints a summary of results from one of the -DRV- routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ALASVM prints a summary of results from one of the -DRV- routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) CHARACTER*3
-* The LAPACK path name.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number on which results are to be printed.
+*> NOUT >= 0.
+*> \endverbatim
+*>
+*> \param[in] NFAIL
+*> \verbatim
+*> NFAIL is INTEGER
+*> The number of tests which did not pass the threshold ratio.
+*> \endverbatim
+*>
+*> \param[in] NRUN
+*> \verbatim
+*> NRUN is INTEGER
+*> The total number of tests.
+*> \endverbatim
+*>
+*> \param[in] NERRS
+*> \verbatim
+*> NERRS is INTEGER
+*> The number of error messages recorded.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NOUT (input) INTEGER
-* The unit number on which results are to be printed.
-* NOUT >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NFAIL (input) INTEGER
-* The number of tests which did not pass the threshold ratio.
+*> \date November 2011
*
-* NRUN (input) INTEGER
-* The total number of tests.
+*> \ingroup aux_lin
*
-* NERRS (input) INTEGER
-* The number of error messages recorded.
+* =====================================================================
+ SUBROUTINE ALASVM( TYPE, NOUT, NFAIL, NRUN, NERRS )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 TYPE
+ INTEGER NFAIL, NOUT, NRUN, NERRS
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cchkaa.f b/TESTING/LIN/cchkaa.f
index 02e9e795..c27749bd 100644
--- a/TESTING/LIN/cchkaa.f
+++ b/TESTING/LIN/cchkaa.f
@@ -1,79 +1,117 @@
- PROGRAM CCHKAA
+*> \brief \b CCHKAA
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* PROGRAM CCHKAA
+*
* Purpose
* =======
*
-* CCHKAA is the main test program for the COMPLEX linear equation
-* routines.
-*
-* The program must be driven by a short data file. The first 14 records
-* specify problem dimensions and program options using list-directed
-* input. The remaining lines specify the LAPACK test paths and the
-* number of matrix types to use in testing. An annotated example of a
-* data file can be obtained by deleting the first 3 characters from the
-* following 38 lines:
-* Data file for testing COMPLEX LAPACK linear equation routines
-* 7 Number of values of M
-* 0 1 2 3 5 10 16 Values of M (row dimension)
-* 7 Number of values of N
-* 0 1 2 3 5 10 16 Values of N (column dimension)
-* 1 Number of values of NRHS
-* 2 Values of NRHS (number of right hand sides)
-* 5 Number of values of NB
-* 1 3 3 3 20 Values of NB (the blocksize)
-* 1 0 5 9 1 Values of NX (crossover point)
-* 3 Number of values of RANK
-* 30 50 90 Values of rank (as a % of N)
-* 30.0 Threshold value of test ratio
-* T Put T to test the LAPACK routines
-* T Put T to test the driver routines
-* T Put T to test the error exits
-* CGE 11 List types on next line if 0 < NTYPES < 11
-* CGB 8 List types on next line if 0 < NTYPES < 8
-* CGT 12 List types on next line if 0 < NTYPES < 12
-* CPO 9 List types on next line if 0 < NTYPES < 9
-* CPO 9 List types on next line if 0 < NTYPES < 9
-* CPP 9 List types on next line if 0 < NTYPES < 9
-* CPB 8 List types on next line if 0 < NTYPES < 8
-* CPT 12 List types on next line if 0 < NTYPES < 12
-* CHE 10 List types on next line if 0 < NTYPES < 10
-* CHP 10 List types on next line if 0 < NTYPES < 10
-* CSY 11 List types on next line if 0 < NTYPES < 11
-* CSP 11 List types on next line if 0 < NTYPES < 11
-* CTR 18 List types on next line if 0 < NTYPES < 18
-* CTP 18 List types on next line if 0 < NTYPES < 18
-* CTB 17 List types on next line if 0 < NTYPES < 17
-* CQR 8 List types on next line if 0 < NTYPES < 8
-* CRQ 8 List types on next line if 0 < NTYPES < 8
-* CLQ 8 List types on next line if 0 < NTYPES < 8
-* CQL 8 List types on next line if 0 < NTYPES < 8
-* CQP 6 List types on next line if 0 < NTYPES < 6
-* CTZ 3 List types on next line if 0 < NTYPES < 3
-* CLS 6 List types on next line if 0 < NTYPES < 6
-* CEQ
-*
-* Internal Parameters
-* ===================
-*
-* NMAX INTEGER
-* The maximum allowable value for N.
-*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, or NB
-*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
-*
-* NIN INTEGER
-* The unit number for input
-*
-* NOUT INTEGER
-* The unit number for output
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKAA is the main test program for the COMPLEX linear equation
+*> routines.
+*>
+*> The program must be driven by a short data file. The first 14 records
+*> specify problem dimensions and program options using list-directed
+*> input. The remaining lines specify the LAPACK test paths and the
+*> number of matrix types to use in testing. An annotated example of a
+*> data file can be obtained by deleting the first 3 characters from the
+*> following 38 lines:
+*> Data file for testing COMPLEX LAPACK linear equation routines
+*> 7 Number of values of M
+*> 0 1 2 3 5 10 16 Values of M (row dimension)
+*> 7 Number of values of N
+*> 0 1 2 3 5 10 16 Values of N (column dimension)
+*> 1 Number of values of NRHS
+*> 2 Values of NRHS (number of right hand sides)
+*> 5 Number of values of NB
+*> 1 3 3 3 20 Values of NB (the blocksize)
+*> 1 0 5 9 1 Values of NX (crossover point)
+*> 3 Number of values of RANK
+*> 30 50 90 Values of rank (as a % of N)
+*> 30.0 Threshold value of test ratio
+*> T Put T to test the LAPACK routines
+*> T Put T to test the driver routines
+*> T Put T to test the error exits
+*> CGE 11 List types on next line if 0 < NTYPES < 11
+*> CGB 8 List types on next line if 0 < NTYPES < 8
+*> CGT 12 List types on next line if 0 < NTYPES < 12
+*> CPO 9 List types on next line if 0 < NTYPES < 9
+*> CPO 9 List types on next line if 0 < NTYPES < 9
+*> CPP 9 List types on next line if 0 < NTYPES < 9
+*> CPB 8 List types on next line if 0 < NTYPES < 8
+*> CPT 12 List types on next line if 0 < NTYPES < 12
+*> CHE 10 List types on next line if 0 < NTYPES < 10
+*> CHP 10 List types on next line if 0 < NTYPES < 10
+*> CSY 11 List types on next line if 0 < NTYPES < 11
+*> CSP 11 List types on next line if 0 < NTYPES < 11
+*> CTR 18 List types on next line if 0 < NTYPES < 18
+*> CTP 18 List types on next line if 0 < NTYPES < 18
+*> CTB 17 List types on next line if 0 < NTYPES < 17
+*> CQR 8 List types on next line if 0 < NTYPES < 8
+*> CRQ 8 List types on next line if 0 < NTYPES < 8
+*> CLQ 8 List types on next line if 0 < NTYPES < 8
+*> CQL 8 List types on next line if 0 < NTYPES < 8
+*> CQP 6 List types on next line if 0 < NTYPES < 6
+*> CTZ 3 List types on next line if 0 < NTYPES < 3
+*> CLS 6 List types on next line if 0 < NTYPES < 6
+*> CEQ
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N.
+*> \endverbatim
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, or NB
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ PROGRAM CCHKAA
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/cchkeq.f b/TESTING/LIN/cchkeq.f
index 33b846ef..3c03f70c 100644
--- a/TESTING/LIN/cchkeq.f
+++ b/TESTING/LIN/cchkeq.f
@@ -1,27 +1,70 @@
- SUBROUTINE CCHKEQ( THRESH, NOUT )
+*> \brief \b CCHKEQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NOUT
- REAL THRESH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CCHKEQ( THRESH, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NOUT
+* REAL THRESH
+* ..
+*
* Purpose
* =======
*
-* CCHKEQ tests CGEEQU, CGBEQU, CPOEQU, CPPEQU and CPBEQU
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKEQ tests CGEEQU, CGBEQU, CPOEQU, CPPEQU and CPBEQU
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* THRESH (input) REAL
-* Threshold for testing routines. Should be between 2 and 10.
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> Threshold for testing routines. Should be between 2 and 10.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CCHKEQ( THRESH, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NOUT
+ REAL THRESH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cchkgb.f b/TESTING/LIN/cchkgb.f
index a0c69247..c5185a5e 100644
--- a/TESTING/LIN/cchkgb.f
+++ b/TESTING/LIN/cchkgb.f
@@ -1,10 +1,202 @@
+*> \brief \b CCHKGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
+* NSVAL, THRESH, TSTERR, A, LA, AFAC, LAFAC, B,
+* X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFAC, NM, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKGB tests CGBTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (KLMAX+KUMAX+1)*NMAX
+*> where KLMAX is the largest entry in the local array KLVAL,
+*> KUMAX is the largest entry in the local array KUVAL and
+*> NMAX is the largest entry in the input array NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (LAFAC)
+*> \endverbatim
+*>
+*> \param[in] LAFAC
+*> \verbatim
+*> LAFAC is INTEGER
+*> The length of the array AFAC. LAFAC >= (2*KLMAX+KUMAX+1)*NMAX
+*> where KLMAX is the largest entry in the local array KLVAL,
+*> KUMAX is the largest entry in the local array KUVAL and
+*> NMAX is the largest entry in the input array NVAL.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
$ NSVAL, THRESH, TSTERR, A, LA, AFAC, LAFAC, B,
$ X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,84 +212,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKGB tests CGBTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (KLMAX+KUMAX+1)*NMAX
-* where KLMAX is the largest entry in the local array KLVAL,
-* KUMAX is the largest entry in the local array KUVAL and
-* NMAX is the largest entry in the input array NVAL.
-*
-* AFAC (workspace) COMPLEX array, dimension (LAFAC)
-*
-* LAFAC (input) INTEGER
-* The length of the array AFAC. LAFAC >= (2*KLMAX+KUMAX+1)*NMAX
-* where KLMAX is the largest entry in the local array KLVAL,
-* KUMAX is the largest entry in the local array KUVAL and
-* NMAX is the largest entry in the input array NVAL.
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX,NMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkge.f b/TESTING/LIN/cchkge.f
index 53ca139f..926339cd 100644
--- a/TESTING/LIN/cchkge.f
+++ b/TESTING/LIN/cchkge.f
@@ -1,10 +1,204 @@
+*> \brief \b CCHKGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
+* NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
+* X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKGE tests CGETRF, -TRI, -TRS, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(2*NMAX,2*NSMAX+NWORK))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
$ NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
$ X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +214,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKGE tests CGETRF, -TRI, -TRS, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(2*NMAX,2*NSMAX+NWORK))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkgt.f b/TESTING/LIN/cchkgt.f
index 42e4b4bb..83d67d36 100644
--- a/TESTING/LIN/cchkgt.f
+++ b/TESTING/LIN/cchkgt.f
@@ -1,9 +1,158 @@
+*> \brief \b CCHKGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AF( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKGT tests CGTTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX)+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,61 +167,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKGT tests CGTTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*4)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*4)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX)+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkhe.f b/TESTING/LIN/cchkhe.f
index 9f7622f4..59682376 100644
--- a/TESTING/LIN/cchkhe.f
+++ b/TESTING/LIN/cchkhe.f
@@ -1,10 +1,184 @@
+*> \brief \b CCHKHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKHE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKHE tests CHETRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKHE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,73 +193,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKHE tests CHETRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkhp.f b/TESTING/LIN/cchkhp.f
index bdb00328..b7a6970f 100644
--- a/TESTING/LIN/cchkhp.f
+++ b/TESTING/LIN/cchkhp.f
@@ -1,10 +1,175 @@
+*> \brief \b CCHKHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKHP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKHP tests CHPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKHP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +184,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKHP tests CHPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NSMAX))
-*
-* RWORK (workspace) REAL array,
-* dimension (NMAX+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchklq.f b/TESTING/LIN/cchklq.f
index 783f42b6..0c520ff7 100644
--- a/TESTING/LIN/cchklq.f
+++ b/TESTING/LIN/cchklq.f
@@ -1,10 +1,207 @@
+*> \brief \b CCHKLQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
+* B, X, XACT, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AC( * ), AF( * ), AL( * ), AQ( * ),
+* $ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKLQ tests CGELQF, CUNGLQ and CUNMLQ.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AL
+*> \verbatim
+*> AL is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
$ B, X, XACT, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +217,6 @@
$ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKLQ tests CGELQF, CUNGLQ and CUNMLQ.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AL (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) COMPLEX array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkpb.f b/TESTING/LIN/cchkpb.f
index 45590a47..2bc160f0 100644
--- a/TESTING/LIN/cchkpb.f
+++ b/TESTING/LIN/cchkpb.f
@@ -1,10 +1,179 @@
+*> \brief \b CCHKPB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKPB( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKPB tests CPBTRF, -TRS, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKPB( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,71 +188,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKPB tests CPBTRF, -TRS, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkpo.f b/TESTING/LIN/cchkpo.f
index cf758f29..cdd91879 100644
--- a/TESTING/LIN/cchkpo.f
+++ b/TESTING/LIN/cchkpo.f
@@ -1,10 +1,179 @@
+*> \brief \b CCHKPO
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKPO( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKPO tests CPOTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKPO( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,71 +188,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKPO tests CPOTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (NMAX+2*NSMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkpp.f b/TESTING/LIN/cchkpp.f
index 9c93fe53..078f6a7b 100644
--- a/TESTING/LIN/cchkpp.f
+++ b/TESTING/LIN/cchkpp.f
@@ -1,10 +1,170 @@
+*> \brief \b CCHKPP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKPP tests CPPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,68 +179,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKPP tests CPPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkps.f b/TESTING/LIN/cchkps.f
index 379e421c..935635ae 100644
--- a/TESTING/LIN/cchkps.f
+++ b/TESTING/LIN/cchkps.f
@@ -1,10 +1,165 @@
+*> \brief \b CCHKPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKPS( DOTYPE, NN, NVAL, NNB, NBVAL, NRANK, RANKVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, PERM, PIV, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* REAL THRESH
+* INTEGER NMAX, NN, NNB, NOUT, NRANK
+* LOGICAL TSTERR
+* ..
+* .. Array Arguments ..
+* COMPLEX A( * ), AFAC( * ), PERM( * ), WORK( * )
+* REAL RWORK( * )
+* INTEGER NBVAL( * ), NVAL( * ), PIV( * ), RANKVAL( * )
+* LOGICAL DOTYPE( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKPS tests CPSTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the block size NB.
+*> \endverbatim
+*>
+*> \param[in] NRANK
+*> \verbatim
+*> NRANK is INTEGER
+*> The number of values of RANK contained in the vector RANKVAL.
+*> \endverbatim
+*>
+*> \param[in] RANKVAL
+*> \verbatim
+*> RANKVAL is INTEGER array, dimension (NBVAL)
+*> The values of the block size NB.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*3)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKPS( DOTYPE, NN, NVAL, NNB, NBVAL, NRANK, RANKVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, PERM, PIV, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* -- April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL THRESH
@@ -18,64 +173,6 @@
LOGICAL DOTYPE( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKPS tests CPSTRF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the block size NB.
-*
-* NRANK (input) INTEGER
-* The number of values of RANK contained in the vector RANKVAL.
-*
-* RANKVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the block size NB.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* PERM (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* PIV (workspace) INTEGER array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*3)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkpt.f b/TESTING/LIN/cchkpt.f
index d940d51f..3b509226 100644
--- a/TESTING/LIN/cchkpt.f
+++ b/TESTING/LIN/cchkpt.f
@@ -1,9 +1,158 @@
+*> \brief \b CCHKPT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* A, D, E, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* REAL D( * ), RWORK( * )
+* COMPLEX A( * ), B( * ), E( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKPT tests CPTTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is COMPLEX array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ A, D, E, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,61 +167,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKPT tests CPTTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*2)
-*
-* D (workspace) REAL array, dimension (NMAX*2)
-*
-* E (workspace) COMPLEX array, dimension (NMAX*2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkq3.f b/TESTING/LIN/cchkq3.f
index bfdb6d28..446c6514 100644
--- a/TESTING/LIN/cchkq3.f
+++ b/TESTING/LIN/cchkq3.f
@@ -1,10 +1,169 @@
+*> \brief \b CCHKQ3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* THRESH, A, COPYA, S, TAU, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NM, NN, NNB, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL S( * ), RWORK( * )
+* COMPLEX A( * ), COPYA( * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKQ3 tests CGEQP3.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is COMPLEX array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (max(M*max(M,N) + 4*min(M,N) + max(M,N)))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (4*NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ THRESH, A, COPYA, S, TAU, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NM, NN, NNB, NOUT
@@ -18,68 +177,6 @@
COMPLEX A( * ), COPYA( * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKQ3 tests CGEQP3.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) COMPLEX array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) COMPLEX array, dimension (MMAX*NMAX)
-*
-* S (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) COMPLEX array, dimension (MMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (max(M*max(M,N) + 4*min(M,N) + max(M,N)))
-*
-* RWORK (workspace) REAL array, dimension (4*NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkql.f b/TESTING/LIN/cchkql.f
index c827919d..cfdc804f 100644
--- a/TESTING/LIN/cchkql.f
+++ b/TESTING/LIN/cchkql.f
@@ -1,10 +1,207 @@
+*> \brief \b CCHKQL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
+* B, X, XACT, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AC( * ), AF( * ), AL( * ), AQ( * ),
+* $ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKQL tests CGEQLF, CUNGQL and CUNMQL.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AL
+*> \verbatim
+*> AL is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
$ B, X, XACT, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +217,6 @@
$ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKQL tests CGEQLF, CUNGQL and CUNMQL.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AL (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) COMPLEX array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkqp.f b/TESTING/LIN/cchkqp.f
index 0c6537c6..5414edc2 100644
--- a/TESTING/LIN/cchkqp.f
+++ b/TESTING/LIN/cchkqp.f
@@ -1,10 +1,155 @@
+*> \brief \b CCHKQP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
+* COPYA, S, TAU, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NVAL( * )
+* REAL S( * ), RWORK( * )
+* COMPLEX A( * ), COPYA( * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKQP tests CGEQPF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is COMPLEX array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (max(M*max(M,N) + 4*min(M,N) + max(M,N)))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (4*NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
$ COPYA, S, TAU, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,60 +163,6 @@
COMPLEX A( * ), COPYA( * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKQP tests CGEQPF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) COMPLEX array, dimension (MMAX*NMAX)
-*
-* S (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) COMPLEX array, dimension (MMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (max(M*max(M,N) + 4*min(M,N) + max(M,N)))
-*
-* RWORK (workspace) REAL array, dimension (4*NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkqr.f b/TESTING/LIN/cchkqr.f
index 5fd3eb7a..703c7bfe 100644
--- a/TESTING/LIN/cchkqr.f
+++ b/TESTING/LIN/cchkqr.f
@@ -1,10 +1,212 @@
+*> \brief \b CCHKQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AC( * ), AF( * ), AQ( * ), AR( * ),
+* $ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKQR tests CGEQRF, CUNGQR and CUNMQR.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKQR tests CGEQRF, CUNGQR and CUNMQR.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AR (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) COMPLEX array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchkrfp.f b/TESTING/LIN/cchkrfp.f
index 5609951d..7eb81981 100644
--- a/TESTING/LIN/cchkrfp.f
+++ b/TESTING/LIN/cchkrfp.f
@@ -1,37 +1,75 @@
- PROGRAM CCHKRFP
- IMPLICIT NONE
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+*> \brief \b CCHKRFP
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* CCHKRFP is the main test program for the COMPLEX linear equation
-* routines with RFP storage format
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
*
-* Internal Parameters
-* ===================
+* PROGRAM CCHKRFP
+*
+* Purpose
+* =======
*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, or NB
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKRFP is the main test program for the COMPLEX linear equation
+*> routines with RFP storage format
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, or NB
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> \endverbatim
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N.
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NTYPES INTEGER
+*> \date November 2011
*
-* NMAX INTEGER
-* The maximum allowable value for N.
+*> \ingroup complex_lin
*
-* NIN INTEGER
-* The unit number for input
+* =====================================================================
+ PROGRAM CCHKRFP
*
-* NOUT INTEGER
-* The unit number for output
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/cchkrq.f b/TESTING/LIN/cchkrq.f
index a466f817..5ae501b0 100644
--- a/TESTING/LIN/cchkrq.f
+++ b/TESTING/LIN/cchkrq.f
@@ -1,10 +1,212 @@
+*> \brief \b CCHKRQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AC( * ), AF( * ), AQ( * ), AR( * ),
+* $ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKRQ tests CGERQF, CUNGRQ and CUNMRQ.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKRQ tests CGERQF, CUNGRQ and CUNMRQ.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AR (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) COMPLEX array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchksp.f b/TESTING/LIN/cchksp.f
index ae11e49e..a377e683 100644
--- a/TESTING/LIN/cchksp.f
+++ b/TESTING/LIN/cchksp.f
@@ -1,10 +1,175 @@
+*> \brief \b CCHKSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKSP tests CSPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +184,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKSP tests CSPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NSMAX))
-*
-* RWORK (workspace) REAL array,
-* dimension (NMAX+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchksy.f b/TESTING/LIN/cchksy.f
index d0afa3c4..112f0a40 100644
--- a/TESTING/LIN/cchksy.f
+++ b/TESTING/LIN/cchksy.f
@@ -1,10 +1,184 @@
+*> \brief \b CCHKSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKSY tests CSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,73 +193,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKSY tests CSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NSMAX))
-*
-* RWORK (workspace) REAL array,
-* dimension (NMAX+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchktb.f b/TESTING/LIN/cchktb.f
index d12fdcae..45385165 100644
--- a/TESTING/LIN/cchktb.f
+++ b/TESTING/LIN/cchktb.f
@@ -1,9 +1,160 @@
+*> \brief \b CCHKTB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, AB, AINV, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX AB( * ), AINV( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKTB tests CTBTRS, -RFS, and -CON, and CLATBS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays.
+*> NMAX >= the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, AB, AINV, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,63 +169,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKTB tests CTBTRS, -RFS, and -CON, and CLATBS.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays.
-* NMAX >= the maximum value of N in NVAL.
-*
-* AB (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchktp.f b/TESTING/LIN/cchktp.f
index a21f7755..55493115 100644
--- a/TESTING/LIN/cchktp.f
+++ b/TESTING/LIN/cchktp.f
@@ -1,10 +1,162 @@
+*> \brief \b CCHKTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX AINVP( * ), AP( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKTP tests CTPTRI, -TRS, -RFS, and -CON, and CLATPS
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays. NMAX >= the
+*> maximumm value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINVP
+*> \verbatim
+*> AINVP is COMPLEX array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,63 +171,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKTP tests CTPTRI, -TRS, -RFS, and -CON, and CLATPS
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays. NMAX >= the
-* maximumm value of N in NVAL.
-*
-* AP (workspace) COMPLEX array, dimension (NMAX*(NMAX+1)/2)
-*
-* AINVP (workspace) COMPLEX array, dimension (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchktr.f b/TESTING/LIN/cchktr.f
index 3f1a6068..ae0af63b 100644
--- a/TESTING/LIN/cchktr.f
+++ b/TESTING/LIN/cchktr.f
@@ -1,10 +1,174 @@
+*> \brief \b CCHKTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AINV, B, X, XACT,
+* WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AINV( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKTR tests CTRTRI, -TRS, -RFS, and -CON, and CLATRS
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays.
+*> NMAX >= the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AINV, B, X, XACT,
$ WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,69 +183,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKTR tests CTRTRI, -TRS, -RFS, and -CON, and CLATRS
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays.
-* NMAX >= the maximum value of N in NVAL.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cchktz.f b/TESTING/LIN/cchktz.f
index 3cd3ec6f..60f78378 100644
--- a/TESTING/LIN/cchktz.f
+++ b/TESTING/LIN/cchktz.f
@@ -1,9 +1,148 @@
+*> \brief \b CCHKTZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
+* COPYA, S, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NVAL( * )
+* REAL S( * ), RWORK( * )
+* COMPLEX A( * ), COPYA( * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CCHKTZ tests CTZRQF and CTZRZF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is COMPLEX array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
$ COPYA, S, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,58 +156,6 @@
COMPLEX A( * ), COPYA( * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CCHKTZ tests CTZRQF and CTZRZF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) COMPLEX array, dimension (MMAX*NMAX)
-*
-* S (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) COMPLEX array, dimension (MMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX)
-*
-* RWORK (workspace) REAL array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvgb.f b/TESTING/LIN/cdrvgb.f
index 49f75151..a5e671a6 100644
--- a/TESTING/LIN/cdrvgb.f
+++ b/TESTING/LIN/cdrvgb.f
@@ -1,10 +1,183 @@
+*> \brief \b CDRVGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
+* AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFB, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVGB tests the driver routines CGBSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (2*NMAX-1)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFB
+*> \verbatim
+*> AFB is COMPLEX array, dimension (LAFB)
+*> \endverbatim
+*>
+*> \param[in] LAFB
+*> \verbatim
+*> LAFB is INTEGER
+*> The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
$ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,72 +192,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVGB tests the driver routines CGBSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (2*NMAX-1)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* AFB (workspace) COMPLEX array, dimension (LAFB)
-*
-* LAFB (input) INTEGER
-* The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* ASAV (workspace) COMPLEX array, dimension (LA)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (2*NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS,NMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvgbx.f b/TESTING/LIN/cdrvgbx.f
index 7bcb609a..6d130a94 100644
--- a/TESTING/LIN/cdrvgbx.f
+++ b/TESTING/LIN/cdrvgbx.f
@@ -1,10 +1,186 @@
+*> \brief \b CDRVGBX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
+* AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFB, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVGB tests the driver routines CGBSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cdrvgb.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (2*NMAX-1)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFB
+*> \verbatim
+*> AFB is COMPLEX array, dimension (LAFB)
+*> \endverbatim
+*>
+*> \param[in] LAFB
+*> \verbatim
+*> LAFB is INTEGER
+*> The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
$ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,75 +195,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVGB tests the driver routines CGBSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cdrvgb.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (2*NMAX-1)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* AFB (workspace) COMPLEX array, dimension (LAFB)
-*
-* LAFB (input) INTEGER
-* The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* ASAV (workspace) COMPLEX array, dimension (LA)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (2*NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS,NMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvge.f b/TESTING/LIN/cdrvge.f
index e6397524..a9739480 100644
--- a/TESTING/LIN/cdrvge.f
+++ b/TESTING/LIN/cdrvge.f
@@ -1,10 +1,175 @@
+*> \brief \b CDRVGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVGE tests the driver routines CGESV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*NRHS+NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,67 +184,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVGE tests the driver routines CGESV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (2*NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (2*NRHS+NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvgex.f b/TESTING/LIN/cdrvgex.f
index 83b9fee6..7823aa38 100644
--- a/TESTING/LIN/cdrvgex.f
+++ b/TESTING/LIN/cdrvgex.f
@@ -1,10 +1,178 @@
+*> \brief \b CDRVGEX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVGE tests the driver routines CGESV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cdrvge.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*NRHS+NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +187,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVGE tests the driver routines CGESV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cdrvge.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (2*NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (2*NRHS+NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvgt.f b/TESTING/LIN/cdrvgt.f
index a4003185..044f0520 100644
--- a/TESTING/LIN/cdrvgt.f
+++ b/TESTING/LIN/cdrvgt.f
@@ -1,9 +1,144 @@
+*> \brief \b CDRVGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, AF,
+* B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AF( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVGT tests CGTSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, AF,
$ B, X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,53 +153,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVGT tests CGTSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*4)
-*
-* AF (workspace) COMPLEX array, dimension (NMAX*4)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvhe.f b/TESTING/LIN/cdrvhe.f
index 470e0273..a02091b2 100644
--- a/TESTING/LIN/cdrvhe.f
+++ b/TESTING/LIN/cdrvhe.f
@@ -1,10 +1,165 @@
+*> \brief \b CDRVHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVHE tests the driver routines CHESV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,63 +174,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVHE tests the driver routines CHESV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvhex.f b/TESTING/LIN/cdrvhex.f
index 84753c92..613306db 100644
--- a/TESTING/LIN/cdrvhex.f
+++ b/TESTING/LIN/cdrvhex.f
@@ -1,10 +1,168 @@
+*> \brief \b CDRVHEX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVHE tests the driver routines CHESV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cdrvhe.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,66 +177,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVHE tests the driver routines CHESV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cdrvhe.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvhp.f b/TESTING/LIN/cdrvhp.f
index 2e449591..44fb6543 100644
--- a/TESTING/LIN/cdrvhp.f
+++ b/TESTING/LIN/cdrvhp.f
@@ -1,10 +1,168 @@
+*> \brief \b CDRVHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVHP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVHP tests the driver routines CHPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVHP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,66 +177,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVHP tests the driver routines CHPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvls.f b/TESTING/LIN/cdrvls.f
index 7b7b93c0..045f434f 100644
--- a/TESTING/LIN/cdrvls.f
+++ b/TESTING/LIN/cdrvls.f
@@ -1,11 +1,222 @@
+*> \brief \b CDRVLS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
+* NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
+* COPYB, C, S, COPYS, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * ), NXVAL( * )
+* REAL COPYS( * ), RWORK( * ), S( * )
+* COMPLEX A( * ), B( * ), C( * ), COPYA( * ), COPYB( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVLS tests the least squares driver routines CGELS, CGELSX, CGELSS,
+*> CGELSY and CGELSD.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> The matrix of type j is generated as follows:
+*> j=1: A = U*D*V where U and V are random unitary matrices
+*> and D has random entries (> 0.1) taken from a uniform
+*> distribution (0,1). A is full rank.
+*> j=2: The same of 1, but A is scaled up.
+*> j=3: The same of 1, but A is scaled down.
+*> j=4: A = U*D*V where U and V are random unitary matrices
+*> and D has 3*min(M,N)/4 random entries (> 0.1) taken
+*> from a uniform distribution (0,1) and the remaining
+*> entries set to 0. A is rank-deficient.
+*> j=5: The same of 4, but A is scaled up.
+*> j=6: The same of 5, but A is scaled down.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is COMPLEX array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (MMAX*NSMAX)
+*> where MMAX is the maximum value of M in MVAL and NSMAX is the
+*> maximum value of NRHS in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYB
+*> \verbatim
+*> COPYB is COMPLEX array, dimension (MMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (MMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] COPYS
+*> \verbatim
+*> COPYS is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (5*NMAX-1)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (15*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
$ NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
$ COPYB, C, S, COPYS, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -21,99 +232,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVLS tests the least squares driver routines CGELS, CGELSX, CGELSS,
-* CGELSY and CGELSD.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-* The matrix of type j is generated as follows:
-* j=1: A = U*D*V where U and V are random unitary matrices
-* and D has random entries (> 0.1) taken from a uniform
-* distribution (0,1). A is full rank.
-* j=2: The same of 1, but A is scaled up.
-* j=3: The same of 1, but A is scaled down.
-* j=4: A = U*D*V where U and V are random unitary matrices
-* and D has 3*min(M,N)/4 random entries (> 0.1) taken
-* from a uniform distribution (0,1) and the remaining
-* entries set to 0. A is rank-deficient.
-* j=5: The same of 4, but A is scaled up.
-* j=6: The same of 5, but A is scaled down.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) COMPLEX array, dimension (MMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (MMAX*NSMAX)
-* where MMAX is the maximum value of M in MVAL and NSMAX is the
-* maximum value of NRHS in NSVAL.
-*
-* COPYB (workspace) COMPLEX array, dimension (MMAX*NSMAX)
-*
-* C (workspace) COMPLEX array, dimension (MMAX*NSMAX)
-*
-* S (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* COPYS (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* WORK (workspace) COMPLEX array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX).
-*
-* RWORK (workspace) REAL array, dimension (5*NMAX-1)
-*
-* IWORK (workspace) INTEGER array, dimension (15*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvpb.f b/TESTING/LIN/cdrvpb.f
index 819dbca0..6760fb12 100644
--- a/TESTING/LIN/cdrvpb.f
+++ b/TESTING/LIN/cdrvpb.f
@@ -1,10 +1,170 @@
+*> \brief \b CDRVPB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVPB tests the driver routines CPBSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,65 +179,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVPB tests the driver routines CPBSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvpo.f b/TESTING/LIN/cdrvpo.f
index 26e55af7..877d0be4 100644
--- a/TESTING/LIN/cdrvpo.f
+++ b/TESTING/LIN/cdrvpo.f
@@ -1,10 +1,170 @@
+*> \brief \b CDRVPO
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVPO tests the driver routines CPOSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,65 +179,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVPO tests the driver routines CPOSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvpox.f b/TESTING/LIN/cdrvpox.f
index cbb2a69f..52da5006 100644
--- a/TESTING/LIN/cdrvpox.f
+++ b/TESTING/LIN/cdrvpox.f
@@ -1,10 +1,173 @@
+*> \brief \b CDRVPOX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVPO tests the driver routines CPOSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cdrvpo.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,68 +182,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVPO tests the driver routines CPOSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cdrvpo.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvpp.f b/TESTING/LIN/cdrvpp.f
index 957570de..b352665a 100644
--- a/TESTING/LIN/cdrvpp.f
+++ b/TESTING/LIN/cdrvpp.f
@@ -1,10 +1,170 @@
+*> \brief \b CDRVPP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* REAL RWORK( * ), S( * )
+* COMPLEX A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVPP tests the driver routines CPPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,65 +179,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVPP tests the driver routines CPPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*(NMAX+1)/2)
-*
-* ASAV (workspace) COMPLEX array, dimension (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvpt.f b/TESTING/LIN/cdrvpt.f
index d6972bfa..677c1892 100644
--- a/TESTING/LIN/cdrvpt.f
+++ b/TESTING/LIN/cdrvpt.f
@@ -1,9 +1,151 @@
+*> \brief \b CDRVPT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
+* E, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* REAL D( * ), RWORK( * )
+* COMPLEX A( * ), B( * ), E( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVPT tests CPTSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is COMPLEX array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
$ E, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,57 +160,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVPT tests CPTSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*2)
-*
-* D (workspace) REAL array, dimension (NMAX*2)
-*
-* E (workspace) COMPLEX array, dimension (NMAX*2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvrf1.f b/TESTING/LIN/cdrvrf1.f
index fc76c1ac..f7769a33 100644
--- a/TESTING/LIN/cdrvrf1.f
+++ b/TESTING/LIN/cdrvrf1.f
@@ -1,50 +1,116 @@
- SUBROUTINE CDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
-*
-* .. Scalar Arguments ..
- INTEGER LDA, NN, NOUT
- REAL THRESH
-* ..
-* .. Array Arguments ..
- INTEGER NVAL( NN )
- REAL WORK( * )
- COMPLEX A( LDA, * ), ARF( * )
-* ..
-*
+*> \brief \b CDRVRF1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* REAL WORK( * )
+* COMPLEX A( LDA, * ), ARF( * )
+* ..
+*
* Purpose
* =======
*
-* CDRVRF1 tests the LAPACK RFP routines:
-* CLANHF.F
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVRF1 tests the LAPACK RFP routines:
+*> CLANHF.F
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension ( NMAX )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
+*> \date November 2011
*
-* A (workspace) COMPLEX array, dimension (LDA,NMAX)
+*> \ingroup complex_lin
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
+* =====================================================================
+ SUBROUTINE CDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
*
-* ARF (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) COMPLEX array, dimension ( NMAX )
+* .. Scalar Arguments ..
+ INTEGER LDA, NN, NOUT
+ REAL THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER NVAL( NN )
+ REAL WORK( * )
+ COMPLEX A( LDA, * ), ARF( * )
+* ..
*
* =====================================================================
* ..
diff --git a/TESTING/LIN/cdrvrf2.f b/TESTING/LIN/cdrvrf2.f
index 42ee04d4..542bb85c 100644
--- a/TESTING/LIN/cdrvrf2.f
+++ b/TESTING/LIN/cdrvrf2.f
@@ -1,44 +1,108 @@
- SUBROUTINE CDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
-*
-* .. Scalar Arguments ..
- INTEGER LDA, NN, NOUT
-* ..
-* .. Array Arguments ..
- INTEGER NVAL( NN )
- COMPLEX A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
-* ..
-*
+*> \brief \b CDRVRF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* COMPLEX A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CDRVRF2 tests the LAPACK RFP convertion routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVRF2 tests the LAPACK RFP convertion routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] A2
+*> \verbatim
+*> A2 is COMPLEX6 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (workspace) COMPLEX array, dimension (LDA,NMAX)
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \ingroup complex_lin
*
-* ARF (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
+* =====================================================================
+ SUBROUTINE CDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
*
-* AP (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* A2 (workspace) COMPLEX6 array, dimension (LDA,NMAX)
+* .. Scalar Arguments ..
+ INTEGER LDA, NN, NOUT
+* ..
+* .. Array Arguments ..
+ INTEGER NVAL( NN )
+ COMPLEX A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
+* ..
*
* =====================================================================
* ..
diff --git a/TESTING/LIN/cdrvrf3.f b/TESTING/LIN/cdrvrf3.f
index cae0cbea..2ebaa61f 100644
--- a/TESTING/LIN/cdrvrf3.f
+++ b/TESTING/LIN/cdrvrf3.f
@@ -1,9 +1,130 @@
+*> \brief \b CDRVRF3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
+* + S_WORK_CLANGE, C_WORK_CGEQRF, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* REAL S_WORK_CLANGE( * )
+* COMPLEX A( LDA, * ), ARF( * ), B1( LDA, * ),
+* + B2( LDA, * )
+* COMPLEX C_WORK_CGEQRF( * ), TAU( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVRF3 tests the LAPACK RFP routines:
+*> CTFSM
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] B1
+*> \verbatim
+*> B1 is COMPLEX array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] B2
+*> \verbatim
+*> B2 is COMPLEX array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] S_WORK_CLANGE
+*> \verbatim
+*> S_WORK_CLANGE is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] C_WORK_CGEQRF
+*> \verbatim
+*> C_WORK_CGEQRF is COMPLEX array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
+ S_WORK_CLANGE, C_WORK_CGEQRF, TAU )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, NN, NOUT
@@ -17,46 +138,6 @@
COMPLEX C_WORK_CGEQRF( * ), TAU( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVRF3 tests the LAPACK RFP routines:
-* CTFSM
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* ARF (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
-*
-* B1 (workspace) COMPLEX array, dimension (LDA,NMAX)
-*
-* B2 (workspace) COMPLEX array, dimension (LDA,NMAX)
-*
-* S_WORK_CLANGE (workspace) REAL array, dimension (NMAX)
-*
-* C_WORK_CGEQRF (workspace) COMPLEX array, dimension (NMAX)
-*
-* TAU (workspace) COMPLEX array, dimension (NMAX)
-*
* =====================================================================
* ..
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvrf4.f b/TESTING/LIN/cdrvrf4.f
index f1d5f263..2aa2bc9b 100644
--- a/TESTING/LIN/cdrvrf4.f
+++ b/TESTING/LIN/cdrvrf4.f
@@ -1,9 +1,125 @@
+*> \brief \b CDRVRF4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
+* + LDA, S_WORK_CLANGE )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDC, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* REAL S_WORK_CLANGE( * )
+* COMPLEX A( LDA, * ), C1( LDC, * ), C2( LDC, *),
+* + CRF( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVRF4 tests the LAPACK RFP routines:
+*> CHFRK
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] C1
+*> \verbatim
+*> C1 is COMPLEX array, dimension (LDC,NMAX)
+*> \endverbatim
+*>
+*> \param[out] C2
+*> \verbatim
+*> C2 is COMPLEX array, dimension (LDC,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] CRF
+*> \verbatim
+*> CRF is COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] S_WORK_CLANGE
+*> \verbatim
+*> S_WORK_CLANGE is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
+ LDA, S_WORK_CLANGE )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDC, NN, NOUT
@@ -16,45 +132,6 @@
+ CRF( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVRF4 tests the LAPACK RFP routines:
-* CHFRK
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* C1 (workspace) COMPLEX array, dimension (LDC,NMAX)
-*
-* C2 (workspace) COMPLEX array, dimension (LDC,NMAX)
-*
-* LDC (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* CRF (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2).
-*
-* A (workspace) COMPLEX array, dimension (LDA,NMAX)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* S_WORK_CLANGE (workspace) REAL array, dimension (NMAX)
-*
* =====================================================================
* ..
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvrfp.f b/TESTING/LIN/cdrvrfp.f
index 484586ee..1831004c 100644
--- a/TESTING/LIN/cdrvrfp.f
+++ b/TESTING/LIN/cdrvrfp.f
@@ -1,3 +1,244 @@
+*> \brief \b CDRVRFP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
+* + THRESH, A, ASAV, AFAC, AINV, B,
+* + BSAV, XACT, X, ARF, ARFINV,
+* + C_WORK_CLATMS, C_WORK_CPOT02,
+* + C_WORK_CPOT03, S_WORK_CLATMS, S_WORK_CLANHE,
+* + S_WORK_CPOT01, S_WORK_CPOT02, S_WORK_CPOT03 )
+*
+* .. Scalar Arguments ..
+* INTEGER NN, NNS, NNT, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN ), NSVAL( NNS ), NTVAL( NNT )
+* COMPLEX A( * )
+* COMPLEX AINV( * )
+* COMPLEX ASAV( * )
+* COMPLEX B( * )
+* COMPLEX BSAV( * )
+* COMPLEX AFAC( * )
+* COMPLEX ARF( * )
+* COMPLEX ARFINV( * )
+* COMPLEX XACT( * )
+* COMPLEX X( * )
+* COMPLEX C_WORK_CLATMS( * )
+* COMPLEX C_WORK_CPOT02( * )
+* COMPLEX C_WORK_CPOT03( * )
+* REAL S_WORK_CLATMS( * )
+* REAL S_WORK_CLANHE( * )
+* REAL S_WORK_CPOT01( * )
+* REAL S_WORK_CPOT02( * )
+* REAL S_WORK_CPOT03( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVRFP tests the LAPACK RFP routines:
+*> CPFTRF, CPFTRS, and CPFTRI.
+*>
+*> This testing routine follow the same tests as CDRVPO (test for the full
+*> format Symmetric Positive Definite solver).
+*>
+*> The tests are performed in Full Format, convertion back and forth from
+*> full format to RFP format are performed using the routines CTRTTF and
+*> CTFTTR.
+*>
+*> First, a specific matrix A of size N is created. There is nine types of
+*> different matrixes possible.
+*> 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
+*> 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
+*> *3. First row and column zero 8. Scaled near underflow
+*> *4. Last row and column zero 9. Scaled near overflow
+*> *5. Middle row and column zero
+*> (* - tests error exits from CPFTRF, no test ratios are computed)
+*> A solution XACT of size N-by-NRHS is created and the associated right
+*> hand side B as well. Then CPFTRF is called to compute L (or U), the
+*> Cholesky factor of A. Then L (or U) is used to solve the linear system
+*> of equations AX = B. This gives X. Then L (or U) is used to compute the
+*> inverse of A, AINV. The following four tests are then performed:
+*> (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+*> where EPS is the machine precision, RCOND the condition number of A, and
+*> norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
+*> Errors occur when INFO parameter is not as expected. Failures occur when
+*> a test ratios is greater than THRES.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right-hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] NNT
+*> \verbatim
+*> NNT is INTEGER
+*> The number of values of MATRIX TYPE contained in the vector NTVAL.
+*> \endverbatim
+*>
+*> \param[in] NTVAL
+*> \verbatim
+*> NTVAL is INTEGER array, dimension (NNT)
+*> The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX array, dimension ((NMAX*(NMAX+1))/2)
+*> \endverbatim
+*>
+*> \param[out] ARFINV
+*> \verbatim
+*> ARFINV is COMPLEX array, dimension ((NMAX*(NMAX+1))/2)
+*> \endverbatim
+*>
+*> \param[out] C_WORK_CLATMS
+*> \verbatim
+*> C_WORK_CLATMS is COMPLEX array, dimension ( 3*NMAX )
+*> \endverbatim
+*>
+*> \param[out] C_WORK_CPOT02
+*> \verbatim
+*> C_WORK_CPOT02 is COMPLEX array, dimension ( NMAX*MAXRHS )
+*> \endverbatim
+*>
+*> \param[out] C_WORK_CPOT03
+*> \verbatim
+*> C_WORK_CPOT03 is COMPLEX array, dimension ( NMAX*NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_CLATMS
+*> \verbatim
+*> S_WORK_CLATMS is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_CLANHE
+*> \verbatim
+*> S_WORK_CLANHE is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_CPOT01
+*> \verbatim
+*> S_WORK_CPOT01 is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_CPOT02
+*> \verbatim
+*> S_WORK_CPOT02 is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_CPOT03
+*> \verbatim
+*> S_WORK_CPOT03 is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
+ THRESH, A, ASAV, AFAC, AINV, B,
+ BSAV, XACT, X, ARF, ARFINV,
@@ -6,8 +247,9 @@
+ S_WORK_CPOT01, S_WORK_CPOT02, S_WORK_CPOT03 )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NN, NNS, NNT, NOUT
@@ -35,107 +277,6 @@
REAL S_WORK_CPOT03( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVRFP tests the LAPACK RFP routines:
-* CPFTRF, CPFTRS, and CPFTRI.
-*
-* This testing routine follow the same tests as CDRVPO (test for the full
-* format Symmetric Positive Definite solver).
-*
-* The tests are performed in Full Format, convertion back and forth from
-* full format to RFP format are performed using the routines CTRTTF and
-* CTFTTR.
-*
-* First, a specific matrix A of size N is created. There is nine types of
-* different matrixes possible.
-* 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
-* 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
-* *3. First row and column zero 8. Scaled near underflow
-* *4. Last row and column zero 9. Scaled near overflow
-* *5. Middle row and column zero
-* (* - tests error exits from CPFTRF, no test ratios are computed)
-* A solution XACT of size N-by-NRHS is created and the associated right
-* hand side B as well. Then CPFTRF is called to compute L (or U), the
-* Cholesky factor of A. Then L (or U) is used to solve the linear system
-* of equations AX = B. This gives X. Then L (or U) is used to compute the
-* inverse of A, AINV. The following four tests are then performed:
-* (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
-* where EPS is the machine precision, RCOND the condition number of A, and
-* norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
-* Errors occur when INFO parameter is not as expected. Failures occur when
-* a test ratios is greater than THRES.
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right-hand sides NRHS.
-*
-* NNT (input) INTEGER
-* The number of values of MATRIX TYPE contained in the vector NTVAL.
-*
-* NTVAL (input) INTEGER array, dimension (NNT)
-* The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*MAXRHS)
-*
-* BSAV (workspace) COMPLEX array, dimension (NMAX*MAXRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*MAXRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*MAXRHS)
-*
-* ARF (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2)
-*
-* ARFINV (workspace) COMPLEX array, dimension ((NMAX*(NMAX+1))/2)
-*
-* C_WORK_CLATMS (workspace) COMPLEX array, dimension ( 3*NMAX )
-*
-* C_WORK_CPOT02 (workspace) COMPLEX array, dimension ( NMAX*MAXRHS )
-*
-* C_WORK_CPOT03 (workspace) COMPLEX array, dimension ( NMAX*NMAX )
-*
-* S_WORK_CLATMS (workspace) REAL array, dimension ( NMAX )
-*
-* S_WORK_CLANHE (workspace) REAL array, dimension ( NMAX )
-*
-* S_WORK_CPOT01 (workspace) REAL array, dimension ( NMAX )
-*
-* S_WORK_CPOT02 (workspace) REAL array, dimension ( NMAX )
-*
-* S_WORK_CPOT03 (workspace) REAL array, dimension ( NMAX )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvsp.f b/TESTING/LIN/cdrvsp.f
index 1c43f494..7764c0a6 100644
--- a/TESTING/LIN/cdrvsp.f
+++ b/TESTING/LIN/cdrvsp.f
@@ -1,10 +1,168 @@
+*> \brief \b CDRVSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVSP tests the driver routines CSPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,66 +177,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVSP tests the driver routines CSPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvsy.f b/TESTING/LIN/cdrvsy.f
index 4ceb885e..b3aa3993 100644
--- a/TESTING/LIN/cdrvsy.f
+++ b/TESTING/LIN/cdrvsy.f
@@ -1,10 +1,165 @@
+*> \brief \b CDRVSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVSY tests the driver routines CSYSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,63 +174,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVSY tests the driver routines CSYSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cdrvsyx.f b/TESTING/LIN/cdrvsyx.f
index 9c55e98d..e70c0c34 100644
--- a/TESTING/LIN/cdrvsyx.f
+++ b/TESTING/LIN/cdrvsyx.f
@@ -1,10 +1,168 @@
+*> \brief \b CDRVSYX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CDRVSY tests the driver routines CSYSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cdrvsy.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,66 +177,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* CDRVSY tests the driver routines CSYSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cdrvsy.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cebchvxx.f b/TESTING/LIN/cebchvxx.f
index 4c289f4d..91002573 100644
--- a/TESTING/LIN/cebchvxx.f
+++ b/TESTING/LIN/cebchvxx.f
@@ -1,76 +1,91 @@
- SUBROUTINE CEBCHVXX( THRESH, PATH )
- IMPLICIT NONE
-* .. Scalar Arguments ..
- REAL THRESH
- CHARACTER*3 PATH
-*
-* Purpose
-* ======
-*
-* CEBCHVXX will run CGESVXX on a series of Hilbert matrices and then
-* compare the error bounds returned by CGESVXX to see if the returned
-* answer indeed falls within those bounds.
+*> \brief \b CEBCHVXX
*
-* Eight test ratios will be computed. The tests will pass if they are .LT.
-* THRESH. There are two cases that are determined by 1 / (SQRT( N ) * EPS).
-* If that value is .LE. to the component wise reciprocal condition number,
-* it uses the guaranteed case, other wise it uses the unguaranteed case.
+* =========== DOCUMENTATION ===========
*
-* Test ratios:
-* Let Xc be X_computed and Xt be X_truth.
-* The norm used is the infinity norm.
-
-* Let A be the guaranteed case and B be the unguaranteed case.
-*
-* 1. Normwise guaranteed forward error bound.
-* A: norm ( abs( Xc - Xt ) / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ) and
-* ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N),10) * EPS.
-* If these conditions are met, the test ratio is set to be
-* ERRBND( *, nwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
-* B: For this case, CGESVXX should just return 1. If it is less than
-* one, treat it the same as in 1A. Otherwise it fails. (Set test
-* ratio to ERRBND( *, nwise_i, bnd_i ) * THRESH?)
-*
-* 2. Componentwise guaranteed forward error bound.
-* A: norm ( abs( Xc(j) - Xt(j) ) ) / norm (Xt(j)) .LE. ERRBND( *, cwise_i, bnd_i )
-* for all j .AND. ERRBND( *, cwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS.
-* If these conditions are met, the test ratio is set to be
-* ERRBND( *, cwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
-* B: Same as normwise test ratio.
-*
-* 3. Backwards error.
-* A: The test ratio is set to BERR/EPS.
-* B: Same test ratio.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* 4. Reciprocal condition number.
-* A: A condition number is computed with Xt and compared with the one
-* returned from CGESVXX. Let RCONDc be the RCOND returned by CGESVXX
-* and RCONDt be the RCOND from the truth value. Test ratio is set to
-* MAX(RCONDc/RCONDt, RCONDt/RCONDc).
-* B: Test ratio is set to 1 / (EPS * RCONDc).
+* Definition
+* ==========
*
-* 5. Reciprocal normwise condition number.
-* A: The test ratio is set to
-* MAX(ERRBND( *, nwise_i, cond_i ) / NCOND, NCOND / ERRBND( *, nwise_i, cond_i )).
-* B: Test ratio is set to 1 / (EPS * ERRBND( *, nwise_i, cond_i )).
-*
-* 6. Reciprocal componentwise condition number.
-* A: Test ratio is set to
-* MAX(ERRBND( *, cwise_i, cond_i ) / CCOND, CCOND / ERRBND( *, cwise_i, cond_i )).
-* B: Test ratio is set to 1 / (EPS * ERRBND( *, cwise_i, cond_i )).
+* SUBROUTINE CEBCHVXX( THRESH, PATH )
+*
+* .. Scalar Arguments ..
+* REAL THRESH
+* CHARACTER*3 PATH
+*
+* Purpose
+* =======
*
-* .. Parameters ..
-* NMAX is determined by the largest number in the inverse of the hilbert
-* matrix. Precision is exhausted when the largest entry in it is greater
-* than 2 to the power of the number of bits in the fraction of the data
-* type used plus one, which is 24 for single precision.
-* NMAX should be 6 for single and 11 for double.
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> ======
+*>
+*> CEBCHVXX will run CGESVXX on a series of Hilbert matrices and then
+*> compare the error bounds returned by CGESVXX to see if the returned
+*> answer indeed falls within those bounds.
+*>
+*> Eight test ratios will be computed. The tests will pass if they are .LT.
+*> THRESH. There are two cases that are determined by 1 / (SQRT( N ) * EPS).
+*> If that value is .LE. to the component wise reciprocal condition number,
+*> it uses the guaranteed case, other wise it uses the unguaranteed case.
+*>
+*> Test ratios:
+*> Let Xc be X_computed and Xt be X_truth.
+*> The norm used is the infinity norm.
+
+*> Let A be the guaranteed case and B be the unguaranteed case.
+*>
+*> 1. Normwise guaranteed forward error bound.
+*> A: norm ( abs( Xc - Xt ) / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ) and
+*> ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N),10) * EPS.
+*> If these conditions are met, the test ratio is set to be
+*> ERRBND( *, nwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
+*> B: For this case, CGESVXX should just return 1. If it is less than
+*> one, treat it the same as in 1A. Otherwise it fails. (Set test
+*> ratio to ERRBND( *, nwise_i, bnd_i ) * THRESH?)
+*>
+*> 2. Componentwise guaranteed forward error bound.
+*> A: norm ( abs( Xc(j) - Xt(j) ) ) / norm (Xt(j)) .LE. ERRBND( *, cwise_i, bnd_i )
+*> for all j .AND. ERRBND( *, cwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS.
+*> If these conditions are met, the test ratio is set to be
+*> ERRBND( *, cwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
+*> B: Same as normwise test ratio.
+*>
+*> 3. Backwards error.
+*> A: The test ratio is set to BERR/EPS.
+*> B: Same test ratio.
+*>
+*> 4. Reciprocal condition number.
+*> A: A condition number is computed with Xt and compared with the one
+*> returned from CGESVXX. Let RCONDc be the RCOND returned by CGESVXX
+*> and RCONDt be the RCOND from the truth value. Test ratio is set to
+*> MAX(RCONDc/RCONDt, RCONDt/RCONDc).
+*> B: Test ratio is set to 1 / (EPS * RCONDc).
+*>
+*> 5. Reciprocal normwise condition number.
+*> A: The test ratio is set to
+*> MAX(ERRBND( *, nwise_i, cond_i ) / NCOND, NCOND / ERRBND( *, nwise_i, cond_i )).
+*> B: Test ratio is set to 1 / (EPS * ERRBND( *, nwise_i, cond_i )).
+*>
+*> 6. Reciprocal componentwise condition number.
+*> A: Test ratio is set to
+*> MAX(ERRBND( *, cwise_i, cond_i ) / CCOND, CCOND / ERRBND( *, cwise_i, cond_i )).
+*> B: Test ratio is set to 1 / (EPS * ERRBND( *, cwise_i, cond_i )).
+*>
+*> .. Parameters ..
+*> NMAX is determined by the largest number in the inverse of the hilbert
+*> matrix. Precision is exhausted when the largest entry in it is greater
+*> than 2 to the power of the number of bits in the fraction of the data
+*> type used plus one, which is 24 for single precision.
+*> NMAX should be 6 for single and 11 for double.
INTEGER NMAX, NPARAMS, NERRBND, NTESTS, KL, KU
PARAMETER (NMAX = 6, NPARAMS = 2, NERRBND = 3,
$ NTESTS = 6)
-* .. Local Scalars ..
+*> .. Local Scalars ..
INTEGER N, NRHS, INFO, I ,J, k, NFAIL, LDA,
$ N_AUX_TESTS, LDAB, LDAFB
CHARACTER FACT, TRANS, UPLO, EQUED
@@ -85,7 +100,7 @@
$ CONDTHRESH, ERRTHRESH
COMPLEX ZDUM
-* .. Local Arrays ..
+*> .. Local Arrays ..
REAL TSTRAT(NTESTS), RINV(NMAX), PARAMS(NPARAMS),
$ S(NMAX), R(NMAX),C(NMAX),RWORK(3*NMAX),
$ DIFF(NMAX, NMAX),
@@ -98,30 +113,30 @@
$ ABCOPY( (NMAX-1)+(NMAX-1)+1, NMAX ),
$ AFB( 2*(NMAX-1)+(NMAX-1)+1, NMAX )
-* .. External Functions ..
+*> .. External Functions ..
REAL SLAMCH
-* .. External Subroutines ..
+*> .. External Subroutines ..
EXTERNAL CLAHILB, CGESVXX, CSYSVXX, CPOSVXX,
$ CGBSVXX, CLACPY, LSAMEN
LOGICAL LSAMEN
-* .. Intrinsic Functions ..
+*> .. Intrinsic Functions ..
INTRINSIC SQRT, MAX, ABS, REAL, AIMAG
-* .. Statement Functions ..
+*> .. Statement Functions ..
REAL CABS1
-* ..
-* .. Statement Function Definitions ..
+*> ..
+*> .. Statement Function Definitions ..
CABS1( ZDUM ) = ABS( REAL( ZDUM ) ) + ABS( AIMAG( ZDUM ) )
-* .. Parameters ..
+*> .. Parameters ..
INTEGER NWISE_I, CWISE_I
PARAMETER (NWISE_I = 1, CWISE_I = 1)
INTEGER BND_I, COND_I
PARAMETER (BND_I = 2, COND_I = 3)
-* Create the loop to test out the Hilbert matrices
+*> Create the loop to test out the Hilbert matrices
FACT = 'E'
UPLO = 'U'
@@ -135,7 +150,7 @@
LDAFB = 2*(NMAX-1)+(NMAX-1)+1
C2 = PATH( 2: 3 )
-* Main loop to test the different Hilbert Matrices.
+*> Main loop to test the different Hilbert Matrices.
printed_guide = .false.
@@ -148,15 +163,15 @@
NRHS = n
M = MAX(SQRT(REAL(N)), 10.0)
-* Generate the Hilbert matrix, its inverse, and the
-* right hand side, all scaled by the LCM(1,..,2N-1).
+*> Generate the Hilbert matrix, its inverse, and the
+*> right hand side, all scaled by the LCM(1,..,2N-1).
CALL CLAHILB(N, N, A, LDA, INVHILB, LDA, B,
$ LDA, WORK, INFO, PATH)
-* Copy A into ACOPY.
+*> Copy A into ACOPY.
CALL CLACPY('ALL', N, N, A, NMAX, ACOPY, NMAX)
-* Store A in band format for GB tests
+*> Store A in band format for GB tests
DO J = 1, N
DO I = 1, KL+KU+1
AB( I, J ) = (0.0E+0,0.0E+0)
@@ -168,7 +183,7 @@
END DO
END DO
-* Copy AB into ABCOPY.
+*> Copy AB into ABCOPY.
DO J = 1, N
DO I = 1, KL+KU+1
ABCOPY( I, J ) = (0.0E+0,0.0E+0)
@@ -176,7 +191,7 @@
END DO
CALL CLACPY('ALL', KL+KU+1, N, AB, LDAB, ABCOPY, LDAB)
-* Call C**SVXX with default PARAMS and N_ERR_BND = 3.
+*> Call C**SVXX with default PARAMS and N_ERR_BND = 3.
IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
CALL CSYSVXX(FACT, UPLO, N, NRHS, ACOPY, LDA, AF, LDA,
$ IPIV, EQUED, S, B, LDA, X, LDA, ORCOND,
@@ -222,14 +237,14 @@
END IF
END IF
-* Calculating the difference between C**SVXX's X and the true X.
+*> Calculating the difference between C**SVXX's X and the true X.
DO I = 1,N
DO J =1,NRHS
DIFF(I,J) = X(I,J) - INVHILB(I,J)
END DO
END DO
-* Calculating the RCOND
+*> Calculating the RCOND
RNORM = 0
RINORM = 0
IF ( LSAMEN( 2, C2, 'PO' ) .OR. LSAMEN( 2, C2, 'SY' ) .OR.
@@ -261,7 +276,7 @@
RNORM = RNORM / CABS1(A(1, 1))
RCOND = 1.0/(RNORM * RINORM)
-* Calculating the R for normwise rcond.
+*> Calculating the R for normwise rcond.
DO I = 1, N
RINV(I) = 0.0
END DO
@@ -271,7 +286,7 @@
END DO
END DO
-* Calculating the Normwise rcond.
+*> Calculating the Normwise rcond.
RINORM = 0.0
DO I = 1, N
SUMRI = 0.0
@@ -438,7 +453,7 @@ c$$$ WRITE(*,*) 'Reciprocal condition number: ',ERRBND(NRHS,cwise_i,cond
c$$$ WRITE(*,*) 'Raw error estimate: ',ERRBND(NRHS,cwise_i,rawbnd_i)
c$$$ print *, 'Info: ', info
c$$$ WRITE(*,*)
-* WRITE(*,*) 'TSTRAT: ',TSTRAT
+*> WRITE(*,*) 'TSTRAT: ',TSTRAT
END DO
@@ -454,7 +469,7 @@ c$$$ WRITE(*,*)
9998 FORMAT( ' C', A2, 'SVXX: ', I6, ' out of ', I6,
$ ' tests failed to pass the threshold' )
9997 FORMAT( ' C', A2, 'SVXX passed the tests of error bounds' )
-* Test ratios.
+*> Test ratios.
9996 FORMAT( 3X, I2, ': Normwise guaranteed forward error', / 5X,
$ 'Guaranteed case: if norm ( abs( Xc - Xt )',
$ ' / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ), then',
@@ -472,3 +487,33 @@ c$$$ WRITE(*,*)
$ ', ORCOND = ', G12.5, ', real RCOND = ', G12.5 )
END
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CEBCHVXX( THRESH, PATH )
+*
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL THRESH
+ CHARACTER*3 PATH
+*
diff --git a/TESTING/LIN/cerrge.f b/TESTING/LIN/cerrge.f
index d27d61c5..863f7f09 100644
--- a/TESTING/LIN/cerrge.f
+++ b/TESTING/LIN/cerrge.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRGE( PATH, NUNIT )
+*> \brief \b CERRGE
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRGE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRGE tests the error exits for the COMPLEX routines
-* for general matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRGE tests the error exits for the COMPLEX routines
+*> for general matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRGE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrgex.f b/TESTING/LIN/cerrgex.f
index b4e538f4..c0a62912 100644
--- a/TESTING/LIN/cerrgex.f
+++ b/TESTING/LIN/cerrgex.f
@@ -1,31 +1,74 @@
- SUBROUTINE CERRGE( PATH, NUNIT )
+*> \brief \b CERRGEX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CERRGE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRGE tests the error exits for the COMPLEX routines
-* for general matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cerrge.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRGE tests the error exits for the COMPLEX routines
+*> for general matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cerrge.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRGE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrgt.f b/TESTING/LIN/cerrgt.f
index 7c8ecc17..69ea9f3c 100644
--- a/TESTING/LIN/cerrgt.f
+++ b/TESTING/LIN/cerrgt.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRGT( PATH, NUNIT )
+*> \brief \b CERRGT
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRGT( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRGT tests the error exits for the COMPLEX tridiagonal
-* routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRGT tests the error exits for the COMPLEX tridiagonal
+*> routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRGT( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrhe.f b/TESTING/LIN/cerrhe.f
index c2108513..63f24c48 100644
--- a/TESTING/LIN/cerrhe.f
+++ b/TESTING/LIN/cerrhe.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRHE( PATH, NUNIT )
+*> \brief \b CERRHE
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRHE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRHE tests the error exits for the COMPLEX routines
-* for Hermitian indefinite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRHE tests the error exits for the COMPLEX routines
+*> for Hermitian indefinite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRHE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrhex.f b/TESTING/LIN/cerrhex.f
index 1172225c..b6db76aa 100644
--- a/TESTING/LIN/cerrhex.f
+++ b/TESTING/LIN/cerrhex.f
@@ -1,31 +1,74 @@
- SUBROUTINE CERRHE( PATH, NUNIT )
+*> \brief \b CERRHEX
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CERRHE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRHE tests the error exits for the COMPLEX routines
-* for Hermitian indefinite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cerrhe.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRHE tests the error exits for the COMPLEX routines
+*> for Hermitian indefinite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cerrhe.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRHE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrlq.f b/TESTING/LIN/cerrlq.f
index 1b0d4f4b..b64dfa26 100644
--- a/TESTING/LIN/cerrlq.f
+++ b/TESTING/LIN/cerrlq.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRLQ( PATH, NUNIT )
+*> \brief \b CERRLQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRLQ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRLQ tests the error exits for the COMPLEX routines
-* that use the LQ decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRLQ tests the error exits for the COMPLEX routines
+*> that use the LQ decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRLQ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrls.f b/TESTING/LIN/cerrls.f
index fca399d6..b28c9932 100644
--- a/TESTING/LIN/cerrls.f
+++ b/TESTING/LIN/cerrls.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRLS( PATH, NUNIT )
+*> \brief \b CERRLS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CERRLS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRLS tests the error exits for the COMPLEX least squares
-* driver routines (CGELS, CGELSS, CGELSX, CGELSY, CGELSD).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRLS tests the error exits for the COMPLEX least squares
+*> driver routines (CGELS, CGELSS, CGELSX, CGELSY, CGELSD).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRLS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrpo.f b/TESTING/LIN/cerrpo.f
index 81b9c13c..5b7c884b 100644
--- a/TESTING/LIN/cerrpo.f
+++ b/TESTING/LIN/cerrpo.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRPO( PATH, NUNIT )
+*> \brief \b CERRPO
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRPO( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRPO tests the error exits for the COMPLEX routines
-* for Hermitian positive definite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRPO tests the error exits for the COMPLEX routines
+*> for Hermitian positive definite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRPO( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrpox.f b/TESTING/LIN/cerrpox.f
index 18c9a3cb..099d08e4 100644
--- a/TESTING/LIN/cerrpox.f
+++ b/TESTING/LIN/cerrpox.f
@@ -1,31 +1,74 @@
- SUBROUTINE CERRPO( PATH, NUNIT )
+*> \brief \b CERRPOX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CERRPO( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRPO tests the error exits for the COMPLEX routines
-* for Hermitian positive definite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cerrpo.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRPO tests the error exits for the COMPLEX routines
+*> for Hermitian positive definite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cerrpo.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRPO( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrps.f b/TESTING/LIN/cerrps.f
index 5e655390..e7581d3e 100644
--- a/TESTING/LIN/cerrps.f
+++ b/TESTING/LIN/cerrps.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRPS( PATH, NUNIT )
+*> \brief \b CERRPS
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
- CHARACTER*3 PATH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRPS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* CHARACTER*3 PATH
+* ..
+*
* Purpose
* =======
*
-* CERRPS tests the error exits for the COMPLEX routines
-* for CPSTRF..
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRPS tests the error exits for the COMPLEX routines
+*> for CPSTRF..
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRPS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+ CHARACTER*3 PATH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrql.f b/TESTING/LIN/cerrql.f
index 72eb34fb..8ab24599 100644
--- a/TESTING/LIN/cerrql.f
+++ b/TESTING/LIN/cerrql.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRQL( PATH, NUNIT )
+*> \brief \b CERRQL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRQL( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRQL tests the error exits for the COMPLEX routines
-* that use the QL decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRQL tests the error exits for the COMPLEX routines
+*> that use the QL decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRQL( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrqp.f b/TESTING/LIN/cerrqp.f
index 452ad22a..38d97e30 100644
--- a/TESTING/LIN/cerrqp.f
+++ b/TESTING/LIN/cerrqp.f
@@ -1,27 +1,70 @@
- SUBROUTINE CERRQP( PATH, NUNIT )
+*> \brief \b CERRQP
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRQP( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRQP tests the error exits for CGEQPF and CGEQP3.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRQP tests the error exits for CGEQPF and CGEQP3.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRQP( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrqr.f b/TESTING/LIN/cerrqr.f
index b6d893bb..a02a62b9 100644
--- a/TESTING/LIN/cerrqr.f
+++ b/TESTING/LIN/cerrqr.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRQR( PATH, NUNIT )
+*> \brief \b CERRQR
*
-* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRQR( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRQR tests the error exits for the COMPLEX routines
-* that use the QR decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRQR tests the error exits for the COMPLEX routines
+*> that use the QR decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRQR( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrrfp.f b/TESTING/LIN/cerrrfp.f
index 2c965458..a0a182a0 100644
--- a/TESTING/LIN/cerrrfp.f
+++ b/TESTING/LIN/cerrrfp.f
@@ -1,28 +1,67 @@
- SUBROUTINE CERRRFP( NUNIT )
+*> \brief \b CERRRFP
*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRRFP( NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRRFP tests the error exits for the COMPLEX driver routines
-* for solving linear systems of equations.
-*
-* CDRVRFP tests the COMPLEX LAPACK RFP routines:
-* CTFSM, CTFTRI, CHFRK, CTFTTP, CTFTTR, CPFTRF, CPFTRS, CTPTTF,
-* CTPTTR, CTRTTF, and CTRTTP
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRRFP tests the error exits for the COMPLEX driver routines
+*> for solving linear systems of equations.
+*>
+*> CDRVRFP tests the COMPLEX LAPACK RFP routines:
+*> CTFSM, CTFTRI, CHFRK, CTFTTP, CTFTTR, CPFTRF, CPFTRS, CTPTTF,
+*> CTPTTR, CTRTTF, and CTRTTP
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRRFP( NUNIT )
+*
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrrq.f b/TESTING/LIN/cerrrq.f
index 2e920f95..e9139db3 100644
--- a/TESTING/LIN/cerrrq.f
+++ b/TESTING/LIN/cerrrq.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRRQ( PATH, NUNIT )
+*> \brief \b CERRRQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRRQ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRRQ tests the error exits for the COMPLEX routines
-* that use the RQ decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRRQ tests the error exits for the COMPLEX routines
+*> that use the RQ decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRRQ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrsy.f b/TESTING/LIN/cerrsy.f
index 5f7f93a4..20fa4be4 100644
--- a/TESTING/LIN/cerrsy.f
+++ b/TESTING/LIN/cerrsy.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRSY( PATH, NUNIT )
+*> \brief \b CERRSY
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRSY( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRSY tests the error exits for the COMPLEX routines
-* for symmetric indefinite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRSY tests the error exits for the COMPLEX routines
+*> for symmetric indefinite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRSY( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrsyx.f b/TESTING/LIN/cerrsyx.f
index 1d4052dc..9dbca81a 100644
--- a/TESTING/LIN/cerrsyx.f
+++ b/TESTING/LIN/cerrsyx.f
@@ -1,31 +1,74 @@
- SUBROUTINE CERRSY( PATH, NUNIT )
+*> \brief \b CERRSYX
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CERRSY( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRSY tests the error exits for the COMPLEX routines
-* for symmetric indefinite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise cerrsy.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRSY tests the error exits for the COMPLEX routines
+*> for symmetric indefinite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise cerrsy.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRSY( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrtr.f b/TESTING/LIN/cerrtr.f
index d84d75ac..264c56bd 100644
--- a/TESTING/LIN/cerrtr.f
+++ b/TESTING/LIN/cerrtr.f
@@ -1,27 +1,70 @@
- SUBROUTINE CERRTR( PATH, NUNIT )
+*> \brief \b CERRTR
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRTR( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRTR tests the error exits for the COMPLEX triangular routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRTR tests the error exits for the COMPLEX triangular routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRTR( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrtz.f b/TESTING/LIN/cerrtz.f
index 6736d072..47ec90c6 100644
--- a/TESTING/LIN/cerrtz.f
+++ b/TESTING/LIN/cerrtz.f
@@ -1,27 +1,70 @@
- SUBROUTINE CERRTZ( PATH, NUNIT )
+*> \brief \b CERRTZ
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRTZ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRTZ tests the error exits for CTZRQF and CTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRTZ tests the error exits for CTZRQF and CTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRTZ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrvx.f b/TESTING/LIN/cerrvx.f
index 5f7aa464..42753c97 100644
--- a/TESTING/LIN/cerrvx.f
+++ b/TESTING/LIN/cerrvx.f
@@ -1,28 +1,71 @@
- SUBROUTINE CERRVX( PATH, NUNIT )
+*> \brief \b CERRVX
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CERRVX( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRVX tests the error exits for the COMPLEX driver routines
-* for solving linear systems of equations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRVX tests the error exits for the COMPLEX driver routines
+*> for solving linear systems of equations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRVX( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cerrvxx.f b/TESTING/LIN/cerrvxx.f
index 1dfff764..f9617a8a 100644
--- a/TESTING/LIN/cerrvxx.f
+++ b/TESTING/LIN/cerrvxx.f
@@ -1,31 +1,71 @@
- SUBROUTINE CERRVX( PATH, NUNIT )
-*
-* -- LAPACK test routine (version 3.2.1) --
+*> \brief \b CERRVXX
*
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE CERRVX( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* CERRVX tests the error exits for the COMPLEX driver routines
-* for solving linear systems of equations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CERRVX tests the error exits for the COMPLEX driver routines
+*> for solving linear systems of equations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CERRVX( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cgbt01.f b/TESTING/LIN/cgbt01.f
index 2975e09b..5abb6f47 100644
--- a/TESTING/LIN/cgbt01.f
+++ b/TESTING/LIN/cgbt01.f
@@ -1,71 +1,146 @@
- SUBROUTINE CGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KL, KU, LDA, LDAFAC, M, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
-* ..
-*
+*> \brief \b CGBT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER KL, KU, LDA, LDAFAC, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CGBT01 reconstructs a band matrix A from its L*U factorization and
-* computes the residual:
-* norm(L*U - A) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* The expression L*U - A is computed one column at a time, so A and
-* AFAC are not modified.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBT01 reconstructs a band matrix A from its L*U factorization and
+*> computes the residual:
+*> norm(L*U - A) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*> The expression L*U - A is computed one column at a time, so A and
+*> AFAC are not modified.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* The original matrix A in band storage, stored in rows 1 to
-* KL+KU+1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original matrix A in band storage, stored in rows 1 to
+*> KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the banded
+*> factors L and U from the L*U factorization, as computed by
+*> CGBTRF. U is stored as an upper triangular band matrix with
+*> KL+KU superdiagonals in rows 1 to KL+KU+1, and the
+*> multipliers used during the factorization are stored in rows
+*> KL+KU+2 to 2*KL+KU+1. See CGBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC.
+*> LDAFAC >= max(1,2*KL*KU+1).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices from CGBTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*KL+KU+1)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(L*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AFAC (input) COMPLEX array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the banded
-* factors L and U from the L*U factorization, as computed by
-* CGBTRF. U is stored as an upper triangular band matrix with
-* KL+KU superdiagonals in rows 1 to KL+KU+1, and the
-* multipliers used during the factorization are stored in rows
-* KL+KU+2 to 2*KL+KU+1. See CGBTRF for further details.
+*> \date November 2011
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC.
-* LDAFAC >= max(1,2*KL*KU+1).
+*> \ingroup complex_lin
*
-* IPIV (input) INTEGER array, dimension (min(M,N))
-* The pivot indices from CGBTRF.
+* =====================================================================
+ SUBROUTINE CGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
+ $ RESID )
*
-* WORK (workspace) COMPLEX array, dimension (2*KL+KU+1)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(L*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER KL, KU, LDA, LDAFAC, M, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cgbt02.f b/TESTING/LIN/cgbt02.f
index b11cf4ea..bb35c1b7 100644
--- a/TESTING/LIN/cgbt02.f
+++ b/TESTING/LIN/cgbt02.f
@@ -1,78 +1,159 @@
- SUBROUTINE CGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
- $ LDB, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
- REAL RESID
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
-* ..
-*
+*> \brief \b CGBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
+* LDB, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* CGBT02 computes the residual for a solution of a banded system of
-* equations A*x = b or A'*x = b:
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
-* where EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBT02 computes the residual for a solution of a banded system of
+*> equations A*x = b or A'*x = b:
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original matrix A in band storage, stored in rows 1 to
-* KL+KU+1.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original matrix A in band storage, stored in rows 1 to
+*> KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \ingroup complex_lin
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
+* =====================================================================
+ SUBROUTINE CGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
+ $ LDB, RESID )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cgbt05.f b/TESTING/LIN/cgbt05.f
index 7ddbc5ad..fbcf837b 100644
--- a/TESTING/LIN/cgbt05.f
+++ b/TESTING/LIN/cgbt05.f
@@ -1,9 +1,187 @@
+*> \brief \b CGBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGBT05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
+* LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER KL, KU, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations op(A)*X = B, where A is a
+*> general band matrix of order n with kl subdiagonals and ku
+*> superdiagonals and op(A) = A or A**T, depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CGBT05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
$ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,93 +193,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CGBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations op(A)*X = B, where A is a
-* general band matrix of order n with kl subdiagonals and ku
-* superdiagonals and op(A) = A or A**T, depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cgelqs.f b/TESTING/LIN/cgelqs.f
index cd34d498..41d6a05d 100644
--- a/TESTING/LIN/cgelqs.f
+++ b/TESTING/LIN/cgelqs.f
@@ -1,66 +1,140 @@
- SUBROUTINE CGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b CGELQS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Compute a minimum-norm solution
-* min || A*X - B ||
-* using the LQ factorization
-* A = L*Q
-* computed by CGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute a minimum-norm solution
+*> min || A*X - B ||
+*> using the LQ factorization
+*> A = L*Q
+*> computed by CGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* Details of the LQ factorization of the original matrix A as
-* returned by CGELQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> Details of the LQ factorization of the original matrix A as
+*> returned by CGELQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX array, dimension (M)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= N.
+*> \ingroup complex_lin
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE CGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cgennd.f b/TESTING/LIN/cgennd.f
index 5e53f4f7..c56ca7b9 100644
--- a/TESTING/LIN/cgennd.f
+++ b/TESTING/LIN/cgennd.f
@@ -1,36 +1,86 @@
- LOGICAL FUNCTION CGENND (M, N, A, LDA)
- IMPLICIT NONE
+*> \brief \b CGENND
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION CGENND (M, N, A, LDA)
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CGENND tests that its argument has a real, non-negative diagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGENND tests that its argument has a real, non-negative diagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns in A.
+*> \date November 2011
*
-* A (input) COMPLEX array, dimension (LDA, N)
-* The matrix.
+*> \ingroup complex_lin
*
-* LDA (input) INTEGER
-* Leading dimension of A.
+* =====================================================================
+ LOGICAL FUNCTION CGENND (M, N, A, LDA)
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cgeqls.f b/TESTING/LIN/cgeqls.f
index 84120035..efa05b42 100644
--- a/TESTING/LIN/cgeqls.f
+++ b/TESTING/LIN/cgeqls.f
@@ -1,67 +1,141 @@
- SUBROUTINE CGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b CGEQLS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Solve the least squares problem
-* min || A*X - B ||
-* using the QL factorization
-* A = Q*L
-* computed by CGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Solve the least squares problem
+*> min || A*X - B ||
+*> using the QL factorization
+*> A = Q*L
+*> computed by CGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. M >= N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* Details of the QL factorization of the original matrix A as
-* returned by CGEQLF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> Details of the QL factorization of the original matrix A as
+*> returned by CGEQLF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X, stored in rows
+*> m-n+1:m.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= M.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX array, dimension (N)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X, stored in rows
-* m-n+1:m.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= M.
+*> \ingroup complex_lin
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE CGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cgeqrs.f b/TESTING/LIN/cgeqrs.f
index 6e90e1ac..887c708e 100644
--- a/TESTING/LIN/cgeqrs.f
+++ b/TESTING/LIN/cgeqrs.f
@@ -1,66 +1,140 @@
- SUBROUTINE CGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b CGEQRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Solve the least squares problem
-* min || A*X - B ||
-* using the QR factorization
-* A = Q*R
-* computed by CGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Solve the least squares problem
+*> min || A*X - B ||
+*> using the QR factorization
+*> A = Q*R
+*> computed by CGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. M >= N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* Details of the QR factorization of the original matrix A as
-* returned by CGEQRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> Details of the QR factorization of the original matrix A as
+*> returned by CGEQRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= M.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX array, dimension (N)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= M.
+*> \ingroup complex_lin
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE CGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cgerqs.f b/TESTING/LIN/cgerqs.f
index e038ee6e..92eea1e6 100644
--- a/TESTING/LIN/cgerqs.f
+++ b/TESTING/LIN/cgerqs.f
@@ -1,67 +1,141 @@
- SUBROUTINE CGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b CGERQS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Compute a minimum-norm solution
-* min || A*X - B ||
-* using the RQ factorization
-* A = R*Q
-* computed by CGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute a minimum-norm solution
+*> min || A*X - B ||
+*> using the RQ factorization
+*> A = R*Q
+*> computed by CGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* Details of the RQ factorization of the original matrix A as
-* returned by CGERQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> Details of the RQ factorization of the original matrix A as
+*> returned by CGERQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the linear system.
+*> On exit, the solution vectors X. Each solution vector
+*> is contained in rows 1:N of a column of B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX array, dimension (M)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the linear system.
-* On exit, the solution vectors X. Each solution vector
-* is contained in rows 1:N of a column of B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup complex_lin
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE CGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cget01.f b/TESTING/LIN/cget01.f
index 9e999c07..d22946d0 100644
--- a/TESTING/LIN/cget01.f
+++ b/TESTING/LIN/cget01.f
@@ -1,59 +1,129 @@
- SUBROUTINE CGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
- $ RESID )
+*> \brief \b CGET01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDAFAC, M, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL RWORK( * )
- COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDAFAC, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
+* ..
+*
* Purpose
* =======
*
-* CGET01 reconstructs a matrix A from its L*U factorization and
-* computes the residual
-* norm(L*U - A) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET01 reconstructs a matrix A from its L*U factorization and
+*> computes the residual
+*> norm(L*U - A) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original M x N matrix A.
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the factors
+*> L and U from the L*U factorization as computed by CGETRF.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*U - A.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CGETRF.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(L*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AFAC (input/output) COMPLEX array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the factors
-* L and U from the L*U factorization as computed by CGETRF.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*U - A.
+*> \date November 2011
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,M).
+*> \ingroup complex_lin
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CGETRF.
+* =====================================================================
+ SUBROUTINE CGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
+ $ RESID )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(L*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDAFAC, M, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL RWORK( * )
+ COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cget02.f b/TESTING/LIN/cget02.f
index 9b890deb..4b2679c5 100644
--- a/TESTING/LIN/cget02.f
+++ b/TESTING/LIN/cget02.f
@@ -1,9 +1,144 @@
+*> \brief \b CGET02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET02 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A^T*x = b, where A^T is the transpose of A
+*> = 'C': A^H*x = b, where A^H is the conjugate transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGET02 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A^T*x = b, where A^T is the transpose of A
-* = 'C': A^H*x = b, where A^H is the conjugate transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cget03.f b/TESTING/LIN/cget03.f
index c9c3a8c4..7421618d 100644
--- a/TESTING/LIN/cget03.f
+++ b/TESTING/LIN/cget03.f
@@ -1,58 +1,131 @@
- SUBROUTINE CGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
- $ RCOND, RESID )
+*> \brief \b CGET03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDAINV, LDWORK, N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX A( LDA, * ), AINV( LDAINV, * ),
- $ WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
+* RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDAINV, LDWORK, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AINV( LDAINV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* CGET03 computes the residual for a general matrix times its inverse:
-* norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET03 computes the residual for a general matrix times its inverse:
+*> norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original N x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AINV (input) COMPLEX array, dimension (LDAINV,N)
-* The inverse of the matrix A.
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original N x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (LDAINV,N)
+*> The inverse of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup complex_lin
*
-* RWORK (workspace) REAL array, dimension (N)
+* =====================================================================
+ SUBROUTINE CGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
+ $ RCOND, RESID )
*
-* RCOND (output) REAL
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDAINV, LDWORK, N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX A( LDA, * ), AINV( LDAINV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cget04.f b/TESTING/LIN/cget04.f
index 27f5c710..52e9afad 100644
--- a/TESTING/LIN/cget04.f
+++ b/TESTING/LIN/cget04.f
@@ -1,57 +1,121 @@
- SUBROUTINE CGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDX, LDXACT, N, NRHS
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- COMPLEX X( LDX, * ), XACT( LDXACT, * )
-* ..
-*
+*> \brief \b CGET04
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDX, LDXACT, N, NRHS
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* COMPLEX X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
* Purpose
* =======
*
-* CGET04 computes the difference between a computed solution and the
-* true solution to a system of linear equations.
-*
-* RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
-* where RCOND is the reciprocal of the condition number and EPS is the
-* machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET04 computes the difference between a computed solution and the
+*> true solution to a system of linear equations.
+*>
+*> RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+*> where RCOND is the reciprocal of the condition number and EPS is the
+*> machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the coefficient
+*> matrix in the system of equations.
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the NRHS solution vectors of
+*> ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
+*> \ingroup complex_lin
*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
+* =====================================================================
+ SUBROUTINE CGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
*
-* RCOND (input) REAL
-* The reciprocal of the condition number of the coefficient
-* matrix in the system of equations.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The maximum over the NRHS solution vectors of
-* ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDX, LDXACT, N, NRHS
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ COMPLEX X( LDX, * ), XACT( LDXACT, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cget07.f b/TESTING/LIN/cget07.f
index e65038fc..d45c248b 100644
--- a/TESTING/LIN/cget07.f
+++ b/TESTING/LIN/cget07.f
@@ -1,9 +1,177 @@
+*> \brief \b CGET07
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGET07( TRANS, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, CHKFERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* LOGICAL CHKFERR
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGET07 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations op(A)*X = B, where A is a
+*> general n by n matrix and op(A) = A or A**T, depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original n by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] CHKFERR
+*> \verbatim
+*> CHKFERR is LOGICAL
+*> Set to .TRUE. to check FERR, .FALSE. not to check FERR.
+*> When the test system is ill-conditioned, the "true"
+*> solution in XACT may be incorrect.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CGET07( TRANS, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, CHKFERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -16,85 +184,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CGET07 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations op(A)*X = B, where A is a
-* general n by n matrix and op(A) = A or A**T, depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original n by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* CHKFERR (input) LOGICAL
-* Set to .TRUE. to check FERR, .FALSE. not to check FERR.
-* When the test system is ill-conditioned, the "true"
-* solution in XACT may be incorrect.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cgtt01.f b/TESTING/LIN/cgtt01.f
index 4ac54b3f..43a93546 100644
--- a/TESTING/LIN/cgtt01.f
+++ b/TESTING/LIN/cgtt01.f
@@ -1,9 +1,145 @@
+*> \brief \b CGTT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTT01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
+* LDWORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDWORK, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL RWORK( * )
+* COMPLEX D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
+* $ DU2( * ), DUF( * ), WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTT01 reconstructs a tridiagonal matrix A from its LU factorization
+*> and computes the residual
+*> norm(L*U - A) / ( norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DLF
+*> \verbatim
+*> DLF is COMPLEX array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is COMPLEX array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DUF
+*> \verbatim
+*> DUF is COMPLEX array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The scaled residual: norm(L*U - A) / (norm(A) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CGTT01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
$ LDWORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDWORK, N
@@ -16,59 +152,6 @@
$ DU2( * ), DUF( * ), WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* CGTT01 reconstructs a tridiagonal matrix A from its LU factorization
-* and computes the residual
-* norm(L*U - A) / ( norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGTER
-* The order of the matrix A. N >= 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) COMPLEX array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* DLF (input) COMPLEX array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
-*
-* DF (input) COMPLEX array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DUF (input) COMPLEX array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
-*
-* DU2 (input) COMPLEX array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,N)
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The scaled residual: norm(L*U - A) / (norm(A) * EPS)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cgtt02.f b/TESTING/LIN/cgtt02.f
index e6bb0ece..e57d97ec 100644
--- a/TESTING/LIN/cgtt02.f
+++ b/TESTING/LIN/cgtt02.f
@@ -1,9 +1,135 @@
+*> \brief \b CGTT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTT02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTT02 computes the residual for the solution to a tridiagonal
+*> system of equations:
+*> RESID = norm(B - op(A)*X) / (norm(A) * norm(X) * EPS),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> Specifies the form of the residual.
+*> = 'N': B - A * X (No transpose)
+*> = 'T': B - A**T * X (Transpose)
+*> = 'C': B - A**H * X (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - op(A)*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(B - op(A)*X) / (norm(A) * norm(X) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CGTT02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,56 +141,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CGTT02 computes the residual for the solution to a tridiagonal
-* system of equations:
-* RESID = norm(B - op(A)*X) / (norm(A) * norm(X) * EPS),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER
-* Specifies the form of the residual.
-* = 'N': B - A * X (No transpose)
-* = 'T': B - A**T * X (Transpose)
-* = 'C': B - A**H * X (Conjugate transpose)
-*
-* N (input) INTEGTER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) COMPLEX array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - op(A)*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RESID (output) REAL
-* norm(B - op(A)*X) / (norm(A) * norm(X) * EPS)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cgtt05.f b/TESTING/LIN/cgtt05.f
index d7117475..7c27801d 100644
--- a/TESTING/LIN/cgtt05.f
+++ b/TESTING/LIN/cgtt05.f
@@ -1,9 +1,176 @@
+*> \brief \b CGTT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CGTT05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CGTT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> general tridiagonal matrix of order n and op(A) = A or A**T,
+*> depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CGTT05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,85 +182,6 @@
$ X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CGTT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* general tridiagonal matrix of order n and op(A) = A or A**T,
-* depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
-*
-* DL (input) COMPLEX array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) COMPLEX array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/chet01.f b/TESTING/LIN/chet01.f
index de445b7a..4f7d4fb2 100644
--- a/TESTING/LIN/chet01.f
+++ b/TESTING/LIN/chet01.f
@@ -1,9 +1,135 @@
+*> \brief \b CHET01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHET01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, LDC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHET01 reconstructs a Hermitian indefinite matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix, EPS is the machine epsilon,
+*> L' is the conjugate transpose of L, and U' is the conjugate transpose
+*> of U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor L or U from the block L*D*L' or U*D*U' factorization
+*> as computed by CHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CHETRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CHET01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,57 +142,6 @@
COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
* ..
*
-* Purpose
-* =======
-*
-* CHET01 reconstructs a Hermitian indefinite matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix, EPS is the machine epsilon,
-* L' is the conjugate transpose of L, and U' is the conjugate transpose
-* of U.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) COMPLEX array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor L or U from the block L*D*L' or U*D*U' factorization
-* as computed by CHETRF.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CHETRF.
-*
-* C (workspace) COMPLEX array, dimension (LDC,N)
-*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/chkxer.f b/TESTING/LIN/chkxer.f
index 9a7082b0..0231f757 100644
--- a/TESTING/LIN/chkxer.f
+++ b/TESTING/LIN/chkxer.f
@@ -1,14 +1,68 @@
- SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
+*> \brief \b CHKXER
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
+*
+* .. Scalar Arguments ..
+* LOGICAL LERR, OK
+* CHARACTER*(*) SRNAMT
+* INTEGER INFOT, NOUT
+* ..
+* .. Intrinsic Functions ..
+* INTRINSIC LEN_TRIM
+* ..
+* .. Executable Statements ..
+* IF( .NOT.LERR ) THEN
+* WRITE( NOUT, FMT = 9999 )INFOT,
+* $ SRNAMT( 1:LEN_TRIM( SRNAMT ) )
+* OK = .FALSE.
+* END IF
+* LERR = .FALSE.
+* RETURN
+*
+* 9999 FORMAT( ' *** Illegal value of parameter number ', I2,
+* $ ' not detected by ', A6, ' ***' )
+*
+* End of CHKXER.
+*
+* END
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>\endverbatim
*
-* Tests whether XERBLA has detected an error when it should.
+* Arguments
+* =========
*
-* Auxiliary routine for test program for Level 2 Blas.
*
-* -- Written on 10-August-1987.
-* Richard Hanson, Sandia National Labs.
-* Jeremy Du Croz, NAG Central Office.
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
*
* =====================================================================
+ SUBROUTINE CHKXER( SRNAMT, INFOT, NOUT, LERR, OK )
+*
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LERR, OK
diff --git a/TESTING/LIN/chpt01.f b/TESTING/LIN/chpt01.f
index 2710562a..d1eddf0f 100644
--- a/TESTING/LIN/chpt01.f
+++ b/TESTING/LIN/chpt01.f
@@ -1,65 +1,133 @@
- SUBROUTINE CHPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*> \brief \b CHPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDC, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL RWORK( * )
- COMPLEX A( * ), AFAC( * ), C( LDC, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CHPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), C( LDC, * )
+* ..
+*
* Purpose
* =======
*
-* CHPT01 reconstructs a Hermitian indefinite packed matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix, EPS is the machine epsilon,
-* L' is the conjugate transpose of L, and U' is the conjugate transpose
-* of U.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CHPT01 reconstructs a Hermitian indefinite packed matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix, EPS is the machine epsilon,
+*> L' is the conjugate transpose of L, and U' is the conjugate transpose
+*> of U.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original Hermitian matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (N*(N+1)/2)
+*> The original Hermitian matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A, stored as a packed
+*> triangular matrix. AFAC contains the block diagonal matrix D
+*> and the multipliers used to obtain the factor L or U from the
+*> block L*D*L' or U*D*U' factorization as computed by CHPTRF.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CHPTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AFAC (input) COMPLEX array, dimension (N*(N+1)/2)
-* The factored form of the matrix A, stored as a packed
-* triangular matrix. AFAC contains the block diagonal matrix D
-* and the multipliers used to obtain the factor L or U from the
-* block L*D*L' or U*D*U' factorization as computed by CHPTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CHPTRF.
+*> \date November 2011
*
-* C (workspace) COMPLEX array, dimension (LDC,N)
+*> \ingroup complex_lin
*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
+* =====================================================================
+ SUBROUTINE CHPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDC, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL RWORK( * )
+ COMPLEX A( * ), AFAC( * ), C( LDC, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/clahilb.f b/TESTING/LIN/clahilb.f
index 8c495df1..d0f2e162 100644
--- a/TESTING/LIN/clahilb.f
+++ b/TESTING/LIN/clahilb.f
@@ -1,25 +1,29 @@
- SUBROUTINE CLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
- $ INFO, PATH)
-!
-! -- LAPACK auxiliary test routine (version 3.0) --
-! Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-! Courant Institute, Argonne National Lab, and Rice University
-! 28 August, 2006
-!
-! David Vu <dtv@cs.berkeley.edu>
-! Yozo Hida <yozo@cs.berkeley.edu>
-! Jason Riedy <ejr@cs.berkeley.edu>
-! D. Halligan <dhalligan@berkeley.edu>
-!
- IMPLICIT NONE
-! .. Scalar Arguments ..
- INTEGER T, N, NRHS, LDA, LDX, LDB, INFO
-! .. Array Arguments ..
- REAL WORK(N)
- COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
- CHARACTER*3 PATH
-! ..
-!
+*> \brief \b CLAHILB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+* INFO, PATH)
+*
+* ! .. Scalar Arguments ..
+* INTEGER T, N, NRHS, LDA, LDX, LDB, INFO
+* ! .. Array Arguments ..
+* REAL WORK(N)
+* COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
+* CHARACTER*3 PATH
+* ! ..
+* !
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
! Purpose
! =======
!
@@ -42,43 +46,40 @@
! In single, the generated solution is exact for N <= 6 and has
! small componentwise error for 7 <= N <= 11.
!
-! Arguments
-! =========
-!
-! N (input) INTEGER
-! The dimension of the matrix A.
-!
-! NRHS (input) NRHS
-! The requested number of right-hand sides.
-!
-! A (output) COMPLEX array, dimension (LDA, N)
-! The generated scaled Hilbert matrix.
-!
-! LDA (input) INTEGER
-! The leading dimension of the array A. LDA >= N.
-!
-! X (output) COMPLEX array, dimension (LDX, NRHS)
-! The generated exact solutions. Currently, the first NRHS
-! columns of the inverse Hilbert matrix.
-!
-! LDX (input) INTEGER
-! The leading dimension of the array X. LDX >= N.
-!
-! B (output) REAL array, dimension (LDB, NRHS)
-! The generated right-hand sides. Currently, the first NRHS
-! columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
-!
-! LDB (input) INTEGER
-! The leading dimension of the array B. LDB >= N.
-!
-! WORK (workspace) REAL array, dimension (N)
-!
-!
-! INFO (output) INTEGER
-! = 0: successful exit
-! = 1: N is too large; the data is still generated but may not
-! be not exact.
-! < 0: if INFO = -i, the i-th argument had an illegal value
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+ $ INFO, PATH)
+*
+* -- LAPACK test routine (version 3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+! .. Scalar Arguments ..
+ INTEGER T, N, NRHS, LDA, LDX, LDB, INFO
+! .. Array Arguments ..
+ REAL WORK(N)
+ COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
+ CHARACTER*3 PATH
+! ..
!
! =====================================================================
diff --git a/TESTING/LIN/claipd.f b/TESTING/LIN/claipd.f
index fc9bafdb..4e8f4616 100644
--- a/TESTING/LIN/claipd.f
+++ b/TESTING/LIN/claipd.f
@@ -1,50 +1,101 @@
- SUBROUTINE CLAIPD( N, A, INDA, VINDA )
+*> \brief \b CLAIPD
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INDA, N, VINDA
-* ..
-* .. Array Arguments ..
- COMPLEX A( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLAIPD( N, A, INDA, VINDA )
+*
+* .. Scalar Arguments ..
+* INTEGER INDA, N, VINDA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( * )
+* ..
+*
* Purpose
* =======
*
-* CLAIPD sets the imaginary part of the diagonal elements of a complex
-* matrix A to a large value. This is used to test LAPACK routines for
-* complex Hermitian matrices, which are not supposed to access or use
-* the imaginary parts of the diagonals.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAIPD sets the imaginary part of the diagonal elements of a complex
+*> matrix A to a large value. This is used to test LAPACK routines for
+*> complex Hermitian matrices, which are not supposed to access or use
+*> the imaginary parts of the diagonals.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of diagonal elements of A.
-*
-* A (input/output) COMPLEX array, dimension
-* (1+(N-1)*INDA+(N-2)*VINDA)
-* On entry, the complex (Hermitian) matrix A.
-* On exit, the imaginary parts of the diagonal elements are set
-* to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
-* SAFMIN is the safe minimum.
-*
-* INDA (input) INTEGER
-* The increment between A(1) and the next diagonal element of A.
-* Typical values are
-* = LDA+1: square matrices with leading dimension LDA
-* = 2: packed upper triangular matrix, starting at A(1,1)
-* = N: packed lower triangular matrix, starting at A(1,1)
-*
-* VINDA (input) INTEGER
-* The change in the diagonal increment between columns of A.
-* Typical values are
-* = 0: no change, the row and column increments in A are fixed
-* = 1: packed upper triangular matrix
-* = -1: packed lower triangular matrix
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension
+*> (1+(N-1)*INDA+(N-2)*VINDA)
+*> On entry, the complex (Hermitian) matrix A.
+*> On exit, the imaginary parts of the diagonal elements are set
+*> to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
+*> SAFMIN is the safe minimum.
+*> \endverbatim
+*>
+*> \param[in] INDA
+*> \verbatim
+*> INDA is INTEGER
+*> The increment between A(1) and the next diagonal element of A.
+*> Typical values are
+*> = LDA+1: square matrices with leading dimension LDA
+*> = 2: packed upper triangular matrix, starting at A(1,1)
+*> = N: packed lower triangular matrix, starting at A(1,1)
+*> \endverbatim
+*>
+*> \param[in] VINDA
+*> \verbatim
+*> VINDA is INTEGER
+*> The change in the diagonal increment between columns of A.
+*> Typical values are
+*> = 0: no change, the row and column increments in A are fixed
+*> = 1: packed upper triangular matrix
+*> = -1: packed lower triangular matrix
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
+ SUBROUTINE CLAIPD( N, A, INDA, VINDA )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INDA, N, VINDA
+* ..
+* .. Array Arguments ..
+ COMPLEX A( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/claptm.f b/TESTING/LIN/claptm.f
index 52b64c6a..a0761216 100644
--- a/TESTING/LIN/claptm.f
+++ b/TESTING/LIN/claptm.f
@@ -1,74 +1,150 @@
- SUBROUTINE CLAPTM( UPLO, N, NRHS, ALPHA, D, E, X, LDX, BETA, B,
- $ LDB )
-*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDB, LDX, N, NRHS
- REAL ALPHA, BETA
-* ..
-* .. Array Arguments ..
- REAL D( * )
- COMPLEX B( LDB, * ), E( * ), X( LDX, * )
-* ..
-*
+*> \brief \b CLAPTM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAPTM( UPLO, N, NRHS, ALPHA, D, E, X, LDX, BETA, B,
+* LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* COMPLEX B( LDB, * ), E( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* CLAPTM multiplies an N by NRHS matrix X by a Hermitian tridiagonal
-* matrix A and stores the result in a matrix B. The operation has the
-* form
-*
-* B := alpha * A * X + beta * B
-*
-* where alpha may be either 1. or -1. and beta may be 0., 1., or -1.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAPTM multiplies an N by NRHS matrix X by a Hermitian tridiagonal
+*> matrix A and stores the result in a matrix B. The operation has the
+*> form
+*>
+*> B := alpha * A * X + beta * B
+*>
+*> where alpha may be either 1. or -1. and beta may be 0., 1., or -1.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* Specifies whether the superdiagonal or the subdiagonal of the
-* tridiagonal matrix A is stored.
-* = 'U': Upper, E is the superdiagonal of A.
-* = 'L': Lower, E is the subdiagonal of A.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B.
-*
-* ALPHA (input) REAL
-* The scalar alpha. ALPHA must be 1. or -1.; otherwise,
-* it is assumed to be 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the superdiagonal or the subdiagonal of the
+*> tridiagonal matrix A is stored.
+*> = 'U': Upper, E is the superdiagonal of A.
+*> = 'L': Lower, E is the subdiagonal of A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> The scalar alpha. ALPHA must be 1. or -1.; otherwise,
+*> it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> The (n-1) subdiagonal or superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The N by NRHS matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> The scalar beta. BETA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix B.
+*> On exit, B is overwritten by the matrix expression
+*> B := alpha * A * X + beta * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(N,1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) COMPLEX array, dimension (N-1)
-* The (n-1) subdiagonal or superdiagonal elements of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The N by NRHS matrix X.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(N,1).
+*> \ingroup complex_lin
*
-* BETA (input) REAL
-* The scalar beta. BETA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 1.
+* =====================================================================
+ SUBROUTINE CLAPTM( UPLO, N, NRHS, ALPHA, D, E, X, LDX, BETA, B,
+ $ LDB )
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix B.
-* On exit, B is overwritten by the matrix expression
-* B := alpha * A * X + beta * B.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(N,1).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDB, LDX, N, NRHS
+ REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+ REAL D( * )
+ COMPLEX B( LDB, * ), E( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/clarhs.f b/TESTING/LIN/clarhs.f
index ed463949..3bdd7b97 100644
--- a/TESTING/LIN/clarhs.f
+++ b/TESTING/LIN/clarhs.f
@@ -1,9 +1,222 @@
+*> \brief \b CLARHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
+* A, LDA, X, LDX, B, LDB, ISEED, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, UPLO, XTYPE
+* CHARACTER*3 PATH
+* INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARHS chooses a set of NRHS random solution vectors and sets
+*> up the right hand sides for the linear system
+*> op( A ) * X = B,
+*> where op( A ) may be A, A**T (transpose of A), or A**H (conjugate
+*> transpose of A).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The type of the complex matrix A. PATH may be given in any
+*> combination of upper and lower case. Valid paths include
+*> xGE: General m x n matrix
+*> xGB: General banded matrix
+*> xPO: Hermitian positive definite, 2-D storage
+*> xPP: Hermitian positive definite packed
+*> xPB: Hermitian positive definite banded
+*> xHE: Hermitian indefinite, 2-D storage
+*> xHP: Hermitian indefinite packed
+*> xHB: Hermitian indefinite banded
+*> xSY: Symmetric indefinite, 2-D storage
+*> xSP: Symmetric indefinite packed
+*> xSB: Symmetric indefinite banded
+*> xTR: Triangular
+*> xTP: Triangular packed
+*> xTB: Triangular banded
+*> xQR: General m x n matrix
+*> xLQ: General m x n matrix
+*> xQL: General m x n matrix
+*> xRQ: General m x n matrix
+*> where the leading character indicates the precision.
+*> \endverbatim
+*>
+*> \param[in] XTYPE
+*> \verbatim
+*> XTYPE is CHARACTER*1
+*> Specifies how the exact solution X will be determined:
+*> = 'N': New solution; generate a random X.
+*> = 'C': Computed; use value of X on entry.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Used only if A is symmetric or triangular; specifies whether
+*> the upper or lower triangular part of the matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Used only if A is nonsymmetric; specifies the operation
+*> applied to the matrix A.
+*> = 'N': B := A * X
+*> = 'T': B := A**T * X
+*> = 'C': B := A**H * X
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Used only if A is a band matrix; specifies the number of
+*> subdiagonals of A if A is a general band matrix or if A is
+*> symmetric or triangular and UPLO = 'L'; specifies the number
+*> of superdiagonals of A if A is symmetric or triangular and
+*> UPLO = 'U'. 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Used only if A is a general band matrix or if A is
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xGB, specifies the number of superdiagonals of A,
+*> and 0 <= KU <= N-1.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xTR, xTP, or xTB, specifies whether or not the
+*> matrix has unit diagonal:
+*> = 1: matrix has non-unit diagonal (default)
+*> = 2: matrix has unit diagonal
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors in the system A*X = B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The test matrix whose type is given by PATH.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If PATH = xGB, LDA >= KL+KU+1.
+*> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
+*> Otherwise, LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is or output) COMPLEX array, dimension (LDX,NRHS)
+*> On entry, if XTYPE = 'C' (for 'Computed'), then X contains
+*> the exact solution to the system of linear equations.
+*> On exit, if XTYPE = 'N' (for 'New'), then X is initialized
+*> with random values.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vector(s) for the system of equations,
+*> computed from B = op(A) * X, where op(A) is determined by
+*> TRANS.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. If TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> CLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
$ A, LDA, X, LDX, B, LDB, ISEED, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS, UPLO, XTYPE
@@ -15,123 +228,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CLARHS chooses a set of NRHS random solution vectors and sets
-* up the right hand sides for the linear system
-* op( A ) * X = B,
-* where op( A ) may be A, A**T (transpose of A), or A**H (conjugate
-* transpose of A).
-*
-* Arguments
-* =========
-*
-* PATH (input) CHARACTER*3
-* The type of the complex matrix A. PATH may be given in any
-* combination of upper and lower case. Valid paths include
-* xGE: General m x n matrix
-* xGB: General banded matrix
-* xPO: Hermitian positive definite, 2-D storage
-* xPP: Hermitian positive definite packed
-* xPB: Hermitian positive definite banded
-* xHE: Hermitian indefinite, 2-D storage
-* xHP: Hermitian indefinite packed
-* xHB: Hermitian indefinite banded
-* xSY: Symmetric indefinite, 2-D storage
-* xSP: Symmetric indefinite packed
-* xSB: Symmetric indefinite banded
-* xTR: Triangular
-* xTP: Triangular packed
-* xTB: Triangular banded
-* xQR: General m x n matrix
-* xLQ: General m x n matrix
-* xQL: General m x n matrix
-* xRQ: General m x n matrix
-* where the leading character indicates the precision.
-*
-* XTYPE (input) CHARACTER*1
-* Specifies how the exact solution X will be determined:
-* = 'N': New solution; generate a random X.
-* = 'C': Computed; use value of X on entry.
-*
-* UPLO (input) CHARACTER*1
-* Used only if A is symmetric or triangular; specifies whether
-* the upper or lower triangular part of the matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Used only if A is nonsymmetric; specifies the operation
-* applied to the matrix A.
-* = 'N': B := A * X
-* = 'T': B := A**T * X
-* = 'C': B := A**H * X
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* Used only if A is a band matrix; specifies the number of
-* subdiagonals of A if A is a general band matrix or if A is
-* symmetric or triangular and UPLO = 'L'; specifies the number
-* of superdiagonals of A if A is symmetric or triangular and
-* UPLO = 'U'. 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* Used only if A is a general band matrix or if A is
-* triangular.
-*
-* If PATH = xGB, specifies the number of superdiagonals of A,
-* and 0 <= KU <= N-1.
-*
-* If PATH = xTR, xTP, or xTB, specifies whether or not the
-* matrix has unit diagonal:
-* = 1: matrix has non-unit diagonal (default)
-* = 2: matrix has unit diagonal
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors in the system A*X = B.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The test matrix whose type is given by PATH.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If PATH = xGB, LDA >= KL+KU+1.
-* If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
-* Otherwise, LDA >= max(1,M).
-*
-* X (input or output) COMPLEX array, dimension (LDX,NRHS)
-* On entry, if XTYPE = 'C' (for 'Computed'), then X contains
-* the exact solution to the system of linear equations.
-* On exit, if XTYPE = 'N' (for 'New'), then X is initialized
-* with random values.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
-*
-* B (output) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vector(s) for the system of equations,
-* computed from B = op(A) * X, where op(A) is determined by
-* TRANS.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. If TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* CLATMS). Modified on exit.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/clatb4.f b/TESTING/LIN/clatb4.f
index d0187c2b..e6acabd6 100644
--- a/TESTING/LIN/clatb4.f
+++ b/TESTING/LIN/clatb4.f
@@ -1,65 +1,138 @@
- SUBROUTINE CLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
- $ CNDNUM, DIST )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIST, TYPE
- CHARACTER*3 PATH
- INTEGER IMAT, KL, KU, M, MODE, N
- REAL ANORM, CNDNUM
-* ..
-*
+*> \brief \b CLATB4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
+* CNDNUM, DIST )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, TYPE
+* CHARACTER*3 PATH
+* INTEGER IMAT, KL, KU, M, MODE, N
+* REAL ANORM, CNDNUM
+* ..
+*
* Purpose
* =======
*
-* CLATB4 sets parameters for the matrix generator based on the type of
-* matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATB4 sets parameters for the matrix generator based on the type of
+*> matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* M (input) INTEGER
-* The number of rows in the matrix to be generated.
-*
-* N (input) INTEGER
-* The number of columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix
-* = 'P': symmetric positive (semi)definite matrix
-* = 'N': nonsymmetric matrix
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix
+*> = 'P': symmetric positive (semi)definite matrix
+*> = 'N': nonsymmetric matrix
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is REAL
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) REAL
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup complex_lin
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE CLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
+ $ CNDNUM, DIST )
*
-* CNDNUM (output) REAL
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ CHARACTER DIST, TYPE
+ CHARACTER*3 PATH
+ INTEGER IMAT, KL, KU, M, MODE, N
+ REAL ANORM, CNDNUM
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/clatb5.f b/TESTING/LIN/clatb5.f
index 7ac3a8db..015169b7 100644
--- a/TESTING/LIN/clatb5.f
+++ b/TESTING/LIN/clatb5.f
@@ -1,62 +1,132 @@
- SUBROUTINE CLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
- $ CNDNUM, DIST )
-*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
-*
-* .. Scalar Arguments ..
- REAL ANORM, CNDNUM
- INTEGER IMAT, KL, KU, MODE, N
- CHARACTER DIST, TYPE
- CHARACTER*3 PATH
-* ..
-*
+*> \brief \b CLATB5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
+* CNDNUM, DIST )
+*
+* .. Scalar Arguments ..
+* REAL ANORM, CNDNUM
+* INTEGER IMAT, KL, KU, MODE, N
+* CHARACTER DIST, TYPE
+* CHARACTER*3 PATH
+* ..
+*
* Purpose
* =======
*
-* CLATB5 sets parameters for the matrix generator based on the type
-* of matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATB5 sets parameters for the matrix generator based on the type
+*> of matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* N (input) INTEGER
-* The number of rows and columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix
-* = 'P': symmetric positive (semi)definite matrix
-* = 'N': nonsymmetric matrix
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix
+*> = 'P': symmetric positive (semi)definite matrix
+*> = 'N': nonsymmetric matrix
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is REAL
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) REAL
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup complex_lin
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE CLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
+ $ CNDNUM, DIST )
*
-* CNDNUM (output) REAL
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ REAL ANORM, CNDNUM
+ INTEGER IMAT, KL, KU, MODE, N
+ CHARACTER DIST, TYPE
+ CHARACTER*3 PATH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/clatsp.f b/TESTING/LIN/clatsp.f
index cbe126a0..f0c25071 100644
--- a/TESTING/LIN/clatsp.f
+++ b/TESTING/LIN/clatsp.f
@@ -1,51 +1,104 @@
- SUBROUTINE CLATSP( UPLO, N, X, ISEED )
+*> \brief \b CLATSP
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( * )
- COMPLEX X( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CLATSP( UPLO, N, X, ISEED )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( * )
+* COMPLEX X( * )
+* ..
+*
* Purpose
* =======
*
-* CLATSP generates a special test matrix for the complex symmetric
-* (indefinite) factorization for packed matrices. The pivot blocks of
-* the generated matrix will be in the following order:
-* 2x2 pivot block, non diagonalizable
-* 1x1 pivot block
-* 2x2 pivot block, diagonalizable
-* (cycle repeats)
-* A row interchange is required for each non-diagonalizable 2x2 block.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATSP generates a special test matrix for the complex symmetric
+*> (indefinite) factorization for packed matrices. The pivot blocks of
+*> the generated matrix will be in the following order:
+*> 2x2 pivot block, non diagonalizable
+*> 1x1 pivot block
+*> 2x2 pivot block, diagonalizable
+*> (cycle repeats)
+*> A row interchange is required for each non-diagonalizable 2x2 block.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* Specifies whether the generated matrix is to be upper or
-* lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the generated matrix is to be upper or
+*> lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (N*(N+1)/2)
+*> The generated matrix in packed storage format. The matrix
+*> consists of 3x3 and 2x2 diagonal blocks which result in the
+*> pivot sequence given above. The matrix outside these
+*> diagonal blocks is zero.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed for the random number generator. The last
+*> of the four integers must be odd. (modified on exit)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The dimension of the matrix to be generated.
+*> \date November 2011
*
-* X (output) COMPLEX array, dimension (N*(N+1)/2)
-* The generated matrix in packed storage format. The matrix
-* consists of 3x3 and 2x2 diagonal blocks which result in the
-* pivot sequence given above. The matrix outside these
-* diagonal blocks is zero.
+*> \ingroup complex_lin
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed for the random number generator. The last
-* of the four integers must be odd. (modified on exit)
+* =====================================================================
+ SUBROUTINE CLATSP( UPLO, N, X, ISEED )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( * )
+ COMPLEX X( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/clatsy.f b/TESTING/LIN/clatsy.f
index e816d8c9..efd251dc 100644
--- a/TESTING/LIN/clatsy.f
+++ b/TESTING/LIN/clatsy.f
@@ -1,53 +1,109 @@
- SUBROUTINE CLATSY( UPLO, N, X, LDX, ISEED )
+*> \brief \b CLATSY
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDX, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( * )
- COMPLEX X( LDX, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATSY( UPLO, N, X, LDX, ISEED )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDX, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( * )
+* COMPLEX X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* CLATSY generates a special test matrix for the complex symmetric
-* (indefinite) factorization. The pivot blocks of the generated matrix
-* will be in the following order:
-* 2x2 pivot block, non diagonalizable
-* 1x1 pivot block
-* 2x2 pivot block, diagonalizable
-* (cycle repeats)
-* A row interchange is required for each non-diagonalizable 2x2 block.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATSY generates a special test matrix for the complex symmetric
+*> (indefinite) factorization. The pivot blocks of the generated matrix
+*> will be in the following order:
+*> 2x2 pivot block, non diagonalizable
+*> 1x1 pivot block
+*> 2x2 pivot block, diagonalizable
+*> (cycle repeats)
+*> A row interchange is required for each non-diagonalizable 2x2 block.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* Specifies whether the generated matrix is to be upper or
-* lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the generated matrix is to be upper or
+*> lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,N)
+*> The generated matrix, consisting of 3x3 and 2x2 diagonal
+*> blocks which result in the pivot sequence given above.
+*> The matrix outside of these diagonal blocks is zero.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed for the random number generator. The last
+*> of the four integers must be odd. (modified on exit)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* N (input) INTEGER
-* The dimension of the matrix to be generated.
+*> \ingroup complex_lin
*
-* X (output) COMPLEX array, dimension (LDX,N)
-* The generated matrix, consisting of 3x3 and 2x2 diagonal
-* blocks which result in the pivot sequence given above.
-* The matrix outside of these diagonal blocks is zero.
+* =====================================================================
+ SUBROUTINE CLATSY( UPLO, N, X, LDX, ISEED )
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed for the random number generator. The last
-* of the four integers must be odd. (modified on exit)
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDX, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( * )
+ COMPLEX X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/clattb.f b/TESTING/LIN/clattb.f
index 2a08285d..baf28cff 100644
--- a/TESTING/LIN/clattb.f
+++ b/TESTING/LIN/clattb.f
@@ -1,9 +1,152 @@
+*> \brief \b CLATTB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
+* LDAB, B, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL RWORK( * )
+* COMPLEX AB( LDAB, * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATTB generates a triangular test matrix in 2-dimensional storage.
+*> IMAT and UPLO uniquely specify the properties of the test matrix,
+*> which is returned in the array A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= transpose)
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> CLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the banded
+*> triangular matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular banded matrix A, stored in the
+*> first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
+*> If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
+*> If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
$ LDAB, B, WORK, RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,67 +158,6 @@
COMPLEX AB( LDAB, * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATTB generates a triangular test matrix in 2-dimensional storage.
-* IMAT and UPLO uniquely specify the properties of the test matrix,
-* which is returned in the array A.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= transpose)
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* CLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the banded
-* triangular matrix A. KD >= 0.
-*
-* AB (output) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular banded matrix A, stored in the
-* first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
-* If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
-* If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (workspace) COMPLEX array, dimension (N)
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/clattp.f b/TESTING/LIN/clattp.f
index e6b6b0ea..4768e5bb 100644
--- a/TESTING/LIN/clattp.f
+++ b/TESTING/LIN/clattp.f
@@ -1,9 +1,142 @@
+*> \brief \b CLATTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATTP( IMAT, UPLO, TRANS, DIAG, ISEED, N, AP, B, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL RWORK( * )
+* COMPLEX AP( * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATTP generates a triangular test matrix in packed storage.
+*> IMAT and UPLO uniquely specify the properties of the test matrix,
+*> which is returned in the array AP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> CLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (N)
+*> The right hand side vector, if IMAT > 10.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CLATTP( IMAT, UPLO, TRANS, DIAG, ISEED, N, AP, B, WORK,
$ RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,63 +148,6 @@
COMPLEX AP( * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATTP generates a triangular test matrix in packed storage.
-* IMAT and UPLO uniquely specify the properties of the test matrix,
-* which is returned in the array AP.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* CLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* AP (output) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* B (output) COMPLEX array, dimension (N)
-* The right hand side vector, if IMAT > 10.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/clattr.f b/TESTING/LIN/clattr.f
index f9b9e133..290542c1 100644
--- a/TESTING/LIN/clattr.f
+++ b/TESTING/LIN/clattr.f
@@ -1,9 +1,149 @@
+*> \brief \b CLATTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATTR( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, LDA, B,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATTR generates a triangular test matrix in 2-dimensional storage.
+*> IMAT and UPLO uniquely specify the properties of the test matrix,
+*> which is returned in the array A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> CLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N x N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N x N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (N)
+*> The right hand side vector, if IMAT > 10.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CLATTR( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, LDA, B,
$ WORK, RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,67 +155,6 @@
COMPLEX A( LDA, * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATTR generates a triangular test matrix in 2-dimensional storage.
-* IMAT and UPLO uniquely specify the properties of the test matrix,
-* which is returned in the array A.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* CLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* A (output) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N x N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N x N lower
-* triangular part of the array A contains the lower triangular
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (output) COMPLEX array, dimension (N)
-* The right hand side vector, if IMAT > 10.
-*
-* WORK (workspace) COMPLEX array, dimension (2*N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/clavhe.f b/TESTING/LIN/clavhe.f
index 6eab96b9..b2cc08ce 100644
--- a/TESTING/LIN/clavhe.f
+++ b/TESTING/LIN/clavhe.f
@@ -1,9 +1,159 @@
+*> \brief \b CLAVHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAVHE( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAVHE performs one of the matrix-vector operations
+*> x := A*x or x := A^H*x,
+*> where x is an N element vector and A is one of the factors
+*> from the symmetric factorization computed by CHETRF.
+*> CHETRF produces a factorization of the form
+*> U * D * U^H or L * D * L^H,
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U^H (or L^H) is the conjugate transpose of
+*> U (or L), and D is Hermitian and block diagonal with 1 x 1 and
+*> 2 x 2 diagonal blocks. The multipliers for the transformations
+*> and the upper or lower triangular parts of the diagonal blocks
+*> are stored in the leading upper or lower triangle of the 2-D
+*> array A.
+*>
+*> If TRANS = 'N' or 'n', CLAVHE multiplies either by U or U * D
+*> (or L or L * D).
+*> If TRANS = 'C' or 'c', CLAVHE multiplies either by U^H or D * U^H
+*> (or L^H or D * L^H ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the triangular matrix
+*> stored in A is upper or lower triangular.
+*> UPLO = 'U' or 'u' The matrix is upper triangular.
+*> UPLO = 'L' or 'l' The matrix is lower triangular.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> TRANS - CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> TRANS = 'N' or 'n' x := A*x.
+*> TRANS = 'C' or 'c' x := A^H*x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> DIAG - CHARACTER*1
+*> On entry, DIAG specifies whether the diagonal blocks are
+*> assumed to be unit matrices:
+*> DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
+*> DIAG = 'N' or 'n' Diagonal blocks are non-unit.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> NRHS - INTEGER
+*> On entry, NRHS specifies the number of right hand sides,
+*> i.e., the number of vectors x to be multiplied by A.
+*> NRHS must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX array, dimension( LDA, N )
+*> On entry, A contains a block diagonal matrix and the
+*> multipliers of the transformations used to obtain it,
+*> stored as a 2-D triangular matrix.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling ( sub ) program. LDA must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> IPIV - INTEGER array, dimension( N )
+*> On entry, IPIV contains the vector of pivot indices as
+*> determined by CSYTRF or CHETRF.
+*> If IPIV( K ) = K, no interchange was done.
+*> If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
+*> changed with row IPIV( K ) and a 1 x 1 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> \endverbatim
+*> \verbatim
+*> B - COMPLEX array, dimension( LDB, NRHS )
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*> \verbatim
+*> LDB - INTEGER
+*> On entry, LDB contains the leading dimension of B as
+*> declared in the calling program. LDB must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> INFO is the error flag.
+*> On exit, a value of 0 indicates a successful exit.
+*> A negative value, say -K, indicates that the K-th argument
+*> has an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CLAVHE( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
$ LDB, INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,102 +164,6 @@
COMPLEX A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAVHE performs one of the matrix-vector operations
-* x := A*x or x := A^H*x,
-* where x is an N element vector and A is one of the factors
-* from the symmetric factorization computed by CHETRF.
-* CHETRF produces a factorization of the form
-* U * D * U^H or L * D * L^H,
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U^H (or L^H) is the conjugate transpose of
-* U (or L), and D is Hermitian and block diagonal with 1 x 1 and
-* 2 x 2 diagonal blocks. The multipliers for the transformations
-* and the upper or lower triangular parts of the diagonal blocks
-* are stored in the leading upper or lower triangle of the 2-D
-* array A.
-*
-* If TRANS = 'N' or 'n', CLAVHE multiplies either by U or U * D
-* (or L or L * D).
-* If TRANS = 'C' or 'c', CLAVHE multiplies either by U^H or D * U^H
-* (or L^H or D * L^H ).
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the triangular matrix
-* stored in A is upper or lower triangular.
-* UPLO = 'U' or 'u' The matrix is upper triangular.
-* UPLO = 'L' or 'l' The matrix is lower triangular.
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-* TRANS = 'N' or 'n' x := A*x.
-* TRANS = 'C' or 'c' x := A^H*x.
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1
-* On entry, DIAG specifies whether the diagonal blocks are
-* assumed to be unit matrices:
-* DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
-* DIAG = 'N' or 'n' Diagonal blocks are non-unit.
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* NRHS - INTEGER
-* On entry, NRHS specifies the number of right hand sides,
-* i.e., the number of vectors x to be multiplied by A.
-* NRHS must be at least zero.
-* Unchanged on exit.
-*
-* A - COMPLEX array, dimension( LDA, N )
-* On entry, A contains a block diagonal matrix and the
-* multipliers of the transformations used to obtain it,
-* stored as a 2-D triangular matrix.
-* Unchanged on exit.
-*
-* LDA - INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling ( sub ) program. LDA must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* IPIV - INTEGER array, dimension( N )
-* On entry, IPIV contains the vector of pivot indices as
-* determined by CSYTRF or CHETRF.
-* If IPIV( K ) = K, no interchange was done.
-* If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
-* changed with row IPIV( K ) and a 1 x 1 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-*
-* B - COMPLEX array, dimension( LDB, NRHS )
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB - INTEGER
-* On entry, LDB contains the leading dimension of B as
-* declared in the calling program. LDB must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* INFO - INTEGER
-* INFO is the error flag.
-* On exit, a value of 0 indicates a successful exit.
-* A negative value, say -K, indicates that the K-th argument
-* has an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/clavhp.f b/TESTING/LIN/clavhp.f
index d7c99df8..7563b64a 100644
--- a/TESTING/LIN/clavhp.f
+++ b/TESTING/LIN/clavhp.f
@@ -1,9 +1,151 @@
+*> \brief \b CLAVHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAVHP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAVHP performs one of the matrix-vector operations
+*> x := A*x or x := A^H*x,
+*> where x is an N element vector and A is one of the factors
+*> from the symmetric factorization computed by CHPTRF.
+*> CHPTRF produces a factorization of the form
+*> U * D * U^H or L * D * L^H,
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U^H (or L^H) is the conjugate transpose of
+*> U (or L), and D is Hermitian and block diagonal with 1 x 1 and
+*> 2 x 2 diagonal blocks. The multipliers for the transformations
+*> and the upper or lower triangular parts of the diagonal blocks
+*> are stored columnwise in packed format in the linear array A.
+*>
+*> If TRANS = 'N' or 'n', CLAVHP multiplies either by U or U * D
+*> (or L or L * D).
+*> If TRANS = 'C' or 'c', CLAVHP multiplies either by U^H or D * U^H
+*> (or L^H or D * L^H ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the triangular matrix
+*> stored in A is upper or lower triangular.
+*> UPLO = 'U' or 'u' The matrix is upper triangular.
+*> UPLO = 'L' or 'l' The matrix is lower triangular.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> TRANS - CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> TRANS = 'N' or 'n' x := A*x.
+*> TRANS = 'C' or 'c' x := A^H*x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> DIAG - CHARACTER*1
+*> On entry, DIAG specifies whether the diagonal blocks are
+*> assumed to be unit matrices, as follows:
+*> DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
+*> DIAG = 'N' or 'n' Diagonal blocks are non-unit.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> NRHS - INTEGER
+*> On entry, NRHS specifies the number of right hand sides,
+*> i.e., the number of vectors x to be multiplied by A.
+*> NRHS must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX array, dimension( N*(N+1)/2 )
+*> On entry, A contains a block diagonal matrix and the
+*> multipliers of the transformations used to obtain it,
+*> stored as a packed triangular matrix.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> IPIV - INTEGER array, dimension( N )
+*> On entry, IPIV contains the vector of pivot indices as
+*> determined by CSPTRF or CHPTRF.
+*> If IPIV( K ) = K, no interchange was done.
+*> If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
+*> changed with row IPIV( K ) and a 1 x 1 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> \endverbatim
+*> \verbatim
+*> B - COMPLEX array, dimension( LDB, NRHS )
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*> \verbatim
+*> LDB - INTEGER
+*> On entry, LDB contains the leading dimension of B as
+*> declared in the calling program. LDB must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> INFO is the error flag.
+*> On exit, a value of 0 indicates a successful exit.
+*> A negative value, say -K, indicates that the K-th argument
+*> has an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CLAVHP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,95 +156,6 @@
COMPLEX A( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAVHP performs one of the matrix-vector operations
-* x := A*x or x := A^H*x,
-* where x is an N element vector and A is one of the factors
-* from the symmetric factorization computed by CHPTRF.
-* CHPTRF produces a factorization of the form
-* U * D * U^H or L * D * L^H,
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U^H (or L^H) is the conjugate transpose of
-* U (or L), and D is Hermitian and block diagonal with 1 x 1 and
-* 2 x 2 diagonal blocks. The multipliers for the transformations
-* and the upper or lower triangular parts of the diagonal blocks
-* are stored columnwise in packed format in the linear array A.
-*
-* If TRANS = 'N' or 'n', CLAVHP multiplies either by U or U * D
-* (or L or L * D).
-* If TRANS = 'C' or 'c', CLAVHP multiplies either by U^H or D * U^H
-* (or L^H or D * L^H ).
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the triangular matrix
-* stored in A is upper or lower triangular.
-* UPLO = 'U' or 'u' The matrix is upper triangular.
-* UPLO = 'L' or 'l' The matrix is lower triangular.
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-* TRANS = 'N' or 'n' x := A*x.
-* TRANS = 'C' or 'c' x := A^H*x.
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1
-* On entry, DIAG specifies whether the diagonal blocks are
-* assumed to be unit matrices, as follows:
-* DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
-* DIAG = 'N' or 'n' Diagonal blocks are non-unit.
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* NRHS - INTEGER
-* On entry, NRHS specifies the number of right hand sides,
-* i.e., the number of vectors x to be multiplied by A.
-* NRHS must be at least zero.
-* Unchanged on exit.
-*
-* A - COMPLEX array, dimension( N*(N+1)/2 )
-* On entry, A contains a block diagonal matrix and the
-* multipliers of the transformations used to obtain it,
-* stored as a packed triangular matrix.
-* Unchanged on exit.
-*
-* IPIV - INTEGER array, dimension( N )
-* On entry, IPIV contains the vector of pivot indices as
-* determined by CSPTRF or CHPTRF.
-* If IPIV( K ) = K, no interchange was done.
-* If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
-* changed with row IPIV( K ) and a 1 x 1 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-*
-* B - COMPLEX array, dimension( LDB, NRHS )
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB - INTEGER
-* On entry, LDB contains the leading dimension of B as
-* declared in the calling program. LDB must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* INFO - INTEGER
-* INFO is the error flag.
-* On exit, a value of 0 indicates a successful exit.
-* A negative value, say -K, indicates that the K-th argument
-* has an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/clavsp.f b/TESTING/LIN/clavsp.f
index 1ac94030..77b90dea 100644
--- a/TESTING/LIN/clavsp.f
+++ b/TESTING/LIN/clavsp.f
@@ -1,9 +1,151 @@
+*> \brief \b CLAVSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAVSP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAVSP performs one of the matrix-vector operations
+*> x := A*x or x := A^T*x,
+*> where x is an N element vector and A is one of the factors
+*> from the symmetric factorization computed by CSPTRF.
+*> CSPTRF produces a factorization of the form
+*> U * D * U^T or L * D * L^T,
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U^T (or L^T) is the transpose of
+*> U (or L), and D is symmetric and block diagonal with 1 x 1 and
+*> 2 x 2 diagonal blocks. The multipliers for the transformations
+*> and the upper or lower triangular parts of the diagonal blocks
+*> are stored columnwise in packed format in the linear array A.
+*>
+*> If TRANS = 'N' or 'n', CLAVSP multiplies either by U or U * D
+*> (or L or L * D).
+*> If TRANS = 'C' or 'c', CLAVSP multiplies either by U^T or D * U^T
+*> (or L^T or D * L^T ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the triangular matrix
+*> stored in A is upper or lower triangular.
+*> UPLO = 'U' or 'u' The matrix is upper triangular.
+*> UPLO = 'L' or 'l' The matrix is lower triangular.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> TRANS - CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> TRANS = 'N' or 'n' x := A*x.
+*> TRANS = 'T' or 't' x := A^T*x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> DIAG - CHARACTER*1
+*> On entry, DIAG specifies whether the diagonal blocks are
+*> assumed to be unit matrices, as follows:
+*> DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
+*> DIAG = 'N' or 'n' Diagonal blocks are non-unit.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> NRHS - INTEGER
+*> On entry, NRHS specifies the number of right hand sides,
+*> i.e., the number of vectors x to be multiplied by A.
+*> NRHS must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX array, dimension( N*(N+1)/2 )
+*> On entry, A contains a block diagonal matrix and the
+*> multipliers of the transformations used to obtain it,
+*> stored as a packed triangular matrix.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> IPIV - INTEGER array, dimension( N )
+*> On entry, IPIV contains the vector of pivot indices as
+*> determined by CSPTRF.
+*> If IPIV( K ) = K, no interchange was done.
+*> If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
+*> changed with row IPIV( K ) and a 1 x 1 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> \endverbatim
+*> \verbatim
+*> B - COMPLEX array, dimension( LDB, NRHS )
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*> \verbatim
+*> LDB - INTEGER
+*> On entry, LDB contains the leading dimension of B as
+*> declared in the calling program. LDB must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> INFO is the error flag.
+*> On exit, a value of 0 indicates a successful exit.
+*> A negative value, say -K, indicates that the K-th argument
+*> has an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CLAVSP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,95 +156,6 @@
COMPLEX A( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAVSP performs one of the matrix-vector operations
-* x := A*x or x := A^T*x,
-* where x is an N element vector and A is one of the factors
-* from the symmetric factorization computed by CSPTRF.
-* CSPTRF produces a factorization of the form
-* U * D * U^T or L * D * L^T,
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U^T (or L^T) is the transpose of
-* U (or L), and D is symmetric and block diagonal with 1 x 1 and
-* 2 x 2 diagonal blocks. The multipliers for the transformations
-* and the upper or lower triangular parts of the diagonal blocks
-* are stored columnwise in packed format in the linear array A.
-*
-* If TRANS = 'N' or 'n', CLAVSP multiplies either by U or U * D
-* (or L or L * D).
-* If TRANS = 'C' or 'c', CLAVSP multiplies either by U^T or D * U^T
-* (or L^T or D * L^T ).
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the triangular matrix
-* stored in A is upper or lower triangular.
-* UPLO = 'U' or 'u' The matrix is upper triangular.
-* UPLO = 'L' or 'l' The matrix is lower triangular.
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-* TRANS = 'N' or 'n' x := A*x.
-* TRANS = 'T' or 't' x := A^T*x.
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1
-* On entry, DIAG specifies whether the diagonal blocks are
-* assumed to be unit matrices, as follows:
-* DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
-* DIAG = 'N' or 'n' Diagonal blocks are non-unit.
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* NRHS - INTEGER
-* On entry, NRHS specifies the number of right hand sides,
-* i.e., the number of vectors x to be multiplied by A.
-* NRHS must be at least zero.
-* Unchanged on exit.
-*
-* A - COMPLEX array, dimension( N*(N+1)/2 )
-* On entry, A contains a block diagonal matrix and the
-* multipliers of the transformations used to obtain it,
-* stored as a packed triangular matrix.
-* Unchanged on exit.
-*
-* IPIV - INTEGER array, dimension( N )
-* On entry, IPIV contains the vector of pivot indices as
-* determined by CSPTRF.
-* If IPIV( K ) = K, no interchange was done.
-* If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
-* changed with row IPIV( K ) and a 1 x 1 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-*
-* B - COMPLEX array, dimension( LDB, NRHS )
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB - INTEGER
-* On entry, LDB contains the leading dimension of B as
-* declared in the calling program. LDB must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* INFO - INTEGER
-* INFO is the error flag.
-* On exit, a value of 0 indicates a successful exit.
-* A negative value, say -K, indicates that the K-th argument
-* has an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/clavsy.f b/TESTING/LIN/clavsy.f
index cdd78987..24096177 100644
--- a/TESTING/LIN/clavsy.f
+++ b/TESTING/LIN/clavsy.f
@@ -1,9 +1,159 @@
+*> \brief \b CLAVSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAVSY performs one of the matrix-vector operations
+*> x := A*x or x := A'*x,
+*> where x is an N element vector and A is one of the factors
+*> from the symmetric factorization computed by CSYTRF.
+*> CSYTRF produces a factorization of the form
+*> U * D * U' or L * D * L' ,
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U' (or L') is the transpose of
+*> U (or L), and D is symmetric and block diagonal with 1 x 1 and
+*> 2 x 2 diagonal blocks. The multipliers for the transformations
+*> and the upper or lower triangular parts of the diagonal blocks
+*> are stored in the leading upper or lower triangle of the 2-D
+*> array A.
+*>
+*> If TRANS = 'N' or 'n', CLAVSY multiplies either by U or U * D
+*> (or L or L * D).
+*> If TRANS = 'T' or 't', CLAVSY multiplies either by U' or D * U'
+*> (or L' or D * L' ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the triangular matrix
+*> stored in A is upper or lower triangular.
+*> UPLO = 'U' or 'u' The matrix is upper triangular.
+*> UPLO = 'L' or 'l' The matrix is lower triangular.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> TRANS - CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> TRANS = 'N' or 'n' x := A*x.
+*> TRANS = 'T' or 't' x := A'*x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> DIAG - CHARACTER*1
+*> On entry, DIAG specifies whether the diagonal blocks are
+*> assumed to be unit matrices:
+*> DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
+*> DIAG = 'N' or 'n' Diagonal blocks are non-unit.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> NRHS - INTEGER
+*> On entry, NRHS specifies the number of right hand sides,
+*> i.e., the number of vectors x to be multiplied by A.
+*> NRHS must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX array, dimension( LDA, N )
+*> On entry, A contains a block diagonal matrix and the
+*> multipliers of the transformations used to obtain it,
+*> stored as a 2-D triangular matrix.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling ( sub ) program. LDA must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> IPIV - INTEGER array, dimension( N )
+*> On entry, IPIV contains the vector of pivot indices as
+*> determined by CSYTRF or CHETRF.
+*> If IPIV( K ) = K, no interchange was done.
+*> If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
+*> changed with row IPIV( K ) and a 1 x 1 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> \endverbatim
+*> \verbatim
+*> B - COMPLEX array, dimension( LDB, NRHS )
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*> \verbatim
+*> LDB - INTEGER
+*> On entry, LDB contains the leading dimension of B as
+*> declared in the calling program. LDB must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> INFO is the error flag.
+*> On exit, a value of 0 indicates a successful exit.
+*> A negative value, say -K, indicates that the K-th argument
+*> has an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
$ LDB, INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,102 +164,6 @@
COMPLEX A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* CLAVSY performs one of the matrix-vector operations
-* x := A*x or x := A'*x,
-* where x is an N element vector and A is one of the factors
-* from the symmetric factorization computed by CSYTRF.
-* CSYTRF produces a factorization of the form
-* U * D * U' or L * D * L' ,
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U' (or L') is the transpose of
-* U (or L), and D is symmetric and block diagonal with 1 x 1 and
-* 2 x 2 diagonal blocks. The multipliers for the transformations
-* and the upper or lower triangular parts of the diagonal blocks
-* are stored in the leading upper or lower triangle of the 2-D
-* array A.
-*
-* If TRANS = 'N' or 'n', CLAVSY multiplies either by U or U * D
-* (or L or L * D).
-* If TRANS = 'T' or 't', CLAVSY multiplies either by U' or D * U'
-* (or L' or D * L' ).
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the triangular matrix
-* stored in A is upper or lower triangular.
-* UPLO = 'U' or 'u' The matrix is upper triangular.
-* UPLO = 'L' or 'l' The matrix is lower triangular.
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-* TRANS = 'N' or 'n' x := A*x.
-* TRANS = 'T' or 't' x := A'*x.
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1
-* On entry, DIAG specifies whether the diagonal blocks are
-* assumed to be unit matrices:
-* DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
-* DIAG = 'N' or 'n' Diagonal blocks are non-unit.
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* NRHS - INTEGER
-* On entry, NRHS specifies the number of right hand sides,
-* i.e., the number of vectors x to be multiplied by A.
-* NRHS must be at least zero.
-* Unchanged on exit.
-*
-* A - COMPLEX array, dimension( LDA, N )
-* On entry, A contains a block diagonal matrix and the
-* multipliers of the transformations used to obtain it,
-* stored as a 2-D triangular matrix.
-* Unchanged on exit.
-*
-* LDA - INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling ( sub ) program. LDA must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* IPIV - INTEGER array, dimension( N )
-* On entry, IPIV contains the vector of pivot indices as
-* determined by CSYTRF or CHETRF.
-* If IPIV( K ) = K, no interchange was done.
-* If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
-* changed with row IPIV( K ) and a 1 x 1 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-*
-* B - COMPLEX array, dimension( LDB, NRHS )
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB - INTEGER
-* On entry, LDB contains the leading dimension of B as
-* declared in the calling program. LDB must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* INFO - INTEGER
-* INFO is the error flag.
-* On exit, a value of 0 indicates a successful exit.
-* A negative value, say -K, indicates that the K-th argument
-* has an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/clqt01.f b/TESTING/LIN/clqt01.f
index 6997a24a..abeeb2e4 100644
--- a/TESTING/LIN/clqt01.f
+++ b/TESTING/LIN/clqt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE CLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CLQT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CLQT01 tests CGELQF, which computes the LQ factorization of an m-by-n
-* matrix A, and partially tests CUNGLQ which forms the n-by-n
-* orthogonal matrix Q.
-*
-* CLQT01 compares L with A*Q', and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLQT01 tests CGELQF, which computes the LQ factorization of an m-by-n
+*> matrix A, and partially tests CUNGLQ which forms the n-by-n
+*> orthogonal matrix Q.
+*>
+*> CLQT01 compares L with A*Q', and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX array, dimension (LDA,N)
-* Details of the LQ factorization of A, as returned by CGELQF.
-* See CGELQF for further details.
-*
-* Q (output) COMPLEX array, dimension (LDA,N)
-* The n-by-n orthogonal matrix Q.
-*
-* L (workspace) COMPLEX array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the LQ factorization of A, as returned by CGELQF.
+*> See CGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> The n-by-n orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by CGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by CGELQF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (max(M,N))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/clqt02.f b/TESTING/LIN/clqt02.f
index 57000311..c2ccbdff 100644
--- a/TESTING/LIN/clqt02.f
+++ b/TESTING/LIN/clqt02.f
@@ -1,74 +1,155 @@
- SUBROUTINE CLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CLQT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CLQT02 tests CUNGLQ, which generates an m-by-n matrix Q with
-* orthonornmal rows that is defined as the product of k elementary
-* reflectors.
-*
-* Given the LQ factorization of an m-by-n matrix A, CLQT02 generates
-* the orthogonal matrix Q defined by the factorization of the first k
-* rows of A; it compares L(1:k,1:m) with A(1:k,1:n)*Q(1:m,1:n)', and
-* checks that the rows of Q are orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLQT02 tests CUNGLQ, which generates an m-by-n matrix Q with
+*> orthonornmal rows that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the LQ factorization of an m-by-n matrix A, CLQT02 generates
+*> the orthogonal matrix Q defined by the factorization of the first k
+*> rows of A; it compares L(1:k,1:m) with A(1:k,1:n)*Q(1:m,1:n)', and
+*> checks that the rows of Q are orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* N >= M >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by CLQT01.
-*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* Details of the LQ factorization of A, as returned by CGELQF.
-* See CGELQF for further details.
-*
-* Q (workspace) COMPLEX array, dimension (LDA,N)
-*
-* L (workspace) COMPLEX array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by CLQT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the LQ factorization of A, as returned by CGELQF.
+*> See CGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the LQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (M)
-* The scalar factors of the elementary reflectors corresponding
-* to the LQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/clqt03.f b/TESTING/LIN/clqt03.f
index e8f811b2..6c8ec356 100644
--- a/TESTING/LIN/clqt03.f
+++ b/TESTING/LIN/clqt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE CLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CLQT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CLQT03 tests CUNMLQ, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* CLQT03 compares the results of a call to CUNMLQ with the results of
-* forming Q explicitly by a call to CUNGLQ and then performing matrix
-* multiplication by a call to CGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLQT03 tests CUNMLQ, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> CLQT03 compares the results of a call to CUNMLQ with the results of
+*> forming Q explicitly by a call to CUNGLQ and then performing matrix
+*> multiplication by a call to CGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows or columns of the matrix C; C is n-by-m if
-* Q is applied from the left, or m-by-n if Q is applied from
-* the right. M >= 0.
-*
-* N (input) INTEGER
-* The order of the orthogonal matrix Q. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. N >= K >= 0.
-*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* Details of the LQ factorization of an m-by-n matrix, as
-* returned by CGELQF. See CGELQF for further details.
-*
-* C (workspace) COMPLEX array, dimension (LDA,N)
-*
-* CC (workspace) COMPLEX array, dimension (LDA,N)
-*
-* Q (workspace) COMPLEX array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows or columns of the matrix C; C is n-by-m if
+*> Q is applied from the left, or m-by-n if Q is applied from
+*> the right. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the orthogonal matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the LQ factorization of an m-by-n matrix, as
+*> returned by CGELQF. See CGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the LQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an n-by-n orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the LQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE CLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an n-by-n orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cpbt01.f b/TESTING/LIN/cpbt01.f
index fdfe206c..3fcf08f9 100644
--- a/TESTING/LIN/cpbt01.f
+++ b/TESTING/LIN/cpbt01.f
@@ -1,9 +1,131 @@
+*> \brief \b CPBT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDA, LDAFAC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBT01 reconstructs a Hermitian positive definite band matrix A from
+*> its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of
+*> L, and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original Hermitian band matrix A. If UPLO = 'U', the
+*> upper triangular part of A is stored as a band matrix; if
+*> UPLO = 'L', the lower triangular part of A is stored. The
+*> columns of the appropriate triangle are stored in the columns
+*> of A and the diagonals of the triangle are stored in the rows
+*> of A. See CPBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the factor
+*> L or U from the L*L' or U'*U factorization in band storage
+*> format, as computed by CPBTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC.
+*> LDAFAC >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,58 +137,6 @@
COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
* ..
*
-* Purpose
-* =======
-*
-* CPBT01 reconstructs a Hermitian positive definite band matrix A from
-* its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of
-* L, and U' is the conjugate transpose of U.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original Hermitian band matrix A. If UPLO = 'U', the
-* upper triangular part of A is stored as a band matrix; if
-* UPLO = 'L', the lower triangular part of A is stored. The
-* columns of the appropriate triangle are stored in the columns
-* of A and the diagonals of the triangle are stored in the rows
-* of A. See CPBTRF for further details.
-*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KD+1).
-*
-* AFAC (input) COMPLEX array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the factor
-* L or U from the L*L' or U'*U factorization in band storage
-* format, as computed by CPBTRF.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC.
-* LDAFAC >= max(1,KD+1).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
*
diff --git a/TESTING/LIN/cpbt02.f b/TESTING/LIN/cpbt02.f
index 76761b09..0e3b3445 100644
--- a/TESTING/LIN/cpbt02.f
+++ b/TESTING/LIN/cpbt02.f
@@ -1,9 +1,141 @@
+*> \brief \b CPBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBT02( UPLO, N, KD, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDA, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBT02 computes the residual for a solution of a Hermitian banded
+*> system of equations A*x = b:
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS)
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original Hermitian band matrix A. If UPLO = 'U', the
+*> upper triangular part of A is stored as a band matrix; if
+*> UPLO = 'L', the lower triangular part of A is stored. The
+*> columns of the appropriate triangle are stored in the columns
+*> of A and the diagonals of the triangle are stored in the rows
+*> of A. See CPBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPBT02( UPLO, N, KD, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,62 +147,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPBT02 computes the residual for a solution of a Hermitian banded
-* system of equations A*x = b:
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS)
-* where EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original Hermitian band matrix A. If UPLO = 'U', the
-* upper triangular part of A is stored as a band matrix; if
-* UPLO = 'L', the lower triangular part of A is stored. The
-* columns of the appropriate triangle are stored in the columns
-* of A and the diagonals of the triangle are stored in the rows
-* of A. See CPBTRF for further details.
-*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KD+1).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cpbt05.f b/TESTING/LIN/cpbt05.f
index 8ff1dde7..10a91a70 100644
--- a/TESTING/LIN/cpbt05.f
+++ b/TESTING/LIN/cpbt05.f
@@ -1,9 +1,182 @@
+*> \brief \b CPBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPBT05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> Hermitian band matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangle of the Hermitian band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPBT05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,91 +188,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CPBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* Hermitian band matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangle of the Hermitian band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cpot01.f b/TESTING/LIN/cpot01.f
index be10a60b..d2f7835a 100644
--- a/TESTING/LIN/cpot01.f
+++ b/TESTING/LIN/cpot01.f
@@ -1,61 +1,127 @@
- SUBROUTINE CPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
+*> \brief \b CPOT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDAFAC, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
+* ..
+*
* Purpose
* =======
*
-* CPOT01 reconstructs a Hermitian positive definite matrix A from
-* its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of L,
-* and U' is the conjugate transpose of U.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOT01 reconstructs a Hermitian positive definite matrix A from
+*> its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of L,
+*> and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (LDAFAC,N)
+*> On entry, the factor L or U from the L*L' or U'*U
+*> factorization of A.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*L' - A (or U'*U - A).
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original Hermitian matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
+*> \date November 2011
*
-* AFAC (input/output) COMPLEX array, dimension (LDAFAC,N)
-* On entry, the factor L or U from the L*L' or U'*U
-* factorization of A.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*L' - A (or U'*U - A).
+*> \ingroup complex_lin
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+* =====================================================================
+ SUBROUTINE CPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDAFAC, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cpot02.f b/TESTING/LIN/cpot02.f
index 99820341..91ed1b0f 100644
--- a/TESTING/LIN/cpot02.f
+++ b/TESTING/LIN/cpot02.f
@@ -1,9 +1,138 @@
+*> \brief \b CPOT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOT02 computes the residual for the solution of a Hermitian system
+*> of linear equations A*x = b:
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*>
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPOT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,59 +144,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOT02 computes the residual for the solution of a Hermitian system
-* of linear equations A*x = b:
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-*
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cpot03.f b/TESTING/LIN/cpot03.f
index fee45267..4793394b 100644
--- a/TESTING/LIN/cpot03.f
+++ b/TESTING/LIN/cpot03.f
@@ -1,9 +1,137 @@
+*> \brief \b CPOT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
+* RWORK, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAINV, LDWORK, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AINV( LDAINV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOT03 computes the residual for a Hermitian matrix times its
+*> inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (LDAINV,N)
+*> On entry, the inverse of the matrix A, stored as a Hermitian
+*> matrix in the same format as A.
+*> In this version, AINV is expanded into a full matrix and
+*> multiplied by A, so the opposing triangle of AINV will be
+*> changed; i.e., if the upper triangular part of AINV is
+*> stored, the lower triangular part will be used as work space.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
$ RWORK, RCOND, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,57 +144,6 @@
$ WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOT03 computes the residual for a Hermitian matrix times its
-* inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AINV (input/output) COMPLEX array, dimension (LDAINV,N)
-* On entry, the inverse of the matrix A, stored as a Hermitian
-* matrix in the same format as A.
-* In this version, AINV is expanded into a full matrix and
-* multiplied by A, so the opposing triangle of AINV will be
-* changed; i.e., if the upper triangular part of AINV is
-* stored, the lower triangular part will be used as work space.
-*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,N)
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
-*
-* RESID (output) REAL
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cpot05.f b/TESTING/LIN/cpot05.f
index f7cf0a26..b54a2e6f 100644
--- a/TESTING/LIN/cpot05.f
+++ b/TESTING/LIN/cpot05.f
@@ -1,9 +1,176 @@
+*> \brief \b CPOT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPOT05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPOT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> Hermitian n by n matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The Hermitian matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPOT05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,88 +182,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CPOT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* Hermitian n by n matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The Hermitian matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cppt01.f b/TESTING/LIN/cppt01.f
index 26f432be..0b7e1915 100644
--- a/TESTING/LIN/cppt01.f
+++ b/TESTING/LIN/cppt01.f
@@ -1,56 +1,116 @@
- SUBROUTINE CPPT01( UPLO, N, A, AFAC, RWORK, RESID )
+*> \brief \b CPPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX A( * ), AFAC( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPT01( UPLO, N, A, AFAC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * )
+* ..
+*
* Purpose
* =======
*
-* CPPT01 reconstructs a Hermitian positive definite packed matrix A
-* from its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of
-* L, and U' is the conjugate transpose of U.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPT01 reconstructs a Hermitian positive definite packed matrix A
+*> from its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of
+*> L, and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (N*(N+1)/2)
+*> The original Hermitian matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the factor L or U from the L*L' or U'*U
+*> factorization of A, stored as a packed triangular matrix.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*L' - A (or U'*U - A).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+*> \date November 2011
*
-* A (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original Hermitian matrix A, stored as a packed
-* triangular matrix.
+*> \ingroup complex_lin
*
-* AFAC (input/output) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the factor L or U from the L*L' or U'*U
-* factorization of A, stored as a packed triangular matrix.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*L' - A (or U'*U - A).
+* =====================================================================
+ SUBROUTINE CPPT01( UPLO, N, A, AFAC, RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX A( * ), AFAC( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cppt02.f b/TESTING/LIN/cppt02.f
index 0497d4c0..3c1e0ad2 100644
--- a/TESTING/LIN/cppt02.f
+++ b/TESTING/LIN/cppt02.f
@@ -1,9 +1,134 @@
+*> \brief \b CPPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPT02 computes the residual in the solution of a Hermitian system
+*> of linear equations A*x = b when packed storage is used for the
+*> coefficient matrix. The ratio computed is
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS),
+*>
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (N*(N+1)/2)
+*> The original Hermitian matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,58 +140,6 @@
COMPLEX A( * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CPPT02 computes the residual in the solution of a Hermitian system
-* of linear equations A*x = b when packed storage is used for the
-* coefficient matrix. The ratio computed is
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS),
-*
-* where EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original Hermitian matrix A, stored as a packed
-* triangular matrix.
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cppt03.f b/TESTING/LIN/cppt03.f
index bc61a4e9..257d03dc 100644
--- a/TESTING/LIN/cppt03.f
+++ b/TESTING/LIN/cppt03.f
@@ -1,61 +1,131 @@
- SUBROUTINE CPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
- $ RESID )
+*> \brief \b CPPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDWORK, N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX A( * ), AINV( * ), WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDWORK, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( * ), AINV( * ), WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* CPPT03 computes the residual for a Hermitian packed matrix times its
-* inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPT03 computes the residual for a Hermitian packed matrix times its
+*> inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original Hermitian matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (N*(N+1)/2)
+*> The original Hermitian matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (N*(N+1)/2)
+*> The (Hermitian) inverse of the matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AINV (input) COMPLEX array, dimension (N*(N+1)/2)
-* The (Hermitian) inverse of the matrix A, stored as a packed
-* triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup complex_lin
*
-* RWORK (workspace) REAL array, dimension (N)
+* =====================================================================
+ SUBROUTINE CPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
+ $ RESID )
*
-* RCOND (output) REAL
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDWORK, N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX A( * ), AINV( * ), WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cppt05.f b/TESTING/LIN/cppt05.f
index 8cf00f29..cf2e605f 100644
--- a/TESTING/LIN/cppt05.f
+++ b/TESTING/LIN/cppt05.f
@@ -1,9 +1,168 @@
+*> \brief \b CPPT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPPT05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX AP( * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPPT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> Hermitian matrix in packed storage format.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPPT05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,83 +174,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CPPT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* Hermitian matrix in packed storage format.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cpst01.f b/TESTING/LIN/cpst01.f
index 70891d92..5ffe51b3 100644
--- a/TESTING/LIN/cpst01.f
+++ b/TESTING/LIN/cpst01.f
@@ -1,9 +1,141 @@
+*> \brief \b CPST01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPST01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
+* PIV, RWORK, RESID, RANK )
+*
+* .. Scalar Arguments ..
+* REAL RESID
+* INTEGER LDA, LDAFAC, LDPERM, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AFAC( LDAFAC, * ),
+* $ PERM( LDPERM, * )
+* REAL RWORK( * )
+* INTEGER PIV( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPST01 reconstructs an Hermitian positive semidefinite matrix A
+*> from its L or U factors and the permutation matrix P and computes
+*> the residual
+*> norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
+*> norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of L,
+*> and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (LDAFAC,N)
+*> The factor L or U from the L*L' or U'*U
+*> factorization of A.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is COMPLEX array, dimension (LDPERM,N)
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference P*L*L'*P' - A (or P*U'*U*P' - A)
+*> \endverbatim
+*>
+*> \param[in] LDPERM
+*> \verbatim
+*> LDPERM is INTEGER
+*> The leading dimension of the array PERM.
+*> LDAPERM >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are
+*> P( PIV( K ), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CPST01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
$ PIV, RWORK, RESID, RANK )
*
* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL RESID
@@ -17,60 +149,6 @@
INTEGER PIV( * )
* ..
*
-* Purpose
-* =======
-*
-* CPST01 reconstructs an Hermitian positive semidefinite matrix A
-* from its L or U factors and the permutation matrix P and computes
-* the residual
-* norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
-* norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of L,
-* and U' is the conjugate transpose of U.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) COMPLEX array, dimension (LDAFAC,N)
-* The factor L or U from the L*L' or U'*U
-* factorization of A.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* PERM (output) COMPLEX array, dimension (LDPERM,N)
-* Overwritten with the reconstructed matrix, and then with the
-* difference P*L*L'*P' - A (or P*U'*U*P' - A)
-*
-* LDPERM (input) INTEGER
-* The leading dimension of the array PERM.
-* LDAPERM >= max(1,N).
-*
-* PIV (input) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are
-* P( PIV( K ), K ) = 1.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cptt01.f b/TESTING/LIN/cptt01.f
index 25732016..70375bbc 100644
--- a/TESTING/LIN/cptt01.f
+++ b/TESTING/LIN/cptt01.f
@@ -1,50 +1,112 @@
- SUBROUTINE CPTT01( N, D, E, DF, EF, WORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL D( * ), DF( * )
- COMPLEX E( * ), EF( * ), WORK( * )
-* ..
-*
+*> \brief \b CPTT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTT01( N, D, E, DF, EF, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL D( * ), DF( * )
+* COMPLEX E( * ), EF( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CPTT01 reconstructs a tridiagonal matrix A from its L*D*L'
-* factorization and computes the residual
-* norm(L*D*L' - A) / ( n * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTT01 reconstructs a tridiagonal matrix A from its L*D*L'
+*> factorization and computes the residual
+*> norm(L*D*L' - A) / ( n * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGTER
-* The order of the matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is REAL array, dimension (N)
+*> The n diagonal elements of the factor L from the L*D*L'
+*> factorization of A.
+*> \endverbatim
+*>
+*> \param[in] EF
+*> \verbatim
+*> EF is COMPLEX array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the factor L from the
+*> L*D*L' factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(L*D*L' - A) / (n * norm(A) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input) COMPLEX array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \date November 2011
*
-* DF (input) REAL array, dimension (N)
-* The n diagonal elements of the factor L from the L*D*L'
-* factorization of A.
+*> \ingroup complex_lin
*
-* EF (input) COMPLEX array, dimension (N-1)
-* The (n-1) subdiagonal elements of the factor L from the
-* L*D*L' factorization of A.
+* =====================================================================
+ SUBROUTINE CPTT01( N, D, E, DF, EF, WORK, RESID )
*
-* WORK (workspace) COMPLEX array, dimension (2*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(L*D*L' - A) / (n * norm(A) * EPS)
+* .. Scalar Arguments ..
+ INTEGER N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL D( * ), DF( * )
+ COMPLEX E( * ), EF( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cptt02.f b/TESTING/LIN/cptt02.f
index 020b1ffe..4fb6b749 100644
--- a/TESTING/LIN/cptt02.f
+++ b/TESTING/LIN/cptt02.f
@@ -1,64 +1,136 @@
- SUBROUTINE CPTT02( UPLO, N, NRHS, D, E, X, LDX, B, LDB, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDB, LDX, N, NRHS
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL D( * )
- COMPLEX B( LDB, * ), E( * ), X( LDX, * )
-* ..
-*
+*> \brief \b CPTT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTT02( UPLO, N, NRHS, D, E, X, LDX, B, LDB, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* COMPLEX B( LDB, * ), E( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* CPTT02 computes the residual for the solution to a symmetric
-* tridiagonal system of equations:
-* RESID = norm(B - A*X) / (norm(A) * norm(X) * EPS),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTT02 computes the residual for the solution to a symmetric
+*> tridiagonal system of equations:
+*> RESID = norm(B - A*X) / (norm(A) * norm(X) * EPS),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the superdiagonal or the subdiagonal of the
-* tridiagonal matrix A is stored.
-* = 'U': E is the superdiagonal of A
-* = 'L': E is the subdiagonal of A
-*
-* N (input) INTEGTER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the superdiagonal or the subdiagonal of the
+*> tridiagonal matrix A is stored.
+*> = 'U': E is the superdiagonal of A
+*> = 'L': E is the subdiagonal of A
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The n by nrhs matrix of solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the n by nrhs matrix of right hand side vectors B.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(B - A*X) / (norm(A) * norm(X) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) COMPLEX array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The n by nrhs matrix of solution vectors X.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \ingroup complex_lin
*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the n by nrhs matrix of right hand side vectors B.
-* On exit, B is overwritten with the difference B - A*X.
+* =====================================================================
+ SUBROUTINE CPTT02( UPLO, N, NRHS, D, E, X, LDX, B, LDB, RESID )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(B - A*X) / (norm(A) * norm(X) * EPS)
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDB, LDX, N, NRHS
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL D( * )
+ COMPLEX B( LDB, * ), E( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cptt05.f b/TESTING/LIN/cptt05.f
index 434b18c7..0004ab3b 100644
--- a/TESTING/LIN/cptt05.f
+++ b/TESTING/LIN/cptt05.f
@@ -1,89 +1,170 @@
- SUBROUTINE CPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
- $ FERR, BERR, RESLTS )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDX, LDXACT, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL BERR( * ), D( * ), FERR( * ), RESLTS( * )
- COMPLEX B( LDB, * ), E( * ), X( LDX, * ),
- $ XACT( LDXACT, * )
-* ..
-*
+*> \brief \b CPTT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
+* FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), D( * ), FERR( * ), RESLTS( * )
+* COMPLEX B( LDB, * ), E( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
* Purpose
* =======
*
-* CPTT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* Hermitian tridiagonal matrix of order n.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CPTT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> Hermitian tridiagonal matrix of order n.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) COMPLEX array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
+*> \date November 2011
*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \ingroup complex_lin
*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
+* =====================================================================
+ SUBROUTINE CPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
+ $ FERR, BERR, RESLTS )
*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
+* .. Scalar Arguments ..
+ INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL BERR( * ), D( * ), FERR( * ), RESLTS( * )
+ COMPLEX B( LDB, * ), E( * ), X( LDX, * ),
+ $ XACT( LDXACT, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqlt01.f b/TESTING/LIN/cqlt01.f
index 6bfc60fb..78873f6d 100644
--- a/TESTING/LIN/cqlt01.f
+++ b/TESTING/LIN/cqlt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE CQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CQLT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQLT01 tests CGEQLF, which computes the QL factorization of an m-by-n
-* matrix A, and partially tests CUNGQL which forms the m-by-m
-* orthogonal matrix Q.
-*
-* CQLT01 compares L with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQLT01 tests CGEQLF, which computes the QL factorization of an m-by-n
+*> matrix A, and partially tests CUNGQL which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> CQLT01 compares L with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX array, dimension (LDA,N)
-* Details of the QL factorization of A, as returned by CGEQLF.
-* See CGEQLF for further details.
-*
-* Q (output) COMPLEX array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* L (workspace) COMPLEX array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the QL factorization of A, as returned by CGEQLF.
+*> See CGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by CGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by CGEQLF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqlt02.f b/TESTING/LIN/cqlt02.f
index 7fb03aaa..68b8e8aa 100644
--- a/TESTING/LIN/cqlt02.f
+++ b/TESTING/LIN/cqlt02.f
@@ -1,75 +1,156 @@
- SUBROUTINE CQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CQLT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQLT02 tests CUNGQL, which generates an m-by-n matrix Q with
-* orthonornmal columns that is defined as the product of k elementary
-* reflectors.
-*
-* Given the QL factorization of an m-by-n matrix A, CQLT02 generates
-* the orthogonal matrix Q defined by the factorization of the last k
-* columns of A; it compares L(m-n+1:m,n-k+1:n) with
-* Q(1:m,m-n+1:m)'*A(1:m,n-k+1:n), and checks that the columns of Q are
-* orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQLT02 tests CUNGQL, which generates an m-by-n matrix Q with
+*> orthonornmal columns that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the QL factorization of an m-by-n matrix A, CQLT02 generates
+*> the orthogonal matrix Q defined by the factorization of the last k
+*> columns of A; it compares L(m-n+1:m,n-k+1:n) with
+*> Q(1:m,m-n+1:m)'*A(1:m,n-k+1:n), and checks that the columns of Q are
+*> orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by CQLT01.
-*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* Details of the QL factorization of A, as returned by CGEQLF.
-* See CGEQLF for further details.
-*
-* Q (workspace) COMPLEX array, dimension (LDA,N)
-*
-* L (workspace) COMPLEX array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by CQLT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the QL factorization of A, as returned by CGEQLF.
+*> See CGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QL factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (N)
-* The scalar factors of the elementary reflectors corresponding
-* to the QL factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqlt03.f b/TESTING/LIN/cqlt03.f
index 01e7a69d..162601b3 100644
--- a/TESTING/LIN/cqlt03.f
+++ b/TESTING/LIN/cqlt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE CQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CQLT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQLT03 tests CUNMQL, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* CQLT03 compares the results of a call to CUNMQL with the results of
-* forming Q explicitly by a call to CUNGQL and then performing matrix
-* multiplication by a call to CGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQLT03 tests CUNMQL, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> CQLT03 compares the results of a call to CUNMQL with the results of
+*> forming Q explicitly by a call to CUNGQL and then performing matrix
+*> multiplication by a call to CGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The order of the orthogonal matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of rows or columns of the matrix C; C is m-by-n if
-* Q is applied from the left, or n-by-m if Q is applied from
-* the right. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. M >= K >= 0.
-*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* Details of the QL factorization of an m-by-n matrix, as
-* returned by CGEQLF. See CGEQLF for further details.
-*
-* C (workspace) COMPLEX array, dimension (LDA,N)
-*
-* CC (workspace) COMPLEX array, dimension (LDA,N)
-*
-* Q (workspace) COMPLEX array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the orthogonal matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows or columns of the matrix C; C is m-by-n if
+*> Q is applied from the left, or n-by-m if Q is applied from
+*> the right. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the QL factorization of an m-by-n matrix, as
+*> returned by CGEQLF. See CGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QL factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an m-by-m orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the QL factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE CQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an m-by-m orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqpt01.f b/TESTING/LIN/cqpt01.f
index 613d2824..30b44745 100644
--- a/TESTING/LIN/cqpt01.f
+++ b/TESTING/LIN/cqpt01.f
@@ -1,68 +1,140 @@
- REAL FUNCTION CQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
- $ WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b CQPT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
+* WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQPT01 tests the QR-factorization with pivoting of a matrix A. The
-* array AF contains the (possibly partial) QR-factorization of A, where
-* the upper triangle of AF(1:k,1:k) is a partial triangular factor,
-* the entries below the diagonal in the first k columns are the
-* Householder vectors, and the rest of AF contains a partially updated
-* matrix.
-*
-* This function returns ||A*P - Q*R||/(||norm(A)||*eps*M)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQPT01 tests the QR-factorization with pivoting of a matrix A. The
+*> array AF contains the (possibly partial) QR-factorization of A, where
+*> the upper triangle of AF(1:k,1:k) is a partial triangular factor,
+*> the entries below the diagonal in the first k columns are the
+*> Householder vectors, and the rest of AF contains a partially updated
+*> matrix.
+*>
+*> This function returns ||A*P - Q*R||/(||norm(A)||*eps*M)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
-*
-* K (input) INTEGER
-* The number of columns of AF that have been reduced
-* to upper triangular form.
-*
-* A (input) COMPLEX array, dimension (LDA, N)
-* The original matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of columns of AF that have been reduced
+*> to upper triangular form.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The original matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> The (possibly partial) output of CGEQPF. The upper triangle
+*> of AF(1:k,1:k) is a partial triangular factor, the entries
+*> below the diagonal in the first k columns are the Householder
+*> vectors, and the rest of AF contains a partially updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> Details of the Householder transformations as returned by
+*> CGEQPF.
+*> \endverbatim
+*>
+*> \param[in] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> Pivot information as returned by CGEQPF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*N+N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* The (possibly partial) output of CGEQPF. The upper triangle
-* of AF(1:k,1:k) is a partial triangular factor, the entries
-* below the diagonal in the first k columns are the Householder
-* vectors, and the rest of AF contains a partially updated
-* matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \date November 2011
*
-* TAU (input) COMPLEX array, dimension (K)
-* Details of the Householder transformations as returned by
-* CGEQPF.
+*> \ingroup complex_lin
*
-* JPVT (input) INTEGER array, dimension (N)
-* Pivot information as returned by CGEQPF.
+* =====================================================================
+ REAL FUNCTION CQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
+ $ WORK, LWORK )
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*N+N.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt01.f b/TESTING/LIN/cqrt01.f
index e940a7db..79e0f45a 100644
--- a/TESTING/LIN/cqrt01.f
+++ b/TESTING/LIN/cqrt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE CQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CQRT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQRT01 tests CGEQRF, which computes the QR factorization of an m-by-n
-* matrix A, and partially tests CUNGQR which forms the m-by-m
-* orthogonal matrix Q.
-*
-* CQRT01 compares R with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT01 tests CGEQRF, which computes the QR factorization of an m-by-n
+*> matrix A, and partially tests CUNGQR which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> CQRT01 compares R with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by CGEQRF.
-* See CGEQRF for further details.
-*
-* Q (output) COMPLEX array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* R (workspace) COMPLEX array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by CGEQRF.
+*> See CGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by CGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by CGEQRF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt01p.f b/TESTING/LIN/cqrt01p.f
index 3f6cdf7a..2ace0e99 100644
--- a/TESTING/LIN/cqrt01p.f
+++ b/TESTING/LIN/cqrt01p.f
@@ -1,68 +1,146 @@
- SUBROUTINE CQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CQRT01P
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQRT01P tests CGEQRFP, which computes the QR factorization of an m-by-n
-* matrix A, and partially tests CUNGQR which forms the m-by-m
-* orthogonal matrix Q.
-*
-* CQRT01P compares R with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT01P tests CGEQRFP, which computes the QR factorization of an m-by-n
+*> matrix A, and partially tests CUNGQR which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> CQRT01P compares R with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by CGEQRFP.
-* See CGEQRFP for further details.
-*
-* Q (output) COMPLEX array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* R (workspace) COMPLEX array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by CGEQRFP.
+*> See CGEQRFP for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by CGEQRFP.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by CGEQRFP.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt02.f b/TESTING/LIN/cqrt02.f
index 0c53df9f..54db03da 100644
--- a/TESTING/LIN/cqrt02.f
+++ b/TESTING/LIN/cqrt02.f
@@ -1,74 +1,155 @@
- SUBROUTINE CQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CQRT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQRT02 tests CUNGQR, which generates an m-by-n matrix Q with
-* orthonornmal columns that is defined as the product of k elementary
-* reflectors.
-*
-* Given the QR factorization of an m-by-n matrix A, CQRT02 generates
-* the orthogonal matrix Q defined by the factorization of the first k
-* columns of A; it compares R(1:n,1:k) with Q(1:m,1:n)'*A(1:m,1:k),
-* and checks that the columns of Q are orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT02 tests CUNGQR, which generates an m-by-n matrix Q with
+*> orthonornmal columns that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the QR factorization of an m-by-n matrix A, CQRT02 generates
+*> the orthogonal matrix Q defined by the factorization of the first k
+*> columns of A; it compares R(1:n,1:k) with Q(1:m,1:n)'*A(1:m,1:k),
+*> and checks that the columns of Q are orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by CQRT01.
-*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by CGEQRF.
-* See CGEQRF for further details.
-*
-* Q (workspace) COMPLEX array, dimension (LDA,N)
-*
-* R (workspace) COMPLEX array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by CQRT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by CGEQRF.
+*> See CGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (N)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QR factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R. LDA >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (N)
-* The scalar factors of the elementary reflectors corresponding
-* to the QR factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt03.f b/TESTING/LIN/cqrt03.f
index 01f29aed..a66a0fdd 100644
--- a/TESTING/LIN/cqrt03.f
+++ b/TESTING/LIN/cqrt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE CQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CQRT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQRT03 tests CUNMQR, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* CQRT03 compares the results of a call to CUNMQR with the results of
-* forming Q explicitly by a call to CUNGQR and then performing matrix
-* multiplication by a call to CGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT03 tests CUNMQR, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> CQRT03 compares the results of a call to CUNMQR with the results of
+*> forming Q explicitly by a call to CUNGQR and then performing matrix
+*> multiplication by a call to CGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The order of the orthogonal matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of rows or columns of the matrix C; C is m-by-n if
-* Q is applied from the left, or n-by-m if Q is applied from
-* the right. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. M >= K >= 0.
-*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* Details of the QR factorization of an m-by-n matrix, as
-* returnedby CGEQRF. See CGEQRF for further details.
-*
-* C (workspace) COMPLEX array, dimension (LDA,N)
-*
-* CC (workspace) COMPLEX array, dimension (LDA,N)
-*
-* Q (workspace) COMPLEX array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the orthogonal matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows or columns of the matrix C; C is m-by-n if
+*> Q is applied from the left, or n-by-m if Q is applied from
+*> the right. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the QR factorization of an m-by-n matrix, as
+*> returnedby CGEQRF. See CGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QR factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an m-by-m orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the QR factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE CQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an m-by-m orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt04.f b/TESTING/LIN/cqrt04.f
index eb9b3686..68dec6bb 100644
--- a/TESTING/LIN/cqrt04.f
+++ b/TESTING/LIN/cqrt04.f
@@ -1,41 +1,90 @@
- SUBROUTINE CQRT04(M,N,NB,RESULT)
+*> \brief \b CQRT04
*
-* -- LAPACK test routine (version 3.?) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* August 2011
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER LWORK, M, N, NB, LDT
-* .. Return values ..
- REAL RESULT(6)
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CQRT04(M,N,NB,RESULT)
+*
+* .. Scalar Arguments ..
+* INTEGER LWORK, M, N, NB, LDT
+* .. Return values ..
+* REAL RESULT(6)
+*
* Purpose
* =======
*
-* CQRT04 tests CGEQRT and CGEMQRT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT04 tests CGEQRT and CGEMQRT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Number of rows in test matrix.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows in test matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns in test matrix.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size of test matrix. NB <= Min(M,N).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (6)
+*> Results of each of the six tests below.
+*> \endverbatim
+*> \verbatim
+*> RESULT(1) = | A - Q R |
+*> RESULT(2) = | I - Q^H Q |
+*> RESULT(3) = | Q C - Q C |
+*> RESULT(4) = | Q^H C - Q^H C |
+*> RESULT(5) = | C Q - C Q |
+*> RESULT(6) = | C Q^H - C Q^H |
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Number of columns in test matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NB (input) INTEGER
-* Block size of test matrix. NB <= Min(M,N).
+*> \date November 2011
*
-* RESULT (output) REAL array, dimension (6)
-* Results of each of the six tests below.
+*> \ingroup complex_lin
*
-* RESULT(1) = | A - Q R |
-* RESULT(2) = | I - Q^H Q |
-* RESULT(3) = | Q C - Q C |
-* RESULT(4) = | Q^H C - Q^H C |
-* RESULT(5) = | C Q - C Q |
-* RESULT(6) = | C Q^H - C Q^H |
+* =====================================================================
+ SUBROUTINE CQRT04(M,N,NB,RESULT)
+*
+* -- LAPACK test routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LWORK, M, N, NB, LDT
+* .. Return values ..
+ REAL RESULT(6)
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt05.f b/TESTING/LIN/cqrt05.f
index 5a2f39fa..b15ffff6 100644
--- a/TESTING/LIN/cqrt05.f
+++ b/TESTING/LIN/cqrt05.f
@@ -1,45 +1,97 @@
- SUBROUTINE CQRT05(M,N,L,NB,RESULT)
+*> \brief \b CQRT05
*
-* -- LAPACK test routine (version 3.?) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* August 2011
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER LWORK, M, N, L, NB, LDT
-* .. Return values ..
- REAL RESULT(6)
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CQRT05(M,N,L,NB,RESULT)
+*
+* .. Scalar Arguments ..
+* INTEGER LWORK, M, N, L, NB, LDT
+* .. Return values ..
+* REAL RESULT(6)
+*
* Purpose
* =======
*
-* CQRT05 tests CTPQRT and CTPMQRT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT05 tests CTPQRT and CTPMQRT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Number of rows in lower part of the test matrix.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows in lower part of the test matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns in test matrix.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of rows of the upper trapezoidal part the
+*> lower test matrix. 0 <= L <= M.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size of test matrix. NB <= N.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (6)
+*> Results of each of the six tests below.
+*> \endverbatim
+*> \verbatim
+*> RESULT(1) = | A - Q R |
+*> RESULT(2) = | I - Q^H Q |
+*> RESULT(3) = | Q C - Q C |
+*> RESULT(4) = | Q^H C - Q^H C |
+*> RESULT(5) = | C Q - C Q |
+*> RESULT(6) = | C Q^H - C Q^H |
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Number of columns in test matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part the
-* lower test matrix. 0 <= L <= M.
-*
-* NB (input) INTEGER
-* Block size of test matrix. NB <= N.
+*> \date November 2011
*
-* RESULT (output) REAL array, dimension (6)
-* Results of each of the six tests below.
+*> \ingroup complex_lin
*
-* RESULT(1) = | A - Q R |
-* RESULT(2) = | I - Q^H Q |
-* RESULT(3) = | Q C - Q C |
-* RESULT(4) = | Q^H C - Q^H C |
-* RESULT(5) = | C Q - C Q |
-* RESULT(6) = | C Q^H - C Q^H |
+* =====================================================================
+ SUBROUTINE CQRT05(M,N,L,NB,RESULT)
+*
+* -- LAPACK test routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LWORK, M, N, L, NB, LDT
+* .. Return values ..
+ REAL RESULT(6)
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt11.f b/TESTING/LIN/cqrt11.f
index cb60937c..92a5a3c5 100644
--- a/TESTING/LIN/cqrt11.f
+++ b/TESTING/LIN/cqrt11.f
@@ -1,56 +1,116 @@
- REAL FUNCTION CQRT11( M, K, A, LDA, TAU, WORK, LWORK )
+*> \brief \b CQRT11
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION CQRT11( M, K, A, LDA, TAU, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQRT11 computes the test ratio
-*
-* || Q'*Q - I || / (eps * m)
-*
-* where the orthogonal matrix Q is represented as a product of
-* elementary transformations. Each transformation has the form
-*
-* H(k) = I - tau(k) v(k) v(k)'
-*
-* where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
-* [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
-* in A(k+1:m,k).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT11 computes the test ratio
+*>
+*> || Q'*Q - I || / (eps * m)
+*>
+*> where the orthogonal matrix Q is represented as a product of
+*> elementary transformations. Each transformation has the form
+*>
+*> H(k) = I - tau(k) v(k) v(k)'
+*>
+*> where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
+*> [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
+*> in A(k+1:m,k).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of columns of A whose subdiagonal entries
+*> contain information about orthogonal transformations.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,K)
+*> The (possibly partial) output of a QR reduction routine.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (K)
+*> The scaling factors tau for the elementary transformations as
+*> computed by the QR factorization routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*M + M.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of columns of A whose subdiagonal entries
-* contain information about orthogonal transformations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX array, dimension (LDA,K)
-* The (possibly partial) output of a QR reduction routine.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \ingroup complex_lin
*
-* TAU (input) COMPLEX array, dimension (K)
-* The scaling factors tau for the elementary transformations as
-* computed by the QR factorization routine.
+* =====================================================================
+ REAL FUNCTION CQRT11( M, K, A, LDA, TAU, WORK, LWORK )
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*M + M.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt12.f b/TESTING/LIN/cqrt12.f
index ea177281..3e3bb202 100644
--- a/TESTING/LIN/cqrt12.f
+++ b/TESTING/LIN/cqrt12.f
@@ -1,51 +1,116 @@
- REAL FUNCTION CQRT12( M, N, A, LDA, S, WORK, LWORK,
- $ RWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RWORK( * ), S( * )
- COMPLEX A( LDA, * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CQRT12
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CQRT12( M, N, A, LDA, S, WORK, LWORK,
+* RWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * ), S( * )
+* COMPLEX A( LDA, * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CQRT12 computes the singular values `svlues' of the upper trapezoid
-* of A(1:M,1:N) and returns the ratio
-*
-* || s - svlues||/(||svlues||*eps*max(M,N))
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT12 computes the singular values `svlues' of the upper trapezoid
+*> of A(1:M,1:N) and returns the ratio
+*>
+*> || s - svlues||/(||svlues||*eps*max(M,N))
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix A. Only the upper trapezoid is referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of the matrix A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*N + 2*min(M,N) +
+*> max(M,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (4*min(M,N))
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix A. Only the upper trapezoid is referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \date November 2011
*
-* S (input) REAL array, dimension (min(M,N))
-* The singular values of the matrix A.
+*> \ingroup complex_lin
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* =====================================================================
+ REAL FUNCTION CQRT12( M, N, A, LDA, S, WORK, LWORK,
+ $ RWORK )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*N + 2*min(M,N) +
-* max(M,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (workspace) REAL array, dimension (4*min(M,N))
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * ), S( * )
+ COMPLEX A( LDA, * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt13.f b/TESTING/LIN/cqrt13.f
index d9adf1dc..54efa725 100644
--- a/TESTING/LIN/cqrt13.f
+++ b/TESTING/LIN/cqrt13.f
@@ -1,49 +1,111 @@
- SUBROUTINE CQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, M, N, SCALE
- REAL NORMA
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- COMPLEX A( LDA, * )
-* ..
-*
+*> \brief \b CQRT13
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, M, N, SCALE
+* REAL NORMA
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* CQRT13 generates a full-rank matrix that may be scaled to have large
-* or small norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT13 generates a full-rank matrix that may be scaled to have large
+*> or small norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SCALE (input) INTEGER
-* SCALE = 1: normally scaled matrix
-* SCALE = 2: matrix scaled up
-* SCALE = 3: matrix scaled down
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is INTEGER
+*> SCALE = 1: normally scaled matrix
+*> SCALE = 2: matrix scaled up
+*> SCALE = 3: matrix scaled down
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[out] NORMA
+*> \verbatim
+*> NORMA is REAL
+*> The one-norm of A.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is integer array, dimension (4)
+*> Seed for random number generator
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of A.
+*> \date November 2011
*
-* A (output) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix A.
+*> \ingroup complex_lin
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+* =====================================================================
+ SUBROUTINE CQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
*
-* NORMA (output) REAL
-* The one-norm of A.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* ISEED (input/output) integer array, dimension (4)
-* Seed for random number generator
+* .. Scalar Arguments ..
+ INTEGER LDA, M, N, SCALE
+ REAL NORMA
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ COMPLEX A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt14.f b/TESTING/LIN/cqrt14.f
index ea5edfcc..09bca3c8 100644
--- a/TESTING/LIN/cqrt14.f
+++ b/TESTING/LIN/cqrt14.f
@@ -1,64 +1,135 @@
- REAL FUNCTION CQRT14( TRANS, M, N, NRHS, A, LDA, X,
- $ LDX, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER LDA, LDX, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), WORK( LWORK ), X( LDX, * )
-* ..
-*
+*> \brief \b CQRT14
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CQRT14( TRANS, M, N, NRHS, A, LDA, X,
+* LDX, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), WORK( LWORK ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* CQRT14 checks whether X is in the row space of A or A'. It does so
-* by scaling both X and A such that their norms are in the range
-* [sqrt(eps), 1/sqrt(eps)], then computing a QR factorization of [A,X]
-* (if TRANS = 'C') or an LQ factorization of [A',X]' (if TRANS = 'N'),
-* and returning the norm of the trailing triangle, scaled by
-* MAX(M,N,NRHS)*eps.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT14 checks whether X is in the row space of A or A'. It does so
+*> by scaling both X and A such that their norms are in the range
+*> [sqrt(eps), 1/sqrt(eps)], then computing a QR factorization of [A,X]
+*> (if TRANS = 'C') or an LQ factorization of [A',X]' (if TRANS = 'N'),
+*> and returning the norm of the trailing triangle, scaled by
+*> MAX(M,N,NRHS)*eps.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, check for X in the row space of A
-* = 'C': Conjugate transpose, check for X in row space of A'.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of X.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, check for X in the row space of A
+*> = 'C': Conjugate transpose, check for X in row space of A'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of X.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If TRANS = 'N', the N-by-NRHS matrix X.
+*> IF TRANS = 'C', the M-by-NRHS matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of workspace array required
+*> If TRANS = 'N', LWORK >= (M+NRHS)*(N+2);
+*> if TRANS = 'C', LWORK >= (N+NRHS)*(M+2).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \date November 2011
*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* If TRANS = 'N', the N-by-NRHS matrix X.
-* IF TRANS = 'C', the M-by-NRHS matrix X.
+*> \ingroup complex_lin
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
+* =====================================================================
+ REAL FUNCTION CQRT14( TRANS, M, N, NRHS, A, LDA, X,
+ $ LDX, WORK, LWORK )
*
-* WORK (workspace) COMPLEX array dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of workspace array required
-* If TRANS = 'N', LWORK >= (M+NRHS)*(N+2);
-* if TRANS = 'C', LWORK >= (N+NRHS)*(M+2).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER LDA, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), WORK( LWORK ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cqrt15.f b/TESTING/LIN/cqrt15.f
index eb6a2e9d..a925aa57 100644
--- a/TESTING/LIN/cqrt15.f
+++ b/TESTING/LIN/cqrt15.f
@@ -1,9 +1,160 @@
+*> \brief \b CQRT15
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
+* RANK, NORMA, NORMB, ISEED, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
+* REAL NORMA, NORMB
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL S( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT15 generates a matrix with full or deficient rank and of various
+*> norms.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is INTEGER
+*> SCALE = 1: normally scaled matrix
+*> SCALE = 2: matrix scaled up
+*> SCALE = 3: matrix scaled down
+*> \endverbatim
+*>
+*> \param[in] RKSEL
+*> \verbatim
+*> RKSEL is INTEGER
+*> RKSEL = 1: full rank matrix
+*> RKSEL = 2: rank-deficient matrix
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, NRHS)
+*> A matrix that is in the range space of matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension MIN(M,N)
+*> Singular values of A.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> number of nonzero singular values of A.
+*> \endverbatim
+*>
+*> \param[out] NORMA
+*> \verbatim
+*> NORMA is REAL
+*> one-norm norm of A.
+*> \endverbatim
+*>
+*> \param[out] NORMB
+*> \verbatim
+*> NORMB is REAL
+*> one-norm norm of B.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is integer array, dimension (4)
+*> seed for random number generator.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of work space required.
+*> LWORK >= MAX(M+MIN(M,N),NRHS*MIN(M,N),2*N+M)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
$ RANK, NORMA, NORMB, ISEED, WORK, LWORK )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
@@ -15,66 +166,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* CQRT15 generates a matrix with full or deficient rank and of various
-* norms.
-*
-* Arguments
-* =========
-*
-* SCALE (input) INTEGER
-* SCALE = 1: normally scaled matrix
-* SCALE = 2: matrix scaled up
-* SCALE = 3: matrix scaled down
-*
-* RKSEL (input) INTEGER
-* RKSEL = 1: full rank matrix
-* RKSEL = 2: rank-deficient matrix
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of A.
-*
-* NRHS (input) INTEGER
-* The number of columns of B.
-*
-* A (output) COMPLEX array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-*
-* B (output) COMPLEX array, dimension (LDB, NRHS)
-* A matrix that is in the range space of matrix A.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-*
-* S (output) REAL array, dimension MIN(M,N)
-* Singular values of A.
-*
-* RANK (output) INTEGER
-* number of nonzero singular values of A.
-*
-* NORMA (output) REAL
-* one-norm norm of A.
-*
-* NORMB (output) REAL
-* one-norm norm of B.
-*
-* ISEED (input/output) integer array, dimension (4)
-* seed for random number generator.
-*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* length of work space required.
-* LWORK >= MAX(M+MIN(M,N),NRHS*MIN(M,N),2*N+M)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cqrt16.f b/TESTING/LIN/cqrt16.f
index a4a3f19f..871b00f3 100644
--- a/TESTING/LIN/cqrt16.f
+++ b/TESTING/LIN/cqrt16.f
@@ -1,9 +1,144 @@
+*> \brief \b CQRT16
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CQRT16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT16 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A^T*x = b, where A^T is the transpose of A
+*> = 'C': A^H*x = b, where A^H is the conjugate transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CQRT16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CQRT16 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A^T*x = b, where A^T is the transpose of A
-* = 'C': A^H*x = b, where A^H is the conjugate transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cqrt17.f b/TESTING/LIN/cqrt17.f
index 5f0f352d..cd1abf6e 100644
--- a/TESTING/LIN/cqrt17.f
+++ b/TESTING/LIN/cqrt17.f
@@ -1,86 +1,170 @@
- REAL FUNCTION CQRT17( TRANS, IRESID, M, N, NRHS, A,
- $ LDA, X, LDX, B, LDB, C, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), C( LDB, * ),
- $ WORK( LWORK ), X( LDX, * )
-* ..
-*
+*> \brief \b CQRT17
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CQRT17( TRANS, IRESID, M, N, NRHS, A,
+* LDA, X, LDX, B, LDB, C, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), C( LDB, * ),
+* $ WORK( LWORK ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* CQRT17 computes the ratio
-*
-* || R'*op(A) ||/(||A||*alpha*max(M,N,NRHS)*eps)
-*
-* where R = op(A)*X - B, op(A) is A or A', and
-*
-* alpha = ||B|| if IRESID = 1 (zero-residual problem)
-* alpha = ||R|| if IRESID = 2 (otherwise).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CQRT17 computes the ratio
+*>
+*> || R'*op(A) ||/(||A||*alpha*max(M,N,NRHS)*eps)
+*>
+*> where R = op(A)*X - B, op(A) is A or A', and
+*>
+*> alpha = ||B|| if IRESID = 1 (zero-residual problem)
+*> alpha = ||R|| if IRESID = 2 (otherwise).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies whether or not the transpose of A is used.
-* = 'N': No transpose, op(A) = A.
-* = 'C': Conjugate transpose, op(A) = A'.
-*
-* IRESID (input) INTEGER
-* IRESID = 1 indicates zero-residual problem.
-* IRESID = 2 indicates non-zero residual.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-* If TRANS = 'N', the number of rows of the matrix B.
-* If TRANS = 'C', the number of rows of the matrix X.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-* If TRANS = 'N', the number of rows of the matrix X.
-* If TRANS = 'C', the number of rows of the matrix B.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and B.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* If TRANS = 'N', the n-by-nrhs matrix X.
-* If TRANS = 'C', the m-by-nrhs matrix X.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether or not the transpose of A is used.
+*> = 'N': No transpose, op(A) = A.
+*> = 'C': Conjugate transpose, op(A) = A'.
+*> \endverbatim
+*>
+*> \param[in] IRESID
+*> \verbatim
+*> IRESID is INTEGER
+*> IRESID = 1 indicates zero-residual problem.
+*> IRESID = 2 indicates non-zero residual.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> If TRANS = 'N', the number of rows of the matrix B.
+*> If TRANS = 'C', the number of rows of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> If TRANS = 'N', the number of rows of the matrix X.
+*> If TRANS = 'C', the number of rows of the matrix B.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> If TRANS = 'N', the n-by-nrhs matrix X.
+*> If TRANS = 'C', the m-by-nrhs matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> If TRANS = 'N', LDX >= N.
+*> If TRANS = 'C', LDX >= M.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> If TRANS = 'N', the m-by-nrhs matrix B.
+*> If TRANS = 'C', the n-by-nrhs matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B.
+*> If TRANS = 'N', LDB >= M.
+*> If TRANS = 'C', LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDB,NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= NRHS*(M+N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
-* If TRANS = 'N', LDX >= N.
-* If TRANS = 'C', LDX >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* If TRANS = 'N', the m-by-nrhs matrix B.
-* If TRANS = 'C', the n-by-nrhs matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* If TRANS = 'N', LDB >= M.
-* If TRANS = 'C', LDB >= N.
+*> \ingroup complex_lin
*
-* C (workspace) COMPLEX array, dimension (LDB,NRHS)
+* =====================================================================
+ REAL FUNCTION CQRT17( TRANS, IRESID, M, N, NRHS, A,
+ $ LDA, X, LDX, B, LDB, C, WORK, LWORK )
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= NRHS*(M+N).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), C( LDB, * ),
+ $ WORK( LWORK ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/crqt01.f b/TESTING/LIN/crqt01.f
index 94bf4f1b..7669e58d 100644
--- a/TESTING/LIN/crqt01.f
+++ b/TESTING/LIN/crqt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE CRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CRQT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CRQT01 tests CGERQF, which computes the RQ factorization of an m-by-n
-* matrix A, and partially tests CUNGRQ which forms the n-by-n
-* orthogonal matrix Q.
-*
-* CRQT01 compares R with A*Q', and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CRQT01 tests CGERQF, which computes the RQ factorization of an m-by-n
+*> matrix A, and partially tests CUNGRQ which forms the n-by-n
+*> orthogonal matrix Q.
+*>
+*> CRQT01 compares R with A*Q', and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX array, dimension (LDA,N)
-* Details of the RQ factorization of A, as returned by CGERQF.
-* See CGERQF for further details.
-*
-* Q (output) COMPLEX array, dimension (LDA,N)
-* The n-by-n orthogonal matrix Q.
-*
-* R (workspace) COMPLEX array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the RQ factorization of A, as returned by CGERQF.
+*> See CGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> The n-by-n orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by CGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by CGERQF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (max(M,N))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/crqt02.f b/TESTING/LIN/crqt02.f
index ab54f3ff..2f520e34 100644
--- a/TESTING/LIN/crqt02.f
+++ b/TESTING/LIN/crqt02.f
@@ -1,75 +1,156 @@
- SUBROUTINE CRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CRQT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CRQT02 tests CUNGRQ, which generates an m-by-n matrix Q with
-* orthonornmal rows that is defined as the product of k elementary
-* reflectors.
-*
-* Given the RQ factorization of an m-by-n matrix A, CRQT02 generates
-* the orthogonal matrix Q defined by the factorization of the last k
-* rows of A; it compares R(m-k+1:m,n-m+1:n) with
-* A(m-k+1:m,1:n)*Q(n-m+1:n,1:n)', and checks that the rows of Q are
-* orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CRQT02 tests CUNGRQ, which generates an m-by-n matrix Q with
+*> orthonornmal rows that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the RQ factorization of an m-by-n matrix A, CRQT02 generates
+*> the orthogonal matrix Q defined by the factorization of the last k
+*> rows of A; it compares R(m-k+1:m,n-m+1:n) with
+*> A(m-k+1:m,1:n)*Q(n-m+1:n,1:n)', and checks that the rows of Q are
+*> orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* N >= M >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by CRQT01.
-*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* Details of the RQ factorization of A, as returned by CGERQF.
-* See CGERQF for further details.
-*
-* Q (workspace) COMPLEX array, dimension (LDA,N)
-*
-* R (workspace) COMPLEX array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by CRQT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the RQ factorization of A, as returned by CGERQF.
+*> See CGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the RQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (M)
-* The scalar factors of the elementary reflectors corresponding
-* to the RQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE CRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/crqt03.f b/TESTING/LIN/crqt03.f
index 002ca8fd..3484d8ac 100644
--- a/TESTING/LIN/crqt03.f
+++ b/TESTING/LIN/crqt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE CRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL RESULT( * ), RWORK( * )
- COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CRQT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL RESULT( * ), RWORK( * )
+* COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CRQT03 tests CUNMRQ, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* CRQT03 compares the results of a call to CUNMRQ with the results of
-* forming Q explicitly by a call to CUNGRQ and then performing matrix
-* multiplication by a call to CGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CRQT03 tests CUNMRQ, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> CRQT03 compares the results of a call to CUNMRQ with the results of
+*> forming Q explicitly by a call to CUNGRQ and then performing matrix
+*> multiplication by a call to CGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows or columns of the matrix C; C is n-by-m if
-* Q is applied from the left, or m-by-n if Q is applied from
-* the right. M >= 0.
-*
-* N (input) INTEGER
-* The order of the orthogonal matrix Q. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. N >= K >= 0.
-*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* Details of the RQ factorization of an m-by-n matrix, as
-* returned by CGERQF. See CGERQF for further details.
-*
-* C (workspace) COMPLEX array, dimension (LDA,N)
-*
-* CC (workspace) COMPLEX array, dimension (LDA,N)
-*
-* Q (workspace) COMPLEX array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows or columns of the matrix C; C is n-by-m if
+*> Q is applied from the left, or m-by-n if Q is applied from
+*> the right. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the orthogonal matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> Details of the RQ factorization of an m-by-n matrix, as
+*> returned by CGERQF. See CGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the RQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an n-by-n orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the RQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+*> \ingroup complex_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE CRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an n-by-n orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL RESULT( * ), RWORK( * )
+ COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/crzt01.f b/TESTING/LIN/crzt01.f
index a50c4808..f55e8ff4 100644
--- a/TESTING/LIN/crzt01.f
+++ b/TESTING/LIN/crzt01.f
@@ -1,52 +1,117 @@
- REAL FUNCTION CRZT01( M, N, A, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b CRZT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CRZT01( M, N, A, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CRZT01 returns
-* || A - R*Q || / ( M * eps * ||A|| )
-* for an upper trapezoidal A that was factored with CTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CRZT01 returns
+*> || A - R*Q || / ( M * eps * ||A|| )
+*> for an upper trapezoidal A that was factored with CTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original upper trapezoidal M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> The output of CTZRZF for input matrix A.
+*> The lower triangle is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> CTZRZF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= m*n + m.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original upper trapezoidal M by N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* The output of CTZRZF for input matrix A.
-* The lower triangle is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \ingroup complex_lin
*
-* TAU (input) COMPLEX array, dimension (M)
-* Details of the Householder transformations as returned by
-* CTZRZF.
+* =====================================================================
+ REAL FUNCTION CRZT01( M, N, A, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= m*n + m.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/crzt02.f b/TESTING/LIN/crzt02.f
index 7ec261a8..9d4cd5cd 100644
--- a/TESTING/LIN/crzt02.f
+++ b/TESTING/LIN/crzt02.f
@@ -1,48 +1,109 @@
- REAL FUNCTION CRZT02( M, N, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX AF( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CRZT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CRZT02( M, N, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CRZT02 returns
-* || I - Q'*Q || / ( M * eps)
-* where the matrix Q is defined by the Householder transformations
-* generated by CTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CRZT02 returns
+*> || I - Q'*Q || / ( M * eps)
+*> where the matrix Q is defined by the Householder transformations
+*> generated by CTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> The output of CTZRZF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> CTZRZF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> Length of WORK array. LWORK >= N*N+N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix AF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* The output of CTZRZF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array AF.
+*> \ingroup complex_lin
*
-* TAU (input) COMPLEX array, dimension (M)
-* Details of the Householder transformations as returned by
-* CTZRZF.
+* =====================================================================
+ REAL FUNCTION CRZT02( M, N, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* Length of WORK array. LWORK >= N*N+N.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/csbmv.f b/TESTING/LIN/csbmv.f
index 87a30847..7f20bf82 100644
--- a/TESTING/LIN/csbmv.f
+++ b/TESTING/LIN/csbmv.f
@@ -1,9 +1,180 @@
+*> \brief \b CSBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSBMV( UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, INCY, K, LDA, N
+* COMPLEX ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSBMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric band matrix, with k super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the band matrix A is being supplied as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> K - INTEGER
+*> On entry, K specifies the number of super-diagonals of the
+*> matrix A. K must satisfy 0 .le. K.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> ALPHA - COMPLEX
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX array, dimension( LDA, N )
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer the upper
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer the lower
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> X - COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INCX - INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> BETA - COMPLEX
+*> On entry, BETA specifies the scalar beta.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Y - COMPLEX array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*> \verbatim
+*> INCY - INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CSBMV( UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y,
$ INCY )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,116 +185,6 @@
COMPLEX A( LDA, * ), X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* CSBMV performs the matrix-vector operation
-*
-* y := alpha*A*x + beta*y,
-*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric band matrix, with k super-diagonals.
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the band matrix A is being supplied as
-* follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* being supplied.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* being supplied.
-*
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER
-* On entry, K specifies the number of super-diagonals of the
-* matrix A. K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX array, dimension( LDA, N )
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer the upper
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer the lower
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* Y - COMPLEX array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cspt01.f b/TESTING/LIN/cspt01.f
index dc739a89..9a250f09 100644
--- a/TESTING/LIN/cspt01.f
+++ b/TESTING/LIN/cspt01.f
@@ -1,64 +1,132 @@
- SUBROUTINE CSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*> \brief \b CSPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDC, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL RWORK( * )
- COMPLEX A( * ), AFAC( * ), C( LDC, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL RWORK( * )
+* COMPLEX A( * ), AFAC( * ), C( LDC, * )
+* ..
+*
* Purpose
* =======
*
-* CSPT01 reconstructs a symmetric indefinite packed matrix A from its
-* diagonal pivoting factorization A = U*D*U' or A = L*D*L' and computes
-* the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPT01 reconstructs a symmetric indefinite packed matrix A from its
+*> diagonal pivoting factorization A = U*D*U' or A = L*D*L' and computes
+*> the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A, stored as a packed
+*> triangular matrix. AFAC contains the block diagonal matrix D
+*> and the multipliers used to obtain the factor L or U from the
+*> L*D*L' or U*D*U' factorization as computed by CSPTRF.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CSPTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AFAC (input) COMPLEX array, dimension (N*(N+1)/2)
-* The factored form of the matrix A, stored as a packed
-* triangular matrix. AFAC contains the block diagonal matrix D
-* and the multipliers used to obtain the factor L or U from the
-* L*D*L' or U*D*U' factorization as computed by CSPTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CSPTRF.
+*> \date November 2011
*
-* C (workspace) COMPLEX array, dimension (LDC,N)
+*> \ingroup complex_lin
*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
+* =====================================================================
+ SUBROUTINE CSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDC, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL RWORK( * )
+ COMPLEX A( * ), AFAC( * ), C( LDC, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/cspt02.f b/TESTING/LIN/cspt02.f
index 2be5d4f4..674164ea 100644
--- a/TESTING/LIN/cspt02.f
+++ b/TESTING/LIN/cspt02.f
@@ -1,9 +1,134 @@
+*> \brief \b CSPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPT02 computes the residual in the solution of a complex symmetric
+*> system of linear equations A*x = b when packed storage is used for
+*> the coefficient matrix. The ratio computed is
+*>
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
+*>
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> complex symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (N*(N+1)/2)
+*> The original complex symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CSPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,58 +140,6 @@
COMPLEX A( * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CSPT02 computes the residual in the solution of a complex symmetric
-* system of linear equations A*x = b when packed storage is used for
-* the coefficient matrix. The ratio computed is
-*
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
-*
-* where EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* complex symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original complex symmetric matrix A, stored as a packed
-* triangular matrix.
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/cspt03.f b/TESTING/LIN/cspt03.f
index aea5d6c9..41096806 100644
--- a/TESTING/LIN/cspt03.f
+++ b/TESTING/LIN/cspt03.f
@@ -1,61 +1,131 @@
- SUBROUTINE CSPT03( UPLO, N, A, AINV, WORK, LDW, RWORK, RCOND,
- $ RESID )
+*> \brief \b CSPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDW, N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX A( * ), AINV( * ), WORK( LDW, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CSPT03( UPLO, N, A, AINV, WORK, LDW, RWORK, RCOND,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDW, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( * ), AINV( * ), WORK( LDW, * )
+* ..
+*
* Purpose
* =======
*
-* CSPT03 computes the residual for a complex symmetric packed matrix
-* times its inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSPT03 computes the residual for a complex symmetric packed matrix
+*> times its inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* complex symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original complex symmetric matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> complex symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (N*(N+1)/2)
+*> The original complex symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (N*(N+1)/2)
+*> The (symmetric) inverse of the matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AINV (input) COMPLEX array, dimension (N*(N+1)/2)
-* The (symmetric) inverse of the matrix A, stored as a packed
-* triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup complex_lin
*
-* RWORK (workspace) REAL array, dimension (N)
+* =====================================================================
+ SUBROUTINE CSPT03( UPLO, N, A, AINV, WORK, LDW, RWORK, RCOND,
+ $ RESID )
*
-* RCOND (output) REAL
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDW, N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX A( * ), AINV( * ), WORK( LDW, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/csyt01.f b/TESTING/LIN/csyt01.f
index 0bf15ec4..c959c186 100644
--- a/TESTING/LIN/csyt01.f
+++ b/TESTING/LIN/csyt01.f
@@ -1,9 +1,134 @@
+*> \brief \b CSYT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYT01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, LDC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYT01 reconstructs a complex symmetric indefinite matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix, EPS is the machine epsilon,
+*> L' is the transpose of L, and U' is the transpose of U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> complex symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original complex symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor L or U from the block L*D*L' or U*D*U' factorization
+*> as computed by CSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from CSYTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CSYT01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,56 +141,6 @@
COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
* ..
*
-* Purpose
-* =======
-*
-* CSYT01 reconstructs a complex symmetric indefinite matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix, EPS is the machine epsilon,
-* L' is the transpose of L, and U' is the transpose of U.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* complex symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original complex symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) COMPLEX array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor L or U from the block L*D*L' or U*D*U' factorization
-* as computed by CSYTRF.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from CSYTRF.
-*
-* C (workspace) COMPLEX array, dimension (LDC,N)
-*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/csyt02.f b/TESTING/LIN/csyt02.f
index a8ddf1f4..ca115603 100644
--- a/TESTING/LIN/csyt02.f
+++ b/TESTING/LIN/csyt02.f
@@ -1,9 +1,138 @@
+*> \brief \b CSYT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYT02 computes the residual for a solution to a complex symmetric
+*> system of linear equations A*x = b:
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*>
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original complex symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CSYT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,59 +144,6 @@
COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CSYT02 computes the residual for a solution to a complex symmetric
-* system of linear equations A*x = b:
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-*
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original complex symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/csyt03.f b/TESTING/LIN/csyt03.f
index 5164a92e..a733d57c 100644
--- a/TESTING/LIN/csyt03.f
+++ b/TESTING/LIN/csyt03.f
@@ -1,9 +1,137 @@
+*> \brief \b CSYT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CSYT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
+* RWORK, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAINV, LDWORK, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AINV( LDAINV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CSYT03 computes the residual for a complex symmetric matrix times
+*> its inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS )
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> complex symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original complex symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (LDAINV,N)
+*> On entry, the inverse of the matrix A, stored as a symmetric
+*> matrix in the same format as A.
+*> In this version, AINV is expanded into a full matrix and
+*> multiplied by A, so the opposing triangle of AINV will be
+*> changed; i.e., if the upper triangular part of AINV is
+*> stored, the lower triangular part will be used as work space.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of A, computed as
+*> RCOND = 1/ (norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CSYT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
$ RWORK, RCOND, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,57 +144,6 @@
$ WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* CSYT03 computes the residual for a complex symmetric matrix times
-* its inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS )
-* where EPS is the machine epsilon.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* complex symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original complex symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AINV (input/output) COMPLEX array, dimension (LDAINV,N)
-* On entry, the inverse of the matrix A, stored as a symmetric
-* matrix in the same format as A.
-* In this version, AINV is expanded into a full matrix and
-* multiplied by A, so the opposing triangle of AINV will be
-* changed; i.e., if the upper triangular part of AINV is
-* stored, the lower triangular part will be used as work space.
-*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (LDWORK,N)
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RCOND (output) REAL
-* The reciprocal of the condition number of A, computed as
-* RCOND = 1/ (norm(A) * norm(AINV)).
-*
-* RESID (output) REAL
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
-*
* =====================================================================
*
*
diff --git a/TESTING/LIN/ctbt02.f b/TESTING/LIN/ctbt02.f
index 0b38f317..056af1ea 100644
--- a/TESTING/LIN/ctbt02.f
+++ b/TESTING/LIN/ctbt02.f
@@ -1,9 +1,172 @@
+*> \brief \b CTBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBT02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
+* LDX, B, LDB, WORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AB( LDAB, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b, A**T *x = b, or
+*> A**H *x = b when A is a triangular band matrix. Here A**T denotes
+*> the transpose of A, A**H denotes the conjugate transpose of A, and
+*> x and b are N by NRHS matrices. The test ratio is the maximum over
+*> the number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A**T *x = b (Transpose)
+*> = 'C': A**H *x = b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDA,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTBT02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
$ LDX, B, LDB, WORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -16,80 +179,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CTBT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b, A**T *x = b, or
-* A**H *x = b when A is a triangular band matrix. Here A**T denotes
-* the transpose of A, A**H denotes the conjugate transpose of A, and
-* x and b are N by NRHS matrices. The test ratio is the maximum over
-* the number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A**T *x = b (Transpose)
-* = 'C': A**H *x = b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDA,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= max(1,KD+1).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctbt03.f b/TESTING/LIN/ctbt03.f
index 52128f0f..f6f5ff95 100644
--- a/TESTING/LIN/ctbt03.f
+++ b/TESTING/LIN/ctbt03.f
@@ -1,10 +1,188 @@
+*> \brief \b CTBT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBT03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
+* SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, N, NRHS
+* REAL RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* REAL CNORM( * )
+* COMPLEX AB( LDAB, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b
+*> when A is a triangular band matrix. Here A**T denotes the transpose
+*> of A, A**H denotes the conjugate transpose of A, s is a scalar, and
+*> x and b are N by NRHS matrices. The test ratio is the maximum over
+*> the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A**T *x = s*b (Transpose)
+*> = 'C': A**H *x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is REAL array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is REAL
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTBT03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
$ SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -17,88 +195,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CTBT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b
-* when A is a triangular band matrix. Here A**T denotes the transpose
-* of A, A**H denotes the conjugate transpose of A, s is a scalar, and
-* x and b are N by NRHS matrices. The test ratio is the maximum over
-* the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A**T *x = s*b (Transpose)
-* = 'C': A**H *x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* SCALE (input) REAL
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) REAL array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) REAL
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
*
diff --git a/TESTING/LIN/ctbt05.f b/TESTING/LIN/ctbt05.f
index f316a163..7a3efcb8 100644
--- a/TESTING/LIN/ctbt05.f
+++ b/TESTING/LIN/ctbt05.f
@@ -1,9 +1,200 @@
+*> \brief \b CTBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBT05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular band matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTBT05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,103 +206,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CTBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular band matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctbt06.f b/TESTING/LIN/ctbt06.f
index 7d6ca92a..db34b675 100644
--- a/TESTING/LIN/ctbt06.f
+++ b/TESTING/LIN/ctbt06.f
@@ -1,9 +1,137 @@
+*> \brief \b CTBT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
+* RWORK, RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER KD, LDAB, N
+* REAL RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTBT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by CTBCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is REAL
+*> The estimate of the reciprocal condition number computed by
+*> CTBCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is REAL
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
$ RWORK, RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -15,61 +143,6 @@
COMPLEX AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* CTBT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by CTBCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) REAL
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) REAL
-* The estimate of the reciprocal condition number computed by
-* CTBCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* AB (input) COMPLEX array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RAT (output) REAL
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctpt01.f b/TESTING/LIN/ctpt01.f
index ca6c80ef..e32d3cb1 100644
--- a/TESTING/LIN/ctpt01.f
+++ b/TESTING/LIN/ctpt01.f
@@ -1,64 +1,130 @@
- SUBROUTINE CTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, RWORK, RESID )
+*> \brief \b CTPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX AINVP( * ), AP( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AINVP( * ), AP( * )
+* ..
+*
* Purpose
* =======
*
-* CTPT01 computes the residual for a triangular matrix A times its
-* inverse when A is stored in packed format:
-* RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPT01 computes the residual for a triangular matrix A times its
+*> inverse when A is stored in packed format:
+*> RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The original upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AINVP
+*> \verbatim
+*> AINVP is COMPLEX array, dimension (N*(N+1)/2)
+*> On entry, the (triangular) inverse of the matrix A, packed
+*> columnwise in a linear array as in AP.
+*> On exit, the contents of AINVP are destroyed.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal condition number of A, computed as
+*> 1/(norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The original upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \date November 2011
*
-* AINVP (input) COMPLEX array, dimension (N*(N+1)/2)
-* On entry, the (triangular) inverse of the matrix A, packed
-* columnwise in a linear array as in AP.
-* On exit, the contents of AINVP are destroyed.
+*> \ingroup complex_lin
*
-* RCOND (output) REAL
-* The reciprocal condition number of A, computed as
-* 1/(norm(A) * norm(AINV)).
+* =====================================================================
+ SUBROUTINE CTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX AINVP( * ), AP( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ctpt02.f b/TESTING/LIN/ctpt02.f
index 4961b509..4e1d4916 100644
--- a/TESTING/LIN/ctpt02.f
+++ b/TESTING/LIN/ctpt02.f
@@ -1,9 +1,160 @@
+*> \brief \b CTPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
+* WORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b, A**T *x = b, or
+*> A**H *x = b, when the triangular matrix A is stored in packed format.
+*> Here A**T denotes the transpose of A, A**H denotes the conjugate
+*> transpose of A, and x and b are N by NRHS matrices. The test ratio
+*> is the maximum over the number of right hand sides of
+*> the maximum over the number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A**T *x = b (Transpose)
+*> = 'C': A**H *x = b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
$ WORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,75 +166,6 @@
COMPLEX AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CTPT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b, A**T *x = b, or
-* A**H *x = b, when the triangular matrix A is stored in packed format.
-* Here A**T denotes the transpose of A, A**H denotes the conjugate
-* transpose of A, and x and b are N by NRHS matrices. The test ratio
-* is the maximum over the number of right hand sides of
-* the maximum over the number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A**T *x = b (Transpose)
-* = 'C': A**H *x = b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctpt03.f b/TESTING/LIN/ctpt03.f
index 9de95f14..33fb4441 100644
--- a/TESTING/LIN/ctpt03.f
+++ b/TESTING/LIN/ctpt03.f
@@ -1,95 +1,183 @@
- SUBROUTINE CTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
- $ TSCAL, X, LDX, B, LDB, WORK, RESID )
+*> \brief \b CTPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER LDB, LDX, N, NRHS
- REAL RESID, SCALE, TSCAL
-* ..
-* .. Array Arguments ..
- REAL CNORM( * )
- COMPLEX AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
+* TSCAL, X, LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* REAL CNORM( * )
+* COMPLEX AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* CTPT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b,
-* when the triangular matrix A is stored in packed format. Here A**T
-* denotes the transpose of A, A**H denotes the conjugate transpose of
-* A, s is a scalar, and x and b are N by NRHS matrices. The test ratio
-* is the maximum over the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b,
+*> when the triangular matrix A is stored in packed format. Here A**T
+*> denotes the transpose of A, A**H denotes the conjugate transpose of
+*> A, s is a scalar, and x and b are N by NRHS matrices. The test ratio
+*> is the maximum over the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A**T *x = s*b (Transpose)
-* = 'C': A**H *x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A**T *x = s*b (Transpose)
+*> = 'C': A**H *x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is REAL array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is REAL
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* SCALE (input) REAL
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) REAL array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) REAL
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
+* Authors
+* =======
*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
+*> \ingroup complex_lin
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE CTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
+ $ TSCAL, X, LDX, B, LDB, WORK, RESID )
*
-* WORK (workspace) COMPLEX array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER LDB, LDX, N, NRHS
+ REAL RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+ REAL CNORM( * )
+ COMPLEX AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ctpt05.f b/TESTING/LIN/ctpt05.f
index f32eb567..79d1eaa8 100644
--- a/TESTING/LIN/ctpt05.f
+++ b/TESTING/LIN/ctpt05.f
@@ -1,9 +1,186 @@
+*> \brief \b CTPT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPT05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX AP( * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular matrix in packed storage format.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTPT05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,95 +192,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CTPT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular matrix in packed storage format.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctpt06.f b/TESTING/LIN/ctpt06.f
index e3cc2e13..217946c5 100644
--- a/TESTING/LIN/ctpt06.f
+++ b/TESTING/LIN/ctpt06.f
@@ -1,8 +1,123 @@
+*> \brief \b CTPT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTPT06( RCOND, RCONDC, UPLO, DIAG, N, AP, RWORK, RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER N
+* REAL RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTPT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of the triangular matrix A) and RCONDC, the estimate
+*> computed by CTPCON. Information about the triangular matrix is used
+*> if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is REAL
+*> The estimate of the reciprocal condition number computed by
+*> CTPCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is REAL
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTPT06( RCOND, RCONDC, UPLO, DIAG, N, AP, RWORK, RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -14,55 +129,6 @@
COMPLEX AP( * )
* ..
*
-* Purpose
-* =======
-*
-* CTPT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of the triangular matrix A) and RCONDC, the estimate
-* computed by CTPCON. Information about the triangular matrix is used
-* if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) REAL
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) REAL
-* The estimate of the reciprocal condition number computed by
-* CTPCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RAT (output) REAL
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctrt01.f b/TESTING/LIN/ctrt01.f
index 4546ad95..75950e35 100644
--- a/TESTING/LIN/ctrt01.f
+++ b/TESTING/LIN/ctrt01.f
@@ -1,73 +1,146 @@
- SUBROUTINE CTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
- $ RWORK, RESID )
+*> \brief \b CTRT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER LDA, LDAINV, N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL RWORK( * )
- COMPLEX A( LDA, * ), AINV( LDAINV, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE CTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER LDA, LDAINV, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), AINV( LDAINV, * )
+* ..
+*
* Purpose
* =======
*
-* CTRT01 computes the residual for a triangular matrix A times its
-* inverse:
-* RESID = norm( A*AINV - I ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRT01 computes the residual for a triangular matrix A times its
+*> inverse:
+*> RESID = norm( A*AINV - I ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is COMPLEX array, dimension (LDAINV,N)
+*> On entry, the (triangular) inverse of the matrix A, in the
+*> same storage format as A.
+*> On exit, the contents of AINV are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal condition number of A, computed as
+*> 1/(norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AINV (input) COMPLEX array, dimension (LDAINV,N)
-* On entry, the (triangular) inverse of the matrix A, in the
-* same storage format as A.
-* On exit, the contents of AINV are destroyed.
+*> \date November 2011
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \ingroup complex_lin
*
-* RCOND (output) REAL
-* The reciprocal condition number of A, computed as
-* 1/(norm(A) * norm(AINV)).
+* =====================================================================
+ SUBROUTINE CTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
+ $ RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER LDA, LDAINV, N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL RWORK( * )
+ COMPLEX A( LDA, * ), AINV( LDAINV, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ctrt02.f b/TESTING/LIN/ctrt02.f
index 34ef74e1..1e774b7f 100644
--- a/TESTING/LIN/ctrt02.f
+++ b/TESTING/LIN/ctrt02.f
@@ -1,9 +1,168 @@
+*> \brief \b CTRT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRT02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
+* LDB, WORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b, A**T *x = b,
+*> or A**H *x = b. Here A is a triangular matrix, A**T is the transpose
+*> of A, A**H is the conjugate transpose of A, and x and b are N by NRHS
+*> matrices. The test ratio is the maximum over the number of right
+*> hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A**T *x = b (Transpose)
+*> = 'C': A**H *x = b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTRT02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
$ LDB, WORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -16,79 +175,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b, A**T *x = b,
-* or A**H *x = b. Here A is a triangular matrix, A**T is the transpose
-* of A, A**H is the conjugate transpose of A, and x and b are N by NRHS
-* matrices. The test ratio is the maximum over the number of right
-* hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A**T *x = b (Transpose)
-* = 'C': A**H *x = b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctrt03.f b/TESTING/LIN/ctrt03.f
index b04e8419..a80081d4 100644
--- a/TESTING/LIN/ctrt03.f
+++ b/TESTING/LIN/ctrt03.f
@@ -1,9 +1,182 @@
+*> \brief \b CTRT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRT03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
+* CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* REAL RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* REAL CNORM( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b.
+*> Here A is a triangular matrix, A**T denotes the transpose of A, A**H
+*> denotes the conjugate transpose of A, s is a scalar, and x and b are
+*> N by NRHS matrices. The test ratio is the maximum over the number of
+*> right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A**T *x = s*b (Transpose)
+*> = 'C': A**H *x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is REAL array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is REAL
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTRT03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
$ CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -16,87 +189,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b.
-* Here A is a triangular matrix, A**T denotes the transpose of A, A**H
-* denotes the conjugate transpose of A, s is a scalar, and x and b are
-* N by NRHS matrices. The test ratio is the maximum over the number of
-* right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A**T *x = s*b (Transpose)
-* = 'C': A**H *x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SCALE (input) REAL
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) REAL array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) REAL
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctrt05.f b/TESTING/LIN/ctrt05.f
index 38d5841b..16d0415f 100644
--- a/TESTING/LIN/ctrt05.f
+++ b/TESTING/LIN/ctrt05.f
@@ -1,9 +1,193 @@
+*> \brief \b CTRT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRT05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
+* LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular n by n matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTRT05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
$ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,99 +199,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular n by n matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctrt06.f b/TESTING/LIN/ctrt06.f
index 83d106fd..1bf01627 100644
--- a/TESTING/LIN/ctrt06.f
+++ b/TESTING/LIN/ctrt06.f
@@ -1,9 +1,133 @@
+*> \brief \b CTRT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CTRT06( RCOND, RCONDC, UPLO, DIAG, N, A, LDA, RWORK,
+* RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER LDA, N
+* REAL RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* REAL RWORK( * )
+* COMPLEX A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTRT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by CTRCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is REAL
+*> The estimate of the reciprocal condition number computed by
+*> CTRCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is REAL
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_lin
+*
+* =====================================================================
SUBROUTINE CTRT06( RCOND, RCONDC, UPLO, DIAG, N, A, LDA, RWORK,
$ RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -15,60 +139,6 @@
COMPLEX A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* CTRT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by CTRCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) REAL
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) REAL
-* The estimate of the reciprocal condition number computed by
-* CTRCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RAT (output) REAL
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ctzt01.f b/TESTING/LIN/ctzt01.f
index f06881a7..8ecfcad1 100644
--- a/TESTING/LIN/ctzt01.f
+++ b/TESTING/LIN/ctzt01.f
@@ -1,52 +1,117 @@
- REAL FUNCTION CTZT01( M, N, A, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b CTZT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CTZT01( M, N, A, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CTZT01 returns
-* || A - R*Q || / ( M * eps * ||A|| )
-* for an upper trapezoidal A that was factored with CTZRQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTZT01 returns
+*> || A - R*Q || / ( M * eps * ||A|| )
+*> for an upper trapezoidal A that was factored with CTZRQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The original upper trapezoidal M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> The output of CTZRQF for input matrix A.
+*> The lower triangle is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> CTZRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= m*n + m.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX array, dimension (LDA,N)
-* The original upper trapezoidal M by N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* The output of CTZRQF for input matrix A.
-* The lower triangle is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \ingroup complex_lin
*
-* TAU (input) COMPLEX array, dimension (M)
-* Details of the Householder transformations as returned by
-* CTZRQF.
+* =====================================================================
+ REAL FUNCTION CTZT01( M, N, A, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= m*n + m.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ctzt02.f b/TESTING/LIN/ctzt02.f
index f1166635..371a584e 100644
--- a/TESTING/LIN/ctzt02.f
+++ b/TESTING/LIN/ctzt02.f
@@ -1,48 +1,109 @@
- REAL FUNCTION CTZT02( M, N, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX AF( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b CTZT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION CTZT02( M, N, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* CTZT02 returns
-* || I - Q'*Q || / ( M * eps)
-* where the matrix Q is defined by the Householder transformations
-* generated by CTZRQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CTZT02 returns
+*> || I - Q'*Q || / ( M * eps)
+*> where the matrix Q is defined by the Householder transformations
+*> generated by CTZRQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX array, dimension (LDA,N)
+*> The output of CTZRQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> CTZRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of WORK array. Must be >= N*N+N
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix AF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) COMPLEX array, dimension (LDA,N)
-* The output of CTZRQF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array AF.
+*> \ingroup complex_lin
*
-* TAU (input) COMPLEX array, dimension (M)
-* Details of the Householder transformations as returned by
-* CTZRQF.
+* =====================================================================
+ REAL FUNCTION CTZT02( M, N, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) COMPLEX array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of WORK array. Must be >= N*N+N
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dchkaa.f b/TESTING/LIN/dchkaa.f
index d6e5635b..d40973a5 100644
--- a/TESTING/LIN/dchkaa.f
+++ b/TESTING/LIN/dchkaa.f
@@ -1,77 +1,115 @@
- PROGRAM DCHKAA
+*> \brief \b DCHKAA
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* PROGRAM DCHKAA
+*
* Purpose
* =======
*
-* DCHKAA is the main test program for the DOUBLE PRECISION LAPACK
-* linear equation routines
-*
-* The program must be driven by a short data file. The first 14 records
-* specify problem dimensions and program options using list-directed
-* input. The remaining lines specify the LAPACK test paths and the
-* number of matrix types to use in testing. An annotated example of a
-* data file can be obtained by deleting the first 3 characters from the
-* following 36 lines:
-* Data file for testing DOUBLE PRECISION LAPACK linear eqn. routines
-* 7 Number of values of M
-* 0 1 2 3 5 10 16 Values of M (row dimension)
-* 7 Number of values of N
-* 0 1 2 3 5 10 16 Values of N (column dimension)
-* 1 Number of values of NRHS
-* 2 Values of NRHS (number of right hand sides)
-* 5 Number of values of NB
-* 1 3 3 3 20 Values of NB (the blocksize)
-* 1 0 5 9 1 Values of NX (crossover point)
-* 3 Number of values of RANK
-* 30 50 90 Values of rank (as a % of N)
-* 20.0 Threshold value of test ratio
-* T Put T to test the LAPACK routines
-* T Put T to test the driver routines
-* T Put T to test the error exits
-* DGE 11 List types on next line if 0 < NTYPES < 11
-* DGB 8 List types on next line if 0 < NTYPES < 8
-* DGT 12 List types on next line if 0 < NTYPES < 12
-* DPO 9 List types on next line if 0 < NTYPES < 9
-* DPS 9 List types on next line if 0 < NTYPES < 9
-* DPP 9 List types on next line if 0 < NTYPES < 9
-* DPB 8 List types on next line if 0 < NTYPES < 8
-* DPT 12 List types on next line if 0 < NTYPES < 12
-* DSY 10 List types on next line if 0 < NTYPES < 10
-* DSP 10 List types on next line if 0 < NTYPES < 10
-* DTR 18 List types on next line if 0 < NTYPES < 18
-* DTP 18 List types on next line if 0 < NTYPES < 18
-* DTB 17 List types on next line if 0 < NTYPES < 17
-* DQR 8 List types on next line if 0 < NTYPES < 8
-* DRQ 8 List types on next line if 0 < NTYPES < 8
-* DLQ 8 List types on next line if 0 < NTYPES < 8
-* DQL 8 List types on next line if 0 < NTYPES < 8
-* DQP 6 List types on next line if 0 < NTYPES < 6
-* DTZ 3 List types on next line if 0 < NTYPES < 3
-* DLS 6 List types on next line if 0 < NTYPES < 6
-* DEQ
-*
-* Internal Parameters
-* ===================
-*
-* NMAX INTEGER
-* The maximum allowable value for N
-*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, NRHS, NB, and NX
-*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
-*
-* NIN INTEGER
-* The unit number for input
-*
-* NOUT INTEGER
-* The unit number for output
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKAA is the main test program for the DOUBLE PRECISION LAPACK
+*> linear equation routines
+*>
+*> The program must be driven by a short data file. The first 14 records
+*> specify problem dimensions and program options using list-directed
+*> input. The remaining lines specify the LAPACK test paths and the
+*> number of matrix types to use in testing. An annotated example of a
+*> data file can be obtained by deleting the first 3 characters from the
+*> following 36 lines:
+*> Data file for testing DOUBLE PRECISION LAPACK linear eqn. routines
+*> 7 Number of values of M
+*> 0 1 2 3 5 10 16 Values of M (row dimension)
+*> 7 Number of values of N
+*> 0 1 2 3 5 10 16 Values of N (column dimension)
+*> 1 Number of values of NRHS
+*> 2 Values of NRHS (number of right hand sides)
+*> 5 Number of values of NB
+*> 1 3 3 3 20 Values of NB (the blocksize)
+*> 1 0 5 9 1 Values of NX (crossover point)
+*> 3 Number of values of RANK
+*> 30 50 90 Values of rank (as a % of N)
+*> 20.0 Threshold value of test ratio
+*> T Put T to test the LAPACK routines
+*> T Put T to test the driver routines
+*> T Put T to test the error exits
+*> DGE 11 List types on next line if 0 < NTYPES < 11
+*> DGB 8 List types on next line if 0 < NTYPES < 8
+*> DGT 12 List types on next line if 0 < NTYPES < 12
+*> DPO 9 List types on next line if 0 < NTYPES < 9
+*> DPS 9 List types on next line if 0 < NTYPES < 9
+*> DPP 9 List types on next line if 0 < NTYPES < 9
+*> DPB 8 List types on next line if 0 < NTYPES < 8
+*> DPT 12 List types on next line if 0 < NTYPES < 12
+*> DSY 10 List types on next line if 0 < NTYPES < 10
+*> DSP 10 List types on next line if 0 < NTYPES < 10
+*> DTR 18 List types on next line if 0 < NTYPES < 18
+*> DTP 18 List types on next line if 0 < NTYPES < 18
+*> DTB 17 List types on next line if 0 < NTYPES < 17
+*> DQR 8 List types on next line if 0 < NTYPES < 8
+*> DRQ 8 List types on next line if 0 < NTYPES < 8
+*> DLQ 8 List types on next line if 0 < NTYPES < 8
+*> DQL 8 List types on next line if 0 < NTYPES < 8
+*> DQP 6 List types on next line if 0 < NTYPES < 6
+*> DTZ 3 List types on next line if 0 < NTYPES < 3
+*> DLS 6 List types on next line if 0 < NTYPES < 6
+*> DEQ
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N
+*> \endverbatim
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, NRHS, NB, and NX
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ PROGRAM DCHKAA
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/dchkab.f b/TESTING/LIN/dchkab.f
index 5a86cfa1..dd17e8c0 100644
--- a/TESTING/LIN/dchkab.f
+++ b/TESTING/LIN/dchkab.f
@@ -1,54 +1,88 @@
- PROGRAM DCHKAB
- IMPLICIT NONE
+*> \brief \b DCHKAB
*
-* -- LAPACK test routine (version 3.2.1) --
+* =========== DOCUMENTATION ===========
*
-* -- April 2009 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Definition
+* ==========
*
+* PROGRAM DCHKAB
+*
* Purpose
* =======
*
-* DCHKAB is the test program for the DOUBLE PRECISION LAPACK
-* DSGESV/DSPOSV routine
-*
-* The program must be driven by a short data file. The first 5 records
-* specify problem dimensions and program options using list-directed
-* input. The remaining lines specify the LAPACK test paths and the
-* number of matrix types to use in testing. An annotated example of a
-* data file can be obtained by deleting the first 3 characters from the
-* following 10 lines:
-* Data file for testing DOUBLE PRECISION LAPACK DSGESV
-* 7 Number of values of M
-* 0 1 2 3 5 10 16 Values of M (row dimension)
-* 1 Number of values of NRHS
-* 2 Values of NRHS (number of right hand sides)
-* 20.0 Threshold value of test ratio
-* T Put T to test the LAPACK routines
-* T Put T to test the error exits
-* DGE 11 List types on next line if 0 < NTYPES < 11
-* DPO 9 List types on next line if 0 < NTYPES < 9
-*
-* Internal Parameters
-* ===================
-*
-* NMAX INTEGER
-* The maximum allowable value for N
-*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, NRHS, NB, and NX
-*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
-*
-* NIN INTEGER
-* The unit number for input
-*
-* NOUT INTEGER
-* The unit number for output
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKAB is the test program for the DOUBLE PRECISION LAPACK
+*> DSGESV/DSPOSV routine
+*>
+*> The program must be driven by a short data file. The first 5 records
+*> specify problem dimensions and program options using list-directed
+*> input. The remaining lines specify the LAPACK test paths and the
+*> number of matrix types to use in testing. An annotated example of a
+*> data file can be obtained by deleting the first 3 characters from the
+*> following 10 lines:
+*> Data file for testing DOUBLE PRECISION LAPACK DSGESV
+*> 7 Number of values of M
+*> 0 1 2 3 5 10 16 Values of M (row dimension)
+*> 1 Number of values of NRHS
+*> 2 Values of NRHS (number of right hand sides)
+*> 20.0 Threshold value of test ratio
+*> T Put T to test the LAPACK routines
+*> T Put T to test the error exits
+*> DGE 11 List types on next line if 0 < NTYPES < 11
+*> DPO 9 List types on next line if 0 < NTYPES < 9
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N
+*> \endverbatim
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, NRHS, NB, and NX
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ PROGRAM DCHKAB
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/dchkeq.f b/TESTING/LIN/dchkeq.f
index 79ad0809..9963c91a 100644
--- a/TESTING/LIN/dchkeq.f
+++ b/TESTING/LIN/dchkeq.f
@@ -1,27 +1,70 @@
- SUBROUTINE DCHKEQ( THRESH, NOUT )
+*> \brief \b DCHKEQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NOUT
- DOUBLE PRECISION THRESH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DCHKEQ( THRESH, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NOUT
+* DOUBLE PRECISION THRESH
+* ..
+*
* Purpose
* =======
*
-* DCHKEQ tests DGEEQU, DGBEQU, DPOEQU, DPPEQU and DPBEQU
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKEQ tests DGEEQU, DGBEQU, DPOEQU, DPPEQU and DPBEQU
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* THRESH (input) DOUBLE PRECISION
-* Threshold for testing routines. Should be between 2 and 10.
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> Threshold for testing routines. Should be between 2 and 10.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DCHKEQ( THRESH, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NOUT
+ DOUBLE PRECISION THRESH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dchkgb.f b/TESTING/LIN/dchkgb.f
index 6d23ae91..bf90ad50 100644
--- a/TESTING/LIN/dchkgb.f
+++ b/TESTING/LIN/dchkgb.f
@@ -1,10 +1,202 @@
+*> \brief \b DCHKGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
+* NSVAL, THRESH, TSTERR, A, LA, AFAC, LAFAC, B,
+* X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFAC, NM, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), B( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKGB tests DGBTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (KLMAX+KUMAX+1)*NMAX
+*> where KLMAX is the largest entry in the local array KLVAL,
+*> KUMAX is the largest entry in the local array KUVAL and
+*> NMAX is the largest entry in the input array NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (LAFAC)
+*> \endverbatim
+*>
+*> \param[in] LAFAC
+*> \verbatim
+*> LAFAC is INTEGER
+*> The length of the array AFAC. LAFAC >= (2*KLMAX+KUMAX+1)*NMAX
+*> where KLMAX is the largest entry in the local array KLVAL,
+*> KUMAX is the largest entry in the local array KUVAL and
+*> NMAX is the largest entry in the input array NVAL.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
$ NSVAL, THRESH, TSTERR, A, LA, AFAC, LAFAC, B,
$ X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,85 +211,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKGB tests DGBTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (KLMAX+KUMAX+1)*NMAX
-* where KLMAX is the largest entry in the local array KLVAL,
-* KUMAX is the largest entry in the local array KUVAL and
-* NMAX is the largest entry in the input array NVAL.
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (LAFAC)
-*
-* LAFAC (input) INTEGER
-* The length of the array AFAC. LAFAC >= (2*KLMAX+KUMAX+1)*NMAX
-* where KLMAX is the largest entry in the local array KLVAL,
-* KUMAX is the largest entry in the local array KUVAL and
-* NMAX is the largest entry in the input array NVAL.
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX,NMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkge.f b/TESTING/LIN/dchkge.f
index 9d2a9764..27ae0af4 100644
--- a/TESTING/LIN/dchkge.f
+++ b/TESTING/LIN/dchkge.f
@@ -1,13 +1,196 @@
+*> \brief \b DCHKGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
+* NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
+* X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKGE tests DGETRF, -TRI, -TRS, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(2*NMAX,2*NSMAX+NWORK))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
$ NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
$ X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-*
-* -- April 2009 --
-*
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -22,79 +205,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKGE tests DGETRF, -TRI, -TRS, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(2*NMAX,2*NSMAX+NWORK))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkgt.f b/TESTING/LIN/dchkgt.f
index 30202843..91dfbc6c 100644
--- a/TESTING/LIN/dchkgt.f
+++ b/TESTING/LIN/dchkgt.f
@@ -1,9 +1,157 @@
+*> \brief \b DCHKGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AF( * ), B( * ), RWORK( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKGT tests DGTTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,61 +165,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKGT tests DGTTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*4)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*4)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchklq.f b/TESTING/LIN/dchklq.f
index 310c8020..5a09592a 100644
--- a/TESTING/LIN/dchklq.f
+++ b/TESTING/LIN/dchklq.f
@@ -1,10 +1,207 @@
+*> \brief \b DCHKLQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
+* B, X, XACT, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION A( * ), AC( * ), AF( * ), AL( * ), AQ( * ),
+* $ B( * ), RWORK( * ), TAU( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKLQ tests DGELQF, DORGLQ and DORMLQ.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AL
+*> \verbatim
+*> AL is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
$ B, X, XACT, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +217,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKLQ tests DGELQF, DORGLQ and DORMLQ.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AL (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkpb.f b/TESTING/LIN/dchkpb.f
index b762be21..509d792d 100644
--- a/TESTING/LIN/dchkpb.f
+++ b/TESTING/LIN/dchkpb.f
@@ -1,10 +1,183 @@
+*> \brief \b DCHKPB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKPB( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKPB tests DPBTRF, -TRS, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKPB( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,73 +191,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKPB tests DPBTRF, -TRS, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkpo.f b/TESTING/LIN/dchkpo.f
index 9535b1aa..746dc640 100644
--- a/TESTING/LIN/dchkpo.f
+++ b/TESTING/LIN/dchkpo.f
@@ -1,10 +1,183 @@
+*> \brief \b DCHKPO
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKPO( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKPO tests DPOTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKPO( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,73 +191,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKPO tests DPOTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkpp.f b/TESTING/LIN/dchkpp.f
index 4f07f855..e498575f 100644
--- a/TESTING/LIN/dchkpp.f
+++ b/TESTING/LIN/dchkpp.f
@@ -1,10 +1,174 @@
+*> \brief \b DCHKPP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKPP tests DPPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,70 +182,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKPP tests DPPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkps.f b/TESTING/LIN/dchkps.f
index 6d7a884d..9b956223 100644
--- a/TESTING/LIN/dchkps.f
+++ b/TESTING/LIN/dchkps.f
@@ -1,10 +1,165 @@
+*> \brief \b DCHKPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKPS( DOTYPE, NN, NVAL, NNB, NBVAL, NRANK, RANKVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, PERM, PIV, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION THRESH
+* INTEGER NMAX, NN, NNB, NOUT, NRANK
+* LOGICAL TSTERR
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( * ), AFAC( * ), PERM( * ), RWORK( * ),
+* $ WORK( * )
+* INTEGER NBVAL( * ), NVAL( * ), PIV( * ), RANKVAL( * )
+* LOGICAL DOTYPE( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKPS tests DPSTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the block size NB.
+*> \endverbatim
+*>
+*> \param[in] NRANK
+*> \verbatim
+*> NRANK is INTEGER
+*> The number of values of RANK contained in the vector RANKVAL.
+*> \endverbatim
+*>
+*> \param[in] RANKVAL
+*> \verbatim
+*> RANKVAL is INTEGER array, dimension (NBVAL)
+*> The values of the block size NB.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*3)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKPS( DOTYPE, NN, NVAL, NNB, NBVAL, NRANK, RANKVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, PERM, PIV, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION THRESH
@@ -18,64 +173,6 @@
LOGICAL DOTYPE( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKPS tests DPSTRF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the block size NB.
-*
-* NRANK (input) INTEGER
-* The number of values of RANK contained in the vector RANKVAL.
-*
-* RANKVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the block size NB.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* PERM (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* PIV (workspace) INTEGER array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*3)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkpt.f b/TESTING/LIN/dchkpt.f
index 297c04ea..cf58d019 100644
--- a/TESTING/LIN/dchkpt.f
+++ b/TESTING/LIN/dchkpt.f
@@ -1,9 +1,157 @@
+*> \brief \b DCHKPT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* A, D, E, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), B( * ), D( * ), E( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKPT tests DPTTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ A, D, E, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,61 +165,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKPT tests DPTTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*2)
-*
-* D (workspace) DOUBLE PRECISION array, dimension (NMAX*2)
-*
-* E (workspace) DOUBLE PRECISION array, dimension (NMAX*2)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkq3.f b/TESTING/LIN/dchkq3.f
index 00815921..1895f524 100644
--- a/TESTING/LIN/dchkq3.f
+++ b/TESTING/LIN/dchkq3.f
@@ -1,10 +1,164 @@
+*> \brief \b DCHKQ3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* THRESH, A, COPYA, S, TAU, WORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NM, NN, NNB, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION A( * ), COPYA( * ), S( * ),
+* $ TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKQ3 tests DGEQP3.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is DOUBLE PRECISION array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ THRESH, A, COPYA, S, TAU, WORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NM, NN, NNB, NOUT
@@ -18,66 +172,6 @@
$ TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKQ3 tests DGEQP3.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) DOUBLE PRECISION array, dimension (MMAX*NMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (MMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkql.f b/TESTING/LIN/dchkql.f
index e7b8d433..d4d20277 100644
--- a/TESTING/LIN/dchkql.f
+++ b/TESTING/LIN/dchkql.f
@@ -1,10 +1,212 @@
+*> \brief \b DCHKQL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION A( * ), AC( * ), AF( * ), AL( * ), AQ( * ),
+* $ B( * ), RWORK( * ), TAU( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKQL tests DGEQLF, DORGQL and DORMQL.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AL
+*> \verbatim
+*> AL is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKQL tests DGEQLF, DORGQL and DORMQL.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AL (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkqp.f b/TESTING/LIN/dchkqp.f
index 2bee2177..e4520422 100644
--- a/TESTING/LIN/dchkqp.f
+++ b/TESTING/LIN/dchkqp.f
@@ -1,9 +1,148 @@
+*> \brief \b DCHKQP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
+* COPYA, S, TAU, WORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), COPYA( * ), S( * ),
+* $ TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKQP tests DGEQPF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is DOUBLE PRECISION array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
$ COPYA, S, TAU, WORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,58 +156,6 @@
$ TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKQP tests DGEQPF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) DOUBLE PRECISION array, dimension (MMAX*NMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (MMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkqr.f b/TESTING/LIN/dchkqr.f
index ba43b88c..1b709b5b 100644
--- a/TESTING/LIN/dchkqr.f
+++ b/TESTING/LIN/dchkqr.f
@@ -1,10 +1,212 @@
+*> \brief \b DCHKQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION A( * ), AC( * ), AF( * ), AQ( * ), AR( * ),
+* $ B( * ), RWORK( * ), TAU( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKQR tests DGEQRF, DORGQR and DORMQR.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKQR tests DGEQRF, DORGQR and DORMQR.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AR (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchkrfp.f b/TESTING/LIN/dchkrfp.f
index 3e8a4e4b..0bddc664 100644
--- a/TESTING/LIN/dchkrfp.f
+++ b/TESTING/LIN/dchkrfp.f
@@ -1,37 +1,75 @@
- PROGRAM DCHKRFP
- IMPLICIT NONE
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+*> \brief \b DCHKRFP
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* DCHKRFP is the main test program for the DOUBLE PRECISION linear
-* equation routines with RFP storage format
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
*
-* Internal Parameters
-* ===================
+* PROGRAM DCHKRFP
+*
+* Purpose
+* =======
*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, or NB
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKRFP is the main test program for the DOUBLE PRECISION linear
+*> equation routines with RFP storage format
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, or NB
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> \endverbatim
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N.
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NTYPES INTEGER
+*> \date November 2011
*
-* NMAX INTEGER
-* The maximum allowable value for N.
+*> \ingroup double_lin
*
-* NIN INTEGER
-* The unit number for input
+* =====================================================================
+ PROGRAM DCHKRFP
*
-* NOUT INTEGER
-* The unit number for output
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/dchkrq.f b/TESTING/LIN/dchkrq.f
index e330f416..4f8729af 100644
--- a/TESTING/LIN/dchkrq.f
+++ b/TESTING/LIN/dchkrq.f
@@ -1,10 +1,212 @@
+*> \brief \b DCHKRQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION A( * ), AC( * ), AF( * ), AQ( * ), AR( * ),
+* $ B( * ), RWORK( * ), TAU( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKRQ tests DGERQF, DORGRQ and DORMRQ.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKRQ tests DGERQF, DORGRQ and DORMRQ.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AR (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchksp.f b/TESTING/LIN/dchksp.f
index bda506f8..c56153f3 100644
--- a/TESTING/LIN/dchksp.f
+++ b/TESTING/LIN/dchksp.f
@@ -1,10 +1,174 @@
+*> \brief \b DCHKSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKSP tests DSPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(2,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,70 +182,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKSP tests DSPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(2,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array,
-* dimension (NMAX+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchksy.f b/TESTING/LIN/dchksy.f
index 785a49d2..62cc07c7 100644
--- a/TESTING/LIN/dchksy.f
+++ b/TESTING/LIN/dchksy.f
@@ -1,10 +1,183 @@
+*> \brief \b DCHKSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKSY tests DSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,73 +191,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKSY tests DSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchktb.f b/TESTING/LIN/dchktb.f
index f0d4b8aa..0d1f5f88 100644
--- a/TESTING/LIN/dchktb.f
+++ b/TESTING/LIN/dchktb.f
@@ -1,10 +1,166 @@
+*> \brief \b DCHKTB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, AB, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION AB( * ), AINV( * ), B( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKTB tests DTBTRS, -RFS, and -CON, and DLATBS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays.
+*> NMAX >= the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, AB, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,65 +174,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKTB tests DTBTRS, -RFS, and -CON, and DLATBS.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays.
-* NMAX >= the maximum value of N in NVAL.
-*
-* AB (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchktp.f b/TESTING/LIN/dchktp.f
index 0e378654..ded8b6a1 100644
--- a/TESTING/LIN/dchktp.f
+++ b/TESTING/LIN/dchktp.f
@@ -1,10 +1,168 @@
+*> \brief \b DCHKTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION AINVP( * ), AP( * ), B( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKTP tests DTPTRI, -TRS, -RFS, and -CON, and DLATPS
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays. NMAX >= the
+*> maximumm value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINVP
+*> \verbatim
+*> AINVP is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,67 +176,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKTP tests DTPTRI, -TRS, -RFS, and -CON, and DLATPS
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays. NMAX >= the
-* maximumm value of N in NVAL.
-*
-* AP (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINVP (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchktr.f b/TESTING/LIN/dchktr.f
index 0503c703..9b648e7b 100644
--- a/TESTING/LIN/dchktr.f
+++ b/TESTING/LIN/dchktr.f
@@ -1,10 +1,178 @@
+*> \brief \b DCHKTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AINV, B, X, XACT,
+* WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AINV( * ), B( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKTR tests DTRTRI, -TRS, -RFS, and -CON, and DLATRS
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays.
+*> NMAX >= the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AINV, B, X, XACT,
$ WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,71 +186,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKTR tests DTRTRI, -TRS, -RFS, and -CON, and DLATRS
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays.
-* NMAX >= the maximum value of N in NVAL.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dchktz.f b/TESTING/LIN/dchktz.f
index 9e504be3..ffef2589 100644
--- a/TESTING/LIN/dchktz.f
+++ b/TESTING/LIN/dchktz.f
@@ -1,9 +1,143 @@
+*> \brief \b DCHKTZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
+* COPYA, S, TAU, WORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), COPYA( * ), S( * ),
+* $ TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DCHKTZ tests DTZRQF and STZRZF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is DOUBLE PRECISION array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
$ COPYA, S, TAU, WORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,56 +151,6 @@
$ TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DCHKTZ tests DTZRQF and STZRZF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) DOUBLE PRECISION array, dimension (MMAX*NMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (MMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvab.f b/TESTING/LIN/ddrvab.f
index 3c8c233e..5c425084 100644
--- a/TESTING/LIN/ddrvab.f
+++ b/TESTING/LIN/ddrvab.f
@@ -1,11 +1,162 @@
+*> \brief \b DDRVAB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVAB( DOTYPE, NM, MVAL, NNS,
+* NSVAL, THRESH, NMAX, A, AFAC, B,
+* X, WORK, RWORK, SWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NM, NMAX, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NSVAL( * ), IWORK( * )
+* REAL SWORK(*)
+* DOUBLE PRECISION A( * ), AFAC( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVAB tests DSGESV
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(2*NMAX,2*NSMAX+NWORK))
+*> \endverbatim
+*>
+*> \param[out] SWORK
+*> \verbatim
+*> SWORK is REAL array, dimension
+*> (NMAX*(NSMAX+NMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension
+*> NMAX
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVAB( DOTYPE, NM, MVAL, NNS,
$ NSVAL, THRESH, NMAX, A, AFAC, B,
$ X, WORK, RWORK, SWORK, IWORK, NOUT )
- IMPLICIT NONE
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NM, NMAX, NNS, NOUT
@@ -19,64 +170,6 @@
$ RWORK( * ), WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVAB tests DSGESV
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(2*NMAX,2*NSMAX+NWORK))
-*
-* SWORK (workspace) REAL array, dimension
-* (NMAX*(NSMAX+NMAX))
-*
-* IWORK (workspace) INTEGER array, dimension
-* NMAX
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvac.f b/TESTING/LIN/ddrvac.f
index 02eb36c9..952b84ff 100644
--- a/TESTING/LIN/ddrvac.f
+++ b/TESTING/LIN/ddrvac.f
@@ -1,10 +1,155 @@
+*> \brief \b DDRVAC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVAC( DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX,
+* A, AFAC, B, X, WORK,
+* RWORK, SWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NMAX, NM, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NSVAL( * )
+* REAL SWORK(*)
+* DOUBLE PRECISION A( * ), AFAC( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVAC tests DSPOSV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of N contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(2*NMAX,2*NSMAX+NWORK))
+*> \endverbatim
+*>
+*> \param[out] SWORK
+*> \verbatim
+*> SWORK is REAL array, dimension
+*> (NMAX*(NSMAX+NMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVAC( DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX,
$ A, AFAC, B, X, WORK,
$ RWORK, SWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NMAX, NM, NNS, NOUT
@@ -18,60 +163,6 @@
$ RWORK( * ), WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVAC tests DSPOSV.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of N contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(2*NMAX,2*NSMAX+NWORK))
-*
-* SWORK (workspace) REAL array, dimension
-* (NMAX*(NSMAX+NMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvgb.f b/TESTING/LIN/ddrvgb.f
index 298f8fbc..e6d49c46 100644
--- a/TESTING/LIN/ddrvgb.f
+++ b/TESTING/LIN/ddrvgb.f
@@ -1,10 +1,183 @@
+*> \brief \b DDRVGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
+* AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFB, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
+* $ RWORK( * ), S( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVGB tests the driver routines DGBSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (2*NMAX-1)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LAFB)
+*> \endverbatim
+*>
+*> \param[in] LAFB
+*> \verbatim
+*> LAFB is INTEGER
+*> The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
$ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,72 +192,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVGB tests the driver routines DGBSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (2*NMAX-1)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* AFB (workspace) DOUBLE PRECISION array, dimension (LAFB)
-*
-* LAFB (input) INTEGER
-* The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (LA)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS,NMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvgbx.f b/TESTING/LIN/ddrvgbx.f
index 4be73fe5..f0699535 100644
--- a/TESTING/LIN/ddrvgbx.f
+++ b/TESTING/LIN/ddrvgbx.f
@@ -1,10 +1,186 @@
+*> \brief \b DDRVGBX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
+* AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFB, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
+* $ RWORK( * ), S( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVGB tests the driver routines DGBSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise ddrvgb.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (2*NMAX-1)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFB
+*> \verbatim
+*> AFB is DOUBLE PRECISION array, dimension (LAFB)
+*> \endverbatim
+*>
+*> \param[in] LAFB
+*> \verbatim
+*> LAFB is INTEGER
+*> The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
$ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,75 +195,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVGB tests the driver routines DGBSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise ddrvgb.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (2*NMAX-1)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* AFB (workspace) DOUBLE PRECISION array, dimension (LAFB)
-*
-* LAFB (input) INTEGER
-* The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (LA)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS,NMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvge.f b/TESTING/LIN/ddrvge.f
index 8bfb78c7..a407dcaf 100644
--- a/TESTING/LIN/ddrvge.f
+++ b/TESTING/LIN/ddrvge.f
@@ -1,10 +1,175 @@
+*> \brief \b DDRVGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVGE tests the driver routines DGESV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*NRHS+NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,67 +184,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVGE tests the driver routines DGESV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*NRHS+NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvgex.f b/TESTING/LIN/ddrvgex.f
index 17fe1f45..4eb3c1db 100644
--- a/TESTING/LIN/ddrvgex.f
+++ b/TESTING/LIN/ddrvgex.f
@@ -1,10 +1,178 @@
+*> \brief \b DDRVGEX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVGE tests the driver routines DGESV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise ddrvge.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*NRHS+NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +187,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVGE tests the driver routines DGESV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise ddrvge.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*NRHS+NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvgt.f b/TESTING/LIN/ddrvgt.f
index a8675c88..ca2204a5 100644
--- a/TESTING/LIN/ddrvgt.f
+++ b/TESTING/LIN/ddrvgt.f
@@ -1,9 +1,144 @@
+*> \brief \b DDRVGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, AF,
+* B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AF( * ), B( * ), RWORK( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVGT tests DGTSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, AF,
$ B, X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,54 +152,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVGT tests DGTSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*4)
-*
-* AF (workspace) DOUBLE PRECISION array, dimension (NMAX*4)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvls.f b/TESTING/LIN/ddrvls.f
index 5bc1e93d..99cb26de 100644
--- a/TESTING/LIN/ddrvls.f
+++ b/TESTING/LIN/ddrvls.f
@@ -1,10 +1,214 @@
+*> \brief \b DDRVLS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
+* NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
+* COPYB, C, S, COPYS, WORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * ), NXVAL( * )
+* DOUBLE PRECISION A( * ), B( * ), C( * ), COPYA( * ), COPYB( * ),
+* $ COPYS( * ), S( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVLS tests the least squares driver routines DGELS, DGELSS, DGELSX,
+*> DGELSY and DGELSD.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> The matrix of type j is generated as follows:
+*> j=1: A = U*D*V where U and V are random orthogonal matrices
+*> and D has random entries (> 0.1) taken from a uniform
+*> distribution (0,1). A is full rank.
+*> j=2: The same of 1, but A is scaled up.
+*> j=3: The same of 1, but A is scaled down.
+*> j=4: A = U*D*V where U and V are random orthogonal matrices
+*> and D has 3*min(M,N)/4 random entries (> 0.1) taken
+*> from a uniform distribution (0,1) and the remaining
+*> entries set to 0. A is rank-deficient.
+*> j=5: The same of 4, but A is scaled up.
+*> j=6: The same of 5, but A is scaled down.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is DOUBLE PRECISION array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (MMAX*NSMAX)
+*> where MMAX is the maximum value of M in MVAL and NSMAX is the
+*> maximum value of NRHS in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYB
+*> \verbatim
+*> COPYB is DOUBLE PRECISION array, dimension (MMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (MMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] COPYS
+*> \verbatim
+*> COPYS is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array,
+*> dimension (MMAX*NMAX + 4*NMAX + MMAX).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (15*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
$ NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
$ COPYB, C, S, COPYS, WORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,97 +223,6 @@
$ COPYS( * ), S( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVLS tests the least squares driver routines DGELS, DGELSS, DGELSX,
-* DGELSY and DGELSD.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-* The matrix of type j is generated as follows:
-* j=1: A = U*D*V where U and V are random orthogonal matrices
-* and D has random entries (> 0.1) taken from a uniform
-* distribution (0,1). A is full rank.
-* j=2: The same of 1, but A is scaled up.
-* j=3: The same of 1, but A is scaled down.
-* j=4: A = U*D*V where U and V are random orthogonal matrices
-* and D has 3*min(M,N)/4 random entries (> 0.1) taken
-* from a uniform distribution (0,1) and the remaining
-* entries set to 0. A is rank-deficient.
-* j=5: The same of 4, but A is scaled up.
-* j=6: The same of 5, but A is scaled down.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) DOUBLE PRECISION array, dimension (MMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (MMAX*NSMAX)
-* where MMAX is the maximum value of M in MVAL and NSMAX is the
-* maximum value of NRHS in NSVAL.
-*
-* COPYB (workspace) DOUBLE PRECISION array, dimension (MMAX*NSMAX)
-*
-* C (workspace) DOUBLE PRECISION array, dimension (MMAX*NSMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* COPYS (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* WORK (workspace) DOUBLE PRECISION array,
-* dimension (MMAX*NMAX + 4*NMAX + MMAX).
-*
-* IWORK (workspace) INTEGER array, dimension (15*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvpb.f b/TESTING/LIN/ddrvpb.f
index 7752c3f9..01676fb4 100644
--- a/TESTING/LIN/ddrvpb.f
+++ b/TESTING/LIN/ddrvpb.f
@@ -1,10 +1,175 @@
+*> \brief \b DDRVPB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVPB tests the driver routines DPBSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,67 +184,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVPB tests the driver routines DPBSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvpo.f b/TESTING/LIN/ddrvpo.f
index e9f94a57..314571e7 100644
--- a/TESTING/LIN/ddrvpo.f
+++ b/TESTING/LIN/ddrvpo.f
@@ -1,10 +1,175 @@
+*> \brief \b DDRVPO
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVPO tests the driver routines DPOSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,67 +184,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVPO tests the driver routines DPOSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvpox.f b/TESTING/LIN/ddrvpox.f
index a737c169..5a0d4f2e 100644
--- a/TESTING/LIN/ddrvpox.f
+++ b/TESTING/LIN/ddrvpox.f
@@ -1,10 +1,178 @@
+*> \brief \b DDRVPOX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVPO tests the driver routines DPOSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise ddrvpo.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +187,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVPO tests the driver routines DPOSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise ddrvpo.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvpp.f b/TESTING/LIN/ddrvpp.f
index c8ee4f81..94cba42e 100644
--- a/TESTING/LIN/ddrvpp.f
+++ b/TESTING/LIN/ddrvpp.f
@@ -1,10 +1,178 @@
+*> \brief \b DDRVPP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVPP tests the driver routines DPPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +187,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVPP tests the driver routines DPPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvpt.f b/TESTING/LIN/ddrvpt.f
index 0203b24e..cbc38517 100644
--- a/TESTING/LIN/ddrvpt.f
+++ b/TESTING/LIN/ddrvpt.f
@@ -1,9 +1,151 @@
+*> \brief \b DDRVPT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
+* E, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* DOUBLE PRECISION A( * ), B( * ), D( * ), E( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVPT tests DPTSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
$ E, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,58 +159,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVPT tests DPTSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*2)
-*
-* D (workspace) DOUBLE PRECISION array, dimension (NMAX*2)
-*
-* E (workspace) DOUBLE PRECISION array, dimension (NMAX*2)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NRHS))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvrf1.f b/TESTING/LIN/ddrvrf1.f
index 7a06256a..58d43401 100644
--- a/TESTING/LIN/ddrvrf1.f
+++ b/TESTING/LIN/ddrvrf1.f
@@ -1,49 +1,114 @@
- SUBROUTINE DDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
-*
-* .. Scalar Arguments ..
- INTEGER LDA, NN, NOUT
- DOUBLE PRECISION THRESH
-* ..
-* .. Array Arguments ..
- INTEGER NVAL( NN )
- DOUBLE PRECISION A( LDA, * ), ARF( * ), WORK( * )
-* ..
-*
+*> \brief \b DDRVRF1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* DOUBLE PRECISION A( LDA, * ), ARF( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DDRVRF1 tests the LAPACK RFP routines:
-* DLANSF
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVRF1 tests the LAPACK RFP routines:
+*> DLANSF
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
+*> \date November 2011
*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \ingroup double_lin
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
+* =====================================================================
+ SUBROUTINE DDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
*
-* ARF (workspace) DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2).
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( NMAX )
+* .. Scalar Arguments ..
+ INTEGER LDA, NN, NOUT
+ DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER NVAL( NN )
+ DOUBLE PRECISION A( LDA, * ), ARF( * ), WORK( * )
+* ..
*
* =====================================================================
* ..
diff --git a/TESTING/LIN/ddrvrf2.f b/TESTING/LIN/ddrvrf2.f
index e5a8e3ce..0838733f 100644
--- a/TESTING/LIN/ddrvrf2.f
+++ b/TESTING/LIN/ddrvrf2.f
@@ -1,44 +1,108 @@
- SUBROUTINE DDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
-*
-* .. Scalar Arguments ..
- INTEGER LDA, NN, NOUT
-* ..
-* .. Array Arguments ..
- INTEGER NVAL( NN )
- DOUBLE PRECISION A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
-* ..
-*
+*> \brief \b DDRVRF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* DOUBLE PRECISION A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DDRVRF2 tests the LAPACK RFP convertion routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVRF2 tests the LAPACK RFP convertion routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] A2
+*> \verbatim
+*> A2 is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \ingroup double_lin
*
-* ARF (workspace) DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2).
+* =====================================================================
+ SUBROUTINE DDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
*
-* AP (workspace) DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2).
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* A2 (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
+* .. Scalar Arguments ..
+ INTEGER LDA, NN, NOUT
+* ..
+* .. Array Arguments ..
+ INTEGER NVAL( NN )
+ DOUBLE PRECISION A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
+* ..
*
* =====================================================================
* ..
diff --git a/TESTING/LIN/ddrvrf3.f b/TESTING/LIN/ddrvrf3.f
index dfed01dc..e9cf1719 100644
--- a/TESTING/LIN/ddrvrf3.f
+++ b/TESTING/LIN/ddrvrf3.f
@@ -1,9 +1,129 @@
+*> \brief \b DDRVRF3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
+* + D_WORK_DLANGE, D_WORK_DGEQRF, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* DOUBLE PRECISION A( LDA, * ), ARF( * ), B1( LDA, * ),
+* + B2( LDA, * ), D_WORK_DGEQRF( * ),
+* + D_WORK_DLANGE( * ), TAU( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVRF3 tests the LAPACK RFP routines:
+*> DTFSM
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] B1
+*> \verbatim
+*> B1 is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] B2
+*> \verbatim
+*> B2 is DOUBLE PRECISION array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DLANGE
+*> \verbatim
+*> D_WORK_DLANGE is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DGEQRF
+*> \verbatim
+*> D_WORK_DGEQRF is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
+ D_WORK_DLANGE, D_WORK_DGEQRF, TAU )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, NN, NOUT
@@ -16,46 +136,6 @@
+ D_WORK_DLANGE( * ), TAU( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVRF3 tests the LAPACK RFP routines:
-* DTFSM
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* ARF (workspace) DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2).
-*
-* B1 (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
-*
-* B2 (workspace) DOUBLE PRECISION array, dimension (LDA,NMAX)
-*
-* D_WORK_DLANGE (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* D_WORK_DGEQRF (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* TAU (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
* =====================================================================
* ..
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvrf4.f b/TESTING/LIN/ddrvrf4.f
index 5a7c22bf..0a409c68 100644
--- a/TESTING/LIN/ddrvrf4.f
+++ b/TESTING/LIN/ddrvrf4.f
@@ -1,9 +1,129 @@
+*> \brief \b DDRVRF4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
+* + LDA, D_WORK_DLANGE )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDC, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* DOUBLE PRECISION A( LDA, * ), C1( LDC, * ), C2( LDC, *),
+* + CRF( * ), D_WORK_DLANGE( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVRF4 tests the LAPACK RFP routines:
+*> DSFRK
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To
+*> have every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] C1
+*> \verbatim
+*> C1 is DOUBLE PRECISION array,
+*> dimension (LDC,NMAX)
+*> \endverbatim
+*>
+*> \param[out] C2
+*> \verbatim
+*> C2 is DOUBLE PRECISION array,
+*> dimension (LDC,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] CRF
+*> \verbatim
+*> CRF is DOUBLE PRECISION array,
+*> dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array,
+*> dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DLANGE
+*> \verbatim
+*> D_WORK_DLANGE is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
+ LDA, D_WORK_DLANGE )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDC, NN, NOUT
@@ -15,50 +135,6 @@
+ CRF( * ), D_WORK_DLANGE( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVRF4 tests the LAPACK RFP routines:
-* DSFRK
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To
-* have every test ratio printed, use THRESH = 0.
-*
-* C1 (workspace) DOUBLE PRECISION array,
-* dimension (LDC,NMAX)
-*
-* C2 (workspace) DOUBLE PRECISION array,
-* dimension (LDC,NMAX)
-*
-* LDC (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,NMAX).
-*
-* CRF (workspace) DOUBLE PRECISION array,
-* dimension ((NMAX*(NMAX+1))/2).
-*
-* A (workspace) DOUBLE PRECISION array,
-* dimension (LDA,NMAX)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* D_WORK_DLANGE (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
* =====================================================================
* ..
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvrfp.f b/TESTING/LIN/ddrvrfp.f
index 90e57d01..665209ef 100644
--- a/TESTING/LIN/ddrvrfp.f
+++ b/TESTING/LIN/ddrvrfp.f
@@ -1,3 +1,243 @@
+*> \brief \b DDRVRFP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
+* + THRESH, A, ASAV, AFAC, AINV, B,
+* + BSAV, XACT, X, ARF, ARFINV,
+* + D_WORK_DLATMS, D_WORK_DPOT01, D_TEMP_DPOT02,
+* + D_TEMP_DPOT03, D_WORK_DLANSY,
+* + D_WORK_DPOT02, D_WORK_DPOT03 )
+*
+* .. Scalar Arguments ..
+* INTEGER NN, NNS, NNT, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN ), NSVAL( NNS ), NTVAL( NNT )
+* DOUBLE PRECISION A( * )
+* DOUBLE PRECISION AINV( * )
+* DOUBLE PRECISION ASAV( * )
+* DOUBLE PRECISION B( * )
+* DOUBLE PRECISION BSAV( * )
+* DOUBLE PRECISION AFAC( * )
+* DOUBLE PRECISION ARF( * )
+* DOUBLE PRECISION ARFINV( * )
+* DOUBLE PRECISION XACT( * )
+* DOUBLE PRECISION X( * )
+* DOUBLE PRECISION D_WORK_DLATMS( * )
+* DOUBLE PRECISION D_WORK_DPOT01( * )
+* DOUBLE PRECISION D_TEMP_DPOT02( * )
+* DOUBLE PRECISION D_TEMP_DPOT03( * )
+* DOUBLE PRECISION D_WORK_DLANSY( * )
+* DOUBLE PRECISION D_WORK_DPOT02( * )
+* DOUBLE PRECISION D_WORK_DPOT03( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVRFP tests the LAPACK RFP routines:
+*> DPFTRF, DPFTRS, and DPFTRI.
+*>
+*> This testing routine follow the same tests as DDRVPO (test for the full
+*> format Symmetric Positive Definite solver).
+*>
+*> The tests are performed in Full Format, convertion back and forth from
+*> full format to RFP format are performed using the routines DTRTTF and
+*> DTFTTR.
+*>
+*> First, a specific matrix A of size N is created. There is nine types of
+*> different matrixes possible.
+*> 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
+*> 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
+*> *3. First row and column zero 8. Scaled near underflow
+*> *4. Last row and column zero 9. Scaled near overflow
+*> *5. Middle row and column zero
+*> (* - tests error exits from DPFTRF, no test ratios are computed)
+*> A solution XACT of size N-by-NRHS is created and the associated right
+*> hand side B as well. Then DPFTRF is called to compute L (or U), the
+*> Cholesky factor of A. Then L (or U) is used to solve the linear system
+*> of equations AX = B. This gives X. Then L (or U) is used to compute the
+*> inverse of A, AINV. The following four tests are then performed:
+*> (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+*> where EPS is the machine precision, RCOND the condition number of A, and
+*> norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
+*> Errors occur when INFO parameter is not as expected. Failures occur when
+*> a test ratios is greater than THRES.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right-hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] NNT
+*> \verbatim
+*> NNT is INTEGER
+*> The number of values of MATRIX TYPE contained in the vector NTVAL.
+*> \endverbatim
+*>
+*> \param[in] NTVAL
+*> \verbatim
+*> NTVAL is INTEGER array, dimension (NNT)
+*> The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2)
+*> \endverbatim
+*>
+*> \param[out] ARFINV
+*> \verbatim
+*> ARFINV is DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2)
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DLATMS
+*> \verbatim
+*> D_WORK_DLATMS is DOUBLE PRECISION array, dimension ( 3*NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DPOT01
+*> \verbatim
+*> D_WORK_DPOT01 is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_TEMP_DPOT02
+*> \verbatim
+*> D_TEMP_DPOT02 is DOUBLE PRECISION array, dimension ( NMAX*MAXRHS )
+*> \endverbatim
+*>
+*> \param[out] D_TEMP_DPOT03
+*> \verbatim
+*> D_TEMP_DPOT03 is DOUBLE PRECISION array, dimension ( NMAX*NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DLATMS
+*> \verbatim
+*> D_WORK_DLATMS is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DLANSY
+*> \verbatim
+*> D_WORK_DLANSY is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DPOT02
+*> \verbatim
+*> D_WORK_DPOT02 is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_DPOT03
+*> \verbatim
+*> D_WORK_DPOT03 is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
+ THRESH, A, ASAV, AFAC, AINV, B,
+ BSAV, XACT, X, ARF, ARFINV,
@@ -6,8 +246,9 @@
+ D_WORK_DPOT02, D_WORK_DPOT03 )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NN, NNS, NNT, NOUT
@@ -34,107 +275,6 @@
DOUBLE PRECISION D_WORK_DPOT03( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVRFP tests the LAPACK RFP routines:
-* DPFTRF, DPFTRS, and DPFTRI.
-*
-* This testing routine follow the same tests as DDRVPO (test for the full
-* format Symmetric Positive Definite solver).
-*
-* The tests are performed in Full Format, convertion back and forth from
-* full format to RFP format are performed using the routines DTRTTF and
-* DTFTTR.
-*
-* First, a specific matrix A of size N is created. There is nine types of
-* different matrixes possible.
-* 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
-* 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
-* *3. First row and column zero 8. Scaled near underflow
-* *4. Last row and column zero 9. Scaled near overflow
-* *5. Middle row and column zero
-* (* - tests error exits from DPFTRF, no test ratios are computed)
-* A solution XACT of size N-by-NRHS is created and the associated right
-* hand side B as well. Then DPFTRF is called to compute L (or U), the
-* Cholesky factor of A. Then L (or U) is used to solve the linear system
-* of equations AX = B. This gives X. Then L (or U) is used to compute the
-* inverse of A, AINV. The following four tests are then performed:
-* (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
-* where EPS is the machine precision, RCOND the condition number of A, and
-* norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
-* Errors occur when INFO parameter is not as expected. Failures occur when
-* a test ratios is greater than THRES.
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right-hand sides NRHS.
-*
-* NNT (input) INTEGER
-* The number of values of MATRIX TYPE contained in the vector NTVAL.
-*
-* NTVAL (input) INTEGER array, dimension (NNT)
-* The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
-*
-* BSAV (workspace) DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*MAXRHS)
-*
-* ARF (workspace) DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2)
-*
-* ARFINV (workspace) DOUBLE PRECISION array, dimension ((NMAX*(NMAX+1))/2)
-*
-* D_WORK_DLATMS (workspace) DOUBLE PRECISION array, dimension ( 3*NMAX )
-*
-* D_WORK_DPOT01 (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
-* D_TEMP_DPOT02 (workspace) DOUBLE PRECISION array, dimension ( NMAX*MAXRHS )
-*
-* D_TEMP_DPOT03 (workspace) DOUBLE PRECISION array, dimension ( NMAX*NMAX )
-*
-* D_WORK_DLATMS (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
-* D_WORK_DLANSY (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
-* D_WORK_DPOT02 (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
-* D_WORK_DPOT03 (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvsp.f b/TESTING/LIN/ddrvsp.f
index 11414a18..7df5446e 100644
--- a/TESTING/LIN/ddrvsp.f
+++ b/TESTING/LIN/ddrvsp.f
@@ -1,10 +1,167 @@
+*> \brief \b DDRVSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVSP tests the driver routines DSPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,66 +175,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVSP tests the driver routines DSPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvsy.f b/TESTING/LIN/ddrvsy.f
index 40ffad44..a1a78fea 100644
--- a/TESTING/LIN/ddrvsy.f
+++ b/TESTING/LIN/ddrvsy.f
@@ -1,10 +1,164 @@
+*> \brief \b DDRVSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVSY tests the driver routines DSYSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,63 +172,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVSY tests the driver routines DSYSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ddrvsyx.f b/TESTING/LIN/ddrvsyx.f
index fca0f372..7dca8149 100644
--- a/TESTING/LIN/ddrvsyx.f
+++ b/TESTING/LIN/ddrvsyx.f
@@ -1,10 +1,167 @@
+*> \brief \b DDRVSYX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DDRVSY tests the driver routines DSYSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise ddrvsy.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,66 +175,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* DDRVSY tests the driver routines DSYSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise ddrvsy.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/debchvxx.f b/TESTING/LIN/debchvxx.f
index c988dd7e..42389dd3 100644
--- a/TESTING/LIN/debchvxx.f
+++ b/TESTING/LIN/debchvxx.f
@@ -1,76 +1,91 @@
- SUBROUTINE DEBCHVXX( THRESH, PATH )
- IMPLICIT NONE
-* .. Scalar Arguments ..
- DOUBLE PRECISION THRESH
- CHARACTER*3 PATH
-*
-* Purpose
-* ======
-*
-* DEBCHVXX will run D**SVXX on a series of Hilbert matrices and then
-* compare the error bounds returned by D**SVXX to see if the returned
-* answer indeed falls within those bounds.
+*> \brief \b DEBCHVXX
*
-* Eight test ratios will be computed. The tests will pass if they are .LT.
-* THRESH. There are two cases that are determined by 1 / (SQRT( N ) * EPS).
-* If that value is .LE. to the component wise reciprocal condition number,
-* it uses the guaranteed case, other wise it uses the unguaranteed case.
+* =========== DOCUMENTATION ===========
*
-* Test ratios:
-* Let Xc be X_computed and Xt be X_truth.
-* The norm used is the infinity norm.
-
-* Let A be the guaranteed case and B be the unguaranteed case.
-*
-* 1. Normwise guaranteed forward error bound.
-* A: norm ( abs( Xc - Xt ) / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ) and
-* ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N),10) * EPS.
-* If these conditions are met, the test ratio is set to be
-* ERRBND( *, nwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
-* B: For this case, CGESVXX should just return 1. If it is less than
-* one, treat it the same as in 1A. Otherwise it fails. (Set test
-* ratio to ERRBND( *, nwise_i, bnd_i ) * THRESH?)
-*
-* 2. Componentwise guaranteed forward error bound.
-* A: norm ( abs( Xc(j) - Xt(j) ) ) / norm (Xt(j)) .LE. ERRBND( *, cwise_i, bnd_i )
-* for all j .AND. ERRBND( *, cwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS.
-* If these conditions are met, the test ratio is set to be
-* ERRBND( *, cwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
-* B: Same as normwise test ratio.
-*
-* 3. Backwards error.
-* A: The test ratio is set to BERR/EPS.
-* B: Same test ratio.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* 4. Reciprocal condition number.
-* A: A condition number is computed with Xt and compared with the one
-* returned from CGESVXX. Let RCONDc be the RCOND returned by D**SVXX
-* and RCONDt be the RCOND from the truth value. Test ratio is set to
-* MAX(RCONDc/RCONDt, RCONDt/RCONDc).
-* B: Test ratio is set to 1 / (EPS * RCONDc).
+* Definition
+* ==========
*
-* 5. Reciprocal normwise condition number.
-* A: The test ratio is set to
-* MAX(ERRBND( *, nwise_i, cond_i ) / NCOND, NCOND / ERRBND( *, nwise_i, cond_i )).
-* B: Test ratio is set to 1 / (EPS * ERRBND( *, nwise_i, cond_i )).
-*
-* 6. Reciprocal componentwise condition number.
-* A: Test ratio is set to
-* MAX(ERRBND( *, cwise_i, cond_i ) / CCOND, CCOND / ERRBND( *, cwise_i, cond_i )).
-* B: Test ratio is set to 1 / (EPS * ERRBND( *, cwise_i, cond_i )).
+* SUBROUTINE DEBCHVXX( THRESH, PATH )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION THRESH
+* CHARACTER*3 PATH
+*
+* Purpose
+* =======
*
-* .. Parameters ..
-* NMAX is determined by the largest number in the inverse of the hilbert
-* matrix. Precision is exhausted when the largest entry in it is greater
-* than 2 to the power of the number of bits in the fraction of the data
-* type used plus one, which is 24 for single precision.
-* NMAX should be 6 for single and 11 for double.
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> ======
+*>
+*> DEBCHVXX will run D**SVXX on a series of Hilbert matrices and then
+*> compare the error bounds returned by D**SVXX to see if the returned
+*> answer indeed falls within those bounds.
+*>
+*> Eight test ratios will be computed. The tests will pass if they are .LT.
+*> THRESH. There are two cases that are determined by 1 / (SQRT( N ) * EPS).
+*> If that value is .LE. to the component wise reciprocal condition number,
+*> it uses the guaranteed case, other wise it uses the unguaranteed case.
+*>
+*> Test ratios:
+*> Let Xc be X_computed and Xt be X_truth.
+*> The norm used is the infinity norm.
+
+*> Let A be the guaranteed case and B be the unguaranteed case.
+*>
+*> 1. Normwise guaranteed forward error bound.
+*> A: norm ( abs( Xc - Xt ) / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ) and
+*> ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N),10) * EPS.
+*> If these conditions are met, the test ratio is set to be
+*> ERRBND( *, nwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
+*> B: For this case, CGESVXX should just return 1. If it is less than
+*> one, treat it the same as in 1A. Otherwise it fails. (Set test
+*> ratio to ERRBND( *, nwise_i, bnd_i ) * THRESH?)
+*>
+*> 2. Componentwise guaranteed forward error bound.
+*> A: norm ( abs( Xc(j) - Xt(j) ) ) / norm (Xt(j)) .LE. ERRBND( *, cwise_i, bnd_i )
+*> for all j .AND. ERRBND( *, cwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS.
+*> If these conditions are met, the test ratio is set to be
+*> ERRBND( *, cwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
+*> B: Same as normwise test ratio.
+*>
+*> 3. Backwards error.
+*> A: The test ratio is set to BERR/EPS.
+*> B: Same test ratio.
+*>
+*> 4. Reciprocal condition number.
+*> A: A condition number is computed with Xt and compared with the one
+*> returned from CGESVXX. Let RCONDc be the RCOND returned by D**SVXX
+*> and RCONDt be the RCOND from the truth value. Test ratio is set to
+*> MAX(RCONDc/RCONDt, RCONDt/RCONDc).
+*> B: Test ratio is set to 1 / (EPS * RCONDc).
+*>
+*> 5. Reciprocal normwise condition number.
+*> A: The test ratio is set to
+*> MAX(ERRBND( *, nwise_i, cond_i ) / NCOND, NCOND / ERRBND( *, nwise_i, cond_i )).
+*> B: Test ratio is set to 1 / (EPS * ERRBND( *, nwise_i, cond_i )).
+*>
+*> 6. Reciprocal componentwise condition number.
+*> A: Test ratio is set to
+*> MAX(ERRBND( *, cwise_i, cond_i ) / CCOND, CCOND / ERRBND( *, cwise_i, cond_i )).
+*> B: Test ratio is set to 1 / (EPS * ERRBND( *, cwise_i, cond_i )).
+*>
+*> .. Parameters ..
+*> NMAX is determined by the largest number in the inverse of the hilbert
+*> matrix. Precision is exhausted when the largest entry in it is greater
+*> than 2 to the power of the number of bits in the fraction of the data
+*> type used plus one, which is 24 for single precision.
+*> NMAX should be 6 for single and 11 for double.
INTEGER NMAX, NPARAMS, NERRBND, NTESTS, KL, KU
PARAMETER (NMAX = 10, NPARAMS = 2, NERRBND = 3,
$ NTESTS = 6)
-* .. Local Scalars ..
+*> .. Local Scalars ..
INTEGER N, NRHS, INFO, I ,J, k, NFAIL, LDA,
$ N_AUX_TESTS, LDAB, LDAFB
CHARACTER FACT, TRANS, UPLO, EQUED
@@ -84,7 +99,7 @@
$ CWISE_RCOND, NWISE_RCOND,
$ CONDTHRESH, ERRTHRESH
-* .. Local Arrays ..
+*> .. Local Arrays ..
DOUBLE PRECISION TSTRAT(NTESTS), RINV(NMAX), PARAMS(NPARAMS),
$ S(NMAX),R(NMAX),C(NMAX), DIFF(NMAX, NMAX),
$ ERRBND_N(NMAX*3), ERRBND_C(NMAX*3),
@@ -96,24 +111,24 @@
$ ACOPY(NMAX, NMAX)
INTEGER IPIV(NMAX), IWORK(3*NMAX)
-* .. External Functions ..
+*> .. External Functions ..
DOUBLE PRECISION DLAMCH
-* .. External Subroutines ..
+*> .. External Subroutines ..
EXTERNAL DLAHILB, DGESVXX, DPOSVXX, DSYSVXX,
$ DGBSVXX, DLACPY, LSAMEN
LOGICAL LSAMEN
-* .. Intrinsic Functions ..
+*> .. Intrinsic Functions ..
INTRINSIC SQRT, MAX, ABS, DBLE
-* .. Parameters ..
+*> .. Parameters ..
INTEGER NWISE_I, CWISE_I
PARAMETER (NWISE_I = 1, CWISE_I = 1)
INTEGER BND_I, COND_I
PARAMETER (BND_I = 2, COND_I = 3)
-* Create the loop to test out the Hilbert matrices
+*> Create the loop to test out the Hilbert matrices
FACT = 'E'
UPLO = 'U'
@@ -127,7 +142,7 @@
LDAFB = 2*(NMAX-1)+(NMAX-1)+1
C2 = PATH( 2: 3 )
-* Main loop to test the different Hilbert Matrices.
+*> Main loop to test the different Hilbert Matrices.
printed_guide = .false.
@@ -140,14 +155,14 @@
NRHS = n
M = MAX(SQRT(DBLE(N)), 10.0D+0)
-* Generate the Hilbert matrix, its inverse, and the
-* right hand side, all scaled by the LCM(1,..,2N-1).
+*> Generate the Hilbert matrix, its inverse, and the
+*> right hand side, all scaled by the LCM(1,..,2N-1).
CALL DLAHILB(N, N, A, LDA, INVHILB, LDA, B, LDA, WORK, INFO)
-* Copy A into ACOPY.
+*> Copy A into ACOPY.
CALL DLACPY('ALL', N, N, A, NMAX, ACOPY, NMAX)
-* Store A in band format for GB tests
+*> Store A in band format for GB tests
DO J = 1, N
DO I = 1, KL+KU+1
AB( I, J ) = 0.0D+0
@@ -159,7 +174,7 @@
END DO
END DO
-* Copy AB into ABCOPY.
+*> Copy AB into ABCOPY.
DO J = 1, N
DO I = 1, KL+KU+1
ABCOPY( I, J ) = 0.0D+0
@@ -167,7 +182,7 @@
END DO
CALL DLACPY('ALL', KL+KU+1, N, AB, LDAB, ABCOPY, LDAB)
-* Call D**SVXX with default PARAMS and N_ERR_BND = 3.
+*> Call D**SVXX with default PARAMS and N_ERR_BND = 3.
IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
CALL DSYSVXX(FACT, UPLO, N, NRHS, ACOPY, LDA, AF, LDA,
$ IPIV, EQUED, S, B, LDA, X, LDA, ORCOND,
@@ -208,14 +223,14 @@
END IF
END IF
-* Calculating the difference between D**SVXX's X and the true X.
+*> Calculating the difference between D**SVXX's X and the true X.
DO I = 1,N
DO J =1,NRHS
DIFF(I,J) = X(I,J) - INVHILB(I,J)
END DO
END DO
-* Calculating the RCOND
+*> Calculating the RCOND
RNORM = 0.0D+0
RINORM = 0.0D+0
IF ( LSAMEN( 2, C2, 'PO' ) .OR. LSAMEN( 2, C2, 'SY' ) ) THEN
@@ -247,7 +262,7 @@
RNORM = RNORM / ABS(A(1, 1))
RCOND = 1.0D+0/(RNORM * RINORM)
-* Calculating the R for normwise rcond.
+*> Calculating the R for normwise rcond.
DO I = 1, N
RINV(I) = 0.0D+0
END DO
@@ -257,7 +272,7 @@
END DO
END DO
-* Calculating the Normwise rcond.
+*> Calculating the Normwise rcond.
RINORM = 0.0D+0
DO I = 1, N
SUMRI = 0.0D+0
@@ -424,7 +439,7 @@ c$$$ WRITE(*,*) 'Reciprocal condition number: ',ERRBND(NRHS,cwise_i,cond
c$$$ WRITE(*,*) 'Raw error estimate: ',ERRBND(NRHS,cwise_i,rawbnd_i)
c$$$ print *, 'Info: ', info
c$$$ WRITE(*,*)
-* WRITE(*,*) 'TSTRAT: ',TSTRAT
+*> WRITE(*,*) 'TSTRAT: ',TSTRAT
END DO
@@ -440,7 +455,7 @@ c$$$ WRITE(*,*)
9998 FORMAT( ' D', A2, 'SVXX: ', I6, ' out of ', I6,
$ ' tests failed to pass the threshold' )
9997 FORMAT( ' D', A2, 'SVXX passed the tests of error bounds' )
-* Test ratios.
+*> Test ratios.
9996 FORMAT( 3X, I2, ': Normwise guaranteed forward error', / 5X,
$ 'Guaranteed case: if norm ( abs( Xc - Xt )',
$ ' / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ), then',
@@ -458,3 +473,33 @@ c$$$ WRITE(*,*)
$ ', ORCOND = ', G12.5, ', real RCOND = ', G12.5 )
END
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DEBCHVXX( THRESH, PATH )
+*
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION THRESH
+ CHARACTER*3 PATH
+*
diff --git a/TESTING/LIN/derrab.f b/TESTING/LIN/derrab.f
index e867eb05..9584d623 100644
--- a/TESTING/LIN/derrab.f
+++ b/TESTING/LIN/derrab.f
@@ -1,24 +1,62 @@
- SUBROUTINE DERRAB( NUNIT )
- IMPLICIT NONE
+*> \brief \b DERRAB
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DERRAB( NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRAB tests the error exits for DSGESV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRAB tests the error exits for DSGESV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRAB( NUNIT )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrac.f b/TESTING/LIN/derrac.f
index d7598d43..745c8929 100644
--- a/TESTING/LIN/derrac.f
+++ b/TESTING/LIN/derrac.f
@@ -1,24 +1,62 @@
- SUBROUTINE DERRAC( NUNIT )
- IMPLICIT NONE
+*> \brief \b DERRAC
*
-* -- LAPACK test routine (version 3.1.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* May 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DERRAC( NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRAC tests the error exits for DSPOSV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRAC tests the error exits for DSPOSV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRAC( NUNIT )
+*
+* -- LAPACK test routine (version 3.1.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrge.f b/TESTING/LIN/derrge.f
index 25be9d2b..1059939f 100644
--- a/TESTING/LIN/derrge.f
+++ b/TESTING/LIN/derrge.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRGE( PATH, NUNIT )
+*> \brief \b DERRGE
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRGE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRGE tests the error exits for the DOUBLE PRECISION routines
-* for general matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRGE tests the error exits for the DOUBLE PRECISION routines
+*> for general matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRGE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrgex.f b/TESTING/LIN/derrgex.f
index 032981e1..0cf9bacf 100644
--- a/TESTING/LIN/derrgex.f
+++ b/TESTING/LIN/derrgex.f
@@ -1,31 +1,74 @@
- SUBROUTINE DERRGE( PATH, NUNIT )
+*> \brief \b DERRGEX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DERRGE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRGE tests the error exits for the DOUBLE PRECISION routines
-* for general matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise derrge.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRGE tests the error exits for the DOUBLE PRECISION routines
+*> for general matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise derrge.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRGE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrgt.f b/TESTING/LIN/derrgt.f
index af1844f6..4931f6c5 100644
--- a/TESTING/LIN/derrgt.f
+++ b/TESTING/LIN/derrgt.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRGT( PATH, NUNIT )
+*> \brief \b DERRGT
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRGT( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRGT tests the error exits for the DOUBLE PRECISION tridiagonal
-* routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRGT tests the error exits for the DOUBLE PRECISION tridiagonal
+*> routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRGT( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrlq.f b/TESTING/LIN/derrlq.f
index f6f6e1c4..2bba18ff 100644
--- a/TESTING/LIN/derrlq.f
+++ b/TESTING/LIN/derrlq.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRLQ( PATH, NUNIT )
+*> \brief \b DERRLQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRLQ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRLQ tests the error exits for the DOUBLE PRECISION routines
-* that use the LQ decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRLQ tests the error exits for the DOUBLE PRECISION routines
+*> that use the LQ decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRLQ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrls.f b/TESTING/LIN/derrls.f
index 1ff652ab..72395788 100644
--- a/TESTING/LIN/derrls.f
+++ b/TESTING/LIN/derrls.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRLS( PATH, NUNIT )
+*> \brief \b DERRLS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRLS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRLS tests the error exits for the DOUBLE PRECISION least squares
-* driver routines (DGELS, SGELSS, SGELSX, SGELSY, SGELSD).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRLS tests the error exits for the DOUBLE PRECISION least squares
+*> driver routines (DGELS, SGELSS, SGELSX, SGELSY, SGELSD).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRLS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrpo.f b/TESTING/LIN/derrpo.f
index f8456b9b..a8eddaf7 100644
--- a/TESTING/LIN/derrpo.f
+++ b/TESTING/LIN/derrpo.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRPO( PATH, NUNIT )
+*> \brief \b DERRPO
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRPO( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRPO tests the error exits for the DOUBLE PRECISION routines
-* for symmetric positive definite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRPO tests the error exits for the DOUBLE PRECISION routines
+*> for symmetric positive definite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRPO( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrpox.f b/TESTING/LIN/derrpox.f
index e15bbe7b..f7112687 100644
--- a/TESTING/LIN/derrpox.f
+++ b/TESTING/LIN/derrpox.f
@@ -1,31 +1,74 @@
- SUBROUTINE DERRPO( PATH, NUNIT )
+*> \brief \b DERRPOX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DERRPO( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRPO tests the error exits for the DOUBLE PRECISION routines
-* for symmetric positive definite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise derrpo.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRPO tests the error exits for the DOUBLE PRECISION routines
+*> for symmetric positive definite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise derrpo.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRPO( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrps.f b/TESTING/LIN/derrps.f
index 141cb1ad..7ab3177f 100644
--- a/TESTING/LIN/derrps.f
+++ b/TESTING/LIN/derrps.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRPS( PATH, NUNIT )
+*> \brief \b DERRPS
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
- CHARACTER*3 PATH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRPS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* CHARACTER*3 PATH
+* ..
+*
* Purpose
* =======
*
-* DERRPS tests the error exits for the DOUBLE PRECISION routines
-* for DPSTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRPS tests the error exits for the DOUBLE PRECISION routines
+*> for DPSTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRPS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+ CHARACTER*3 PATH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrql.f b/TESTING/LIN/derrql.f
index dd68d0a4..d53520fd 100644
--- a/TESTING/LIN/derrql.f
+++ b/TESTING/LIN/derrql.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRQL( PATH, NUNIT )
+*> \brief \b DERRQL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRQL( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRQL tests the error exits for the DOUBLE PRECISION routines
-* that use the QL decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRQL tests the error exits for the DOUBLE PRECISION routines
+*> that use the QL decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRQL( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrqp.f b/TESTING/LIN/derrqp.f
index 71e18f6d..853171ee 100644
--- a/TESTING/LIN/derrqp.f
+++ b/TESTING/LIN/derrqp.f
@@ -1,27 +1,70 @@
- SUBROUTINE DERRQP( PATH, NUNIT )
+*> \brief \b DERRQP
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRQP( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRQP tests the error exits for DGEQPF and DGEQP3.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRQP tests the error exits for DGEQPF and DGEQP3.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRQP( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrqr.f b/TESTING/LIN/derrqr.f
index 63bf1f06..21ab5e1f 100644
--- a/TESTING/LIN/derrqr.f
+++ b/TESTING/LIN/derrqr.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRQR( PATH, NUNIT )
+*> \brief \b DERRQR
*
-* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRQR( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRQR tests the error exits for the DOUBLE PRECISION routines
-* that use the QR decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRQR tests the error exits for the DOUBLE PRECISION routines
+*> that use the QR decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRQR( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrrfp.f b/TESTING/LIN/derrrfp.f
index ba72752f..91ca81f5 100644
--- a/TESTING/LIN/derrrfp.f
+++ b/TESTING/LIN/derrrfp.f
@@ -1,28 +1,67 @@
- SUBROUTINE DERRRFP( NUNIT )
+*> \brief \b DERRRFP
*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRRFP( NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRRFP tests the error exits for the DOUBLE PRECISION driver routines
-* for solving linear systems of equations.
-*
-* DDRVRFP tests the DOUBLE PRECISION LAPACK RFP routines:
-* DTFSM, DTFTRI, DSFRK, DTFTTP, DTFTTR, DPFTRF, DPFTRS, DTPTTF,
-* DTPTTR, DTRTTF, and DTRTTP
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRRFP tests the error exits for the DOUBLE PRECISION driver routines
+*> for solving linear systems of equations.
+*>
+*> DDRVRFP tests the DOUBLE PRECISION LAPACK RFP routines:
+*> DTFSM, DTFTRI, DSFRK, DTFTTP, DTFTTR, DPFTRF, DPFTRS, DTPTTF,
+*> DTPTTR, DTRTTF, and DTRTTP
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRRFP( NUNIT )
+*
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrrq.f b/TESTING/LIN/derrrq.f
index d2ac6af7..3033f3b3 100644
--- a/TESTING/LIN/derrrq.f
+++ b/TESTING/LIN/derrrq.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRRQ( PATH, NUNIT )
+*> \brief \b DERRRQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRRQ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRRQ tests the error exits for the DOUBLE PRECISION routines
-* that use the RQ decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRRQ tests the error exits for the DOUBLE PRECISION routines
+*> that use the RQ decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRRQ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrsy.f b/TESTING/LIN/derrsy.f
index 8083b9ee..62ae4c2a 100644
--- a/TESTING/LIN/derrsy.f
+++ b/TESTING/LIN/derrsy.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRSY( PATH, NUNIT )
+*> \brief \b DERRSY
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRSY( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRSY tests the error exits for the DOUBLE PRECISION routines
-* for symmetric indefinite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRSY tests the error exits for the DOUBLE PRECISION routines
+*> for symmetric indefinite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRSY( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrsyx.f b/TESTING/LIN/derrsyx.f
index 086a29bb..47750888 100644
--- a/TESTING/LIN/derrsyx.f
+++ b/TESTING/LIN/derrsyx.f
@@ -1,31 +1,74 @@
- SUBROUTINE DERRSY( PATH, NUNIT )
+*> \brief \b DERRSYX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DERRSY( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRSY tests the error exits for the DOUBLE PRECISION routines
-* for symmetric indefinite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise derrsy.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRSY tests the error exits for the DOUBLE PRECISION routines
+*> for symmetric indefinite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise derrsy.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRSY( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrtr.f b/TESTING/LIN/derrtr.f
index 52f926b2..9da8bd89 100644
--- a/TESTING/LIN/derrtr.f
+++ b/TESTING/LIN/derrtr.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRTR( PATH, NUNIT )
+*> \brief \b DERRTR
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRTR( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRTR tests the error exits for the DOUBLE PRECISION triangular
-* routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRTR tests the error exits for the DOUBLE PRECISION triangular
+*> routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRTR( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrtz.f b/TESTING/LIN/derrtz.f
index 81e84bf4..e426ed9a 100644
--- a/TESTING/LIN/derrtz.f
+++ b/TESTING/LIN/derrtz.f
@@ -1,27 +1,70 @@
- SUBROUTINE DERRTZ( PATH, NUNIT )
+*> \brief \b DERRTZ
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRTZ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRTZ tests the error exits for DTZRQF and STZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRTZ tests the error exits for DTZRQF and STZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRTZ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrvx.f b/TESTING/LIN/derrvx.f
index df3aac12..163c0cdb 100644
--- a/TESTING/LIN/derrvx.f
+++ b/TESTING/LIN/derrvx.f
@@ -1,28 +1,71 @@
- SUBROUTINE DERRVX( PATH, NUNIT )
+*> \brief \b DERRVX
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DERRVX( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRVX tests the error exits for the DOUBLE PRECISION driver routines
-* for solving linear systems of equations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRVX tests the error exits for the DOUBLE PRECISION driver routines
+*> for solving linear systems of equations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRVX( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/derrvxx.f b/TESTING/LIN/derrvxx.f
index f7f90b0f..786637b0 100644
--- a/TESTING/LIN/derrvxx.f
+++ b/TESTING/LIN/derrvxx.f
@@ -1,31 +1,71 @@
- SUBROUTINE DERRVX( PATH, NUNIT )
-*
-* -- LAPACK test routine (version 3.2.1) --
+*> \brief \b DERRVXX
*
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE DERRVX( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRVX tests the error exits for the DOUBLE PRECISION driver routines
-* for solving linear systems of equations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRVX tests the error exits for the DOUBLE PRECISION driver routines
+*> for solving linear systems of equations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DERRVX( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dgbt01.f b/TESTING/LIN/dgbt01.f
index 1715e74a..0fc7a151 100644
--- a/TESTING/LIN/dgbt01.f
+++ b/TESTING/LIN/dgbt01.f
@@ -1,71 +1,146 @@
- SUBROUTINE DGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KL, KU, LDA, LDAFAC, M, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
-* ..
-*
+*> \brief \b DGBT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER KL, KU, LDA, LDAFAC, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGBT01 reconstructs a band matrix A from its L*U factorization and
-* computes the residual:
-* norm(L*U - A) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* The expression L*U - A is computed one column at a time, so A and
-* AFAC are not modified.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBT01 reconstructs a band matrix A from its L*U factorization and
+*> computes the residual:
+*> norm(L*U - A) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*> The expression L*U - A is computed one column at a time, so A and
+*> AFAC are not modified.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* The original matrix A in band storage, stored in rows 1 to
-* KL+KU+1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original matrix A in band storage, stored in rows 1 to
+*> KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the banded
+*> factors L and U from the L*U factorization, as computed by
+*> DGBTRF. U is stored as an upper triangular band matrix with
+*> KL+KU superdiagonals in rows 1 to KL+KU+1, and the
+*> multipliers used during the factorization are stored in rows
+*> KL+KU+2 to 2*KL+KU+1. See DGBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC.
+*> LDAFAC >= max(1,2*KL*KU+1).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices from DGBTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*KL+KU+1)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(L*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AFAC (input) DOUBLE PRECISION array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the banded
-* factors L and U from the L*U factorization, as computed by
-* DGBTRF. U is stored as an upper triangular band matrix with
-* KL+KU superdiagonals in rows 1 to KL+KU+1, and the
-* multipliers used during the factorization are stored in rows
-* KL+KU+2 to 2*KL+KU+1. See DGBTRF for further details.
+*> \date November 2011
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC.
-* LDAFAC >= max(1,2*KL*KU+1).
+*> \ingroup double_lin
*
-* IPIV (input) INTEGER array, dimension (min(M,N))
-* The pivot indices from DGBTRF.
+* =====================================================================
+ SUBROUTINE DGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
+ $ RESID )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*KL+KU+1)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(L*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER KL, KU, LDA, LDAFAC, M, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dgbt02.f b/TESTING/LIN/dgbt02.f
index d6cde63b..819ea0e6 100644
--- a/TESTING/LIN/dgbt02.f
+++ b/TESTING/LIN/dgbt02.f
@@ -1,78 +1,159 @@
- SUBROUTINE DGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
- $ LDB, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
-* ..
-*
+*> \brief \b DGBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
+* LDB, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DGBT02 computes the residual for a solution of a banded system of
-* equations A*x = b or A'*x = b:
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
-* where EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBT02 computes the residual for a solution of a banded system of
+*> equations A*x = b or A'*x = b:
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original matrix A in band storage, stored in rows 1 to
-* KL+KU+1.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original matrix A in band storage, stored in rows 1 to
+*> KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \ingroup double_lin
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
+* =====================================================================
+ SUBROUTINE DGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
+ $ LDB, RESID )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dgbt05.f b/TESTING/LIN/dgbt05.f
index 16b3e3a4..a8f134e2 100644
--- a/TESTING/LIN/dgbt05.f
+++ b/TESTING/LIN/dgbt05.f
@@ -1,9 +1,187 @@
+*> \brief \b DGBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGBT05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
+* LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER KL, KU, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations op(A)*X = B, where A is a
+*> general band matrix of order n with kl subdiagonals and ku
+*> superdiagonals and op(A) = A or A**T, depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DGBT05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
$ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,93 +193,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DGBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations op(A)*X = B, where A is a
-* general band matrix of order n with kl subdiagonals and ku
-* superdiagonals and op(A) = A or A**T, depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dgelqs.f b/TESTING/LIN/dgelqs.f
index 76af2a51..34a60b5f 100644
--- a/TESTING/LIN/dgelqs.f
+++ b/TESTING/LIN/dgelqs.f
@@ -1,66 +1,140 @@
- SUBROUTINE DGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DGELQS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Compute a minimum-norm solution
-* min || A*X - B ||
-* using the LQ factorization
-* A = L*Q
-* computed by DGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute a minimum-norm solution
+*> min || A*X - B ||
+*> using the LQ factorization
+*> A = L*Q
+*> computed by DGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the LQ factorization of the original matrix A as
-* returned by DGELQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the LQ factorization of the original matrix A as
+*> returned by DGELQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) DOUBLE PRECISION array, dimension (M)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= N.
+*> \ingroup double_lin
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE DGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dgennd.f b/TESTING/LIN/dgennd.f
index a2f56605..be290990 100644
--- a/TESTING/LIN/dgennd.f
+++ b/TESTING/LIN/dgennd.f
@@ -1,36 +1,86 @@
- LOGICAL FUNCTION DGENND (M, N, A, LDA)
- IMPLICIT NONE
+*> \brief \b DGENND
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION DGENND (M, N, A, LDA)
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DGENND tests that its argument has a non-negative diagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGENND tests that its argument has a non-negative diagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns in A.
+*> \date November 2011
*
-* A (input) DOUBLE PRECISION array, dimension (LDA, N)
-* The matrix.
+*> \ingroup double_lin
*
-* LDA (input) INTEGER
-* Leading dimension of A.
+* =====================================================================
+ LOGICAL FUNCTION DGENND (M, N, A, LDA)
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dgeqls.f b/TESTING/LIN/dgeqls.f
index 328506fd..be07f98b 100644
--- a/TESTING/LIN/dgeqls.f
+++ b/TESTING/LIN/dgeqls.f
@@ -1,67 +1,141 @@
- SUBROUTINE DGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DGEQLS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Solve the least squares problem
-* min || A*X - B ||
-* using the QL factorization
-* A = Q*L
-* computed by DGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Solve the least squares problem
+*> min || A*X - B ||
+*> using the QL factorization
+*> A = Q*L
+*> computed by DGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. M >= N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QL factorization of the original matrix A as
-* returned by DGEQLF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QL factorization of the original matrix A as
+*> returned by DGEQLF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X, stored in rows
+*> m-n+1:m.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= M.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) DOUBLE PRECISION array, dimension (N)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X, stored in rows
-* m-n+1:m.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= M.
+*> \ingroup double_lin
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE DGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dgeqrs.f b/TESTING/LIN/dgeqrs.f
index 1e2da62c..e313753e 100644
--- a/TESTING/LIN/dgeqrs.f
+++ b/TESTING/LIN/dgeqrs.f
@@ -1,66 +1,140 @@
- SUBROUTINE DGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DGEQRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Solve the least squares problem
-* min || A*X - B ||
-* using the QR factorization
-* A = Q*R
-* computed by DGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Solve the least squares problem
+*> min || A*X - B ||
+*> using the QR factorization
+*> A = Q*R
+*> computed by DGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. M >= N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QR factorization of the original matrix A as
-* returned by DGEQRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QR factorization of the original matrix A as
+*> returned by DGEQRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= M.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) DOUBLE PRECISION array, dimension (N)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= M.
+*> \ingroup double_lin
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE DGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dgerqs.f b/TESTING/LIN/dgerqs.f
index c7cb99e2..ecc6e738 100644
--- a/TESTING/LIN/dgerqs.f
+++ b/TESTING/LIN/dgerqs.f
@@ -1,67 +1,141 @@
- SUBROUTINE DGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DGERQS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Compute a minimum-norm solution
-* min || A*X - B ||
-* using the RQ factorization
-* A = R*Q
-* computed by DGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute a minimum-norm solution
+*> min || A*X - B ||
+*> using the RQ factorization
+*> A = R*Q
+*> computed by DGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the RQ factorization of the original matrix A as
-* returned by DGERQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the RQ factorization of the original matrix A as
+*> returned by DGERQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the linear system.
+*> On exit, the solution vectors X. Each solution vector
+*> is contained in rows 1:N of a column of B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) DOUBLE PRECISION array, dimension (M)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the linear system.
-* On exit, the solution vectors X. Each solution vector
-* is contained in rows 1:N of a column of B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup double_lin
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE DGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dget01.f b/TESTING/LIN/dget01.f
index b7d4ee3a..cde04a31 100644
--- a/TESTING/LIN/dget01.f
+++ b/TESTING/LIN/dget01.f
@@ -1,58 +1,127 @@
- SUBROUTINE DGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
- $ RESID )
+*> \brief \b DGET01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDAFAC, M, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDAFAC, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* DGET01 reconstructs a matrix A from its L*U factorization and
-* computes the residual
-* norm(L*U - A) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET01 reconstructs a matrix A from its L*U factorization and
+*> computes the residual
+*> norm(L*U - A) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original M x N matrix A.
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the factors
+*> L and U from the L*U factorization as computed by DGETRF.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*U - A.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DGETRF.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(L*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AFAC (input/output) DOUBLE PRECISION array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the factors
-* L and U from the L*U factorization as computed by DGETRF.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*U - A.
+*> \date November 2011
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,M).
+*> \ingroup double_lin
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DGETRF.
+* =====================================================================
+ SUBROUTINE DGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
+ $ RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(L*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDAFAC, M, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dget02.f b/TESTING/LIN/dget02.f
index d2e91700..21fb6728 100644
--- a/TESTING/LIN/dget02.f
+++ b/TESTING/LIN/dget02.f
@@ -1,9 +1,144 @@
+*> \brief \b DGET02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET02 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGET02 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dget03.f b/TESTING/LIN/dget03.f
index eb1de3e7..fc8fbaf6 100644
--- a/TESTING/LIN/dget03.f
+++ b/TESTING/LIN/dget03.f
@@ -1,57 +1,129 @@
- SUBROUTINE DGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
- $ RCOND, RESID )
+*> \brief \b DGET03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDAINV, LDWORK, N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
- $ WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
+* RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDAINV, LDWORK, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* DGET03 computes the residual for a general matrix times its inverse:
-* norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET03 computes the residual for a general matrix times its inverse:
+*> norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original N x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AINV (input) DOUBLE PRECISION array, dimension (LDAINV,N)
-* The inverse of the matrix A.
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original N x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (LDAINV,N)
+*> The inverse of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup double_lin
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* =====================================================================
+ SUBROUTINE DGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
+ $ RCOND, RESID )
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDAINV, LDWORK, N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dget04.f b/TESTING/LIN/dget04.f
index 3ec607e9..c65d1455 100644
--- a/TESTING/LIN/dget04.f
+++ b/TESTING/LIN/dget04.f
@@ -1,57 +1,121 @@
- SUBROUTINE DGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDX, LDXACT, N, NRHS
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION X( LDX, * ), XACT( LDXACT, * )
-* ..
-*
+*> \brief \b DGET04
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDX, LDXACT, N, NRHS
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
* Purpose
* =======
*
-* DGET04 computes the difference between a computed solution and the
-* true solution to a system of linear equations.
-*
-* RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
-* where RCOND is the reciprocal of the condition number and EPS is the
-* machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET04 computes the difference between a computed solution and the
+*> true solution to a system of linear equations.
+*>
+*> RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+*> where RCOND is the reciprocal of the condition number and EPS is the
+*> machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension( LDX, NRHS )
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the coefficient
+*> matrix in the system of equations.
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the NRHS solution vectors of
+*> ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* XACT (input) DOUBLE PRECISION array, dimension( LDX, NRHS )
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
+*> \ingroup double_lin
*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
+* =====================================================================
+ SUBROUTINE DGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
*
-* RCOND (input) DOUBLE PRECISION
-* The reciprocal of the condition number of the coefficient
-* matrix in the system of equations.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the NRHS solution vectors of
-* ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDX, LDXACT, N, NRHS
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION X( LDX, * ), XACT( LDXACT, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dget06.f b/TESTING/LIN/dget06.f
index 886fabc0..e4d98330 100644
--- a/TESTING/LIN/dget06.f
+++ b/TESTING/LIN/dget06.f
@@ -1,28 +1,70 @@
- DOUBLE PRECISION FUNCTION DGET06( RCOND, RCONDC )
+*> \brief \b DGET06
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- DOUBLE PRECISION RCOND, RCONDC
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DGET06( RCOND, RCONDC )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION RCOND, RCONDC
+* ..
+*
* Purpose
* =======
*
-* DGET06 computes a test ratio to compare two values for RCOND.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET06 computes a test ratio to compare two values for RCOND.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal of the condition number of A,
+*> as computed by DGECON.
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(inv(A)).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RCOND (input) DOUBLE PRECISION
-* The estimate of the reciprocal of the condition number of A,
-* as computed by DGECON.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RCONDC (input) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(inv(A)).
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DGET06( RCOND, RCONDC )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION RCOND, RCONDC
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dget07.f b/TESTING/LIN/dget07.f
index e996926e..ccbad30c 100644
--- a/TESTING/LIN/dget07.f
+++ b/TESTING/LIN/dget07.f
@@ -1,9 +1,176 @@
+*> \brief \b DGET07
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET07( TRANS, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, CHKFERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* LOGICAL CHKFERR
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET07 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations op(A)*X = B, where A is a
+*> general n by n matrix and op(A) = A or A**T, depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original n by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] CHKFERR
+*> \verbatim
+*> CHKFERR is LOGICAL
+*> Set to .TRUE. to check FERR, .FALSE. not to check FERR.
+*> When the test system is ill-conditioned, the "true"
+*> solution in XACT may be incorrect.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DGET07( TRANS, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, CHKFERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,85 +182,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DGET07 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations op(A)*X = B, where A is a
-* general n by n matrix and op(A) = A or A**T, depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original n by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* CHKFERR (input) LOGICAL
-* Set to .TRUE. to check FERR, .FALSE. not to check FERR.
-* When the test system is ill-conditioned, the "true"
-* solution in XACT may be incorrect.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dget08.f b/TESTING/LIN/dget08.f
index b209c3f4..7cd83030 100644
--- a/TESTING/LIN/dget08.f
+++ b/TESTING/LIN/dget08.f
@@ -1,9 +1,144 @@
+*> \brief \b DGET08
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGET08( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGET08 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X,inf) / ( norm(A,inf) * norm(X,inf) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DGET08( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGET08 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X,inf) / ( norm(A,inf) * norm(X,inf) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dgtt01.f b/TESTING/LIN/dgtt01.f
index 3a09ac93..22673b1d 100644
--- a/TESTING/LIN/dgtt01.f
+++ b/TESTING/LIN/dgtt01.f
@@ -1,9 +1,145 @@
+*> \brief \b DGTT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTT01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
+* LDWORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDWORK, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
+* $ DU2( * ), DUF( * ), RWORK( * ),
+* $ WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTT01 reconstructs a tridiagonal matrix A from its LU factorization
+*> and computes the residual
+*> norm(L*U - A) / ( norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DLF
+*> \verbatim
+*> DLF is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DUF
+*> \verbatim
+*> DUF is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2F
+*> \verbatim
+*> DU2F is DOUBLE PRECISION array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The scaled residual: norm(L*U - A) / (norm(A) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DGTT01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
$ LDWORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDWORK, N
@@ -16,59 +152,6 @@
$ WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* DGTT01 reconstructs a tridiagonal matrix A from its LU factorization
-* and computes the residual
-* norm(L*U - A) / ( norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGTER
-* The order of the matrix A. N >= 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* DLF (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
-*
-* DF (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DUF (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
-*
-* DU2F (input) DOUBLE PRECISION array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,N)
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The scaled residual: norm(L*U - A) / (norm(A) * EPS)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dgtt02.f b/TESTING/LIN/dgtt02.f
index a4710c56..7a62fe6e 100644
--- a/TESTING/LIN/dgtt02.f
+++ b/TESTING/LIN/dgtt02.f
@@ -1,9 +1,135 @@
+*> \brief \b DGTT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTT02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTT02 computes the residual for the solution to a tridiagonal
+*> system of equations:
+*> RESID = norm(B - op(A)*X) / (norm(A) * norm(X) * EPS),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> Specifies the form of the residual.
+*> = 'N': B - A * X (No transpose)
+*> = 'T': B - A'* X (Transpose)
+*> = 'C': B - A'* X (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - op(A)*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(B - op(A)*X) / (norm(A) * norm(X) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DGTT02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,56 +141,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DGTT02 computes the residual for the solution to a tridiagonal
-* system of equations:
-* RESID = norm(B - op(A)*X) / (norm(A) * norm(X) * EPS),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER
-* Specifies the form of the residual.
-* = 'N': B - A * X (No transpose)
-* = 'T': B - A'* X (Transpose)
-* = 'C': B - A'* X (Conjugate transpose = Transpose)
-*
-* N (input) INTEGTER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - op(A)*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RESID (output) DOUBLE PRECISION
-* norm(B - op(A)*X) / (norm(A) * norm(X) * EPS)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dgtt05.f b/TESTING/LIN/dgtt05.f
index 5cbddce4..453999c4 100644
--- a/TESTING/LIN/dgtt05.f
+++ b/TESTING/LIN/dgtt05.f
@@ -1,9 +1,176 @@
+*> \brief \b DGTT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DGTT05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), DL( * ),
+* $ DU( * ), FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DGTT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> general tridiagonal matrix of order n and op(A) = A or A**T,
+*> depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DGTT05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,85 +182,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DGTT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* general tridiagonal matrix of order n and op(A) = A or A**T,
-* depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
-*
-* DL (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dlahilb.f b/TESTING/LIN/dlahilb.f
index ebc4d55b..9ab5498f 100644
--- a/TESTING/LIN/dlahilb.f
+++ b/TESTING/LIN/dlahilb.f
@@ -1,22 +1,26 @@
- SUBROUTINE DLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
-!
-! -- LAPACK auxiliary test routine (version 3.0) --
-! Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-! Courant Institute, Argonne National Lab, and Rice University
-! 28 August, 2006
-!
-! David Vu <dtv@cs.berkeley.edu>
-! Yozo Hida <yozo@cs.berkeley.edu>
-! Jason Riedy <ejr@cs.berkeley.edu>
-! D. Halligan <dhalligan@berkeley.edu>
-!
- IMPLICIT NONE
-! .. Scalar Arguments ..
- INTEGER N, NRHS, LDA, LDX, LDB, INFO
-! .. Array Arguments ..
- DOUBLE PRECISION A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
-! ..
-!
+*> \brief \b DLAHILB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+*
+* ! .. Scalar Arguments ..
+* INTEGER N, NRHS, LDA, LDX, LDB, INFO
+* ! .. Array Arguments ..
+* DOUBLE PRECISION A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
+* ! ..
+* !
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
! Purpose
! =======
!
@@ -39,43 +43,37 @@
! In single, the generated solution is exact for N <= 6 and has
! small componentwise error for 7 <= N <= 11.
!
-! Arguments
-! =========
-!
-! N (input) INTEGER
-! The dimension of the matrix A.
-!
-! NRHS (input) NRHS
-! The requested number of right-hand sides.
-!
-! A (output) DOUBLE PRECISION array, dimension (LDA, N)
-! The generated scaled Hilbert matrix.
-!
-! LDA (input) INTEGER
-! The leading dimension of the array A. LDA >= N.
-!
-! X (output) DOUBLE PRECISION array, dimension (LDX, NRHS)
-! The generated exact solutions. Currently, the first NRHS
-! columns of the inverse Hilbert matrix.
-!
-! LDX (input) INTEGER
-! The leading dimension of the array X. LDX >= N.
-!
-! B (output) DOUBLE PRECISION array, dimension (LDB, NRHS)
-! The generated right-hand sides. Currently, the first NRHS
-! columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
-!
-! LDB (input) INTEGER
-! The leading dimension of the array B. LDB >= N.
-!
-! WORK (workspace) DOUBLE PRECISION array, dimension (N)
-!
-!
-! INFO (output) INTEGER
-! = 0: successful exit
-! = 1: N is too large; the data is still generated but may not
-! be not exact.
-! < 0: if INFO = -i, the i-th argument had an illegal value
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
+ SUBROUTINE DLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+*
+* -- LAPACK test routine (version 3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+! .. Scalar Arguments ..
+ INTEGER N, NRHS, LDA, LDX, LDB, INFO
+! .. Array Arguments ..
+ DOUBLE PRECISION A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
+! ..
!
! =====================================================================
diff --git a/TESTING/LIN/dlaord.f b/TESTING/LIN/dlaord.f
index 7254b628..a05057f1 100644
--- a/TESTING/LIN/dlaord.f
+++ b/TESTING/LIN/dlaord.f
@@ -1,40 +1,92 @@
- SUBROUTINE DLAORD( JOB, N, X, INCX )
-*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOB
- INTEGER INCX, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION X( * )
-* ..
-*
+*> \brief \b DLAORD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAORD( JOB, N, X, INCX )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION X( * )
+* ..
+*
* Purpose
* =======
*
-* DLAORD sorts the elements of a vector x in increasing or decreasing
-* order.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAORD sorts the elements of a vector x in increasing or decreasing
+*> order.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER
-* = 'I': Sort in increasing order
-* = 'D': Sort in decreasing order
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER
+*> = 'I': Sort in increasing order
+*> = 'D': Sort in decreasing order
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vector X.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension
+*> (1+(N-1)*INCX)
+*> On entry, the vector of length n to be sorted.
+*> On exit, the vector x is sorted in the prescribed order.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between successive elements of X. INCX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
*
-* N (input) INTEGER
-* The length of the vector X.
+* =====================================================================
+ SUBROUTINE DLAORD( JOB, N, X, INCX )
*
-* X (input/output) DOUBLE PRECISION array, dimension
-* (1+(N-1)*INCX)
-* On entry, the vector of length n to be sorted.
-* On exit, the vector x is sorted in the prescribed order.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCX (input) INTEGER
-* The spacing between successive elements of X. INCX >= 0.
+* .. Scalar Arguments ..
+ CHARACTER JOB
+ INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION X( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dlaptm.f b/TESTING/LIN/dlaptm.f
index bf4adda4..dc40b5f4 100644
--- a/TESTING/LIN/dlaptm.f
+++ b/TESTING/LIN/dlaptm.f
@@ -1,65 +1,135 @@
- SUBROUTINE DLAPTM( N, NRHS, ALPHA, D, E, X, LDX, BETA, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDX, N, NRHS
- DOUBLE PRECISION ALPHA, BETA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION B( LDB, * ), D( * ), E( * ), X( LDX, * )
-* ..
-*
+*> \brief \b DLAPTM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAPTM( N, NRHS, ALPHA, D, E, X, LDX, BETA, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), D( * ), E( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DLAPTM multiplies an N by NRHS matrix X by a symmetric tridiagonal
-* matrix A and stores the result in a matrix B. The operation has the
-* form
-*
-* B := alpha * A * X + beta * B
-*
-* where alpha may be either 1. or -1. and beta may be 0., 1., or -1.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAPTM multiplies an N by NRHS matrix X by a symmetric tridiagonal
+*> matrix A and stores the result in a matrix B. The operation has the
+*> form
+*>
+*> B := alpha * A * X + beta * B
+*>
+*> where alpha may be either 1. or -1. and beta may be 0., 1., or -1.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B.
-*
-* ALPHA (input) DOUBLE PRECISION
-* The scalar alpha. ALPHA must be 1. or -1.; otherwise,
-* it is assumed to be 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> The scalar alpha. ALPHA must be 1. or -1.; otherwise,
+*> it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal or superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The N by NRHS matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> The scalar beta. BETA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix B.
+*> On exit, B is overwritten by the matrix expression
+*> B := alpha * A * X + beta * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(N,1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal or superdiagonal elements of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The N by NRHS matrix X.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(N,1).
+*> \ingroup double_lin
*
-* BETA (input) DOUBLE PRECISION
-* The scalar beta. BETA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 1.
+* =====================================================================
+ SUBROUTINE DLAPTM( N, NRHS, ALPHA, D, E, X, LDX, BETA, B, LDB )
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix B.
-* On exit, B is overwritten by the matrix expression
-* B := alpha * A * X + beta * B.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(N,1).
+* .. Scalar Arguments ..
+ INTEGER LDB, LDX, N, NRHS
+ DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION B( LDB, * ), D( * ), E( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dlarhs.f b/TESTING/LIN/dlarhs.f
index d84aa178..3537c7ab 100644
--- a/TESTING/LIN/dlarhs.f
+++ b/TESTING/LIN/dlarhs.f
@@ -1,9 +1,217 @@
+*> \brief \b DLARHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
+* A, LDA, X, LDX, B, LDB, ISEED, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, UPLO, XTYPE
+* CHARACTER*3 PATH
+* INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARHS chooses a set of NRHS random solution vectors and sets
+*> up the right hand sides for the linear system
+*> op( A ) * X = B,
+*> where op( A ) may be A or A' (transpose of A).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The type of the real matrix A. PATH may be given in any
+*> combination of upper and lower case. Valid types include
+*> xGE: General m x n matrix
+*> xGB: General banded matrix
+*> xPO: Symmetric positive definite, 2-D storage
+*> xPP: Symmetric positive definite packed
+*> xPB: Symmetric positive definite banded
+*> xSY: Symmetric indefinite, 2-D storage
+*> xSP: Symmetric indefinite packed
+*> xSB: Symmetric indefinite banded
+*> xTR: Triangular
+*> xTP: Triangular packed
+*> xTB: Triangular banded
+*> xQR: General m x n matrix
+*> xLQ: General m x n matrix
+*> xQL: General m x n matrix
+*> xRQ: General m x n matrix
+*> where the leading character indicates the precision.
+*> \endverbatim
+*>
+*> \param[in] XTYPE
+*> \verbatim
+*> XTYPE is CHARACTER*1
+*> Specifies how the exact solution X will be determined:
+*> = 'N': New solution; generate a random X.
+*> = 'C': Computed; use value of X on entry.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> matrix A is stored, if A is symmetric.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to the matrix A.
+*> = 'N': System is A * x = b
+*> = 'T': System is A'* x = b
+*> = 'C': System is A'* x = b
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number or rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Used only if A is a band matrix; specifies the number of
+*> subdiagonals of A if A is a general band matrix or if A is
+*> symmetric or triangular and UPLO = 'L'; specifies the number
+*> of superdiagonals of A if A is symmetric or triangular and
+*> UPLO = 'U'. 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Used only if A is a general band matrix or if A is
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xGB, specifies the number of superdiagonals of A,
+*> and 0 <= KU <= N-1.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xTR, xTP, or xTB, specifies whether or not the
+*> matrix has unit diagonal:
+*> = 1: matrix has non-unit diagonal (default)
+*> = 2: matrix has unit diagonal
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors in the system A*X = B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The test matrix whose type is given by PATH.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If PATH = xGB, LDA >= KL+KU+1.
+*> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
+*> Otherwise, LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is or output) DOUBLE PRECISION array, dimension(LDX,NRHS)
+*> On entry, if XTYPE = 'C' (for 'Computed'), then X contains
+*> the exact solution to the system of linear equations.
+*> On exit, if XTYPE = 'N' (for 'New'), then X is initialized
+*> with random values.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vector(s) for the system of equations,
+*> computed from B = op(A) * X, where op(A) is determined by
+*> TRANS.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. If TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> DLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
$ A, LDA, X, LDX, B, LDB, ISEED, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS, UPLO, XTYPE
@@ -15,118 +223,6 @@
DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DLARHS chooses a set of NRHS random solution vectors and sets
-* up the right hand sides for the linear system
-* op( A ) * X = B,
-* where op( A ) may be A or A' (transpose of A).
-*
-* Arguments
-* =========
-*
-* PATH (input) CHARACTER*3
-* The type of the real matrix A. PATH may be given in any
-* combination of upper and lower case. Valid types include
-* xGE: General m x n matrix
-* xGB: General banded matrix
-* xPO: Symmetric positive definite, 2-D storage
-* xPP: Symmetric positive definite packed
-* xPB: Symmetric positive definite banded
-* xSY: Symmetric indefinite, 2-D storage
-* xSP: Symmetric indefinite packed
-* xSB: Symmetric indefinite banded
-* xTR: Triangular
-* xTP: Triangular packed
-* xTB: Triangular banded
-* xQR: General m x n matrix
-* xLQ: General m x n matrix
-* xQL: General m x n matrix
-* xRQ: General m x n matrix
-* where the leading character indicates the precision.
-*
-* XTYPE (input) CHARACTER*1
-* Specifies how the exact solution X will be determined:
-* = 'N': New solution; generate a random X.
-* = 'C': Computed; use value of X on entry.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* matrix A is stored, if A is symmetric.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to the matrix A.
-* = 'N': System is A * x = b
-* = 'T': System is A'* x = b
-* = 'C': System is A'* x = b
-*
-* M (input) INTEGER
-* The number or rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* Used only if A is a band matrix; specifies the number of
-* subdiagonals of A if A is a general band matrix or if A is
-* symmetric or triangular and UPLO = 'L'; specifies the number
-* of superdiagonals of A if A is symmetric or triangular and
-* UPLO = 'U'. 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* Used only if A is a general band matrix or if A is
-* triangular.
-*
-* If PATH = xGB, specifies the number of superdiagonals of A,
-* and 0 <= KU <= N-1.
-*
-* If PATH = xTR, xTP, or xTB, specifies whether or not the
-* matrix has unit diagonal:
-* = 1: matrix has non-unit diagonal (default)
-* = 2: matrix has unit diagonal
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors in the system A*X = B.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The test matrix whose type is given by PATH.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If PATH = xGB, LDA >= KL+KU+1.
-* If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
-* Otherwise, LDA >= max(1,M).
-*
-* X (input or output) DOUBLE PRECISION array, dimension(LDX,NRHS)
-* On entry, if XTYPE = 'C' (for 'Computed'), then X contains
-* the exact solution to the system of linear equations.
-* On exit, if XTYPE = 'N' (for 'New'), then X is initialized
-* with random values.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
-*
-* B (output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vector(s) for the system of equations,
-* computed from B = op(A) * X, where op(A) is determined by
-* TRANS.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. If TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* DLATMS). Modified on exit.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dlatb4.f b/TESTING/LIN/dlatb4.f
index 2f51a012..c7ba8eba 100644
--- a/TESTING/LIN/dlatb4.f
+++ b/TESTING/LIN/dlatb4.f
@@ -1,65 +1,138 @@
- SUBROUTINE DLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
- $ CNDNUM, DIST )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIST, TYPE
- CHARACTER*3 PATH
- INTEGER IMAT, KL, KU, M, MODE, N
- DOUBLE PRECISION ANORM, CNDNUM
-* ..
-*
+*> \brief \b DLATB4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
+* CNDNUM, DIST )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, TYPE
+* CHARACTER*3 PATH
+* INTEGER IMAT, KL, KU, M, MODE, N
+* DOUBLE PRECISION ANORM, CNDNUM
+* ..
+*
* Purpose
* =======
*
-* DLATB4 sets parameters for the matrix generator based on the type of
-* matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATB4 sets parameters for the matrix generator based on the type of
+*> matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* M (input) INTEGER
-* The number of rows in the matrix to be generated.
-*
-* N (input) INTEGER
-* The number of columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix
-* = 'P': symmetric positive (semi)definite matrix
-* = 'N': nonsymmetric matrix
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix
+*> = 'P': symmetric positive (semi)definite matrix
+*> = 'N': nonsymmetric matrix
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is DOUBLE PRECISION
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) DOUBLE PRECISION
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup double_lin
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE DLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
+ $ CNDNUM, DIST )
*
-* CNDNUM (output) DOUBLE PRECISION
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ CHARACTER DIST, TYPE
+ CHARACTER*3 PATH
+ INTEGER IMAT, KL, KU, M, MODE, N
+ DOUBLE PRECISION ANORM, CNDNUM
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dlatb5.f b/TESTING/LIN/dlatb5.f
index 43d1d56e..eafdb415 100644
--- a/TESTING/LIN/dlatb5.f
+++ b/TESTING/LIN/dlatb5.f
@@ -1,62 +1,132 @@
- SUBROUTINE DLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
- $ CNDNUM, DIST )
-*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
-*
-* .. Scalar Arguments ..
- DOUBLE PRECISION ANORM, CNDNUM
- INTEGER IMAT, KL, KU, MODE, N
- CHARACTER DIST, TYPE
- CHARACTER*3 PATH
-* ..
-*
+*> \brief \b DLATB5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
+* CNDNUM, DIST )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ANORM, CNDNUM
+* INTEGER IMAT, KL, KU, MODE, N
+* CHARACTER DIST, TYPE
+* CHARACTER*3 PATH
+* ..
+*
* Purpose
* =======
*
-* DLATB5 sets parameters for the matrix generator based on the type
-* of matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATB5 sets parameters for the matrix generator based on the type
+*> of matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* N (input) INTEGER
-* The number of rows and columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix
-* = 'P': symmetric positive (semi)definite matrix
-* = 'N': nonsymmetric matrix
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix
+*> = 'P': symmetric positive (semi)definite matrix
+*> = 'N': nonsymmetric matrix
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is DOUBLE PRECISION
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) DOUBLE PRECISION
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup double_lin
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE DLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
+ $ CNDNUM, DIST )
*
-* CNDNUM (output) DOUBLE PRECISION
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ANORM, CNDNUM
+ INTEGER IMAT, KL, KU, MODE, N
+ CHARACTER DIST, TYPE
+ CHARACTER*3 PATH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dlattb.f b/TESTING/LIN/dlattb.f
index 2bc155cd..61c77bc0 100644
--- a/TESTING/LIN/dlattb.f
+++ b/TESTING/LIN/dlattb.f
@@ -1,77 +1,155 @@
- SUBROUTINE DLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
- $ LDAB, B, WORK, INFO )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER IMAT, INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION AB( LDAB, * ), B( * ), WORK( * )
-* ..
-*
+*> \brief \b DLATTB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
+* LDAB, B, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION AB( LDAB, * ), B( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLATTB generates a triangular test matrix in 2-dimensional storage.
-* IMAT and UPLO uniquely specify the properties of the test matrix,
-* which is returned in the array A.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATTB generates a triangular test matrix in 2-dimensional storage.
+*> IMAT and UPLO uniquely specify the properties of the test matrix,
+*> which is returned in the array A.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= transpose)
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* DLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= transpose)
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> DLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the banded
+*> triangular matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular banded matrix A, stored in the
+*> first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
+*> If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
+*> If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the banded
-* triangular matrix A. KD >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AB (output) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular banded matrix A, stored in the
-* first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
-* If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
-* If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup double_lin
*
-* B (workspace) DOUBLE PRECISION array, dimension (N)
+* =====================================================================
+ SUBROUTINE DLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
+ $ LDAB, B, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER IMAT, INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION AB( LDAB, * ), B( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dlattp.f b/TESTING/LIN/dlattp.f
index 665daaab..15cfab1b 100644
--- a/TESTING/LIN/dlattp.f
+++ b/TESTING/LIN/dlattp.f
@@ -1,9 +1,136 @@
+*> \brief \b DLATTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATTP( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, B, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATTP generates a triangular test matrix in packed storage.
+*> IMAT and UPLO uniquely specify the properties of the test
+*> matrix, which is returned in the array AP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= Transpose)
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> DLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (N)
+*> The right hand side vector, if IMAT > 10.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DLATTP( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, B, WORK,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,61 +141,6 @@
DOUBLE PRECISION A( * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATTP generates a triangular test matrix in packed storage.
-* IMAT and UPLO uniquely specify the properties of the test
-* matrix, which is returned in the array AP.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= Transpose)
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* DLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* A (output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* B (output) DOUBLE PRECISION array, dimension (N)
-* The right hand side vector, if IMAT > 10.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dlattr.f b/TESTING/LIN/dlattr.f
index 3b3274fd..9de42fcf 100644
--- a/TESTING/LIN/dlattr.f
+++ b/TESTING/LIN/dlattr.f
@@ -1,9 +1,144 @@
+*> \brief \b DLATTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATTR( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, LDA, B,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATTR generates a triangular test matrix.
+*> IMAT and UPLO uniquely specify the properties of the test
+*> matrix, which is returned in the array A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= Transpose)
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> DLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> set so that A(k,k) = k for 1 <= k <= n.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (N)
+*> The right hand side vector, if IMAT > 10.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DLATTR( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, LDA, B,
$ WORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,66 +149,6 @@
DOUBLE PRECISION A( LDA, * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATTR generates a triangular test matrix.
-* IMAT and UPLO uniquely specify the properties of the test
-* matrix, which is returned in the array A.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= Transpose)
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* DLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* A (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* set so that A(k,k) = k for 1 <= k <= n.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (output) DOUBLE PRECISION array, dimension (N)
-* The right hand side vector, if IMAT > 10.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dlavsp.f b/TESTING/LIN/dlavsp.f
index cafae166..236da3d0 100644
--- a/TESTING/LIN/dlavsp.f
+++ b/TESTING/LIN/dlavsp.f
@@ -1,9 +1,141 @@
+*> \brief \b DLAVSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAVSP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAVSP performs one of the matrix-vector operations
+*> x := A*x or x := A'*x,
+*> where x is an N element vector and A is one of the factors
+*> from the block U*D*U' or L*D*L' factorization computed by DSPTRF.
+*>
+*> If TRANS = 'N', multiplies by U or U * D (or L or L * D)
+*> If TRANS = 'T', multiplies by U' or D * U' (or L' or D * L' )
+*> If TRANS = 'C', multiplies by U' or D * U' (or L' or D * L' )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the factor stored in A is upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation to be performed:
+*> = 'N': x := A*x
+*> = 'T': x := A'*x
+*> = 'C': x := A'*x
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the diagonal blocks are unit
+*> matrices. If the diagonal blocks are assumed to be unit,
+*> then A = U or A = L, otherwise A = U*D or A = L*D.
+*> = 'U': Diagonal blocks are assumed to be unit matrices.
+*> = 'N': Diagonal blocks are assumed to be non-unit matrices.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of vectors
+*> x to be multiplied by A. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L, stored as a packed triangular
+*> matrix as computed by DSPTRF.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DSPTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DLAVSP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,66 +146,6 @@
DOUBLE PRECISION A( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* DLAVSP performs one of the matrix-vector operations
-* x := A*x or x := A'*x,
-* where x is an N element vector and A is one of the factors
-* from the block U*D*U' or L*D*L' factorization computed by DSPTRF.
-*
-* If TRANS = 'N', multiplies by U or U * D (or L or L * D)
-* If TRANS = 'T', multiplies by U' or D * U' (or L' or D * L' )
-* If TRANS = 'C', multiplies by U' or D * U' (or L' or D * L' )
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the factor stored in A is upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation to be performed:
-* = 'N': x := A*x
-* = 'T': x := A'*x
-* = 'C': x := A'*x
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the diagonal blocks are unit
-* matrices. If the diagonal blocks are assumed to be unit,
-* then A = U or A = L, otherwise A = U*D or A = L*D.
-* = 'U': Diagonal blocks are assumed to be unit matrices.
-* = 'N': Diagonal blocks are assumed to be non-unit matrices.
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of vectors
-* x to be multiplied by A. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L, stored as a packed triangular
-* matrix as computed by DSPTRF.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DSPTRF.
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dlavsy.f b/TESTING/LIN/dlavsy.f
index 26ec954b..bda8a61e 100644
--- a/TESTING/LIN/dlavsy.f
+++ b/TESTING/LIN/dlavsy.f
@@ -1,80 +1,155 @@
- SUBROUTINE DLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
- $ LDB, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b DLAVSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* DLAVSY performs one of the matrix-vector operations
-* x := A*x or x := A'*x,
-* where x is an N element vector and A is one of the factors
-* from the block U*D*U' or L*D*L' factorization computed by DSYTRF.
-*
-* If TRANS = 'N', multiplies by U or U * D (or L or L * D)
-* If TRANS = 'T', multiplies by U' or D * U' (or L' or D * L')
-* If TRANS = 'C', multiplies by U' or D * U' (or L' or D * L')
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAVSY performs one of the matrix-vector operations
+*> x := A*x or x := A'*x,
+*> where x is an N element vector and A is one of the factors
+*> from the block U*D*U' or L*D*L' factorization computed by DSYTRF.
+*>
+*> If TRANS = 'N', multiplies by U or U * D (or L or L * D)
+*> If TRANS = 'T', multiplies by U' or D * U' (or L' or D * L')
+*> If TRANS = 'C', multiplies by U' or D * U' (or L' or D * L')
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the factor stored in A is upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation to be performed:
-* = 'N': x := A*x
-* = 'T': x := A'*x
-* = 'C': x := A'*x
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the diagonal blocks are unit
-* matrices. If the diagonal blocks are assumed to be unit,
-* then A = U or A = L, otherwise A = U*D or A = L*D.
-* = 'U': Diagonal blocks are assumed to be unit matrices.
-* = 'N': Diagonal blocks are assumed to be non-unit matrices.
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of vectors
-* x to be multiplied by A. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the factor stored in A is upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation to be performed:
+*> = 'N': x := A*x
+*> = 'T': x := A'*x
+*> = 'C': x := A'*x
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the diagonal blocks are unit
+*> matrices. If the diagonal blocks are assumed to be unit,
+*> then A = U or A = L, otherwise A = U*D or A = L*D.
+*> = 'U': Diagonal blocks are assumed to be unit matrices.
+*> = 'N': Diagonal blocks are assumed to be non-unit matrices.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of vectors
+*> x to be multiplied by A. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by DSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DSYTRF.
+*> \ingroup double_lin
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
+* =====================================================================
+ SUBROUTINE DLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
+ $ LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dlqt01.f b/TESTING/LIN/dlqt01.f
index aa13ff86..16c81780 100644
--- a/TESTING/LIN/dlqt01.f
+++ b/TESTING/LIN/dlqt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE DLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DLQT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DLQT01 tests DGELQF, which computes the LQ factorization of an m-by-n
-* matrix A, and partially tests DORGLQ which forms the n-by-n
-* orthogonal matrix Q.
-*
-* DLQT01 compares L with A*Q', and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLQT01 tests DGELQF, which computes the LQ factorization of an m-by-n
+*> matrix A, and partially tests DORGLQ which forms the n-by-n
+*> orthogonal matrix Q.
+*>
+*> DLQT01 compares L with A*Q', and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the LQ factorization of A, as returned by DGELQF.
-* See DGELQF for further details.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The n-by-n orthogonal matrix Q.
-*
-* L (workspace) DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the LQ factorization of A, as returned by DGELQF.
+*> See DGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> The n-by-n orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGELQF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(M,N))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dlqt02.f b/TESTING/LIN/dlqt02.f
index a77548a2..827fa6a8 100644
--- a/TESTING/LIN/dlqt02.f
+++ b/TESTING/LIN/dlqt02.f
@@ -1,74 +1,155 @@
- SUBROUTINE DLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DLQT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DLQT02 tests DORGLQ, which generates an m-by-n matrix Q with
-* orthonornmal rows that is defined as the product of k elementary
-* reflectors.
-*
-* Given the LQ factorization of an m-by-n matrix A, DLQT02 generates
-* the orthogonal matrix Q defined by the factorization of the first k
-* rows of A; it compares L(1:k,1:m) with A(1:k,1:n)*Q(1:m,1:n)', and
-* checks that the rows of Q are orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLQT02 tests DORGLQ, which generates an m-by-n matrix Q with
+*> orthonornmal rows that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the LQ factorization of an m-by-n matrix A, DLQT02 generates
+*> the orthogonal matrix Q defined by the factorization of the first k
+*> rows of A; it compares L(1:k,1:m) with A(1:k,1:n)*Q(1:m,1:n)', and
+*> checks that the rows of Q are orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* N >= M >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by DLQT01.
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the LQ factorization of A, as returned by DGELQF.
-* See DGELQF for further details.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* L (workspace) DOUBLE PRECISION array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by DLQT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the LQ factorization of A, as returned by DGELQF.
+*> See DGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the LQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (M)
-* The scalar factors of the elementary reflectors corresponding
-* to the LQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dlqt03.f b/TESTING/LIN/dlqt03.f
index 6773cde8..dc3d6517 100644
--- a/TESTING/LIN/dlqt03.f
+++ b/TESTING/LIN/dlqt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE DLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DLQT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DLQT03 tests DORMLQ, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* DLQT03 compares the results of a call to DORMLQ with the results of
-* forming Q explicitly by a call to DORGLQ and then performing matrix
-* multiplication by a call to DGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLQT03 tests DORMLQ, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> DLQT03 compares the results of a call to DORMLQ with the results of
+*> forming Q explicitly by a call to DORGLQ and then performing matrix
+*> multiplication by a call to DGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows or columns of the matrix C; C is n-by-m if
-* Q is applied from the left, or m-by-n if Q is applied from
-* the right. M >= 0.
-*
-* N (input) INTEGER
-* The order of the orthogonal matrix Q. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. N >= K >= 0.
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the LQ factorization of an m-by-n matrix, as
-* returned by DGELQF. See SGELQF for further details.
-*
-* C (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* CC (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows or columns of the matrix C; C is n-by-m if
+*> Q is applied from the left, or m-by-n if Q is applied from
+*> the right. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the orthogonal matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the LQ factorization of an m-by-n matrix, as
+*> returned by DGELQF. See SGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the LQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an n-by-n orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the LQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE DLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an n-by-n orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dpbt01.f b/TESTING/LIN/dpbt01.f
index 94df9f94..34a846f1 100644
--- a/TESTING/LIN/dpbt01.f
+++ b/TESTING/LIN/dpbt01.f
@@ -1,70 +1,139 @@
- SUBROUTINE DPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER KD, LDA, LDAFAC, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
-* ..
-*
+*> \brief \b DPBT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDA, LDAFAC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* DPBT01 reconstructs a symmetric positive definite band matrix A from
-* its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of
-* L, and U' is the conjugate transpose of U.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBT01 reconstructs a symmetric positive definite band matrix A from
+*> its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of
+*> L, and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original symmetric band matrix A. If UPLO = 'U', the
+*> upper triangular part of A is stored as a band matrix; if
+*> UPLO = 'L', the lower triangular part of A is stored. The
+*> columns of the appropriate triangle are stored in the columns
+*> of A and the diagonals of the triangle are stored in the rows
+*> of A. See DPBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the factor
+*> L or U from the L*L' or U'*U factorization in band storage
+*> format, as computed by DPBTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC.
+*> LDAFAC >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original symmetric band matrix A. If UPLO = 'U', the
-* upper triangular part of A is stored as a band matrix; if
-* UPLO = 'L', the lower triangular part of A is stored. The
-* columns of the appropriate triangle are stored in the columns
-* of A and the diagonals of the triangle are stored in the rows
-* of A. See DPBTRF for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \date November 2011
*
-* AFAC (input) DOUBLE PRECISION array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the factor
-* L or U from the L*L' or U'*U factorization in band storage
-* format, as computed by DPBTRF.
+*> \ingroup double_lin
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC.
-* LDAFAC >= max(1,KD+1).
+* =====================================================================
+ SUBROUTINE DPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
+ $ RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER KD, LDA, LDAFAC, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dpbt02.f b/TESTING/LIN/dpbt02.f
index 2b4578c7..d2af8356 100644
--- a/TESTING/LIN/dpbt02.f
+++ b/TESTING/LIN/dpbt02.f
@@ -1,9 +1,141 @@
+*> \brief \b DPBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBT02( UPLO, N, KD, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBT02 computes the residual for a solution of a symmetric banded
+*> system of equations A*x = b:
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS)
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original symmetric band matrix A. If UPLO = 'U', the
+*> upper triangular part of A is stored as a band matrix; if
+*> UPLO = 'L', the lower triangular part of A is stored. The
+*> columns of the appropriate triangle are stored in the columns
+*> of A and the diagonals of the triangle are stored in the rows
+*> of A. See DPBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DPBT02( UPLO, N, KD, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,62 +147,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPBT02 computes the residual for a solution of a symmetric banded
-* system of equations A*x = b:
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS)
-* where EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original symmetric band matrix A. If UPLO = 'U', the
-* upper triangular part of A is stored as a band matrix; if
-* UPLO = 'L', the lower triangular part of A is stored. The
-* columns of the appropriate triangle are stored in the columns
-* of A and the diagonals of the triangle are stored in the rows
-* of A. See DPBTRF for further details.
-*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KD+1).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dpbt05.f b/TESTING/LIN/dpbt05.f
index b2b1885b..ba53b142 100644
--- a/TESTING/LIN/dpbt05.f
+++ b/TESTING/LIN/dpbt05.f
@@ -1,9 +1,182 @@
+*> \brief \b DPBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPBT05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> symmetric band matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DPBT05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,91 +188,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DPBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* symmetric band matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dpot01.f b/TESTING/LIN/dpot01.f
index da5b9a3e..a44f2a22 100644
--- a/TESTING/LIN/dpot01.f
+++ b/TESTING/LIN/dpot01.f
@@ -1,59 +1,124 @@
- SUBROUTINE DPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
+*> \brief \b DPOT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDAFAC, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* DPOT01 reconstructs a symmetric positive definite matrix A from
-* its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOT01 reconstructs a symmetric positive definite matrix A from
+*> its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (LDAFAC,N)
+*> On entry, the factor L or U from the L*L' or U'*U
+*> factorization of A.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*L' - A (or U'*U - A).
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original symmetric matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
+*> \date November 2011
*
-* AFAC (input/output) DOUBLE PRECISION array, dimension (LDAFAC,N)
-* On entry, the factor L or U from the L*L' or U'*U
-* factorization of A.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*L' - A (or U'*U - A).
+*> \ingroup double_lin
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+* =====================================================================
+ SUBROUTINE DPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDAFAC, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dpot02.f b/TESTING/LIN/dpot02.f
index 1d7389a4..638e4ec0 100644
--- a/TESTING/LIN/dpot02.f
+++ b/TESTING/LIN/dpot02.f
@@ -1,9 +1,138 @@
+*> \brief \b DPOT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOT02 computes the residual for the solution of a symmetric system
+*> of linear equations A*x = b:
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*>
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DPOT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,59 +144,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOT02 computes the residual for the solution of a symmetric system
-* of linear equations A*x = b:
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-*
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dpot03.f b/TESTING/LIN/dpot03.f
index 3c410f59..1024066e 100644
--- a/TESTING/LIN/dpot03.f
+++ b/TESTING/LIN/dpot03.f
@@ -1,70 +1,146 @@
- SUBROUTINE DPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
- $ RWORK, RCOND, RESID )
+*> \brief \b DPOT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDAINV, LDWORK, N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
- $ WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
+* RWORK, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAINV, LDWORK, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* DPOT03 computes the residual for a symmetric matrix times its
-* inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOT03 computes the residual for a symmetric matrix times its
+*> inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AINV (input/output) DOUBLE PRECISION array, dimension (LDAINV,N)
-* On entry, the inverse of the matrix A, stored as a symmetric
-* matrix in the same format as A.
-* In this version, AINV is expanded into a full matrix and
-* multiplied by A, so the opposing triangle of AINV will be
-* changed; i.e., if the upper triangular part of AINV is
-* stored, the lower triangular part will be used as work space.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (LDAINV,N)
+*> On entry, the inverse of the matrix A, stored as a symmetric
+*> matrix in the same format as A.
+*> In this version, AINV is expanded into a full matrix and
+*> multiplied by A, so the opposing triangle of AINV will be
+*> changed; i.e., if the upper triangular part of AINV is
+*> stored, the lower triangular part will be used as work space.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup double_lin
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* =====================================================================
+ SUBROUTINE DPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
+ $ RWORK, RCOND, RESID )
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDAINV, LDWORK, N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dpot05.f b/TESTING/LIN/dpot05.f
index 1fefbda6..7b8e4f94 100644
--- a/TESTING/LIN/dpot05.f
+++ b/TESTING/LIN/dpot05.f
@@ -1,9 +1,175 @@
+*> \brief \b DPOT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOT05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> symmetric n by n matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DPOT05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,88 +180,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* symmetric n by n matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dpot06.f b/TESTING/LIN/dpot06.f
index b5ca5cad..1741912f 100644
--- a/TESTING/LIN/dpot06.f
+++ b/TESTING/LIN/dpot06.f
@@ -1,9 +1,138 @@
+*> \brief \b DPOT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPOT06( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPOT06 computes the residual for a solution of a system of linear
+*> equations A*x = b :
+*> RESID = norm(B - A*X,inf) / ( norm(A,inf) * norm(X,inf) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DPOT06( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,59 +144,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DPOT06 computes the residual for a solution of a system of linear
-* equations A*x = b :
-* RESID = norm(B - A*X,inf) / ( norm(A,inf) * norm(X,inf) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,N).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dppt01.f b/TESTING/LIN/dppt01.f
index a8e3853e..0841395b 100644
--- a/TESTING/LIN/dppt01.f
+++ b/TESTING/LIN/dppt01.f
@@ -1,54 +1,113 @@
- SUBROUTINE DPPT01( UPLO, N, A, AFAC, RWORK, RESID )
+*> \brief \b DPPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( * ), AFAC( * ), RWORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPT01( UPLO, N, A, AFAC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( * ), AFAC( * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* DPPT01 reconstructs a symmetric positive definite packed matrix A
-* from its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPT01 reconstructs a symmetric positive definite packed matrix A
+*> from its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the factor L or U from the L*L' or U'*U
+*> factorization of A, stored as a packed triangular matrix.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*L' - A (or U'*U - A).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+*> \date November 2011
*
-* A (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+*> \ingroup double_lin
*
-* AFAC (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the factor L or U from the L*L' or U'*U
-* factorization of A, stored as a packed triangular matrix.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*L' - A (or U'*U - A).
+* =====================================================================
+ SUBROUTINE DPPT01( UPLO, N, A, AFAC, RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( * ), AFAC( * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dppt02.f b/TESTING/LIN/dppt02.f
index 03bc8b55..52cbee5f 100644
--- a/TESTING/LIN/dppt02.f
+++ b/TESTING/LIN/dppt02.f
@@ -1,70 +1,142 @@
- SUBROUTINE DPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDB, LDX, N, NRHS
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( * ), B( LDB, * ), RWORK( * ), X( LDX, * )
-* ..
-*
+*> \brief \b DPPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( * ), B( LDB, * ), RWORK( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DPPT02 computes the residual in the solution of a symmetric system
-* of linear equations A*x = b when packed storage is used for the
-* coefficient matrix. The ratio computed is
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS),
-*
-* where EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPT02 computes the residual in the solution of a symmetric system
+*> of linear equations A*x = b when packed storage is used for the
+*> coefficient matrix. The ratio computed is
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS),
+*>
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
+*> \ingroup double_lin
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE DPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
+ $ RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDB, LDX, N, NRHS
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( * ), B( LDB, * ), RWORK( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dppt03.f b/TESTING/LIN/dppt03.f
index d90bfc79..fb76ef63 100644
--- a/TESTING/LIN/dppt03.f
+++ b/TESTING/LIN/dppt03.f
@@ -1,61 +1,131 @@
- SUBROUTINE DPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
- $ RESID )
+*> \brief \b DPPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDWORK, N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( * ), AINV( * ), RWORK( * ),
- $ WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDWORK, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( * ), AINV( * ), RWORK( * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* DPPT03 computes the residual for a symmetric packed matrix times its
-* inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPT03 computes the residual for a symmetric packed matrix times its
+*> inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The (symmetric) inverse of the matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AINV (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The (symmetric) inverse of the matrix A, stored as a packed
-* triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup double_lin
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* =====================================================================
+ SUBROUTINE DPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
+ $ RESID )
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDWORK, N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( * ), AINV( * ), RWORK( * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dppt05.f b/TESTING/LIN/dppt05.f
index f9c85719..191dc15a 100644
--- a/TESTING/LIN/dppt05.f
+++ b/TESTING/LIN/dppt05.f
@@ -1,9 +1,167 @@
+*> \brief \b DPPT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPPT05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPPT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> symmetric matrix in packed storage format.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DPPT05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,83 +172,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DPPT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* symmetric matrix in packed storage format.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dpst01.f b/TESTING/LIN/dpst01.f
index 395890ea..23d00749 100644
--- a/TESTING/LIN/dpst01.f
+++ b/TESTING/LIN/dpst01.f
@@ -1,9 +1,139 @@
+*> \brief \b DPST01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPST01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
+* PIV, RWORK, RESID, RANK )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION RESID
+* INTEGER LDA, LDAFAC, LDPERM, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ),
+* $ PERM( LDPERM, * ), RWORK( * )
+* INTEGER PIV( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPST01 reconstructs a symmetric positive semidefinite matrix A
+*> from its L or U factors and the permutation matrix P and computes
+*> the residual
+*> norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
+*> norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (LDAFAC,N)
+*> The factor L or U from the L*L' or U'*U
+*> factorization of A.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is DOUBLE PRECISION array, dimension (LDPERM,N)
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference P*L*L'*P' - A (or P*U'*U*P' - A)
+*> \endverbatim
+*>
+*> \param[in] LDPERM
+*> \verbatim
+*> LDPERM is INTEGER
+*> The leading dimension of the array PERM.
+*> LDAPERM >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are
+*> P( PIV( K ), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DPST01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
$ PIV, RWORK, RESID, RANK )
*
* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION RESID
@@ -16,59 +146,6 @@
INTEGER PIV( * )
* ..
*
-* Purpose
-* =======
-*
-* DPST01 reconstructs a symmetric positive semidefinite matrix A
-* from its L or U factors and the permutation matrix P and computes
-* the residual
-* norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
-* norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) DOUBLE PRECISION array, dimension (LDAFAC,N)
-* The factor L or U from the L*L' or U'*U
-* factorization of A.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* PERM (output) DOUBLE PRECISION array, dimension (LDPERM,N)
-* Overwritten with the reconstructed matrix, and then with the
-* difference P*L*L'*P' - A (or P*U'*U*P' - A)
-*
-* LDPERM (input) INTEGER
-* The leading dimension of the array PERM.
-* LDAPERM >= max(1,N).
-*
-* PIV (input) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are
-* P( PIV( K ), K ) = 1.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dptt01.f b/TESTING/LIN/dptt01.f
index 4c10907d..33302be1 100644
--- a/TESTING/LIN/dptt01.f
+++ b/TESTING/LIN/dptt01.f
@@ -1,49 +1,110 @@
- SUBROUTINE DPTT01( N, D, E, DF, EF, WORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), DF( * ), E( * ), EF( * ), WORK( * )
-* ..
-*
+*> \brief \b DPTT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTT01( N, D, E, DF, EF, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), DF( * ), E( * ), EF( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DPTT01 reconstructs a tridiagonal matrix A from its L*D*L'
-* factorization and computes the residual
-* norm(L*D*L' - A) / ( n * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTT01 reconstructs a tridiagonal matrix A from its L*D*L'
+*> factorization and computes the residual
+*> norm(L*D*L' - A) / ( n * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGTER
-* The order of the matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the factor L from the L*D*L'
+*> factorization of A.
+*> \endverbatim
+*>
+*> \param[in] EF
+*> \verbatim
+*> EF is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the factor L from the
+*> L*D*L' factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(L*D*L' - A) / (n * norm(A) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \date November 2011
*
-* DF (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the factor L from the L*D*L'
-* factorization of A.
+*> \ingroup double_lin
*
-* EF (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the factor L from the
-* L*D*L' factorization of A.
+* =====================================================================
+ SUBROUTINE DPTT01( N, D, E, DF, EF, WORK, RESID )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(L*D*L' - A) / (n * norm(A) * EPS)
+* .. Scalar Arguments ..
+ INTEGER N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), DF( * ), E( * ), EF( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dptt02.f b/TESTING/LIN/dptt02.f
index 5e83f1cc..dd547782 100644
--- a/TESTING/LIN/dptt02.f
+++ b/TESTING/LIN/dptt02.f
@@ -1,56 +1,123 @@
- SUBROUTINE DPTT02( N, NRHS, D, E, X, LDX, B, LDB, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDX, N, NRHS
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION B( LDB, * ), D( * ), E( * ), X( LDX, * )
-* ..
-*
+*> \brief \b DPTT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTT02( N, NRHS, D, E, X, LDX, B, LDB, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), D( * ), E( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DPTT02 computes the residual for the solution to a symmetric
-* tridiagonal system of equations:
-* RESID = norm(B - A*X) / (norm(A) * norm(X) * EPS),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTT02 computes the residual for the solution to a symmetric
+*> tridiagonal system of equations:
+*> RESID = norm(B - A*X) / (norm(A) * norm(X) * EPS),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGTER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The n by nrhs matrix of solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the n by nrhs matrix of right hand side vectors B.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(B - A*X) / (norm(A) * norm(X) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The n by nrhs matrix of solution vectors X.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \ingroup double_lin
*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the n by nrhs matrix of right hand side vectors B.
-* On exit, B is overwritten with the difference B - A*X.
+* =====================================================================
+ SUBROUTINE DPTT02( N, NRHS, D, E, X, LDX, B, LDB, RESID )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(B - A*X) / (norm(A) * norm(X) * EPS)
+* .. Scalar Arguments ..
+ INTEGER LDB, LDX, N, NRHS
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION B( LDB, * ), D( * ), E( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dptt05.f b/TESTING/LIN/dptt05.f
index 2a892e91..8d5e9910 100644
--- a/TESTING/LIN/dptt05.f
+++ b/TESTING/LIN/dptt05.f
@@ -1,89 +1,170 @@
- SUBROUTINE DPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
- $ FERR, BERR, RESLTS )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDX, LDXACT, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), E( * ),
- $ FERR( * ), RESLTS( * ), X( LDX, * ),
- $ XACT( LDXACT, * )
-* ..
-*
+*> \brief \b DPTT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
+* FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), E( * ),
+* $ FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
* Purpose
* =======
*
-* DPTT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* symmetric tridiagonal matrix of order n.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DPTT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> symmetric tridiagonal matrix of order n.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) DOUBLE PRECISION array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
+*> \date November 2011
*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \ingroup double_lin
*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
+* =====================================================================
+ SUBROUTINE DPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
+ $ FERR, BERR, RESLTS )
*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
+* .. Scalar Arguments ..
+ INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), E( * ),
+ $ FERR( * ), RESLTS( * ), X( LDX, * ),
+ $ XACT( LDXACT, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqlt01.f b/TESTING/LIN/dqlt01.f
index de4fdb71..a65c63b8 100644
--- a/TESTING/LIN/dqlt01.f
+++ b/TESTING/LIN/dqlt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE DQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DQLT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQLT01 tests DGEQLF, which computes the QL factorization of an m-by-n
-* matrix A, and partially tests DORGQL which forms the m-by-m
-* orthogonal matrix Q.
-*
-* DQLT01 compares L with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQLT01 tests DGEQLF, which computes the QL factorization of an m-by-n
+*> matrix A, and partially tests DORGQL which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> DQLT01 compares L with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QL factorization of A, as returned by DGEQLF.
-* See DGEQLF for further details.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* L (workspace) DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QL factorization of A, as returned by DGEQLF.
+*> See DGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGEQLF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqlt02.f b/TESTING/LIN/dqlt02.f
index af37dd7b..51338f50 100644
--- a/TESTING/LIN/dqlt02.f
+++ b/TESTING/LIN/dqlt02.f
@@ -1,75 +1,156 @@
- SUBROUTINE DQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DQLT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQLT02 tests DORGQL, which generates an m-by-n matrix Q with
-* orthonornmal columns that is defined as the product of k elementary
-* reflectors.
-*
-* Given the QL factorization of an m-by-n matrix A, DQLT02 generates
-* the orthogonal matrix Q defined by the factorization of the last k
-* columns of A; it compares L(m-n+1:m,n-k+1:n) with
-* Q(1:m,m-n+1:m)'*A(1:m,n-k+1:n), and checks that the columns of Q are
-* orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQLT02 tests DORGQL, which generates an m-by-n matrix Q with
+*> orthonornmal columns that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the QL factorization of an m-by-n matrix A, DQLT02 generates
+*> the orthogonal matrix Q defined by the factorization of the last k
+*> columns of A; it compares L(m-n+1:m,n-k+1:n) with
+*> Q(1:m,m-n+1:m)'*A(1:m,n-k+1:n), and checks that the columns of Q are
+*> orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by DQLT01.
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QL factorization of A, as returned by DGEQLF.
-* See DGEQLF for further details.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* L (workspace) DOUBLE PRECISION array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by DQLT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QL factorization of A, as returned by DGEQLF.
+*> See DGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QL factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (N)
-* The scalar factors of the elementary reflectors corresponding
-* to the QL factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqlt03.f b/TESTING/LIN/dqlt03.f
index 3c31ab46..b823a056 100644
--- a/TESTING/LIN/dqlt03.f
+++ b/TESTING/LIN/dqlt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE DQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DQLT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQLT03 tests DORMQL, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* DQLT03 compares the results of a call to DORMQL with the results of
-* forming Q explicitly by a call to DORGQL and then performing matrix
-* multiplication by a call to DGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQLT03 tests DORMQL, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> DQLT03 compares the results of a call to DORMQL with the results of
+*> forming Q explicitly by a call to DORGQL and then performing matrix
+*> multiplication by a call to DGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The order of the orthogonal matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of rows or columns of the matrix C; C is m-by-n if
-* Q is applied from the left, or n-by-m if Q is applied from
-* the right. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. M >= K >= 0.
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QL factorization of an m-by-n matrix, as
-* returned by DGEQLF. See SGEQLF for further details.
-*
-* C (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* CC (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the orthogonal matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows or columns of the matrix C; C is m-by-n if
+*> Q is applied from the left, or n-by-m if Q is applied from
+*> the right. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QL factorization of an m-by-n matrix, as
+*> returned by DGEQLF. See SGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QL factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an m-by-m orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the QL factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE DQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an m-by-m orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqpt01.f b/TESTING/LIN/dqpt01.f
index 28413d9f..22838a6d 100644
--- a/TESTING/LIN/dqpt01.f
+++ b/TESTING/LIN/dqpt01.f
@@ -1,68 +1,140 @@
- DOUBLE PRECISION FUNCTION DQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
- $ WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DQPT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
+* WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQPT01 tests the QR-factorization with pivoting of a matrix A. The
-* array AF contains the (possibly partial) QR-factorization of A, where
-* the upper triangle of AF(1:k,1:k) is a partial triangular factor,
-* the entries below the diagonal in the first k columns are the
-* Householder vectors, and the rest of AF contains a partially updated
-* matrix.
-*
-* This function returns ||A*P - Q*R||/(||norm(A)||*eps*M)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQPT01 tests the QR-factorization with pivoting of a matrix A. The
+*> array AF contains the (possibly partial) QR-factorization of A, where
+*> the upper triangle of AF(1:k,1:k) is a partial triangular factor,
+*> the entries below the diagonal in the first k columns are the
+*> Householder vectors, and the rest of AF contains a partially updated
+*> matrix.
+*>
+*> This function returns ||A*P - Q*R||/(||norm(A)||*eps*M)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
-*
-* K (input) INTEGER
-* The number of columns of AF that have been reduced
-* to upper triangular form.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA, N)
-* The original matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of columns of AF that have been reduced
+*> to upper triangular form.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The original matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> The (possibly partial) output of DGEQPF. The upper triangle
+*> of AF(1:k,1:k) is a partial triangular factor, the entries
+*> below the diagonal in the first k columns are the Householder
+*> vectors, and the rest of AF contains a partially updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> Details of the Householder transformations as returned by
+*> DGEQPF.
+*> \endverbatim
+*>
+*> \param[in] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> Pivot information as returned by DGEQPF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*N+N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The (possibly partial) output of DGEQPF. The upper triangle
-* of AF(1:k,1:k) is a partial triangular factor, the entries
-* below the diagonal in the first k columns are the Householder
-* vectors, and the rest of AF contains a partially updated
-* matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \date November 2011
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* Details of the Householder transformations as returned by
-* DGEQPF.
+*> \ingroup double_lin
*
-* JPVT (input) INTEGER array, dimension (N)
-* Pivot information as returned by DGEQPF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
+ $ WORK, LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*N+N.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt01.f b/TESTING/LIN/dqrt01.f
index 6c2b112f..80e55f48 100644
--- a/TESTING/LIN/dqrt01.f
+++ b/TESTING/LIN/dqrt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE DQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DQRT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQRT01 tests DGEQRF, which computes the QR factorization of an m-by-n
-* matrix A, and partially tests DORGQR which forms the m-by-m
-* orthogonal matrix Q.
-*
-* DQRT01 compares R with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT01 tests DGEQRF, which computes the QR factorization of an m-by-n
+*> matrix A, and partially tests DORGQR which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> DQRT01 compares R with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by DGEQRF.
-* See DGEQRF for further details.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* R (workspace) DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by DGEQRF.
+*> See DGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGEQRF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt01p.f b/TESTING/LIN/dqrt01p.f
index 39cd76b4..7f4f1ac9 100644
--- a/TESTING/LIN/dqrt01p.f
+++ b/TESTING/LIN/dqrt01p.f
@@ -1,68 +1,146 @@
- SUBROUTINE DQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DQRT01P
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQRT01P tests DGEQRFP, which computes the QR factorization of an m-by-n
-* matrix A, and partially tests DORGQR which forms the m-by-m
-* orthogonal matrix Q.
-*
-* DQRT01P compares R with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT01P tests DGEQRFP, which computes the QR factorization of an m-by-n
+*> matrix A, and partially tests DORGQR which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> DQRT01P compares R with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by DGEQRFP.
-* See DGEQRFP for further details.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* R (workspace) DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by DGEQRFP.
+*> See DGEQRFP for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGEQRFP.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGEQRFP.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt02.f b/TESTING/LIN/dqrt02.f
index e8ba4e20..a5dd4881 100644
--- a/TESTING/LIN/dqrt02.f
+++ b/TESTING/LIN/dqrt02.f
@@ -1,74 +1,155 @@
- SUBROUTINE DQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DQRT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQRT02 tests DORGQR, which generates an m-by-n matrix Q with
-* orthonornmal columns that is defined as the product of k elementary
-* reflectors.
-*
-* Given the QR factorization of an m-by-n matrix A, DQRT02 generates
-* the orthogonal matrix Q defined by the factorization of the first k
-* columns of A; it compares R(1:n,1:k) with Q(1:m,1:n)'*A(1:m,1:k),
-* and checks that the columns of Q are orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT02 tests DORGQR, which generates an m-by-n matrix Q with
+*> orthonornmal columns that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the QR factorization of an m-by-n matrix A, DQRT02 generates
+*> the orthogonal matrix Q defined by the factorization of the first k
+*> columns of A; it compares R(1:n,1:k) with Q(1:m,1:n)'*A(1:m,1:k),
+*> and checks that the columns of Q are orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by DQRT01.
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by DGEQRF.
-* See DGEQRF for further details.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* R (workspace) DOUBLE PRECISION array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by DQRT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by DGEQRF.
+*> See DGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (N)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QR factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R. LDA >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (N)
-* The scalar factors of the elementary reflectors corresponding
-* to the QR factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt03.f b/TESTING/LIN/dqrt03.f
index 631a55d7..2ffbbe2c 100644
--- a/TESTING/LIN/dqrt03.f
+++ b/TESTING/LIN/dqrt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE DQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DQRT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQRT03 tests DORMQR, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* DQRT03 compares the results of a call to DORMQR with the results of
-* forming Q explicitly by a call to DORGQR and then performing matrix
-* multiplication by a call to DGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT03 tests DORMQR, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> DQRT03 compares the results of a call to DORMQR with the results of
+*> forming Q explicitly by a call to DORGQR and then performing matrix
+*> multiplication by a call to DGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The order of the orthogonal matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of rows or columns of the matrix C; C is m-by-n if
-* Q is applied from the left, or n-by-m if Q is applied from
-* the right. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. M >= K >= 0.
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the QR factorization of an m-by-n matrix, as
-* returnedby DGEQRF. See SGEQRF for further details.
-*
-* C (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* CC (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the orthogonal matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows or columns of the matrix C; C is m-by-n if
+*> Q is applied from the left, or n-by-m if Q is applied from
+*> the right. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the QR factorization of an m-by-n matrix, as
+*> returnedby DGEQRF. See SGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QR factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an m-by-m orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the QR factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE DQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an m-by-m orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt04.f b/TESTING/LIN/dqrt04.f
index 18ecc005..9ade8cef 100644
--- a/TESTING/LIN/dqrt04.f
+++ b/TESTING/LIN/dqrt04.f
@@ -1,41 +1,90 @@
- SUBROUTINE DQRT04(M,N,NB,RESULT)
+*> \brief \b DQRT04
*
-* -- LAPACK test routine (version 3.?) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* August 2011
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER LWORK, M, N, NB, LDT
-* .. Return values ..
- DOUBLE PRECISION RESULT(6)
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DQRT04(M,N,NB,RESULT)
+*
+* .. Scalar Arguments ..
+* INTEGER LWORK, M, N, NB, LDT
+* .. Return values ..
+* DOUBLE PRECISION RESULT(6)
+*
* Purpose
* =======
*
-* DQRT04 tests DGEQRT and DGEMQRT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT04 tests DGEQRT and DGEMQRT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Number of rows in test matrix.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows in test matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns in test matrix.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size of test matrix. NB <= Min(M,N).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (6)
+*> Results of each of the six tests below.
+*> \endverbatim
+*> \verbatim
+*> RESULT(1) = | A - Q R |
+*> RESULT(2) = | I - Q^H Q |
+*> RESULT(3) = | Q C - Q C |
+*> RESULT(4) = | Q^H C - Q^H C |
+*> RESULT(5) = | C Q - C Q |
+*> RESULT(6) = | C Q^H - C Q^H |
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Number of columns in test matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NB (input) INTEGER
-* Block size of test matrix. NB <= Min(M,N).
+*> \date November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (6)
-* Results of each of the six tests below.
+*> \ingroup double_lin
*
-* RESULT(1) = | A - Q R |
-* RESULT(2) = | I - Q^H Q |
-* RESULT(3) = | Q C - Q C |
-* RESULT(4) = | Q^H C - Q^H C |
-* RESULT(5) = | C Q - C Q |
-* RESULT(6) = | C Q^H - C Q^H |
+* =====================================================================
+ SUBROUTINE DQRT04(M,N,NB,RESULT)
+*
+* -- LAPACK test routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LWORK, M, N, NB, LDT
+* .. Return values ..
+ DOUBLE PRECISION RESULT(6)
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt05.f b/TESTING/LIN/dqrt05.f
index d3a793f0..b13cf542 100644
--- a/TESTING/LIN/dqrt05.f
+++ b/TESTING/LIN/dqrt05.f
@@ -1,45 +1,97 @@
- SUBROUTINE DQRT05(M,N,L,NB,RESULT)
+*> \brief \b DQRT05
*
-* -- LAPACK test routine (version 3.?) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* August 2011
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER LWORK, M, N, L, NB, LDT
-* .. Return values ..
- DOUBLE PRECISION RESULT(6)
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DQRT05(M,N,L,NB,RESULT)
+*
+* .. Scalar Arguments ..
+* INTEGER LWORK, M, N, L, NB, LDT
+* .. Return values ..
+* DOUBLE PRECISION RESULT(6)
+*
* Purpose
* =======
*
-* DQRT05 tests DTPQRT and DTPMQRT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT05 tests DTPQRT and DTPMQRT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Number of rows in lower part of the test matrix.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows in lower part of the test matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns in test matrix.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of rows of the upper trapezoidal part the
+*> lower test matrix. 0 <= L <= M.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size of test matrix. NB <= N.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (6)
+*> Results of each of the six tests below.
+*> \endverbatim
+*> \verbatim
+*> RESULT(1) = | A - Q R |
+*> RESULT(2) = | I - Q^H Q |
+*> RESULT(3) = | Q C - Q C |
+*> RESULT(4) = | Q^H C - Q^H C |
+*> RESULT(5) = | C Q - C Q |
+*> RESULT(6) = | C Q^H - C Q^H |
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Number of columns in test matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part the
-* lower test matrix. 0 <= L <= M.
-*
-* NB (input) INTEGER
-* Block size of test matrix. NB <= N.
+*> \date November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (6)
-* Results of each of the six tests below.
+*> \ingroup double_lin
*
-* RESULT(1) = | A - Q R |
-* RESULT(2) = | I - Q^H Q |
-* RESULT(3) = | Q C - Q C |
-* RESULT(4) = | Q^H C - Q^H C |
-* RESULT(5) = | C Q - C Q |
-* RESULT(6) = | C Q^H - C Q^H |
+* =====================================================================
+ SUBROUTINE DQRT05(M,N,L,NB,RESULT)
+*
+* -- LAPACK test routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LWORK, M, N, L, NB, LDT
+* .. Return values ..
+ DOUBLE PRECISION RESULT(6)
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt11.f b/TESTING/LIN/dqrt11.f
index 59a0b987..6eb3c59c 100644
--- a/TESTING/LIN/dqrt11.f
+++ b/TESTING/LIN/dqrt11.f
@@ -1,56 +1,116 @@
- DOUBLE PRECISION FUNCTION DQRT11( M, K, A, LDA, TAU, WORK, LWORK )
+*> \brief \b DQRT11
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DQRT11( M, K, A, LDA, TAU, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQRT11 computes the test ratio
-*
-* || Q'*Q - I || / (eps * m)
-*
-* where the orthogonal matrix Q is represented as a product of
-* elementary transformations. Each transformation has the form
-*
-* H(k) = I - tau(k) v(k) v(k)'
-*
-* where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
-* [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
-* in A(k+1:m,k).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT11 computes the test ratio
+*>
+*> || Q'*Q - I || / (eps * m)
+*>
+*> where the orthogonal matrix Q is represented as a product of
+*> elementary transformations. Each transformation has the form
+*>
+*> H(k) = I - tau(k) v(k) v(k)'
+*>
+*> where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
+*> [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
+*> in A(k+1:m,k).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of columns of A whose subdiagonal entries
+*> contain information about orthogonal transformations.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,K)
+*> The (possibly partial) output of a QR reduction routine.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (K)
+*> The scaling factors tau for the elementary transformations as
+*> computed by the QR factorization routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*M + M.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of columns of A whose subdiagonal entries
-* contain information about orthogonal transformations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,K)
-* The (possibly partial) output of a QR reduction routine.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \ingroup double_lin
*
-* TAU (input) DOUBLE PRECISION array, dimension (K)
-* The scaling factors tau for the elementary transformations as
-* computed by the QR factorization routine.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DQRT11( M, K, A, LDA, TAU, WORK, LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*M + M.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt12.f b/TESTING/LIN/dqrt12.f
index 6e6c6dbe..d180a486 100644
--- a/TESTING/LIN/dqrt12.f
+++ b/TESTING/LIN/dqrt12.f
@@ -1,47 +1,107 @@
- DOUBLE PRECISION FUNCTION DQRT12( M, N, A, LDA, S, WORK, LWORK )
+*> \brief \b DQRT12
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), S( * ), WORK( LWORK )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DQRT12( M, N, A, LDA, S, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), S( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQRT12 computes the singular values `svlues' of the upper trapezoid
-* of A(1:M,1:N) and returns the ratio
-*
-* || s - svlues||/(||svlues||*eps*max(M,N))
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT12 computes the singular values `svlues' of the upper trapezoid
+*> of A(1:M,1:N) and returns the ratio
+*>
+*> || s - svlues||/(||svlues||*eps*max(M,N))
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix A. Only the upper trapezoid is referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of the matrix A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(M*N + 4*min(M,N) +
+*> max(M,N), M*N+2*MIN( M, N )+4*N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix A. Only the upper trapezoid is referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \ingroup double_lin
*
-* S (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of the matrix A.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DQRT12( M, N, A, LDA, S, WORK, LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(M*N + 4*min(M,N) +
-* max(M,N), M*N+2*MIN( M, N )+4*N).
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), S( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt13.f b/TESTING/LIN/dqrt13.f
index 911f20d2..4023c4d6 100644
--- a/TESTING/LIN/dqrt13.f
+++ b/TESTING/LIN/dqrt13.f
@@ -1,49 +1,111 @@
- SUBROUTINE DQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, M, N, SCALE
- DOUBLE PRECISION NORMA
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION A( LDA, * )
-* ..
-*
+*> \brief \b DQRT13
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, M, N, SCALE
+* DOUBLE PRECISION NORMA
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* DQRT13 generates a full-rank matrix that may be scaled to have large
-* or small norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT13 generates a full-rank matrix that may be scaled to have large
+*> or small norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SCALE (input) INTEGER
-* SCALE = 1: normally scaled matrix
-* SCALE = 2: matrix scaled up
-* SCALE = 3: matrix scaled down
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is INTEGER
+*> SCALE = 1: normally scaled matrix
+*> SCALE = 2: matrix scaled up
+*> SCALE = 3: matrix scaled down
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[out] NORMA
+*> \verbatim
+*> NORMA is DOUBLE PRECISION
+*> The one-norm of A.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is integer array, dimension (4)
+*> Seed for random number generator
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of A.
+*> \date November 2011
*
-* A (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix A.
+*> \ingroup double_lin
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+* =====================================================================
+ SUBROUTINE DQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
*
-* NORMA (output) DOUBLE PRECISION
-* The one-norm of A.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* ISEED (input/output) integer array, dimension (4)
-* Seed for random number generator
+* .. Scalar Arguments ..
+ INTEGER LDA, M, N, SCALE
+ DOUBLE PRECISION NORMA
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt14.f b/TESTING/LIN/dqrt14.f
index f14bde2c..a61543ca 100644
--- a/TESTING/LIN/dqrt14.f
+++ b/TESTING/LIN/dqrt14.f
@@ -1,64 +1,135 @@
- DOUBLE PRECISION FUNCTION DQRT14( TRANS, M, N, NRHS, A, LDA, X,
- $ LDX, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER LDA, LDX, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), WORK( LWORK ), X( LDX, * )
-* ..
-*
+*> \brief \b DQRT14
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DQRT14( TRANS, M, N, NRHS, A, LDA, X,
+* LDX, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), WORK( LWORK ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DQRT14 checks whether X is in the row space of A or A'. It does so
-* by scaling both X and A such that their norms are in the range
-* [sqrt(eps), 1/sqrt(eps)], then computing a QR factorization of [A,X]
-* (if TRANS = 'T') or an LQ factorization of [A',X]' (if TRANS = 'N'),
-* and returning the norm of the trailing triangle, scaled by
-* MAX(M,N,NRHS)*eps.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT14 checks whether X is in the row space of A or A'. It does so
+*> by scaling both X and A such that their norms are in the range
+*> [sqrt(eps), 1/sqrt(eps)], then computing a QR factorization of [A,X]
+*> (if TRANS = 'T') or an LQ factorization of [A',X]' (if TRANS = 'N'),
+*> and returning the norm of the trailing triangle, scaled by
+*> MAX(M,N,NRHS)*eps.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, check for X in the row space of A
-* = 'T': Transpose, check for X in the row space of A'.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of X.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, check for X in the row space of A
+*> = 'T': Transpose, check for X in the row space of A'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of X.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If TRANS = 'N', the N-by-NRHS matrix X.
+*> IF TRANS = 'T', the M-by-NRHS matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of workspace array required
+*> If TRANS = 'N', LWORK >= (M+NRHS)*(N+2);
+*> if TRANS = 'T', LWORK >= (N+NRHS)*(M+2).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \date November 2011
*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If TRANS = 'N', the N-by-NRHS matrix X.
-* IF TRANS = 'T', the M-by-NRHS matrix X.
+*> \ingroup double_lin
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DQRT14( TRANS, M, N, NRHS, A, LDA, X,
+ $ LDX, WORK, LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of workspace array required
-* If TRANS = 'N', LWORK >= (M+NRHS)*(N+2);
-* if TRANS = 'T', LWORK >= (N+NRHS)*(M+2).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER LDA, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), WORK( LWORK ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt15.f b/TESTING/LIN/dqrt15.f
index fdd32352..76030a81 100644
--- a/TESTING/LIN/dqrt15.f
+++ b/TESTING/LIN/dqrt15.f
@@ -1,78 +1,168 @@
- SUBROUTINE DQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
- $ RANK, NORMA, NORMB, ISEED, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
- DOUBLE PRECISION NORMA, NORMB
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b DQRT15
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
+* RANK, NORMA, NORMB, ISEED, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
+* DOUBLE PRECISION NORMA, NORMB
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DQRT15 generates a matrix with full or deficient rank and of various
-* norms.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT15 generates a matrix with full or deficient rank and of various
+*> norms.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SCALE (input) INTEGER
-* SCALE = 1: normally scaled matrix
-* SCALE = 2: matrix scaled up
-* SCALE = 3: matrix scaled down
-*
-* RKSEL (input) INTEGER
-* RKSEL = 1: full rank matrix
-* RKSEL = 2: rank-deficient matrix
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of A.
-*
-* NRHS (input) INTEGER
-* The number of columns of B.
-*
-* A (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-*
-* B (output) DOUBLE PRECISION array, dimension (LDB, NRHS)
-* A matrix that is in the range space of matrix A.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-*
-* S (output) DOUBLE PRECISION array, dimension MIN(M,N)
-* Singular values of A.
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is INTEGER
+*> SCALE = 1: normally scaled matrix
+*> SCALE = 2: matrix scaled up
+*> SCALE = 3: matrix scaled down
+*> \endverbatim
+*>
+*> \param[in] RKSEL
+*> \verbatim
+*> RKSEL is INTEGER
+*> RKSEL = 1: full rank matrix
+*> RKSEL = 2: rank-deficient matrix
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, NRHS)
+*> A matrix that is in the range space of matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension MIN(M,N)
+*> Singular values of A.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> number of nonzero singular values of A.
+*> \endverbatim
+*>
+*> \param[out] NORMA
+*> \verbatim
+*> NORMA is DOUBLE PRECISION
+*> one-norm of A.
+*> \endverbatim
+*>
+*> \param[out] NORMB
+*> \verbatim
+*> NORMB is DOUBLE PRECISION
+*> one-norm of B.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is integer array, dimension (4)
+*> seed for random number generator.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of work space required.
+*> LWORK >= MAX(M+MIN(M,N),NRHS*MIN(M,N),2*N+M)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RANK (output) INTEGER
-* number of nonzero singular values of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NORMA (output) DOUBLE PRECISION
-* one-norm of A.
+*> \date November 2011
*
-* NORMB (output) DOUBLE PRECISION
-* one-norm of B.
+*> \ingroup double_lin
*
-* ISEED (input/output) integer array, dimension (4)
-* seed for random number generator.
+* =====================================================================
+ SUBROUTINE DQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
+ $ RANK, NORMA, NORMB, ISEED, WORK, LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of work space required.
-* LWORK >= MAX(M+MIN(M,N),NRHS*MIN(M,N),2*N+M)
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
+ DOUBLE PRECISION NORMA, NORMB
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dqrt16.f b/TESTING/LIN/dqrt16.f
index 19281309..26c451af 100644
--- a/TESTING/LIN/dqrt16.f
+++ b/TESTING/LIN/dqrt16.f
@@ -1,9 +1,144 @@
+*> \brief \b DQRT16
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DQRT16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT16 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DQRT16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DQRT16 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dqrt17.f b/TESTING/LIN/dqrt17.f
index b3e4d169..b4f93d30 100644
--- a/TESTING/LIN/dqrt17.f
+++ b/TESTING/LIN/dqrt17.f
@@ -1,86 +1,170 @@
- DOUBLE PRECISION FUNCTION DQRT17( TRANS, IRESID, M, N, NRHS, A,
- $ LDA, X, LDX, B, LDB, C, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDB, * ),
- $ WORK( LWORK ), X( LDX, * )
-* ..
-*
+*> \brief \b DQRT17
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DQRT17( TRANS, IRESID, M, N, NRHS, A,
+* LDA, X, LDX, B, LDB, C, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDB, * ),
+* $ WORK( LWORK ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DQRT17 computes the ratio
-*
-* || R'*op(A) ||/(||A||*alpha*max(M,N,NRHS)*eps)
-*
-* where R = op(A)*X - B, op(A) is A or A', and
-*
-* alpha = ||B|| if IRESID = 1 (zero-residual problem)
-* alpha = ||R|| if IRESID = 2 (otherwise).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DQRT17 computes the ratio
+*>
+*> || R'*op(A) ||/(||A||*alpha*max(M,N,NRHS)*eps)
+*>
+*> where R = op(A)*X - B, op(A) is A or A', and
+*>
+*> alpha = ||B|| if IRESID = 1 (zero-residual problem)
+*> alpha = ||R|| if IRESID = 2 (otherwise).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies whether or not the transpose of A is used.
-* = 'N': No transpose, op(A) = A.
-* = 'T': Transpose, op(A) = A'.
-*
-* IRESID (input) INTEGER
-* IRESID = 1 indicates zero-residual problem.
-* IRESID = 2 indicates non-zero residual.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-* If TRANS = 'N', the number of rows of the matrix B.
-* If TRANS = 'T', the number of rows of the matrix X.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-* If TRANS = 'N', the number of rows of the matrix X.
-* If TRANS = 'T', the number of rows of the matrix B.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and B.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* If TRANS = 'N', the n-by-nrhs matrix X.
-* If TRANS = 'T', the m-by-nrhs matrix X.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether or not the transpose of A is used.
+*> = 'N': No transpose, op(A) = A.
+*> = 'T': Transpose, op(A) = A'.
+*> \endverbatim
+*>
+*> \param[in] IRESID
+*> \verbatim
+*> IRESID is INTEGER
+*> IRESID = 1 indicates zero-residual problem.
+*> IRESID = 2 indicates non-zero residual.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> If TRANS = 'N', the number of rows of the matrix B.
+*> If TRANS = 'T', the number of rows of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> If TRANS = 'N', the number of rows of the matrix X.
+*> If TRANS = 'T', the number of rows of the matrix B.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> If TRANS = 'N', the n-by-nrhs matrix X.
+*> If TRANS = 'T', the m-by-nrhs matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> If TRANS = 'N', LDX >= N.
+*> If TRANS = 'T', LDX >= M.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> If TRANS = 'N', the m-by-nrhs matrix B.
+*> If TRANS = 'T', the n-by-nrhs matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B.
+*> If TRANS = 'N', LDB >= M.
+*> If TRANS = 'T', LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= NRHS*(M+N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
-* If TRANS = 'N', LDX >= N.
-* If TRANS = 'T', LDX >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* If TRANS = 'N', the m-by-nrhs matrix B.
-* If TRANS = 'T', the n-by-nrhs matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* If TRANS = 'N', LDB >= M.
-* If TRANS = 'T', LDB >= N.
+*> \ingroup double_lin
*
-* C (workspace) DOUBLE PRECISION array, dimension (LDB,NRHS)
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DQRT17( TRANS, IRESID, M, N, NRHS, A,
+ $ LDA, X, LDX, B, LDB, C, WORK, LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= NRHS*(M+N).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDB, * ),
+ $ WORK( LWORK ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/drqt01.f b/TESTING/LIN/drqt01.f
index 5fef3e6e..25aca390 100644
--- a/TESTING/LIN/drqt01.f
+++ b/TESTING/LIN/drqt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE DRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DRQT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DRQT01 tests DGERQF, which computes the RQ factorization of an m-by-n
-* matrix A, and partially tests DORGRQ which forms the n-by-n
-* orthogonal matrix Q.
-*
-* DRQT01 compares R with A*Q', and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DRQT01 tests DGERQF, which computes the RQ factorization of an m-by-n
+*> matrix A, and partially tests DORGRQ which forms the n-by-n
+*> orthogonal matrix Q.
+*>
+*> DRQT01 compares R with A*Q', and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the RQ factorization of A, as returned by DGERQF.
-* See DGERQF for further details.
-*
-* Q (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The n-by-n orthogonal matrix Q.
-*
-* R (workspace) DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the RQ factorization of A, as returned by DGERQF.
+*> See DGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> The n-by-n orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by DGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by DGERQF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(M,N))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/drqt02.f b/TESTING/LIN/drqt02.f
index 30d6f702..c990c5a0 100644
--- a/TESTING/LIN/drqt02.f
+++ b/TESTING/LIN/drqt02.f
@@ -1,75 +1,156 @@
- SUBROUTINE DRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DRQT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DRQT02 tests DORGRQ, which generates an m-by-n matrix Q with
-* orthonornmal rows that is defined as the product of k elementary
-* reflectors.
-*
-* Given the RQ factorization of an m-by-n matrix A, DRQT02 generates
-* the orthogonal matrix Q defined by the factorization of the last k
-* rows of A; it compares R(m-k+1:m,n-m+1:n) with
-* A(m-k+1:m,1:n)*Q(n-m+1:n,1:n)', and checks that the rows of Q are
-* orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DRQT02 tests DORGRQ, which generates an m-by-n matrix Q with
+*> orthonornmal rows that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the RQ factorization of an m-by-n matrix A, DRQT02 generates
+*> the orthogonal matrix Q defined by the factorization of the last k
+*> rows of A; it compares R(m-k+1:m,n-m+1:n) with
+*> A(m-k+1:m,1:n)*Q(n-m+1:n,1:n)', and checks that the rows of Q are
+*> orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* N >= M >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by DRQT01.
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the RQ factorization of A, as returned by DGERQF.
-* See DGERQF for further details.
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* R (workspace) DOUBLE PRECISION array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by DRQT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the RQ factorization of A, as returned by DGERQF.
+*> See DGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the RQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (M)
-* The scalar factors of the elementary reflectors corresponding
-* to the RQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE DRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/drqt03.f b/TESTING/LIN/drqt03.f
index 5effdc8a..f3afbdda 100644
--- a/TESTING/LIN/drqt03.f
+++ b/TESTING/LIN/drqt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE DRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DRQT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DRQT03 tests DORMRQ, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* DRQT03 compares the results of a call to DORMRQ with the results of
-* forming Q explicitly by a call to DORGRQ and then performing matrix
-* multiplication by a call to DGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DRQT03 tests DORMRQ, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> DRQT03 compares the results of a call to DORMRQ with the results of
+*> forming Q explicitly by a call to DORGRQ and then performing matrix
+*> multiplication by a call to DGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows or columns of the matrix C; C is n-by-m if
-* Q is applied from the left, or m-by-n if Q is applied from
-* the right. M >= 0.
-*
-* N (input) INTEGER
-* The order of the orthogonal matrix Q. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. N >= K >= 0.
-*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* Details of the RQ factorization of an m-by-n matrix, as
-* returned by DGERQF. See SGERQF for further details.
-*
-* C (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* CC (workspace) DOUBLE PRECISION array, dimension (LDA,N)
-*
-* Q (workspace) DOUBLE PRECISION array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows or columns of the matrix C; C is n-by-m if
+*> Q is applied from the left, or m-by-n if Q is applied from
+*> the right. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the orthogonal matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> Details of the RQ factorization of an m-by-n matrix, as
+*> returned by DGERQF. See SGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is DOUBLE PRECISION array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the RQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an n-by-n orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the RQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+*> \ingroup double_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE DRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an n-by-n orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/drzt01.f b/TESTING/LIN/drzt01.f
index 0700bea9..cb98f793 100644
--- a/TESTING/LIN/drzt01.f
+++ b/TESTING/LIN/drzt01.f
@@ -1,52 +1,117 @@
- DOUBLE PRECISION FUNCTION DRZT01( M, N, A, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DRZT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DRZT01( M, N, A, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DRZT01 returns
-* || A - R*Q || / ( M * eps * ||A|| )
-* for an upper trapezoidal A that was factored with DTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DRZT01 returns
+*> || A - R*Q || / ( M * eps * ||A|| )
+*> for an upper trapezoidal A that was factored with DTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original upper trapezoidal M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> The output of DTZRZF for input matrix A.
+*> The lower triangle is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> DTZRZF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= m*n + m*nb.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original upper trapezoidal M by N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The output of DTZRZF for input matrix A.
-* The lower triangle is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \ingroup double_lin
*
-* TAU (input) DOUBLE PRECISION array, dimension (M)
-* Details of the Householder transformations as returned by
-* DTZRZF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DRZT01( M, N, A, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= m*n + m*nb.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/drzt02.f b/TESTING/LIN/drzt02.f
index 8d2306a0..af785e1b 100644
--- a/TESTING/LIN/drzt02.f
+++ b/TESTING/LIN/drzt02.f
@@ -1,48 +1,109 @@
- DOUBLE PRECISION FUNCTION DRZT02( M, N, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AF( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b DRZT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DRZT02( M, N, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DRZT02 returns
-* || I - Q'*Q || / ( M * eps)
-* where the matrix Q is defined by the Householder transformations
-* generated by DTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DRZT02 returns
+*> || I - Q'*Q || / ( M * eps)
+*> where the matrix Q is defined by the Householder transformations
+*> generated by DTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> The output of DTZRZF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> DTZRZF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of WORK array. LWORK >= N*N+N*NB.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix AF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The output of DTZRZF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array AF.
+*> \ingroup double_lin
*
-* TAU (input) DOUBLE PRECISION array, dimension (M)
-* Details of the Householder transformations as returned by
-* DTZRZF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DRZT02( M, N, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of WORK array. LWORK >= N*N+N*NB.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dspt01.f b/TESTING/LIN/dspt01.f
index b1168a1d..05d6a2c8 100644
--- a/TESTING/LIN/dspt01.f
+++ b/TESTING/LIN/dspt01.f
@@ -1,62 +1,129 @@
- SUBROUTINE DSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*> \brief \b DSPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDC, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION A( * ), AFAC( * ), C( LDC, * ), RWORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( * ), AFAC( * ), C( LDC, * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* DSPT01 reconstructs a symmetric indefinite packed matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSPT01 reconstructs a symmetric indefinite packed matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A, stored as a packed
+*> triangular matrix. AFAC contains the block diagonal matrix D
+*> and the multipliers used to obtain the factor L or U from the
+*> block L*D*L' or U*D*U' factorization as computed by DSPTRF.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DSPTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AFAC (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The factored form of the matrix A, stored as a packed
-* triangular matrix. AFAC contains the block diagonal matrix D
-* and the multipliers used to obtain the factor L or U from the
-* block L*D*L' or U*D*U' factorization as computed by DSPTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DSPTRF.
+*> \date November 2011
*
-* C (workspace) DOUBLE PRECISION array, dimension (LDC,N)
+*> \ingroup double_lin
*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
+* =====================================================================
+ SUBROUTINE DSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDC, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION A( * ), AFAC( * ), C( LDC, * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dsyt01.f b/TESTING/LIN/dsyt01.f
index b78abbc1..b4329034 100644
--- a/TESTING/LIN/dsyt01.f
+++ b/TESTING/LIN/dsyt01.f
@@ -1,9 +1,133 @@
+*> \brief \b DSYT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DSYT01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, LDC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * ),
+* $ RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DSYT01 reconstructs a symmetric indefinite matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor L or U from the block L*D*L' or U*D*U' factorization
+*> as computed by DSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from DSYTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DSYT01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,55 +140,6 @@
$ RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DSYT01 reconstructs a symmetric indefinite matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix and EPS is the machine epsilon.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) DOUBLE PRECISION array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor L or U from the block L*D*L' or U*D*U' factorization
-* as computed by DSYTRF.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from DSYTRF.
-*
-* C (workspace) DOUBLE PRECISION array, dimension (LDC,N)
-*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtbt02.f b/TESTING/LIN/dtbt02.f
index 00a754e6..5229dbee 100644
--- a/TESTING/LIN/dtbt02.f
+++ b/TESTING/LIN/dtbt02.f
@@ -1,9 +1,165 @@
+*> \brief \b DTBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBT02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
+* LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b or A' *x = b when
+*> A is a triangular band matrix. Here A' is the transpose of A and
+*> x and b are N by NRHS matrices. The test ratio is the maximum over
+*> the number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A'*x = b (Transpose)
+*> = 'C': A'*x = b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTBT02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
$ LDX, B, LDB, WORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,77 +171,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DTBT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b or A' *x = b when
-* A is a triangular band matrix. Here A' is the transpose of A and
-* x and b are N by NRHS matrices. The test ratio is the maximum over
-* the number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A'*x = b (Transpose)
-* = 'C': A'*x = b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtbt03.f b/TESTING/LIN/dtbt03.f
index f1786cf4..69e5d0bc 100644
--- a/TESTING/LIN/dtbt03.f
+++ b/TESTING/LIN/dtbt03.f
@@ -1,10 +1,186 @@
+*> \brief \b DTBT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBT03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
+* SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ), CNORM( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b or A'*x = s*b when A is a
+*> triangular band matrix. Here A' is the transpose of A, s is a scalar,
+*> and x and b are N by NRHS matrices. The test ratio is the maximum
+*> over the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A'*x = b (Transpose)
+*> = 'C': A'*x = b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is DOUBLE PRECISION array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is DOUBLE PRECISION
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTBT03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
$ SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -16,87 +192,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DTBT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b or A'*x = s*b when A is a
-* triangular band matrix. Here A' is the transpose of A, s is a scalar,
-* and x and b are N by NRHS matrices. The test ratio is the maximum
-* over the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A'*x = b (Transpose)
-* = 'C': A'*x = b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* SCALE (input) DOUBLE PRECISION
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) DOUBLE PRECISION array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) DOUBLE PRECISION
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtbt05.f b/TESTING/LIN/dtbt05.f
index 19f5fa25..e7dda82a 100644
--- a/TESTING/LIN/dtbt05.f
+++ b/TESTING/LIN/dtbt05.f
@@ -1,9 +1,200 @@
+*> \brief \b DTBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBT05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular band matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTBT05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,103 +206,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DTBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular band matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtbt06.f b/TESTING/LIN/dtbt06.f
index 9b699a6b..b98e4cdd 100644
--- a/TESTING/LIN/dtbt06.f
+++ b/TESTING/LIN/dtbt06.f
@@ -1,73 +1,145 @@
- SUBROUTINE DTBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
- $ WORK, RAT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER KD, LDAB, N
- DOUBLE PRECISION RAT, RCOND, RCONDC
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AB( LDAB, * ), WORK( * )
-* ..
-*
+*> \brief \b DTBT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
+* WORK, RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER KD, LDAB, N
+* DOUBLE PRECISION RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DTBT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by DTBCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTBT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by DTBCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* RCOND (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number computed by
-* DTBCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number computed by
+*> DTBCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is DOUBLE PRECISION array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is DOUBLE PRECISION
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
+*> \date November 2011
*
-* AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \ingroup double_lin
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+* =====================================================================
+ SUBROUTINE DTBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
+ $ WORK, RAT )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RAT (output) DOUBLE PRECISION
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER KD, LDAB, N
+ DOUBLE PRECISION RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AB( LDAB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dtpt01.f b/TESTING/LIN/dtpt01.f
index a2805aa2..1d22172d 100644
--- a/TESTING/LIN/dtpt01.f
+++ b/TESTING/LIN/dtpt01.f
@@ -1,63 +1,128 @@
- SUBROUTINE DTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, WORK, RESID )
+*> \brief \b DTPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AINVP( * ), AP( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AINVP( * ), AP( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DTPT01 computes the residual for a triangular matrix A times its
-* inverse when A is stored in packed format:
-* RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPT01 computes the residual for a triangular matrix A times its
+*> inverse when A is stored in packed format:
+*> RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The original upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] AINVP
+*> \verbatim
+*> AINVP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> On entry, the (triangular) inverse of the matrix A, packed
+*> columnwise in a linear array as in AP.
+*> On exit, the contents of AINVP are destroyed.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal condition number of A, computed as
+*> 1/(norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The original upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \date November 2011
*
-* AINVP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* On entry, the (triangular) inverse of the matrix A, packed
-* columnwise in a linear array as in AP.
-* On exit, the contents of AINVP are destroyed.
+*> \ingroup double_lin
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal condition number of A, computed as
-* 1/(norm(A) * norm(AINV)).
+* =====================================================================
+ SUBROUTINE DTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, WORK, RESID )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AINVP( * ), AP( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dtpt02.f b/TESTING/LIN/dtpt02.f
index 7cb683bf..9048e947 100644
--- a/TESTING/LIN/dtpt02.f
+++ b/TESTING/LIN/dtpt02.f
@@ -1,83 +1,161 @@
- SUBROUTINE DTPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
- $ WORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER LDB, LDX, N, NRHS
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
-* ..
-*
+*> \brief \b DTPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
+* WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DTPT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b or A'*x = b when
-* the triangular matrix A is stored in packed format. Here A' is the
-* transpose of A and x and b are N by NRHS matrices. The test ratio is
-* the maximum over the number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b or A'*x = b when
+*> the triangular matrix A is stored in packed format. Here A' is the
+*> transpose of A and x and b are N by NRHS matrices. The test ratio is
+*> the maximum over the number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A'*x = b (Transpose)
-* = 'C': A'*x = b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A'*x = b (Transpose)
+*> = 'C': A'*x = b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
+*> \ingroup double_lin
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE DTPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
+ $ WORK, RESID )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER LDB, LDX, N, NRHS
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dtpt03.f b/TESTING/LIN/dtpt03.f
index cd81c1ea..bc7e9bff 100644
--- a/TESTING/LIN/dtpt03.f
+++ b/TESTING/LIN/dtpt03.f
@@ -1,94 +1,182 @@
- SUBROUTINE DTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
- $ TSCAL, X, LDX, B, LDB, WORK, RESID )
+*> \brief \b DTPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER LDB, LDX, N, NRHS
- DOUBLE PRECISION RESID, SCALE, TSCAL
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AP( * ), B( LDB, * ), CNORM( * ), WORK( * ),
- $ X( LDX, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
+* TSCAL, X, LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), B( LDB, * ), CNORM( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* DTPT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b or A'*x = s*b when the triangular
-* matrix A is stored in packed format. Here A' is the transpose of A,
-* s is a scalar, and x and b are N by NRHS matrices. The test ratio is
-* the maximum over the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b or A'*x = s*b when the triangular
+*> matrix A is stored in packed format. Here A' is the transpose of A,
+*> s is a scalar, and x and b are N by NRHS matrices. The test ratio is
+*> the maximum over the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A'*x = s*b (Transpose)
-* = 'C': A'*x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A'*x = s*b (Transpose)
+*> = 'C': A'*x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is DOUBLE PRECISION array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is DOUBLE PRECISION
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* SCALE (input) DOUBLE PRECISION
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) DOUBLE PRECISION array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) DOUBLE PRECISION
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
+* Authors
+* =======
*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
+*> \ingroup double_lin
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE DTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
+ $ TSCAL, X, LDX, B, LDB, WORK, RESID )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER LDB, LDX, N, NRHS
+ DOUBLE PRECISION RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AP( * ), B( LDB, * ), CNORM( * ), WORK( * ),
+ $ X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dtpt05.f b/TESTING/LIN/dtpt05.f
index f1765538..00a1f248 100644
--- a/TESTING/LIN/dtpt05.f
+++ b/TESTING/LIN/dtpt05.f
@@ -1,9 +1,185 @@
+*> \brief \b DTPT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPT05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular matrix in packed storage format.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTPT05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,95 +190,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DTPT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular matrix in packed storage format.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtpt06.f b/TESTING/LIN/dtpt06.f
index 2f3cbf54..163d9faf 100644
--- a/TESTING/LIN/dtpt06.f
+++ b/TESTING/LIN/dtpt06.f
@@ -1,8 +1,122 @@
+*> \brief \b DTPT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTPT06( RCOND, RCONDC, UPLO, DIAG, N, AP, WORK, RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER N
+* DOUBLE PRECISION RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTPT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by DTPCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number computed by
+*> DTPCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is DOUBLE PRECISION
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTPT06( RCOND, RCONDC, UPLO, DIAG, N, AP, WORK, RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,55 +127,6 @@
DOUBLE PRECISION AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTPT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by DTPCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number computed by
-* DTPCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RAT (output) DOUBLE PRECISION
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtrt01.f b/TESTING/LIN/dtrt01.f
index 783dd4d6..f96c12f1 100644
--- a/TESTING/LIN/dtrt01.f
+++ b/TESTING/LIN/dtrt01.f
@@ -1,72 +1,144 @@
- SUBROUTINE DTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
- $ WORK, RESID )
+*> \brief \b DTRT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER LDA, LDAINV, N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE DTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
+* WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER LDA, LDAINV, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DTRT01 computes the residual for a triangular matrix A times its
-* inverse:
-* RESID = norm( A*AINV - I ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRT01 computes the residual for a triangular matrix A times its
+*> inverse:
+*> RESID = norm( A*AINV - I ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (LDAINV,N)
+*> On entry, the (triangular) inverse of the matrix A, in the
+*> same storage format as A.
+*> On exit, the contents of AINV are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal condition number of A, computed as
+*> 1/(norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AINV (input/output) DOUBLE PRECISION array, dimension (LDAINV,N)
-* On entry, the (triangular) inverse of the matrix A, in the
-* same storage format as A.
-* On exit, the contents of AINV are destroyed.
+*> \date November 2011
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \ingroup double_lin
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal condition number of A, computed as
-* 1/(norm(A) * norm(AINV)).
+* =====================================================================
+ SUBROUTINE DTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
+ $ WORK, RESID )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER LDA, LDAINV, N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AINV( LDAINV, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dtrt02.f b/TESTING/LIN/dtrt02.f
index cde66e49..7a9b0796 100644
--- a/TESTING/LIN/dtrt02.f
+++ b/TESTING/LIN/dtrt02.f
@@ -1,9 +1,161 @@
+*> \brief \b DTRT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRT02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
+* LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b or A'*x = b.
+*> Here A is a triangular matrix, A' is the transpose of A, and x and b
+*> are N by NRHS matrices. The test ratio is the maximum over the
+*> number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A'*x = b (Transpose)
+*> = 'C': A'*x = b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTRT02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
$ LDB, WORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,76 +167,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b or A'*x = b.
-* Here A is a triangular matrix, A' is the transpose of A, and x and b
-* are N by NRHS matrices. The test ratio is the maximum over the
-* number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A'*x = b (Transpose)
-* = 'C': A'*x = b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtrt03.f b/TESTING/LIN/dtrt03.f
index 78786a03..8259c287 100644
--- a/TESTING/LIN/dtrt03.f
+++ b/TESTING/LIN/dtrt03.f
@@ -1,9 +1,180 @@
+*> \brief \b DTRT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRT03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
+* CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), CNORM( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b or A'*x = s*b.
+*> Here A is a triangular matrix, A' is the transpose of A, s is a
+*> scalar, and x and b are N by NRHS matrices. The test ratio is the
+*> maximum over the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A'*x = s*b (Transpose)
+*> = 'C': A'*x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is DOUBLE PRECISION array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is DOUBLE PRECISION
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTRT03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
$ CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,86 +186,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b or A'*x = s*b.
-* Here A is a triangular matrix, A' is the transpose of A, s is a
-* scalar, and x and b are N by NRHS matrices. The test ratio is the
-* maximum over the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A'*x = s*b (Transpose)
-* = 'C': A'*x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SCALE (input) DOUBLE PRECISION
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) DOUBLE PRECISION array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) DOUBLE PRECISION
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtrt05.f b/TESTING/LIN/dtrt05.f
index a9abf1a9..bf38ab0b 100644
--- a/TESTING/LIN/dtrt05.f
+++ b/TESTING/LIN/dtrt05.f
@@ -1,9 +1,192 @@
+*> \brief \b DTRT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRT05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
+* LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular n by n matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTRT05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
$ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,99 +197,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* DTRT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular n by n matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) DOUBLE PRECISION array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtrt06.f b/TESTING/LIN/dtrt06.f
index 8c05faba..2102bfaa 100644
--- a/TESTING/LIN/dtrt06.f
+++ b/TESTING/LIN/dtrt06.f
@@ -1,9 +1,132 @@
+*> \brief \b DTRT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DTRT06( RCOND, RCONDC, UPLO, DIAG, N, A, LDA, WORK,
+* RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER LDA, N
+* DOUBLE PRECISION RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTRT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by DTRCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number computed by
+*> DTRCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is DOUBLE PRECISION
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_lin
+*
+* =====================================================================
SUBROUTINE DTRT06( RCOND, RCONDC, UPLO, DIAG, N, A, LDA, WORK,
$ RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -14,60 +137,6 @@
DOUBLE PRECISION A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DTRT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by DTRCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number computed by
-* DTRCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RAT (output) DOUBLE PRECISION
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/dtzt01.f b/TESTING/LIN/dtzt01.f
index 75a9aa64..2880854c 100644
--- a/TESTING/LIN/dtzt01.f
+++ b/TESTING/LIN/dtzt01.f
@@ -1,52 +1,117 @@
- DOUBLE PRECISION FUNCTION DTZT01( M, N, A, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b DTZT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DTZT01( M, N, A, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DTZT01 returns
-* || A - R*Q || / ( M * eps * ||A|| )
-* for an upper trapezoidal A that was factored with DTZRQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTZT01 returns
+*> || A - R*Q || / ( M * eps * ||A|| )
+*> for an upper trapezoidal A that was factored with DTZRQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The original upper trapezoidal M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> The output of DTZRQF for input matrix A.
+*> The lower triangle is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> DTZRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= m*n + m.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The original upper trapezoidal M by N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The output of DTZRQF for input matrix A.
-* The lower triangle is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \ingroup double_lin
*
-* TAU (input) DOUBLE PRECISION array, dimension (M)
-* Details of the Householder transformations as returned by
-* DTZRQF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DTZT01( M, N, A, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= m*n + m.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/dtzt02.f b/TESTING/LIN/dtzt02.f
index 63e3f27e..9b4a62d5 100644
--- a/TESTING/LIN/dtzt02.f
+++ b/TESTING/LIN/dtzt02.f
@@ -1,48 +1,109 @@
- DOUBLE PRECISION FUNCTION DTZT02( M, N, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION AF( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b DTZT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DTZT02( M, N, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* DTZT02 returns
-* || I - Q'*Q || / ( M * eps)
-* where the matrix Q is defined by the Householder transformations
-* generated by DTZRQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DTZT02 returns
+*> || I - Q'*Q || / ( M * eps)
+*> where the matrix Q is defined by the Householder transformations
+*> generated by DTZRQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is DOUBLE PRECISION array, dimension (LDA,N)
+*> The output of DTZRQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is DOUBLE PRECISION array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> DTZRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of WORK array. Must be >= N*N+N
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix AF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) DOUBLE PRECISION array, dimension (LDA,N)
-* The output of DTZRQF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array AF.
+*> \ingroup double_lin
*
-* TAU (input) DOUBLE PRECISION array, dimension (M)
-* Details of the Householder transformations as returned by
-* DTZRQF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DTZT02( M, N, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of WORK array. Must be >= N*N+N
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/icopy.f b/TESTING/LIN/icopy.f
index a62106df..c08a57dd 100644
--- a/TESTING/LIN/icopy.f
+++ b/TESTING/LIN/icopy.f
@@ -1,39 +1,93 @@
- SUBROUTINE ICOPY( N, SX, INCX, SY, INCY )
+*> \brief \b ICOPY
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INCX, INCY, N
-* ..
-* .. Array Arguments ..
- INTEGER SX( * ), SY( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ICOPY( N, SX, INCX, SY, INCY )
+*
+* .. Scalar Arguments ..
+* INTEGER INCX, INCY, N
+* ..
+* .. Array Arguments ..
+* INTEGER SX( * ), SY( * )
+* ..
+*
* Purpose
* =======
*
-* ICOPY copies an integer vector x to an integer vector y.
-* Uses unrolled loops for increments equal to 1.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ICOPY copies an integer vector x to an integer vector y.
+*> Uses unrolled loops for increments equal to 1.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The length of the vectors SX and SY.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vectors SX and SY.
+*> \endverbatim
+*>
+*> \param[in] SX
+*> \verbatim
+*> SX is INTEGER array, dimension (1+(N-1)*abs(INCX))
+*> The vector X.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between consecutive elements of SX.
+*> \endverbatim
+*>
+*> \param[out] SY
+*> \verbatim
+*> SY is INTEGER array, dimension (1+(N-1)*abs(INCY))
+*> The vector Y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*> INCY is INTEGER
+*> The spacing between consecutive elements of SY.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* SX (input) INTEGER array, dimension (1+(N-1)*abs(INCX))
-* The vector X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* INCX (input) INTEGER
-* The spacing between consecutive elements of SX.
+*> \date November 2011
*
-* SY (output) INTEGER array, dimension (1+(N-1)*abs(INCY))
-* The vector Y.
+*> \ingroup aux_lin
*
-* INCY (input) INTEGER
-* The spacing between consecutive elements of SY.
+* =====================================================================
+ SUBROUTINE ICOPY( N, SX, INCX, SY, INCY )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INCX, INCY, N
+* ..
+* .. Array Arguments ..
+ INTEGER SX( * ), SY( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ilaenv.f b/TESTING/LIN/ilaenv.f
index ba641d29..744d699e 100644
--- a/TESTING/LIN/ilaenv.f
+++ b/TESTING/LIN/ilaenv.f
@@ -1,97 +1,170 @@
- INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
- $ N4 )
+*> \brief \b ILAENV
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*( * ) NAME, OPTS
- INTEGER ISPEC, N1, N2, N3, N4
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
+* N4 )
+*
+* .. Scalar Arguments ..
+* CHARACTER*( * ) NAME, OPTS
+* INTEGER ISPEC, N1, N2, N3, N4
+* ..
+*
* Purpose
* =======
*
-* ILAENV returns problem-dependent parameters for the local
-* environment. See ISPEC for a description of the parameters.
-*
-* In this version, the problem-dependent parameters are contained in
-* the integer array IPARMS in the common block CLAENV and the value
-* with index ISPEC is copied to ILAENV. This version of ILAENV is
-* to be used in conjunction with XLAENV in TESTING and TIMING.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ILAENV returns problem-dependent parameters for the local
+*> environment. See ISPEC for a description of the parameters.
+*>
+*> In this version, the problem-dependent parameters are contained in
+*> the integer array IPARMS in the common block CLAENV and the value
+*> with index ISPEC is copied to ILAENV. This version of ILAENV is
+*> to be used in conjunction with XLAENV in TESTING and TIMING.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISPEC (input) INTEGER
-* Specifies the parameter to be returned as the value of
-* ILAENV.
-* = 1: the optimal blocksize; if this value is 1, an unblocked
-* algorithm will give the best performance.
-* = 2: the minimum block size for which the block routine
-* should be used; if the usable block size is less than
-* this value, an unblocked routine should be used.
-* = 3: the crossover point (in a block routine, for N less
-* than this value, an unblocked routine should be used)
-* = 4: the number of shifts, used in the nonsymmetric
-* eigenvalue routines
-* = 5: the minimum column dimension for blocking to be used;
-* rectangular blocks must have dimension at least k by m,
-* where k is given by ILAENV(2,...) and m by ILAENV(5,...)
-* = 6: the crossover point for the SVD (when reducing an m by n
-* matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
-* this value, a QR factorization is used first to reduce
-* the matrix to a triangular form.)
-* = 7: the number of processors
-* = 8: the crossover point for the multishift QR and QZ methods
-* for nonsymmetric eigenvalue problems.
-* = 9: maximum size of the subproblems at the bottom of the
-* computation tree in the divide-and-conquer algorithm
-* =10: ieee NaN arithmetic can be trusted not to trap
-* =11: infinity arithmetic can be trusted not to trap
-*
-* Other specifications (up to 100) can be added later.
-*
-* NAME (input) CHARACTER*(*)
-* The name of the calling subroutine.
-*
-* OPTS (input) CHARACTER*(*)
-* The character options to the subroutine NAME, concatenated
-* into a single character string. For example, UPLO = 'U',
-* TRANS = 'T', and DIAG = 'N' for a triangular routine would
-* be specified as OPTS = 'UTN'.
-*
-* N1 (input) INTEGER
-* N2 (input) INTEGER
-* N3 (input) INTEGER
-* N4 (input) INTEGER
-* Problem dimensions for the subroutine NAME; these may not all
-* be required.
-*
-* (ILAENV) (output) INTEGER
-* >= 0: the value of the parameter specified by ISPEC
-* < 0: if ILAENV = -k, the k-th argument had an illegal value.
+*> \param[in] ISPEC
+*> \verbatim
+*> ISPEC is INTEGER
+*> Specifies the parameter to be returned as the value of
+*> ILAENV.
+*> = 1: the optimal blocksize; if this value is 1, an unblocked
+*> algorithm will give the best performance.
+*> = 2: the minimum block size for which the block routine
+*> should be used; if the usable block size is less than
+*> this value, an unblocked routine should be used.
+*> = 3: the crossover point (in a block routine, for N less
+*> than this value, an unblocked routine should be used)
+*> = 4: the number of shifts, used in the nonsymmetric
+*> eigenvalue routines
+*> = 5: the minimum column dimension for blocking to be used;
+*> rectangular blocks must have dimension at least k by m,
+*> where k is given by ILAENV(2,...) and m by ILAENV(5,...)
+*> = 6: the crossover point for the SVD (when reducing an m by n
+*> matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
+*> this value, a QR factorization is used first to reduce
+*> the matrix to a triangular form.)
+*> = 7: the number of processors
+*> = 8: the crossover point for the multishift QR and QZ methods
+*> for nonsymmetric eigenvalue problems.
+*> = 9: maximum size of the subproblems at the bottom of the
+*> computation tree in the divide-and-conquer algorithm
+*> =10: ieee NaN arithmetic can be trusted not to trap
+*> =11: infinity arithmetic can be trusted not to trap
+*> \endverbatim
+*> \verbatim
+*> Other specifications (up to 100) can be added later.
+*> \endverbatim
+*>
+*> \param[in] NAME
+*> \verbatim
+*> NAME is CHARACTER*(*)
+*> The name of the calling subroutine.
+*> \endverbatim
+*>
+*> \param[in] OPTS
+*> \verbatim
+*> OPTS is CHARACTER*(*)
+*> The character options to the subroutine NAME, concatenated
+*> into a single character string. For example, UPLO = 'U',
+*> TRANS = 'T', and DIAG = 'N' for a triangular routine would
+*> be specified as OPTS = 'UTN'.
+*> \endverbatim
+*>
+*> \param[in] N1
+*> \verbatim
+*> N1 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N2
+*> \verbatim
+*> N2 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N3
+*> \verbatim
+*> N3 is INTEGER
+*> \endverbatim
+*>
+*> \param[in] N4
+*> \verbatim
+*> N4 is INTEGER
+*> \endverbatim
+*> \verbatim
+*> Problem dimensions for the subroutine NAME; these may not all
+*> be required.
+*> \endverbatim
+*>
+*> \param[out] (ILAENV)
+*> \verbatim
+*> (ILAENV) is INTEGER
+*> >= 0: the value of the parameter specified by ISPEC
+*> < 0: if ILAENV = -k, the k-th argument had an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_lin
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The following conventions have been used when calling ILAENV from the
+*> LAPACK routines:
+*> 1) OPTS is a concatenation of all of the character options to
+*> subroutine NAME, in the same order that they appear in the
+*> argument list for NAME, even if they are not used in determining
+*> the value of the parameter specified by ISPEC.
+*> 2) The problem dimensions N1, N2, N3, N4 are specified in the order
+*> that they appear in the argument list for NAME. N1 is used
+*> first, N2 second, and so on, and unused problem dimensions are
+*> passed a value of -1.
+*> 3) The parameter value returned by ILAENV is checked for validity in
+*> the calling subroutine. For example, ILAENV is used to retrieve
+*> the optimal blocksize for STRTRI as follows:
+*>
+*> NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
+*> IF( NB.LE.1 ) NB = MAX( 1, N )
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3,
+ $ N4 )
*
-* The following conventions have been used when calling ILAENV from the
-* LAPACK routines:
-* 1) OPTS is a concatenation of all of the character options to
-* subroutine NAME, in the same order that they appear in the
-* argument list for NAME, even if they are not used in determining
-* the value of the parameter specified by ISPEC.
-* 2) The problem dimensions N1, N2, N3, N4 are specified in the order
-* that they appear in the argument list for NAME. N1 is used
-* first, N2 second, and so on, and unused problem dimensions are
-* passed a value of -1.
-* 3) The parameter value returned by ILAENV is checked for validity in
-* the calling subroutine. For example, ILAENV is used to retrieve
-* the optimal blocksize for STRTRI as follows:
-*
-* NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 )
-* IF( NB.LE.1 ) NB = MAX( 1, N )
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*( * ) NAME, OPTS
+ INTEGER ISPEC, N1, N2, N3, N4
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/schkaa.f b/TESTING/LIN/schkaa.f
index 45f3d189..f2510fdb 100644
--- a/TESTING/LIN/schkaa.f
+++ b/TESTING/LIN/schkaa.f
@@ -1,77 +1,115 @@
- PROGRAM SCHKAA
+*> \brief \b SCHKAA
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* PROGRAM SCHKAA
+*
* Purpose
* =======
*
-* SCHKAA is the main test program for the REAL LAPACK
-* linear equation routines
-*
-* The program must be driven by a short data file. The first 14 records
-* specify problem dimensions and program options using list-directed
-* input. The remaining lines specify the LAPACK test paths and the
-* number of matrix types to use in testing. An annotated example of a
-* data file can be obtained by deleting the first 3 characters from the
-* following 36 lines:
-* Data file for testing REAL LAPACK linear eqn. routines
-* 7 Number of values of M
-* 0 1 2 3 5 10 16 Values of M (row dimension)
-* 7 Number of values of N
-* 0 1 2 3 5 10 16 Values of N (column dimension)
-* 1 Number of values of NRHS
-* 2 Values of NRHS (number of right hand sides)
-* 5 Number of values of NB
-* 1 3 3 3 20 Values of NB (the blocksize)
-* 1 0 5 9 1 Values of NX (crossover point)
-* 3 Number of values of RANK
-* 30 50 90 Values of rank (as a % of N)
-* 20.0 Threshold value of test ratio
-* T Put T to test the LAPACK routines
-* T Put T to test the driver routines
-* T Put T to test the error exits
-* SGE 11 List types on next line if 0 < NTYPES < 11
-* SGB 8 List types on next line if 0 < NTYPES < 8
-* SGT 12 List types on next line if 0 < NTYPES < 12
-* SPO 9 List types on next line if 0 < NTYPES < 9
-* SPS 9 List types on next line if 0 < NTYPES < 9
-* SPP 9 List types on next line if 0 < NTYPES < 9
-* SPB 8 List types on next line if 0 < NTYPES < 8
-* SPT 12 List types on next line if 0 < NTYPES < 12
-* SSY 10 List types on next line if 0 < NTYPES < 10
-* SSP 10 List types on next line if 0 < NTYPES < 10
-* STR 18 List types on next line if 0 < NTYPES < 18
-* STP 18 List types on next line if 0 < NTYPES < 18
-* STB 17 List types on next line if 0 < NTYPES < 17
-* SQR 8 List types on next line if 0 < NTYPES < 8
-* SRQ 8 List types on next line if 0 < NTYPES < 8
-* SLQ 8 List types on next line if 0 < NTYPES < 8
-* SQL 8 List types on next line if 0 < NTYPES < 8
-* SQP 6 List types on next line if 0 < NTYPES < 6
-* STZ 3 List types on next line if 0 < NTYPES < 3
-* SLS 6 List types on next line if 0 < NTYPES < 6
-* SEQ
-*
-* Internal Parameters
-* ===================
-*
-* NMAX INTEGER
-* The maximum allowable value for N
-*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, NRHS, NB, and NX
-*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
-*
-* NIN INTEGER
-* The unit number for input
-*
-* NOUT INTEGER
-* The unit number for output
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKAA is the main test program for the REAL LAPACK
+*> linear equation routines
+*>
+*> The program must be driven by a short data file. The first 14 records
+*> specify problem dimensions and program options using list-directed
+*> input. The remaining lines specify the LAPACK test paths and the
+*> number of matrix types to use in testing. An annotated example of a
+*> data file can be obtained by deleting the first 3 characters from the
+*> following 36 lines:
+*> Data file for testing REAL LAPACK linear eqn. routines
+*> 7 Number of values of M
+*> 0 1 2 3 5 10 16 Values of M (row dimension)
+*> 7 Number of values of N
+*> 0 1 2 3 5 10 16 Values of N (column dimension)
+*> 1 Number of values of NRHS
+*> 2 Values of NRHS (number of right hand sides)
+*> 5 Number of values of NB
+*> 1 3 3 3 20 Values of NB (the blocksize)
+*> 1 0 5 9 1 Values of NX (crossover point)
+*> 3 Number of values of RANK
+*> 30 50 90 Values of rank (as a % of N)
+*> 20.0 Threshold value of test ratio
+*> T Put T to test the LAPACK routines
+*> T Put T to test the driver routines
+*> T Put T to test the error exits
+*> SGE 11 List types on next line if 0 < NTYPES < 11
+*> SGB 8 List types on next line if 0 < NTYPES < 8
+*> SGT 12 List types on next line if 0 < NTYPES < 12
+*> SPO 9 List types on next line if 0 < NTYPES < 9
+*> SPS 9 List types on next line if 0 < NTYPES < 9
+*> SPP 9 List types on next line if 0 < NTYPES < 9
+*> SPB 8 List types on next line if 0 < NTYPES < 8
+*> SPT 12 List types on next line if 0 < NTYPES < 12
+*> SSY 10 List types on next line if 0 < NTYPES < 10
+*> SSP 10 List types on next line if 0 < NTYPES < 10
+*> STR 18 List types on next line if 0 < NTYPES < 18
+*> STP 18 List types on next line if 0 < NTYPES < 18
+*> STB 17 List types on next line if 0 < NTYPES < 17
+*> SQR 8 List types on next line if 0 < NTYPES < 8
+*> SRQ 8 List types on next line if 0 < NTYPES < 8
+*> SLQ 8 List types on next line if 0 < NTYPES < 8
+*> SQL 8 List types on next line if 0 < NTYPES < 8
+*> SQP 6 List types on next line if 0 < NTYPES < 6
+*> STZ 3 List types on next line if 0 < NTYPES < 3
+*> SLS 6 List types on next line if 0 < NTYPES < 6
+*> SEQ
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N
+*> \endverbatim
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, NRHS, NB, and NX
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ PROGRAM SCHKAA
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/schkeq.f b/TESTING/LIN/schkeq.f
index bbd3d247..ea70c63e 100644
--- a/TESTING/LIN/schkeq.f
+++ b/TESTING/LIN/schkeq.f
@@ -1,27 +1,70 @@
- SUBROUTINE SCHKEQ( THRESH, NOUT )
+*> \brief \b SCHKEQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NOUT
- REAL THRESH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SCHKEQ( THRESH, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NOUT
+* REAL THRESH
+* ..
+*
* Purpose
* =======
*
-* SCHKEQ tests SGEEQU, SGBEQU, SPOEQU, SPPEQU and SPBEQU
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKEQ tests SGEEQU, SGBEQU, SPOEQU, SPPEQU and SPBEQU
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* THRESH (input) REAL
-* Threshold for testing routines. Should be between 2 and 10.
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> Threshold for testing routines. Should be between 2 and 10.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SCHKEQ( THRESH, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NOUT
+ REAL THRESH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/schkgb.f b/TESTING/LIN/schkgb.f
index 0a569927..b0b0384b 100644
--- a/TESTING/LIN/schkgb.f
+++ b/TESTING/LIN/schkgb.f
@@ -1,10 +1,202 @@
+*> \brief \b SCHKGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
+* NSVAL, THRESH, TSTERR, A, LA, AFAC, LAFAC, B,
+* X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFAC, NM, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * )
+* REAL A( * ), AFAC( * ), B( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKGB tests SGBTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (KLMAX+KUMAX+1)*NMAX
+*> where KLMAX is the largest entry in the local array KLVAL,
+*> KUMAX is the largest entry in the local array KUVAL and
+*> NMAX is the largest entry in the input array NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (LAFAC)
+*> \endverbatim
+*>
+*> \param[in] LAFAC
+*> \verbatim
+*> LAFAC is INTEGER
+*> The length of the array AFAC. LAFAC >= (2*KLMAX+KUMAX+1)*NMAX
+*> where KLMAX is the largest entry in the local array KLVAL,
+*> KUMAX is the largest entry in the local array KUVAL and
+*> NMAX is the largest entry in the input array NVAL.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
$ NSVAL, THRESH, TSTERR, A, LA, AFAC, LAFAC, B,
$ X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,85 +211,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKGB tests SGBTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (KLMAX+KUMAX+1)*NMAX
-* where KLMAX is the largest entry in the local array KLVAL,
-* KUMAX is the largest entry in the local array KUVAL and
-* NMAX is the largest entry in the input array NVAL.
-*
-* AFAC (workspace) REAL array, dimension (LAFAC)
-*
-* LAFAC (input) INTEGER
-* The length of the array AFAC. LAFAC >= (2*KLMAX+KUMAX+1)*NMAX
-* where KLMAX is the largest entry in the local array KLVAL,
-* KUMAX is the largest entry in the local array KUVAL and
-* NMAX is the largest entry in the input array NVAL.
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX,NMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkge.f b/TESTING/LIN/schkge.f
index 1bcc218a..4dbdc989 100644
--- a/TESTING/LIN/schkge.f
+++ b/TESTING/LIN/schkge.f
@@ -1,10 +1,196 @@
+*> \brief \b SCHKGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
+* NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
+* X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKGE tests SGETRF, -TRI, -TRS, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(2*NMAX,2*NSMAX+NWORK))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
$ NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
$ X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,79 +205,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKGE tests SGETRF, -TRI, -TRS, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(2*NMAX,2*NSMAX+NWORK))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkgt.f b/TESTING/LIN/schkgt.f
index 21f7e316..3e0853cb 100644
--- a/TESTING/LIN/schkgt.f
+++ b/TESTING/LIN/schkgt.f
@@ -1,9 +1,157 @@
+*> \brief \b SCHKGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* REAL A( * ), AF( * ), B( * ), RWORK( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKGT tests SGTTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,61 +165,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKGT tests SGTTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (NMAX*4)
-*
-* AF (workspace) REAL array, dimension (NMAX*4)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schklq.f b/TESTING/LIN/schklq.f
index a6ccabd5..7ee4d9a2 100644
--- a/TESTING/LIN/schklq.f
+++ b/TESTING/LIN/schklq.f
@@ -1,10 +1,207 @@
+*> \brief \b SCHKLQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
+* B, X, XACT, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL A( * ), AC( * ), AF( * ), AL( * ), AQ( * ),
+* $ B( * ), RWORK( * ), TAU( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKLQ tests SGELQF, SORGLQ and SORMLQ.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AL
+*> \verbatim
+*> AL is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
$ B, X, XACT, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +217,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKLQ tests SGELQF, SORGLQ and SORMLQ.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AL (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkpb.f b/TESTING/LIN/schkpb.f
index 9d821690..27ef7197 100644
--- a/TESTING/LIN/schkpb.f
+++ b/TESTING/LIN/schkpb.f
@@ -1,10 +1,183 @@
+*> \brief \b SCHKPB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKPB( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKPB tests SPBTRF, -TRS, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKPB( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,73 +191,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKPB tests SPBTRF, -TRS, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkpo.f b/TESTING/LIN/schkpo.f
index f085933b..8390d22a 100644
--- a/TESTING/LIN/schkpo.f
+++ b/TESTING/LIN/schkpo.f
@@ -1,10 +1,183 @@
+*> \brief \b SCHKPO
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKPO( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKPO tests SPOTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKPO( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,73 +191,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKPO tests SPOTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkpp.f b/TESTING/LIN/schkpp.f
index 703b9993..f607fe01 100644
--- a/TESTING/LIN/schkpp.f
+++ b/TESTING/LIN/schkpp.f
@@ -1,10 +1,174 @@
+*> \brief \b SCHKPP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKPP tests SPPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,70 +182,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKPP tests SPPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkps.f b/TESTING/LIN/schkps.f
index d2def63d..ff510b76 100644
--- a/TESTING/LIN/schkps.f
+++ b/TESTING/LIN/schkps.f
@@ -1,10 +1,165 @@
+*> \brief \b SCHKPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKPS( DOTYPE, NN, NVAL, NNB, NBVAL, NRANK, RANKVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, PERM, PIV, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* REAL THRESH
+* INTEGER NMAX, NN, NNB, NOUT, NRANK
+* LOGICAL TSTERR
+* ..
+* .. Array Arguments ..
+* REAL A( * ), AFAC( * ), PERM( * ), RWORK( * ),
+* $ WORK( * )
+* INTEGER NBVAL( * ), NVAL( * ), PIV( * ), RANKVAL( * )
+* LOGICAL DOTYPE( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKPS tests SPSTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the block size NB.
+*> \endverbatim
+*>
+*> \param[in] NRANK
+*> \verbatim
+*> NRANK is INTEGER
+*> The number of values of RANK contained in the vector RANKVAL.
+*> \endverbatim
+*>
+*> \param[in] RANKVAL
+*> \verbatim
+*> RANKVAL is INTEGER array, dimension (NBVAL)
+*> The values of the block size NB.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*3)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKPS( DOTYPE, NN, NVAL, NNB, NBVAL, NRANK, RANKVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, PERM, PIV, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL THRESH
@@ -18,64 +173,6 @@
LOGICAL DOTYPE( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKPS tests SPSTRF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the block size NB.
-*
-* NRANK (input) INTEGER
-* The number of values of RANK contained in the vector RANKVAL.
-*
-* RANKVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the block size NB.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* PERM (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* PIV (workspace) INTEGER array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*3)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkpt.f b/TESTING/LIN/schkpt.f
index 952c65ba..c902670f 100644
--- a/TESTING/LIN/schkpt.f
+++ b/TESTING/LIN/schkpt.f
@@ -1,9 +1,157 @@
+*> \brief \b SCHKPT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* A, D, E, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* REAL A( * ), B( * ), D( * ), E( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKPT tests SPTTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ A, D, E, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,61 +165,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKPT tests SPTTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (NMAX*2)
-*
-* D (workspace) REAL array, dimension (NMAX*2)
-*
-* E (workspace) REAL array, dimension (NMAX*2)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkq3.f b/TESTING/LIN/schkq3.f
index b68109e7..1e6dd9c4 100644
--- a/TESTING/LIN/schkq3.f
+++ b/TESTING/LIN/schkq3.f
@@ -1,10 +1,164 @@
+*> \brief \b SCHKQ3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* THRESH, A, COPYA, S, TAU, WORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NM, NN, NNB, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL A( * ), COPYA( * ), S( * ),
+* $ TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKQ3 tests SGEQP3.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is REAL array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ THRESH, A, COPYA, S, TAU, WORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NM, NN, NNB, NOUT
@@ -18,66 +172,6 @@
$ TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKQ3 tests SGEQP3.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) REAL array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) REAL array, dimension (MMAX*NMAX)
-*
-* S (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) REAL array, dimension (MMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkql.f b/TESTING/LIN/schkql.f
index e5778d50..4fd50db2 100644
--- a/TESTING/LIN/schkql.f
+++ b/TESTING/LIN/schkql.f
@@ -1,10 +1,207 @@
+*> \brief \b SCHKQL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
+* B, X, XACT, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL A( * ), AC( * ), AF( * ), AL( * ), AQ( * ),
+* $ B( * ), RWORK( * ), TAU( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKQL tests SGEQLF, SORGQL and SORMQL.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AL
+*> \verbatim
+*> AL is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
$ B, X, XACT, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +217,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKQL tests SGEQLF, SORGQL and SORMQL.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AL (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkqp.f b/TESTING/LIN/schkqp.f
index 03da7e7e..8c307d09 100644
--- a/TESTING/LIN/schkqp.f
+++ b/TESTING/LIN/schkqp.f
@@ -1,9 +1,148 @@
+*> \brief \b SCHKQP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
+* COPYA, S, TAU, WORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NVAL( * )
+* REAL A( * ), COPYA( * ), S( * ),
+* $ TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKQP tests SGEQPF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is REAL array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
$ COPYA, S, TAU, WORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,58 +156,6 @@
$ TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKQP tests SGEQPF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) REAL array, dimension (MMAX*NMAX)
-*
-* S (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) REAL array, dimension (MMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkqr.f b/TESTING/LIN/schkqr.f
index 7ebab8e7..6ebbb10a 100644
--- a/TESTING/LIN/schkqr.f
+++ b/TESTING/LIN/schkqr.f
@@ -1,10 +1,212 @@
+*> \brief \b SCHKQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL A( * ), AC( * ), AF( * ), AQ( * ), AR( * ),
+* $ B( * ), RWORK( * ), TAU( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKQR tests SGEQRF, SORGQR and SORMQR.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKQR tests SGEQRF, SORGQR and SORMQR.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AR (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schkrfp.f b/TESTING/LIN/schkrfp.f
index 6998d2b9..82003685 100644
--- a/TESTING/LIN/schkrfp.f
+++ b/TESTING/LIN/schkrfp.f
@@ -1,36 +1,75 @@
- PROGRAM SCHKRFP
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+*> \brief \b SCHKRFP
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* SCHKRFP is the main test program for the REAL linear
-* equation routines with RFP storage format
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
*
-* Internal Parameters
-* ===================
+* PROGRAM SCHKRFP
+*
+* Purpose
+* =======
*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, or NB
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKRFP is the main test program for the REAL linear
+*> equation routines with RFP storage format
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, or NB
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> \endverbatim
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N.
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NTYPES INTEGER
+*> \date November 2011
*
-* NMAX INTEGER
-* The maximum allowable value for N.
+*> \ingroup single_lin
*
-* NIN INTEGER
-* The unit number for input
+* =====================================================================
+ PROGRAM SCHKRFP
*
-* NOUT INTEGER
-* The unit number for output
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/schkrq.f b/TESTING/LIN/schkrq.f
index 9ad21716..c863eeec 100644
--- a/TESTING/LIN/schkrq.f
+++ b/TESTING/LIN/schkrq.f
@@ -1,10 +1,212 @@
+*> \brief \b SCHKRQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* REAL A( * ), AC( * ), AF( * ), AQ( * ), AR( * ),
+* $ B( * ), RWORK( * ), TAU( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKRQ tests SGERQF, SORGRQ and SORMRQ.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKRQ tests SGERQF, SORGRQ and SORMRQ.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AF (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AR (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) REAL array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schksp.f b/TESTING/LIN/schksp.f
index 47874f34..fa1222e5 100644
--- a/TESTING/LIN/schksp.f
+++ b/TESTING/LIN/schksp.f
@@ -1,10 +1,174 @@
+*> \brief \b SCHKSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKSP tests SSPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(2,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array,
+*> dimension (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,70 +182,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKSP tests SSPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(2,NSMAX))
-*
-* RWORK (workspace) REAL array,
-* dimension (NMAX+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schksy.f b/TESTING/LIN/schksy.f
index d6a23ba8..6c6abcac 100644
--- a/TESTING/LIN/schksy.f
+++ b/TESTING/LIN/schksy.f
@@ -1,10 +1,183 @@
+*> \brief \b SCHKSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKSY tests SSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,73 +191,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKSY tests SSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schktb.f b/TESTING/LIN/schktb.f
index fe0c83c7..d68dae69 100644
--- a/TESTING/LIN/schktb.f
+++ b/TESTING/LIN/schktb.f
@@ -1,10 +1,166 @@
+*> \brief \b SCHKTB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, AB, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* REAL AB( * ), AINV( * ), B( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKTB tests STBTRS, -RFS, and -CON, and SLATBS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays.
+*> NMAX >= the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, AB, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,65 +174,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKTB tests STBTRS, -RFS, and -CON, and SLATBS.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays.
-* NMAX >= the maximum value of N in NVAL.
-*
-* AB (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schktp.f b/TESTING/LIN/schktp.f
index 3bd4597b..10274779 100644
--- a/TESTING/LIN/schktp.f
+++ b/TESTING/LIN/schktp.f
@@ -1,10 +1,168 @@
+*> \brief \b SCHKTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* REAL AINVP( * ), AP( * ), B( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKTP tests STPTRI, -TRS, -RFS, and -CON, and SLATPS
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays. NMAX >= the
+*> maximumm value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINVP
+*> \verbatim
+*> AINVP is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,67 +176,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKTP tests STPTRI, -TRS, -RFS, and -CON, and SLATPS
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays. NMAX >= the
-* maximumm value of N in NVAL.
-*
-* AP (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINVP (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schktr.f b/TESTING/LIN/schktr.f
index 5154a8c8..e050fe7c 100644
--- a/TESTING/LIN/schktr.f
+++ b/TESTING/LIN/schktr.f
@@ -1,10 +1,178 @@
+*> \brief \b SCHKTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AINV, B, X, XACT,
+* WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* REAL A( * ), AINV( * ), B( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKTR tests STRTRI, -TRS, -RFS, and -CON, and SLATRS
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays.
+*> NMAX >= the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AINV, B, X, XACT,
$ WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,71 +186,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKTR tests STRTRI, -TRS, -RFS, and -CON, and SLATRS
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays.
-* NMAX >= the maximum value of N in NVAL.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/schktz.f b/TESTING/LIN/schktz.f
index f1f1f580..5a51a827 100644
--- a/TESTING/LIN/schktz.f
+++ b/TESTING/LIN/schktz.f
@@ -1,9 +1,143 @@
+*> \brief \b SCHKTZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
+* COPYA, S, TAU, WORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NVAL( * )
+* REAL A( * ), COPYA( * ), S( * ),
+* $ TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SCHKTZ tests STZRQF and STZRZF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is REAL array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
$ COPYA, S, TAU, WORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,56 +151,6 @@
$ TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SCHKTZ tests STZRQF and STZRZF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) REAL array, dimension (MMAX*NMAX)
-*
-* S (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) REAL array, dimension (MMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvgb.f b/TESTING/LIN/sdrvgb.f
index 785df694..74fc713b 100644
--- a/TESTING/LIN/sdrvgb.f
+++ b/TESTING/LIN/sdrvgb.f
@@ -1,10 +1,183 @@
+*> \brief \b SDRVGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
+* AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFB, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
+* $ RWORK( * ), S( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVGB tests the driver routines SGBSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (2*NMAX-1)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFB
+*> \verbatim
+*> AFB is REAL array, dimension (LAFB)
+*> \endverbatim
+*>
+*> \param[in] LAFB
+*> \verbatim
+*> LAFB is INTEGER
+*> The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
$ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,72 +192,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVGB tests the driver routines SGBSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (2*NMAX-1)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* AFB (workspace) REAL array, dimension (LAFB)
-*
-* LAFB (input) INTEGER
-* The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* ASAV (workspace) REAL array, dimension (LA)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (2*NMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS,NMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvgbx.f b/TESTING/LIN/sdrvgbx.f
index 37f9acd6..1062b33a 100644
--- a/TESTING/LIN/sdrvgbx.f
+++ b/TESTING/LIN/sdrvgbx.f
@@ -1,10 +1,186 @@
+*> \brief \b SDRVGBX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
+* AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFB, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
+* $ RWORK( * ), S( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVGB tests the driver routines SGBSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise sdrvgb.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (2*NMAX-1)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFB
+*> \verbatim
+*> AFB is REAL array, dimension (LAFB)
+*> \endverbatim
+*>
+*> \param[in] LAFB
+*> \verbatim
+*> LAFB is INTEGER
+*> The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
$ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,75 +195,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVGB tests the driver routines SGBSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise sdrvgb.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (2*NMAX-1)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* AFB (workspace) REAL array, dimension (LAFB)
-*
-* LAFB (input) INTEGER
-* The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* ASAV (workspace) REAL array, dimension (LA)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (2*NMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS,NMAX))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvge.f b/TESTING/LIN/sdrvge.f
index 7f944621..8928afd7 100644
--- a/TESTING/LIN/sdrvge.f
+++ b/TESTING/LIN/sdrvge.f
@@ -1,10 +1,175 @@
+*> \brief \b SDRVGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVGE tests the driver routines SGESV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*NRHS+NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,67 +184,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVGE tests the driver routines SGESV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (2*NMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (2*NRHS+NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvgex.f b/TESTING/LIN/sdrvgex.f
index 89e38c1e..31b165b3 100644
--- a/TESTING/LIN/sdrvgex.f
+++ b/TESTING/LIN/sdrvgex.f
@@ -1,10 +1,178 @@
+*> \brief \b SDRVGEX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVGE tests the driver routines SGESV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise sdrvge.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (2*NRHS+NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +187,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVGE tests the driver routines SGESV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise sdrvge.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (2*NMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (2*NRHS+NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvgt.f b/TESTING/LIN/sdrvgt.f
index 0f6243a9..fc361c30 100644
--- a/TESTING/LIN/sdrvgt.f
+++ b/TESTING/LIN/sdrvgt.f
@@ -1,9 +1,144 @@
+*> \brief \b SDRVGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, AF,
+* B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AF( * ), B( * ), RWORK( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVGT tests SGTSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, AF,
$ B, X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,54 +152,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVGT tests SGTSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (NMAX*4)
-*
-* AF (workspace) REAL array, dimension (NMAX*4)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvls.f b/TESTING/LIN/sdrvls.f
index c00cf7ee..78e852f8 100644
--- a/TESTING/LIN/sdrvls.f
+++ b/TESTING/LIN/sdrvls.f
@@ -1,10 +1,214 @@
+*> \brief \b SDRVLS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
+* NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
+* COPYB, C, S, COPYS, WORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NNS, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * ), NXVAL( * )
+* REAL A( * ), B( * ), C( * ), COPYA( * ), COPYB( * ),
+* $ COPYS( * ), S( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVLS tests the least squares driver routines SGELS, SGELSS, SGELSX,
+*> SGELSY and SGELSD.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> The matrix of type j is generated as follows:
+*> j=1: A = U*D*V where U and V are random orthogonal matrices
+*> and D has random entries (> 0.1) taken from a uniform
+*> distribution (0,1). A is full rank.
+*> j=2: The same of 1, but A is scaled up.
+*> j=3: The same of 1, but A is scaled down.
+*> j=4: A = U*D*V where U and V are random orthogonal matrices
+*> and D has 3*min(M,N)/4 random entries (> 0.1) taken
+*> from a uniform distribution (0,1) and the remaining
+*> entries set to 0. A is rank-deficient.
+*> j=5: The same of 4, but A is scaled up.
+*> j=6: The same of 5, but A is scaled down.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is REAL array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (MMAX*NSMAX)
+*> where MMAX is the maximum value of M in MVAL and NSMAX is the
+*> maximum value of NRHS in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYB
+*> \verbatim
+*> COPYB is REAL array, dimension (MMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (MMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] COPYS
+*> \verbatim
+*> COPYS is REAL array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array,
+*> dimension (MMAX*NMAX + 4*NMAX + MMAX).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (15*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
$ NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
$ COPYB, C, S, COPYS, WORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,97 +223,6 @@
$ COPYS( * ), S( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVLS tests the least squares driver routines SGELS, SGELSS, SGELSX,
-* SGELSY and SGELSD.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-* The matrix of type j is generated as follows:
-* j=1: A = U*D*V where U and V are random orthogonal matrices
-* and D has random entries (> 0.1) taken from a uniform
-* distribution (0,1). A is full rank.
-* j=2: The same of 1, but A is scaled up.
-* j=3: The same of 1, but A is scaled down.
-* j=4: A = U*D*V where U and V are random orthogonal matrices
-* and D has 3*min(M,N)/4 random entries (> 0.1) taken
-* from a uniform distribution (0,1) and the remaining
-* entries set to 0. A is rank-deficient.
-* j=5: The same of 4, but A is scaled up.
-* j=6: The same of 5, but A is scaled down.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) REAL array, dimension (MMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (MMAX*NSMAX)
-* where MMAX is the maximum value of M in MVAL and NSMAX is the
-* maximum value of NRHS in NSVAL.
-*
-* COPYB (workspace) REAL array, dimension (MMAX*NSMAX)
-*
-* C (workspace) REAL array, dimension (MMAX*NSMAX)
-*
-* S (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* COPYS (workspace) REAL array, dimension
-* (min(MMAX,NMAX))
-*
-* WORK (workspace) REAL array,
-* dimension (MMAX*NMAX + 4*NMAX + MMAX).
-*
-* IWORK (workspace) INTEGER array, dimension (15*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvpb.f b/TESTING/LIN/sdrvpb.f
index 9f319fc1..9a6e2c88 100644
--- a/TESTING/LIN/sdrvpb.f
+++ b/TESTING/LIN/sdrvpb.f
@@ -1,10 +1,175 @@
+*> \brief \b SDRVPB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVPB tests the driver routines SPBSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,67 +184,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVPB tests the driver routines SPBSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvpo.f b/TESTING/LIN/sdrvpo.f
index f0c92653..f07360d2 100644
--- a/TESTING/LIN/sdrvpo.f
+++ b/TESTING/LIN/sdrvpo.f
@@ -1,10 +1,175 @@
+*> \brief \b SDRVPO
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVPO tests the driver routines SPOSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,67 +184,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVPO tests the driver routines SPOSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvpox.f b/TESTING/LIN/sdrvpox.f
index a4b8de73..813c7513 100644
--- a/TESTING/LIN/sdrvpox.f
+++ b/TESTING/LIN/sdrvpox.f
@@ -1,10 +1,178 @@
+*> \brief \b SDRVPOX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVPO tests the driver routines SPOSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise sdrvpo.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +187,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVPO tests the driver routines SPOSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise sdrvpo.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvpp.f b/TESTING/LIN/sdrvpp.f
index 422b24af..52497993 100644
--- a/TESTING/LIN/sdrvpp.f
+++ b/TESTING/LIN/sdrvpp.f
@@ -1,10 +1,178 @@
+*> \brief \b SDRVPP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), RWORK( * ), S( * ), WORK( * ),
+* $ X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVPP tests the driver routines SPPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +187,6 @@
$ X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVPP tests the driver routines SPPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* ASAV (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* S (workspace) REAL array, dimension (NMAX)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvpt.f b/TESTING/LIN/sdrvpt.f
index 309b3369..5c10751d 100644
--- a/TESTING/LIN/sdrvpt.f
+++ b/TESTING/LIN/sdrvpt.f
@@ -1,9 +1,151 @@
+*> \brief \b SDRVPT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
+* E, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* REAL A( * ), B( * ), D( * ), E( * ), RWORK( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVPT tests SPTSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
$ E, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,58 +159,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVPT tests SPTSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) REAL array, dimension (NMAX*2)
-*
-* D (workspace) REAL array, dimension (NMAX*2)
-*
-* E (workspace) REAL array, dimension (NMAX*2)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) REAL array, dimension
-* (max(NMAX,2*NRHS))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvrf1.f b/TESTING/LIN/sdrvrf1.f
index e4fefb66..c0e4a787 100644
--- a/TESTING/LIN/sdrvrf1.f
+++ b/TESTING/LIN/sdrvrf1.f
@@ -1,49 +1,114 @@
- SUBROUTINE SDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
-*
-* .. Scalar Arguments ..
- INTEGER LDA, NN, NOUT
- REAL THRESH
-* ..
-* .. Array Arguments ..
- INTEGER NVAL( NN )
- REAL A( LDA, * ), ARF( * ), WORK( * )
-* ..
-*
+*> \brief \b SDRVRF1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* REAL A( LDA, * ), ARF( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SDRVRF1 tests the LAPACK RFP routines:
-* SLANSF
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVRF1 tests the LAPACK RFP routines:
+*> SLANSF
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is REAL array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
+*> \date November 2011
*
-* A (workspace) REAL array, dimension (LDA,NMAX)
+*> \ingroup single_lin
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
+* =====================================================================
+ SUBROUTINE SDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
*
-* ARF (workspace) REAL array, dimension ((NMAX*(NMAX+1))/2).
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) REAL array, dimension ( NMAX )
+* .. Scalar Arguments ..
+ INTEGER LDA, NN, NOUT
+ REAL THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER NVAL( NN )
+ REAL A( LDA, * ), ARF( * ), WORK( * )
+* ..
*
* =====================================================================
* ..
diff --git a/TESTING/LIN/sdrvrf2.f b/TESTING/LIN/sdrvrf2.f
index 0c5e922a..32772464 100644
--- a/TESTING/LIN/sdrvrf2.f
+++ b/TESTING/LIN/sdrvrf2.f
@@ -1,44 +1,108 @@
- SUBROUTINE SDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
-*
-* .. Scalar Arguments ..
- INTEGER LDA, NN, NOUT
-* ..
-* .. Array Arguments ..
- INTEGER NVAL( NN )
- REAL A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
-* ..
-*
+*> \brief \b SDRVRF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* REAL A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SDRVRF2 tests the LAPACK RFP convertion routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVRF2 tests the LAPACK RFP convertion routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is REAL array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is REAL array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] A2
+*> \verbatim
+*> A2 is REAL array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (workspace) REAL array, dimension (LDA,NMAX)
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \ingroup single_lin
*
-* ARF (workspace) REAL array, dimension ((NMAX*(NMAX+1))/2).
+* =====================================================================
+ SUBROUTINE SDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
*
-* AP (workspace) REAL array, dimension ((NMAX*(NMAX+1))/2).
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* A2 (workspace) REAL array, dimension (LDA,NMAX)
+* .. Scalar Arguments ..
+ INTEGER LDA, NN, NOUT
+* ..
+* .. Array Arguments ..
+ INTEGER NVAL( NN )
+ REAL A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
+* ..
*
* =====================================================================
* ..
diff --git a/TESTING/LIN/sdrvrf3.f b/TESTING/LIN/sdrvrf3.f
index f91bd0c7..38dd4a2c 100644
--- a/TESTING/LIN/sdrvrf3.f
+++ b/TESTING/LIN/sdrvrf3.f
@@ -1,9 +1,129 @@
+*> \brief \b SDRVRF3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
+* + S_WORK_SLANGE, S_WORK_SGEQRF, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* REAL A( LDA, * ), ARF( * ), B1( LDA, * ),
+* + B2( LDA, * ), S_WORK_SGEQRF( * ),
+* + S_WORK_SLANGE( * ), TAU( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVRF3 tests the LAPACK RFP routines:
+*> STFSM
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is REAL array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] B1
+*> \verbatim
+*> B1 is REAL array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] B2
+*> \verbatim
+*> B2 is REAL array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SLANGE
+*> \verbatim
+*> S_WORK_SLANGE is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SGEQRF
+*> \verbatim
+*> S_WORK_SGEQRF is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
+ S_WORK_SLANGE, S_WORK_SGEQRF, TAU )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, NN, NOUT
@@ -16,46 +136,6 @@
+ S_WORK_SLANGE( * ), TAU( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVRF3 tests the LAPACK RFP routines:
-* STFSM
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) REAL array, dimension (LDA,NMAX)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* ARF (workspace) REAL array, dimension ((NMAX*(NMAX+1))/2).
-*
-* B1 (workspace) REAL array, dimension (LDA,NMAX)
-*
-* B2 (workspace) REAL array, dimension (LDA,NMAX)
-*
-* S_WORK_SLANGE (workspace) REAL array, dimension (NMAX)
-*
-* S_WORK_SGEQRF (workspace) REAL array, dimension (NMAX)
-*
-* TAU (workspace) REAL array, dimension (NMAX)
-*
* =====================================================================
* ..
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvrf4.f b/TESTING/LIN/sdrvrf4.f
index ae627567..cfac8ba6 100644
--- a/TESTING/LIN/sdrvrf4.f
+++ b/TESTING/LIN/sdrvrf4.f
@@ -1,9 +1,129 @@
+*> \brief \b SDRVRF4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
+* + LDA, S_WORK_SLANGE )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDC, NN, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* REAL A( LDA, * ), C1( LDC, * ), C2( LDC, *),
+* + CRF( * ), S_WORK_SLANGE( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVRF4 tests the LAPACK RFP routines:
+*> SSFRK
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To
+*> have every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] C1
+*> \verbatim
+*> C1 is REAL array,
+*> dimension (LDC,NMAX)
+*> \endverbatim
+*>
+*> \param[out] C2
+*> \verbatim
+*> C2 is REAL array,
+*> dimension (LDC,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array A.
+*> LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] CRF
+*> \verbatim
+*> CRF is REAL array,
+*> dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array,
+*> dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SLANGE
+*> \verbatim
+*> S_WORK_SLANGE is REAL array, dimension (NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
+ LDA, S_WORK_SLANGE )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDC, NN, NOUT
@@ -15,50 +135,6 @@
+ CRF( * ), S_WORK_SLANGE( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVRF4 tests the LAPACK RFP routines:
-* SSFRK
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To
-* have every test ratio printed, use THRESH = 0.
-*
-* C1 (workspace) REAL array,
-* dimension (LDC,NMAX)
-*
-* C2 (workspace) REAL array,
-* dimension (LDC,NMAX)
-*
-* LDC (input) INTEGER
-* The leading dimension of the array A.
-* LDA >= max(1,NMAX).
-*
-* CRF (workspace) REAL array,
-* dimension ((NMAX*(NMAX+1))/2).
-*
-* A (workspace) REAL array,
-* dimension (LDA,NMAX)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* S_WORK_SLANGE (workspace) REAL array, dimension (NMAX)
-*
* =====================================================================
* ..
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvrfp.f b/TESTING/LIN/sdrvrfp.f
index abc9f16b..136b4535 100644
--- a/TESTING/LIN/sdrvrfp.f
+++ b/TESTING/LIN/sdrvrfp.f
@@ -1,3 +1,243 @@
+*> \brief \b SDRVRFP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
+* + THRESH, A, ASAV, AFAC, AINV, B,
+* + BSAV, XACT, X, ARF, ARFINV,
+* + S_WORK_SLATMS, S_WORK_SPOT01, S_TEMP_SPOT02,
+* + S_TEMP_SPOT03, S_WORK_SLANSY,
+* + S_WORK_SPOT02, S_WORK_SPOT03 )
+*
+* .. Scalar Arguments ..
+* INTEGER NN, NNS, NNT, NOUT
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN ), NSVAL( NNS ), NTVAL( NNT )
+* REAL A( * )
+* REAL AINV( * )
+* REAL ASAV( * )
+* REAL B( * )
+* REAL BSAV( * )
+* REAL AFAC( * )
+* REAL ARF( * )
+* REAL ARFINV( * )
+* REAL XACT( * )
+* REAL X( * )
+* REAL S_WORK_SLATMS( * )
+* REAL S_WORK_SPOT01( * )
+* REAL S_TEMP_SPOT02( * )
+* REAL S_TEMP_SPOT03( * )
+* REAL S_WORK_SLANSY( * )
+* REAL S_WORK_SPOT02( * )
+* REAL S_WORK_SPOT03( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVRFP tests the LAPACK RFP routines:
+*> SPFTRF, SPFTRS, and SPFTRI.
+*>
+*> This testing routine follow the same tests as DDRVPO (test for the full
+*> format Symmetric Positive Definite solver).
+*>
+*> The tests are performed in Full Format, convertion back and forth from
+*> full format to RFP format are performed using the routines STRTTF and
+*> STFTTR.
+*>
+*> First, a specific matrix A of size N is created. There is nine types of
+*> different matrixes possible.
+*> 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
+*> 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
+*> *3. First row and column zero 8. Scaled near underflow
+*> *4. Last row and column zero 9. Scaled near overflow
+*> *5. Middle row and column zero
+*> (* - tests error exits from SPFTRF, no test ratios are computed)
+*> A solution XACT of size N-by-NRHS is created and the associated right
+*> hand side B as well. Then SPFTRF is called to compute L (or U), the
+*> Cholesky factor of A. Then L (or U) is used to solve the linear system
+*> of equations AX = B. This gives X. Then L (or U) is used to compute the
+*> inverse of A, AINV. The following four tests are then performed:
+*> (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+*> where EPS is the machine precision, RCOND the condition number of A, and
+*> norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
+*> Errors occur when INFO parameter is not as expected. Failures occur when
+*> a test ratios is greater than THRES.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right-hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] NNT
+*> \verbatim
+*> NNT is INTEGER
+*> The number of values of MATRIX TYPE contained in the vector NTVAL.
+*> \endverbatim
+*>
+*> \param[in] NTVAL
+*> \verbatim
+*> NTVAL is INTEGER array, dimension (NNT)
+*> The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is REAL array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is REAL array, dimension ((NMAX*(NMAX+1))/2)
+*> \endverbatim
+*>
+*> \param[out] ARFINV
+*> \verbatim
+*> ARFINV is REAL array, dimension ((NMAX*(NMAX+1))/2)
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SLATMS
+*> \verbatim
+*> S_WORK_SLATMS is REAL array, dimension ( 3*NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SPOT01
+*> \verbatim
+*> S_WORK_SPOT01 is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_TEMP_SPOT02
+*> \verbatim
+*> S_TEMP_SPOT02 is REAL array, dimension ( NMAX*MAXRHS )
+*> \endverbatim
+*>
+*> \param[out] S_TEMP_SPOT03
+*> \verbatim
+*> S_TEMP_SPOT03 is REAL array, dimension ( NMAX*NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SLATMS
+*> \verbatim
+*> S_WORK_SLATMS is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SLANSY
+*> \verbatim
+*> S_WORK_SLANSY is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SPOT02
+*> \verbatim
+*> S_WORK_SPOT02 is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] S_WORK_SPOT03
+*> \verbatim
+*> S_WORK_SPOT03 is REAL array, dimension ( NMAX )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
+ THRESH, A, ASAV, AFAC, AINV, B,
+ BSAV, XACT, X, ARF, ARFINV,
@@ -6,8 +246,9 @@
+ S_WORK_SPOT02, S_WORK_SPOT03 )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NN, NNS, NNT, NOUT
@@ -34,107 +275,6 @@
REAL S_WORK_SPOT03( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVRFP tests the LAPACK RFP routines:
-* SPFTRF, SPFTRS, and SPFTRI.
-*
-* This testing routine follow the same tests as DDRVPO (test for the full
-* format Symmetric Positive Definite solver).
-*
-* The tests are performed in Full Format, convertion back and forth from
-* full format to RFP format are performed using the routines STRTTF and
-* STFTTR.
-*
-* First, a specific matrix A of size N is created. There is nine types of
-* different matrixes possible.
-* 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
-* 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
-* *3. First row and column zero 8. Scaled near underflow
-* *4. Last row and column zero 9. Scaled near overflow
-* *5. Middle row and column zero
-* (* - tests error exits from SPFTRF, no test ratios are computed)
-* A solution XACT of size N-by-NRHS is created and the associated right
-* hand side B as well. Then SPFTRF is called to compute L (or U), the
-* Cholesky factor of A. Then L (or U) is used to solve the linear system
-* of equations AX = B. This gives X. Then L (or U) is used to compute the
-* inverse of A, AINV. The following four tests are then performed:
-* (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
-* where EPS is the machine precision, RCOND the condition number of A, and
-* norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
-* Errors occur when INFO parameter is not as expected. Failures occur when
-* a test ratios is greater than THRES.
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right-hand sides NRHS.
-*
-* NNT (input) INTEGER
-* The number of values of MATRIX TYPE contained in the vector NTVAL.
-*
-* NTVAL (input) INTEGER array, dimension (NNT)
-* The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*MAXRHS)
-*
-* BSAV (workspace) REAL array, dimension (NMAX*MAXRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*MAXRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*MAXRHS)
-*
-* ARF (workspace) REAL array, dimension ((NMAX*(NMAX+1))/2)
-*
-* ARFINV (workspace) REAL array, dimension ((NMAX*(NMAX+1))/2)
-*
-* S_WORK_SLATMS (workspace) REAL array, dimension ( 3*NMAX )
-*
-* S_WORK_SPOT01 (workspace) REAL array, dimension ( NMAX )
-*
-* S_TEMP_SPOT02 (workspace) REAL array, dimension ( NMAX*MAXRHS )
-*
-* S_TEMP_SPOT03 (workspace) REAL array, dimension ( NMAX*NMAX )
-*
-* S_WORK_SLATMS (workspace) REAL array, dimension ( NMAX )
-*
-* S_WORK_SLANSY (workspace) REAL array, dimension ( NMAX )
-*
-* S_WORK_SPOT02 (workspace) REAL array, dimension ( NMAX )
-*
-* S_WORK_SPOT03 (workspace) REAL array, dimension ( NMAX )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvsp.f b/TESTING/LIN/sdrvsp.f
index 764d29f3..96076856 100644
--- a/TESTING/LIN/sdrvsp.f
+++ b/TESTING/LIN/sdrvsp.f
@@ -1,10 +1,167 @@
+*> \brief \b SDRVSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVSP tests the driver routines SSPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,66 +175,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVSP tests the driver routines SSPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) REAL array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvsy.f b/TESTING/LIN/sdrvsy.f
index d3740859..ea33425b 100644
--- a/TESTING/LIN/sdrvsy.f
+++ b/TESTING/LIN/sdrvsy.f
@@ -1,10 +1,164 @@
+*> \brief \b SDRVSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVSY tests the driver routines SSYSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,63 +172,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVSY tests the driver routines SSYSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sdrvsyx.f b/TESTING/LIN/sdrvsyx.f
index 0d6ab9c6..9092c100 100644
--- a/TESTING/LIN/sdrvsyx.f
+++ b/TESTING/LIN/sdrvsyx.f
@@ -1,10 +1,167 @@
+*> \brief \b SDRVSYX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* REAL THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* REAL A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ RWORK( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SDRVSY tests the driver routines SSYSV, -SVX, and -SVXX
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise sdrvsy.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is REAL
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,66 +175,6 @@
$ RWORK( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* SDRVSY tests the driver routines SSYSV, -SVX, and -SVXX
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise sdrvsy.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) REAL
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) REAL array, dimension (NMAX*NMAX)
-*
-* B (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* X (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) REAL array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) REAL array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) REAL array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sebchvxx.f b/TESTING/LIN/sebchvxx.f
index 19be0141..f25f315a 100644
--- a/TESTING/LIN/sebchvxx.f
+++ b/TESTING/LIN/sebchvxx.f
@@ -1,76 +1,91 @@
- SUBROUTINE SEBCHVXX( THRESH, PATH )
- IMPLICIT NONE
-* .. Scalar Arguments ..
- REAL THRESH
- CHARACTER*3 PATH
-*
-* Purpose
-* ======
-*
-* SEBCHVXX will run S**SVXX on a series of Hilbert matrices and then
-* compare the error bounds returned by SGESVXX to see if the returned
-* answer indeed falls within those bounds.
+*> \brief \b SEBCHVXX
*
-* Eight test ratios will be computed. The tests will pass if they are .LT.
-* THRESH. There are two cases that are determined by 1 / (SQRT( N ) * EPS).
-* If that value is .LE. to the component wise reciprocal condition number,
-* it uses the guaranteed case, other wise it uses the unguaranteed case.
+* =========== DOCUMENTATION ===========
*
-* Test ratios:
-* Let Xc be X_computed and Xt be X_truth.
-* The norm used is the infinity norm.
-
-* Let A be the guaranteed case and B be the unguaranteed case.
-*
-* 1. Normwise guaranteed forward error bound.
-* A: norm ( abs( Xc - Xt ) / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ) and
-* ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N),10) * EPS.
-* If these conditions are met, the test ratio is set to be
-* ERRBND( *, nwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
-* B: For this case, SGESVXX should just return 1. If it is less than
-* one, treat it the same as in 1A. Otherwise it fails. (Set test
-* ratio to ERRBND( *, nwise_i, bnd_i ) * THRESH?)
-*
-* 2. Componentwise guaranteed forward error bound.
-* A: norm ( abs( Xc(j) - Xt(j) ) ) / norm (Xt(j)) .LE. ERRBND( *, cwise_i, bnd_i )
-* for all j .AND. ERRBND( *, cwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS.
-* If these conditions are met, the test ratio is set to be
-* ERRBND( *, cwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
-* B: Same as normwise test ratio.
-*
-* 3. Backwards error.
-* A: The test ratio is set to BERR/EPS.
-* B: Same test ratio.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* 4. Reciprocal condition number.
-* A: A condition number is computed with Xt and compared with the one
-* returned from SGESVXX. Let RCONDc be the RCOND returned by SGESVXX
-* and RCONDt be the RCOND from the truth value. Test ratio is set to
-* MAX(RCONDc/RCONDt, RCONDt/RCONDc).
-* B: Test ratio is set to 1 / (EPS * RCONDc).
+* Definition
+* ==========
*
-* 5. Reciprocal normwise condition number.
-* A: The test ratio is set to
-* MAX(ERRBND( *, nwise_i, cond_i ) / NCOND, NCOND / ERRBND( *, nwise_i, cond_i )).
-* B: Test ratio is set to 1 / (EPS * ERRBND( *, nwise_i, cond_i )).
-*
-* 7. Reciprocal componentwise condition number.
-* A: Test ratio is set to
-* MAX(ERRBND( *, cwise_i, cond_i ) / CCOND, CCOND / ERRBND( *, cwise_i, cond_i )).
-* B: Test ratio is set to 1 / (EPS * ERRBND( *, cwise_i, cond_i )).
+* SUBROUTINE SEBCHVXX( THRESH, PATH )
+*
+* .. Scalar Arguments ..
+* REAL THRESH
+* CHARACTER*3 PATH
+*
+* Purpose
+* =======
*
-* .. Parameters ..
-* NMAX is determined by the largest number in the inverse of the Hilbert
-* matrix. Precision is exhausted when the largest entry in it is greater
-* than 2 to the power of the number of bits in the fraction of the data
-* type used plus one, which is 24 for single precision.
-* NMAX should be 6 for single and 11 for double.
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> ======
+*>
+*> SEBCHVXX will run S**SVXX on a series of Hilbert matrices and then
+*> compare the error bounds returned by SGESVXX to see if the returned
+*> answer indeed falls within those bounds.
+*>
+*> Eight test ratios will be computed. The tests will pass if they are .LT.
+*> THRESH. There are two cases that are determined by 1 / (SQRT( N ) * EPS).
+*> If that value is .LE. to the component wise reciprocal condition number,
+*> it uses the guaranteed case, other wise it uses the unguaranteed case.
+*>
+*> Test ratios:
+*> Let Xc be X_computed and Xt be X_truth.
+*> The norm used is the infinity norm.
+
+*> Let A be the guaranteed case and B be the unguaranteed case.
+*>
+*> 1. Normwise guaranteed forward error bound.
+*> A: norm ( abs( Xc - Xt ) / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ) and
+*> ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N),10) * EPS.
+*> If these conditions are met, the test ratio is set to be
+*> ERRBND( *, nwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
+*> B: For this case, SGESVXX should just return 1. If it is less than
+*> one, treat it the same as in 1A. Otherwise it fails. (Set test
+*> ratio to ERRBND( *, nwise_i, bnd_i ) * THRESH?)
+*>
+*> 2. Componentwise guaranteed forward error bound.
+*> A: norm ( abs( Xc(j) - Xt(j) ) ) / norm (Xt(j)) .LE. ERRBND( *, cwise_i, bnd_i )
+*> for all j .AND. ERRBND( *, cwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS.
+*> If these conditions are met, the test ratio is set to be
+*> ERRBND( *, cwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
+*> B: Same as normwise test ratio.
+*>
+*> 3. Backwards error.
+*> A: The test ratio is set to BERR/EPS.
+*> B: Same test ratio.
+*>
+*> 4. Reciprocal condition number.
+*> A: A condition number is computed with Xt and compared with the one
+*> returned from SGESVXX. Let RCONDc be the RCOND returned by SGESVXX
+*> and RCONDt be the RCOND from the truth value. Test ratio is set to
+*> MAX(RCONDc/RCONDt, RCONDt/RCONDc).
+*> B: Test ratio is set to 1 / (EPS * RCONDc).
+*>
+*> 5. Reciprocal normwise condition number.
+*> A: The test ratio is set to
+*> MAX(ERRBND( *, nwise_i, cond_i ) / NCOND, NCOND / ERRBND( *, nwise_i, cond_i )).
+*> B: Test ratio is set to 1 / (EPS * ERRBND( *, nwise_i, cond_i )).
+*>
+*> 7. Reciprocal componentwise condition number.
+*> A: Test ratio is set to
+*> MAX(ERRBND( *, cwise_i, cond_i ) / CCOND, CCOND / ERRBND( *, cwise_i, cond_i )).
+*> B: Test ratio is set to 1 / (EPS * ERRBND( *, cwise_i, cond_i )).
+*>
+*> .. Parameters ..
+*> NMAX is determined by the largest number in the inverse of the Hilbert
+*> matrix. Precision is exhausted when the largest entry in it is greater
+*> than 2 to the power of the number of bits in the fraction of the data
+*> type used plus one, which is 24 for single precision.
+*> NMAX should be 6 for single and 11 for double.
INTEGER NMAX, NPARAMS, NERRBND, NTESTS, KL, KU
PARAMETER (NMAX = 6, NPARAMS = 2, NERRBND = 3,
$ NTESTS = 6)
-* .. Local Scalars ..
+*> .. Local Scalars ..
INTEGER N, NRHS, INFO, I ,J, k, NFAIL, LDA, LDAB,
$ LDAFB, N_AUX_TESTS
CHARACTER FACT, TRANS, UPLO, EQUED
@@ -84,7 +99,7 @@
$ CWISE_RCOND, NWISE_RCOND,
$ CONDTHRESH, ERRTHRESH
-* .. Local Arrays ..
+*> .. Local Arrays ..
REAL TSTRAT(NTESTS), RINV(NMAX), PARAMS(NPARAMS),
$ A(NMAX, NMAX), ACOPY(NMAX, NMAX),
$ INVHILB(NMAX, NMAX), R(NMAX), C(NMAX), S(NMAX),
@@ -96,24 +111,24 @@
$ ERRBND_N(NMAX*3), ERRBND_C(NMAX*3)
INTEGER IWORK(NMAX), IPIV(NMAX)
-* .. External Functions ..
+*> .. External Functions ..
REAL SLAMCH
-* .. External Subroutines ..
+*> .. External Subroutines ..
EXTERNAL SLAHILB, SGESVXX, SSYSVXX, SPOSVXX, SGBSVXX,
$ SLACPY, LSAMEN
LOGICAL LSAMEN
-* .. Intrinsic Functions ..
+*> .. Intrinsic Functions ..
INTRINSIC SQRT, MAX, ABS
-* .. Parameters ..
+*> .. Parameters ..
INTEGER NWISE_I, CWISE_I
PARAMETER (NWISE_I = 1, CWISE_I = 1)
INTEGER BND_I, COND_I
PARAMETER (BND_I = 2, COND_I = 3)
-* Create the loop to test out the Hilbert matrices
+*> Create the loop to test out the Hilbert matrices
FACT = 'E'
UPLO = 'U'
@@ -127,7 +142,7 @@
LDAFB = 2*(NMAX-1)+(NMAX-1)+1
C2 = PATH( 2: 3 )
-* Main loop to test the different Hilbert Matrices.
+*> Main loop to test the different Hilbert Matrices.
printed_guide = .false.
@@ -140,14 +155,14 @@
NRHS = n
M = MAX(SQRT(REAL(N)), 10.0)
-* Generate the Hilbert matrix, its inverse, and the
-* right hand side, all scaled by the LCM(1,..,2N-1).
+*> Generate the Hilbert matrix, its inverse, and the
+*> right hand side, all scaled by the LCM(1,..,2N-1).
CALL SLAHILB(N, N, A, LDA, INVHILB, LDA, B, LDA, WORK, INFO)
-* Copy A into ACOPY.
+*> Copy A into ACOPY.
CALL SLACPY('ALL', N, N, A, NMAX, ACOPY, NMAX)
-* Store A in band format for GB tests
+*> Store A in band format for GB tests
DO J = 1, N
DO I = 1, KL+KU+1
AB( I, J ) = 0.0E+0
@@ -159,7 +174,7 @@
END DO
END DO
-* Copy AB into ABCOPY.
+*> Copy AB into ABCOPY.
DO J = 1, N
DO I = 1, KL+KU+1
ABCOPY( I, J ) = 0.0E+0
@@ -167,7 +182,7 @@
END DO
CALL SLACPY('ALL', KL+KU+1, N, AB, LDAB, ABCOPY, LDAB)
-* Call S**SVXX with default PARAMS and N_ERR_BND = 3.
+*> Call S**SVXX with default PARAMS and N_ERR_BND = 3.
IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
CALL SSYSVXX(FACT, UPLO, N, NRHS, ACOPY, LDA, AF, LDA,
$ IPIV, EQUED, S, B, LDA, X, LDA, ORCOND,
@@ -208,14 +223,14 @@
END IF
END IF
-* Calculating the difference between S**SVXX's X and the true X.
+*> Calculating the difference between S**SVXX's X and the true X.
DO I = 1, N
DO J = 1, NRHS
DIFF( I, J ) = X( I, J ) - INVHILB( I, J )
END DO
END DO
-* Calculating the RCOND
+*> Calculating the RCOND
RNORM = 0
RINORM = 0
IF ( LSAMEN( 2, C2, 'PO' ) .OR. LSAMEN( 2, C2, 'SY' ) ) THEN
@@ -246,7 +261,7 @@
RNORM = RNORM / A(1, 1)
RCOND = 1.0/(RNORM * RINORM)
-* Calculating the R for normwise rcond.
+*> Calculating the R for normwise rcond.
DO I = 1, N
RINV(I) = 0.0
END DO
@@ -256,7 +271,7 @@
END DO
END DO
-* Calculating the Normwise rcond.
+*> Calculating the Normwise rcond.
RINORM = 0.0
DO I = 1, N
SUMRI = 0.0
@@ -426,7 +441,7 @@ c$$$ WRITE(*,*) 'Reciprocal condition number: ',ERRBND(NRHS,cwise_i,cond
c$$$ WRITE(*,*) 'Raw error estimate: ',ERRBND(NRHS,cwise_i,rawbnd_i)
c$$$ print *, 'Info: ', info
c$$$ WRITE(*,*)
-* WRITE(*,*) 'TSTRAT: ',TSTRAT
+*> WRITE(*,*) 'TSTRAT: ',TSTRAT
END DO
@@ -442,7 +457,7 @@ c$$$ WRITE(*,*)
9998 FORMAT( ' S', A2, 'SVXX: ', I6, ' out of ', I6,
$ ' tests failed to pass the threshold' )
9997 FORMAT( ' S', A2, 'SVXX passed the tests of error bounds' )
-* Test ratios.
+*> Test ratios.
9996 FORMAT( 3X, I2, ': Normwise guaranteed forward error', / 5X,
$ 'Guaranteed case: if norm ( abs( Xc - Xt )',
$ ' / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ), then',
@@ -460,3 +475,33 @@ c$$$ WRITE(*,*)
$ ', ORCOND = ', G12.5, ', real RCOND = ', G12.5 )
END
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SEBCHVXX( THRESH, PATH )
+*
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL THRESH
+ CHARACTER*3 PATH
+*
diff --git a/TESTING/LIN/serrge.f b/TESTING/LIN/serrge.f
index 41476e8b..aaa05194 100644
--- a/TESTING/LIN/serrge.f
+++ b/TESTING/LIN/serrge.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRGE( PATH, NUNIT )
+*> \brief \b SERRGE
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRGE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRGE tests the error exits for the REAL routines
-* for general matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRGE tests the error exits for the REAL routines
+*> for general matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRGE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrgex.f b/TESTING/LIN/serrgex.f
index b9ab2689..5534100c 100644
--- a/TESTING/LIN/serrgex.f
+++ b/TESTING/LIN/serrgex.f
@@ -1,31 +1,74 @@
- SUBROUTINE SERRGE( PATH, NUNIT )
+*> \brief \b SERRGEX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SERRGE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRGE tests the error exits for the REAL routines
-* for general matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise serrge.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRGE tests the error exits for the REAL routines
+*> for general matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise serrge.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRGE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrgt.f b/TESTING/LIN/serrgt.f
index 894f6f26..78e332a1 100644
--- a/TESTING/LIN/serrgt.f
+++ b/TESTING/LIN/serrgt.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRGT( PATH, NUNIT )
+*> \brief \b SERRGT
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRGT( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRGT tests the error exits for the REAL tridiagonal
-* routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRGT tests the error exits for the REAL tridiagonal
+*> routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRGT( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrlq.f b/TESTING/LIN/serrlq.f
index 94f1d3fa..28bd4cc0 100644
--- a/TESTING/LIN/serrlq.f
+++ b/TESTING/LIN/serrlq.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRLQ( PATH, NUNIT )
+*> \brief \b SERRLQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRLQ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRLQ tests the error exits for the REAL routines
-* that use the LQ decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRLQ tests the error exits for the REAL routines
+*> that use the LQ decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRLQ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrls.f b/TESTING/LIN/serrls.f
index 314b1a34..bea2f991 100644
--- a/TESTING/LIN/serrls.f
+++ b/TESTING/LIN/serrls.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRLS( PATH, NUNIT )
+*> \brief \b SERRLS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRLS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRLS tests the error exits for the REAL least squares
-* driver routines (SGELS, SGELSS, SGELSX, SGELSY, SGELSD).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRLS tests the error exits for the REAL least squares
+*> driver routines (SGELS, SGELSS, SGELSX, SGELSY, SGELSD).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRLS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrpo.f b/TESTING/LIN/serrpo.f
index 4319cb2c..3e36cfd0 100644
--- a/TESTING/LIN/serrpo.f
+++ b/TESTING/LIN/serrpo.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRPO( PATH, NUNIT )
+*> \brief \b SERRPO
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRPO( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRPO tests the error exits for the REAL routines
-* for symmetric positive definite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRPO tests the error exits for the REAL routines
+*> for symmetric positive definite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRPO( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrpox.f b/TESTING/LIN/serrpox.f
index 48f6cd1d..225c1add 100644
--- a/TESTING/LIN/serrpox.f
+++ b/TESTING/LIN/serrpox.f
@@ -1,31 +1,74 @@
- SUBROUTINE SERRPO( PATH, NUNIT )
+*> \brief \b SERRPOX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SERRPO( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRPO tests the error exits for the REAL routines
-* for symmetric positive definite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise serrpo.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRPO tests the error exits for the REAL routines
+*> for symmetric positive definite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise serrpo.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRPO( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrps.f b/TESTING/LIN/serrps.f
index e3314478..44c33ebd 100644
--- a/TESTING/LIN/serrps.f
+++ b/TESTING/LIN/serrps.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRPS( PATH, NUNIT )
+*> \brief \b SERRPS
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
- CHARACTER*3 PATH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRPS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* CHARACTER*3 PATH
+* ..
+*
* Purpose
* =======
*
-* SERRPS tests the error exits for the REAL routines
-* for SPSTRF..
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRPS tests the error exits for the REAL routines
+*> for SPSTRF..
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRPS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+ CHARACTER*3 PATH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrql.f b/TESTING/LIN/serrql.f
index 96c2ffeb..6be4b60d 100644
--- a/TESTING/LIN/serrql.f
+++ b/TESTING/LIN/serrql.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRQL( PATH, NUNIT )
+*> \brief \b SERRQL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRQL( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRQL tests the error exits for the REAL routines
-* that use the QL decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRQL tests the error exits for the REAL routines
+*> that use the QL decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRQL( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrqp.f b/TESTING/LIN/serrqp.f
index cea578ac..51268e0b 100644
--- a/TESTING/LIN/serrqp.f
+++ b/TESTING/LIN/serrqp.f
@@ -1,27 +1,70 @@
- SUBROUTINE SERRQP( PATH, NUNIT )
+*> \brief \b SERRQP
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRQP( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRQP tests the error exits for SGEQPF and SGEQP3.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRQP tests the error exits for SGEQPF and SGEQP3.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRQP( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrqr.f b/TESTING/LIN/serrqr.f
index 4524165e..4e0811cf 100644
--- a/TESTING/LIN/serrqr.f
+++ b/TESTING/LIN/serrqr.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRQR( PATH, NUNIT )
+*> \brief \b SERRQR
*
-* -- LAPACK test routine (version 3.3.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRQR( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRQR tests the error exits for the REAL routines
-* that use the QR decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRQR tests the error exits for the REAL routines
+*> that use the QR decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRQR( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrrfp.f b/TESTING/LIN/serrrfp.f
index a54a7373..1695b6a4 100644
--- a/TESTING/LIN/serrrfp.f
+++ b/TESTING/LIN/serrrfp.f
@@ -1,28 +1,67 @@
- SUBROUTINE SERRRFP( NUNIT )
+*> \brief \b SERRRFP
*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRRFP( NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRRFP tests the error exits for the REAL driver routines
-* for solving linear systems of equations.
-*
-* SDRVRFP tests the REAL LAPACK RFP routines:
-* STFSM, STFTRI, SSFRK, STFTTP, STFTTR, SPFTRF, SPFTRS, STPTTF,
-* STPTTR, STRTTF, and STRTTP
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRRFP tests the error exits for the REAL driver routines
+*> for solving linear systems of equations.
+*>
+*> SDRVRFP tests the REAL LAPACK RFP routines:
+*> STFSM, STFTRI, SSFRK, STFTTP, STFTTR, SPFTRF, SPFTRS, STPTTF,
+*> STPTTR, STRTTF, and STRTTP
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRRFP( NUNIT )
+*
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrrq.f b/TESTING/LIN/serrrq.f
index 5b363eb6..fbcbe56d 100644
--- a/TESTING/LIN/serrrq.f
+++ b/TESTING/LIN/serrrq.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRRQ( PATH, NUNIT )
+*> \brief \b SERRRQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRRQ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRRQ tests the error exits for the REAL routines
-* that use the RQ decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRRQ tests the error exits for the REAL routines
+*> that use the RQ decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRRQ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrsy.f b/TESTING/LIN/serrsy.f
index 7e218ef2..905aad43 100644
--- a/TESTING/LIN/serrsy.f
+++ b/TESTING/LIN/serrsy.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRSY( PATH, NUNIT )
+*> \brief \b SERRSY
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRSY( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRSY tests the error exits for the REAL routines
-* for symmetric indefinite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRSY tests the error exits for the REAL routines
+*> for symmetric indefinite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRSY( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrsyx.f b/TESTING/LIN/serrsyx.f
index b906faf8..440b2a79 100644
--- a/TESTING/LIN/serrsyx.f
+++ b/TESTING/LIN/serrsyx.f
@@ -1,31 +1,74 @@
- SUBROUTINE SERRSY( PATH, NUNIT )
+*> \brief \b SERRSYX
*
-* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SERRSY( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRSY tests the error exits for the REAL routines
-* for symmetric indefinite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise serrsy.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRSY tests the error exits for the REAL routines
+*> for symmetric indefinite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise serrsy.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRSY( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrtr.f b/TESTING/LIN/serrtr.f
index 97fcae44..4e72dc09 100644
--- a/TESTING/LIN/serrtr.f
+++ b/TESTING/LIN/serrtr.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRTR( PATH, NUNIT )
+*> \brief \b SERRTR
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRTR( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRTR tests the error exits for the REAL triangular
-* routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRTR tests the error exits for the REAL triangular
+*> routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRTR( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrtz.f b/TESTING/LIN/serrtz.f
index bc83b1fb..ab031f2f 100644
--- a/TESTING/LIN/serrtz.f
+++ b/TESTING/LIN/serrtz.f
@@ -1,27 +1,70 @@
- SUBROUTINE SERRTZ( PATH, NUNIT )
+*> \brief \b SERRTZ
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRTZ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRTZ tests the error exits for STZRQF and STZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRTZ tests the error exits for STZRQF and STZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRTZ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrvx.f b/TESTING/LIN/serrvx.f
index bf786410..135b95b1 100644
--- a/TESTING/LIN/serrvx.f
+++ b/TESTING/LIN/serrvx.f
@@ -1,28 +1,71 @@
- SUBROUTINE SERRVX( PATH, NUNIT )
+*> \brief \b SERRVX
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SERRVX( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRVX tests the error exits for the REAL driver routines
-* for solving linear systems of equations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRVX tests the error exits for the REAL driver routines
+*> for solving linear systems of equations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRVX( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/serrvxx.f b/TESTING/LIN/serrvxx.f
index ce7ac48f..2f04f2e8 100644
--- a/TESTING/LIN/serrvxx.f
+++ b/TESTING/LIN/serrvxx.f
@@ -1,31 +1,71 @@
- SUBROUTINE SERRVX( PATH, NUNIT )
-*
-* -- LAPACK test routine (version 3.2.1) --
+*> \brief \b SERRVXX
*
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE SERRVX( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* SERRVX tests the error exits for the REAL driver routines
-* for solving linear systems of equations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SERRVX tests the error exits for the REAL driver routines
+*> for solving linear systems of equations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SERRVX( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sgbt01.f b/TESTING/LIN/sgbt01.f
index cb3bc4c5..c0269889 100644
--- a/TESTING/LIN/sgbt01.f
+++ b/TESTING/LIN/sgbt01.f
@@ -1,71 +1,146 @@
- SUBROUTINE SGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KL, KU, LDA, LDAFAC, M, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
-* ..
-*
+*> \brief \b SGBT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER KL, KU, LDA, LDAFAC, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGBT01 reconstructs a band matrix A from its L*U factorization and
-* computes the residual:
-* norm(L*U - A) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* The expression L*U - A is computed one column at a time, so A and
-* AFAC are not modified.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBT01 reconstructs a band matrix A from its L*U factorization and
+*> computes the residual:
+*> norm(L*U - A) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*> The expression L*U - A is computed one column at a time, so A and
+*> AFAC are not modified.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* The original matrix A in band storage, stored in rows 1 to
-* KL+KU+1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original matrix A in band storage, stored in rows 1 to
+*> KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the banded
+*> factors L and U from the L*U factorization, as computed by
+*> SGBTRF. U is stored as an upper triangular band matrix with
+*> KL+KU superdiagonals in rows 1 to KL+KU+1, and the
+*> multipliers used during the factorization are stored in rows
+*> KL+KU+2 to 2*KL+KU+1. See SGBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC.
+*> LDAFAC >= max(1,2*KL*KU+1).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices from SGBTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*KL+KU+1)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(L*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AFAC (input) REAL array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the banded
-* factors L and U from the L*U factorization, as computed by
-* SGBTRF. U is stored as an upper triangular band matrix with
-* KL+KU superdiagonals in rows 1 to KL+KU+1, and the
-* multipliers used during the factorization are stored in rows
-* KL+KU+2 to 2*KL+KU+1. See SGBTRF for further details.
+*> \date November 2011
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC.
-* LDAFAC >= max(1,2*KL*KU+1).
+*> \ingroup single_lin
*
-* IPIV (input) INTEGER array, dimension (min(M,N))
-* The pivot indices from SGBTRF.
+* =====================================================================
+ SUBROUTINE SGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
+ $ RESID )
*
-* WORK (workspace) REAL array, dimension (2*KL+KU+1)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(L*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER KL, KU, LDA, LDAFAC, M, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sgbt02.f b/TESTING/LIN/sgbt02.f
index 23300ec2..f49181f6 100644
--- a/TESTING/LIN/sgbt02.f
+++ b/TESTING/LIN/sgbt02.f
@@ -1,78 +1,159 @@
- SUBROUTINE SGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
- $ LDB, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
-* ..
-*
+*> \brief \b SGBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
+* LDB, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* SGBT02 computes the residual for a solution of a banded system of
-* equations A*x = b or A'*x = b:
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
-* where EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBT02 computes the residual for a solution of a banded system of
+*> equations A*x = b or A'*x = b:
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original matrix A in band storage, stored in rows 1 to
-* KL+KU+1.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original matrix A in band storage, stored in rows 1 to
+*> KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \ingroup single_lin
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
+* =====================================================================
+ SUBROUTINE SGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
+ $ LDB, RESID )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sgbt05.f b/TESTING/LIN/sgbt05.f
index 9ac471a6..b8184d85 100644
--- a/TESTING/LIN/sgbt05.f
+++ b/TESTING/LIN/sgbt05.f
@@ -1,9 +1,187 @@
+*> \brief \b SGBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGBT05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
+* LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER KL, KU, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations op(A)*X = B, where A is a
+*> general band matrix of order n with kl subdiagonals and ku
+*> superdiagonals and op(A) = A or A**T, depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SGBT05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
$ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,93 +193,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* SGBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations op(A)*X = B, where A is a
-* general band matrix of order n with kl subdiagonals and ku
-* superdiagonals and op(A) = A or A**T, depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sgelqs.f b/TESTING/LIN/sgelqs.f
index b07e5b9a..0e0184ae 100644
--- a/TESTING/LIN/sgelqs.f
+++ b/TESTING/LIN/sgelqs.f
@@ -1,66 +1,140 @@
- SUBROUTINE SGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SGELQS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Compute a minimum-norm solution
-* min || A*X - B ||
-* using the LQ factorization
-* A = L*Q
-* computed by SGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute a minimum-norm solution
+*> min || A*X - B ||
+*> using the LQ factorization
+*> A = L*Q
+*> computed by SGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* Details of the LQ factorization of the original matrix A as
-* returned by SGELQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> Details of the LQ factorization of the original matrix A as
+*> returned by SGELQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) REAL array, dimension (M)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= N.
+*> \ingroup single_lin
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE SGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sgennd.f b/TESTING/LIN/sgennd.f
index 95748b09..877b10c3 100644
--- a/TESTING/LIN/sgennd.f
+++ b/TESTING/LIN/sgennd.f
@@ -1,36 +1,86 @@
- LOGICAL FUNCTION SGENND (M, N, A, LDA)
- IMPLICIT NONE
+*> \brief \b SGENND
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION SGENND (M, N, A, LDA)
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SGENND tests that its argument has a non-negative diagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGENND tests that its argument has a non-negative diagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns in A.
+*> \date November 2011
*
-* A (input) REAL array, dimension (LDA, N)
-* The matrix.
+*> \ingroup single_lin
*
-* LDA (input) INTEGER
-* Leading dimension of A.
+* =====================================================================
+ LOGICAL FUNCTION SGENND (M, N, A, LDA)
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sgeqls.f b/TESTING/LIN/sgeqls.f
index 231e29f0..1b214ad7 100644
--- a/TESTING/LIN/sgeqls.f
+++ b/TESTING/LIN/sgeqls.f
@@ -1,67 +1,141 @@
- SUBROUTINE SGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SGEQLS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Solve the least squares problem
-* min || A*X - B ||
-* using the QL factorization
-* A = Q*L
-* computed by SGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Solve the least squares problem
+*> min || A*X - B ||
+*> using the QL factorization
+*> A = Q*L
+*> computed by SGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. M >= N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* Details of the QL factorization of the original matrix A as
-* returned by SGEQLF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> Details of the QL factorization of the original matrix A as
+*> returned by SGEQLF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X, stored in rows
+*> m-n+1:m.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= M.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) REAL array, dimension (N)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X, stored in rows
-* m-n+1:m.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= M.
+*> \ingroup single_lin
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE SGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sgeqrs.f b/TESTING/LIN/sgeqrs.f
index 193fe97d..110bbf1d 100644
--- a/TESTING/LIN/sgeqrs.f
+++ b/TESTING/LIN/sgeqrs.f
@@ -1,66 +1,140 @@
- SUBROUTINE SGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SGEQRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Solve the least squares problem
-* min || A*X - B ||
-* using the QR factorization
-* A = Q*R
-* computed by SGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Solve the least squares problem
+*> min || A*X - B ||
+*> using the QR factorization
+*> A = Q*R
+*> computed by SGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. M >= N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* Details of the QR factorization of the original matrix A as
-* returned by SGEQRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> Details of the QR factorization of the original matrix A as
+*> returned by SGEQRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= M.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) REAL array, dimension (N)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= M.
+*> \ingroup single_lin
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE SGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sgerqs.f b/TESTING/LIN/sgerqs.f
index 316aa552..a774a432 100644
--- a/TESTING/LIN/sgerqs.f
+++ b/TESTING/LIN/sgerqs.f
@@ -1,67 +1,141 @@
- SUBROUTINE SGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SGERQS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Compute a minimum-norm solution
-* min || A*X - B ||
-* using the RQ factorization
-* A = R*Q
-* computed by SGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute a minimum-norm solution
+*> min || A*X - B ||
+*> using the RQ factorization
+*> A = R*Q
+*> computed by SGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* Details of the RQ factorization of the original matrix A as
-* returned by SGERQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> Details of the RQ factorization of the original matrix A as
+*> returned by SGERQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the linear system.
+*> On exit, the solution vectors X. Each solution vector
+*> is contained in rows 1:N of a column of B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) REAL array, dimension (M)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the linear system.
-* On exit, the solution vectors X. Each solution vector
-* is contained in rows 1:N of a column of B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup single_lin
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE SGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sget01.f b/TESTING/LIN/sget01.f
index 17e6940e..63a41fb7 100644
--- a/TESTING/LIN/sget01.f
+++ b/TESTING/LIN/sget01.f
@@ -1,58 +1,127 @@
- SUBROUTINE SGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
- $ RESID )
+*> \brief \b SGET01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDAFAC, M, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDAFAC, M, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* SGET01 reconstructs a matrix A from its L*U factorization and
-* computes the residual
-* norm(L*U - A) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET01 reconstructs a matrix A from its L*U factorization and
+*> computes the residual
+*> norm(L*U - A) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original M x N matrix A.
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the factors
+*> L and U from the L*U factorization as computed by SGETRF.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*U - A.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SGETRF.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(L*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AFAC (input/output) REAL array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the factors
-* L and U from the L*U factorization as computed by SGETRF.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*U - A.
+*> \date November 2011
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,M).
+*> \ingroup single_lin
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SGETRF.
+* =====================================================================
+ SUBROUTINE SGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
+ $ RESID )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(L*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDAFAC, M, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sget02.f b/TESTING/LIN/sget02.f
index 962173d3..44976ff4 100644
--- a/TESTING/LIN/sget02.f
+++ b/TESTING/LIN/sget02.f
@@ -1,9 +1,144 @@
+*> \brief \b SGET02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET02 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGET02 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sget03.f b/TESTING/LIN/sget03.f
index 19798d28..27d0efe8 100644
--- a/TESTING/LIN/sget03.f
+++ b/TESTING/LIN/sget03.f
@@ -1,57 +1,129 @@
- SUBROUTINE SGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
- $ RCOND, RESID )
+*> \brief \b SGET03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDAINV, LDWORK, N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
- $ WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
+* RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDAINV, LDWORK, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* SGET03 computes the residual for a general matrix times its inverse:
-* norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET03 computes the residual for a general matrix times its inverse:
+*> norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original N x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AINV (input) REAL array, dimension (LDAINV,N)
-* The inverse of the matrix A.
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original N x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (LDAINV,N)
+*> The inverse of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) REAL array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup single_lin
*
-* RWORK (workspace) REAL array, dimension (N)
+* =====================================================================
+ SUBROUTINE SGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
+ $ RCOND, RESID )
*
-* RCOND (output) REAL
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDAINV, LDWORK, N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sget04.f b/TESTING/LIN/sget04.f
index e0d8f8ac..a27d9484 100644
--- a/TESTING/LIN/sget04.f
+++ b/TESTING/LIN/sget04.f
@@ -1,57 +1,121 @@
- SUBROUTINE SGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDX, LDXACT, N, NRHS
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL X( LDX, * ), XACT( LDXACT, * )
-* ..
-*
+*> \brief \b SGET04
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDX, LDXACT, N, NRHS
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
* Purpose
* =======
*
-* SGET04 computes the difference between a computed solution and the
-* true solution to a system of linear equations.
-*
-* RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
-* where RCOND is the reciprocal of the condition number and EPS is the
-* machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET04 computes the difference between a computed solution and the
+*> true solution to a system of linear equations.
+*>
+*> RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+*> where RCOND is the reciprocal of the condition number and EPS is the
+*> machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension( LDX, NRHS )
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of the coefficient
+*> matrix in the system of equations.
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the NRHS solution vectors of
+*> ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* XACT (input) REAL array, dimension( LDX, NRHS )
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
+*> \ingroup single_lin
*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
+* =====================================================================
+ SUBROUTINE SGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
*
-* RCOND (input) REAL
-* The reciprocal of the condition number of the coefficient
-* matrix in the system of equations.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The maximum over the NRHS solution vectors of
-* ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDX, LDXACT, N, NRHS
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL X( LDX, * ), XACT( LDXACT, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sget06.f b/TESTING/LIN/sget06.f
index 4e2a2a61..e3b33eff 100644
--- a/TESTING/LIN/sget06.f
+++ b/TESTING/LIN/sget06.f
@@ -1,28 +1,70 @@
- REAL FUNCTION SGET06( RCOND, RCONDC )
+*> \brief \b SGET06
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- REAL RCOND, RCONDC
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION SGET06( RCOND, RCONDC )
+*
+* .. Scalar Arguments ..
+* REAL RCOND, RCONDC
+* ..
+*
* Purpose
* =======
*
-* SGET06 computes a test ratio to compare two values for RCOND.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET06 computes a test ratio to compare two values for RCOND.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal of the condition number of A,
+*> as computed by SGECON.
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is REAL
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(inv(A)).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RCOND (input) REAL
-* The estimate of the reciprocal of the condition number of A,
-* as computed by SGECON.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* RCONDC (input) REAL
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(inv(A)).
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ REAL FUNCTION SGET06( RCOND, RCONDC )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ REAL RCOND, RCONDC
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sget07.f b/TESTING/LIN/sget07.f
index be12bb69..1ba42349 100644
--- a/TESTING/LIN/sget07.f
+++ b/TESTING/LIN/sget07.f
@@ -1,9 +1,176 @@
+*> \brief \b SGET07
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGET07( TRANS, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, CHKFERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* LOGICAL CHKFERR
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGET07 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations op(A)*X = B, where A is a
+*> general n by n matrix and op(A) = A or A**T, depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original n by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] CHKFERR
+*> \verbatim
+*> CHKFERR is LOGICAL
+*> Set to .TRUE. to check FERR, .FALSE. not to check FERR.
+*> When the test system is ill-conditioned, the "true"
+*> solution in XACT may be incorrect.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SGET07( TRANS, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, CHKFERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,85 +182,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* SGET07 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations op(A)*X = B, where A is a
-* general n by n matrix and op(A) = A or A**T, depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original n by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* CHKFERR (input) LOGICAL
-* Set to .TRUE. to check FERR, .FALSE. not to check FERR.
-* When the test system is ill-conditioned, the "true"
-* solution in XACT may be incorrect.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sgtt01.f b/TESTING/LIN/sgtt01.f
index fc124ad0..adfd9abc 100644
--- a/TESTING/LIN/sgtt01.f
+++ b/TESTING/LIN/sgtt01.f
@@ -1,9 +1,145 @@
+*> \brief \b SGTT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTT01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
+* LDWORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDWORK, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
+* $ DU2( * ), DUF( * ), RWORK( * ),
+* $ WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTT01 reconstructs a tridiagonal matrix A from its LU factorization
+*> and computes the residual
+*> norm(L*U - A) / ( norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DLF
+*> \verbatim
+*> DLF is REAL array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is REAL array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DUF
+*> \verbatim
+*> DUF is REAL array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2F
+*> \verbatim
+*> DU2F is REAL array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The scaled residual: norm(L*U - A) / (norm(A) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SGTT01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
$ LDWORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDWORK, N
@@ -16,59 +152,6 @@
$ WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* SGTT01 reconstructs a tridiagonal matrix A from its LU factorization
-* and computes the residual
-* norm(L*U - A) / ( norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGTER
-* The order of the matrix A. N >= 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* DLF (input) REAL array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
-*
-* DF (input) REAL array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DUF (input) REAL array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
-*
-* DU2F (input) REAL array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* WORK (workspace) REAL array, dimension (LDWORK,N)
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The scaled residual: norm(L*U - A) / (norm(A) * EPS)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sgtt02.f b/TESTING/LIN/sgtt02.f
index 9730b3c4..193d037f 100644
--- a/TESTING/LIN/sgtt02.f
+++ b/TESTING/LIN/sgtt02.f
@@ -1,9 +1,135 @@
+*> \brief \b SGTT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTT02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTT02 computes the residual for the solution to a tridiagonal
+*> system of equations:
+*> RESID = norm(B - op(A)*X) / (norm(A) * norm(X) * EPS),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> Specifies the form of the residual.
+*> = 'N': B - A * X (No transpose)
+*> = 'T': B - A'* X (Transpose)
+*> = 'C': B - A'* X (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - op(A)*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(B - op(A)*X) / (norm(A) * norm(X) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SGTT02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,56 +141,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SGTT02 computes the residual for the solution to a tridiagonal
-* system of equations:
-* RESID = norm(B - op(A)*X) / (norm(A) * norm(X) * EPS),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER
-* Specifies the form of the residual.
-* = 'N': B - A * X (No transpose)
-* = 'T': B - A'* X (Transpose)
-* = 'C': B - A'* X (Conjugate transpose = Transpose)
-*
-* N (input) INTEGTER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - op(A)*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RESID (output) REAL
-* norm(B - op(A)*X) / (norm(A) * norm(X) * EPS)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sgtt05.f b/TESTING/LIN/sgtt05.f
index 56a94018..8e4fd8bc 100644
--- a/TESTING/LIN/sgtt05.f
+++ b/TESTING/LIN/sgtt05.f
@@ -1,9 +1,176 @@
+*> \brief \b SGTT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SGTT05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), BERR( * ), D( * ), DL( * ),
+* $ DU( * ), FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SGTT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> general tridiagonal matrix of order n and op(A) = A or A**T,
+*> depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is REAL array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SGTT05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,85 +182,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* SGTT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* general tridiagonal matrix of order n and op(A) = A or A**T,
-* depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
-*
-* DL (input) REAL array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) REAL array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/slahilb.f b/TESTING/LIN/slahilb.f
index afdc4201..ed25756e 100644
--- a/TESTING/LIN/slahilb.f
+++ b/TESTING/LIN/slahilb.f
@@ -1,22 +1,26 @@
- SUBROUTINE SLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
-!
-! -- LAPACK auxiliary test routine (version 3.0) --
-! Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-! Courant Institute, Argonne National Lab, and Rice University
-! 28 August, 2006
-!
-! David Vu <dtv@cs.berkeley.edu>
-! Yozo Hida <yozo@cs.berkeley.edu>
-! Jason Riedy <ejr@cs.berkeley.edu>
-! D. Halligan <dhalligan@berkeley.edu>
-!
- IMPLICIT NONE
-! .. Scalar Arguments ..
- INTEGER N, NRHS, LDA, LDX, LDB, INFO
-! .. Array Arguments ..
- REAL A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
-! ..
-!
+*> \brief \b SLAHILB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+*
+* ! .. Scalar Arguments ..
+* INTEGER N, NRHS, LDA, LDX, LDB, INFO
+* ! .. Array Arguments ..
+* REAL A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
+* ! ..
+* !
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
! Purpose
! =======
!
@@ -39,43 +43,37 @@
! In single, the generated solution is exact for N <= 6 and has
! small componentwise error for 7 <= N <= 11.
!
-! Arguments
-! =========
-!
-! N (input) INTEGER
-! The dimension of the matrix A.
-!
-! NRHS (input) NRHS
-! The requested number of right-hand sides.
-!
-! A (output) REAL array, dimension (LDA, N)
-! The generated scaled Hilbert matrix.
-!
-! LDA (input) INTEGER
-! The leading dimension of the array A. LDA >= N.
-!
-! X (output) REAL array, dimension (LDX, NRHS)
-! The generated exact solutions. Currently, the first NRHS
-! columns of the inverse Hilbert matrix.
-!
-! LDX (input) INTEGER
-! The leading dimension of the array X. LDX >= N.
-!
-! B (output) REAL array, dimension (LDB, NRHS)
-! The generated right-hand sides. Currently, the first NRHS
-! columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
-!
-! LDB (input) INTEGER
-! The leading dimension of the array B. LDB >= N.
-!
-! WORK (workspace) REAL array, dimension (N)
-!
-!
-! INFO (output) INTEGER
-! = 0: successful exit
-! = 1: N is too large; the data is still generated but may not
-! be not exact.
-! < 0: if INFO = -i, the i-th argument had an illegal value
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
+ SUBROUTINE SLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+*
+* -- LAPACK test routine (version 3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+! .. Scalar Arguments ..
+ INTEGER N, NRHS, LDA, LDX, LDB, INFO
+! .. Array Arguments ..
+ REAL A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
+! ..
!
! =====================================================================
diff --git a/TESTING/LIN/slaord.f b/TESTING/LIN/slaord.f
index 9fd1a64d..1828ec1f 100644
--- a/TESTING/LIN/slaord.f
+++ b/TESTING/LIN/slaord.f
@@ -1,40 +1,92 @@
- SUBROUTINE SLAORD( JOB, N, X, INCX )
-*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER JOB
- INTEGER INCX, N
-* ..
-* .. Array Arguments ..
- REAL X( * )
-* ..
-*
+*> \brief \b SLAORD
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAORD( JOB, N, X, INCX )
+*
+* .. Scalar Arguments ..
+* CHARACTER JOB
+* INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+* REAL X( * )
+* ..
+*
* Purpose
* =======
*
-* SLAORD sorts the elements of a vector x in increasing or decreasing
-* order.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAORD sorts the elements of a vector x in increasing or decreasing
+*> order.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* JOB (input) CHARACTER
-* = 'I': Sort in increasing order
-* = 'D': Sort in decreasing order
+*> \param[in] JOB
+*> \verbatim
+*> JOB is CHARACTER
+*> = 'I': Sort in increasing order
+*> = 'D': Sort in decreasing order
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The length of the vector X.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is REAL array, dimension
+*> (1+(N-1)*INCX)
+*> On entry, the vector of length n to be sorted.
+*> On exit, the vector x is sorted in the prescribed order.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*> INCX is INTEGER
+*> The spacing between successive elements of X. INCX >= 0.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
*
-* N (input) INTEGER
-* The length of the vector X.
+* =====================================================================
+ SUBROUTINE SLAORD( JOB, N, X, INCX )
*
-* X (input/output) REAL array, dimension
-* (1+(N-1)*INCX)
-* On entry, the vector of length n to be sorted.
-* On exit, the vector x is sorted in the prescribed order.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INCX (input) INTEGER
-* The spacing between successive elements of X. INCX >= 0.
+* .. Scalar Arguments ..
+ CHARACTER JOB
+ INTEGER INCX, N
+* ..
+* .. Array Arguments ..
+ REAL X( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/slaptm.f b/TESTING/LIN/slaptm.f
index f25c4d8e..b5f77cbb 100644
--- a/TESTING/LIN/slaptm.f
+++ b/TESTING/LIN/slaptm.f
@@ -1,65 +1,135 @@
- SUBROUTINE SLAPTM( N, NRHS, ALPHA, D, E, X, LDX, BETA, B, LDB )
-*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDX, N, NRHS
- REAL ALPHA, BETA
-* ..
-* .. Array Arguments ..
- REAL B( LDB, * ), D( * ), E( * ), X( LDX, * )
-* ..
-*
+*> \brief \b SLAPTM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAPTM( N, NRHS, ALPHA, D, E, X, LDX, BETA, B, LDB )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDX, N, NRHS
+* REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), D( * ), E( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* SLAPTM multiplies an N by NRHS matrix X by a symmetric tridiagonal
-* matrix A and stores the result in a matrix B. The operation has the
-* form
-*
-* B := alpha * A * X + beta * B
-*
-* where alpha may be either 1. or -1. and beta may be 0., 1., or -1.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAPTM multiplies an N by NRHS matrix X by a symmetric tridiagonal
+*> matrix A and stores the result in a matrix B. The operation has the
+*> form
+*>
+*> B := alpha * A * X + beta * B
+*>
+*> where alpha may be either 1. or -1. and beta may be 0., 1., or -1.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B.
-*
-* ALPHA (input) REAL
-* The scalar alpha. ALPHA must be 1. or -1.; otherwise,
-* it is assumed to be 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> The scalar alpha. ALPHA must be 1. or -1.; otherwise,
+*> it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal or superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The N by NRHS matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> The scalar beta. BETA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix B.
+*> On exit, B is overwritten by the matrix expression
+*> B := alpha * A * X + beta * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(N,1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal or superdiagonal elements of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The N by NRHS matrix X.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(N,1).
+*> \ingroup single_lin
*
-* BETA (input) REAL
-* The scalar beta. BETA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 1.
+* =====================================================================
+ SUBROUTINE SLAPTM( N, NRHS, ALPHA, D, E, X, LDX, BETA, B, LDB )
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix B.
-* On exit, B is overwritten by the matrix expression
-* B := alpha * A * X + beta * B.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(N,1).
+* .. Scalar Arguments ..
+ INTEGER LDB, LDX, N, NRHS
+ REAL ALPHA, BETA
+* ..
+* .. Array Arguments ..
+ REAL B( LDB, * ), D( * ), E( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/slarhs.f b/TESTING/LIN/slarhs.f
index 29bdfcf8..bdb7d59b 100644
--- a/TESTING/LIN/slarhs.f
+++ b/TESTING/LIN/slarhs.f
@@ -1,9 +1,217 @@
+*> \brief \b SLARHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
+* A, LDA, X, LDX, B, LDB, ISEED, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, UPLO, XTYPE
+* CHARACTER*3 PATH
+* INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARHS chooses a set of NRHS random solution vectors and sets
+*> up the right hand sides for the linear system
+*> op( A ) * X = B,
+*> where op( A ) may be A or A' (transpose of A).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The type of the real matrix A. PATH may be given in any
+*> combination of upper and lower case. Valid types include
+*> xGE: General m x n matrix
+*> xGB: General banded matrix
+*> xPO: Symmetric positive definite, 2-D storage
+*> xPP: Symmetric positive definite packed
+*> xPB: Symmetric positive definite banded
+*> xSY: Symmetric indefinite, 2-D storage
+*> xSP: Symmetric indefinite packed
+*> xSB: Symmetric indefinite banded
+*> xTR: Triangular
+*> xTP: Triangular packed
+*> xTB: Triangular banded
+*> xQR: General m x n matrix
+*> xLQ: General m x n matrix
+*> xQL: General m x n matrix
+*> xRQ: General m x n matrix
+*> where the leading character indicates the precision.
+*> \endverbatim
+*>
+*> \param[in] XTYPE
+*> \verbatim
+*> XTYPE is CHARACTER*1
+*> Specifies how the exact solution X will be determined:
+*> = 'N': New solution; generate a random X.
+*> = 'C': Computed; use value of X on entry.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> matrix A is stored, if A is symmetric.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to the matrix A.
+*> = 'N': System is A * x = b
+*> = 'T': System is A'* x = b
+*> = 'C': System is A'* x = b
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number or rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Used only if A is a band matrix; specifies the number of
+*> subdiagonals of A if A is a general band matrix or if A is
+*> symmetric or triangular and UPLO = 'L'; specifies the number
+*> of superdiagonals of A if A is symmetric or triangular and
+*> UPLO = 'U'. 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Used only if A is a general band matrix or if A is
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xGB, specifies the number of superdiagonals of A,
+*> and 0 <= KU <= N-1.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xTR, xTP, or xTB, specifies whether or not the
+*> matrix has unit diagonal:
+*> = 1: matrix has non-unit diagonal (default)
+*> = 2: matrix has unit diagonal
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors in the system A*X = B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The test matrix whose type is given by PATH.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If PATH = xGB, LDA >= KL+KU+1.
+*> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
+*> Otherwise, LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is or output) REAL array, dimension(LDX,NRHS)
+*> On entry, if XTYPE = 'C' (for 'Computed'), then X contains
+*> the exact solution to the system of linear equations.
+*> On exit, if XTYPE = 'N' (for 'New'), then X is initialized
+*> with random values.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vector(s) for the system of equations,
+*> computed from B = op(A) * X, where op(A) is determined by
+*> TRANS.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. If TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> SLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
$ A, LDA, X, LDX, B, LDB, ISEED, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS, UPLO, XTYPE
@@ -15,118 +223,6 @@
REAL A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SLARHS chooses a set of NRHS random solution vectors and sets
-* up the right hand sides for the linear system
-* op( A ) * X = B,
-* where op( A ) may be A or A' (transpose of A).
-*
-* Arguments
-* =========
-*
-* PATH (input) CHARACTER*3
-* The type of the real matrix A. PATH may be given in any
-* combination of upper and lower case. Valid types include
-* xGE: General m x n matrix
-* xGB: General banded matrix
-* xPO: Symmetric positive definite, 2-D storage
-* xPP: Symmetric positive definite packed
-* xPB: Symmetric positive definite banded
-* xSY: Symmetric indefinite, 2-D storage
-* xSP: Symmetric indefinite packed
-* xSB: Symmetric indefinite banded
-* xTR: Triangular
-* xTP: Triangular packed
-* xTB: Triangular banded
-* xQR: General m x n matrix
-* xLQ: General m x n matrix
-* xQL: General m x n matrix
-* xRQ: General m x n matrix
-* where the leading character indicates the precision.
-*
-* XTYPE (input) CHARACTER*1
-* Specifies how the exact solution X will be determined:
-* = 'N': New solution; generate a random X.
-* = 'C': Computed; use value of X on entry.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* matrix A is stored, if A is symmetric.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to the matrix A.
-* = 'N': System is A * x = b
-* = 'T': System is A'* x = b
-* = 'C': System is A'* x = b
-*
-* M (input) INTEGER
-* The number or rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* Used only if A is a band matrix; specifies the number of
-* subdiagonals of A if A is a general band matrix or if A is
-* symmetric or triangular and UPLO = 'L'; specifies the number
-* of superdiagonals of A if A is symmetric or triangular and
-* UPLO = 'U'. 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* Used only if A is a general band matrix or if A is
-* triangular.
-*
-* If PATH = xGB, specifies the number of superdiagonals of A,
-* and 0 <= KU <= N-1.
-*
-* If PATH = xTR, xTP, or xTB, specifies whether or not the
-* matrix has unit diagonal:
-* = 1: matrix has non-unit diagonal (default)
-* = 2: matrix has unit diagonal
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors in the system A*X = B.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The test matrix whose type is given by PATH.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If PATH = xGB, LDA >= KL+KU+1.
-* If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
-* Otherwise, LDA >= max(1,M).
-*
-* X (input or output) REAL array, dimension(LDX,NRHS)
-* On entry, if XTYPE = 'C' (for 'Computed'), then X contains
-* the exact solution to the system of linear equations.
-* On exit, if XTYPE = 'N' (for 'New'), then X is initialized
-* with random values.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
-*
-* B (output) REAL array, dimension (LDB,NRHS)
-* The right hand side vector(s) for the system of equations,
-* computed from B = op(A) * X, where op(A) is determined by
-* TRANS.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. If TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* SLATMS). Modified on exit.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/slatb4.f b/TESTING/LIN/slatb4.f
index 55d6ebd9..837410f1 100644
--- a/TESTING/LIN/slatb4.f
+++ b/TESTING/LIN/slatb4.f
@@ -1,65 +1,138 @@
- SUBROUTINE SLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
- $ CNDNUM, DIST )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIST, TYPE
- CHARACTER*3 PATH
- INTEGER IMAT, KL, KU, M, MODE, N
- REAL ANORM, CNDNUM
-* ..
-*
+*> \brief \b SLATB4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
+* CNDNUM, DIST )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, TYPE
+* CHARACTER*3 PATH
+* INTEGER IMAT, KL, KU, M, MODE, N
+* REAL ANORM, CNDNUM
+* ..
+*
* Purpose
* =======
*
-* SLATB4 sets parameters for the matrix generator based on the type of
-* matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATB4 sets parameters for the matrix generator based on the type of
+*> matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* M (input) INTEGER
-* The number of rows in the matrix to be generated.
-*
-* N (input) INTEGER
-* The number of columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix
-* = 'P': symmetric positive (semi)definite matrix
-* = 'N': nonsymmetric matrix
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix
+*> = 'P': symmetric positive (semi)definite matrix
+*> = 'N': nonsymmetric matrix
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is REAL
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) REAL
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup single_lin
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE SLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
+ $ CNDNUM, DIST )
*
-* CNDNUM (output) REAL
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ CHARACTER DIST, TYPE
+ CHARACTER*3 PATH
+ INTEGER IMAT, KL, KU, M, MODE, N
+ REAL ANORM, CNDNUM
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/slatb5.f b/TESTING/LIN/slatb5.f
index c819cdda..1ac8b019 100644
--- a/TESTING/LIN/slatb5.f
+++ b/TESTING/LIN/slatb5.f
@@ -1,62 +1,132 @@
- SUBROUTINE SLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
- $ CNDNUM, DIST )
-*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
-*
-* .. Scalar Arguments ..
- REAL ANORM, CNDNUM
- INTEGER IMAT, KL, KU, MODE, N
- CHARACTER DIST, TYPE
- CHARACTER*3 PATH
-* ..
-*
+*> \brief \b SLATB5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
+* CNDNUM, DIST )
+*
+* .. Scalar Arguments ..
+* REAL ANORM, CNDNUM
+* INTEGER IMAT, KL, KU, MODE, N
+* CHARACTER DIST, TYPE
+* CHARACTER*3 PATH
+* ..
+*
* Purpose
* =======
*
-* SLATB5 sets parameters for the matrix generator based on the type
-* of matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATB5 sets parameters for the matrix generator based on the type
+*> of matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* N (input) INTEGER
-* The number of rows and columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix
-* = 'P': symmetric positive (semi)definite matrix
-* = 'N': nonsymmetric matrix
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix
+*> = 'P': symmetric positive (semi)definite matrix
+*> = 'N': nonsymmetric matrix
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is REAL
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) REAL
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup single_lin
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE SLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
+ $ CNDNUM, DIST )
*
-* CNDNUM (output) REAL
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ REAL ANORM, CNDNUM
+ INTEGER IMAT, KL, KU, MODE, N
+ CHARACTER DIST, TYPE
+ CHARACTER*3 PATH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/slattb.f b/TESTING/LIN/slattb.f
index a580a7e4..18f2feb5 100644
--- a/TESTING/LIN/slattb.f
+++ b/TESTING/LIN/slattb.f
@@ -1,77 +1,155 @@
- SUBROUTINE SLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
- $ LDAB, B, WORK, INFO )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER IMAT, INFO, KD, LDAB, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL AB( LDAB, * ), B( * ), WORK( * )
-* ..
-*
+*> \brief \b SLATTB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
+* LDAB, B, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL AB( LDAB, * ), B( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLATTB generates a triangular test matrix in 2-dimensional storage.
-* IMAT and UPLO uniquely specify the properties of the test matrix,
-* which is returned in the array A.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATTB generates a triangular test matrix in 2-dimensional storage.
+*> IMAT and UPLO uniquely specify the properties of the test matrix,
+*> which is returned in the array A.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= transpose)
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* SLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= transpose)
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> SLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the banded
+*> triangular matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular banded matrix A, stored in the
+*> first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
+*> If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
+*> If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the banded
-* triangular matrix A. KD >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AB (output) REAL array, dimension (LDAB,N)
-* The upper or lower triangular banded matrix A, stored in the
-* first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
-* If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
-* If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \date November 2011
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+*> \ingroup single_lin
*
-* B (workspace) REAL array, dimension (N)
+* =====================================================================
+ SUBROUTINE SLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
+ $ LDAB, B, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (2*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER IMAT, INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL AB( LDAB, * ), B( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/slattp.f b/TESTING/LIN/slattp.f
index 4678e333..a60a548b 100644
--- a/TESTING/LIN/slattp.f
+++ b/TESTING/LIN/slattp.f
@@ -1,9 +1,136 @@
+*> \brief \b SLATTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATTP( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, B, WORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATTP generates a triangular test matrix in packed storage.
+*> IMAT and UPLO uniquely specify the properties of the test
+*> matrix, which is returned in the array AP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= Transpose)
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> SLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (N)
+*> The right hand side vector, if IMAT > 10.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SLATTP( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, B, WORK,
$ INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,61 +141,6 @@
REAL A( * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATTP generates a triangular test matrix in packed storage.
-* IMAT and UPLO uniquely specify the properties of the test
-* matrix, which is returned in the array AP.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= Transpose)
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* SLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* A (output) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* B (output) REAL array, dimension (N)
-* The right hand side vector, if IMAT > 10.
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/slattr.f b/TESTING/LIN/slattr.f
index 019558af..682871d7 100644
--- a/TESTING/LIN/slattr.f
+++ b/TESTING/LIN/slattr.f
@@ -1,9 +1,144 @@
+*> \brief \b SLATTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATTR( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, LDA, B,
+* WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATTR generates a triangular test matrix.
+*> IMAT and UPLO uniquely specify the properties of the test
+*> matrix, which is returned in the array A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= Transpose)
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> SLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> set so that A(k,k) = k for 1 <= k <= n.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (N)
+*> The right hand side vector, if IMAT > 10.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (3*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SLATTR( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, LDA, B,
$ WORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,66 +149,6 @@
REAL A( LDA, * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATTR generates a triangular test matrix.
-* IMAT and UPLO uniquely specify the properties of the test
-* matrix, which is returned in the array A.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= Transpose)
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* SLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* A (output) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* set so that A(k,k) = k for 1 <= k <= n.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (output) REAL array, dimension (N)
-* The right hand side vector, if IMAT > 10.
-*
-* WORK (workspace) REAL array, dimension (3*N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/slavsp.f b/TESTING/LIN/slavsp.f
index 865481b0..791d44f0 100644
--- a/TESTING/LIN/slavsp.f
+++ b/TESTING/LIN/slavsp.f
@@ -1,9 +1,141 @@
+*> \brief \b SLAVSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAVSP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAVSP performs one of the matrix-vector operations
+*> x := A*x or x := A'*x,
+*> where x is an N element vector and A is one of the factors
+*> from the block U*D*U' or L*D*L' factorization computed by SSPTRF.
+*>
+*> If TRANS = 'N', multiplies by U or U * D (or L or L * D)
+*> If TRANS = 'T', multiplies by U' or D * U' (or L' or D * L' )
+*> If TRANS = 'C', multiplies by U' or D * U' (or L' or D * L' )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the factor stored in A is upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation to be performed:
+*> = 'N': x := A*x
+*> = 'T': x := A'*x
+*> = 'C': x := A'*x
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the diagonal blocks are unit
+*> matrices. If the diagonal blocks are assumed to be unit,
+*> then A = U or A = L, otherwise A = U*D or A = L*D.
+*> = 'U': Diagonal blocks are assumed to be unit matrices.
+*> = 'N': Diagonal blocks are assumed to be non-unit matrices.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of vectors
+*> x to be multiplied by A. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N*(N+1)/2)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L, stored as a packed triangular
+*> matrix as computed by SSPTRF.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SSPTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SLAVSP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,66 +146,6 @@
REAL A( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* SLAVSP performs one of the matrix-vector operations
-* x := A*x or x := A'*x,
-* where x is an N element vector and A is one of the factors
-* from the block U*D*U' or L*D*L' factorization computed by SSPTRF.
-*
-* If TRANS = 'N', multiplies by U or U * D (or L or L * D)
-* If TRANS = 'T', multiplies by U' or D * U' (or L' or D * L' )
-* If TRANS = 'C', multiplies by U' or D * U' (or L' or D * L' )
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the factor stored in A is upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation to be performed:
-* = 'N': x := A*x
-* = 'T': x := A'*x
-* = 'C': x := A'*x
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the diagonal blocks are unit
-* matrices. If the diagonal blocks are assumed to be unit,
-* then A = U or A = L, otherwise A = U*D or A = L*D.
-* = 'U': Diagonal blocks are assumed to be unit matrices.
-* = 'N': Diagonal blocks are assumed to be non-unit matrices.
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of vectors
-* x to be multiplied by A. NRHS >= 0.
-*
-* A (input) REAL array, dimension (N*(N+1)/2)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L, stored as a packed triangular
-* matrix as computed by SSPTRF.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SSPTRF.
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/slavsy.f b/TESTING/LIN/slavsy.f
index b46f78b1..e0d37827 100644
--- a/TESTING/LIN/slavsy.f
+++ b/TESTING/LIN/slavsy.f
@@ -1,80 +1,155 @@
- SUBROUTINE SLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
- $ LDB, INFO )
-*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER INFO, LDA, LDB, N, NRHS
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( LDA, * ), B( LDB, * )
-* ..
-*
+*> \brief \b SLAVSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), B( LDB, * )
+* ..
+*
* Purpose
* =======
*
-* SLAVSY performs one of the matrix-vector operations
-* x := A*x or x := A'*x,
-* where x is an N element vector and A is one of the factors
-* from the block U*D*U' or L*D*L' factorization computed by SSYTRF.
-*
-* If TRANS = 'N', multiplies by U or U * D (or L or L * D)
-* If TRANS = 'T', multiplies by U' or D * U' (or L' or D * L')
-* If TRANS = 'C', multiplies by U' or D * U' (or L' or D * L')
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAVSY performs one of the matrix-vector operations
+*> x := A*x or x := A'*x,
+*> where x is an N element vector and A is one of the factors
+*> from the block U*D*U' or L*D*L' factorization computed by SSYTRF.
+*>
+*> If TRANS = 'N', multiplies by U or U * D (or L or L * D)
+*> If TRANS = 'T', multiplies by U' or D * U' (or L' or D * L')
+*> If TRANS = 'C', multiplies by U' or D * U' (or L' or D * L')
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the factor stored in A is upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation to be performed:
-* = 'N': x := A*x
-* = 'T': x := A'*x
-* = 'C': x := A'*x
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the diagonal blocks are unit
-* matrices. If the diagonal blocks are assumed to be unit,
-* then A = U or A = L, otherwise A = U*D or A = L*D.
-* = 'U': Diagonal blocks are assumed to be unit matrices.
-* = 'N': Diagonal blocks are assumed to be non-unit matrices.
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of vectors
-* x to be multiplied by A. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the factor stored in A is upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation to be performed:
+*> = 'N': x := A*x
+*> = 'T': x := A'*x
+*> = 'C': x := A'*x
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the diagonal blocks are unit
+*> matrices. If the diagonal blocks are assumed to be unit,
+*> then A = U or A = L, otherwise A = U*D or A = L*D.
+*> = 'U': Diagonal blocks are assumed to be unit matrices.
+*> = 'N': Diagonal blocks are assumed to be non-unit matrices.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of vectors
+*> x to be multiplied by A. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The block diagonal matrix D and the multipliers used to
+*> obtain the factor U or L as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SSYTRF.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The block diagonal matrix D and the multipliers used to
-* obtain the factor U or L as computed by SSYTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \date November 2011
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SSYTRF.
+*> \ingroup single_lin
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
+* =====================================================================
+ SUBROUTINE SLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
+ $ LDB, INFO )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( LDA, * ), B( LDB, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/slqt01.f b/TESTING/LIN/slqt01.f
index 3710ae49..9d8c91f6 100644
--- a/TESTING/LIN/slqt01.f
+++ b/TESTING/LIN/slqt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE SLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SLQT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SLQT01 tests SGELQF, which computes the LQ factorization of an m-by-n
-* matrix A, and partially tests SORGLQ which forms the n-by-n
-* orthogonal matrix Q.
-*
-* SLQT01 compares L with A*Q', and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLQT01 tests SGELQF, which computes the LQ factorization of an m-by-n
+*> matrix A, and partially tests SORGLQ which forms the n-by-n
+*> orthogonal matrix Q.
+*>
+*> SLQT01 compares L with A*Q', and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) REAL array, dimension (LDA,N)
-* Details of the LQ factorization of A, as returned by SGELQF.
-* See SGELQF for further details.
-*
-* Q (output) REAL array, dimension (LDA,N)
-* The n-by-n orthogonal matrix Q.
-*
-* L (workspace) REAL array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the LQ factorization of A, as returned by SGELQF.
+*> See SGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> The n-by-n orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is REAL array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGELQF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (max(M,N))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/slqt02.f b/TESTING/LIN/slqt02.f
index aac1c6fb..427675f8 100644
--- a/TESTING/LIN/slqt02.f
+++ b/TESTING/LIN/slqt02.f
@@ -1,74 +1,155 @@
- SUBROUTINE SLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SLQT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SLQT02 tests SORGLQ, which generates an m-by-n matrix Q with
-* orthonornmal rows that is defined as the product of k elementary
-* reflectors.
-*
-* Given the LQ factorization of an m-by-n matrix A, SLQT02 generates
-* the orthogonal matrix Q defined by the factorization of the first k
-* rows of A; it compares L(1:k,1:m) with A(1:k,1:n)*Q(1:m,1:n)', and
-* checks that the rows of Q are orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLQT02 tests SORGLQ, which generates an m-by-n matrix Q with
+*> orthonornmal rows that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the LQ factorization of an m-by-n matrix A, SLQT02 generates
+*> the orthogonal matrix Q defined by the factorization of the first k
+*> rows of A; it compares L(1:k,1:m) with A(1:k,1:n)*Q(1:m,1:n)', and
+*> checks that the rows of Q are orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* N >= M >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by SLQT01.
-*
-* AF (input) REAL array, dimension (LDA,N)
-* Details of the LQ factorization of A, as returned by SGELQF.
-* See SGELQF for further details.
-*
-* Q (workspace) REAL array, dimension (LDA,N)
-*
-* L (workspace) REAL array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by SLQT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the LQ factorization of A, as returned by SGELQF.
+*> See SGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is REAL array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the LQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (M)
-* The scalar factors of the elementary reflectors corresponding
-* to the LQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/slqt03.f b/TESTING/LIN/slqt03.f
index 4f53a142..d0da6fd8 100644
--- a/TESTING/LIN/slqt03.f
+++ b/TESTING/LIN/slqt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE SLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SLQT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SLQT03 tests SORMLQ, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* SLQT03 compares the results of a call to SORMLQ with the results of
-* forming Q explicitly by a call to SORGLQ and then performing matrix
-* multiplication by a call to SGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLQT03 tests SORMLQ, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> SLQT03 compares the results of a call to SORMLQ with the results of
+*> forming Q explicitly by a call to SORGLQ and then performing matrix
+*> multiplication by a call to SGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows or columns of the matrix C; C is n-by-m if
-* Q is applied from the left, or m-by-n if Q is applied from
-* the right. M >= 0.
-*
-* N (input) INTEGER
-* The order of the orthogonal matrix Q. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. N >= K >= 0.
-*
-* AF (input) REAL array, dimension (LDA,N)
-* Details of the LQ factorization of an m-by-n matrix, as
-* returned by SGELQF. See SGELQF for further details.
-*
-* C (workspace) REAL array, dimension (LDA,N)
-*
-* CC (workspace) REAL array, dimension (LDA,N)
-*
-* Q (workspace) REAL array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows or columns of the matrix C; C is n-by-m if
+*> Q is applied from the left, or m-by-n if Q is applied from
+*> the right. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the orthogonal matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the LQ factorization of an m-by-n matrix, as
+*> returned by SGELQF. See SGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the LQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an n-by-n orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the LQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE SLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an n-by-n orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/spbt01.f b/TESTING/LIN/spbt01.f
index d3eeafed..96a8c445 100644
--- a/TESTING/LIN/spbt01.f
+++ b/TESTING/LIN/spbt01.f
@@ -1,70 +1,139 @@
- SUBROUTINE SPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER KD, LDA, LDAFAC, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
-* ..
-*
+*> \brief \b SPBT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDA, LDAFAC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* SPBT01 reconstructs a symmetric positive definite band matrix A from
-* its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of
-* L, and U' is the conjugate transpose of U.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBT01 reconstructs a symmetric positive definite band matrix A from
+*> its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of
+*> L, and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original symmetric band matrix A. If UPLO = 'U', the
+*> upper triangular part of A is stored as a band matrix; if
+*> UPLO = 'L', the lower triangular part of A is stored. The
+*> columns of the appropriate triangle are stored in the columns
+*> of A and the diagonals of the triangle are stored in the rows
+*> of A. See SPBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the factor
+*> L or U from the L*L' or U'*U factorization in band storage
+*> format, as computed by SPBTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC.
+*> LDAFAC >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The original symmetric band matrix A. If UPLO = 'U', the
-* upper triangular part of A is stored as a band matrix; if
-* UPLO = 'L', the lower triangular part of A is stored. The
-* columns of the appropriate triangle are stored in the columns
-* of A and the diagonals of the triangle are stored in the rows
-* of A. See SPBTRF for further details.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \date November 2011
*
-* AFAC (input) REAL array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the factor
-* L or U from the L*L' or U'*U factorization in band storage
-* format, as computed by SPBTRF.
+*> \ingroup single_lin
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC.
-* LDAFAC >= max(1,KD+1).
+* =====================================================================
+ SUBROUTINE SPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
+ $ RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER KD, LDA, LDAFAC, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/spbt02.f b/TESTING/LIN/spbt02.f
index 4ad6948f..45c7cbd8 100644
--- a/TESTING/LIN/spbt02.f
+++ b/TESTING/LIN/spbt02.f
@@ -1,9 +1,141 @@
+*> \brief \b SPBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBT02( UPLO, N, KD, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDA, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBT02 computes the residual for a solution of a symmetric banded
+*> system of equations A*x = b:
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS)
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original symmetric band matrix A. If UPLO = 'U', the
+*> upper triangular part of A is stored as a band matrix; if
+*> UPLO = 'L', the lower triangular part of A is stored. The
+*> columns of the appropriate triangle are stored in the columns
+*> of A and the diagonals of the triangle are stored in the rows
+*> of A. See SPBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SPBT02( UPLO, N, KD, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,62 +147,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPBT02 computes the residual for a solution of a symmetric banded
-* system of equations A*x = b:
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS)
-* where EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original symmetric band matrix A. If UPLO = 'U', the
-* upper triangular part of A is stored as a band matrix; if
-* UPLO = 'L', the lower triangular part of A is stored. The
-* columns of the appropriate triangle are stored in the columns
-* of A and the diagonals of the triangle are stored in the rows
-* of A. See SPBTRF for further details.
-*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KD+1).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/spbt05.f b/TESTING/LIN/spbt05.f
index 8ba76153..8a0124c0 100644
--- a/TESTING/LIN/spbt05.f
+++ b/TESTING/LIN/spbt05.f
@@ -1,9 +1,182 @@
+*> \brief \b SPBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPBT05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> symmetric band matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangle of the symmetric band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SPBT05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,91 +188,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* SPBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* symmetric band matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangle of the symmetric band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/spot01.f b/TESTING/LIN/spot01.f
index 472c54c7..5a0e5226 100644
--- a/TESTING/LIN/spot01.f
+++ b/TESTING/LIN/spot01.f
@@ -1,59 +1,124 @@
- SUBROUTINE SPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
+*> \brief \b SPOT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDAFAC, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* SPOT01 reconstructs a symmetric positive definite matrix A from
-* its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOT01 reconstructs a symmetric positive definite matrix A from
+*> its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (LDAFAC,N)
+*> On entry, the factor L or U from the L*L' or U'*U
+*> factorization of A.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*L' - A (or U'*U - A).
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The original symmetric matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
+*> \date November 2011
*
-* AFAC (input/output) REAL array, dimension (LDAFAC,N)
-* On entry, the factor L or U from the L*L' or U'*U
-* factorization of A.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*L' - A (or U'*U - A).
+*> \ingroup single_lin
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+* =====================================================================
+ SUBROUTINE SPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDAFAC, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AFAC( LDAFAC, * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/spot02.f b/TESTING/LIN/spot02.f
index e5c6865e..e7694f56 100644
--- a/TESTING/LIN/spot02.f
+++ b/TESTING/LIN/spot02.f
@@ -1,9 +1,138 @@
+*> \brief \b SPOT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOT02 computes the residual for the solution of a symmetric system
+*> of linear equations A*x = b:
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*>
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SPOT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,59 +144,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOT02 computes the residual for the solution of a symmetric system
-* of linear equations A*x = b:
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-*
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/spot03.f b/TESTING/LIN/spot03.f
index 018693eb..b0cd0f81 100644
--- a/TESTING/LIN/spot03.f
+++ b/TESTING/LIN/spot03.f
@@ -1,70 +1,146 @@
- SUBROUTINE SPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
- $ RWORK, RCOND, RESID )
+*> \brief \b SPOT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDAINV, LDWORK, N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
- $ WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
+* RWORK, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAINV, LDWORK, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* SPOT03 computes the residual for a symmetric matrix times its
-* inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOT03 computes the residual for a symmetric matrix times its
+*> inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AINV (input/output) REAL array, dimension (LDAINV,N)
-* On entry, the inverse of the matrix A, stored as a symmetric
-* matrix in the same format as A.
-* In this version, AINV is expanded into a full matrix and
-* multiplied by A, so the opposing triangle of AINV will be
-* changed; i.e., if the upper triangular part of AINV is
-* stored, the lower triangular part will be used as work space.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (LDAINV,N)
+*> On entry, the inverse of the matrix A, stored as a symmetric
+*> matrix in the same format as A.
+*> In this version, AINV is expanded into a full matrix and
+*> multiplied by A, so the opposing triangle of AINV will be
+*> changed; i.e., if the upper triangular part of AINV is
+*> stored, the lower triangular part will be used as work space.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) REAL array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup single_lin
*
-* RWORK (workspace) REAL array, dimension (N)
+* =====================================================================
+ SUBROUTINE SPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
+ $ RWORK, RCOND, RESID )
*
-* RCOND (output) REAL
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDAINV, LDWORK, N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AINV( LDAINV, * ), RWORK( * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/spot05.f b/TESTING/LIN/spot05.f
index 6f61b118..04f7aa8b 100644
--- a/TESTING/LIN/spot05.f
+++ b/TESTING/LIN/spot05.f
@@ -1,9 +1,175 @@
+*> \brief \b SPOT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPOT05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPOT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> symmetric n by n matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The symmetric matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SPOT05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,88 +180,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* SPOT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* symmetric n by n matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The symmetric matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sppt01.f b/TESTING/LIN/sppt01.f
index ab16b3c9..ada465c9 100644
--- a/TESTING/LIN/sppt01.f
+++ b/TESTING/LIN/sppt01.f
@@ -1,54 +1,113 @@
- SUBROUTINE SPPT01( UPLO, N, A, AFAC, RWORK, RESID )
+*> \brief \b SPPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL A( * ), AFAC( * ), RWORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPT01( UPLO, N, A, AFAC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( * ), AFAC( * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* SPPT01 reconstructs a symmetric positive definite packed matrix A
-* from its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPT01 reconstructs a symmetric positive definite packed matrix A
+*> from its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (N*(N+1)/2)
+*> On entry, the factor L or U from the L*L' or U'*U
+*> factorization of A, stored as a packed triangular matrix.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*L' - A (or U'*U - A).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+*> \date November 2011
*
-* A (input) REAL array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+*> \ingroup single_lin
*
-* AFAC (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the factor L or U from the L*L' or U'*U
-* factorization of A, stored as a packed triangular matrix.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*L' - A (or U'*U - A).
+* =====================================================================
+ SUBROUTINE SPPT01( UPLO, N, A, AFAC, RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL A( * ), AFAC( * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sppt02.f b/TESTING/LIN/sppt02.f
index 26ca8ac2..323b056b 100644
--- a/TESTING/LIN/sppt02.f
+++ b/TESTING/LIN/sppt02.f
@@ -1,70 +1,142 @@
- SUBROUTINE SPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDB, LDX, N, NRHS
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL A( * ), B( LDB, * ), RWORK( * ), X( LDX, * )
-* ..
-*
+*> \brief \b SPPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( * ), B( LDB, * ), RWORK( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* SPPT02 computes the residual in the solution of a symmetric system
-* of linear equations A*x = b when packed storage is used for the
-* coefficient matrix. The ratio computed is
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS),
-*
-* where EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPT02 computes the residual in the solution of a symmetric system
+*> of linear equations A*x = b when packed storage is used for the
+*> coefficient matrix. The ratio computed is
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS),
+*>
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) REAL array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
+*> \ingroup single_lin
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE SPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
+ $ RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDB, LDX, N, NRHS
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL A( * ), B( LDB, * ), RWORK( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sppt03.f b/TESTING/LIN/sppt03.f
index 124161b5..d2fe15d3 100644
--- a/TESTING/LIN/sppt03.f
+++ b/TESTING/LIN/sppt03.f
@@ -1,61 +1,131 @@
- SUBROUTINE SPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
- $ RESID )
+*> \brief \b SPPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDWORK, N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL A( * ), AINV( * ), RWORK( * ),
- $ WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDWORK, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL A( * ), AINV( * ), RWORK( * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* SPPT03 computes the residual for a symmetric packed matrix times its
-* inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPT03 computes the residual for a symmetric packed matrix times its
+*> inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (N*(N+1)/2)
+*> The (symmetric) inverse of the matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AINV (input) REAL array, dimension (N*(N+1)/2)
-* The (symmetric) inverse of the matrix A, stored as a packed
-* triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) REAL array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup single_lin
*
-* RWORK (workspace) REAL array, dimension (N)
+* =====================================================================
+ SUBROUTINE SPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
+ $ RESID )
*
-* RCOND (output) REAL
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDWORK, N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL A( * ), AINV( * ), RWORK( * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sppt05.f b/TESTING/LIN/sppt05.f
index beeb7a10..d7f9cb8b 100644
--- a/TESTING/LIN/sppt05.f
+++ b/TESTING/LIN/sppt05.f
@@ -1,9 +1,167 @@
+*> \brief \b SPPT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPPT05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPPT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> symmetric matrix in packed storage format.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the symmetric matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SPPT05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,83 +172,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* SPPT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* symmetric matrix in packed storage format.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the symmetric matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/spst01.f b/TESTING/LIN/spst01.f
index ebb7fb3d..29fabd49 100644
--- a/TESTING/LIN/spst01.f
+++ b/TESTING/LIN/spst01.f
@@ -1,9 +1,139 @@
+*> \brief \b SPST01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPST01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
+* PIV, RWORK, RESID, RANK )
+*
+* .. Scalar Arguments ..
+* REAL RESID
+* INTEGER LDA, LDAFAC, LDPERM, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AFAC( LDAFAC, * ),
+* $ PERM( LDPERM, * ), RWORK( * )
+* INTEGER PIV( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPST01 reconstructs a symmetric positive semidefinite matrix A
+*> from its L or U factors and the permutation matrix P and computes
+*> the residual
+*> norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
+*> norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (LDAFAC,N)
+*> The factor L or U from the L*L' or U'*U
+*> factorization of A.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is REAL array, dimension (LDPERM,N)
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference P*L*L'*P' - A (or P*U'*U*P' - A)
+*> \endverbatim
+*>
+*> \param[in] LDPERM
+*> \verbatim
+*> LDPERM is INTEGER
+*> The leading dimension of the array PERM.
+*> LDAPERM >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are
+*> P( PIV( K ), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SPST01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
$ PIV, RWORK, RESID, RANK )
*
* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL RESID
@@ -16,59 +146,6 @@
INTEGER PIV( * )
* ..
*
-* Purpose
-* =======
-*
-* SPST01 reconstructs a symmetric positive semidefinite matrix A
-* from its L or U factors and the permutation matrix P and computes
-* the residual
-* norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
-* norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) REAL array, dimension (LDAFAC,N)
-* The factor L or U from the L*L' or U'*U
-* factorization of A.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* PERM (output) REAL array, dimension (LDPERM,N)
-* Overwritten with the reconstructed matrix, and then with the
-* difference P*L*L'*P' - A (or P*U'*U*P' - A)
-*
-* LDPERM (input) INTEGER
-* The leading dimension of the array PERM.
-* LDAPERM >= max(1,N).
-*
-* PIV (input) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are
-* P( PIV( K ), K ) = 1.
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sptt01.f b/TESTING/LIN/sptt01.f
index 264cfbb8..928e23bd 100644
--- a/TESTING/LIN/sptt01.f
+++ b/TESTING/LIN/sptt01.f
@@ -1,49 +1,110 @@
- SUBROUTINE SPTT01( N, D, E, DF, EF, WORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL D( * ), DF( * ), E( * ), EF( * ), WORK( * )
-* ..
-*
+*> \brief \b SPTT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTT01( N, D, E, DF, EF, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL D( * ), DF( * ), E( * ), EF( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SPTT01 reconstructs a tridiagonal matrix A from its L*D*L'
-* factorization and computes the residual
-* norm(L*D*L' - A) / ( n * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTT01 reconstructs a tridiagonal matrix A from its L*D*L'
+*> factorization and computes the residual
+*> norm(L*D*L' - A) / ( n * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGTER
-* The order of the matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is REAL array, dimension (N)
+*> The n diagonal elements of the factor L from the L*D*L'
+*> factorization of A.
+*> \endverbatim
+*>
+*> \param[in] EF
+*> \verbatim
+*> EF is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the factor L from the
+*> L*D*L' factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(L*D*L' - A) / (n * norm(A) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \date November 2011
*
-* DF (input) REAL array, dimension (N)
-* The n diagonal elements of the factor L from the L*D*L'
-* factorization of A.
+*> \ingroup single_lin
*
-* EF (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the factor L from the
-* L*D*L' factorization of A.
+* =====================================================================
+ SUBROUTINE SPTT01( N, D, E, DF, EF, WORK, RESID )
*
-* WORK (workspace) REAL array, dimension (2*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(L*D*L' - A) / (n * norm(A) * EPS)
+* .. Scalar Arguments ..
+ INTEGER N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL D( * ), DF( * ), E( * ), EF( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sptt02.f b/TESTING/LIN/sptt02.f
index 6450688c..5381c76c 100644
--- a/TESTING/LIN/sptt02.f
+++ b/TESTING/LIN/sptt02.f
@@ -1,56 +1,123 @@
- SUBROUTINE SPTT02( N, NRHS, D, E, X, LDX, B, LDB, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDX, N, NRHS
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL B( LDB, * ), D( * ), E( * ), X( LDX, * )
-* ..
-*
+*> \brief \b SPTT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTT02( N, NRHS, D, E, X, LDX, B, LDB, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), D( * ), E( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* SPTT02 computes the residual for the solution to a symmetric
-* tridiagonal system of equations:
-* RESID = norm(B - A*X) / (norm(A) * norm(X) * EPS),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTT02 computes the residual for the solution to a symmetric
+*> tridiagonal system of equations:
+*> RESID = norm(B - A*X) / (norm(A) * norm(X) * EPS),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGTER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The n by nrhs matrix of solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the n by nrhs matrix of right hand side vectors B.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(B - A*X) / (norm(A) * norm(X) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The n by nrhs matrix of solution vectors X.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \ingroup single_lin
*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the n by nrhs matrix of right hand side vectors B.
-* On exit, B is overwritten with the difference B - A*X.
+* =====================================================================
+ SUBROUTINE SPTT02( N, NRHS, D, E, X, LDX, B, LDB, RESID )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(B - A*X) / (norm(A) * norm(X) * EPS)
+* .. Scalar Arguments ..
+ INTEGER LDB, LDX, N, NRHS
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL B( LDB, * ), D( * ), E( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sptt05.f b/TESTING/LIN/sptt05.f
index 7774b78f..26ecf66b 100644
--- a/TESTING/LIN/sptt05.f
+++ b/TESTING/LIN/sptt05.f
@@ -1,89 +1,170 @@
- SUBROUTINE SPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
- $ FERR, BERR, RESLTS )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDX, LDXACT, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL B( LDB, * ), BERR( * ), D( * ), E( * ),
- $ FERR( * ), RESLTS( * ), X( LDX, * ),
- $ XACT( LDXACT, * )
-* ..
-*
+*> \brief \b SPTT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
+* FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL B( LDB, * ), BERR( * ), D( * ), E( * ),
+* $ FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
* Purpose
* =======
*
-* SPTT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* symmetric tridiagonal matrix of order n.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SPTT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> symmetric tridiagonal matrix of order n.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* D (input) REAL array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) REAL array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
+*> \date November 2011
*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \ingroup single_lin
*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
+* =====================================================================
+ SUBROUTINE SPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
+ $ FERR, BERR, RESLTS )
*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
+* .. Scalar Arguments ..
+ INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL B( LDB, * ), BERR( * ), D( * ), E( * ),
+ $ FERR( * ), RESLTS( * ), X( LDX, * ),
+ $ XACT( LDXACT, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqlt01.f b/TESTING/LIN/sqlt01.f
index c105bef7..9056fc81 100644
--- a/TESTING/LIN/sqlt01.f
+++ b/TESTING/LIN/sqlt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE SQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SQLT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQLT01 tests SGEQLF, which computes the QL factorization of an m-by-n
-* matrix A, and partially tests SORGQL which forms the m-by-m
-* orthogonal matrix Q.
-*
-* SQLT01 compares L with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQLT01 tests SGEQLF, which computes the QL factorization of an m-by-n
+*> matrix A, and partially tests SORGQL which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> SQLT01 compares L with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) REAL array, dimension (LDA,N)
-* Details of the QL factorization of A, as returned by SGEQLF.
-* See SGEQLF for further details.
-*
-* Q (output) REAL array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* L (workspace) REAL array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the QL factorization of A, as returned by SGEQLF.
+*> See SGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is REAL array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGEQLF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqlt02.f b/TESTING/LIN/sqlt02.f
index e6080f11..139346a9 100644
--- a/TESTING/LIN/sqlt02.f
+++ b/TESTING/LIN/sqlt02.f
@@ -1,75 +1,156 @@
- SUBROUTINE SQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SQLT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQLT02 tests SORGQL, which generates an m-by-n matrix Q with
-* orthonornmal columns that is defined as the product of k elementary
-* reflectors.
-*
-* Given the QL factorization of an m-by-n matrix A, SQLT02 generates
-* the orthogonal matrix Q defined by the factorization of the last k
-* columns of A; it compares L(m-n+1:m,n-k+1:n) with
-* Q(1:m,m-n+1:m)'*A(1:m,n-k+1:n), and checks that the columns of Q are
-* orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQLT02 tests SORGQL, which generates an m-by-n matrix Q with
+*> orthonornmal columns that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the QL factorization of an m-by-n matrix A, SQLT02 generates
+*> the orthogonal matrix Q defined by the factorization of the last k
+*> columns of A; it compares L(m-n+1:m,n-k+1:n) with
+*> Q(1:m,m-n+1:m)'*A(1:m,n-k+1:n), and checks that the columns of Q are
+*> orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by SQLT01.
-*
-* AF (input) REAL array, dimension (LDA,N)
-* Details of the QL factorization of A, as returned by SGEQLF.
-* See SGEQLF for further details.
-*
-* Q (workspace) REAL array, dimension (LDA,N)
-*
-* L (workspace) REAL array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by SQLT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the QL factorization of A, as returned by SGEQLF.
+*> See SGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QL factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (N)
-* The scalar factors of the elementary reflectors corresponding
-* to the QL factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqlt03.f b/TESTING/LIN/sqlt03.f
index 964092a6..2881f1bb 100644
--- a/TESTING/LIN/sqlt03.f
+++ b/TESTING/LIN/sqlt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE SQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SQLT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQLT03 tests SORMQL, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* SQLT03 compares the results of a call to SORMQL with the results of
-* forming Q explicitly by a call to SORGQL and then performing matrix
-* multiplication by a call to SGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQLT03 tests SORMQL, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> SQLT03 compares the results of a call to SORMQL with the results of
+*> forming Q explicitly by a call to SORGQL and then performing matrix
+*> multiplication by a call to SGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The order of the orthogonal matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of rows or columns of the matrix C; C is m-by-n if
-* Q is applied from the left, or n-by-m if Q is applied from
-* the right. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. M >= K >= 0.
-*
-* AF (input) REAL array, dimension (LDA,N)
-* Details of the QL factorization of an m-by-n matrix, as
-* returned by SGEQLF. See SGEQLF for further details.
-*
-* C (workspace) REAL array, dimension (LDA,N)
-*
-* CC (workspace) REAL array, dimension (LDA,N)
-*
-* Q (workspace) REAL array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the orthogonal matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows or columns of the matrix C; C is m-by-n if
+*> Q is applied from the left, or n-by-m if Q is applied from
+*> the right. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the QL factorization of an m-by-n matrix, as
+*> returned by SGEQLF. See SGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QL factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an m-by-m orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the QL factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE SQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an m-by-m orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqpt01.f b/TESTING/LIN/sqpt01.f
index 5e5b3afa..11d57dac 100644
--- a/TESTING/LIN/sqpt01.f
+++ b/TESTING/LIN/sqpt01.f
@@ -1,68 +1,140 @@
- REAL FUNCTION SQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
- $ WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SQPT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
+* WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQPT01 tests the QR-factorization with pivoting of a matrix A. The
-* array AF contains the (possibly partial) QR-factorization of A, where
-* the upper triangle of AF(1:k,1:k) is a partial triangular factor,
-* the entries below the diagonal in the first k columns are the
-* Householder vectors, and the rest of AF contains a partially updated
-* matrix.
-*
-* This function returns ||A*P - Q*R||/(||norm(A)||*eps*M)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQPT01 tests the QR-factorization with pivoting of a matrix A. The
+*> array AF contains the (possibly partial) QR-factorization of A, where
+*> the upper triangle of AF(1:k,1:k) is a partial triangular factor,
+*> the entries below the diagonal in the first k columns are the
+*> Householder vectors, and the rest of AF contains a partially updated
+*> matrix.
+*>
+*> This function returns ||A*P - Q*R||/(||norm(A)||*eps*M)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
-*
-* K (input) INTEGER
-* The number of columns of AF that have been reduced
-* to upper triangular form.
-*
-* A (input) REAL array, dimension (LDA, N)
-* The original matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of columns of AF that have been reduced
+*> to upper triangular form.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The original matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> The (possibly partial) output of SGEQPF. The upper triangle
+*> of AF(1:k,1:k) is a partial triangular factor, the entries
+*> below the diagonal in the first k columns are the Householder
+*> vectors, and the rest of AF contains a partially updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> Details of the Householder transformations as returned by
+*> SGEQPF.
+*> \endverbatim
+*>
+*> \param[in] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> Pivot information as returned by SGEQPF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*N+N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AF (input) REAL array, dimension (LDA,N)
-* The (possibly partial) output of SGEQPF. The upper triangle
-* of AF(1:k,1:k) is a partial triangular factor, the entries
-* below the diagonal in the first k columns are the Householder
-* vectors, and the rest of AF contains a partially updated
-* matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \date November 2011
*
-* TAU (input) REAL array, dimension (K)
-* Details of the Householder transformations as returned by
-* SGEQPF.
+*> \ingroup single_lin
*
-* JPVT (input) INTEGER array, dimension (N)
-* Pivot information as returned by SGEQPF.
+* =====================================================================
+ REAL FUNCTION SQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
+ $ WORK, LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*N+N.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt01.f b/TESTING/LIN/sqrt01.f
index 69a4a8f3..5808ceb7 100644
--- a/TESTING/LIN/sqrt01.f
+++ b/TESTING/LIN/sqrt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE SQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SQRT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQRT01 tests SGEQRF, which computes the QR factorization of an m-by-n
-* matrix A, and partially tests SORGQR which forms the m-by-m
-* orthogonal matrix Q.
-*
-* SQRT01 compares R with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT01 tests SGEQRF, which computes the QR factorization of an m-by-n
+*> matrix A, and partially tests SORGQR which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> SQRT01 compares R with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) REAL array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by SGEQRF.
-* See SGEQRF for further details.
-*
-* Q (output) REAL array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* R (workspace) REAL array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by SGEQRF.
+*> See SGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGEQRF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt01p.f b/TESTING/LIN/sqrt01p.f
index a5c02049..81c08996 100644
--- a/TESTING/LIN/sqrt01p.f
+++ b/TESTING/LIN/sqrt01p.f
@@ -1,68 +1,146 @@
- SUBROUTINE SQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SQRT01P
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQRT01P tests SGEQRFP, which computes the QR factorization of an m-by-n
-* matrix A, and partially tests SORGQR which forms the m-by-m
-* orthogonal matrix Q.
-*
-* SQRT01P compares R with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT01P tests SGEQRFP, which computes the QR factorization of an m-by-n
+*> matrix A, and partially tests SORGQR which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> SQRT01P compares R with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) REAL array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by SGEQRFP.
-* See SGEQRFP for further details.
-*
-* Q (output) REAL array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* R (workspace) REAL array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by SGEQRFP.
+*> See SGEQRFP for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGEQRFP.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGEQRFP.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt02.f b/TESTING/LIN/sqrt02.f
index a08867ca..52e8e23a 100644
--- a/TESTING/LIN/sqrt02.f
+++ b/TESTING/LIN/sqrt02.f
@@ -1,74 +1,155 @@
- SUBROUTINE SQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SQRT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQRT02 tests SORGQR, which generates an m-by-n matrix Q with
-* orthonornmal columns that is defined as the product of k elementary
-* reflectors.
-*
-* Given the QR factorization of an m-by-n matrix A, SQRT02 generates
-* the orthogonal matrix Q defined by the factorization of the first k
-* columns of A; it compares R(1:n,1:k) with Q(1:m,1:n)'*A(1:m,1:k),
-* and checks that the columns of Q are orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT02 tests SORGQR, which generates an m-by-n matrix Q with
+*> orthonornmal columns that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the QR factorization of an m-by-n matrix A, SQRT02 generates
+*> the orthogonal matrix Q defined by the factorization of the first k
+*> columns of A; it compares R(1:n,1:k) with Q(1:m,1:n)'*A(1:m,1:k),
+*> and checks that the columns of Q are orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by SQRT01.
-*
-* AF (input) REAL array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by SGEQRF.
-* See SGEQRF for further details.
-*
-* Q (workspace) REAL array, dimension (LDA,N)
-*
-* R (workspace) REAL array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by SQRT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by SGEQRF.
+*> See SGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (N)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QR factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R. LDA >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (N)
-* The scalar factors of the elementary reflectors corresponding
-* to the QR factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt03.f b/TESTING/LIN/sqrt03.f
index f45d4792..a7ff1395 100644
--- a/TESTING/LIN/sqrt03.f
+++ b/TESTING/LIN/sqrt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE SQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SQRT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQRT03 tests SORMQR, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* SQRT03 compares the results of a call to SORMQR with the results of
-* forming Q explicitly by a call to SORGQR and then performing matrix
-* multiplication by a call to SGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT03 tests SORMQR, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> SQRT03 compares the results of a call to SORMQR with the results of
+*> forming Q explicitly by a call to SORGQR and then performing matrix
+*> multiplication by a call to SGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The order of the orthogonal matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of rows or columns of the matrix C; C is m-by-n if
-* Q is applied from the left, or n-by-m if Q is applied from
-* the right. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. M >= K >= 0.
-*
-* AF (input) REAL array, dimension (LDA,N)
-* Details of the QR factorization of an m-by-n matrix, as
-* returnedby SGEQRF. See SGEQRF for further details.
-*
-* C (workspace) REAL array, dimension (LDA,N)
-*
-* CC (workspace) REAL array, dimension (LDA,N)
-*
-* Q (workspace) REAL array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the orthogonal matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows or columns of the matrix C; C is m-by-n if
+*> Q is applied from the left, or n-by-m if Q is applied from
+*> the right. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the QR factorization of an m-by-n matrix, as
+*> returnedby SGEQRF. See SGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QR factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an m-by-m orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the QR factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE SQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an m-by-m orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt04.f b/TESTING/LIN/sqrt04.f
index 7db31249..12fefdb6 100644
--- a/TESTING/LIN/sqrt04.f
+++ b/TESTING/LIN/sqrt04.f
@@ -1,41 +1,90 @@
- SUBROUTINE SQRT04(M,N,NB,RESULT)
+*> \brief \b SQRT04
*
-* -- LAPACK test routine (version 3.?) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* August 2011
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER LWORK, M, N, NB, LDT
-* .. Return values ..
- REAL RESULT(6)
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SQRT04(M,N,NB,RESULT)
+*
+* .. Scalar Arguments ..
+* INTEGER LWORK, M, N, NB, LDT
+* .. Return values ..
+* REAL RESULT(6)
+*
* Purpose
* =======
*
-* SQRT04 tests SGEQRT and SGEMQRT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT04 tests SGEQRT and SGEMQRT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Number of rows in test matrix.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows in test matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns in test matrix.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size of test matrix. NB <= Min(M,N).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (6)
+*> Results of each of the six tests below.
+*> \endverbatim
+*> \verbatim
+*> RESULT(1) = | A - Q R |
+*> RESULT(2) = | I - Q^H Q |
+*> RESULT(3) = | Q C - Q C |
+*> RESULT(4) = | Q^H C - Q^H C |
+*> RESULT(5) = | C Q - C Q |
+*> RESULT(6) = | C Q^H - C Q^H |
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Number of columns in test matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NB (input) INTEGER
-* Block size of test matrix. NB <= Min(M,N).
+*> \date November 2011
*
-* RESULT (output) REAL array, dimension (6)
-* Results of each of the six tests below.
+*> \ingroup single_lin
*
-* RESULT(1) = | A - Q R |
-* RESULT(2) = | I - Q^H Q |
-* RESULT(3) = | Q C - Q C |
-* RESULT(4) = | Q^H C - Q^H C |
-* RESULT(5) = | C Q - C Q |
-* RESULT(6) = | C Q^H - C Q^H |
+* =====================================================================
+ SUBROUTINE SQRT04(M,N,NB,RESULT)
+*
+* -- LAPACK test routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LWORK, M, N, NB, LDT
+* .. Return values ..
+ REAL RESULT(6)
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt05.f b/TESTING/LIN/sqrt05.f
index cbc458b5..8d1de5c2 100644
--- a/TESTING/LIN/sqrt05.f
+++ b/TESTING/LIN/sqrt05.f
@@ -1,45 +1,97 @@
- SUBROUTINE SQRT05(M,N,L,NB,RESULT)
+*> \brief \b SQRT05
*
-* -- LAPACK test routine (version 3.?) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* August 2011
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER LWORK, M, N, L, NB, LDT
-* .. Return values ..
- REAL RESULT(6)
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE SQRT05(M,N,L,NB,RESULT)
+*
+* .. Scalar Arguments ..
+* INTEGER LWORK, M, N, L, NB, LDT
+* .. Return values ..
+* REAL RESULT(6)
+*
* Purpose
* =======
*
-* SQRT05 tests STPQRT and STPMQRT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT05 tests STPQRT and STPMQRT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Number of rows in lower part of the test matrix.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows in lower part of the test matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns in test matrix.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of rows of the upper trapezoidal part the
+*> lower test matrix. 0 <= L <= M.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size of test matrix. NB <= N.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (6)
+*> Results of each of the six tests below.
+*> \endverbatim
+*> \verbatim
+*> RESULT(1) = | A - Q R |
+*> RESULT(2) = | I - Q^H Q |
+*> RESULT(3) = | Q C - Q C |
+*> RESULT(4) = | Q^H C - Q^H C |
+*> RESULT(5) = | C Q - C Q |
+*> RESULT(6) = | C Q^H - C Q^H |
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Number of columns in test matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part the
-* lower test matrix. 0 <= L <= M.
-*
-* NB (input) INTEGER
-* Block size of test matrix. NB <= N.
+*> \date November 2011
*
-* RESULT (output) REAL array, dimension (6)
-* Results of each of the six tests below.
+*> \ingroup single_lin
*
-* RESULT(1) = | A - Q R |
-* RESULT(2) = | I - Q^H Q |
-* RESULT(3) = | Q C - Q C |
-* RESULT(4) = | Q^H C - Q^H C |
-* RESULT(5) = | C Q - C Q |
-* RESULT(6) = | C Q^H - C Q^H |
+* =====================================================================
+ SUBROUTINE SQRT05(M,N,L,NB,RESULT)
+*
+* -- LAPACK test routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LWORK, M, N, L, NB, LDT
+* .. Return values ..
+ REAL RESULT(6)
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt11.f b/TESTING/LIN/sqrt11.f
index ee94586b..db37b43d 100644
--- a/TESTING/LIN/sqrt11.f
+++ b/TESTING/LIN/sqrt11.f
@@ -1,56 +1,116 @@
- REAL FUNCTION SQRT11( M, K, A, LDA, TAU, WORK, LWORK )
+*> \brief \b SQRT11
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SQRT11( M, K, A, LDA, TAU, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQRT11 computes the test ratio
-*
-* || Q'*Q - I || / (eps * m)
-*
-* where the orthogonal matrix Q is represented as a product of
-* elementary transformations. Each transformation has the form
-*
-* H(k) = I - tau(k) v(k) v(k)'
-*
-* where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
-* [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
-* in A(k+1:m,k).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT11 computes the test ratio
+*>
+*> || Q'*Q - I || / (eps * m)
+*>
+*> where the orthogonal matrix Q is represented as a product of
+*> elementary transformations. Each transformation has the form
+*>
+*> H(k) = I - tau(k) v(k) v(k)'
+*>
+*> where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
+*> [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
+*> in A(k+1:m,k).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of columns of A whose subdiagonal entries
+*> contain information about orthogonal transformations.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,K)
+*> The (possibly partial) output of a QR reduction routine.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (K)
+*> The scaling factors tau for the elementary transformations as
+*> computed by the QR factorization routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*M + M.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of columns of A whose subdiagonal entries
-* contain information about orthogonal transformations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) REAL array, dimension (LDA,K)
-* The (possibly partial) output of a QR reduction routine.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \ingroup single_lin
*
-* TAU (input) REAL array, dimension (K)
-* The scaling factors tau for the elementary transformations as
-* computed by the QR factorization routine.
+* =====================================================================
+ REAL FUNCTION SQRT11( M, K, A, LDA, TAU, WORK, LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*M + M.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt12.f b/TESTING/LIN/sqrt12.f
index b47347d2..bdc48076 100644
--- a/TESTING/LIN/sqrt12.f
+++ b/TESTING/LIN/sqrt12.f
@@ -1,47 +1,107 @@
- REAL FUNCTION SQRT12( M, N, A, LDA, S, WORK, LWORK )
+*> \brief \b SQRT12
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), S( * ), WORK( LWORK )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION SQRT12( M, N, A, LDA, S, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), S( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQRT12 computes the singular values `svlues' of the upper trapezoid
-* of A(1:M,1:N) and returns the ratio
-*
-* || s - svlues||/(||svlues||*eps*max(M,N))
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT12 computes the singular values `svlues' of the upper trapezoid
+*> of A(1:M,1:N) and returns the ratio
+*>
+*> || s - svlues||/(||svlues||*eps*max(M,N))
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix A. Only the upper trapezoid is referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is REAL array, dimension (min(M,N))
+*> The singular values of the matrix A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= max(M*N + 4*min(M,N) +
+*> max(M,N), M*N+2*MIN( M, N )+4*N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) REAL array, dimension (LDA,N)
-* The M-by-N matrix A. Only the upper trapezoid is referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \ingroup single_lin
*
-* S (input) REAL array, dimension (min(M,N))
-* The singular values of the matrix A.
+* =====================================================================
+ REAL FUNCTION SQRT12( M, N, A, LDA, S, WORK, LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= max(M*N + 4*min(M,N) +
-* max(M,N), M*N+2*MIN( M, N )+4*N).
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), S( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt13.f b/TESTING/LIN/sqrt13.f
index 8c7c236f..dbf805bc 100644
--- a/TESTING/LIN/sqrt13.f
+++ b/TESTING/LIN/sqrt13.f
@@ -1,49 +1,111 @@
- SUBROUTINE SQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, M, N, SCALE
- REAL NORMA
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL A( LDA, * )
-* ..
-*
+*> \brief \b SQRT13
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, M, N, SCALE
+* REAL NORMA
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* SQRT13 generates a full-rank matrix that may be scaled to have large
-* or small norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT13 generates a full-rank matrix that may be scaled to have large
+*> or small norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SCALE (input) INTEGER
-* SCALE = 1: normally scaled matrix
-* SCALE = 2: matrix scaled up
-* SCALE = 3: matrix scaled down
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is INTEGER
+*> SCALE = 1: normally scaled matrix
+*> SCALE = 2: matrix scaled up
+*> SCALE = 3: matrix scaled down
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[out] NORMA
+*> \verbatim
+*> NORMA is REAL
+*> The one-norm of A.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is integer array, dimension (4)
+*> Seed for random number generator
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of A.
+*> \date November 2011
*
-* A (output) REAL array, dimension (LDA,N)
-* The M-by-N matrix A.
+*> \ingroup single_lin
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+* =====================================================================
+ SUBROUTINE SQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
*
-* NORMA (output) REAL
-* The one-norm of A.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* ISEED (input/output) integer array, dimension (4)
-* Seed for random number generator
+* .. Scalar Arguments ..
+ INTEGER LDA, M, N, SCALE
+ REAL NORMA
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt14.f b/TESTING/LIN/sqrt14.f
index ec1a99e2..25685b78 100644
--- a/TESTING/LIN/sqrt14.f
+++ b/TESTING/LIN/sqrt14.f
@@ -1,64 +1,135 @@
- REAL FUNCTION SQRT14( TRANS, M, N, NRHS, A, LDA, X,
- $ LDX, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER LDA, LDX, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), WORK( LWORK ), X( LDX, * )
-* ..
-*
+*> \brief \b SQRT14
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SQRT14( TRANS, M, N, NRHS, A, LDA, X,
+* LDX, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), WORK( LWORK ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* SQRT14 checks whether X is in the row space of A or A'. It does so
-* by scaling both X and A such that their norms are in the range
-* [sqrt(eps), 1/sqrt(eps)], then computing a QR factorization of [A,X]
-* (if TRANS = 'T') or an LQ factorization of [A',X]' (if TRANS = 'N'),
-* and returning the norm of the trailing triangle, scaled by
-* MAX(M,N,NRHS)*eps.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT14 checks whether X is in the row space of A or A'. It does so
+*> by scaling both X and A such that their norms are in the range
+*> [sqrt(eps), 1/sqrt(eps)], then computing a QR factorization of [A,X]
+*> (if TRANS = 'T') or an LQ factorization of [A',X]' (if TRANS = 'N'),
+*> and returning the norm of the trailing triangle, scaled by
+*> MAX(M,N,NRHS)*eps.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, check for X in the row space of A
-* = 'T': Transpose, check for X in the row space of A'.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of X.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, check for X in the row space of A
+*> = 'T': Transpose, check for X in the row space of A'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of X.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If TRANS = 'N', the N-by-NRHS matrix X.
+*> IF TRANS = 'T', the M-by-NRHS matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of workspace array required
+*> If TRANS = 'N', LWORK >= (M+NRHS)*(N+2);
+*> if TRANS = 'T', LWORK >= (N+NRHS)*(M+2).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The M-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \date November 2011
*
-* X (input) REAL array, dimension (LDX,NRHS)
-* If TRANS = 'N', the N-by-NRHS matrix X.
-* IF TRANS = 'T', the M-by-NRHS matrix X.
+*> \ingroup single_lin
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
+* =====================================================================
+ REAL FUNCTION SQRT14( TRANS, M, N, NRHS, A, LDA, X,
+ $ LDX, WORK, LWORK )
*
-* WORK (workspace) REAL array dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of workspace array required
-* If TRANS = 'N', LWORK >= (M+NRHS)*(N+2);
-* if TRANS = 'T', LWORK >= (N+NRHS)*(M+2).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER LDA, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), WORK( LWORK ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt15.f b/TESTING/LIN/sqrt15.f
index f50d4cfb..41c3a348 100644
--- a/TESTING/LIN/sqrt15.f
+++ b/TESTING/LIN/sqrt15.f
@@ -1,78 +1,168 @@
- SUBROUTINE SQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
- $ RANK, NORMA, NORMB, ISEED, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
- REAL NORMA, NORMB
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL A( LDA, * ), B( LDB, * ), S( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b SQRT15
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
+* RANK, NORMA, NORMB, ISEED, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
+* REAL NORMA, NORMB
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), B( LDB, * ), S( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SQRT15 generates a matrix with full or deficient rank and of various
-* norms.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT15 generates a matrix with full or deficient rank and of various
+*> norms.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SCALE (input) INTEGER
-* SCALE = 1: normally scaled matrix
-* SCALE = 2: matrix scaled up
-* SCALE = 3: matrix scaled down
-*
-* RKSEL (input) INTEGER
-* RKSEL = 1: full rank matrix
-* RKSEL = 2: rank-deficient matrix
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of A.
-*
-* NRHS (input) INTEGER
-* The number of columns of B.
-*
-* A (output) REAL array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-*
-* B (output) REAL array, dimension (LDB, NRHS)
-* A matrix that is in the range space of matrix A.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-*
-* S (output) REAL array, dimension MIN(M,N)
-* Singular values of A.
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is INTEGER
+*> SCALE = 1: normally scaled matrix
+*> SCALE = 2: matrix scaled up
+*> SCALE = 3: matrix scaled down
+*> \endverbatim
+*>
+*> \param[in] RKSEL
+*> \verbatim
+*> RKSEL is INTEGER
+*> RKSEL = 1: full rank matrix
+*> RKSEL = 2: rank-deficient matrix
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, NRHS)
+*> A matrix that is in the range space of matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension MIN(M,N)
+*> Singular values of A.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> number of nonzero singular values of A.
+*> \endverbatim
+*>
+*> \param[out] NORMA
+*> \verbatim
+*> NORMA is REAL
+*> one-norm of A.
+*> \endverbatim
+*>
+*> \param[out] NORMB
+*> \verbatim
+*> NORMB is REAL
+*> one-norm of B.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is integer array, dimension (4)
+*> seed for random number generator.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of work space required.
+*> LWORK >= MAX(M+MIN(M,N),NRHS*MIN(M,N),2*N+M)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* RANK (output) INTEGER
-* number of nonzero singular values of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NORMA (output) REAL
-* one-norm of A.
+*> \date November 2011
*
-* NORMB (output) REAL
-* one-norm of B.
+*> \ingroup single_lin
*
-* ISEED (input/output) integer array, dimension (4)
-* seed for random number generator.
+* =====================================================================
+ SUBROUTINE SQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
+ $ RANK, NORMA, NORMB, ISEED, WORK, LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of work space required.
-* LWORK >= MAX(M+MIN(M,N),NRHS*MIN(M,N),2*N+M)
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
+ REAL NORMA, NORMB
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL A( LDA, * ), B( LDB, * ), S( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sqrt16.f b/TESTING/LIN/sqrt16.f
index d60e3dc8..0d15b87e 100644
--- a/TESTING/LIN/sqrt16.f
+++ b/TESTING/LIN/sqrt16.f
@@ -1,9 +1,144 @@
+*> \brief \b SQRT16
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SQRT16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), RWORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT16 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SQRT16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* SQRT16 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) REAL array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (M)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/sqrt17.f b/TESTING/LIN/sqrt17.f
index acd9d1c1..77c2e095 100644
--- a/TESTING/LIN/sqrt17.f
+++ b/TESTING/LIN/sqrt17.f
@@ -1,86 +1,170 @@
- REAL FUNCTION SQRT17( TRANS, IRESID, M, N, NRHS, A,
- $ LDA, X, LDX, B, LDB, C, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), C( LDB, * ),
- $ WORK( LWORK ), X( LDX, * )
-* ..
-*
+*> \brief \b SQRT17
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SQRT17( TRANS, IRESID, M, N, NRHS, A,
+* LDA, X, LDX, B, LDB, C, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), C( LDB, * ),
+* $ WORK( LWORK ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* SQRT17 computes the ratio
-*
-* || R'*op(A) ||/(||A||*alpha*max(M,N,NRHS)*eps)
-*
-* where R = op(A)*X - B, op(A) is A or A', and
-*
-* alpha = ||B|| if IRESID = 1 (zero-residual problem)
-* alpha = ||R|| if IRESID = 2 (otherwise).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SQRT17 computes the ratio
+*>
+*> || R'*op(A) ||/(||A||*alpha*max(M,N,NRHS)*eps)
+*>
+*> where R = op(A)*X - B, op(A) is A or A', and
+*>
+*> alpha = ||B|| if IRESID = 1 (zero-residual problem)
+*> alpha = ||R|| if IRESID = 2 (otherwise).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies whether or not the transpose of A is used.
-* = 'N': No transpose, op(A) = A.
-* = 'T': Transpose, op(A) = A'.
-*
-* IRESID (input) INTEGER
-* IRESID = 1 indicates zero-residual problem.
-* IRESID = 2 indicates non-zero residual.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-* If TRANS = 'N', the number of rows of the matrix B.
-* If TRANS = 'T', the number of rows of the matrix X.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-* If TRANS = 'N', the number of rows of the matrix X.
-* If TRANS = 'T', the number of rows of the matrix B.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and B.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* If TRANS = 'N', the n-by-nrhs matrix X.
-* If TRANS = 'T', the m-by-nrhs matrix X.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether or not the transpose of A is used.
+*> = 'N': No transpose, op(A) = A.
+*> = 'T': Transpose, op(A) = A'.
+*> \endverbatim
+*>
+*> \param[in] IRESID
+*> \verbatim
+*> IRESID is INTEGER
+*> IRESID = 1 indicates zero-residual problem.
+*> IRESID = 2 indicates non-zero residual.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> If TRANS = 'N', the number of rows of the matrix B.
+*> If TRANS = 'T', the number of rows of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> If TRANS = 'N', the number of rows of the matrix X.
+*> If TRANS = 'T', the number of rows of the matrix B.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> If TRANS = 'N', the n-by-nrhs matrix X.
+*> If TRANS = 'T', the m-by-nrhs matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> If TRANS = 'N', LDX >= N.
+*> If TRANS = 'T', LDX >= M.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> If TRANS = 'N', the m-by-nrhs matrix B.
+*> If TRANS = 'T', the n-by-nrhs matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B.
+*> If TRANS = 'N', LDB >= M.
+*> If TRANS = 'T', LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDB,NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= NRHS*(M+N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
-* If TRANS = 'N', LDX >= N.
-* If TRANS = 'T', LDX >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) REAL array, dimension (LDB,NRHS)
-* If TRANS = 'N', the m-by-nrhs matrix B.
-* If TRANS = 'T', the n-by-nrhs matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* If TRANS = 'N', LDB >= M.
-* If TRANS = 'T', LDB >= N.
+*> \ingroup single_lin
*
-* C (workspace) REAL array, dimension (LDB,NRHS)
+* =====================================================================
+ REAL FUNCTION SQRT17( TRANS, IRESID, M, N, NRHS, A,
+ $ LDA, X, LDX, B, LDB, C, WORK, LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= NRHS*(M+N).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), C( LDB, * ),
+ $ WORK( LWORK ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/srqt01.f b/TESTING/LIN/srqt01.f
index 389a6df1..eccc744e 100644
--- a/TESTING/LIN/srqt01.f
+++ b/TESTING/LIN/srqt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE SRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SRQT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SRQT01 tests SGERQF, which computes the RQ factorization of an m-by-n
-* matrix A, and partially tests SORGRQ which forms the n-by-n
-* orthogonal matrix Q.
-*
-* SRQT01 compares R with A*Q', and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SRQT01 tests SGERQF, which computes the RQ factorization of an m-by-n
+*> matrix A, and partially tests SORGRQ which forms the n-by-n
+*> orthogonal matrix Q.
+*>
+*> SRQT01 compares R with A*Q', and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) REAL array, dimension (LDA,N)
-* Details of the RQ factorization of A, as returned by SGERQF.
-* See SGERQF for further details.
-*
-* Q (output) REAL array, dimension (LDA,N)
-* The n-by-n orthogonal matrix Q.
-*
-* R (workspace) REAL array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the RQ factorization of A, as returned by SGERQF.
+*> See SGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> The n-by-n orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by SGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by SGERQF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (max(M,N))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/srqt02.f b/TESTING/LIN/srqt02.f
index be1578af..80e725db 100644
--- a/TESTING/LIN/srqt02.f
+++ b/TESTING/LIN/srqt02.f
@@ -1,75 +1,156 @@
- SUBROUTINE SRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SRQT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SRQT02 tests SORGRQ, which generates an m-by-n matrix Q with
-* orthonornmal rows that is defined as the product of k elementary
-* reflectors.
-*
-* Given the RQ factorization of an m-by-n matrix A, SRQT02 generates
-* the orthogonal matrix Q defined by the factorization of the last k
-* rows of A; it compares R(m-k+1:m,n-m+1:n) with
-* A(m-k+1:m,1:n)*Q(n-m+1:n,1:n)', and checks that the rows of Q are
-* orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SRQT02 tests SORGRQ, which generates an m-by-n matrix Q with
+*> orthonornmal rows that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the RQ factorization of an m-by-n matrix A, SRQT02 generates
+*> the orthogonal matrix Q defined by the factorization of the last k
+*> rows of A; it compares R(m-k+1:m,n-m+1:n) with
+*> A(m-k+1:m,1:n)*Q(n-m+1:n,1:n)', and checks that the rows of Q are
+*> orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* N >= M >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by SRQT01.
-*
-* AF (input) REAL array, dimension (LDA,N)
-* Details of the RQ factorization of A, as returned by SGERQF.
-* See SGERQF for further details.
-*
-* Q (workspace) REAL array, dimension (LDA,N)
-*
-* R (workspace) REAL array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by SRQT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the RQ factorization of A, as returned by SGERQF.
+*> See SGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the RQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (M)
-* The scalar factors of the elementary reflectors corresponding
-* to the RQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE SRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/srqt03.f b/TESTING/LIN/srqt03.f
index e4b6ab03..9165763e 100644
--- a/TESTING/LIN/srqt03.f
+++ b/TESTING/LIN/srqt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE SRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SRQT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SRQT03 tests SORMRQ, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* SRQT03 compares the results of a call to SORMRQ with the results of
-* forming Q explicitly by a call to SORGRQ and then performing matrix
-* multiplication by a call to SGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SRQT03 tests SORMRQ, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> SRQT03 compares the results of a call to SORMRQ with the results of
+*> forming Q explicitly by a call to SORGRQ and then performing matrix
+*> multiplication by a call to SGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows or columns of the matrix C; C is n-by-m if
-* Q is applied from the left, or m-by-n if Q is applied from
-* the right. M >= 0.
-*
-* N (input) INTEGER
-* The order of the orthogonal matrix Q. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. N >= K >= 0.
-*
-* AF (input) REAL array, dimension (LDA,N)
-* Details of the RQ factorization of an m-by-n matrix, as
-* returned by SGERQF. See SGERQF for further details.
-*
-* C (workspace) REAL array, dimension (LDA,N)
-*
-* CC (workspace) REAL array, dimension (LDA,N)
-*
-* Q (workspace) REAL array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows or columns of the matrix C; C is n-by-m if
+*> Q is applied from the left, or m-by-n if Q is applied from
+*> the right. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the orthogonal matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> Details of the RQ factorization of an m-by-n matrix, as
+*> returned by SGERQF. See SGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is REAL array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the RQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is REAL array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an n-by-n orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) REAL array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the RQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) REAL array, dimension (LWORK)
+*> \ingroup single_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE SRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) REAL array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) REAL array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an n-by-n orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), RESULT( * ), RWORK( * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/srzt01.f b/TESTING/LIN/srzt01.f
index 7155f745..725988aa 100644
--- a/TESTING/LIN/srzt01.f
+++ b/TESTING/LIN/srzt01.f
@@ -1,52 +1,117 @@
- REAL FUNCTION SRZT01( M, N, A, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b SRZT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SRZT01( M, N, A, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SRZT01 returns
-* || A - R*Q || / ( M * eps * ||A|| )
-* for an upper trapezoidal A that was factored with STZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SRZT01 returns
+*> || A - R*Q || / ( M * eps * ||A|| )
+*> for an upper trapezoidal A that was factored with STZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original upper trapezoidal M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> The output of STZRZF for input matrix A.
+*> The lower triangle is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> STZRZF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= m*n + m*nb.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The original upper trapezoidal M by N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) REAL array, dimension (LDA,N)
-* The output of STZRZF for input matrix A.
-* The lower triangle is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \ingroup single_lin
*
-* TAU (input) REAL array, dimension (M)
-* Details of the Householder transformations as returned by
-* STZRZF.
+* =====================================================================
+ REAL FUNCTION SRZT01( M, N, A, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= m*n + m*nb.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/srzt02.f b/TESTING/LIN/srzt02.f
index 4a9d66b6..a2c89c1c 100644
--- a/TESTING/LIN/srzt02.f
+++ b/TESTING/LIN/srzt02.f
@@ -1,48 +1,109 @@
- REAL FUNCTION SRZT02( M, N, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL AF( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b SRZT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SRZT02( M, N, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* SRZT02 returns
-* || I - Q'*Q || / ( M * eps)
-* where the matrix Q is defined by the Householder transformations
-* generated by STZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SRZT02 returns
+*> || I - Q'*Q || / ( M * eps)
+*> where the matrix Q is defined by the Householder transformations
+*> generated by STZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> The output of STZRZF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> STZRZF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of WORK array. LWORK >= N*N+N*NB.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix AF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) REAL array, dimension (LDA,N)
-* The output of STZRZF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array AF.
+*> \ingroup single_lin
*
-* TAU (input) REAL array, dimension (M)
-* Details of the Householder transformations as returned by
-* STZRZF.
+* =====================================================================
+ REAL FUNCTION SRZT02( M, N, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of WORK array. LWORK >= N*N+N*NB.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/sspt01.f b/TESTING/LIN/sspt01.f
index 107ef565..a46e689a 100644
--- a/TESTING/LIN/sspt01.f
+++ b/TESTING/LIN/sspt01.f
@@ -1,62 +1,129 @@
- SUBROUTINE SSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*> \brief \b SSPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDC, N
- REAL RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- REAL A( * ), AFAC( * ), C( LDC, * ), RWORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE SSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( * ), AFAC( * ), C( LDC, * ), RWORK( * )
+* ..
+*
* Purpose
* =======
*
-* SSPT01 reconstructs a symmetric indefinite packed matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSPT01 reconstructs a symmetric indefinite packed matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A, stored as a packed
+*> triangular matrix. AFAC contains the block diagonal matrix D
+*> and the multipliers used to obtain the factor L or U from the
+*> block L*D*L' or U*D*U' factorization as computed by SSPTRF.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SSPTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AFAC (input) REAL array, dimension (N*(N+1)/2)
-* The factored form of the matrix A, stored as a packed
-* triangular matrix. AFAC contains the block diagonal matrix D
-* and the multipliers used to obtain the factor L or U from the
-* block L*D*L' or U*D*U' factorization as computed by SSPTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SSPTRF.
+*> \date November 2011
*
-* C (workspace) REAL array, dimension (LDC,N)
+*> \ingroup single_lin
*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
+* =====================================================================
+ SUBROUTINE SSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
*
-* RWORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDC, N
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ REAL A( * ), AFAC( * ), C( LDC, * ), RWORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ssyt01.f b/TESTING/LIN/ssyt01.f
index 33e2a1ce..7aaeae9e 100644
--- a/TESTING/LIN/ssyt01.f
+++ b/TESTING/LIN/ssyt01.f
@@ -1,9 +1,133 @@
+*> \brief \b SSYT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SSYT01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, LDC, N
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* REAL A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * ),
+* $ RWORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SSYT01 reconstructs a symmetric indefinite matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is REAL array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor L or U from the block L*D*L' or U*D*U' factorization
+*> as computed by SSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from SSYTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE SSYT01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,55 +140,6 @@
$ RWORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SSYT01 reconstructs a symmetric indefinite matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix and EPS is the machine epsilon.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The original symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) REAL array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor L or U from the block L*D*L' or U*D*U' factorization
-* as computed by SSYTRF.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from SSYTRF.
-*
-* C (workspace) REAL array, dimension (LDC,N)
-*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
-*
-* RWORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/stbt02.f b/TESTING/LIN/stbt02.f
index 927ead26..20b76b73 100644
--- a/TESTING/LIN/stbt02.f
+++ b/TESTING/LIN/stbt02.f
@@ -1,9 +1,165 @@
+*> \brief \b STBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STBT02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
+* LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b or A' *x = b when
+*> A is a triangular band matrix. Here A' is the transpose of A and
+*> x and b are N by NRHS matrices. The test ratio is the maximum over
+*> the number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A'*x = b (Transpose)
+*> = 'C': A'*x = b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STBT02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
$ LDX, B, LDB, WORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,77 +171,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* STBT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b or A' *x = b when
-* A is a triangular band matrix. Here A' is the transpose of A and
-* x and b are N by NRHS matrices. The test ratio is the maximum over
-* the number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A'*x = b (Transpose)
-* = 'C': A'*x = b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/stbt03.f b/TESTING/LIN/stbt03.f
index f592f8fa..996712a7 100644
--- a/TESTING/LIN/stbt03.f
+++ b/TESTING/LIN/stbt03.f
@@ -1,10 +1,186 @@
+*> \brief \b STBT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STBT03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
+* SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, N, NRHS
+* REAL RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), B( LDB, * ), CNORM( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b or A'*x = s*b when A is a
+*> triangular band matrix. Here A' is the transpose of A, s is a scalar,
+*> and x and b are N by NRHS matrices. The test ratio is the maximum
+*> over the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A'*x = b (Transpose)
+*> = 'C': A'*x = b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is REAL array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is REAL
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STBT03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
$ SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -16,87 +192,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* STBT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b or A'*x = s*b when A is a
-* triangular band matrix. Here A' is the transpose of A, s is a scalar,
-* and x and b are N by NRHS matrices. The test ratio is the maximum
-* over the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A'*x = b (Transpose)
-* = 'C': A'*x = b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* SCALE (input) REAL
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) REAL array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) REAL
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/stbt05.f b/TESTING/LIN/stbt05.f
index 59307f3f..dfd6b73f 100644
--- a/TESTING/LIN/stbt05.f
+++ b/TESTING/LIN/stbt05.f
@@ -1,9 +1,200 @@
+*> \brief \b STBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STBT05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), B( LDB, * ), BERR( * ),
+* $ FERR( * ), RESLTS( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular band matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STBT05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,103 +206,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* STBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular band matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/stbt06.f b/TESTING/LIN/stbt06.f
index c657afbb..721a7213 100644
--- a/TESTING/LIN/stbt06.f
+++ b/TESTING/LIN/stbt06.f
@@ -1,73 +1,145 @@
- SUBROUTINE STBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
- $ WORK, RAT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER KD, LDAB, N
- REAL RAT, RCOND, RCONDC
-* ..
-* .. Array Arguments ..
- REAL AB( LDAB, * ), WORK( * )
-* ..
-*
+*> \brief \b STBT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
+* WORK, RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER KD, LDAB, N
+* REAL RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* REAL AB( LDAB, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* STBT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by STBCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STBT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by STBCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* RCOND (input) REAL
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) REAL
-* The estimate of the reciprocal condition number computed by
-* STBCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is REAL
+*> The estimate of the reciprocal condition number computed by
+*> STBCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is REAL array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is REAL
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
+*> \date November 2011
*
-* AB (input) REAL array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \ingroup single_lin
*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
+* =====================================================================
+ SUBROUTINE STBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
+ $ WORK, RAT )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RAT (output) REAL
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER KD, LDAB, N
+ REAL RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+ REAL AB( LDAB, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/stpt01.f b/TESTING/LIN/stpt01.f
index 6aa2bdcb..47ec1bf6 100644
--- a/TESTING/LIN/stpt01.f
+++ b/TESTING/LIN/stpt01.f
@@ -1,63 +1,128 @@
- SUBROUTINE STPT01( UPLO, DIAG, N, AP, AINVP, RCOND, WORK, RESID )
+*> \brief \b STPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL AINVP( * ), AP( * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE STPT01( UPLO, DIAG, N, AP, AINVP, RCOND, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL AINVP( * ), AP( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* STPT01 computes the residual for a triangular matrix A times its
-* inverse when A is stored in packed format:
-* RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPT01 computes the residual for a triangular matrix A times its
+*> inverse when A is stored in packed format:
+*> RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The original upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in,out] AINVP
+*> \verbatim
+*> AINVP is REAL array, dimension (N*(N+1)/2)
+*> On entry, the (triangular) inverse of the matrix A, packed
+*> columnwise in a linear array as in AP.
+*> On exit, the contents of AINVP are destroyed.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal condition number of A, computed as
+*> 1/(norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The original upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \date November 2011
*
-* AINVP (input/output) REAL array, dimension (N*(N+1)/2)
-* On entry, the (triangular) inverse of the matrix A, packed
-* columnwise in a linear array as in AP.
-* On exit, the contents of AINVP are destroyed.
+*> \ingroup single_lin
*
-* RCOND (output) REAL
-* The reciprocal condition number of A, computed as
-* 1/(norm(A) * norm(AINV)).
+* =====================================================================
+ SUBROUTINE STPT01( UPLO, DIAG, N, AP, AINVP, RCOND, WORK, RESID )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL AINVP( * ), AP( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/stpt02.f b/TESTING/LIN/stpt02.f
index 801e612e..eda3c533 100644
--- a/TESTING/LIN/stpt02.f
+++ b/TESTING/LIN/stpt02.f
@@ -1,83 +1,161 @@
- SUBROUTINE STPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
- $ WORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER LDB, LDX, N, NRHS
- REAL RESID
-* ..
-* .. Array Arguments ..
- REAL AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
-* ..
-*
+*> \brief \b STPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
+* WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* STPT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b or A'*x = b when
-* the triangular matrix A is stored in packed format. Here A' is the
-* transpose of A and x and b are N by NRHS matrices. The test ratio is
-* the maximum over the number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b or A'*x = b when
+*> the triangular matrix A is stored in packed format. Here A' is the
+*> transpose of A and x and b are N by NRHS matrices. The test ratio is
+*> the maximum over the number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A'*x = b (Transpose)
-* = 'C': A'*x = b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A'*x = b (Transpose)
+*> = 'C': A'*x = b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
+*> \ingroup single_lin
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE STPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
+ $ WORK, RESID )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER LDB, LDX, N, NRHS
+ REAL RESID
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/stpt03.f b/TESTING/LIN/stpt03.f
index 6c7404d5..5e726cd6 100644
--- a/TESTING/LIN/stpt03.f
+++ b/TESTING/LIN/stpt03.f
@@ -1,94 +1,182 @@
- SUBROUTINE STPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
- $ TSCAL, X, LDX, B, LDB, WORK, RESID )
+*> \brief \b STPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER LDB, LDX, N, NRHS
- REAL RESID, SCALE, TSCAL
-* ..
-* .. Array Arguments ..
- REAL AP( * ), B( LDB, * ), CNORM( * ), WORK( * ),
- $ X( LDX, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE STPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
+* TSCAL, X, LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, N, NRHS
+* REAL RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), B( LDB, * ), CNORM( * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* STPT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b or A'*x = s*b when the triangular
-* matrix A is stored in packed format. Here A' is the transpose of A,
-* s is a scalar, and x and b are N by NRHS matrices. The test ratio is
-* the maximum over the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b or A'*x = s*b when the triangular
+*> matrix A is stored in packed format. Here A' is the transpose of A,
+*> s is a scalar, and x and b are N by NRHS matrices. The test ratio is
+*> the maximum over the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A'*x = s*b (Transpose)
-* = 'C': A'*x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A'*x = s*b (Transpose)
+*> = 'C': A'*x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is REAL array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is REAL
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* SCALE (input) REAL
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) REAL array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) REAL
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
+* Authors
+* =======
*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
+*> \ingroup single_lin
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE STPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
+ $ TSCAL, X, LDX, B, LDB, WORK, RESID )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER LDB, LDX, N, NRHS
+ REAL RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+ REAL AP( * ), B( LDB, * ), CNORM( * ), WORK( * ),
+ $ X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/stpt05.f b/TESTING/LIN/stpt05.f
index 6563d006..58ca7d76 100644
--- a/TESTING/LIN/stpt05.f
+++ b/TESTING/LIN/stpt05.f
@@ -1,9 +1,185 @@
+*> \brief \b STPT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPT05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular matrix in packed storage format.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STPT05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,95 +190,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* STPT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular matrix in packed storage format.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/stpt06.f b/TESTING/LIN/stpt06.f
index 93bfe379..6a4b5104 100644
--- a/TESTING/LIN/stpt06.f
+++ b/TESTING/LIN/stpt06.f
@@ -1,8 +1,122 @@
+*> \brief \b STPT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STPT06( RCOND, RCONDC, UPLO, DIAG, N, AP, WORK, RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER N
+* REAL RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* REAL AP( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STPT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by STPCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is REAL
+*> The estimate of the reciprocal condition number computed by
+*> STPCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is REAL array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is REAL
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STPT06( RCOND, RCONDC, UPLO, DIAG, N, AP, WORK, RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -13,55 +127,6 @@
REAL AP( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STPT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by STPCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) REAL
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) REAL
-* The estimate of the reciprocal condition number computed by
-* STPCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) REAL array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* RAT (output) REAL
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/strt01.f b/TESTING/LIN/strt01.f
index 6367ba78..f15c101f 100644
--- a/TESTING/LIN/strt01.f
+++ b/TESTING/LIN/strt01.f
@@ -1,72 +1,144 @@
- SUBROUTINE STRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
- $ WORK, RESID )
+*> \brief \b STRT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER LDA, LDAINV, N
- REAL RCOND, RESID
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AINV( LDAINV, * ), WORK( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE STRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
+* WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER LDA, LDAINV, N
+* REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AINV( LDAINV, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* STRT01 computes the residual for a triangular matrix A times its
-* inverse:
-* RESID = norm( A*AINV - I ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRT01 computes the residual for a triangular matrix A times its
+*> inverse:
+*> RESID = norm( A*AINV - I ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AINV
+*> \verbatim
+*> AINV is REAL array, dimension (LDAINV,N)
+*> On entry, the (triangular) inverse of the matrix A, in the
+*> same storage format as A.
+*> On exit, the contents of AINV are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The reciprocal condition number of A, computed as
+*> 1/(norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AINV (input/output) REAL array, dimension (LDAINV,N)
-* On entry, the (triangular) inverse of the matrix A, in the
-* same storage format as A.
-* On exit, the contents of AINV are destroyed.
+*> \date November 2011
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \ingroup single_lin
*
-* RCOND (output) REAL
-* The reciprocal condition number of A, computed as
-* 1/(norm(A) * norm(AINV)).
+* =====================================================================
+ SUBROUTINE STRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
+ $ WORK, RESID )
*
-* WORK (workspace) REAL array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) REAL
-* norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER LDA, LDAINV, N
+ REAL RCOND, RESID
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AINV( LDAINV, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/strt02.f b/TESTING/LIN/strt02.f
index 52958416..67a602ee 100644
--- a/TESTING/LIN/strt02.f
+++ b/TESTING/LIN/strt02.f
@@ -1,9 +1,161 @@
+*> \brief \b STRT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRT02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
+* LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* REAL RESID
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b or A'*x = b.
+*> Here A is a triangular matrix, A' is the transpose of A, and x and b
+*> are N by NRHS matrices. The test ratio is the maximum over the
+*> number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A'*x = b (Transpose)
+*> = 'C': A'*x = b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STRT02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
$ LDB, WORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,76 +167,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* STRT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b or A'*x = b.
-* Here A is a triangular matrix, A' is the transpose of A, and x and b
-* are N by NRHS matrices. The test ratio is the maximum over the
-* number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A'*x = b (Transpose)
-* = 'C': A'*x = b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/strt03.f b/TESTING/LIN/strt03.f
index d734b29f..df8de5be 100644
--- a/TESTING/LIN/strt03.f
+++ b/TESTING/LIN/strt03.f
@@ -1,9 +1,180 @@
+*> \brief \b STRT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRT03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
+* CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* REAL RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), CNORM( * ),
+* $ WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b or A'*x = s*b.
+*> Here A is a triangular matrix, A' is the transpose of A, s is a
+*> scalar, and x and b are N by NRHS matrices. The test ratio is the
+*> maximum over the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A or A' and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A'*x = s*b (Transpose)
+*> = 'C': A'*x = s*b (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is REAL
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is REAL array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is REAL
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is REAL
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STRT03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
$ CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,86 +186,6 @@
$ WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* STRT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b or A'*x = s*b.
-* Here A is a triangular matrix, A' is the transpose of A, s is a
-* scalar, and x and b are N by NRHS matrices. The test ratio is the
-* maximum over the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A or A' and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A'*x = s*b (Transpose)
-* = 'C': A'*x = s*b (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SCALE (input) REAL
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) REAL array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) REAL
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* RESID (output) REAL
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/strt05.f b/TESTING/LIN/strt05.f
index e13894c0..d6b55e05 100644
--- a/TESTING/LIN/strt05.f
+++ b/TESTING/LIN/strt05.f
@@ -1,9 +1,192 @@
+*> \brief \b STRT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRT05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
+* LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
+* $ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular n by n matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is REAL array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is REAL array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is REAL array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is REAL array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is REAL array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STRT05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
$ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,99 +197,6 @@
$ RESLTS( * ), X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* STRT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular n by n matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) REAL array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) REAL array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) REAL array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) REAL array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) REAL array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) REAL array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/strt06.f b/TESTING/LIN/strt06.f
index 5f328b79..b510724d 100644
--- a/TESTING/LIN/strt06.f
+++ b/TESTING/LIN/strt06.f
@@ -1,9 +1,132 @@
+*> \brief \b STRT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE STRT06( RCOND, RCONDC, UPLO, DIAG, N, A, LDA, WORK,
+* RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER LDA, N
+* REAL RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STRT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by STRCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is REAL
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is REAL
+*> The estimate of the reciprocal condition number computed by
+*> STRCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is REAL
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup single_lin
+*
+* =====================================================================
SUBROUTINE STRT06( RCOND, RCONDC, UPLO, DIAG, N, A, LDA, WORK,
$ RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -14,60 +137,6 @@
REAL A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* STRT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by STRCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) REAL
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) REAL
-* The estimate of the reciprocal condition number computed by
-* STRCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) REAL array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* WORK (workspace) REAL array, dimension (N)
-*
-* RAT (output) REAL
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/stzt01.f b/TESTING/LIN/stzt01.f
index 0752fa15..81044f39 100644
--- a/TESTING/LIN/stzt01.f
+++ b/TESTING/LIN/stzt01.f
@@ -1,52 +1,117 @@
- REAL FUNCTION STZT01( M, N, A, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b STZT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION STZT01( M, N, A, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* STZT01 returns
-* || A - R*Q || / ( M * eps * ||A|| )
-* for an upper trapezoidal A that was factored with STZRQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STZT01 returns
+*> || A - R*Q || / ( M * eps * ||A|| )
+*> for an upper trapezoidal A that was factored with STZRQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The original upper trapezoidal M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> The output of STZRQF for input matrix A.
+*> The lower triangle is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> STZRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= m*n + m.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) REAL array, dimension (LDA,N)
-* The original upper trapezoidal M by N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) REAL array, dimension (LDA,N)
-* The output of STZRQF for input matrix A.
-* The lower triangle is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \ingroup single_lin
*
-* TAU (input) REAL array, dimension (M)
-* Details of the Householder transformations as returned by
-* STZRQF.
+* =====================================================================
+ REAL FUNCTION STZT01( M, N, A, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= m*n + m.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/stzt02.f b/TESTING/LIN/stzt02.f
index f227035b..65a9f8ac 100644
--- a/TESTING/LIN/stzt02.f
+++ b/TESTING/LIN/stzt02.f
@@ -1,48 +1,109 @@
- REAL FUNCTION STZT02( M, N, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- REAL AF( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b STZT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION STZT02( M, N, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* REAL AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* STZT02 returns
-* || I - Q'*Q || / ( M * eps)
-* where the matrix Q is defined by the Householder transformations
-* generated by STZRQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> STZT02 returns
+*> || I - Q'*Q || / ( M * eps)
+*> where the matrix Q is defined by the Householder transformations
+*> generated by STZRQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is REAL array, dimension (LDA,N)
+*> The output of STZRQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is REAL array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> STZRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of WORK array. Must be >= N*N+N
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix AF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) REAL array, dimension (LDA,N)
-* The output of STZRQF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array AF.
+*> \ingroup single_lin
*
-* TAU (input) REAL array, dimension (M)
-* Details of the Householder transformations as returned by
-* STZRQF.
+* =====================================================================
+ REAL FUNCTION STZT02( M, N, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) REAL array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of WORK array. Must be >= N*N+N
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ REAL AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/xerbla.f b/TESTING/LIN/xerbla.f
index 38bb2297..fcce9e6b 100644
--- a/TESTING/LIN/xerbla.f
+++ b/TESTING/LIN/xerbla.f
@@ -1,46 +1,95 @@
- SUBROUTINE XERBLA( SRNAME, INFO )
+*> \brief \b XERBLA
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*(*) SRNAME
- INTEGER INFO
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE XERBLA( SRNAME, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER*(*) SRNAME
+* INTEGER INFO
+* ..
+*
* Purpose
* =======
*
-* This is a special version of XERBLA to be used only as part of
-* the test program for testing error exits from the LAPACK routines.
-* Error messages are printed if INFO.NE.INFOT or if SRNAME.NE.SRMANT,
-* where INFOT and SRNAMT are values stored in COMMON.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> This is a special version of XERBLA to be used only as part of
+*> the test program for testing error exits from the LAPACK routines.
+*> Error messages are printed if INFO.NE.INFOT or if SRNAME.NE.SRNAMT,
+*> where INFOT and SRNAMT are values stored in COMMON.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SRNAME (input) CHARACTER*(*)
-* The name of the subroutine calling XERBLA. This name should
-* match the COMMON variable SRNAMT.
+*> \param[in] SRNAME
+*> \verbatim
+*> SRNAME is CHARACTER*(*)
+*> The name of the subroutine calling XERBLA. This name should
+*> match the COMMON variable SRNAMT.
+*> \endverbatim
+*>
+*> \param[in] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> The error return code from the calling subroutine. INFO
+*> should equal the COMMON variable INFOT.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_eig
*
-* INFO (input) INTEGER
-* The error return code from the calling subroutine. INFO
-* should equal the COMMON variable INFOT.
*
* Further Details
-* ======= =======
+* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> The following variables are passed via the common blocks INFOC and
+*> SRNAMC:
+*>
+*> INFOT INTEGER Expected integer return code
+*> NOUT INTEGER Unit number for printing error messages
+*> OK LOGICAL Set to .TRUE. if INFO = INFOT and
+*> SRNAME = SRNAMT, otherwise set to .FALSE.
+*> LERR LOGICAL Set to .TRUE., indicating that XERBLA was called
+*> SRNAMT CHARACTER*(*) Expected name of calling subroutine
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE XERBLA( SRNAME, INFO )
*
-* The following variables are passed via the common blocks INFOC and
-* SRNAMC:
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFOT INTEGER Expected integer return code
-* NOUT INTEGER Unit number for printing error messages
-* OK LOGICAL Set to .TRUE. if INFO = INFOT and
-* SRNAME = SRNAMT, otherwise set to .FALSE.
-* LERR LOGICAL Set to .TRUE., indicating that XERBLA was called
-* SRNAMT CHARACTER*(*) Expected name of calling subroutine
+* .. Scalar Arguments ..
+ CHARACTER*(*) SRNAME
+ INTEGER INFO
+* ..
*
+* =====================================================================
*
* .. Scalars in Common ..
LOGICAL LERR, OK
diff --git a/TESTING/LIN/xlaenv.f b/TESTING/LIN/xlaenv.f
index 648c0c85..210e798b 100644
--- a/TESTING/LIN/xlaenv.f
+++ b/TESTING/LIN/xlaenv.f
@@ -1,51 +1,93 @@
- SUBROUTINE XLAENV( ISPEC, NVALUE )
+*> \brief \b XLAENV
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER ISPEC, NVALUE
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE XLAENV( ISPEC, NVALUE )
+*
+* .. Scalar Arguments ..
+* INTEGER ISPEC, NVALUE
+* ..
+*
* Purpose
* =======
*
-* XLAENV sets certain machine- and problem-dependent quantities
-* which will later be retrieved by ILAENV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> XLAENV sets certain machine- and problem-dependent quantities
+*> which will later be retrieved by ILAENV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISPEC (input) INTEGER
-* Specifies the parameter to be set in the COMMON array IPARMS.
-* = 1: the optimal blocksize; if this value is 1, an unblocked
-* algorithm will give the best performance.
-* = 2: the minimum block size for which the block routine
-* should be used; if the usable block size is less than
-* this value, an unblocked routine should be used.
-* = 3: the crossover point (in a block routine, for N less
-* than this value, an unblocked routine should be used)
-* = 4: the number of shifts, used in the nonsymmetric
-* eigenvalue routines
-* = 5: the minimum column dimension for blocking to be used;
-* rectangular blocks must have dimension at least k by m,
-* where k is given by ILAENV(2,...) and m by ILAENV(5,...)
-* = 6: the crossover point for the SVD (when reducing an m by n
-* matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
-* this value, a QR factorization is used first to reduce
-* the matrix to a triangular form)
-* = 7: the number of processors
-* = 8: another crossover point, for the multishift QR and QZ
-* methods for nonsymmetric eigenvalue problems.
-* = 9: maximum size of the subproblems at the bottom of the
-* computation tree in the divide-and-conquer algorithm
-* (used by xGELSD and xGESDD)
-* =10: ieee NaN arithmetic can be trusted not to trap
-* =11: infinity arithmetic can be trusted not to trap
-*
-* NVALUE (input) INTEGER
-* The value of the parameter specified by ISPEC.
+*> \param[in] ISPEC
+*> \verbatim
+*> ISPEC is INTEGER
+*> Specifies the parameter to be set in the COMMON array IPARMS.
+*> = 1: the optimal blocksize; if this value is 1, an unblocked
+*> algorithm will give the best performance.
+*> = 2: the minimum block size for which the block routine
+*> should be used; if the usable block size is less than
+*> this value, an unblocked routine should be used.
+*> = 3: the crossover point (in a block routine, for N less
+*> than this value, an unblocked routine should be used)
+*> = 4: the number of shifts, used in the nonsymmetric
+*> eigenvalue routines
+*> = 5: the minimum column dimension for blocking to be used;
+*> rectangular blocks must have dimension at least k by m,
+*> where k is given by ILAENV(2,...) and m by ILAENV(5,...)
+*> = 6: the crossover point for the SVD (when reducing an m by n
+*> matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds
+*> this value, a QR factorization is used first to reduce
+*> the matrix to a triangular form)
+*> = 7: the number of processors
+*> = 8: another crossover point, for the multishift QR and QZ
+*> methods for nonsymmetric eigenvalue problems.
+*> = 9: maximum size of the subproblems at the bottom of the
+*> computation tree in the divide-and-conquer algorithm
+*> (used by xGELSD and xGESDD)
+*> =10: ieee NaN arithmetic can be trusted not to trap
+*> =11: infinity arithmetic can be trusted not to trap
+*> \endverbatim
+*>
+*> \param[in] NVALUE
+*> \verbatim
+*> NVALUE is INTEGER
+*> The value of the parameter specified by ISPEC.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup aux_lin
+*
+* =====================================================================
+ SUBROUTINE XLAENV( ISPEC, NVALUE )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER ISPEC, NVALUE
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zchkaa.f b/TESTING/LIN/zchkaa.f
index 1cfd0428..c10956df 100644
--- a/TESTING/LIN/zchkaa.f
+++ b/TESTING/LIN/zchkaa.f
@@ -1,79 +1,117 @@
- PROGRAM ZCHKAA
+*> \brief \b ZCHKAA
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* PROGRAM ZCHKAA
+*
* Purpose
* =======
*
-* ZCHKAA is the main test program for the COMPLEX*16 linear equation
-* routines.
-*
-* The program must be driven by a short data file. The first 14 records
-* specify problem dimensions and program options using list-directed
-* input. The remaining lines specify the LAPACK test paths and the
-* number of matrix types to use in testing. An annotated example of a
-* data file can be obtained by deleting the first 3 characters from the
-* following 38 lines:
-* Data file for testing COMPLEX*16 LAPACK linear equation routines
-* 7 Number of values of M
-* 0 1 2 3 5 10 16 Values of M (row dimension)
-* 7 Number of values of N
-* 0 1 2 3 5 10 16 Values of N (column dimension)
-* 1 Number of values of NRHS
-* 2 Values of NRHS (number of right hand sides)
-* 5 Number of values of NB
-* 1 3 3 3 20 Values of NB (the blocksize)
-* 1 0 5 9 1 Values of NX (crossover point)
-* 3 Number of values of RANK
-* 30 50 90 Values of rank (as a % of N)
-* 30.0 Threshold value of test ratio
-* T Put T to test the LAPACK routines
-* T Put T to test the driver routines
-* T Put T to test the error exits
-* ZGE 11 List types on next line if 0 < NTYPES < 11
-* ZGB 8 List types on next line if 0 < NTYPES < 8
-* ZGT 12 List types on next line if 0 < NTYPES < 12
-* ZPO 9 List types on next line if 0 < NTYPES < 9
-* ZPS 9 List types on next line if 0 < NTYPES < 9
-* ZPP 9 List types on next line if 0 < NTYPES < 9
-* ZPB 8 List types on next line if 0 < NTYPES < 8
-* ZPT 12 List types on next line if 0 < NTYPES < 12
-* ZHE 10 List types on next line if 0 < NTYPES < 10
-* ZHP 10 List types on next line if 0 < NTYPES < 10
-* ZSY 11 List types on next line if 0 < NTYPES < 11
-* ZSP 11 List types on next line if 0 < NTYPES < 11
-* ZTR 18 List types on next line if 0 < NTYPES < 18
-* ZTP 18 List types on next line if 0 < NTYPES < 18
-* ZTB 17 List types on next line if 0 < NTYPES < 17
-* ZQR 8 List types on next line if 0 < NTYPES < 8
-* ZRQ 8 List types on next line if 0 < NTYPES < 8
-* ZLQ 8 List types on next line if 0 < NTYPES < 8
-* ZQL 8 List types on next line if 0 < NTYPES < 8
-* ZQP 6 List types on next line if 0 < NTYPES < 6
-* ZTZ 3 List types on next line if 0 < NTYPES < 3
-* ZLS 6 List types on next line if 0 < NTYPES < 6
-* ZEQ
-*
-* Internal Parameters
-* ===================
-*
-* NMAX INTEGER
-* The maximum allowable value for N.
-*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, or NB
-*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
-*
-* NIN INTEGER
-* The unit number for input
-*
-* NOUT INTEGER
-* The unit number for output
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKAA is the main test program for the COMPLEX*16 linear equation
+*> routines.
+*>
+*> The program must be driven by a short data file. The first 14 records
+*> specify problem dimensions and program options using list-directed
+*> input. The remaining lines specify the LAPACK test paths and the
+*> number of matrix types to use in testing. An annotated example of a
+*> data file can be obtained by deleting the first 3 characters from the
+*> following 38 lines:
+*> Data file for testing COMPLEX*16 LAPACK linear equation routines
+*> 7 Number of values of M
+*> 0 1 2 3 5 10 16 Values of M (row dimension)
+*> 7 Number of values of N
+*> 0 1 2 3 5 10 16 Values of N (column dimension)
+*> 1 Number of values of NRHS
+*> 2 Values of NRHS (number of right hand sides)
+*> 5 Number of values of NB
+*> 1 3 3 3 20 Values of NB (the blocksize)
+*> 1 0 5 9 1 Values of NX (crossover point)
+*> 3 Number of values of RANK
+*> 30 50 90 Values of rank (as a % of N)
+*> 30.0 Threshold value of test ratio
+*> T Put T to test the LAPACK routines
+*> T Put T to test the driver routines
+*> T Put T to test the error exits
+*> ZGE 11 List types on next line if 0 < NTYPES < 11
+*> ZGB 8 List types on next line if 0 < NTYPES < 8
+*> ZGT 12 List types on next line if 0 < NTYPES < 12
+*> ZPO 9 List types on next line if 0 < NTYPES < 9
+*> ZPS 9 List types on next line if 0 < NTYPES < 9
+*> ZPP 9 List types on next line if 0 < NTYPES < 9
+*> ZPB 8 List types on next line if 0 < NTYPES < 8
+*> ZPT 12 List types on next line if 0 < NTYPES < 12
+*> ZHE 10 List types on next line if 0 < NTYPES < 10
+*> ZHP 10 List types on next line if 0 < NTYPES < 10
+*> ZSY 11 List types on next line if 0 < NTYPES < 11
+*> ZSP 11 List types on next line if 0 < NTYPES < 11
+*> ZTR 18 List types on next line if 0 < NTYPES < 18
+*> ZTP 18 List types on next line if 0 < NTYPES < 18
+*> ZTB 17 List types on next line if 0 < NTYPES < 17
+*> ZQR 8 List types on next line if 0 < NTYPES < 8
+*> ZRQ 8 List types on next line if 0 < NTYPES < 8
+*> ZLQ 8 List types on next line if 0 < NTYPES < 8
+*> ZQL 8 List types on next line if 0 < NTYPES < 8
+*> ZQP 6 List types on next line if 0 < NTYPES < 6
+*> ZTZ 3 List types on next line if 0 < NTYPES < 3
+*> ZLS 6 List types on next line if 0 < NTYPES < 6
+*> ZEQ
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N.
+*> \endverbatim
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, or NB
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ PROGRAM ZCHKAA
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/zchkab.f b/TESTING/LIN/zchkab.f
index 36e8e600..8704df9c 100644
--- a/TESTING/LIN/zchkab.f
+++ b/TESTING/LIN/zchkab.f
@@ -1,54 +1,88 @@
- PROGRAM ZCHKAB
- IMPLICIT NONE
+*> \brief \b ZCHKAB
*
-* -- LAPACK test routine (version 3.2.1) --
+* =========== DOCUMENTATION ===========
*
-* -- April 2009 --
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Definition
+* ==========
*
+* PROGRAM ZCHKAB
+*
* Purpose
* =======
*
-* ZCHKAB is the test program for the COMPLEX*16 LAPACK
-* ZCGESV/ZCPOSV routine
-*
-* The program must be driven by a short data file. The first 5 records
-* specify problem dimensions and program options using list-directed
-* input. The remaining lines specify the LAPACK test paths and the
-* number of matrix types to use in testing. An annotated example of a
-* data file can be obtained by deleting the first 3 characters from the
-* following 9 lines:
-* Data file for testing COMPLEX*16 LAPACK ZCGESV
-* 7 Number of values of M
-* 0 1 2 3 5 10 16 Values of M (row dimension)
-* 1 Number of values of NRHS
-* 2 Values of NRHS (number of right hand sides)
-* 20.0 Threshold value of test ratio
-* T Put T to test the LAPACK routine
-* T Put T to test the error exits
-* DGE 11 List types on next line if 0 < NTYPES < 11
-* DPO 9 List types on next line if 0 < NTYPES < 9
-*
-* Internal Parameters
-* ===================
-*
-* NMAX INTEGER
-* The maximum allowable value for N
-*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, NRHS, NB, and NX
-*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
-*
-* NIN INTEGER
-* The unit number for input
-*
-* NOUT INTEGER
-* The unit number for output
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKAB is the test program for the COMPLEX*16 LAPACK
+*> ZCGESV/ZCPOSV routine
+*>
+*> The program must be driven by a short data file. The first 5 records
+*> specify problem dimensions and program options using list-directed
+*> input. The remaining lines specify the LAPACK test paths and the
+*> number of matrix types to use in testing. An annotated example of a
+*> data file can be obtained by deleting the first 3 characters from the
+*> following 9 lines:
+*> Data file for testing COMPLEX*16 LAPACK ZCGESV
+*> 7 Number of values of M
+*> 0 1 2 3 5 10 16 Values of M (row dimension)
+*> 1 Number of values of NRHS
+*> 2 Values of NRHS (number of right hand sides)
+*> 20.0 Threshold value of test ratio
+*> T Put T to test the LAPACK routine
+*> T Put T to test the error exits
+*> DGE 11 List types on next line if 0 < NTYPES < 11
+*> DPO 9 List types on next line if 0 < NTYPES < 9
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N
+*> \endverbatim
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, NRHS, NB, and NX
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ PROGRAM ZCHKAB
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/zchkeq.f b/TESTING/LIN/zchkeq.f
index 5053ced7..38c04a05 100644
--- a/TESTING/LIN/zchkeq.f
+++ b/TESTING/LIN/zchkeq.f
@@ -1,27 +1,70 @@
- SUBROUTINE ZCHKEQ( THRESH, NOUT )
+*> \brief \b ZCHKEQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NOUT
- DOUBLE PRECISION THRESH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZCHKEQ( THRESH, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NOUT
+* DOUBLE PRECISION THRESH
+* ..
+*
* Purpose
* =======
*
-* ZCHKEQ tests ZGEEQU, ZGBEQU, ZPOEQU, ZPPEQU and ZPBEQU
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKEQ tests ZGEEQU, ZGBEQU, ZPOEQU, ZPPEQU and ZPBEQU
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* THRESH (input) DOUBLE PRECISION
-* Threshold for testing routines. Should be between 2 and 10.
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> Threshold for testing routines. Should be between 2 and 10.
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NOUT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZCHKEQ( THRESH, NOUT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NOUT
+ DOUBLE PRECISION THRESH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zchkgb.f b/TESTING/LIN/zchkgb.f
index 60c69785..0fd52d55 100644
--- a/TESTING/LIN/zchkgb.f
+++ b/TESTING/LIN/zchkgb.f
@@ -1,10 +1,202 @@
+*> \brief \b ZCHKGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
+* NSVAL, THRESH, TSTERR, A, LA, AFAC, LAFAC, B,
+* X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFAC, NM, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKGB tests ZGBTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (KLMAX+KUMAX+1)*NMAX
+*> where KLMAX is the largest entry in the local array KLVAL,
+*> KUMAX is the largest entry in the local array KUVAL and
+*> NMAX is the largest entry in the input array NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (LAFAC)
+*> \endverbatim
+*>
+*> \param[in] LAFAC
+*> \verbatim
+*> LAFAC is INTEGER
+*> The length of the array AFAC. LAFAC >= (2*KLMAX+KUMAX+1)*NMAX
+*> where KLMAX is the largest entry in the local array KLVAL,
+*> KUMAX is the largest entry in the local array KUVAL and
+*> NMAX is the largest entry in the input array NVAL.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKGB( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
$ NSVAL, THRESH, TSTERR, A, LA, AFAC, LAFAC, B,
$ X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,84 +212,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKGB tests ZGBTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (KLMAX+KUMAX+1)*NMAX
-* where KLMAX is the largest entry in the local array KLVAL,
-* KUMAX is the largest entry in the local array KUVAL and
-* NMAX is the largest entry in the input array NVAL.
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (LAFAC)
-*
-* LAFAC (input) INTEGER
-* The length of the array AFAC. LAFAC >= (2*KLMAX+KUMAX+1)*NMAX
-* where KLMAX is the largest entry in the local array KLVAL,
-* KUMAX is the largest entry in the local array KUVAL and
-* NMAX is the largest entry in the input array NVAL.
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX,NMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkge.f b/TESTING/LIN/zchkge.f
index 0fced985..8d05756a 100644
--- a/TESTING/LIN/zchkge.f
+++ b/TESTING/LIN/zchkge.f
@@ -1,10 +1,204 @@
+*> \brief \b ZCHKGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
+* NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
+* X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKGE tests ZGETRF, -TRI, -TRS, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(2*NMAX,2*NSMAX+NWORK))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKGE( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NNS,
$ NSVAL, THRESH, TSTERR, NMAX, A, AFAC, AINV, B,
$ X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +214,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKGE tests ZGETRF, -TRI, -TRS, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(2*NMAX,2*NSMAX+NWORK))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkgt.f b/TESTING/LIN/zchkgt.f
index 601afb99..c261cfc0 100644
--- a/TESTING/LIN/zchkgt.f
+++ b/TESTING/LIN/zchkgt.f
@@ -1,9 +1,158 @@
+*> \brief \b ZCHKGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AF( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKGT tests ZGTTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX)+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKGT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ A, AF, B, X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,61 +167,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKGT tests ZGTTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*4)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*4)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX)+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkhe.f b/TESTING/LIN/zchkhe.f
index 1802b47e..2d18772b 100644
--- a/TESTING/LIN/zchkhe.f
+++ b/TESTING/LIN/zchkhe.f
@@ -1,10 +1,184 @@
+*> \brief \b ZCHKHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKHE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKHE tests ZHETRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKHE( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,73 +193,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKHE tests ZHETRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkhp.f b/TESTING/LIN/zchkhp.f
index ff07c588..b3618a35 100644
--- a/TESTING/LIN/zchkhp.f
+++ b/TESTING/LIN/zchkhp.f
@@ -1,10 +1,175 @@
+*> \brief \b ZCHKHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKHP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKHP tests ZHPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKHP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +184,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKHP tests ZHPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array,
-* dimension (NMAX+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchklq.f b/TESTING/LIN/zchklq.f
index 0307a4f7..d537296a 100644
--- a/TESTING/LIN/zchklq.f
+++ b/TESTING/LIN/zchklq.f
@@ -1,10 +1,207 @@
+*> \brief \b ZCHKLQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
+* B, X, XACT, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AC( * ), AF( * ), AL( * ), AQ( * ),
+* $ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKLQ tests ZGELQF, ZUNGLQ and CUNMLQ.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AL
+*> \verbatim
+*> AL is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKLQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
$ B, X, XACT, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +217,6 @@
$ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKLQ tests ZGELQF, ZUNGLQ and CUNMLQ.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AL (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) COMPLEX*16 array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkpb.f b/TESTING/LIN/zchkpb.f
index 8d256a15..e2b23b2f 100644
--- a/TESTING/LIN/zchkpb.f
+++ b/TESTING/LIN/zchkpb.f
@@ -1,10 +1,179 @@
+*> \brief \b ZCHKPB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKPB( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKPB tests ZPBTRF, -TRS, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is DOUBLE PRECISION array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is DOUBLE PRECISION array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKPB( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,71 +188,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKPB tests ZPBTRF, -TRS, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) DOUBLE PRECISION array, dimension (NMAX*NMAX)
-*
-* B (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) DOUBLE PRECISION array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkpo.f b/TESTING/LIN/zchkpo.f
index 8164e894..cf32b065 100644
--- a/TESTING/LIN/zchkpo.f
+++ b/TESTING/LIN/zchkpo.f
@@ -1,10 +1,179 @@
+*> \brief \b ZCHKPO
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKPO( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKPO tests ZPOTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKPO( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,71 +188,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKPO tests ZPOTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (NMAX+2*NSMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkpp.f b/TESTING/LIN/zchkpp.f
index d8a8366c..cc27555a 100644
--- a/TESTING/LIN/zchkpp.f
+++ b/TESTING/LIN/zchkpp.f
@@ -1,10 +1,170 @@
+*> \brief \b ZCHKPP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKPP tests ZPPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKPP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,68 +179,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKPP tests ZPPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkps.f b/TESTING/LIN/zchkps.f
index 20e199a2..110c51e1 100644
--- a/TESTING/LIN/zchkps.f
+++ b/TESTING/LIN/zchkps.f
@@ -1,10 +1,165 @@
+*> \brief \b ZCHKPS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKPS( DOTYPE, NN, NVAL, NNB, NBVAL, NRANK, RANKVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, PERM, PIV, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION THRESH
+* INTEGER NMAX, NN, NNB, NOUT, NRANK
+* LOGICAL TSTERR
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( * ), AFAC( * ), PERM( * ), WORK( * )
+* DOUBLE PRECISION RWORK( * )
+* INTEGER NBVAL( * ), NVAL( * ), PIV( * ), RANKVAL( * )
+* LOGICAL DOTYPE( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKPS tests ZPSTRF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the block size NB.
+*> \endverbatim
+*>
+*> \param[in] NRANK
+*> \verbatim
+*> NRANK is INTEGER
+*> The number of values of RANK contained in the vector RANKVAL.
+*> \endverbatim
+*>
+*> \param[in] RANKVAL
+*> \verbatim
+*> RANKVAL is INTEGER array, dimension (NBVAL)
+*> The values of the block size NB.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*3)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKPS( DOTYPE, NN, NVAL, NNB, NBVAL, NRANK, RANKVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, PERM, PIV, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* -- April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION THRESH
@@ -18,64 +173,6 @@
LOGICAL DOTYPE( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKPS tests ZPSTRF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the block size NB.
-*
-* NRANK (input) INTEGER
-* The number of values of RANK contained in the vector RANKVAL.
-*
-* RANKVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the block size NB.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* PERM (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* PIV (workspace) INTEGER array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*3)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkpt.f b/TESTING/LIN/zchkpt.f
index fbbda023..b7a45fa8 100644
--- a/TESTING/LIN/zchkpt.f
+++ b/TESTING/LIN/zchkpt.f
@@ -1,9 +1,158 @@
+*> \brief \b ZCHKPT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* A, D, E, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION D( * ), RWORK( * )
+* COMPLEX*16 A( * ), B( * ), E( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKPT tests ZPTTRF, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKPT( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ A, D, E, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,61 +167,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKPT tests ZPTTRF, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*2)
-*
-* D (workspace) DOUBLE PRECISION array, dimension (NMAX*2)
-*
-* E (workspace) COMPLEX*16 array, dimension (NMAX*2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkq3.f b/TESTING/LIN/zchkq3.f
index 8cb77610..35fc8ce7 100644
--- a/TESTING/LIN/zchkq3.f
+++ b/TESTING/LIN/zchkq3.f
@@ -1,10 +1,169 @@
+*> \brief \b ZCHKQ3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* THRESH, A, COPYA, S, TAU, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NM, NN, NNB, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION S( * ), RWORK( * )
+* COMPLEX*16 A( * ), COPYA( * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKQ3 tests ZGEQP3.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is COMPLEX*16 array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (max(M*max(M,N) + 4*min(M,N) + max(M,N)))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (4*NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKQ3( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ THRESH, A, COPYA, S, TAU, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NM, NN, NNB, NOUT
@@ -18,68 +177,6 @@
COMPLEX*16 A( * ), COPYA( * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKQ3 tests ZGEQP3.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) COMPLEX*16 array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) COMPLEX*16 array, dimension (MMAX*NMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) COMPLEX*16 array, dimension (MMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (max(M*max(M,N) + 4*min(M,N) + max(M,N)))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (4*NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkql.f b/TESTING/LIN/zchkql.f
index 1976af84..76420c1b 100644
--- a/TESTING/LIN/zchkql.f
+++ b/TESTING/LIN/zchkql.f
@@ -1,10 +1,207 @@
+*> \brief \b ZCHKQL
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
+* B, X, XACT, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AC( * ), AF( * ), AL( * ), AQ( * ),
+* $ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKQL tests ZGEQLF, ZUNGQL and CUNMQL.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AL
+*> \verbatim
+*> AL is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKQL( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AL, AC,
$ B, X, XACT, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,83 +217,6 @@
$ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKQL tests ZGEQLF, ZUNGQL and CUNMQL.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AL (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) COMPLEX*16 array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkqp.f b/TESTING/LIN/zchkqp.f
index 724fea2a..7c5b4aed 100644
--- a/TESTING/LIN/zchkqp.f
+++ b/TESTING/LIN/zchkqp.f
@@ -1,10 +1,155 @@
+*> \brief \b ZCHKQP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
+* COPYA, S, TAU, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NVAL( * )
+* DOUBLE PRECISION S( * ), RWORK( * )
+* COMPLEX*16 A( * ), COPYA( * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKQP tests ZGEQPF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is COMPLEX*16 array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (max(M*max(M,N) + 4*min(M,N) + max(M,N)))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (4*NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKQP( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
$ COPYA, S, TAU, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,60 +163,6 @@
COMPLEX*16 A( * ), COPYA( * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKQP tests ZGEQPF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) COMPLEX*16 array, dimension (MMAX*NMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) COMPLEX*16 array, dimension (MMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (max(M*max(M,N) + 4*min(M,N) + max(M,N)))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (4*NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkqr.f b/TESTING/LIN/zchkqr.f
index e7fd6561..d5f5d03e 100644
--- a/TESTING/LIN/zchkqr.f
+++ b/TESTING/LIN/zchkqr.f
@@ -1,10 +1,212 @@
+*> \brief \b ZCHKQR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AC( * ), AF( * ), AQ( * ), AR( * ),
+* $ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKQR tests ZGEQRF, ZUNGQR and CUNMQR.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKQR( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKQR tests ZGEQRF, ZUNGQR and CUNMQR.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AR (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) COMPLEX*16 array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchkrfp.f b/TESTING/LIN/zchkrfp.f
index 4b0b9696..6f739ba2 100644
--- a/TESTING/LIN/zchkrfp.f
+++ b/TESTING/LIN/zchkrfp.f
@@ -1,37 +1,75 @@
- PROGRAM ZCHKRFP
- IMPLICIT NONE
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+*> \brief \b ZCHKRFP
*
-* Purpose
-* =======
+* =========== DOCUMENTATION ===========
*
-* ZCHKRFP is the main test program for the COMPLEX*16 linear equation
-* routines with RFP storage format
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
*
-* Internal Parameters
-* ===================
+* PROGRAM ZCHKRFP
+*
+* Purpose
+* =======
*
-* MAXIN INTEGER
-* The number of different values that can be used for each of
-* M, N, or NB
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKRFP is the main test program for the COMPLEX*16 linear equation
+*> routines with RFP storage format
+*>
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> MAXIN INTEGER
+*> The number of different values that can be used for each of
+*> M, N, or NB
+*> \endverbatim
+*> \verbatim
+*> MAXRHS INTEGER
+*> The maximum number of right hand sides
+*> \endverbatim
+*> \verbatim
+*> NTYPES INTEGER
+*> \endverbatim
+*> \verbatim
+*> NMAX INTEGER
+*> The maximum allowable value for N.
+*> \endverbatim
+*> \verbatim
+*> NIN INTEGER
+*> The unit number for input
+*> \endverbatim
+*> \verbatim
+*> NOUT INTEGER
+*> The unit number for output
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* MAXRHS INTEGER
-* The maximum number of right hand sides
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NTYPES INTEGER
+*> \date November 2011
*
-* NMAX INTEGER
-* The maximum allowable value for N.
+*> \ingroup complex16_lin
*
-* NIN INTEGER
-* The unit number for input
+* =====================================================================
+ PROGRAM ZCHKRFP
*
-* NOUT INTEGER
-* The unit number for output
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* =====================================================================
*
diff --git a/TESTING/LIN/zchkrq.f b/TESTING/LIN/zchkrq.f
index 7d2597d0..9fa1d42f 100644
--- a/TESTING/LIN/zchkrq.f
+++ b/TESTING/LIN/zchkrq.f
@@ -1,10 +1,212 @@
+*> \brief \b ZCHKRQ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
+* NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
+* B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NMAX, NN, NNB, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NVAL( * ),
+* $ NXVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AC( * ), AF( * ), AQ( * ), AR( * ),
+* $ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKRQ tests ZGERQF, ZUNGRQ and CUNMRQ.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AQ
+*> \verbatim
+*> AQ is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AR
+*> \verbatim
+*> AR is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AC
+*> \verbatim
+*> AC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKRQ( DOTYPE, NM, MVAL, NN, NVAL, NNB, NBVAL, NXVAL,
$ NRHS, THRESH, TSTERR, NMAX, A, AF, AQ, AR, AC,
$ B, X, XACT, TAU, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,85 +222,6 @@
$ B( * ), TAU( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKRQ tests ZGERQF, ZUNGRQ and CUNMRQ.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AQ (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AR (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* TAU (workspace) COMPLEX*16 array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchksp.f b/TESTING/LIN/zchksp.f
index d6d3bcc0..9ea060a4 100644
--- a/TESTING/LIN/zchksp.f
+++ b/TESTING/LIN/zchksp.f
@@ -1,10 +1,175 @@
+*> \brief \b ZCHKSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
+* IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKSP tests ZSPTRF, -TRI, -TRS, -RFS, and -CON
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKSP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, A, AFAC, AINV, B, X, XACT, WORK, RWORK,
$ IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +184,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKSP tests ZSPTRF, -TRI, -TRS, -RFS, and -CON
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array,
-* dimension (NMAX+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchksy.f b/TESTING/LIN/zchksy.f
index cddc77d2..d985b7e1 100644
--- a/TESTING/LIN/zchksy.f
+++ b/TESTING/LIN/zchksy.f
@@ -1,10 +1,184 @@
+*> \brief \b ZCHKSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
+* XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKSY tests ZSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NBVAL)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array,
+*> dimension (NMAX+2*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKSY( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AFAC, AINV, B, X,
$ XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,73 +193,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKSY tests ZSYTRF, -TRI2, -TRS, -TRS2, -RFS, and -CON.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NBVAL)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array,
-* dimension (NMAX+2*NSMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchktb.f b/TESTING/LIN/zchktb.f
index a3517c38..88f7333d 100644
--- a/TESTING/LIN/zchktb.f
+++ b/TESTING/LIN/zchktb.f
@@ -1,9 +1,160 @@
+*> \brief \b ZCHKTB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, AB, AINV, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AB( * ), AINV( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKTB tests ZTBTRS, -RFS, and -CON, and ZLATBS.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays.
+*> NMAX >= the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKTB( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, AB, AINV, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,63 +169,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKTB tests ZTBTRS, -RFS, and -CON, and ZLATBS.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays.
-* NMAX >= the maximum value of N in NVAL.
-*
-* AB (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchktp.f b/TESTING/LIN/zchktp.f
index 8e8ae6e6..04aa67a6 100644
--- a/TESTING/LIN/zchktp.f
+++ b/TESTING/LIN/zchktp.f
@@ -1,10 +1,162 @@
+*> \brief \b ZCHKTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
+* NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AINVP( * ), AP( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKTP tests ZTPTRI, -TRS, -RFS, and -CON, and ZLATPS
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays. NMAX >= the
+*> maximumm value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINVP
+*> \verbatim
+*> AINVP is COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKTP( DOTYPE, NN, NVAL, NNS, NSVAL, THRESH, TSTERR,
$ NMAX, AP, AINVP, B, X, XACT, WORK, RWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,63 +171,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKTP tests ZTPTRI, -TRS, -RFS, and -CON, and ZLATPS
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays. NMAX >= the
-* maximumm value of N in NVAL.
-*
-* AP (workspace) COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
-*
-* AINVP (workspace) COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchktr.f b/TESTING/LIN/zchktr.f
index b0e0e52f..16fb8ed3 100644
--- a/TESTING/LIN/zchktr.f
+++ b/TESTING/LIN/zchktr.f
@@ -1,10 +1,174 @@
+*> \brief \b ZCHKTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
+* THRESH, TSTERR, NMAX, A, AINV, B, X, XACT,
+* WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NBVAL( * ), NSVAL( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AINV( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKTR tests ZTRTRI, -TRS, -RFS, and -CON, and ZLATRS
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB contained in the vector NBVAL.
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The leading dimension of the work arrays.
+*> NMAX >= the maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NSMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKTR( DOTYPE, NN, NVAL, NNB, NBVAL, NNS, NSVAL,
$ THRESH, TSTERR, NMAX, A, AINV, B, X, XACT,
$ WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,69 +183,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKTR tests ZTRTRI, -TRS, -RFS, and -CON, and ZLATRS
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB contained in the vector NBVAL.
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The leading dimension of the work arrays.
-* NMAX >= the maximum value of N in NVAL.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NSMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zchktz.f b/TESTING/LIN/zchktz.f
index e90e5d7d..a8810f9f 100644
--- a/TESTING/LIN/zchktz.f
+++ b/TESTING/LIN/zchktz.f
@@ -1,9 +1,148 @@
+*> \brief \b ZCHKTZ
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
+* COPYA, S, TAU, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NVAL( * )
+* DOUBLE PRECISION S( * ), RWORK( * )
+* COMPLEX*16 A( * ), COPYA( * ), TAU( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZCHKTZ tests ZTZRQF and ZTZRZF.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is COMPLEX*16 array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (MMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZCHKTZ( DOTYPE, NM, MVAL, NN, NVAL, THRESH, TSTERR, A,
$ COPYA, S, TAU, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -17,58 +156,6 @@
COMPLEX*16 A( * ), COPYA( * ), TAU( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZCHKTZ tests ZTZRQF and ZTZRZF.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) COMPLEX*16 array, dimension (MMAX*NMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* TAU (workspace) COMPLEX*16 array, dimension (MMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvab.f b/TESTING/LIN/zdrvab.f
index 2f0128ca..4bbe1aed 100644
--- a/TESTING/LIN/zdrvab.f
+++ b/TESTING/LIN/zdrvab.f
@@ -1,11 +1,163 @@
+*> \brief \b ZDRVAB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVAB( DOTYPE, NM, MVAL, NNS,
+* NSVAL, THRESH, NMAX, A, AFAC, B,
+* X, WORK, RWORK, SWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NM, NMAX, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NSVAL( * ), IWORK( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX SWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), B( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVAB tests ZCGESV
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for M or N, used in dimensioning
+*> the work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> where NSMAX is the largest entry in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX*2))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> NMAX
+*> \endverbatim
+*>
+*> \param[out] SWORK
+*> \verbatim
+*> SWORK is COMPLEX array, dimension
+*> (NMAX*(NSMAX+NMAX))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension
+*> NMAX
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVAB( DOTYPE, NM, MVAL, NNS,
$ NSVAL, THRESH, NMAX, A, AFAC, B,
$ X, WORK, RWORK, SWORK, IWORK, NOUT )
- IMPLICIT NONE
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NM, NMAX, NNS, NOUT
@@ -20,64 +172,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVAB tests ZCGESV
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for M or N, used in dimensioning
-* the work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-* where NSMAX is the largest entry in NSVAL.
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX*2))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* NMAX
-*
-* SWORK (workspace) COMPLEX array, dimension
-* (NMAX*(NSMAX+NMAX))
-*
-* IWORK (workspace) INTEGER array, dimension
-* NMAX
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvac.f b/TESTING/LIN/zdrvac.f
index 04bdcf79..d528cd18 100644
--- a/TESTING/LIN/zdrvac.f
+++ b/TESTING/LIN/zdrvac.f
@@ -1,10 +1,156 @@
+*> \brief \b ZDRVAC
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVAC( DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX,
+* A, AFAC, B, X, WORK,
+* RWORK, SWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* INTEGER NMAX, NM, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER MVAL( * ), NSVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX SWORK(*)
+* COMPLEX*16 A( * ), AFAC( * ), B( * ),
+* $ WORK( * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVAC tests ZCPOSV.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of N contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NSMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(2*NMAX,2*NSMAX+NWORK))
+*> \endverbatim
+*>
+*> \param[out] SWORK
+*> \verbatim
+*> SWORK is COMPLEX array, dimension
+*> (NMAX*(NSMAX+NMAX))
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVAC( DOTYPE, NM, MVAL, NNS, NSVAL, THRESH, NMAX,
$ A, AFAC, B, X, WORK,
$ RWORK, SWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* May 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NMAX, NM, NNS, NOUT
@@ -19,60 +165,6 @@
$ WORK( * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVAC tests ZCPOSV.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NM (input) INTEGER
-* The number of values of N contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NSMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NSMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(2*NMAX,2*NSMAX+NWORK))
-*
-* SWORK (workspace) COMPLEX array, dimension
-* (NMAX*(NSMAX+NMAX))
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvgb.f b/TESTING/LIN/zdrvgb.f
index d7baa097..9adea836 100644
--- a/TESTING/LIN/zdrvgb.f
+++ b/TESTING/LIN/zdrvgb.f
@@ -1,10 +1,183 @@
+*> \brief \b ZDRVGB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
+* AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFB, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVGB tests the driver routines ZGBSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (2*NMAX-1)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFB
+*> \verbatim
+*> AFB is COMPLEX*16 array, dimension (LAFB)
+*> \endverbatim
+*>
+*> \param[in] LAFB
+*> \verbatim
+*> LAFB is INTEGER
+*> The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
$ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,72 +192,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVGB tests the driver routines ZGBSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (2*NMAX-1)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* AFB (workspace) COMPLEX*16 array, dimension (LAFB)
-*
-* LAFB (input) INTEGER
-* The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (LA)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS,NMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvgbx.f b/TESTING/LIN/zdrvgbx.f
index 2ef7b8a5..085ff4a5 100644
--- a/TESTING/LIN/zdrvgbx.f
+++ b/TESTING/LIN/zdrvgbx.f
@@ -1,10 +1,186 @@
+*> \brief \b ZDRVGBX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
+* AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER LA, LAFB, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( * ), AFB( * ), ASAV( * ), B( * ), BSAV( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVGB tests the driver routines ZGBSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zdrvgb.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[in] LA
+*> \verbatim
+*> LA is INTEGER
+*> The length of the array A. LA >= (2*NMAX-1)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] AFB
+*> \verbatim
+*> AFB is COMPLEX*16 array, dimension (LAFB)
+*> \endverbatim
+*>
+*> \param[in] LAFB
+*> \verbatim
+*> LAFB is INTEGER
+*> The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
+*> where NMAX is the largest entry in NVAL.
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (LA)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS,NMAX))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension
+*> (max(NMAX,2*NRHS))
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVGB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, LA,
$ AFB, LAFB, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,75 +195,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVGB tests the driver routines ZGBSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zdrvgb.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (LA)
-*
-* LA (input) INTEGER
-* The length of the array A. LA >= (2*NMAX-1)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* AFB (workspace) COMPLEX*16 array, dimension (LAFB)
-*
-* LAFB (input) INTEGER
-* The length of the array AFB. LAFB >= (3*NMAX-2)*NMAX
-* where NMAX is the largest entry in NVAL.
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (LA)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS,NMAX))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension
-* (max(NMAX,2*NRHS))
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvge.f b/TESTING/LIN/zdrvge.f
index 0bab5e41..f67ffc77 100644
--- a/TESTING/LIN/zdrvge.f
+++ b/TESTING/LIN/zdrvge.f
@@ -1,10 +1,175 @@
+*> \brief \b ZDRVGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVGE tests the driver routines ZGESV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*NRHS+NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,67 +184,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVGE tests the driver routines ZGESV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*NRHS+NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvgex.f b/TESTING/LIN/zdrvgex.f
index 4dcd1fa7..0b016572 100644
--- a/TESTING/LIN/zdrvgex.f
+++ b/TESTING/LIN/zdrvgex.f
@@ -1,10 +1,178 @@
+*> \brief \b ZDRVGEX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVGE tests the driver routines ZGESV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zdrvge.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*NRHS+NMAX)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVGE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,70 +187,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVGE tests the driver routines ZGESV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zdrvge.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (2*NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*NRHS+NMAX)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvgt.f b/TESTING/LIN/zdrvgt.f
index cd34a3f0..91cf6cba 100644
--- a/TESTING/LIN/zdrvgt.f
+++ b/TESTING/LIN/zdrvgt.f
@@ -1,9 +1,144 @@
+*> \brief \b ZDRVGT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, AF,
+* B, X, XACT, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AF( * ), B( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVGT tests ZGTSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (NMAX*4)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (2*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVGT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, AF,
$ B, X, XACT, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,53 +153,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVGT tests ZGTSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*4)
-*
-* AF (workspace) COMPLEX*16 array, dimension (NMAX*4)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (2*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvhe.f b/TESTING/LIN/zdrvhe.f
index a1b51e67..0bbc1217 100644
--- a/TESTING/LIN/zdrvhe.f
+++ b/TESTING/LIN/zdrvhe.f
@@ -1,10 +1,165 @@
+*> \brief \b ZDRVHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVHE tests the driver routines ZHESV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,63 +174,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVHE tests the driver routines ZHESV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvhex.f b/TESTING/LIN/zdrvhex.f
index 38b5497a..00d07d04 100644
--- a/TESTING/LIN/zdrvhex.f
+++ b/TESTING/LIN/zdrvhex.f
@@ -1,10 +1,168 @@
+*> \brief \b ZDRVHEX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVHE tests the driver routines ZHESV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zdrvhe.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVHE( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,66 +177,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVHE tests the driver routines ZHESV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zdrvhe.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvhp.f b/TESTING/LIN/zdrvhp.f
index cab25cf2..db261774 100644
--- a/TESTING/LIN/zdrvhp.f
+++ b/TESTING/LIN/zdrvhp.f
@@ -1,10 +1,168 @@
+*> \brief \b ZDRVHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVHP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVHP tests the driver routines ZHPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVHP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,66 +177,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVHP tests the driver routines ZHPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvls.f b/TESTING/LIN/zdrvls.f
index dd80058e..a7455530 100644
--- a/TESTING/LIN/zdrvls.f
+++ b/TESTING/LIN/zdrvls.f
@@ -1,10 +1,220 @@
+*> \brief \b ZDRVLS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
+* NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
+* COPYB, C, S, COPYS, WORK, RWORK, IWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NM, NN, NNB, NNS, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), MVAL( * ), NBVAL( * ), NSVAL( * ),
+* $ NVAL( * ), NXVAL( * )
+* DOUBLE PRECISION COPYS( * ), RWORK( * ), S( * )
+* COMPLEX*16 A( * ), B( * ), C( * ), COPYA( * ), COPYB( * ),
+* $ WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVLS tests the least squares driver routines ZGELS, CGELSX, CGELSS,
+*> ZGELSY and CGELSD.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> The matrix of type j is generated as follows:
+*> j=1: A = U*D*V where U and V are random unitary matrices
+*> and D has random entries (> 0.1) taken from a uniform
+*> distribution (0,1). A is full rank.
+*> j=2: The same of 1, but A is scaled up.
+*> j=3: The same of 1, but A is scaled down.
+*> j=4: A = U*D*V where U and V are random unitary matrices
+*> and D has 3*min(M,N)/4 random entries (> 0.1) taken
+*> from a uniform distribution (0,1) and the remaining
+*> entries set to 0. A is rank-deficient.
+*> j=5: The same of 4, but A is scaled up.
+*> j=6: The same of 5, but A is scaled down.
+*> \endverbatim
+*>
+*> \param[in] NM
+*> \verbatim
+*> NM is INTEGER
+*> The number of values of M contained in the vector MVAL.
+*> \endverbatim
+*>
+*> \param[in] MVAL
+*> \verbatim
+*> MVAL is INTEGER array, dimension (NM)
+*> The values of the matrix row dimension M.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix column dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNB
+*> \verbatim
+*> NNB is INTEGER
+*> The number of values of NB and NX contained in the
+*> vectors NBVAL and NXVAL. The blocking parameters are used
+*> in pairs (NB,NX).
+*> \endverbatim
+*>
+*> \param[in] NBVAL
+*> \verbatim
+*> NBVAL is INTEGER array, dimension (NNB)
+*> The values of the blocksize NB.
+*> \endverbatim
+*>
+*> \param[in] NXVAL
+*> \verbatim
+*> NXVAL is INTEGER array, dimension (NNB)
+*> The values of the crossover point NX.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (MMAX*NMAX)
+*> where MMAX is the maximum value of M in MVAL and NMAX is the
+*> maximum value of N in NVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYA
+*> \verbatim
+*> COPYA is COMPLEX*16 array, dimension (MMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (MMAX*NSMAX)
+*> where MMAX is the maximum value of M in MVAL and NSMAX is the
+*> maximum value of NRHS in NSVAL.
+*> \endverbatim
+*>
+*> \param[out] COPYB
+*> \verbatim
+*> COPYB is COMPLEX*16 array, dimension (MMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (MMAX*NSMAX)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] COPYS
+*> \verbatim
+*> COPYS is DOUBLE PRECISION array, dimension
+*> (min(MMAX,NMAX))
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (MMAX*NMAX + 4*NMAX + MMAX).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (5*NMAX-1)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (15*NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVLS( DOTYPE, NM, MVAL, NN, NVAL, NNS, NSVAL, NNB,
$ NBVAL, NXVAL, THRESH, TSTERR, A, COPYA, B,
$ COPYB, C, S, COPYS, WORK, RWORK, IWORK, NOUT )
*
* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -20,99 +230,6 @@
$ WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVLS tests the least squares driver routines ZGELS, CGELSX, CGELSS,
-* ZGELSY and CGELSD.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-* The matrix of type j is generated as follows:
-* j=1: A = U*D*V where U and V are random unitary matrices
-* and D has random entries (> 0.1) taken from a uniform
-* distribution (0,1). A is full rank.
-* j=2: The same of 1, but A is scaled up.
-* j=3: The same of 1, but A is scaled down.
-* j=4: A = U*D*V where U and V are random unitary matrices
-* and D has 3*min(M,N)/4 random entries (> 0.1) taken
-* from a uniform distribution (0,1) and the remaining
-* entries set to 0. A is rank-deficient.
-* j=5: The same of 4, but A is scaled up.
-* j=6: The same of 5, but A is scaled down.
-*
-* NM (input) INTEGER
-* The number of values of M contained in the vector MVAL.
-*
-* MVAL (input) INTEGER array, dimension (NM)
-* The values of the matrix row dimension M.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix column dimension N.
-*
-* NNB (input) INTEGER
-* The number of values of NB and NX contained in the
-* vectors NBVAL and NXVAL. The blocking parameters are used
-* in pairs (NB,NX).
-*
-* NBVAL (input) INTEGER array, dimension (NNB)
-* The values of the blocksize NB.
-*
-* NXVAL (input) INTEGER array, dimension (NNB)
-* The values of the crossover point NX.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right hand sides NRHS.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (MMAX*NMAX)
-* where MMAX is the maximum value of M in MVAL and NMAX is the
-* maximum value of N in NVAL.
-*
-* COPYA (workspace) COMPLEX*16 array, dimension (MMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (MMAX*NSMAX)
-* where MMAX is the maximum value of M in MVAL and NSMAX is the
-* maximum value of NRHS in NSVAL.
-*
-* COPYB (workspace) COMPLEX*16 array, dimension (MMAX*NSMAX)
-*
-* C (workspace) COMPLEX*16 array, dimension (MMAX*NSMAX)
-*
-* S (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* COPYS (workspace) DOUBLE PRECISION array, dimension
-* (min(MMAX,NMAX))
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (MMAX*NMAX + 4*NMAX + MMAX).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (5*NMAX-1)
-*
-* IWORK (workspace) INTEGER array, dimension (15*NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvpb.f b/TESTING/LIN/zdrvpb.f
index 0ee9ca3a..0ea61fb7 100644
--- a/TESTING/LIN/zdrvpb.f
+++ b/TESTING/LIN/zdrvpb.f
@@ -1,10 +1,170 @@
+*> \brief \b ZDRVPB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVPB tests the driver routines ZPBSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVPB( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,65 +179,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVPB tests the driver routines ZPBSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvpo.f b/TESTING/LIN/zdrvpo.f
index e68e0d91..fb62dc74 100644
--- a/TESTING/LIN/zdrvpo.f
+++ b/TESTING/LIN/zdrvpo.f
@@ -1,10 +1,170 @@
+*> \brief \b ZDRVPO
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVPO tests the driver routines ZPOSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,65 +179,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVPO tests the driver routines ZPOSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvpox.f b/TESTING/LIN/zdrvpox.f
index 38a2e349..3207a061 100644
--- a/TESTING/LIN/zdrvpox.f
+++ b/TESTING/LIN/zdrvpox.f
@@ -1,10 +1,173 @@
+*> \brief \b ZDRVPOX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVPO tests the driver routines ZPOSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zdrvpo.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVPO( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,68 +182,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVPO tests the driver routines ZPOSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zdrvpo.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvpp.f b/TESTING/LIN/zdrvpp.f
index 162b9619..2299e4f4 100644
--- a/TESTING/LIN/zdrvpp.f
+++ b/TESTING/LIN/zdrvpp.f
@@ -1,10 +1,170 @@
+*> \brief \b ZDRVPP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
+* RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( * ), AFAC( * ), ASAV( * ), B( * ),
+* $ BSAV( * ), WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVPP tests the driver routines ZPPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVPP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, ASAV, B, BSAV, X, XACT, S, WORK,
$ RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,65 +179,6 @@
$ BSAV( * ), WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVPP tests the driver routines ZPPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* S (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvpt.f b/TESTING/LIN/zdrvpt.f
index b393e309..d9ffa4ae 100644
--- a/TESTING/LIN/zdrvpt.f
+++ b/TESTING/LIN/zdrvpt.f
@@ -1,9 +1,151 @@
+*> \brief \b ZDRVPT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
+* E, B, X, XACT, WORK, RWORK, NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER NVAL( * )
+* DOUBLE PRECISION D( * ), RWORK( * )
+* COMPLEX*16 A( * ), B( * ), E( * ), WORK( * ), X( * ),
+* $ XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVPT tests ZPTSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (NMAX*2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(3,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVPT( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, A, D,
$ E, B, X, XACT, WORK, RWORK, NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -18,57 +160,6 @@
$ XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVPT tests ZPTSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*2)
-*
-* D (workspace) DOUBLE PRECISION array, dimension (NMAX*2)
-*
-* E (workspace) COMPLEX*16 array, dimension (NMAX*2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(3,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvrf1.f b/TESTING/LIN/zdrvrf1.f
index e25863de..94623f72 100644
--- a/TESTING/LIN/zdrvrf1.f
+++ b/TESTING/LIN/zdrvrf1.f
@@ -1,52 +1,116 @@
- SUBROUTINE ZDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
-*
- IMPLICIT NONE
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
-*
-* .. Scalar Arguments ..
- INTEGER LDA, NN, NOUT
- DOUBLE PRECISION THRESH
-* ..
-* .. Array Arguments ..
- INTEGER NVAL( NN )
- DOUBLE PRECISION WORK( * )
- COMPLEX*16 A( LDA, * ), ARF( * )
-* ..
-*
+*> \brief \b ZDRVRF1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* DOUBLE PRECISION WORK( * )
+* COMPLEX*16 A( LDA, * ), ARF( * )
+* ..
+*
* Purpose
* =======
*
-* ZDRVRF1 tests the LAPACK RFP routines:
-* ZLANHF.F
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVRF1 tests the LAPACK RFP routines:
+*> ZLANHF.F
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
+*> \date November 2011
*
-* A (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
+*> \ingroup complex16_lin
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
+* =====================================================================
+ SUBROUTINE ZDRVRF1( NOUT, NN, NVAL, THRESH, A, LDA, ARF, WORK )
*
-* ARF (workspace) COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( NMAX )
+* .. Scalar Arguments ..
+ INTEGER LDA, NN, NOUT
+ DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+ INTEGER NVAL( NN )
+ DOUBLE PRECISION WORK( * )
+ COMPLEX*16 A( LDA, * ), ARF( * )
+* ..
*
* =====================================================================
* ..
diff --git a/TESTING/LIN/zdrvrf2.f b/TESTING/LIN/zdrvrf2.f
index b173d63c..734d0f92 100644
--- a/TESTING/LIN/zdrvrf2.f
+++ b/TESTING/LIN/zdrvrf2.f
@@ -1,46 +1,108 @@
- SUBROUTINE ZDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
-*
- IMPLICIT NONE
-*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
-*
-* .. Scalar Arguments ..
- INTEGER LDA, NN, NOUT
-* ..
-* .. Array Arguments ..
- INTEGER NVAL( NN )
- COMPLEX*16 A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
-* ..
-*
+*> \brief \b ZDRVRF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* COMPLEX*16 A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZDRVRF2 tests the LAPACK RFP convertion routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVRF2 tests the LAPACK RFP convertion routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] A2
+*> \verbatim
+*> A2 is COMPLEX*16 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \ingroup complex16_lin
*
-* ARF (workspace) COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
+* =====================================================================
+ SUBROUTINE ZDRVRF2( NOUT, NN, NVAL, A, LDA, ARF, AP, ASAV )
*
-* AP (workspace) COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* A2 (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
+* .. Scalar Arguments ..
+ INTEGER LDA, NN, NOUT
+* ..
+* .. Array Arguments ..
+ INTEGER NVAL( NN )
+ COMPLEX*16 A( LDA, * ), ARF( * ), AP(*), ASAV( LDA, * )
+* ..
*
* =====================================================================
* ..
diff --git a/TESTING/LIN/zdrvrf3.f b/TESTING/LIN/zdrvrf3.f
index eefdb157..7cff3319 100644
--- a/TESTING/LIN/zdrvrf3.f
+++ b/TESTING/LIN/zdrvrf3.f
@@ -1,9 +1,130 @@
+*> \brief \b ZDRVRF3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
+* + D_WORK_ZLANGE, Z_WORK_ZGEQRF, TAU )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* DOUBLE PRECISION D_WORK_ZLANGE( * )
+* COMPLEX*16 A( LDA, * ), ARF( * ), B1( LDA, * ),
+* + B2( LDA, * )
+* COMPLEX*16 Z_WORK_ZGEQRF( * ), TAU( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVRF3 tests the LAPACK RFP routines:
+*> ZTFSM
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] B1
+*> \verbatim
+*> B1 is COMPLEX*16 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] B2
+*> \verbatim
+*> B2 is COMPLEX*16 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[out] D_WORK_ZLANGE
+*> \verbatim
+*> D_WORK_ZLANGE is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] Z_WORK_ZGEQRF
+*> \verbatim
+*> Z_WORK_ZGEQRF is COMPLEX*16 array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVRF3( NOUT, NN, NVAL, THRESH, A, LDA, ARF, B1, B2,
+ D_WORK_ZLANGE, Z_WORK_ZGEQRF, TAU )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, NN, NOUT
@@ -17,46 +138,6 @@
COMPLEX*16 Z_WORK_ZGEQRF( * ), TAU( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVRF3 tests the LAPACK RFP routines:
-* ZTFSM
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* ARF (workspace) COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
-*
-* B1 (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
-*
-* B2 (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
-*
-* D_WORK_ZLANGE (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
-* Z_WORK_ZGEQRF (workspace) COMPLEX*16 array, dimension (NMAX)
-*
-* TAU (workspace) COMPLEX*16 array, dimension (NMAX)
-*
* =====================================================================
* ..
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvrf4.f b/TESTING/LIN/zdrvrf4.f
index 0f40ea33..8e9d5ac5 100644
--- a/TESTING/LIN/zdrvrf4.f
+++ b/TESTING/LIN/zdrvrf4.f
@@ -1,9 +1,125 @@
+*> \brief \b ZDRVRF4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
+* + LDA, D_WORK_ZLANGE )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDC, NN, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN )
+* DOUBLE PRECISION D_WORK_ZLANGE( * )
+* COMPLEX*16 A( LDA, * ), C1( LDC, * ), C2( LDC, *),
+* + CRF( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVRF4 tests the LAPACK RFP routines:
+*> ZHFRK
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] C1
+*> \verbatim
+*> C1 is COMPLEX*16 array, dimension (LDC,NMAX)
+*> \endverbatim
+*>
+*> \param[out] C2
+*> \verbatim
+*> C2 is COMPLEX*16 array, dimension (LDC,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] CRF
+*> \verbatim
+*> CRF is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,NMAX)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,NMAX).
+*> \endverbatim
+*>
+*> \param[out] D_WORK_ZLANGE
+*> \verbatim
+*> D_WORK_ZLANGE is DOUBLE PRECISION array, dimension (NMAX)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVRF4( NOUT, NN, NVAL, THRESH, C1, C2, LDC, CRF, A,
+ LDA, D_WORK_ZLANGE )
*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDC, NN, NOUT
@@ -16,45 +132,6 @@
+ CRF( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVRF4 tests the LAPACK RFP routines:
-* ZHFRK
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* C1 (workspace) COMPLEX*16 array, dimension (LDC,NMAX)
-*
-* C2 (workspace) COMPLEX*16 array, dimension (LDC,NMAX)
-*
-* LDC (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* CRF (workspace) COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2).
-*
-* A (workspace) COMPLEX*16 array, dimension (LDA,NMAX)
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,NMAX).
-*
-* D_WORK_ZLANGE (workspace) DOUBLE PRECISION array, dimension (NMAX)
-*
* =====================================================================
* ..
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvrfp.f b/TESTING/LIN/zdrvrfp.f
index e1ad32cd..3ced47fe 100644
--- a/TESTING/LIN/zdrvrfp.f
+++ b/TESTING/LIN/zdrvrfp.f
@@ -1,3 +1,244 @@
+*> \brief \b ZDRVRFP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
+* + THRESH, A, ASAV, AFAC, AINV, B,
+* + BSAV, XACT, X, ARF, ARFINV,
+* + Z_WORK_ZLATMS, Z_WORK_ZPOT02,
+* + Z_WORK_ZPOT03, D_WORK_ZLATMS, D_WORK_ZLANHE,
+* + D_WORK_ZPOT01, D_WORK_ZPOT02, D_WORK_ZPOT03 )
+*
+* .. Scalar Arguments ..
+* INTEGER NN, NNS, NNT, NOUT
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* INTEGER NVAL( NN ), NSVAL( NNS ), NTVAL( NNT )
+* COMPLEX*16 A( * )
+* COMPLEX*16 AINV( * )
+* COMPLEX*16 ASAV( * )
+* COMPLEX*16 B( * )
+* COMPLEX*16 BSAV( * )
+* COMPLEX*16 AFAC( * )
+* COMPLEX*16 ARF( * )
+* COMPLEX*16 ARFINV( * )
+* COMPLEX*16 XACT( * )
+* COMPLEX*16 X( * )
+* COMPLEX*16 Z_WORK_ZLATMS( * )
+* COMPLEX*16 Z_WORK_ZPOT02( * )
+* COMPLEX*16 Z_WORK_ZPOT03( * )
+* DOUBLE PRECISION D_WORK_ZLATMS( * )
+* DOUBLE PRECISION D_WORK_ZLANHE( * )
+* DOUBLE PRECISION D_WORK_ZPOT01( * )
+* DOUBLE PRECISION D_WORK_ZPOT02( * )
+* DOUBLE PRECISION D_WORK_ZPOT03( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVRFP tests the LAPACK RFP routines:
+*> ZPFTRF, ZPFTRS, and ZPFTRI.
+*>
+*> This testing routine follow the same tests as ZDRVPO (test for the full
+*> format Symmetric Positive Definite solver).
+*>
+*> The tests are performed in Full Format, convertion back and forth from
+*> full format to RFP format are performed using the routines ZTRTTF and
+*> ZTFTTR.
+*>
+*> First, a specific matrix A of size N is created. There is nine types of
+*> different matrixes possible.
+*> 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
+*> 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
+*> *3. First row and column zero 8. Scaled near underflow
+*> *4. Last row and column zero 9. Scaled near overflow
+*> *5. Middle row and column zero
+*> (* - tests error exits from ZPFTRF, no test ratios are computed)
+*> A solution XACT of size N-by-NRHS is created and the associated right
+*> hand side B as well. Then ZPFTRF is called to compute L (or U), the
+*> Cholesky factor of A. Then L (or U) is used to solve the linear system
+*> of equations AX = B. This gives X. Then L (or U) is used to compute the
+*> inverse of A, AINV. The following four tests are then performed:
+*> (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+*> where EPS is the machine precision, RCOND the condition number of A, and
+*> norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
+*> Errors occur when INFO parameter is not as expected. Failures occur when
+*> a test ratios is greater than THRES.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NNS
+*> \verbatim
+*> NNS is INTEGER
+*> The number of values of NRHS contained in the vector NSVAL.
+*> \endverbatim
+*>
+*> \param[in] NSVAL
+*> \verbatim
+*> NSVAL is INTEGER array, dimension (NNS)
+*> The values of the number of right-hand sides NRHS.
+*> \endverbatim
+*>
+*> \param[in] NNT
+*> \verbatim
+*> NNT is INTEGER
+*> The number of values of MATRIX TYPE contained in the vector NTVAL.
+*> \endverbatim
+*>
+*> \param[in] NTVAL
+*> \verbatim
+*> NTVAL is INTEGER array, dimension (NNT)
+*> The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] ASAV
+*> \verbatim
+*> ASAV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] BSAV
+*> \verbatim
+*> BSAV is COMPLEX*16 array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*MAXRHS)
+*> \endverbatim
+*>
+*> \param[out] ARF
+*> \verbatim
+*> ARF is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2)
+*> \endverbatim
+*>
+*> \param[out] ARFINV
+*> \verbatim
+*> ARFINV is COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2)
+*> \endverbatim
+*>
+*> \param[out] Z_WORK_ZLATMS
+*> \verbatim
+*> Z_WORK_ZLATMS is COMPLEX*16 array, dimension ( 3*NMAX )
+*> \endverbatim
+*>
+*> \param[out] Z_WORK_ZPOT02
+*> \verbatim
+*> Z_WORK_ZPOT02 is COMPLEX*16 array, dimension ( NMAX*MAXRHS )
+*> \endverbatim
+*>
+*> \param[out] Z_WORK_ZPOT03
+*> \verbatim
+*> Z_WORK_ZPOT03 is COMPLEX*16 array, dimension ( NMAX*NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_ZLATMS
+*> \verbatim
+*> D_WORK_ZLATMS is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_ZLANHE
+*> \verbatim
+*> D_WORK_ZLANHE is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_ZPOT01
+*> \verbatim
+*> D_WORK_ZPOT01 is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_ZPOT02
+*> \verbatim
+*> D_WORK_ZPOT02 is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*> \param[out] D_WORK_ZPOT03
+*> \verbatim
+*> D_WORK_ZPOT03 is DOUBLE PRECISION array, dimension ( NMAX )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVRFP( NOUT, NN, NVAL, NNS, NSVAL, NNT, NTVAL,
+ THRESH, A, ASAV, AFAC, AINV, B,
+ BSAV, XACT, X, ARF, ARFINV,
@@ -5,11 +246,10 @@
+ Z_WORK_ZPOT03, D_WORK_ZLATMS, D_WORK_ZLANHE,
+ D_WORK_ZPOT01, D_WORK_ZPOT02, D_WORK_ZPOT03 )
*
- IMPLICIT NONE
-*
* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER NN, NNS, NNT, NOUT
@@ -37,107 +277,6 @@
DOUBLE PRECISION D_WORK_ZPOT03( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVRFP tests the LAPACK RFP routines:
-* ZPFTRF, ZPFTRS, and ZPFTRI.
-*
-* This testing routine follow the same tests as ZDRVPO (test for the full
-* format Symmetric Positive Definite solver).
-*
-* The tests are performed in Full Format, convertion back and forth from
-* full format to RFP format are performed using the routines ZTRTTF and
-* ZTFTTR.
-*
-* First, a specific matrix A of size N is created. There is nine types of
-* different matrixes possible.
-* 1. Diagonal 6. Random, CNDNUM = sqrt(0.1/EPS)
-* 2. Random, CNDNUM = 2 7. Random, CNDNUM = 0.1/EPS
-* *3. First row and column zero 8. Scaled near underflow
-* *4. Last row and column zero 9. Scaled near overflow
-* *5. Middle row and column zero
-* (* - tests error exits from ZPFTRF, no test ratios are computed)
-* A solution XACT of size N-by-NRHS is created and the associated right
-* hand side B as well. Then ZPFTRF is called to compute L (or U), the
-* Cholesky factor of A. Then L (or U) is used to solve the linear system
-* of equations AX = B. This gives X. Then L (or U) is used to compute the
-* inverse of A, AINV. The following four tests are then performed:
-* (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
-* where EPS is the machine precision, RCOND the condition number of A, and
-* norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
-* Errors occur when INFO parameter is not as expected. Failures occur when
-* a test ratios is greater than THRES.
-*
-* Arguments
-* =========
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NNS (input) INTEGER
-* The number of values of NRHS contained in the vector NSVAL.
-*
-* NSVAL (input) INTEGER array, dimension (NNS)
-* The values of the number of right-hand sides NRHS.
-*
-* NNT (input) INTEGER
-* The number of values of MATRIX TYPE contained in the vector NTVAL.
-*
-* NTVAL (input) INTEGER array, dimension (NNT)
-* The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* ASAV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*MAXRHS)
-*
-* BSAV (workspace) COMPLEX*16 array, dimension (NMAX*MAXRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*MAXRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*MAXRHS)
-*
-* ARF (workspace) COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2)
-*
-* ARFINV (workspace) COMPLEX*16 array, dimension ((NMAX*(NMAX+1))/2)
-*
-* Z_WORK_ZLATMS (workspace) COMPLEX*16 array, dimension ( 3*NMAX )
-*
-* Z_WORK_ZPOT02 (workspace) COMPLEX*16 array, dimension ( NMAX*MAXRHS )
-*
-* Z_WORK_ZPOT03 (workspace) COMPLEX*16 array, dimension ( NMAX*NMAX )
-*
-* D_WORK_ZLATMS (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
-* D_WORK_ZLANHE (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
-* D_WORK_ZPOT01 (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
-* D_WORK_ZPOT02 (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
-* D_WORK_ZPOT03 (workspace) DOUBLE PRECISION array, dimension ( NMAX )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvsp.f b/TESTING/LIN/zdrvsp.f
index 3a1334ea..497a6e7e 100644
--- a/TESTING/LIN/zdrvsp.f
+++ b/TESTING/LIN/zdrvsp.f
@@ -1,10 +1,168 @@
+*> \brief \b ZDRVSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVSP tests the driver routines ZSPSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension
+*> (NMAX*(NMAX+1)/2)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVSP( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,66 +177,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVSP tests the driver routines ZSPSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* AINV (workspace) COMPLEX*16 array, dimension
-* (NMAX*(NMAX+1)/2)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvsy.f b/TESTING/LIN/zdrvsy.f
index cd6daa00..6432e502 100644
--- a/TESTING/LIN/zdrvsy.f
+++ b/TESTING/LIN/zdrvsy.f
@@ -1,10 +1,165 @@
+*> \brief \b ZDRVSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVSY tests the driver routines ZSYSV and -SVX.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,63 +174,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVSY tests the driver routines ZSYSV and -SVX.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zdrvsyx.f b/TESTING/LIN/zdrvsyx.f
index 1c91c3ad..9a1be837 100644
--- a/TESTING/LIN/zdrvsyx.f
+++ b/TESTING/LIN/zdrvsyx.f
@@ -1,10 +1,168 @@
+*> \brief \b ZDRVSYX
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
+* A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
+* NOUT )
+*
+* .. Scalar Arguments ..
+* LOGICAL TSTERR
+* INTEGER NMAX, NN, NOUT, NRHS
+* DOUBLE PRECISION THRESH
+* ..
+* .. Array Arguments ..
+* LOGICAL DOTYPE( * )
+* INTEGER IWORK( * ), NVAL( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), AINV( * ), B( * ),
+* $ WORK( * ), X( * ), XACT( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZDRVSY tests the driver routines ZSYSV, -SVX, and -SVXX.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zdrvsy.f defines this subroutine.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] DOTYPE
+*> \verbatim
+*> DOTYPE is LOGICAL array, dimension (NTYPES)
+*> The matrix types to be used for testing. Matrices of type j
+*> (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
+*> .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
+*> \endverbatim
+*>
+*> \param[in] NN
+*> \verbatim
+*> NN is INTEGER
+*> The number of values of N contained in the vector NVAL.
+*> \endverbatim
+*>
+*> \param[in] NVAL
+*> \verbatim
+*> NVAL is INTEGER array, dimension (NN)
+*> The values of the matrix dimension N.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors to be generated for
+*> each linear system.
+*> \endverbatim
+*>
+*> \param[in] THRESH
+*> \verbatim
+*> THRESH is DOUBLE PRECISION
+*> The threshold value for the test ratios. A result is
+*> included in the output file if RESULT >= THRESH. To have
+*> every test ratio printed, use THRESH = 0.
+*> \endverbatim
+*>
+*> \param[in] TSTERR
+*> \verbatim
+*> TSTERR is LOGICAL
+*> Flag that indicates whether error exits are to be tested.
+*> \endverbatim
+*>
+*> \param[in] NMAX
+*> \verbatim
+*> NMAX is INTEGER
+*> The maximum value permitted for N, used in dimensioning the
+*> work arrays.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (NMAX*NMAX)
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (NMAX*NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension
+*> (NMAX*max(2,NRHS))
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (NMAX)
+*> \endverbatim
+*>
+*> \param[in] NOUT
+*> \verbatim
+*> NOUT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZDRVSY( DOTYPE, NN, NVAL, NRHS, THRESH, TSTERR, NMAX,
$ A, AFAC, AINV, B, X, XACT, WORK, RWORK, IWORK,
$ NOUT )
*
* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL TSTERR
@@ -19,66 +177,6 @@
$ WORK( * ), X( * ), XACT( * )
* ..
*
-* Purpose
-* =======
-*
-* ZDRVSY tests the driver routines ZSYSV, -SVX, and -SVXX.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zdrvsy.f defines this subroutine.
-*
-* Arguments
-* =========
-*
-* DOTYPE (input) LOGICAL array, dimension (NTYPES)
-* The matrix types to be used for testing. Matrices of type j
-* (for 1 <= j <= NTYPES) are used for testing if DOTYPE(j) =
-* .TRUE.; if DOTYPE(j) = .FALSE., then type j is not used.
-*
-* NN (input) INTEGER
-* The number of values of N contained in the vector NVAL.
-*
-* NVAL (input) INTEGER array, dimension (NN)
-* The values of the matrix dimension N.
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors to be generated for
-* each linear system.
-*
-* THRESH (input) DOUBLE PRECISION
-* The threshold value for the test ratios. A result is
-* included in the output file if RESULT >= THRESH. To have
-* every test ratio printed, use THRESH = 0.
-*
-* TSTERR (input) LOGICAL
-* Flag that indicates whether error exits are to be tested.
-*
-* NMAX (input) INTEGER
-* The maximum value permitted for N, used in dimensioning the
-* work arrays.
-*
-* A (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AFAC (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* AINV (workspace) COMPLEX*16 array, dimension (NMAX*NMAX)
-*
-* B (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* X (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* XACT (workspace) COMPLEX*16 array, dimension (NMAX*NRHS)
-*
-* WORK (workspace) COMPLEX*16 array, dimension
-* (NMAX*max(2,NRHS))
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (NMAX+2*NRHS)
-*
-* IWORK (workspace) INTEGER array, dimension (NMAX)
-*
-* NOUT (input) INTEGER
-* The unit number for output.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zebchvxx.f b/TESTING/LIN/zebchvxx.f
index d5debfab..2694c93c 100644
--- a/TESTING/LIN/zebchvxx.f
+++ b/TESTING/LIN/zebchvxx.f
@@ -1,76 +1,91 @@
- SUBROUTINE ZEBCHVXX( THRESH, PATH )
- IMPLICIT NONE
-* .. Scalar Arguments ..
- DOUBLE PRECISION THRESH
- CHARACTER*3 PATH
-*
-* Purpose
-* ======
-*
-* ZEBCHVXX will run Z**SVXX on a series of Hilbert matrices and then
-* compare the error bounds returned by Z**SVXX to see if the returned
-* answer indeed falls within those bounds.
+*> \brief \b ZEBCHVXX
*
-* Eight test ratios will be computed. The tests will pass if they are .LT.
-* THRESH. There are two cases that are determined by 1 / (SQRT( N ) * EPS).
-* If that value is .LE. to the component wise reciprocal condition number,
-* it uses the guaranteed case, other wise it uses the unguaranteed case.
+* =========== DOCUMENTATION ===========
*
-* Test ratios:
-* Let Xc be X_computed and Xt be X_truth.
-* The norm used is the infinity norm.
-
-* Let A be the guaranteed case and B be the unguaranteed case.
-*
-* 1. Normwise guaranteed forward error bound.
-* A: norm ( abs( Xc - Xt ) / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ) and
-* ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N),10) * EPS.
-* If these conditions are met, the test ratio is set to be
-* ERRBND( *, nwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
-* B: For this case, CGESVXX should just return 1. If it is less than
-* one, treat it the same as in 1A. Otherwise it fails. (Set test
-* ratio to ERRBND( *, nwise_i, bnd_i ) * THRESH?)
-*
-* 2. Componentwise guaranteed forward error bound.
-* A: norm ( abs( Xc(j) - Xt(j) ) ) / norm (Xt(j)) .LE. ERRBND( *, cwise_i, bnd_i )
-* for all j .AND. ERRBND( *, cwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS.
-* If these conditions are met, the test ratio is set to be
-* ERRBND( *, cwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
-* B: Same as normwise test ratio.
-*
-* 3. Backwards error.
-* A: The test ratio is set to BERR/EPS.
-* B: Same test ratio.
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* 4. Reciprocal condition number.
-* A: A condition number is computed with Xt and compared with the one
-* returned from CGESVXX. Let RCONDc be the RCOND returned by CGESVXX
-* and RCONDt be the RCOND from the truth value. Test ratio is set to
-* MAX(RCONDc/RCONDt, RCONDt/RCONDc).
-* B: Test ratio is set to 1 / (EPS * RCONDc).
+* Definition
+* ==========
*
-* 5. Reciprocal normwise condition number.
-* A: The test ratio is set to
-* MAX(ERRBND( *, nwise_i, cond_i ) / NCOND, NCOND / ERRBND( *, nwise_i, cond_i )).
-* B: Test ratio is set to 1 / (EPS * ERRBND( *, nwise_i, cond_i )).
-*
-* 6. Reciprocal componentwise condition number.
-* A: Test ratio is set to
-* MAX(ERRBND( *, cwise_i, cond_i ) / CCOND, CCOND / ERRBND( *, cwise_i, cond_i )).
-* B: Test ratio is set to 1 / (EPS * ERRBND( *, cwise_i, cond_i )).
+* SUBROUTINE ZEBCHVXX( THRESH, PATH )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION THRESH
+* CHARACTER*3 PATH
+*
+* Purpose
+* =======
*
-* .. Parameters ..
-* NMAX is determined by the largest number in the inverse of the hilbert
-* matrix. Precision is exhausted when the largest entry in it is greater
-* than 2 to the power of the number of bits in the fraction of the data
-* type used plus one, which is 24 for single precision.
-* NMAX should be 6 for single and 11 for double.
+*>\details \b Purpose:
+*>\verbatim
+*> Purpose
+*> ======
+*>
+*> ZEBCHVXX will run Z**SVXX on a series of Hilbert matrices and then
+*> compare the error bounds returned by Z**SVXX to see if the returned
+*> answer indeed falls within those bounds.
+*>
+*> Eight test ratios will be computed. The tests will pass if they are .LT.
+*> THRESH. There are two cases that are determined by 1 / (SQRT( N ) * EPS).
+*> If that value is .LE. to the component wise reciprocal condition number,
+*> it uses the guaranteed case, other wise it uses the unguaranteed case.
+*>
+*> Test ratios:
+*> Let Xc be X_computed and Xt be X_truth.
+*> The norm used is the infinity norm.
+
+*> Let A be the guaranteed case and B be the unguaranteed case.
+*>
+*> 1. Normwise guaranteed forward error bound.
+*> A: norm ( abs( Xc - Xt ) / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ) and
+*> ERRBND( *, nwise_i, bnd_i ) .LE. MAX(SQRT(N),10) * EPS.
+*> If these conditions are met, the test ratio is set to be
+*> ERRBND( *, nwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
+*> B: For this case, CGESVXX should just return 1. If it is less than
+*> one, treat it the same as in 1A. Otherwise it fails. (Set test
+*> ratio to ERRBND( *, nwise_i, bnd_i ) * THRESH?)
+*>
+*> 2. Componentwise guaranteed forward error bound.
+*> A: norm ( abs( Xc(j) - Xt(j) ) ) / norm (Xt(j)) .LE. ERRBND( *, cwise_i, bnd_i )
+*> for all j .AND. ERRBND( *, cwise_i, bnd_i ) .LE. MAX(SQRT(N), 10) * EPS.
+*> If these conditions are met, the test ratio is set to be
+*> ERRBND( *, cwise_i, bnd_i ) / MAX(SQRT(N), 10). Otherwise it is 1/EPS.
+*> B: Same as normwise test ratio.
+*>
+*> 3. Backwards error.
+*> A: The test ratio is set to BERR/EPS.
+*> B: Same test ratio.
+*>
+*> 4. Reciprocal condition number.
+*> A: A condition number is computed with Xt and compared with the one
+*> returned from CGESVXX. Let RCONDc be the RCOND returned by CGESVXX
+*> and RCONDt be the RCOND from the truth value. Test ratio is set to
+*> MAX(RCONDc/RCONDt, RCONDt/RCONDc).
+*> B: Test ratio is set to 1 / (EPS * RCONDc).
+*>
+*> 5. Reciprocal normwise condition number.
+*> A: The test ratio is set to
+*> MAX(ERRBND( *, nwise_i, cond_i ) / NCOND, NCOND / ERRBND( *, nwise_i, cond_i )).
+*> B: Test ratio is set to 1 / (EPS * ERRBND( *, nwise_i, cond_i )).
+*>
+*> 6. Reciprocal componentwise condition number.
+*> A: Test ratio is set to
+*> MAX(ERRBND( *, cwise_i, cond_i ) / CCOND, CCOND / ERRBND( *, cwise_i, cond_i )).
+*> B: Test ratio is set to 1 / (EPS * ERRBND( *, cwise_i, cond_i )).
+*>
+*> .. Parameters ..
+*> NMAX is determined by the largest number in the inverse of the hilbert
+*> matrix. Precision is exhausted when the largest entry in it is greater
+*> than 2 to the power of the number of bits in the fraction of the data
+*> type used plus one, which is 24 for single precision.
+*> NMAX should be 6 for single and 11 for double.
INTEGER NMAX, NPARAMS, NERRBND, NTESTS, KL, KU
PARAMETER (NMAX = 10, NPARAMS = 2, NERRBND = 3,
$ NTESTS = 6)
-* .. Local Scalars ..
+*> .. Local Scalars ..
INTEGER N, NRHS, INFO, I ,J, k, NFAIL, LDA,
$ N_AUX_TESTS, LDAB, LDAFB
CHARACTER FACT, TRANS, UPLO, EQUED
@@ -85,7 +100,7 @@
$ CONDTHRESH, ERRTHRESH
COMPLEX*16 ZDUM
-* .. Local Arrays ..
+*> .. Local Arrays ..
DOUBLE PRECISION TSTRAT(NTESTS), RINV(NMAX), PARAMS(NPARAMS),
$ S(NMAX),R(NMAX),C(NMAX),RWORK(3*NMAX),
$ DIFF(NMAX, NMAX),
@@ -98,30 +113,30 @@
$ ABCOPY( (NMAX-1)+(NMAX-1)+1, NMAX ),
$ AFB( 2*(NMAX-1)+(NMAX-1)+1, NMAX )
-* .. External Functions ..
+*> .. External Functions ..
DOUBLE PRECISION DLAMCH
-* .. External Subroutines ..
+*> .. External Subroutines ..
EXTERNAL ZLAHILB, ZGESVXX, ZPOSVXX, ZSYSVXX,
$ ZGBSVXX, ZLACPY, LSAMEN
LOGICAL LSAMEN
-* .. Intrinsic Functions ..
+*> .. Intrinsic Functions ..
INTRINSIC SQRT, MAX, ABS, DBLE, DIMAG
-* .. Statement Functions ..
+*> .. Statement Functions ..
DOUBLE PRECISION CABS1
-* .. Statement Function Definitions ..
+*> .. Statement Function Definitions ..
CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
-* .. Parameters ..
+*> .. Parameters ..
INTEGER NWISE_I, CWISE_I
PARAMETER (NWISE_I = 1, CWISE_I = 1)
INTEGER BND_I, COND_I
PARAMETER (BND_I = 2, COND_I = 3)
-* Create the loop to test out the Hilbert matrices
+*> Create the loop to test out the Hilbert matrices
FACT = 'E'
UPLO = 'U'
@@ -135,7 +150,7 @@
LDAFB = 2*(NMAX-1)+(NMAX-1)+1
C2 = PATH( 2: 3 )
-* Main loop to test the different Hilbert Matrices.
+*> Main loop to test the different Hilbert Matrices.
printed_guide = .false.
@@ -148,15 +163,15 @@
NRHS = n
M = MAX(SQRT(DBLE(N)), 10.0D+0)
-* Generate the Hilbert matrix, its inverse, and the
-* right hand side, all scaled by the LCM(1,..,2N-1).
+*> Generate the Hilbert matrix, its inverse, and the
+*> right hand side, all scaled by the LCM(1,..,2N-1).
CALL ZLAHILB(N, N, A, LDA, INVHILB, LDA, B,
$ LDA, WORK, INFO, PATH)
-* Copy A into ACOPY.
+*> Copy A into ACOPY.
CALL ZLACPY('ALL', N, N, A, NMAX, ACOPY, NMAX)
-* Store A in band format for GB tests
+*> Store A in band format for GB tests
DO J = 1, N
DO I = 1, KL+KU+1
AB( I, J ) = (0.0D+0,0.0D+0)
@@ -168,7 +183,7 @@
END DO
END DO
-* Copy AB into ABCOPY.
+*> Copy AB into ABCOPY.
DO J = 1, N
DO I = 1, KL+KU+1
ABCOPY( I, J ) = (0.0D+0,0.0D+0)
@@ -176,7 +191,7 @@
END DO
CALL ZLACPY('ALL', KL+KU+1, N, AB, LDAB, ABCOPY, LDAB)
-* Call Z**SVXX with default PARAMS and N_ERR_BND = 3.
+*> Call Z**SVXX with default PARAMS and N_ERR_BND = 3.
IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
CALL ZSYSVXX(FACT, UPLO, N, NRHS, ACOPY, LDA, AF, LDA,
$ IPIV, EQUED, S, B, LDA, X, LDA, ORCOND,
@@ -222,14 +237,14 @@
END IF
END IF
-* Calculating the difference between Z**SVXX's X and the true X.
+*> Calculating the difference between Z**SVXX's X and the true X.
DO I = 1,N
DO J =1,NRHS
DIFF(I,J) = X(I,J) - INVHILB(I,J)
END DO
END DO
-* Calculating the RCOND
+*> Calculating the RCOND
RNORM = 0
RINORM = 0
IF ( LSAMEN( 2, C2, 'PO' ) .OR. LSAMEN( 2, C2, 'SY' ) .OR.
@@ -261,7 +276,7 @@
RNORM = RNORM / CABS1(A(1, 1))
RCOND = 1.0D+0/(RNORM * RINORM)
-* Calculating the R for normwise rcond.
+*> Calculating the R for normwise rcond.
DO I = 1, N
RINV(I) = 0.0D+0
END DO
@@ -271,7 +286,7 @@
END DO
END DO
-* Calculating the Normwise rcond.
+*> Calculating the Normwise rcond.
RINORM = 0.0D+0
DO I = 1, N
SUMRI = 0.0D+0
@@ -438,7 +453,7 @@ c$$$ WRITE(*,*) 'Reciprocal condition number: ',ERRBND(NRHS,cwise_i,cond
c$$$ WRITE(*,*) 'Raw error estimate: ',ERRBND(NRHS,cwise_i,rawbnd_i)
c$$$ print *, 'Info: ', info
c$$$ WRITE(*,*)
-* WRITE(*,*) 'TSTRAT: ',TSTRAT
+*> WRITE(*,*) 'TSTRAT: ',TSTRAT
END DO
@@ -454,7 +469,7 @@ c$$$ WRITE(*,*)
9998 FORMAT( ' Z', A2, 'SVXX: ', I6, ' out of ', I6,
$ ' tests failed to pass the threshold' )
9997 FORMAT( ' Z', A2, 'SVXX passed the tests of error bounds' )
-* Test ratios.
+*> Test ratios.
9996 FORMAT( 3X, I2, ': Normwise guaranteed forward error', / 5X,
$ 'Guaranteed case: if norm ( abs( Xc - Xt )',
$ ' / norm ( Xt ) .LE. ERRBND( *, nwise_i, bnd_i ), then',
@@ -472,3 +487,33 @@ c$$$ WRITE(*,*)
$ ', ORCOND = ', G12.5, ', real RCOND = ', G12.5 )
END
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZEBCHVXX( THRESH, PATH )
+*
+* -- LAPACK test routine (input) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ DOUBLE PRECISION THRESH
+ CHARACTER*3 PATH
+*
diff --git a/TESTING/LIN/zerrab.f b/TESTING/LIN/zerrab.f
index f5c109cd..04dab879 100644
--- a/TESTING/LIN/zerrab.f
+++ b/TESTING/LIN/zerrab.f
@@ -1,23 +1,62 @@
- SUBROUTINE ZERRAB( NUNIT )
+*> \brief \b ZERRAB
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRAB( NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* DERRAB tests the error exits for ZCGESV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DERRAB tests the error exits for ZCGESV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRAB( NUNIT )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrac.f b/TESTING/LIN/zerrac.f
index e1bf7659..bec4d411 100644
--- a/TESTING/LIN/zerrac.f
+++ b/TESTING/LIN/zerrac.f
@@ -1,24 +1,62 @@
- SUBROUTINE ZERRAC( NUNIT )
- IMPLICIT NONE
+*> \brief \b ZERRAC
*
-* -- LAPACK test routine (version 3.1.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* May 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRAC( NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRPX tests the error exits for ZCPOSV.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRPX tests the error exits for ZCPOSV.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRAC( NUNIT )
+*
+* -- LAPACK test routine (version 3.1.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrge.f b/TESTING/LIN/zerrge.f
index f3dd60a2..645bf9f3 100644
--- a/TESTING/LIN/zerrge.f
+++ b/TESTING/LIN/zerrge.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRGE( PATH, NUNIT )
+*> \brief \b ZERRGE
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRGE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRGE tests the error exits for the COMPLEX*16 routines
-* for general matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRGE tests the error exits for the COMPLEX*16 routines
+*> for general matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRGE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrgex.f b/TESTING/LIN/zerrgex.f
index 282b2aad..4c84b2bd 100644
--- a/TESTING/LIN/zerrgex.f
+++ b/TESTING/LIN/zerrgex.f
@@ -1,31 +1,74 @@
- SUBROUTINE ZERRGE( PATH, NUNIT )
+*> \brief \b ZERRGEX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRGE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRGE tests the error exits for the COMPLEX*16 routines
-* for general matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zerrge.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRGE tests the error exits for the COMPLEX*16 routines
+*> for general matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zerrge.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRGE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrgt.f b/TESTING/LIN/zerrgt.f
index 28efc43f..253087ea 100644
--- a/TESTING/LIN/zerrgt.f
+++ b/TESTING/LIN/zerrgt.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRGT( PATH, NUNIT )
+*> \brief \b ZERRGT
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRGT( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRGT tests the error exits for the COMPLEX*16 tridiagonal
-* routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRGT tests the error exits for the COMPLEX*16 tridiagonal
+*> routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRGT( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrhe.f b/TESTING/LIN/zerrhe.f
index 18779b52..442bb29a 100644
--- a/TESTING/LIN/zerrhe.f
+++ b/TESTING/LIN/zerrhe.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRHE( PATH, NUNIT )
+*> \brief \b ZERRHE
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRHE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRHE tests the error exits for the COMPLEX*16 routines
-* for Hermitian indefinite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRHE tests the error exits for the COMPLEX*16 routines
+*> for Hermitian indefinite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRHE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrhex.f b/TESTING/LIN/zerrhex.f
index de99b9c9..98f6cbff 100644
--- a/TESTING/LIN/zerrhex.f
+++ b/TESTING/LIN/zerrhex.f
@@ -1,31 +1,74 @@
- SUBROUTINE ZERRHE( PATH, NUNIT )
+*> \brief \b ZERRHEX
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRHE( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRHE tests the error exits for the COMPLEX*16 routines
-* for Hermitian indefinite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zerrhe.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRHE tests the error exits for the COMPLEX*16 routines
+*> for Hermitian indefinite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zerrhe.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRHE( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrlq.f b/TESTING/LIN/zerrlq.f
index 7fc01b4f..128c71d1 100644
--- a/TESTING/LIN/zerrlq.f
+++ b/TESTING/LIN/zerrlq.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRLQ( PATH, NUNIT )
+*> \brief \b ZERRLQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRLQ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRLQ tests the error exits for the COMPLEX*16 routines
-* that use the LQ decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRLQ tests the error exits for the COMPLEX*16 routines
+*> that use the LQ decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRLQ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrls.f b/TESTING/LIN/zerrls.f
index 252edece..f11f6d6e 100644
--- a/TESTING/LIN/zerrls.f
+++ b/TESTING/LIN/zerrls.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRLS( PATH, NUNIT )
+*> \brief \b ZERRLS
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRLS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRLS tests the error exits for the COMPLEX*16 least squares
-* driver routines (ZGELS, CGELSS, CGELSX, CGELSY, CGELSD).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRLS tests the error exits for the COMPLEX*16 least squares
+*> driver routines (ZGELS, CGELSS, CGELSX, CGELSY, CGELSD).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRLS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrpo.f b/TESTING/LIN/zerrpo.f
index b2e6dd38..ef18ad92 100644
--- a/TESTING/LIN/zerrpo.f
+++ b/TESTING/LIN/zerrpo.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRPO( PATH, NUNIT )
+*> \brief \b ZERRPO
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRPO( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRPO tests the error exits for the COMPLEX*16 routines
-* for Hermitian positive definite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRPO tests the error exits for the COMPLEX*16 routines
+*> for Hermitian positive definite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRPO( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrpox.f b/TESTING/LIN/zerrpox.f
index a976e677..346021b2 100644
--- a/TESTING/LIN/zerrpox.f
+++ b/TESTING/LIN/zerrpox.f
@@ -1,31 +1,74 @@
- SUBROUTINE ZERRPO( PATH, NUNIT )
+*> \brief \b ZERRPOX
*
-* -- LAPACK test routine (version 3.2.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* April 2009
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRPO( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRPO tests the error exits for the COMPLEX*16 routines
-* for Hermitian positive definite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zerrpo.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRPO tests the error exits for the COMPLEX*16 routines
+*> for Hermitian positive definite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zerrpo.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRPO( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrps.f b/TESTING/LIN/zerrps.f
index 487be942..8ded02b7 100644
--- a/TESTING/LIN/zerrps.f
+++ b/TESTING/LIN/zerrps.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRPS( PATH, NUNIT )
+*> \brief \b ZERRPS
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
- CHARACTER*3 PATH
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRPS( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* CHARACTER*3 PATH
+* ..
+*
* Purpose
* =======
*
-* ZERRPS tests the error exits for the COMPLEX routines
-* for ZPSTRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRPS tests the error exits for the COMPLEX routines
+*> for ZPSTRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRPS( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+ CHARACTER*3 PATH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrql.f b/TESTING/LIN/zerrql.f
index bc6c34de..3cfba85f 100644
--- a/TESTING/LIN/zerrql.f
+++ b/TESTING/LIN/zerrql.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRQL( PATH, NUNIT )
+*> \brief \b ZERRQL
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRQL( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRQL tests the error exits for the COMPLEX*16 routines
-* that use the QL decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRQL tests the error exits for the COMPLEX*16 routines
+*> that use the QL decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRQL( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrqp.f b/TESTING/LIN/zerrqp.f
index d839a5bc..1cbf4bf2 100644
--- a/TESTING/LIN/zerrqp.f
+++ b/TESTING/LIN/zerrqp.f
@@ -1,27 +1,70 @@
- SUBROUTINE ZERRQP( PATH, NUNIT )
+*> \brief \b ZERRQP
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRQP( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRQP tests the error exits for ZGEQPF and CGEQP3.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRQP tests the error exits for ZGEQPF and CGEQP3.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRQP( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrqr.f b/TESTING/LIN/zerrqr.f
index 4875fab9..4a20da54 100644
--- a/TESTING/LIN/zerrqr.f
+++ b/TESTING/LIN/zerrqr.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRQR( PATH, NUNIT )
+*> \brief \b ZERRQR
*
-* -- LAPACK test routine ((version 3.3.0)) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2010
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRQR( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRQR tests the error exits for the COMPLEX*16 routines
-* that use the QR decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRQR tests the error exits for the COMPLEX*16 routines
+*> that use the QR decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRQR( PATH, NUNIT )
+*
+* -- LAPACK test routine ((version 3.3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrrfp.f b/TESTING/LIN/zerrrfp.f
index 078018c8..3efda27d 100644
--- a/TESTING/LIN/zerrrfp.f
+++ b/TESTING/LIN/zerrrfp.f
@@ -1,29 +1,67 @@
- SUBROUTINE ZERRRFP( NUNIT )
- IMPLICIT NONE
+*> \brief \b ZERRRFP
*
-* -- LAPACK test routine (version 3.2.0) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRRFP( NUNIT )
+*
+* .. Scalar Arguments ..
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRRFP tests the error exits for the COMPLEX*16 driver routines
-* for solving linear systems of equations.
-*
-* ZDRVRFP tests the COMPLEX*16 LAPACK RFP routines:
-* ZTFSM, ZTFTRI, ZHFRK, ZTFTTP, ZTFTTR, ZPFTRF, ZPFTRS, ZTPTTF,
-* ZTPTTR, ZTRTTF, and ZTRTTP
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRRFP tests the error exits for the COMPLEX*16 driver routines
+*> for solving linear systems of equations.
+*>
+*> ZDRVRFP tests the COMPLEX*16 LAPACK RFP routines:
+*> ZTFSM, ZTFTRI, ZHFRK, ZTFTTP, ZTFTTR, ZPFTRF, ZPFTRS, ZTPTTF,
+*> ZTPTTR, ZTRTTF, and ZTRTTP
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRRFP( NUNIT )
+*
+* -- LAPACK test routine (version 3.2.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrrq.f b/TESTING/LIN/zerrrq.f
index 9eff0723..d5a1c1b3 100644
--- a/TESTING/LIN/zerrrq.f
+++ b/TESTING/LIN/zerrrq.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRRQ( PATH, NUNIT )
+*> \brief \b ZERRRQ
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRRQ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRRQ tests the error exits for the COMPLEX*16 routines
-* that use the RQ decomposition of a general matrix.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRRQ tests the error exits for the COMPLEX*16 routines
+*> that use the RQ decomposition of a general matrix.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRRQ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrsy.f b/TESTING/LIN/zerrsy.f
index 689f51bb..4a3520ed 100644
--- a/TESTING/LIN/zerrsy.f
+++ b/TESTING/LIN/zerrsy.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRSY( PATH, NUNIT )
+*> \brief \b ZERRSY
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRSY( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRSY tests the error exits for the COMPLEX*16 routines
-* for symmetric indefinite matrices.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRSY tests the error exits for the COMPLEX*16 routines
+*> for symmetric indefinite matrices.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRSY( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrsyx.f b/TESTING/LIN/zerrsyx.f
index 9538f0fc..0766e847 100644
--- a/TESTING/LIN/zerrsyx.f
+++ b/TESTING/LIN/zerrsyx.f
@@ -1,31 +1,74 @@
- SUBROUTINE ZERRSY( PATH, NUNIT )
+*> \brief \b ZERRSYX
*
-* -- LAPACK test routine (version 3.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZERRSY( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRSY tests the error exits for the COMPLEX*16 routines
-* for symmetric indefinite matrices.
-*
-* Note that this file is used only when the XBLAS are available,
-* otherwise zerrsy.f defines this subroutine.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRSY tests the error exits for the COMPLEX*16 routines
+*> for symmetric indefinite matrices.
+*>
+*> Note that this file is used only when the XBLAS are available,
+*> otherwise zerrsy.f defines this subroutine.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRSY( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrtr.f b/TESTING/LIN/zerrtr.f
index ba46360d..c0e71fe4 100644
--- a/TESTING/LIN/zerrtr.f
+++ b/TESTING/LIN/zerrtr.f
@@ -1,27 +1,70 @@
- SUBROUTINE ZERRTR( PATH, NUNIT )
+*> \brief \b ZERRTR
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRTR( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRTR tests the error exits for the COMPLEX*16 triangular routines.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRTR tests the error exits for the COMPLEX*16 triangular routines.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRTR( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrtz.f b/TESTING/LIN/zerrtz.f
index 26511d8c..d2b30ce7 100644
--- a/TESTING/LIN/zerrtz.f
+++ b/TESTING/LIN/zerrtz.f
@@ -1,27 +1,70 @@
- SUBROUTINE ZERRTZ( PATH, NUNIT )
+*> \brief \b ZERRTZ
*
-* -- LAPACK test routine (version 3.3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* -- April 2011 --
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRTZ( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRTZ tests the error exits for ZTZRQF and ZTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRTZ tests the error exits for ZTZRQF and ZTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRTZ( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrvx.f b/TESTING/LIN/zerrvx.f
index b8a784f4..0f1c5f40 100644
--- a/TESTING/LIN/zerrvx.f
+++ b/TESTING/LIN/zerrvx.f
@@ -1,28 +1,71 @@
- SUBROUTINE ZERRVX( PATH, NUNIT )
+*> \brief \b ZERRVX
*
-* -- LAPACK test routine (version 3.1.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* January 2007
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZERRVX( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRVX tests the error exits for the COMPLEX*16 driver routines
-* for solving linear systems of equations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRVX tests the error exits for the COMPLEX*16 driver routines
+*> for solving linear systems of equations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRVX( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.1.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zerrvxx.f b/TESTING/LIN/zerrvxx.f
index 1f5a9106..090da4a9 100644
--- a/TESTING/LIN/zerrvxx.f
+++ b/TESTING/LIN/zerrvxx.f
@@ -1,31 +1,71 @@
- SUBROUTINE ZERRVX( PATH, NUNIT )
-*
-* -- LAPACK test routine (version 3.2.1) --
+*> \brief \b ZERRVXX
*
-* -- April 2009 --
+* =========== DOCUMENTATION ===========
*
-* -- LAPACK is a software package provided by Univ. of Tennessee, --
-* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
-* .. Scalar Arguments ..
- CHARACTER*3 PATH
- INTEGER NUNIT
-* ..
+* Definition
+* ==========
*
+* SUBROUTINE ZERRVX( PATH, NUNIT )
+*
+* .. Scalar Arguments ..
+* CHARACTER*3 PATH
+* INTEGER NUNIT
+* ..
+*
* Purpose
* =======
*
-* ZERRVX tests the error exits for the COMPLEX*16 driver routines
-* for solving linear systems of equations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZERRVX tests the error exits for the COMPLEX*16 driver routines
+*> for solving linear systems of equations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name for the routines to be tested.
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name for the routines to be tested.
+*> \endverbatim
+*>
+*> \param[in] NUNIT
+*> \verbatim
+*> NUNIT is INTEGER
+*> The unit number for output.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* NUNIT (input) INTEGER
-* The unit number for output.
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZERRVX( PATH, NUNIT )
+*
+* -- LAPACK test routine (version 3.2.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER*3 PATH
+ INTEGER NUNIT
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zgbt01.f b/TESTING/LIN/zgbt01.f
index f792850a..41a61e5e 100644
--- a/TESTING/LIN/zgbt01.f
+++ b/TESTING/LIN/zgbt01.f
@@ -1,71 +1,146 @@
- SUBROUTINE ZGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
- $ RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER KL, KU, LDA, LDAFAC, M, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
-* ..
-*
+*> \brief \b ZGBT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER KL, KU, LDA, LDAFAC, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZGBT01 reconstructs a band matrix A from its L*U factorization and
-* computes the residual:
-* norm(L*U - A) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* The expression L*U - A is computed one column at a time, so A and
-* AFAC are not modified.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBT01 reconstructs a band matrix A from its L*U factorization and
+*> computes the residual:
+*> norm(L*U - A) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*> The expression L*U - A is computed one column at a time, so A and
+*> AFAC are not modified.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* The original matrix A in band storage, stored in rows 1 to
-* KL+KU+1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original matrix A in band storage, stored in rows 1 to
+*> KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the banded
+*> factors L and U from the L*U factorization, as computed by
+*> ZGBTRF. U is stored as an upper triangular band matrix with
+*> KL+KU superdiagonals in rows 1 to KL+KU+1, and the
+*> multipliers used during the factorization are stored in rows
+*> KL+KU+2 to 2*KL+KU+1. See ZGBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC.
+*> LDAFAC >= max(1,2*KL*KU+1).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (min(M,N))
+*> The pivot indices from ZGBTRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*KL+KU+1)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(L*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AFAC (input) COMPLEX*16 array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the banded
-* factors L and U from the L*U factorization, as computed by
-* ZGBTRF. U is stored as an upper triangular band matrix with
-* KL+KU superdiagonals in rows 1 to KL+KU+1, and the
-* multipliers used during the factorization are stored in rows
-* KL+KU+2 to 2*KL+KU+1. See ZGBTRF for further details.
+*> \date November 2011
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC.
-* LDAFAC >= max(1,2*KL*KU+1).
+*> \ingroup complex16_lin
*
-* IPIV (input) INTEGER array, dimension (min(M,N))
-* The pivot indices from ZGBTRF.
+* =====================================================================
+ SUBROUTINE ZGBT01( M, N, KL, KU, A, LDA, AFAC, LDAFAC, IPIV, WORK,
+ $ RESID )
*
-* WORK (workspace) COMPLEX*16 array, dimension (2*KL+KU+1)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(L*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER KL, KU, LDA, LDAFAC, M, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zgbt02.f b/TESTING/LIN/zgbt02.f
index 0885ef1b..08519467 100644
--- a/TESTING/LIN/zgbt02.f
+++ b/TESTING/LIN/zgbt02.f
@@ -1,78 +1,159 @@
- SUBROUTINE ZGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
- $ LDB, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
-* ..
-*
+*> \brief \b ZGBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
+* LDB, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* ZGBT02 computes the residual for a solution of a banded system of
-* equations A*x = b or A'*x = b:
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
-* where EPS is the machine precision.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBT02 computes the residual for a solution of a banded system of
+*> equations A*x = b or A'*x = b:
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A'*x = b, where A' is the transpose of A
-* = 'C': A'*x = b, where A' is the transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original matrix A in band storage, stored in rows 1 to
-* KL+KU+1.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A'*x = b, where A' is the transpose of A
+*> = 'C': A'*x = b, where A' is the transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original matrix A in band storage, stored in rows 1 to
+*> KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,KL+KU+1).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \ingroup complex16_lin
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
+* =====================================================================
+ SUBROUTINE ZGBT02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
+ $ LDB, RESID )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zgbt05.f b/TESTING/LIN/zgbt05.f
index 4d5cd05e..abf8fe9d 100644
--- a/TESTING/LIN/zgbt05.f
+++ b/TESTING/LIN/zgbt05.f
@@ -1,9 +1,187 @@
+*> \brief \b ZGBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGBT05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
+* LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER KL, KU, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations op(A)*X = B, where A is a
+*> general band matrix of order n with kl subdiagonals and ku
+*> superdiagonals and op(A) = A or A**T, depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of subdiagonals within the band of A. KL >= 0.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of superdiagonals within the band of A. KU >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The original band matrix A, stored in rows 1 to KL+KU+1.
+*> The j-th column of A is stored in the j-th column of the
+*> array AB as follows:
+*> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KL+KU+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZGBT05( TRANS, N, KL, KU, NRHS, AB, LDAB, B, LDB, X,
$ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,93 +193,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations op(A)*X = B, where A is a
-* general band matrix of order n with kl subdiagonals and ku
-* superdiagonals and op(A) = A or A**T, depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of subdiagonals within the band of A. KL >= 0.
-*
-* KU (input) INTEGER
-* The number of superdiagonals within the band of A. KU >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The original band matrix A, stored in rows 1 to KL+KU+1.
-* The j-th column of A is stored in the j-th column of the
-* array AB as follows:
-* AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KL+KU+1.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zgelqs.f b/TESTING/LIN/zgelqs.f
index a86a1dec..049df349 100644
--- a/TESTING/LIN/zgelqs.f
+++ b/TESTING/LIN/zgelqs.f
@@ -1,66 +1,140 @@
- SUBROUTINE ZGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b ZGELQS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Compute a minimum-norm solution
-* min || A*X - B ||
-* using the LQ factorization
-* A = L*Q
-* computed by ZGELQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute a minimum-norm solution
+*> min || A*X - B ||
+*> using the LQ factorization
+*> A = L*Q
+*> computed by ZGELQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the LQ factorization of the original matrix A as
-* returned by ZGELQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the LQ factorization of the original matrix A as
+*> returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX*16 array, dimension (M)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= N.
+*> \ingroup complex16_lin
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE ZGELQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zgennd.f b/TESTING/LIN/zgennd.f
index 33761759..5b5d6812 100644
--- a/TESTING/LIN/zgennd.f
+++ b/TESTING/LIN/zgennd.f
@@ -1,36 +1,86 @@
- LOGICAL FUNCTION ZGENND (M, N, A, LDA)
- IMPLICIT NONE
+*> \brief \b ZGENND
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* February 2008
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER M, N, LDA
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* LOGICAL FUNCTION ZGENND (M, N, A, LDA)
+*
+* .. Scalar Arguments ..
+* INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZGENND tests that its argument has a real, non-negative diagonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGENND tests that its argument has a real, non-negative diagonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows in A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> The matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns in A.
+*> \date November 2011
*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* The matrix.
+*> \ingroup complex16_lin
*
-* LDA (input) INTEGER
-* Leading dimension of A.
+* =====================================================================
+ LOGICAL FUNCTION ZGENND (M, N, A, LDA)
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER M, N, LDA
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zgeqls.f b/TESTING/LIN/zgeqls.f
index 5931562d..11f71db6 100644
--- a/TESTING/LIN/zgeqls.f
+++ b/TESTING/LIN/zgeqls.f
@@ -1,67 +1,141 @@
- SUBROUTINE ZGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b ZGEQLS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Solve the least squares problem
-* min || A*X - B ||
-* using the QL factorization
-* A = Q*L
-* computed by ZGEQLF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Solve the least squares problem
+*> min || A*X - B ||
+*> using the QL factorization
+*> A = Q*L
+*> computed by ZGEQLF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. M >= N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QL factorization of the original matrix A as
-* returned by ZGEQLF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QL factorization of the original matrix A as
+*> returned by ZGEQLF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X, stored in rows
+*> m-n+1:m.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= M.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX*16 array, dimension (N)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X, stored in rows
-* m-n+1:m.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= M.
+*> \ingroup complex16_lin
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE ZGEQLS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zgeqrs.f b/TESTING/LIN/zgeqrs.f
index 880e7096..712fa3c3 100644
--- a/TESTING/LIN/zgeqrs.f
+++ b/TESTING/LIN/zgeqrs.f
@@ -1,66 +1,140 @@
- SUBROUTINE ZGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b ZGEQRS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Solve the least squares problem
-* min || A*X - B ||
-* using the QR factorization
-* A = Q*R
-* computed by ZGEQRF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Solve the least squares problem
+*> min || A*X - B ||
+*> using the QR factorization
+*> A = Q*R
+*> computed by ZGEQRF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. M >= N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QR factorization of the original matrix A as
-* returned by ZGEQRF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QR factorization of the original matrix A as
+*> returned by ZGEQRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the m-by-nrhs right hand side matrix B.
+*> On exit, the n-by-nrhs solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= M.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX*16 array, dimension (N)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the m-by-nrhs right hand side matrix B.
-* On exit, the n-by-nrhs solution matrix X.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= M.
+*> \ingroup complex16_lin
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE ZGEQRS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zgerqs.f b/TESTING/LIN/zgerqs.f
index 0de9e25e..c849bd2d 100644
--- a/TESTING/LIN/zgerqs.f
+++ b/TESTING/LIN/zgerqs.f
@@ -1,67 +1,141 @@
- SUBROUTINE ZGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
- $ INFO )
-*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b ZGERQS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+* INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* Compute a minimum-norm solution
-* min || A*X - B ||
-* using the RQ factorization
-* A = R*Q
-* computed by ZGERQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Compute a minimum-norm solution
+*> min || A*X - B ||
+*> using the RQ factorization
+*> A = R*Q
+*> computed by ZGERQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= M >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the RQ factorization of the original matrix A as
-* returned by ZGERQF.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the RQ factorization of the original matrix A as
+*> returned by ZGERQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> Details of the orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the linear system.
+*> On exit, the solution vectors X. Each solution vector
+*> is contained in rows 1:N of a column of B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK must be at least NRHS,
+*> and should be at least NRHS*NB, where NB is the block size
+*> for this environment.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* TAU (input) COMPLEX*16 array, dimension (M)
-* Details of the orthogonal matrix Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the linear system.
-* On exit, the solution vectors X. Each solution vector
-* is contained in rows 1:N of a column of B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+*> \ingroup complex16_lin
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* =====================================================================
+ SUBROUTINE ZGERQS( M, N, NRHS, A, LDA, TAU, B, LDB, WORK, LWORK,
+ $ INFO )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK must be at least NRHS,
-* and should be at least NRHS*NB, where NB is the block size
-* for this environment.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zget01.f b/TESTING/LIN/zget01.f
index 59d9b79d..a828b900 100644
--- a/TESTING/LIN/zget01.f
+++ b/TESTING/LIN/zget01.f
@@ -1,59 +1,129 @@
- SUBROUTINE ZGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
- $ RESID )
+*> \brief \b ZGET01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDAFAC, M, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDAFAC, M, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
+* ..
+*
* Purpose
* =======
*
-* ZGET01 reconstructs a matrix A from its L*U factorization and
-* computes the residual
-* norm(L*U - A) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET01 reconstructs a matrix A from its L*U factorization and
+*> computes the residual
+*> norm(L*U - A) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original M x N matrix A.
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the factors
+*> L and U from the L*U factorization as computed by ZGETRF.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*U - A.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZGETRF.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(L*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AFAC (input/output) COMPLEX*16 array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the factors
-* L and U from the L*U factorization as computed by ZGETRF.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*U - A.
+*> \date November 2011
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,M).
+*> \ingroup complex16_lin
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZGETRF.
+* =====================================================================
+ SUBROUTINE ZGET01( M, N, A, LDA, AFAC, LDAFAC, IPIV, RWORK,
+ $ RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(L*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDAFAC, M, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zget02.f b/TESTING/LIN/zget02.f
index 4007812a..4e1b2445 100644
--- a/TESTING/LIN/zget02.f
+++ b/TESTING/LIN/zget02.f
@@ -1,9 +1,144 @@
+*> \brief \b ZGET02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET02 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A^T*x = b, where A^T is the transpose of A
+*> = 'C': A^H*x = b, where A^H is the conjugate transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZGET02( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET02 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A^T*x = b, where A^T is the transpose of A
-* = 'C': A^H*x = b, where A^H is the conjugate transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zget03.f b/TESTING/LIN/zget03.f
index 13913d9a..73ba9463 100644
--- a/TESTING/LIN/zget03.f
+++ b/TESTING/LIN/zget03.f
@@ -1,58 +1,131 @@
- SUBROUTINE ZGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
- $ RCOND, RESID )
+*> \brief \b ZGET03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER LDA, LDAINV, LDWORK, N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( LDA, * ), AINV( LDAINV, * ),
- $ WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
+* RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDAINV, LDWORK, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AINV( LDAINV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* ZGET03 computes the residual for a general matrix times its inverse:
-* norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET03 computes the residual for a general matrix times its inverse:
+*> norm( I - AINV*A ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original N x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* AINV (input) COMPLEX*16 array, dimension (LDAINV,N)
-* The inverse of the matrix A.
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original N x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (LDAINV,N)
+*> The inverse of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup complex16_lin
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* =====================================================================
+ SUBROUTINE ZGET03( N, A, LDA, AINV, LDAINV, WORK, LDWORK, RWORK,
+ $ RCOND, RESID )
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(I - AINV*A) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDAINV, LDWORK, N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( LDA, * ), AINV( LDAINV, * ),
+ $ WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zget04.f b/TESTING/LIN/zget04.f
index cbe43ceb..aeb008c3 100644
--- a/TESTING/LIN/zget04.f
+++ b/TESTING/LIN/zget04.f
@@ -1,57 +1,121 @@
- SUBROUTINE ZGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDX, LDXACT, N, NRHS
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- COMPLEX*16 X( LDX, * ), XACT( LDXACT, * )
-* ..
-*
+*> \brief \b ZGET04
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDX, LDXACT, N, NRHS
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
* Purpose
* =======
*
-* ZGET04 computes the difference between a computed solution and the
-* true solution to a system of linear equations.
-*
-* RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
-* where RCOND is the reciprocal of the condition number and EPS is the
-* machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET04 computes the difference between a computed solution and the
+*> true solution to a system of linear equations.
+*>
+*> RESID = ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
+*> where RCOND is the reciprocal of the condition number and EPS is the
+*> machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of the coefficient
+*> matrix in the system of equations.
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the NRHS solution vectors of
+*> ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
+*> \ingroup complex16_lin
*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZGET04( N, NRHS, X, LDX, XACT, LDXACT, RCOND, RESID )
*
-* RCOND (input) DOUBLE PRECISION
-* The reciprocal of the condition number of the coefficient
-* matrix in the system of equations.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the NRHS solution vectors of
-* ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDX, LDXACT, N, NRHS
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 X( LDX, * ), XACT( LDXACT, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zget07.f b/TESTING/LIN/zget07.f
index c6595341..f314269a 100644
--- a/TESTING/LIN/zget07.f
+++ b/TESTING/LIN/zget07.f
@@ -1,9 +1,177 @@
+*> \brief \b ZGET07
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET07( TRANS, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, CHKFERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* LOGICAL CHKFERR
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET07 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations op(A)*X = B, where A is a
+*> general n by n matrix and op(A) = A or A**T, depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original n by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] CHKFERR
+*> \verbatim
+*> CHKFERR is LOGICAL
+*> Set to .TRUE. to check FERR, .FALSE. not to check FERR.
+*> When the test system is ill-conditioned, the "true"
+*> solution in XACT may be incorrect.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZGET07( TRANS, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, CHKFERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -16,85 +184,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET07 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations op(A)*X = B, where A is a
-* general n by n matrix and op(A) = A or A**T, depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original n by n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* CHKFERR (input) LOGICAL
-* Set to .TRUE. to check FERR, .FALSE. not to check FERR.
-* When the test system is ill-conditioned, the "true"
-* solution in XACT may be incorrect.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zget08.f b/TESTING/LIN/zget08.f
index 8d2fb93e..69558d32 100644
--- a/TESTING/LIN/zget08.f
+++ b/TESTING/LIN/zget08.f
@@ -1,9 +1,144 @@
+*> \brief \b ZGET08
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGET08( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGET08 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A^T*x = b, where A^T is the transpose of A
+*> = 'C': A^H*x = b, where A^H is the conjugate transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZGET08( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGET08 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A^T*x = b, where A^T is the transpose of A
-* = 'C': A^H*x = b, where A^H is the conjugate transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zgtt01.f b/TESTING/LIN/zgtt01.f
index 88026f1e..403c8c73 100644
--- a/TESTING/LIN/zgtt01.f
+++ b/TESTING/LIN/zgtt01.f
@@ -1,9 +1,145 @@
+*> \brief \b ZGTT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTT01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
+* LDWORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER LDWORK, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 D( * ), DF( * ), DL( * ), DLF( * ), DU( * ),
+* $ DU2( * ), DUF( * ), WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTT01 reconstructs a tridiagonal matrix A from its LU factorization
+*> and computes the residual
+*> norm(L*U - A) / ( norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DLF
+*> \verbatim
+*> DLF is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) multipliers that define the matrix L from the
+*> LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is COMPLEX*16 array, dimension (N)
+*> The n diagonal elements of the upper triangular matrix U from
+*> the LU factorization of A.
+*> \endverbatim
+*>
+*> \param[in] DUF
+*> \verbatim
+*> DUF is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) elements of the first super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] DU2
+*> \verbatim
+*> DU2 is COMPLEX*16 array, dimension (N-2)
+*> The (n-2) elements of the second super-diagonal of U.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices; for 1 <= i <= n, row i of the matrix was
+*> interchanged with row IPIV(i). IPIV(i) will always be either
+*> i or i+1; IPIV(i) = i indicates a row interchange was not
+*> required.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The scaled residual: norm(L*U - A) / (norm(A) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZGTT01( N, DL, D, DU, DLF, DF, DUF, DU2, IPIV, WORK,
$ LDWORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDWORK, N
@@ -16,59 +152,6 @@
$ DU2( * ), DUF( * ), WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGTT01 reconstructs a tridiagonal matrix A from its LU factorization
-* and computes the residual
-* norm(L*U - A) / ( norm(A) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* N (input) INTEGTER
-* The order of the matrix A. N >= 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* DLF (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) multipliers that define the matrix L from the
-* LU factorization of A.
-*
-* DF (input) COMPLEX*16 array, dimension (N)
-* The n diagonal elements of the upper triangular matrix U from
-* the LU factorization of A.
-*
-* DUF (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) elements of the first super-diagonal of U.
-*
-* DU2 (input) COMPLEX*16 array, dimension (N-2)
-* The (n-2) elements of the second super-diagonal of U.
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices; for 1 <= i <= n, row i of the matrix was
-* interchanged with row IPIV(i). IPIV(i) will always be either
-* i or i+1; IPIV(i) = i indicates a row interchange was not
-* required.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,N)
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The scaled residual: norm(L*U - A) / (norm(A) * EPS)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zgtt02.f b/TESTING/LIN/zgtt02.f
index 8e1a0805..2f1e0c2a 100644
--- a/TESTING/LIN/zgtt02.f
+++ b/TESTING/LIN/zgtt02.f
@@ -1,9 +1,135 @@
+*> \brief \b ZGTT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTT02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTT02 computes the residual for the solution to a tridiagonal
+*> system of equations:
+*> RESID = norm(B - op(A)*X) / (norm(A) * norm(X) * EPS),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER
+*> Specifies the form of the residual.
+*> = 'N': B - A * X (No transpose)
+*> = 'T': B - A**T * X (Transpose)
+*> = 'C': B - A**H * X (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - op(A)*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(B - op(A)*X) / (norm(A) * norm(X) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZGTT02( TRANS, N, NRHS, DL, D, DU, X, LDX, B, LDB,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,56 +141,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGTT02 computes the residual for the solution to a tridiagonal
-* system of equations:
-* RESID = norm(B - op(A)*X) / (norm(A) * norm(X) * EPS),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER
-* Specifies the form of the residual.
-* = 'N': B - A * X (No transpose)
-* = 'T': B - A**T * X (Transpose)
-* = 'C': B - A**H * X (Conjugate transpose)
-*
-* N (input) INTEGTER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - op(A)*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RESID (output) DOUBLE PRECISION
-* norm(B - op(A)*X) / (norm(A) * norm(X) * EPS)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zgtt05.f b/TESTING/LIN/zgtt05.f
index 8f65aefb..1b3013a7 100644
--- a/TESTING/LIN/zgtt05.f
+++ b/TESTING/LIN/zgtt05.f
@@ -1,9 +1,176 @@
+*> \brief \b ZGTT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZGTT05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 B( LDB, * ), D( * ), DL( * ), DU( * ),
+* $ X( LDX, * ), XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZGTT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> general tridiagonal matrix of order n and op(A) = A or A**T,
+*> depending on TRANS.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A**T * X = B (Transpose)
+*> = 'C': A**H * X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X and XACT. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and XACT. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) sub-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (N)
+*> The diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] DU
+*> \verbatim
+*> DU is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) super-diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZGTT05( TRANS, N, NRHS, DL, D, DU, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,85 +182,6 @@
$ X( LDX, * ), XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZGTT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* general tridiagonal matrix of order n and op(A) = A or A**T,
-* depending on TRANS.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(op(A))*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A**T * X = B (Transpose)
-* = 'C': A**H * X = B (Conjugate transpose = Transpose)
-*
-* N (input) INTEGER
-* The number of rows of the matrices X and XACT. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and XACT. NRHS >= 0.
-*
-* DL (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) sub-diagonal elements of A.
-*
-* D (input) COMPLEX*16 array, dimension (N)
-* The diagonal elements of A.
-*
-* DU (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) super-diagonal elements of A.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zhet01.f b/TESTING/LIN/zhet01.f
index 1a732332..9d3b91fc 100644
--- a/TESTING/LIN/zhet01.f
+++ b/TESTING/LIN/zhet01.f
@@ -1,9 +1,135 @@
+*> \brief \b ZHET01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHET01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, LDC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHET01 reconstructs a Hermitian indefinite matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix, EPS is the machine epsilon,
+*> L' is the conjugate transpose of L, and U' is the conjugate transpose
+*> of U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor L or U from the block L*D*L' or U*D*U' factorization
+*> as computed by ZHETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZHETRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZHET01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,57 +142,6 @@
COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
* ..
*
-* Purpose
-* =======
-*
-* ZHET01 reconstructs a Hermitian indefinite matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix, EPS is the machine epsilon,
-* L' is the conjugate transpose of L, and U' is the conjugate transpose
-* of U.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) COMPLEX*16 array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor L or U from the block L*D*L' or U*D*U' factorization
-* as computed by ZHETRF.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZHETRF.
-*
-* C (workspace) COMPLEX*16 array, dimension (LDC,N)
-*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zhpt01.f b/TESTING/LIN/zhpt01.f
index 389dd1d4..f35f6d33 100644
--- a/TESTING/LIN/zhpt01.f
+++ b/TESTING/LIN/zhpt01.f
@@ -1,65 +1,133 @@
- SUBROUTINE ZHPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*> \brief \b ZHPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDC, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( * ), AFAC( * ), C( LDC, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZHPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), C( LDC, * )
+* ..
+*
* Purpose
* =======
*
-* ZHPT01 reconstructs a Hermitian indefinite packed matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix, EPS is the machine epsilon,
-* L' is the conjugate transpose of L, and U' is the conjugate transpose
-* of U.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZHPT01 reconstructs a Hermitian indefinite packed matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix, EPS is the machine epsilon,
+*> L' is the conjugate transpose of L, and U' is the conjugate transpose
+*> of U.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original Hermitian matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original Hermitian matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A, stored as a packed
+*> triangular matrix. AFAC contains the block diagonal matrix D
+*> and the multipliers used to obtain the factor L or U from the
+*> block L*D*L' or U*D*U' factorization as computed by ZHPTRF.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZHPTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AFAC (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The factored form of the matrix A, stored as a packed
-* triangular matrix. AFAC contains the block diagonal matrix D
-* and the multipliers used to obtain the factor L or U from the
-* block L*D*L' or U*D*U' factorization as computed by ZHPTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZHPTRF.
+*> \date November 2011
*
-* C (workspace) COMPLEX*16 array, dimension (LDC,N)
+*> \ingroup complex16_lin
*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZHPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDC, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( * ), AFAC( * ), C( LDC, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlahilb.f b/TESTING/LIN/zlahilb.f
index 9350684b..1b44dd04 100644
--- a/TESTING/LIN/zlahilb.f
+++ b/TESTING/LIN/zlahilb.f
@@ -1,25 +1,29 @@
- SUBROUTINE ZLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
- $ INFO, PATH)
-!
-! -- LAPACK auxiliary test routine (version 3.0) --
-! Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-! Courant Institute, Argonne National Lab, and Rice University
-! 28 August, 2006
-!
-! David Vu <dtv@cs.berkeley.edu>
-! Yozo Hida <yozo@cs.berkeley.edu>
-! Jason Riedy <ejr@cs.berkeley.edu>
-! D. Halligan <dhalligan@berkeley.edu>
-!
- IMPLICIT NONE
-! .. Scalar Arguments ..
- INTEGER N, NRHS, LDA, LDX, LDB, INFO
-! .. Array Arguments ..
- DOUBLE PRECISION WORK(N)
- COMPLEX*16 A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
- CHARACTER*3 PATH
-! ..
-!
+*> \brief \b ZLAHILB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+* INFO, PATH)
+*
+* ! .. Scalar Arguments ..
+* INTEGER N, NRHS, LDA, LDX, LDB, INFO
+* ! .. Array Arguments ..
+* DOUBLE PRECISION WORK(N)
+* COMPLEX*16 A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
+* CHARACTER*3 PATH
+* ! ..
+* !
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
! Purpose
! =======
!
@@ -42,43 +46,40 @@
! In single, the generated solution is exact for N <= 6 and has
! small componentwise error for 7 <= N <= 11.
!
-! Arguments
-! =========
-!
-! N (input) INTEGER
-! The dimension of the matrix A.
-!
-! NRHS (input) NRHS
-! The requested number of right-hand sides.
-!
-! A (output) COMPLEX array, dimension (LDA, N)
-! The generated scaled Hilbert matrix.
-!
-! LDA (input) INTEGER
-! The leading dimension of the array A. LDA >= N.
-!
-! X (output) COMPLEX array, dimension (LDX, NRHS)
-! The generated exact solutions. Currently, the first NRHS
-! columns of the inverse Hilbert matrix.
-!
-! LDX (input) INTEGER
-! The leading dimension of the array X. LDX >= N.
-!
-! B (output) REAL array, dimension (LDB, NRHS)
-! The generated right-hand sides. Currently, the first NRHS
-! columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
-!
-! LDB (input) INTEGER
-! The leading dimension of the array B. LDB >= N.
-!
-! WORK (workspace) REAL array, dimension (N)
-!
-!
-! INFO (output) INTEGER
-! = 0: successful exit
-! = 1: N is too large; the data is still generated but may not
-! be not exact.
-! < 0: if INFO = -i, the i-th argument had an illegal value
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZLAHILB(N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+ $ INFO, PATH)
+*
+* -- LAPACK test routine (version 3.0) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+! .. Scalar Arguments ..
+ INTEGER N, NRHS, LDA, LDX, LDB, INFO
+! .. Array Arguments ..
+ DOUBLE PRECISION WORK(N)
+ COMPLEX*16 A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
+ CHARACTER*3 PATH
+! ..
!
! =====================================================================
diff --git a/TESTING/LIN/zlaipd.f b/TESTING/LIN/zlaipd.f
index 24df9825..61aafdda 100644
--- a/TESTING/LIN/zlaipd.f
+++ b/TESTING/LIN/zlaipd.f
@@ -1,50 +1,101 @@
- SUBROUTINE ZLAIPD( N, A, INDA, VINDA )
+*> \brief \b ZLAIPD
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER INDA, N, VINDA
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLAIPD( N, A, INDA, VINDA )
+*
+* .. Scalar Arguments ..
+* INTEGER INDA, N, VINDA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( * )
+* ..
+*
* Purpose
* =======
*
-* ZLAIPD sets the imaginary part of the diagonal elements of a complex
-* matrix A to a large value. This is used to test LAPACK routines for
-* complex Hermitian matrices, which are not supposed to access or use
-* the imaginary parts of the diagonals.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAIPD sets the imaginary part of the diagonal elements of a complex
+*> matrix A to a large value. This is used to test LAPACK routines for
+*> complex Hermitian matrices, which are not supposed to access or use
+*> the imaginary parts of the diagonals.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of diagonal elements of A.
-*
-* A (input/output) COMPLEX*16 array, dimension
-* (1+(N-1)*INDA+(N-2)*VINDA)
-* On entry, the complex (Hermitian) matrix A.
-* On exit, the imaginary parts of the diagonal elements are set
-* to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
-* SAFMIN is the safe minimum.
-*
-* INDA (input) INTEGER
-* The increment between A(1) and the next diagonal element of A.
-* Typical values are
-* = LDA+1: square matrices with leading dimension LDA
-* = 2: packed upper triangular matrix, starting at A(1,1)
-* = N: packed lower triangular matrix, starting at A(1,1)
-*
-* VINDA (input) INTEGER
-* The change in the diagonal increment between columns of A.
-* Typical values are
-* = 0: no change, the row and column increments in A are fixed
-* = 1: packed upper triangular matrix
-* = -1: packed lower triangular matrix
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of diagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension
+*> (1+(N-1)*INDA+(N-2)*VINDA)
+*> On entry, the complex (Hermitian) matrix A.
+*> On exit, the imaginary parts of the diagonal elements are set
+*> to BIGNUM = EPS / SAFMIN, where EPS is the machine epsilon and
+*> SAFMIN is the safe minimum.
+*> \endverbatim
+*>
+*> \param[in] INDA
+*> \verbatim
+*> INDA is INTEGER
+*> The increment between A(1) and the next diagonal element of A.
+*> Typical values are
+*> = LDA+1: square matrices with leading dimension LDA
+*> = 2: packed upper triangular matrix, starting at A(1,1)
+*> = N: packed lower triangular matrix, starting at A(1,1)
+*> \endverbatim
+*>
+*> \param[in] VINDA
+*> \verbatim
+*> VINDA is INTEGER
+*> The change in the diagonal increment between columns of A.
+*> Typical values are
+*> = 0: no change, the row and column increments in A are fixed
+*> = 1: packed upper triangular matrix
+*> = -1: packed lower triangular matrix
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
+ SUBROUTINE ZLAIPD( N, A, INDA, VINDA )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER INDA, N, VINDA
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlaptm.f b/TESTING/LIN/zlaptm.f
index 7c8b008e..03c6243b 100644
--- a/TESTING/LIN/zlaptm.f
+++ b/TESTING/LIN/zlaptm.f
@@ -1,74 +1,150 @@
- SUBROUTINE ZLAPTM( UPLO, N, NRHS, ALPHA, D, E, X, LDX, BETA, B,
- $ LDB )
-*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDB, LDX, N, NRHS
- DOUBLE PRECISION ALPHA, BETA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * )
- COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * )
-* ..
-*
+*> \brief \b ZLAPTM
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAPTM( UPLO, N, NRHS, ALPHA, D, E, X, LDX, BETA, B,
+* LDB )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* ZLAPTM multiplies an N by NRHS matrix X by a Hermitian tridiagonal
-* matrix A and stores the result in a matrix B. The operation has the
-* form
-*
-* B := alpha * A * X + beta * B
-*
-* where alpha may be either 1. or -1. and beta may be 0., 1., or -1.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAPTM multiplies an N by NRHS matrix X by a Hermitian tridiagonal
+*> matrix A and stores the result in a matrix B. The operation has the
+*> form
+*>
+*> B := alpha * A * X + beta * B
+*>
+*> where alpha may be either 1. or -1. and beta may be 0., 1., or -1.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* Specifies whether the superdiagonal or the subdiagonal of the
-* tridiagonal matrix A is stored.
-* = 'U': Upper, E is the superdiagonal of A.
-* = 'L': Lower, E is the subdiagonal of A.
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B.
-*
-* ALPHA (input) DOUBLE PRECISION
-* The scalar alpha. ALPHA must be 1. or -1.; otherwise,
-* it is assumed to be 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the superdiagonal or the subdiagonal of the
+*> tridiagonal matrix A is stored.
+*> = 'U': Upper, E is the superdiagonal of A.
+*> = 'L': Lower, E is the subdiagonal of A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> The scalar alpha. ALPHA must be 1. or -1.; otherwise,
+*> it is assumed to be 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) subdiagonal or superdiagonal elements of A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The N by NRHS matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(N,1).
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> The scalar beta. BETA must be 0., 1., or -1.; otherwise,
+*> it is assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the N by NRHS matrix B.
+*> On exit, B is overwritten by the matrix expression
+*> B := alpha * A * X + beta * B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(N,1).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) subdiagonal or superdiagonal elements of A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The N by NRHS matrix X.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(N,1).
+*> \ingroup complex16_lin
*
-* BETA (input) DOUBLE PRECISION
-* The scalar beta. BETA must be 0., 1., or -1.; otherwise,
-* it is assumed to be 1.
+* =====================================================================
+ SUBROUTINE ZLAPTM( UPLO, N, NRHS, ALPHA, D, E, X, LDX, BETA, B,
+ $ LDB )
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the N by NRHS matrix B.
-* On exit, B is overwritten by the matrix expression
-* B := alpha * A * X + beta * B.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(N,1).
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDB, LDX, N, NRHS
+ DOUBLE PRECISION ALPHA, BETA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * )
+ COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlarhs.f b/TESTING/LIN/zlarhs.f
index fa678674..0d97dde4 100644
--- a/TESTING/LIN/zlarhs.f
+++ b/TESTING/LIN/zlarhs.f
@@ -1,9 +1,222 @@
+*> \brief \b ZLARHS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
+* A, LDA, X, LDX, B, LDB, ISEED, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS, UPLO, XTYPE
+* CHARACTER*3 PATH
+* INTEGER INFO, KL, KU, LDA, LDB, LDX, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARHS chooses a set of NRHS random solution vectors and sets
+*> up the right hand sides for the linear system
+*> op( A ) * X = B,
+*> where op( A ) may be A, A**T (transpose of A), or A**H (conjugate
+*> transpose of A).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The type of the complex matrix A. PATH may be given in any
+*> combination of upper and lower case. Valid paths include
+*> xGE: General m x n matrix
+*> xGB: General banded matrix
+*> xPO: Hermitian positive definite, 2-D storage
+*> xPP: Hermitian positive definite packed
+*> xPB: Hermitian positive definite banded
+*> xHE: Hermitian indefinite, 2-D storage
+*> xHP: Hermitian indefinite packed
+*> xHB: Hermitian indefinite banded
+*> xSY: Symmetric indefinite, 2-D storage
+*> xSP: Symmetric indefinite packed
+*> xSB: Symmetric indefinite banded
+*> xTR: Triangular
+*> xTP: Triangular packed
+*> xTB: Triangular banded
+*> xQR: General m x n matrix
+*> xLQ: General m x n matrix
+*> xQL: General m x n matrix
+*> xRQ: General m x n matrix
+*> where the leading character indicates the precision.
+*> \endverbatim
+*>
+*> \param[in] XTYPE
+*> \verbatim
+*> XTYPE is CHARACTER*1
+*> Specifies how the exact solution X will be determined:
+*> = 'N': New solution; generate a random X.
+*> = 'C': Computed; use value of X on entry.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Used only if A is symmetric or triangular; specifies whether
+*> the upper or lower triangular part of the matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Used only if A is nonsymmetric; specifies the operation
+*> applied to the matrix A.
+*> = 'N': B := A * X
+*> = 'T': B := A**T * X
+*> = 'C': B := A**H * X
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Used only if A is a band matrix; specifies the number of
+*> subdiagonals of A if A is a general band matrix or if A is
+*> symmetric or triangular and UPLO = 'L'; specifies the number
+*> of superdiagonals of A if A is symmetric or triangular and
+*> UPLO = 'U'. 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Used only if A is a general band matrix or if A is
+*> triangular.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xGB, specifies the number of superdiagonals of A,
+*> and 0 <= KU <= N-1.
+*> \endverbatim
+*> \verbatim
+*> If PATH = xTR, xTP, or xTB, specifies whether or not the
+*> matrix has unit diagonal:
+*> = 1: matrix has non-unit diagonal (default)
+*> = 2: matrix has unit diagonal
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand side vectors in the system A*X = B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The test matrix whose type is given by PATH.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> If PATH = xGB, LDA >= KL+KU+1.
+*> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
+*> Otherwise, LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*> X is or output) COMPLEX*16 array, dimension (LDX,NRHS)
+*> On entry, if XTYPE = 'C' (for 'Computed'), then X contains
+*> the exact solution to the system of linear equations.
+*> On exit, if XTYPE = 'N' (for 'New'), then X is initialized
+*> with random values.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vector(s) for the system of equations,
+*> computed from B = op(A) * X, where op(A) is determined by
+*> TRANS.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. If TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> ZLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZLARHS( PATH, XTYPE, UPLO, TRANS, M, N, KL, KU, NRHS,
$ A, LDA, X, LDX, B, LDB, ISEED, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS, UPLO, XTYPE
@@ -15,123 +228,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLARHS chooses a set of NRHS random solution vectors and sets
-* up the right hand sides for the linear system
-* op( A ) * X = B,
-* where op( A ) may be A, A**T (transpose of A), or A**H (conjugate
-* transpose of A).
-*
-* Arguments
-* =========
-*
-* PATH (input) CHARACTER*3
-* The type of the complex matrix A. PATH may be given in any
-* combination of upper and lower case. Valid paths include
-* xGE: General m x n matrix
-* xGB: General banded matrix
-* xPO: Hermitian positive definite, 2-D storage
-* xPP: Hermitian positive definite packed
-* xPB: Hermitian positive definite banded
-* xHE: Hermitian indefinite, 2-D storage
-* xHP: Hermitian indefinite packed
-* xHB: Hermitian indefinite banded
-* xSY: Symmetric indefinite, 2-D storage
-* xSP: Symmetric indefinite packed
-* xSB: Symmetric indefinite banded
-* xTR: Triangular
-* xTP: Triangular packed
-* xTB: Triangular banded
-* xQR: General m x n matrix
-* xLQ: General m x n matrix
-* xQL: General m x n matrix
-* xRQ: General m x n matrix
-* where the leading character indicates the precision.
-*
-* XTYPE (input) CHARACTER*1
-* Specifies how the exact solution X will be determined:
-* = 'N': New solution; generate a random X.
-* = 'C': Computed; use value of X on entry.
-*
-* UPLO (input) CHARACTER*1
-* Used only if A is symmetric or triangular; specifies whether
-* the upper or lower triangular part of the matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Used only if A is nonsymmetric; specifies the operation
-* applied to the matrix A.
-* = 'N': B := A * X
-* = 'T': B := A**T * X
-* = 'C': B := A**H * X
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* Used only if A is a band matrix; specifies the number of
-* subdiagonals of A if A is a general band matrix or if A is
-* symmetric or triangular and UPLO = 'L'; specifies the number
-* of superdiagonals of A if A is symmetric or triangular and
-* UPLO = 'U'. 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* Used only if A is a general band matrix or if A is
-* triangular.
-*
-* If PATH = xGB, specifies the number of superdiagonals of A,
-* and 0 <= KU <= N-1.
-*
-* If PATH = xTR, xTP, or xTB, specifies whether or not the
-* matrix has unit diagonal:
-* = 1: matrix has non-unit diagonal (default)
-* = 2: matrix has unit diagonal
-*
-* NRHS (input) INTEGER
-* The number of right hand side vectors in the system A*X = B.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The test matrix whose type is given by PATH.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-* If PATH = xGB, LDA >= KL+KU+1.
-* If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1.
-* Otherwise, LDA >= max(1,M).
-*
-* X (input or output) COMPLEX*16 array, dimension (LDX,NRHS)
-* On entry, if XTYPE = 'C' (for 'Computed'), then X contains
-* the exact solution to the system of linear equations.
-* On exit, if XTYPE = 'N' (for 'New'), then X is initialized
-* with random values.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M).
-*
-* B (output) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vector(s) for the system of equations,
-* computed from B = op(A) * X, where op(A) is determined by
-* TRANS.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. If TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* ZLATMS). Modified on exit.
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -k, the k-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zlatb4.f b/TESTING/LIN/zlatb4.f
index 0440ce46..c8aade08 100644
--- a/TESTING/LIN/zlatb4.f
+++ b/TESTING/LIN/zlatb4.f
@@ -1,65 +1,138 @@
- SUBROUTINE ZLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
- $ CNDNUM, DIST )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER DIST, TYPE
- CHARACTER*3 PATH
- INTEGER IMAT, KL, KU, M, MODE, N
- DOUBLE PRECISION ANORM, CNDNUM
-* ..
-*
+*> \brief \b ZLATB4
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
+* CNDNUM, DIST )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, TYPE
+* CHARACTER*3 PATH
+* INTEGER IMAT, KL, KU, M, MODE, N
+* DOUBLE PRECISION ANORM, CNDNUM
+* ..
+*
* Purpose
* =======
*
-* ZLATB4 sets parameters for the matrix generator based on the type of
-* matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATB4 sets parameters for the matrix generator based on the type of
+*> matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* M (input) INTEGER
-* The number of rows in the matrix to be generated.
-*
-* N (input) INTEGER
-* The number of columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix
-* = 'P': symmetric positive (semi)definite matrix
-* = 'N': nonsymmetric matrix
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix
+*> = 'P': symmetric positive (semi)definite matrix
+*> = 'N': nonsymmetric matrix
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is DOUBLE PRECISION
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) DOUBLE PRECISION
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup complex16_lin
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE ZLATB4( PATH, IMAT, M, N, TYPE, KL, KU, ANORM, MODE,
+ $ CNDNUM, DIST )
*
-* CNDNUM (output) DOUBLE PRECISION
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ CHARACTER DIST, TYPE
+ CHARACTER*3 PATH
+ INTEGER IMAT, KL, KU, M, MODE, N
+ DOUBLE PRECISION ANORM, CNDNUM
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlatb5.f b/TESTING/LIN/zlatb5.f
index e0fcd491..868de8fb 100644
--- a/TESTING/LIN/zlatb5.f
+++ b/TESTING/LIN/zlatb5.f
@@ -1,62 +1,132 @@
- SUBROUTINE ZLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
- $ CNDNUM, DIST )
-*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
-*
-* .. Scalar Arguments ..
- DOUBLE PRECISION ANORM, CNDNUM
- INTEGER IMAT, KL, KU, MODE, N
- CHARACTER DIST, TYPE
- CHARACTER*3 PATH
-* ..
-*
+*> \brief \b ZLATB5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
+* CNDNUM, DIST )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION ANORM, CNDNUM
+* INTEGER IMAT, KL, KU, MODE, N
+* CHARACTER DIST, TYPE
+* CHARACTER*3 PATH
+* ..
+*
* Purpose
* =======
*
-* ZLATB5 sets parameters for the matrix generator based on the type
-* of matrix to be generated.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATB5 sets parameters for the matrix generator based on the type
+*> of matrix to be generated.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PATH (input) CHARACTER*3
-* The LAPACK path name.
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* N (input) INTEGER
-* The number of rows and columns in the matrix to be generated.
-*
-* TYPE (output) CHARACTER*1
-* The type of the matrix to be generated:
-* = 'S': symmetric matrix
-* = 'P': symmetric positive (semi)definite matrix
-* = 'N': nonsymmetric matrix
+*> \param[in] PATH
+*> \verbatim
+*> PATH is CHARACTER*3
+*> The LAPACK path name.
+*> \endverbatim
+*>
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns in the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] TYPE
+*> \verbatim
+*> TYPE is CHARACTER*1
+*> The type of the matrix to be generated:
+*> = 'S': symmetric matrix
+*> = 'P': symmetric positive (semi)definite matrix
+*> = 'N': nonsymmetric matrix
+*> \endverbatim
+*>
+*> \param[out] KL
+*> \verbatim
+*> KL is INTEGER
+*> The lower band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] KU
+*> \verbatim
+*> KU is INTEGER
+*> The upper band width of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> The desired norm of the matrix to be generated. The diagonal
+*> matrix of singular values or eigenvalues is scaled by this
+*> value.
+*> \endverbatim
+*>
+*> \param[out] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> A key indicating how to choose the vector of eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] CNDNUM
+*> \verbatim
+*> CNDNUM is DOUBLE PRECISION
+*> The desired condition number.
+*> \endverbatim
+*>
+*> \param[out] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> The type of distribution to be used by the random number
+*> generator.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* KL (output) INTEGER
-* The lower band width of the matrix to be generated.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* KU (output) INTEGER
-* The upper band width of the matrix to be generated.
+*> \date November 2011
*
-* ANORM (output) DOUBLE PRECISION
-* The desired norm of the matrix to be generated. The diagonal
-* matrix of singular values or eigenvalues is scaled by this
-* value.
+*> \ingroup complex16_lin
*
-* MODE (output) INTEGER
-* A key indicating how to choose the vector of eigenvalues.
+* =====================================================================
+ SUBROUTINE ZLATB5( PATH, IMAT, N, TYPE, KL, KU, ANORM, MODE,
+ $ CNDNUM, DIST )
*
-* CNDNUM (output) DOUBLE PRECISION
-* The desired condition number.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIST (output) CHARACTER*1
-* The type of distribution to be used by the random number
-* generator.
+* .. Scalar Arguments ..
+ DOUBLE PRECISION ANORM, CNDNUM
+ INTEGER IMAT, KL, KU, MODE, N
+ CHARACTER DIST, TYPE
+ CHARACTER*3 PATH
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlatsp.f b/TESTING/LIN/zlatsp.f
index 851e78ca..78c85af1 100644
--- a/TESTING/LIN/zlatsp.f
+++ b/TESTING/LIN/zlatsp.f
@@ -1,51 +1,104 @@
- SUBROUTINE ZLATSP( UPLO, N, X, ISEED )
+*> \brief \b ZLATSP
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( * )
- COMPLEX*16 X( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZLATSP( UPLO, N, X, ISEED )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( * )
+* COMPLEX*16 X( * )
+* ..
+*
* Purpose
* =======
*
-* ZLATSP generates a special test matrix for the complex symmetric
-* (indefinite) factorization for packed matrices. The pivot blocks of
-* the generated matrix will be in the following order:
-* 2x2 pivot block, non diagonalizable
-* 1x1 pivot block
-* 2x2 pivot block, diagonalizable
-* (cycle repeats)
-* A row interchange is required for each non-diagonalizable 2x2 block.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATSP generates a special test matrix for the complex symmetric
+*> (indefinite) factorization for packed matrices. The pivot blocks of
+*> the generated matrix will be in the following order:
+*> 2x2 pivot block, non diagonalizable
+*> 1x1 pivot block
+*> 2x2 pivot block, diagonalizable
+*> (cycle repeats)
+*> A row interchange is required for each non-diagonalizable 2x2 block.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* Specifies whether the generated matrix is to be upper or
-* lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the generated matrix is to be upper or
+*> lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The generated matrix in packed storage format. The matrix
+*> consists of 3x3 and 2x2 diagonal blocks which result in the
+*> pivot sequence given above. The matrix outside these
+*> diagonal blocks is zero.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed for the random number generator. The last
+*> of the four integers must be odd. (modified on exit)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The dimension of the matrix to be generated.
+*> \date November 2011
*
-* X (output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The generated matrix in packed storage format. The matrix
-* consists of 3x3 and 2x2 diagonal blocks which result in the
-* pivot sequence given above. The matrix outside these
-* diagonal blocks is zero.
+*> \ingroup complex16_lin
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed for the random number generator. The last
-* of the four integers must be odd. (modified on exit)
+* =====================================================================
+ SUBROUTINE ZLATSP( UPLO, N, X, ISEED )
+*
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( * )
+ COMPLEX*16 X( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlatsy.f b/TESTING/LIN/zlatsy.f
index 82abb7e2..229887a6 100644
--- a/TESTING/LIN/zlatsy.f
+++ b/TESTING/LIN/zlatsy.f
@@ -1,53 +1,109 @@
- SUBROUTINE ZLATSY( UPLO, N, X, LDX, ISEED )
+*> \brief \b ZLATSY
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDX, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( * )
- COMPLEX*16 X( LDX, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATSY( UPLO, N, X, LDX, ISEED )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDX, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( * )
+* COMPLEX*16 X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* ZLATSY generates a special test matrix for the complex symmetric
-* (indefinite) factorization. The pivot blocks of the generated matrix
-* will be in the following order:
-* 2x2 pivot block, non diagonalizable
-* 1x1 pivot block
-* 2x2 pivot block, diagonalizable
-* (cycle repeats)
-* A row interchange is required for each non-diagonalizable 2x2 block.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATSY generates a special test matrix for the complex symmetric
+*> (indefinite) factorization. The pivot blocks of the generated matrix
+*> will be in the following order:
+*> 2x2 pivot block, non diagonalizable
+*> 1x1 pivot block
+*> 2x2 pivot block, diagonalizable
+*> (cycle repeats)
+*> A row interchange is required for each non-diagonalizable 2x2 block.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER
-* Specifies whether the generated matrix is to be upper or
-* lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the generated matrix is to be upper or
+*> lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,N)
+*> The generated matrix, consisting of 3x3 and 2x2 diagonal
+*> blocks which result in the pivot sequence given above.
+*> The matrix outside of these diagonal blocks is zero.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed for the random number generator. The last
+*> of the four integers must be odd. (modified on exit)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
*
-* N (input) INTEGER
-* The dimension of the matrix to be generated.
+*> \ingroup complex16_lin
*
-* X (output) COMPLEX*16 array, dimension (LDX,N)
-* The generated matrix, consisting of 3x3 and 2x2 diagonal
-* blocks which result in the pivot sequence given above.
-* The matrix outside of these diagonal blocks is zero.
+* =====================================================================
+ SUBROUTINE ZLATSY( UPLO, N, X, LDX, ISEED )
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed for the random number generator. The last
-* of the four integers must be odd. (modified on exit)
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDX, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( * )
+ COMPLEX*16 X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlattb.f b/TESTING/LIN/zlattb.f
index e51b49f5..63ecbbc3 100644
--- a/TESTING/LIN/zlattb.f
+++ b/TESTING/LIN/zlattb.f
@@ -1,9 +1,152 @@
+*> \brief \b ZLATTB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
+* LDAB, B, WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, KD, LDAB, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATTB generates a triangular test matrix in 2-dimensional storage.
+*> IMAT and UPLO uniquely specify the properties of the test matrix,
+*> which is returned in the array A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose (= transpose)
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> ZLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the banded
+*> triangular matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[out] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular banded matrix A, stored in the
+*> first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
+*> If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
+*> If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZLATTB( IMAT, UPLO, TRANS, DIAG, ISEED, N, KD, AB,
$ LDAB, B, WORK, RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,67 +158,6 @@
COMPLEX*16 AB( LDAB, * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATTB generates a triangular test matrix in 2-dimensional storage.
-* IMAT and UPLO uniquely specify the properties of the test matrix,
-* which is returned in the array A.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose (= transpose)
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* ZLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the banded
-* triangular matrix A. KD >= 0.
-*
-* AB (output) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular banded matrix A, stored in the
-* first KD+1 rows of AB. Let j be a column of A, 1<=j<=n.
-* If UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j.
-* If UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (workspace) COMPLEX*16 array, dimension (N)
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zlattp.f b/TESTING/LIN/zlattp.f
index 97bba304..c59385cc 100644
--- a/TESTING/LIN/zlattp.f
+++ b/TESTING/LIN/zlattp.f
@@ -1,9 +1,142 @@
+*> \brief \b ZLATTP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATTP( IMAT, UPLO, TRANS, DIAG, ISEED, N, AP, B, WORK,
+* RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AP( * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATTP generates a triangular test matrix in packed storage.
+*> IMAT and UPLO uniquely specify the properties of the test matrix,
+*> which is returned in the array AP.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> ZLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (N)
+*> The right hand side vector, if IMAT > 10.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZLATTP( IMAT, UPLO, TRANS, DIAG, ISEED, N, AP, B, WORK,
$ RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,63 +148,6 @@
COMPLEX*16 AP( * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATTP generates a triangular test matrix in packed storage.
-* IMAT and UPLO uniquely specify the properties of the test matrix,
-* which is returned in the array AP.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* ZLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* AP (output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* B (output) COMPLEX*16 array, dimension (N)
-* The right hand side vector, if IMAT > 10.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zlattr.f b/TESTING/LIN/zlattr.f
index 667b353b..a22005bf 100644
--- a/TESTING/LIN/zlattr.f
+++ b/TESTING/LIN/zlattr.f
@@ -1,9 +1,149 @@
+*> \brief \b ZLATTR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATTR( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, LDA, B,
+* WORK, RWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER IMAT, INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATTR generates a triangular test matrix in 2-dimensional storage.
+*> IMAT and UPLO uniquely specify the properties of the test matrix,
+*> which is returned in the array A.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] IMAT
+*> \verbatim
+*> IMAT is INTEGER
+*> An integer key describing which matrix to generate for this
+*> path.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A will be upper or lower
+*> triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether the matrix or its transpose will be used.
+*> = 'N': No transpose
+*> = 'T': Transpose
+*> = 'C': Conjugate transpose
+*> \endverbatim
+*>
+*> \param[out] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> The seed vector for the random number generator (used in
+*> ZLATMS). Modified on exit.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix to be generated.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading N x N
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading N x N lower
+*> triangular part of the array A contains the lower triangular
+*> matrix and the strictly upper triangular part of A is not
+*> referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (N)
+*> The right hand side vector, if IMAT > 10.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZLATTR( IMAT, UPLO, TRANS, DIAG, ISEED, N, A, LDA, B,
$ WORK, RWORK, INFO )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,67 +155,6 @@
COMPLEX*16 A( LDA, * ), B( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATTR generates a triangular test matrix in 2-dimensional storage.
-* IMAT and UPLO uniquely specify the properties of the test matrix,
-* which is returned in the array A.
-*
-* Arguments
-* =========
-*
-* IMAT (input) INTEGER
-* An integer key describing which matrix to generate for this
-* path.
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A will be upper or lower
-* triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies whether the matrix or its transpose will be used.
-* = 'N': No transpose
-* = 'T': Transpose
-* = 'C': Conjugate transpose
-*
-* DIAG (output) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* The seed vector for the random number generator (used in
-* ZLATMS). Modified on exit.
-*
-* N (input) INTEGER
-* The order of the matrix to be generated.
-*
-* A (output) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading N x N
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading N x N lower
-* triangular part of the array A contains the lower triangular
-* matrix and the strictly upper triangular part of A is not
-* referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (output) COMPLEX*16 array, dimension (N)
-* The right hand side vector, if IMAT > 10.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zlavhe.f b/TESTING/LIN/zlavhe.f
index 606f1328..7f419437 100644
--- a/TESTING/LIN/zlavhe.f
+++ b/TESTING/LIN/zlavhe.f
@@ -1,9 +1,159 @@
+*> \brief \b ZLAVHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAVHE( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAVHE performs one of the matrix-vector operations
+*> x := A*x or x := A^H*x,
+*> where x is an N element vector and A is one of the factors
+*> from the symmetric factorization computed by ZHETRF.
+*> ZHETRF produces a factorization of the form
+*> U * D * U^H or L * D * L^H,
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U^H (or L^H) is the conjugate transpose of
+*> U (or L), and D is Hermitian and block diagonal with 1 x 1 and
+*> 2 x 2 diagonal blocks. The multipliers for the transformations
+*> and the upper or lower triangular parts of the diagonal blocks
+*> are stored in the leading upper or lower triangle of the 2-D
+*> array A.
+*>
+*> If TRANS = 'N' or 'n', ZLAVHE multiplies either by U or U * D
+*> (or L or L * D).
+*> If TRANS = 'C' or 'c', ZLAVHE multiplies either by U^H or D * U^H
+*> (or L^H or D * L^H ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the triangular matrix
+*> stored in A is upper or lower triangular.
+*> UPLO = 'U' or 'u' The matrix is upper triangular.
+*> UPLO = 'L' or 'l' The matrix is lower triangular.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> TRANS - CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> TRANS = 'N' or 'n' x := A*x.
+*> TRANS = 'C' or 'c' x := A^H*x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> DIAG - CHARACTER*1
+*> On entry, DIAG specifies whether the diagonal blocks are
+*> assumed to be unit matrices:
+*> DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
+*> DIAG = 'N' or 'n' Diagonal blocks are non-unit.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> NRHS - INTEGER
+*> On entry, NRHS specifies the number of right hand sides,
+*> i.e., the number of vectors x to be multiplied by A.
+*> NRHS must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX*16 array, dimension( LDA, N )
+*> On entry, A contains a block diagonal matrix and the
+*> multipliers of the transformations used to obtain it,
+*> stored as a 2-D triangular matrix.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling ( sub ) program. LDA must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> IPIV - INTEGER array, dimension( N )
+*> On entry, IPIV contains the vector of pivot indices as
+*> determined by ZSYTRF or ZHETRF.
+*> If IPIV( K ) = K, no interchange was done.
+*> If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
+*> changed with row IPIV( K ) and a 1 x 1 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> \endverbatim
+*> \verbatim
+*> B - COMPLEX*16 array, dimension( LDB, NRHS )
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*> \verbatim
+*> LDB - INTEGER
+*> On entry, LDB contains the leading dimension of B as
+*> declared in the calling program. LDB must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> INFO is the error flag.
+*> On exit, a value of 0 indicates a successful exit.
+*> A negative value, say -K, indicates that the K-th argument
+*> has an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZLAVHE( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
$ LDB, INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,102 +164,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAVHE performs one of the matrix-vector operations
-* x := A*x or x := A^H*x,
-* where x is an N element vector and A is one of the factors
-* from the symmetric factorization computed by ZHETRF.
-* ZHETRF produces a factorization of the form
-* U * D * U^H or L * D * L^H,
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U^H (or L^H) is the conjugate transpose of
-* U (or L), and D is Hermitian and block diagonal with 1 x 1 and
-* 2 x 2 diagonal blocks. The multipliers for the transformations
-* and the upper or lower triangular parts of the diagonal blocks
-* are stored in the leading upper or lower triangle of the 2-D
-* array A.
-*
-* If TRANS = 'N' or 'n', ZLAVHE multiplies either by U or U * D
-* (or L or L * D).
-* If TRANS = 'C' or 'c', ZLAVHE multiplies either by U^H or D * U^H
-* (or L^H or D * L^H ).
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the triangular matrix
-* stored in A is upper or lower triangular.
-* UPLO = 'U' or 'u' The matrix is upper triangular.
-* UPLO = 'L' or 'l' The matrix is lower triangular.
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-* TRANS = 'N' or 'n' x := A*x.
-* TRANS = 'C' or 'c' x := A^H*x.
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1
-* On entry, DIAG specifies whether the diagonal blocks are
-* assumed to be unit matrices:
-* DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
-* DIAG = 'N' or 'n' Diagonal blocks are non-unit.
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* NRHS - INTEGER
-* On entry, NRHS specifies the number of right hand sides,
-* i.e., the number of vectors x to be multiplied by A.
-* NRHS must be at least zero.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array, dimension( LDA, N )
-* On entry, A contains a block diagonal matrix and the
-* multipliers of the transformations used to obtain it,
-* stored as a 2-D triangular matrix.
-* Unchanged on exit.
-*
-* LDA - INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling ( sub ) program. LDA must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* IPIV - INTEGER array, dimension( N )
-* On entry, IPIV contains the vector of pivot indices as
-* determined by ZSYTRF or ZHETRF.
-* If IPIV( K ) = K, no interchange was done.
-* If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
-* changed with row IPIV( K ) and a 1 x 1 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-*
-* B - COMPLEX*16 array, dimension( LDB, NRHS )
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB - INTEGER
-* On entry, LDB contains the leading dimension of B as
-* declared in the calling program. LDB must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* INFO - INTEGER
-* INFO is the error flag.
-* On exit, a value of 0 indicates a successful exit.
-* A negative value, say -K, indicates that the K-th argument
-* has an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zlavhp.f b/TESTING/LIN/zlavhp.f
index 4f654e7e..ec071e6d 100644
--- a/TESTING/LIN/zlavhp.f
+++ b/TESTING/LIN/zlavhp.f
@@ -1,9 +1,151 @@
+*> \brief \b ZLAVHP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAVHP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAVHP performs one of the matrix-vector operations
+*> x := A*x or x := A^H*x,
+*> where x is an N element vector and A is one of the factors
+*> from the symmetric factorization computed by ZHPTRF.
+*> ZHPTRF produces a factorization of the form
+*> U * D * U^H or L * D * L^H,
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U^H (or L^H) is the conjugate transpose of
+*> U (or L), and D is Hermitian and block diagonal with 1 x 1 and
+*> 2 x 2 diagonal blocks. The multipliers for the transformations
+*> and the upper or lower triangular parts of the diagonal blocks
+*> are stored columnwise in packed format in the linear array A.
+*>
+*> If TRANS = 'N' or 'n', ZLAVHP multiplies either by U or U * D
+*> (or L or L * D).
+*> If TRANS = 'C' or 'c', ZLAVHP multiplies either by U^H or D * U^H
+*> (or L^H or D * L^H ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the triangular matrix
+*> stored in A is upper or lower triangular.
+*> UPLO = 'U' or 'u' The matrix is upper triangular.
+*> UPLO = 'L' or 'l' The matrix is lower triangular.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> TRANS - CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> TRANS = 'N' or 'n' x := A*x.
+*> TRANS = 'C' or 'c' x := A^H*x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> DIAG - CHARACTER*1
+*> On entry, DIAG specifies whether the diagonal blocks are
+*> assumed to be unit matrices, as follows:
+*> DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
+*> DIAG = 'N' or 'n' Diagonal blocks are non-unit.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> NRHS - INTEGER
+*> On entry, NRHS specifies the number of right hand sides,
+*> i.e., the number of vectors x to be multiplied by A.
+*> NRHS must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX*16 array, dimension( N*(N+1)/2 )
+*> On entry, A contains a block diagonal matrix and the
+*> multipliers of the transformations used to obtain it,
+*> stored as a packed triangular matrix.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> IPIV - INTEGER array, dimension( N )
+*> On entry, IPIV contains the vector of pivot indices as
+*> determined by ZSPTRF or ZHPTRF.
+*> If IPIV( K ) = K, no interchange was done.
+*> If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
+*> changed with row IPIV( K ) and a 1 x 1 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> \endverbatim
+*> \verbatim
+*> B - COMPLEX*16 array, dimension( LDB, NRHS )
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*> \verbatim
+*> LDB - INTEGER
+*> On entry, LDB contains the leading dimension of B as
+*> declared in the calling program. LDB must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> INFO is the error flag.
+*> On exit, a value of 0 indicates a successful exit.
+*> A negative value, say -K, indicates that the K-th argument
+*> has an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZLAVHP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,95 +156,6 @@
COMPLEX*16 A( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAVHP performs one of the matrix-vector operations
-* x := A*x or x := A^H*x,
-* where x is an N element vector and A is one of the factors
-* from the symmetric factorization computed by ZHPTRF.
-* ZHPTRF produces a factorization of the form
-* U * D * U^H or L * D * L^H,
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U^H (or L^H) is the conjugate transpose of
-* U (or L), and D is Hermitian and block diagonal with 1 x 1 and
-* 2 x 2 diagonal blocks. The multipliers for the transformations
-* and the upper or lower triangular parts of the diagonal blocks
-* are stored columnwise in packed format in the linear array A.
-*
-* If TRANS = 'N' or 'n', ZLAVHP multiplies either by U or U * D
-* (or L or L * D).
-* If TRANS = 'C' or 'c', ZLAVHP multiplies either by U^H or D * U^H
-* (or L^H or D * L^H ).
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the triangular matrix
-* stored in A is upper or lower triangular.
-* UPLO = 'U' or 'u' The matrix is upper triangular.
-* UPLO = 'L' or 'l' The matrix is lower triangular.
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-* TRANS = 'N' or 'n' x := A*x.
-* TRANS = 'C' or 'c' x := A^H*x.
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1
-* On entry, DIAG specifies whether the diagonal blocks are
-* assumed to be unit matrices, as follows:
-* DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
-* DIAG = 'N' or 'n' Diagonal blocks are non-unit.
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* NRHS - INTEGER
-* On entry, NRHS specifies the number of right hand sides,
-* i.e., the number of vectors x to be multiplied by A.
-* NRHS must be at least zero.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array, dimension( N*(N+1)/2 )
-* On entry, A contains a block diagonal matrix and the
-* multipliers of the transformations used to obtain it,
-* stored as a packed triangular matrix.
-* Unchanged on exit.
-*
-* IPIV - INTEGER array, dimension( N )
-* On entry, IPIV contains the vector of pivot indices as
-* determined by ZSPTRF or ZHPTRF.
-* If IPIV( K ) = K, no interchange was done.
-* If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
-* changed with row IPIV( K ) and a 1 x 1 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-*
-* B - COMPLEX*16 array, dimension( LDB, NRHS )
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB - INTEGER
-* On entry, LDB contains the leading dimension of B as
-* declared in the calling program. LDB must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* INFO - INTEGER
-* INFO is the error flag.
-* On exit, a value of 0 indicates a successful exit.
-* A negative value, say -K, indicates that the K-th argument
-* has an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zlavsp.f b/TESTING/LIN/zlavsp.f
index 17a527d7..d8e84575 100644
--- a/TESTING/LIN/zlavsp.f
+++ b/TESTING/LIN/zlavsp.f
@@ -1,9 +1,151 @@
+*> \brief \b ZLAVSP
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAVSP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
+* INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAVSP performs one of the matrix-vector operations
+*> x := A*x or x := A^T*x,
+*> where x is an N element vector and A is one of the factors
+*> from the symmetric factorization computed by ZSPTRF.
+*> ZSPTRF produces a factorization of the form
+*> U * D * U^T or L * D * L^T,
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U^T (or L^T) is the transpose of
+*> U (or L), and D is symmetric and block diagonal with 1 x 1 and
+*> 2 x 2 diagonal blocks. The multipliers for the transformations
+*> and the upper or lower triangular parts of the diagonal blocks
+*> are stored columnwise in packed format in the linear array A.
+*>
+*> If TRANS = 'N' or 'n', ZLAVSP multiplies either by U or U * D
+*> (or L or L * D).
+*> If TRANS = 'C' or 'c', ZLAVSP multiplies either by U^T or D * U^T
+*> (or L^T or D * L^T ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the triangular matrix
+*> stored in A is upper or lower triangular.
+*> UPLO = 'U' or 'u' The matrix is upper triangular.
+*> UPLO = 'L' or 'l' The matrix is lower triangular.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> TRANS - CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> TRANS = 'N' or 'n' x := A*x.
+*> TRANS = 'T' or 't' x := A^T*x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> DIAG - CHARACTER*1
+*> On entry, DIAG specifies whether the diagonal blocks are
+*> assumed to be unit matrices, as follows:
+*> DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
+*> DIAG = 'N' or 'n' Diagonal blocks are non-unit.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> NRHS - INTEGER
+*> On entry, NRHS specifies the number of right hand sides,
+*> i.e., the number of vectors x to be multiplied by A.
+*> NRHS must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX*16 array, dimension( N*(N+1)/2 )
+*> On entry, A contains a block diagonal matrix and the
+*> multipliers of the transformations used to obtain it,
+*> stored as a packed triangular matrix.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> IPIV - INTEGER array, dimension( N )
+*> On entry, IPIV contains the vector of pivot indices as
+*> determined by ZSPTRF.
+*> If IPIV( K ) = K, no interchange was done.
+*> If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
+*> changed with row IPIV( K ) and a 1 x 1 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> \endverbatim
+*> \verbatim
+*> B - COMPLEX*16 array, dimension( LDB, NRHS )
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*> \verbatim
+*> LDB - INTEGER
+*> On entry, LDB contains the leading dimension of B as
+*> declared in the calling program. LDB must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> INFO is the error flag.
+*> On exit, a value of 0 indicates a successful exit.
+*> A negative value, say -K, indicates that the K-th argument
+*> has an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZLAVSP( UPLO, TRANS, DIAG, N, NRHS, A, IPIV, B, LDB,
$ INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,95 +156,6 @@
COMPLEX*16 A( * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAVSP performs one of the matrix-vector operations
-* x := A*x or x := A^T*x,
-* where x is an N element vector and A is one of the factors
-* from the symmetric factorization computed by ZSPTRF.
-* ZSPTRF produces a factorization of the form
-* U * D * U^T or L * D * L^T,
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U^T (or L^T) is the transpose of
-* U (or L), and D is symmetric and block diagonal with 1 x 1 and
-* 2 x 2 diagonal blocks. The multipliers for the transformations
-* and the upper or lower triangular parts of the diagonal blocks
-* are stored columnwise in packed format in the linear array A.
-*
-* If TRANS = 'N' or 'n', ZLAVSP multiplies either by U or U * D
-* (or L or L * D).
-* If TRANS = 'C' or 'c', ZLAVSP multiplies either by U^T or D * U^T
-* (or L^T or D * L^T ).
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the triangular matrix
-* stored in A is upper or lower triangular.
-* UPLO = 'U' or 'u' The matrix is upper triangular.
-* UPLO = 'L' or 'l' The matrix is lower triangular.
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-* TRANS = 'N' or 'n' x := A*x.
-* TRANS = 'T' or 't' x := A^T*x.
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1
-* On entry, DIAG specifies whether the diagonal blocks are
-* assumed to be unit matrices, as follows:
-* DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
-* DIAG = 'N' or 'n' Diagonal blocks are non-unit.
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* NRHS - INTEGER
-* On entry, NRHS specifies the number of right hand sides,
-* i.e., the number of vectors x to be multiplied by A.
-* NRHS must be at least zero.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array, dimension( N*(N+1)/2 )
-* On entry, A contains a block diagonal matrix and the
-* multipliers of the transformations used to obtain it,
-* stored as a packed triangular matrix.
-* Unchanged on exit.
-*
-* IPIV - INTEGER array, dimension( N )
-* On entry, IPIV contains the vector of pivot indices as
-* determined by ZSPTRF.
-* If IPIV( K ) = K, no interchange was done.
-* If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
-* changed with row IPIV( K ) and a 1 x 1 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-*
-* B - COMPLEX*16 array, dimension( LDB, NRHS )
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB - INTEGER
-* On entry, LDB contains the leading dimension of B as
-* declared in the calling program. LDB must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* INFO - INTEGER
-* INFO is the error flag.
-* On exit, a value of 0 indicates a successful exit.
-* A negative value, say -K, indicates that the K-th argument
-* has an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zlavsy.f b/TESTING/LIN/zlavsy.f
index 642b4d4f..854679bf 100644
--- a/TESTING/LIN/zlavsy.f
+++ b/TESTING/LIN/zlavsy.f
@@ -1,9 +1,159 @@
+*> \brief \b ZLAVSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
+* LDB, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER INFO, LDA, LDB, N, NRHS
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAVSY performs one of the matrix-vector operations
+*> x := A*x or x := A'*x,
+*> where x is an N element vector and A is one of the factors
+*> from the symmetric factorization computed by ZSYTRF.
+*> ZSYTRF produces a factorization of the form
+*> U * D * U' or L * D * L' ,
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U' (or L') is the transpose of
+*> U (or L), and D is symmetric and block diagonal with 1 x 1 and
+*> 2 x 2 diagonal blocks. The multipliers for the transformations
+*> and the upper or lower triangular parts of the diagonal blocks
+*> are stored in the leading upper or lower triangle of the 2-D
+*> array A.
+*>
+*> If TRANS = 'N' or 'n', ZLAVSY multiplies either by U or U * D
+*> (or L or L * D).
+*> If TRANS = 'T' or 't', ZLAVSY multiplies either by U' or D * U'
+*> (or L' or D * L' ).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the triangular matrix
+*> stored in A is upper or lower triangular.
+*> UPLO = 'U' or 'u' The matrix is upper triangular.
+*> UPLO = 'L' or 'l' The matrix is lower triangular.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> TRANS - CHARACTER*1
+*> On entry, TRANS specifies the operation to be performed as
+*> follows:
+*> TRANS = 'N' or 'n' x := A*x.
+*> TRANS = 'T' or 't' x := A'*x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> DIAG - CHARACTER*1
+*> On entry, DIAG specifies whether the diagonal blocks are
+*> assumed to be unit matrices:
+*> DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
+*> DIAG = 'N' or 'n' Diagonal blocks are non-unit.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> NRHS - INTEGER
+*> On entry, NRHS specifies the number of right hand sides,
+*> i.e., the number of vectors x to be multiplied by A.
+*> NRHS must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX*16 array, dimension( LDA, N )
+*> On entry, A contains a block diagonal matrix and the
+*> multipliers of the transformations used to obtain it,
+*> stored as a 2-D triangular matrix.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling ( sub ) program. LDA must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> IPIV - INTEGER array, dimension( N )
+*> On entry, IPIV contains the vector of pivot indices as
+*> determined by ZSYTRF or ZHETRF.
+*> If IPIV( K ) = K, no interchange was done.
+*> If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
+*> changed with row IPIV( K ) and a 1 x 1 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
+*> with row | IPIV( K ) | and a 2 x 2 pivot block was used.
+*> \endverbatim
+*> \verbatim
+*> B - COMPLEX*16 array, dimension( LDB, NRHS )
+*> On entry, B contains NRHS vectors of length N.
+*> On exit, B is overwritten with the product A * B.
+*> \endverbatim
+*> \verbatim
+*> LDB - INTEGER
+*> On entry, LDB contains the leading dimension of B as
+*> declared in the calling program. LDB must be at least
+*> max( 1, N ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> INFO is the error flag.
+*> On exit, a value of 0 indicates a successful exit.
+*> A negative value, say -K, indicates that the K-th argument
+*> has an illegal value.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZLAVSY( UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B,
$ LDB, INFO )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -14,102 +164,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAVSY performs one of the matrix-vector operations
-* x := A*x or x := A'*x,
-* where x is an N element vector and A is one of the factors
-* from the symmetric factorization computed by ZSYTRF.
-* ZSYTRF produces a factorization of the form
-* U * D * U' or L * D * L' ,
-* where U (or L) is a product of permutation and unit upper (lower)
-* triangular matrices, U' (or L') is the transpose of
-* U (or L), and D is symmetric and block diagonal with 1 x 1 and
-* 2 x 2 diagonal blocks. The multipliers for the transformations
-* and the upper or lower triangular parts of the diagonal blocks
-* are stored in the leading upper or lower triangle of the 2-D
-* array A.
-*
-* If TRANS = 'N' or 'n', ZLAVSY multiplies either by U or U * D
-* (or L or L * D).
-* If TRANS = 'T' or 't', ZLAVSY multiplies either by U' or D * U'
-* (or L' or D * L' ).
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the triangular matrix
-* stored in A is upper or lower triangular.
-* UPLO = 'U' or 'u' The matrix is upper triangular.
-* UPLO = 'L' or 'l' The matrix is lower triangular.
-* Unchanged on exit.
-*
-* TRANS - CHARACTER*1
-* On entry, TRANS specifies the operation to be performed as
-* follows:
-* TRANS = 'N' or 'n' x := A*x.
-* TRANS = 'T' or 't' x := A'*x.
-* Unchanged on exit.
-*
-* DIAG - CHARACTER*1
-* On entry, DIAG specifies whether the diagonal blocks are
-* assumed to be unit matrices:
-* DIAG = 'U' or 'u' Diagonal blocks are unit matrices.
-* DIAG = 'N' or 'n' Diagonal blocks are non-unit.
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* NRHS - INTEGER
-* On entry, NRHS specifies the number of right hand sides,
-* i.e., the number of vectors x to be multiplied by A.
-* NRHS must be at least zero.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array, dimension( LDA, N )
-* On entry, A contains a block diagonal matrix and the
-* multipliers of the transformations used to obtain it,
-* stored as a 2-D triangular matrix.
-* Unchanged on exit.
-*
-* LDA - INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling ( sub ) program. LDA must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* IPIV - INTEGER array, dimension( N )
-* On entry, IPIV contains the vector of pivot indices as
-* determined by ZSYTRF or ZHETRF.
-* If IPIV( K ) = K, no interchange was done.
-* If IPIV( K ) <> K but IPIV( K ) > 0, then row K was inter-
-* changed with row IPIV( K ) and a 1 x 1 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'U', then row K-1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-* If IPIV( K ) < 0 and UPLO = 'L', then row K+1 was exchanged
-* with row | IPIV( K ) | and a 2 x 2 pivot block was used.
-*
-* B - COMPLEX*16 array, dimension( LDB, NRHS )
-* On entry, B contains NRHS vectors of length N.
-* On exit, B is overwritten with the product A * B.
-*
-* LDB - INTEGER
-* On entry, LDB contains the leading dimension of B as
-* declared in the calling program. LDB must be at least
-* max( 1, N ).
-* Unchanged on exit.
-*
-* INFO - INTEGER
-* INFO is the error flag.
-* On exit, a value of 0 indicates a successful exit.
-* A negative value, say -K, indicates that the K-th argument
-* has an illegal value.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zlqt01.f b/TESTING/LIN/zlqt01.f
index 350917d3..2bda0100 100644
--- a/TESTING/LIN/zlqt01.f
+++ b/TESTING/LIN/zlqt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE ZLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZLQT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZLQT01 tests ZGELQF, which computes the LQ factorization of an m-by-n
-* matrix A, and partially tests ZUNGLQ which forms the n-by-n
-* orthogonal matrix Q.
-*
-* ZLQT01 compares L with A*Q', and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLQT01 tests ZGELQF, which computes the LQ factorization of an m-by-n
+*> matrix A, and partially tests ZUNGLQ which forms the n-by-n
+*> orthogonal matrix Q.
+*>
+*> ZLQT01 compares L with A*Q', and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX*16 array, dimension (LDA,N)
-* Details of the LQ factorization of A, as returned by ZGELQF.
-* See ZGELQF for further details.
-*
-* Q (output) COMPLEX*16 array, dimension (LDA,N)
-* The n-by-n orthogonal matrix Q.
-*
-* L (workspace) COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the LQ factorization of A, as returned by ZGELQF.
+*> See ZGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> The n-by-n orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by ZGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by ZGELQF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZLQT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(M,N))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlqt02.f b/TESTING/LIN/zlqt02.f
index 8b7eb4f5..2908feef 100644
--- a/TESTING/LIN/zlqt02.f
+++ b/TESTING/LIN/zlqt02.f
@@ -1,74 +1,155 @@
- SUBROUTINE ZLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZLQT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZLQT02 tests ZUNGLQ, which generates an m-by-n matrix Q with
-* orthonornmal rows that is defined as the product of k elementary
-* reflectors.
-*
-* Given the LQ factorization of an m-by-n matrix A, ZLQT02 generates
-* the orthogonal matrix Q defined by the factorization of the first k
-* rows of A; it compares L(1:k,1:m) with A(1:k,1:n)*Q(1:m,1:n)', and
-* checks that the rows of Q are orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLQT02 tests ZUNGLQ, which generates an m-by-n matrix Q with
+*> orthonornmal rows that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the LQ factorization of an m-by-n matrix A, ZLQT02 generates
+*> the orthogonal matrix Q defined by the factorization of the first k
+*> rows of A; it compares L(1:k,1:m) with A(1:k,1:n)*Q(1:m,1:n)', and
+*> checks that the rows of Q are orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* N >= M >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by ZLQT01.
-*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the LQ factorization of A, as returned by ZGELQF.
-* See ZGELQF for further details.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* L (workspace) COMPLEX*16 array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by ZLQT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the LQ factorization of A, as returned by ZGELQF.
+*> See ZGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX*16 array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the LQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (M)
-* The scalar factors of the elementary reflectors corresponding
-* to the LQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZLQT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zlqt03.f b/TESTING/LIN/zlqt03.f
index 7fa05999..4ebe3857 100644
--- a/TESTING/LIN/zlqt03.f
+++ b/TESTING/LIN/zlqt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE ZLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZLQT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZLQT03 tests ZUNMLQ, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* ZLQT03 compares the results of a call to ZUNMLQ with the results of
-* forming Q explicitly by a call to ZUNGLQ and then performing matrix
-* multiplication by a call to ZGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLQT03 tests ZUNMLQ, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> ZLQT03 compares the results of a call to ZUNMLQ with the results of
+*> forming Q explicitly by a call to ZUNGLQ and then performing matrix
+*> multiplication by a call to ZGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows or columns of the matrix C; C is n-by-m if
-* Q is applied from the left, or m-by-n if Q is applied from
-* the right. M >= 0.
-*
-* N (input) INTEGER
-* The order of the orthogonal matrix Q. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. N >= K >= 0.
-*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the LQ factorization of an m-by-n matrix, as
-* returned by ZGELQF. See CGELQF for further details.
-*
-* C (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* CC (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows or columns of the matrix C; C is n-by-m if
+*> Q is applied from the left, or m-by-n if Q is applied from
+*> the right. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the orthogonal matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the LQ factorization of an m-by-n matrix, as
+*> returned by ZGELQF. See CGELQF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the LQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an n-by-n orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the LQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE ZLQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an n-by-n orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zpbt01.f b/TESTING/LIN/zpbt01.f
index bf4783de..b96dde52 100644
--- a/TESTING/LIN/zpbt01.f
+++ b/TESTING/LIN/zpbt01.f
@@ -1,9 +1,131 @@
+*> \brief \b ZPBT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDA, LDAFAC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBT01 reconstructs a Hermitian positive definite band matrix A from
+*> its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of
+*> L, and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original Hermitian band matrix A. If UPLO = 'U', the
+*> upper triangular part of A is stored as a band matrix; if
+*> UPLO = 'L', the lower triangular part of A is stored. The
+*> columns of the appropriate triangle are stored in the columns
+*> of A and the diagonals of the triangle are stored in the rows
+*> of A. See ZPBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the factor
+*> L or U from the L*L' or U'*U factorization in band storage
+*> format, as computed by ZPBTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC.
+*> LDAFAC >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPBT01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,58 +137,6 @@
COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPBT01 reconstructs a Hermitian positive definite band matrix A from
-* its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of
-* L, and U' is the conjugate transpose of U.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original Hermitian band matrix A. If UPLO = 'U', the
-* upper triangular part of A is stored as a band matrix; if
-* UPLO = 'L', the lower triangular part of A is stored. The
-* columns of the appropriate triangle are stored in the columns
-* of A and the diagonals of the triangle are stored in the rows
-* of A. See ZPBTRF for further details.
-*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KD+1).
-*
-* AFAC (input) COMPLEX*16 array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the factor
-* L or U from the L*L' or U'*U factorization in band storage
-* format, as computed by ZPBTRF.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC.
-* LDAFAC >= max(1,KD+1).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
*
diff --git a/TESTING/LIN/zpbt02.f b/TESTING/LIN/zpbt02.f
index 43a4b7b0..e28df4ae 100644
--- a/TESTING/LIN/zpbt02.f
+++ b/TESTING/LIN/zpbt02.f
@@ -1,9 +1,141 @@
+*> \brief \b ZPBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBT02( UPLO, N, KD, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBT02 computes the residual for a solution of a Hermitian banded
+*> system of equations A*x = b:
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS)
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original Hermitian band matrix A. If UPLO = 'U', the
+*> upper triangular part of A is stored as a band matrix; if
+*> UPLO = 'L', the lower triangular part of A is stored. The
+*> columns of the appropriate triangle are stored in the columns
+*> of A and the diagonals of the triangle are stored in the rows
+*> of A. See ZPBTRF for further details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER.
+*> The leading dimension of the array A. LDA >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPBT02( UPLO, N, KD, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,62 +147,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPBT02 computes the residual for a solution of a Hermitian banded
-* system of equations A*x = b:
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS)
-* where EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original Hermitian band matrix A. If UPLO = 'U', the
-* upper triangular part of A is stored as a band matrix; if
-* UPLO = 'L', the lower triangular part of A is stored. The
-* columns of the appropriate triangle are stored in the columns
-* of A and the diagonals of the triangle are stored in the rows
-* of A. See ZPBTRF for further details.
-*
-* LDA (input) INTEGER.
-* The leading dimension of the array A. LDA >= max(1,KD+1).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zpbt05.f b/TESTING/LIN/zpbt05.f
index 71cd6e1f..2cdb26f2 100644
--- a/TESTING/LIN/zpbt05.f
+++ b/TESTING/LIN/zpbt05.f
@@ -1,9 +1,182 @@
+*> \brief \b ZPBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPBT05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> Hermitian band matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangle of the Hermitian band matrix A,
+*> stored in the first KD+1 rows of the array. The j-th column
+*> of A is stored in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPBT05( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,91 +188,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* Hermitian band matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangle of the Hermitian band matrix A,
-* stored in the first KD+1 rows of the array. The j-th column
-* of A is stored in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zpot01.f b/TESTING/LIN/zpot01.f
index d51dac90..e7e6e55d 100644
--- a/TESTING/LIN/zpot01.f
+++ b/TESTING/LIN/zpot01.f
@@ -1,61 +1,127 @@
- SUBROUTINE ZPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
+*> \brief \b ZPOT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDA, LDAFAC, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
+* ..
+*
* Purpose
* =======
*
-* ZPOT01 reconstructs a Hermitian positive definite matrix A from
-* its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of L,
-* and U' is the conjugate transpose of U.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOT01 reconstructs a Hermitian positive definite matrix A from
+*> its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of L,
+*> and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (LDAFAC,N)
+*> On entry, the factor L or U from the L*L' or U'*U
+*> factorization of A.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*L' - A (or U'*U - A).
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original Hermitian matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
+*> \date November 2011
*
-* AFAC (input/output) COMPLEX*16 array, dimension (LDAFAC,N)
-* On entry, the factor L or U from the L*L' or U'*U
-* factorization of A.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*L' - A (or U'*U - A).
+*> \ingroup complex16_lin
*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZPOT01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDA, LDAFAC, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zpot02.f b/TESTING/LIN/zpot02.f
index 321ffba8..0ed93473 100644
--- a/TESTING/LIN/zpot02.f
+++ b/TESTING/LIN/zpot02.f
@@ -1,9 +1,138 @@
+*> \brief \b ZPOT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOT02 computes the residual for the solution of a Hermitian system
+*> of linear equations A*x = b:
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*>
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPOT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,59 +144,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOT02 computes the residual for the solution of a Hermitian system
-* of linear equations A*x = b:
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-*
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zpot03.f b/TESTING/LIN/zpot03.f
index 468619ac..260a4331 100644
--- a/TESTING/LIN/zpot03.f
+++ b/TESTING/LIN/zpot03.f
@@ -1,9 +1,137 @@
+*> \brief \b ZPOT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
+* RWORK, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAINV, LDWORK, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AINV( LDAINV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOT03 computes the residual for a Hermitian matrix times its
+*> inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (LDAINV,N)
+*> On entry, the inverse of the matrix A, stored as a Hermitian
+*> matrix in the same format as A.
+*> In this version, AINV is expanded into a full matrix and
+*> multiplied by A, so the opposing triangle of AINV will be
+*> changed; i.e., if the upper triangular part of AINV is
+*> stored, the lower triangular part will be used as work space.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPOT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
$ RWORK, RCOND, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,57 +144,6 @@
$ WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOT03 computes the residual for a Hermitian matrix times its
-* inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AINV (input/output) COMPLEX*16 array, dimension (LDAINV,N)
-* On entry, the inverse of the matrix A, stored as a Hermitian
-* matrix in the same format as A.
-* In this version, AINV is expanded into a full matrix and
-* multiplied by A, so the opposing triangle of AINV will be
-* changed; i.e., if the upper triangular part of AINV is
-* stored, the lower triangular part will be used as work space.
-*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,N)
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
-*
-* RESID (output) DOUBLE PRECISION
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zpot05.f b/TESTING/LIN/zpot05.f
index e513a569..50db4db2 100644
--- a/TESTING/LIN/zpot05.f
+++ b/TESTING/LIN/zpot05.f
@@ -1,9 +1,176 @@
+*> \brief \b ZPOT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOT05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> Hermitian n by n matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The Hermitian matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of A contains the upper triangular part
+*> of the matrix A, and the strictly lower triangular part of A
+*> is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of A contains the lower triangular part of
+*> the matrix A, and the strictly upper triangular part of A is
+*> not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPOT05( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,88 +182,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* Hermitian n by n matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The Hermitian matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of A contains the upper triangular part
-* of the matrix A, and the strictly lower triangular part of A
-* is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of A contains the lower triangular part of
-* the matrix A, and the strictly upper triangular part of A is
-* not referenced.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zpot06.f b/TESTING/LIN/zpot06.f
index 2e5aae6e..b4751676 100644
--- a/TESTING/LIN/zpot06.f
+++ b/TESTING/LIN/zpot06.f
@@ -1,9 +1,138 @@
+*> \brief \b ZPOT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPOT06( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPOT06 computes the residual for a solution of a system of linear
+*> equations A*x = b :
+*> RESID = norm(B - A*X,inf) / ( norm(A,inf) * norm(X,inf) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPOT06( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1.2) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* May 2007
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,59 +144,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPOT06 computes the residual for a solution of a system of linear
-* equations A*x = b :
-* RESID = norm(B - A*X,inf) / ( norm(A,inf) * norm(X,inf) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zppt01.f b/TESTING/LIN/zppt01.f
index e7a34ed1..05f9a978 100644
--- a/TESTING/LIN/zppt01.f
+++ b/TESTING/LIN/zppt01.f
@@ -1,56 +1,116 @@
- SUBROUTINE ZPPT01( UPLO, N, A, AFAC, RWORK, RESID )
+*> \brief \b ZPPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( * ), AFAC( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPT01( UPLO, N, A, AFAC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * )
+* ..
+*
* Purpose
* =======
*
-* ZPPT01 reconstructs a Hermitian positive definite packed matrix A
-* from its L*L' or U'*U factorization and computes the residual
-* norm( L*L' - A ) / ( N * norm(A) * EPS ) or
-* norm( U'*U - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of
-* L, and U' is the conjugate transpose of U.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPT01 reconstructs a Hermitian positive definite packed matrix A
+*> from its L*L' or U'*U factorization and computes the residual
+*> norm( L*L' - A ) / ( N * norm(A) * EPS ) or
+*> norm( U'*U - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of
+*> L, and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original Hermitian matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in,out] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the factor L or U from the L*L' or U'*U
+*> factorization of A, stored as a packed triangular matrix.
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference L*L' - A (or U'*U - A).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
+*> \date November 2011
*
-* A (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original Hermitian matrix A, stored as a packed
-* triangular matrix.
+*> \ingroup complex16_lin
*
-* AFAC (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the factor L or U from the L*L' or U'*U
-* factorization of A, stored as a packed triangular matrix.
-* Overwritten with the reconstructed matrix, and then with the
-* difference L*L' - A (or U'*U - A).
+* =====================================================================
+ SUBROUTINE ZPPT01( UPLO, N, A, AFAC, RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( * ), AFAC( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zppt02.f b/TESTING/LIN/zppt02.f
index 0c813a5e..db61b80d 100644
--- a/TESTING/LIN/zppt02.f
+++ b/TESTING/LIN/zppt02.f
@@ -1,9 +1,134 @@
+*> \brief \b ZPPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPT02 computes the residual in the solution of a Hermitian system
+*> of linear equations A*x = b when packed storage is used for the
+*> coefficient matrix. The ratio computed is
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS),
+*>
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original Hermitian matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,58 +140,6 @@
COMPLEX*16 A( * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPPT02 computes the residual in the solution of a Hermitian system
-* of linear equations A*x = b when packed storage is used for the
-* coefficient matrix. The ratio computed is
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS),
-*
-* where EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original Hermitian matrix A, stored as a packed
-* triangular matrix.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zppt03.f b/TESTING/LIN/zppt03.f
index 5c7ca7f1..d5b65fe3 100644
--- a/TESTING/LIN/zppt03.f
+++ b/TESTING/LIN/zppt03.f
@@ -1,61 +1,131 @@
- SUBROUTINE ZPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
- $ RESID )
+*> \brief \b ZPPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDWORK, N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( * ), AINV( * ), WORK( LDWORK, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDWORK, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AINV( * ), WORK( LDWORK, * )
+* ..
+*
* Purpose
* =======
*
-* ZPPT03 computes the residual for a Hermitian packed matrix times its
-* inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPT03 computes the residual for a Hermitian packed matrix times its
+*> inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original Hermitian matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original Hermitian matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The (Hermitian) inverse of the matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AINV (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The (Hermitian) inverse of the matrix A, stored as a packed
-* triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup complex16_lin
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* =====================================================================
+ SUBROUTINE ZPPT03( UPLO, N, A, AINV, WORK, LDWORK, RWORK, RCOND,
+ $ RESID )
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDWORK, N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( * ), AINV( * ), WORK( LDWORK, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zppt05.f b/TESTING/LIN/zppt05.f
index 3b2e71cf..830c312a 100644
--- a/TESTING/LIN/zppt05.f
+++ b/TESTING/LIN/zppt05.f
@@ -1,9 +1,168 @@
+*> \brief \b ZPPT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPPT05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
+* LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 AP( * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPPT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> Hermitian matrix in packed storage format.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangle of the Hermitian matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPPT05( UPLO, N, NRHS, AP, B, LDB, X, LDX, XACT,
$ LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,83 +174,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZPPT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* Hermitian matrix in packed storage format.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangle of the Hermitian matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zpst01.f b/TESTING/LIN/zpst01.f
index 3da729c9..380b54e9 100644
--- a/TESTING/LIN/zpst01.f
+++ b/TESTING/LIN/zpst01.f
@@ -1,9 +1,141 @@
+*> \brief \b ZPST01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPST01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
+* PIV, RWORK, RESID, RANK )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION RESID
+* INTEGER LDA, LDAFAC, LDPERM, N, RANK
+* CHARACTER UPLO
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ),
+* $ PERM( LDPERM, * )
+* DOUBLE PRECISION RWORK( * )
+* INTEGER PIV( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPST01 reconstructs an Hermitian positive semidefinite matrix A
+*> from its L or U factors and the permutation matrix P and computes
+*> the residual
+*> norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
+*> norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
+*> where EPS is the machine epsilon, L' is the conjugate transpose of L,
+*> and U' is the conjugate transpose of U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original Hermitian matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (LDAFAC,N)
+*> The factor L or U from the L*L' or U'*U
+*> factorization of A.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*> PERM is COMPLEX*16 array, dimension (LDPERM,N)
+*> Overwritten with the reconstructed matrix, and then with the
+*> difference P*L*L'*P' - A (or P*U'*U*P' - A)
+*> \endverbatim
+*>
+*> \param[in] LDPERM
+*> \verbatim
+*> LDPERM is INTEGER
+*> The leading dimension of the array PERM.
+*> LDAPERM >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] PIV
+*> \verbatim
+*> PIV is INTEGER array, dimension (N)
+*> PIV is such that the nonzero entries are
+*> P( PIV( K ), K ) = 1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZPST01( UPLO, N, A, LDA, AFAC, LDAFAC, PERM, LDPERM,
$ PIV, RWORK, RESID, RANK )
*
* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION RESID
@@ -17,60 +149,6 @@
INTEGER PIV( * )
* ..
*
-* Purpose
-* =======
-*
-* ZPST01 reconstructs an Hermitian positive semidefinite matrix A
-* from its L or U factors and the permutation matrix P and computes
-* the residual
-* norm( P*L*L'*P' - A ) / ( N * norm(A) * EPS ) or
-* norm( P*U'*U*P' - A ) / ( N * norm(A) * EPS ),
-* where EPS is the machine epsilon, L' is the conjugate transpose of L,
-* and U' is the conjugate transpose of U.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original Hermitian matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) COMPLEX*16 array, dimension (LDAFAC,N)
-* The factor L or U from the L*L' or U'*U
-* factorization of A.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* PERM (output) COMPLEX*16 array, dimension (LDPERM,N)
-* Overwritten with the reconstructed matrix, and then with the
-* difference P*L*L'*P' - A (or P*U'*U*P' - A)
-*
-* LDPERM (input) INTEGER
-* The leading dimension of the array PERM.
-* LDAPERM >= max(1,N).
-*
-* PIV (input) INTEGER array, dimension (N)
-* PIV is such that the nonzero entries are
-* P( PIV( K ), K ) = 1.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U'*U - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zptt01.f b/TESTING/LIN/zptt01.f
index bc085022..c132e5ba 100644
--- a/TESTING/LIN/zptt01.f
+++ b/TESTING/LIN/zptt01.f
@@ -1,50 +1,112 @@
- SUBROUTINE ZPTT01( N, D, E, DF, EF, WORK, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * ), DF( * )
- COMPLEX*16 E( * ), EF( * ), WORK( * )
-* ..
-*
+*> \brief \b ZPTT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTT01( N, D, E, DF, EF, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* INTEGER N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * ), DF( * )
+* COMPLEX*16 E( * ), EF( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZPTT01 reconstructs a tridiagonal matrix A from its L*D*L'
-* factorization and computes the residual
-* norm(L*D*L' - A) / ( n * norm(A) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTT01 reconstructs a tridiagonal matrix A from its L*D*L'
+*> factorization and computes the residual
+*> norm(L*D*L' - A) / ( n * norm(A) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGTER
-* The order of the matrix A.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] DF
+*> \verbatim
+*> DF is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the factor L from the L*D*L'
+*> factorization of A.
+*> \endverbatim
+*>
+*> \param[in] EF
+*> \verbatim
+*> EF is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the factor L from the
+*> L*D*L' factorization of A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(L*D*L' - A) / (n * norm(A) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \date November 2011
*
-* DF (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the factor L from the L*D*L'
-* factorization of A.
+*> \ingroup complex16_lin
*
-* EF (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) subdiagonal elements of the factor L from the
-* L*D*L' factorization of A.
+* =====================================================================
+ SUBROUTINE ZPTT01( N, D, E, DF, EF, WORK, RESID )
*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(L*D*L' - A) / (n * norm(A) * EPS)
+* .. Scalar Arguments ..
+ INTEGER N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * ), DF( * )
+ COMPLEX*16 E( * ), EF( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zptt02.f b/TESTING/LIN/zptt02.f
index f69f14a5..c436735e 100644
--- a/TESTING/LIN/zptt02.f
+++ b/TESTING/LIN/zptt02.f
@@ -1,64 +1,136 @@
- SUBROUTINE ZPTT02( UPLO, N, NRHS, D, E, X, LDX, B, LDB, RESID )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDB, LDX, N, NRHS
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION D( * )
- COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * )
-* ..
-*
+*> \brief \b ZPTT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTT02( UPLO, N, NRHS, D, E, X, LDX, B, LDB, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* ZPTT02 computes the residual for the solution to a symmetric
-* tridiagonal system of equations:
-* RESID = norm(B - A*X) / (norm(A) * norm(X) * EPS),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTT02 computes the residual for the solution to a symmetric
+*> tridiagonal system of equations:
+*> RESID = norm(B - A*X) / (norm(A) * norm(X) * EPS),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the superdiagonal or the subdiagonal of the
-* tridiagonal matrix A is stored.
-* = 'U': E is the superdiagonal of A
-* = 'L': E is the subdiagonal of A
-*
-* N (input) INTEGTER
-* The order of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices B and X. NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the superdiagonal or the subdiagonal of the
+*> tridiagonal matrix A is stored.
+*> = 'U': E is the superdiagonal of A
+*> = 'L': E is the subdiagonal of A
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGTER
+*> The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The n by nrhs matrix of solution vectors X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the n by nrhs matrix of right hand side vectors B.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(B - A*X) / (norm(A) * norm(X) * EPS)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The n by nrhs matrix of solution vectors X.
+*> \date November 2011
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \ingroup complex16_lin
*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the n by nrhs matrix of right hand side vectors B.
-* On exit, B is overwritten with the difference B - A*X.
+* =====================================================================
+ SUBROUTINE ZPTT02( UPLO, N, NRHS, D, E, X, LDX, B, LDB, RESID )
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(B - A*X) / (norm(A) * norm(X) * EPS)
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDB, LDX, N, NRHS
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION D( * )
+ COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zptt05.f b/TESTING/LIN/zptt05.f
index b388c51d..18ff57c5 100644
--- a/TESTING/LIN/zptt05.f
+++ b/TESTING/LIN/zptt05.f
@@ -1,89 +1,170 @@
- SUBROUTINE ZPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
- $ FERR, BERR, RESLTS )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDB, LDX, LDXACT, N, NRHS
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION BERR( * ), D( * ), FERR( * ), RESLTS( * )
- COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * ),
- $ XACT( LDXACT, * )
-* ..
-*
+*> \brief \b ZPTT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
+* FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), D( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
* Purpose
* =======
*
-* ZPTT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* Hermitian tridiagonal matrix of order n.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZPTT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> Hermitian tridiagonal matrix of order n.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The n diagonal elements of the tridiagonal matrix A.
-*
-* E (input) COMPLEX*16 array, dimension (N-1)
-* The (n-1) subdiagonal elements of the tridiagonal matrix A.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The n diagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (N-1)
+*> The (n-1) subdiagonal elements of the tridiagonal matrix A.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
+*> \date November 2011
*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \ingroup complex16_lin
*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
+* =====================================================================
+ SUBROUTINE ZPTT05( N, NRHS, D, E, B, LDB, X, LDX, XACT, LDXACT,
+ $ FERR, BERR, RESLTS )
*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
+* .. Scalar Arguments ..
+ INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION BERR( * ), D( * ), FERR( * ), RESLTS( * )
+ COMPLEX*16 B( LDB, * ), E( * ), X( LDX, * ),
+ $ XACT( LDXACT, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqlt01.f b/TESTING/LIN/zqlt01.f
index e4ce8c5d..baa2521b 100644
--- a/TESTING/LIN/zqlt01.f
+++ b/TESTING/LIN/zqlt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE ZQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZQLT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQLT01 tests ZGEQLF, which computes the QL factorization of an m-by-n
-* matrix A, and partially tests ZUNGQL which forms the m-by-m
-* orthogonal matrix Q.
-*
-* ZQLT01 compares L with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQLT01 tests ZGEQLF, which computes the QL factorization of an m-by-n
+*> matrix A, and partially tests ZUNGQL which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> ZQLT01 compares L with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QL factorization of A, as returned by ZGEQLF.
-* See ZGEQLF for further details.
-*
-* Q (output) COMPLEX*16 array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* L (workspace) COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QL factorization of A, as returned by ZGEQLF.
+*> See ZGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by ZGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by ZGEQLF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZQLT01( M, N, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqlt02.f b/TESTING/LIN/zqlt02.f
index 1c156fc1..aa8804e9 100644
--- a/TESTING/LIN/zqlt02.f
+++ b/TESTING/LIN/zqlt02.f
@@ -1,75 +1,156 @@
- SUBROUTINE ZQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZQLT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQLT02 tests ZUNGQL, which generates an m-by-n matrix Q with
-* orthonornmal columns that is defined as the product of k elementary
-* reflectors.
-*
-* Given the QL factorization of an m-by-n matrix A, ZQLT02 generates
-* the orthogonal matrix Q defined by the factorization of the last k
-* columns of A; it compares L(m-n+1:m,n-k+1:n) with
-* Q(1:m,m-n+1:m)'*A(1:m,n-k+1:n), and checks that the columns of Q are
-* orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQLT02 tests ZUNGQL, which generates an m-by-n matrix Q with
+*> orthonornmal columns that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the QL factorization of an m-by-n matrix A, ZQLT02 generates
+*> the orthogonal matrix Q defined by the factorization of the last k
+*> columns of A; it compares L(m-n+1:m,n-k+1:n) with
+*> Q(1:m,m-n+1:m)'*A(1:m,n-k+1:n), and checks that the columns of Q are
+*> orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by ZQLT01.
-*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QL factorization of A, as returned by ZGEQLF.
-* See ZGEQLF for further details.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* L (workspace) COMPLEX*16 array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by ZQLT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QL factorization of A, as returned by ZGEQLF.
+*> See ZGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QL factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (N)
-* The scalar factors of the elementary reflectors corresponding
-* to the QL factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZQLT02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( L - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), L( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqlt03.f b/TESTING/LIN/zqlt03.f
index 1283daa3..a5285f2b 100644
--- a/TESTING/LIN/zqlt03.f
+++ b/TESTING/LIN/zqlt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE ZQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZQLT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQLT03 tests ZUNMQL, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* ZQLT03 compares the results of a call to ZUNMQL with the results of
-* forming Q explicitly by a call to ZUNGQL and then performing matrix
-* multiplication by a call to ZGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQLT03 tests ZUNMQL, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> ZQLT03 compares the results of a call to ZUNMQL with the results of
+*> forming Q explicitly by a call to ZUNGQL and then performing matrix
+*> multiplication by a call to ZGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The order of the orthogonal matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of rows or columns of the matrix C; C is m-by-n if
-* Q is applied from the left, or n-by-m if Q is applied from
-* the right. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. M >= K >= 0.
-*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QL factorization of an m-by-n matrix, as
-* returned by ZGEQLF. See CGEQLF for further details.
-*
-* C (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* CC (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the orthogonal matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows or columns of the matrix C; C is m-by-n if
+*> Q is applied from the left, or n-by-m if Q is applied from
+*> the right. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QL factorization of an m-by-n matrix, as
+*> returned by ZGEQLF. See CGEQLF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QL factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an m-by-m orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the QL factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE ZQLT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an m-by-m orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqpt01.f b/TESTING/LIN/zqpt01.f
index 2fc11b98..d953f8e8 100644
--- a/TESTING/LIN/zqpt01.f
+++ b/TESTING/LIN/zqpt01.f
@@ -1,68 +1,140 @@
- DOUBLE PRECISION FUNCTION ZQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
- $ WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- INTEGER JPVT( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b ZQPT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
+* WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER JPVT( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQPT01 tests the QR-factorization with pivoting of a matrix A. The
-* array AF contains the (possibly partial) QR-factorization of A, where
-* the upper triangle of AF(1:k,1:k) is a partial triangular factor,
-* the entries below the diagonal in the first k columns are the
-* Householder vectors, and the rest of AF contains a partially updated
-* matrix.
-*
-* This function returns ||A*P - Q*R||/(||norm(A)||*eps*M)
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQPT01 tests the QR-factorization with pivoting of a matrix A. The
+*> array AF contains the (possibly partial) QR-factorization of A, where
+*> the upper triangle of AF(1:k,1:k) is a partial triangular factor,
+*> the entries below the diagonal in the first k columns are the
+*> Householder vectors, and the rest of AF contains a partially updated
+*> matrix.
+*>
+*> This function returns ||A*P - Q*R||/(||norm(A)||*eps*M)
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
-*
-* K (input) INTEGER
-* The number of columns of AF that have been reduced
-* to upper triangular form.
-*
-* A (input) COMPLEX*16 array, dimension (LDA, N)
-* The original matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of columns of AF that have been reduced
+*> to upper triangular form.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N)
+*> The original matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> The (possibly partial) output of ZGEQPF. The upper triangle
+*> of AF(1:k,1:k) is a partial triangular factor, the entries
+*> below the diagonal in the first k columns are the Householder
+*> vectors, and the rest of AF contains a partially updated
+*> matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> Details of the Householder transformations as returned by
+*> ZGEQPF.
+*> \endverbatim
+*>
+*> \param[in] JPVT
+*> \verbatim
+*> JPVT is INTEGER array, dimension (N)
+*> Pivot information as returned by ZGEQPF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*N+N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* The (possibly partial) output of ZGEQPF. The upper triangle
-* of AF(1:k,1:k) is a partial triangular factor, the entries
-* below the diagonal in the first k columns are the Householder
-* vectors, and the rest of AF contains a partially updated
-* matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \date November 2011
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* Details of the Householder transformations as returned by
-* ZGEQPF.
+*> \ingroup complex16_lin
*
-* JPVT (input) INTEGER array, dimension (N)
-* Pivot information as returned by ZGEQPF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZQPT01( M, N, K, A, AF, LDA, TAU, JPVT,
+ $ WORK, LWORK )
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*N+N.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER JPVT( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt01.f b/TESTING/LIN/zqrt01.f
index d0a723c1..8e3856cb 100644
--- a/TESTING/LIN/zqrt01.f
+++ b/TESTING/LIN/zqrt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE ZQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZQRT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQRT01 tests ZGEQRF, which computes the QR factorization of an m-by-n
-* matrix A, and partially tests ZUNGQR which forms the m-by-m
-* orthogonal matrix Q.
-*
-* ZQRT01 compares R with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT01 tests ZGEQRF, which computes the QR factorization of an m-by-n
+*> matrix A, and partially tests ZUNGQR which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> ZQRT01 compares R with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by ZGEQRF.
-* See ZGEQRF for further details.
-*
-* Q (output) COMPLEX*16 array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* R (workspace) COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by ZGEQRF.
+*> See ZGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by ZGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by ZGEQRF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZQRT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt01p.f b/TESTING/LIN/zqrt01p.f
index b4fabf2c..7fb1cc22 100644
--- a/TESTING/LIN/zqrt01p.f
+++ b/TESTING/LIN/zqrt01p.f
@@ -1,68 +1,146 @@
- SUBROUTINE ZQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZQRT01P
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQRT01P tests ZGEQRFP, which computes the QR factorization of an m-by-n
-* matrix A, and partially tests ZUNGQR which forms the m-by-m
-* orthogonal matrix Q.
-*
-* ZQRT01P compares R with Q'*A, and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT01P tests ZGEQRFP, which computes the QR factorization of an m-by-n
+*> matrix A, and partially tests ZUNGQR which forms the m-by-m
+*> orthogonal matrix Q.
+*>
+*> ZQRT01P compares R with Q'*A, and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by ZGEQRFP.
-* See ZGEQRFP for further details.
-*
-* Q (output) COMPLEX*16 array, dimension (LDA,M)
-* The m-by-m orthogonal matrix Q.
-*
-* R (workspace) COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by ZGEQRFP.
+*> See ZGEQRFP for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,M)
+*> The m-by-m orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by ZGEQRFP.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by ZGEQRFP.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZQRT01P( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt02.f b/TESTING/LIN/zqrt02.f
index ac69c20f..c3f7efc7 100644
--- a/TESTING/LIN/zqrt02.f
+++ b/TESTING/LIN/zqrt02.f
@@ -1,74 +1,155 @@
- SUBROUTINE ZQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZQRT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQRT02 tests ZUNGQR, which generates an m-by-n matrix Q with
-* orthonornmal columns that is defined as the product of k elementary
-* reflectors.
-*
-* Given the QR factorization of an m-by-n matrix A, ZQRT02 generates
-* the orthogonal matrix Q defined by the factorization of the first k
-* columns of A; it compares R(1:n,1:k) with Q(1:m,1:n)'*A(1:m,1:k),
-* and checks that the columns of Q are orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT02 tests ZUNGQR, which generates an m-by-n matrix Q with
+*> orthonornmal columns that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the QR factorization of an m-by-n matrix A, ZQRT02 generates
+*> the orthogonal matrix Q defined by the factorization of the first k
+*> columns of A; it compares R(1:n,1:k) with Q(1:m,1:n)'*A(1:m,1:k),
+*> and checks that the columns of Q are orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* M >= N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. N >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by ZQRT01.
-*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QR factorization of A, as returned by ZGEQRF.
-* See ZGEQRF for further details.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* R (workspace) COMPLEX*16 array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by ZQRT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QR factorization of A, as returned by ZGEQRF.
+*> See ZGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and R. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (N)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QR factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and R. LDA >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (N)
-* The scalar factors of the elementary reflectors corresponding
-* to the QR factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZQRT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - Q'*A ) / ( M * norm(A) * EPS )
-* RESULT(2) = norm( I - Q'*Q ) / ( M * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt03.f b/TESTING/LIN/zqrt03.f
index 5866af2b..253555e1 100644
--- a/TESTING/LIN/zqrt03.f
+++ b/TESTING/LIN/zqrt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE ZQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZQRT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQRT03 tests ZUNMQR, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* ZQRT03 compares the results of a call to ZUNMQR with the results of
-* forming Q explicitly by a call to ZUNGQR and then performing matrix
-* multiplication by a call to ZGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT03 tests ZUNMQR, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> ZQRT03 compares the results of a call to ZUNMQR with the results of
+*> forming Q explicitly by a call to ZUNGQR and then performing matrix
+*> multiplication by a call to ZGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The order of the orthogonal matrix Q. M >= 0.
-*
-* N (input) INTEGER
-* The number of rows or columns of the matrix C; C is m-by-n if
-* Q is applied from the left, or n-by-m if Q is applied from
-* the right. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. M >= K >= 0.
-*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the QR factorization of an m-by-n matrix, as
-* returnedby ZGEQRF. See CGEQRF for further details.
-*
-* C (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* CC (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The order of the orthogonal matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows or columns of the matrix C; C is m-by-n if
+*> Q is applied from the left, or n-by-m if Q is applied from
+*> the right. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the QR factorization of an m-by-n matrix, as
+*> returnedby ZGEQRF. See CGEQRF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the QR factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an m-by-m orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the QR factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE ZQRT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an m-by-m orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( M * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( M * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( M * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( M * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt04.f b/TESTING/LIN/zqrt04.f
index 6cfc3544..93daafe1 100644
--- a/TESTING/LIN/zqrt04.f
+++ b/TESTING/LIN/zqrt04.f
@@ -1,41 +1,90 @@
- SUBROUTINE ZQRT04(M,N,NB,RESULT)
+*> \brief \b ZQRT04
*
-* -- LAPACK test routine (version 3.?) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* August 2011
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER LWORK, M, N, NB, LDT
-* .. Return values ..
- DOUBLE PRECISION RESULT(6)
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZQRT04(M,N,NB,RESULT)
+*
+* .. Scalar Arguments ..
+* INTEGER LWORK, M, N, NB, LDT
+* .. Return values ..
+* DOUBLE PRECISION RESULT(6)
+*
* Purpose
* =======
*
-* ZQRT04 tests ZGEQRT and ZGEMQRT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT04 tests ZGEQRT and ZGEMQRT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Number of rows in test matrix.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows in test matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns in test matrix.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size of test matrix. NB <= Min(M,N).
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (6)
+*> Results of each of the six tests below.
+*> \endverbatim
+*> \verbatim
+*> RESULT(1) = | A - Q R |
+*> RESULT(2) = | I - Q^H Q |
+*> RESULT(3) = | Q C - Q C |
+*> RESULT(4) = | Q^H C - Q^H C |
+*> RESULT(5) = | C Q - C Q |
+*> RESULT(6) = | C Q^H - C Q^H |
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Number of columns in test matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* NB (input) INTEGER
-* Block size of test matrix. NB <= Min(M,N).
+*> \date November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (6)
-* Results of each of the six tests below.
+*> \ingroup complex16_lin
*
-* RESULT(1) = | A - Q R |
-* RESULT(2) = | I - Q^H Q |
-* RESULT(3) = | Q C - Q C |
-* RESULT(4) = | Q^H C - Q^H C |
-* RESULT(5) = | C Q - C Q |
-* RESULT(6) = | C Q^H - C Q^H |
+* =====================================================================
+ SUBROUTINE ZQRT04(M,N,NB,RESULT)
+*
+* -- LAPACK test routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LWORK, M, N, NB, LDT
+* .. Return values ..
+ DOUBLE PRECISION RESULT(6)
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt05.f b/TESTING/LIN/zqrt05.f
index 8fb61566..582ba1f8 100644
--- a/TESTING/LIN/zqrt05.f
+++ b/TESTING/LIN/zqrt05.f
@@ -1,45 +1,97 @@
- SUBROUTINE ZQRT05(M,N,L,NB,RESULT)
+*> \brief \b ZQRT05
*
-* -- LAPACK test routine (version 3.?) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* August 2011
+* =========== DOCUMENTATION ===========
*
- IMPLICIT NONE
-* .. Scalar Arguments ..
- INTEGER LWORK, M, N, L, NB, LDT
-* .. Return values ..
- DOUBLE PRECISION RESULT(6)
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZQRT05(M,N,L,NB,RESULT)
+*
+* .. Scalar Arguments ..
+* INTEGER LWORK, M, N, L, NB, LDT
+* .. Return values ..
+* DOUBLE PRECISION RESULT(6)
+*
* Purpose
* =======
*
-* ZQRT05 tests ZTPQRT and ZTPMQRT.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT05 tests ZTPQRT and ZTPMQRT.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Number of rows in lower part of the test matrix.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows in lower part of the test matrix.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns in test matrix.
+*> \endverbatim
+*>
+*> \param[in] L
+*> \verbatim
+*> L is INTEGER
+*> The number of rows of the upper trapezoidal part the
+*> lower test matrix. 0 <= L <= M.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*> NB is INTEGER
+*> Block size of test matrix. NB <= N.
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (6)
+*> Results of each of the six tests below.
+*> \endverbatim
+*> \verbatim
+*> RESULT(1) = | A - Q R |
+*> RESULT(2) = | I - Q^H Q |
+*> RESULT(3) = | Q C - Q C |
+*> RESULT(4) = | Q^H C - Q^H C |
+*> RESULT(5) = | C Q - C Q |
+*> RESULT(6) = | C Q^H - C Q^H |
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Number of columns in test matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* L (input) INTEGER
-* The number of rows of the upper trapezoidal part the
-* lower test matrix. 0 <= L <= M.
-*
-* NB (input) INTEGER
-* Block size of test matrix. NB <= N.
+*> \date November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (6)
-* Results of each of the six tests below.
+*> \ingroup complex16_lin
*
-* RESULT(1) = | A - Q R |
-* RESULT(2) = | I - Q^H Q |
-* RESULT(3) = | Q C - Q C |
-* RESULT(4) = | Q^H C - Q^H C |
-* RESULT(5) = | C Q - C Q |
-* RESULT(6) = | C Q^H - C Q^H |
+* =====================================================================
+ SUBROUTINE ZQRT05(M,N,L,NB,RESULT)
+*
+* -- LAPACK test routine (version 3.?) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER LWORK, M, N, L, NB, LDT
+* .. Return values ..
+ DOUBLE PRECISION RESULT(6)
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt11.f b/TESTING/LIN/zqrt11.f
index 16d3011a..9fb0c805 100644
--- a/TESTING/LIN/zqrt11.f
+++ b/TESTING/LIN/zqrt11.f
@@ -1,56 +1,116 @@
- DOUBLE PRECISION FUNCTION ZQRT11( M, K, A, LDA, TAU, WORK, LWORK )
+*> \brief \b ZQRT11
*
-* -- LAPACK routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION ZQRT11( M, K, A, LDA, TAU, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQRT11 computes the test ratio
-*
-* || Q'*Q - I || / (eps * m)
-*
-* where the orthogonal matrix Q is represented as a product of
-* elementary transformations. Each transformation has the form
-*
-* H(k) = I - tau(k) v(k) v(k)'
-*
-* where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
-* [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
-* in A(k+1:m,k).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT11 computes the test ratio
+*>
+*> || Q'*Q - I || / (eps * m)
+*>
+*> where the orthogonal matrix Q is represented as a product of
+*> elementary transformations. Each transformation has the form
+*>
+*> H(k) = I - tau(k) v(k) v(k)'
+*>
+*> where tau(k) is stored in TAU(k) and v(k) is an m-vector of the form
+*> [ 0 ... 0 1 x(k) ]', where x(k) is a vector of length m-k stored
+*> in A(k+1:m,k).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of columns of A whose subdiagonal entries
+*> contain information about orthogonal transformations.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,K)
+*> The (possibly partial) output of a QR reduction routine.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (K)
+*> The scaling factors tau for the elementary transformations as
+*> computed by the QR factorization routine.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*M + M.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* K (input) INTEGER
-* The number of columns of A whose subdiagonal entries
-* contain information about orthogonal transformations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX*16 array, dimension (LDA,K)
-* The (possibly partial) output of a QR reduction routine.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \ingroup complex16_lin
*
-* TAU (input) COMPLEX*16 array, dimension (K)
-* The scaling factors tau for the elementary transformations as
-* computed by the QR factorization routine.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZQRT11( M, K, A, LDA, TAU, WORK, LWORK )
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*M + M.
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt12.f b/TESTING/LIN/zqrt12.f
index 546e7b24..6ea350a8 100644
--- a/TESTING/LIN/zqrt12.f
+++ b/TESTING/LIN/zqrt12.f
@@ -1,51 +1,116 @@
- DOUBLE PRECISION FUNCTION ZQRT12( M, N, A, LDA, S, WORK, LWORK,
- $ RWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * ), S( * )
- COMPLEX*16 A( LDA, * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZQRT12
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZQRT12( M, N, A, LDA, S, WORK, LWORK,
+* RWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * ), S( * )
+* COMPLEX*16 A( LDA, * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZQRT12 computes the singular values `svlues' of the upper trapezoid
-* of A(1:M,1:N) and returns the ratio
-*
-* || s - svlues||/(||svlues||*eps*max(M,N))
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT12 computes the singular values `svlues' of the upper trapezoid
+*> of A(1:M,1:N) and returns the ratio
+*>
+*> || s - svlues||/(||svlues||*eps*max(M,N))
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix A. Only the upper trapezoid is referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (min(M,N))
+*> The singular values of the matrix A.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= M*N + 2*min(M,N) +
+*> max(M,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (2*min(M,N))
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix A. Only the upper trapezoid is referenced.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \date November 2011
*
-* S (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The singular values of the matrix A.
+*> \ingroup complex16_lin
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZQRT12( M, N, A, LDA, S, WORK, LWORK,
+ $ RWORK )
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= M*N + 2*min(M,N) +
-* max(M,N).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (2*min(M,N))
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * ), S( * )
+ COMPLEX*16 A( LDA, * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt13.f b/TESTING/LIN/zqrt13.f
index ebaf826f..bb580af7 100644
--- a/TESTING/LIN/zqrt13.f
+++ b/TESTING/LIN/zqrt13.f
@@ -1,49 +1,111 @@
- SUBROUTINE ZQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, M, N, SCALE
- DOUBLE PRECISION NORMA
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- COMPLEX*16 A( LDA, * )
-* ..
-*
+*> \brief \b ZQRT13
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, M, N, SCALE
+* DOUBLE PRECISION NORMA
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
* Purpose
* =======
*
-* ZQRT13 generates a full-rank matrix that may be scaled to have large
-* or small norm.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT13 generates a full-rank matrix that may be scaled to have large
+*> or small norm.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* SCALE (input) INTEGER
-* SCALE = 1: normally scaled matrix
-* SCALE = 2: matrix scaled up
-* SCALE = 3: matrix scaled down
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is INTEGER
+*> SCALE = 1: normally scaled matrix
+*> SCALE = 2: matrix scaled up
+*> SCALE = 3: matrix scaled down
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[out] NORMA
+*> \verbatim
+*> NORMA is DOUBLE PRECISION
+*> The one-norm of A.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is integer array, dimension (4)
+*> Seed for random number generator
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* M (input) INTEGER
-* The number of rows of the matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* N (input) INTEGER
-* The number of columns of A.
+*> \date November 2011
*
-* A (output) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix A.
+*> \ingroup complex16_lin
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+* =====================================================================
+ SUBROUTINE ZQRT13( SCALE, M, N, A, LDA, NORMA, ISEED )
*
-* NORMA (output) DOUBLE PRECISION
-* The one-norm of A.
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* ISEED (input/output) integer array, dimension (4)
-* Seed for random number generator
+* .. Scalar Arguments ..
+ INTEGER LDA, M, N, SCALE
+ DOUBLE PRECISION NORMA
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ COMPLEX*16 A( LDA, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt14.f b/TESTING/LIN/zqrt14.f
index 87e50b6a..ff80bf20 100644
--- a/TESTING/LIN/zqrt14.f
+++ b/TESTING/LIN/zqrt14.f
@@ -1,64 +1,135 @@
- DOUBLE PRECISION FUNCTION ZQRT14( TRANS, M, N, NRHS, A, LDA, X,
- $ LDX, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER LDA, LDX, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), WORK( LWORK ), X( LDX, * )
-* ..
-*
+*> \brief \b ZQRT14
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZQRT14( TRANS, M, N, NRHS, A, LDA, X,
+* LDX, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), WORK( LWORK ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* ZQRT14 checks whether X is in the row space of A or A'. It does so
-* by scaling both X and A such that their norms are in the range
-* [sqrt(eps), 1/sqrt(eps)], then computing a QR factorization of [A,X]
-* (if TRANS = 'C') or an LQ factorization of [A',X]' (if TRANS = 'N'),
-* and returning the norm of the trailing triangle, scaled by
-* MAX(M,N,NRHS)*eps.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT14 checks whether X is in the row space of A or A'. It does so
+*> by scaling both X and A such that their norms are in the range
+*> [sqrt(eps), 1/sqrt(eps)], then computing a QR factorization of [A,X]
+*> (if TRANS = 'C') or an LQ factorization of [A',X]' (if TRANS = 'N'),
+*> and returning the norm of the trailing triangle, scaled by
+*> MAX(M,N,NRHS)*eps.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* = 'N': No transpose, check for X in the row space of A
-* = 'C': Conjugate transpose, check for X in row space of A'.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of X.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> = 'N': No transpose, check for X in the row space of A
+*> = 'C': Conjugate transpose, check for X in row space of A'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of X.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If TRANS = 'N', the N-by-NRHS matrix X.
+*> IF TRANS = 'C', the M-by-NRHS matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of workspace array required
+*> If TRANS = 'N', LWORK >= (M+NRHS)*(N+2);
+*> if TRANS = 'C', LWORK >= (N+NRHS)*(M+2).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
+*> \date November 2011
*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* If TRANS = 'N', the N-by-NRHS matrix X.
-* IF TRANS = 'C', the M-by-NRHS matrix X.
+*> \ingroup complex16_lin
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZQRT14( TRANS, M, N, NRHS, A, LDA, X,
+ $ LDX, WORK, LWORK )
*
-* WORK (workspace) COMPLEX*16 array dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of workspace array required
-* If TRANS = 'N', LWORK >= (M+NRHS)*(N+2);
-* if TRANS = 'C', LWORK >= (N+NRHS)*(M+2).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER LDA, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), WORK( LWORK ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zqrt15.f b/TESTING/LIN/zqrt15.f
index fd1a6d7f..193563e3 100644
--- a/TESTING/LIN/zqrt15.f
+++ b/TESTING/LIN/zqrt15.f
@@ -1,9 +1,160 @@
+*> \brief \b ZQRT15
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
+* RANK, NORMA, NORMB, ISEED, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
+* DOUBLE PRECISION NORMA, NORMB
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION S( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( LWORK )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT15 generates a matrix with full or deficient rank and of various
+*> norms.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is INTEGER
+*> SCALE = 1: normally scaled matrix
+*> SCALE = 2: matrix scaled up
+*> SCALE = 3: matrix scaled down
+*> \endverbatim
+*>
+*> \param[in] RKSEL
+*> \verbatim
+*> RKSEL is INTEGER
+*> RKSEL = 1: full rank matrix
+*> RKSEL = 2: rank-deficient matrix
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The M-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, NRHS)
+*> A matrix that is in the range space of matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension MIN(M,N)
+*> Singular values of A.
+*> \endverbatim
+*>
+*> \param[out] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> number of nonzero singular values of A.
+*> \endverbatim
+*>
+*> \param[out] NORMA
+*> \verbatim
+*> NORMA is DOUBLE PRECISION
+*> one-norm norm of A.
+*> \endverbatim
+*>
+*> \param[out] NORMB
+*> \verbatim
+*> NORMB is DOUBLE PRECISION
+*> one-norm norm of B.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is integer array, dimension (4)
+*> seed for random number generator.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of work space required.
+*> LWORK >= MAX(M+MIN(M,N),NRHS*MIN(M,N),2*N+M)
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZQRT15( SCALE, RKSEL, M, N, NRHS, A, LDA, B, LDB, S,
$ RANK, NORMA, NORMB, ISEED, WORK, LWORK )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER LDA, LDB, LWORK, M, N, NRHS, RANK, RKSEL, SCALE
@@ -15,66 +166,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( LWORK )
* ..
*
-* Purpose
-* =======
-*
-* ZQRT15 generates a matrix with full or deficient rank and of various
-* norms.
-*
-* Arguments
-* =========
-*
-* SCALE (input) INTEGER
-* SCALE = 1: normally scaled matrix
-* SCALE = 2: matrix scaled up
-* SCALE = 3: matrix scaled down
-*
-* RKSEL (input) INTEGER
-* RKSEL = 1: full rank matrix
-* RKSEL = 2: rank-deficient matrix
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-*
-* N (input) INTEGER
-* The number of columns of A.
-*
-* NRHS (input) INTEGER
-* The number of columns of B.
-*
-* A (output) COMPLEX*16 array, dimension (LDA,N)
-* The M-by-N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A.
-*
-* B (output) COMPLEX*16 array, dimension (LDB, NRHS)
-* A matrix that is in the range space of matrix A.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-*
-* S (output) DOUBLE PRECISION array, dimension MIN(M,N)
-* Singular values of A.
-*
-* RANK (output) INTEGER
-* number of nonzero singular values of A.
-*
-* NORMA (output) DOUBLE PRECISION
-* one-norm norm of A.
-*
-* NORMB (output) DOUBLE PRECISION
-* one-norm norm of B.
-*
-* ISEED (input/output) integer array, dimension (4)
-* seed for random number generator.
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
-*
-* LWORK (input) INTEGER
-* length of work space required.
-* LWORK >= MAX(M+MIN(M,N),NRHS*MIN(M,N),2*N+M)
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zqrt16.f b/TESTING/LIN/zqrt16.f
index a80e9c8e..c1438c3a 100644
--- a/TESTING/LIN/zqrt16.f
+++ b/TESTING/LIN/zqrt16.f
@@ -1,9 +1,144 @@
+*> \brief \b ZQRT16
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZQRT16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER LDA, LDB, LDX, M, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT16 computes the residual for a solution of a system of linear
+*> equations A*x = b or A'*x = b:
+*> RESID = norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations:
+*> = 'N': A *x = b
+*> = 'T': A^T*x = b, where A^T is the transpose of A
+*> = 'C': A^H*x = b, where A^H is the conjugate transpose of A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original M x N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. If TRANS = 'N',
+*> LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. IF TRANS = 'N',
+*> LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZQRT16( TRANS, M, N, NRHS, A, LDA, X, LDX, B, LDB,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER TRANS
@@ -15,62 +150,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZQRT16 computes the residual for a solution of a system of linear
-* equations A*x = b or A'*x = b:
-* RESID = norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ),
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations:
-* = 'N': A *x = b
-* = 'T': A^T*x = b, where A^T is the transpose of A
-* = 'C': A^H*x = b, where A^H is the conjugate transpose of A
-*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original M x N matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. If TRANS = 'N',
-* LDX >= max(1,N); if TRANS = 'T' or 'C', LDX >= max(1,M).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. IF TRANS = 'N',
-* LDB >= max(1,M); if TRANS = 'T' or 'C', LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( max(m,n) * norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zqrt17.f b/TESTING/LIN/zqrt17.f
index 0adc1f45..1206dd73 100644
--- a/TESTING/LIN/zqrt17.f
+++ b/TESTING/LIN/zqrt17.f
@@ -1,86 +1,170 @@
- DOUBLE PRECISION FUNCTION ZQRT17( TRANS, IRESID, M, N, NRHS, A,
- $ LDA, X, LDX, B, LDB, C, WORK, LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- CHARACTER TRANS
- INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDB, * ),
- $ WORK( LWORK ), X( LDX, * )
-* ..
-*
+*> \brief \b ZQRT17
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZQRT17( TRANS, IRESID, M, N, NRHS, A,
+* LDA, X, LDX, B, LDB, C, WORK, LWORK )
+*
+* .. Scalar Arguments ..
+* CHARACTER TRANS
+* INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDB, * ),
+* $ WORK( LWORK ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* ZQRT17 computes the ratio
-*
-* || R'*op(A) ||/(||A||*alpha*max(M,N,NRHS)*eps)
-*
-* where R = op(A)*X - B, op(A) is A or A', and
-*
-* alpha = ||B|| if IRESID = 1 (zero-residual problem)
-* alpha = ||R|| if IRESID = 2 (otherwise).
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZQRT17 computes the ratio
+*>
+*> || R'*op(A) ||/(||A||*alpha*max(M,N,NRHS)*eps)
+*>
+*> where R = op(A)*X - B, op(A) is A or A', and
+*>
+*> alpha = ||B|| if IRESID = 1 (zero-residual problem)
+*> alpha = ||R|| if IRESID = 2 (otherwise).
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TRANS (input) CHARACTER*1
-* Specifies whether or not the transpose of A is used.
-* = 'N': No transpose, op(A) = A.
-* = 'C': Conjugate transpose, op(A) = A'.
-*
-* IRESID (input) INTEGER
-* IRESID = 1 indicates zero-residual problem.
-* IRESID = 2 indicates non-zero residual.
-*
-* M (input) INTEGER
-* The number of rows of the matrix A.
-* If TRANS = 'N', the number of rows of the matrix B.
-* If TRANS = 'C', the number of rows of the matrix X.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A.
-* If TRANS = 'N', the number of rows of the matrix X.
-* If TRANS = 'C', the number of rows of the matrix B.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X and B.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* If TRANS = 'N', the n-by-nrhs matrix X.
-* If TRANS = 'C', the m-by-nrhs matrix X.
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies whether or not the transpose of A is used.
+*> = 'N': No transpose, op(A) = A.
+*> = 'C': Conjugate transpose, op(A) = A'.
+*> \endverbatim
+*>
+*> \param[in] IRESID
+*> \verbatim
+*> IRESID is INTEGER
+*> IRESID = 1 indicates zero-residual problem.
+*> IRESID = 2 indicates non-zero residual.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A.
+*> If TRANS = 'N', the number of rows of the matrix B.
+*> If TRANS = 'C', the number of rows of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A.
+*> If TRANS = 'N', the number of rows of the matrix X.
+*> If TRANS = 'C', the number of rows of the matrix B.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X and B.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> If TRANS = 'N', the n-by-nrhs matrix X.
+*> If TRANS = 'C', the m-by-nrhs matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X.
+*> If TRANS = 'N', LDX >= N.
+*> If TRANS = 'C', LDX >= M.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> If TRANS = 'N', the m-by-nrhs matrix B.
+*> If TRANS = 'C', the n-by-nrhs matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B.
+*> If TRANS = 'N', LDB >= M.
+*> If TRANS = 'C', LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDB,NRHS)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= NRHS*(M+N).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDX (input) INTEGER
-* The leading dimension of the array X.
-* If TRANS = 'N', LDX >= N.
-* If TRANS = 'C', LDX >= M.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* If TRANS = 'N', the m-by-nrhs matrix B.
-* If TRANS = 'C', the n-by-nrhs matrix B.
+*> \date November 2011
*
-* LDB (input) INTEGER
-* The leading dimension of the array B.
-* If TRANS = 'N', LDB >= M.
-* If TRANS = 'C', LDB >= N.
+*> \ingroup complex16_lin
*
-* C (workspace) COMPLEX*16 array, dimension (LDB,NRHS)
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZQRT17( TRANS, IRESID, M, N, NRHS, A,
+ $ LDA, X, LDX, B, LDB, C, WORK, LWORK )
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= NRHS*(M+N).
+* .. Scalar Arguments ..
+ CHARACTER TRANS
+ INTEGER IRESID, LDA, LDB, LDX, LWORK, M, N, NRHS
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDB, * ),
+ $ WORK( LWORK ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zrqt01.f b/TESTING/LIN/zrqt01.f
index 35bbc29d..ec112717 100644
--- a/TESTING/LIN/zrqt01.f
+++ b/TESTING/LIN/zrqt01.f
@@ -1,68 +1,146 @@
- SUBROUTINE ZRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZRQT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZRQT01 tests ZGERQF, which computes the RQ factorization of an m-by-n
-* matrix A, and partially tests ZUNGRQ which forms the n-by-n
-* orthogonal matrix Q.
-*
-* ZRQT01 compares R with A*Q', and checks that Q is orthogonal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZRQT01 tests ZGERQF, which computes the RQ factorization of an m-by-n
+*> matrix A, and partially tests ZUNGRQ which forms the n-by-n
+*> orthogonal matrix Q.
+*>
+*> ZRQT01 compares R with A*Q', and checks that Q is orthogonal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A.
-*
-* AF (output) COMPLEX*16 array, dimension (LDA,N)
-* Details of the RQ factorization of A, as returned by ZGERQF.
-* See ZGERQF for further details.
-*
-* Q (output) COMPLEX*16 array, dimension (LDA,N)
-* The n-by-n orthogonal matrix Q.
-*
-* R (workspace) COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A.
+*> \endverbatim
+*>
+*> \param[out] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the RQ factorization of A, as returned by ZGERQF.
+*> See ZGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> The n-by-n orthogonal matrix Q.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (LDA,max(M,N))
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L.
+*> LDA >= max(M,N).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors, as returned
+*> by ZGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (max(M,N))
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L.
-* LDA >= max(M,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (output) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors, as returned
-* by ZGERQF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZRQT01( M, N, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (max(M,N))
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zrqt02.f b/TESTING/LIN/zrqt02.f
index 5b888ef8..264f3cf7 100644
--- a/TESTING/LIN/zrqt02.f
+++ b/TESTING/LIN/zrqt02.f
@@ -1,75 +1,156 @@
- SUBROUTINE ZRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
- $ R( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZRQT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+* $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZRQT02 tests ZUNGRQ, which generates an m-by-n matrix Q with
-* orthonornmal rows that is defined as the product of k elementary
-* reflectors.
-*
-* Given the RQ factorization of an m-by-n matrix A, ZRQT02 generates
-* the orthogonal matrix Q defined by the factorization of the last k
-* rows of A; it compares R(m-k+1:m,n-m+1:n) with
-* A(m-k+1:m,1:n)*Q(n-m+1:n,1:n)', and checks that the rows of Q are
-* orthonormal.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZRQT02 tests ZUNGRQ, which generates an m-by-n matrix Q with
+*> orthonornmal rows that is defined as the product of k elementary
+*> reflectors.
+*>
+*> Given the RQ factorization of an m-by-n matrix A, ZRQT02 generates
+*> the orthogonal matrix Q defined by the factorization of the last k
+*> rows of A; it compares R(m-k+1:m,n-m+1:n) with
+*> A(m-k+1:m,1:n)*Q(n-m+1:n,1:n)', and checks that the rows of Q are
+*> orthonormal.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix Q to be generated. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix Q to be generated.
-* N >= M >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* matrix Q. M >= K >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The m-by-n matrix A which was factorized by ZRQT01.
-*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the RQ factorization of A, as returned by ZGERQF.
-* See ZGERQF for further details.
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* R (workspace) COMPLEX*16 array, dimension (LDA,M)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix Q to be generated. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix Q to be generated.
+*> N >= M >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The m-by-n matrix A which was factorized by ZRQT01.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the RQ factorization of A, as returned by ZGERQF.
+*> See ZGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (LDA,M)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> The scalar factors of the elementary reflectors corresponding
+*> to the RQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The dimension of the array WORK.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (2)
+*> The test ratios:
+*> RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
+*> RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A, AF, Q and L. LDA >= N.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (M)
-* The scalar factors of the elementary reflectors corresponding
-* to the RQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The dimension of the array WORK.
+* =====================================================================
+ SUBROUTINE ZRQT02( M, N, K, A, AF, Q, R, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (2)
-* The test ratios:
-* RESULT(1) = norm( R - A*Q' ) / ( N * norm(A) * EPS )
-* RESULT(2) = norm( I - Q*Q' ) / ( N * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), Q( LDA, * ),
+ $ R( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zrqt03.f b/TESTING/LIN/zrqt03.f
index 1c9fb22c..2329bbec 100644
--- a/TESTING/LIN/zrqt03.f
+++ b/TESTING/LIN/zrqt03.f
@@ -1,75 +1,156 @@
- SUBROUTINE ZRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
- $ RWORK, RESULT )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER K, LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RESULT( * ), RWORK( * )
- COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
- $ Q( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZRQT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+* RWORK, RESULT )
+*
+* .. Scalar Arguments ..
+* INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RESULT( * ), RWORK( * )
+* COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+* $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZRQT03 tests ZUNMRQ, which computes Q*C, Q'*C, C*Q or C*Q'.
-*
-* ZRQT03 compares the results of a call to ZUNMRQ with the results of
-* forming Q explicitly by a call to ZUNGRQ and then performing matrix
-* multiplication by a call to ZGEMM.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZRQT03 tests ZUNMRQ, which computes Q*C, Q'*C, C*Q or C*Q'.
+*>
+*> ZRQT03 compares the results of a call to ZUNMRQ with the results of
+*> forming Q explicitly by a call to ZUNGRQ and then performing matrix
+*> multiplication by a call to ZGEMM.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows or columns of the matrix C; C is n-by-m if
-* Q is applied from the left, or m-by-n if Q is applied from
-* the right. M >= 0.
-*
-* N (input) INTEGER
-* The order of the orthogonal matrix Q. N >= 0.
-*
-* K (input) INTEGER
-* The number of elementary reflectors whose product defines the
-* orthogonal matrix Q. N >= K >= 0.
-*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* Details of the RQ factorization of an m-by-n matrix, as
-* returned by ZGERQF. See CGERQF for further details.
-*
-* C (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* CC (workspace) COMPLEX*16 array, dimension (LDA,N)
-*
-* Q (workspace) COMPLEX*16 array, dimension (LDA,N)
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows or columns of the matrix C; C is n-by-m if
+*> Q is applied from the left, or m-by-n if Q is applied from
+*> the right. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the orthogonal matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of elementary reflectors whose product defines the
+*> orthogonal matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> Details of the RQ factorization of an m-by-n matrix, as
+*> returned by ZGERQF. See CGERQF for further details.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] CC
+*> \verbatim
+*> CC is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[out] Q
+*> \verbatim
+*> Q is COMPLEX*16 array, dimension (LDA,N)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays AF, C, CC, and Q.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (min(M,N))
+*> The scalar factors of the elementary reflectors corresponding
+*> to the RQ factorization in AF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of WORK. LWORK must be at least M, and should be
+*> M*NB, where NB is the blocksize for this environment.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] RESULT
+*> \verbatim
+*> RESULT is DOUBLE PRECISION array, dimension (4)
+*> The test ratios compare two techniques for multiplying a
+*> random matrix C by an n-by-n orthogonal matrix Q.
+*> RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
+*> RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
+*> RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
+*> RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays AF, C, CC, and Q.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* TAU (input) COMPLEX*16 array, dimension (min(M,N))
-* The scalar factors of the elementary reflectors corresponding
-* to the RQ factorization in AF.
+*> \date November 2011
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+*> \ingroup complex16_lin
*
-* LWORK (input) INTEGER
-* The length of WORK. LWORK must be at least M, and should be
-* M*NB, where NB is the blocksize for this environment.
+* =====================================================================
+ SUBROUTINE ZRQT03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
+ $ RWORK, RESULT )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (M)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESULT (output) DOUBLE PRECISION array, dimension (4)
-* The test ratios compare two techniques for multiplying a
-* random matrix C by an n-by-n orthogonal matrix Q.
-* RESULT(1) = norm( Q*C - Q*C ) / ( N * norm(C) * EPS )
-* RESULT(2) = norm( C*Q - C*Q ) / ( N * norm(C) * EPS )
-* RESULT(3) = norm( Q'*C - Q'*C )/ ( N * norm(C) * EPS )
-* RESULT(4) = norm( C*Q' - C*Q' )/ ( N * norm(C) * EPS )
+* .. Scalar Arguments ..
+ INTEGER K, LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RESULT( * ), RWORK( * )
+ COMPLEX*16 AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
+ $ Q( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zrzt01.f b/TESTING/LIN/zrzt01.f
index 6fb3b2cc..2aaa3297 100644
--- a/TESTING/LIN/zrzt01.f
+++ b/TESTING/LIN/zrzt01.f
@@ -1,52 +1,117 @@
- DOUBLE PRECISION FUNCTION ZRZT01( M, N, A, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b ZRZT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZRZT01( M, N, A, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZRZT01 returns
-* || A - R*Q || / ( M * eps * ||A|| )
-* for an upper trapezoidal A that was factored with ZTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZRZT01 returns
+*> || A - R*Q || / ( M * eps * ||A|| )
+*> for an upper trapezoidal A that was factored with ZTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original upper trapezoidal M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> The output of ZTZRZF for input matrix A.
+*> The lower triangle is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> ZTZRZF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= m*n + m.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original upper trapezoidal M by N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* The output of ZTZRZF for input matrix A.
-* The lower triangle is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \ingroup complex16_lin
*
-* TAU (input) COMPLEX*16 array, dimension (M)
-* Details of the Householder transformations as returned by
-* ZTZRZF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZRZT01( M, N, A, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= m*n + m.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zrzt02.f b/TESTING/LIN/zrzt02.f
index eba41cff..3a23c7c9 100644
--- a/TESTING/LIN/zrzt02.f
+++ b/TESTING/LIN/zrzt02.f
@@ -1,48 +1,109 @@
- DOUBLE PRECISION FUNCTION ZRZT02( M, N, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AF( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZRZT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZRZT02( M, N, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZRZT02 returns
-* || I - Q'*Q || / ( M * eps)
-* where the matrix Q is defined by the Householder transformations
-* generated by ZTZRZF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZRZT02 returns
+*> || I - Q'*Q || / ( M * eps)
+*> where the matrix Q is defined by the Householder transformations
+*> generated by ZTZRZF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> The output of ZTZRZF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> ZTZRZF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> Length of WORK array. LWORK >= N*N+N.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix AF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* The output of ZTZRZF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array AF.
+*> \ingroup complex16_lin
*
-* TAU (input) COMPLEX*16 array, dimension (M)
-* Details of the Householder transformations as returned by
-* ZTZRZF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZRZT02( M, N, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* Length of WORK array. LWORK >= N*N+N.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zsbmv.f b/TESTING/LIN/zsbmv.f
index 1d527d0e..68b80ed4 100644
--- a/TESTING/LIN/zsbmv.f
+++ b/TESTING/LIN/zsbmv.f
@@ -1,9 +1,180 @@
+*> \brief \b ZSBMV
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSBMV( UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y,
+* INCY )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER INCX, INCY, K, LDA, N
+* COMPLEX*16 ALPHA, BETA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), X( * ), Y( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSBMV performs the matrix-vector operation
+*>
+*> y := alpha*A*x + beta*y,
+*>
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric band matrix, with k super-diagonals.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> UPLO - CHARACTER*1
+*> On entry, UPLO specifies whether the upper or lower
+*> triangular part of the band matrix A is being supplied as
+*> follows:
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'U' or 'u' The upper triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> UPLO = 'L' or 'l' The lower triangular part of A is
+*> being supplied.
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> On entry, N specifies the order of the matrix A.
+*> N must be at least zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> K - INTEGER
+*> On entry, K specifies the number of super-diagonals of the
+*> matrix A. K must satisfy 0 .le. K.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> ALPHA - COMPLEX*16
+*> On entry, ALPHA specifies the scalar alpha.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX*16 array, dimension( LDA, N )
+*> Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
+*> by n part of the array A must contain the upper triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row
+*> ( k + 1 ) of the array, the first super-diagonal starting at
+*> position 2 in row k, and so on. The top left k by k triangle
+*> of the array A is not referenced.
+*> The following program segment will transfer the upper
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = K + 1 - J
+*> DO 10, I = MAX( 1, J - K ), J
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
+*> by n part of the array A must contain the lower triangular
+*> band part of the symmetric matrix, supplied column by
+*> column, with the leading diagonal of the matrix in row 1 of
+*> the array, the first sub-diagonal starting at position 1 in
+*> row 2, and so on. The bottom right k by k triangle of the
+*> array A is not referenced.
+*> The following program segment will transfer the lower
+*> triangular part of a symmetric band matrix from conventional
+*> full matrix storage to band storage:
+*> \endverbatim
+*> \verbatim
+*> DO 20, J = 1, N
+*> M = 1 - J
+*> DO 10, I = J, MIN( N, J + K )
+*> A( M + I, J ) = matrix( I, J )
+*> 10 CONTINUE
+*> 20 CONTINUE
+*> \endverbatim
+*> \verbatim
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> On entry, LDA specifies the first dimension of A as declared
+*> in the calling (sub) program. LDA must be at least
+*> ( k + 1 ).
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> X - COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCX ) ).
+*> Before entry, the incremented array X must contain the
+*> vector x.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> INCX - INTEGER
+*> On entry, INCX specifies the increment for the elements of
+*> X. INCX must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> BETA - COMPLEX*16
+*> On entry, BETA specifies the scalar beta.
+*> Unchanged on exit.
+*> \endverbatim
+*> \verbatim
+*> Y - COMPLEX*16 array, dimension at least
+*> ( 1 + ( N - 1 )*abs( INCY ) ).
+*> Before entry, the incremented array Y must contain the
+*> vector y. On exit, Y is overwritten by the updated vector y.
+*> \endverbatim
+*> \verbatim
+*> INCY - INTEGER
+*> On entry, INCY specifies the increment for the elements of
+*> Y. INCY must not be zero.
+*> Unchanged on exit.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZSBMV( UPLO, N, K, ALPHA, A, LDA, X, INCX, BETA, Y,
$ INCY )
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -14,116 +185,6 @@
COMPLEX*16 A( LDA, * ), X( * ), Y( * )
* ..
*
-* Purpose
-* =======
-*
-* ZSBMV performs the matrix-vector operation
-*
-* y := alpha*A*x + beta*y,
-*
-* where alpha and beta are scalars, x and y are n element vectors and
-* A is an n by n symmetric band matrix, with k super-diagonals.
-*
-* Arguments
-* ==========
-*
-* UPLO - CHARACTER*1
-* On entry, UPLO specifies whether the upper or lower
-* triangular part of the band matrix A is being supplied as
-* follows:
-*
-* UPLO = 'U' or 'u' The upper triangular part of A is
-* being supplied.
-*
-* UPLO = 'L' or 'l' The lower triangular part of A is
-* being supplied.
-*
-* Unchanged on exit.
-*
-* N - INTEGER
-* On entry, N specifies the order of the matrix A.
-* N must be at least zero.
-* Unchanged on exit.
-*
-* K - INTEGER
-* On entry, K specifies the number of super-diagonals of the
-* matrix A. K must satisfy 0 .le. K.
-* Unchanged on exit.
-*
-* ALPHA - COMPLEX*16
-* On entry, ALPHA specifies the scalar alpha.
-* Unchanged on exit.
-*
-* A - COMPLEX*16 array, dimension( LDA, N )
-* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 )
-* by n part of the array A must contain the upper triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row
-* ( k + 1 ) of the array, the first super-diagonal starting at
-* position 2 in row k, and so on. The top left k by k triangle
-* of the array A is not referenced.
-* The following program segment will transfer the upper
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = K + 1 - J
-* DO 10, I = MAX( 1, J - K ), J
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 )
-* by n part of the array A must contain the lower triangular
-* band part of the symmetric matrix, supplied column by
-* column, with the leading diagonal of the matrix in row 1 of
-* the array, the first sub-diagonal starting at position 1 in
-* row 2, and so on. The bottom right k by k triangle of the
-* array A is not referenced.
-* The following program segment will transfer the lower
-* triangular part of a symmetric band matrix from conventional
-* full matrix storage to band storage:
-*
-* DO 20, J = 1, N
-* M = 1 - J
-* DO 10, I = J, MIN( N, J + K )
-* A( M + I, J ) = matrix( I, J )
-* 10 CONTINUE
-* 20 CONTINUE
-*
-* Unchanged on exit.
-*
-* LDA - INTEGER
-* On entry, LDA specifies the first dimension of A as declared
-* in the calling (sub) program. LDA must be at least
-* ( k + 1 ).
-* Unchanged on exit.
-*
-* X - COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCX ) ).
-* Before entry, the incremented array X must contain the
-* vector x.
-* Unchanged on exit.
-*
-* INCX - INTEGER
-* On entry, INCX specifies the increment for the elements of
-* X. INCX must not be zero.
-* Unchanged on exit.
-*
-* BETA - COMPLEX*16
-* On entry, BETA specifies the scalar beta.
-* Unchanged on exit.
-*
-* Y - COMPLEX*16 array, dimension at least
-* ( 1 + ( N - 1 )*abs( INCY ) ).
-* Before entry, the incremented array Y must contain the
-* vector y. On exit, Y is overwritten by the updated vector y.
-*
-* INCY - INTEGER
-* On entry, INCY specifies the increment for the elements of
-* Y. INCY must not be zero.
-* Unchanged on exit.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zspt01.f b/TESTING/LIN/zspt01.f
index 47bc5be3..5ff3eb53 100644
--- a/TESTING/LIN/zspt01.f
+++ b/TESTING/LIN/zspt01.f
@@ -1,64 +1,132 @@
- SUBROUTINE ZSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*> \brief \b ZSPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDC, N
- DOUBLE PRECISION RESID
-* ..
-* .. Array Arguments ..
- INTEGER IPIV( * )
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( * ), AFAC( * ), C( LDC, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AFAC( * ), C( LDC, * )
+* ..
+*
* Purpose
* =======
*
-* ZSPT01 reconstructs a symmetric indefinite packed matrix A from its
-* diagonal pivoting factorization A = U*D*U' or A = L*D*L' and computes
-* the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPT01 reconstructs a symmetric indefinite packed matrix A from its
+*> diagonal pivoting factorization A = U*D*U' or A = L*D*L' and computes
+*> the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* Hermitian matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original symmetric matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> Hermitian matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The factored form of the matrix A, stored as a packed
+*> triangular matrix. AFAC contains the block diagonal matrix D
+*> and the multipliers used to obtain the factor L or U from the
+*> L*D*L' or U*D*U' factorization as computed by ZSPTRF.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZSPTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AFAC (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The factored form of the matrix A, stored as a packed
-* triangular matrix. AFAC contains the block diagonal matrix D
-* and the multipliers used to obtain the factor L or U from the
-* L*D*L' or U*D*U' factorization as computed by ZSPTRF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZSPTRF.
+*> \date November 2011
*
-* C (workspace) COMPLEX*16 array, dimension (LDC,N)
+*> \ingroup complex16_lin
*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZSPT01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDC, N
+ DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+ INTEGER IPIV( * )
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( * ), AFAC( * ), C( LDC, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zspt02.f b/TESTING/LIN/zspt02.f
index 351b6189..929104ae 100644
--- a/TESTING/LIN/zspt02.f
+++ b/TESTING/LIN/zspt02.f
@@ -1,9 +1,134 @@
+*> \brief \b ZSPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPT02 computes the residual in the solution of a complex symmetric
+*> system of linear equations A*x = b when packed storage is used for
+*> the coefficient matrix. The ratio computed is
+*>
+*> RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
+*>
+*> where EPS is the machine precision.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> complex symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original complex symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZSPT02( UPLO, N, NRHS, A, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,58 +140,6 @@
COMPLEX*16 A( * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSPT02 computes the residual in the solution of a complex symmetric
-* system of linear equations A*x = b when packed storage is used for
-* the coefficient matrix. The ratio computed is
-*
-* RESID = norm( B - A*X ) / ( norm(A) * norm(X) * EPS).
-*
-* where EPS is the machine precision.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* complex symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original complex symmetric matrix A, stored as a packed
-* triangular matrix.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zspt03.f b/TESTING/LIN/zspt03.f
index accb155d..c97c505c 100644
--- a/TESTING/LIN/zspt03.f
+++ b/TESTING/LIN/zspt03.f
@@ -1,61 +1,131 @@
- SUBROUTINE ZSPT03( UPLO, N, A, AINV, WORK, LDW, RWORK, RCOND,
- $ RESID )
+*> \brief \b ZSPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER UPLO
- INTEGER LDW, N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( * ), AINV( * ), WORK( LDW, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSPT03( UPLO, N, A, AINV, WORK, LDW, RWORK, RCOND,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDW, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( * ), AINV( * ), WORK( LDW, * )
+* ..
+*
* Purpose
* =======
*
-* ZSPT03 computes the residual for a complex symmetric packed matrix
-* times its inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSPT03 computes the residual for a complex symmetric packed matrix
+*> times its inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* complex symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original complex symmetric matrix A, stored as a packed
-* triangular matrix.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> complex symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original complex symmetric matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The (symmetric) inverse of the matrix A, stored as a packed
+*> triangular matrix.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> ( 1/norm(A) ) / norm(AINV).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* AINV (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The (symmetric) inverse of the matrix A, stored as a packed
-* triangular matrix.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,N)
+*> \date November 2011
*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \ingroup complex16_lin
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* =====================================================================
+ SUBROUTINE ZSPT03( UPLO, N, A, AINV, WORK, LDW, RWORK, RCOND,
+ $ RESID )
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* ( 1/norm(A) ) / norm(AINV).
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER UPLO
+ INTEGER LDW, N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( * ), AINV( * ), WORK( LDW, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/zsyt01.f b/TESTING/LIN/zsyt01.f
index fab9af8c..d73ac214 100644
--- a/TESTING/LIN/zsyt01.f
+++ b/TESTING/LIN/zsyt01.f
@@ -1,9 +1,134 @@
+*> \brief \b ZSYT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYT01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAFAC, LDC, N
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* INTEGER IPIV( * )
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYT01 reconstructs a complex symmetric indefinite matrix A from its
+*> block L*D*L' or U*D*U' factorization and computes the residual
+*> norm( C - A ) / ( N * norm(A) * EPS ),
+*> where C is the reconstructed matrix, EPS is the machine epsilon,
+*> L' is the transpose of L, and U' is the transpose of U.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> complex symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original complex symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] AFAC
+*> \verbatim
+*> AFAC is COMPLEX*16 array, dimension (LDAFAC,N)
+*> The factored form of the matrix A. AFAC contains the block
+*> diagonal matrix D and the multipliers used to obtain the
+*> factor L or U from the block L*D*L' or U*D*U' factorization
+*> as computed by ZSYTRF.
+*> \endverbatim
+*>
+*> \param[in] LDAFAC
+*> \verbatim
+*> LDAFAC is INTEGER
+*> The leading dimension of the array AFAC. LDAFAC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*> IPIV is INTEGER array, dimension (N)
+*> The pivot indices from ZSYTRF.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC,N)
+*> \endverbatim
+*> \verbatim
+*> LDC (integer) INTEGER
+*> The leading dimension of the array C. LDC >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
+*> If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZSYT01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
$ RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,56 +141,6 @@
COMPLEX*16 A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYT01 reconstructs a complex symmetric indefinite matrix A from its
-* block L*D*L' or U*D*U' factorization and computes the residual
-* norm( C - A ) / ( N * norm(A) * EPS ),
-* where C is the reconstructed matrix, EPS is the machine epsilon,
-* L' is the transpose of L, and U' is the transpose of U.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* complex symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original complex symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AFAC (input) COMPLEX*16 array, dimension (LDAFAC,N)
-* The factored form of the matrix A. AFAC contains the block
-* diagonal matrix D and the multipliers used to obtain the
-* factor L or U from the block L*D*L' or U*D*U' factorization
-* as computed by ZSYTRF.
-*
-* LDAFAC (input) INTEGER
-* The leading dimension of the array AFAC. LDAFAC >= max(1,N).
-*
-* IPIV (input) INTEGER array, dimension (N)
-* The pivot indices from ZSYTRF.
-*
-* C (workspace) COMPLEX*16 array, dimension (LDC,N)
-*
-* LDC (integer) INTEGER
-* The leading dimension of the array C. LDC >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* If UPLO = 'L', norm(L*D*L' - A) / ( N * norm(A) * EPS )
-* If UPLO = 'U', norm(U*D*U' - A) / ( N * norm(A) * EPS )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zsyt02.f b/TESTING/LIN/zsyt02.f
index e9bfe887..a3835c76 100644
--- a/TESTING/LIN/zsyt02.f
+++ b/TESTING/LIN/zsyt02.f
@@ -1,9 +1,138 @@
+*> \brief \b ZSYT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYT02 computes the residual for a solution to a complex symmetric
+*> system of linear equations A*x = b:
+*>
+*> RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
+*>
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of B, the matrix of right hand sides.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original complex symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> On entry, the right hand side vectors for the system of
+*> linear equations.
+*> On exit, B is overwritten with the difference B - A*X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZSYT02( UPLO, N, NRHS, A, LDA, X, LDX, B, LDB, RWORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -15,59 +144,6 @@
COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYT02 computes the residual for a solution to a complex symmetric
-* system of linear equations A*x = b:
-*
-* RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
-*
-* where EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of B, the matrix of right hand sides.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original complex symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
-* On entry, the right hand side vectors for the system of
-* linear equations.
-* On exit, B is overwritten with the difference B - A*X.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/zsyt03.f b/TESTING/LIN/zsyt03.f
index 09233eb1..af2058e4 100644
--- a/TESTING/LIN/zsyt03.f
+++ b/TESTING/LIN/zsyt03.f
@@ -1,9 +1,137 @@
+*> \brief \b ZSYT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZSYT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
+* RWORK, RCOND, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER UPLO
+* INTEGER LDA, LDAINV, LDWORK, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AINV( LDAINV, * ),
+* $ WORK( LDWORK, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZSYT03 computes the residual for a complex symmetric matrix times
+*> its inverse:
+*> norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS )
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the upper or lower triangular part of the
+*> complex symmetric matrix A is stored:
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows and columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original complex symmetric matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N)
+*> \endverbatim
+*>
+*> \param[in,out] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (LDAINV,N)
+*> On entry, the inverse of the matrix A, stored as a symmetric
+*> matrix in the same format as A.
+*> In this version, AINV is expanded into a full matrix and
+*> multiplied by A, so the opposing triangle of AINV will be
+*> changed; i.e., if the upper triangular part of AINV is
+*> stored, the lower triangular part will be used as work space.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LDWORK,N)
+*> \endverbatim
+*>
+*> \param[in] LDWORK
+*> \verbatim
+*> LDWORK is INTEGER
+*> The leading dimension of the array WORK. LDWORK >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal of the condition number of A, computed as
+*> RCOND = 1/ (norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZSYT03( UPLO, N, A, LDA, AINV, LDAINV, WORK, LDWORK,
$ RWORK, RCOND, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER UPLO
@@ -16,57 +144,6 @@
$ WORK( LDWORK, * )
* ..
*
-* Purpose
-* =======
-*
-* ZSYT03 computes the residual for a complex symmetric matrix times
-* its inverse:
-* norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS )
-* where EPS is the machine epsilon.
-*
-* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the upper or lower triangular part of the
-* complex symmetric matrix A is stored:
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* N (input) INTEGER
-* The number of rows and columns of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original complex symmetric matrix A.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N)
-*
-* AINV (input/output) COMPLEX*16 array, dimension (LDAINV,N)
-* On entry, the inverse of the matrix A, stored as a symmetric
-* matrix in the same format as A.
-* In this version, AINV is expanded into a full matrix and
-* multiplied by A, so the opposing triangle of AINV will be
-* changed; i.e., if the upper triangular part of AINV is
-* stored, the lower triangular part will be used as work space.
-*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,N)
-*
-* LDWORK (input) INTEGER
-* The leading dimension of the array WORK. LDWORK >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal of the condition number of A, computed as
-* RCOND = 1/ (norm(A) * norm(AINV)).
-*
-* RESID (output) DOUBLE PRECISION
-* norm(I - A*AINV) / ( N * norm(A) * norm(AINV) * EPS )
-*
* =====================================================================
*
*
diff --git a/TESTING/LIN/ztbt02.f b/TESTING/LIN/ztbt02.f
index 0dfe605b..6866235a 100644
--- a/TESTING/LIN/ztbt02.f
+++ b/TESTING/LIN/ztbt02.f
@@ -1,9 +1,172 @@
+*> \brief \b ZTBT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBT02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
+* LDX, B, LDB, WORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b, A**T *x = b, or
+*> A**H *x = b when A is a triangular band matrix. Here A**T denotes
+*> the transpose of A, A**H denotes the conjugate transpose of A, and
+*> x and b are N by NRHS matrices. The test ratio is the maximum over
+*> the number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A**T *x = b (Transpose)
+*> = 'C': A**H *x = b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDA,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= max(1,KD+1).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTBT02( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, X,
$ LDX, B, LDB, WORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -16,80 +179,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTBT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b, A**T *x = b, or
-* A**H *x = b when A is a triangular band matrix. Here A**T denotes
-* the transpose of A, A**H denotes the conjugate transpose of A, and
-* x and b are N by NRHS matrices. The test ratio is the maximum over
-* the number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A**T *x = b (Transpose)
-* = 'C': A**H *x = b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDA,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= max(1,KD+1).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztbt03.f b/TESTING/LIN/ztbt03.f
index 90fe91ec..7a99191d 100644
--- a/TESTING/LIN/ztbt03.f
+++ b/TESTING/LIN/ztbt03.f
@@ -1,10 +1,188 @@
+*> \brief \b ZTBT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBT03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
+* SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
+* RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION CNORM( * )
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b
+*> when A is a triangular band matrix. Here A**T denotes the transpose
+*> of A, A**H denotes the conjugate transpose of A, s is a scalar, and
+*> x and b are N by NRHS matrices. The test ratio is the maximum over
+*> the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A**T *x = s*b (Transpose)
+*> = 'C': A**H *x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is DOUBLE PRECISION array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is DOUBLE PRECISION
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTBT03( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB,
$ SCALE, CNORM, TSCAL, X, LDX, B, LDB, WORK,
$ RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -17,88 +195,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTBT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b
-* when A is a triangular band matrix. Here A**T denotes the transpose
-* of A, A**H denotes the conjugate transpose of A, s is a scalar, and
-* x and b are N by NRHS matrices. The test ratio is the maximum over
-* the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A**T *x = s*b (Transpose)
-* = 'C': A**H *x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* SCALE (input) DOUBLE PRECISION
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) DOUBLE PRECISION array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) DOUBLE PRECISION
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
*
diff --git a/TESTING/LIN/ztbt05.f b/TESTING/LIN/ztbt05.f
index 3989a4e8..65e95797 100644
--- a/TESTING/LIN/ztbt05.f
+++ b/TESTING/LIN/ztbt05.f
@@ -1,9 +1,200 @@
+*> \brief \b ZTBT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBT05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
+* LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER KD, LDAB, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 AB( LDAB, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular band matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( NZ*EPS + (*) ), where
+*> (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*> and NZ = max. number of nonzeros in any row of A, plus 1
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of super-diagonals of the matrix A if UPLO = 'U',
+*> or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( NZ*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTBT05( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
$ LDB, X, LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,103 +206,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTBT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular band matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( NZ*EPS + (*) ), where
-* (*) = NZ*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-* and NZ = max. number of nonzeros in any row of A, plus 1
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of super-diagonals of the matrix A if UPLO = 'U',
-* or the number of sub-diagonals if UPLO = 'L'. KD >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( NZ*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztbt06.f b/TESTING/LIN/ztbt06.f
index 931d2d01..bc95da47 100644
--- a/TESTING/LIN/ztbt06.f
+++ b/TESTING/LIN/ztbt06.f
@@ -1,9 +1,137 @@
+*> \brief \b ZTBT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
+* RWORK, RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER KD, LDAB, N
+* DOUBLE PRECISION RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AB( LDAB, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTBT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by ZTBCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number computed by
+*> ZTBCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KD
+*> \verbatim
+*> KD is INTEGER
+*> The number of superdiagonals or subdiagonals of the
+*> triangular band matrix A. KD >= 0.
+*> \endverbatim
+*>
+*> \param[in] AB
+*> \verbatim
+*> AB is COMPLEX*16 array, dimension (LDAB,N)
+*> The upper or lower triangular band matrix A, stored in the
+*> first kd+1 rows of the array. The j-th column of A is stored
+*> in the j-th column of the array AB as follows:
+*> if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
+*> if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
+*> \endverbatim
+*>
+*> \param[in] LDAB
+*> \verbatim
+*> LDAB is INTEGER
+*> The leading dimension of the array AB. LDAB >= KD+1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is DOUBLE PRECISION
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTBT06( RCOND, RCONDC, UPLO, DIAG, N, KD, AB, LDAB,
$ RWORK, RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -15,61 +143,6 @@
COMPLEX*16 AB( LDAB, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTBT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by ZTBCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number computed by
-* ZTBCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* KD (input) INTEGER
-* The number of superdiagonals or subdiagonals of the
-* triangular band matrix A. KD >= 0.
-*
-* AB (input) COMPLEX*16 array, dimension (LDAB,N)
-* The upper or lower triangular band matrix A, stored in the
-* first kd+1 rows of the array. The j-th column of A is stored
-* in the j-th column of the array AB as follows:
-* if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
-* if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
-*
-* LDAB (input) INTEGER
-* The leading dimension of the array AB. LDAB >= KD+1.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RAT (output) DOUBLE PRECISION
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztpt01.f b/TESTING/LIN/ztpt01.f
index 031f7ccf..46b668f0 100644
--- a/TESTING/LIN/ztpt01.f
+++ b/TESTING/LIN/ztpt01.f
@@ -1,64 +1,130 @@
- SUBROUTINE ZTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, RWORK, RESID )
+*> \brief \b ZTPT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 AINVP( * ), AP( * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AINVP( * ), AP( * )
+* ..
+*
* Purpose
* =======
*
-* ZTPT01 computes the residual for a triangular matrix A times its
-* inverse when A is stored in packed format:
-* RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPT01 computes the residual for a triangular matrix A times its
+*> inverse when A is stored in packed format:
+*> RESID = norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The original upper or lower triangular matrix A, packed
+*> columnwise in a linear array. The j-th column of A is stored
+*> in the array AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] AINVP
+*> \verbatim
+*> AINVP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> On entry, the (triangular) inverse of the matrix A, packed
+*> columnwise in a linear array as in AP.
+*> On exit, the contents of AINVP are destroyed.
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal condition number of A, computed as
+*> 1/(norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The original upper or lower triangular matrix A, packed
-* columnwise in a linear array. The j-th column of A is stored
-* in the array AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \date November 2011
*
-* AINVP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* On entry, the (triangular) inverse of the matrix A, packed
-* columnwise in a linear array as in AP.
-* On exit, the contents of AINVP are destroyed.
+*> \ingroup complex16_lin
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal condition number of A, computed as
-* 1/(norm(A) * norm(AINV)).
+* =====================================================================
+ SUBROUTINE ZTPT01( UPLO, DIAG, N, AP, AINVP, RCOND, RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 AINVP( * ), AP( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ztpt02.f b/TESTING/LIN/ztpt02.f
index 98b76df7..356baf9f 100644
--- a/TESTING/LIN/ztpt02.f
+++ b/TESTING/LIN/ztpt02.f
@@ -1,9 +1,160 @@
+*> \brief \b ZTPT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
+* WORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b, A**T *x = b, or
+*> A**H *x = b, when the triangular matrix A is stored in packed format.
+*> Here A**T denotes the transpose of A, A**H denotes the conjugate
+*> transpose of A, and x and b are N by NRHS matrices. The test ratio
+*> is the maximum over the number of right hand sides of
+*> the maximum over the number of right hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A**T *x = b (Transpose)
+*> = 'C': A**H *x = b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTPT02( UPLO, TRANS, DIAG, N, NRHS, AP, X, LDX, B, LDB,
$ WORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,75 +166,6 @@
COMPLEX*16 AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTPT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b, A**T *x = b, or
-* A**H *x = b, when the triangular matrix A is stored in packed format.
-* Here A**T denotes the transpose of A, A**H denotes the conjugate
-* transpose of A, and x and b are N by NRHS matrices. The test ratio
-* is the maximum over the number of right hand sides of
-* the maximum over the number of right hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A**T *x = b (Transpose)
-* = 'C': A**H *x = b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztpt03.f b/TESTING/LIN/ztpt03.f
index 772b1542..aeaf39a3 100644
--- a/TESTING/LIN/ztpt03.f
+++ b/TESTING/LIN/ztpt03.f
@@ -1,95 +1,183 @@
- SUBROUTINE ZTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
- $ TSCAL, X, LDX, B, LDB, WORK, RESID )
+*> \brief \b ZTPT03
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, TRANS, UPLO
- INTEGER LDB, LDX, N, NRHS
- DOUBLE PRECISION RESID, SCALE, TSCAL
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION CNORM( * )
- COMPLEX*16 AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
+* TSCAL, X, LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION CNORM( * )
+* COMPLEX*16 AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
+*
* Purpose
* =======
*
-* ZTPT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b,
-* when the triangular matrix A is stored in packed format. Here A**T
-* denotes the transpose of A, A**H denotes the conjugate transpose of
-* A, s is a scalar, and x and b are N by NRHS matrices. The test ratio
-* is the maximum over the number of right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b,
+*> when the triangular matrix A is stored in packed format. Here A**T
+*> denotes the transpose of A, A**H denotes the conjugate transpose of
+*> A, s is a scalar, and x and b are N by NRHS matrices. The test ratio
+*> is the maximum over the number of right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A**T *x = s*b (Transpose)
-* = 'C': A**H *x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A**T *x = s*b (Transpose)
+*> = 'C': A**H *x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is DOUBLE PRECISION array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is DOUBLE PRECISION
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* SCALE (input) DOUBLE PRECISION
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) DOUBLE PRECISION array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) DOUBLE PRECISION
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
+* Authors
+* =======
*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
+*> \date November 2011
*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
+*> \ingroup complex16_lin
*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
+* =====================================================================
+ SUBROUTINE ZTPT03( UPLO, TRANS, DIAG, N, NRHS, AP, SCALE, CNORM,
+ $ TSCAL, X, LDX, B, LDB, WORK, RESID )
*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+* .. Scalar Arguments ..
+ CHARACTER DIAG, TRANS, UPLO
+ INTEGER LDB, LDX, N, NRHS
+ DOUBLE PRECISION RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION CNORM( * )
+ COMPLEX*16 AP( * ), B( LDB, * ), WORK( * ), X( LDX, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ztpt05.f b/TESTING/LIN/ztpt05.f
index 359569b5..005b85ea 100644
--- a/TESTING/LIN/ztpt05.f
+++ b/TESTING/LIN/ztpt05.f
@@ -1,9 +1,186 @@
+*> \brief \b ZTPT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPT05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
+* XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 AP( * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular matrix in packed storage format.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
+*> If DIAG = 'U', the diagonal elements of A are not referenced
+*> and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTPT05( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
$ XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,95 +192,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTPT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular matrix in packed storage format.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
-* If DIAG = 'U', the diagonal elements of A are not referenced
-* and are assumed to be 1.
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztpt06.f b/TESTING/LIN/ztpt06.f
index e155811c..766d456a 100644
--- a/TESTING/LIN/ztpt06.f
+++ b/TESTING/LIN/ztpt06.f
@@ -1,8 +1,123 @@
+*> \brief \b ZTPT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTPT06( RCOND, RCONDC, UPLO, DIAG, N, AP, RWORK, RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER N
+* DOUBLE PRECISION RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 AP( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTPT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of the triangular matrix A) and RCONDC, the estimate
+*> computed by ZTPCON. Information about the triangular matrix is used
+*> if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number computed by
+*> ZTPCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] AP
+*> \verbatim
+*> AP is COMPLEX*16 array, dimension (N*(N+1)/2)
+*> The upper or lower triangular matrix A, packed columnwise in
+*> a linear array. The j-th column of A is stored in the array
+*> AP as follows:
+*> if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
+*> if UPLO = 'L',
+*> AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is DOUBLE PRECISION
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTPT06( RCOND, RCONDC, UPLO, DIAG, N, AP, RWORK, RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -14,55 +129,6 @@
COMPLEX*16 AP( * )
* ..
*
-* Purpose
-* =======
-*
-* ZTPT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of the triangular matrix A) and RCONDC, the estimate
-* computed by ZTPCON. Information about the triangular matrix is used
-* if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number computed by
-* ZTPCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* AP (input) COMPLEX*16 array, dimension (N*(N+1)/2)
-* The upper or lower triangular matrix A, packed columnwise in
-* a linear array. The j-th column of A is stored in the array
-* AP as follows:
-* if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
-* if UPLO = 'L',
-* AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RAT (output) DOUBLE PRECISION
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztrt01.f b/TESTING/LIN/ztrt01.f
index 02dece49..6e76b0a4 100644
--- a/TESTING/LIN/ztrt01.f
+++ b/TESTING/LIN/ztrt01.f
@@ -1,73 +1,146 @@
- SUBROUTINE ZTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
- $ RWORK, RESID )
+*> \brief \b ZTRT01
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- CHARACTER DIAG, UPLO
- INTEGER LDA, LDAINV, N
- DOUBLE PRECISION RCOND, RESID
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION RWORK( * )
- COMPLEX*16 A( LDA, * ), AINV( LDAINV, * )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* SUBROUTINE ZTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
+* RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER LDA, LDAINV, N
+* DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), AINV( LDAINV, * )
+* ..
+*
* Purpose
* =======
*
-* ZTRT01 computes the residual for a triangular matrix A times its
-* inverse:
-* RESID = norm( A*AINV - I ) / ( N * norm(A) * norm(AINV) * EPS ),
-* where EPS is the machine epsilon.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRT01 computes the residual for a triangular matrix A times its
+*> inverse:
+*> RESID = norm( A*AINV - I ) / ( N * norm(A) * norm(AINV) * EPS ),
+*> where EPS is the machine epsilon.
+*>
+*>\endverbatim
*
* Arguments
-* ==========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AINV
+*> \verbatim
+*> AINV is COMPLEX*16 array, dimension (LDAINV,N)
+*> On entry, the (triangular) inverse of the matrix A, in the
+*> same storage format as A.
+*> On exit, the contents of AINV are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDAINV
+*> \verbatim
+*> LDAINV is INTEGER
+*> The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The reciprocal condition number of A, computed as
+*> 1/(norm(A) * norm(AINV)).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AINV (input) COMPLEX*16 array, dimension (LDAINV,N)
-* On entry, the (triangular) inverse of the matrix A, in the
-* same storage format as A.
-* On exit, the contents of AINV are destroyed.
+*> \date November 2011
*
-* LDAINV (input) INTEGER
-* The leading dimension of the array AINV. LDAINV >= max(1,N).
+*> \ingroup complex16_lin
*
-* RCOND (output) DOUBLE PRECISION
-* The reciprocal condition number of A, computed as
-* 1/(norm(A) * norm(AINV)).
+* =====================================================================
+ SUBROUTINE ZTRT01( UPLO, DIAG, N, A, LDA, AINV, LDAINV, RCOND,
+ $ RWORK, RESID )
*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* RESID (output) DOUBLE PRECISION
-* norm(A*AINV - I) / ( N * norm(A) * norm(AINV) * EPS )
+* .. Scalar Arguments ..
+ CHARACTER DIAG, UPLO
+ INTEGER LDA, LDAINV, N
+ DOUBLE PRECISION RCOND, RESID
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION RWORK( * )
+ COMPLEX*16 A( LDA, * ), AINV( LDAINV, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ztrt02.f b/TESTING/LIN/ztrt02.f
index 5e9d5128..c670efc4 100644
--- a/TESTING/LIN/ztrt02.f
+++ b/TESTING/LIN/ztrt02.f
@@ -1,9 +1,168 @@
+*> \brief \b ZTRT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRT02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
+* LDB, WORK, RWORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRT02 computes the residual for the computed solution to a
+*> triangular system of linear equations A*x = b, A**T *x = b,
+*> or A**H *x = b. Here A is a triangular matrix, A**T is the transpose
+*> of A, A**H is the conjugate transpose of A, and x and b are N by NRHS
+*> matrices. The test ratio is the maximum over the number of right
+*> hand sides of
+*> norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = b (No transpose)
+*> = 'T': A**T *x = b (Transpose)
+*> = 'C': A**H *x = b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTRT02( UPLO, TRANS, DIAG, N, NRHS, A, LDA, X, LDX, B,
$ LDB, WORK, RWORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -16,79 +175,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRT02 computes the residual for the computed solution to a
-* triangular system of linear equations A*x = b, A**T *x = b,
-* or A**H *x = b. Here A is a triangular matrix, A**T is the transpose
-* of A, A**H is the conjugate transpose of A, and x and b are N by NRHS
-* matrices. The test ratio is the maximum over the number of right
-* hand sides of
-* norm(b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = b (No transpose)
-* = 'T': A**T *x = b (Transpose)
-* = 'C': A**H *x = b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztrt03.f b/TESTING/LIN/ztrt03.f
index 28cce241..8c878c27 100644
--- a/TESTING/LIN/ztrt03.f
+++ b/TESTING/LIN/ztrt03.f
@@ -1,9 +1,182 @@
+*> \brief \b ZTRT03
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRT03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
+* CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, N, NRHS
+* DOUBLE PRECISION RESID, SCALE, TSCAL
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION CNORM( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ),
+* $ X( LDX, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRT03 computes the residual for the solution to a scaled triangular
+*> system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b.
+*> Here A is a triangular matrix, A**T denotes the transpose of A, A**H
+*> denotes the conjugate transpose of A, s is a scalar, and x and b are
+*> N by NRHS matrices. The test ratio is the maximum over the number of
+*> right hand sides of
+*> norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
+*> where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the operation applied to A.
+*> = 'N': A *x = s*b (No transpose)
+*> = 'T': A**T *x = s*b (Transpose)
+*> = 'C': A**H *x = s*b (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of right hand sides, i.e., the number of columns
+*> of the matrices X and B. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] SCALE
+*> \verbatim
+*> SCALE is DOUBLE PRECISION
+*> The scaling factor s used in solving the triangular system.
+*> \endverbatim
+*>
+*> \param[in] CNORM
+*> \verbatim
+*> CNORM is DOUBLE PRECISION array, dimension (N)
+*> The 1-norms of the columns of A, not counting the diagonal.
+*> \endverbatim
+*>
+*> \param[in] TSCAL
+*> \verbatim
+*> TSCAL is DOUBLE PRECISION
+*> The scaling factor used in computing the 1-norms in CNORM.
+*> CNORM actually contains the column norms of TSCAL*A.
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RESID
+*> \verbatim
+*> RESID is DOUBLE PRECISION
+*> The maximum over the number of right hand sides of
+*> norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTRT03( UPLO, TRANS, DIAG, N, NRHS, A, LDA, SCALE,
$ CNORM, TSCAL, X, LDX, B, LDB, WORK, RESID )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -16,87 +189,6 @@
$ X( LDX, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRT03 computes the residual for the solution to a scaled triangular
-* system of equations A*x = s*b, A**T *x = s*b, or A**H *x = s*b.
-* Here A is a triangular matrix, A**T denotes the transpose of A, A**H
-* denotes the conjugate transpose of A, s is a scalar, and x and b are
-* N by NRHS matrices. The test ratio is the maximum over the number of
-* right hand sides of
-* norm(s*b - op(A)*x) / ( norm(op(A)) * norm(x) * EPS ),
-* where op(A) denotes A, A**T, or A**H, and EPS is the machine epsilon.
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the operation applied to A.
-* = 'N': A *x = s*b (No transpose)
-* = 'T': A**T *x = s*b (Transpose)
-* = 'C': A**H *x = s*b (Conjugate transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of right hand sides, i.e., the number of columns
-* of the matrices X and B. NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* SCALE (input) DOUBLE PRECISION
-* The scaling factor s used in solving the triangular system.
-*
-* CNORM (input) DOUBLE PRECISION array, dimension (N)
-* The 1-norms of the columns of A, not counting the diagonal.
-*
-* TSCAL (input) DOUBLE PRECISION
-* The scaling factor used in computing the 1-norms in CNORM.
-* CNORM actually contains the column norms of TSCAL*A.
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors for the system of linear
-* equations.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* WORK (workspace) COMPLEX*16 array, dimension (N)
-*
-* RESID (output) DOUBLE PRECISION
-* The maximum over the number of right hand sides of
-* norm(op(A)*x - s*b) / ( norm(op(A)) * norm(x) * EPS ).
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztrt05.f b/TESTING/LIN/ztrt05.f
index ddad4573..094e7dc9 100644
--- a/TESTING/LIN/ztrt05.f
+++ b/TESTING/LIN/ztrt05.f
@@ -1,9 +1,193 @@
+*> \brief \b ZTRT05
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRT05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
+* LDX, XACT, LDXACT, FERR, BERR, RESLTS )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, TRANS, UPLO
+* INTEGER LDA, LDB, LDX, LDXACT, N, NRHS
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION BERR( * ), FERR( * ), RESLTS( * )
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), X( LDX, * ),
+* $ XACT( LDXACT, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRT05 tests the error bounds from iterative refinement for the
+*> computed solution to a system of equations A*X = B, where A is a
+*> triangular n by n matrix.
+*>
+*> RESLTS(1) = test of the error bound
+*> = norm(X - XACT) / ( norm(X) * FERR )
+*>
+*> A large value is returned if this ratio is not less than one.
+*>
+*> RESLTS(2) = residual from the iterative refinement routine
+*> = the maximum of BERR / ( (n+1)*EPS + (*) ), where
+*> (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER*1
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*> TRANS is CHARACTER*1
+*> Specifies the form of the system of equations.
+*> = 'N': A * X = B (No transpose)
+*> = 'T': A'* X = B (Transpose)
+*> = 'C': A'* X = B (Conjugate transpose = Transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER*1
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of rows of the matrices X, B, and XACT, and the
+*> order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The number of columns of the matrices X, B, and XACT.
+*> NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB,NRHS)
+*> The right hand side vectors for the system of linear
+*> equations.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The computed solution vectors. Each vector is stored as a
+*> column of the matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] XACT
+*> \verbatim
+*> XACT is COMPLEX*16 array, dimension (LDX,NRHS)
+*> The exact solution vectors. Each vector is stored as a
+*> column of the matrix XACT.
+*> \endverbatim
+*>
+*> \param[in] LDXACT
+*> \verbatim
+*> LDXACT is INTEGER
+*> The leading dimension of the array XACT. LDXACT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] FERR
+*> \verbatim
+*> FERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The estimated forward error bounds for each solution vector
+*> X. If XTRUE is the true solution, FERR bounds the magnitude
+*> of the largest entry in (X - XTRUE) divided by the magnitude
+*> of the largest entry in X.
+*> \endverbatim
+*>
+*> \param[in] BERR
+*> \verbatim
+*> BERR is DOUBLE PRECISION array, dimension (NRHS)
+*> The componentwise relative backward error of each solution
+*> vector (i.e., the smallest relative change in any entry of A
+*> or B that makes X an exact solution).
+*> \endverbatim
+*>
+*> \param[out] RESLTS
+*> \verbatim
+*> RESLTS is DOUBLE PRECISION array, dimension (2)
+*> The maximum over the NRHS solution vectors of the ratios:
+*> RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
+*> RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTRT05( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
$ LDX, XACT, LDXACT, FERR, BERR, RESLTS )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, TRANS, UPLO
@@ -15,99 +199,6 @@
$ XACT( LDXACT, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRT05 tests the error bounds from iterative refinement for the
-* computed solution to a system of equations A*X = B, where A is a
-* triangular n by n matrix.
-*
-* RESLTS(1) = test of the error bound
-* = norm(X - XACT) / ( norm(X) * FERR )
-*
-* A large value is returned if this ratio is not less than one.
-*
-* RESLTS(2) = residual from the iterative refinement routine
-* = the maximum of BERR / ( (n+1)*EPS + (*) ), where
-* (*) = (n+1)*UNFL / (min_i (abs(A)*abs(X) +abs(b))_i )
-*
-* Arguments
-* =========
-*
-* UPLO (input) CHARACTER*1
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* TRANS (input) CHARACTER*1
-* Specifies the form of the system of equations.
-* = 'N': A * X = B (No transpose)
-* = 'T': A'* X = B (Transpose)
-* = 'C': A'* X = B (Conjugate transpose = Transpose)
-*
-* DIAG (input) CHARACTER*1
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The number of rows of the matrices X, B, and XACT, and the
-* order of the matrix A. N >= 0.
-*
-* NRHS (input) INTEGER
-* The number of columns of the matrices X, B, and XACT.
-* NRHS >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* B (input) COMPLEX*16 array, dimension (LDB,NRHS)
-* The right hand side vectors for the system of linear
-* equations.
-*
-* LDB (input) INTEGER
-* The leading dimension of the array B. LDB >= max(1,N).
-*
-* X (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The computed solution vectors. Each vector is stored as a
-* column of the matrix X.
-*
-* LDX (input) INTEGER
-* The leading dimension of the array X. LDX >= max(1,N).
-*
-* XACT (input) COMPLEX*16 array, dimension (LDX,NRHS)
-* The exact solution vectors. Each vector is stored as a
-* column of the matrix XACT.
-*
-* LDXACT (input) INTEGER
-* The leading dimension of the array XACT. LDXACT >= max(1,N).
-*
-* FERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The estimated forward error bounds for each solution vector
-* X. If XTRUE is the true solution, FERR bounds the magnitude
-* of the largest entry in (X - XTRUE) divided by the magnitude
-* of the largest entry in X.
-*
-* BERR (input) DOUBLE PRECISION array, dimension (NRHS)
-* The componentwise relative backward error of each solution
-* vector (i.e., the smallest relative change in any entry of A
-* or B that makes X an exact solution).
-*
-* RESLTS (output) DOUBLE PRECISION array, dimension (2)
-* The maximum over the NRHS solution vectors of the ratios:
-* RESLTS(1) = norm(X - XACT) / ( norm(X) * FERR )
-* RESLTS(2) = BERR / ( (n+1)*EPS + (*) )
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztrt06.f b/TESTING/LIN/ztrt06.f
index 278a1c23..15164ad8 100644
--- a/TESTING/LIN/ztrt06.f
+++ b/TESTING/LIN/ztrt06.f
@@ -1,9 +1,133 @@
+*> \brief \b ZTRT06
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZTRT06( RCOND, RCONDC, UPLO, DIAG, N, A, LDA, RWORK,
+* RAT )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIAG, UPLO
+* INTEGER LDA, N
+* DOUBLE PRECISION RAT, RCOND, RCONDC
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION RWORK( * )
+* COMPLEX*16 A( LDA, * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTRT06 computes a test ratio comparing RCOND (the reciprocal
+*> condition number of a triangular matrix A) and RCONDC, the estimate
+*> computed by ZTRCON. Information about the triangular matrix A is
+*> used if one estimate is zero and the other is non-zero to decide if
+*> underflow in the estimate is justified.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] RCOND
+*> \verbatim
+*> RCOND is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number obtained by
+*> forming the explicit inverse of the matrix A and computing
+*> RCOND = 1/( norm(A) * norm(inv(A)) ).
+*> \endverbatim
+*>
+*> \param[in] RCONDC
+*> \verbatim
+*> RCONDC is DOUBLE PRECISION
+*> The estimate of the reciprocal condition number computed by
+*> ZTRCON.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*> UPLO is CHARACTER
+*> Specifies whether the matrix A is upper or lower triangular.
+*> = 'U': Upper triangular
+*> = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*> DIAG is CHARACTER
+*> Specifies whether or not the matrix A is unit triangular.
+*> = 'N': Non-unit triangular
+*> = 'U': Unit triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The triangular matrix A. If UPLO = 'U', the leading n by n
+*> upper triangular part of the array A contains the upper
+*> triangular matrix, and the strictly lower triangular part of
+*> A is not referenced. If UPLO = 'L', the leading n by n lower
+*> triangular part of the array A contains the lower triangular
+*> matrix, and the strictly upper triangular part of A is not
+*> referenced. If DIAG = 'U', the diagonal elements of A are
+*> also not referenced and are assumed to be 1.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*> RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] RAT
+*> \verbatim
+*> RAT is DOUBLE PRECISION
+*> The test ratio. If both RCOND and RCONDC are nonzero,
+*> RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
+*> If RAT = 0, the two estimates are exactly the same.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_lin
+*
+* =====================================================================
SUBROUTINE ZTRT06( RCOND, RCONDC, UPLO, DIAG, N, A, LDA, RWORK,
$ RAT )
*
* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIAG, UPLO
@@ -15,60 +139,6 @@
COMPLEX*16 A( LDA, * )
* ..
*
-* Purpose
-* =======
-*
-* ZTRT06 computes a test ratio comparing RCOND (the reciprocal
-* condition number of a triangular matrix A) and RCONDC, the estimate
-* computed by ZTRCON. Information about the triangular matrix A is
-* used if one estimate is zero and the other is non-zero to decide if
-* underflow in the estimate is justified.
-*
-* Arguments
-* =========
-*
-* RCOND (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number obtained by
-* forming the explicit inverse of the matrix A and computing
-* RCOND = 1/( norm(A) * norm(inv(A)) ).
-*
-* RCONDC (input) DOUBLE PRECISION
-* The estimate of the reciprocal condition number computed by
-* ZTRCON.
-*
-* UPLO (input) CHARACTER
-* Specifies whether the matrix A is upper or lower triangular.
-* = 'U': Upper triangular
-* = 'L': Lower triangular
-*
-* DIAG (input) CHARACTER
-* Specifies whether or not the matrix A is unit triangular.
-* = 'N': Non-unit triangular
-* = 'U': Unit triangular
-*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The triangular matrix A. If UPLO = 'U', the leading n by n
-* upper triangular part of the array A contains the upper
-* triangular matrix, and the strictly lower triangular part of
-* A is not referenced. If UPLO = 'L', the leading n by n lower
-* triangular part of the array A contains the lower triangular
-* matrix, and the strictly upper triangular part of A is not
-* referenced. If DIAG = 'U', the diagonal elements of A are
-* also not referenced and are assumed to be 1.
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,N).
-*
-* RWORK (workspace) DOUBLE PRECISION array, dimension (N)
-*
-* RAT (output) DOUBLE PRECISION
-* The test ratio. If both RCOND and RCONDC are nonzero,
-* RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
-* If RAT = 0, the two estimates are exactly the same.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/LIN/ztzt01.f b/TESTING/LIN/ztzt01.f
index 71720ea6..0067ae17 100644
--- a/TESTING/LIN/ztzt01.f
+++ b/TESTING/LIN/ztzt01.f
@@ -1,52 +1,117 @@
- DOUBLE PRECISION FUNCTION ZTZT01( M, N, A, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
- $ WORK( LWORK )
-* ..
-*
+*> \brief \b ZTZT01
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZTZT01( M, N, A, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
+* $ WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZTZT01 returns
-* || A - R*Q || / ( M * eps * ||A|| )
-* for an upper trapezoidal A that was factored with ZTZRQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTZT01 returns
+*> || A - R*Q || / ( M * eps * ||A|| )
+*> for an upper trapezoidal A that was factored with ZTZRQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrices A and AF.
-*
-* N (input) INTEGER
-* The number of columns of the matrices A and AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrices A and AF.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The original upper trapezoidal M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> The output of ZTZRQF for input matrix A.
+*> The lower triangle is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the arrays A and AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> ZTZRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> The length of the array WORK. LWORK >= m*n + m.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* A (input) COMPLEX*16 array, dimension (LDA,N)
-* The original upper trapezoidal M by N matrix A.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* The output of ZTZRQF for input matrix A.
-* The lower triangle is not referenced.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the arrays A and AF.
+*> \ingroup complex16_lin
*
-* TAU (input) COMPLEX*16 array, dimension (M)
-* Details of the Householder transformations as returned by
-* ZTZRQF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZTZT01( M, N, A, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* The length of the array WORK. LWORK >= m*n + m.
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), AF( LDA, * ), TAU( * ),
+ $ WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/LIN/ztzt02.f b/TESTING/LIN/ztzt02.f
index 6201293d..9f835332 100644
--- a/TESTING/LIN/ztzt02.f
+++ b/TESTING/LIN/ztzt02.f
@@ -1,48 +1,109 @@
- DOUBLE PRECISION FUNCTION ZTZT02( M, N, AF, LDA, TAU, WORK,
- $ LWORK )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LWORK, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 AF( LDA, * ), TAU( * ), WORK( LWORK )
-* ..
-*
+*> \brief \b ZTZT02
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION ZTZT02( M, N, AF, LDA, TAU, WORK,
+* LWORK )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
+*
* Purpose
* =======
*
-* ZTZT02 returns
-* || I - Q'*Q || / ( M * eps)
-* where the matrix Q is defined by the Householder transformations
-* generated by ZTZRQF.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZTZT02 returns
+*> || I - Q'*Q || / ( M * eps)
+*> where the matrix Q is defined by the Householder transformations
+*> generated by ZTZRQF.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix AF.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix AF.
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*> AF is COMPLEX*16 array, dimension (LDA,N)
+*> The output of ZTZRQF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array AF.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*> TAU is COMPLEX*16 array, dimension (M)
+*> Details of the Householder transformations as returned by
+*> ZTZRQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (LWORK)
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*> LWORK is INTEGER
+*> length of WORK array. Must be >= N*N+N
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* The number of columns of the matrix AF.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* AF (input) COMPLEX*16 array, dimension (LDA,N)
-* The output of ZTZRQF.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array AF.
+*> \ingroup complex16_lin
*
-* TAU (input) COMPLEX*16 array, dimension (M)
-* Details of the Householder transformations as returned by
-* ZTZRQF.
+* =====================================================================
+ DOUBLE PRECISION FUNCTION ZTZT02( M, N, AF, LDA, TAU, WORK,
+ $ LWORK )
*
-* WORK (workspace) COMPLEX*16 array, dimension (LWORK)
+* -- LAPACK test routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LWORK (input) INTEGER
-* length of WORK array. Must be >= N*N+N
+* .. Scalar Arguments ..
+ INTEGER LDA, LWORK, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 AF( LDA, * ), TAU( * ), WORK( LWORK )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/clagge.f b/TESTING/MATGEN/clagge.f
index 7ba73df8..36222571 100644
--- a/TESTING/MATGEN/clagge.f
+++ b/TESTING/MATGEN/clagge.f
@@ -1,63 +1,134 @@
- SUBROUTINE CLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL D( * )
- COMPLEX A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b CLAGGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL D( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLAGGE generates a complex general m by n matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with random unitary matrices:
-* A = U*D*V. The lower and upper bandwidths may then be reduced to
-* kl and ku by additional unitary transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAGGE generates a complex general m by n matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with random unitary matrices:
+*> A = U*D*V. The lower and upper bandwidths may then be reduced to
+*> kl and ku by additional unitary transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* The number of nonzero superdiagonals within the band of A.
-* 0 <= KU <= N-1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of nonzero superdiagonals within the band of A.
+*> 0 <= KU <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (min(M,N))
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The generated m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (M+N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (min(M,N))
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) COMPLEX array, dimension (LDA,N)
-* The generated m by n matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \ingroup complex_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE CLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (M+N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL D( * )
+ COMPLEX A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/claghe.f b/TESTING/MATGEN/claghe.f
index f9e4a03d..6cee2d60 100644
--- a/TESTING/MATGEN/claghe.f
+++ b/TESTING/MATGEN/claghe.f
@@ -1,57 +1,122 @@
- SUBROUTINE CLAGHE( N, K, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL D( * )
- COMPLEX A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b CLAGHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAGHE( N, K, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL D( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLAGHE generates a complex hermitian matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with a random unitary matrix:
-* A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
-* unitary transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAGHE generates a complex hermitian matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with a random unitary matrix:
+*> A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
+*> unitary transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* K (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= K <= N-1.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= K <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The generated n by n hermitian matrix A (the full matrix is
+*> stored).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) COMPLEX array, dimension (LDA,N)
-* The generated n by n hermitian matrix A (the full matrix is
-* stored).
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup complex_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE CLAGHE( N, K, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL D( * )
+ COMPLEX A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/clagsy.f b/TESTING/MATGEN/clagsy.f
index 8b356c94..afa1d80c 100644
--- a/TESTING/MATGEN/clagsy.f
+++ b/TESTING/MATGEN/clagsy.f
@@ -1,57 +1,122 @@
- SUBROUTINE CLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL D( * )
- COMPLEX A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b CLAGSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL D( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLAGSY generates a complex symmetric matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with a random unitary matrix:
-* A = U*D*U**T. The semi-bandwidth may then be reduced to k by
-* additional unitary transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAGSY generates a complex symmetric matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with a random unitary matrix:
+*> A = U*D*U**T. The semi-bandwidth may then be reduced to k by
+*> additional unitary transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* K (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= K <= N-1.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= K <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> The generated n by n symmetric matrix A (the full matrix is
+*> stored).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) COMPLEX array, dimension (LDA,N)
-* The generated n by n symmetric matrix A (the full matrix is
-* stored).
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup complex_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE CLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL D( * )
+ COMPLEX A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/clahilb.f b/TESTING/MATGEN/clahilb.f
index 174fd513..4c04f0a9 100644
--- a/TESTING/MATGEN/clahilb.f
+++ b/TESTING/MATGEN/clahilb.f
@@ -1,104 +1,167 @@
+*> \brief \b CLAHILB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+* INFO, PATH)
+*
+* .. Scalar Arguments ..
+* INTEGER N, NRHS, LDA, LDX, LDB, INFO
+* .. Array Arguments ..
+* REAL WORK(N)
+* COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
+* CHARACTER*3 PATH
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAHILB generates an N by N scaled Hilbert matrix in A along with
+*> NRHS right-hand sides in B and solutions in X such that A*X=B.
+*>
+*> The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all
+*> entries are integers. The right-hand sides are the first NRHS
+*> columns of M * the identity matrix, and the solutions are the
+*> first NRHS columns of the inverse Hilbert matrix.
+*>
+*> The condition number of the Hilbert matrix grows exponentially with
+*> its size, roughly as O(e ** (3.5*N)). Additionally, the inverse
+*> Hilbert matrices beyond a relatively small dimension cannot be
+*> generated exactly without extra precision. Precision is exhausted
+*> when the largest entry in the inverse Hilbert matrix is greater than
+*> 2 to the power of the number of bits in the fraction of the data type
+*> used plus one, which is 24 for single precision.
+*>
+*> In single, the generated solution is exact for N <= 6 and has
+*> small componentwise error for 7 <= N <= 11.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The requested number of right-hand sides.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The generated scaled Hilbert matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX, NRHS)
+*> The generated exact solutions. Currently, the first NRHS
+*> columns of the inverse Hilbert matrix.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= N.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, NRHS)
+*> The generated right-hand sides. Currently, the first NRHS
+*> columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: N is too large; the data is still generated but may not
+*> be not exact.
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
SUBROUTINE CLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
$ INFO, PATH)
-!
-! -- LAPACK auxiliary test routine (version 3.2.2) --
-! Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-! Courant Institute, Argonne National Lab, and Rice University
-* June 2010
-!
-! David Vu <dtv@cs.berkeley.edu>
-! Yozo Hida <yozo@cs.berkeley.edu>
-! Jason Riedy <ejr@cs.berkeley.edu>
-! D. Halligan <dhalligan@berkeley.edu>
-!
- IMPLICIT NONE
-! .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
INTEGER N, NRHS, LDA, LDX, LDB, INFO
-! .. Array Arguments ..
+* .. Array Arguments ..
REAL WORK(N)
COMPLEX A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
CHARACTER*3 PATH
-! ..
-!
-! Purpose
-! =======
-!
-! CLAHILB generates an N by N scaled Hilbert matrix in A along with
-! NRHS right-hand sides in B and solutions in X such that A*X=B.
-!
-! The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all
-! entries are integers. The right-hand sides are the first NRHS
-! columns of M * the identity matrix, and the solutions are the
-! first NRHS columns of the inverse Hilbert matrix.
-!
-! The condition number of the Hilbert matrix grows exponentially with
-! its size, roughly as O(e ** (3.5*N)). Additionally, the inverse
-! Hilbert matrices beyond a relatively small dimension cannot be
-! generated exactly without extra precision. Precision is exhausted
-! when the largest entry in the inverse Hilbert matrix is greater than
-! 2 to the power of the number of bits in the fraction of the data type
-! used plus one, which is 24 for single precision.
-!
-! In single, the generated solution is exact for N <= 6 and has
-! small componentwise error for 7 <= N <= 11.
-!
-! Arguments
-! =========
-!
-! N (input) INTEGER
-! The dimension of the matrix A.
-!
-! NRHS (input) INTEGER
-! The requested number of right-hand sides.
-!
-! A (output) COMPLEX array, dimension (LDA, N)
-! The generated scaled Hilbert matrix.
-!
-! LDA (input) INTEGER
-! The leading dimension of the array A. LDA >= N.
-!
-! X (output) COMPLEX array, dimension (LDX, NRHS)
-! The generated exact solutions. Currently, the first NRHS
-! columns of the inverse Hilbert matrix.
-!
-! LDX (input) INTEGER
-! The leading dimension of the array X. LDX >= N.
-!
-! B (output) REAL array, dimension (LDB, NRHS)
-! The generated right-hand sides. Currently, the first NRHS
-! columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
-!
-! LDB (input) INTEGER
-! The leading dimension of the array B. LDB >= N.
-!
-! WORK (workspace) REAL array, dimension (N)
-!
-!
-! INFO (output) INTEGER
-! = 0: successful exit
-! = 1: N is too large; the data is still generated but may not
-! be not exact.
-! < 0: if INFO = -i, the i-th argument had an illegal value
-!
-! =====================================================================
+* ..
+*
+* =====================================================================
-! .. Local Scalars ..
+* .. Local Scalars ..
INTEGER TM, TI, R
INTEGER M
INTEGER I, J
COMPLEX TMP
CHARACTER*2 C2
-! .. Parameters ..
-! NMAX_EXACT the largest dimension where the generated data is
-! exact.
-! NMAX_APPROX the largest dimension where the generated data has
-! a small componentwise relative error.
-! ??? complex uses how many bits ???
+* .. Parameters ..
+* NMAX_EXACT the largest dimension where the generated data is
+* exact.
+* NMAX_APPROX the largest dimension where the generated data has
+* a small componentwise relative error.
+* ??? complex uses how many bits ???
INTEGER NMAX_EXACT, NMAX_APPROX, SIZE_D
PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11, SIZE_D = 8)
-! d's are generated from random permuation of those eight elements.
+* d's are generated from random permuation of those eight elements.
COMPLEX D1(8), D2(8), INVD1(8), INVD2(8)
DATA D1 /(-1,0),(0,1),(-1,-1),(0,-1),(1,0),(-1,1),(1,1),(1,-1)/
DATA D2 /(-1,0),(0,-1),(-1,1),(0,1),(1,0),(-1,-1),(1,-1),(1,1)/
@@ -108,17 +171,17 @@
DATA INVD2 /(-1,0),(0,1),(-.5,-.5),(0,-1),(1,0),
$ (-.5,.5),(.5,.5),(.5,-.5)/
-! ..
-! .. External Functions
+* ..
+* .. External Functions
EXTERNAL CLASET, LSAMEN
INTRINSIC REAL
LOGICAL LSAMEN
-! ..
-! .. Executable Statements ..
+* ..
+* .. Executable Statements ..
C2 = PATH( 2: 3 )
-!
-! Test the input arguments
-!
+*
+* Test the input arguments
+*
INFO = 0
IF (N .LT. 0 .OR. N .GT. NMAX_APPROX) THEN
INFO = -1
@@ -139,8 +202,8 @@
INFO = 1
END IF
-! Compute M = the LCM of the integers [1, 2*N-1]. The largest
-! reasonable N is small enough that integers suffice (up to N = 11).
+* Compute M = the LCM of the integers [1, 2*N-1]. The largest
+* reasonable N is small enough that integers suffice (up to N = 11).
M = 1
DO I = 2, (2*N-1)
TM = M
@@ -154,9 +217,9 @@
M = (M / TI) * I
END DO
-! Generate the scaled Hilbert matrix in A
-! If we are testing SY routines, take
-! D1_i = D2_i, else, D1_i = D2_i*
+* Generate the scaled Hilbert matrix in A
+* If we are testing SY routines, take
+* D1_i = D2_i, else, D1_i = D2_i*
IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
DO J = 1, N
DO I = 1, N
@@ -173,22 +236,22 @@
END DO
END IF
-! Generate matrix B as simply the first NRHS columns of M * the
-! identity.
+* Generate matrix B as simply the first NRHS columns of M * the
+* identity.
TMP = REAL(M)
CALL CLASET('Full', N, NRHS, (0.0,0.0), TMP, B, LDB)
-! Generate the true solutions in X. Because B = the first NRHS
-! columns of M*I, the true solutions are just the first NRHS columns
-! of the inverse Hilbert matrix.
+* Generate the true solutions in X. Because B = the first NRHS
+* columns of M*I, the true solutions are just the first NRHS columns
+* of the inverse Hilbert matrix.
WORK(1) = N
DO J = 2, N
WORK(J) = ( ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1) )
$ * (N +J -1)
END DO
-! If we are testing SY routines,
-! take D1_i = D2_i, else, D1_i = D2_i*
+* If we are testing SY routines,
+* take D1_i = D2_i, else, D1_i = D2_i*
IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
DO J = 1, NRHS
DO I = 1, N
diff --git a/TESTING/MATGEN/clakf2.f b/TESTING/MATGEN/clakf2.f
index 6f401b04..09553ecb 100644
--- a/TESTING/MATGEN/clakf2.f
+++ b/TESTING/MATGEN/clakf2.f
@@ -1,54 +1,125 @@
- SUBROUTINE CLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDZ, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDA, * ), D( LDA, * ),
- $ E( LDA, * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b CLAKF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDA, * ), D( LDA, * ),
+* $ E( LDA, * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* Form the 2*M*N by 2*M*N matrix
-*
-* Z = [ kron(In, A) -kron(B', Im) ]
-* [ kron(In, D) -kron(E', Im) ],
-*
-* where In is the identity matrix of size n and X' is the transpose
-* of X. kron(X, Y) is the Kronecker product between the matrices X
-* and Y.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Form the 2*M*N by 2*M*N matrix
+*>
+*> Z = [ kron(In, A) -kron(B', Im) ]
+*> [ kron(In, D) -kron(E', Im) ],
+*>
+*> where In is the identity matrix of size n and X' is the transpose
+*> of X. kron(X, Y) is the Kronecker product between the matrices X
+*> and Y.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Size of matrix, must be >= 1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Size of matrix, must be >= 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Size of matrix, must be >= 1.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX, dimension ( LDA, M )
+*> The matrix A in the output matrix Z.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, D, and E. ( LDA >= M+N )
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX, dimension ( LDA, N )
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX, dimension ( LDA, M )
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX, dimension ( LDA, N )
+*> \endverbatim
+*> \verbatim
+*> The matrices used in forming the output matrix Z.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX, dimension ( LDZ, 2*M*N )
+*> The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of Z. ( LDZ >= 2*M*N )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Size of matrix, must be >= 1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX, dimension ( LDA, M )
-* The matrix A in the output matrix Z.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of A, B, D, and E. ( LDA >= M+N )
+*> \ingroup complex_matgen
*
-* B (input) COMPLEX, dimension ( LDA, N )
-* D (input) COMPLEX, dimension ( LDA, M )
-* E (input) COMPLEX, dimension ( LDA, N )
-* The matrices used in forming the output matrix Z.
+* =====================================================================
+ SUBROUTINE CLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
*
-* Z (output) COMPLEX, dimension ( LDZ, 2*M*N )
-* The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDZ (input) INTEGER
-* The leading dimension of Z. ( LDZ >= 2*M*N )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDZ, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDA, * ), D( LDA, * ),
+ $ E( LDA, * ), Z( LDZ, * )
+* ..
*
* ====================================================================
*
diff --git a/TESTING/MATGEN/clarge.f b/TESTING/MATGEN/clarge.f
index f44a64c8..93b9ee8a 100644
--- a/TESTING/MATGEN/clarge.f
+++ b/TESTING/MATGEN/clarge.f
@@ -1,48 +1,106 @@
- SUBROUTINE CLARGE( N, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- COMPLEX A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b CLARGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLARGE( N, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* CLARGE pre- and post-multiplies a complex general n by n matrix A
-* with a random unitary matrix: A = U*D*U'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARGE pre- and post-multiplies a complex general n by n matrix A
+*> with a random unitary matrix: A = U*D*U'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On entry, the original n by n matrix A.
+*> On exit, A is overwritten by U*A*U' for some random
+*> unitary matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On entry, the original n by n matrix A.
-* On exit, A is overwritten by U*A*U' for some random
-* unitary matrix U.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup complex_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE CLARGE( N, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) COMPLEX array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ COMPLEX A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/clarnd.f b/TESTING/MATGEN/clarnd.f
index ac8117ba..46fa07ac 100644
--- a/TESTING/MATGEN/clarnd.f
+++ b/TESTING/MATGEN/clarnd.f
@@ -1,45 +1,95 @@
- COMPLEX FUNCTION CLARND( IDIST, ISEED )
+*> \brief \b CLARND
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IDIST
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* COMPLEX FUNCTION CLARND( IDIST, ISEED )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* ..
+*
* Purpose
* =======
*
-* CLARND returns a random complex number from a uniform or normal
-* distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLARND returns a random complex number from a uniform or normal
+*> distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IDIST (input) INTEGER
-* Specifies the distribution of the random numbers:
-* = 1: real and imaginary parts each uniform (0,1)
-* = 2: real and imaginary parts each uniform (-1,1)
-* = 3: real and imaginary parts each normal (0,1)
-* = 4: uniformly distributed on the disc abs(z) <= 1
-* = 5: uniformly distributed on the circle abs(z) = 1
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the distribution of the random numbers:
+*> = 1: real and imaginary parts each uniform (0,1)
+*> = 2: real and imaginary parts each uniform (-1,1)
+*> = 3: real and imaginary parts each normal (0,1)
+*> = 4: uniformly distributed on the disc abs(z) <= 1
+*> = 5: uniformly distributed on the circle abs(z) = 1
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine calls the auxiliary routine SLARAN to generate a random
+*> real number from a uniform (0,1) distribution. The Box-Muller method
+*> is used to transform numbers from a uniform to a normal distribution.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ COMPLEX FUNCTION CLARND( IDIST, ISEED )
*
-* This routine calls the auxiliary routine SLARAN to generate a random
-* real number from a uniform (0,1) distribution. The Box-Muller method
-* is used to transform numbers from a uniform to a normal distribution.
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER IDIST
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/claror.f b/TESTING/MATGEN/claror.f
index d1d04d26..495976db 100644
--- a/TESTING/MATGEN/claror.f
+++ b/TESTING/MATGEN/claror.f
@@ -1,8 +1,172 @@
+*> \brief \b CLAROR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAROR( SIDE, INIT, M, N, A, LDA, ISEED, X, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER INIT, SIDE
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX A( LDA, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAROR pre- or post-multiplies an M by N matrix A by a random
+*> unitary matrix U, overwriting A. A may optionally be
+*> initialized to the identity matrix before multiplying by U.
+*> U is generated using the method of G.W. Stewart
+*> ( SIAM J. Numer. Anal. 17, 1980, pp. 403-409 ).
+*> (BLAS-2 version)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> SIDE specifies whether A is multiplied on the left or right
+*> by U.
+*> SIDE = 'L' Multiply A on the left (premultiply) by U
+*> SIDE = 'R' Multiply A on the right (postmultiply) by UC> SIDE = 'C' Multiply A on the left by U and the right by UC> SIDE = 'T' Multiply A on the left by U and the right by U'
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] INIT
+*> \verbatim
+*> INIT is CHARACTER*1
+*> INIT specifies whether or not A should be initialized to
+*> the identity matrix.
+*> INIT = 'I' Initialize A to (a section of) the
+*> identity matrix before applying U.
+*> INIT = 'N' No initialization. Apply U to the
+*> input matrix A.
+*> \endverbatim
+*> \verbatim
+*> INIT = 'I' may be used to generate square (i.e., unitary)
+*> or rectangular orthogonal matrices (orthogonality being
+*> in the sense of CDOTC):
+*> \endverbatim
+*> \verbatim
+*> For square matrices, M=N, and SIDE many be either 'L' or
+*> 'R'; the rows will be orthogonal to each other, as will the
+*> columns.
+*> For rectangular matrices where M < N, SIDE = 'R' will
+*> produce a dense matrix whose rows will be orthogonal and
+*> whose columns will not, while SIDE = 'L' will produce a
+*> matrix whose rows will be orthogonal, and whose first M
+*> columns will be orthogonal, the remaining columns being
+*> zero.
+*> For matrices where M > N, just use the previous
+*> explaination, interchanging 'L' and 'R' and "rows" and
+*> "columns".
+*> \endverbatim
+*> \verbatim
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> Input and output array. Overwritten by U A ( if SIDE = 'L' )
+*> or by A U ( if SIDE = 'R' )
+*> or by U A U* ( if SIDE = 'C')
+*> or by U A U' ( if SIDE = 'T') on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A. Must be at least MAX ( 1, M ).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to CLAROR to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension ( 3*MAX( M, N ) )
+*> Workspace. Of length:
+*> 2*M + N if SIDE = 'L',
+*> 2*N + M if SIDE = 'R',
+*> 3*N if SIDE = 'C' or 'T'.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> An error flag. It is set to:
+*> 0 if no error.
+*> 1 if CLARND returned a bad random number (installation
+*> problem)
+*> -1 if SIDE is not L, R, C, or T.
+*> -3 if M is negative.
+*> -4 if N is negative or if SIDE is C or T and N is not equal
+*> to M.
+*> -6 if LDA is less than M.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
SUBROUTINE CLAROR( SIDE, INIT, M, N, A, LDA, ISEED, X, INFO )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER INIT, SIDE
@@ -13,101 +177,6 @@
COMPLEX A( LDA, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* CLAROR pre- or post-multiplies an M by N matrix A by a random
-* unitary matrix U, overwriting A. A may optionally be
-* initialized to the identity matrix before multiplying by U.
-* U is generated using the method of G.W. Stewart
-* ( SIAM J. Numer. Anal. 17, 1980, pp. 403-409 ).
-* (BLAS-2 version)
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* SIDE specifies whether A is multiplied on the left or right
-* by U.
-* SIDE = 'L' Multiply A on the left (premultiply) by U
-* SIDE = 'R' Multiply A on the right (postmultiply) by U*
-* SIDE = 'C' Multiply A on the left by U and the right by U*
-* SIDE = 'T' Multiply A on the left by U and the right by U'
-* Not modified.
-*
-* INIT (input) CHARACTER*1
-* INIT specifies whether or not A should be initialized to
-* the identity matrix.
-* INIT = 'I' Initialize A to (a section of) the
-* identity matrix before applying U.
-* INIT = 'N' No initialization. Apply U to the
-* input matrix A.
-*
-* INIT = 'I' may be used to generate square (i.e., unitary)
-* or rectangular orthogonal matrices (orthogonality being
-* in the sense of CDOTC):
-*
-* For square matrices, M=N, and SIDE many be either 'L' or
-* 'R'; the rows will be orthogonal to each other, as will the
-* columns.
-* For rectangular matrices where M < N, SIDE = 'R' will
-* produce a dense matrix whose rows will be orthogonal and
-* whose columns will not, while SIDE = 'L' will produce a
-* matrix whose rows will be orthogonal, and whose first M
-* columns will be orthogonal, the remaining columns being
-* zero.
-* For matrices where M > N, just use the previous
-* explaination, interchanging 'L' and 'R' and "rows" and
-* "columns".
-*
-* Not modified.
-*
-* M (input) INTEGER
-* Number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of A. Not modified.
-*
-* A (input/output) COMPLEX array, dimension ( LDA, N )
-* Input and output array. Overwritten by U A ( if SIDE = 'L' )
-* or by A U ( if SIDE = 'R' )
-* or by U A U* ( if SIDE = 'C')
-* or by U A U' ( if SIDE = 'T') on exit.
-*
-* LDA (input) INTEGER
-* Leading dimension of A. Must be at least MAX ( 1, M ).
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to CLAROR to continue the same random number
-* sequence.
-* Modified.
-*
-* X (workspace) COMPLEX array, dimension ( 3*MAX( M, N ) )
-* Workspace. Of length:
-* 2*M + N if SIDE = 'L',
-* 2*N + M if SIDE = 'R',
-* 3*N if SIDE = 'C' or 'T'.
-* Modified.
-*
-* INFO (output) INTEGER
-* An error flag. It is set to:
-* 0 if no error.
-* 1 if CLARND returned a bad random number (installation
-* problem)
-* -1 if SIDE is not L, R, C, or T.
-* -3 if M is negative.
-* -4 if N is negative or if SIDE is C or T and N is not equal
-* to M.
-* -6 if LDA is less than M.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/clarot.f b/TESTING/MATGEN/clarot.f
index f73d10b4..0060bf6c 100644
--- a/TESTING/MATGEN/clarot.f
+++ b/TESTING/MATGEN/clarot.f
@@ -1,9 +1,248 @@
+*> \brief \b CLAROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
+* XRIGHT )
+*
+* .. Scalar Arguments ..
+* LOGICAL LLEFT, LRIGHT, LROWS
+* INTEGER LDA, NL
+* COMPLEX C, S, XLEFT, XRIGHT
+* ..
+* .. Array Arguments ..
+* COMPLEX A( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLAROT applies a (Givens) rotation to two adjacent rows or
+*> columns, where one element of the first and/or last column/row
+*> for use on matrices stored in some format other than GE, so
+*> that elements of the matrix may be used or modified for which
+*> no array element is provided.
+*>
+*> One example is a symmetric matrix in SB format (bandwidth=4), for
+*> which UPLO='L': Two adjacent rows will have the format:
+*>
+*> row j: C> C> C> C> C> . . . .
+*> row j+1: C> C> C> C> C> . . . .
+*>
+*> '*' indicates elements for which storage is provided,
+*> '.' indicates elements for which no storage is provided, but
+*> are not necessarily zero; their values are determined by
+*> symmetry. ' ' indicates elements which are necessarily zero,
+*> and have no storage provided.
+*>
+*> Those columns which have two '*'s can be handled by SROT.
+*> Those columns which have no '*'s can be ignored, since as long
+*> as the Givens rotations are carefully applied to preserve
+*> symmetry, their values are determined.
+*> Those columns which have one '*' have to be handled separately,
+*> by using separate variables "p" and "q":
+*>
+*> row j: C> C> C> C> C> p . . .
+*> row j+1: q C> C> C> C> C> . . . .
+*>
+*> The element p would have to be set correctly, then that column
+*> is rotated, setting p to its new value. The next call to
+*> CLAROT would rotate columns j and j+1, using p, and restore
+*> symmetry. The element q would start out being zero, and be
+*> made non-zero by the rotation. Later, rotations would presumably
+*> be chosen to zero q out.
+*>
+*> Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
+*> ------- ------- ---------
+*>
+*> General dense matrix:
+*>
+*> CALL CLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
+*> A(i,1),LDA, DUMMY, DUMMY)
+*>
+*> General banded matrix in GB format:
+*>
+*> j = MAX(1, i-KL )
+*> NL = MIN( N, i+KU+1 ) + 1-j
+*> CALL CLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
+*> A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
+*>
+*> [ note that i+1-j is just MIN(i,KL+1) ]
+*>
+*> Symmetric banded matrix in SY format, bandwidth K,
+*> lower triangle only:
+*>
+*> j = MAX(1, i-K )
+*> NL = MIN( K+1, i ) + 1
+*> CALL CLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
+*> A(i,j), LDA, XLEFT, XRIGHT )
+*>
+*> Same, but upper triangle only:
+*>
+*> NL = MIN( K+1, N-i ) + 1
+*> CALL CLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
+*> A(i,i), LDA, XLEFT, XRIGHT )
+*>
+*> Symmetric banded matrix in SB format, bandwidth K,
+*> lower triangle only:
+*>
+*> [ same as for SY, except:]
+*> . . . .
+*> A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
+*>
+*> [ note that i+1-j is just MIN(i,K+1) ]
+*>
+*> Same, but upper triangle only:
+*> . . .
+*> A(K+1,i), LDA-1, XLEFT, XRIGHT )
+*>
+*> Rotating columns is just the transpose of rotating rows, except
+*> for GB and SB: (rotating columns i and i+1)
+*>
+*> GB:
+*> j = MAX(1, i-KU )
+*> NL = MIN( N, i+KL+1 ) + 1-j
+*> CALL CLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
+*> A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
+*>
+*> [note that KU+j+1-i is just MAX(1,KU+2-i)]
+*>
+*> SB: (upper triangle)
+*>
+*> . . . . . .
+*> A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
+*>
+*> SB: (lower triangle)
+*>
+*> . . . . . .
+*> A(1,i),LDA-1, XTOP, XBOTTM )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> LROWS - LOGICAL
+*> If .TRUE., then CLAROT will rotate two rows. If .FALSE.,
+*> then it will rotate two columns.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LLEFT - LOGICAL
+*> If .TRUE., then XLEFT will be used instead of the
+*> corresponding element of A for the first element in the
+*> second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
+*> If .FALSE., then the corresponding element of A will be
+*> used.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LRIGHT - LOGICAL
+*> If .TRUE., then XRIGHT will be used instead of the
+*> corresponding element of A for the last element in the
+*> first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
+*> .FALSE., then the corresponding element of A will be used.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NL - INTEGER
+*> The length of the rows (if LROWS=.TRUE.) or columns (if
+*> LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
+*> used, the columns/rows they are in should be included in
+*> NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
+*> least 2. The number of rows/columns to be rotated
+*> exclusive of those involving XLEFT and/or XRIGHT may
+*> not be negative, i.e., NL minus how many of LLEFT and
+*> LRIGHT are .TRUE. must be at least zero; if not, XERBLA
+*> will be called.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> C, S - COMPLEX
+*> Specify the Givens rotation to be applied. If LROWS is
+*> true, then the matrix ( c s )
+*> ( _ _ )
+*> (-s c ) is applied from the left;
+*> if false, then the transpose (not conjugated) thereof is
+*> applied from the right. Note that in contrast to the
+*> output of CROTG or to most versions of CROT, both C and S
+*> are complex. For a Givens rotation, |C|**2 + |S|**2 should
+*> be 1, but this is not checked.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX array.
+*> The array containing the rows/columns to be rotated. The
+*> first element of A should be the upper left element to
+*> be rotated.
+*> Read and modified.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> The "effective" leading dimension of A. If A contains
+*> a matrix stored in GE, HE, or SY format, then this is just
+*> the leading dimension of A as dimensioned in the calling
+*> routine. If A contains a matrix stored in band (GB, HB, or
+*> SB) format, then this should be *one less* than the leading
+*> dimension used in the calling routine. Thus, if A were
+*> dimensioned A(LDA,*) in CLAROT, then A(1,j) would be the
+*> j-th element in the first of the two rows to be rotated,
+*> and A(2,j) would be the j-th in the second, regardless of
+*> how the array may be stored in the calling routine. [A
+*> cannot, however, actually be dimensioned thus, since for
+*> band format, the row number may exceed LDA, which is not
+*> legal FORTRAN.]
+*> If LROWS=.TRUE., then LDA must be at least 1, otherwise
+*> it must be at least NL minus the number of .TRUE. values
+*> in XLEFT and XRIGHT.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> XLEFT - COMPLEX
+*> If LLEFT is .TRUE., then XLEFT will be used and modified
+*> instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
+*> (if LROWS=.FALSE.).
+*> Read and modified.
+*> \endverbatim
+*> \verbatim
+*> XRIGHT - COMPLEX
+*> If LRIGHT is .TRUE., then XRIGHT will be used and modified
+*> instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
+*> (if LROWS=.FALSE.).
+*> Read and modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
SUBROUTINE CLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
$ XRIGHT )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LLEFT, LRIGHT, LROWS
@@ -14,193 +253,6 @@
COMPLEX A( * )
* ..
*
-* Purpose
-* =======
-*
-* CLAROT applies a (Givens) rotation to two adjacent rows or
-* columns, where one element of the first and/or last column/row
-* for use on matrices stored in some format other than GE, so
-* that elements of the matrix may be used or modified for which
-* no array element is provided.
-*
-* One example is a symmetric matrix in SB format (bandwidth=4), for
-* which UPLO='L': Two adjacent rows will have the format:
-*
-* row j: * * * * * . . . .
-* row j+1: * * * * * . . . .
-*
-* '*' indicates elements for which storage is provided,
-* '.' indicates elements for which no storage is provided, but
-* are not necessarily zero; their values are determined by
-* symmetry. ' ' indicates elements which are necessarily zero,
-* and have no storage provided.
-*
-* Those columns which have two '*'s can be handled by SROT.
-* Those columns which have no '*'s can be ignored, since as long
-* as the Givens rotations are carefully applied to preserve
-* symmetry, their values are determined.
-* Those columns which have one '*' have to be handled separately,
-* by using separate variables "p" and "q":
-*
-* row j: * * * * * p . . .
-* row j+1: q * * * * * . . . .
-*
-* The element p would have to be set correctly, then that column
-* is rotated, setting p to its new value. The next call to
-* CLAROT would rotate columns j and j+1, using p, and restore
-* symmetry. The element q would start out being zero, and be
-* made non-zero by the rotation. Later, rotations would presumably
-* be chosen to zero q out.
-*
-* Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
-* ------- ------- ---------
-*
-* General dense matrix:
-*
-* CALL CLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
-* A(i,1),LDA, DUMMY, DUMMY)
-*
-* General banded matrix in GB format:
-*
-* j = MAX(1, i-KL )
-* NL = MIN( N, i+KU+1 ) + 1-j
-* CALL CLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
-* A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
-*
-* [ note that i+1-j is just MIN(i,KL+1) ]
-*
-* Symmetric banded matrix in SY format, bandwidth K,
-* lower triangle only:
-*
-* j = MAX(1, i-K )
-* NL = MIN( K+1, i ) + 1
-* CALL CLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
-* A(i,j), LDA, XLEFT, XRIGHT )
-*
-* Same, but upper triangle only:
-*
-* NL = MIN( K+1, N-i ) + 1
-* CALL CLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
-* A(i,i), LDA, XLEFT, XRIGHT )
-*
-* Symmetric banded matrix in SB format, bandwidth K,
-* lower triangle only:
-*
-* [ same as for SY, except:]
-* . . . .
-* A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
-*
-* [ note that i+1-j is just MIN(i,K+1) ]
-*
-* Same, but upper triangle only:
-* . . .
-* A(K+1,i), LDA-1, XLEFT, XRIGHT )
-*
-* Rotating columns is just the transpose of rotating rows, except
-* for GB and SB: (rotating columns i and i+1)
-*
-* GB:
-* j = MAX(1, i-KU )
-* NL = MIN( N, i+KL+1 ) + 1-j
-* CALL CLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
-* A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
-*
-* [note that KU+j+1-i is just MAX(1,KU+2-i)]
-*
-* SB: (upper triangle)
-*
-* . . . . . .
-* A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
-*
-* SB: (lower triangle)
-*
-* . . . . . .
-* A(1,i),LDA-1, XTOP, XBOTTM )
-*
-* Arguments
-* =========
-*
-* LROWS - LOGICAL
-* If .TRUE., then CLAROT will rotate two rows. If .FALSE.,
-* then it will rotate two columns.
-* Not modified.
-*
-* LLEFT - LOGICAL
-* If .TRUE., then XLEFT will be used instead of the
-* corresponding element of A for the first element in the
-* second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
-* If .FALSE., then the corresponding element of A will be
-* used.
-* Not modified.
-*
-* LRIGHT - LOGICAL
-* If .TRUE., then XRIGHT will be used instead of the
-* corresponding element of A for the last element in the
-* first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
-* .FALSE., then the corresponding element of A will be used.
-* Not modified.
-*
-* NL - INTEGER
-* The length of the rows (if LROWS=.TRUE.) or columns (if
-* LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
-* used, the columns/rows they are in should be included in
-* NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
-* least 2. The number of rows/columns to be rotated
-* exclusive of those involving XLEFT and/or XRIGHT may
-* not be negative, i.e., NL minus how many of LLEFT and
-* LRIGHT are .TRUE. must be at least zero; if not, XERBLA
-* will be called.
-* Not modified.
-*
-* C, S - COMPLEX
-* Specify the Givens rotation to be applied. If LROWS is
-* true, then the matrix ( c s )
-* ( _ _ )
-* (-s c ) is applied from the left;
-* if false, then the transpose (not conjugated) thereof is
-* applied from the right. Note that in contrast to the
-* output of CROTG or to most versions of CROT, both C and S
-* are complex. For a Givens rotation, |C|**2 + |S|**2 should
-* be 1, but this is not checked.
-* Not modified.
-*
-* A - COMPLEX array.
-* The array containing the rows/columns to be rotated. The
-* first element of A should be the upper left element to
-* be rotated.
-* Read and modified.
-*
-* LDA - INTEGER
-* The "effective" leading dimension of A. If A contains
-* a matrix stored in GE, HE, or SY format, then this is just
-* the leading dimension of A as dimensioned in the calling
-* routine. If A contains a matrix stored in band (GB, HB, or
-* SB) format, then this should be *one less* than the leading
-* dimension used in the calling routine. Thus, if A were
-* dimensioned A(LDA,*) in CLAROT, then A(1,j) would be the
-* j-th element in the first of the two rows to be rotated,
-* and A(2,j) would be the j-th in the second, regardless of
-* how the array may be stored in the calling routine. [A
-* cannot, however, actually be dimensioned thus, since for
-* band format, the row number may exceed LDA, which is not
-* legal FORTRAN.]
-* If LROWS=.TRUE., then LDA must be at least 1, otherwise
-* it must be at least NL minus the number of .TRUE. values
-* in XLEFT and XRIGHT.
-* Not modified.
-*
-* XLEFT - COMPLEX
-* If LLEFT is .TRUE., then XLEFT will be used and modified
-* instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
-* (if LROWS=.FALSE.).
-* Read and modified.
-*
-* XRIGHT - COMPLEX
-* If LRIGHT is .TRUE., then XRIGHT will be used and modified
-* instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
-* (if LROWS=.FALSE.).
-* Read and modified.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/TESTING/MATGEN/clatm1.f b/TESTING/MATGEN/clatm1.f
index 6d5bc37c..86ea9370 100644
--- a/TESTING/MATGEN/clatm1.f
+++ b/TESTING/MATGEN/clatm1.f
@@ -1,8 +1,148 @@
+*> \brief \b CLATM1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATM1( MODE, COND, IRSIGN, IDIST, ISEED, D, N, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, INFO, IRSIGN, MODE, N
+* REAL COND
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX D( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATM1 computes the entries of D(1..N) as specified by
+*> MODE, COND and IRSIGN. IDIST and ISEED determine the generation
+*> of random numbers. CLATM1 is called by CLATMR to generate
+*> random test matrices for LAPACK programs.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry describes how D is to be computed:
+*> MODE = 0 means do not change D.
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IRSIGN
+*> \verbatim
+*> IRSIGN is INTEGER
+*> On entry, if MODE neither -6, 0 nor 6, determines sign of
+*> entries of D
+*> 0 => leave entries of D unchanged
+*> 1 => multiply each entry of D by random complex number
+*> uniformly distributed with absolute value 1
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is CHARACTER*1
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => real and imaginary parts each UNIFORM( 0, 1 )
+*> 2 => real and imaginary parts each UNIFORM( -1, 1 )
+*> 3 => real and imaginary parts each NORMAL( 0, 1 )
+*> 4 => complex number uniform in DISK( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. The random number generator uses a
+*> linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to CLATM1
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX array, dimension ( MIN( M , N ) )
+*> Array to be computed according to MODE, COND and IRSIGN.
+*> May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of entries of D. Not modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 => normal termination
+*> -1 => if MODE not in range -6 to 6
+*> -2 => if MODE neither -6, 0 nor 6, and
+*> IRSIGN neither 0 nor 1
+*> -3 => if MODE neither -6, 0 nor 6 and COND less than 1
+*> -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 4
+*> -7 => if N negative
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
SUBROUTINE CLATM1( MODE, COND, IRSIGN, IDIST, ISEED, D, N, INFO )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IDIST, INFO, IRSIGN, MODE, N
@@ -13,81 +153,6 @@
COMPLEX D( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATM1 computes the entries of D(1..N) as specified by
-* MODE, COND and IRSIGN. IDIST and ISEED determine the generation
-* of random numbers. CLATM1 is called by CLATMR to generate
-* random test matrices for LAPACK programs.
-*
-* Arguments
-* =========
-*
-* MODE (input) INTEGER
-* On entry describes how D is to be computed:
-* MODE = 0 means do not change D.
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND (input) REAL
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* IRSIGN (input) INTEGER
-* On entry, if MODE neither -6, 0 nor 6, determines sign of
-* entries of D
-* 0 => leave entries of D unchanged
-* 1 => multiply each entry of D by random complex number
-* uniformly distributed with absolute value 1
-*
-* IDIST (input) CHARACTER*1
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => real and imaginary parts each UNIFORM( 0, 1 )
-* 2 => real and imaginary parts each UNIFORM( -1, 1 )
-* 3 => real and imaginary parts each NORMAL( 0, 1 )
-* 4 => complex number uniform in DISK( 0, 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. The random number generator uses a
-* linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to CLATM1
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D (input/output) COMPLEX array, dimension ( MIN( M , N ) )
-* Array to be computed according to MODE, COND and IRSIGN.
-* May be changed on exit if MODE is nonzero.
-*
-* N (input) INTEGER
-* Number of entries of D. Not modified.
-*
-* INFO (output) INTEGER
-* 0 => normal termination
-* -1 => if MODE not in range -6 to 6
-* -2 => if MODE neither -6, 0 nor 6, and
-* IRSIGN neither 0 nor 1
-* -3 => if MODE neither -6, 0 nor 6 and COND less than 1
-* -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 4
-* -7 => if N negative
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/clatm2.f b/TESTING/MATGEN/clatm2.f
index 310a55bc..76e053bf 100644
--- a/TESTING/MATGEN/clatm2.f
+++ b/TESTING/MATGEN/clatm2.f
@@ -1,9 +1,223 @@
+*> \brief \b CLATM2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* COMPLEX FUNCTION CLATM2( M, N, I, J, KL, KU, IDIST, ISEED, D,
+* IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
+*
+* .. Scalar Arguments ..
+*
+* INTEGER I, IDIST, IGRADE, IPVTNG, J, KL, KU, M, N
+* REAL SPARSE
+* ..
+*
+* .. Array Arguments ..
+*
+* INTEGER ISEED( 4 ), IWORK( * )
+* COMPLEX D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATM2 returns the (I,J) entry of a random matrix of dimension
+*> (M, N) described by the other paramters. It is called by the
+*> CLATMR routine in order to build random test matrices. No error
+*> checking on parameters is done, because this routine is called in
+*> a tight loop by CLATMR which has already checked the parameters.
+*>
+*> Use of CLATM2 differs from CLATM3 in the order in which the random
+*> number generator is called to fill in random matrix entries.
+*> With CLATM2, the generator is called to fill in the pivoted matrix
+*> columnwise. With CLATM3, the generator is called to fill in the
+*> matrix columnwise, after which it is pivoted. Thus, CLATM3 can
+*> be used to construct random matrices which differ only in their
+*> order of rows and/or columns. CLATM2 is used to construct band
+*> matrices while avoiding calling the random number generator for
+*> entries outside the band (and therefore generating random numbers
+*>
+*> The matrix whose (I,J) entry is returned is constructed as
+*> follows (this routine only computes one entry):
+*>
+*> If I is outside (1..M) or J is outside (1..N), return zero
+*> (this is convenient for generating matrices in band format).
+*>
+*> Generate a matrix A with random entries of distribution IDIST.
+*>
+*> Set the diagonal to D.
+*>
+*> Grade the matrix, if desired, from the left (by DL) and/or
+*> from the right (by DR or DL) as specified by IGRADE.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> IPVTNG and IWORK.
+*>
+*> Band the matrix to have lower bandwidth KL and upper
+*> bandwidth KU.
+*>
+*> Set random entries to zero as specified by SPARSE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> Row of entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Column of entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Lower bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Upper bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => real and imaginary parts each UNIFORM( 0, 1 )
+*> 2 => real and imaginary parts each UNIFORM( -1, 1 )
+*> 3 => real and imaginary parts each NORMAL( 0, 1 )
+*> 4 => complex number uniform in DISK( 0 , 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array of dimension ( 4 )
+*> Seed for random number generator.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array of dimension ( MIN( I , J ) )
+*> Diagonal entries of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IGRADE
+*> \verbatim
+*> IGRADE is INTEGER
+*> Specifies grading of matrix as follows:
+*> 0 => no grading
+*> 1 => matrix premultiplied by diag( DL )
+*> 2 => matrix postmultiplied by diag( DR )
+*> 3 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> 4 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> 5 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( CONJG(DL) )
+*> 6 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array ( I or J, as appropriate )
+*> Left scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DR
+*> \verbatim
+*> DR is COMPLEX array ( I or J, as appropriate )
+*> Right scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IPVTNG
+*> \verbatim
+*> IPVTNG is INTEGER
+*> On entry specifies pivoting permutations as follows:
+*> 0 => none.
+*> 1 => row pivoting.
+*> 2 => column pivoting.
+*> 3 => full pivoting, i.e., on both sides.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array ( I or J, as appropriate )
+*> This array specifies the permutation used. The
+*> row (or column) in position K was originally in
+*> position IWORK( K ).
+*> This differs from IWORK for CLATM3. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is REAL
+*> Value between 0. and 1.
+*> On entry specifies the sparsity of the matrix
+*> if sparse matix is to be generated.
+*> SPARSE should lie between 0 and 1.
+*> A uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
COMPLEX FUNCTION CLATM2( M, N, I, J, KL, KU, IDIST, ISEED, D,
$ IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
*
@@ -17,130 +231,6 @@
COMPLEX D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATM2 returns the (I,J) entry of a random matrix of dimension
-* (M, N) described by the other paramters. It is called by the
-* CLATMR routine in order to build random test matrices. No error
-* checking on parameters is done, because this routine is called in
-* a tight loop by CLATMR which has already checked the parameters.
-*
-* Use of CLATM2 differs from CLATM3 in the order in which the random
-* number generator is called to fill in random matrix entries.
-* With CLATM2, the generator is called to fill in the pivoted matrix
-* columnwise. With CLATM3, the generator is called to fill in the
-* matrix columnwise, after which it is pivoted. Thus, CLATM3 can
-* be used to construct random matrices which differ only in their
-* order of rows and/or columns. CLATM2 is used to construct band
-* matrices while avoiding calling the random number generator for
-* entries outside the band (and therefore generating random numbers
-*
-* The matrix whose (I,J) entry is returned is constructed as
-* follows (this routine only computes one entry):
-*
-* If I is outside (1..M) or J is outside (1..N), return zero
-* (this is convenient for generating matrices in band format).
-*
-* Generate a matrix A with random entries of distribution IDIST.
-*
-* Set the diagonal to D.
-*
-* Grade the matrix, if desired, from the left (by DL) and/or
-* from the right (by DR or DL) as specified by IGRADE.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* IPVTNG and IWORK.
-*
-* Band the matrix to have lower bandwidth KL and upper
-* bandwidth KU.
-*
-* Set random entries to zero as specified by SPARSE.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of matrix. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of matrix. Not modified.
-*
-* I (input) INTEGER
-* Row of entry to be returned. Not modified.
-*
-* J (input) INTEGER
-* Column of entry to be returned. Not modified.
-*
-* KL (input) INTEGER
-* Lower bandwidth. Not modified.
-*
-* KU (input) INTEGER
-* Upper bandwidth. Not modified.
-*
-* IDIST (input) INTEGER
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => real and imaginary parts each UNIFORM( 0, 1 )
-* 2 => real and imaginary parts each UNIFORM( -1, 1 )
-* 3 => real and imaginary parts each NORMAL( 0, 1 )
-* 4 => complex number uniform in DISK( 0 , 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array of dimension ( 4 )
-* Seed for random number generator.
-* Changed on exit.
-*
-* D (input) COMPLEX array of dimension ( MIN( I , J ) )
-* Diagonal entries of matrix. Not modified.
-*
-* IGRADE (input) INTEGER
-* Specifies grading of matrix as follows:
-* 0 => no grading
-* 1 => matrix premultiplied by diag( DL )
-* 2 => matrix postmultiplied by diag( DR )
-* 3 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* 4 => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* 5 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( CONJG(DL) )
-* 6 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* Not modified.
-*
-* DL (input) COMPLEX array ( I or J, as appropriate )
-* Left scale factors for grading matrix. Not modified.
-*
-* DR (input) COMPLEX array ( I or J, as appropriate )
-* Right scale factors for grading matrix. Not modified.
-*
-* IPVTNG (input) INTEGER
-* On entry specifies pivoting permutations as follows:
-* 0 => none.
-* 1 => row pivoting.
-* 2 => column pivoting.
-* 3 => full pivoting, i.e., on both sides.
-* Not modified.
-*
-* IWORK (workspace) INTEGER array ( I or J, as appropriate )
-* This array specifies the permutation used. The
-* row (or column) in position K was originally in
-* position IWORK( K ).
-* This differs from IWORK for CLATM3. Not modified.
-*
-* SPARSE (input) REAL
-* Value between 0. and 1.
-* On entry specifies the sparsity of the matrix
-* if sparse matix is to be generated.
-* SPARSE should lie between 0 and 1.
-* A uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/clatm3.f b/TESTING/MATGEN/clatm3.f
index c0354411..f2d9782a 100644
--- a/TESTING/MATGEN/clatm3.f
+++ b/TESTING/MATGEN/clatm3.f
@@ -1,10 +1,240 @@
+*> \brief \b CLATM3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* COMPLEX FUNCTION CLATM3( M, N, I, J, ISUB, JSUB, KL, KU, IDIST,
+* ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK,
+* SPARSE )
+*
+* .. Scalar Arguments ..
+*
+* INTEGER I, IDIST, IGRADE, IPVTNG, ISUB, J, JSUB, KL,
+* $ KU, M, N
+* REAL SPARSE
+* ..
+*
+* .. Array Arguments ..
+*
+* INTEGER ISEED( 4 ), IWORK( * )
+* COMPLEX D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATM3 returns the (ISUB,JSUB) entry of a random matrix of
+*> dimension (M, N) described by the other paramters. (ISUB,JSUB)
+*> is the final position of the (I,J) entry after pivoting
+*> according to IPVTNG and IWORK. CLATM3 is called by the
+*> CLATMR routine in order to build random test matrices. No error
+*> checking on parameters is done, because this routine is called in
+*> a tight loop by CLATMR which has already checked the parameters.
+*>
+*> Use of CLATM3 differs from CLATM2 in the order in which the random
+*> number generator is called to fill in random matrix entries.
+*> With CLATM2, the generator is called to fill in the pivoted matrix
+*> columnwise. With CLATM3, the generator is called to fill in the
+*> matrix columnwise, after which it is pivoted. Thus, CLATM3 can
+*> be used to construct random matrices which differ only in their
+*> order of rows and/or columns. CLATM2 is used to construct band
+*> matrices while avoiding calling the random number generator for
+*> entries outside the band (and therefore generating random numbers
+*> in different orders for different pivot orders).
+*>
+*> The matrix whose (ISUB,JSUB) entry is returned is constructed as
+*> follows (this routine only computes one entry):
+*>
+*> If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
+*> (this is convenient for generating matrices in band format).
+*>
+*> Generate a matrix A with random entries of distribution IDIST.
+*>
+*> Set the diagonal to D.
+*>
+*> Grade the matrix, if desired, from the left (by DL) and/or
+*> from the right (by DR or DL) as specified by IGRADE.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> IPVTNG and IWORK.
+*>
+*> Band the matrix to have lower bandwidth KL and upper
+*> bandwidth KU.
+*>
+*> Set random entries to zero as specified by SPARSE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> Row of unpivoted entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Column of unpivoted entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISUB
+*> \verbatim
+*> ISUB is INTEGER
+*> Row of pivoted entry to be returned. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] JSUB
+*> \verbatim
+*> JSUB is INTEGER
+*> Column of pivoted entry to be returned. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Lower bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Upper bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => real and imaginary parts each UNIFORM( 0, 1 )
+*> 2 => real and imaginary parts each UNIFORM( -1, 1 )
+*> 3 => real and imaginary parts each NORMAL( 0, 1 )
+*> 4 => complex number uniform in DISK( 0 , 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array of dimension ( 4 )
+*> Seed for random number generator.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX array of dimension ( MIN( I , J ) )
+*> Diagonal entries of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IGRADE
+*> \verbatim
+*> IGRADE is INTEGER
+*> Specifies grading of matrix as follows:
+*> 0 => no grading
+*> 1 => matrix premultiplied by diag( DL )
+*> 2 => matrix postmultiplied by diag( DR )
+*> 3 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> 4 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> 5 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( CONJG(DL) )
+*> 6 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX array ( I or J, as appropriate )
+*> Left scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DR
+*> \verbatim
+*> DR is COMPLEX array ( I or J, as appropriate )
+*> Right scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IPVTNG
+*> \verbatim
+*> IPVTNG is INTEGER
+*> On entry specifies pivoting permutations as follows:
+*> 0 => none.
+*> 1 => row pivoting.
+*> 2 => column pivoting.
+*> 3 => full pivoting, i.e., on both sides.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array ( I or J, as appropriate )
+*> This array specifies the permutation used. The
+*> row (or column) originally in position K is in
+*> position IWORK( K ) after pivoting.
+*> This differs from IWORK for CLATM2. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is REAL between 0. and 1.
+*> On entry specifies the sparsity of the matrix
+*> if sparse matix is to be generated.
+*> SPARSE should lie between 0 and 1.
+*> A uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
COMPLEX FUNCTION CLATM3( M, N, I, J, ISUB, JSUB, KL, KU, IDIST,
$ ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK,
$ SPARSE )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
*
@@ -19,138 +249,6 @@
COMPLEX D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATM3 returns the (ISUB,JSUB) entry of a random matrix of
-* dimension (M, N) described by the other paramters. (ISUB,JSUB)
-* is the final position of the (I,J) entry after pivoting
-* according to IPVTNG and IWORK. CLATM3 is called by the
-* CLATMR routine in order to build random test matrices. No error
-* checking on parameters is done, because this routine is called in
-* a tight loop by CLATMR which has already checked the parameters.
-*
-* Use of CLATM3 differs from CLATM2 in the order in which the random
-* number generator is called to fill in random matrix entries.
-* With CLATM2, the generator is called to fill in the pivoted matrix
-* columnwise. With CLATM3, the generator is called to fill in the
-* matrix columnwise, after which it is pivoted. Thus, CLATM3 can
-* be used to construct random matrices which differ only in their
-* order of rows and/or columns. CLATM2 is used to construct band
-* matrices while avoiding calling the random number generator for
-* entries outside the band (and therefore generating random numbers
-* in different orders for different pivot orders).
-*
-* The matrix whose (ISUB,JSUB) entry is returned is constructed as
-* follows (this routine only computes one entry):
-*
-* If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
-* (this is convenient for generating matrices in band format).
-*
-* Generate a matrix A with random entries of distribution IDIST.
-*
-* Set the diagonal to D.
-*
-* Grade the matrix, if desired, from the left (by DL) and/or
-* from the right (by DR or DL) as specified by IGRADE.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* IPVTNG and IWORK.
-*
-* Band the matrix to have lower bandwidth KL and upper
-* bandwidth KU.
-*
-* Set random entries to zero as specified by SPARSE.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of matrix. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of matrix. Not modified.
-*
-* I (input) INTEGER
-* Row of unpivoted entry to be returned. Not modified.
-*
-* J (input) INTEGER
-* Column of unpivoted entry to be returned. Not modified.
-*
-* ISUB (input/output) INTEGER
-* Row of pivoted entry to be returned. Changed on exit.
-*
-* JSUB (input/output) INTEGER
-* Column of pivoted entry to be returned. Changed on exit.
-*
-* KL (input) INTEGER
-* Lower bandwidth. Not modified.
-*
-* KU (input) INTEGER
-* Upper bandwidth. Not modified.
-*
-* IDIST (input) INTEGER
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => real and imaginary parts each UNIFORM( 0, 1 )
-* 2 => real and imaginary parts each UNIFORM( -1, 1 )
-* 3 => real and imaginary parts each NORMAL( 0, 1 )
-* 4 => complex number uniform in DISK( 0 , 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array of dimension ( 4 )
-* Seed for random number generator.
-* Changed on exit.
-*
-* D (input) COMPLEX array of dimension ( MIN( I , J ) )
-* Diagonal entries of matrix. Not modified.
-*
-* IGRADE (input) INTEGER
-* Specifies grading of matrix as follows:
-* 0 => no grading
-* 1 => matrix premultiplied by diag( DL )
-* 2 => matrix postmultiplied by diag( DR )
-* 3 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* 4 => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* 5 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( CONJG(DL) )
-* 6 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* Not modified.
-*
-* DL (input) COMPLEX array ( I or J, as appropriate )
-* Left scale factors for grading matrix. Not modified.
-*
-* DR (input) COMPLEX array ( I or J, as appropriate )
-* Right scale factors for grading matrix. Not modified.
-*
-* IPVTNG (input) INTEGER
-* On entry specifies pivoting permutations as follows:
-* 0 => none.
-* 1 => row pivoting.
-* 2 => column pivoting.
-* 3 => full pivoting, i.e., on both sides.
-* Not modified.
-*
-* IWORK (input) INTEGER array ( I or J, as appropriate )
-* This array specifies the permutation used. The
-* row (or column) originally in position K is in
-* position IWORK( K ) after pivoting.
-* This differs from IWORK for CLATM2. Not modified.
-*
-* SPARSE (input) REAL between 0. and 1.
-* On entry specifies the sparsity of the matrix
-* if sparse matix is to be generated.
-* SPARSE should lie between 0 and 1.
-* A uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/clatm5.f b/TESTING/MATGEN/clatm5.f
index 8fcc6006..b49e5c91 100644
--- a/TESTING/MATGEN/clatm5.f
+++ b/TESTING/MATGEN/clatm5.f
@@ -1,177 +1,292 @@
- SUBROUTINE CLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
- $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
- $ QBLCKB )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
- $ PRTYPE, QBLCKA, QBLCKB
- REAL ALPHA
-* ..
-* .. Array Arguments ..
- COMPLEX A( LDA, * ), B( LDB, * ), C( LDC, * ),
- $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
- $ L( LDL, * ), R( LDR, * )
-* ..
-*
+*> \brief \b CLATM5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
+* E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
+* QBLCKB )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
+* $ PRTYPE, QBLCKA, QBLCKB
+* REAL ALPHA
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+* $ L( LDL, * ), R( LDR, * )
+* ..
+*
* Purpose
* =======
*
-* CLATM5 generates matrices involved in the Generalized Sylvester
-* equation:
-*
-* A * R - L * B = C
-* D * R - L * E = F
-*
-* They also satisfy (the diagonalization condition)
-*
-* [ I -L ] ( [ A -C ], [ D -F ] ) [ I R ] = ( [ A ], [ D ] )
-* [ I ] ( [ B ] [ E ] ) [ I ] ( [ B ] [ E ] )
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATM5 generates matrices involved in the Generalized Sylvester
+*> equation:
+*>
+*> A * R - L * B = C
+*> D * R - L * E = F
+*>
+*> They also satisfy (the diagonalization condition)
+*>
+*> [ I -L ] ( [ A -C ], [ D -F ] ) [ I R ] = ( [ A ], [ D ] )
+*> [ I ] ( [ B ] [ E ] ) [ I ] ( [ B ] [ E ] )
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PRTYPE (input) INTEGER
-* "Points" to a certian type of the matrices to generate
-* (see futher details).
-*
-* M (input) INTEGER
-* Specifies the order of A and D and the number of rows in
-* C, F, R and L.
-*
-* N (input) INTEGER
-* Specifies the order of B and E and the number of columns in
-* C, F, R and L.
-*
-* A (output) COMPLEX array, dimension (LDA, M).
-* On exit A M-by-M is initialized according to PRTYPE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A.
-*
-* B (output) COMPLEX array, dimension (LDB, N).
-* On exit B N-by-N is initialized according to PRTYPE.
-*
-* LDB (input) INTEGER
-* The leading dimension of B.
-*
-* C (output) COMPLEX array, dimension (LDC, N).
-* On exit C M-by-N is initialized according to PRTYPE.
-*
-* LDC (input) INTEGER
-* The leading dimension of C.
-*
-* D (output) COMPLEX array, dimension (LDD, M).
-* On exit D M-by-M is initialized according to PRTYPE.
-*
-* LDD (input) INTEGER
-* The leading dimension of D.
-*
-* E (output) COMPLEX array, dimension (LDE, N).
-* On exit E N-by-N is initialized according to PRTYPE.
-*
-* LDE (input) INTEGER
-* The leading dimension of E.
-*
-* F (output) COMPLEX array, dimension (LDF, N).
-* On exit F M-by-N is initialized according to PRTYPE.
-*
-* LDF (input) INTEGER
-* The leading dimension of F.
-*
-* R (output) COMPLEX array, dimension (LDR, N).
-* On exit R M-by-N is initialized according to PRTYPE.
-*
-* LDR (input) INTEGER
-* The leading dimension of R.
-*
-* L (output) COMPLEX array, dimension (LDL, N).
-* On exit L M-by-N is initialized according to PRTYPE.
-*
-* LDL (input) INTEGER
-* The leading dimension of L.
+*> \param[in] PRTYPE
+*> \verbatim
+*> PRTYPE is INTEGER
+*> "Points" to a certian type of the matrices to generate
+*> (see futher details).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Specifies the order of A and D and the number of rows in
+*> C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Specifies the order of B and E and the number of columns in
+*> C, F, R and L.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, M).
+*> On exit A M-by-M is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDB, N).
+*> On exit B N-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX array, dimension (LDC, N).
+*> On exit C M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of C.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is COMPLEX array, dimension (LDD, M).
+*> On exit D M-by-M is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of D.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is COMPLEX array, dimension (LDE, N).
+*> On exit E N-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of E.
+*> \endverbatim
+*>
+*> \param[out] F
+*> \verbatim
+*> F is COMPLEX array, dimension (LDF, N).
+*> On exit F M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of F.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX array, dimension (LDR, N).
+*> On exit R M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDR
+*> \verbatim
+*> LDR is INTEGER
+*> The leading dimension of R.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX array, dimension (LDL, N).
+*> On exit L M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDL
+*> \verbatim
+*> LDL is INTEGER
+*> The leading dimension of L.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> Parameter used in generating PRTYPE = 1 and 5 matrices.
+*> \endverbatim
+*>
+*> \param[in] QBLCKA
+*> \verbatim
+*> QBLCKA is INTEGER
+*> When PRTYPE = 3, specifies the distance between 2-by-2
+*> blocks on the diagonal in A. Otherwise, QBLCKA is not
+*> referenced. QBLCKA > 1.
+*> \endverbatim
+*>
+*> \param[in] QBLCKB
+*> \verbatim
+*> QBLCKB is INTEGER
+*> When PRTYPE = 3, specifies the distance between 2-by-2
+*> blocks on the diagonal in B. Otherwise, QBLCKB is not
+*> referenced. QBLCKB > 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) REAL
-* Parameter used in generating PRTYPE = 1 and 5 matrices.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* QBLCKA (input) INTEGER
-* When PRTYPE = 3, specifies the distance between 2-by-2
-* blocks on the diagonal in A. Otherwise, QBLCKA is not
-* referenced. QBLCKA > 1.
+*> \date November 2011
*
-* QBLCKB (input) INTEGER
-* When PRTYPE = 3, specifies the distance between 2-by-2
-* blocks on the diagonal in B. Otherwise, QBLCKB is not
-* referenced. QBLCKB > 1.
+*> \ingroup complex_matgen
*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> PRTYPE = 1: A and B are Jordan blocks, D and E are identity matrices
+*>
+*> A : if (i == j) then A(i, j) = 1.0
+*> if (j == i + 1) then A(i, j) = -1.0
+*> else A(i, j) = 0.0, i, j = 1...M
+*>
+*> B : if (i == j) then B(i, j) = 1.0 - ALPHA
+*> if (j == i + 1) then B(i, j) = 1.0
+*> else B(i, j) = 0.0, i, j = 1...N
+*>
+*> D : if (i == j) then D(i, j) = 1.0
+*> else D(i, j) = 0.0, i, j = 1...M
+*>
+*> E : if (i == j) then E(i, j) = 1.0
+*> else E(i, j) = 0.0, i, j = 1...N
+*>
+*> L = R are chosen from [-10...10],
+*> which specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 2 or 3: Triangular and/or quasi- triangular.
+*>
+*> A : if (i <= j) then A(i, j) = [-1...1]
+*> else A(i, j) = 0.0, i, j = 1...M
+*>
+*> if (PRTYPE = 3) then
+*> A(k + 1, k + 1) = A(k, k)
+*> A(k + 1, k) = [-1...1]
+*> sign(A(k, k + 1) = -(sin(A(k + 1, k))
+*> k = 1, M - 1, QBLCKA
+*>
+*> B : if (i <= j) then B(i, j) = [-1...1]
+*> else B(i, j) = 0.0, i, j = 1...N
+*>
+*> if (PRTYPE = 3) then
+*> B(k + 1, k + 1) = B(k, k)
+*> B(k + 1, k) = [-1...1]
+*> sign(B(k, k + 1) = -(sign(B(k + 1, k))
+*> k = 1, N - 1, QBLCKB
+*>
+*> D : if (i <= j) then D(i, j) = [-1...1].
+*> else D(i, j) = 0.0, i, j = 1...M
+*>
+*>
+*> E : if (i <= j) then D(i, j) = [-1...1]
+*> else E(i, j) = 0.0, i, j = 1...N
+*>
+*> L, R are chosen from [-10...10],
+*> which specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 4 Full
+*> A(i, j) = [-10...10]
+*> D(i, j) = [-1...1] i,j = 1...M
+*> B(i, j) = [-10...10]
+*> E(i, j) = [-1...1] i,j = 1...N
+*> R(i, j) = [-10...10]
+*> L(i, j) = [-1...1] i = 1..M ,j = 1...N
+*>
+*> L, R specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 5 special case common and/or close eigs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE CLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
+ $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
+ $ QBLCKB )
*
-* PRTYPE = 1: A and B are Jordan blocks, D and E are identity matrices
-*
-* A : if (i == j) then A(i, j) = 1.0
-* if (j == i + 1) then A(i, j) = -1.0
-* else A(i, j) = 0.0, i, j = 1...M
-*
-* B : if (i == j) then B(i, j) = 1.0 - ALPHA
-* if (j == i + 1) then B(i, j) = 1.0
-* else B(i, j) = 0.0, i, j = 1...N
-*
-* D : if (i == j) then D(i, j) = 1.0
-* else D(i, j) = 0.0, i, j = 1...M
-*
-* E : if (i == j) then E(i, j) = 1.0
-* else E(i, j) = 0.0, i, j = 1...N
-*
-* L = R are chosen from [-10...10],
-* which specifies the right hand sides (C, F).
-*
-* PRTYPE = 2 or 3: Triangular and/or quasi- triangular.
-*
-* A : if (i <= j) then A(i, j) = [-1...1]
-* else A(i, j) = 0.0, i, j = 1...M
-*
-* if (PRTYPE = 3) then
-* A(k + 1, k + 1) = A(k, k)
-* A(k + 1, k) = [-1...1]
-* sign(A(k, k + 1) = -(sin(A(k + 1, k))
-* k = 1, M - 1, QBLCKA
-*
-* B : if (i <= j) then B(i, j) = [-1...1]
-* else B(i, j) = 0.0, i, j = 1...N
-*
-* if (PRTYPE = 3) then
-* B(k + 1, k + 1) = B(k, k)
-* B(k + 1, k) = [-1...1]
-* sign(B(k, k + 1) = -(sign(B(k + 1, k))
-* k = 1, N - 1, QBLCKB
-*
-* D : if (i <= j) then D(i, j) = [-1...1].
-* else D(i, j) = 0.0, i, j = 1...M
-*
-*
-* E : if (i <= j) then D(i, j) = [-1...1]
-* else E(i, j) = 0.0, i, j = 1...N
-*
-* L, R are chosen from [-10...10],
-* which specifies the right hand sides (C, F).
-*
-* PRTYPE = 4 Full
-* A(i, j) = [-10...10]
-* D(i, j) = [-1...1] i,j = 1...M
-* B(i, j) = [-10...10]
-* E(i, j) = [-1...1] i,j = 1...N
-* R(i, j) = [-10...10]
-* L(i, j) = [-1...1] i = 1..M ,j = 1...N
-*
-* L, R specifies the right hand sides (C, F).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* PRTYPE = 5 special case common and/or close eigs.
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
+ $ PRTYPE, QBLCKA, QBLCKB
+ REAL ALPHA
+* ..
+* .. Array Arguments ..
+ COMPLEX A( LDA, * ), B( LDB, * ), C( LDC, * ),
+ $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+ $ L( LDL, * ), R( LDR, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/clatm6.f b/TESTING/MATGEN/clatm6.f
index 5780b607..72ba4e22 100644
--- a/TESTING/MATGEN/clatm6.f
+++ b/TESTING/MATGEN/clatm6.f
@@ -1,106 +1,196 @@
- SUBROUTINE CLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
- $ BETA, WX, WY, S, DIF )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDX, LDY, N, TYPE
- COMPLEX ALPHA, BETA, WX, WY
-* ..
-* .. Array Arguments ..
- REAL DIF( * ), S( * )
- COMPLEX A( LDA, * ), B( LDA, * ), X( LDX, * ),
- $ Y( LDY, * )
-* ..
-*
+*> \brief \b CLATM6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
+* BETA, WX, WY, S, DIF )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDX, LDY, N, TYPE
+* COMPLEX ALPHA, BETA, WX, WY
+* ..
+* .. Array Arguments ..
+* REAL DIF( * ), S( * )
+* COMPLEX A( LDA, * ), B( LDA, * ), X( LDX, * ),
+* $ Y( LDY, * )
+* ..
+*
* Purpose
* =======
*
-* CLATM6 generates test matrices for the generalized eigenvalue
-* problem, their corresponding right and left eigenvector matrices,
-* and also reciprocal condition numbers for all eigenvalues and
-* the reciprocal condition numbers of eigenvectors corresponding to
-* the 1th and 5th eigenvalues.
-*
-* Test Matrices
-* =============
-*
-* Two kinds of test matrix pairs
-* (A, B) = inverse(YH) * (Da, Db) * inverse(X)
-* are used in the tests:
-*
-* Type 1:
-* Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
-* 0 2+a 0 0 0 0 1 0 0 0
-* 0 0 3+a 0 0 0 0 1 0 0
-* 0 0 0 4+a 0 0 0 0 1 0
-* 0 0 0 0 5+a , 0 0 0 0 1
-* and Type 2:
-* Da = 1+i 0 0 0 0 Db = 1 0 0 0 0
-* 0 1-i 0 0 0 0 1 0 0 0
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 (1+a)+(1+b)i 0 0 0 0 1 0
-* 0 0 0 0 (1+a)-(1+b)i, 0 0 0 0 1 .
-*
-* In both cases the same inverse(YH) and inverse(X) are used to compute
-* (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
-*
-* YH: = 1 0 -y y -y X = 1 0 -x -x x
-* 0 1 -y y -y 0 1 x -x -x
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1 0 0 0 0 1 0
-* 0 0 0 0 1, 0 0 0 0 1 , where
-*
-* a, b, x and y will have all values independently of each other.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATM6 generates test matrices for the generalized eigenvalue
+*> problem, their corresponding right and left eigenvector matrices,
+*> and also reciprocal condition numbers for all eigenvalues and
+*> the reciprocal condition numbers of eigenvectors corresponding to
+*> the 1th and 5th eigenvalues.
+*>
+*> Test Matrices
+*> =============
+*>
+*> Two kinds of test matrix pairs
+*> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
+*> are used in the tests:
+*>
+*> Type 1:
+*> Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
+*> 0 2+a 0 0 0 0 1 0 0 0
+*> 0 0 3+a 0 0 0 0 1 0 0
+*> 0 0 0 4+a 0 0 0 0 1 0
+*> 0 0 0 0 5+a , 0 0 0 0 1
+*> and Type 2:
+*> Da = 1+i 0 0 0 0 Db = 1 0 0 0 0
+*> 0 1-i 0 0 0 0 1 0 0 0
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 (1+a)+(1+b)i 0 0 0 0 1 0
+*> 0 0 0 0 (1+a)-(1+b)i, 0 0 0 0 1 .
+*>
+*> In both cases the same inverse(YH) and inverse(X) are used to compute
+*> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
+*>
+*> YH: = 1 0 -y y -y X = 1 0 -x -x x
+*> 0 1 -y y -y 0 1 x -x -x
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1 0 0 0 0 1 0
+*> 0 0 0 0 1, 0 0 0 0 1 , where
+*>
+*> a, b, x and y will have all values independently of each other.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) INTEGER
-* Specifies the problem type (see futher details).
-*
-* N (input) INTEGER
-* Size of the matrices A and B.
-*
-* A (output) COMPLEX array, dimension (LDA, N).
-* On exit A N-by-N is initialized according to TYPE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A and of B.
-*
-* B (output) COMPLEX array, dimension (LDA, N).
-* On exit B N-by-N is initialized according to TYPE.
-*
-* X (output) COMPLEX array, dimension (LDX, N).
-* On exit X is the N-by-N matrix of right eigenvectors.
-*
-* LDX (input) INTEGER
-* The leading dimension of X.
-*
-* Y (output) COMPLEX array, dimension (LDY, N).
-* On exit Y is the N-by-N matrix of left eigenvectors.
-*
-* LDY (input) INTEGER
-* The leading dimension of Y.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is INTEGER
+*> Specifies the problem type (see futher details).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Size of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N).
+*> On exit A N-by-N is initialized according to TYPE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A and of B.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX array, dimension (LDA, N).
+*> On exit B N-by-N is initialized according to TYPE.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX, N).
+*> On exit X is the N-by-N matrix of right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X.
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*> Y is COMPLEX array, dimension (LDY, N).
+*> On exit Y is the N-by-N matrix of left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of Y.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX
+*> \endverbatim
+*> \verbatim
+*> Weighting constants for matrix A.
+*> \endverbatim
+*>
+*> \param[in] WX
+*> \verbatim
+*> WX is COMPLEX
+*> Constant for right eigenvector matrix.
+*> \endverbatim
+*>
+*> \param[in] WY
+*> \verbatim
+*> WY is COMPLEX
+*> Constant for left eigenvector matrix.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> S(i) is the reciprocal condition number for eigenvalue i.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL array, dimension (N)
+*> DIF(i) is the reciprocal condition number for eigenvector i.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) COMPLEX
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* BETA (input) COMPLEX
-* Weighting constants for matrix A.
+*> \date November 2011
*
-* WX (input) COMPLEX
-* Constant for right eigenvector matrix.
+*> \ingroup complex_matgen
*
-* WY (input) COMPLEX
-* Constant for left eigenvector matrix.
+* =====================================================================
+ SUBROUTINE CLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
+ $ BETA, WX, WY, S, DIF )
*
-* S (output) REAL array, dimension (N)
-* S(i) is the reciprocal condition number for eigenvalue i.
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIF (output) REAL array, dimension (N)
-* DIF(i) is the reciprocal condition number for eigenvector i.
+* .. Scalar Arguments ..
+ INTEGER LDA, LDX, LDY, N, TYPE
+ COMPLEX ALPHA, BETA, WX, WY
+* ..
+* .. Array Arguments ..
+ REAL DIF( * ), S( * )
+ COMPLEX A( LDA, * ), B( LDA, * ), X( LDX, * ),
+ $ Y( LDY, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/clatme.f b/TESTING/MATGEN/clatme.f
index ae14e829..b2499c76 100644
--- a/TESTING/MATGEN/clatme.f
+++ b/TESTING/MATGEN/clatme.f
@@ -1,12 +1,312 @@
+*> \brief \b CLATME
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATME( N, DIST, ISEED, D, MODE, COND, DMAX,
+* RSIGN,
+* UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM,
+* A,
+* LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, RSIGN, SIM, UPPER
+* INTEGER INFO, KL, KU, LDA, MODE, MODES, N
+* REAL ANORM, COND, CONDS
+* COMPLEX DMAX
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL DS( * )
+* COMPLEX A( LDA, * ), D( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATME generates random non-symmetric square matrices with
+*> specified eigenvalues for testing LAPACK programs.
+*>
+*> CLATME operates by applying the following sequence of
+*> operations:
+*>
+*> 1. Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and RSIGN
+*> as described below.
+*>
+*> 2. If UPPER='T', the upper triangle of A is set to random values
+*> out of distribution DIST.
+*>
+*> 3. If SIM='T', A is multiplied on the left by a random matrix
+*> X, whose singular values are specified by DS, MODES, and
+*> CONDS, and on the right by X inverse.
+*>
+*> 4. If KL < N-1, the lower bandwidth is reduced to KL using
+*> Householder transformations. If KU < N-1, the upper
+*> bandwidth is reduced to KU.
+*>
+*> 5. If ANORM is not negative, the matrix is scaled to have
+*> maximum-element-norm ANORM.
+*>
+*> (Note: since the matrix cannot be reduced beyond Hessenberg form,
+*> no packing options are available.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns (or rows) of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values, and on the
+*> upper triangle (see UPPER).
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> 'D' => uniform on the complex disc |z| < 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to CLATME
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX array, dimension ( N )
+*> This array is used to specify the eigenvalues of A. If
+*> MODE=0, then D is assumed to contain the eigenvalues
+*> otherwise they will be computed according to MODE, COND,
+*> DMAX, and RSIGN and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is between 1 and 4, D has entries ranging
+*> from 1 to 1/COND, if between -1 and -4, D has entries
+*> ranging from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is COMPLEX
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))). Note that DMAX need not be
+*> positive or real: if DMAX is negative or complex (or zero),
+*> D will be scaled by a negative or complex number (or zero).
+*> If RSIGN='F' then the largest (absolute) eigenvalue will be
+*> equal to DMAX.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is CHARACTER*1
+*> If MODE is not 0, 6, or -6, and RSIGN='T', then the
+*> elements of D, as computed according to MODE and COND, will
+*> be multiplied by a random complex number from the unit
+*> circle |z| = 1. If RSIGN='F', they will not be. RSIGN may
+*> only have the values 'T' or 'F'.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] UPPER
+*> \verbatim
+*> UPPER is CHARACTER*1
+*> If UPPER='T', then the elements of A above the diagonal
+*> will be set to random numbers out of DIST. If UPPER='F',
+*> they will not. UPPER may only have the values 'T' or 'F'.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] SIM
+*> \verbatim
+*> SIM is CHARACTER*1
+*> If SIM='T', then A will be operated on by a "similarity
+*> transform", i.e., multiplied on the left by a matrix X and
+*> on the right by X inverse. X = U S V, where U and V are
+*> random unitary matrices and S is a (diagonal) matrix of
+*> singular values specified by DS, MODES, and CONDS. If
+*> SIM='F', then A will not be transformed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DS
+*> \verbatim
+*> DS is REAL array, dimension ( N )
+*> This array is used to specify the singular values of X,
+*> in the same way that D specifies the eigenvalues of A.
+*> If MODE=0, the DS contains the singular values, which
+*> may not be zero.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODES
+*> \verbatim
+*> MODES is INTEGER
+*> \endverbatim
+*>
+*> \param[in] CONDS
+*> \verbatim
+*> CONDS is REAL
+*> Similar to MODE and COND, but for specifying the diagonal
+*> of S. MODES=-6 and +6 are not allowed (since they would
+*> result in randomly ill-conditioned eigenvalues.)
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. KL=1
+*> specifies upper Hessenberg form. If KL is at least N-1,
+*> then A will have full lower bandwidth.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. KU=1
+*> specifies lower Hessenberg form. If KU is at least N-1,
+*> then A will have full upper bandwidth; if KU and KL
+*> are both at least N-1, then A will be dense. Only one of
+*> KU and KL may be less than N-1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> If ANORM is not negative, then A will be scaled by a non-
+*> negative real number to make the maximum-element-norm of A
+*> to be ANORM.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> On exit A is the desired test matrix.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. LDA must be at least M.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension ( 3*N )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => N negative
+*> -2 => DIST illegal string
+*> -5 => MODE not in range -6 to 6
+*> -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -9 => RSIGN is not 'T' or 'F'
+*> -10 => UPPER is not 'T' or 'F'
+*> -11 => SIM is not 'T' or 'F'
+*> -12 => MODES=0 and DS has a zero singular value.
+*> -13 => MODES is not in the range -5 to 5.
+*> -14 => MODES is nonzero and CONDS is less than 1.
+*> -15 => KL is less than 1.
+*> -16 => KU is less than 1, or KL and KU are both less than
+*> N-1.
+*> -19 => LDA is less than M.
+*> 1 => Error return from CLATM1 (computing D)
+*> 2 => Cannot scale to DMAX (max. eigenvalue is 0)
+*> 3 => Error return from SLATM1 (computing DS)
+*> 4 => Error return from CLARGE
+*> 5 => Zero singular value from SLATM1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
SUBROUTINE CLATME( N, DIST, ISEED, D, MODE, COND, DMAX,
$ RSIGN,
$ UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM,
$ A,
$ LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, RSIGN, SIM, UPPER
@@ -20,198 +320,6 @@
COMPLEX A( LDA, * ), D( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATME generates random non-symmetric square matrices with
-* specified eigenvalues for testing LAPACK programs.
-*
-* CLATME operates by applying the following sequence of
-* operations:
-*
-* 1. Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and RSIGN
-* as described below.
-*
-* 2. If UPPER='T', the upper triangle of A is set to random values
-* out of distribution DIST.
-*
-* 3. If SIM='T', A is multiplied on the left by a random matrix
-* X, whose singular values are specified by DS, MODES, and
-* CONDS, and on the right by X inverse.
-*
-* 4. If KL < N-1, the lower bandwidth is reduced to KL using
-* Householder transformations. If KU < N-1, the upper
-* bandwidth is reduced to KU.
-*
-* 5. If ANORM is not negative, the matrix is scaled to have
-* maximum-element-norm ANORM.
-*
-* (Note: since the matrix cannot be reduced beyond Hessenberg form,
-* no packing options are available.)
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of columns (or rows) of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values, and on the
-* upper triangle (see UPPER).
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* 'D' => uniform on the complex disc |z| < 1.
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to CLATME
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D (input/output) COMPLEX array, dimension ( N )
-* This array is used to specify the eigenvalues of A. If
-* MODE=0, then D is assumed to contain the eigenvalues
-* otherwise they will be computed according to MODE, COND,
-* DMAX, and RSIGN and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is between 1 and 4, D has entries ranging
-* from 1 to 1/COND, if between -1 and -4, D has entries
-* ranging from 1/COND to 1,
-* Not modified.
-*
-* COND (input) REAL
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) COMPLEX
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))). Note that DMAX need not be
-* positive or real: if DMAX is negative or complex (or zero),
-* D will be scaled by a negative or complex number (or zero).
-* If RSIGN='F' then the largest (absolute) eigenvalue will be
-* equal to DMAX.
-* Not modified.
-*
-* RSIGN (input) CHARACTER*1
-* If MODE is not 0, 6, or -6, and RSIGN='T', then the
-* elements of D, as computed according to MODE and COND, will
-* be multiplied by a random complex number from the unit
-* circle |z| = 1. If RSIGN='F', they will not be. RSIGN may
-* only have the values 'T' or 'F'.
-* Not modified.
-*
-* UPPER (input) CHARACTER*1
-* If UPPER='T', then the elements of A above the diagonal
-* will be set to random numbers out of DIST. If UPPER='F',
-* they will not. UPPER may only have the values 'T' or 'F'.
-* Not modified.
-*
-* SIM (input) CHARACTER*1
-* If SIM='T', then A will be operated on by a "similarity
-* transform", i.e., multiplied on the left by a matrix X and
-* on the right by X inverse. X = U S V, where U and V are
-* random unitary matrices and S is a (diagonal) matrix of
-* singular values specified by DS, MODES, and CONDS. If
-* SIM='F', then A will not be transformed.
-* Not modified.
-*
-* DS (input/output) REAL array, dimension ( N )
-* This array is used to specify the singular values of X,
-* in the same way that D specifies the eigenvalues of A.
-* If MODE=0, the DS contains the singular values, which
-* may not be zero.
-* Modified if MODE is nonzero.
-*
-* MODES (input) INTEGER
-*
-* CONDS (input) REAL
-* Similar to MODE and COND, but for specifying the diagonal
-* of S. MODES=-6 and +6 are not allowed (since they would
-* result in randomly ill-conditioned eigenvalues.)
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. KL=1
-* specifies upper Hessenberg form. If KL is at least N-1,
-* then A will have full lower bandwidth.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. KU=1
-* specifies lower Hessenberg form. If KU is at least N-1,
-* then A will have full upper bandwidth; if KU and KL
-* are both at least N-1, then A will be dense. Only one of
-* KU and KL may be less than N-1.
-* Not modified.
-*
-* ANORM (input) REAL
-* If ANORM is not negative, then A will be scaled by a non-
-* negative real number to make the maximum-element-norm of A
-* to be ANORM.
-* Not modified.
-*
-* A (output) COMPLEX array, dimension ( LDA, N )
-* On exit A is the desired test matrix.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. LDA must be at least M.
-* Not modified.
-*
-* WORK (workspace) COMPLEX array, dimension ( 3*N )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => N negative
-* -2 => DIST illegal string
-* -5 => MODE not in range -6 to 6
-* -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -9 => RSIGN is not 'T' or 'F'
-* -10 => UPPER is not 'T' or 'F'
-* -11 => SIM is not 'T' or 'F'
-* -12 => MODES=0 and DS has a zero singular value.
-* -13 => MODES is not in the range -5 to 5.
-* -14 => MODES is nonzero and CONDS is less than 1.
-* -15 => KL is less than 1.
-* -16 => KU is less than 1, or KL and KU are both less than
-* N-1.
-* -19 => LDA is less than M.
-* 1 => Error return from CLATM1 (computing D)
-* 2 => Cannot scale to DMAX (max. eigenvalue is 0)
-* 3 => Error return from SLATM1 (computing DS)
-* 4 => Error return from CLARGE
-* 5 => Zero singular value from SLATM1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/clatmr.f b/TESTING/MATGEN/clatmr.f
index 6ebeb7f2..70e8bcb3 100644
--- a/TESTING/MATGEN/clatmr.f
+++ b/TESTING/MATGEN/clatmr.f
@@ -1,11 +1,504 @@
+*> \brief \b CLATMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATMR( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER,
+* CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM,
+* PACK, A, LDA, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, GRADE, PACK, PIVTNG, RSIGN, SYM
+* INTEGER INFO, KL, KU, LDA, M, MODE, MODEL, MODER, N
+* REAL ANORM, COND, CONDL, CONDR, SPARSE
+* COMPLEX DMAX
+* ..
+* .. Array Arguments ..
+* INTEGER IPIVOT( * ), ISEED( 4 ), IWORK( * )
+* COMPLEX A( LDA, * ), D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATMR generates random matrices of various types for testing
+*> LAPACK programs.
+*>
+*> CLATMR operates by applying the following sequence of
+*> operations:
+*>
+*> Generate a matrix A with random entries of distribution DIST
+*> which is symmetric if SYM='S', Hermitian if SYM='H', and
+*> nonsymmetric if SYM='N'.
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX and RSIGN
+*> as described below.
+*>
+*> Grade the matrix, if desired, from the left and/or right
+*> as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
+*> MODER and CONDR also determine the grading as described
+*> below.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> PIVTNG and IPIVOT.
+*>
+*> Set random entries to zero, if desired, to get a random sparse
+*> matrix as specified by SPARSE.
+*>
+*> Make A a band matrix, if desired, by zeroing out the matrix
+*> outside a band of lower bandwidth KL and upper bandwidth KU.
+*>
+*> Scale A, if desired, to have maximum entry ANORM.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if symmetric or Hermitian)
+*> zero out lower half (if symmetric or Hermitian)
+*> store the upper half columnwise (if symmetric or Hermitian
+*> or square upper triangular)
+*> store the lower half columnwise (if symmetric or Hermitian
+*> or square lower triangular)
+*> same as upper half rowwise if symmetric
+*> same as conjugate upper half rowwise if Hermitian
+*> store the lower triangle in banded format
+*> (if symmetric or Hermitian)
+*> store the upper triangle in banded format
+*> (if symmetric or Hermitian)
+*> store the entire matrix in banded format
+*>
+*> Note: If two calls to CLATMR differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*>
+*> If two calls to CLATMR both have full bandwidth (KL = M-1
+*> and KU = N-1), and differ only in the PIVTNG and PACK
+*> parameters, then the matrices generated will differ only
+*> in the order of the rows and/or columns, and otherwise
+*> contain the same data. This consistency cannot be and
+*> is not maintained with less than full bandwidth.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate a random matrix .
+*> 'U' => real and imaginary parts are independent
+*> UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => real and imaginary parts are independent
+*> UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => real and imaginary parts are independent
+*> NORMAL( 0, 1 ) ( 'N' for normal )
+*> 'D' => uniform on interior of unit disk ( 'D' for disk )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to CLATMR
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='S', generated matrix is symmetric.
+*> If SYM='H', generated matrix is Hermitian.
+*> If SYM='N', generated matrix is nonsymmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX array, dimension (min(M,N))
+*> On entry this array specifies the diagonal entries
+*> of the diagonal of A. D may either be specified
+*> on entry, or set according to MODE and COND as described
+*> below. If the matrix is Hermitian, the real part of D
+*> will be taken. May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry describes how D is to be used:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is COMPLEX
+*> If MODE neither -6, 0 nor 6, the diagonal is scaled by
+*> DMAX / max(abs(D(i))), so that maximum absolute entry
+*> of diagonal is abs(DMAX). If DMAX is complex (or zero),
+*> diagonal will be scaled by a complex number (or zero).
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is CHARACTER*1
+*> If MODE neither -6, 0 nor 6, specifies sign of diagonal
+*> as follows:
+*> 'T' => diagonal entries are multiplied by a random complex
+*> number uniformly distributed with absolute value 1
+*> 'F' => diagonal unchanged
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] GRADE
+*> \verbatim
+*> GRADE is CHARACTER*1
+*> Specifies grading of matrix as follows:
+*> 'N' => no grading
+*> 'L' => matrix premultiplied by diag( DL )
+*> (only if matrix nonsymmetric)
+*> 'R' => matrix postmultiplied by diag( DR )
+*> (only if matrix nonsymmetric)
+*> 'B' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> (only if matrix nonsymmetric)
+*> 'H' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( CONJG(DL) )
+*> (only if matrix Hermitian or nonsymmetric)
+*> 'S' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> (only if matrix symmetric or nonsymmetric)
+*> 'E' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> ( 'S' for similarity )
+*> (only if matrix nonsymmetric)
+*> Note: if GRADE='S', then M must equal N.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is COMPLEX array, dimension (M)
+*> If MODEL=0, then on entry this array specifies the diagonal
+*> entries of a diagonal matrix used as described under GRADE
+*> above. If MODEL is not zero, then DL will be set according
+*> to MODEL and CONDL, analogous to the way D is set according
+*> to MODE and COND (except there is no DMAX parameter for DL).
+*> If GRADE='E', then DL cannot have zero entries.
+*> Not referenced if GRADE = 'N' or 'R'. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] MODEL
+*> \verbatim
+*> MODEL is INTEGER
+*> This specifies how the diagonal array DL is to be computed,
+*> just as MODE specifies how D is to be computed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] CONDL
+*> \verbatim
+*> CONDL is REAL
+*> When MODEL is not zero, this specifies the condition number
+*> of the computed DL. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DR
+*> \verbatim
+*> DR is COMPLEX array, dimension (N)
+*> If MODER=0, then on entry this array specifies the diagonal
+*> entries of a diagonal matrix used as described under GRADE
+*> above. If MODER is not zero, then DR will be set according
+*> to MODER and CONDR, analogous to the way D is set according
+*> to MODE and COND (except there is no DMAX parameter for DR).
+*> Not referenced if GRADE = 'N', 'L', 'H' or 'S'.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] MODER
+*> \verbatim
+*> MODER is INTEGER
+*> This specifies how the diagonal array DR is to be computed,
+*> just as MODE specifies how D is to be computed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] CONDR
+*> \verbatim
+*> CONDR is REAL
+*> When MODER is not zero, this specifies the condition number
+*> of the computed DR. Not modified.
+*> \endverbatim
+*>
+*> \param[in] PIVTNG
+*> \verbatim
+*> PIVTNG is CHARACTER*1
+*> On entry specifies pivoting permutations as follows:
+*> 'N' or ' ' => none.
+*> 'L' => left or row pivoting (matrix must be nonsymmetric).
+*> 'R' => right or column pivoting (matrix must be
+*> nonsymmetric).
+*> 'B' or 'F' => both or full pivoting, i.e., on both sides.
+*> In this case, M must equal N
+*> \endverbatim
+*> \verbatim
+*> If two calls to CLATMR both have full bandwidth (KL = M-1
+*> and KU = N-1), and differ only in the PIVTNG and PACK
+*> parameters, then the matrices generated will differ only
+*> in the order of the rows and/or columns, and otherwise
+*> contain the same data. This consistency cannot be
+*> maintained with less than full bandwidth.
+*> \endverbatim
+*>
+*> \param[in] IPIVOT
+*> \verbatim
+*> IPIVOT is INTEGER array, dimension (N or M)
+*> This array specifies the permutation used. After the
+*> basic matrix is generated, the rows, columns, or both
+*> are permuted. If, say, row pivoting is selected, CLATMR
+*> starts with the *last* row and interchanges the M-th and
+*> IPIVOT(M)-th rows, then moves to the next-to-last row,
+*> interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
+*> and so on. In terms of "2-cycles", the permutation is
+*> (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
+*> where the rightmost cycle is applied first. This is the
+*> *inverse* of the effect of pivoting in LINPACK. The idea
+*> is that factoring (with pivoting) an identity matrix
+*> which has been inverse-pivoted in this way should
+*> result in a pivot vector identical to IPIVOT.
+*> Not referenced if PIVTNG = 'N'. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is REAL
+*> On entry specifies the sparsity of the matrix if a sparse
+*> matrix is to be generated. SPARSE should lie between
+*> 0 and 1. To generate a sparse matrix, for each matrix entry
+*> a uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> On entry specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL at least M-1 implies the matrix is not
+*> banded. Must equal KU if matrix is symmetric or Hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> On entry specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU at least N-1 implies the matrix is not
+*> banded. Must equal KL if matrix is symmetric or Hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> On entry specifies maximum entry of output matrix
+*> (output matrix will by multiplied by a constant so that
+*> its largest absolute entry equal ANORM)
+*> if ANORM is nonnegative. If ANORM is negative no scaling
+*> is done. Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> On entry specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries
+*> (if symmetric or Hermitian)
+*> 'L' => zero out all superdiagonal entries
+*> (if symmetric or Hermitian)
+*> 'C' => store the upper triangle columnwise
+*> (only if matrix symmetric or Hermitian or
+*> square upper triangular)
+*> 'R' => store the lower triangle columnwise
+*> (only if matrix symmetric or Hermitian or
+*> square lower triangular)
+*> (same as upper half rowwise if symmetric)
+*> (same as conjugate upper half rowwise if Hermitian)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if matrix symmetric or Hermitian)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if matrix symmetric or Hermitian)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, HB or TB - use 'B' or 'Q'
+*> PP, HP or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to CLATMR differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA,N)
+*> On exit A is the desired test matrix. Only those
+*> entries of A which are significant on output
+*> will be referenced (even if A is in packed or band
+*> storage format). The 'unoccupied corners' of A in
+*> band format will be zeroed out.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> on entry LDA specifies the first dimension of A as
+*> declared in the calling program.
+*> If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
+*> If PACK='C' or 'R', LDA must be at least 1.
+*> If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
+*> If PACK='Z', LDA must be at least KUU+KLL+1, where
+*> KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N or M)
+*> Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error parameter on exit:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S' or 'H'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
+*> -11 => GRADE illegal string, or GRADE='E' and
+*> M not equal to N, or GRADE='L', 'R', 'B', 'S' or 'E'
+*> and SYM = 'H', or GRADE='L', 'R', 'B', 'H' or 'E'
+*> and SYM = 'S'
+*> -12 => GRADE = 'E' and DL contains zero
+*> -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
+*> 'S' or 'E'
+*> -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
+*> and MODEL neither -6, 0 nor 6
+*> -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
+*> -17 => CONDR less than 1.0, GRADE='R' or 'B', and
+*> MODER neither -6, 0 nor 6
+*> -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
+*> M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
+*> or 'H'
+*> -19 => IPIVOT contains out of range number and
+*> PIVTNG not equal to 'N'
+*> -20 => KL negative
+*> -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+*> -22 => SPARSE not in range 0. to 1.
+*> -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
+*> and SYM='N', or PACK='C' and SYM='N' and either KL
+*> not equal to 0 or N not equal to M, or PACK='R' and
+*> SYM='N', and either KU not equal to 0 or N not equal
+*> to M
+*> -26 => LDA too small
+*> 1 => Error return from CLATM1 (computing D)
+*> 2 => Cannot scale diagonal to DMAX (max. entry is 0)
+*> 3 => Error return from CLATM1 (computing DL)
+*> 4 => Error return from CLATM1 (computing DR)
+*> 5 => ANORM is positive, but matrix constructed prior to
+*> attempting to scale it to have norm ANORM, is zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
SUBROUTINE CLATMR( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER,
$ CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM,
$ PACK, A, LDA, IWORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, GRADE, PACK, PIVTNG, RSIGN, SYM
@@ -18,366 +511,6 @@
COMPLEX A( LDA, * ), D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATMR generates random matrices of various types for testing
-* LAPACK programs.
-*
-* CLATMR operates by applying the following sequence of
-* operations:
-*
-* Generate a matrix A with random entries of distribution DIST
-* which is symmetric if SYM='S', Hermitian if SYM='H', and
-* nonsymmetric if SYM='N'.
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX and RSIGN
-* as described below.
-*
-* Grade the matrix, if desired, from the left and/or right
-* as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
-* MODER and CONDR also determine the grading as described
-* below.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* PIVTNG and IPIVOT.
-*
-* Set random entries to zero, if desired, to get a random sparse
-* matrix as specified by SPARSE.
-*
-* Make A a band matrix, if desired, by zeroing out the matrix
-* outside a band of lower bandwidth KL and upper bandwidth KU.
-*
-* Scale A, if desired, to have maximum entry ANORM.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if symmetric or Hermitian)
-* zero out lower half (if symmetric or Hermitian)
-* store the upper half columnwise (if symmetric or Hermitian
-* or square upper triangular)
-* store the lower half columnwise (if symmetric or Hermitian
-* or square lower triangular)
-* same as upper half rowwise if symmetric
-* same as conjugate upper half rowwise if Hermitian
-* store the lower triangle in banded format
-* (if symmetric or Hermitian)
-* store the upper triangle in banded format
-* (if symmetric or Hermitian)
-* store the entire matrix in banded format
-*
-* Note: If two calls to CLATMR differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-*
-* If two calls to CLATMR both have full bandwidth (KL = M-1
-* and KU = N-1), and differ only in the PIVTNG and PACK
-* parameters, then the matrices generated will differ only
-* in the order of the rows and/or columns, and otherwise
-* contain the same data. This consistency cannot be and
-* is not maintained with less than full bandwidth.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate a random matrix .
-* 'U' => real and imaginary parts are independent
-* UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => real and imaginary parts are independent
-* UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => real and imaginary parts are independent
-* NORMAL( 0, 1 ) ( 'N' for normal )
-* 'D' => uniform on interior of unit disk ( 'D' for disk )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to CLATMR
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='S', generated matrix is symmetric.
-* If SYM='H', generated matrix is Hermitian.
-* If SYM='N', generated matrix is nonsymmetric.
-* Not modified.
-*
-* D (input/output) COMPLEX array, dimension (min(M,N))
-* On entry this array specifies the diagonal entries
-* of the diagonal of A. D may either be specified
-* on entry, or set according to MODE and COND as described
-* below. If the matrix is Hermitian, the real part of D
-* will be taken. May be changed on exit if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry describes how D is to be used:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND (input) REAL
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) COMPLEX
-* If MODE neither -6, 0 nor 6, the diagonal is scaled by
-* DMAX / max(abs(D(i))), so that maximum absolute entry
-* of diagonal is abs(DMAX). If DMAX is complex (or zero),
-* diagonal will be scaled by a complex number (or zero).
-*
-* RSIGN (input) CHARACTER*1
-* If MODE neither -6, 0 nor 6, specifies sign of diagonal
-* as follows:
-* 'T' => diagonal entries are multiplied by a random complex
-* number uniformly distributed with absolute value 1
-* 'F' => diagonal unchanged
-* Not modified.
-*
-* GRADE (input) CHARACTER*1
-* Specifies grading of matrix as follows:
-* 'N' => no grading
-* 'L' => matrix premultiplied by diag( DL )
-* (only if matrix nonsymmetric)
-* 'R' => matrix postmultiplied by diag( DR )
-* (only if matrix nonsymmetric)
-* 'B' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* (only if matrix nonsymmetric)
-* 'H' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( CONJG(DL) )
-* (only if matrix Hermitian or nonsymmetric)
-* 'S' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* (only if matrix symmetric or nonsymmetric)
-* 'E' => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* ( 'S' for similarity )
-* (only if matrix nonsymmetric)
-* Note: if GRADE='S', then M must equal N.
-* Not modified.
-*
-* DL (input/output) COMPLEX array, dimension (M)
-* If MODEL=0, then on entry this array specifies the diagonal
-* entries of a diagonal matrix used as described under GRADE
-* above. If MODEL is not zero, then DL will be set according
-* to MODEL and CONDL, analogous to the way D is set according
-* to MODE and COND (except there is no DMAX parameter for DL).
-* If GRADE='E', then DL cannot have zero entries.
-* Not referenced if GRADE = 'N' or 'R'. Changed on exit.
-*
-* MODEL (input) INTEGER
-* This specifies how the diagonal array DL is to be computed,
-* just as MODE specifies how D is to be computed.
-* Not modified.
-*
-* CONDL (input) REAL
-* When MODEL is not zero, this specifies the condition number
-* of the computed DL. Not modified.
-*
-* DR (input/output) COMPLEX array, dimension (N)
-* If MODER=0, then on entry this array specifies the diagonal
-* entries of a diagonal matrix used as described under GRADE
-* above. If MODER is not zero, then DR will be set according
-* to MODER and CONDR, analogous to the way D is set according
-* to MODE and COND (except there is no DMAX parameter for DR).
-* Not referenced if GRADE = 'N', 'L', 'H' or 'S'.
-* Changed on exit.
-*
-* MODER (input) INTEGER
-* This specifies how the diagonal array DR is to be computed,
-* just as MODE specifies how D is to be computed.
-* Not modified.
-*
-* CONDR (input) REAL
-* When MODER is not zero, this specifies the condition number
-* of the computed DR. Not modified.
-*
-* PIVTNG (input) CHARACTER*1
-* On entry specifies pivoting permutations as follows:
-* 'N' or ' ' => none.
-* 'L' => left or row pivoting (matrix must be nonsymmetric).
-* 'R' => right or column pivoting (matrix must be
-* nonsymmetric).
-* 'B' or 'F' => both or full pivoting, i.e., on both sides.
-* In this case, M must equal N
-*
-* If two calls to CLATMR both have full bandwidth (KL = M-1
-* and KU = N-1), and differ only in the PIVTNG and PACK
-* parameters, then the matrices generated will differ only
-* in the order of the rows and/or columns, and otherwise
-* contain the same data. This consistency cannot be
-* maintained with less than full bandwidth.
-*
-* IPIVOT (input) INTEGER array, dimension (N or M)
-* This array specifies the permutation used. After the
-* basic matrix is generated, the rows, columns, or both
-* are permuted. If, say, row pivoting is selected, CLATMR
-* starts with the *last* row and interchanges the M-th and
-* IPIVOT(M)-th rows, then moves to the next-to-last row,
-* interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
-* and so on. In terms of "2-cycles", the permutation is
-* (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
-* where the rightmost cycle is applied first. This is the
-* *inverse* of the effect of pivoting in LINPACK. The idea
-* is that factoring (with pivoting) an identity matrix
-* which has been inverse-pivoted in this way should
-* result in a pivot vector identical to IPIVOT.
-* Not referenced if PIVTNG = 'N'. Not modified.
-*
-* SPARSE (input) REAL
-* On entry specifies the sparsity of the matrix if a sparse
-* matrix is to be generated. SPARSE should lie between
-* 0 and 1. To generate a sparse matrix, for each matrix entry
-* a uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
-* KL (input) INTEGER
-* On entry specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL at least M-1 implies the matrix is not
-* banded. Must equal KU if matrix is symmetric or Hermitian.
-* Not modified.
-*
-* KU (input) INTEGER
-* On entry specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU at least N-1 implies the matrix is not
-* banded. Must equal KL if matrix is symmetric or Hermitian.
-* Not modified.
-*
-* ANORM (input) REAL
-* On entry specifies maximum entry of output matrix
-* (output matrix will by multiplied by a constant so that
-* its largest absolute entry equal ANORM)
-* if ANORM is nonnegative. If ANORM is negative no scaling
-* is done. Not modified.
-*
-* PACK (input) CHARACTER*1
-* On entry specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries
-* (if symmetric or Hermitian)
-* 'L' => zero out all superdiagonal entries
-* (if symmetric or Hermitian)
-* 'C' => store the upper triangle columnwise
-* (only if matrix symmetric or Hermitian or
-* square upper triangular)
-* 'R' => store the lower triangle columnwise
-* (only if matrix symmetric or Hermitian or
-* square lower triangular)
-* (same as upper half rowwise if symmetric)
-* (same as conjugate upper half rowwise if Hermitian)
-* 'B' => store the lower triangle in band storage scheme
-* (only if matrix symmetric or Hermitian)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if matrix symmetric or Hermitian)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, HB or TB - use 'B' or 'Q'
-* PP, HP or TP - use 'C' or 'R'
-*
-* If two calls to CLATMR differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) COMPLEX array, dimension (LDA,N)
-* On exit A is the desired test matrix. Only those
-* entries of A which are significant on output
-* will be referenced (even if A is in packed or band
-* storage format). The 'unoccupied corners' of A in
-* band format will be zeroed out.
-*
-* LDA (input) INTEGER
-* on entry LDA specifies the first dimension of A as
-* declared in the calling program.
-* If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
-* If PACK='C' or 'R', LDA must be at least 1.
-* If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
-* If PACK='Z', LDA must be at least KUU+KLL+1, where
-* KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
-* Not modified.
-*
-* IWORK (workspace) INTEGER array, dimension (N or M)
-* Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
-*
-* INFO (output) INTEGER
-* Error parameter on exit:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S' or 'H'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
-* -11 => GRADE illegal string, or GRADE='E' and
-* M not equal to N, or GRADE='L', 'R', 'B', 'S' or 'E'
-* and SYM = 'H', or GRADE='L', 'R', 'B', 'H' or 'E'
-* and SYM = 'S'
-* -12 => GRADE = 'E' and DL contains zero
-* -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
-* 'S' or 'E'
-* -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
-* and MODEL neither -6, 0 nor 6
-* -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
-* -17 => CONDR less than 1.0, GRADE='R' or 'B', and
-* MODER neither -6, 0 nor 6
-* -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
-* M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
-* or 'H'
-* -19 => IPIVOT contains out of range number and
-* PIVTNG not equal to 'N'
-* -20 => KL negative
-* -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
-* -22 => SPARSE not in range 0. to 1.
-* -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
-* and SYM='N', or PACK='C' and SYM='N' and either KL
-* not equal to 0 or N not equal to M, or PACK='R' and
-* SYM='N', and either KU not equal to 0 or N not equal
-* to M
-* -26 => LDA too small
-* 1 => Error return from CLATM1 (computing D)
-* 2 => Cannot scale diagonal to DMAX (max. entry is 0)
-* 3 => Error return from CLATM1 (computing DL)
-* 4 => Error return from CLATM1 (computing DR)
-* 5 => ANORM is positive, but matrix constructed prior to
-* attempting to scale it to have norm ANORM, is zero
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/clatms.f b/TESTING/MATGEN/clatms.f
index 7fb5c495..7b206d7a 100644
--- a/TESTING/MATGEN/clatms.f
+++ b/TESTING/MATGEN/clatms.f
@@ -1,9 +1,345 @@
+*> \brief \b CLATMS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATMS( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* KL, KU, PACK, A, LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, PACK, SYM
+* INTEGER INFO, KL, KU, LDA, M, MODE, N
+* REAL COND, DMAX
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL D( * )
+* COMPLEX A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATMS generates random matrices with specified singular values
+*> (or hermitian with specified eigenvalues)
+*> for testing LAPACK programs.
+*>
+*> CLATMS operates by applying the following sequence of
+*> operations:
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and SYM
+*> as described below.
+*>
+*> Generate a matrix with the appropriate band structure, by one
+*> of two methods:
+*>
+*> Method A:
+*> Generate a dense M x N matrix by multiplying D on the left
+*> and the right by random unitary matrices, then:
+*>
+*> Reduce the bandwidth according to KL and KU, using
+*> Householder transformations.
+*>
+*> Method B:
+*> Convert the bandwidth-0 (i.e., diagonal) matrix to a
+*> bandwidth-1 matrix using Givens rotations, "chasing"
+*> out-of-band elements back, much as in QR; then convert
+*> the bandwidth-1 to a bandwidth-2 matrix, etc. Note
+*> that for reasonably small bandwidths (relative to M and
+*> N) this requires less storage, as a dense matrix is not
+*> generated. Also, for hermitian or symmetric matrices,
+*> only one triangle is generated.
+*>
+*> Method A is chosen if the bandwidth is a large fraction of the
+*> order of the matrix, and LDA is at least M (so a dense
+*> matrix can be stored.) Method B is chosen if the bandwidth
+*> is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
+*> non-symmetric), or LDA is less than M and not less than the
+*> bandwidth.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if hermitian)
+*> zero out lower half (if hermitian)
+*> store the upper half columnwise (if hermitian or upper
+*> triangular)
+*> store the lower half columnwise (if hermitian or lower
+*> triangular)
+*> store the lower triangle in banded format (if hermitian or
+*> lower triangular)
+*> store the upper triangle in banded format (if hermitian or
+*> upper triangular)
+*> store the entire matrix in banded format
+*> If Method B is chosen, and band format is specified, then the
+*> matrix will be generated in the band format, so no repacking
+*> will be necessary.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. N must equal M if the matrix
+*> is symmetric or hermitian (i.e., if SYM is not 'N')
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values.
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to CLATMS
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='H', the generated matrix is hermitian, with
+*> eigenvalues specified by D, COND, MODE, and DMAX; they
+*> may be positive, negative, or zero.
+*> If SYM='P', the generated matrix is hermitian, with
+*> eigenvalues (= singular values) specified by D, COND,
+*> MODE, and DMAX; they will not be negative.
+*> If SYM='N', the generated matrix is nonsymmetric, with
+*> singular values specified by D, COND, MODE, and DMAX;
+*> they will not be negative.
+*> If SYM='S', the generated matrix is (complex) symmetric,
+*> with singular values specified by D, COND, MODE, and
+*> DMAX; they will not be negative.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension ( MIN( M, N ) )
+*> This array is used to specify the singular values or
+*> eigenvalues of A (see SYM, above.) If MODE=0, then D is
+*> assumed to contain the singular/eigenvalues, otherwise
+*> they will be computed according to MODE, COND, and DMAX,
+*> and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the singular/eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> If SYM='H', and MODE is neither 0, 6, nor -6, then
+*> the elements of D will also be multiplied by a random
+*> sign (i.e., +1 or -1.)
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is REAL
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+*> singular value (which is to say the norm) will be abs(DMAX).
+*> Note that DMAX need not be positive: if DMAX is negative
+*> (or zero), D will be scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL being at least M-1 means that the matrix
+*> has full lower bandwidth. KL must equal KU if the matrix
+*> is symmetric or hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU being at least N-1 means that the matrix
+*> has full upper bandwidth. KL must equal KU if the matrix
+*> is symmetric or hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> This specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric
+*> or hermitian)
+*> 'L' => zero out all superdiagonal entries (if symmetric
+*> or hermitian)
+*> 'C' => store the upper triangle columnwise (only if the
+*> matrix is symmetric, hermitian, or upper triangular)
+*> 'R' => store the lower triangle columnwise (only if the
+*> matrix is symmetric, hermitian, or lower triangular)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if the matrix is symmetric, hermitian, or
+*> lower triangular)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if the matrix is symmetric, hermitian, or
+*> upper triangular)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB, HB, or TB - use 'B' or 'Q'
+*> PP, SP, HB, or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to CLATMS differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> On exit A is the desired test matrix. A is first generated
+*> in full (unpacked) form, and then packed, if so specified
+*> by PACK. Thus, the first M elements of the first N
+*> columns will always be modified. If PACK specifies a
+*> packed or banded storage scheme, all LDA elements of the
+*> first N columns will be modified; the elements of the
+*> array which do not correspond to elements of the generated
+*> matrix are set to zero.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+*> LDA must be at least M. If PACK='B' or 'Q', then LDA must
+*> be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+*> If PACK='Z', LDA must be large enough to hold the packed
+*> array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension ( 3*MAX( N, M ) )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => KL negative
+*> -11 => KU negative, or SYM is not 'N' and KU is not equal to
+*> KL
+*> -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+*> or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+*> or PACK='R' or 'B' and SYM='N' and KU is not zero;
+*> or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+*> N.
+*> -14 => LDA is less than M, or PACK='Z' and LDA is less than
+*> MIN(KU,N-1) + MIN(KL,M-1) + 1.
+*> 1 => Error return from SLATM1
+*> 2 => Cannot scale to DMAX (max. sing. value is 0)
+*> 3 => Error return from CLAGGE, CLAGHE or CLAGSY
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
SUBROUTINE CLATMS( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ KL, KU, PACK, A, LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, PACK, SYM
@@ -16,248 +352,6 @@
COMPLEX A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* CLATMS generates random matrices with specified singular values
-* (or hermitian with specified eigenvalues)
-* for testing LAPACK programs.
-*
-* CLATMS operates by applying the following sequence of
-* operations:
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and SYM
-* as described below.
-*
-* Generate a matrix with the appropriate band structure, by one
-* of two methods:
-*
-* Method A:
-* Generate a dense M x N matrix by multiplying D on the left
-* and the right by random unitary matrices, then:
-*
-* Reduce the bandwidth according to KL and KU, using
-* Householder transformations.
-*
-* Method B:
-* Convert the bandwidth-0 (i.e., diagonal) matrix to a
-* bandwidth-1 matrix using Givens rotations, "chasing"
-* out-of-band elements back, much as in QR; then convert
-* the bandwidth-1 to a bandwidth-2 matrix, etc. Note
-* that for reasonably small bandwidths (relative to M and
-* N) this requires less storage, as a dense matrix is not
-* generated. Also, for hermitian or symmetric matrices,
-* only one triangle is generated.
-*
-* Method A is chosen if the bandwidth is a large fraction of the
-* order of the matrix, and LDA is at least M (so a dense
-* matrix can be stored.) Method B is chosen if the bandwidth
-* is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
-* non-symmetric), or LDA is less than M and not less than the
-* bandwidth.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if hermitian)
-* zero out lower half (if hermitian)
-* store the upper half columnwise (if hermitian or upper
-* triangular)
-* store the lower half columnwise (if hermitian or lower
-* triangular)
-* store the lower triangle in banded format (if hermitian or
-* lower triangular)
-* store the upper triangle in banded format (if hermitian or
-* upper triangular)
-* store the entire matrix in banded format
-* If Method B is chosen, and band format is specified, then the
-* matrix will be generated in the band format, so no repacking
-* will be necessary.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* The number of columns of A. N must equal M if the matrix
-* is symmetric or hermitian (i.e., if SYM is not 'N')
-* Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values.
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to CLATMS
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='H', the generated matrix is hermitian, with
-* eigenvalues specified by D, COND, MODE, and DMAX; they
-* may be positive, negative, or zero.
-* If SYM='P', the generated matrix is hermitian, with
-* eigenvalues (= singular values) specified by D, COND,
-* MODE, and DMAX; they will not be negative.
-* If SYM='N', the generated matrix is nonsymmetric, with
-* singular values specified by D, COND, MODE, and DMAX;
-* they will not be negative.
-* If SYM='S', the generated matrix is (complex) symmetric,
-* with singular values specified by D, COND, MODE, and
-* DMAX; they will not be negative.
-* Not modified.
-*
-* D (input/output) REAL array, dimension ( MIN( M, N ) )
-* This array is used to specify the singular values or
-* eigenvalues of A (see SYM, above.) If MODE=0, then D is
-* assumed to contain the singular/eigenvalues, otherwise
-* they will be computed according to MODE, COND, and DMAX,
-* and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the singular/eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* If SYM='H', and MODE is neither 0, 6, nor -6, then
-* the elements of D will also be multiplied by a random
-* sign (i.e., +1 or -1.)
-* Not modified.
-*
-* COND (input) REAL
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) REAL
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
-* singular value (which is to say the norm) will be abs(DMAX).
-* Note that DMAX need not be positive: if DMAX is negative
-* (or zero), D will be scaled by a negative number (or zero).
-* Not modified.
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL being at least M-1 means that the matrix
-* has full lower bandwidth. KL must equal KU if the matrix
-* is symmetric or hermitian.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU being at least N-1 means that the matrix
-* has full upper bandwidth. KL must equal KU if the matrix
-* is symmetric or hermitian.
-* Not modified.
-*
-* PACK (input) CHARACTER*1
-* This specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric
-* or hermitian)
-* 'L' => zero out all superdiagonal entries (if symmetric
-* or hermitian)
-* 'C' => store the upper triangle columnwise (only if the
-* matrix is symmetric, hermitian, or upper triangular)
-* 'R' => store the lower triangle columnwise (only if the
-* matrix is symmetric, hermitian, or lower triangular)
-* 'B' => store the lower triangle in band storage scheme
-* (only if the matrix is symmetric, hermitian, or
-* lower triangular)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if the matrix is symmetric, hermitian, or
-* upper triangular)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB, HB, or TB - use 'B' or 'Q'
-* PP, SP, HB, or TP - use 'C' or 'R'
-*
-* If two calls to CLATMS differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) COMPLEX array, dimension ( LDA, N )
-* On exit A is the desired test matrix. A is first generated
-* in full (unpacked) form, and then packed, if so specified
-* by PACK. Thus, the first M elements of the first N
-* columns will always be modified. If PACK specifies a
-* packed or banded storage scheme, all LDA elements of the
-* first N columns will be modified; the elements of the
-* array which do not correspond to elements of the generated
-* matrix are set to zero.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
-* LDA must be at least M. If PACK='B' or 'Q', then LDA must
-* be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
-* If PACK='Z', LDA must be large enough to hold the packed
-* array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
-* Not modified.
-*
-* WORK (workspace) COMPLEX array, dimension ( 3*MAX( N, M ) )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => KL negative
-* -11 => KU negative, or SYM is not 'N' and KU is not equal to
-* KL
-* -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
-* or PACK='C' or 'Q' and SYM='N' and KL is not zero;
-* or PACK='R' or 'B' and SYM='N' and KU is not zero;
-* or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
-* N.
-* -14 => LDA is less than M, or PACK='Z' and LDA is less than
-* MIN(KU,N-1) + MIN(KL,M-1) + 1.
-* 1 => Error return from SLATM1
-* 2 => Cannot scale to DMAX (max. sing. value is 0)
-* 3 => Error return from CLAGGE, CLAGHE or CLAGSY
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/clatmt.f b/TESTING/MATGEN/clatmt.f
index 1d7a13c7..0a2542be 100644
--- a/TESTING/MATGEN/clatmt.f
+++ b/TESTING/MATGEN/clatmt.f
@@ -1,9 +1,353 @@
+*> \brief \b CLATMT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE CLATMT( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* RANK, KL, KU, PACK, A, LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* REAL COND, DMAX
+* INTEGER INFO, KL, KU, LDA, M, MODE, N, RANK
+* CHARACTER DIST, PACK, SYM
+* ..
+* .. Array Arguments ..
+* COMPLEX A( LDA, * ), WORK( * )
+* REAL D( * )
+* INTEGER ISEED( 4 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> CLATMT generates random matrices with specified singular values
+*> (or hermitian with specified eigenvalues)
+*> for testing LAPACK programs.
+*>
+*> CLATMT operates by applying the following sequence of
+*> operations:
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and SYM
+*> as described below.
+*>
+*> Generate a matrix with the appropriate band structure, by one
+*> of two methods:
+*>
+*> Method A:
+*> Generate a dense M x N matrix by multiplying D on the left
+*> and the right by random unitary matrices, then:
+*>
+*> Reduce the bandwidth according to KL and KU, using
+*> Householder transformations.
+*>
+*> Method B:
+*> Convert the bandwidth-0 (i.e., diagonal) matrix to a
+*> bandwidth-1 matrix using Givens rotations, "chasing"
+*> out-of-band elements back, much as in QR; then convert
+*> the bandwidth-1 to a bandwidth-2 matrix, etc. Note
+*> that for reasonably small bandwidths (relative to M and
+*> N) this requires less storage, as a dense matrix is not
+*> generated. Also, for hermitian or symmetric matrices,
+*> only one triangle is generated.
+*>
+*> Method A is chosen if the bandwidth is a large fraction of the
+*> order of the matrix, and LDA is at least M (so a dense
+*> matrix can be stored.) Method B is chosen if the bandwidth
+*> is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
+*> non-symmetric), or LDA is less than M and not less than the
+*> bandwidth.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if hermitian)
+*> zero out lower half (if hermitian)
+*> store the upper half columnwise (if hermitian or upper
+*> triangular)
+*> store the lower half columnwise (if hermitian or lower
+*> triangular)
+*> store the lower triangle in banded format (if hermitian or
+*> lower triangular)
+*> store the upper triangle in banded format (if hermitian or
+*> upper triangular)
+*> store the entire matrix in banded format
+*> If Method B is chosen, and band format is specified, then the
+*> matrix will be generated in the band format, so no repacking
+*> will be necessary.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. N must equal M if the matrix
+*> is symmetric or hermitian (i.e., if SYM is not 'N')
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values.
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to CLATMT
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='H', the generated matrix is hermitian, with
+*> eigenvalues specified by D, COND, MODE, and DMAX; they
+*> may be positive, negative, or zero.
+*> If SYM='P', the generated matrix is hermitian, with
+*> eigenvalues (= singular values) specified by D, COND,
+*> MODE, and DMAX; they will not be negative.
+*> If SYM='N', the generated matrix is nonsymmetric, with
+*> singular values specified by D, COND, MODE, and DMAX;
+*> they will not be negative.
+*> If SYM='S', the generated matrix is (complex) symmetric,
+*> with singular values specified by D, COND, MODE, and
+*> DMAX; they will not be negative.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension ( MIN( M, N ) )
+*> This array is used to specify the singular values or
+*> eigenvalues of A (see SYM, above.) If MODE=0, then D is
+*> assumed to contain the singular/eigenvalues, otherwise
+*> they will be computed according to MODE, COND, and DMAX,
+*> and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the singular/eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
+*> MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> If SYM='H', and MODE is neither 0, 6, nor -6, then
+*> the elements of D will also be multiplied by a random
+*> sign (i.e., +1 or -1.)
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is REAL
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+*> singular value (which is to say the norm) will be abs(DMAX).
+*> Note that DMAX need not be positive: if DMAX is negative
+*> (or zero), D will be scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of matrix to be generated for modes 1,2,3 only.
+*> D( RANK+1:N ) = 0.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL being at least M-1 means that the matrix
+*> has full lower bandwidth. KL must equal KU if the matrix
+*> is symmetric or hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU being at least N-1 means that the matrix
+*> has full upper bandwidth. KL must equal KU if the matrix
+*> is symmetric or hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> This specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric
+*> or hermitian)
+*> 'L' => zero out all superdiagonal entries (if symmetric
+*> or hermitian)
+*> 'C' => store the upper triangle columnwise (only if the
+*> matrix is symmetric, hermitian, or upper triangular)
+*> 'R' => store the lower triangle columnwise (only if the
+*> matrix is symmetric, hermitian, or lower triangular)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if the matrix is symmetric, hermitian, or
+*> lower triangular)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if the matrix is symmetric, hermitian, or
+*> upper triangular)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB, HB, or TB - use 'B' or 'Q'
+*> PP, SP, HB, or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to CLATMT differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX array, dimension ( LDA, N )
+*> On exit A is the desired test matrix. A is first generated
+*> in full (unpacked) form, and then packed, if so specified
+*> by PACK. Thus, the first M elements of the first N
+*> columns will always be modified. If PACK specifies a
+*> packed or banded storage scheme, all LDA elements of the
+*> first N columns will be modified; the elements of the
+*> array which do not correspond to elements of the generated
+*> matrix are set to zero.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+*> LDA must be at least M. If PACK='B' or 'Q', then LDA must
+*> be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+*> If PACK='Z', LDA must be large enough to hold the packed
+*> array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX array, dimension ( 3*MAX( N, M ) )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => KL negative
+*> -11 => KU negative, or SYM is not 'N' and KU is not equal to
+*> KL
+*> -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+*> or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+*> or PACK='R' or 'B' and SYM='N' and KU is not zero;
+*> or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+*> N.
+*> -14 => LDA is less than M, or PACK='Z' and LDA is less than
+*> MIN(KU,N-1) + MIN(KL,M-1) + 1.
+*> 1 => Error return from SLATM7
+*> 2 => Cannot scale to DMAX (max. sing. value is 0)
+*> 3 => Error return from CLAGGE, CLAGHE or CLAGSY
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex_matgen
+*
+* =====================================================================
SUBROUTINE CLATMT( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ RANK, KL, KU, PACK, A, LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL COND, DMAX
@@ -16,253 +360,6 @@
INTEGER ISEED( 4 )
* ..
*
-* Purpose
-* =======
-*
-* CLATMT generates random matrices with specified singular values
-* (or hermitian with specified eigenvalues)
-* for testing LAPACK programs.
-*
-* CLATMT operates by applying the following sequence of
-* operations:
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and SYM
-* as described below.
-*
-* Generate a matrix with the appropriate band structure, by one
-* of two methods:
-*
-* Method A:
-* Generate a dense M x N matrix by multiplying D on the left
-* and the right by random unitary matrices, then:
-*
-* Reduce the bandwidth according to KL and KU, using
-* Householder transformations.
-*
-* Method B:
-* Convert the bandwidth-0 (i.e., diagonal) matrix to a
-* bandwidth-1 matrix using Givens rotations, "chasing"
-* out-of-band elements back, much as in QR; then convert
-* the bandwidth-1 to a bandwidth-2 matrix, etc. Note
-* that for reasonably small bandwidths (relative to M and
-* N) this requires less storage, as a dense matrix is not
-* generated. Also, for hermitian or symmetric matrices,
-* only one triangle is generated.
-*
-* Method A is chosen if the bandwidth is a large fraction of the
-* order of the matrix, and LDA is at least M (so a dense
-* matrix can be stored.) Method B is chosen if the bandwidth
-* is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
-* non-symmetric), or LDA is less than M and not less than the
-* bandwidth.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if hermitian)
-* zero out lower half (if hermitian)
-* store the upper half columnwise (if hermitian or upper
-* triangular)
-* store the lower half columnwise (if hermitian or lower
-* triangular)
-* store the lower triangle in banded format (if hermitian or
-* lower triangular)
-* store the upper triangle in banded format (if hermitian or
-* upper triangular)
-* store the entire matrix in banded format
-* If Method B is chosen, and band format is specified, then the
-* matrix will be generated in the band format, so no repacking
-* will be necessary.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* The number of columns of A. N must equal M if the matrix
-* is symmetric or hermitian (i.e., if SYM is not 'N')
-* Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values.
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to CLATMT
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='H', the generated matrix is hermitian, with
-* eigenvalues specified by D, COND, MODE, and DMAX; they
-* may be positive, negative, or zero.
-* If SYM='P', the generated matrix is hermitian, with
-* eigenvalues (= singular values) specified by D, COND,
-* MODE, and DMAX; they will not be negative.
-* If SYM='N', the generated matrix is nonsymmetric, with
-* singular values specified by D, COND, MODE, and DMAX;
-* they will not be negative.
-* If SYM='S', the generated matrix is (complex) symmetric,
-* with singular values specified by D, COND, MODE, and
-* DMAX; they will not be negative.
-* Not modified.
-*
-* D (input/output) REAL array, dimension ( MIN( M, N ) )
-* This array is used to specify the singular values or
-* eigenvalues of A (see SYM, above.) If MODE=0, then D is
-* assumed to contain the singular/eigenvalues, otherwise
-* they will be computed according to MODE, COND, and DMAX,
-* and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the singular/eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
-* MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* If SYM='H', and MODE is neither 0, 6, nor -6, then
-* the elements of D will also be multiplied by a random
-* sign (i.e., +1 or -1.)
-* Not modified.
-*
-* COND (input) REAL
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) REAL
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
-* singular value (which is to say the norm) will be abs(DMAX).
-* Note that DMAX need not be positive: if DMAX is negative
-* (or zero), D will be scaled by a negative number (or zero).
-* Not modified.
-*
-* RANK (input) INTEGER
-* The rank of matrix to be generated for modes 1,2,3 only.
-* D( RANK+1:N ) = 0.
-* Not modified.
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL being at least M-1 means that the matrix
-* has full lower bandwidth. KL must equal KU if the matrix
-* is symmetric or hermitian.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU being at least N-1 means that the matrix
-* has full upper bandwidth. KL must equal KU if the matrix
-* is symmetric or hermitian.
-* Not modified.
-*
-* PACK (input) CHARACTER*1
-* This specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric
-* or hermitian)
-* 'L' => zero out all superdiagonal entries (if symmetric
-* or hermitian)
-* 'C' => store the upper triangle columnwise (only if the
-* matrix is symmetric, hermitian, or upper triangular)
-* 'R' => store the lower triangle columnwise (only if the
-* matrix is symmetric, hermitian, or lower triangular)
-* 'B' => store the lower triangle in band storage scheme
-* (only if the matrix is symmetric, hermitian, or
-* lower triangular)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if the matrix is symmetric, hermitian, or
-* upper triangular)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB, HB, or TB - use 'B' or 'Q'
-* PP, SP, HB, or TP - use 'C' or 'R'
-*
-* If two calls to CLATMT differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) COMPLEX array, dimension ( LDA, N )
-* On exit A is the desired test matrix. A is first generated
-* in full (unpacked) form, and then packed, if so specified
-* by PACK. Thus, the first M elements of the first N
-* columns will always be modified. If PACK specifies a
-* packed or banded storage scheme, all LDA elements of the
-* first N columns will be modified; the elements of the
-* array which do not correspond to elements of the generated
-* matrix are set to zero.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
-* LDA must be at least M. If PACK='B' or 'Q', then LDA must
-* be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
-* If PACK='Z', LDA must be large enough to hold the packed
-* array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
-* Not modified.
-*
-* WORK (workspace) COMPLEX array, dimension ( 3*MAX( N, M ) )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => KL negative
-* -11 => KU negative, or SYM is not 'N' and KU is not equal to
-* KL
-* -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
-* or PACK='C' or 'Q' and SYM='N' and KL is not zero;
-* or PACK='R' or 'B' and SYM='N' and KU is not zero;
-* or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
-* N.
-* -14 => LDA is less than M, or PACK='Z' and LDA is less than
-* MIN(KU,N-1) + MIN(KL,M-1) + 1.
-* 1 => Error return from SLATM7
-* 2 => Cannot scale to DMAX (max. sing. value is 0)
-* 3 => Error return from CLAGGE, CLAGHE or CLAGSY
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlagge.f b/TESTING/MATGEN/dlagge.f
index f0ae2168..1a3b2a5c 100644
--- a/TESTING/MATGEN/dlagge.f
+++ b/TESTING/MATGEN/dlagge.f
@@ -1,62 +1,132 @@
- SUBROUTINE DLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1)
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
-* ..
-*
+*> \brief \b DLAGGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLAGGE generates a real general m by n matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with random orthogonal matrices:
-* A = U*D*V. The lower and upper bandwidths may then be reduced to
-* kl and ku by additional orthogonal transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAGGE generates a real general m by n matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with random orthogonal matrices:
+*> A = U*D*V. The lower and upper bandwidths may then be reduced to
+*> kl and ku by additional orthogonal transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* The number of nonzero superdiagonals within the band of A.
-* 0 <= KU <= N-1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of nonzero superdiagonals within the band of A.
+*> 0 <= KU <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The generated m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (M+N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The generated m by n matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \ingroup double_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE DLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (M+N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/dlagsy.f b/TESTING/MATGEN/dlagsy.f
index d9e81fbf..43853036 100644
--- a/TESTING/MATGEN/dlagsy.f
+++ b/TESTING/MATGEN/dlagsy.f
@@ -1,56 +1,120 @@
- SUBROUTINE DLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1)
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
-* ..
-*
+*> \brief \b DLAGSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLAGSY generates a real symmetric matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with a random orthogonal matrix:
-* A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
-* orthogonal transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAGSY generates a real symmetric matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with a random orthogonal matrix:
+*> A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
+*> orthogonal transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* K (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= K <= N-1.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= K <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> The generated n by n symmetric matrix A (the full matrix is
+*> stored).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) DOUBLE PRECISION array, dimension (LDA,N)
-* The generated n by n symmetric matrix A (the full matrix is
-* stored).
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup double_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE DLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/dlahilb.f b/TESTING/MATGEN/dlahilb.f
index 7fa091f0..b35f40ee 100644
--- a/TESTING/MATGEN/dlahilb.f
+++ b/TESTING/MATGEN/dlahilb.f
@@ -1,107 +1,167 @@
+C> \brief \b DLAHILB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER N, NRHS, LDA, LDX, LDB, INFO
+* .. Array Arguments ..
+* DOUBLE PRECISION A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAHILB generates an N by N scaled Hilbert matrix in A along with
+*> NRHS right-hand sides in B and solutions in X such that A*X=B.
+*>
+*> The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all
+*> entries are integers. The right-hand sides are the first NRHS
+*> columns of M * the identity matrix, and the solutions are the
+*> first NRHS columns of the inverse Hilbert matrix.
+*>
+*> The condition number of the Hilbert matrix grows exponentially with
+*> its size, roughly as O(e ** (3.5*N)). Additionally, the inverse
+*> Hilbert matrices beyond a relatively small dimension cannot be
+*> generated exactly without extra precision. Precision is exhausted
+*> when the largest entry in the inverse Hilbert matrix is greater than
+*> 2 to the power of the number of bits in the fraction of the data type
+*> used plus one, which is 24 for single precision.
+*>
+*> In single, the generated solution is exact for N <= 6 and has
+*> small componentwise error for 7 <= N <= 11.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The requested number of right-hand sides.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> The generated scaled Hilbert matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX, NRHS)
+*> The generated exact solutions. Currently, the first NRHS
+*> columns of the inverse Hilbert matrix.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= N.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, NRHS)
+*> The generated right-hand sides. Currently, the first NRHS
+*> columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: N is too large; the data is still generated but may not
+*> be not exact.
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
SUBROUTINE DLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
-!
-! -- LAPACK auxiliary test routine (version 3.2.2) --
-! Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-! Courant Institute, Argonne National Lab, and Rice University
-* June 2010
-!
-! David Vu <dtv@cs.berkeley.edu>
-! Yozo Hida <yozo@cs.berkeley.edu>
-! Jason Riedy <ejr@cs.berkeley.edu>
-! D. Halligan <dhalligan@berkeley.edu>
-!
- IMPLICIT NONE
-! .. Scalar Arguments ..
+*
+* -- LAPACK test routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
INTEGER N, NRHS, LDA, LDX, LDB, INFO
-! .. Array Arguments ..
+* .. Array Arguments ..
DOUBLE PRECISION A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
-! ..
-!
-! Purpose
-! =======
-!
-! DLAHILB generates an N by N scaled Hilbert matrix in A along with
-! NRHS right-hand sides in B and solutions in X such that A*X=B.
-!
-! The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all
-! entries are integers. The right-hand sides are the first NRHS
-! columns of M * the identity matrix, and the solutions are the
-! first NRHS columns of the inverse Hilbert matrix.
-!
-! The condition number of the Hilbert matrix grows exponentially with
-! its size, roughly as O(e ** (3.5*N)). Additionally, the inverse
-! Hilbert matrices beyond a relatively small dimension cannot be
-! generated exactly without extra precision. Precision is exhausted
-! when the largest entry in the inverse Hilbert matrix is greater than
-! 2 to the power of the number of bits in the fraction of the data type
-! used plus one, which is 24 for single precision.
-!
-! In single, the generated solution is exact for N <= 6 and has
-! small componentwise error for 7 <= N <= 11.
-!
-! Arguments
-! =========
-!
-! N (input) INTEGER
-! The dimension of the matrix A.
-!
-! NRHS (input) INTEGER
-! The requested number of right-hand sides.
-!
-! A (output) DOUBLE PRECISION array, dimension (LDA, N)
-! The generated scaled Hilbert matrix.
-!
-! LDA (input) INTEGER
-! The leading dimension of the array A. LDA >= N.
-!
-! X (output) DOUBLE PRECISION array, dimension (LDX, NRHS)
-! The generated exact solutions. Currently, the first NRHS
-! columns of the inverse Hilbert matrix.
-!
-! LDX (input) INTEGER
-! The leading dimension of the array X. LDX >= N.
-!
-! B (output) DOUBLE PRECISION array, dimension (LDB, NRHS)
-! The generated right-hand sides. Currently, the first NRHS
-! columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
-!
-! LDB (input) INTEGER
-! The leading dimension of the array B. LDB >= N.
-!
-! WORK (workspace) DOUBLE PRECISION array, dimension (N)
-!
-!
-! INFO (output) INTEGER
-! = 0: successful exit
-! = 1: N is too large; the data is still generated but may not
-! be not exact.
-! < 0: if INFO = -i, the i-th argument had an illegal value
-!
-! =====================================================================
+* ..
+*
+* =====================================================================
-! .. Local Scalars ..
+* .. Local Scalars ..
INTEGER TM, TI, R
INTEGER M
INTEGER I, J
COMPLEX*16 TMP
-! .. Parameters ..
-! NMAX_EXACT the largest dimension where the generated data is
-! exact.
-! NMAX_APPROX the largest dimension where the generated data has
-! a small componentwise relative error.
+* .. Parameters ..
+* NMAX_EXACT the largest dimension where the generated data is
+* exact.
+* NMAX_APPROX the largest dimension where the generated data has
+* a small componentwise relative error.
INTEGER NMAX_EXACT, NMAX_APPROX
PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11)
-! ..
-! .. External Functions
+* ..
+* .. External Functions
EXTERNAL DLASET
INTRINSIC DBLE
-! ..
-! .. Executable Statements ..
-!
-! Test the input arguments
-!
+* ..
+* .. Executable Statements ..
+*
+* Test the input arguments
+*
INFO = 0
IF (N .LT. 0 .OR. N .GT. NMAX_APPROX) THEN
INFO = -1
@@ -122,8 +182,8 @@
INFO = 1
END IF
-! Compute M = the LCM of the integers [1, 2*N-1]. The largest
-! reasonable N is small enough that integers suffice (up to N = 11).
+* Compute M = the LCM of the integers [1, 2*N-1]. The largest
+* reasonable N is small enough that integers suffice (up to N = 11).
M = 1
DO I = 2, (2*N-1)
TM = M
@@ -137,21 +197,21 @@
M = (M / TI) * I
END DO
-! Generate the scaled Hilbert matrix in A
+* Generate the scaled Hilbert matrix in A
DO J = 1, N
DO I = 1, N
A(I, J) = DBLE(M) / (I + J - 1)
END DO
END DO
-! Generate matrix B as simply the first NRHS columns of M * the
-! identity.
+* Generate matrix B as simply the first NRHS columns of M * the
+* identity.
TMP = DBLE(M)
CALL DLASET('Full', N, NRHS, 0.0D+0, TMP, B, LDB)
-! Generate the true solutions in X. Because B = the first NRHS
-! columns of M*I, the true solutions are just the first NRHS columns
-! of the inverse Hilbert matrix.
+* Generate the true solutions in X. Because B = the first NRHS
+* columns of M*I, the true solutions are just the first NRHS columns
+* of the inverse Hilbert matrix.
WORK(1) = N
DO J = 2, N
WORK(J) = ( ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1) )
diff --git a/TESTING/MATGEN/dlakf2.f b/TESTING/MATGEN/dlakf2.f
index 052719b8..57fe12aa 100644
--- a/TESTING/MATGEN/dlakf2.f
+++ b/TESTING/MATGEN/dlakf2.f
@@ -1,54 +1,125 @@
- SUBROUTINE DLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDZ, M, N
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDA, * ), D( LDA, * ),
- $ E( LDA, * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b DLAKF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDA, * ), D( LDA, * ),
+* $ E( LDA, * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* Form the 2*M*N by 2*M*N matrix
-*
-* Z = [ kron(In, A) -kron(B', Im) ]
-* [ kron(In, D) -kron(E', Im) ],
-*
-* where In is the identity matrix of size n and X' is the transpose
-* of X. kron(X, Y) is the Kronecker product between the matrices X
-* and Y.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Form the 2*M*N by 2*M*N matrix
+*>
+*> Z = [ kron(In, A) -kron(B', Im) ]
+*> [ kron(In, D) -kron(E', Im) ],
+*>
+*> where In is the identity matrix of size n and X' is the transpose
+*> of X. kron(X, Y) is the Kronecker product between the matrices X
+*> and Y.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Size of matrix, must be >= 1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Size of matrix, must be >= 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Size of matrix, must be >= 1.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is DOUBLE PRECISION, dimension ( LDA, M )
+*> The matrix A in the output matrix Z.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, D, and E. ( LDA >= M+N )
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is DOUBLE PRECISION, dimension ( LDA, N )
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION, dimension ( LDA, M )
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is DOUBLE PRECISION, dimension ( LDA, N )
+*> \endverbatim
+*> \verbatim
+*> The matrices used in forming the output matrix Z.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is DOUBLE PRECISION, dimension ( LDZ, 2*M*N )
+*> The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of Z. ( LDZ >= 2*M*N )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Size of matrix, must be >= 1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) DOUBLE PRECISION, dimension ( LDA, M )
-* The matrix A in the output matrix Z.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of A, B, D, and E. ( LDA >= M+N )
+*> \ingroup double_matgen
*
-* B (input) DOUBLE PRECISION, dimension ( LDA, N )
-* D (input) DOUBLE PRECISION, dimension ( LDA, M )
-* E (input) DOUBLE PRECISION, dimension ( LDA, N )
-* The matrices used in forming the output matrix Z.
+* =====================================================================
+ SUBROUTINE DLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
*
-* Z (output) DOUBLE PRECISION, dimension ( LDZ, 2*M*N )
-* The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDZ (input) INTEGER
-* The leading dimension of Z. ( LDZ >= 2*M*N )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDZ, M, N
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDA, * ), D( LDA, * ),
+ $ E( LDA, * ), Z( LDZ, * )
+* ..
*
* ====================================================================
*
diff --git a/TESTING/MATGEN/dlaran.f b/TESTING/MATGEN/dlaran.f
index cb4481b4..cfd008ee 100644
--- a/TESTING/MATGEN/dlaran.f
+++ b/TESTING/MATGEN/dlaran.f
@@ -1,40 +1,84 @@
- DOUBLE PRECISION FUNCTION DLARAN( ISEED )
+*> \brief \b DLARAN
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLARAN( ISEED )
+*
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* ..
+*
* Purpose
* =======
*
-* DLARAN returns a random real number from a uniform (0,1)
-* distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARAN returns a random real number from a uniform (0,1)
+*> distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup list_temp
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine uses a multiplicative congruential method with modulus
+*> 2**48 and multiplier 33952834046453 (see G.S.Fishman,
+*> 'Multiplicative congruential random number generators with modulus
+*> 2**b: an exhaustive analysis for b = 32 and a partial analysis for
+*> b = 48', Math. Comp. 189, pp 331-344, 1990).
+*>
+*> 48-bit integers are stored in 4 integer array elements with 12 bits
+*> per element. Hence the routine is portable across machines with
+*> integers of 32 bits or more.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLARAN( ISEED )
*
-* This routine uses a multiplicative congruential method with modulus
-* 2**48 and multiplier 33952834046453 (see G.S.Fishman,
-* 'Multiplicative congruential random number generators with modulus
-* 2**b: an exhaustive analysis for b = 32 and a partial analysis for
-* b = 48', Math. Comp. 189, pp 331-344, 1990).
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 48-bit integers are stored in 4 integer array elements with 12 bits
-* per element. Hence the routine is portable across machines with
-* integers of 32 bits or more.
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/dlarge.f b/TESTING/MATGEN/dlarge.f
index 3b6d444e..e7e77e2a 100644
--- a/TESTING/MATGEN/dlarge.f
+++ b/TESTING/MATGEN/dlarge.f
@@ -1,48 +1,106 @@
- SUBROUTINE DLARGE( N, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1)
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b DLARGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLARGE( N, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* DLARGE pre- and post-multiplies a real general n by n matrix A
-* with a random orthogonal matrix: A = U*D*U'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARGE pre- and post-multiplies a real general n by n matrix A
+*> with a random orthogonal matrix: A = U*D*U'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On entry, the original n by n matrix A.
+*> On exit, A is overwritten by U*A*U' for some random
+*> orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
-* On entry, the original n by n matrix A.
-* On exit, A is overwritten by U*A*U' for some random
-* orthogonal matrix U.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup double_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE DLARGE( N, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/dlarnd.f b/TESTING/MATGEN/dlarnd.f
index a84ec8a9..3716cddd 100644
--- a/TESTING/MATGEN/dlarnd.f
+++ b/TESTING/MATGEN/dlarnd.f
@@ -1,43 +1,93 @@
- DOUBLE PRECISION FUNCTION DLARND( IDIST, ISEED )
+*> \brief \b DLARND
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IDIST
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* DOUBLE PRECISION FUNCTION DLARND( IDIST, ISEED )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* ..
+*
* Purpose
* =======
*
-* DLARND returns a random real number from a uniform or normal
-* distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLARND returns a random real number from a uniform or normal
+*> distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IDIST (input) INTEGER
-* Specifies the distribution of the random numbers:
-* = 1: uniform (0,1)
-* = 2: uniform (-1,1)
-* = 3: normal (0,1)
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the distribution of the random numbers:
+*> = 1: uniform (0,1)
+*> = 2: uniform (-1,1)
+*> = 3: normal (0,1)
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine calls the auxiliary routine DLARAN to generate a random
+*> real number from a uniform (0,1) distribution. The Box-Muller method
+*> is used to transform numbers from a uniform to a normal distribution.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ DOUBLE PRECISION FUNCTION DLARND( IDIST, ISEED )
*
-* This routine calls the auxiliary routine DLARAN to generate a random
-* real number from a uniform (0,1) distribution. The Box-Muller method
-* is used to transform numbers from a uniform to a normal distribution.
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER IDIST
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/dlaror.f b/TESTING/MATGEN/dlaror.f
index 468e37cd..e4a62686 100644
--- a/TESTING/MATGEN/dlaror.f
+++ b/TESTING/MATGEN/dlaror.f
@@ -1,8 +1,161 @@
+*> \brief \b DLAROR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAROR( SIDE, INIT, M, N, A, LDA, ISEED, X, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER INIT, SIDE
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAROR pre- or post-multiplies an M by N matrix A by a random
+*> orthogonal matrix U, overwriting A. A may optionally be initialized
+*> to the identity matrix before multiplying by U. U is generated using
+*> the method of G.W. Stewart (SIAM J. Numer. Anal. 17, 1980, 403-409).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> Specifies whether A is multiplied on the left or right by U.
+*> = 'L': Multiply A on the left (premultiply) by U
+*> = 'R': Multiply A on the right (postmultiply) by U'
+*> = 'C' or 'T': Multiply A on the left by U and the right
+*> by U' (Here, U' means U-transpose.)
+*> \endverbatim
+*>
+*> \param[in] INIT
+*> \verbatim
+*> INIT is CHARACTER*1
+*> Specifies whether or not A should be initialized to the
+*> identity matrix.
+*> = 'I': Initialize A to (a section of) the identity matrix
+*> before applying U.
+*> = 'N': No initialization. Apply U to the input matrix A.
+*> \endverbatim
+*> \verbatim
+*> INIT = 'I' may be used to generate square or rectangular
+*> orthogonal matrices:
+*> \endverbatim
+*> \verbatim
+*> For M = N and SIDE = 'L' or 'R', the rows will be orthogonal
+*> to each other, as will the columns.
+*> \endverbatim
+*> \verbatim
+*> If M < N, SIDE = 'R' produces a dense matrix whose rows are
+*> orthogonal and whose columns are not, while SIDE = 'L'
+*> produces a matrix whose rows are orthogonal, and whose first
+*> M columns are orthogonal, and whose remaining columns are
+*> zero.
+*> \endverbatim
+*> \verbatim
+*> If M > N, SIDE = 'L' produces a dense matrix whose columns
+*> are orthogonal and whose rows are not, while SIDE = 'R'
+*> produces a matrix whose columns are orthogonal, and whose
+*> first M rows are orthogonal, and whose remaining rows are
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N)
+*> On entry, the array A.
+*> On exit, overwritten by U A ( if SIDE = 'L' ),
+*> or by A U ( if SIDE = 'R' ),
+*> or by U A U' ( if SIDE = 'C' or 'T').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to DLAROR to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (3*MAX( M, N ))
+*> Workspace of length
+*> 2*M + N if SIDE = 'L',
+*> 2*N + M if SIDE = 'R',
+*> 3*N if SIDE = 'C' or 'T'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> An error flag. It is set to:
+*> = 0: normal return
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> = 1: if the random numbers generated by DLARND are bad.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
SUBROUTINE DLAROR( SIDE, INIT, M, N, A, LDA, ISEED, X, INFO )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER INIT, SIDE
@@ -13,87 +166,6 @@
DOUBLE PRECISION A( LDA, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* DLAROR pre- or post-multiplies an M by N matrix A by a random
-* orthogonal matrix U, overwriting A. A may optionally be initialized
-* to the identity matrix before multiplying by U. U is generated using
-* the method of G.W. Stewart (SIAM J. Numer. Anal. 17, 1980, 403-409).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* Specifies whether A is multiplied on the left or right by U.
-* = 'L': Multiply A on the left (premultiply) by U
-* = 'R': Multiply A on the right (postmultiply) by U'
-* = 'C' or 'T': Multiply A on the left by U and the right
-* by U' (Here, U' means U-transpose.)
-*
-* INIT (input) CHARACTER*1
-* Specifies whether or not A should be initialized to the
-* identity matrix.
-* = 'I': Initialize A to (a section of) the identity matrix
-* before applying U.
-* = 'N': No initialization. Apply U to the input matrix A.
-*
-* INIT = 'I' may be used to generate square or rectangular
-* orthogonal matrices:
-*
-* For M = N and SIDE = 'L' or 'R', the rows will be orthogonal
-* to each other, as will the columns.
-*
-* If M < N, SIDE = 'R' produces a dense matrix whose rows are
-* orthogonal and whose columns are not, while SIDE = 'L'
-* produces a matrix whose rows are orthogonal, and whose first
-* M columns are orthogonal, and whose remaining columns are
-* zero.
-*
-* If M > N, SIDE = 'L' produces a dense matrix whose columns
-* are orthogonal and whose rows are not, while SIDE = 'R'
-* produces a matrix whose columns are orthogonal, and whose
-* first M rows are orthogonal, and whose remaining rows are
-* zero.
-*
-* M (input) INTEGER
-* The number of rows of A.
-*
-* N (input) INTEGER
-* The number of columns of A.
-*
-* A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
-* On entry, the array A.
-* On exit, overwritten by U A ( if SIDE = 'L' ),
-* or by A U ( if SIDE = 'R' ),
-* or by U A U' ( if SIDE = 'C' or 'T').
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to DLAROR to continue the same random number
-* sequence.
-*
-* X (workspace) DOUBLE PRECISION array, dimension (3*MAX( M, N ))
-* Workspace of length
-* 2*M + N if SIDE = 'L',
-* 2*N + M if SIDE = 'R',
-* 3*N if SIDE = 'C' or 'T'.
-*
-* INFO (output) INTEGER
-* An error flag. It is set to:
-* = 0: normal return
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* = 1: if the random numbers generated by DLARND are bad.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlarot.f b/TESTING/MATGEN/dlarot.f
index 319ab1a8..aa899b2a 100644
--- a/TESTING/MATGEN/dlarot.f
+++ b/TESTING/MATGEN/dlarot.f
@@ -1,202 +1,254 @@
- SUBROUTINE DLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
- $ XRIGHT )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- LOGICAL LLEFT, LRIGHT, LROWS
- INTEGER LDA, NL
- DOUBLE PRECISION C, S, XLEFT, XRIGHT
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( * )
-* ..
-*
+*> \brief \b DLAROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
+* XRIGHT )
+*
+* .. Scalar Arguments ..
+* LOGICAL LLEFT, LRIGHT, LROWS
+* INTEGER LDA, NL
+* DOUBLE PRECISION C, S, XLEFT, XRIGHT
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( * )
+* ..
+*
* Purpose
* =======
*
-* DLAROT applies a (Givens) rotation to two adjacent rows or
-* columns, where one element of the first and/or last column/row
-* for use on matrices stored in some format other than GE, so
-* that elements of the matrix may be used or modified for which
-* no array element is provided.
-*
-* One example is a symmetric matrix in SB format (bandwidth=4), for
-* which UPLO='L': Two adjacent rows will have the format:
-*
-* row j: * * * * * . . . .
-* row j+1: * * * * * . . . .
-*
-* '*' indicates elements for which storage is provided,
-* '.' indicates elements for which no storage is provided, but
-* are not necessarily zero; their values are determined by
-* symmetry. ' ' indicates elements which are necessarily zero,
-* and have no storage provided.
-*
-* Those columns which have two '*'s can be handled by DROT.
-* Those columns which have no '*'s can be ignored, since as long
-* as the Givens rotations are carefully applied to preserve
-* symmetry, their values are determined.
-* Those columns which have one '*' have to be handled separately,
-* by using separate variables "p" and "q":
-*
-* row j: * * * * * p . . .
-* row j+1: q * * * * * . . . .
-*
-* The element p would have to be set correctly, then that column
-* is rotated, setting p to its new value. The next call to
-* DLAROT would rotate columns j and j+1, using p, and restore
-* symmetry. The element q would start out being zero, and be
-* made non-zero by the rotation. Later, rotations would presumably
-* be chosen to zero q out.
-*
-* Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
-* ------- ------- ---------
-*
-* General dense matrix:
-*
-* CALL DLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
-* A(i,1),LDA, DUMMY, DUMMY)
-*
-* General banded matrix in GB format:
-*
-* j = MAX(1, i-KL )
-* NL = MIN( N, i+KU+1 ) + 1-j
-* CALL DLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
-* A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
-*
-* [ note that i+1-j is just MIN(i,KL+1) ]
-*
-* Symmetric banded matrix in SY format, bandwidth K,
-* lower triangle only:
-*
-* j = MAX(1, i-K )
-* NL = MIN( K+1, i ) + 1
-* CALL DLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
-* A(i,j), LDA, XLEFT, XRIGHT )
-*
-* Same, but upper triangle only:
-*
-* NL = MIN( K+1, N-i ) + 1
-* CALL DLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
-* A(i,i), LDA, XLEFT, XRIGHT )
-*
-* Symmetric banded matrix in SB format, bandwidth K,
-* lower triangle only:
-*
-* [ same as for SY, except:]
-* . . . .
-* A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
-*
-* [ note that i+1-j is just MIN(i,K+1) ]
-*
-* Same, but upper triangle only:
-* . . .
-* A(K+1,i), LDA-1, XLEFT, XRIGHT )
-*
-* Rotating columns is just the transpose of rotating rows, except
-* for GB and SB: (rotating columns i and i+1)
-*
-* GB:
-* j = MAX(1, i-KU )
-* NL = MIN( N, i+KL+1 ) + 1-j
-* CALL DLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
-* A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
-*
-* [note that KU+j+1-i is just MAX(1,KU+2-i)]
-*
-* SB: (upper triangle)
-*
-* . . . . . .
-* A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
-*
-* SB: (lower triangle)
-*
-* . . . . . .
-* A(1,i),LDA-1, XTOP, XBOTTM )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLAROT applies a (Givens) rotation to two adjacent rows or
+*> columns, where one element of the first and/or last column/row
+*> for use on matrices stored in some format other than GE, so
+*> that elements of the matrix may be used or modified for which
+*> no array element is provided.
+*>
+*> One example is a symmetric matrix in SB format (bandwidth=4), for
+*> which UPLO='L': Two adjacent rows will have the format:
+*>
+*> row j: C> C> C> C> C> . . . .
+*> row j+1: C> C> C> C> C> . . . .
+*>
+*> '*' indicates elements for which storage is provided,
+*> '.' indicates elements for which no storage is provided, but
+*> are not necessarily zero; their values are determined by
+*> symmetry. ' ' indicates elements which are necessarily zero,
+*> and have no storage provided.
+*>
+*> Those columns which have two '*'s can be handled by DROT.
+*> Those columns which have no '*'s can be ignored, since as long
+*> as the Givens rotations are carefully applied to preserve
+*> symmetry, their values are determined.
+*> Those columns which have one '*' have to be handled separately,
+*> by using separate variables "p" and "q":
+*>
+*> row j: C> C> C> C> C> p . . .
+*> row j+1: q C> C> C> C> C> . . . .
+*>
+*> The element p would have to be set correctly, then that column
+*> is rotated, setting p to its new value. The next call to
+*> DLAROT would rotate columns j and j+1, using p, and restore
+*> symmetry. The element q would start out being zero, and be
+*> made non-zero by the rotation. Later, rotations would presumably
+*> be chosen to zero q out.
+*>
+*> Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
+*> ------- ------- ---------
+*>
+*> General dense matrix:
+*>
+*> CALL DLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
+*> A(i,1),LDA, DUMMY, DUMMY)
+*>
+*> General banded matrix in GB format:
+*>
+*> j = MAX(1, i-KL )
+*> NL = MIN( N, i+KU+1 ) + 1-j
+*> CALL DLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
+*> A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
+*>
+*> [ note that i+1-j is just MIN(i,KL+1) ]
+*>
+*> Symmetric banded matrix in SY format, bandwidth K,
+*> lower triangle only:
+*>
+*> j = MAX(1, i-K )
+*> NL = MIN( K+1, i ) + 1
+*> CALL DLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
+*> A(i,j), LDA, XLEFT, XRIGHT )
+*>
+*> Same, but upper triangle only:
+*>
+*> NL = MIN( K+1, N-i ) + 1
+*> CALL DLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
+*> A(i,i), LDA, XLEFT, XRIGHT )
+*>
+*> Symmetric banded matrix in SB format, bandwidth K,
+*> lower triangle only:
+*>
+*> [ same as for SY, except:]
+*> . . . .
+*> A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
+*>
+*> [ note that i+1-j is just MIN(i,K+1) ]
+*>
+*> Same, but upper triangle only:
+*> . . .
+*> A(K+1,i), LDA-1, XLEFT, XRIGHT )
+*>
+*> Rotating columns is just the transpose of rotating rows, except
+*> for GB and SB: (rotating columns i and i+1)
+*>
+*> GB:
+*> j = MAX(1, i-KU )
+*> NL = MIN( N, i+KL+1 ) + 1-j
+*> CALL DLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
+*> A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
+*>
+*> [note that KU+j+1-i is just MAX(1,KU+2-i)]
+*>
+*> SB: (upper triangle)
+*>
+*> . . . . . .
+*> A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
+*>
+*> SB: (lower triangle)
+*>
+*> . . . . . .
+*> A(1,i),LDA-1, XTOP, XBOTTM )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* LROWS - LOGICAL
-* If .TRUE., then DLAROT will rotate two rows. If .FALSE.,
-* then it will rotate two columns.
-* Not modified.
-*
-* LLEFT - LOGICAL
-* If .TRUE., then XLEFT will be used instead of the
-* corresponding element of A for the first element in the
-* second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
-* If .FALSE., then the corresponding element of A will be
-* used.
-* Not modified.
-*
-* LRIGHT - LOGICAL
-* If .TRUE., then XRIGHT will be used instead of the
-* corresponding element of A for the last element in the
-* first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
-* .FALSE., then the corresponding element of A will be used.
-* Not modified.
+*> \verbatim
+*> LROWS - LOGICAL
+*> If .TRUE., then DLAROT will rotate two rows. If .FALSE.,
+*> then it will rotate two columns.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LLEFT - LOGICAL
+*> If .TRUE., then XLEFT will be used instead of the
+*> corresponding element of A for the first element in the
+*> second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
+*> If .FALSE., then the corresponding element of A will be
+*> used.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LRIGHT - LOGICAL
+*> If .TRUE., then XRIGHT will be used instead of the
+*> corresponding element of A for the last element in the
+*> first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
+*> .FALSE., then the corresponding element of A will be used.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NL - INTEGER
+*> The length of the rows (if LROWS=.TRUE.) or columns (if
+*> LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
+*> used, the columns/rows they are in should be included in
+*> NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
+*> least 2. The number of rows/columns to be rotated
+*> exclusive of those involving XLEFT and/or XRIGHT may
+*> not be negative, i.e., NL minus how many of LLEFT and
+*> LRIGHT are .TRUE. must be at least zero; if not, XERBLA
+*> will be called.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> C, S - DOUBLE PRECISION
+*> Specify the Givens rotation to be applied. If LROWS is
+*> true, then the matrix ( c s )
+*> (-s c ) is applied from the left;
+*> if false, then the transpose thereof is applied from the
+*> right. For a Givens rotation, C**2 + S**2 should be 1,
+*> but this is not checked.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A - DOUBLE PRECISION array.
+*> The array containing the rows/columns to be rotated. The
+*> first element of A should be the upper left element to
+*> be rotated.
+*> Read and modified.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> The "effective" leading dimension of A. If A contains
+*> a matrix stored in GE or SY format, then this is just
+*> the leading dimension of A as dimensioned in the calling
+*> routine. If A contains a matrix stored in band (GB or SB)
+*> format, then this should be *one less* than the leading
+*> dimension used in the calling routine. Thus, if
+*> A were dimensioned A(LDA,*) in DLAROT, then A(1,j) would
+*> be the j-th element in the first of the two rows
+*> to be rotated, and A(2,j) would be the j-th in the second,
+*> regardless of how the array may be stored in the calling
+*> routine. [A cannot, however, actually be dimensioned thus,
+*> since for band format, the row number may exceed LDA, which
+*> is not legal FORTRAN.]
+*> If LROWS=.TRUE., then LDA must be at least 1, otherwise
+*> it must be at least NL minus the number of .TRUE. values
+*> in XLEFT and XRIGHT.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> XLEFT - DOUBLE PRECISION
+*> If LLEFT is .TRUE., then XLEFT will be used and modified
+*> instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
+*> (if LROWS=.FALSE.).
+*> Read and modified.
+*> \endverbatim
+*> \verbatim
+*> XRIGHT - DOUBLE PRECISION
+*> If LRIGHT is .TRUE., then XRIGHT will be used and modified
+*> instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
+*> (if LROWS=.FALSE.).
+*> Read and modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NL - INTEGER
-* The length of the rows (if LROWS=.TRUE.) or columns (if
-* LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
-* used, the columns/rows they are in should be included in
-* NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
-* least 2. The number of rows/columns to be rotated
-* exclusive of those involving XLEFT and/or XRIGHT may
-* not be negative, i.e., NL minus how many of LLEFT and
-* LRIGHT are .TRUE. must be at least zero; if not, XERBLA
-* will be called.
-* Not modified.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C, S - DOUBLE PRECISION
-* Specify the Givens rotation to be applied. If LROWS is
-* true, then the matrix ( c s )
-* (-s c ) is applied from the left;
-* if false, then the transpose thereof is applied from the
-* right. For a Givens rotation, C**2 + S**2 should be 1,
-* but this is not checked.
-* Not modified.
+*> \date November 2011
*
-* A - DOUBLE PRECISION array.
-* The array containing the rows/columns to be rotated. The
-* first element of A should be the upper left element to
-* be rotated.
-* Read and modified.
+*> \ingroup double_matgen
*
-* LDA - INTEGER
-* The "effective" leading dimension of A. If A contains
-* a matrix stored in GE or SY format, then this is just
-* the leading dimension of A as dimensioned in the calling
-* routine. If A contains a matrix stored in band (GB or SB)
-* format, then this should be *one less* than the leading
-* dimension used in the calling routine. Thus, if
-* A were dimensioned A(LDA,*) in DLAROT, then A(1,j) would
-* be the j-th element in the first of the two rows
-* to be rotated, and A(2,j) would be the j-th in the second,
-* regardless of how the array may be stored in the calling
-* routine. [A cannot, however, actually be dimensioned thus,
-* since for band format, the row number may exceed LDA, which
-* is not legal FORTRAN.]
-* If LROWS=.TRUE., then LDA must be at least 1, otherwise
-* it must be at least NL minus the number of .TRUE. values
-* in XLEFT and XRIGHT.
-* Not modified.
+* =====================================================================
+ SUBROUTINE DLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
+ $ XRIGHT )
*
-* XLEFT - DOUBLE PRECISION
-* If LLEFT is .TRUE., then XLEFT will be used and modified
-* instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
-* (if LROWS=.FALSE.).
-* Read and modified.
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* XRIGHT - DOUBLE PRECISION
-* If LRIGHT is .TRUE., then XRIGHT will be used and modified
-* instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
-* (if LROWS=.FALSE.).
-* Read and modified.
+* .. Scalar Arguments ..
+ LOGICAL LLEFT, LRIGHT, LROWS
+ INTEGER LDA, NL
+ DOUBLE PRECISION C, S, XLEFT, XRIGHT
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/dlatm1.f b/TESTING/MATGEN/dlatm1.f
index e113e985..f8cbb9c9 100644
--- a/TESTING/MATGEN/dlatm1.f
+++ b/TESTING/MATGEN/dlatm1.f
@@ -1,8 +1,146 @@
+*> \brief \b DLATM1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATM1( MODE, COND, IRSIGN, IDIST, ISEED, D, N, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, INFO, IRSIGN, MODE, N
+* DOUBLE PRECISION COND
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION D( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATM1 computes the entries of D(1..N) as specified by
+*> MODE, COND and IRSIGN. IDIST and ISEED determine the generation
+*> of random numbers. DLATM1 is called by SLATMR to generate
+*> random test matrices for LAPACK programs.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry describes how D is to be computed:
+*> MODE = 0 means do not change D.
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IRSIGN
+*> \verbatim
+*> IRSIGN is INTEGER
+*> On entry, if MODE neither -6, 0 nor 6, determines sign of
+*> entries of D
+*> 0 => leave entries of D unchanged
+*> 1 => multiply each entry of D by 1 or -1 with probability .5
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is CHARACTER*1
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => UNIFORM( 0, 1 )
+*> 2 => UNIFORM( -1, 1 )
+*> 3 => NORMAL( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. The random number generator uses a
+*> linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to DLATM1
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( MIN( M , N ) )
+*> Array to be computed according to MODE, COND and IRSIGN.
+*> May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of entries of D. Not modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 => normal termination
+*> -1 => if MODE not in range -6 to 6
+*> -2 => if MODE neither -6, 0 nor 6, and
+*> IRSIGN neither 0 nor 1
+*> -3 => if MODE neither -6, 0 nor 6 and COND less than 1
+*> -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
+*> -7 => if N negative
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
SUBROUTINE DLATM1( MODE, COND, IRSIGN, IDIST, ISEED, D, N, INFO )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IDIST, INFO, IRSIGN, MODE, N
@@ -13,79 +151,6 @@
DOUBLE PRECISION D( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATM1 computes the entries of D(1..N) as specified by
-* MODE, COND and IRSIGN. IDIST and ISEED determine the generation
-* of random numbers. DLATM1 is called by SLATMR to generate
-* random test matrices for LAPACK programs.
-*
-* Arguments
-* =========
-*
-* MODE (input) INTEGER
-* On entry describes how D is to be computed:
-* MODE = 0 means do not change D.
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* IRSIGN (input) INTEGER
-* On entry, if MODE neither -6, 0 nor 6, determines sign of
-* entries of D
-* 0 => leave entries of D unchanged
-* 1 => multiply each entry of D by 1 or -1 with probability .5
-*
-* IDIST (input) CHARACTER*1
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => UNIFORM( 0, 1 )
-* 2 => UNIFORM( -1, 1 )
-* 3 => NORMAL( 0, 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. The random number generator uses a
-* linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to DLATM1
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( MIN( M , N ) )
-* Array to be computed according to MODE, COND and IRSIGN.
-* May be changed on exit if MODE is nonzero.
-*
-* N (input) INTEGER
-* Number of entries of D. Not modified.
-*
-* INFO (output) INTEGER
-* 0 => normal termination
-* -1 => if MODE not in range -6 to 6
-* -2 => if MODE neither -6, 0 nor 6, and
-* IRSIGN neither 0 nor 1
-* -3 => if MODE neither -6, 0 nor 6 and COND less than 1
-* -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
-* -7 => if N negative
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlatm2.f b/TESTING/MATGEN/dlatm2.f
index d803608d..1f3eaf38 100644
--- a/TESTING/MATGEN/dlatm2.f
+++ b/TESTING/MATGEN/dlatm2.f
@@ -1,9 +1,219 @@
+*> \brief \b DLATM2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLATM2( M, N, I, J, KL, KU, IDIST,
+* ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
+*
+* .. Scalar Arguments ..
+*
+* INTEGER I, IDIST, IGRADE, IPVTNG, J, KL, KU, M, N
+* DOUBLE PRECISION SPARSE
+* ..
+*
+* .. Array Arguments ..
+*
+* INTEGER ISEED( 4 ), IWORK( * )
+* DOUBLE PRECISION D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATM2 returns the (I,J) entry of a random matrix of dimension
+*> (M, N) described by the other paramters. It is called by the
+*> DLATMR routine in order to build random test matrices. No error
+*> checking on parameters is done, because this routine is called in
+*> a tight loop by DLATMR which has already checked the parameters.
+*>
+*> Use of DLATM2 differs from SLATM3 in the order in which the random
+*> number generator is called to fill in random matrix entries.
+*> With DLATM2, the generator is called to fill in the pivoted matrix
+*> columnwise. With DLATM3, the generator is called to fill in the
+*> matrix columnwise, after which it is pivoted. Thus, DLATM3 can
+*> be used to construct random matrices which differ only in their
+*> order of rows and/or columns. DLATM2 is used to construct band
+*> matrices while avoiding calling the random number generator for
+*> entries outside the band (and therefore generating random numbers
+*>
+*> The matrix whose (I,J) entry is returned is constructed as
+*> follows (this routine only computes one entry):
+*>
+*> If I is outside (1..M) or J is outside (1..N), return zero
+*> (this is convenient for generating matrices in band format).
+*>
+*> Generate a matrix A with random entries of distribution IDIST.
+*>
+*> Set the diagonal to D.
+*>
+*> Grade the matrix, if desired, from the left (by DL) and/or
+*> from the right (by DR or DL) as specified by IGRADE.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> IPVTNG and IWORK.
+*>
+*> Band the matrix to have lower bandwidth KL and upper
+*> bandwidth KU.
+*>
+*> Set random entries to zero as specified by SPARSE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> Row of entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Column of entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Lower bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Upper bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => UNIFORM( 0, 1 )
+*> 2 => UNIFORM( -1, 1 )
+*> 3 => NORMAL( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array of dimension ( 4 )
+*> Seed for random number generator.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array of dimension ( MIN( I , J ) )
+*> Diagonal entries of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IGRADE
+*> \verbatim
+*> IGRADE is INTEGER
+*> Specifies grading of matrix as follows:
+*> 0 => no grading
+*> 1 => matrix premultiplied by diag( DL )
+*> 2 => matrix postmultiplied by diag( DR )
+*> 3 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> 4 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> 5 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array ( I or J, as appropriate )
+*> Left scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DR
+*> \verbatim
+*> DR is DOUBLE PRECISION array ( I or J, as appropriate )
+*> Right scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IPVTNG
+*> \verbatim
+*> IPVTNG is INTEGER
+*> On entry specifies pivoting permutations as follows:
+*> 0 => none.
+*> 1 => row pivoting.
+*> 2 => column pivoting.
+*> 3 => full pivoting, i.e., on both sides.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array ( I or J, as appropriate )
+*> This array specifies the permutation used. The
+*> row (or column) in position K was originally in
+*> position IWORK( K ).
+*> This differs from IWORK for DLATM3. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is DOUBLE PRECISION between 0. and 1.
+*> On entry specifies the sparsity of the matrix
+*> if sparse matix is to be generated.
+*> SPARSE should lie between 0 and 1.
+*> A uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLATM2( M, N, I, J, KL, KU, IDIST,
$ ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
*
@@ -17,126 +227,6 @@
DOUBLE PRECISION D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATM2 returns the (I,J) entry of a random matrix of dimension
-* (M, N) described by the other paramters. It is called by the
-* DLATMR routine in order to build random test matrices. No error
-* checking on parameters is done, because this routine is called in
-* a tight loop by DLATMR which has already checked the parameters.
-*
-* Use of DLATM2 differs from SLATM3 in the order in which the random
-* number generator is called to fill in random matrix entries.
-* With DLATM2, the generator is called to fill in the pivoted matrix
-* columnwise. With DLATM3, the generator is called to fill in the
-* matrix columnwise, after which it is pivoted. Thus, DLATM3 can
-* be used to construct random matrices which differ only in their
-* order of rows and/or columns. DLATM2 is used to construct band
-* matrices while avoiding calling the random number generator for
-* entries outside the band (and therefore generating random numbers
-*
-* The matrix whose (I,J) entry is returned is constructed as
-* follows (this routine only computes one entry):
-*
-* If I is outside (1..M) or J is outside (1..N), return zero
-* (this is convenient for generating matrices in band format).
-*
-* Generate a matrix A with random entries of distribution IDIST.
-*
-* Set the diagonal to D.
-*
-* Grade the matrix, if desired, from the left (by DL) and/or
-* from the right (by DR or DL) as specified by IGRADE.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* IPVTNG and IWORK.
-*
-* Band the matrix to have lower bandwidth KL and upper
-* bandwidth KU.
-*
-* Set random entries to zero as specified by SPARSE.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of matrix. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of matrix. Not modified.
-*
-* I (input) INTEGER
-* Row of entry to be returned. Not modified.
-*
-* J (input) INTEGER
-* Column of entry to be returned. Not modified.
-*
-* KL (input) INTEGER
-* Lower bandwidth. Not modified.
-*
-* KU (input) INTEGER
-* Upper bandwidth. Not modified.
-*
-* IDIST (input) INTEGER
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => UNIFORM( 0, 1 )
-* 2 => UNIFORM( -1, 1 )
-* 3 => NORMAL( 0, 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array of dimension ( 4 )
-* Seed for random number generator.
-* Changed on exit.
-*
-* D (input) DOUBLE PRECISION array of dimension ( MIN( I , J ) )
-* Diagonal entries of matrix. Not modified.
-*
-* IGRADE (input) INTEGER
-* Specifies grading of matrix as follows:
-* 0 => no grading
-* 1 => matrix premultiplied by diag( DL )
-* 2 => matrix postmultiplied by diag( DR )
-* 3 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* 4 => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* 5 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* Not modified.
-*
-* DL (input) DOUBLE PRECISION array ( I or J, as appropriate )
-* Left scale factors for grading matrix. Not modified.
-*
-* DR (input) DOUBLE PRECISION array ( I or J, as appropriate )
-* Right scale factors for grading matrix. Not modified.
-*
-* IPVTNG (input) INTEGER
-* On entry specifies pivoting permutations as follows:
-* 0 => none.
-* 1 => row pivoting.
-* 2 => column pivoting.
-* 3 => full pivoting, i.e., on both sides.
-* Not modified.
-*
-* IWORK (workspace) INTEGER array ( I or J, as appropriate )
-* This array specifies the permutation used. The
-* row (or column) in position K was originally in
-* position IWORK( K ).
-* This differs from IWORK for DLATM3. Not modified.
-*
-* SPARSE (input) DOUBLE PRECISION between 0. and 1.
-* On entry specifies the sparsity of the matrix
-* if sparse matix is to be generated.
-* SPARSE should lie between 0 and 1.
-* A uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlatm3.f b/TESTING/MATGEN/dlatm3.f
index 3b8bb363..10d1b2ba 100644
--- a/TESTING/MATGEN/dlatm3.f
+++ b/TESTING/MATGEN/dlatm3.f
@@ -1,10 +1,237 @@
+*> \brief \b DLATM3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* DOUBLE PRECISION FUNCTION DLATM3( M, N, I, J, ISUB, JSUB, KL, KU,
+* IDIST, ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK,
+* SPARSE )
+*
+* .. Scalar Arguments ..
+*
+* INTEGER I, IDIST, IGRADE, IPVTNG, ISUB, J, JSUB, KL,
+* $ KU, M, N
+* DOUBLE PRECISION SPARSE
+* ..
+*
+* .. Array Arguments ..
+*
+* INTEGER ISEED( 4 ), IWORK( * )
+* DOUBLE PRECISION D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATM3 returns the (ISUB,JSUB) entry of a random matrix of
+*> dimension (M, N) described by the other paramters. (ISUB,JSUB)
+*> is the final position of the (I,J) entry after pivoting
+*> according to IPVTNG and IWORK. DLATM3 is called by the
+*> DLATMR routine in order to build random test matrices. No error
+*> checking on parameters is done, because this routine is called in
+*> a tight loop by DLATMR which has already checked the parameters.
+*>
+*> Use of DLATM3 differs from SLATM2 in the order in which the random
+*> number generator is called to fill in random matrix entries.
+*> With DLATM2, the generator is called to fill in the pivoted matrix
+*> columnwise. With DLATM3, the generator is called to fill in the
+*> matrix columnwise, after which it is pivoted. Thus, DLATM3 can
+*> be used to construct random matrices which differ only in their
+*> order of rows and/or columns. DLATM2 is used to construct band
+*> matrices while avoiding calling the random number generator for
+*> entries outside the band (and therefore generating random numbers
+*> in different orders for different pivot orders).
+*>
+*> The matrix whose (ISUB,JSUB) entry is returned is constructed as
+*> follows (this routine only computes one entry):
+*>
+*> If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
+*> (this is convenient for generating matrices in band format).
+*>
+*> Generate a matrix A with random entries of distribution IDIST.
+*>
+*> Set the diagonal to D.
+*>
+*> Grade the matrix, if desired, from the left (by DL) and/or
+*> from the right (by DR or DL) as specified by IGRADE.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> IPVTNG and IWORK.
+*>
+*> Band the matrix to have lower bandwidth KL and upper
+*> bandwidth KU.
+*>
+*> Set random entries to zero as specified by SPARSE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> Row of unpivoted entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Column of unpivoted entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISUB
+*> \verbatim
+*> ISUB is INTEGER
+*> Row of pivoted entry to be returned. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] JSUB
+*> \verbatim
+*> JSUB is INTEGER
+*> Column of pivoted entry to be returned. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Lower bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Upper bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => UNIFORM( 0, 1 )
+*> 2 => UNIFORM( -1, 1 )
+*> 3 => NORMAL( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array of dimension ( 4 )
+*> Seed for random number generator.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array of dimension ( MIN( I , J ) )
+*> Diagonal entries of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IGRADE
+*> \verbatim
+*> IGRADE is INTEGER
+*> Specifies grading of matrix as follows:
+*> 0 => no grading
+*> 1 => matrix premultiplied by diag( DL )
+*> 2 => matrix postmultiplied by diag( DR )
+*> 3 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> 4 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> 5 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array ( I or J, as appropriate )
+*> Left scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DR
+*> \verbatim
+*> DR is DOUBLE PRECISION array ( I or J, as appropriate )
+*> Right scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IPVTNG
+*> \verbatim
+*> IPVTNG is INTEGER
+*> On entry specifies pivoting permutations as follows:
+*> 0 => none.
+*> 1 => row pivoting.
+*> 2 => column pivoting.
+*> 3 => full pivoting, i.e., on both sides.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array ( I or J, as appropriate )
+*> This array specifies the permutation used. The
+*> row (or column) originally in position K is in
+*> position IWORK( K ) after pivoting.
+*> This differs from IWORK for DLATM2. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is DOUBLE PRECISION between 0. and 1.
+*> On entry specifies the sparsity of the matrix
+*> if sparse matix is to be generated.
+*> SPARSE should lie between 0 and 1.
+*> A uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
DOUBLE PRECISION FUNCTION DLATM3( M, N, I, J, ISUB, JSUB, KL, KU,
$ IDIST, ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK,
$ SPARSE )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
*
@@ -19,135 +246,6 @@
DOUBLE PRECISION D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATM3 returns the (ISUB,JSUB) entry of a random matrix of
-* dimension (M, N) described by the other paramters. (ISUB,JSUB)
-* is the final position of the (I,J) entry after pivoting
-* according to IPVTNG and IWORK. DLATM3 is called by the
-* DLATMR routine in order to build random test matrices. No error
-* checking on parameters is done, because this routine is called in
-* a tight loop by DLATMR which has already checked the parameters.
-*
-* Use of DLATM3 differs from SLATM2 in the order in which the random
-* number generator is called to fill in random matrix entries.
-* With DLATM2, the generator is called to fill in the pivoted matrix
-* columnwise. With DLATM3, the generator is called to fill in the
-* matrix columnwise, after which it is pivoted. Thus, DLATM3 can
-* be used to construct random matrices which differ only in their
-* order of rows and/or columns. DLATM2 is used to construct band
-* matrices while avoiding calling the random number generator for
-* entries outside the band (and therefore generating random numbers
-* in different orders for different pivot orders).
-*
-* The matrix whose (ISUB,JSUB) entry is returned is constructed as
-* follows (this routine only computes one entry):
-*
-* If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
-* (this is convenient for generating matrices in band format).
-*
-* Generate a matrix A with random entries of distribution IDIST.
-*
-* Set the diagonal to D.
-*
-* Grade the matrix, if desired, from the left (by DL) and/or
-* from the right (by DR or DL) as specified by IGRADE.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* IPVTNG and IWORK.
-*
-* Band the matrix to have lower bandwidth KL and upper
-* bandwidth KU.
-*
-* Set random entries to zero as specified by SPARSE.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of matrix. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of matrix. Not modified.
-*
-* I (input) INTEGER
-* Row of unpivoted entry to be returned. Not modified.
-*
-* J (input) INTEGER
-* Column of unpivoted entry to be returned. Not modified.
-*
-* ISUB (input/output) INTEGER
-* Row of pivoted entry to be returned. Changed on exit.
-*
-* JSUB (input/output) INTEGER
-* Column of pivoted entry to be returned. Changed on exit.
-*
-* KL (input) INTEGER
-* Lower bandwidth. Not modified.
-*
-* KU (input) INTEGER
-* Upper bandwidth. Not modified.
-*
-* IDIST (input) INTEGER
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => UNIFORM( 0, 1 )
-* 2 => UNIFORM( -1, 1 )
-* 3 => NORMAL( 0, 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array of dimension ( 4 )
-* Seed for random number generator.
-* Changed on exit.
-*
-* D (input) DOUBLE PRECISION array of dimension ( MIN( I , J ) )
-* Diagonal entries of matrix. Not modified.
-*
-* IGRADE (input) INTEGER
-* Specifies grading of matrix as follows:
-* 0 => no grading
-* 1 => matrix premultiplied by diag( DL )
-* 2 => matrix postmultiplied by diag( DR )
-* 3 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* 4 => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* 5 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* Not modified.
-*
-* DL (input) DOUBLE PRECISION array ( I or J, as appropriate )
-* Left scale factors for grading matrix. Not modified.
-*
-* DR (input) DOUBLE PRECISION array ( I or J, as appropriate )
-* Right scale factors for grading matrix. Not modified.
-*
-* IPVTNG (input) INTEGER
-* On entry specifies pivoting permutations as follows:
-* 0 => none.
-* 1 => row pivoting.
-* 2 => column pivoting.
-* 3 => full pivoting, i.e., on both sides.
-* Not modified.
-*
-* IWORK (input) INTEGER array ( I or J, as appropriate )
-* This array specifies the permutation used. The
-* row (or column) originally in position K is in
-* position IWORK( K ) after pivoting.
-* This differs from IWORK for DLATM2. Not modified.
-*
-* SPARSE (input) DOUBLE PRECISION between 0. and 1.
-* On entry specifies the sparsity of the matrix
-* if sparse matix is to be generated.
-* SPARSE should lie between 0 and 1.
-* A uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlatm5.f b/TESTING/MATGEN/dlatm5.f
index 3163849c..d3bb66ea 100644
--- a/TESTING/MATGEN/dlatm5.f
+++ b/TESTING/MATGEN/dlatm5.f
@@ -1,177 +1,292 @@
- SUBROUTINE DLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
- $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
- $ QBLCKB )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
- $ PRTYPE, QBLCKA, QBLCKB
- DOUBLE PRECISION ALPHA
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ),
- $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
- $ L( LDL, * ), R( LDR, * )
-* ..
-*
+*> \brief \b DLATM5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
+* E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
+* QBLCKB )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
+* $ PRTYPE, QBLCKA, QBLCKB
+* DOUBLE PRECISION ALPHA
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+* $ L( LDL, * ), R( LDR, * )
+* ..
+*
* Purpose
* =======
*
-* DLATM5 generates matrices involved in the Generalized Sylvester
-* equation:
-*
-* A * R - L * B = C
-* D * R - L * E = F
-*
-* They also satisfy (the diagonalization condition)
-*
-* [ I -L ] ( [ A -C ], [ D -F ] ) [ I R ] = ( [ A ], [ D ] )
-* [ I ] ( [ B ] [ E ] ) [ I ] ( [ B ] [ E ] )
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATM5 generates matrices involved in the Generalized Sylvester
+*> equation:
+*>
+*> A * R - L * B = C
+*> D * R - L * E = F
+*>
+*> They also satisfy (the diagonalization condition)
+*>
+*> [ I -L ] ( [ A -C ], [ D -F ] ) [ I R ] = ( [ A ], [ D ] )
+*> [ I ] ( [ B ] [ E ] ) [ I ] ( [ B ] [ E ] )
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PRTYPE (input) INTEGER
-* "Points" to a certian type of the matrices to generate
-* (see futher details).
-*
-* M (input) INTEGER
-* Specifies the order of A and D and the number of rows in
-* C, F, R and L.
-*
-* N (input) INTEGER
-* Specifies the order of B and E and the number of columns in
-* C, F, R and L.
-*
-* A (output) DOUBLE PRECISION array, dimension (LDA, M).
-* On exit A M-by-M is initialized according to PRTYPE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A.
-*
-* B (output) DOUBLE PRECISION array, dimension (LDB, N).
-* On exit B N-by-N is initialized according to PRTYPE.
-*
-* LDB (input) INTEGER
-* The leading dimension of B.
-*
-* C (output) DOUBLE PRECISION array, dimension (LDC, N).
-* On exit C M-by-N is initialized according to PRTYPE.
-*
-* LDC (input) INTEGER
-* The leading dimension of C.
-*
-* D (output) DOUBLE PRECISION array, dimension (LDD, M).
-* On exit D M-by-M is initialized according to PRTYPE.
-*
-* LDD (input) INTEGER
-* The leading dimension of D.
-*
-* E (output) DOUBLE PRECISION array, dimension (LDE, N).
-* On exit E N-by-N is initialized according to PRTYPE.
-*
-* LDE (input) INTEGER
-* The leading dimension of E.
-*
-* F (output) DOUBLE PRECISION array, dimension (LDF, N).
-* On exit F M-by-N is initialized according to PRTYPE.
-*
-* LDF (input) INTEGER
-* The leading dimension of F.
-*
-* R (output) DOUBLE PRECISION array, dimension (LDR, N).
-* On exit R M-by-N is initialized according to PRTYPE.
-*
-* LDR (input) INTEGER
-* The leading dimension of R.
-*
-* L (output) DOUBLE PRECISION array, dimension (LDL, N).
-* On exit L M-by-N is initialized according to PRTYPE.
-*
-* LDL (input) INTEGER
-* The leading dimension of L.
+*> \param[in] PRTYPE
+*> \verbatim
+*> PRTYPE is INTEGER
+*> "Points" to a certian type of the matrices to generate
+*> (see futher details).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Specifies the order of A and D and the number of rows in
+*> C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Specifies the order of B and E and the number of columns in
+*> C, F, R and L.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, M).
+*> On exit A M-by-M is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDB, N).
+*> On exit B N-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is DOUBLE PRECISION array, dimension (LDC, N).
+*> On exit C M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of C.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (LDD, M).
+*> On exit D M-by-M is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of D.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is DOUBLE PRECISION array, dimension (LDE, N).
+*> On exit E N-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of E.
+*> \endverbatim
+*>
+*> \param[out] F
+*> \verbatim
+*> F is DOUBLE PRECISION array, dimension (LDF, N).
+*> On exit F M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of F.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is DOUBLE PRECISION array, dimension (LDR, N).
+*> On exit R M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDR
+*> \verbatim
+*> LDR is INTEGER
+*> The leading dimension of R.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is DOUBLE PRECISION array, dimension (LDL, N).
+*> On exit L M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDL
+*> \verbatim
+*> LDL is INTEGER
+*> The leading dimension of L.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> Parameter used in generating PRTYPE = 1 and 5 matrices.
+*> \endverbatim
+*>
+*> \param[in] QBLCKA
+*> \verbatim
+*> QBLCKA is INTEGER
+*> When PRTYPE = 3, specifies the distance between 2-by-2
+*> blocks on the diagonal in A. Otherwise, QBLCKA is not
+*> referenced. QBLCKA > 1.
+*> \endverbatim
+*>
+*> \param[in] QBLCKB
+*> \verbatim
+*> QBLCKB is INTEGER
+*> When PRTYPE = 3, specifies the distance between 2-by-2
+*> blocks on the diagonal in B. Otherwise, QBLCKB is not
+*> referenced. QBLCKB > 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) DOUBLE PRECISION
-* Parameter used in generating PRTYPE = 1 and 5 matrices.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* QBLCKA (input) INTEGER
-* When PRTYPE = 3, specifies the distance between 2-by-2
-* blocks on the diagonal in A. Otherwise, QBLCKA is not
-* referenced. QBLCKA > 1.
+*> \date November 2011
*
-* QBLCKB (input) INTEGER
-* When PRTYPE = 3, specifies the distance between 2-by-2
-* blocks on the diagonal in B. Otherwise, QBLCKB is not
-* referenced. QBLCKB > 1.
+*> \ingroup double_matgen
*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> PRTYPE = 1: A and B are Jordan blocks, D and E are identity matrices
+*>
+*> A : if (i == j) then A(i, j) = 1.0
+*> if (j == i + 1) then A(i, j) = -1.0
+*> else A(i, j) = 0.0, i, j = 1...M
+*>
+*> B : if (i == j) then B(i, j) = 1.0 - ALPHA
+*> if (j == i + 1) then B(i, j) = 1.0
+*> else B(i, j) = 0.0, i, j = 1...N
+*>
+*> D : if (i == j) then D(i, j) = 1.0
+*> else D(i, j) = 0.0, i, j = 1...M
+*>
+*> E : if (i == j) then E(i, j) = 1.0
+*> else E(i, j) = 0.0, i, j = 1...N
+*>
+*> L = R are chosen from [-10...10],
+*> which specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 2 or 3: Triangular and/or quasi- triangular.
+*>
+*> A : if (i <= j) then A(i, j) = [-1...1]
+*> else A(i, j) = 0.0, i, j = 1...M
+*>
+*> if (PRTYPE = 3) then
+*> A(k + 1, k + 1) = A(k, k)
+*> A(k + 1, k) = [-1...1]
+*> sign(A(k, k + 1) = -(sin(A(k + 1, k))
+*> k = 1, M - 1, QBLCKA
+*>
+*> B : if (i <= j) then B(i, j) = [-1...1]
+*> else B(i, j) = 0.0, i, j = 1...N
+*>
+*> if (PRTYPE = 3) then
+*> B(k + 1, k + 1) = B(k, k)
+*> B(k + 1, k) = [-1...1]
+*> sign(B(k, k + 1) = -(sign(B(k + 1, k))
+*> k = 1, N - 1, QBLCKB
+*>
+*> D : if (i <= j) then D(i, j) = [-1...1].
+*> else D(i, j) = 0.0, i, j = 1...M
+*>
+*>
+*> E : if (i <= j) then D(i, j) = [-1...1]
+*> else E(i, j) = 0.0, i, j = 1...N
+*>
+*> L, R are chosen from [-10...10],
+*> which specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 4 Full
+*> A(i, j) = [-10...10]
+*> D(i, j) = [-1...1] i,j = 1...M
+*> B(i, j) = [-10...10]
+*> E(i, j) = [-1...1] i,j = 1...N
+*> R(i, j) = [-10...10]
+*> L(i, j) = [-1...1] i = 1..M ,j = 1...N
+*>
+*> L, R specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 5 special case common and/or close eigs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE DLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
+ $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
+ $ QBLCKB )
*
-* PRTYPE = 1: A and B are Jordan blocks, D and E are identity matrices
-*
-* A : if (i == j) then A(i, j) = 1.0
-* if (j == i + 1) then A(i, j) = -1.0
-* else A(i, j) = 0.0, i, j = 1...M
-*
-* B : if (i == j) then B(i, j) = 1.0 - ALPHA
-* if (j == i + 1) then B(i, j) = 1.0
-* else B(i, j) = 0.0, i, j = 1...N
-*
-* D : if (i == j) then D(i, j) = 1.0
-* else D(i, j) = 0.0, i, j = 1...M
-*
-* E : if (i == j) then E(i, j) = 1.0
-* else E(i, j) = 0.0, i, j = 1...N
-*
-* L = R are chosen from [-10...10],
-* which specifies the right hand sides (C, F).
-*
-* PRTYPE = 2 or 3: Triangular and/or quasi- triangular.
-*
-* A : if (i <= j) then A(i, j) = [-1...1]
-* else A(i, j) = 0.0, i, j = 1...M
-*
-* if (PRTYPE = 3) then
-* A(k + 1, k + 1) = A(k, k)
-* A(k + 1, k) = [-1...1]
-* sign(A(k, k + 1) = -(sin(A(k + 1, k))
-* k = 1, M - 1, QBLCKA
-*
-* B : if (i <= j) then B(i, j) = [-1...1]
-* else B(i, j) = 0.0, i, j = 1...N
-*
-* if (PRTYPE = 3) then
-* B(k + 1, k + 1) = B(k, k)
-* B(k + 1, k) = [-1...1]
-* sign(B(k, k + 1) = -(sign(B(k + 1, k))
-* k = 1, N - 1, QBLCKB
-*
-* D : if (i <= j) then D(i, j) = [-1...1].
-* else D(i, j) = 0.0, i, j = 1...M
-*
-*
-* E : if (i <= j) then D(i, j) = [-1...1]
-* else E(i, j) = 0.0, i, j = 1...N
-*
-* L, R are chosen from [-10...10],
-* which specifies the right hand sides (C, F).
-*
-* PRTYPE = 4 Full
-* A(i, j) = [-10...10]
-* D(i, j) = [-1...1] i,j = 1...M
-* B(i, j) = [-10...10]
-* E(i, j) = [-1...1] i,j = 1...N
-* R(i, j) = [-10...10]
-* L(i, j) = [-1...1] i = 1..M ,j = 1...N
-*
-* L, R specifies the right hand sides (C, F).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* PRTYPE = 5 special case common and/or close eigs.
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
+ $ PRTYPE, QBLCKA, QBLCKB
+ DOUBLE PRECISION ALPHA
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ),
+ $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+ $ L( LDL, * ), R( LDR, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/dlatm6.f b/TESTING/MATGEN/dlatm6.f
index ddb6e5d0..766cfe18 100644
--- a/TESTING/MATGEN/dlatm6.f
+++ b/TESTING/MATGEN/dlatm6.f
@@ -1,107 +1,197 @@
- SUBROUTINE DLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
- $ BETA, WX, WY, S, DIF )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDX, LDY, N, TYPE
- DOUBLE PRECISION ALPHA, BETA, WX, WY
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION A( LDA, * ), B( LDA, * ), DIF( * ), S( * ),
- $ X( LDX, * ), Y( LDY, * )
-* ..
-*
+*> \brief \b DLATM6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
+* BETA, WX, WY, S, DIF )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDX, LDY, N, TYPE
+* DOUBLE PRECISION ALPHA, BETA, WX, WY
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), B( LDA, * ), DIF( * ), S( * ),
+* $ X( LDX, * ), Y( LDY, * )
+* ..
+*
* Purpose
* =======
*
-* DLATM6 generates test matrices for the generalized eigenvalue
-* problem, their corresponding right and left eigenvector matrices,
-* and also reciprocal condition numbers for all eigenvalues and
-* the reciprocal condition numbers of eigenvectors corresponding to
-* the 1th and 5th eigenvalues.
-*
-* Test Matrices
-* =============
-*
-* Two kinds of test matrix pairs
-*
-* (A, B) = inverse(YH) * (Da, Db) * inverse(X)
-*
-* are used in the tests:
-*
-* Type 1:
-* Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
-* 0 2+a 0 0 0 0 1 0 0 0
-* 0 0 3+a 0 0 0 0 1 0 0
-* 0 0 0 4+a 0 0 0 0 1 0
-* 0 0 0 0 5+a , 0 0 0 0 1 , and
-*
-* Type 2:
-* Da = 1 -1 0 0 0 Db = 1 0 0 0 0
-* 1 1 0 0 0 0 1 0 0 0
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1+a 1+b 0 0 0 1 0
-* 0 0 0 -1-b 1+a , 0 0 0 0 1 .
-*
-* In both cases the same inverse(YH) and inverse(X) are used to compute
-* (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
-*
-* YH: = 1 0 -y y -y X = 1 0 -x -x x
-* 0 1 -y y -y 0 1 x -x -x
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1 0 0 0 0 1 0
-* 0 0 0 0 1, 0 0 0 0 1 ,
-*
-* where a, b, x and y will have all values independently of each other.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATM6 generates test matrices for the generalized eigenvalue
+*> problem, their corresponding right and left eigenvector matrices,
+*> and also reciprocal condition numbers for all eigenvalues and
+*> the reciprocal condition numbers of eigenvectors corresponding to
+*> the 1th and 5th eigenvalues.
+*>
+*> Test Matrices
+*> =============
+*>
+*> Two kinds of test matrix pairs
+*>
+*> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
+*>
+*> are used in the tests:
+*>
+*> Type 1:
+*> Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
+*> 0 2+a 0 0 0 0 1 0 0 0
+*> 0 0 3+a 0 0 0 0 1 0 0
+*> 0 0 0 4+a 0 0 0 0 1 0
+*> 0 0 0 0 5+a , 0 0 0 0 1 , and
+*>
+*> Type 2:
+*> Da = 1 -1 0 0 0 Db = 1 0 0 0 0
+*> 1 1 0 0 0 0 1 0 0 0
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1+a 1+b 0 0 0 1 0
+*> 0 0 0 -1-b 1+a , 0 0 0 0 1 .
+*>
+*> In both cases the same inverse(YH) and inverse(X) are used to compute
+*> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
+*>
+*> YH: = 1 0 -y y -y X = 1 0 -x -x x
+*> 0 1 -y y -y 0 1 x -x -x
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1 0 0 0 0 1 0
+*> 0 0 0 0 1, 0 0 0 0 1 ,
+*>
+*> where a, b, x and y will have all values independently of each other.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) INTEGER
-* Specifies the problem type (see futher details).
-*
-* N (input) INTEGER
-* Size of the matrices A and B.
-*
-* A (output) DOUBLE PRECISION array, dimension (LDA, N).
-* On exit A N-by-N is initialized according to TYPE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A and of B.
-*
-* B (output) DOUBLE PRECISION array, dimension (LDA, N).
-* On exit B N-by-N is initialized according to TYPE.
-*
-* X (output) DOUBLE PRECISION array, dimension (LDX, N).
-* On exit X is the N-by-N matrix of right eigenvectors.
-*
-* LDX (input) INTEGER
-* The leading dimension of X.
-*
-* Y (output) DOUBLE PRECISION array, dimension (LDY, N).
-* On exit Y is the N-by-N matrix of left eigenvectors.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is INTEGER
+*> Specifies the problem type (see futher details).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Size of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA, N).
+*> On exit A N-by-N is initialized according to TYPE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A and of B.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is DOUBLE PRECISION array, dimension (LDA, N).
+*> On exit B N-by-N is initialized according to TYPE.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is DOUBLE PRECISION array, dimension (LDX, N).
+*> On exit X is the N-by-N matrix of right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X.
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*> Y is DOUBLE PRECISION array, dimension (LDY, N).
+*> On exit Y is the N-by-N matrix of left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of Y.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is DOUBLE PRECISION
+*> \endverbatim
+*> \verbatim
+*> Weighting constants for matrix A.
+*> \endverbatim
+*>
+*> \param[in] WX
+*> \verbatim
+*> WX is DOUBLE PRECISION
+*> Constant for right eigenvector matrix.
+*> \endverbatim
+*>
+*> \param[in] WY
+*> \verbatim
+*> WY is DOUBLE PRECISION
+*> Constant for left eigenvector matrix.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> S(i) is the reciprocal condition number for eigenvalue i.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION array, dimension (N)
+*> DIF(i) is the reciprocal condition number for eigenvector i.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDY (input) INTEGER
-* The leading dimension of Y.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ALPHA (input) DOUBLE PRECISION
-* BETA (input) DOUBLE PRECISION
-* Weighting constants for matrix A.
+*> \date November 2011
*
-* WX (input) DOUBLE PRECISION
-* Constant for right eigenvector matrix.
+*> \ingroup double_matgen
*
-* WY (input) DOUBLE PRECISION
-* Constant for left eigenvector matrix.
+* =====================================================================
+ SUBROUTINE DLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
+ $ BETA, WX, WY, S, DIF )
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* S(i) is the reciprocal condition number for eigenvalue i.
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIF (output) DOUBLE PRECISION array, dimension (N)
-* DIF(i) is the reciprocal condition number for eigenvector i.
+* .. Scalar Arguments ..
+ INTEGER LDA, LDX, LDY, N, TYPE
+ DOUBLE PRECISION ALPHA, BETA, WX, WY
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION A( LDA, * ), B( LDA, * ), DIF( * ), S( * ),
+ $ X( LDX, * ), Y( LDY, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/dlatm7.f b/TESTING/MATGEN/dlatm7.f
index 683d46be..4d46cd4b 100644
--- a/TESTING/MATGEN/dlatm7.f
+++ b/TESTING/MATGEN/dlatm7.f
@@ -1,9 +1,143 @@
+*> \brief \b DLATM7
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATM7( MODE, COND, IRSIGN, IDIST, ISEED, D, N,
+* RANK, INFO )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION COND
+* INTEGER IDIST, INFO, IRSIGN, MODE, N, RANK
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION D( * )
+* INTEGER ISEED( 4 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATM7 computes the entries of D as specified by MODE
+*> COND and IRSIGN. IDIST and ISEED determine the generation
+*> of random numbers. DLATM7 is called by DLATMT to generate
+*> random test matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> MODE - INTEGER
+*> On entry describes how D is to be computed:
+*> MODE = 0 means do not change D.
+*> \endverbatim
+*> \verbatim
+*> MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
+*> MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1)) I=1:RANK
+*> \endverbatim
+*> \verbatim
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> COND - DOUBLE PRECISION
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*> \verbatim
+*> IRSIGN - INTEGER
+*> On entry, if MODE neither -6, 0 nor 6, determines sign of
+*> entries of D
+*> 0 => leave entries of D unchanged
+*> 1 => multiply each entry of D by 1 or -1 with probability .5
+*> \endverbatim
+*> \verbatim
+*> IDIST - CHARACTER*1
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => UNIFORM( 0, 1 )
+*> 2 => UNIFORM( -1, 1 )
+*> 3 => NORMAL( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED - INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. The random number generator uses a
+*> linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to DLATM7
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*> \verbatim
+*> D - DOUBLE PRECISION array, dimension ( MIN( M , N ) )
+*> Array to be computed according to MODE, COND and IRSIGN.
+*> May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> Number of entries of D. Not modified.
+*> \endverbatim
+*> \verbatim
+*> RANK - INTEGER
+*> The rank of matrix to be generated for modes 1,2,3 only.
+*> D( RANK+1:N ) = 0.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> 0 => normal termination
+*> -1 => if MODE not in range -6 to 6
+*> -2 => if MODE neither -6, 0 nor 6, and
+*> IRSIGN neither 0 nor 1
+*> -3 => if MODE neither -6, 0 nor 6 and COND less than 1
+*> -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
+*> -7 => if N negative
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
SUBROUTINE DLATM7( MODE, COND, IRSIGN, IDIST, ISEED, D, N,
$ RANK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION COND
@@ -14,86 +148,6 @@
INTEGER ISEED( 4 )
* ..
*
-* Purpose
-* =======
-*
-* DLATM7 computes the entries of D as specified by MODE
-* COND and IRSIGN. IDIST and ISEED determine the generation
-* of random numbers. DLATM7 is called by DLATMT to generate
-* random test matrices.
-*
-* Arguments
-* =========
-*
-* MODE - INTEGER
-* On entry describes how D is to be computed:
-* MODE = 0 means do not change D.
-*
-* MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
-* MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1)) I=1:RANK
-*
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND - DOUBLE PRECISION
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* IRSIGN - INTEGER
-* On entry, if MODE neither -6, 0 nor 6, determines sign of
-* entries of D
-* 0 => leave entries of D unchanged
-* 1 => multiply each entry of D by 1 or -1 with probability .5
-*
-* IDIST - CHARACTER*1
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => UNIFORM( 0, 1 )
-* 2 => UNIFORM( -1, 1 )
-* 3 => NORMAL( 0, 1 )
-* Not modified.
-*
-* ISEED - INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. The random number generator uses a
-* linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to DLATM7
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D - DOUBLE PRECISION array, dimension ( MIN( M , N ) )
-* Array to be computed according to MODE, COND and IRSIGN.
-* May be changed on exit if MODE is nonzero.
-*
-* N - INTEGER
-* Number of entries of D. Not modified.
-*
-* RANK - INTEGER
-* The rank of matrix to be generated for modes 1,2,3 only.
-* D( RANK+1:N ) = 0.
-* Not modified.
-*
-* INFO - INTEGER
-* 0 => normal termination
-* -1 => if MODE not in range -6 to 6
-* -2 => if MODE neither -6, 0 nor 6, and
-* IRSIGN neither 0 nor 1
-* -3 => if MODE neither -6, 0 nor 6 and COND less than 1
-* -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
-* -7 => if N negative
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlatme.f b/TESTING/MATGEN/dlatme.f
index 86bb1f31..9eccb773 100644
--- a/TESTING/MATGEN/dlatme.f
+++ b/TESTING/MATGEN/dlatme.f
@@ -1,12 +1,343 @@
+*> \brief \b DLATME
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATME( N, DIST, ISEED, D, MODE, COND, DMAX, EI,
+* RSIGN,
+* UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM,
+* A,
+* LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, RSIGN, SIM, UPPER
+* INTEGER INFO, KL, KU, LDA, MODE, MODES, N
+* DOUBLE PRECISION ANORM, COND, CONDS, DMAX
+* ..
+* .. Array Arguments ..
+* CHARACTER EI( * )
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), D( * ), DS( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATME generates random non-symmetric square matrices with
+*> specified eigenvalues for testing LAPACK programs.
+*>
+*> DLATME operates by applying the following sequence of
+*> operations:
+*>
+*> 1. Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and RSIGN
+*> as described below.
+*>
+*> 2. If complex conjugate pairs are desired (MODE=0 and EI(1)='R',
+*> or MODE=5), certain pairs of adjacent elements of D are
+*> interpreted as the real and complex parts of a complex
+*> conjugate pair; A thus becomes block diagonal, with 1x1
+*> and 2x2 blocks.
+*>
+*> 3. If UPPER='T', the upper triangle of A is set to random values
+*> out of distribution DIST.
+*>
+*> 4. If SIM='T', A is multiplied on the left by a random matrix
+*> X, whose singular values are specified by DS, MODES, and
+*> CONDS, and on the right by X inverse.
+*>
+*> 5. If KL < N-1, the lower bandwidth is reduced to KL using
+*> Householder transformations. If KU < N-1, the upper
+*> bandwidth is reduced to KU.
+*>
+*> 6. If ANORM is not negative, the matrix is scaled to have
+*> maximum-element-norm ANORM.
+*>
+*> (Note: since the matrix cannot be reduced beyond Hessenberg form,
+*> no packing options are available.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns (or rows) of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values, and for the
+*> upper triangle (see UPPER).
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to DLATME
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( N )
+*> This array is used to specify the eigenvalues of A. If
+*> MODE=0, then D is assumed to contain the eigenvalues (but
+*> see the description of EI), otherwise they will be
+*> computed according to MODE, COND, DMAX, and RSIGN and
+*> placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D (with EI) as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed. Each odd-even pair
+*> of elements will be either used as two real
+*> eigenvalues or as the real and imaginary part
+*> of a complex conjugate pair of eigenvalues;
+*> the choice of which is done is random, with
+*> 50-50 probability, for each pair.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is between 1 and 4, D has entries ranging
+*> from 1 to 1/COND, if between -1 and -4, D has entries
+*> ranging from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is DOUBLE PRECISION
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))). Note that DMAX need not be
+*> positive: if DMAX is negative (or zero), D will be
+*> scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] EI
+*> \verbatim
+*> EI is CHARACTER*1 array, dimension ( N )
+*> If MODE is 0, and EI(1) is not ' ' (space character),
+*> this array specifies which elements of D (on input) are
+*> real eigenvalues and which are the real and imaginary parts
+*> of a complex conjugate pair of eigenvalues. The elements
+*> of EI may then only have the values 'R' and 'I'. If
+*> EI(j)='R' and EI(j+1)='I', then the j-th eigenvalue is
+*> CMPLX( D(j) , D(j+1) ), and the (j+1)-th is the complex
+*> conjugate thereof. If EI(j)=EI(j+1)='R', then the j-th
+*> eigenvalue is D(j) (i.e., real). EI(1) may not be 'I',
+*> nor may two adjacent elements of EI both have the value 'I'.
+*> If MODE is not 0, then EI is ignored. If MODE is 0 and
+*> EI(1)=' ', then the eigenvalues will all be real.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is CHARACTER*1
+*> If MODE is not 0, 6, or -6, and RSIGN='T', then the
+*> elements of D, as computed according to MODE and COND, will
+*> be multiplied by a random sign (+1 or -1). If RSIGN='F',
+*> they will not be. RSIGN may only have the values 'T' or
+*> 'F'.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] UPPER
+*> \verbatim
+*> UPPER is CHARACTER*1
+*> If UPPER='T', then the elements of A above the diagonal
+*> (and above the 2x2 diagonal blocks, if A has complex
+*> eigenvalues) will be set to random numbers out of DIST.
+*> If UPPER='F', they will not. UPPER may only have the
+*> values 'T' or 'F'.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] SIM
+*> \verbatim
+*> SIM is CHARACTER*1
+*> If SIM='T', then A will be operated on by a "similarity
+*> transform", i.e., multiplied on the left by a matrix X and
+*> on the right by X inverse. X = U S V, where U and V are
+*> random unitary matrices and S is a (diagonal) matrix of
+*> singular values specified by DS, MODES, and CONDS. If
+*> SIM='F', then A will not be transformed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DS
+*> \verbatim
+*> DS is DOUBLE PRECISION array, dimension ( N )
+*> This array is used to specify the singular values of X,
+*> in the same way that D specifies the eigenvalues of A.
+*> If MODE=0, the DS contains the singular values, which
+*> may not be zero.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODES
+*> \verbatim
+*> MODES is INTEGER
+*> \endverbatim
+*>
+*> \param[in] CONDS
+*> \verbatim
+*> CONDS is DOUBLE PRECISION
+*> Same as MODE and COND, but for specifying the diagonal
+*> of S. MODES=-6 and +6 are not allowed (since they would
+*> result in randomly ill-conditioned eigenvalues.)
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. KL=1
+*> specifies upper Hessenberg form. If KL is at least N-1,
+*> then A will have full lower bandwidth. KL must be at
+*> least 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. KU=1
+*> specifies lower Hessenberg form. If KU is at least N-1,
+*> then A will have full upper bandwidth; if KU and KL
+*> are both at least N-1, then A will be dense. Only one of
+*> KU and KL may be less than N-1. KU must be at least 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> If ANORM is not negative, then A will be scaled by a non-
+*> negative real number to make the maximum-element-norm of A
+*> to be ANORM.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension ( LDA, N )
+*> On exit A is the desired test matrix.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. LDA must be at least N.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( 3*N )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => N negative
+*> -2 => DIST illegal string
+*> -5 => MODE not in range -6 to 6
+*> -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -8 => EI(1) is not ' ' or 'R', EI(j) is not 'R' or 'I', or
+*> two adjacent elements of EI are 'I'.
+*> -9 => RSIGN is not 'T' or 'F'
+*> -10 => UPPER is not 'T' or 'F'
+*> -11 => SIM is not 'T' or 'F'
+*> -12 => MODES=0 and DS has a zero singular value.
+*> -13 => MODES is not in the range -5 to 5.
+*> -14 => MODES is nonzero and CONDS is less than 1.
+*> -15 => KL is less than 1.
+*> -16 => KU is less than 1, or KL and KU are both less than
+*> N-1.
+*> -19 => LDA is less than N.
+*> 1 => Error return from DLATM1 (computing D)
+*> 2 => Cannot scale to DMAX (max. eigenvalue is 0)
+*> 3 => Error return from DLATM1 (computing DS)
+*> 4 => Error return from DLARGE
+*> 5 => Zero singular value from DLATM1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
SUBROUTINE DLATME( N, DIST, ISEED, D, MODE, COND, DMAX, EI,
$ RSIGN,
$ UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM,
$ A,
$ LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, RSIGN, SIM, UPPER
@@ -19,227 +350,6 @@
DOUBLE PRECISION A( LDA, * ), D( * ), DS( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATME generates random non-symmetric square matrices with
-* specified eigenvalues for testing LAPACK programs.
-*
-* DLATME operates by applying the following sequence of
-* operations:
-*
-* 1. Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and RSIGN
-* as described below.
-*
-* 2. If complex conjugate pairs are desired (MODE=0 and EI(1)='R',
-* or MODE=5), certain pairs of adjacent elements of D are
-* interpreted as the real and complex parts of a complex
-* conjugate pair; A thus becomes block diagonal, with 1x1
-* and 2x2 blocks.
-*
-* 3. If UPPER='T', the upper triangle of A is set to random values
-* out of distribution DIST.
-*
-* 4. If SIM='T', A is multiplied on the left by a random matrix
-* X, whose singular values are specified by DS, MODES, and
-* CONDS, and on the right by X inverse.
-*
-* 5. If KL < N-1, the lower bandwidth is reduced to KL using
-* Householder transformations. If KU < N-1, the upper
-* bandwidth is reduced to KU.
-*
-* 6. If ANORM is not negative, the matrix is scaled to have
-* maximum-element-norm ANORM.
-*
-* (Note: since the matrix cannot be reduced beyond Hessenberg form,
-* no packing options are available.)
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of columns (or rows) of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values, and for the
-* upper triangle (see UPPER).
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to DLATME
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( N )
-* This array is used to specify the eigenvalues of A. If
-* MODE=0, then D is assumed to contain the eigenvalues (but
-* see the description of EI), otherwise they will be
-* computed according to MODE, COND, DMAX, and RSIGN and
-* placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the eigenvalues are to
-* be specified:
-* MODE = 0 means use D (with EI) as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed. Each odd-even pair
-* of elements will be either used as two real
-* eigenvalues or as the real and imaginary part
-* of a complex conjugate pair of eigenvalues;
-* the choice of which is done is random, with
-* 50-50 probability, for each pair.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is between 1 and 4, D has entries ranging
-* from 1 to 1/COND, if between -1 and -4, D has entries
-* ranging from 1/COND to 1,
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) DOUBLE PRECISION
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))). Note that DMAX need not be
-* positive: if DMAX is negative (or zero), D will be
-* scaled by a negative number (or zero).
-* Not modified.
-*
-* EI (input) CHARACTER*1 array, dimension ( N )
-* If MODE is 0, and EI(1) is not ' ' (space character),
-* this array specifies which elements of D (on input) are
-* real eigenvalues and which are the real and imaginary parts
-* of a complex conjugate pair of eigenvalues. The elements
-* of EI may then only have the values 'R' and 'I'. If
-* EI(j)='R' and EI(j+1)='I', then the j-th eigenvalue is
-* CMPLX( D(j) , D(j+1) ), and the (j+1)-th is the complex
-* conjugate thereof. If EI(j)=EI(j+1)='R', then the j-th
-* eigenvalue is D(j) (i.e., real). EI(1) may not be 'I',
-* nor may two adjacent elements of EI both have the value 'I'.
-* If MODE is not 0, then EI is ignored. If MODE is 0 and
-* EI(1)=' ', then the eigenvalues will all be real.
-* Not modified.
-*
-* RSIGN (input) CHARACTER*1
-* If MODE is not 0, 6, or -6, and RSIGN='T', then the
-* elements of D, as computed according to MODE and COND, will
-* be multiplied by a random sign (+1 or -1). If RSIGN='F',
-* they will not be. RSIGN may only have the values 'T' or
-* 'F'.
-* Not modified.
-*
-* UPPER (input) CHARACTER*1
-* If UPPER='T', then the elements of A above the diagonal
-* (and above the 2x2 diagonal blocks, if A has complex
-* eigenvalues) will be set to random numbers out of DIST.
-* If UPPER='F', they will not. UPPER may only have the
-* values 'T' or 'F'.
-* Not modified.
-*
-* SIM (input) CHARACTER*1
-* If SIM='T', then A will be operated on by a "similarity
-* transform", i.e., multiplied on the left by a matrix X and
-* on the right by X inverse. X = U S V, where U and V are
-* random unitary matrices and S is a (diagonal) matrix of
-* singular values specified by DS, MODES, and CONDS. If
-* SIM='F', then A will not be transformed.
-* Not modified.
-*
-* DS (input/output) DOUBLE PRECISION array, dimension ( N )
-* This array is used to specify the singular values of X,
-* in the same way that D specifies the eigenvalues of A.
-* If MODE=0, the DS contains the singular values, which
-* may not be zero.
-* Modified if MODE is nonzero.
-*
-* MODES (input) INTEGER
-*
-* CONDS (input) DOUBLE PRECISION
-* Same as MODE and COND, but for specifying the diagonal
-* of S. MODES=-6 and +6 are not allowed (since they would
-* result in randomly ill-conditioned eigenvalues.)
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. KL=1
-* specifies upper Hessenberg form. If KL is at least N-1,
-* then A will have full lower bandwidth. KL must be at
-* least 1.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. KU=1
-* specifies lower Hessenberg form. If KU is at least N-1,
-* then A will have full upper bandwidth; if KU and KL
-* are both at least N-1, then A will be dense. Only one of
-* KU and KL may be less than N-1. KU must be at least 1.
-* Not modified.
-*
-* ANORM (input) DOUBLE PRECISION
-* If ANORM is not negative, then A will be scaled by a non-
-* negative real number to make the maximum-element-norm of A
-* to be ANORM.
-* Not modified.
-*
-* A (output) DOUBLE PRECISION array, dimension ( LDA, N )
-* On exit A is the desired test matrix.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. LDA must be at least N.
-* Not modified.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( 3*N )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => N negative
-* -2 => DIST illegal string
-* -5 => MODE not in range -6 to 6
-* -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -8 => EI(1) is not ' ' or 'R', EI(j) is not 'R' or 'I', or
-* two adjacent elements of EI are 'I'.
-* -9 => RSIGN is not 'T' or 'F'
-* -10 => UPPER is not 'T' or 'F'
-* -11 => SIM is not 'T' or 'F'
-* -12 => MODES=0 and DS has a zero singular value.
-* -13 => MODES is not in the range -5 to 5.
-* -14 => MODES is nonzero and CONDS is less than 1.
-* -15 => KL is less than 1.
-* -16 => KU is less than 1, or KL and KU are both less than
-* N-1.
-* -19 => LDA is less than N.
-* 1 => Error return from DLATM1 (computing D)
-* 2 => Cannot scale to DMAX (max. eigenvalue is 0)
-* 3 => Error return from DLATM1 (computing DS)
-* 4 => Error return from DLARGE
-* 5 => Zero singular value from DLATM1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlatmr.f b/TESTING/MATGEN/dlatmr.f
index 38b38f58..c484e06e 100644
--- a/TESTING/MATGEN/dlatmr.f
+++ b/TESTING/MATGEN/dlatmr.f
@@ -1,11 +1,485 @@
+*> \brief \b DLATMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATMR( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER,
+* CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM,
+* PACK, A, LDA, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, GRADE, PACK, PIVTNG, RSIGN, SYM
+* INTEGER INFO, KL, KU, LDA, M, MODE, MODEL, MODER, N
+* DOUBLE PRECISION ANORM, COND, CONDL, CONDR, DMAX, SPARSE
+* ..
+* .. Array Arguments ..
+* INTEGER IPIVOT( * ), ISEED( 4 ), IWORK( * )
+* DOUBLE PRECISION A( LDA, * ), D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATMR generates random matrices of various types for testing
+*> LAPACK programs.
+*>
+*> DLATMR operates by applying the following sequence of
+*> operations:
+*>
+*> Generate a matrix A with random entries of distribution DIST
+*> which is symmetric if SYM='S', and nonsymmetric
+*> if SYM='N'.
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX and RSIGN
+*> as described below.
+*>
+*> Grade the matrix, if desired, from the left and/or right
+*> as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
+*> MODER and CONDR also determine the grading as described
+*> below.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> PIVTNG and IPIVOT.
+*>
+*> Set random entries to zero, if desired, to get a random sparse
+*> matrix as specified by SPARSE.
+*>
+*> Make A a band matrix, if desired, by zeroing out the matrix
+*> outside a band of lower bandwidth KL and upper bandwidth KU.
+*>
+*> Scale A, if desired, to have maximum entry ANORM.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if symmetric)
+*> zero out lower half (if symmetric)
+*> store the upper half columnwise (if symmetric or
+*> square upper triangular)
+*> store the lower half columnwise (if symmetric or
+*> square lower triangular)
+*> same as upper half rowwise if symmetric
+*> store the lower triangle in banded format (if symmetric)
+*> store the upper triangle in banded format (if symmetric)
+*> store the entire matrix in banded format
+*>
+*> Note: If two calls to DLATMR differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*>
+*> If two calls to DLATMR both have full bandwidth (KL = M-1
+*> and KU = N-1), and differ only in the PIVTNG and PACK
+*> parameters, then the matrices generated will differ only
+*> in the order of the rows and/or columns, and otherwise
+*> contain the same data. This consistency cannot be and
+*> is not maintained with less than full bandwidth.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate a random matrix .
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to DLATMR
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='S' or 'H', generated matrix is symmetric.
+*> If SYM='N', generated matrix is nonsymmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (min(M,N))
+*> On entry this array specifies the diagonal entries
+*> of the diagonal of A. D may either be specified
+*> on entry, or set according to MODE and COND as described
+*> below. May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry describes how D is to be used:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is DOUBLE PRECISION
+*> If MODE neither -6, 0 nor 6, the diagonal is scaled by
+*> DMAX / max(abs(D(i))), so that maximum absolute entry
+*> of diagonal is abs(DMAX). If DMAX is negative (or zero),
+*> diagonal will be scaled by a negative number (or zero).
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is CHARACTER*1
+*> If MODE neither -6, 0 nor 6, specifies sign of diagonal
+*> as follows:
+*> 'T' => diagonal entries are multiplied by 1 or -1
+*> with probability .5
+*> 'F' => diagonal unchanged
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] GRADE
+*> \verbatim
+*> GRADE is CHARACTER*1
+*> Specifies grading of matrix as follows:
+*> 'N' => no grading
+*> 'L' => matrix premultiplied by diag( DL )
+*> (only if matrix nonsymmetric)
+*> 'R' => matrix postmultiplied by diag( DR )
+*> (only if matrix nonsymmetric)
+*> 'B' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> (only if matrix nonsymmetric)
+*> 'S' or 'H' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> ('S' for symmetric, or 'H' for Hermitian)
+*> 'E' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> ( 'E' for eigenvalue invariance)
+*> (only if matrix nonsymmetric)
+*> Note: if GRADE='E', then M must equal N.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is DOUBLE PRECISION array, dimension (M)
+*> If MODEL=0, then on entry this array specifies the diagonal
+*> entries of a diagonal matrix used as described under GRADE
+*> above. If MODEL is not zero, then DL will be set according
+*> to MODEL and CONDL, analogous to the way D is set according
+*> to MODE and COND (except there is no DMAX parameter for DL).
+*> If GRADE='E', then DL cannot have zero entries.
+*> Not referenced if GRADE = 'N' or 'R'. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] MODEL
+*> \verbatim
+*> MODEL is INTEGER
+*> This specifies how the diagonal array DL is to be computed,
+*> just as MODE specifies how D is to be computed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] CONDL
+*> \verbatim
+*> CONDL is DOUBLE PRECISION
+*> When MODEL is not zero, this specifies the condition number
+*> of the computed DL. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DR
+*> \verbatim
+*> DR is DOUBLE PRECISION array, dimension (N)
+*> If MODER=0, then on entry this array specifies the diagonal
+*> entries of a diagonal matrix used as described under GRADE
+*> above. If MODER is not zero, then DR will be set according
+*> to MODER and CONDR, analogous to the way D is set according
+*> to MODE and COND (except there is no DMAX parameter for DR).
+*> Not referenced if GRADE = 'N', 'L', 'H', 'S' or 'E'.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] MODER
+*> \verbatim
+*> MODER is INTEGER
+*> This specifies how the diagonal array DR is to be computed,
+*> just as MODE specifies how D is to be computed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] CONDR
+*> \verbatim
+*> CONDR is DOUBLE PRECISION
+*> When MODER is not zero, this specifies the condition number
+*> of the computed DR. Not modified.
+*> \endverbatim
+*>
+*> \param[in] PIVTNG
+*> \verbatim
+*> PIVTNG is CHARACTER*1
+*> On entry specifies pivoting permutations as follows:
+*> 'N' or ' ' => none.
+*> 'L' => left or row pivoting (matrix must be nonsymmetric).
+*> 'R' => right or column pivoting (matrix must be
+*> nonsymmetric).
+*> 'B' or 'F' => both or full pivoting, i.e., on both sides.
+*> In this case, M must equal N
+*> \endverbatim
+*> \verbatim
+*> If two calls to DLATMR both have full bandwidth (KL = M-1
+*> and KU = N-1), and differ only in the PIVTNG and PACK
+*> parameters, then the matrices generated will differ only
+*> in the order of the rows and/or columns, and otherwise
+*> contain the same data. This consistency cannot be
+*> maintained with less than full bandwidth.
+*> \endverbatim
+*>
+*> \param[in] IPIVOT
+*> \verbatim
+*> IPIVOT is INTEGER array, dimension (N or M)
+*> This array specifies the permutation used. After the
+*> basic matrix is generated, the rows, columns, or both
+*> are permuted. If, say, row pivoting is selected, DLATMR
+*> starts with the *last* row and interchanges the M-th and
+*> IPIVOT(M)-th rows, then moves to the next-to-last row,
+*> interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
+*> and so on. In terms of "2-cycles", the permutation is
+*> (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
+*> where the rightmost cycle is applied first. This is the
+*> *inverse* of the effect of pivoting in LINPACK. The idea
+*> is that factoring (with pivoting) an identity matrix
+*> which has been inverse-pivoted in this way should
+*> result in a pivot vector identical to IPIVOT.
+*> Not referenced if PIVTNG = 'N'. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is DOUBLE PRECISION
+*> On entry specifies the sparsity of the matrix if a sparse
+*> matrix is to be generated. SPARSE should lie between
+*> 0 and 1. To generate a sparse matrix, for each matrix entry
+*> a uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> On entry specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL at least M-1 implies the matrix is not
+*> banded. Must equal KU if matrix is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> On entry specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU at least N-1 implies the matrix is not
+*> banded. Must equal KL if matrix is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> On entry specifies maximum entry of output matrix
+*> (output matrix will by multiplied by a constant so that
+*> its largest absolute entry equal ANORM)
+*> if ANORM is nonnegative. If ANORM is negative no scaling
+*> is done. Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> On entry specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric)
+*> 'L' => zero out all superdiagonal entries (if symmetric)
+*> 'C' => store the upper triangle columnwise
+*> (only if matrix symmetric or square upper triangular)
+*> 'R' => store the lower triangle columnwise
+*> (only if matrix symmetric or square lower triangular)
+*> (same as upper half rowwise if symmetric)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if matrix symmetric)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if matrix symmetric)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB or TB - use 'B' or 'Q'
+*> PP, SP or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to DLATMR differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension (LDA,N)
+*> On exit A is the desired test matrix. Only those
+*> entries of A which are significant on output
+*> will be referenced (even if A is in packed or band
+*> storage format). The 'unoccupied corners' of A in
+*> band format will be zeroed out.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> on entry LDA specifies the first dimension of A as
+*> declared in the calling program.
+*> If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
+*> If PACK='C' or 'R', LDA must be at least 1.
+*> If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
+*> If PACK='Z', LDA must be at least KUU+KLL+1, where
+*> KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension ( N or M)
+*> Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error parameter on exit:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S' or 'H'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
+*> -11 => GRADE illegal string, or GRADE='E' and
+*> M not equal to N, or GRADE='L', 'R', 'B' or 'E' and
+*> SYM = 'S' or 'H'
+*> -12 => GRADE = 'E' and DL contains zero
+*> -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
+*> 'S' or 'E'
+*> -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
+*> and MODEL neither -6, 0 nor 6
+*> -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
+*> -17 => CONDR less than 1.0, GRADE='R' or 'B', and
+*> MODER neither -6, 0 nor 6
+*> -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
+*> M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
+*> or 'H'
+*> -19 => IPIVOT contains out of range number and
+*> PIVTNG not equal to 'N'
+*> -20 => KL negative
+*> -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+*> -22 => SPARSE not in range 0. to 1.
+*> -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
+*> and SYM='N', or PACK='C' and SYM='N' and either KL
+*> not equal to 0 or N not equal to M, or PACK='R' and
+*> SYM='N', and either KU not equal to 0 or N not equal
+*> to M
+*> -26 => LDA too small
+*> 1 => Error return from DLATM1 (computing D)
+*> 2 => Cannot scale diagonal to DMAX (max. entry is 0)
+*> 3 => Error return from DLATM1 (computing DL)
+*> 4 => Error return from DLATM1 (computing DR)
+*> 5 => ANORM is positive, but matrix constructed prior to
+*> attempting to scale it to have norm ANORM, is zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
SUBROUTINE DLATMR( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER,
$ CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM,
$ PACK, A, LDA, IWORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, GRADE, PACK, PIVTNG, RSIGN, SYM
@@ -17,348 +491,6 @@
DOUBLE PRECISION A( LDA, * ), D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATMR generates random matrices of various types for testing
-* LAPACK programs.
-*
-* DLATMR operates by applying the following sequence of
-* operations:
-*
-* Generate a matrix A with random entries of distribution DIST
-* which is symmetric if SYM='S', and nonsymmetric
-* if SYM='N'.
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX and RSIGN
-* as described below.
-*
-* Grade the matrix, if desired, from the left and/or right
-* as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
-* MODER and CONDR also determine the grading as described
-* below.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* PIVTNG and IPIVOT.
-*
-* Set random entries to zero, if desired, to get a random sparse
-* matrix as specified by SPARSE.
-*
-* Make A a band matrix, if desired, by zeroing out the matrix
-* outside a band of lower bandwidth KL and upper bandwidth KU.
-*
-* Scale A, if desired, to have maximum entry ANORM.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if symmetric)
-* zero out lower half (if symmetric)
-* store the upper half columnwise (if symmetric or
-* square upper triangular)
-* store the lower half columnwise (if symmetric or
-* square lower triangular)
-* same as upper half rowwise if symmetric
-* store the lower triangle in banded format (if symmetric)
-* store the upper triangle in banded format (if symmetric)
-* store the entire matrix in banded format
-*
-* Note: If two calls to DLATMR differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-*
-* If two calls to DLATMR both have full bandwidth (KL = M-1
-* and KU = N-1), and differ only in the PIVTNG and PACK
-* parameters, then the matrices generated will differ only
-* in the order of the rows and/or columns, and otherwise
-* contain the same data. This consistency cannot be and
-* is not maintained with less than full bandwidth.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate a random matrix .
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to DLATMR
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='S' or 'H', generated matrix is symmetric.
-* If SYM='N', generated matrix is nonsymmetric.
-* Not modified.
-*
-* D (input/output) DOUBLE PRECISION array, dimension (min(M,N))
-* On entry this array specifies the diagonal entries
-* of the diagonal of A. D may either be specified
-* on entry, or set according to MODE and COND as described
-* below. May be changed on exit if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry describes how D is to be used:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) DOUBLE PRECISION
-* If MODE neither -6, 0 nor 6, the diagonal is scaled by
-* DMAX / max(abs(D(i))), so that maximum absolute entry
-* of diagonal is abs(DMAX). If DMAX is negative (or zero),
-* diagonal will be scaled by a negative number (or zero).
-*
-* RSIGN (input) CHARACTER*1
-* If MODE neither -6, 0 nor 6, specifies sign of diagonal
-* as follows:
-* 'T' => diagonal entries are multiplied by 1 or -1
-* with probability .5
-* 'F' => diagonal unchanged
-* Not modified.
-*
-* GRADE (input) CHARACTER*1
-* Specifies grading of matrix as follows:
-* 'N' => no grading
-* 'L' => matrix premultiplied by diag( DL )
-* (only if matrix nonsymmetric)
-* 'R' => matrix postmultiplied by diag( DR )
-* (only if matrix nonsymmetric)
-* 'B' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* (only if matrix nonsymmetric)
-* 'S' or 'H' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* ('S' for symmetric, or 'H' for Hermitian)
-* 'E' => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* ( 'E' for eigenvalue invariance)
-* (only if matrix nonsymmetric)
-* Note: if GRADE='E', then M must equal N.
-* Not modified.
-*
-* DL (input/output) DOUBLE PRECISION array, dimension (M)
-* If MODEL=0, then on entry this array specifies the diagonal
-* entries of a diagonal matrix used as described under GRADE
-* above. If MODEL is not zero, then DL will be set according
-* to MODEL and CONDL, analogous to the way D is set according
-* to MODE and COND (except there is no DMAX parameter for DL).
-* If GRADE='E', then DL cannot have zero entries.
-* Not referenced if GRADE = 'N' or 'R'. Changed on exit.
-*
-* MODEL (input) INTEGER
-* This specifies how the diagonal array DL is to be computed,
-* just as MODE specifies how D is to be computed.
-* Not modified.
-*
-* CONDL (input) DOUBLE PRECISION
-* When MODEL is not zero, this specifies the condition number
-* of the computed DL. Not modified.
-*
-* DR (input/output) DOUBLE PRECISION array, dimension (N)
-* If MODER=0, then on entry this array specifies the diagonal
-* entries of a diagonal matrix used as described under GRADE
-* above. If MODER is not zero, then DR will be set according
-* to MODER and CONDR, analogous to the way D is set according
-* to MODE and COND (except there is no DMAX parameter for DR).
-* Not referenced if GRADE = 'N', 'L', 'H', 'S' or 'E'.
-* Changed on exit.
-*
-* MODER (input) INTEGER
-* This specifies how the diagonal array DR is to be computed,
-* just as MODE specifies how D is to be computed.
-* Not modified.
-*
-* CONDR (input) DOUBLE PRECISION
-* When MODER is not zero, this specifies the condition number
-* of the computed DR. Not modified.
-*
-* PIVTNG (input) CHARACTER*1
-* On entry specifies pivoting permutations as follows:
-* 'N' or ' ' => none.
-* 'L' => left or row pivoting (matrix must be nonsymmetric).
-* 'R' => right or column pivoting (matrix must be
-* nonsymmetric).
-* 'B' or 'F' => both or full pivoting, i.e., on both sides.
-* In this case, M must equal N
-*
-* If two calls to DLATMR both have full bandwidth (KL = M-1
-* and KU = N-1), and differ only in the PIVTNG and PACK
-* parameters, then the matrices generated will differ only
-* in the order of the rows and/or columns, and otherwise
-* contain the same data. This consistency cannot be
-* maintained with less than full bandwidth.
-*
-* IPIVOT (input) INTEGER array, dimension (N or M)
-* This array specifies the permutation used. After the
-* basic matrix is generated, the rows, columns, or both
-* are permuted. If, say, row pivoting is selected, DLATMR
-* starts with the *last* row and interchanges the M-th and
-* IPIVOT(M)-th rows, then moves to the next-to-last row,
-* interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
-* and so on. In terms of "2-cycles", the permutation is
-* (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
-* where the rightmost cycle is applied first. This is the
-* *inverse* of the effect of pivoting in LINPACK. The idea
-* is that factoring (with pivoting) an identity matrix
-* which has been inverse-pivoted in this way should
-* result in a pivot vector identical to IPIVOT.
-* Not referenced if PIVTNG = 'N'. Not modified.
-*
-* SPARSE (input) DOUBLE PRECISION
-* On entry specifies the sparsity of the matrix if a sparse
-* matrix is to be generated. SPARSE should lie between
-* 0 and 1. To generate a sparse matrix, for each matrix entry
-* a uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
-* KL (input) INTEGER
-* On entry specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL at least M-1 implies the matrix is not
-* banded. Must equal KU if matrix is symmetric.
-* Not modified.
-*
-* KU (input) INTEGER
-* On entry specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU at least N-1 implies the matrix is not
-* banded. Must equal KL if matrix is symmetric.
-* Not modified.
-*
-* ANORM (input) DOUBLE PRECISION
-* On entry specifies maximum entry of output matrix
-* (output matrix will by multiplied by a constant so that
-* its largest absolute entry equal ANORM)
-* if ANORM is nonnegative. If ANORM is negative no scaling
-* is done. Not modified.
-*
-* PACK (input) CHARACTER*1
-* On entry specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric)
-* 'L' => zero out all superdiagonal entries (if symmetric)
-* 'C' => store the upper triangle columnwise
-* (only if matrix symmetric or square upper triangular)
-* 'R' => store the lower triangle columnwise
-* (only if matrix symmetric or square lower triangular)
-* (same as upper half rowwise if symmetric)
-* 'B' => store the lower triangle in band storage scheme
-* (only if matrix symmetric)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if matrix symmetric)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB or TB - use 'B' or 'Q'
-* PP, SP or TP - use 'C' or 'R'
-*
-* If two calls to DLATMR differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (output) DOUBLE PRECISION array, dimension (LDA,N)
-* On exit A is the desired test matrix. Only those
-* entries of A which are significant on output
-* will be referenced (even if A is in packed or band
-* storage format). The 'unoccupied corners' of A in
-* band format will be zeroed out.
-*
-* LDA (input) INTEGER
-* on entry LDA specifies the first dimension of A as
-* declared in the calling program.
-* If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
-* If PACK='C' or 'R', LDA must be at least 1.
-* If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
-* If PACK='Z', LDA must be at least KUU+KLL+1, where
-* KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
-* Not modified.
-*
-* IWORK (workspace) INTEGER array, dimension ( N or M)
-* Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
-*
-* INFO (output) INTEGER
-* Error parameter on exit:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S' or 'H'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
-* -11 => GRADE illegal string, or GRADE='E' and
-* M not equal to N, or GRADE='L', 'R', 'B' or 'E' and
-* SYM = 'S' or 'H'
-* -12 => GRADE = 'E' and DL contains zero
-* -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
-* 'S' or 'E'
-* -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
-* and MODEL neither -6, 0 nor 6
-* -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
-* -17 => CONDR less than 1.0, GRADE='R' or 'B', and
-* MODER neither -6, 0 nor 6
-* -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
-* M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
-* or 'H'
-* -19 => IPIVOT contains out of range number and
-* PIVTNG not equal to 'N'
-* -20 => KL negative
-* -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
-* -22 => SPARSE not in range 0. to 1.
-* -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
-* and SYM='N', or PACK='C' and SYM='N' and either KL
-* not equal to 0 or N not equal to M, or PACK='R' and
-* SYM='N', and either KU not equal to 0 or N not equal
-* to M
-* -26 => LDA too small
-* 1 => Error return from DLATM1 (computing D)
-* 2 => Cannot scale diagonal to DMAX (max. entry is 0)
-* 3 => Error return from DLATM1 (computing DL)
-* 4 => Error return from DLATM1 (computing DR)
-* 5 => ANORM is positive, but matrix constructed prior to
-* attempting to scale it to have norm ANORM, is zero
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlatms.f b/TESTING/MATGEN/dlatms.f
index 9d36d677..a10f5fa7 100644
--- a/TESTING/MATGEN/dlatms.f
+++ b/TESTING/MATGEN/dlatms.f
@@ -1,9 +1,334 @@
+*> \brief \b DLATMS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATMS( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* KL, KU, PACK, A, LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, PACK, SYM
+* INTEGER INFO, KL, KU, LDA, M, MODE, N
+* DOUBLE PRECISION COND, DMAX
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATMS generates random matrices with specified singular values
+*> (or symmetric/hermitian with specified eigenvalues)
+*> for testing LAPACK programs.
+*>
+*> DLATMS operates by applying the following sequence of
+*> operations:
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and SYM
+*> as described below.
+*>
+*> Generate a matrix with the appropriate band structure, by one
+*> of two methods:
+*>
+*> Method A:
+*> Generate a dense M x N matrix by multiplying D on the left
+*> and the right by random unitary matrices, then:
+*>
+*> Reduce the bandwidth according to KL and KU, using
+*> Householder transformations.
+*>
+*> Method B:
+*> Convert the bandwidth-0 (i.e., diagonal) matrix to a
+*> bandwidth-1 matrix using Givens rotations, "chasing"
+*> out-of-band elements back, much as in QR; then
+*> convert the bandwidth-1 to a bandwidth-2 matrix, etc.
+*> Note that for reasonably small bandwidths (relative to
+*> M and N) this requires less storage, as a dense matrix
+*> is not generated. Also, for symmetric matrices, only
+*> one triangle is generated.
+*>
+*> Method A is chosen if the bandwidth is a large fraction of the
+*> order of the matrix, and LDA is at least M (so a dense
+*> matrix can be stored.) Method B is chosen if the bandwidth
+*> is small (< 1/2 N for symmetric, < .3 N+M for
+*> non-symmetric), or LDA is less than M and not less than the
+*> bandwidth.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if symmetric)
+*> zero out lower half (if symmetric)
+*> store the upper half columnwise (if symmetric or upper
+*> triangular)
+*> store the lower half columnwise (if symmetric or lower
+*> triangular)
+*> store the lower triangle in banded format (if symmetric
+*> or lower triangular)
+*> store the upper triangle in banded format (if symmetric
+*> or upper triangular)
+*> store the entire matrix in banded format
+*> If Method B is chosen, and band format is specified, then the
+*> matrix will be generated in the band format, so no repacking
+*> will be necessary.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values.
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to DLATMS
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='S' or 'H', the generated matrix is symmetric, with
+*> eigenvalues specified by D, COND, MODE, and DMAX; they
+*> may be positive, negative, or zero.
+*> If SYM='P', the generated matrix is symmetric, with
+*> eigenvalues (= singular values) specified by D, COND,
+*> MODE, and DMAX; they will not be negative.
+*> If SYM='N', the generated matrix is nonsymmetric, with
+*> singular values specified by D, COND, MODE, and DMAX;
+*> they will not be negative.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( MIN( M , N ) )
+*> This array is used to specify the singular values or
+*> eigenvalues of A (see SYM, above.) If MODE=0, then D is
+*> assumed to contain the singular/eigenvalues, otherwise
+*> they will be computed according to MODE, COND, and DMAX,
+*> and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the singular/eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
+*> the elements of D will also be multiplied by a random
+*> sign (i.e., +1 or -1.)
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is DOUBLE PRECISION
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+*> singular value (which is to say the norm) will be abs(DMAX).
+*> Note that DMAX need not be positive: if DMAX is negative
+*> (or zero), D will be scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL being at least M-1 means that the matrix
+*> has full lower bandwidth. KL must equal KU if the matrix
+*> is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU being at least N-1 means that the matrix
+*> has full upper bandwidth. KL must equal KU if the matrix
+*> is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> This specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric)
+*> 'L' => zero out all superdiagonal entries (if symmetric)
+*> 'C' => store the upper triangle columnwise
+*> (only if the matrix is symmetric or upper triangular)
+*> 'R' => store the lower triangle columnwise
+*> (only if the matrix is symmetric or lower triangular)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if matrix symmetric or lower triangular)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if matrix symmetric or upper triangular)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB or TB - use 'B' or 'Q'
+*> PP, SP or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to DLATMS differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension ( LDA, N )
+*> On exit A is the desired test matrix. A is first generated
+*> in full (unpacked) form, and then packed, if so specified
+*> by PACK. Thus, the first M elements of the first N
+*> columns will always be modified. If PACK specifies a
+*> packed or banded storage scheme, all LDA elements of the
+*> first N columns will be modified; the elements of the
+*> array which do not correspond to elements of the generated
+*> matrix are set to zero.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+*> LDA must be at least M. If PACK='B' or 'Q', then LDA must
+*> be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+*> If PACK='Z', LDA must be large enough to hold the packed
+*> array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( 3*MAX( N , M ) )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => KL negative
+*> -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+*> -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+*> or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+*> or PACK='R' or 'B' and SYM='N' and KU is not zero;
+*> or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+*> N.
+*> -14 => LDA is less than M, or PACK='Z' and LDA is less than
+*> MIN(KU,N-1) + MIN(KL,M-1) + 1.
+*> 1 => Error return from DLATM1
+*> 2 => Cannot scale to DMAX (max. sing. value is 0)
+*> 3 => Error return from DLAGGE or SLAGSY
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
SUBROUTINE DLATMS( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ KL, KU, PACK, A, LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, PACK, SYM
@@ -15,238 +340,6 @@
DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* DLATMS generates random matrices with specified singular values
-* (or symmetric/hermitian with specified eigenvalues)
-* for testing LAPACK programs.
-*
-* DLATMS operates by applying the following sequence of
-* operations:
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and SYM
-* as described below.
-*
-* Generate a matrix with the appropriate band structure, by one
-* of two methods:
-*
-* Method A:
-* Generate a dense M x N matrix by multiplying D on the left
-* and the right by random unitary matrices, then:
-*
-* Reduce the bandwidth according to KL and KU, using
-* Householder transformations.
-*
-* Method B:
-* Convert the bandwidth-0 (i.e., diagonal) matrix to a
-* bandwidth-1 matrix using Givens rotations, "chasing"
-* out-of-band elements back, much as in QR; then
-* convert the bandwidth-1 to a bandwidth-2 matrix, etc.
-* Note that for reasonably small bandwidths (relative to
-* M and N) this requires less storage, as a dense matrix
-* is not generated. Also, for symmetric matrices, only
-* one triangle is generated.
-*
-* Method A is chosen if the bandwidth is a large fraction of the
-* order of the matrix, and LDA is at least M (so a dense
-* matrix can be stored.) Method B is chosen if the bandwidth
-* is small (< 1/2 N for symmetric, < .3 N+M for
-* non-symmetric), or LDA is less than M and not less than the
-* bandwidth.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if symmetric)
-* zero out lower half (if symmetric)
-* store the upper half columnwise (if symmetric or upper
-* triangular)
-* store the lower half columnwise (if symmetric or lower
-* triangular)
-* store the lower triangle in banded format (if symmetric
-* or lower triangular)
-* store the upper triangle in banded format (if symmetric
-* or upper triangular)
-* store the entire matrix in banded format
-* If Method B is chosen, and band format is specified, then the
-* matrix will be generated in the band format, so no repacking
-* will be necessary.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* The number of columns of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values.
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to DLATMS
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='S' or 'H', the generated matrix is symmetric, with
-* eigenvalues specified by D, COND, MODE, and DMAX; they
-* may be positive, negative, or zero.
-* If SYM='P', the generated matrix is symmetric, with
-* eigenvalues (= singular values) specified by D, COND,
-* MODE, and DMAX; they will not be negative.
-* If SYM='N', the generated matrix is nonsymmetric, with
-* singular values specified by D, COND, MODE, and DMAX;
-* they will not be negative.
-* Not modified.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( MIN( M , N ) )
-* This array is used to specify the singular values or
-* eigenvalues of A (see SYM, above.) If MODE=0, then D is
-* assumed to contain the singular/eigenvalues, otherwise
-* they will be computed according to MODE, COND, and DMAX,
-* and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the singular/eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
-* the elements of D will also be multiplied by a random
-* sign (i.e., +1 or -1.)
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) DOUBLE PRECISION
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
-* singular value (which is to say the norm) will be abs(DMAX).
-* Note that DMAX need not be positive: if DMAX is negative
-* (or zero), D will be scaled by a negative number (or zero).
-* Not modified.
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL being at least M-1 means that the matrix
-* has full lower bandwidth. KL must equal KU if the matrix
-* is symmetric.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU being at least N-1 means that the matrix
-* has full upper bandwidth. KL must equal KU if the matrix
-* is symmetric.
-* Not modified.
-*
-* PACK (input) CHARACTER*1
-* This specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric)
-* 'L' => zero out all superdiagonal entries (if symmetric)
-* 'C' => store the upper triangle columnwise
-* (only if the matrix is symmetric or upper triangular)
-* 'R' => store the lower triangle columnwise
-* (only if the matrix is symmetric or lower triangular)
-* 'B' => store the lower triangle in band storage scheme
-* (only if matrix symmetric or lower triangular)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if matrix symmetric or upper triangular)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB or TB - use 'B' or 'Q'
-* PP, SP or TP - use 'C' or 'R'
-*
-* If two calls to DLATMS differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) DOUBLE PRECISION array, dimension ( LDA, N )
-* On exit A is the desired test matrix. A is first generated
-* in full (unpacked) form, and then packed, if so specified
-* by PACK. Thus, the first M elements of the first N
-* columns will always be modified. If PACK specifies a
-* packed or banded storage scheme, all LDA elements of the
-* first N columns will be modified; the elements of the
-* array which do not correspond to elements of the generated
-* matrix are set to zero.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
-* LDA must be at least M. If PACK='B' or 'Q', then LDA must
-* be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
-* If PACK='Z', LDA must be large enough to hold the packed
-* array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
-* Not modified.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( 3*MAX( N , M ) )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => KL negative
-* -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
-* -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
-* or PACK='C' or 'Q' and SYM='N' and KL is not zero;
-* or PACK='R' or 'B' and SYM='N' and KU is not zero;
-* or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
-* N.
-* -14 => LDA is less than M, or PACK='Z' and LDA is less than
-* MIN(KU,N-1) + MIN(KL,M-1) + 1.
-* 1 => Error return from DLATM1
-* 2 => Cannot scale to DMAX (max. sing. value is 0)
-* 3 => Error return from DLAGGE or SLAGSY
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/dlatmt.f b/TESTING/MATGEN/dlatmt.f
index 90a0001d..04b80dfb 100644
--- a/TESTING/MATGEN/dlatmt.f
+++ b/TESTING/MATGEN/dlatmt.f
@@ -1,9 +1,346 @@
+*> \brief \b DLATMT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE DLATMT( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* RANK, KL, KU, PACK, A, LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION COND, DMAX
+* INTEGER INFO, KL, KU, LDA, M, MODE, N, RANK
+* CHARACTER DIST, PACK, SYM
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION A( LDA, * ), D( * ), WORK( * )
+* INTEGER ISEED( 4 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> DLATMT generates random matrices with specified singular values
+*> (or symmetric/hermitian with specified eigenvalues)
+*> for testing LAPACK programs.
+*>
+*> DLATMT operates by applying the following sequence of
+*> operations:
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and SYM
+*> as described below.
+*>
+*> Generate a matrix with the appropriate band structure, by one
+*> of two methods:
+*>
+*> Method A:
+*> Generate a dense M x N matrix by multiplying D on the left
+*> and the right by random unitary matrices, then:
+*>
+*> Reduce the bandwidth according to KL and KU, using
+*> Householder transformations.
+*>
+*> Method B:
+*> Convert the bandwidth-0 (i.e., diagonal) matrix to a
+*> bandwidth-1 matrix using Givens rotations, "chasing"
+*> out-of-band elements back, much as in QR; then
+*> convert the bandwidth-1 to a bandwidth-2 matrix, etc.
+*> Note that for reasonably small bandwidths (relative to
+*> M and N) this requires less storage, as a dense matrix
+*> is not generated. Also, for symmetric matrices, only
+*> one triangle is generated.
+*>
+*> Method A is chosen if the bandwidth is a large fraction of the
+*> order of the matrix, and LDA is at least M (so a dense
+*> matrix can be stored.) Method B is chosen if the bandwidth
+*> is small (< 1/2 N for symmetric, < .3 N+M for
+*> non-symmetric), or LDA is less than M and not less than the
+*> bandwidth.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if symmetric)
+*> zero out lower half (if symmetric)
+*> store the upper half columnwise (if symmetric or upper
+*> triangular)
+*> store the lower half columnwise (if symmetric or lower
+*> triangular)
+*> store the lower triangle in banded format (if symmetric
+*> or lower triangular)
+*> store the upper triangle in banded format (if symmetric
+*> or upper triangular)
+*> store the entire matrix in banded format
+*> If Method B is chosen, and band format is specified, then the
+*> matrix will be generated in the band format, so no repacking
+*> will be necessary.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values.
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to DLATMT
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='S' or 'H', the generated matrix is symmetric, with
+*> eigenvalues specified by D, COND, MODE, and DMAX; they
+*> may be positive, negative, or zero.
+*> If SYM='P', the generated matrix is symmetric, with
+*> eigenvalues (= singular values) specified by D, COND,
+*> MODE, and DMAX; they will not be negative.
+*> If SYM='N', the generated matrix is nonsymmetric, with
+*> singular values specified by D, COND, MODE, and DMAX;
+*> they will not be negative.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( MIN( M , N ) )
+*> This array is used to specify the singular values or
+*> eigenvalues of A (see SYM, above.) If MODE=0, then D is
+*> assumed to contain the singular/eigenvalues, otherwise
+*> they will be computed according to MODE, COND, and DMAX,
+*> and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the singular/eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> \endverbatim
+*> \verbatim
+*> MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
+*> MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1))
+*> \endverbatim
+*> \verbatim
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
+*> the elements of D will also be multiplied by a random
+*> sign (i.e., +1 or -1.)
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is DOUBLE PRECISION
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+*> singular value (which is to say the norm) will be abs(DMAX).
+*> Note that DMAX need not be positive: if DMAX is negative
+*> (or zero), D will be scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of matrix to be generated for modes 1,2,3 only.
+*> D( RANK+1:N ) = 0.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL being at least M-1 means that the matrix
+*> has full lower bandwidth. KL must equal KU if the matrix
+*> is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU being at least N-1 means that the matrix
+*> has full upper bandwidth. KL must equal KU if the matrix
+*> is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> This specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric)
+*> 'L' => zero out all superdiagonal entries (if symmetric)
+*> 'C' => store the upper triangle columnwise
+*> (only if the matrix is symmetric or upper triangular)
+*> 'R' => store the lower triangle columnwise
+*> (only if the matrix is symmetric or lower triangular)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if matrix symmetric or lower triangular)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if matrix symmetric or upper triangular)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB or TB - use 'B' or 'Q'
+*> PP, SP or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to DLATMT differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is DOUBLE PRECISION array, dimension ( LDA, N )
+*> On exit A is the desired test matrix. A is first generated
+*> in full (unpacked) form, and then packed, if so specified
+*> by PACK. Thus, the first M elements of the first N
+*> columns will always be modified. If PACK specifies a
+*> packed or banded storage scheme, all LDA elements of the
+*> first N columns will be modified; the elements of the
+*> array which do not correspond to elements of the generated
+*> matrix are set to zero.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+*> LDA must be at least M. If PACK='B' or 'Q', then LDA must
+*> be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+*> If PACK='Z', LDA must be large enough to hold the packed
+*> array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is DOUBLE PRECISION array, dimension ( 3*MAX( N , M ) )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => KL negative
+*> -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+*> -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+*> or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+*> or PACK='R' or 'B' and SYM='N' and KU is not zero;
+*> or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+*> N.
+*> -14 => LDA is less than M, or PACK='Z' and LDA is less than
+*> MIN(KU,N-1) + MIN(KL,M-1) + 1.
+*> 1 => Error return from DLATM7
+*> 2 => Cannot scale to DMAX (max. sing. value is 0)
+*> 3 => Error return from DLAGGE or DLAGSY
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup double_matgen
+*
+* =====================================================================
SUBROUTINE DLATMT( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ RANK, KL, KU, PACK, A, LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION COND, DMAX
@@ -15,245 +352,6 @@
INTEGER ISEED( 4 )
* ..
*
-* Purpose
-* =======
-*
-* DLATMT generates random matrices with specified singular values
-* (or symmetric/hermitian with specified eigenvalues)
-* for testing LAPACK programs.
-*
-* DLATMT operates by applying the following sequence of
-* operations:
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and SYM
-* as described below.
-*
-* Generate a matrix with the appropriate band structure, by one
-* of two methods:
-*
-* Method A:
-* Generate a dense M x N matrix by multiplying D on the left
-* and the right by random unitary matrices, then:
-*
-* Reduce the bandwidth according to KL and KU, using
-* Householder transformations.
-*
-* Method B:
-* Convert the bandwidth-0 (i.e., diagonal) matrix to a
-* bandwidth-1 matrix using Givens rotations, "chasing"
-* out-of-band elements back, much as in QR; then
-* convert the bandwidth-1 to a bandwidth-2 matrix, etc.
-* Note that for reasonably small bandwidths (relative to
-* M and N) this requires less storage, as a dense matrix
-* is not generated. Also, for symmetric matrices, only
-* one triangle is generated.
-*
-* Method A is chosen if the bandwidth is a large fraction of the
-* order of the matrix, and LDA is at least M (so a dense
-* matrix can be stored.) Method B is chosen if the bandwidth
-* is small (< 1/2 N for symmetric, < .3 N+M for
-* non-symmetric), or LDA is less than M and not less than the
-* bandwidth.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if symmetric)
-* zero out lower half (if symmetric)
-* store the upper half columnwise (if symmetric or upper
-* triangular)
-* store the lower half columnwise (if symmetric or lower
-* triangular)
-* store the lower triangle in banded format (if symmetric
-* or lower triangular)
-* store the upper triangle in banded format (if symmetric
-* or upper triangular)
-* store the entire matrix in banded format
-* If Method B is chosen, and band format is specified, then the
-* matrix will be generated in the band format, so no repacking
-* will be necessary.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* The number of columns of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values.
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to DLATMT
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='S' or 'H', the generated matrix is symmetric, with
-* eigenvalues specified by D, COND, MODE, and DMAX; they
-* may be positive, negative, or zero.
-* If SYM='P', the generated matrix is symmetric, with
-* eigenvalues (= singular values) specified by D, COND,
-* MODE, and DMAX; they will not be negative.
-* If SYM='N', the generated matrix is nonsymmetric, with
-* singular values specified by D, COND, MODE, and DMAX;
-* they will not be negative.
-* Not modified.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( MIN( M , N ) )
-* This array is used to specify the singular values or
-* eigenvalues of A (see SYM, above.) If MODE=0, then D is
-* assumed to contain the singular/eigenvalues, otherwise
-* they will be computed according to MODE, COND, and DMAX,
-* and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the singular/eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-*
-* MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
-* MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1))
-*
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
-* the elements of D will also be multiplied by a random
-* sign (i.e., +1 or -1.)
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) DOUBLE PRECISION
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
-* singular value (which is to say the norm) will be abs(DMAX).
-* Note that DMAX need not be positive: if DMAX is negative
-* (or zero), D will be scaled by a negative number (or zero).
-* Not modified.
-*
-* RANK (input) INTEGER
-* The rank of matrix to be generated for modes 1,2,3 only.
-* D( RANK+1:N ) = 0.
-* Not modified.
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL being at least M-1 means that the matrix
-* has full lower bandwidth. KL must equal KU if the matrix
-* is symmetric.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU being at least N-1 means that the matrix
-* has full upper bandwidth. KL must equal KU if the matrix
-* is symmetric.
-* Not modified.
-*
-* PACK (input) CHARACTER*1
-* This specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric)
-* 'L' => zero out all superdiagonal entries (if symmetric)
-* 'C' => store the upper triangle columnwise
-* (only if the matrix is symmetric or upper triangular)
-* 'R' => store the lower triangle columnwise
-* (only if the matrix is symmetric or lower triangular)
-* 'B' => store the lower triangle in band storage scheme
-* (only if matrix symmetric or lower triangular)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if matrix symmetric or upper triangular)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB or TB - use 'B' or 'Q'
-* PP, SP or TP - use 'C' or 'R'
-*
-* If two calls to DLATMT differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) DOUBLE PRECISION array, dimension ( LDA, N )
-* On exit A is the desired test matrix. A is first generated
-* in full (unpacked) form, and then packed, if so specified
-* by PACK. Thus, the first M elements of the first N
-* columns will always be modified. If PACK specifies a
-* packed or banded storage scheme, all LDA elements of the
-* first N columns will be modified; the elements of the
-* array which do not correspond to elements of the generated
-* matrix are set to zero.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
-* LDA must be at least M. If PACK='B' or 'Q', then LDA must
-* be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
-* If PACK='Z', LDA must be large enough to hold the packed
-* array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
-* Not modified.
-*
-* WORK (workspace) DOUBLE PRECISION array, dimension ( 3*MAX( N , M ) )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => KL negative
-* -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
-* -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
-* or PACK='C' or 'Q' and SYM='N' and KL is not zero;
-* or PACK='R' or 'B' and SYM='N' and KU is not zero;
-* or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
-* N.
-* -14 => LDA is less than M, or PACK='Z' and LDA is less than
-* MIN(KU,N-1) + MIN(KL,M-1) + 1.
-* 1 => Error return from DLATM7
-* 2 => Cannot scale to DMAX (max. sing. value is 0)
-* 3 => Error return from DLAGGE or DLAGSY
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slagge.f b/TESTING/MATGEN/slagge.f
index f2f7d7aa..e551eee5 100644
--- a/TESTING/MATGEN/slagge.f
+++ b/TESTING/MATGEN/slagge.f
@@ -1,62 +1,132 @@
- SUBROUTINE SLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1)
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL A( LDA, * ), D( * ), WORK( * )
-* ..
-*
+*> \brief \b SLAGGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), D( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLAGGE generates a real general m by n matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with random orthogonal matrices:
-* A = U*D*V. The lower and upper bandwidths may then be reduced to
-* kl and ku by additional orthogonal transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAGGE generates a real general m by n matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with random orthogonal matrices:
+*> A = U*D*V. The lower and upper bandwidths may then be reduced to
+*> kl and ku by additional orthogonal transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* The number of nonzero superdiagonals within the band of A.
-* 0 <= KU <= N-1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of nonzero superdiagonals within the band of A.
+*> 0 <= KU <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (min(M,N))
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The generated m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (M+N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (min(M,N))
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) REAL array, dimension (LDA,N)
-* The generated m by n matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \ingroup real_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE SLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (M+N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL A( LDA, * ), D( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/slagsy.f b/TESTING/MATGEN/slagsy.f
index 00ff328e..18fdee00 100644
--- a/TESTING/MATGEN/slagsy.f
+++ b/TESTING/MATGEN/slagsy.f
@@ -1,56 +1,120 @@
- SUBROUTINE SLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1)
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL A( LDA, * ), D( * ), WORK( * )
-* ..
-*
+*> \brief \b SLAGSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), D( * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLAGSY generates a real symmetric matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with a random orthogonal matrix:
-* A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
-* orthogonal transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAGSY generates a real symmetric matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with a random orthogonal matrix:
+*> A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
+*> orthogonal transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* K (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= K <= N-1.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= K <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (N)
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> The generated n by n symmetric matrix A (the full matrix is
+*> stored).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) REAL array, dimension (N)
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) REAL array, dimension (LDA,N)
-* The generated n by n symmetric matrix A (the full matrix is
-* stored).
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup real_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE SLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL A( LDA, * ), D( * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/slahilb.f b/TESTING/MATGEN/slahilb.f
index 60d6dc8a..ceb9ef25 100644
--- a/TESTING/MATGEN/slahilb.f
+++ b/TESTING/MATGEN/slahilb.f
@@ -1,106 +1,166 @@
+*> \brief \b SLAHILB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
+*
+* .. Scalar Arguments ..
+* INTEGER N, NRHS, LDA, LDX, LDB, INFO
+* .. Array Arguments ..
+* REAL A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAHILB generates an N by N scaled Hilbert matrix in A along with
+*> NRHS right-hand sides in B and solutions in X such that A*X=B.
+*>
+*> The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all
+*> entries are integers. The right-hand sides are the first NRHS
+*> columns of M * the identity matrix, and the solutions are the
+*> first NRHS columns of the inverse Hilbert matrix.
+*>
+*> The condition number of the Hilbert matrix grows exponentially with
+*> its size, roughly as O(e ** (3.5*N)). Additionally, the inverse
+*> Hilbert matrices beyond a relatively small dimension cannot be
+*> generated exactly without extra precision. Precision is exhausted
+*> when the largest entry in the inverse Hilbert matrix is greater than
+*> 2 to the power of the number of bits in the fraction of the data type
+*> used plus one, which is 24 for single precision.
+*>
+*> In single, the generated solution is exact for N <= 6 and has
+*> small componentwise error for 7 <= N <= 11.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The requested number of right-hand sides.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> The generated scaled Hilbert matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX, NRHS)
+*> The generated exact solutions. Currently, the first NRHS
+*> columns of the inverse Hilbert matrix.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= N.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, NRHS)
+*> The generated right-hand sides. Currently, the first NRHS
+*> columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: N is too large; the data is still generated but may not
+*> be not exact.
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
SUBROUTINE SLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK, INFO)
-!
-! -- LAPACK auxiliary test routine (version 3.2.2) --
-! Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-! Courant Institute, Argonne National Lab, and Rice University
-* June 2010
-!
-! David Vu <dtv@cs.berkeley.edu>
-! Yozo Hida <yozo@cs.berkeley.edu>
-! Jason Riedy <ejr@cs.berkeley.edu>
-! D. Halligan <dhalligan@berkeley.edu>
-!
- IMPLICIT NONE
-! .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
INTEGER N, NRHS, LDA, LDX, LDB, INFO
-! .. Array Arguments ..
+* .. Array Arguments ..
REAL A(LDA, N), X(LDX, NRHS), B(LDB, NRHS), WORK(N)
-! ..
-!
-! Purpose
-! =======
-!
-! SLAHILB generates an N by N scaled Hilbert matrix in A along with
-! NRHS right-hand sides in B and solutions in X such that A*X=B.
-!
-! The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all
-! entries are integers. The right-hand sides are the first NRHS
-! columns of M * the identity matrix, and the solutions are the
-! first NRHS columns of the inverse Hilbert matrix.
-!
-! The condition number of the Hilbert matrix grows exponentially with
-! its size, roughly as O(e ** (3.5*N)). Additionally, the inverse
-! Hilbert matrices beyond a relatively small dimension cannot be
-! generated exactly without extra precision. Precision is exhausted
-! when the largest entry in the inverse Hilbert matrix is greater than
-! 2 to the power of the number of bits in the fraction of the data type
-! used plus one, which is 24 for single precision.
-!
-! In single, the generated solution is exact for N <= 6 and has
-! small componentwise error for 7 <= N <= 11.
-!
-! Arguments
-! =========
-!
-! N (input) INTEGER
-! The dimension of the matrix A.
-!
-! NRHS (input) INTEGER
-! The requested number of right-hand sides.
-!
-! A (output) REAL array, dimension (LDA, N)
-! The generated scaled Hilbert matrix.
-!
-! LDA (input) INTEGER
-! The leading dimension of the array A. LDA >= N.
-!
-! X (output) REAL array, dimension (LDX, NRHS)
-! The generated exact solutions. Currently, the first NRHS
-! columns of the inverse Hilbert matrix.
-!
-! LDX (input) INTEGER
-! The leading dimension of the array X. LDX >= N.
-!
-! B (output) REAL array, dimension (LDB, NRHS)
-! The generated right-hand sides. Currently, the first NRHS
-! columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
-!
-! LDB (input) INTEGER
-! The leading dimension of the array B. LDB >= N.
-!
-! WORK (workspace) REAL array, dimension (N)
-!
-!
-! INFO (output) INTEGER
-! = 0: successful exit
-! = 1: N is too large; the data is still generated but may not
-! be not exact.
-! < 0: if INFO = -i, the i-th argument had an illegal value
-!
-! =====================================================================
+* ..
+*
+* =====================================================================
-! .. Local Scalars ..
+* .. Local Scalars ..
INTEGER TM, TI, R
INTEGER M
INTEGER I, J
-! .. Parameters ..
-! NMAX_EXACT the largest dimension where the generated data is
-! exact.
-! NMAX_APPROX the largest dimension where the generated data has
-! a small componentwise relative error.
+* .. Parameters ..
+* NMAX_EXACT the largest dimension where the generated data is
+* exact.
+* NMAX_APPROX the largest dimension where the generated data has
+* a small componentwise relative error.
INTEGER NMAX_EXACT, NMAX_APPROX
PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11)
-! ..
-! .. External Functions
+* ..
+* .. External Functions
EXTERNAL SLASET
INTRINSIC REAL
-! ..
-! .. Executable Statements ..
-!
-! Test the input arguments
-!
+* ..
+* .. Executable Statements ..
+*
+* Test the input arguments
+*
INFO = 0
IF (N .LT. 0 .OR. N .GT. NMAX_APPROX) THEN
INFO = -1
@@ -121,8 +181,8 @@
INFO = 1
END IF
-! Compute M = the LCM of the integers [1, 2*N-1]. The largest
-! reasonable N is small enough that integers suffice (up to N = 11).
+* Compute M = the LCM of the integers [1, 2*N-1]. The largest
+* reasonable N is small enough that integers suffice (up to N = 11).
M = 1
DO I = 2, (2*N-1)
TM = M
@@ -136,20 +196,20 @@
M = (M / TI) * I
END DO
-! Generate the scaled Hilbert matrix in A
+* Generate the scaled Hilbert matrix in A
DO J = 1, N
DO I = 1, N
A(I, J) = REAL(M) / (I + J - 1)
END DO
END DO
-! Generate matrix B as simply the first NRHS columns of M * the
-! identity.
+* Generate matrix B as simply the first NRHS columns of M * the
+* identity.
CALL SLASET('Full', N, NRHS, 0.0, REAL(M), B, LDB)
-! Generate the true solutions in X. Because B = the first NRHS
-! columns of M*I, the true solutions are just the first NRHS columns
-! of the inverse Hilbert matrix.
+* Generate the true solutions in X. Because B = the first NRHS
+* columns of M*I, the true solutions are just the first NRHS columns
+* of the inverse Hilbert matrix.
WORK(1) = N
DO J = 2, N
WORK(J) = ( ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1) )
diff --git a/TESTING/MATGEN/slakf2.f b/TESTING/MATGEN/slakf2.f
index ef0d38f9..a5bbdad3 100644
--- a/TESTING/MATGEN/slakf2.f
+++ b/TESTING/MATGEN/slakf2.f
@@ -1,54 +1,125 @@
- SUBROUTINE SLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDZ, M, N
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDA, * ), D( LDA, * ),
- $ E( LDA, * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b SLAKF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDA, * ), D( LDA, * ),
+* $ E( LDA, * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* Form the 2*M*N by 2*M*N matrix
-*
-* Z = [ kron(In, A) -kron(B', Im) ]
-* [ kron(In, D) -kron(E', Im) ],
-*
-* where In is the identity matrix of size n and X' is the transpose
-* of X. kron(X, Y) is the Kronecker product between the matrices X
-* and Y.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Form the 2*M*N by 2*M*N matrix
+*>
+*> Z = [ kron(In, A) -kron(B', Im) ]
+*> [ kron(In, D) -kron(E', Im) ],
+*>
+*> where In is the identity matrix of size n and X' is the transpose
+*> of X. kron(X, Y) is the Kronecker product between the matrices X
+*> and Y.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Size of matrix, must be >= 1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Size of matrix, must be >= 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Size of matrix, must be >= 1.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is REAL, dimension ( LDA, M )
+*> The matrix A in the output matrix Z.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, D, and E. ( LDA >= M+N )
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is REAL, dimension ( LDA, N )
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL, dimension ( LDA, M )
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is REAL, dimension ( LDA, N )
+*> \endverbatim
+*> \verbatim
+*> The matrices used in forming the output matrix Z.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is REAL, dimension ( LDZ, 2*M*N )
+*> The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of Z. ( LDZ >= 2*M*N )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Size of matrix, must be >= 1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) REAL, dimension ( LDA, M )
-* The matrix A in the output matrix Z.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of A, B, D, and E. ( LDA >= M+N )
+*> \ingroup real_matgen
*
-* B (input) REAL, dimension ( LDA, N )
-* D (input) REAL, dimension ( LDA, M )
-* E (input) REAL, dimension ( LDA, N )
-* The matrices used in forming the output matrix Z.
+* =====================================================================
+ SUBROUTINE SLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
*
-* Z (output) REAL, dimension ( LDZ, 2*M*N )
-* The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDZ (input) INTEGER
-* The leading dimension of Z. ( LDZ >= 2*M*N )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDZ, M, N
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDA, * ), D( LDA, * ),
+ $ E( LDA, * ), Z( LDZ, * )
+* ..
*
* ====================================================================
*
diff --git a/TESTING/MATGEN/slaran.f b/TESTING/MATGEN/slaran.f
index 97ae5be9..079aa349 100644
--- a/TESTING/MATGEN/slaran.f
+++ b/TESTING/MATGEN/slaran.f
@@ -1,40 +1,84 @@
- REAL FUNCTION SLARAN( ISEED )
+*> \brief \b SLARAN
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLARAN( ISEED )
+*
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* ..
+*
* Purpose
* =======
*
-* SLARAN returns a random real number from a uniform (0,1)
-* distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARAN returns a random real number from a uniform (0,1)
+*> distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine uses a multiplicative congruential method with modulus
+*> 2**48 and multiplier 33952834046453 (see G.S.Fishman,
+*> 'Multiplicative congruential random number generators with modulus
+*> 2**b: an exhaustive analysis for b = 32 and a partial analysis for
+*> b = 48', Math. Comp. 189, pp 331-344, 1990).
+*>
+*> 48-bit integers are stored in 4 integer array elements with 12 bits
+*> per element. Hence the routine is portable across machines with
+*> integers of 32 bits or more.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION SLARAN( ISEED )
*
-* This routine uses a multiplicative congruential method with modulus
-* 2**48 and multiplier 33952834046453 (see G.S.Fishman,
-* 'Multiplicative congruential random number generators with modulus
-* 2**b: an exhaustive analysis for b = 32 and a partial analysis for
-* b = 48', Math. Comp. 189, pp 331-344, 1990).
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* 48-bit integers are stored in 4 integer array elements with 12 bits
-* per element. Hence the routine is portable across machines with
-* integers of 32 bits or more.
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/slarge.f b/TESTING/MATGEN/slarge.f
index 7ee18ba6..8293c289 100644
--- a/TESTING/MATGEN/slarge.f
+++ b/TESTING/MATGEN/slarge.f
@@ -1,48 +1,106 @@
- SUBROUTINE SLARGE( N, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1)
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- REAL A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b SLARGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLARGE( N, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* SLARGE pre- and post-multiplies a real general n by n matrix A
-* with a random orthogonal matrix: A = U*D*U'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARGE pre- and post-multiplies a real general n by n matrix A
+*> with a random orthogonal matrix: A = U*D*U'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On entry, the original n by n matrix A.
+*> On exit, A is overwritten by U*A*U' for some random
+*> orthogonal matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) REAL array, dimension (LDA,N)
-* On entry, the original n by n matrix A.
-* On exit, A is overwritten by U*A*U' for some random
-* orthogonal matrix U.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup real_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE SLARGE( N, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) REAL array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ REAL A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/slarnd.f b/TESTING/MATGEN/slarnd.f
index 9386d6d6..3868af38 100644
--- a/TESTING/MATGEN/slarnd.f
+++ b/TESTING/MATGEN/slarnd.f
@@ -1,43 +1,93 @@
- REAL FUNCTION SLARND( IDIST, ISEED )
+*> \brief \b SLARND
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IDIST
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* REAL FUNCTION SLARND( IDIST, ISEED )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* ..
+*
* Purpose
* =======
*
-* SLARND returns a random real number from a uniform or normal
-* distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLARND returns a random real number from a uniform or normal
+*> distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IDIST (input) INTEGER
-* Specifies the distribution of the random numbers:
-* = 1: uniform (0,1)
-* = 2: uniform (-1,1)
-* = 3: normal (0,1)
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the distribution of the random numbers:
+*> = 1: uniform (0,1)
+*> = 2: uniform (-1,1)
+*> = 3: normal (0,1)
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine calls the auxiliary routine SLARAN to generate a random
+*> real number from a uniform (0,1) distribution. The Box-Muller method
+*> is used to transform numbers from a uniform to a normal distribution.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ REAL FUNCTION SLARND( IDIST, ISEED )
*
-* This routine calls the auxiliary routine SLARAN to generate a random
-* real number from a uniform (0,1) distribution. The Box-Muller method
-* is used to transform numbers from a uniform to a normal distribution.
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER IDIST
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/slaror.f b/TESTING/MATGEN/slaror.f
index 4e5bef53..b1711e1e 100644
--- a/TESTING/MATGEN/slaror.f
+++ b/TESTING/MATGEN/slaror.f
@@ -1,8 +1,161 @@
+*> \brief \b SLAROR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAROR( SIDE, INIT, M, N, A, LDA, ISEED, X, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER INIT, SIDE
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAROR pre- or post-multiplies an M by N matrix A by a random
+*> orthogonal matrix U, overwriting A. A may optionally be initialized
+*> to the identity matrix before multiplying by U. U is generated using
+*> the method of G.W. Stewart (SIAM J. Numer. Anal. 17, 1980, 403-409).
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> Specifies whether A is multiplied on the left or right by U.
+*> = 'L': Multiply A on the left (premultiply) by U
+*> = 'R': Multiply A on the right (postmultiply) by U'
+*> = 'C' or 'T': Multiply A on the left by U and the right
+*> by U' (Here, U' means U-transpose.)
+*> \endverbatim
+*>
+*> \param[in] INIT
+*> \verbatim
+*> INIT is CHARACTER*1
+*> Specifies whether or not A should be initialized to the
+*> identity matrix.
+*> = 'I': Initialize A to (a section of) the identity matrix
+*> before applying U.
+*> = 'N': No initialization. Apply U to the input matrix A.
+*> \endverbatim
+*> \verbatim
+*> INIT = 'I' may be used to generate square or rectangular
+*> orthogonal matrices:
+*> \endverbatim
+*> \verbatim
+*> For M = N and SIDE = 'L' or 'R', the rows will be orthogonal
+*> to each other, as will the columns.
+*> \endverbatim
+*> \verbatim
+*> If M < N, SIDE = 'R' produces a dense matrix whose rows are
+*> orthogonal and whose columns are not, while SIDE = 'L'
+*> produces a matrix whose rows are orthogonal, and whose first
+*> M columns are orthogonal, and whose remaining columns are
+*> zero.
+*> \endverbatim
+*> \verbatim
+*> If M > N, SIDE = 'L' produces a dense matrix whose columns
+*> are orthogonal and whose rows are not, while SIDE = 'R'
+*> produces a matrix whose columns are orthogonal, and whose
+*> first M rows are orthogonal, and whose remaining rows are
+*> zero.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N)
+*> On entry, the array A.
+*> On exit, overwritten by U A ( if SIDE = 'L' ),
+*> or by A U ( if SIDE = 'R' ),
+*> or by U A U' ( if SIDE = 'C' or 'T').
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to SLAROR to continue the same random number
+*> sequence.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (3*MAX( M, N ))
+*> Workspace of length
+*> 2*M + N if SIDE = 'L',
+*> 2*N + M if SIDE = 'R',
+*> 3*N if SIDE = 'C' or 'T'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> An error flag. It is set to:
+*> = 0: normal return
+*> < 0: if INFO = -k, the k-th argument had an illegal value
+*> = 1: if the random numbers generated by SLARND are bad.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
SUBROUTINE SLAROR( SIDE, INIT, M, N, A, LDA, ISEED, X, INFO )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER INIT, SIDE
@@ -13,87 +166,6 @@
REAL A( LDA, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* SLAROR pre- or post-multiplies an M by N matrix A by a random
-* orthogonal matrix U, overwriting A. A may optionally be initialized
-* to the identity matrix before multiplying by U. U is generated using
-* the method of G.W. Stewart (SIAM J. Numer. Anal. 17, 1980, 403-409).
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* Specifies whether A is multiplied on the left or right by U.
-* = 'L': Multiply A on the left (premultiply) by U
-* = 'R': Multiply A on the right (postmultiply) by U'
-* = 'C' or 'T': Multiply A on the left by U and the right
-* by U' (Here, U' means U-transpose.)
-*
-* INIT (input) CHARACTER*1
-* Specifies whether or not A should be initialized to the
-* identity matrix.
-* = 'I': Initialize A to (a section of) the identity matrix
-* before applying U.
-* = 'N': No initialization. Apply U to the input matrix A.
-*
-* INIT = 'I' may be used to generate square or rectangular
-* orthogonal matrices:
-*
-* For M = N and SIDE = 'L' or 'R', the rows will be orthogonal
-* to each other, as will the columns.
-*
-* If M < N, SIDE = 'R' produces a dense matrix whose rows are
-* orthogonal and whose columns are not, while SIDE = 'L'
-* produces a matrix whose rows are orthogonal, and whose first
-* M columns are orthogonal, and whose remaining columns are
-* zero.
-*
-* If M > N, SIDE = 'L' produces a dense matrix whose columns
-* are orthogonal and whose rows are not, while SIDE = 'R'
-* produces a matrix whose columns are orthogonal, and whose
-* first M rows are orthogonal, and whose remaining rows are
-* zero.
-*
-* M (input) INTEGER
-* The number of rows of A.
-*
-* N (input) INTEGER
-* The number of columns of A.
-*
-* A (input/output) REAL array, dimension (LDA, N)
-* On entry, the array A.
-* On exit, overwritten by U A ( if SIDE = 'L' ),
-* or by A U ( if SIDE = 'R' ),
-* or by U A U' ( if SIDE = 'C' or 'T').
-*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= max(1,M).
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to SLAROR to continue the same random number
-* sequence.
-*
-* X (workspace) REAL array, dimension (3*MAX( M, N ))
-* Workspace of length
-* 2*M + N if SIDE = 'L',
-* 2*N + M if SIDE = 'R',
-* 3*N if SIDE = 'C' or 'T'.
-*
-* INFO (output) INTEGER
-* An error flag. It is set to:
-* = 0: normal return
-* < 0: if INFO = -k, the k-th argument had an illegal value
-* = 1: if the random numbers generated by SLARND are bad.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slarot.f b/TESTING/MATGEN/slarot.f
index 466cb29f..0bf495be 100644
--- a/TESTING/MATGEN/slarot.f
+++ b/TESTING/MATGEN/slarot.f
@@ -1,202 +1,254 @@
- SUBROUTINE SLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
- $ XRIGHT )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- LOGICAL LLEFT, LRIGHT, LROWS
- INTEGER LDA, NL
- REAL C, S, XLEFT, XRIGHT
-* ..
-* .. Array Arguments ..
- REAL A( * )
-* ..
-*
+*> \brief \b SLAROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
+* XRIGHT )
+*
+* .. Scalar Arguments ..
+* LOGICAL LLEFT, LRIGHT, LROWS
+* INTEGER LDA, NL
+* REAL C, S, XLEFT, XRIGHT
+* ..
+* .. Array Arguments ..
+* REAL A( * )
+* ..
+*
* Purpose
* =======
*
-* SLAROT applies a (Givens) rotation to two adjacent rows or
-* columns, where one element of the first and/or last column/row
-* for use on matrices stored in some format other than GE, so
-* that elements of the matrix may be used or modified for which
-* no array element is provided.
-*
-* One example is a symmetric matrix in SB format (bandwidth=4), for
-* which UPLO='L': Two adjacent rows will have the format:
-*
-* row j: * * * * * . . . .
-* row j+1: * * * * * . . . .
-*
-* '*' indicates elements for which storage is provided,
-* '.' indicates elements for which no storage is provided, but
-* are not necessarily zero; their values are determined by
-* symmetry. ' ' indicates elements which are necessarily zero,
-* and have no storage provided.
-*
-* Those columns which have two '*'s can be handled by SROT.
-* Those columns which have no '*'s can be ignored, since as long
-* as the Givens rotations are carefully applied to preserve
-* symmetry, their values are determined.
-* Those columns which have one '*' have to be handled separately,
-* by using separate variables "p" and "q":
-*
-* row j: * * * * * p . . .
-* row j+1: q * * * * * . . . .
-*
-* The element p would have to be set correctly, then that column
-* is rotated, setting p to its new value. The next call to
-* SLAROT would rotate columns j and j+1, using p, and restore
-* symmetry. The element q would start out being zero, and be
-* made non-zero by the rotation. Later, rotations would presumably
-* be chosen to zero q out.
-*
-* Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
-* ------- ------- ---------
-*
-* General dense matrix:
-*
-* CALL SLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
-* A(i,1),LDA, DUMMY, DUMMY)
-*
-* General banded matrix in GB format:
-*
-* j = MAX(1, i-KL )
-* NL = MIN( N, i+KU+1 ) + 1-j
-* CALL SLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
-* A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
-*
-* [ note that i+1-j is just MIN(i,KL+1) ]
-*
-* Symmetric banded matrix in SY format, bandwidth K,
-* lower triangle only:
-*
-* j = MAX(1, i-K )
-* NL = MIN( K+1, i ) + 1
-* CALL SLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
-* A(i,j), LDA, XLEFT, XRIGHT )
-*
-* Same, but upper triangle only:
-*
-* NL = MIN( K+1, N-i ) + 1
-* CALL SLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
-* A(i,i), LDA, XLEFT, XRIGHT )
-*
-* Symmetric banded matrix in SB format, bandwidth K,
-* lower triangle only:
-*
-* [ same as for SY, except:]
-* . . . .
-* A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
-*
-* [ note that i+1-j is just MIN(i,K+1) ]
-*
-* Same, but upper triangle only:
-* . . .
-* A(K+1,i), LDA-1, XLEFT, XRIGHT )
-*
-* Rotating columns is just the transpose of rotating rows, except
-* for GB and SB: (rotating columns i and i+1)
-*
-* GB:
-* j = MAX(1, i-KU )
-* NL = MIN( N, i+KL+1 ) + 1-j
-* CALL SLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
-* A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
-*
-* [note that KU+j+1-i is just MAX(1,KU+2-i)]
-*
-* SB: (upper triangle)
-*
-* . . . . . .
-* A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
-*
-* SB: (lower triangle)
-*
-* . . . . . .
-* A(1,i),LDA-1, XTOP, XBOTTM )
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLAROT applies a (Givens) rotation to two adjacent rows or
+*> columns, where one element of the first and/or last column/row
+*> for use on matrices stored in some format other than GE, so
+*> that elements of the matrix may be used or modified for which
+*> no array element is provided.
+*>
+*> One example is a symmetric matrix in SB format (bandwidth=4), for
+*> which UPLO='L': Two adjacent rows will have the format:
+*>
+*> row j: C> C> C> C> C> . . . .
+*> row j+1: C> C> C> C> C> . . . .
+*>
+*> '*' indicates elements for which storage is provided,
+*> '.' indicates elements for which no storage is provided, but
+*> are not necessarily zero; their values are determined by
+*> symmetry. ' ' indicates elements which are necessarily zero,
+*> and have no storage provided.
+*>
+*> Those columns which have two '*'s can be handled by SROT.
+*> Those columns which have no '*'s can be ignored, since as long
+*> as the Givens rotations are carefully applied to preserve
+*> symmetry, their values are determined.
+*> Those columns which have one '*' have to be handled separately,
+*> by using separate variables "p" and "q":
+*>
+*> row j: C> C> C> C> C> p . . .
+*> row j+1: q C> C> C> C> C> . . . .
+*>
+*> The element p would have to be set correctly, then that column
+*> is rotated, setting p to its new value. The next call to
+*> SLAROT would rotate columns j and j+1, using p, and restore
+*> symmetry. The element q would start out being zero, and be
+*> made non-zero by the rotation. Later, rotations would presumably
+*> be chosen to zero q out.
+*>
+*> Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
+*> ------- ------- ---------
+*>
+*> General dense matrix:
+*>
+*> CALL SLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
+*> A(i,1),LDA, DUMMY, DUMMY)
+*>
+*> General banded matrix in GB format:
+*>
+*> j = MAX(1, i-KL )
+*> NL = MIN( N, i+KU+1 ) + 1-j
+*> CALL SLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
+*> A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
+*>
+*> [ note that i+1-j is just MIN(i,KL+1) ]
+*>
+*> Symmetric banded matrix in SY format, bandwidth K,
+*> lower triangle only:
+*>
+*> j = MAX(1, i-K )
+*> NL = MIN( K+1, i ) + 1
+*> CALL SLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
+*> A(i,j), LDA, XLEFT, XRIGHT )
+*>
+*> Same, but upper triangle only:
+*>
+*> NL = MIN( K+1, N-i ) + 1
+*> CALL SLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
+*> A(i,i), LDA, XLEFT, XRIGHT )
+*>
+*> Symmetric banded matrix in SB format, bandwidth K,
+*> lower triangle only:
+*>
+*> [ same as for SY, except:]
+*> . . . .
+*> A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
+*>
+*> [ note that i+1-j is just MIN(i,K+1) ]
+*>
+*> Same, but upper triangle only:
+*> . . .
+*> A(K+1,i), LDA-1, XLEFT, XRIGHT )
+*>
+*> Rotating columns is just the transpose of rotating rows, except
+*> for GB and SB: (rotating columns i and i+1)
+*>
+*> GB:
+*> j = MAX(1, i-KU )
+*> NL = MIN( N, i+KL+1 ) + 1-j
+*> CALL SLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
+*> A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
+*>
+*> [note that KU+j+1-i is just MAX(1,KU+2-i)]
+*>
+*> SB: (upper triangle)
+*>
+*> . . . . . .
+*> A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
+*>
+*> SB: (lower triangle)
+*>
+*> . . . . . .
+*> A(1,i),LDA-1, XTOP, XBOTTM )
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* LROWS - LOGICAL
-* If .TRUE., then SLAROT will rotate two rows. If .FALSE.,
-* then it will rotate two columns.
-* Not modified.
-*
-* LLEFT - LOGICAL
-* If .TRUE., then XLEFT will be used instead of the
-* corresponding element of A for the first element in the
-* second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
-* If .FALSE., then the corresponding element of A will be
-* used.
-* Not modified.
-*
-* LRIGHT - LOGICAL
-* If .TRUE., then XRIGHT will be used instead of the
-* corresponding element of A for the last element in the
-* first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
-* .FALSE., then the corresponding element of A will be used.
-* Not modified.
+*> \verbatim
+*> LROWS - LOGICAL
+*> If .TRUE., then SLAROT will rotate two rows. If .FALSE.,
+*> then it will rotate two columns.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LLEFT - LOGICAL
+*> If .TRUE., then XLEFT will be used instead of the
+*> corresponding element of A for the first element in the
+*> second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
+*> If .FALSE., then the corresponding element of A will be
+*> used.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LRIGHT - LOGICAL
+*> If .TRUE., then XRIGHT will be used instead of the
+*> corresponding element of A for the last element in the
+*> first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
+*> .FALSE., then the corresponding element of A will be used.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NL - INTEGER
+*> The length of the rows (if LROWS=.TRUE.) or columns (if
+*> LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
+*> used, the columns/rows they are in should be included in
+*> NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
+*> least 2. The number of rows/columns to be rotated
+*> exclusive of those involving XLEFT and/or XRIGHT may
+*> not be negative, i.e., NL minus how many of LLEFT and
+*> LRIGHT are .TRUE. must be at least zero; if not, XERBLA
+*> will be called.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> C, S - REAL
+*> Specify the Givens rotation to be applied. If LROWS is
+*> true, then the matrix ( c s )
+*> (-s c ) is applied from the left;
+*> if false, then the transpose thereof is applied from the
+*> right. For a Givens rotation, C**2 + S**2 should be 1,
+*> but this is not checked.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A - REAL array.
+*> The array containing the rows/columns to be rotated. The
+*> first element of A should be the upper left element to
+*> be rotated.
+*> Read and modified.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> The "effective" leading dimension of A. If A contains
+*> a matrix stored in GE or SY format, then this is just
+*> the leading dimension of A as dimensioned in the calling
+*> routine. If A contains a matrix stored in band (GB or SB)
+*> format, then this should be *one less* than the leading
+*> dimension used in the calling routine. Thus, if
+*> A were dimensioned A(LDA,*) in SLAROT, then A(1,j) would
+*> be the j-th element in the first of the two rows
+*> to be rotated, and A(2,j) would be the j-th in the second,
+*> regardless of how the array may be stored in the calling
+*> routine. [A cannot, however, actually be dimensioned thus,
+*> since for band format, the row number may exceed LDA, which
+*> is not legal FORTRAN.]
+*> If LROWS=.TRUE., then LDA must be at least 1, otherwise
+*> it must be at least NL minus the number of .TRUE. values
+*> in XLEFT and XRIGHT.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> XLEFT - REAL
+*> If LLEFT is .TRUE., then XLEFT will be used and modified
+*> instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
+*> (if LROWS=.FALSE.).
+*> Read and modified.
+*> \endverbatim
+*> \verbatim
+*> XRIGHT - REAL
+*> If LRIGHT is .TRUE., then XRIGHT will be used and modified
+*> instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
+*> (if LROWS=.FALSE.).
+*> Read and modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* NL - INTEGER
-* The length of the rows (if LROWS=.TRUE.) or columns (if
-* LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
-* used, the columns/rows they are in should be included in
-* NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
-* least 2. The number of rows/columns to be rotated
-* exclusive of those involving XLEFT and/or XRIGHT may
-* not be negative, i.e., NL minus how many of LLEFT and
-* LRIGHT are .TRUE. must be at least zero; if not, XERBLA
-* will be called.
-* Not modified.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* C, S - REAL
-* Specify the Givens rotation to be applied. If LROWS is
-* true, then the matrix ( c s )
-* (-s c ) is applied from the left;
-* if false, then the transpose thereof is applied from the
-* right. For a Givens rotation, C**2 + S**2 should be 1,
-* but this is not checked.
-* Not modified.
+*> \date November 2011
*
-* A - REAL array.
-* The array containing the rows/columns to be rotated. The
-* first element of A should be the upper left element to
-* be rotated.
-* Read and modified.
+*> \ingroup real_matgen
*
-* LDA - INTEGER
-* The "effective" leading dimension of A. If A contains
-* a matrix stored in GE or SY format, then this is just
-* the leading dimension of A as dimensioned in the calling
-* routine. If A contains a matrix stored in band (GB or SB)
-* format, then this should be *one less* than the leading
-* dimension used in the calling routine. Thus, if
-* A were dimensioned A(LDA,*) in SLAROT, then A(1,j) would
-* be the j-th element in the first of the two rows
-* to be rotated, and A(2,j) would be the j-th in the second,
-* regardless of how the array may be stored in the calling
-* routine. [A cannot, however, actually be dimensioned thus,
-* since for band format, the row number may exceed LDA, which
-* is not legal FORTRAN.]
-* If LROWS=.TRUE., then LDA must be at least 1, otherwise
-* it must be at least NL minus the number of .TRUE. values
-* in XLEFT and XRIGHT.
-* Not modified.
+* =====================================================================
+ SUBROUTINE SLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
+ $ XRIGHT )
*
-* XLEFT - REAL
-* If LLEFT is .TRUE., then XLEFT will be used and modified
-* instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
-* (if LROWS=.FALSE.).
-* Read and modified.
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* XRIGHT - REAL
-* If LRIGHT is .TRUE., then XRIGHT will be used and modified
-* instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
-* (if LROWS=.FALSE.).
-* Read and modified.
+* .. Scalar Arguments ..
+ LOGICAL LLEFT, LRIGHT, LROWS
+ INTEGER LDA, NL
+ REAL C, S, XLEFT, XRIGHT
+* ..
+* .. Array Arguments ..
+ REAL A( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/slatm1.f b/TESTING/MATGEN/slatm1.f
index 507b9df0..55415420 100644
--- a/TESTING/MATGEN/slatm1.f
+++ b/TESTING/MATGEN/slatm1.f
@@ -1,8 +1,146 @@
+*> \brief \b SLATM1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATM1( MODE, COND, IRSIGN, IDIST, ISEED, D, N, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, INFO, IRSIGN, MODE, N
+* REAL COND
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL D( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATM1 computes the entries of D(1..N) as specified by
+*> MODE, COND and IRSIGN. IDIST and ISEED determine the generation
+*> of random numbers. SLATM1 is called by SLATMR to generate
+*> random test matrices for LAPACK programs.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry describes how D is to be computed:
+*> MODE = 0 means do not change D.
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IRSIGN
+*> \verbatim
+*> IRSIGN is INTEGER
+*> On entry, if MODE neither -6, 0 nor 6, determines sign of
+*> entries of D
+*> 0 => leave entries of D unchanged
+*> 1 => multiply each entry of D by 1 or -1 with probability .5
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is CHARACTER*1
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => UNIFORM( 0, 1 )
+*> 2 => UNIFORM( -1, 1 )
+*> 3 => NORMAL( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. The random number generator uses a
+*> linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to SLATM1
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension ( MIN( M , N ) )
+*> Array to be computed according to MODE, COND and IRSIGN.
+*> May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of entries of D. Not modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 => normal termination
+*> -1 => if MODE not in range -6 to 6
+*> -2 => if MODE neither -6, 0 nor 6, and
+*> IRSIGN neither 0 nor 1
+*> -3 => if MODE neither -6, 0 nor 6 and COND less than 1
+*> -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
+*> -7 => if N negative
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
SUBROUTINE SLATM1( MODE, COND, IRSIGN, IDIST, ISEED, D, N, INFO )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IDIST, INFO, IRSIGN, MODE, N
@@ -13,79 +151,6 @@
REAL D( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATM1 computes the entries of D(1..N) as specified by
-* MODE, COND and IRSIGN. IDIST and ISEED determine the generation
-* of random numbers. SLATM1 is called by SLATMR to generate
-* random test matrices for LAPACK programs.
-*
-* Arguments
-* =========
-*
-* MODE (input) INTEGER
-* On entry describes how D is to be computed:
-* MODE = 0 means do not change D.
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND (input) REAL
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* IRSIGN (input) INTEGER
-* On entry, if MODE neither -6, 0 nor 6, determines sign of
-* entries of D
-* 0 => leave entries of D unchanged
-* 1 => multiply each entry of D by 1 or -1 with probability .5
-*
-* IDIST (input) CHARACTER*1
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => UNIFORM( 0, 1 )
-* 2 => UNIFORM( -1, 1 )
-* 3 => NORMAL( 0, 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. The random number generator uses a
-* linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to SLATM1
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D (input/output) REAL array, dimension ( MIN( M , N ) )
-* Array to be computed according to MODE, COND and IRSIGN.
-* May be changed on exit if MODE is nonzero.
-*
-* N (input) INTEGER
-* Number of entries of D. Not modified.
-*
-* INFO (output) INTEGER
-* 0 => normal termination
-* -1 => if MODE not in range -6 to 6
-* -2 => if MODE neither -6, 0 nor 6, and
-* IRSIGN neither 0 nor 1
-* -3 => if MODE neither -6, 0 nor 6 and COND less than 1
-* -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
-* -7 => if N negative
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slatm2.f b/TESTING/MATGEN/slatm2.f
index 3320e249..81fa969b 100644
--- a/TESTING/MATGEN/slatm2.f
+++ b/TESTING/MATGEN/slatm2.f
@@ -1,9 +1,219 @@
+*> \brief \b SLATM2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLATM2( M, N, I, J, KL, KU, IDIST,
+* ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
+*
+* .. Scalar Arguments ..
+*
+* INTEGER I, IDIST, IGRADE, IPVTNG, J, KL, KU, M, N
+* REAL SPARSE
+* ..
+*
+* .. Array Arguments ..
+*
+* INTEGER ISEED( 4 ), IWORK( * )
+* REAL D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATM2 returns the (I,J) entry of a random matrix of dimension
+*> (M, N) described by the other paramters. It is called by the
+*> SLATMR routine in order to build random test matrices. No error
+*> checking on parameters is done, because this routine is called in
+*> a tight loop by SLATMR which has already checked the parameters.
+*>
+*> Use of SLATM2 differs from SLATM3 in the order in which the random
+*> number generator is called to fill in random matrix entries.
+*> With SLATM2, the generator is called to fill in the pivoted matrix
+*> columnwise. With SLATM3, the generator is called to fill in the
+*> matrix columnwise, after which it is pivoted. Thus, SLATM3 can
+*> be used to construct random matrices which differ only in their
+*> order of rows and/or columns. SLATM2 is used to construct band
+*> matrices while avoiding calling the random number generator for
+*> entries outside the band (and therefore generating random numbers
+*>
+*> The matrix whose (I,J) entry is returned is constructed as
+*> follows (this routine only computes one entry):
+*>
+*> If I is outside (1..M) or J is outside (1..N), return zero
+*> (this is convenient for generating matrices in band format).
+*>
+*> Generate a matrix A with random entries of distribution IDIST.
+*>
+*> Set the diagonal to D.
+*>
+*> Grade the matrix, if desired, from the left (by DL) and/or
+*> from the right (by DR or DL) as specified by IGRADE.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> IPVTNG and IWORK.
+*>
+*> Band the matrix to have lower bandwidth KL and upper
+*> bandwidth KU.
+*>
+*> Set random entries to zero as specified by SPARSE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> Row of entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Column of entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Lower bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Upper bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => UNIFORM( 0, 1 )
+*> 2 => UNIFORM( -1, 1 )
+*> 3 => NORMAL( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array of dimension ( 4 )
+*> Seed for random number generator.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array of dimension ( MIN( I , J ) )
+*> Diagonal entries of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IGRADE
+*> \verbatim
+*> IGRADE is INTEGER
+*> Specifies grading of matrix as follows:
+*> 0 => no grading
+*> 1 => matrix premultiplied by diag( DL )
+*> 2 => matrix postmultiplied by diag( DR )
+*> 3 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> 4 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> 5 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array ( I or J, as appropriate )
+*> Left scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DR
+*> \verbatim
+*> DR is REAL array ( I or J, as appropriate )
+*> Right scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IPVTNG
+*> \verbatim
+*> IPVTNG is INTEGER
+*> On entry specifies pivoting permutations as follows:
+*> 0 => none.
+*> 1 => row pivoting.
+*> 2 => column pivoting.
+*> 3 => full pivoting, i.e., on both sides.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array ( I or J, as appropriate )
+*> This array specifies the permutation used. The
+*> row (or column) in position K was originally in
+*> position IWORK( K ).
+*> This differs from IWORK for SLATM3. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is REAL between 0. and 1.
+*> On entry specifies the sparsity of the matrix
+*> if sparse matix is to be generated.
+*> SPARSE should lie between 0 and 1.
+*> A uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
REAL FUNCTION SLATM2( M, N, I, J, KL, KU, IDIST,
$ ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
*
@@ -17,126 +227,6 @@
REAL D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATM2 returns the (I,J) entry of a random matrix of dimension
-* (M, N) described by the other paramters. It is called by the
-* SLATMR routine in order to build random test matrices. No error
-* checking on parameters is done, because this routine is called in
-* a tight loop by SLATMR which has already checked the parameters.
-*
-* Use of SLATM2 differs from SLATM3 in the order in which the random
-* number generator is called to fill in random matrix entries.
-* With SLATM2, the generator is called to fill in the pivoted matrix
-* columnwise. With SLATM3, the generator is called to fill in the
-* matrix columnwise, after which it is pivoted. Thus, SLATM3 can
-* be used to construct random matrices which differ only in their
-* order of rows and/or columns. SLATM2 is used to construct band
-* matrices while avoiding calling the random number generator for
-* entries outside the band (and therefore generating random numbers
-*
-* The matrix whose (I,J) entry is returned is constructed as
-* follows (this routine only computes one entry):
-*
-* If I is outside (1..M) or J is outside (1..N), return zero
-* (this is convenient for generating matrices in band format).
-*
-* Generate a matrix A with random entries of distribution IDIST.
-*
-* Set the diagonal to D.
-*
-* Grade the matrix, if desired, from the left (by DL) and/or
-* from the right (by DR or DL) as specified by IGRADE.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* IPVTNG and IWORK.
-*
-* Band the matrix to have lower bandwidth KL and upper
-* bandwidth KU.
-*
-* Set random entries to zero as specified by SPARSE.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of matrix. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of matrix. Not modified.
-*
-* I (input) INTEGER
-* Row of entry to be returned. Not modified.
-*
-* J (input) INTEGER
-* Column of entry to be returned. Not modified.
-*
-* KL (input) INTEGER
-* Lower bandwidth. Not modified.
-*
-* KU (input) INTEGER
-* Upper bandwidth. Not modified.
-*
-* IDIST (input) INTEGER
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => UNIFORM( 0, 1 )
-* 2 => UNIFORM( -1, 1 )
-* 3 => NORMAL( 0, 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array of dimension ( 4 )
-* Seed for random number generator.
-* Changed on exit.
-*
-* D (input) REAL array of dimension ( MIN( I , J ) )
-* Diagonal entries of matrix. Not modified.
-*
-* IGRADE (input) INTEGER
-* Specifies grading of matrix as follows:
-* 0 => no grading
-* 1 => matrix premultiplied by diag( DL )
-* 2 => matrix postmultiplied by diag( DR )
-* 3 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* 4 => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* 5 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* Not modified.
-*
-* DL (input) REAL array ( I or J, as appropriate )
-* Left scale factors for grading matrix. Not modified.
-*
-* DR (input) REAL array ( I or J, as appropriate )
-* Right scale factors for grading matrix. Not modified.
-*
-* IPVTNG (input) INTEGER
-* On entry specifies pivoting permutations as follows:
-* 0 => none.
-* 1 => row pivoting.
-* 2 => column pivoting.
-* 3 => full pivoting, i.e., on both sides.
-* Not modified.
-*
-* IWORK (workspace) INTEGER array ( I or J, as appropriate )
-* This array specifies the permutation used. The
-* row (or column) in position K was originally in
-* position IWORK( K ).
-* This differs from IWORK for SLATM3. Not modified.
-*
-* SPARSE (input) REAL between 0. and 1.
-* On entry specifies the sparsity of the matrix
-* if sparse matix is to be generated.
-* SPARSE should lie between 0 and 1.
-* A uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slatm3.f b/TESTING/MATGEN/slatm3.f
index 5dc4e29b..3c639920 100644
--- a/TESTING/MATGEN/slatm3.f
+++ b/TESTING/MATGEN/slatm3.f
@@ -1,10 +1,237 @@
+*> \brief \b SLATM3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* REAL FUNCTION SLATM3( M, N, I, J, ISUB, JSUB, KL, KU,
+* IDIST, ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK,
+* SPARSE )
+*
+* .. Scalar Arguments ..
+*
+* INTEGER I, IDIST, IGRADE, IPVTNG, ISUB, J, JSUB, KL,
+* $ KU, M, N
+* REAL SPARSE
+* ..
+*
+* .. Array Arguments ..
+*
+* INTEGER ISEED( 4 ), IWORK( * )
+* REAL D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATM3 returns the (ISUB,JSUB) entry of a random matrix of
+*> dimension (M, N) described by the other paramters. (ISUB,JSUB)
+*> is the final position of the (I,J) entry after pivoting
+*> according to IPVTNG and IWORK. SLATM3 is called by the
+*> SLATMR routine in order to build random test matrices. No error
+*> checking on parameters is done, because this routine is called in
+*> a tight loop by SLATMR which has already checked the parameters.
+*>
+*> Use of SLATM3 differs from SLATM2 in the order in which the random
+*> number generator is called to fill in random matrix entries.
+*> With SLATM2, the generator is called to fill in the pivoted matrix
+*> columnwise. With SLATM3, the generator is called to fill in the
+*> matrix columnwise, after which it is pivoted. Thus, SLATM3 can
+*> be used to construct random matrices which differ only in their
+*> order of rows and/or columns. SLATM2 is used to construct band
+*> matrices while avoiding calling the random number generator for
+*> entries outside the band (and therefore generating random numbers
+*> in different orders for different pivot orders).
+*>
+*> The matrix whose (ISUB,JSUB) entry is returned is constructed as
+*> follows (this routine only computes one entry):
+*>
+*> If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
+*> (this is convenient for generating matrices in band format).
+*>
+*> Generate a matrix A with random entries of distribution IDIST.
+*>
+*> Set the diagonal to D.
+*>
+*> Grade the matrix, if desired, from the left (by DL) and/or
+*> from the right (by DR or DL) as specified by IGRADE.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> IPVTNG and IWORK.
+*>
+*> Band the matrix to have lower bandwidth KL and upper
+*> bandwidth KU.
+*>
+*> Set random entries to zero as specified by SPARSE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> Row of unpivoted entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Column of unpivoted entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISUB
+*> \verbatim
+*> ISUB is INTEGER
+*> Row of pivoted entry to be returned. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] JSUB
+*> \verbatim
+*> JSUB is INTEGER
+*> Column of pivoted entry to be returned. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Lower bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Upper bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => UNIFORM( 0, 1 )
+*> 2 => UNIFORM( -1, 1 )
+*> 3 => NORMAL( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array of dimension ( 4 )
+*> Seed for random number generator.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array of dimension ( MIN( I , J ) )
+*> Diagonal entries of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IGRADE
+*> \verbatim
+*> IGRADE is INTEGER
+*> Specifies grading of matrix as follows:
+*> 0 => no grading
+*> 1 => matrix premultiplied by diag( DL )
+*> 2 => matrix postmultiplied by diag( DR )
+*> 3 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> 4 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> 5 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is REAL array ( I or J, as appropriate )
+*> Left scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DR
+*> \verbatim
+*> DR is REAL array ( I or J, as appropriate )
+*> Right scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IPVTNG
+*> \verbatim
+*> IPVTNG is INTEGER
+*> On entry specifies pivoting permutations as follows:
+*> 0 => none.
+*> 1 => row pivoting.
+*> 2 => column pivoting.
+*> 3 => full pivoting, i.e., on both sides.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array ( I or J, as appropriate )
+*> This array specifies the permutation used. The
+*> row (or column) originally in position K is in
+*> position IWORK( K ) after pivoting.
+*> This differs from IWORK for SLATM2. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is REAL between 0. and 1.
+*> On entry specifies the sparsity of the matrix
+*> if sparse matix is to be generated.
+*> SPARSE should lie between 0 and 1.
+*> A uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
REAL FUNCTION SLATM3( M, N, I, J, ISUB, JSUB, KL, KU,
$ IDIST, ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK,
$ SPARSE )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
*
@@ -19,135 +246,6 @@
REAL D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATM3 returns the (ISUB,JSUB) entry of a random matrix of
-* dimension (M, N) described by the other paramters. (ISUB,JSUB)
-* is the final position of the (I,J) entry after pivoting
-* according to IPVTNG and IWORK. SLATM3 is called by the
-* SLATMR routine in order to build random test matrices. No error
-* checking on parameters is done, because this routine is called in
-* a tight loop by SLATMR which has already checked the parameters.
-*
-* Use of SLATM3 differs from SLATM2 in the order in which the random
-* number generator is called to fill in random matrix entries.
-* With SLATM2, the generator is called to fill in the pivoted matrix
-* columnwise. With SLATM3, the generator is called to fill in the
-* matrix columnwise, after which it is pivoted. Thus, SLATM3 can
-* be used to construct random matrices which differ only in their
-* order of rows and/or columns. SLATM2 is used to construct band
-* matrices while avoiding calling the random number generator for
-* entries outside the band (and therefore generating random numbers
-* in different orders for different pivot orders).
-*
-* The matrix whose (ISUB,JSUB) entry is returned is constructed as
-* follows (this routine only computes one entry):
-*
-* If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
-* (this is convenient for generating matrices in band format).
-*
-* Generate a matrix A with random entries of distribution IDIST.
-*
-* Set the diagonal to D.
-*
-* Grade the matrix, if desired, from the left (by DL) and/or
-* from the right (by DR or DL) as specified by IGRADE.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* IPVTNG and IWORK.
-*
-* Band the matrix to have lower bandwidth KL and upper
-* bandwidth KU.
-*
-* Set random entries to zero as specified by SPARSE.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of matrix. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of matrix. Not modified.
-*
-* I (input) INTEGER
-* Row of unpivoted entry to be returned. Not modified.
-*
-* J (input) INTEGER
-* Column of unpivoted entry to be returned. Not modified.
-*
-* ISUB (input/output) INTEGER
-* Row of pivoted entry to be returned. Changed on exit.
-*
-* JSUB (input/output) INTEGER
-* Column of pivoted entry to be returned. Changed on exit.
-*
-* KL (input) INTEGER
-* Lower bandwidth. Not modified.
-*
-* KU (input) INTEGER
-* Upper bandwidth. Not modified.
-*
-* IDIST (input) INTEGER
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => UNIFORM( 0, 1 )
-* 2 => UNIFORM( -1, 1 )
-* 3 => NORMAL( 0, 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array of dimension ( 4 )
-* Seed for random number generator.
-* Changed on exit.
-*
-* D (input) REAL array of dimension ( MIN( I , J ) )
-* Diagonal entries of matrix. Not modified.
-*
-* IGRADE (input) INTEGER
-* Specifies grading of matrix as follows:
-* 0 => no grading
-* 1 => matrix premultiplied by diag( DL )
-* 2 => matrix postmultiplied by diag( DR )
-* 3 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* 4 => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* 5 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* Not modified.
-*
-* DL (input) REAL array ( I or J, as appropriate )
-* Left scale factors for grading matrix. Not modified.
-*
-* DR (input) REAL array ( I or J, as appropriate )
-* Right scale factors for grading matrix. Not modified.
-*
-* IPVTNG (input) INTEGER
-* On entry specifies pivoting permutations as follows:
-* 0 => none.
-* 1 => row pivoting.
-* 2 => column pivoting.
-* 3 => full pivoting, i.e., on both sides.
-* Not modified.
-*
-* IWORK (input) INTEGER array ( I or J, as appropriate )
-* This array specifies the permutation used. The
-* row (or column) originally in position K is in
-* position IWORK( K ) after pivoting.
-* This differs from IWORK for SLATM2. Not modified.
-*
-* SPARSE (input) REAL between 0. and 1.
-* On entry specifies the sparsity of the matrix
-* if sparse matix is to be generated.
-* SPARSE should lie between 0 and 1.
-* A uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slatm5.f b/TESTING/MATGEN/slatm5.f
index 1239ec64..ef49ad8e 100644
--- a/TESTING/MATGEN/slatm5.f
+++ b/TESTING/MATGEN/slatm5.f
@@ -1,177 +1,292 @@
- SUBROUTINE SLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
- $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
- $ QBLCKB )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
- $ PRTYPE, QBLCKA, QBLCKB
- REAL ALPHA
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
- $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
- $ L( LDL, * ), R( LDR, * )
-* ..
-*
+*> \brief \b SLATM5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
+* E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
+* QBLCKB )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
+* $ PRTYPE, QBLCKA, QBLCKB
+* REAL ALPHA
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+* $ L( LDL, * ), R( LDR, * )
+* ..
+*
* Purpose
* =======
*
-* SLATM5 generates matrices involved in the Generalized Sylvester
-* equation:
-*
-* A * R - L * B = C
-* D * R - L * E = F
-*
-* They also satisfy (the diagonalization condition)
-*
-* [ I -L ] ( [ A -C ], [ D -F ] ) [ I R ] = ( [ A ], [ D ] )
-* [ I ] ( [ B ] [ E ] ) [ I ] ( [ B ] [ E ] )
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATM5 generates matrices involved in the Generalized Sylvester
+*> equation:
+*>
+*> A * R - L * B = C
+*> D * R - L * E = F
+*>
+*> They also satisfy (the diagonalization condition)
+*>
+*> [ I -L ] ( [ A -C ], [ D -F ] ) [ I R ] = ( [ A ], [ D ] )
+*> [ I ] ( [ B ] [ E ] ) [ I ] ( [ B ] [ E ] )
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PRTYPE (input) INTEGER
-* "Points" to a certian type of the matrices to generate
-* (see futher details).
-*
-* M (input) INTEGER
-* Specifies the order of A and D and the number of rows in
-* C, F, R and L.
-*
-* N (input) INTEGER
-* Specifies the order of B and E and the number of columns in
-* C, F, R and L.
-*
-* A (output) REAL array, dimension (LDA, M).
-* On exit A M-by-M is initialized according to PRTYPE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A.
-*
-* B (output) REAL array, dimension (LDB, N).
-* On exit B N-by-N is initialized according to PRTYPE.
-*
-* LDB (input) INTEGER
-* The leading dimension of B.
-*
-* C (output) REAL array, dimension (LDC, N).
-* On exit C M-by-N is initialized according to PRTYPE.
-*
-* LDC (input) INTEGER
-* The leading dimension of C.
-*
-* D (output) REAL array, dimension (LDD, M).
-* On exit D M-by-M is initialized according to PRTYPE.
-*
-* LDD (input) INTEGER
-* The leading dimension of D.
-*
-* E (output) REAL array, dimension (LDE, N).
-* On exit E N-by-N is initialized according to PRTYPE.
-*
-* LDE (input) INTEGER
-* The leading dimension of E.
-*
-* F (output) REAL array, dimension (LDF, N).
-* On exit F M-by-N is initialized according to PRTYPE.
-*
-* LDF (input) INTEGER
-* The leading dimension of F.
-*
-* R (output) REAL array, dimension (LDR, N).
-* On exit R M-by-N is initialized according to PRTYPE.
-*
-* LDR (input) INTEGER
-* The leading dimension of R.
-*
-* L (output) REAL array, dimension (LDL, N).
-* On exit L M-by-N is initialized according to PRTYPE.
-*
-* LDL (input) INTEGER
-* The leading dimension of L.
+*> \param[in] PRTYPE
+*> \verbatim
+*> PRTYPE is INTEGER
+*> "Points" to a certian type of the matrices to generate
+*> (see futher details).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Specifies the order of A and D and the number of rows in
+*> C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Specifies the order of B and E and the number of columns in
+*> C, F, R and L.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, M).
+*> On exit A M-by-M is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, N).
+*> On exit B N-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is REAL array, dimension (LDC, N).
+*> On exit C M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of C.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is REAL array, dimension (LDD, M).
+*> On exit D M-by-M is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of D.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is REAL array, dimension (LDE, N).
+*> On exit E N-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of E.
+*> \endverbatim
+*>
+*> \param[out] F
+*> \verbatim
+*> F is REAL array, dimension (LDF, N).
+*> On exit F M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of F.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is REAL array, dimension (LDR, N).
+*> On exit R M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDR
+*> \verbatim
+*> LDR is INTEGER
+*> The leading dimension of R.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is REAL array, dimension (LDL, N).
+*> On exit L M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDL
+*> \verbatim
+*> LDL is INTEGER
+*> The leading dimension of L.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> Parameter used in generating PRTYPE = 1 and 5 matrices.
+*> \endverbatim
+*>
+*> \param[in] QBLCKA
+*> \verbatim
+*> QBLCKA is INTEGER
+*> When PRTYPE = 3, specifies the distance between 2-by-2
+*> blocks on the diagonal in A. Otherwise, QBLCKA is not
+*> referenced. QBLCKA > 1.
+*> \endverbatim
+*>
+*> \param[in] QBLCKB
+*> \verbatim
+*> QBLCKB is INTEGER
+*> When PRTYPE = 3, specifies the distance between 2-by-2
+*> blocks on the diagonal in B. Otherwise, QBLCKB is not
+*> referenced. QBLCKB > 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) REAL
-* Parameter used in generating PRTYPE = 1 and 5 matrices.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* QBLCKA (input) INTEGER
-* When PRTYPE = 3, specifies the distance between 2-by-2
-* blocks on the diagonal in A. Otherwise, QBLCKA is not
-* referenced. QBLCKA > 1.
+*> \date November 2011
*
-* QBLCKB (input) INTEGER
-* When PRTYPE = 3, specifies the distance between 2-by-2
-* blocks on the diagonal in B. Otherwise, QBLCKB is not
-* referenced. QBLCKB > 1.
+*> \ingroup real_matgen
*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> PRTYPE = 1: A and B are Jordan blocks, D and E are identity matrices
+*>
+*> A : if (i == j) then A(i, j) = 1.0
+*> if (j == i + 1) then A(i, j) = -1.0
+*> else A(i, j) = 0.0, i, j = 1...M
+*>
+*> B : if (i == j) then B(i, j) = 1.0 - ALPHA
+*> if (j == i + 1) then B(i, j) = 1.0
+*> else B(i, j) = 0.0, i, j = 1...N
+*>
+*> D : if (i == j) then D(i, j) = 1.0
+*> else D(i, j) = 0.0, i, j = 1...M
+*>
+*> E : if (i == j) then E(i, j) = 1.0
+*> else E(i, j) = 0.0, i, j = 1...N
+*>
+*> L = R are chosen from [-10...10],
+*> which specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 2 or 3: Triangular and/or quasi- triangular.
+*>
+*> A : if (i <= j) then A(i, j) = [-1...1]
+*> else A(i, j) = 0.0, i, j = 1...M
+*>
+*> if (PRTYPE = 3) then
+*> A(k + 1, k + 1) = A(k, k)
+*> A(k + 1, k) = [-1...1]
+*> sign(A(k, k + 1) = -(sin(A(k + 1, k))
+*> k = 1, M - 1, QBLCKA
+*>
+*> B : if (i <= j) then B(i, j) = [-1...1]
+*> else B(i, j) = 0.0, i, j = 1...N
+*>
+*> if (PRTYPE = 3) then
+*> B(k + 1, k + 1) = B(k, k)
+*> B(k + 1, k) = [-1...1]
+*> sign(B(k, k + 1) = -(sign(B(k + 1, k))
+*> k = 1, N - 1, QBLCKB
+*>
+*> D : if (i <= j) then D(i, j) = [-1...1].
+*> else D(i, j) = 0.0, i, j = 1...M
+*>
+*>
+*> E : if (i <= j) then D(i, j) = [-1...1]
+*> else E(i, j) = 0.0, i, j = 1...N
+*>
+*> L, R are chosen from [-10...10],
+*> which specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 4 Full
+*> A(i, j) = [-10...10]
+*> D(i, j) = [-1...1] i,j = 1...M
+*> B(i, j) = [-10...10]
+*> E(i, j) = [-1...1] i,j = 1...N
+*> R(i, j) = [-10...10]
+*> L(i, j) = [-1...1] i = 1..M ,j = 1...N
+*>
+*> L, R specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 5 special case common and/or close eigs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE SLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
+ $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
+ $ QBLCKB )
*
-* PRTYPE = 1: A and B are Jordan blocks, D and E are identity matrices
-*
-* A : if (i == j) then A(i, j) = 1.0
-* if (j == i + 1) then A(i, j) = -1.0
-* else A(i, j) = 0.0, i, j = 1...M
-*
-* B : if (i == j) then B(i, j) = 1.0 - ALPHA
-* if (j == i + 1) then B(i, j) = 1.0
-* else B(i, j) = 0.0, i, j = 1...N
-*
-* D : if (i == j) then D(i, j) = 1.0
-* else D(i, j) = 0.0, i, j = 1...M
-*
-* E : if (i == j) then E(i, j) = 1.0
-* else E(i, j) = 0.0, i, j = 1...N
-*
-* L = R are chosen from [-10...10],
-* which specifies the right hand sides (C, F).
-*
-* PRTYPE = 2 or 3: Triangular and/or quasi- triangular.
-*
-* A : if (i <= j) then A(i, j) = [-1...1]
-* else A(i, j) = 0.0, i, j = 1...M
-*
-* if (PRTYPE = 3) then
-* A(k + 1, k + 1) = A(k, k)
-* A(k + 1, k) = [-1...1]
-* sign(A(k, k + 1) = -(sin(A(k + 1, k))
-* k = 1, M - 1, QBLCKA
-*
-* B : if (i <= j) then B(i, j) = [-1...1]
-* else B(i, j) = 0.0, i, j = 1...N
-*
-* if (PRTYPE = 3) then
-* B(k + 1, k + 1) = B(k, k)
-* B(k + 1, k) = [-1...1]
-* sign(B(k, k + 1) = -(sign(B(k + 1, k))
-* k = 1, N - 1, QBLCKB
-*
-* D : if (i <= j) then D(i, j) = [-1...1].
-* else D(i, j) = 0.0, i, j = 1...M
-*
-*
-* E : if (i <= j) then D(i, j) = [-1...1]
-* else E(i, j) = 0.0, i, j = 1...N
-*
-* L, R are chosen from [-10...10],
-* which specifies the right hand sides (C, F).
-*
-* PRTYPE = 4 Full
-* A(i, j) = [-10...10]
-* D(i, j) = [-1...1] i,j = 1...M
-* B(i, j) = [-10...10]
-* E(i, j) = [-1...1] i,j = 1...N
-* R(i, j) = [-10...10]
-* L(i, j) = [-1...1] i = 1..M ,j = 1...N
-*
-* L, R specifies the right hand sides (C, F).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* PRTYPE = 5 special case common and/or close eigs.
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
+ $ PRTYPE, QBLCKA, QBLCKB
+ REAL ALPHA
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDB, * ), C( LDC, * ),
+ $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+ $ L( LDL, * ), R( LDR, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/slatm6.f b/TESTING/MATGEN/slatm6.f
index 093c955b..f209b335 100644
--- a/TESTING/MATGEN/slatm6.f
+++ b/TESTING/MATGEN/slatm6.f
@@ -1,107 +1,197 @@
- SUBROUTINE SLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
- $ BETA, WX, WY, S, DIF )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDX, LDY, N, TYPE
- REAL ALPHA, BETA, WX, WY
-* ..
-* .. Array Arguments ..
- REAL A( LDA, * ), B( LDA, * ), DIF( * ), S( * ),
- $ X( LDX, * ), Y( LDY, * )
-* ..
-*
+*> \brief \b SLATM6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
+* BETA, WX, WY, S, DIF )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDX, LDY, N, TYPE
+* REAL ALPHA, BETA, WX, WY
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), B( LDA, * ), DIF( * ), S( * ),
+* $ X( LDX, * ), Y( LDY, * )
+* ..
+*
* Purpose
* =======
*
-* SLATM6 generates test matrices for the generalized eigenvalue
-* problem, their corresponding right and left eigenvector matrices,
-* and also reciprocal condition numbers for all eigenvalues and
-* the reciprocal condition numbers of eigenvectors corresponding to
-* the 1th and 5th eigenvalues.
-*
-* Test Matrices
-* =============
-*
-* Two kinds of test matrix pairs
-*
-* (A, B) = inverse(YH) * (Da, Db) * inverse(X)
-*
-* are used in the tests:
-*
-* Type 1:
-* Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
-* 0 2+a 0 0 0 0 1 0 0 0
-* 0 0 3+a 0 0 0 0 1 0 0
-* 0 0 0 4+a 0 0 0 0 1 0
-* 0 0 0 0 5+a , 0 0 0 0 1 , and
-*
-* Type 2:
-* Da = 1 -1 0 0 0 Db = 1 0 0 0 0
-* 1 1 0 0 0 0 1 0 0 0
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1+a 1+b 0 0 0 1 0
-* 0 0 0 -1-b 1+a , 0 0 0 0 1 .
-*
-* In both cases the same inverse(YH) and inverse(X) are used to compute
-* (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
-*
-* YH: = 1 0 -y y -y X = 1 0 -x -x x
-* 0 1 -y y -y 0 1 x -x -x
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1 0 0 0 0 1 0
-* 0 0 0 0 1, 0 0 0 0 1 ,
-*
-* where a, b, x and y will have all values independently of each other.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATM6 generates test matrices for the generalized eigenvalue
+*> problem, their corresponding right and left eigenvector matrices,
+*> and also reciprocal condition numbers for all eigenvalues and
+*> the reciprocal condition numbers of eigenvectors corresponding to
+*> the 1th and 5th eigenvalues.
+*>
+*> Test Matrices
+*> =============
+*>
+*> Two kinds of test matrix pairs
+*>
+*> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
+*>
+*> are used in the tests:
+*>
+*> Type 1:
+*> Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
+*> 0 2+a 0 0 0 0 1 0 0 0
+*> 0 0 3+a 0 0 0 0 1 0 0
+*> 0 0 0 4+a 0 0 0 0 1 0
+*> 0 0 0 0 5+a , 0 0 0 0 1 , and
+*>
+*> Type 2:
+*> Da = 1 -1 0 0 0 Db = 1 0 0 0 0
+*> 1 1 0 0 0 0 1 0 0 0
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1+a 1+b 0 0 0 1 0
+*> 0 0 0 -1-b 1+a , 0 0 0 0 1 .
+*>
+*> In both cases the same inverse(YH) and inverse(X) are used to compute
+*> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
+*>
+*> YH: = 1 0 -y y -y X = 1 0 -x -x x
+*> 0 1 -y y -y 0 1 x -x -x
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1 0 0 0 0 1 0
+*> 0 0 0 0 1, 0 0 0 0 1 ,
+*>
+*> where a, b, x and y will have all values independently of each other.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) INTEGER
-* Specifies the problem type (see futher details).
-*
-* N (input) INTEGER
-* Size of the matrices A and B.
-*
-* A (output) REAL array, dimension (LDA, N).
-* On exit A N-by-N is initialized according to TYPE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A and of B.
-*
-* B (output) REAL array, dimension (LDA, N).
-* On exit B N-by-N is initialized according to TYPE.
-*
-* X (output) REAL array, dimension (LDX, N).
-* On exit X is the N-by-N matrix of right eigenvectors.
-*
-* LDX (input) INTEGER
-* The leading dimension of X.
-*
-* Y (output) REAL array, dimension (LDY, N).
-* On exit Y is the N-by-N matrix of left eigenvectors.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is INTEGER
+*> Specifies the problem type (see futher details).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Size of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA, N).
+*> On exit A N-by-N is initialized according to TYPE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A and of B.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDA, N).
+*> On exit B N-by-N is initialized according to TYPE.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is REAL array, dimension (LDX, N).
+*> On exit X is the N-by-N matrix of right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X.
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*> Y is REAL array, dimension (LDY, N).
+*> On exit Y is the N-by-N matrix of left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of Y.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is REAL
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is REAL
+*> \endverbatim
+*> \verbatim
+*> Weighting constants for matrix A.
+*> \endverbatim
+*>
+*> \param[in] WX
+*> \verbatim
+*> WX is REAL
+*> Constant for right eigenvector matrix.
+*> \endverbatim
+*>
+*> \param[in] WY
+*> \verbatim
+*> WY is REAL
+*> Constant for left eigenvector matrix.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is REAL array, dimension (N)
+*> S(i) is the reciprocal condition number for eigenvalue i.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is REAL array, dimension (N)
+*> DIF(i) is the reciprocal condition number for eigenvector i.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDY (input) INTEGER
-* The leading dimension of Y.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ALPHA (input) REAL
-* BETA (input) REAL
-* Weighting constants for matrix A.
+*> \date November 2011
*
-* WX (input) REAL
-* Constant for right eigenvector matrix.
+*> \ingroup real_matgen
*
-* WY (input) REAL
-* Constant for left eigenvector matrix.
+* =====================================================================
+ SUBROUTINE SLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
+ $ BETA, WX, WY, S, DIF )
*
-* S (output) REAL array, dimension (N)
-* S(i) is the reciprocal condition number for eigenvalue i.
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIF (output) REAL array, dimension (N)
-* DIF(i) is the reciprocal condition number for eigenvector i.
+* .. Scalar Arguments ..
+ INTEGER LDA, LDX, LDY, N, TYPE
+ REAL ALPHA, BETA, WX, WY
+* ..
+* .. Array Arguments ..
+ REAL A( LDA, * ), B( LDA, * ), DIF( * ), S( * ),
+ $ X( LDX, * ), Y( LDY, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/slatm7.f b/TESTING/MATGEN/slatm7.f
index 8fa977f6..a45d1611 100644
--- a/TESTING/MATGEN/slatm7.f
+++ b/TESTING/MATGEN/slatm7.f
@@ -1,9 +1,143 @@
+*> \brief \b SLATM7
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATM7( MODE, COND, IRSIGN, IDIST, ISEED, D, N,
+* RANK, INFO )
+*
+* .. Scalar Arguments ..
+* REAL COND
+* INTEGER IDIST, INFO, IRSIGN, MODE, N, RANK
+* ..
+* .. Array Arguments ..
+* REAL D( * )
+* INTEGER ISEED( 4 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATM7 computes the entries of D as specified by MODE
+*> COND and IRSIGN. IDIST and ISEED determine the generation
+*> of random numbers. SLATM7 is called by SLATMT to generate
+*> random test matrices.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> MODE - INTEGER
+*> On entry describes how D is to be computed:
+*> MODE = 0 means do not change D.
+*> \endverbatim
+*> \verbatim
+*> MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
+*> MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1)) I=1:RANK
+*> \endverbatim
+*> \verbatim
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> COND - REAL
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*> \verbatim
+*> IRSIGN - INTEGER
+*> On entry, if MODE neither -6, 0 nor 6, determines sign of
+*> entries of D
+*> 0 => leave entries of D unchanged
+*> 1 => multiply each entry of D by 1 or -1 with probability .5
+*> \endverbatim
+*> \verbatim
+*> IDIST - CHARACTER*1
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => UNIFORM( 0, 1 )
+*> 2 => UNIFORM( -1, 1 )
+*> 3 => NORMAL( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> ISEED - INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. The random number generator uses a
+*> linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to SLATM7
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*> \verbatim
+*> D - REAL array, dimension ( MIN( M , N ) )
+*> Array to be computed according to MODE, COND and IRSIGN.
+*> May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*> \verbatim
+*> N - INTEGER
+*> Number of entries of D. Not modified.
+*> \endverbatim
+*> \verbatim
+*> RANK - INTEGER
+*> The rank of matrix to be generated for modes 1,2,3 only.
+*> D( RANK+1:N ) = 0.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> INFO - INTEGER
+*> 0 => normal termination
+*> -1 => if MODE not in range -6 to 6
+*> -2 => if MODE neither -6, 0 nor 6, and
+*> IRSIGN neither 0 nor 1
+*> -3 => if MODE neither -6, 0 nor 6 and COND less than 1
+*> -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
+*> -7 => if N negative
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
SUBROUTINE SLATM7( MODE, COND, IRSIGN, IDIST, ISEED, D, N,
$ RANK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL COND
@@ -14,86 +148,6 @@
INTEGER ISEED( 4 )
* ..
*
-* Purpose
-* =======
-*
-* SLATM7 computes the entries of D as specified by MODE
-* COND and IRSIGN. IDIST and ISEED determine the generation
-* of random numbers. SLATM7 is called by SLATMT to generate
-* random test matrices.
-*
-* Arguments
-* =========
-*
-* MODE - INTEGER
-* On entry describes how D is to be computed:
-* MODE = 0 means do not change D.
-*
-* MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
-* MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1)) I=1:RANK
-*
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND - REAL
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* IRSIGN - INTEGER
-* On entry, if MODE neither -6, 0 nor 6, determines sign of
-* entries of D
-* 0 => leave entries of D unchanged
-* 1 => multiply each entry of D by 1 or -1 with probability .5
-*
-* IDIST - CHARACTER*1
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => UNIFORM( 0, 1 )
-* 2 => UNIFORM( -1, 1 )
-* 3 => NORMAL( 0, 1 )
-* Not modified.
-*
-* ISEED - INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. The random number generator uses a
-* linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to SLATM7
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D - REAL array, dimension ( MIN( M , N ) )
-* Array to be computed according to MODE, COND and IRSIGN.
-* May be changed on exit if MODE is nonzero.
-*
-* N - INTEGER
-* Number of entries of D. Not modified.
-*
-* RANK - INTEGER
-* The rank of matrix to be generated for modes 1,2,3 only.
-* D( RANK+1:N ) = 0.
-* Not modified.
-*
-* INFO - INTEGER
-* 0 => normal termination
-* -1 => if MODE not in range -6 to 6
-* -2 => if MODE neither -6, 0 nor 6, and
-* IRSIGN neither 0 nor 1
-* -3 => if MODE neither -6, 0 nor 6 and COND less than 1
-* -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 3
-* -7 => if N negative
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slatme.f b/TESTING/MATGEN/slatme.f
index 60a32068..3deff329 100644
--- a/TESTING/MATGEN/slatme.f
+++ b/TESTING/MATGEN/slatme.f
@@ -1,12 +1,343 @@
+*> \brief \b SLATME
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATME( N, DIST, ISEED, D, MODE, COND, DMAX, EI,
+* RSIGN,
+* UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM,
+* A,
+* LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, RSIGN, SIM, UPPER
+* INTEGER INFO, KL, KU, LDA, MODE, MODES, N
+* REAL ANORM, COND, CONDS, DMAX
+* ..
+* .. Array Arguments ..
+* CHARACTER EI( * )
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), D( * ), DS( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATME generates random non-symmetric square matrices with
+*> specified eigenvalues for testing LAPACK programs.
+*>
+*> SLATME operates by applying the following sequence of
+*> operations:
+*>
+*> 1. Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and RSIGN
+*> as described below.
+*>
+*> 2. If complex conjugate pairs are desired (MODE=0 and EI(1)='R',
+*> or MODE=5), certain pairs of adjacent elements of D are
+*> interpreted as the real and complex parts of a complex
+*> conjugate pair; A thus becomes block diagonal, with 1x1
+*> and 2x2 blocks.
+*>
+*> 3. If UPPER='T', the upper triangle of A is set to random values
+*> out of distribution DIST.
+*>
+*> 4. If SIM='T', A is multiplied on the left by a random matrix
+*> X, whose singular values are specified by DS, MODES, and
+*> CONDS, and on the right by X inverse.
+*>
+*> 5. If KL < N-1, the lower bandwidth is reduced to KL using
+*> Householder transformations. If KU < N-1, the upper
+*> bandwidth is reduced to KU.
+*>
+*> 6. If ANORM is not negative, the matrix is scaled to have
+*> maximum-element-norm ANORM.
+*>
+*> (Note: since the matrix cannot be reduced beyond Hessenberg form,
+*> no packing options are available.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns (or rows) of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values, and for the
+*> upper triangle (see UPPER).
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to SLATME
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension ( N )
+*> This array is used to specify the eigenvalues of A. If
+*> MODE=0, then D is assumed to contain the eigenvalues (but
+*> see the description of EI), otherwise they will be
+*> computed according to MODE, COND, DMAX, and RSIGN and
+*> placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D (with EI) as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed. Each odd-even pair
+*> of elements will be either used as two real
+*> eigenvalues or as the real and imaginary part
+*> of a complex conjugate pair of eigenvalues;
+*> the choice of which is done is random, with
+*> 50-50 probability, for each pair.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is between 1 and 4, D has entries ranging
+*> from 1 to 1/COND, if between -1 and -4, D has entries
+*> ranging from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is REAL
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))). Note that DMAX need not be
+*> positive: if DMAX is negative (or zero), D will be
+*> scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] EI
+*> \verbatim
+*> EI is CHARACTER*1 array, dimension ( N )
+*> If MODE is 0, and EI(1) is not ' ' (space character),
+*> this array specifies which elements of D (on input) are
+*> real eigenvalues and which are the real and imaginary parts
+*> of a complex conjugate pair of eigenvalues. The elements
+*> of EI may then only have the values 'R' and 'I'. If
+*> EI(j)='R' and EI(j+1)='I', then the j-th eigenvalue is
+*> CMPLX( D(j) , D(j+1) ), and the (j+1)-th is the complex
+*> conjugate thereof. If EI(j)=EI(j+1)='R', then the j-th
+*> eigenvalue is D(j) (i.e., real). EI(1) may not be 'I',
+*> nor may two adjacent elements of EI both have the value 'I'.
+*> If MODE is not 0, then EI is ignored. If MODE is 0 and
+*> EI(1)=' ', then the eigenvalues will all be real.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is CHARACTER*1
+*> If MODE is not 0, 6, or -6, and RSIGN='T', then the
+*> elements of D, as computed according to MODE and COND, will
+*> be multiplied by a random sign (+1 or -1). If RSIGN='F',
+*> they will not be. RSIGN may only have the values 'T' or
+*> 'F'.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] UPPER
+*> \verbatim
+*> UPPER is CHARACTER*1
+*> If UPPER='T', then the elements of A above the diagonal
+*> (and above the 2x2 diagonal blocks, if A has complex
+*> eigenvalues) will be set to random numbers out of DIST.
+*> If UPPER='F', they will not. UPPER may only have the
+*> values 'T' or 'F'.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] SIM
+*> \verbatim
+*> SIM is CHARACTER*1
+*> If SIM='T', then A will be operated on by a "similarity
+*> transform", i.e., multiplied on the left by a matrix X and
+*> on the right by X inverse. X = U S V, where U and V are
+*> random unitary matrices and S is a (diagonal) matrix of
+*> singular values specified by DS, MODES, and CONDS. If
+*> SIM='F', then A will not be transformed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DS
+*> \verbatim
+*> DS is REAL array, dimension ( N )
+*> This array is used to specify the singular values of X,
+*> in the same way that D specifies the eigenvalues of A.
+*> If MODE=0, the DS contains the singular values, which
+*> may not be zero.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODES
+*> \verbatim
+*> MODES is INTEGER
+*> \endverbatim
+*>
+*> \param[in] CONDS
+*> \verbatim
+*> CONDS is REAL
+*> Same as MODE and COND, but for specifying the diagonal
+*> of S. MODES=-6 and +6 are not allowed (since they would
+*> result in randomly ill-conditioned eigenvalues.)
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. KL=1
+*> specifies upper Hessenberg form. If KL is at least N-1,
+*> then A will have full lower bandwidth. KL must be at
+*> least 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. KU=1
+*> specifies lower Hessenberg form. If KU is at least N-1,
+*> then A will have full upper bandwidth; if KU and KL
+*> are both at least N-1, then A will be dense. Only one of
+*> KU and KL may be less than N-1. KU must be at least 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> If ANORM is not negative, then A will be scaled by a non-
+*> negative real number to make the maximum-element-norm of A
+*> to be ANORM.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is REAL array, dimension ( LDA, N )
+*> On exit A is the desired test matrix.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. LDA must be at least N.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension ( 3*N )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => N negative
+*> -2 => DIST illegal string
+*> -5 => MODE not in range -6 to 6
+*> -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -8 => EI(1) is not ' ' or 'R', EI(j) is not 'R' or 'I', or
+*> two adjacent elements of EI are 'I'.
+*> -9 => RSIGN is not 'T' or 'F'
+*> -10 => UPPER is not 'T' or 'F'
+*> -11 => SIM is not 'T' or 'F'
+*> -12 => MODES=0 and DS has a zero singular value.
+*> -13 => MODES is not in the range -5 to 5.
+*> -14 => MODES is nonzero and CONDS is less than 1.
+*> -15 => KL is less than 1.
+*> -16 => KU is less than 1, or KL and KU are both less than
+*> N-1.
+*> -19 => LDA is less than N.
+*> 1 => Error return from SLATM1 (computing D)
+*> 2 => Cannot scale to DMAX (max. eigenvalue is 0)
+*> 3 => Error return from SLATM1 (computing DS)
+*> 4 => Error return from SLARGE
+*> 5 => Zero singular value from SLATM1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
SUBROUTINE SLATME( N, DIST, ISEED, D, MODE, COND, DMAX, EI,
$ RSIGN,
$ UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM,
$ A,
$ LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, RSIGN, SIM, UPPER
@@ -19,227 +350,6 @@
REAL A( LDA, * ), D( * ), DS( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATME generates random non-symmetric square matrices with
-* specified eigenvalues for testing LAPACK programs.
-*
-* SLATME operates by applying the following sequence of
-* operations:
-*
-* 1. Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and RSIGN
-* as described below.
-*
-* 2. If complex conjugate pairs are desired (MODE=0 and EI(1)='R',
-* or MODE=5), certain pairs of adjacent elements of D are
-* interpreted as the real and complex parts of a complex
-* conjugate pair; A thus becomes block diagonal, with 1x1
-* and 2x2 blocks.
-*
-* 3. If UPPER='T', the upper triangle of A is set to random values
-* out of distribution DIST.
-*
-* 4. If SIM='T', A is multiplied on the left by a random matrix
-* X, whose singular values are specified by DS, MODES, and
-* CONDS, and on the right by X inverse.
-*
-* 5. If KL < N-1, the lower bandwidth is reduced to KL using
-* Householder transformations. If KU < N-1, the upper
-* bandwidth is reduced to KU.
-*
-* 6. If ANORM is not negative, the matrix is scaled to have
-* maximum-element-norm ANORM.
-*
-* (Note: since the matrix cannot be reduced beyond Hessenberg form,
-* no packing options are available.)
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of columns (or rows) of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values, and for the
-* upper triangle (see UPPER).
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to SLATME
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D (input/output) REAL array, dimension ( N )
-* This array is used to specify the eigenvalues of A. If
-* MODE=0, then D is assumed to contain the eigenvalues (but
-* see the description of EI), otherwise they will be
-* computed according to MODE, COND, DMAX, and RSIGN and
-* placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the eigenvalues are to
-* be specified:
-* MODE = 0 means use D (with EI) as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed. Each odd-even pair
-* of elements will be either used as two real
-* eigenvalues or as the real and imaginary part
-* of a complex conjugate pair of eigenvalues;
-* the choice of which is done is random, with
-* 50-50 probability, for each pair.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is between 1 and 4, D has entries ranging
-* from 1 to 1/COND, if between -1 and -4, D has entries
-* ranging from 1/COND to 1,
-* Not modified.
-*
-* COND (input) REAL
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) REAL
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))). Note that DMAX need not be
-* positive: if DMAX is negative (or zero), D will be
-* scaled by a negative number (or zero).
-* Not modified.
-*
-* EI (input) CHARACTER*1 array, dimension ( N )
-* If MODE is 0, and EI(1) is not ' ' (space character),
-* this array specifies which elements of D (on input) are
-* real eigenvalues and which are the real and imaginary parts
-* of a complex conjugate pair of eigenvalues. The elements
-* of EI may then only have the values 'R' and 'I'. If
-* EI(j)='R' and EI(j+1)='I', then the j-th eigenvalue is
-* CMPLX( D(j) , D(j+1) ), and the (j+1)-th is the complex
-* conjugate thereof. If EI(j)=EI(j+1)='R', then the j-th
-* eigenvalue is D(j) (i.e., real). EI(1) may not be 'I',
-* nor may two adjacent elements of EI both have the value 'I'.
-* If MODE is not 0, then EI is ignored. If MODE is 0 and
-* EI(1)=' ', then the eigenvalues will all be real.
-* Not modified.
-*
-* RSIGN (input) CHARACTER*1
-* If MODE is not 0, 6, or -6, and RSIGN='T', then the
-* elements of D, as computed according to MODE and COND, will
-* be multiplied by a random sign (+1 or -1). If RSIGN='F',
-* they will not be. RSIGN may only have the values 'T' or
-* 'F'.
-* Not modified.
-*
-* UPPER (input) CHARACTER*1
-* If UPPER='T', then the elements of A above the diagonal
-* (and above the 2x2 diagonal blocks, if A has complex
-* eigenvalues) will be set to random numbers out of DIST.
-* If UPPER='F', they will not. UPPER may only have the
-* values 'T' or 'F'.
-* Not modified.
-*
-* SIM (input) CHARACTER*1
-* If SIM='T', then A will be operated on by a "similarity
-* transform", i.e., multiplied on the left by a matrix X and
-* on the right by X inverse. X = U S V, where U and V are
-* random unitary matrices and S is a (diagonal) matrix of
-* singular values specified by DS, MODES, and CONDS. If
-* SIM='F', then A will not be transformed.
-* Not modified.
-*
-* DS (input/output) REAL array, dimension ( N )
-* This array is used to specify the singular values of X,
-* in the same way that D specifies the eigenvalues of A.
-* If MODE=0, the DS contains the singular values, which
-* may not be zero.
-* Modified if MODE is nonzero.
-*
-* MODES (input) INTEGER
-*
-* CONDS (input) REAL
-* Same as MODE and COND, but for specifying the diagonal
-* of S. MODES=-6 and +6 are not allowed (since they would
-* result in randomly ill-conditioned eigenvalues.)
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. KL=1
-* specifies upper Hessenberg form. If KL is at least N-1,
-* then A will have full lower bandwidth. KL must be at
-* least 1.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. KU=1
-* specifies lower Hessenberg form. If KU is at least N-1,
-* then A will have full upper bandwidth; if KU and KL
-* are both at least N-1, then A will be dense. Only one of
-* KU and KL may be less than N-1. KU must be at least 1.
-* Not modified.
-*
-* ANORM (input) REAL
-* If ANORM is not negative, then A will be scaled by a non-
-* negative real number to make the maximum-element-norm of A
-* to be ANORM.
-* Not modified.
-*
-* A (output) REAL array, dimension ( LDA, N )
-* On exit A is the desired test matrix.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. LDA must be at least N.
-* Not modified.
-*
-* WORK (workspace) REAL array, dimension ( 3*N )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => N negative
-* -2 => DIST illegal string
-* -5 => MODE not in range -6 to 6
-* -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -8 => EI(1) is not ' ' or 'R', EI(j) is not 'R' or 'I', or
-* two adjacent elements of EI are 'I'.
-* -9 => RSIGN is not 'T' or 'F'
-* -10 => UPPER is not 'T' or 'F'
-* -11 => SIM is not 'T' or 'F'
-* -12 => MODES=0 and DS has a zero singular value.
-* -13 => MODES is not in the range -5 to 5.
-* -14 => MODES is nonzero and CONDS is less than 1.
-* -15 => KL is less than 1.
-* -16 => KU is less than 1, or KL and KU are both less than
-* N-1.
-* -19 => LDA is less than N.
-* 1 => Error return from SLATM1 (computing D)
-* 2 => Cannot scale to DMAX (max. eigenvalue is 0)
-* 3 => Error return from SLATM1 (computing DS)
-* 4 => Error return from SLARGE
-* 5 => Zero singular value from SLATM1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slatmr.f b/TESTING/MATGEN/slatmr.f
index 0506ca9f..bf9adcc5 100644
--- a/TESTING/MATGEN/slatmr.f
+++ b/TESTING/MATGEN/slatmr.f
@@ -1,11 +1,485 @@
+*> \brief \b SLATMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATMR( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER,
+* CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM,
+* PACK, A, LDA, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, GRADE, PACK, PIVTNG, RSIGN, SYM
+* INTEGER INFO, KL, KU, LDA, M, MODE, MODEL, MODER, N
+* REAL ANORM, COND, CONDL, CONDR, DMAX, SPARSE
+* ..
+* .. Array Arguments ..
+* INTEGER IPIVOT( * ), ISEED( 4 ), IWORK( * )
+* REAL A( LDA, * ), D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATMR generates random matrices of various types for testing
+*> LAPACK programs.
+*>
+*> SLATMR operates by applying the following sequence of
+*> operations:
+*>
+*> Generate a matrix A with random entries of distribution DIST
+*> which is symmetric if SYM='S', and nonsymmetric
+*> if SYM='N'.
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX and RSIGN
+*> as described below.
+*>
+*> Grade the matrix, if desired, from the left and/or right
+*> as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
+*> MODER and CONDR also determine the grading as described
+*> below.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> PIVTNG and IPIVOT.
+*>
+*> Set random entries to zero, if desired, to get a random sparse
+*> matrix as specified by SPARSE.
+*>
+*> Make A a band matrix, if desired, by zeroing out the matrix
+*> outside a band of lower bandwidth KL and upper bandwidth KU.
+*>
+*> Scale A, if desired, to have maximum entry ANORM.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if symmetric)
+*> zero out lower half (if symmetric)
+*> store the upper half columnwise (if symmetric or
+*> square upper triangular)
+*> store the lower half columnwise (if symmetric or
+*> square lower triangular)
+*> same as upper half rowwise if symmetric
+*> store the lower triangle in banded format (if symmetric)
+*> store the upper triangle in banded format (if symmetric)
+*> store the entire matrix in banded format
+*>
+*> Note: If two calls to SLATMR differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*>
+*> If two calls to SLATMR both have full bandwidth (KL = M-1
+*> and KU = N-1), and differ only in the PIVTNG and PACK
+*> parameters, then the matrices generated will differ only
+*> in the order of the rows and/or columns, and otherwise
+*> contain the same data. This consistency cannot be and
+*> is not maintained with less than full bandwidth.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate a random matrix .
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to SLATMR
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='S' or 'H', generated matrix is symmetric.
+*> If SYM='N', generated matrix is nonsymmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is REAL array, dimension (min(M,N))
+*> On entry this array specifies the diagonal entries
+*> of the diagonal of A. D may either be specified
+*> on entry, or set according to MODE and COND as described
+*> below. May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry describes how D is to be used:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is REAL
+*> If MODE neither -6, 0 nor 6, the diagonal is scaled by
+*> DMAX / max(abs(D(i))), so that maximum absolute entry
+*> of diagonal is abs(DMAX). If DMAX is negative (or zero),
+*> diagonal will be scaled by a negative number (or zero).
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is CHARACTER*1
+*> If MODE neither -6, 0 nor 6, specifies sign of diagonal
+*> as follows:
+*> 'T' => diagonal entries are multiplied by 1 or -1
+*> with probability .5
+*> 'F' => diagonal unchanged
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] GRADE
+*> \verbatim
+*> GRADE is CHARACTER*1
+*> Specifies grading of matrix as follows:
+*> 'N' => no grading
+*> 'L' => matrix premultiplied by diag( DL )
+*> (only if matrix nonsymmetric)
+*> 'R' => matrix postmultiplied by diag( DR )
+*> (only if matrix nonsymmetric)
+*> 'B' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> (only if matrix nonsymmetric)
+*> 'S' or 'H' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> ('S' for symmetric, or 'H' for Hermitian)
+*> 'E' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> ( 'E' for eigenvalue invariance)
+*> (only if matrix nonsymmetric)
+*> Note: if GRADE='E', then M must equal N.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is REAL array, dimension (M)
+*> If MODEL=0, then on entry this array specifies the diagonal
+*> entries of a diagonal matrix used as described under GRADE
+*> above. If MODEL is not zero, then DL will be set according
+*> to MODEL and CONDL, analogous to the way D is set according
+*> to MODE and COND (except there is no DMAX parameter for DL).
+*> If GRADE='E', then DL cannot have zero entries.
+*> Not referenced if GRADE = 'N' or 'R'. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] MODEL
+*> \verbatim
+*> MODEL is INTEGER
+*> This specifies how the diagonal array DL is to be computed,
+*> just as MODE specifies how D is to be computed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] CONDL
+*> \verbatim
+*> CONDL is REAL
+*> When MODEL is not zero, this specifies the condition number
+*> of the computed DL. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DR
+*> \verbatim
+*> DR is REAL array, dimension (N)
+*> If MODER=0, then on entry this array specifies the diagonal
+*> entries of a diagonal matrix used as described under GRADE
+*> above. If MODER is not zero, then DR will be set according
+*> to MODER and CONDR, analogous to the way D is set according
+*> to MODE and COND (except there is no DMAX parameter for DR).
+*> Not referenced if GRADE = 'N', 'L', 'H', 'S' or 'E'.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] MODER
+*> \verbatim
+*> MODER is INTEGER
+*> This specifies how the diagonal array DR is to be computed,
+*> just as MODE specifies how D is to be computed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] CONDR
+*> \verbatim
+*> CONDR is REAL
+*> When MODER is not zero, this specifies the condition number
+*> of the computed DR. Not modified.
+*> \endverbatim
+*>
+*> \param[in] PIVTNG
+*> \verbatim
+*> PIVTNG is CHARACTER*1
+*> On entry specifies pivoting permutations as follows:
+*> 'N' or ' ' => none.
+*> 'L' => left or row pivoting (matrix must be nonsymmetric).
+*> 'R' => right or column pivoting (matrix must be
+*> nonsymmetric).
+*> 'B' or 'F' => both or full pivoting, i.e., on both sides.
+*> In this case, M must equal N
+*> \endverbatim
+*> \verbatim
+*> If two calls to SLATMR both have full bandwidth (KL = M-1
+*> and KU = N-1), and differ only in the PIVTNG and PACK
+*> parameters, then the matrices generated will differ only
+*> in the order of the rows and/or columns, and otherwise
+*> contain the same data. This consistency cannot be
+*> maintained with less than full bandwidth.
+*> \endverbatim
+*>
+*> \param[in] IPIVOT
+*> \verbatim
+*> IPIVOT is INTEGER array, dimension (N or M)
+*> This array specifies the permutation used. After the
+*> basic matrix is generated, the rows, columns, or both
+*> are permuted. If, say, row pivoting is selected, SLATMR
+*> starts with the *last* row and interchanges the M-th and
+*> IPIVOT(M)-th rows, then moves to the next-to-last row,
+*> interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
+*> and so on. In terms of "2-cycles", the permutation is
+*> (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
+*> where the rightmost cycle is applied first. This is the
+*> *inverse* of the effect of pivoting in LINPACK. The idea
+*> is that factoring (with pivoting) an identity matrix
+*> which has been inverse-pivoted in this way should
+*> result in a pivot vector identical to IPIVOT.
+*> Not referenced if PIVTNG = 'N'. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is REAL
+*> On entry specifies the sparsity of the matrix if a sparse
+*> matrix is to be generated. SPARSE should lie between
+*> 0 and 1. To generate a sparse matrix, for each matrix entry
+*> a uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> On entry specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL at least M-1 implies the matrix is not
+*> banded. Must equal KU if matrix is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> On entry specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU at least N-1 implies the matrix is not
+*> banded. Must equal KL if matrix is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is REAL
+*> On entry specifies maximum entry of output matrix
+*> (output matrix will by multiplied by a constant so that
+*> its largest absolute entry equal ANORM)
+*> if ANORM is nonnegative. If ANORM is negative no scaling
+*> is done. Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> On entry specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric)
+*> 'L' => zero out all superdiagonal entries (if symmetric)
+*> 'C' => store the upper triangle columnwise
+*> (only if matrix symmetric or square upper triangular)
+*> 'R' => store the lower triangle columnwise
+*> (only if matrix symmetric or square lower triangular)
+*> (same as upper half rowwise if symmetric)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if matrix symmetric)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if matrix symmetric)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB or TB - use 'B' or 'Q'
+*> PP, SP or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to SLATMR differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension (LDA,N)
+*> On exit A is the desired test matrix. Only those
+*> entries of A which are significant on output
+*> will be referenced (even if A is in packed or band
+*> storage format). The 'unoccupied corners' of A in
+*> band format will be zeroed out.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> on entry LDA specifies the first dimension of A as
+*> declared in the calling program.
+*> If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
+*> If PACK='C' or 'R', LDA must be at least 1.
+*> If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
+*> If PACK='Z', LDA must be at least KUU+KLL+1, where
+*> KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension ( N or M)
+*> Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error parameter on exit:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S' or 'H'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
+*> -11 => GRADE illegal string, or GRADE='E' and
+*> M not equal to N, or GRADE='L', 'R', 'B' or 'E' and
+*> SYM = 'S' or 'H'
+*> -12 => GRADE = 'E' and DL contains zero
+*> -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
+*> 'S' or 'E'
+*> -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
+*> and MODEL neither -6, 0 nor 6
+*> -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
+*> -17 => CONDR less than 1.0, GRADE='R' or 'B', and
+*> MODER neither -6, 0 nor 6
+*> -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
+*> M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
+*> or 'H'
+*> -19 => IPIVOT contains out of range number and
+*> PIVTNG not equal to 'N'
+*> -20 => KL negative
+*> -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+*> -22 => SPARSE not in range 0. to 1.
+*> -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
+*> and SYM='N', or PACK='C' and SYM='N' and either KL
+*> not equal to 0 or N not equal to M, or PACK='R' and
+*> SYM='N', and either KU not equal to 0 or N not equal
+*> to M
+*> -26 => LDA too small
+*> 1 => Error return from SLATM1 (computing D)
+*> 2 => Cannot scale diagonal to DMAX (max. entry is 0)
+*> 3 => Error return from SLATM1 (computing DL)
+*> 4 => Error return from SLATM1 (computing DR)
+*> 5 => ANORM is positive, but matrix constructed prior to
+*> attempting to scale it to have norm ANORM, is zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
SUBROUTINE SLATMR( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER,
$ CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM,
$ PACK, A, LDA, IWORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, GRADE, PACK, PIVTNG, RSIGN, SYM
@@ -17,348 +491,6 @@
REAL A( LDA, * ), D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATMR generates random matrices of various types for testing
-* LAPACK programs.
-*
-* SLATMR operates by applying the following sequence of
-* operations:
-*
-* Generate a matrix A with random entries of distribution DIST
-* which is symmetric if SYM='S', and nonsymmetric
-* if SYM='N'.
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX and RSIGN
-* as described below.
-*
-* Grade the matrix, if desired, from the left and/or right
-* as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
-* MODER and CONDR also determine the grading as described
-* below.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* PIVTNG and IPIVOT.
-*
-* Set random entries to zero, if desired, to get a random sparse
-* matrix as specified by SPARSE.
-*
-* Make A a band matrix, if desired, by zeroing out the matrix
-* outside a band of lower bandwidth KL and upper bandwidth KU.
-*
-* Scale A, if desired, to have maximum entry ANORM.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if symmetric)
-* zero out lower half (if symmetric)
-* store the upper half columnwise (if symmetric or
-* square upper triangular)
-* store the lower half columnwise (if symmetric or
-* square lower triangular)
-* same as upper half rowwise if symmetric
-* store the lower triangle in banded format (if symmetric)
-* store the upper triangle in banded format (if symmetric)
-* store the entire matrix in banded format
-*
-* Note: If two calls to SLATMR differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-*
-* If two calls to SLATMR both have full bandwidth (KL = M-1
-* and KU = N-1), and differ only in the PIVTNG and PACK
-* parameters, then the matrices generated will differ only
-* in the order of the rows and/or columns, and otherwise
-* contain the same data. This consistency cannot be and
-* is not maintained with less than full bandwidth.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate a random matrix .
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to SLATMR
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='S' or 'H', generated matrix is symmetric.
-* If SYM='N', generated matrix is nonsymmetric.
-* Not modified.
-*
-* D (input) REAL array, dimension (min(M,N))
-* On entry this array specifies the diagonal entries
-* of the diagonal of A. D may either be specified
-* on entry, or set according to MODE and COND as described
-* below. May be changed on exit if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry describes how D is to be used:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND (input) REAL
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) REAL
-* If MODE neither -6, 0 nor 6, the diagonal is scaled by
-* DMAX / max(abs(D(i))), so that maximum absolute entry
-* of diagonal is abs(DMAX). If DMAX is negative (or zero),
-* diagonal will be scaled by a negative number (or zero).
-*
-* RSIGN (input) CHARACTER*1
-* If MODE neither -6, 0 nor 6, specifies sign of diagonal
-* as follows:
-* 'T' => diagonal entries are multiplied by 1 or -1
-* with probability .5
-* 'F' => diagonal unchanged
-* Not modified.
-*
-* GRADE (input) CHARACTER*1
-* Specifies grading of matrix as follows:
-* 'N' => no grading
-* 'L' => matrix premultiplied by diag( DL )
-* (only if matrix nonsymmetric)
-* 'R' => matrix postmultiplied by diag( DR )
-* (only if matrix nonsymmetric)
-* 'B' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* (only if matrix nonsymmetric)
-* 'S' or 'H' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* ('S' for symmetric, or 'H' for Hermitian)
-* 'E' => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* ( 'E' for eigenvalue invariance)
-* (only if matrix nonsymmetric)
-* Note: if GRADE='E', then M must equal N.
-* Not modified.
-*
-* DL (input/output) REAL array, dimension (M)
-* If MODEL=0, then on entry this array specifies the diagonal
-* entries of a diagonal matrix used as described under GRADE
-* above. If MODEL is not zero, then DL will be set according
-* to MODEL and CONDL, analogous to the way D is set according
-* to MODE and COND (except there is no DMAX parameter for DL).
-* If GRADE='E', then DL cannot have zero entries.
-* Not referenced if GRADE = 'N' or 'R'. Changed on exit.
-*
-* MODEL (input) INTEGER
-* This specifies how the diagonal array DL is to be computed,
-* just as MODE specifies how D is to be computed.
-* Not modified.
-*
-* CONDL (input) REAL
-* When MODEL is not zero, this specifies the condition number
-* of the computed DL. Not modified.
-*
-* DR (input/output) REAL array, dimension (N)
-* If MODER=0, then on entry this array specifies the diagonal
-* entries of a diagonal matrix used as described under GRADE
-* above. If MODER is not zero, then DR will be set according
-* to MODER and CONDR, analogous to the way D is set according
-* to MODE and COND (except there is no DMAX parameter for DR).
-* Not referenced if GRADE = 'N', 'L', 'H', 'S' or 'E'.
-* Changed on exit.
-*
-* MODER (input) INTEGER
-* This specifies how the diagonal array DR is to be computed,
-* just as MODE specifies how D is to be computed.
-* Not modified.
-*
-* CONDR (input) REAL
-* When MODER is not zero, this specifies the condition number
-* of the computed DR. Not modified.
-*
-* PIVTNG (input) CHARACTER*1
-* On entry specifies pivoting permutations as follows:
-* 'N' or ' ' => none.
-* 'L' => left or row pivoting (matrix must be nonsymmetric).
-* 'R' => right or column pivoting (matrix must be
-* nonsymmetric).
-* 'B' or 'F' => both or full pivoting, i.e., on both sides.
-* In this case, M must equal N
-*
-* If two calls to SLATMR both have full bandwidth (KL = M-1
-* and KU = N-1), and differ only in the PIVTNG and PACK
-* parameters, then the matrices generated will differ only
-* in the order of the rows and/or columns, and otherwise
-* contain the same data. This consistency cannot be
-* maintained with less than full bandwidth.
-*
-* IPIVOT (input) INTEGER array, dimension (N or M)
-* This array specifies the permutation used. After the
-* basic matrix is generated, the rows, columns, or both
-* are permuted. If, say, row pivoting is selected, SLATMR
-* starts with the *last* row and interchanges the M-th and
-* IPIVOT(M)-th rows, then moves to the next-to-last row,
-* interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
-* and so on. In terms of "2-cycles", the permutation is
-* (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
-* where the rightmost cycle is applied first. This is the
-* *inverse* of the effect of pivoting in LINPACK. The idea
-* is that factoring (with pivoting) an identity matrix
-* which has been inverse-pivoted in this way should
-* result in a pivot vector identical to IPIVOT.
-* Not referenced if PIVTNG = 'N'. Not modified.
-*
-* SPARSE (input) REAL
-* On entry specifies the sparsity of the matrix if a sparse
-* matrix is to be generated. SPARSE should lie between
-* 0 and 1. To generate a sparse matrix, for each matrix entry
-* a uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
-* KL (input) INTEGER
-* On entry specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL at least M-1 implies the matrix is not
-* banded. Must equal KU if matrix is symmetric.
-* Not modified.
-*
-* KU (input) INTEGER
-* On entry specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU at least N-1 implies the matrix is not
-* banded. Must equal KL if matrix is symmetric.
-* Not modified.
-*
-* ANORM (input) REAL
-* On entry specifies maximum entry of output matrix
-* (output matrix will by multiplied by a constant so that
-* its largest absolute entry equal ANORM)
-* if ANORM is nonnegative. If ANORM is negative no scaling
-* is done. Not modified.
-*
-* PACK (input) CHARACTER*1
-* On entry specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric)
-* 'L' => zero out all superdiagonal entries (if symmetric)
-* 'C' => store the upper triangle columnwise
-* (only if matrix symmetric or square upper triangular)
-* 'R' => store the lower triangle columnwise
-* (only if matrix symmetric or square lower triangular)
-* (same as upper half rowwise if symmetric)
-* 'B' => store the lower triangle in band storage scheme
-* (only if matrix symmetric)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if matrix symmetric)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB or TB - use 'B' or 'Q'
-* PP, SP or TP - use 'C' or 'R'
-*
-* If two calls to SLATMR differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) REAL array, dimension (LDA,N)
-* On exit A is the desired test matrix. Only those
-* entries of A which are significant on output
-* will be referenced (even if A is in packed or band
-* storage format). The 'unoccupied corners' of A in
-* band format will be zeroed out.
-*
-* LDA (input) INTEGER
-* on entry LDA specifies the first dimension of A as
-* declared in the calling program.
-* If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
-* If PACK='C' or 'R', LDA must be at least 1.
-* If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
-* If PACK='Z', LDA must be at least KUU+KLL+1, where
-* KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
-* Not modified.
-*
-* IWORK (workspace) INTEGER array, dimension ( N or M)
-* Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
-*
-* INFO (output) INTEGER
-* Error parameter on exit:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S' or 'H'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
-* -11 => GRADE illegal string, or GRADE='E' and
-* M not equal to N, or GRADE='L', 'R', 'B' or 'E' and
-* SYM = 'S' or 'H'
-* -12 => GRADE = 'E' and DL contains zero
-* -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
-* 'S' or 'E'
-* -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
-* and MODEL neither -6, 0 nor 6
-* -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
-* -17 => CONDR less than 1.0, GRADE='R' or 'B', and
-* MODER neither -6, 0 nor 6
-* -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
-* M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
-* or 'H'
-* -19 => IPIVOT contains out of range number and
-* PIVTNG not equal to 'N'
-* -20 => KL negative
-* -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
-* -22 => SPARSE not in range 0. to 1.
-* -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
-* and SYM='N', or PACK='C' and SYM='N' and either KL
-* not equal to 0 or N not equal to M, or PACK='R' and
-* SYM='N', and either KU not equal to 0 or N not equal
-* to M
-* -26 => LDA too small
-* 1 => Error return from SLATM1 (computing D)
-* 2 => Cannot scale diagonal to DMAX (max. entry is 0)
-* 3 => Error return from SLATM1 (computing DL)
-* 4 => Error return from SLATM1 (computing DR)
-* 5 => ANORM is positive, but matrix constructed prior to
-* attempting to scale it to have norm ANORM, is zero
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slatms.f b/TESTING/MATGEN/slatms.f
index c914aaca..da71d288 100644
--- a/TESTING/MATGEN/slatms.f
+++ b/TESTING/MATGEN/slatms.f
@@ -1,9 +1,334 @@
+*> \brief \b SLATMS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATMS( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* KL, KU, PACK, A, LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, PACK, SYM
+* INTEGER INFO, KL, KU, LDA, M, MODE, N
+* REAL COND, DMAX
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* REAL A( LDA, * ), D( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATMS generates random matrices with specified singular values
+*> (or symmetric/hermitian with specified eigenvalues)
+*> for testing LAPACK programs.
+*>
+*> SLATMS operates by applying the following sequence of
+*> operations:
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and SYM
+*> as described below.
+*>
+*> Generate a matrix with the appropriate band structure, by one
+*> of two methods:
+*>
+*> Method A:
+*> Generate a dense M x N matrix by multiplying D on the left
+*> and the right by random unitary matrices, then:
+*>
+*> Reduce the bandwidth according to KL and KU, using
+*> Householder transformations.
+*>
+*> Method B:
+*> Convert the bandwidth-0 (i.e., diagonal) matrix to a
+*> bandwidth-1 matrix using Givens rotations, "chasing"
+*> out-of-band elements back, much as in QR; then
+*> convert the bandwidth-1 to a bandwidth-2 matrix, etc.
+*> Note that for reasonably small bandwidths (relative to
+*> M and N) this requires less storage, as a dense matrix
+*> is not generated. Also, for symmetric matrices, only
+*> one triangle is generated.
+*>
+*> Method A is chosen if the bandwidth is a large fraction of the
+*> order of the matrix, and LDA is at least M (so a dense
+*> matrix can be stored.) Method B is chosen if the bandwidth
+*> is small (< 1/2 N for symmetric, < .3 N+M for
+*> non-symmetric), or LDA is less than M and not less than the
+*> bandwidth.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if symmetric)
+*> zero out lower half (if symmetric)
+*> store the upper half columnwise (if symmetric or upper
+*> triangular)
+*> store the lower half columnwise (if symmetric or lower
+*> triangular)
+*> store the lower triangle in banded format (if symmetric
+*> or lower triangular)
+*> store the upper triangle in banded format (if symmetric
+*> or upper triangular)
+*> store the entire matrix in banded format
+*> If Method B is chosen, and band format is specified, then the
+*> matrix will be generated in the band format, so no repacking
+*> will be necessary.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values.
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to SLATMS
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='S' or 'H', the generated matrix is symmetric, with
+*> eigenvalues specified by D, COND, MODE, and DMAX; they
+*> may be positive, negative, or zero.
+*> If SYM='P', the generated matrix is symmetric, with
+*> eigenvalues (= singular values) specified by D, COND,
+*> MODE, and DMAX; they will not be negative.
+*> If SYM='N', the generated matrix is nonsymmetric, with
+*> singular values specified by D, COND, MODE, and DMAX;
+*> they will not be negative.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension ( MIN( M , N ) )
+*> This array is used to specify the singular values or
+*> eigenvalues of A (see SYM, above.) If MODE=0, then D is
+*> assumed to contain the singular/eigenvalues, otherwise
+*> they will be computed according to MODE, COND, and DMAX,
+*> and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the singular/eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
+*> the elements of D will also be multiplied by a random
+*> sign (i.e., +1 or -1.)
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is REAL
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+*> singular value (which is to say the norm) will be abs(DMAX).
+*> Note that DMAX need not be positive: if DMAX is negative
+*> (or zero), D will be scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL being at least M-1 means that the matrix
+*> has full lower bandwidth. KL must equal KU if the matrix
+*> is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU being at least N-1 means that the matrix
+*> has full upper bandwidth. KL must equal KU if the matrix
+*> is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> This specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric)
+*> 'L' => zero out all superdiagonal entries (if symmetric)
+*> 'C' => store the upper triangle columnwise
+*> (only if the matrix is symmetric or upper triangular)
+*> 'R' => store the lower triangle columnwise
+*> (only if the matrix is symmetric or lower triangular)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if matrix symmetric or lower triangular)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if matrix symmetric or upper triangular)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB or TB - use 'B' or 'Q'
+*> PP, SP or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to SLATMS differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension ( LDA, N )
+*> On exit A is the desired test matrix. A is first generated
+*> in full (unpacked) form, and then packed, if so specified
+*> by PACK. Thus, the first M elements of the first N
+*> columns will always be modified. If PACK specifies a
+*> packed or banded storage scheme, all LDA elements of the
+*> first N columns will be modified; the elements of the
+*> array which do not correspond to elements of the generated
+*> matrix are set to zero.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+*> LDA must be at least M. If PACK='B' or 'Q', then LDA must
+*> be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+*> If PACK='Z', LDA must be large enough to hold the packed
+*> array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension ( 3*MAX( N , M ) )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => KL negative
+*> -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+*> -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+*> or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+*> or PACK='R' or 'B' and SYM='N' and KU is not zero;
+*> or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+*> N.
+*> -14 => LDA is less than M, or PACK='Z' and LDA is less than
+*> MIN(KU,N-1) + MIN(KL,M-1) + 1.
+*> 1 => Error return from SLATM1
+*> 2 => Cannot scale to DMAX (max. sing. value is 0)
+*> 3 => Error return from SLAGGE or SLAGSY
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
SUBROUTINE SLATMS( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ KL, KU, PACK, A, LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, PACK, SYM
@@ -15,238 +340,6 @@
REAL A( LDA, * ), D( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* SLATMS generates random matrices with specified singular values
-* (or symmetric/hermitian with specified eigenvalues)
-* for testing LAPACK programs.
-*
-* SLATMS operates by applying the following sequence of
-* operations:
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and SYM
-* as described below.
-*
-* Generate a matrix with the appropriate band structure, by one
-* of two methods:
-*
-* Method A:
-* Generate a dense M x N matrix by multiplying D on the left
-* and the right by random unitary matrices, then:
-*
-* Reduce the bandwidth according to KL and KU, using
-* Householder transformations.
-*
-* Method B:
-* Convert the bandwidth-0 (i.e., diagonal) matrix to a
-* bandwidth-1 matrix using Givens rotations, "chasing"
-* out-of-band elements back, much as in QR; then
-* convert the bandwidth-1 to a bandwidth-2 matrix, etc.
-* Note that for reasonably small bandwidths (relative to
-* M and N) this requires less storage, as a dense matrix
-* is not generated. Also, for symmetric matrices, only
-* one triangle is generated.
-*
-* Method A is chosen if the bandwidth is a large fraction of the
-* order of the matrix, and LDA is at least M (so a dense
-* matrix can be stored.) Method B is chosen if the bandwidth
-* is small (< 1/2 N for symmetric, < .3 N+M for
-* non-symmetric), or LDA is less than M and not less than the
-* bandwidth.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if symmetric)
-* zero out lower half (if symmetric)
-* store the upper half columnwise (if symmetric or upper
-* triangular)
-* store the lower half columnwise (if symmetric or lower
-* triangular)
-* store the lower triangle in banded format (if symmetric
-* or lower triangular)
-* store the upper triangle in banded format (if symmetric
-* or upper triangular)
-* store the entire matrix in banded format
-* If Method B is chosen, and band format is specified, then the
-* matrix will be generated in the band format, so no repacking
-* will be necessary.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* The number of columns of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values.
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to SLATMS
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='S' or 'H', the generated matrix is symmetric, with
-* eigenvalues specified by D, COND, MODE, and DMAX; they
-* may be positive, negative, or zero.
-* If SYM='P', the generated matrix is symmetric, with
-* eigenvalues (= singular values) specified by D, COND,
-* MODE, and DMAX; they will not be negative.
-* If SYM='N', the generated matrix is nonsymmetric, with
-* singular values specified by D, COND, MODE, and DMAX;
-* they will not be negative.
-* Not modified.
-*
-* D (input/output) REAL array, dimension ( MIN( M , N ) )
-* This array is used to specify the singular values or
-* eigenvalues of A (see SYM, above.) If MODE=0, then D is
-* assumed to contain the singular/eigenvalues, otherwise
-* they will be computed according to MODE, COND, and DMAX,
-* and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the singular/eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
-* the elements of D will also be multiplied by a random
-* sign (i.e., +1 or -1.)
-* Not modified.
-*
-* COND (input) REAL
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) REAL
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
-* singular value (which is to say the norm) will be abs(DMAX).
-* Note that DMAX need not be positive: if DMAX is negative
-* (or zero), D will be scaled by a negative number (or zero).
-* Not modified.
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL being at least M-1 means that the matrix
-* has full lower bandwidth. KL must equal KU if the matrix
-* is symmetric.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU being at least N-1 means that the matrix
-* has full upper bandwidth. KL must equal KU if the matrix
-* is symmetric.
-* Not modified.
-*
-* PACK (input) CHARACTER*1
-* This specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric)
-* 'L' => zero out all superdiagonal entries (if symmetric)
-* 'C' => store the upper triangle columnwise
-* (only if the matrix is symmetric or upper triangular)
-* 'R' => store the lower triangle columnwise
-* (only if the matrix is symmetric or lower triangular)
-* 'B' => store the lower triangle in band storage scheme
-* (only if matrix symmetric or lower triangular)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if matrix symmetric or upper triangular)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB or TB - use 'B' or 'Q'
-* PP, SP or TP - use 'C' or 'R'
-*
-* If two calls to SLATMS differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) REAL array, dimension ( LDA, N )
-* On exit A is the desired test matrix. A is first generated
-* in full (unpacked) form, and then packed, if so specified
-* by PACK. Thus, the first M elements of the first N
-* columns will always be modified. If PACK specifies a
-* packed or banded storage scheme, all LDA elements of the
-* first N columns will be modified; the elements of the
-* array which do not correspond to elements of the generated
-* matrix are set to zero.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
-* LDA must be at least M. If PACK='B' or 'Q', then LDA must
-* be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
-* If PACK='Z', LDA must be large enough to hold the packed
-* array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
-* Not modified.
-*
-* WORK (workspace) REAL array, dimension ( 3*MAX( N , M ) )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => KL negative
-* -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
-* -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
-* or PACK='C' or 'Q' and SYM='N' and KL is not zero;
-* or PACK='R' or 'B' and SYM='N' and KU is not zero;
-* or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
-* N.
-* -14 => LDA is less than M, or PACK='Z' and LDA is less than
-* MIN(KU,N-1) + MIN(KL,M-1) + 1.
-* 1 => Error return from SLATM1
-* 2 => Cannot scale to DMAX (max. sing. value is 0)
-* 3 => Error return from SLAGGE or SLAGSY
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/slatmt.f b/TESTING/MATGEN/slatmt.f
index 6e5007c1..5a75b53c 100644
--- a/TESTING/MATGEN/slatmt.f
+++ b/TESTING/MATGEN/slatmt.f
@@ -1,9 +1,346 @@
+*> \brief \b SLATMT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE SLATMT( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* RANK, KL, KU, PACK, A, LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* REAL COND, DMAX
+* INTEGER INFO, KL, KU, LDA, M, MODE, N, RANK
+* CHARACTER DIST, PACK, SYM
+* ..
+* .. Array Arguments ..
+* REAL A( LDA, * ), D( * ), WORK( * )
+* INTEGER ISEED( 4 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> SLATMT generates random matrices with specified singular values
+*> (or symmetric/hermitian with specified eigenvalues)
+*> for testing LAPACK programs.
+*>
+*> SLATMT operates by applying the following sequence of
+*> operations:
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and SYM
+*> as described below.
+*>
+*> Generate a matrix with the appropriate band structure, by one
+*> of two methods:
+*>
+*> Method A:
+*> Generate a dense M x N matrix by multiplying D on the left
+*> and the right by random unitary matrices, then:
+*>
+*> Reduce the bandwidth according to KL and KU, using
+*> Householder transformations.
+*>
+*> Method B:
+*> Convert the bandwidth-0 (i.e., diagonal) matrix to a
+*> bandwidth-1 matrix using Givens rotations, "chasing"
+*> out-of-band elements back, much as in QR; then
+*> convert the bandwidth-1 to a bandwidth-2 matrix, etc.
+*> Note that for reasonably small bandwidths (relative to
+*> M and N) this requires less storage, as a dense matrix
+*> is not generated. Also, for symmetric matrices, only
+*> one triangle is generated.
+*>
+*> Method A is chosen if the bandwidth is a large fraction of the
+*> order of the matrix, and LDA is at least M (so a dense
+*> matrix can be stored.) Method B is chosen if the bandwidth
+*> is small (< 1/2 N for symmetric, < .3 N+M for
+*> non-symmetric), or LDA is less than M and not less than the
+*> bandwidth.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if symmetric)
+*> zero out lower half (if symmetric)
+*> store the upper half columnwise (if symmetric or upper
+*> triangular)
+*> store the lower half columnwise (if symmetric or lower
+*> triangular)
+*> store the lower triangle in banded format (if symmetric
+*> or lower triangular)
+*> store the upper triangle in banded format (if symmetric
+*> or upper triangular)
+*> store the entire matrix in banded format
+*> If Method B is chosen, and band format is specified, then the
+*> matrix will be generated in the band format, so no repacking
+*> will be necessary.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values.
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to SLATMT
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='S' or 'H', the generated matrix is symmetric, with
+*> eigenvalues specified by D, COND, MODE, and DMAX; they
+*> may be positive, negative, or zero.
+*> If SYM='P', the generated matrix is symmetric, with
+*> eigenvalues (= singular values) specified by D, COND,
+*> MODE, and DMAX; they will not be negative.
+*> If SYM='N', the generated matrix is nonsymmetric, with
+*> singular values specified by D, COND, MODE, and DMAX;
+*> they will not be negative.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is REAL array, dimension ( MIN( M , N ) )
+*> This array is used to specify the singular values or
+*> eigenvalues of A (see SYM, above.) If MODE=0, then D is
+*> assumed to contain the singular/eigenvalues, otherwise
+*> they will be computed according to MODE, COND, and DMAX,
+*> and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the singular/eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> \endverbatim
+*> \verbatim
+*> MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
+*> MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1))
+*> \endverbatim
+*> \verbatim
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
+*> the elements of D will also be multiplied by a random
+*> sign (i.e., +1 or -1.)
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is REAL
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is REAL
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+*> singular value (which is to say the norm) will be abs(DMAX).
+*> Note that DMAX need not be positive: if DMAX is negative
+*> (or zero), D will be scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of matrix to be generated for modes 1,2,3 only.
+*> D( RANK+1:N ) = 0.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL being at least M-1 means that the matrix
+*> has full lower bandwidth. KL must equal KU if the matrix
+*> is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU being at least N-1 means that the matrix
+*> has full upper bandwidth. KL must equal KU if the matrix
+*> is symmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> This specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric)
+*> 'L' => zero out all superdiagonal entries (if symmetric)
+*> 'C' => store the upper triangle columnwise
+*> (only if the matrix is symmetric or upper triangular)
+*> 'R' => store the lower triangle columnwise
+*> (only if the matrix is symmetric or lower triangular)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if matrix symmetric or lower triangular)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if matrix symmetric or upper triangular)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB or TB - use 'B' or 'Q'
+*> PP, SP or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to SLATMT differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is REAL array, dimension ( LDA, N )
+*> On exit A is the desired test matrix. A is first generated
+*> in full (unpacked) form, and then packed, if so specified
+*> by PACK. Thus, the first M elements of the first N
+*> columns will always be modified. If PACK specifies a
+*> packed or banded storage scheme, all LDA elements of the
+*> first N columns will be modified; the elements of the
+*> array which do not correspond to elements of the generated
+*> matrix are set to zero.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+*> LDA must be at least M. If PACK='B' or 'Q', then LDA must
+*> be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+*> If PACK='Z', LDA must be large enough to hold the packed
+*> array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension ( 3*MAX( N , M ) )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => KL negative
+*> -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+*> -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+*> or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+*> or PACK='R' or 'B' and SYM='N' and KU is not zero;
+*> or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+*> N.
+*> -14 => LDA is less than M, or PACK='Z' and LDA is less than
+*> MIN(KU,N-1) + MIN(KL,M-1) + 1.
+*> 1 => Error return from SLATM7
+*> 2 => Cannot scale to DMAX (max. sing. value is 0)
+*> 3 => Error return from SLAGGE or SLAGSY
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup real_matgen
+*
+* =====================================================================
SUBROUTINE SLATMT( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ RANK, KL, KU, PACK, A, LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
REAL COND, DMAX
@@ -15,245 +352,6 @@
INTEGER ISEED( 4 )
* ..
*
-* Purpose
-* =======
-*
-* SLATMT generates random matrices with specified singular values
-* (or symmetric/hermitian with specified eigenvalues)
-* for testing LAPACK programs.
-*
-* SLATMT operates by applying the following sequence of
-* operations:
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and SYM
-* as described below.
-*
-* Generate a matrix with the appropriate band structure, by one
-* of two methods:
-*
-* Method A:
-* Generate a dense M x N matrix by multiplying D on the left
-* and the right by random unitary matrices, then:
-*
-* Reduce the bandwidth according to KL and KU, using
-* Householder transformations.
-*
-* Method B:
-* Convert the bandwidth-0 (i.e., diagonal) matrix to a
-* bandwidth-1 matrix using Givens rotations, "chasing"
-* out-of-band elements back, much as in QR; then
-* convert the bandwidth-1 to a bandwidth-2 matrix, etc.
-* Note that for reasonably small bandwidths (relative to
-* M and N) this requires less storage, as a dense matrix
-* is not generated. Also, for symmetric matrices, only
-* one triangle is generated.
-*
-* Method A is chosen if the bandwidth is a large fraction of the
-* order of the matrix, and LDA is at least M (so a dense
-* matrix can be stored.) Method B is chosen if the bandwidth
-* is small (< 1/2 N for symmetric, < .3 N+M for
-* non-symmetric), or LDA is less than M and not less than the
-* bandwidth.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if symmetric)
-* zero out lower half (if symmetric)
-* store the upper half columnwise (if symmetric or upper
-* triangular)
-* store the lower half columnwise (if symmetric or lower
-* triangular)
-* store the lower triangle in banded format (if symmetric
-* or lower triangular)
-* store the upper triangle in banded format (if symmetric
-* or upper triangular)
-* store the entire matrix in banded format
-* If Method B is chosen, and band format is specified, then the
-* matrix will be generated in the band format, so no repacking
-* will be necessary.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* The number of columns of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values.
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to SLATMT
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='S' or 'H', the generated matrix is symmetric, with
-* eigenvalues specified by D, COND, MODE, and DMAX; they
-* may be positive, negative, or zero.
-* If SYM='P', the generated matrix is symmetric, with
-* eigenvalues (= singular values) specified by D, COND,
-* MODE, and DMAX; they will not be negative.
-* If SYM='N', the generated matrix is nonsymmetric, with
-* singular values specified by D, COND, MODE, and DMAX;
-* they will not be negative.
-* Not modified.
-*
-* D (input/output) REAL array, dimension ( MIN( M , N ) )
-* This array is used to specify the singular values or
-* eigenvalues of A (see SYM, above.) If MODE=0, then D is
-* assumed to contain the singular/eigenvalues, otherwise
-* they will be computed according to MODE, COND, and DMAX,
-* and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the singular/eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-*
-* MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
-* MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1))
-*
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* If SYM='S' or 'H', and MODE is neither 0, 6, nor -6, then
-* the elements of D will also be multiplied by a random
-* sign (i.e., +1 or -1.)
-* Not modified.
-*
-* COND (input) REAL
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) REAL
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
-* singular value (which is to say the norm) will be abs(DMAX).
-* Note that DMAX need not be positive: if DMAX is negative
-* (or zero), D will be scaled by a negative number (or zero).
-* Not modified.
-*
-* RANK (input) INTEGER
-* The rank of matrix to be generated for modes 1,2,3 only.
-* D( RANK+1:N ) = 0.
-* Not modified.
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL being at least M-1 means that the matrix
-* has full lower bandwidth. KL must equal KU if the matrix
-* is symmetric.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU being at least N-1 means that the matrix
-* has full upper bandwidth. KL must equal KU if the matrix
-* is symmetric.
-* Not modified.
-*
-* PACK (input) CHARACTER*1
-* This specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric)
-* 'L' => zero out all superdiagonal entries (if symmetric)
-* 'C' => store the upper triangle columnwise
-* (only if the matrix is symmetric or upper triangular)
-* 'R' => store the lower triangle columnwise
-* (only if the matrix is symmetric or lower triangular)
-* 'B' => store the lower triangle in band storage scheme
-* (only if matrix symmetric or lower triangular)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if matrix symmetric or upper triangular)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB or TB - use 'B' or 'Q'
-* PP, SP or TP - use 'C' or 'R'
-*
-* If two calls to SLATMT differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) REAL array, dimension ( LDA, N )
-* On exit A is the desired test matrix. A is first generated
-* in full (unpacked) form, and then packed, if so specified
-* by PACK. Thus, the first M elements of the first N
-* columns will always be modified. If PACK specifies a
-* packed or banded storage scheme, all LDA elements of the
-* first N columns will be modified; the elements of the
-* array which do not correspond to elements of the generated
-* matrix are set to zero.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
-* LDA must be at least M. If PACK='B' or 'Q', then LDA must
-* be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
-* If PACK='Z', LDA must be large enough to hold the packed
-* array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
-* Not modified.
-*
-* WORK (workspace) REAL array, dimension ( 3*MAX( N , M ) )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => KL negative
-* -11 => KU negative, or SYM='S' or 'H' and KU not equal to KL
-* -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
-* or PACK='C' or 'Q' and SYM='N' and KL is not zero;
-* or PACK='R' or 'B' and SYM='N' and KU is not zero;
-* or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
-* N.
-* -14 => LDA is less than M, or PACK='Z' and LDA is less than
-* MIN(KU,N-1) + MIN(KL,M-1) + 1.
-* 1 => Error return from SLATM7
-* 2 => Cannot scale to DMAX (max. sing. value is 0)
-* 3 => Error return from SLAGGE or SLAGSY
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/zlagge.f b/TESTING/MATGEN/zlagge.f
index ce5b7358..5963699d 100644
--- a/TESTING/MATGEN/zlagge.f
+++ b/TESTING/MATGEN/zlagge.f
@@ -1,63 +1,134 @@
- SUBROUTINE ZLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, KL, KU, LDA, M, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION D( * )
- COMPLEX*16 A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b ZLAGGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, KL, KU, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLAGGE generates a complex general m by n matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with random unitary matrices:
-* A = U*D*V. The lower and upper bandwidths may then be reduced to
-* kl and ku by additional unitary transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAGGE generates a complex general m by n matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with random unitary matrices:
+*> A = U*D*V. The lower and upper bandwidths may then be reduced to
+*> kl and ku by additional unitary transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* The number of rows of the matrix A. M >= 0.
-*
-* N (input) INTEGER
-* The number of columns of the matrix A. N >= 0.
-*
-* KL (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= KL <= M-1.
-*
-* KU (input) INTEGER
-* The number of nonzero superdiagonals within the band of A.
-* 0 <= KU <= N-1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of the matrix A. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= KL <= M-1.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> The number of nonzero superdiagonals within the band of A.
+*> 0 <= KU <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (min(M,N))
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The generated m by n matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= M.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (M+N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (min(M,N))
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) COMPLEX*16 array, dimension (LDA,N)
-* The generated m by n matrix A.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= M.
+*> \ingroup complex16_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE ZLAGGE( M, N, KL, KU, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (M+N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, KL, KU, LDA, M, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION D( * )
+ COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/zlaghe.f b/TESTING/MATGEN/zlaghe.f
index 0e86fc33..8e9c6e3c 100644
--- a/TESTING/MATGEN/zlaghe.f
+++ b/TESTING/MATGEN/zlaghe.f
@@ -1,57 +1,122 @@
- SUBROUTINE ZLAGHE( N, K, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION D( * )
- COMPLEX*16 A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b ZLAGHE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAGHE( N, K, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLAGHE generates a complex hermitian matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with a random unitary matrix:
-* A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
-* unitary transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAGHE generates a complex hermitian matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with a random unitary matrix:
+*> A = U*D*U'. The semi-bandwidth may then be reduced to k by additional
+*> unitary transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* K (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= K <= N-1.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= K <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The generated n by n hermitian matrix A (the full matrix is
+*> stored).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) COMPLEX*16 array, dimension (LDA,N)
-* The generated n by n hermitian matrix A (the full matrix is
-* stored).
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup complex16_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE ZLAGHE( N, K, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION D( * )
+ COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/zlagsy.f b/TESTING/MATGEN/zlagsy.f
index 7adb609b..317d2489 100644
--- a/TESTING/MATGEN/zlagsy.f
+++ b/TESTING/MATGEN/zlagsy.f
@@ -1,57 +1,122 @@
- SUBROUTINE ZLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, K, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- DOUBLE PRECISION D( * )
- COMPLEX*16 A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b ZLAGSY
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLAGSY generates a complex symmetric matrix A, by pre- and post-
-* multiplying a real diagonal matrix D with a random unitary matrix:
-* A = U*D*U**T. The semi-bandwidth may then be reduced to k by
-* additional unitary transformations.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAGSY generates a complex symmetric matrix A, by pre- and post-
+*> multiplying a real diagonal matrix D with a random unitary matrix:
+*> A = U*D*U**T. The semi-bandwidth may then be reduced to k by
+*> additional unitary transformations.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
-*
-* K (input) INTEGER
-* The number of nonzero subdiagonals within the band of A.
-* 0 <= K <= N-1.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*> K is INTEGER
+*> The number of nonzero subdiagonals within the band of A.
+*> 0 <= K <= N-1.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension (N)
+*> The diagonal elements of the diagonal matrix D.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> The generated n by n symmetric matrix A (the full matrix is
+*> stored).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* D (input) DOUBLE PRECISION array, dimension (N)
-* The diagonal elements of the diagonal matrix D.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (output) COMPLEX*16 array, dimension (LDA,N)
-* The generated n by n symmetric matrix A (the full matrix is
-* stored).
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup complex16_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE ZLAGSY( N, K, D, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, K, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ DOUBLE PRECISION D( * )
+ COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/zlahilb.f b/TESTING/MATGEN/zlahilb.f
index a9378c4c..53df5089 100644
--- a/TESTING/MATGEN/zlahilb.f
+++ b/TESTING/MATGEN/zlahilb.f
@@ -1,104 +1,167 @@
+*> \brief \b ZLAHILB
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
+* INFO, PATH)
+*
+* .. Scalar Arguments ..
+* INTEGER N, NRHS, LDA, LDX, LDB, INFO
+* .. Array Arguments ..
+* DOUBLE PRECISION WORK(N)
+* COMPLEX*16 A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
+* CHARACTER*3 PATH
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAHILB generates an N by N scaled Hilbert matrix in A along with
+*> NRHS right-hand sides in B and solutions in X such that A*X=B.
+*>
+*> The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all
+*> entries are integers. The right-hand sides are the first NRHS
+*> columns of M * the identity matrix, and the solutions are the
+*> first NRHS columns of the inverse Hilbert matrix.
+*>
+*> The condition number of the Hilbert matrix grows exponentially with
+*> its size, roughly as O(e ** (3.5*N)). Additionally, the inverse
+*> Hilbert matrices beyond a relatively small dimension cannot be
+*> generated exactly without extra precision. Precision is exhausted
+*> when the largest entry in the inverse Hilbert matrix is greater than
+*> 2 to the power of the number of bits in the fraction of the data type
+*> used plus one, which is 24 for single precision.
+*>
+*> In single, the generated solution is exact for N <= 6 and has
+*> small componentwise error for 7 <= N <= 11.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The dimension of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*> NRHS is INTEGER
+*> The requested number of right-hand sides.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX array, dimension (LDA, N)
+*> The generated scaled Hilbert matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX array, dimension (LDX, NRHS)
+*> The generated exact solutions. Currently, the first NRHS
+*> columns of the inverse Hilbert matrix.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of the array X. LDX >= N.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is REAL array, dimension (LDB, NRHS)
+*> The generated right-hand sides. Currently, the first NRHS
+*> columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of the array B. LDB >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is REAL array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> = 1: N is too large; the data is still generated but may not
+*> be not exact.
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
SUBROUTINE ZLAHILB( N, NRHS, A, LDA, X, LDX, B, LDB, WORK,
$ INFO, PATH)
-!
-! -- LAPACK auxiliary test routine (version 3.2.2) --
-! Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-! Courant Institute, Argonne National Lab, and Rice University
-* June 2010
-!
-! David Vu <dtv@cs.berkeley.edu>
-! Yozo Hida <yozo@cs.berkeley.edu>
-! Jason Riedy <ejr@cs.berkeley.edu>
-! D. Halligan <dhalligan@berkeley.edu>
-!
- IMPLICIT NONE
-! .. Scalar Arguments ..
+*
+* -- LAPACK auxiliary routine (version 3.2.2) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
INTEGER N, NRHS, LDA, LDX, LDB, INFO
-! .. Array Arguments ..
+* .. Array Arguments ..
DOUBLE PRECISION WORK(N)
COMPLEX*16 A(LDA,N), X(LDX, NRHS), B(LDB, NRHS)
CHARACTER*3 PATH
-! ..
-!
-! Purpose
-! =======
-!
-! ZLAHILB generates an N by N scaled Hilbert matrix in A along with
-! NRHS right-hand sides in B and solutions in X such that A*X=B.
-!
-! The Hilbert matrix is scaled by M = LCM(1, 2, ..., 2*N-1) so that all
-! entries are integers. The right-hand sides are the first NRHS
-! columns of M * the identity matrix, and the solutions are the
-! first NRHS columns of the inverse Hilbert matrix.
-!
-! The condition number of the Hilbert matrix grows exponentially with
-! its size, roughly as O(e ** (3.5*N)). Additionally, the inverse
-! Hilbert matrices beyond a relatively small dimension cannot be
-! generated exactly without extra precision. Precision is exhausted
-! when the largest entry in the inverse Hilbert matrix is greater than
-! 2 to the power of the number of bits in the fraction of the data type
-! used plus one, which is 24 for single precision.
-!
-! In single, the generated solution is exact for N <= 6 and has
-! small componentwise error for 7 <= N <= 11.
-!
-! Arguments
-! =========
-!
-! N (input) INTEGER
-! The dimension of the matrix A.
-!
-! NRHS (input) INTEGER
-! The requested number of right-hand sides.
-!
-! A (output) COMPLEX array, dimension (LDA, N)
-! The generated scaled Hilbert matrix.
-!
-! LDA (input) INTEGER
-! The leading dimension of the array A. LDA >= N.
-!
-! X (output) COMPLEX array, dimension (LDX, NRHS)
-! The generated exact solutions. Currently, the first NRHS
-! columns of the inverse Hilbert matrix.
-!
-! LDX (input) INTEGER
-! The leading dimension of the array X. LDX >= N.
-!
-! B (output) REAL array, dimension (LDB, NRHS)
-! The generated right-hand sides. Currently, the first NRHS
-! columns of LCM(1, 2, ..., 2*N-1) * the identity matrix.
-!
-! LDB (input) INTEGER
-! The leading dimension of the array B. LDB >= N.
-!
-! WORK (workspace) REAL array, dimension (N)
-!
-!
-! INFO (output) INTEGER
-! = 0: successful exit
-! = 1: N is too large; the data is still generated but may not
-! be not exact.
-! < 0: if INFO = -i, the i-th argument had an illegal value
-!
-! =====================================================================
+* ..
+*
+* =====================================================================
-! .. Local Scalars ..
+* .. Local Scalars ..
INTEGER TM, TI, R
INTEGER M
INTEGER I, J
COMPLEX*16 TMP
CHARACTER*2 C2
-! .. Parameters ..
-! NMAX_EXACT the largest dimension where the generated data is
-! exact.
-! NMAX_APPROX the largest dimension where the generated data has
-! a small componentwise relative error.
-! ??? complex uses how many bits ???
+* .. Parameters ..
+* NMAX_EXACT the largest dimension where the generated data is
+* exact.
+* NMAX_APPROX the largest dimension where the generated data has
+* a small componentwise relative error.
+* ??? complex uses how many bits ???
INTEGER NMAX_EXACT, NMAX_APPROX, SIZE_D
PARAMETER (NMAX_EXACT = 6, NMAX_APPROX = 11, SIZE_D = 8)
-! d's are generated from random permuation of those eight elements.
+* d's are generated from random permuation of those eight elements.
COMPLEX*16 d1(8), d2(8), invd1(8), invd2(8)
DATA D1 /(-1,0),(0,1),(-1,-1),(0,-1),(1,0),(-1,1),(1,1),(1,-1)/
DATA D2 /(-1,0),(0,-1),(-1,1),(0,1),(1,0),(-1,-1),(1,-1),(1,1)/
@@ -107,17 +170,17 @@
$ (-.5,-.5),(.5,-.5),(.5,.5)/
DATA INVD2 /(-1,0),(0,1),(-.5,-.5),(0,-1),(1,0),
$ (-.5,.5),(.5,.5),(.5,-.5)/
-! ..
-! .. External Functions
+* ..
+* .. External Functions
EXTERNAL ZLASET, LSAMEN
INTRINSIC DBLE
LOGICAL LSAMEN
-! ..
-! .. Executable Statements ..
+* ..
+* .. Executable Statements ..
C2 = PATH( 2: 3 )
-!
-! Test the input arguments
-!
+*
+* Test the input arguments
+*
INFO = 0
IF (N .LT. 0 .OR. N .GT. NMAX_APPROX) THEN
INFO = -1
@@ -138,8 +201,8 @@
INFO = 1
END IF
-! Compute M = the LCM of the integers [1, 2*N-1]. The largest
-! reasonable N is small enough that integers suffice (up to N = 11).
+* Compute M = the LCM of the integers [1, 2*N-1]. The largest
+* reasonable N is small enough that integers suffice (up to N = 11).
M = 1
DO I = 2, (2*N-1)
TM = M
@@ -153,9 +216,9 @@
M = (M / TI) * I
END DO
-! Generate the scaled Hilbert matrix in A
-! If we are testing SY routines,
-! take D1_i = D2_i, else, D1_i = D2_i*
+* Generate the scaled Hilbert matrix in A
+* If we are testing SY routines,
+* take D1_i = D2_i, else, D1_i = D2_i*
IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
DO J = 1, N
DO I = 1, N
@@ -172,22 +235,22 @@
END DO
END IF
-! Generate matrix B as simply the first NRHS columns of M * the
-! identity.
+* Generate matrix B as simply the first NRHS columns of M * the
+* identity.
TMP = DBLE(M)
CALL ZLASET('Full', N, NRHS, (0.0D+0,0.0D+0), TMP, B, LDB)
-! Generate the true solutions in X. Because B = the first NRHS
-! columns of M*I, the true solutions are just the first NRHS columns
-! of the inverse Hilbert matrix.
+* Generate the true solutions in X. Because B = the first NRHS
+* columns of M*I, the true solutions are just the first NRHS columns
+* of the inverse Hilbert matrix.
WORK(1) = N
DO J = 2, N
WORK(J) = ( ( (WORK(J-1)/(J-1)) * (J-1 - N) ) /(J-1) )
$ * (N +J -1)
END DO
-! If we are testing SY routines,
-! take D1_i = D2_i, else, D1_i = D2_i*
+* If we are testing SY routines,
+* take D1_i = D2_i, else, D1_i = D2_i*
IF ( LSAMEN( 2, C2, 'SY' ) ) THEN
DO J = 1, NRHS
DO I = 1, N
diff --git a/TESTING/MATGEN/zlakf2.f b/TESTING/MATGEN/zlakf2.f
index 58c7eb27..48afb3f4 100644
--- a/TESTING/MATGEN/zlakf2.f
+++ b/TESTING/MATGEN/zlakf2.f
@@ -1,54 +1,125 @@
- SUBROUTINE ZLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDZ, M, N
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDA, * ), D( LDA, * ),
- $ E( LDA, * ), Z( LDZ, * )
-* ..
-*
+*> \brief \b ZLAKF2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDZ, M, N
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDA, * ), D( LDA, * ),
+* $ E( LDA, * ), Z( LDZ, * )
+* ..
+*
* Purpose
* =======
*
-* Form the 2*M*N by 2*M*N matrix
-*
-* Z = [ kron(In, A) -kron(B', Im) ]
-* [ kron(In, D) -kron(E', Im) ],
-*
-* where In is the identity matrix of size n and X' is the transpose
-* of X. kron(X, Y) is the Kronecker product between the matrices X
-* and Y.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> Form the 2*M*N by 2*M*N matrix
+*>
+*> Z = [ kron(In, A) -kron(B', Im) ]
+*> [ kron(In, D) -kron(E', Im) ],
+*>
+*> where In is the identity matrix of size n and X' is the transpose
+*> of X. kron(X, Y) is the Kronecker product between the matrices X
+*> and Y.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* M (input) INTEGER
-* Size of matrix, must be >= 1.
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Size of matrix, must be >= 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Size of matrix, must be >= 1.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*> A is COMPLEX*16, dimension ( LDA, M )
+*> The matrix A in the output matrix Z.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A, B, D, and E. ( LDA >= M+N )
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*> B is COMPLEX*16, dimension ( LDA, N )
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16, dimension ( LDA, M )
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*> E is COMPLEX*16, dimension ( LDA, N )
+*> \endverbatim
+*> \verbatim
+*> The matrices used in forming the output matrix Z.
+*> \endverbatim
+*>
+*> \param[out] Z
+*> \verbatim
+*> Z is COMPLEX*16, dimension ( LDZ, 2*M*N )
+*> The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*> LDZ is INTEGER
+*> The leading dimension of Z. ( LDZ >= 2*M*N )
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* N (input) INTEGER
-* Size of matrix, must be >= 1.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input) COMPLEX*16, dimension ( LDA, M )
-* The matrix A in the output matrix Z.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of A, B, D, and E. ( LDA >= M+N )
+*> \ingroup complex16_matgen
*
-* B (input) COMPLEX*16, dimension ( LDA, N )
-* D (input) COMPLEX*16, dimension ( LDA, M )
-* E (input) COMPLEX*16, dimension ( LDA, N )
-* The matrices used in forming the output matrix Z.
+* =====================================================================
+ SUBROUTINE ZLAKF2( M, N, A, LDA, B, D, E, Z, LDZ )
*
-* Z (output) COMPLEX*16, dimension ( LDZ, 2*M*N )
-* The resultant Kronecker M*N*2 by M*N*2 matrix (see above.)
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* LDZ (input) INTEGER
-* The leading dimension of Z. ( LDZ >= 2*M*N )
+* .. Scalar Arguments ..
+ INTEGER LDA, LDZ, M, N
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDA, * ), D( LDA, * ),
+ $ E( LDA, * ), Z( LDZ, * )
+* ..
*
* ====================================================================
*
diff --git a/TESTING/MATGEN/zlarge.f b/TESTING/MATGEN/zlarge.f
index 7cb187e5..895afc48 100644
--- a/TESTING/MATGEN/zlarge.f
+++ b/TESTING/MATGEN/zlarge.f
@@ -1,48 +1,106 @@
- SUBROUTINE ZLARGE( N, A, LDA, ISEED, WORK, INFO )
-*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER INFO, LDA, N
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
- COMPLEX*16 A( LDA, * ), WORK( * )
-* ..
-*
+*> \brief \b ZLARGE
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLARGE( N, A, LDA, ISEED, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
* Purpose
* =======
*
-* ZLARGE pre- and post-multiplies a complex general n by n matrix A
-* with a random unitary matrix: A = U*D*U'.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARGE pre- and post-multiplies a complex general n by n matrix A
+*> with a random unitary matrix: A = U*D*U'.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* N (input) INTEGER
-* The order of the matrix A. N >= 0.
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On entry, the original n by n matrix A.
+*> On exit, A is overwritten by U*A*U' for some random
+*> unitary matrix U.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> = 0: successful exit
+*> < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On entry, the original n by n matrix A.
-* On exit, A is overwritten by U*A*U' for some random
-* unitary matrix U.
+*> \date November 2011
*
-* LDA (input) INTEGER
-* The leading dimension of the array A. LDA >= N.
+*> \ingroup complex16_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
+* =====================================================================
+ SUBROUTINE ZLARGE( N, A, LDA, ISEED, WORK, INFO )
*
-* WORK (workspace) COMPLEX*16 array, dimension (2*N)
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* INFO (output) INTEGER
-* = 0: successful exit
-* < 0: if INFO = -i, the i-th argument had an illegal value
+* .. Scalar Arguments ..
+ INTEGER INFO, LDA, N
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+ COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/zlarnd.f b/TESTING/MATGEN/zlarnd.f
index 09a20c4f..15919f27 100644
--- a/TESTING/MATGEN/zlarnd.f
+++ b/TESTING/MATGEN/zlarnd.f
@@ -1,45 +1,95 @@
- COMPLEX*16 FUNCTION ZLARND( IDIST, ISEED )
+*> \brief \b ZLARND
*
-* -- LAPACK auxiliary routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* =========== DOCUMENTATION ===========
*
-* .. Scalar Arguments ..
- INTEGER IDIST
-* ..
-* .. Array Arguments ..
- INTEGER ISEED( 4 )
-* ..
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
*
+* COMPLEX*16 FUNCTION ZLARND( IDIST, ISEED )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* ..
+*
* Purpose
* =======
*
-* ZLARND returns a random complex number from a uniform or normal
-* distribution.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLARND returns a random complex number from a uniform or normal
+*> distribution.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* IDIST (input) INTEGER
-* Specifies the distribution of the random numbers:
-* = 1: real and imaginary parts each uniform (0,1)
-* = 2: real and imaginary parts each uniform (-1,1)
-* = 3: real and imaginary parts each normal (0,1)
-* = 4: uniformly distributed on the disc abs(z) <= 1
-* = 5: uniformly distributed on the circle abs(z) = 1
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> Specifies the distribution of the random numbers:
+*> = 1: real and imaginary parts each uniform (0,1)
+*> = 2: real and imaginary parts each uniform (-1,1)
+*> = 3: real and imaginary parts each normal (0,1)
+*> = 4: uniformly distributed on the disc abs(z) <= 1
+*> = 5: uniformly distributed on the circle abs(z) = 1
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry, the seed of the random number generator; the array
+*> elements must be between 0 and 4095, and ISEED(4) must be
+*> odd.
+*> On exit, the seed is updated.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry, the seed of the random number generator; the array
-* elements must be between 0 and 4095, and ISEED(4) must be
-* odd.
-* On exit, the seed is updated.
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> This routine calls the auxiliary routine DLARAN to generate a random
+*> real number from a uniform (0,1) distribution. The Box-Muller method
+*> is used to transform numbers from a uniform to a normal distribution.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ COMPLEX*16 FUNCTION ZLARND( IDIST, ISEED )
*
-* This routine calls the auxiliary routine DLARAN to generate a random
-* real number from a uniform (0,1) distribution. The Box-Muller method
-* is used to transform numbers from a uniform to a normal distribution.
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
+*
+* .. Scalar Arguments ..
+ INTEGER IDIST
+* ..
+* .. Array Arguments ..
+ INTEGER ISEED( 4 )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/zlaror.f b/TESTING/MATGEN/zlaror.f
index 73f75136..34d32223 100644
--- a/TESTING/MATGEN/zlaror.f
+++ b/TESTING/MATGEN/zlaror.f
@@ -1,8 +1,170 @@
+*> \brief \b ZLAROR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAROR( SIDE, INIT, M, N, A, LDA, ISEED, X, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER INIT, SIDE
+* INTEGER INFO, LDA, M, N
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX*16 A( LDA, * ), X( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAROR pre- or post-multiplies an M by N matrix A by a random
+*> unitary matrix U, overwriting A. A may optionally be
+*> initialized to the identity matrix before multiplying by U.
+*> U is generated using the method of G.W. Stewart
+*> ( SIAM J. Numer. Anal. 17, 1980, pp. 403-409 ).
+*> (BLAS-2 version)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] SIDE
+*> \verbatim
+*> SIDE is CHARACTER*1
+*> SIDE specifies whether A is multiplied on the left or right
+*> by U.
+*> SIDE = 'L' Multiply A on the left (premultiply) by U
+*> SIDE = 'R' Multiply A on the right (postmultiply) by UC> SIDE = 'C' Multiply A on the left by U and the right by UC> SIDE = 'T' Multiply A on the left by U and the right by U'
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] INIT
+*> \verbatim
+*> INIT is CHARACTER*1
+*> INIT specifies whether or not A should be initialized to
+*> the identity matrix.
+*> INIT = 'I' Initialize A to (a section of) the
+*> identity matrix before applying U.
+*> INIT = 'N' No initialization. Apply U to the
+*> input matrix A.
+*> \endverbatim
+*> \verbatim
+*> INIT = 'I' may be used to generate square (i.e., unitary)
+*> or rectangular orthogonal matrices (orthogonality being
+*> in the sense of ZDOTC):
+*> \endverbatim
+*> \verbatim
+*> For square matrices, M=N, and SIDE many be either 'L' or
+*> 'R'; the rows will be orthogonal to each other, as will the
+*> columns.
+*> For rectangular matrices where M < N, SIDE = 'R' will
+*> produce a dense matrix whose rows will be orthogonal and
+*> whose columns will not, while SIDE = 'L' will produce a
+*> matrix whose rows will be orthogonal, and whose first M
+*> columns will be orthogonal, the remaining columns being
+*> zero.
+*> For matrices where M > N, just use the previous
+*> explanation, interchanging 'L' and 'R' and "rows" and
+*> "columns".
+*> \endverbatim
+*> \verbatim
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of A. Not modified.
+*> \endverbatim
+*> \verbatim
+*> A COMPLEX*16 array, dimension ( LDA, N )
+*> Input and output array. Overwritten by U A ( if SIDE = 'L' )
+*> or by A U ( if SIDE = 'R' )
+*> or by U A U* ( if SIDE = 'C')
+*> or by U A U' ( if SIDE = 'T') on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> Leading dimension of A. Must be at least MAX ( 1, M ).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. The array elements should be between 0 and 4095;
+*> if not they will be reduced mod 4096. Also, ISEED(4) must
+*> be odd. The random number generator uses a linear
+*> congruential sequence limited to small integers, and so
+*> should produce machine independent random numbers. The
+*> values of ISEED are changed on exit, and can be used in the
+*> next call to ZLAROR to continue the same random number
+*> sequence.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension ( 3*MAX( M, N ) )
+*> Workspace. Of length:
+*> 2*M + N if SIDE = 'L',
+*> 2*N + M if SIDE = 'R',
+*> 3*N if SIDE = 'C' or 'T'.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> An error flag. It is set to:
+*> 0 if no error.
+*> 1 if ZLARND returned a bad random number (installation
+*> problem)
+*> -1 if SIDE is not L, R, C, or T.
+*> -3 if M is negative.
+*> -4 if N is negative or if SIDE is C or T and N is not equal
+*> to M.
+*> -6 if LDA is less than M.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
SUBROUTINE ZLAROR( SIDE, INIT, M, N, A, LDA, ISEED, X, INFO )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER INIT, SIDE
@@ -13,101 +175,6 @@
COMPLEX*16 A( LDA, * ), X( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAROR pre- or post-multiplies an M by N matrix A by a random
-* unitary matrix U, overwriting A. A may optionally be
-* initialized to the identity matrix before multiplying by U.
-* U is generated using the method of G.W. Stewart
-* ( SIAM J. Numer. Anal. 17, 1980, pp. 403-409 ).
-* (BLAS-2 version)
-*
-* Arguments
-* =========
-*
-* SIDE (input) CHARACTER*1
-* SIDE specifies whether A is multiplied on the left or right
-* by U.
-* SIDE = 'L' Multiply A on the left (premultiply) by U
-* SIDE = 'R' Multiply A on the right (postmultiply) by U*
-* SIDE = 'C' Multiply A on the left by U and the right by U*
-* SIDE = 'T' Multiply A on the left by U and the right by U'
-* Not modified.
-*
-* INIT (input) CHARACTER*1
-* INIT specifies whether or not A should be initialized to
-* the identity matrix.
-* INIT = 'I' Initialize A to (a section of) the
-* identity matrix before applying U.
-* INIT = 'N' No initialization. Apply U to the
-* input matrix A.
-*
-* INIT = 'I' may be used to generate square (i.e., unitary)
-* or rectangular orthogonal matrices (orthogonality being
-* in the sense of ZDOTC):
-*
-* For square matrices, M=N, and SIDE many be either 'L' or
-* 'R'; the rows will be orthogonal to each other, as will the
-* columns.
-* For rectangular matrices where M < N, SIDE = 'R' will
-* produce a dense matrix whose rows will be orthogonal and
-* whose columns will not, while SIDE = 'L' will produce a
-* matrix whose rows will be orthogonal, and whose first M
-* columns will be orthogonal, the remaining columns being
-* zero.
-* For matrices where M > N, just use the previous
-* explanation, interchanging 'L' and 'R' and "rows" and
-* "columns".
-*
-* Not modified.
-*
-* M (input) INTEGER
-* Number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of A. Not modified.
-*
-* A COMPLEX*16 array, dimension ( LDA, N )
-* Input and output array. Overwritten by U A ( if SIDE = 'L' )
-* or by A U ( if SIDE = 'R' )
-* or by U A U* ( if SIDE = 'C')
-* or by U A U' ( if SIDE = 'T') on exit.
-*
-* LDA (input) INTEGER
-* Leading dimension of A. Must be at least MAX ( 1, M ).
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. The array elements should be between 0 and 4095;
-* if not they will be reduced mod 4096. Also, ISEED(4) must
-* be odd. The random number generator uses a linear
-* congruential sequence limited to small integers, and so
-* should produce machine independent random numbers. The
-* values of ISEED are changed on exit, and can be used in the
-* next call to ZLAROR to continue the same random number
-* sequence.
-* Modified.
-*
-* X (workspace) COMPLEX*16 array, dimension ( 3*MAX( M, N ) )
-* Workspace. Of length:
-* 2*M + N if SIDE = 'L',
-* 2*N + M if SIDE = 'R',
-* 3*N if SIDE = 'C' or 'T'.
-* Modified.
-*
-* INFO (output) INTEGER
-* An error flag. It is set to:
-* 0 if no error.
-* 1 if ZLARND returned a bad random number (installation
-* problem)
-* -1 if SIDE is not L, R, C, or T.
-* -3 if M is negative.
-* -4 if N is negative or if SIDE is C or T and N is not equal
-* to M.
-* -6 if LDA is less than M.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/zlarot.f b/TESTING/MATGEN/zlarot.f
index 106a4d9f..68c986de 100644
--- a/TESTING/MATGEN/zlarot.f
+++ b/TESTING/MATGEN/zlarot.f
@@ -1,9 +1,248 @@
+*> \brief \b ZLAROT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
+* XRIGHT )
+*
+* .. Scalar Arguments ..
+* LOGICAL LLEFT, LRIGHT, LROWS
+* INTEGER LDA, NL
+* COMPLEX*16 C, S, XLEFT, XRIGHT
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLAROT applies a (Givens) rotation to two adjacent rows or
+*> columns, where one element of the first and/or last column/row
+*> for use on matrices stored in some format other than GE, so
+*> that elements of the matrix may be used or modified for which
+*> no array element is provided.
+*>
+*> One example is a symmetric matrix in SB format (bandwidth=4), for
+*> which UPLO='L': Two adjacent rows will have the format:
+*>
+*> row j: C> C> C> C> C> . . . .
+*> row j+1: C> C> C> C> C> . . . .
+*>
+*> '*' indicates elements for which storage is provided,
+*> '.' indicates elements for which no storage is provided, but
+*> are not necessarily zero; their values are determined by
+*> symmetry. ' ' indicates elements which are necessarily zero,
+*> and have no storage provided.
+*>
+*> Those columns which have two '*'s can be handled by DROT.
+*> Those columns which have no '*'s can be ignored, since as long
+*> as the Givens rotations are carefully applied to preserve
+*> symmetry, their values are determined.
+*> Those columns which have one '*' have to be handled separately,
+*> by using separate variables "p" and "q":
+*>
+*> row j: C> C> C> C> C> p . . .
+*> row j+1: q C> C> C> C> C> . . . .
+*>
+*> The element p would have to be set correctly, then that column
+*> is rotated, setting p to its new value. The next call to
+*> ZLAROT would rotate columns j and j+1, using p, and restore
+*> symmetry. The element q would start out being zero, and be
+*> made non-zero by the rotation. Later, rotations would presumably
+*> be chosen to zero q out.
+*>
+*> Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
+*> ------- ------- ---------
+*>
+*> General dense matrix:
+*>
+*> CALL ZLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
+*> A(i,1),LDA, DUMMY, DUMMY)
+*>
+*> General banded matrix in GB format:
+*>
+*> j = MAX(1, i-KL )
+*> NL = MIN( N, i+KU+1 ) + 1-j
+*> CALL ZLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
+*> A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
+*>
+*> [ note that i+1-j is just MIN(i,KL+1) ]
+*>
+*> Symmetric banded matrix in SY format, bandwidth K,
+*> lower triangle only:
+*>
+*> j = MAX(1, i-K )
+*> NL = MIN( K+1, i ) + 1
+*> CALL ZLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
+*> A(i,j), LDA, XLEFT, XRIGHT )
+*>
+*> Same, but upper triangle only:
+*>
+*> NL = MIN( K+1, N-i ) + 1
+*> CALL ZLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
+*> A(i,i), LDA, XLEFT, XRIGHT )
+*>
+*> Symmetric banded matrix in SB format, bandwidth K,
+*> lower triangle only:
+*>
+*> [ same as for SY, except:]
+*> . . . .
+*> A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
+*>
+*> [ note that i+1-j is just MIN(i,K+1) ]
+*>
+*> Same, but upper triangle only:
+*> . . .
+*> A(K+1,i), LDA-1, XLEFT, XRIGHT )
+*>
+*> Rotating columns is just the transpose of rotating rows, except
+*> for GB and SB: (rotating columns i and i+1)
+*>
+*> GB:
+*> j = MAX(1, i-KU )
+*> NL = MIN( N, i+KL+1 ) + 1-j
+*> CALL ZLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
+*> A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
+*>
+*> [note that KU+j+1-i is just MAX(1,KU+2-i)]
+*>
+*> SB: (upper triangle)
+*>
+*> . . . . . .
+*> A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
+*>
+*> SB: (lower triangle)
+*>
+*> . . . . . .
+*> A(1,i),LDA-1, XTOP, XBOTTM )
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \verbatim
+*> LROWS - LOGICAL
+*> If .TRUE., then ZLAROT will rotate two rows. If .FALSE.,
+*> then it will rotate two columns.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LLEFT - LOGICAL
+*> If .TRUE., then XLEFT will be used instead of the
+*> corresponding element of A for the first element in the
+*> second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
+*> If .FALSE., then the corresponding element of A will be
+*> used.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> LRIGHT - LOGICAL
+*> If .TRUE., then XRIGHT will be used instead of the
+*> corresponding element of A for the last element in the
+*> first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
+*> .FALSE., then the corresponding element of A will be used.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> NL - INTEGER
+*> The length of the rows (if LROWS=.TRUE.) or columns (if
+*> LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
+*> used, the columns/rows they are in should be included in
+*> NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
+*> least 2. The number of rows/columns to be rotated
+*> exclusive of those involving XLEFT and/or XRIGHT may
+*> not be negative, i.e., NL minus how many of LLEFT and
+*> LRIGHT are .TRUE. must be at least zero; if not, XERBLA
+*> will be called.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> C, S - COMPLEX*16
+*> Specify the Givens rotation to be applied. If LROWS is
+*> true, then the matrix ( c s )
+*> ( _ _ )
+*> (-s c ) is applied from the left;
+*> if false, then the transpose (not conjugated) thereof is
+*> applied from the right. Note that in contrast to the
+*> output of ZROTG or to most versions of ZROT, both C and S
+*> are complex. For a Givens rotation, |C|**2 + |S|**2 should
+*> be 1, but this is not checked.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> A - COMPLEX*16 array.
+*> The array containing the rows/columns to be rotated. The
+*> first element of A should be the upper left element to
+*> be rotated.
+*> Read and modified.
+*> \endverbatim
+*> \verbatim
+*> LDA - INTEGER
+*> The "effective" leading dimension of A. If A contains
+*> a matrix stored in GE, HE, or SY format, then this is just
+*> the leading dimension of A as dimensioned in the calling
+*> routine. If A contains a matrix stored in band (GB, HB, or
+*> SB) format, then this should be *one less* than the leading
+*> dimension used in the calling routine. Thus, if A were
+*> dimensioned A(LDA,*) in ZLAROT, then A(1,j) would be the
+*> j-th element in the first of the two rows to be rotated,
+*> and A(2,j) would be the j-th in the second, regardless of
+*> how the array may be stored in the calling routine. [A
+*> cannot, however, actually be dimensioned thus, since for
+*> band format, the row number may exceed LDA, which is not
+*> legal FORTRAN.]
+*> If LROWS=.TRUE., then LDA must be at least 1, otherwise
+*> it must be at least NL minus the number of .TRUE. values
+*> in XLEFT and XRIGHT.
+*> Not modified.
+*> \endverbatim
+*> \verbatim
+*> XLEFT - COMPLEX*16
+*> If LLEFT is .TRUE., then XLEFT will be used and modified
+*> instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
+*> (if LROWS=.FALSE.).
+*> Read and modified.
+*> \endverbatim
+*> \verbatim
+*> XRIGHT - COMPLEX*16
+*> If LRIGHT is .TRUE., then XRIGHT will be used and modified
+*> instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
+*> (if LROWS=.FALSE.).
+*> Read and modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
SUBROUTINE ZLAROT( LROWS, LLEFT, LRIGHT, NL, C, S, A, LDA, XLEFT,
$ XRIGHT )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
LOGICAL LLEFT, LRIGHT, LROWS
@@ -14,193 +253,6 @@
COMPLEX*16 A( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLAROT applies a (Givens) rotation to two adjacent rows or
-* columns, where one element of the first and/or last column/row
-* for use on matrices stored in some format other than GE, so
-* that elements of the matrix may be used or modified for which
-* no array element is provided.
-*
-* One example is a symmetric matrix in SB format (bandwidth=4), for
-* which UPLO='L': Two adjacent rows will have the format:
-*
-* row j: * * * * * . . . .
-* row j+1: * * * * * . . . .
-*
-* '*' indicates elements for which storage is provided,
-* '.' indicates elements for which no storage is provided, but
-* are not necessarily zero; their values are determined by
-* symmetry. ' ' indicates elements which are necessarily zero,
-* and have no storage provided.
-*
-* Those columns which have two '*'s can be handled by DROT.
-* Those columns which have no '*'s can be ignored, since as long
-* as the Givens rotations are carefully applied to preserve
-* symmetry, their values are determined.
-* Those columns which have one '*' have to be handled separately,
-* by using separate variables "p" and "q":
-*
-* row j: * * * * * p . . .
-* row j+1: q * * * * * . . . .
-*
-* The element p would have to be set correctly, then that column
-* is rotated, setting p to its new value. The next call to
-* ZLAROT would rotate columns j and j+1, using p, and restore
-* symmetry. The element q would start out being zero, and be
-* made non-zero by the rotation. Later, rotations would presumably
-* be chosen to zero q out.
-*
-* Typical Calling Sequences: rotating the i-th and (i+1)-st rows.
-* ------- ------- ---------
-*
-* General dense matrix:
-*
-* CALL ZLAROT(.TRUE.,.FALSE.,.FALSE., N, C,S,
-* A(i,1),LDA, DUMMY, DUMMY)
-*
-* General banded matrix in GB format:
-*
-* j = MAX(1, i-KL )
-* NL = MIN( N, i+KU+1 ) + 1-j
-* CALL ZLAROT( .TRUE., i-KL.GE.1, i+KU.LT.N, NL, C,S,
-* A(KU+i+1-j,j),LDA-1, XLEFT, XRIGHT )
-*
-* [ note that i+1-j is just MIN(i,KL+1) ]
-*
-* Symmetric banded matrix in SY format, bandwidth K,
-* lower triangle only:
-*
-* j = MAX(1, i-K )
-* NL = MIN( K+1, i ) + 1
-* CALL ZLAROT( .TRUE., i-K.GE.1, .TRUE., NL, C,S,
-* A(i,j), LDA, XLEFT, XRIGHT )
-*
-* Same, but upper triangle only:
-*
-* NL = MIN( K+1, N-i ) + 1
-* CALL ZLAROT( .TRUE., .TRUE., i+K.LT.N, NL, C,S,
-* A(i,i), LDA, XLEFT, XRIGHT )
-*
-* Symmetric banded matrix in SB format, bandwidth K,
-* lower triangle only:
-*
-* [ same as for SY, except:]
-* . . . .
-* A(i+1-j,j), LDA-1, XLEFT, XRIGHT )
-*
-* [ note that i+1-j is just MIN(i,K+1) ]
-*
-* Same, but upper triangle only:
-* . . .
-* A(K+1,i), LDA-1, XLEFT, XRIGHT )
-*
-* Rotating columns is just the transpose of rotating rows, except
-* for GB and SB: (rotating columns i and i+1)
-*
-* GB:
-* j = MAX(1, i-KU )
-* NL = MIN( N, i+KL+1 ) + 1-j
-* CALL ZLAROT( .TRUE., i-KU.GE.1, i+KL.LT.N, NL, C,S,
-* A(KU+j+1-i,i),LDA-1, XTOP, XBOTTM )
-*
-* [note that KU+j+1-i is just MAX(1,KU+2-i)]
-*
-* SB: (upper triangle)
-*
-* . . . . . .
-* A(K+j+1-i,i),LDA-1, XTOP, XBOTTM )
-*
-* SB: (lower triangle)
-*
-* . . . . . .
-* A(1,i),LDA-1, XTOP, XBOTTM )
-*
-* Arguments
-* =========
-*
-* LROWS - LOGICAL
-* If .TRUE., then ZLAROT will rotate two rows. If .FALSE.,
-* then it will rotate two columns.
-* Not modified.
-*
-* LLEFT - LOGICAL
-* If .TRUE., then XLEFT will be used instead of the
-* corresponding element of A for the first element in the
-* second row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.)
-* If .FALSE., then the corresponding element of A will be
-* used.
-* Not modified.
-*
-* LRIGHT - LOGICAL
-* If .TRUE., then XRIGHT will be used instead of the
-* corresponding element of A for the last element in the
-* first row (if LROWS=.FALSE.) or column (if LROWS=.TRUE.) If
-* .FALSE., then the corresponding element of A will be used.
-* Not modified.
-*
-* NL - INTEGER
-* The length of the rows (if LROWS=.TRUE.) or columns (if
-* LROWS=.FALSE.) to be rotated. If XLEFT and/or XRIGHT are
-* used, the columns/rows they are in should be included in
-* NL, e.g., if LLEFT = LRIGHT = .TRUE., then NL must be at
-* least 2. The number of rows/columns to be rotated
-* exclusive of those involving XLEFT and/or XRIGHT may
-* not be negative, i.e., NL minus how many of LLEFT and
-* LRIGHT are .TRUE. must be at least zero; if not, XERBLA
-* will be called.
-* Not modified.
-*
-* C, S - COMPLEX*16
-* Specify the Givens rotation to be applied. If LROWS is
-* true, then the matrix ( c s )
-* ( _ _ )
-* (-s c ) is applied from the left;
-* if false, then the transpose (not conjugated) thereof is
-* applied from the right. Note that in contrast to the
-* output of ZROTG or to most versions of ZROT, both C and S
-* are complex. For a Givens rotation, |C|**2 + |S|**2 should
-* be 1, but this is not checked.
-* Not modified.
-*
-* A - COMPLEX*16 array.
-* The array containing the rows/columns to be rotated. The
-* first element of A should be the upper left element to
-* be rotated.
-* Read and modified.
-*
-* LDA - INTEGER
-* The "effective" leading dimension of A. If A contains
-* a matrix stored in GE, HE, or SY format, then this is just
-* the leading dimension of A as dimensioned in the calling
-* routine. If A contains a matrix stored in band (GB, HB, or
-* SB) format, then this should be *one less* than the leading
-* dimension used in the calling routine. Thus, if A were
-* dimensioned A(LDA,*) in ZLAROT, then A(1,j) would be the
-* j-th element in the first of the two rows to be rotated,
-* and A(2,j) would be the j-th in the second, regardless of
-* how the array may be stored in the calling routine. [A
-* cannot, however, actually be dimensioned thus, since for
-* band format, the row number may exceed LDA, which is not
-* legal FORTRAN.]
-* If LROWS=.TRUE., then LDA must be at least 1, otherwise
-* it must be at least NL minus the number of .TRUE. values
-* in XLEFT and XRIGHT.
-* Not modified.
-*
-* XLEFT - COMPLEX*16
-* If LLEFT is .TRUE., then XLEFT will be used and modified
-* instead of A(2,1) (if LROWS=.TRUE.) or A(1,2)
-* (if LROWS=.FALSE.).
-* Read and modified.
-*
-* XRIGHT - COMPLEX*16
-* If LRIGHT is .TRUE., then XRIGHT will be used and modified
-* instead of A(1,NL) (if LROWS=.TRUE.) or A(NL,1)
-* (if LROWS=.FALSE.).
-* Read and modified.
-*
* =====================================================================
*
* .. Local Scalars ..
diff --git a/TESTING/MATGEN/zlatm1.f b/TESTING/MATGEN/zlatm1.f
index aa0133a1..8e6829bf 100644
--- a/TESTING/MATGEN/zlatm1.f
+++ b/TESTING/MATGEN/zlatm1.f
@@ -1,8 +1,148 @@
+*> \brief \b ZLATM1
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATM1( MODE, COND, IRSIGN, IDIST, ISEED, D, N, INFO )
+*
+* .. Scalar Arguments ..
+* INTEGER IDIST, INFO, IRSIGN, MODE, N
+* DOUBLE PRECISION COND
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* COMPLEX*16 D( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATM1 computes the entries of D(1..N) as specified by
+*> MODE, COND and IRSIGN. IDIST and ISEED determine the generation
+*> of random numbers. ZLATM1 is called by CLATMR to generate
+*> random test matrices for LAPACK programs.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry describes how D is to be computed:
+*> MODE = 0 means do not change D.
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IRSIGN
+*> \verbatim
+*> IRSIGN is INTEGER
+*> On entry, if MODE neither -6, 0 nor 6, determines sign of
+*> entries of D
+*> 0 => leave entries of D unchanged
+*> 1 => multiply each entry of D by random complex number
+*> uniformly distributed with absolute value 1
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is CHARACTER*1
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => real and imaginary parts each UNIFORM( 0, 1 )
+*> 2 => real and imaginary parts each UNIFORM( -1, 1 )
+*> 3 => real and imaginary parts each NORMAL( 0, 1 )
+*> 4 => complex number uniform in DISK( 0, 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. The random number generator uses a
+*> linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to ZLATM1
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension ( MIN( M , N ) )
+*> Array to be computed according to MODE, COND and IRSIGN.
+*> May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of entries of D. Not modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> 0 => normal termination
+*> -1 => if MODE not in range -6 to 6
+*> -2 => if MODE neither -6, 0 nor 6, and
+*> IRSIGN neither 0 nor 1
+*> -3 => if MODE neither -6, 0 nor 6 and COND less than 1
+*> -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 4
+*> -7 => if N negative
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
SUBROUTINE ZLATM1( MODE, COND, IRSIGN, IDIST, ISEED, D, N, INFO )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
INTEGER IDIST, INFO, IRSIGN, MODE, N
@@ -13,81 +153,6 @@
COMPLEX*16 D( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATM1 computes the entries of D(1..N) as specified by
-* MODE, COND and IRSIGN. IDIST and ISEED determine the generation
-* of random numbers. ZLATM1 is called by CLATMR to generate
-* random test matrices for LAPACK programs.
-*
-* Arguments
-* =========
-*
-* MODE (input) INTEGER
-* On entry describes how D is to be computed:
-* MODE = 0 means do not change D.
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* IRSIGN (input) INTEGER
-* On entry, if MODE neither -6, 0 nor 6, determines sign of
-* entries of D
-* 0 => leave entries of D unchanged
-* 1 => multiply each entry of D by random complex number
-* uniformly distributed with absolute value 1
-*
-* IDIST (input) CHARACTER*1
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => real and imaginary parts each UNIFORM( 0, 1 )
-* 2 => real and imaginary parts each UNIFORM( -1, 1 )
-* 3 => real and imaginary parts each NORMAL( 0, 1 )
-* 4 => complex number uniform in DISK( 0, 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. The random number generator uses a
-* linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to ZLATM1
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D (input/output) COMPLEX*16 array, dimension ( MIN( M , N ) )
-* Array to be computed according to MODE, COND and IRSIGN.
-* May be changed on exit if MODE is nonzero.
-*
-* N (input) INTEGER
-* Number of entries of D. Not modified.
-*
-* INFO (output) INTEGER
-* 0 => normal termination
-* -1 => if MODE not in range -6 to 6
-* -2 => if MODE neither -6, 0 nor 6, and
-* IRSIGN neither 0 nor 1
-* -3 => if MODE neither -6, 0 nor 6 and COND less than 1
-* -4 => if MODE equals 6 or -6 and IDIST not in range 1 to 4
-* -7 => if N negative
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/zlatm2.f b/TESTING/MATGEN/zlatm2.f
index c5c2d950..76b0152d 100644
--- a/TESTING/MATGEN/zlatm2.f
+++ b/TESTING/MATGEN/zlatm2.f
@@ -1,9 +1,222 @@
+*> \brief \b ZLATM2
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* COMPLEX*16 FUNCTION ZLATM2( M, N, I, J, KL, KU, IDIST,
+* ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
+*
+* .. Scalar Arguments ..
+*
+* INTEGER I, IDIST, IGRADE, IPVTNG, J, KL, KU, M, N
+* DOUBLE PRECISION SPARSE
+* ..
+*
+* .. Array Arguments ..
+*
+* INTEGER ISEED( 4 ), IWORK( * )
+* COMPLEX*16 D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATM2 returns the (I,J) entry of a random matrix of dimension
+*> (M, N) described by the other paramters. It is called by the
+*> ZLATMR routine in order to build random test matrices. No error
+*> checking on parameters is done, because this routine is called in
+*> a tight loop by ZLATMR which has already checked the parameters.
+*>
+*> Use of ZLATM2 differs from CLATM3 in the order in which the random
+*> number generator is called to fill in random matrix entries.
+*> With ZLATM2, the generator is called to fill in the pivoted matrix
+*> columnwise. With ZLATM3, the generator is called to fill in the
+*> matrix columnwise, after which it is pivoted. Thus, ZLATM3 can
+*> be used to construct random matrices which differ only in their
+*> order of rows and/or columns. ZLATM2 is used to construct band
+*> matrices while avoiding calling the random number generator for
+*> entries outside the band (and therefore generating random numbers
+*>
+*> The matrix whose (I,J) entry is returned is constructed as
+*> follows (this routine only computes one entry):
+*>
+*> If I is outside (1..M) or J is outside (1..N), return zero
+*> (this is convenient for generating matrices in band format).
+*>
+*> Generate a matrix A with random entries of distribution IDIST.
+*>
+*> Set the diagonal to D.
+*>
+*> Grade the matrix, if desired, from the left (by DL) and/or
+*> from the right (by DR or DL) as specified by IGRADE.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> IPVTNG and IWORK.
+*>
+*> Band the matrix to have lower bandwidth KL and upper
+*> bandwidth KU.
+*>
+*> Set random entries to zero as specified by SPARSE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> Row of entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Column of entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Lower bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Upper bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => real and imaginary parts each UNIFORM( 0, 1 )
+*> 2 => real and imaginary parts each UNIFORM( -1, 1 )
+*> 3 => real and imaginary parts each NORMAL( 0, 1 )
+*> 4 => complex number uniform in DISK( 0 , 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array of dimension ( 4 )
+*> Seed for random number generator.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array of dimension ( MIN( I , J ) )
+*> Diagonal entries of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IGRADE
+*> \verbatim
+*> IGRADE is INTEGER
+*> Specifies grading of matrix as follows:
+*> 0 => no grading
+*> 1 => matrix premultiplied by diag( DL )
+*> 2 => matrix postmultiplied by diag( DR )
+*> 3 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> 4 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> 5 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( CONJG(DL) )
+*> 6 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array ( I or J, as appropriate )
+*> Left scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DR
+*> \verbatim
+*> DR is COMPLEX*16 array ( I or J, as appropriate )
+*> Right scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IPVTNG
+*> \verbatim
+*> IPVTNG is INTEGER
+*> On entry specifies pivoting permutations as follows:
+*> 0 => none.
+*> 1 => row pivoting.
+*> 2 => column pivoting.
+*> 3 => full pivoting, i.e., on both sides.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array ( I or J, as appropriate )
+*> This array specifies the permutation used. The
+*> row (or column) in position K was originally in
+*> position IWORK( K ).
+*> This differs from IWORK for ZLATM3. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is DOUBLE PRECISION between 0. and 1.
+*> On entry specifies the sparsity of the matrix
+*> if sparse matix is to be generated.
+*> SPARSE should lie between 0 and 1.
+*> A uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
COMPLEX*16 FUNCTION ZLATM2( M, N, I, J, KL, KU, IDIST,
$ ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
*
@@ -17,129 +230,6 @@
COMPLEX*16 D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATM2 returns the (I,J) entry of a random matrix of dimension
-* (M, N) described by the other paramters. It is called by the
-* ZLATMR routine in order to build random test matrices. No error
-* checking on parameters is done, because this routine is called in
-* a tight loop by ZLATMR which has already checked the parameters.
-*
-* Use of ZLATM2 differs from CLATM3 in the order in which the random
-* number generator is called to fill in random matrix entries.
-* With ZLATM2, the generator is called to fill in the pivoted matrix
-* columnwise. With ZLATM3, the generator is called to fill in the
-* matrix columnwise, after which it is pivoted. Thus, ZLATM3 can
-* be used to construct random matrices which differ only in their
-* order of rows and/or columns. ZLATM2 is used to construct band
-* matrices while avoiding calling the random number generator for
-* entries outside the band (and therefore generating random numbers
-*
-* The matrix whose (I,J) entry is returned is constructed as
-* follows (this routine only computes one entry):
-*
-* If I is outside (1..M) or J is outside (1..N), return zero
-* (this is convenient for generating matrices in band format).
-*
-* Generate a matrix A with random entries of distribution IDIST.
-*
-* Set the diagonal to D.
-*
-* Grade the matrix, if desired, from the left (by DL) and/or
-* from the right (by DR or DL) as specified by IGRADE.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* IPVTNG and IWORK.
-*
-* Band the matrix to have lower bandwidth KL and upper
-* bandwidth KU.
-*
-* Set random entries to zero as specified by SPARSE.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of matrix. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of matrix. Not modified.
-*
-* I (input) INTEGER
-* Row of entry to be returned. Not modified.
-*
-* J (input) INTEGER
-* Column of entry to be returned. Not modified.
-*
-* KL (input) INTEGER
-* Lower bandwidth. Not modified.
-*
-* KU (input) INTEGER
-* Upper bandwidth. Not modified.
-*
-* IDIST (input) INTEGER
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => real and imaginary parts each UNIFORM( 0, 1 )
-* 2 => real and imaginary parts each UNIFORM( -1, 1 )
-* 3 => real and imaginary parts each NORMAL( 0, 1 )
-* 4 => complex number uniform in DISK( 0 , 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array of dimension ( 4 )
-* Seed for random number generator.
-* Changed on exit.
-*
-* D (input) COMPLEX*16 array of dimension ( MIN( I , J ) )
-* Diagonal entries of matrix. Not modified.
-*
-* IGRADE (input) INTEGER
-* Specifies grading of matrix as follows:
-* 0 => no grading
-* 1 => matrix premultiplied by diag( DL )
-* 2 => matrix postmultiplied by diag( DR )
-* 3 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* 4 => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* 5 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( CONJG(DL) )
-* 6 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* Not modified.
-*
-* DL (input) COMPLEX*16 array ( I or J, as appropriate )
-* Left scale factors for grading matrix. Not modified.
-*
-* DR (input) COMPLEX*16 array ( I or J, as appropriate )
-* Right scale factors for grading matrix. Not modified.
-*
-* IPVTNG (input) INTEGER
-* On entry specifies pivoting permutations as follows:
-* 0 => none.
-* 1 => row pivoting.
-* 2 => column pivoting.
-* 3 => full pivoting, i.e., on both sides.
-* Not modified.
-*
-* IWORK (workspace) INTEGER array ( I or J, as appropriate )
-* This array specifies the permutation used. The
-* row (or column) in position K was originally in
-* position IWORK( K ).
-* This differs from IWORK for ZLATM3. Not modified.
-*
-* SPARSE (input) DOUBLE PRECISION between 0. and 1.
-* On entry specifies the sparsity of the matrix
-* if sparse matix is to be generated.
-* SPARSE should lie between 0 and 1.
-* A uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/zlatm3.f b/TESTING/MATGEN/zlatm3.f
index e07ae49e..b3aac8ed 100644
--- a/TESTING/MATGEN/zlatm3.f
+++ b/TESTING/MATGEN/zlatm3.f
@@ -1,10 +1,240 @@
+*> \brief \b ZLATM3
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* COMPLEX*16 FUNCTION ZLATM3( M, N, I, J, ISUB, JSUB, KL, KU,
+* IDIST, ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK,
+* SPARSE )
+*
+* .. Scalar Arguments ..
+*
+* INTEGER I, IDIST, IGRADE, IPVTNG, ISUB, J, JSUB, KL,
+* $ KU, M, N
+* DOUBLE PRECISION SPARSE
+* ..
+*
+* .. Array Arguments ..
+*
+* INTEGER ISEED( 4 ), IWORK( * )
+* COMPLEX*16 D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATM3 returns the (ISUB,JSUB) entry of a random matrix of
+*> dimension (M, N) described by the other paramters. (ISUB,JSUB)
+*> is the final position of the (I,J) entry after pivoting
+*> according to IPVTNG and IWORK. ZLATM3 is called by the
+*> ZLATMR routine in order to build random test matrices. No error
+*> checking on parameters is done, because this routine is called in
+*> a tight loop by ZLATMR which has already checked the parameters.
+*>
+*> Use of ZLATM3 differs from CLATM2 in the order in which the random
+*> number generator is called to fill in random matrix entries.
+*> With ZLATM2, the generator is called to fill in the pivoted matrix
+*> columnwise. With ZLATM3, the generator is called to fill in the
+*> matrix columnwise, after which it is pivoted. Thus, ZLATM3 can
+*> be used to construct random matrices which differ only in their
+*> order of rows and/or columns. ZLATM2 is used to construct band
+*> matrices while avoiding calling the random number generator for
+*> entries outside the band (and therefore generating random numbers
+*> in different orders for different pivot orders).
+*>
+*> The matrix whose (ISUB,JSUB) entry is returned is constructed as
+*> follows (this routine only computes one entry):
+*>
+*> If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
+*> (this is convenient for generating matrices in band format).
+*>
+*> Generate a matrix A with random entries of distribution IDIST.
+*>
+*> Set the diagonal to D.
+*>
+*> Grade the matrix, if desired, from the left (by DL) and/or
+*> from the right (by DR or DL) as specified by IGRADE.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> IPVTNG and IWORK.
+*>
+*> Band the matrix to have lower bandwidth KL and upper
+*> bandwidth KU.
+*>
+*> Set random entries to zero as specified by SPARSE.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] I
+*> \verbatim
+*> I is INTEGER
+*> Row of unpivoted entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in] J
+*> \verbatim
+*> J is INTEGER
+*> Column of unpivoted entry to be returned. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISUB
+*> \verbatim
+*> ISUB is INTEGER
+*> Row of pivoted entry to be returned. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] JSUB
+*> \verbatim
+*> JSUB is INTEGER
+*> Column of pivoted entry to be returned. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> Lower bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> Upper bandwidth. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IDIST
+*> \verbatim
+*> IDIST is INTEGER
+*> On entry, IDIST specifies the type of distribution to be
+*> used to generate a random matrix .
+*> 1 => real and imaginary parts each UNIFORM( 0, 1 )
+*> 2 => real and imaginary parts each UNIFORM( -1, 1 )
+*> 3 => real and imaginary parts each NORMAL( 0, 1 )
+*> 4 => complex number uniform in DISK( 0 , 1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array of dimension ( 4 )
+*> Seed for random number generator.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*> D is COMPLEX*16 array of dimension ( MIN( I , J ) )
+*> Diagonal entries of matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IGRADE
+*> \verbatim
+*> IGRADE is INTEGER
+*> Specifies grading of matrix as follows:
+*> 0 => no grading
+*> 1 => matrix premultiplied by diag( DL )
+*> 2 => matrix postmultiplied by diag( DR )
+*> 3 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> 4 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> 5 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( CONJG(DL) )
+*> 6 => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DL
+*> \verbatim
+*> DL is COMPLEX*16 array ( I or J, as appropriate )
+*> Left scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DR
+*> \verbatim
+*> DR is COMPLEX*16 array ( I or J, as appropriate )
+*> Right scale factors for grading matrix. Not modified.
+*> \endverbatim
+*>
+*> \param[in] IPVTNG
+*> \verbatim
+*> IPVTNG is INTEGER
+*> On entry specifies pivoting permutations as follows:
+*> 0 => none.
+*> 1 => row pivoting.
+*> 2 => column pivoting.
+*> 3 => full pivoting, i.e., on both sides.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] IWORK
+*> \verbatim
+*> IWORK is INTEGER array ( I or J, as appropriate )
+*> This array specifies the permutation used. The
+*> row (or column) originally in position K is in
+*> position IWORK( K ) after pivoting.
+*> This differs from IWORK for ZLATM2. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is DOUBLE PRECISION between 0. and 1.
+*> On entry specifies the sparsity of the matrix
+*> if sparse matix is to be generated.
+*> SPARSE should lie between 0 and 1.
+*> A uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
COMPLEX*16 FUNCTION ZLATM3( M, N, I, J, ISUB, JSUB, KL, KU,
$ IDIST, ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK,
$ SPARSE )
*
-* -- LAPACK auxiliary test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK auxiliary routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
*
@@ -19,138 +249,6 @@
COMPLEX*16 D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATM3 returns the (ISUB,JSUB) entry of a random matrix of
-* dimension (M, N) described by the other paramters. (ISUB,JSUB)
-* is the final position of the (I,J) entry after pivoting
-* according to IPVTNG and IWORK. ZLATM3 is called by the
-* ZLATMR routine in order to build random test matrices. No error
-* checking on parameters is done, because this routine is called in
-* a tight loop by ZLATMR which has already checked the parameters.
-*
-* Use of ZLATM3 differs from CLATM2 in the order in which the random
-* number generator is called to fill in random matrix entries.
-* With ZLATM2, the generator is called to fill in the pivoted matrix
-* columnwise. With ZLATM3, the generator is called to fill in the
-* matrix columnwise, after which it is pivoted. Thus, ZLATM3 can
-* be used to construct random matrices which differ only in their
-* order of rows and/or columns. ZLATM2 is used to construct band
-* matrices while avoiding calling the random number generator for
-* entries outside the band (and therefore generating random numbers
-* in different orders for different pivot orders).
-*
-* The matrix whose (ISUB,JSUB) entry is returned is constructed as
-* follows (this routine only computes one entry):
-*
-* If ISUB is outside (1..M) or JSUB is outside (1..N), return zero
-* (this is convenient for generating matrices in band format).
-*
-* Generate a matrix A with random entries of distribution IDIST.
-*
-* Set the diagonal to D.
-*
-* Grade the matrix, if desired, from the left (by DL) and/or
-* from the right (by DR or DL) as specified by IGRADE.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* IPVTNG and IWORK.
-*
-* Band the matrix to have lower bandwidth KL and upper
-* bandwidth KU.
-*
-* Set random entries to zero as specified by SPARSE.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of matrix. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of matrix. Not modified.
-*
-* I (input) INTEGER
-* Row of unpivoted entry to be returned. Not modified.
-*
-* J (input) INTEGER
-* Column of unpivoted entry to be returned. Not modified.
-*
-* ISUB (input/output) INTEGER
-* Row of pivoted entry to be returned. Changed on exit.
-*
-* JSUB (input/output) INTEGER
-* Column of pivoted entry to be returned. Changed on exit.
-*
-* KL (input) INTEGER
-* Lower bandwidth. Not modified.
-*
-* KU (input) INTEGER
-* Upper bandwidth. Not modified.
-*
-* IDIST (input) INTEGER
-* On entry, IDIST specifies the type of distribution to be
-* used to generate a random matrix .
-* 1 => real and imaginary parts each UNIFORM( 0, 1 )
-* 2 => real and imaginary parts each UNIFORM( -1, 1 )
-* 3 => real and imaginary parts each NORMAL( 0, 1 )
-* 4 => complex number uniform in DISK( 0 , 1 )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array of dimension ( 4 )
-* Seed for random number generator.
-* Changed on exit.
-*
-* D (input) COMPLEX*16 array of dimension ( MIN( I , J ) )
-* Diagonal entries of matrix. Not modified.
-*
-* IGRADE (input) INTEGER
-* Specifies grading of matrix as follows:
-* 0 => no grading
-* 1 => matrix premultiplied by diag( DL )
-* 2 => matrix postmultiplied by diag( DR )
-* 3 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* 4 => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* 5 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( CONJG(DL) )
-* 6 => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* Not modified.
-*
-* DL (input) COMPLEX*16 array ( I or J, as appropriate )
-* Left scale factors for grading matrix. Not modified.
-*
-* DR (input) COMPLEX*16 array ( I or J, as appropriate )
-* Right scale factors for grading matrix. Not modified.
-*
-* IPVTNG (input) INTEGER
-* On entry specifies pivoting permutations as follows:
-* 0 => none.
-* 1 => row pivoting.
-* 2 => column pivoting.
-* 3 => full pivoting, i.e., on both sides.
-* Not modified.
-*
-* IWORK (input) INTEGER array ( I or J, as appropriate )
-* This array specifies the permutation used. The
-* row (or column) originally in position K is in
-* position IWORK( K ) after pivoting.
-* This differs from IWORK for ZLATM2. Not modified.
-*
-* SPARSE (input) DOUBLE PRECISION between 0. and 1.
-* On entry specifies the sparsity of the matrix
-* if sparse matix is to be generated.
-* SPARSE should lie between 0 and 1.
-* A uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/zlatm5.f b/TESTING/MATGEN/zlatm5.f
index a1c0a6ca..6e3ce53d 100644
--- a/TESTING/MATGEN/zlatm5.f
+++ b/TESTING/MATGEN/zlatm5.f
@@ -1,177 +1,292 @@
- SUBROUTINE ZLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
- $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
- $ QBLCKB )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
- $ PRTYPE, QBLCKA, QBLCKB
- DOUBLE PRECISION ALPHA
-* ..
-* .. Array Arguments ..
- COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ),
- $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
- $ L( LDL, * ), R( LDR, * )
-* ..
-*
+*> \brief \b ZLATM5
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
+* E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
+* QBLCKB )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
+* $ PRTYPE, QBLCKA, QBLCKB
+* DOUBLE PRECISION ALPHA
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ),
+* $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+* $ L( LDL, * ), R( LDR, * )
+* ..
+*
* Purpose
* =======
*
-* ZLATM5 generates matrices involved in the Generalized Sylvester
-* equation:
-*
-* A * R - L * B = C
-* D * R - L * E = F
-*
-* They also satisfy (the diagonalization condition)
-*
-* [ I -L ] ( [ A -C ], [ D -F ] ) [ I R ] = ( [ A ], [ D ] )
-* [ I ] ( [ B ] [ E ] ) [ I ] ( [ B ] [ E ] )
-*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATM5 generates matrices involved in the Generalized Sylvester
+*> equation:
+*>
+*> A * R - L * B = C
+*> D * R - L * E = F
+*>
+*> They also satisfy (the diagonalization condition)
+*>
+*> [ I -L ] ( [ A -C ], [ D -F ] ) [ I R ] = ( [ A ], [ D ] )
+*> [ I ] ( [ B ] [ E ] ) [ I ] ( [ B ] [ E ] )
+*>
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* PRTYPE (input) INTEGER
-* "Points" to a certian type of the matrices to generate
-* (see futher details).
-*
-* M (input) INTEGER
-* Specifies the order of A and D and the number of rows in
-* C, F, R and L.
-*
-* N (input) INTEGER
-* Specifies the order of B and E and the number of columns in
-* C, F, R and L.
-*
-* A (output) COMPLEX*16 array, dimension (LDA, M).
-* On exit A M-by-M is initialized according to PRTYPE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A.
-*
-* B (output) COMPLEX*16 array, dimension (LDB, N).
-* On exit B N-by-N is initialized according to PRTYPE.
-*
-* LDB (input) INTEGER
-* The leading dimension of B.
-*
-* C (output) COMPLEX*16 array, dimension (LDC, N).
-* On exit C M-by-N is initialized according to PRTYPE.
-*
-* LDC (input) INTEGER
-* The leading dimension of C.
-*
-* D (output) COMPLEX*16 array, dimension (LDD, M).
-* On exit D M-by-M is initialized according to PRTYPE.
-*
-* LDD (input) INTEGER
-* The leading dimension of D.
-*
-* E (output) COMPLEX*16 array, dimension (LDE, N).
-* On exit E N-by-N is initialized according to PRTYPE.
-*
-* LDE (input) INTEGER
-* The leading dimension of E.
-*
-* F (output) COMPLEX*16 array, dimension (LDF, N).
-* On exit F M-by-N is initialized according to PRTYPE.
-*
-* LDF (input) INTEGER
-* The leading dimension of F.
-*
-* R (output) COMPLEX*16 array, dimension (LDR, N).
-* On exit R M-by-N is initialized according to PRTYPE.
-*
-* LDR (input) INTEGER
-* The leading dimension of R.
-*
-* L (output) COMPLEX*16 array, dimension (LDL, N).
-* On exit L M-by-N is initialized according to PRTYPE.
-*
-* LDL (input) INTEGER
-* The leading dimension of L.
+*> \param[in] PRTYPE
+*> \verbatim
+*> PRTYPE is INTEGER
+*> "Points" to a certian type of the matrices to generate
+*> (see futher details).
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Specifies the order of A and D and the number of rows in
+*> C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Specifies the order of B and E and the number of columns in
+*> C, F, R and L.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, M).
+*> On exit A M-by-M is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDB, N).
+*> On exit B N-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*> LDB is INTEGER
+*> The leading dimension of B.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*> C is COMPLEX*16 array, dimension (LDC, N).
+*> On exit C M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*> LDC is INTEGER
+*> The leading dimension of C.
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (LDD, M).
+*> On exit D M-by-M is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*> LDD is INTEGER
+*> The leading dimension of D.
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*> E is COMPLEX*16 array, dimension (LDE, N).
+*> On exit E N-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*> LDE is INTEGER
+*> The leading dimension of E.
+*> \endverbatim
+*>
+*> \param[out] F
+*> \verbatim
+*> F is COMPLEX*16 array, dimension (LDF, N).
+*> On exit F M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*> LDF is INTEGER
+*> The leading dimension of F.
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*> R is COMPLEX*16 array, dimension (LDR, N).
+*> On exit R M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDR
+*> \verbatim
+*> LDR is INTEGER
+*> The leading dimension of R.
+*> \endverbatim
+*>
+*> \param[out] L
+*> \verbatim
+*> L is COMPLEX*16 array, dimension (LDL, N).
+*> On exit L M-by-N is initialized according to PRTYPE.
+*> \endverbatim
+*>
+*> \param[in] LDL
+*> \verbatim
+*> LDL is INTEGER
+*> The leading dimension of L.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is DOUBLE PRECISION
+*> Parameter used in generating PRTYPE = 1 and 5 matrices.
+*> \endverbatim
+*>
+*> \param[in] QBLCKA
+*> \verbatim
+*> QBLCKA is INTEGER
+*> When PRTYPE = 3, specifies the distance between 2-by-2
+*> blocks on the diagonal in A. Otherwise, QBLCKA is not
+*> referenced. QBLCKA > 1.
+*> \endverbatim
+*>
+*> \param[in] QBLCKB
+*> \verbatim
+*> QBLCKB is INTEGER
+*> When PRTYPE = 3, specifies the distance between 2-by-2
+*> blocks on the diagonal in B. Otherwise, QBLCKB is not
+*> referenced. QBLCKB > 1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* ALPHA (input) DOUBLE PRECISION
-* Parameter used in generating PRTYPE = 1 and 5 matrices.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* QBLCKA (input) INTEGER
-* When PRTYPE = 3, specifies the distance between 2-by-2
-* blocks on the diagonal in A. Otherwise, QBLCKA is not
-* referenced. QBLCKA > 1.
+*> \date November 2011
*
-* QBLCKB (input) INTEGER
-* When PRTYPE = 3, specifies the distance between 2-by-2
-* blocks on the diagonal in B. Otherwise, QBLCKB is not
-* referenced. QBLCKB > 1.
+*> \ingroup complex16_matgen
*
*
* Further Details
* ===============
+*>\details \b Further \b Details
+*> \verbatim
+*>
+*> PRTYPE = 1: A and B are Jordan blocks, D and E are identity matrices
+*>
+*> A : if (i == j) then A(i, j) = 1.0
+*> if (j == i + 1) then A(i, j) = -1.0
+*> else A(i, j) = 0.0, i, j = 1...M
+*>
+*> B : if (i == j) then B(i, j) = 1.0 - ALPHA
+*> if (j == i + 1) then B(i, j) = 1.0
+*> else B(i, j) = 0.0, i, j = 1...N
+*>
+*> D : if (i == j) then D(i, j) = 1.0
+*> else D(i, j) = 0.0, i, j = 1...M
+*>
+*> E : if (i == j) then E(i, j) = 1.0
+*> else E(i, j) = 0.0, i, j = 1...N
+*>
+*> L = R are chosen from [-10...10],
+*> which specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 2 or 3: Triangular and/or quasi- triangular.
+*>
+*> A : if (i <= j) then A(i, j) = [-1...1]
+*> else A(i, j) = 0.0, i, j = 1...M
+*>
+*> if (PRTYPE = 3) then
+*> A(k + 1, k + 1) = A(k, k)
+*> A(k + 1, k) = [-1...1]
+*> sign(A(k, k + 1) = -(sin(A(k + 1, k))
+*> k = 1, M - 1, QBLCKA
+*>
+*> B : if (i <= j) then B(i, j) = [-1...1]
+*> else B(i, j) = 0.0, i, j = 1...N
+*>
+*> if (PRTYPE = 3) then
+*> B(k + 1, k + 1) = B(k, k)
+*> B(k + 1, k) = [-1...1]
+*> sign(B(k, k + 1) = -(sign(B(k + 1, k))
+*> k = 1, N - 1, QBLCKB
+*>
+*> D : if (i <= j) then D(i, j) = [-1...1].
+*> else D(i, j) = 0.0, i, j = 1...M
+*>
+*>
+*> E : if (i <= j) then D(i, j) = [-1...1]
+*> else E(i, j) = 0.0, i, j = 1...N
+*>
+*> L, R are chosen from [-10...10],
+*> which specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 4 Full
+*> A(i, j) = [-10...10]
+*> D(i, j) = [-1...1] i,j = 1...M
+*> B(i, j) = [-10...10]
+*> E(i, j) = [-1...1] i,j = 1...N
+*> R(i, j) = [-10...10]
+*> L(i, j) = [-1...1] i = 1..M ,j = 1...N
+*>
+*> L, R specifies the right hand sides (C, F).
+*>
+*> PRTYPE = 5 special case common and/or close eigs.
+*>
+*> \endverbatim
+*>
+* =====================================================================
+ SUBROUTINE ZLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
+ $ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
+ $ QBLCKB )
*
-* PRTYPE = 1: A and B are Jordan blocks, D and E are identity matrices
-*
-* A : if (i == j) then A(i, j) = 1.0
-* if (j == i + 1) then A(i, j) = -1.0
-* else A(i, j) = 0.0, i, j = 1...M
-*
-* B : if (i == j) then B(i, j) = 1.0 - ALPHA
-* if (j == i + 1) then B(i, j) = 1.0
-* else B(i, j) = 0.0, i, j = 1...N
-*
-* D : if (i == j) then D(i, j) = 1.0
-* else D(i, j) = 0.0, i, j = 1...M
-*
-* E : if (i == j) then E(i, j) = 1.0
-* else E(i, j) = 0.0, i, j = 1...N
-*
-* L = R are chosen from [-10...10],
-* which specifies the right hand sides (C, F).
-*
-* PRTYPE = 2 or 3: Triangular and/or quasi- triangular.
-*
-* A : if (i <= j) then A(i, j) = [-1...1]
-* else A(i, j) = 0.0, i, j = 1...M
-*
-* if (PRTYPE = 3) then
-* A(k + 1, k + 1) = A(k, k)
-* A(k + 1, k) = [-1...1]
-* sign(A(k, k + 1) = -(sin(A(k + 1, k))
-* k = 1, M - 1, QBLCKA
-*
-* B : if (i <= j) then B(i, j) = [-1...1]
-* else B(i, j) = 0.0, i, j = 1...N
-*
-* if (PRTYPE = 3) then
-* B(k + 1, k + 1) = B(k, k)
-* B(k + 1, k) = [-1...1]
-* sign(B(k, k + 1) = -(sign(B(k + 1, k))
-* k = 1, N - 1, QBLCKB
-*
-* D : if (i <= j) then D(i, j) = [-1...1].
-* else D(i, j) = 0.0, i, j = 1...M
-*
-*
-* E : if (i <= j) then D(i, j) = [-1...1]
-* else E(i, j) = 0.0, i, j = 1...N
-*
-* L, R are chosen from [-10...10],
-* which specifies the right hand sides (C, F).
-*
-* PRTYPE = 4 Full
-* A(i, j) = [-10...10]
-* D(i, j) = [-1...1] i,j = 1...M
-* B(i, j) = [-10...10]
-* E(i, j) = [-1...1] i,j = 1...N
-* R(i, j) = [-10...10]
-* L(i, j) = [-1...1] i = 1..M ,j = 1...N
-*
-* L, R specifies the right hand sides (C, F).
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* PRTYPE = 5 special case common and/or close eigs.
+* .. Scalar Arguments ..
+ INTEGER LDA, LDB, LDC, LDD, LDE, LDF, LDL, LDR, M, N,
+ $ PRTYPE, QBLCKA, QBLCKB
+ DOUBLE PRECISION ALPHA
+* ..
+* .. Array Arguments ..
+ COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ),
+ $ D( LDD, * ), E( LDE, * ), F( LDF, * ),
+ $ L( LDL, * ), R( LDR, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/zlatm6.f b/TESTING/MATGEN/zlatm6.f
index 6dd7241d..04a52d8b 100644
--- a/TESTING/MATGEN/zlatm6.f
+++ b/TESTING/MATGEN/zlatm6.f
@@ -1,105 +1,195 @@
- SUBROUTINE ZLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
- $ BETA, WX, WY, S, DIF )
-*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* November 2006
-*
-* .. Scalar Arguments ..
- INTEGER LDA, LDX, LDY, N, TYPE
- COMPLEX*16 ALPHA, BETA, WX, WY
-* ..
-* .. Array Arguments ..
- DOUBLE PRECISION DIF( * ), S( * )
- COMPLEX*16 A( LDA, * ), B( LDA, * ), X( LDX, * ),
- $ Y( LDY, * )
-* ..
-*
+*> \brief \b ZLATM6
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
+* BETA, WX, WY, S, DIF )
+*
+* .. Scalar Arguments ..
+* INTEGER LDA, LDX, LDY, N, TYPE
+* COMPLEX*16 ALPHA, BETA, WX, WY
+* ..
+* .. Array Arguments ..
+* DOUBLE PRECISION DIF( * ), S( * )
+* COMPLEX*16 A( LDA, * ), B( LDA, * ), X( LDX, * ),
+* $ Y( LDY, * )
+* ..
+*
* Purpose
* =======
*
-* ZLATM6 generates test matrices for the generalized eigenvalue
-* problem, their corresponding right and left eigenvector matrices,
-* and also reciprocal condition numbers for all eigenvalues and
-* the reciprocal condition numbers of eigenvectors corresponding to
-* the 1th and 5th eigenvalues.
-*
-* Test Matrices
-* =============
-*
-* Two kinds of test matrix pairs
-* (A, B) = inverse(YH) * (Da, Db) * inverse(X)
-* are used in the tests:
-*
-* Type 1:
-* Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
-* 0 2+a 0 0 0 0 1 0 0 0
-* 0 0 3+a 0 0 0 0 1 0 0
-* 0 0 0 4+a 0 0 0 0 1 0
-* 0 0 0 0 5+a , 0 0 0 0 1
-* and Type 2:
-* Da = 1+i 0 0 0 0 Db = 1 0 0 0 0
-* 0 1-i 0 0 0 0 1 0 0 0
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 (1+a)+(1+b)i 0 0 0 0 1 0
-* 0 0 0 0 (1+a)-(1+b)i, 0 0 0 0 1 .
-*
-* In both cases the same inverse(YH) and inverse(X) are used to compute
-* (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
-*
-* YH: = 1 0 -y y -y X = 1 0 -x -x x
-* 0 1 -y y -y 0 1 x -x -x
-* 0 0 1 0 0 0 0 1 0 0
-* 0 0 0 1 0 0 0 0 1 0
-* 0 0 0 0 1, 0 0 0 0 1 , where
-*
-* a, b, x and y will have all values independently of each other.
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATM6 generates test matrices for the generalized eigenvalue
+*> problem, their corresponding right and left eigenvector matrices,
+*> and also reciprocal condition numbers for all eigenvalues and
+*> the reciprocal condition numbers of eigenvectors corresponding to
+*> the 1th and 5th eigenvalues.
+*>
+*> Test Matrices
+*> =============
+*>
+*> Two kinds of test matrix pairs
+*> (A, B) = inverse(YH) * (Da, Db) * inverse(X)
+*> are used in the tests:
+*>
+*> Type 1:
+*> Da = 1+a 0 0 0 0 Db = 1 0 0 0 0
+*> 0 2+a 0 0 0 0 1 0 0 0
+*> 0 0 3+a 0 0 0 0 1 0 0
+*> 0 0 0 4+a 0 0 0 0 1 0
+*> 0 0 0 0 5+a , 0 0 0 0 1
+*> and Type 2:
+*> Da = 1+i 0 0 0 0 Db = 1 0 0 0 0
+*> 0 1-i 0 0 0 0 1 0 0 0
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 (1+a)+(1+b)i 0 0 0 0 1 0
+*> 0 0 0 0 (1+a)-(1+b)i, 0 0 0 0 1 .
+*>
+*> In both cases the same inverse(YH) and inverse(X) are used to compute
+*> (A, B), giving the exact eigenvectors to (A,B) as (YH, X):
+*>
+*> YH: = 1 0 -y y -y X = 1 0 -x -x x
+*> 0 1 -y y -y 0 1 x -x -x
+*> 0 0 1 0 0 0 0 1 0 0
+*> 0 0 0 1 0 0 0 0 1 0
+*> 0 0 0 0 1, 0 0 0 0 1 , where
+*>
+*> a, b, x and y will have all values independently of each other.
+*>
+*>\endverbatim
*
* Arguments
* =========
*
-* TYPE (input) INTEGER
-* Specifies the problem type (see futher details).
-*
-* N (input) INTEGER
-* Size of the matrices A and B.
-*
-* A (output) COMPLEX*16 array, dimension (LDA, N).
-* On exit A N-by-N is initialized according to TYPE.
-*
-* LDA (input) INTEGER
-* The leading dimension of A and of B.
-*
-* B (output) COMPLEX*16 array, dimension (LDA, N).
-* On exit B N-by-N is initialized according to TYPE.
-*
-* X (output) COMPLEX*16 array, dimension (LDX, N).
-* On exit X is the N-by-N matrix of right eigenvectors.
-*
-* LDX (input) INTEGER
-* The leading dimension of X.
-*
-* Y (output) COMPLEX*16 array, dimension (LDY, N).
-* On exit Y is the N-by-N matrix of left eigenvectors.
+*> \param[in] TYPE
+*> \verbatim
+*> TYPE is INTEGER
+*> Specifies the problem type (see futher details).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Size of the matrices A and B.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA, N).
+*> On exit A N-by-N is initialized according to TYPE.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> The leading dimension of A and of B.
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*> B is COMPLEX*16 array, dimension (LDA, N).
+*> On exit B N-by-N is initialized according to TYPE.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*> X is COMPLEX*16 array, dimension (LDX, N).
+*> On exit X is the N-by-N matrix of right eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*> LDX is INTEGER
+*> The leading dimension of X.
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*> Y is COMPLEX*16 array, dimension (LDY, N).
+*> On exit Y is the N-by-N matrix of left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*> LDY is INTEGER
+*> The leading dimension of Y.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*> ALPHA is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*> BETA is COMPLEX*16
+*> \verbatim
+*> Weighting constants for matrix A.
+*> \endverbatim
+*>
+*> \param[in] WX
+*> \verbatim
+*> WX is COMPLEX*16
+*> Constant for right eigenvector matrix.
+*> \endverbatim
+*>
+*> \param[in] WY
+*> \verbatim
+*> WY is COMPLEX*16
+*> Constant for left eigenvector matrix.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*> S is DOUBLE PRECISION array, dimension (N)
+*> S(i) is the reciprocal condition number for eigenvalue i.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*> DIF is DOUBLE PRECISION array, dimension (N)
+*> DIF(i) is the reciprocal condition number for eigenvector i.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
*
-* LDY (input) INTEGER
-* The leading dimension of Y.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
-* ALPHA (input) COMPLEX*16
-* BETA (input) COMPLEX*16
-* Weighting constants for matrix A.
+*> \date November 2011
*
-* WX (input) COMPLEX*16
-* Constant for right eigenvector matrix.
+*> \ingroup complex16_matgen
*
-* WY (input) COMPLEX*16
-* Constant for left eigenvector matrix.
+* =====================================================================
+ SUBROUTINE ZLATM6( TYPE, N, A, LDA, B, X, LDX, Y, LDY, ALPHA,
+ $ BETA, WX, WY, S, DIF )
*
-* S (output) DOUBLE PRECISION array, dimension (N)
-* S(i) is the reciprocal condition number for eigenvalue i.
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
-* DIF (output) DOUBLE PRECISION array, dimension (N)
-* DIF(i) is the reciprocal condition number for eigenvector i.
+* .. Scalar Arguments ..
+ INTEGER LDA, LDX, LDY, N, TYPE
+ COMPLEX*16 ALPHA, BETA, WX, WY
+* ..
+* .. Array Arguments ..
+ DOUBLE PRECISION DIF( * ), S( * )
+ COMPLEX*16 A( LDA, * ), B( LDA, * ), X( LDX, * ),
+ $ Y( LDY, * )
+* ..
*
* =====================================================================
*
diff --git a/TESTING/MATGEN/zlatme.f b/TESTING/MATGEN/zlatme.f
index 0063b06c..51dbb2d1 100644
--- a/TESTING/MATGEN/zlatme.f
+++ b/TESTING/MATGEN/zlatme.f
@@ -1,12 +1,312 @@
+*> \brief \b ZLATME
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATME( N, DIST, ISEED, D, MODE, COND, DMAX,
+* RSIGN,
+* UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM,
+* A,
+* LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, RSIGN, SIM, UPPER
+* INTEGER INFO, KL, KU, LDA, MODE, MODES, N
+* DOUBLE PRECISION ANORM, COND, CONDS
+* COMPLEX*16 DMAX
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION DS( * )
+* COMPLEX*16 A( LDA, * ), D( * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATME generates random non-symmetric square matrices with
+*> specified eigenvalues for testing LAPACK programs.
+*>
+*> ZLATME operates by applying the following sequence of
+*> operations:
+*>
+*> 1. Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and RSIGN
+*> as described below.
+*>
+*> 2. If UPPER='T', the upper triangle of A is set to random values
+*> out of distribution DIST.
+*>
+*> 3. If SIM='T', A is multiplied on the left by a random matrix
+*> X, whose singular values are specified by DS, MODES, and
+*> CONDS, and on the right by X inverse.
+*>
+*> 4. If KL < N-1, the lower bandwidth is reduced to KL using
+*> Householder transformations. If KU < N-1, the upper
+*> bandwidth is reduced to KU.
+*>
+*> 5. If ANORM is not negative, the matrix is scaled to have
+*> maximum-element-norm ANORM.
+*>
+*> (Note: since the matrix cannot be reduced beyond Hessenberg form,
+*> no packing options are available.)
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns (or rows) of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values, and on the
+*> upper triangle (see UPPER).
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> 'D' => uniform on the complex disc |z| < 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to ZLATME
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension ( N )
+*> This array is used to specify the eigenvalues of A. If
+*> MODE=0, then D is assumed to contain the eigenvalues
+*> otherwise they will be computed according to MODE, COND,
+*> DMAX, and RSIGN and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is between 1 and 4, D has entries ranging
+*> from 1 to 1/COND, if between -1 and -4, D has entries
+*> ranging from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is COMPLEX*16
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))). Note that DMAX need not be
+*> positive or real: if DMAX is negative or complex (or zero),
+*> D will be scaled by a negative or complex number (or zero).
+*> If RSIGN='F' then the largest (absolute) eigenvalue will be
+*> equal to DMAX.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is CHARACTER*1
+*> If MODE is not 0, 6, or -6, and RSIGN='T', then the
+*> elements of D, as computed according to MODE and COND, will
+*> be multiplied by a random complex number from the unit
+*> circle |z| = 1. If RSIGN='F', they will not be. RSIGN may
+*> only have the values 'T' or 'F'.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] UPPER
+*> \verbatim
+*> UPPER is CHARACTER*1
+*> If UPPER='T', then the elements of A above the diagonal
+*> will be set to random numbers out of DIST. If UPPER='F',
+*> they will not. UPPER may only have the values 'T' or 'F'.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] SIM
+*> \verbatim
+*> SIM is CHARACTER*1
+*> If SIM='T', then A will be operated on by a "similarity
+*> transform", i.e., multiplied on the left by a matrix X and
+*> on the right by X inverse. X = U S V, where U and V are
+*> random unitary matrices and S is a (diagonal) matrix of
+*> singular values specified by DS, MODES, and CONDS. If
+*> SIM='F', then A will not be transformed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DS
+*> \verbatim
+*> DS is DOUBLE PRECISION array, dimension ( N )
+*> This array is used to specify the singular values of X,
+*> in the same way that D specifies the eigenvalues of A.
+*> If MODE=0, the DS contains the singular values, which
+*> may not be zero.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODES
+*> \verbatim
+*> MODES is INTEGER
+*> \endverbatim
+*>
+*> \param[in] CONDS
+*> \verbatim
+*> CONDS is DOUBLE PRECISION
+*> Similar to MODE and COND, but for specifying the diagonal
+*> of S. MODES=-6 and +6 are not allowed (since they would
+*> result in randomly ill-conditioned eigenvalues.)
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. KL=1
+*> specifies upper Hessenberg form. If KL is at least N-1,
+*> then A will have full lower bandwidth.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. KU=1
+*> specifies lower Hessenberg form. If KU is at least N-1,
+*> then A will have full upper bandwidth; if KU and KL
+*> are both at least N-1, then A will be dense. Only one of
+*> KU and KL may be less than N-1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> If ANORM is not negative, then A will be scaled by a non-
+*> negative real number to make the maximum-element-norm of A
+*> to be ANORM.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( LDA, N )
+*> On exit A is the desired test matrix.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. LDA must be at least M.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension ( 3*N )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => N negative
+*> -2 => DIST illegal string
+*> -5 => MODE not in range -6 to 6
+*> -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -9 => RSIGN is not 'T' or 'F'
+*> -10 => UPPER is not 'T' or 'F'
+*> -11 => SIM is not 'T' or 'F'
+*> -12 => MODES=0 and DS has a zero singular value.
+*> -13 => MODES is not in the range -5 to 5.
+*> -14 => MODES is nonzero and CONDS is less than 1.
+*> -15 => KL is less than 1.
+*> -16 => KU is less than 1, or KL and KU are both less than
+*> N-1.
+*> -19 => LDA is less than M.
+*> 1 => Error return from ZLATM1 (computing D)
+*> 2 => Cannot scale to DMAX (max. eigenvalue is 0)
+*> 3 => Error return from DLATM1 (computing DS)
+*> 4 => Error return from ZLARGE
+*> 5 => Zero singular value from DLATM1.
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
SUBROUTINE ZLATME( N, DIST, ISEED, D, MODE, COND, DMAX,
$ RSIGN,
$ UPPER, SIM, DS, MODES, CONDS, KL, KU, ANORM,
$ A,
$ LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, RSIGN, SIM, UPPER
@@ -20,198 +320,6 @@
COMPLEX*16 A( LDA, * ), D( * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATME generates random non-symmetric square matrices with
-* specified eigenvalues for testing LAPACK programs.
-*
-* ZLATME operates by applying the following sequence of
-* operations:
-*
-* 1. Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and RSIGN
-* as described below.
-*
-* 2. If UPPER='T', the upper triangle of A is set to random values
-* out of distribution DIST.
-*
-* 3. If SIM='T', A is multiplied on the left by a random matrix
-* X, whose singular values are specified by DS, MODES, and
-* CONDS, and on the right by X inverse.
-*
-* 4. If KL < N-1, the lower bandwidth is reduced to KL using
-* Householder transformations. If KU < N-1, the upper
-* bandwidth is reduced to KU.
-*
-* 5. If ANORM is not negative, the matrix is scaled to have
-* maximum-element-norm ANORM.
-*
-* (Note: since the matrix cannot be reduced beyond Hessenberg form,
-* no packing options are available.)
-*
-* Arguments
-* =========
-*
-* N (input) INTEGER
-* The number of columns (or rows) of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values, and on the
-* upper triangle (see UPPER).
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* 'D' => uniform on the complex disc |z| < 1.
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to ZLATME
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* D (input/output) COMPLEX*16 array, dimension ( N )
-* This array is used to specify the eigenvalues of A. If
-* MODE=0, then D is assumed to contain the eigenvalues
-* otherwise they will be computed according to MODE, COND,
-* DMAX, and RSIGN and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is between 1 and 4, D has entries ranging
-* from 1 to 1/COND, if between -1 and -4, D has entries
-* ranging from 1/COND to 1,
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) COMPLEX*16
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))). Note that DMAX need not be
-* positive or real: if DMAX is negative or complex (or zero),
-* D will be scaled by a negative or complex number (or zero).
-* If RSIGN='F' then the largest (absolute) eigenvalue will be
-* equal to DMAX.
-* Not modified.
-*
-* RSIGN (input) CHARACTER*1
-* If MODE is not 0, 6, or -6, and RSIGN='T', then the
-* elements of D, as computed according to MODE and COND, will
-* be multiplied by a random complex number from the unit
-* circle |z| = 1. If RSIGN='F', they will not be. RSIGN may
-* only have the values 'T' or 'F'.
-* Not modified.
-*
-* UPPER (input) CHARACTER*1
-* If UPPER='T', then the elements of A above the diagonal
-* will be set to random numbers out of DIST. If UPPER='F',
-* they will not. UPPER may only have the values 'T' or 'F'.
-* Not modified.
-*
-* SIM (input) CHARACTER*1
-* If SIM='T', then A will be operated on by a "similarity
-* transform", i.e., multiplied on the left by a matrix X and
-* on the right by X inverse. X = U S V, where U and V are
-* random unitary matrices and S is a (diagonal) matrix of
-* singular values specified by DS, MODES, and CONDS. If
-* SIM='F', then A will not be transformed.
-* Not modified.
-*
-* DS (input/output) DOUBLE PRECISION array, dimension ( N )
-* This array is used to specify the singular values of X,
-* in the same way that D specifies the eigenvalues of A.
-* If MODE=0, the DS contains the singular values, which
-* may not be zero.
-* Modified if MODE is nonzero.
-*
-* MODES (input) INTEGER
-*
-* CONDS (input) DOUBLE PRECISION
-* Similar to MODE and COND, but for specifying the diagonal
-* of S. MODES=-6 and +6 are not allowed (since they would
-* result in randomly ill-conditioned eigenvalues.)
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. KL=1
-* specifies upper Hessenberg form. If KL is at least N-1,
-* then A will have full lower bandwidth.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. KU=1
-* specifies lower Hessenberg form. If KU is at least N-1,
-* then A will have full upper bandwidth; if KU and KL
-* are both at least N-1, then A will be dense. Only one of
-* KU and KL may be less than N-1.
-* Not modified.
-*
-* ANORM (input) DOUBLE PRECISION
-* If ANORM is not negative, then A will be scaled by a non-
-* negative real number to make the maximum-element-norm of A
-* to be ANORM.
-* Not modified.
-*
-* A (output) COMPLEX*16 array, dimension ( LDA, N )
-* On exit A is the desired test matrix.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. LDA must be at least M.
-* Not modified.
-*
-* WORK (workspace) COMPLEX*16 array, dimension ( 3*N )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => N negative
-* -2 => DIST illegal string
-* -5 => MODE not in range -6 to 6
-* -6 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -9 => RSIGN is not 'T' or 'F'
-* -10 => UPPER is not 'T' or 'F'
-* -11 => SIM is not 'T' or 'F'
-* -12 => MODES=0 and DS has a zero singular value.
-* -13 => MODES is not in the range -5 to 5.
-* -14 => MODES is nonzero and CONDS is less than 1.
-* -15 => KL is less than 1.
-* -16 => KU is less than 1, or KL and KU are both less than
-* N-1.
-* -19 => LDA is less than M.
-* 1 => Error return from ZLATM1 (computing D)
-* 2 => Cannot scale to DMAX (max. eigenvalue is 0)
-* 3 => Error return from DLATM1 (computing DS)
-* 4 => Error return from ZLARGE
-* 5 => Zero singular value from DLATM1.
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/zlatmr.f b/TESTING/MATGEN/zlatmr.f
index 5c2e4f34..5fd1accb 100644
--- a/TESTING/MATGEN/zlatmr.f
+++ b/TESTING/MATGEN/zlatmr.f
@@ -1,11 +1,504 @@
+*> \brief \b ZLATMR
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATMR( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER,
+* CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM,
+* PACK, A, LDA, IWORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, GRADE, PACK, PIVTNG, RSIGN, SYM
+* INTEGER INFO, KL, KU, LDA, M, MODE, MODEL, MODER, N
+* DOUBLE PRECISION ANORM, COND, CONDL, CONDR, SPARSE
+* COMPLEX*16 DMAX
+* ..
+* .. Array Arguments ..
+* INTEGER IPIVOT( * ), ISEED( 4 ), IWORK( * )
+* COMPLEX*16 A( LDA, * ), D( * ), DL( * ), DR( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATMR generates random matrices of various types for testing
+*> LAPACK programs.
+*>
+*> ZLATMR operates by applying the following sequence of
+*> operations:
+*>
+*> Generate a matrix A with random entries of distribution DIST
+*> which is symmetric if SYM='S', Hermitian if SYM='H', and
+*> nonsymmetric if SYM='N'.
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX and RSIGN
+*> as described below.
+*>
+*> Grade the matrix, if desired, from the left and/or right
+*> as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
+*> MODER and CONDR also determine the grading as described
+*> below.
+*>
+*> Permute, if desired, the rows and/or columns as specified by
+*> PIVTNG and IPIVOT.
+*>
+*> Set random entries to zero, if desired, to get a random sparse
+*> matrix as specified by SPARSE.
+*>
+*> Make A a band matrix, if desired, by zeroing out the matrix
+*> outside a band of lower bandwidth KL and upper bandwidth KU.
+*>
+*> Scale A, if desired, to have maximum entry ANORM.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if symmetric or Hermitian)
+*> zero out lower half (if symmetric or Hermitian)
+*> store the upper half columnwise (if symmetric or Hermitian
+*> or square upper triangular)
+*> store the lower half columnwise (if symmetric or Hermitian
+*> or square lower triangular)
+*> same as upper half rowwise if symmetric
+*> same as conjugate upper half rowwise if Hermitian
+*> store the lower triangle in banded format
+*> (if symmetric or Hermitian)
+*> store the upper triangle in banded format
+*> (if symmetric or Hermitian)
+*> store the entire matrix in banded format
+*>
+*> Note: If two calls to ZLATMR differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*>
+*> If two calls to ZLATMR both have full bandwidth (KL = M-1
+*> and KU = N-1), and differ only in the PIVTNG and PACK
+*> parameters, then the matrices generated will differ only
+*> in the order of the rows and/or columns, and otherwise
+*> contain the same data. This consistency cannot be and
+*> is not maintained with less than full bandwidth.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> Number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> Number of columns of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate a random matrix .
+*> 'U' => real and imaginary parts are independent
+*> UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => real and imaginary parts are independent
+*> UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => real and imaginary parts are independent
+*> NORMAL( 0, 1 ) ( 'N' for normal )
+*> 'D' => uniform on interior of unit disk ( 'D' for disk )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension (4)
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to ZLATMR
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='S', generated matrix is symmetric.
+*> If SYM='H', generated matrix is Hermitian.
+*> If SYM='N', generated matrix is nonsymmetric.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is COMPLEX*16 array, dimension (min(M,N))
+*> On entry this array specifies the diagonal entries
+*> of the diagonal of A. D may either be specified
+*> on entry, or set according to MODE and COND as described
+*> below. If the matrix is Hermitian, the real part of D
+*> will be taken. May be changed on exit if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry describes how D is to be used:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is COMPLEX*16
+*> If MODE neither -6, 0 nor 6, the diagonal is scaled by
+*> DMAX / max(abs(D(i))), so that maximum absolute entry
+*> of diagonal is abs(DMAX). If DMAX is complex (or zero),
+*> diagonal will be scaled by a complex number (or zero).
+*> \endverbatim
+*>
+*> \param[in] RSIGN
+*> \verbatim
+*> RSIGN is CHARACTER*1
+*> If MODE neither -6, 0 nor 6, specifies sign of diagonal
+*> as follows:
+*> 'T' => diagonal entries are multiplied by a random complex
+*> number uniformly distributed with absolute value 1
+*> 'F' => diagonal unchanged
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] GRADE
+*> \verbatim
+*> GRADE is CHARACTER*1
+*> Specifies grading of matrix as follows:
+*> 'N' => no grading
+*> 'L' => matrix premultiplied by diag( DL )
+*> (only if matrix nonsymmetric)
+*> 'R' => matrix postmultiplied by diag( DR )
+*> (only if matrix nonsymmetric)
+*> 'B' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DR )
+*> (only if matrix nonsymmetric)
+*> 'H' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( CONJG(DL) )
+*> (only if matrix Hermitian or nonsymmetric)
+*> 'S' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by diag( DL )
+*> (only if matrix symmetric or nonsymmetric)
+*> 'E' => matrix premultiplied by diag( DL ) and
+*> postmultiplied by inv( diag( DL ) )
+*> ( 'S' for similarity )
+*> (only if matrix nonsymmetric)
+*> Note: if GRADE='S', then M must equal N.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DL
+*> \verbatim
+*> DL is COMPLEX*16 array, dimension (M)
+*> If MODEL=0, then on entry this array specifies the diagonal
+*> entries of a diagonal matrix used as described under GRADE
+*> above. If MODEL is not zero, then DL will be set according
+*> to MODEL and CONDL, analogous to the way D is set according
+*> to MODE and COND (except there is no DMAX parameter for DL).
+*> If GRADE='E', then DL cannot have zero entries.
+*> Not referenced if GRADE = 'N' or 'R'. Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] MODEL
+*> \verbatim
+*> MODEL is INTEGER
+*> This specifies how the diagonal array DL is to be computed,
+*> just as MODE specifies how D is to be computed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] CONDL
+*> \verbatim
+*> CONDL is DOUBLE PRECISION
+*> When MODEL is not zero, this specifies the condition number
+*> of the computed DL. Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] DR
+*> \verbatim
+*> DR is COMPLEX*16 array, dimension (N)
+*> If MODER=0, then on entry this array specifies the diagonal
+*> entries of a diagonal matrix used as described under GRADE
+*> above. If MODER is not zero, then DR will be set according
+*> to MODER and CONDR, analogous to the way D is set according
+*> to MODE and COND (except there is no DMAX parameter for DR).
+*> Not referenced if GRADE = 'N', 'L', 'H' or 'S'.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] MODER
+*> \verbatim
+*> MODER is INTEGER
+*> This specifies how the diagonal array DR is to be computed,
+*> just as MODE specifies how D is to be computed.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] CONDR
+*> \verbatim
+*> CONDR is DOUBLE PRECISION
+*> When MODER is not zero, this specifies the condition number
+*> of the computed DR. Not modified.
+*> \endverbatim
+*>
+*> \param[in] PIVTNG
+*> \verbatim
+*> PIVTNG is CHARACTER*1
+*> On entry specifies pivoting permutations as follows:
+*> 'N' or ' ' => none.
+*> 'L' => left or row pivoting (matrix must be nonsymmetric).
+*> 'R' => right or column pivoting (matrix must be
+*> nonsymmetric).
+*> 'B' or 'F' => both or full pivoting, i.e., on both sides.
+*> In this case, M must equal N
+*> \endverbatim
+*> \verbatim
+*> If two calls to ZLATMR both have full bandwidth (KL = M-1
+*> and KU = N-1), and differ only in the PIVTNG and PACK
+*> parameters, then the matrices generated will differ only
+*> in the order of the rows and/or columns, and otherwise
+*> contain the same data. This consistency cannot be
+*> maintained with less than full bandwidth.
+*> \endverbatim
+*>
+*> \param[in] IPIVOT
+*> \verbatim
+*> IPIVOT is INTEGER array, dimension (N or M)
+*> This array specifies the permutation used. After the
+*> basic matrix is generated, the rows, columns, or both
+*> are permuted. If, say, row pivoting is selected, ZLATMR
+*> starts with the *last* row and interchanges the M-th and
+*> IPIVOT(M)-th rows, then moves to the next-to-last row,
+*> interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
+*> and so on. In terms of "2-cycles", the permutation is
+*> (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
+*> where the rightmost cycle is applied first. This is the
+*> *inverse* of the effect of pivoting in LINPACK. The idea
+*> is that factoring (with pivoting) an identity matrix
+*> which has been inverse-pivoted in this way should
+*> result in a pivot vector identical to IPIVOT.
+*> Not referenced if PIVTNG = 'N'. Not modified.
+*> \endverbatim
+*>
+*> \param[in] SPARSE
+*> \verbatim
+*> SPARSE is DOUBLE PRECISION
+*> On entry specifies the sparsity of the matrix if a sparse
+*> matrix is to be generated. SPARSE should lie between
+*> 0 and 1. To generate a sparse matrix, for each matrix entry
+*> a uniform ( 0, 1 ) random number x is generated and
+*> compared to SPARSE; if x is larger the matrix entry
+*> is unchanged and if x is smaller the entry is set
+*> to zero. Thus on the average a fraction SPARSE of the
+*> entries will be set to zero.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> On entry specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL at least M-1 implies the matrix is not
+*> banded. Must equal KU if matrix is symmetric or Hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> On entry specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU at least N-1 implies the matrix is not
+*> banded. Must equal KL if matrix is symmetric or Hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] ANORM
+*> \verbatim
+*> ANORM is DOUBLE PRECISION
+*> On entry specifies maximum entry of output matrix
+*> (output matrix will by multiplied by a constant so that
+*> its largest absolute entry equal ANORM)
+*> if ANORM is nonnegative. If ANORM is negative no scaling
+*> is done. Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> On entry specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries
+*> (if symmetric or Hermitian)
+*> 'L' => zero out all superdiagonal entries
+*> (if symmetric or Hermitian)
+*> 'C' => store the upper triangle columnwise
+*> (only if matrix symmetric or Hermitian or
+*> square upper triangular)
+*> 'R' => store the lower triangle columnwise
+*> (only if matrix symmetric or Hermitian or
+*> square lower triangular)
+*> (same as upper half rowwise if symmetric)
+*> (same as conjugate upper half rowwise if Hermitian)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if matrix symmetric or Hermitian)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if matrix symmetric or Hermitian)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, HB or TB - use 'B' or 'Q'
+*> PP, HP or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to ZLATMR differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension (LDA,N)
+*> On exit A is the desired test matrix. Only those
+*> entries of A which are significant on output
+*> will be referenced (even if A is in packed or band
+*> storage format). The 'unoccupied corners' of A in
+*> band format will be zeroed out.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> on entry LDA specifies the first dimension of A as
+*> declared in the calling program.
+*> If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
+*> If PACK='C' or 'R', LDA must be at least 1.
+*> If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
+*> If PACK='Z', LDA must be at least KUU+KLL+1, where
+*> KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*> IWORK is INTEGER array, dimension (N or M)
+*> Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error parameter on exit:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S' or 'H'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
+*> -11 => GRADE illegal string, or GRADE='E' and
+*> M not equal to N, or GRADE='L', 'R', 'B', 'S' or 'E'
+*> and SYM = 'H', or GRADE='L', 'R', 'B', 'H' or 'E'
+*> and SYM = 'S'
+*> -12 => GRADE = 'E' and DL contains zero
+*> -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
+*> 'S' or 'E'
+*> -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
+*> and MODEL neither -6, 0 nor 6
+*> -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
+*> -17 => CONDR less than 1.0, GRADE='R' or 'B', and
+*> MODER neither -6, 0 nor 6
+*> -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
+*> M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
+*> or 'H'
+*> -19 => IPIVOT contains out of range number and
+*> PIVTNG not equal to 'N'
+*> -20 => KL negative
+*> -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
+*> -22 => SPARSE not in range 0. to 1.
+*> -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
+*> and SYM='N', or PACK='C' and SYM='N' and either KL
+*> not equal to 0 or N not equal to M, or PACK='R' and
+*> SYM='N', and either KU not equal to 0 or N not equal
+*> to M
+*> -26 => LDA too small
+*> 1 => Error return from ZLATM1 (computing D)
+*> 2 => Cannot scale diagonal to DMAX (max. entry is 0)
+*> 3 => Error return from ZLATM1 (computing DL)
+*> 4 => Error return from ZLATM1 (computing DR)
+*> 5 => ANORM is positive, but matrix constructed prior to
+*> attempting to scale it to have norm ANORM, is zero
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
SUBROUTINE ZLATMR( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ RSIGN, GRADE, DL, MODEL, CONDL, DR, MODER,
$ CONDR, PIVTNG, IPIVOT, KL, KU, SPARSE, ANORM,
$ PACK, A, LDA, IWORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, GRADE, PACK, PIVTNG, RSIGN, SYM
@@ -18,366 +511,6 @@
COMPLEX*16 A( LDA, * ), D( * ), DL( * ), DR( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATMR generates random matrices of various types for testing
-* LAPACK programs.
-*
-* ZLATMR operates by applying the following sequence of
-* operations:
-*
-* Generate a matrix A with random entries of distribution DIST
-* which is symmetric if SYM='S', Hermitian if SYM='H', and
-* nonsymmetric if SYM='N'.
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX and RSIGN
-* as described below.
-*
-* Grade the matrix, if desired, from the left and/or right
-* as specified by GRADE. The inputs DL, MODEL, CONDL, DR,
-* MODER and CONDR also determine the grading as described
-* below.
-*
-* Permute, if desired, the rows and/or columns as specified by
-* PIVTNG and IPIVOT.
-*
-* Set random entries to zero, if desired, to get a random sparse
-* matrix as specified by SPARSE.
-*
-* Make A a band matrix, if desired, by zeroing out the matrix
-* outside a band of lower bandwidth KL and upper bandwidth KU.
-*
-* Scale A, if desired, to have maximum entry ANORM.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if symmetric or Hermitian)
-* zero out lower half (if symmetric or Hermitian)
-* store the upper half columnwise (if symmetric or Hermitian
-* or square upper triangular)
-* store the lower half columnwise (if symmetric or Hermitian
-* or square lower triangular)
-* same as upper half rowwise if symmetric
-* same as conjugate upper half rowwise if Hermitian
-* store the lower triangle in banded format
-* (if symmetric or Hermitian)
-* store the upper triangle in banded format
-* (if symmetric or Hermitian)
-* store the entire matrix in banded format
-*
-* Note: If two calls to ZLATMR differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-*
-* If two calls to ZLATMR both have full bandwidth (KL = M-1
-* and KU = N-1), and differ only in the PIVTNG and PACK
-* parameters, then the matrices generated will differ only
-* in the order of the rows and/or columns, and otherwise
-* contain the same data. This consistency cannot be and
-* is not maintained with less than full bandwidth.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* Number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* Number of columns of A. Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate a random matrix .
-* 'U' => real and imaginary parts are independent
-* UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => real and imaginary parts are independent
-* UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => real and imaginary parts are independent
-* NORMAL( 0, 1 ) ( 'N' for normal )
-* 'D' => uniform on interior of unit disk ( 'D' for disk )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension (4)
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to ZLATMR
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='S', generated matrix is symmetric.
-* If SYM='H', generated matrix is Hermitian.
-* If SYM='N', generated matrix is nonsymmetric.
-* Not modified.
-*
-* D (input/output) COMPLEX*16 array, dimension (min(M,N))
-* On entry this array specifies the diagonal entries
-* of the diagonal of A. D may either be specified
-* on entry, or set according to MODE and COND as described
-* below. If the matrix is Hermitian, the real part of D
-* will be taken. May be changed on exit if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry describes how D is to be used:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) COMPLEX*16
-* If MODE neither -6, 0 nor 6, the diagonal is scaled by
-* DMAX / max(abs(D(i))), so that maximum absolute entry
-* of diagonal is abs(DMAX). If DMAX is complex (or zero),
-* diagonal will be scaled by a complex number (or zero).
-*
-* RSIGN (input) CHARACTER*1
-* If MODE neither -6, 0 nor 6, specifies sign of diagonal
-* as follows:
-* 'T' => diagonal entries are multiplied by a random complex
-* number uniformly distributed with absolute value 1
-* 'F' => diagonal unchanged
-* Not modified.
-*
-* GRADE (input) CHARACTER*1
-* Specifies grading of matrix as follows:
-* 'N' => no grading
-* 'L' => matrix premultiplied by diag( DL )
-* (only if matrix nonsymmetric)
-* 'R' => matrix postmultiplied by diag( DR )
-* (only if matrix nonsymmetric)
-* 'B' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DR )
-* (only if matrix nonsymmetric)
-* 'H' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( CONJG(DL) )
-* (only if matrix Hermitian or nonsymmetric)
-* 'S' => matrix premultiplied by diag( DL ) and
-* postmultiplied by diag( DL )
-* (only if matrix symmetric or nonsymmetric)
-* 'E' => matrix premultiplied by diag( DL ) and
-* postmultiplied by inv( diag( DL ) )
-* ( 'S' for similarity )
-* (only if matrix nonsymmetric)
-* Note: if GRADE='S', then M must equal N.
-* Not modified.
-*
-* DL (input/output) COMPLEX*16 array, dimension (M)
-* If MODEL=0, then on entry this array specifies the diagonal
-* entries of a diagonal matrix used as described under GRADE
-* above. If MODEL is not zero, then DL will be set according
-* to MODEL and CONDL, analogous to the way D is set according
-* to MODE and COND (except there is no DMAX parameter for DL).
-* If GRADE='E', then DL cannot have zero entries.
-* Not referenced if GRADE = 'N' or 'R'. Changed on exit.
-*
-* MODEL (input) INTEGER
-* This specifies how the diagonal array DL is to be computed,
-* just as MODE specifies how D is to be computed.
-* Not modified.
-*
-* CONDL (input) DOUBLE PRECISION
-* When MODEL is not zero, this specifies the condition number
-* of the computed DL. Not modified.
-*
-* DR (input/output) COMPLEX*16 array, dimension (N)
-* If MODER=0, then on entry this array specifies the diagonal
-* entries of a diagonal matrix used as described under GRADE
-* above. If MODER is not zero, then DR will be set according
-* to MODER and CONDR, analogous to the way D is set according
-* to MODE and COND (except there is no DMAX parameter for DR).
-* Not referenced if GRADE = 'N', 'L', 'H' or 'S'.
-* Changed on exit.
-*
-* MODER (input) INTEGER
-* This specifies how the diagonal array DR is to be computed,
-* just as MODE specifies how D is to be computed.
-* Not modified.
-*
-* CONDR (input) DOUBLE PRECISION
-* When MODER is not zero, this specifies the condition number
-* of the computed DR. Not modified.
-*
-* PIVTNG (input) CHARACTER*1
-* On entry specifies pivoting permutations as follows:
-* 'N' or ' ' => none.
-* 'L' => left or row pivoting (matrix must be nonsymmetric).
-* 'R' => right or column pivoting (matrix must be
-* nonsymmetric).
-* 'B' or 'F' => both or full pivoting, i.e., on both sides.
-* In this case, M must equal N
-*
-* If two calls to ZLATMR both have full bandwidth (KL = M-1
-* and KU = N-1), and differ only in the PIVTNG and PACK
-* parameters, then the matrices generated will differ only
-* in the order of the rows and/or columns, and otherwise
-* contain the same data. This consistency cannot be
-* maintained with less than full bandwidth.
-*
-* IPIVOT (input) INTEGER array, dimension (N or M)
-* This array specifies the permutation used. After the
-* basic matrix is generated, the rows, columns, or both
-* are permuted. If, say, row pivoting is selected, ZLATMR
-* starts with the *last* row and interchanges the M-th and
-* IPIVOT(M)-th rows, then moves to the next-to-last row,
-* interchanging the (M-1)-th and the IPIVOT(M-1)-th rows,
-* and so on. In terms of "2-cycles", the permutation is
-* (1 IPIVOT(1)) (2 IPIVOT(2)) ... (M IPIVOT(M))
-* where the rightmost cycle is applied first. This is the
-* *inverse* of the effect of pivoting in LINPACK. The idea
-* is that factoring (with pivoting) an identity matrix
-* which has been inverse-pivoted in this way should
-* result in a pivot vector identical to IPIVOT.
-* Not referenced if PIVTNG = 'N'. Not modified.
-*
-* SPARSE (input) DOUBLE PRECISION
-* On entry specifies the sparsity of the matrix if a sparse
-* matrix is to be generated. SPARSE should lie between
-* 0 and 1. To generate a sparse matrix, for each matrix entry
-* a uniform ( 0, 1 ) random number x is generated and
-* compared to SPARSE; if x is larger the matrix entry
-* is unchanged and if x is smaller the entry is set
-* to zero. Thus on the average a fraction SPARSE of the
-* entries will be set to zero.
-* Not modified.
-*
-* KL (input) INTEGER
-* On entry specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL at least M-1 implies the matrix is not
-* banded. Must equal KU if matrix is symmetric or Hermitian.
-* Not modified.
-*
-* KU (input) INTEGER
-* On entry specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU at least N-1 implies the matrix is not
-* banded. Must equal KL if matrix is symmetric or Hermitian.
-* Not modified.
-*
-* ANORM (input) DOUBLE PRECISION
-* On entry specifies maximum entry of output matrix
-* (output matrix will by multiplied by a constant so that
-* its largest absolute entry equal ANORM)
-* if ANORM is nonnegative. If ANORM is negative no scaling
-* is done. Not modified.
-*
-* PACK (input) CHARACTER*1
-* On entry specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries
-* (if symmetric or Hermitian)
-* 'L' => zero out all superdiagonal entries
-* (if symmetric or Hermitian)
-* 'C' => store the upper triangle columnwise
-* (only if matrix symmetric or Hermitian or
-* square upper triangular)
-* 'R' => store the lower triangle columnwise
-* (only if matrix symmetric or Hermitian or
-* square lower triangular)
-* (same as upper half rowwise if symmetric)
-* (same as conjugate upper half rowwise if Hermitian)
-* 'B' => store the lower triangle in band storage scheme
-* (only if matrix symmetric or Hermitian)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if matrix symmetric or Hermitian)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, HB or TB - use 'B' or 'Q'
-* PP, HP or TP - use 'C' or 'R'
-*
-* If two calls to ZLATMR differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) COMPLEX*16 array, dimension (LDA,N)
-* On exit A is the desired test matrix. Only those
-* entries of A which are significant on output
-* will be referenced (even if A is in packed or band
-* storage format). The 'unoccupied corners' of A in
-* band format will be zeroed out.
-*
-* LDA (input) INTEGER
-* on entry LDA specifies the first dimension of A as
-* declared in the calling program.
-* If PACK='N', 'U' or 'L', LDA must be at least max ( 1, M ).
-* If PACK='C' or 'R', LDA must be at least 1.
-* If PACK='B', or 'Q', LDA must be MIN ( KU+1, N )
-* If PACK='Z', LDA must be at least KUU+KLL+1, where
-* KUU = MIN ( KU, N-1 ) and KLL = MIN ( KL, N-1 )
-* Not modified.
-*
-* IWORK (workspace) INTEGER array, dimension (N or M)
-* Workspace. Not referenced if PIVTNG = 'N'. Changed on exit.
-*
-* INFO (output) INTEGER
-* Error parameter on exit:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S' or 'H'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => MODE neither -6, 0 nor 6 and RSIGN illegal string
-* -11 => GRADE illegal string, or GRADE='E' and
-* M not equal to N, or GRADE='L', 'R', 'B', 'S' or 'E'
-* and SYM = 'H', or GRADE='L', 'R', 'B', 'H' or 'E'
-* and SYM = 'S'
-* -12 => GRADE = 'E' and DL contains zero
-* -13 => MODEL not in range -6 to 6 and GRADE= 'L', 'B', 'H',
-* 'S' or 'E'
-* -14 => CONDL less than 1.0, GRADE='L', 'B', 'H', 'S' or 'E',
-* and MODEL neither -6, 0 nor 6
-* -16 => MODER not in range -6 to 6 and GRADE= 'R' or 'B'
-* -17 => CONDR less than 1.0, GRADE='R' or 'B', and
-* MODER neither -6, 0 nor 6
-* -18 => PIVTNG illegal string, or PIVTNG='B' or 'F' and
-* M not equal to N, or PIVTNG='L' or 'R' and SYM='S'
-* or 'H'
-* -19 => IPIVOT contains out of range number and
-* PIVTNG not equal to 'N'
-* -20 => KL negative
-* -21 => KU negative, or SYM='S' or 'H' and KU not equal to KL
-* -22 => SPARSE not in range 0. to 1.
-* -24 => PACK illegal string, or PACK='U', 'L', 'B' or 'Q'
-* and SYM='N', or PACK='C' and SYM='N' and either KL
-* not equal to 0 or N not equal to M, or PACK='R' and
-* SYM='N', and either KU not equal to 0 or N not equal
-* to M
-* -26 => LDA too small
-* 1 => Error return from ZLATM1 (computing D)
-* 2 => Cannot scale diagonal to DMAX (max. entry is 0)
-* 3 => Error return from ZLATM1 (computing DL)
-* 4 => Error return from ZLATM1 (computing DR)
-* 5 => ANORM is positive, but matrix constructed prior to
-* attempting to scale it to have norm ANORM, is zero
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/zlatms.f b/TESTING/MATGEN/zlatms.f
index 53e8a4c6..481d6719 100644
--- a/TESTING/MATGEN/zlatms.f
+++ b/TESTING/MATGEN/zlatms.f
@@ -1,9 +1,345 @@
+*> \brief \b ZLATMS
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATMS( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* KL, KU, PACK, A, LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* CHARACTER DIST, PACK, SYM
+* INTEGER INFO, KL, KU, LDA, M, MODE, N
+* DOUBLE PRECISION COND, DMAX
+* ..
+* .. Array Arguments ..
+* INTEGER ISEED( 4 )
+* DOUBLE PRECISION D( * )
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATMS generates random matrices with specified singular values
+*> (or hermitian with specified eigenvalues)
+*> for testing LAPACK programs.
+*>
+*> ZLATMS operates by applying the following sequence of
+*> operations:
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and SYM
+*> as described below.
+*>
+*> Generate a matrix with the appropriate band structure, by one
+*> of two methods:
+*>
+*> Method A:
+*> Generate a dense M x N matrix by multiplying D on the left
+*> and the right by random unitary matrices, then:
+*>
+*> Reduce the bandwidth according to KL and KU, using
+*> Householder transformations.
+*>
+*> Method B:
+*> Convert the bandwidth-0 (i.e., diagonal) matrix to a
+*> bandwidth-1 matrix using Givens rotations, "chasing"
+*> out-of-band elements back, much as in QR; then convert
+*> the bandwidth-1 to a bandwidth-2 matrix, etc. Note
+*> that for reasonably small bandwidths (relative to M and
+*> N) this requires less storage, as a dense matrix is not
+*> generated. Also, for hermitian or symmetric matrices,
+*> only one triangle is generated.
+*>
+*> Method A is chosen if the bandwidth is a large fraction of the
+*> order of the matrix, and LDA is at least M (so a dense
+*> matrix can be stored.) Method B is chosen if the bandwidth
+*> is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
+*> non-symmetric), or LDA is less than M and not less than the
+*> bandwidth.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if hermitian)
+*> zero out lower half (if hermitian)
+*> store the upper half columnwise (if hermitian or upper
+*> triangular)
+*> store the lower half columnwise (if hermitian or lower
+*> triangular)
+*> store the lower triangle in banded format (if hermitian or
+*> lower triangular)
+*> store the upper triangle in banded format (if hermitian or
+*> upper triangular)
+*> store the entire matrix in banded format
+*> If Method B is chosen, and band format is specified, then the
+*> matrix will be generated in the band format, so no repacking
+*> will be necessary.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. N must equal M if the matrix
+*> is symmetric or hermitian (i.e., if SYM is not 'N')
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values.
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to ZLATMS
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='H', the generated matrix is hermitian, with
+*> eigenvalues specified by D, COND, MODE, and DMAX; they
+*> may be positive, negative, or zero.
+*> If SYM='P', the generated matrix is hermitian, with
+*> eigenvalues (= singular values) specified by D, COND,
+*> MODE, and DMAX; they will not be negative.
+*> If SYM='N', the generated matrix is nonsymmetric, with
+*> singular values specified by D, COND, MODE, and DMAX;
+*> they will not be negative.
+*> If SYM='S', the generated matrix is (complex) symmetric,
+*> with singular values specified by D, COND, MODE, and
+*> DMAX; they will not be negative.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( MIN( M, N ) )
+*> This array is used to specify the singular values or
+*> eigenvalues of A (see SYM, above.) If MODE=0, then D is
+*> assumed to contain the singular/eigenvalues, otherwise
+*> they will be computed according to MODE, COND, and DMAX,
+*> and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the singular/eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
+*> MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> If SYM='H', and MODE is neither 0, 6, nor -6, then
+*> the elements of D will also be multiplied by a random
+*> sign (i.e., +1 or -1.)
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is DOUBLE PRECISION
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+*> singular value (which is to say the norm) will be abs(DMAX).
+*> Note that DMAX need not be positive: if DMAX is negative
+*> (or zero), D will be scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL being at least M-1 means that the matrix
+*> has full lower bandwidth. KL must equal KU if the matrix
+*> is symmetric or hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU being at least N-1 means that the matrix
+*> has full upper bandwidth. KL must equal KU if the matrix
+*> is symmetric or hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> This specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric
+*> or hermitian)
+*> 'L' => zero out all superdiagonal entries (if symmetric
+*> or hermitian)
+*> 'C' => store the upper triangle columnwise (only if the
+*> matrix is symmetric, hermitian, or upper triangular)
+*> 'R' => store the lower triangle columnwise (only if the
+*> matrix is symmetric, hermitian, or lower triangular)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if the matrix is symmetric, hermitian, or
+*> lower triangular)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if the matrix is symmetric, hermitian, or
+*> upper triangular)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB, HB, or TB - use 'B' or 'Q'
+*> PP, SP, HB, or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to ZLATMS differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( LDA, N )
+*> On exit A is the desired test matrix. A is first generated
+*> in full (unpacked) form, and then packed, if so specified
+*> by PACK. Thus, the first M elements of the first N
+*> columns will always be modified. If PACK specifies a
+*> packed or banded storage scheme, all LDA elements of the
+*> first N columns will be modified; the elements of the
+*> array which do not correspond to elements of the generated
+*> matrix are set to zero.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+*> LDA must be at least M. If PACK='B' or 'Q', then LDA must
+*> be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+*> If PACK='Z', LDA must be large enough to hold the packed
+*> array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension ( 3*MAX( N, M ) )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => KL negative
+*> -11 => KU negative, or SYM is not 'N' and KU is not equal to
+*> KL
+*> -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+*> or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+*> or PACK='R' or 'B' and SYM='N' and KU is not zero;
+*> or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+*> N.
+*> -14 => LDA is less than M, or PACK='Z' and LDA is less than
+*> MIN(KU,N-1) + MIN(KL,M-1) + 1.
+*> 1 => Error return from DLATM1
+*> 2 => Cannot scale to DMAX (max. sing. value is 0)
+*> 3 => Error return from ZLAGGE, CLAGHE or CLAGSY
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
SUBROUTINE ZLATMS( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ KL, KU, PACK, A, LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
-* June 2010
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
CHARACTER DIST, PACK, SYM
@@ -16,248 +352,6 @@
COMPLEX*16 A( LDA, * ), WORK( * )
* ..
*
-* Purpose
-* =======
-*
-* ZLATMS generates random matrices with specified singular values
-* (or hermitian with specified eigenvalues)
-* for testing LAPACK programs.
-*
-* ZLATMS operates by applying the following sequence of
-* operations:
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and SYM
-* as described below.
-*
-* Generate a matrix with the appropriate band structure, by one
-* of two methods:
-*
-* Method A:
-* Generate a dense M x N matrix by multiplying D on the left
-* and the right by random unitary matrices, then:
-*
-* Reduce the bandwidth according to KL and KU, using
-* Householder transformations.
-*
-* Method B:
-* Convert the bandwidth-0 (i.e., diagonal) matrix to a
-* bandwidth-1 matrix using Givens rotations, "chasing"
-* out-of-band elements back, much as in QR; then convert
-* the bandwidth-1 to a bandwidth-2 matrix, etc. Note
-* that for reasonably small bandwidths (relative to M and
-* N) this requires less storage, as a dense matrix is not
-* generated. Also, for hermitian or symmetric matrices,
-* only one triangle is generated.
-*
-* Method A is chosen if the bandwidth is a large fraction of the
-* order of the matrix, and LDA is at least M (so a dense
-* matrix can be stored.) Method B is chosen if the bandwidth
-* is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
-* non-symmetric), or LDA is less than M and not less than the
-* bandwidth.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if hermitian)
-* zero out lower half (if hermitian)
-* store the upper half columnwise (if hermitian or upper
-* triangular)
-* store the lower half columnwise (if hermitian or lower
-* triangular)
-* store the lower triangle in banded format (if hermitian or
-* lower triangular)
-* store the upper triangle in banded format (if hermitian or
-* upper triangular)
-* store the entire matrix in banded format
-* If Method B is chosen, and band format is specified, then the
-* matrix will be generated in the band format, so no repacking
-* will be necessary.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* The number of columns of A. N must equal M if the matrix
-* is symmetric or hermitian (i.e., if SYM is not 'N')
-* Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values.
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to ZLATMS
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='H', the generated matrix is hermitian, with
-* eigenvalues specified by D, COND, MODE, and DMAX; they
-* may be positive, negative, or zero.
-* If SYM='P', the generated matrix is hermitian, with
-* eigenvalues (= singular values) specified by D, COND,
-* MODE, and DMAX; they will not be negative.
-* If SYM='N', the generated matrix is nonsymmetric, with
-* singular values specified by D, COND, MODE, and DMAX;
-* they will not be negative.
-* If SYM='S', the generated matrix is (complex) symmetric,
-* with singular values specified by D, COND, MODE, and
-* DMAX; they will not be negative.
-* Not modified.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( MIN( M, N ) )
-* This array is used to specify the singular values or
-* eigenvalues of A (see SYM, above.) If MODE=0, then D is
-* assumed to contain the singular/eigenvalues, otherwise
-* they will be computed according to MODE, COND, and DMAX,
-* and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the singular/eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:N)=1.0/COND
-* MODE = 2 sets D(1:N-1)=1 and D(N)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(N-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* If SYM='H', and MODE is neither 0, 6, nor -6, then
-* the elements of D will also be multiplied by a random
-* sign (i.e., +1 or -1.)
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) DOUBLE PRECISION
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
-* singular value (which is to say the norm) will be abs(DMAX).
-* Note that DMAX need not be positive: if DMAX is negative
-* (or zero), D will be scaled by a negative number (or zero).
-* Not modified.
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL being at least M-1 means that the matrix
-* has full lower bandwidth. KL must equal KU if the matrix
-* is symmetric or hermitian.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU being at least N-1 means that the matrix
-* has full upper bandwidth. KL must equal KU if the matrix
-* is symmetric or hermitian.
-* Not modified.
-*
-* PACK (input) CHARACTER*1
-* This specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric
-* or hermitian)
-* 'L' => zero out all superdiagonal entries (if symmetric
-* or hermitian)
-* 'C' => store the upper triangle columnwise (only if the
-* matrix is symmetric, hermitian, or upper triangular)
-* 'R' => store the lower triangle columnwise (only if the
-* matrix is symmetric, hermitian, or lower triangular)
-* 'B' => store the lower triangle in band storage scheme
-* (only if the matrix is symmetric, hermitian, or
-* lower triangular)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if the matrix is symmetric, hermitian, or
-* upper triangular)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB, HB, or TB - use 'B' or 'Q'
-* PP, SP, HB, or TP - use 'C' or 'R'
-*
-* If two calls to ZLATMS differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) COMPLEX*16 array, dimension ( LDA, N )
-* On exit A is the desired test matrix. A is first generated
-* in full (unpacked) form, and then packed, if so specified
-* by PACK. Thus, the first M elements of the first N
-* columns will always be modified. If PACK specifies a
-* packed or banded storage scheme, all LDA elements of the
-* first N columns will be modified; the elements of the
-* array which do not correspond to elements of the generated
-* matrix are set to zero.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
-* LDA must be at least M. If PACK='B' or 'Q', then LDA must
-* be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
-* If PACK='Z', LDA must be large enough to hold the packed
-* array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
-* Not modified.
-*
-* WORK (workspace) COMPLEX*16 array, dimension ( 3*MAX( N, M ) )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => KL negative
-* -11 => KU negative, or SYM is not 'N' and KU is not equal to
-* KL
-* -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
-* or PACK='C' or 'Q' and SYM='N' and KL is not zero;
-* or PACK='R' or 'B' and SYM='N' and KU is not zero;
-* or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
-* N.
-* -14 => LDA is less than M, or PACK='Z' and LDA is less than
-* MIN(KU,N-1) + MIN(KL,M-1) + 1.
-* 1 => Error return from DLATM1
-* 2 => Cannot scale to DMAX (max. sing. value is 0)
-* 3 => Error return from ZLAGGE, CLAGHE or CLAGSY
-*
* =====================================================================
*
* .. Parameters ..
diff --git a/TESTING/MATGEN/zlatmt.f b/TESTING/MATGEN/zlatmt.f
index b5840306..0e2c319a 100644
--- a/TESTING/MATGEN/zlatmt.f
+++ b/TESTING/MATGEN/zlatmt.f
@@ -1,9 +1,353 @@
+*> \brief \b ZLATMT
+*
+* =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
+*
+* Definition
+* ==========
+*
+* SUBROUTINE ZLATMT( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
+* RANK, KL, KU, PACK, A, LDA, WORK, INFO )
+*
+* .. Scalar Arguments ..
+* DOUBLE PRECISION COND, DMAX
+* INTEGER INFO, KL, KU, LDA, M, MODE, N, RANK
+* CHARACTER DIST, PACK, SYM
+* ..
+* .. Array Arguments ..
+* COMPLEX*16 A( LDA, * ), WORK( * )
+* DOUBLE PRECISION D( * )
+* INTEGER ISEED( 4 )
+* ..
+*
+* Purpose
+* =======
+*
+*>\details \b Purpose:
+*>\verbatim
+*>
+*> ZLATMT generates random matrices with specified singular values
+*> (or hermitian with specified eigenvalues)
+*> for testing LAPACK programs.
+*>
+*> ZLATMT operates by applying the following sequence of
+*> operations:
+*>
+*> Set the diagonal to D, where D may be input or
+*> computed according to MODE, COND, DMAX, and SYM
+*> as described below.
+*>
+*> Generate a matrix with the appropriate band structure, by one
+*> of two methods:
+*>
+*> Method A:
+*> Generate a dense M x N matrix by multiplying D on the left
+*> and the right by random unitary matrices, then:
+*>
+*> Reduce the bandwidth according to KL and KU, using
+*> Householder transformations.
+*>
+*> Method B:
+*> Convert the bandwidth-0 (i.e., diagonal) matrix to a
+*> bandwidth-1 matrix using Givens rotations, "chasing"
+*> out-of-band elements back, much as in QR; then convert
+*> the bandwidth-1 to a bandwidth-2 matrix, etc. Note
+*> that for reasonably small bandwidths (relative to M and
+*> N) this requires less storage, as a dense matrix is not
+*> generated. Also, for hermitian or symmetric matrices,
+*> only one triangle is generated.
+*>
+*> Method A is chosen if the bandwidth is a large fraction of the
+*> order of the matrix, and LDA is at least M (so a dense
+*> matrix can be stored.) Method B is chosen if the bandwidth
+*> is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
+*> non-symmetric), or LDA is less than M and not less than the
+*> bandwidth.
+*>
+*> Pack the matrix if desired. Options specified by PACK are:
+*> no packing
+*> zero out upper half (if hermitian)
+*> zero out lower half (if hermitian)
+*> store the upper half columnwise (if hermitian or upper
+*> triangular)
+*> store the lower half columnwise (if hermitian or lower
+*> triangular)
+*> store the lower triangle in banded format (if hermitian or
+*> lower triangular)
+*> store the upper triangle in banded format (if hermitian or
+*> upper triangular)
+*> store the entire matrix in banded format
+*> If Method B is chosen, and band format is specified, then the
+*> matrix will be generated in the band format, so no repacking
+*> will be necessary.
+*>
+*>\endverbatim
+*
+* Arguments
+* =========
+*
+*> \param[in] M
+*> \verbatim
+*> M is INTEGER
+*> The number of rows of A. Not modified.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*> N is INTEGER
+*> The number of columns of A. N must equal M if the matrix
+*> is symmetric or hermitian (i.e., if SYM is not 'N')
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] DIST
+*> \verbatim
+*> DIST is CHARACTER*1
+*> On entry, DIST specifies the type of distribution to be used
+*> to generate the random eigen-/singular values.
+*> 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
+*> 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
+*> 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] ISEED
+*> \verbatim
+*> ISEED is INTEGER array, dimension ( 4 )
+*> On entry ISEED specifies the seed of the random number
+*> generator. They should lie between 0 and 4095 inclusive,
+*> and ISEED(4) should be odd. The random number generator
+*> uses a linear congruential sequence limited to small
+*> integers, and so should produce machine independent
+*> random numbers. The values of ISEED are changed on
+*> exit, and can be used in the next call to ZLATMT
+*> to continue the same random number sequence.
+*> Changed on exit.
+*> \endverbatim
+*>
+*> \param[in] SYM
+*> \verbatim
+*> SYM is CHARACTER*1
+*> If SYM='H', the generated matrix is hermitian, with
+*> eigenvalues specified by D, COND, MODE, and DMAX; they
+*> may be positive, negative, or zero.
+*> If SYM='P', the generated matrix is hermitian, with
+*> eigenvalues (= singular values) specified by D, COND,
+*> MODE, and DMAX; they will not be negative.
+*> If SYM='N', the generated matrix is nonsymmetric, with
+*> singular values specified by D, COND, MODE, and DMAX;
+*> they will not be negative.
+*> If SYM='S', the generated matrix is (complex) symmetric,
+*> with singular values specified by D, COND, MODE, and
+*> DMAX; they will not be negative.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*> D is DOUBLE PRECISION array, dimension ( MIN( M, N ) )
+*> This array is used to specify the singular values or
+*> eigenvalues of A (see SYM, above.) If MODE=0, then D is
+*> assumed to contain the singular/eigenvalues, otherwise
+*> they will be computed according to MODE, COND, and DMAX,
+*> and placed in D.
+*> Modified if MODE is nonzero.
+*> \endverbatim
+*>
+*> \param[in] MODE
+*> \verbatim
+*> MODE is INTEGER
+*> On entry this describes how the singular/eigenvalues are to
+*> be specified:
+*> MODE = 0 means use D as input
+*> MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
+*> MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
+*> MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1))
+*> MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
+*> MODE = 5 sets D to random numbers in the range
+*> ( 1/COND , 1 ) such that their logarithms
+*> are uniformly distributed.
+*> MODE = 6 set D to random numbers from same distribution
+*> as the rest of the matrix.
+*> MODE < 0 has the same meaning as ABS(MODE), except that
+*> the order of the elements of D is reversed.
+*> Thus if MODE is positive, D has entries ranging from
+*> 1 to 1/COND, if negative, from 1/COND to 1,
+*> If SYM='H', and MODE is neither 0, 6, nor -6, then
+*> the elements of D will also be multiplied by a random
+*> sign (i.e., +1 or -1.)
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] COND
+*> \verbatim
+*> COND is DOUBLE PRECISION
+*> On entry, this is used as described under MODE above.
+*> If used, it must be >= 1. Not modified.
+*> \endverbatim
+*>
+*> \param[in] DMAX
+*> \verbatim
+*> DMAX is DOUBLE PRECISION
+*> If MODE is neither -6, 0 nor 6, the contents of D, as
+*> computed according to MODE and COND, will be scaled by
+*> DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
+*> singular value (which is to say the norm) will be abs(DMAX).
+*> Note that DMAX need not be positive: if DMAX is negative
+*> (or zero), D will be scaled by a negative number (or zero).
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] RANK
+*> \verbatim
+*> RANK is INTEGER
+*> The rank of matrix to be generated for modes 1,2,3 only.
+*> D( RANK+1:N ) = 0.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KL
+*> \verbatim
+*> KL is INTEGER
+*> This specifies the lower bandwidth of the matrix. For
+*> example, KL=0 implies upper triangular, KL=1 implies upper
+*> Hessenberg, and KL being at least M-1 means that the matrix
+*> has full lower bandwidth. KL must equal KU if the matrix
+*> is symmetric or hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] KU
+*> \verbatim
+*> KU is INTEGER
+*> This specifies the upper bandwidth of the matrix. For
+*> example, KU=0 implies lower triangular, KU=1 implies lower
+*> Hessenberg, and KU being at least N-1 means that the matrix
+*> has full upper bandwidth. KL must equal KU if the matrix
+*> is symmetric or hermitian.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in] PACK
+*> \verbatim
+*> PACK is CHARACTER*1
+*> This specifies packing of matrix as follows:
+*> 'N' => no packing
+*> 'U' => zero out all subdiagonal entries (if symmetric
+*> or hermitian)
+*> 'L' => zero out all superdiagonal entries (if symmetric
+*> or hermitian)
+*> 'C' => store the upper triangle columnwise (only if the
+*> matrix is symmetric, hermitian, or upper triangular)
+*> 'R' => store the lower triangle columnwise (only if the
+*> matrix is symmetric, hermitian, or lower triangular)
+*> 'B' => store the lower triangle in band storage scheme
+*> (only if the matrix is symmetric, hermitian, or
+*> lower triangular)
+*> 'Q' => store the upper triangle in band storage scheme
+*> (only if the matrix is symmetric, hermitian, or
+*> upper triangular)
+*> 'Z' => store the entire matrix in band storage scheme
+*> (pivoting can be provided for by using this
+*> option to store A in the trailing rows of
+*> the allocated storage)
+*> \endverbatim
+*> \verbatim
+*> Using these options, the various LAPACK packed and banded
+*> storage schemes can be obtained:
+*> GB - use 'Z'
+*> PB, SB, HB, or TB - use 'B' or 'Q'
+*> PP, SP, HB, or TP - use 'C' or 'R'
+*> \endverbatim
+*> \verbatim
+*> If two calls to ZLATMT differ only in the PACK parameter,
+*> they will generate mathematically equivalent matrices.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*> A is COMPLEX*16 array, dimension ( LDA, N )
+*> On exit A is the desired test matrix. A is first generated
+*> in full (unpacked) form, and then packed, if so specified
+*> by PACK. Thus, the first M elements of the first N
+*> columns will always be modified. If PACK specifies a
+*> packed or banded storage scheme, all LDA elements of the
+*> first N columns will be modified; the elements of the
+*> array which do not correspond to elements of the generated
+*> matrix are set to zero.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*> LDA is INTEGER
+*> LDA specifies the first dimension of A as declared in the
+*> calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
+*> LDA must be at least M. If PACK='B' or 'Q', then LDA must
+*> be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
+*> If PACK='Z', LDA must be large enough to hold the packed
+*> array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
+*> Not modified.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*> WORK is COMPLEX*16 array, dimension ( 3*MAX( N, M ) )
+*> Workspace.
+*> Modified.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*> INFO is INTEGER
+*> Error code. On exit, INFO will be set to one of the
+*> following values:
+*> 0 => normal return
+*> -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
+*> -2 => N negative
+*> -3 => DIST illegal string
+*> -5 => SYM illegal string
+*> -7 => MODE not in range -6 to 6
+*> -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
+*> -10 => KL negative
+*> -11 => KU negative, or SYM is not 'N' and KU is not equal to
+*> KL
+*> -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
+*> or PACK='C' or 'Q' and SYM='N' and KL is not zero;
+*> or PACK='R' or 'B' and SYM='N' and KU is not zero;
+*> or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
+*> N.
+*> -14 => LDA is less than M, or PACK='Z' and LDA is less than
+*> MIN(KU,N-1) + MIN(KL,M-1) + 1.
+*> 1 => Error return from DLATM7
+*> 2 => Cannot scale to DMAX (max. sing. value is 0)
+*> 3 => Error return from ZLAGGE, ZLAGHE or ZLAGSY
+*> \endverbatim
+*>
+*
+* Authors
+* =======
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date November 2011
+*
+*> \ingroup complex16_matgen
+*
+* =====================================================================
SUBROUTINE ZLATMT( M, N, DIST, ISEED, SYM, D, MODE, COND, DMAX,
$ RANK, KL, KU, PACK, A, LDA, WORK, INFO )
*
-* -- LAPACK test routine (version 3.1) --
-* Craig Lucas, University of Manchester / NAG Ltd.
-* October, 2008
+* -- LAPACK computational routine (version 3.1) --
+* -- LAPACK is a software package provided by Univ. of Tennessee, --
+* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+* November 2011
*
* .. Scalar Arguments ..
DOUBLE PRECISION COND, DMAX
@@ -16,253 +360,6 @@
INTEGER ISEED( 4 )
* ..
*
-* Purpose
-* =======
-*
-* ZLATMT generates random matrices with specified singular values
-* (or hermitian with specified eigenvalues)
-* for testing LAPACK programs.
-*
-* ZLATMT operates by applying the following sequence of
-* operations:
-*
-* Set the diagonal to D, where D may be input or
-* computed according to MODE, COND, DMAX, and SYM
-* as described below.
-*
-* Generate a matrix with the appropriate band structure, by one
-* of two methods:
-*
-* Method A:
-* Generate a dense M x N matrix by multiplying D on the left
-* and the right by random unitary matrices, then:
-*
-* Reduce the bandwidth according to KL and KU, using
-* Householder transformations.
-*
-* Method B:
-* Convert the bandwidth-0 (i.e., diagonal) matrix to a
-* bandwidth-1 matrix using Givens rotations, "chasing"
-* out-of-band elements back, much as in QR; then convert
-* the bandwidth-1 to a bandwidth-2 matrix, etc. Note
-* that for reasonably small bandwidths (relative to M and
-* N) this requires less storage, as a dense matrix is not
-* generated. Also, for hermitian or symmetric matrices,
-* only one triangle is generated.
-*
-* Method A is chosen if the bandwidth is a large fraction of the
-* order of the matrix, and LDA is at least M (so a dense
-* matrix can be stored.) Method B is chosen if the bandwidth
-* is small (< 1/2 N for hermitian or symmetric, < .3 N+M for
-* non-symmetric), or LDA is less than M and not less than the
-* bandwidth.
-*
-* Pack the matrix if desired. Options specified by PACK are:
-* no packing
-* zero out upper half (if hermitian)
-* zero out lower half (if hermitian)
-* store the upper half columnwise (if hermitian or upper
-* triangular)
-* store the lower half columnwise (if hermitian or lower
-* triangular)
-* store the lower triangle in banded format (if hermitian or
-* lower triangular)
-* store the upper triangle in banded format (if hermitian or
-* upper triangular)
-* store the entire matrix in banded format
-* If Method B is chosen, and band format is specified, then the
-* matrix will be generated in the band format, so no repacking
-* will be necessary.
-*
-* Arguments
-* =========
-*
-* M (input) INTEGER
-* The number of rows of A. Not modified.
-*
-* N (input) INTEGER
-* The number of columns of A. N must equal M if the matrix
-* is symmetric or hermitian (i.e., if SYM is not 'N')
-* Not modified.
-*
-* DIST (input) CHARACTER*1
-* On entry, DIST specifies the type of distribution to be used
-* to generate the random eigen-/singular values.
-* 'U' => UNIFORM( 0, 1 ) ( 'U' for uniform )
-* 'S' => UNIFORM( -1, 1 ) ( 'S' for symmetric )
-* 'N' => NORMAL( 0, 1 ) ( 'N' for normal )
-* Not modified.
-*
-* ISEED (input/output) INTEGER array, dimension ( 4 )
-* On entry ISEED specifies the seed of the random number
-* generator. They should lie between 0 and 4095 inclusive,
-* and ISEED(4) should be odd. The random number generator
-* uses a linear congruential sequence limited to small
-* integers, and so should produce machine independent
-* random numbers. The values of ISEED are changed on
-* exit, and can be used in the next call to ZLATMT
-* to continue the same random number sequence.
-* Changed on exit.
-*
-* SYM (input) CHARACTER*1
-* If SYM='H', the generated matrix is hermitian, with
-* eigenvalues specified by D, COND, MODE, and DMAX; they
-* may be positive, negative, or zero.
-* If SYM='P', the generated matrix is hermitian, with
-* eigenvalues (= singular values) specified by D, COND,
-* MODE, and DMAX; they will not be negative.
-* If SYM='N', the generated matrix is nonsymmetric, with
-* singular values specified by D, COND, MODE, and DMAX;
-* they will not be negative.
-* If SYM='S', the generated matrix is (complex) symmetric,
-* with singular values specified by D, COND, MODE, and
-* DMAX; they will not be negative.
-* Not modified.
-*
-* D (input/output) DOUBLE PRECISION array, dimension ( MIN( M, N ) )
-* This array is used to specify the singular values or
-* eigenvalues of A (see SYM, above.) If MODE=0, then D is
-* assumed to contain the singular/eigenvalues, otherwise
-* they will be computed according to MODE, COND, and DMAX,
-* and placed in D.
-* Modified if MODE is nonzero.
-*
-* MODE (input) INTEGER
-* On entry this describes how the singular/eigenvalues are to
-* be specified:
-* MODE = 0 means use D as input
-* MODE = 1 sets D(1)=1 and D(2:RANK)=1.0/COND
-* MODE = 2 sets D(1:RANK-1)=1 and D(RANK)=1.0/COND
-* MODE = 3 sets D(I)=COND**(-(I-1)/(RANK-1))
-* MODE = 4 sets D(i)=1 - (i-1)/(N-1)*(1 - 1/COND)
-* MODE = 5 sets D to random numbers in the range
-* ( 1/COND , 1 ) such that their logarithms
-* are uniformly distributed.
-* MODE = 6 set D to random numbers from same distribution
-* as the rest of the matrix.
-* MODE < 0 has the same meaning as ABS(MODE), except that
-* the order of the elements of D is reversed.
-* Thus if MODE is positive, D has entries ranging from
-* 1 to 1/COND, if negative, from 1/COND to 1,
-* If SYM='H', and MODE is neither 0, 6, nor -6, then
-* the elements of D will also be multiplied by a random
-* sign (i.e., +1 or -1.)
-* Not modified.
-*
-* COND (input) DOUBLE PRECISION
-* On entry, this is used as described under MODE above.
-* If used, it must be >= 1. Not modified.
-*
-* DMAX (input) DOUBLE PRECISION
-* If MODE is neither -6, 0 nor 6, the contents of D, as
-* computed according to MODE and COND, will be scaled by
-* DMAX / max(abs(D(i))); thus, the maximum absolute eigen- or
-* singular value (which is to say the norm) will be abs(DMAX).
-* Note that DMAX need not be positive: if DMAX is negative
-* (or zero), D will be scaled by a negative number (or zero).
-* Not modified.
-*
-* RANK (input) INTEGER
-* The rank of matrix to be generated for modes 1,2,3 only.
-* D( RANK+1:N ) = 0.
-* Not modified.
-*
-* KL (input) INTEGER
-* This specifies the lower bandwidth of the matrix. For
-* example, KL=0 implies upper triangular, KL=1 implies upper
-* Hessenberg, and KL being at least M-1 means that the matrix
-* has full lower bandwidth. KL must equal KU if the matrix
-* is symmetric or hermitian.
-* Not modified.
-*
-* KU (input) INTEGER
-* This specifies the upper bandwidth of the matrix. For
-* example, KU=0 implies lower triangular, KU=1 implies lower
-* Hessenberg, and KU being at least N-1 means that the matrix
-* has full upper bandwidth. KL must equal KU if the matrix
-* is symmetric or hermitian.
-* Not modified.
-*
-* PACK (input) CHARACTER*1
-* This specifies packing of matrix as follows:
-* 'N' => no packing
-* 'U' => zero out all subdiagonal entries (if symmetric
-* or hermitian)
-* 'L' => zero out all superdiagonal entries (if symmetric
-* or hermitian)
-* 'C' => store the upper triangle columnwise (only if the
-* matrix is symmetric, hermitian, or upper triangular)
-* 'R' => store the lower triangle columnwise (only if the
-* matrix is symmetric, hermitian, or lower triangular)
-* 'B' => store the lower triangle in band storage scheme
-* (only if the matrix is symmetric, hermitian, or
-* lower triangular)
-* 'Q' => store the upper triangle in band storage scheme
-* (only if the matrix is symmetric, hermitian, or
-* upper triangular)
-* 'Z' => store the entire matrix in band storage scheme
-* (pivoting can be provided for by using this
-* option to store A in the trailing rows of
-* the allocated storage)
-*
-* Using these options, the various LAPACK packed and banded
-* storage schemes can be obtained:
-* GB - use 'Z'
-* PB, SB, HB, or TB - use 'B' or 'Q'
-* PP, SP, HB, or TP - use 'C' or 'R'
-*
-* If two calls to ZLATMT differ only in the PACK parameter,
-* they will generate mathematically equivalent matrices.
-* Not modified.
-*
-* A (input/output) COMPLEX*16 array, dimension ( LDA, N )
-* On exit A is the desired test matrix. A is first generated
-* in full (unpacked) form, and then packed, if so specified
-* by PACK. Thus, the first M elements of the first N
-* columns will always be modified. If PACK specifies a
-* packed or banded storage scheme, all LDA elements of the
-* first N columns will be modified; the elements of the
-* array which do not correspond to elements of the generated
-* matrix are set to zero.
-* Modified.
-*
-* LDA (input) INTEGER
-* LDA specifies the first dimension of A as declared in the
-* calling program. If PACK='N', 'U', 'L', 'C', or 'R', then
-* LDA must be at least M. If PACK='B' or 'Q', then LDA must
-* be at least MIN( KL, M-1) (which is equal to MIN(KU,N-1)).
-* If PACK='Z', LDA must be large enough to hold the packed
-* array: MIN( KU, N-1) + MIN( KL, M-1) + 1.
-* Not modified.
-*
-* WORK (workspace) COMPLEX*16 array, dimension ( 3*MAX( N, M ) )
-* Workspace.
-* Modified.
-*
-* INFO (output) INTEGER
-* Error code. On exit, INFO will be set to one of the
-* following values:
-* 0 => normal return
-* -1 => M negative or unequal to N and SYM='S', 'H', or 'P'
-* -2 => N negative
-* -3 => DIST illegal string
-* -5 => SYM illegal string
-* -7 => MODE not in range -6 to 6
-* -8 => COND less than 1.0, and MODE neither -6, 0 nor 6
-* -10 => KL negative
-* -11 => KU negative, or SYM is not 'N' and KU is not equal to
-* KL
-* -12 => PACK illegal string, or PACK='U' or 'L', and SYM='N';
-* or PACK='C' or 'Q' and SYM='N' and KL is not zero;
-* or PACK='R' or 'B' and SYM='N' and KU is not zero;
-* or PACK='U', 'L', 'C', 'R', 'B', or 'Q', and M is not
-* N.
-* -14 => LDA is less than M, or PACK='Z' and LDA is less than
-* MIN(KU,N-1) + MIN(KL,M-1) + 1.
-* 1 => Error return from DLATM7
-* 2 => Cannot scale to DMAX (max. sing. value is 0)
-* 3 => Error return from ZLAGGE, ZLAGHE or ZLAGSY
-*
* =====================================================================
*
* .. Parameters ..